NEZ-2824 feat:列表字段显示顺序支持用户自定义页面开发
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
border: 1px solid $--button-light-border-color !important;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.custom-labels i {
|
||||
.custom-labels i.nz-icon-check{
|
||||
color: #04b330;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
@@ -63,10 +63,25 @@
|
||||
background-color: $--background-color-empty;
|
||||
}
|
||||
.custom-label {
|
||||
padding: 2px 0 2px 25px;
|
||||
padding: 2px 25px;
|
||||
position: relative;
|
||||
cursor: default;
|
||||
font-size: 14px;
|
||||
span{
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.nz-icon-sort{
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 2px;
|
||||
margin: 0 !important;
|
||||
cursor: grab;
|
||||
}
|
||||
}
|
||||
.custom-title {
|
||||
padding: 2px 0 2px 2px;
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
opacity: 1 !important;
|
||||
cursor: grab !important;
|
||||
background-color: $--background-color-empty;
|
||||
.drag-sort .nz-icon-sort{
|
||||
color: #FF8C0E;
|
||||
.nz-icon-sort{
|
||||
color: #FF8C0E !important;
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,11 @@ html {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.isDrag *{
|
||||
cursor: grab !important;
|
||||
}
|
||||
|
||||
|
||||
/* 默认主题和暗色主题 */
|
||||
.theme-light {
|
||||
$--theme: light;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-table-column
|
||||
v-for="(col, index) in columns"
|
||||
:prop="col.title"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:min-width="160"
|
||||
:sort-orders="['ascending', 'descending']"
|
||||
class="data-column"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, index) in tableTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
:prop="item.prop"
|
||||
|
||||
@@ -4,19 +4,73 @@
|
||||
<div class="pop-box custom-labels" @click.stop>
|
||||
<div style="height: 100%; overflow: auto;">
|
||||
<!--NotSet 为true不可设置-->
|
||||
<draggable
|
||||
v-model="custom"
|
||||
:move="move"
|
||||
@start="start"
|
||||
@end="end"
|
||||
:scroll-sensitivity="30"
|
||||
:options="{
|
||||
dragClass:'drag-elementSet-class',
|
||||
fallbackClass:'fallback-class',
|
||||
forceFallback:true,
|
||||
ghostClass:'chart-ghost',
|
||||
chosenClass:'chosen-class',
|
||||
scroll:true,
|
||||
filter: '.drag-disabled',
|
||||
animation: 150,
|
||||
handle: '.drag-sort'
|
||||
}"
|
||||
>
|
||||
<div
|
||||
v-for="(item,index) in custom"
|
||||
v-if="item.type!=='title'&&item.type!=='label'"
|
||||
:key="index"
|
||||
class="custom-label"
|
||||
@click.stop="handler(item,index)"
|
||||
:id="'element-set-el-'+index"
|
||||
:class="{'custom-title orange-font':item.type == 'title','custom-label-disabled':!allowedAll&&!item.allowed && (index==0 || index == 1 || item.NotSet)}"
|
||||
:class="{'custom-title orange-font':item.type == 'title','custom-label-disabled':!allowedAll&&!item.allowed && (index==0 || index == 1 || item.NotSet),'drag-disabled':index==0 || index == 1 || item.NotSet}"
|
||||
>
|
||||
<i class="nz-icon nz-icon-check" v-if="!allowedAll&&!item.allowed&&(index==0||index==1||item.visibility=='disabled')"></i>
|
||||
<i v-else class="nz-icon nz-icon-check" v-show="item.show"></i>
|
||||
<span>{{item.label}}</span>
|
||||
<i class="nz-icon nz-icon-sort drag-sort" v-if="index!==0 && index !== 1 && !item.NotSet" @click.stop></i>
|
||||
</div>
|
||||
|
||||
</draggable>
|
||||
<!-- asset Attributes -->
|
||||
<draggable
|
||||
v-model="custom"
|
||||
:move="move"
|
||||
@start="start"
|
||||
@end="end"
|
||||
:scroll-sensitivity="30"
|
||||
:options="{
|
||||
dragClass:'drag-elementSet-class',
|
||||
fallbackClass:'fallback-class',
|
||||
forceFallback:true,
|
||||
ghostClass:'chart-ghost',
|
||||
chosenClass:'chosen-class',
|
||||
scroll:true,
|
||||
filter: '.drag-disabled',
|
||||
animation: 150,
|
||||
handle: '.drag-sort'
|
||||
}"
|
||||
>
|
||||
<div
|
||||
v-for="(item,index) in custom"
|
||||
v-if="item.type==='title'||item.type==='label'"
|
||||
:key="index"
|
||||
class="custom-label"
|
||||
@click.stop="handler(item,index)"
|
||||
:id="'element-set-el-'+index"
|
||||
:class="{'custom-title orange-font':item.type == 'title','custom-label-disabled':!allowedAll&&!item.allowed && (index==0 || index == 1 || item.NotSet),'drag-disabled':index==0 || index == 1 || item.NotSet}"
|
||||
>
|
||||
<i class="nz-icon nz-icon-check" v-if="!allowedAll&&!item.allowed&&(index==0||index==1||item.visibility=='disabled')"></i>
|
||||
<i v-else class="nz-icon nz-icon-check" v-show="item.show"></i>
|
||||
<span>{{item.label}}</span>
|
||||
<i class="nz-icon nz-icon-sort drag-sort" v-if="index!==0 && index !== 1 && !item.NotSet" @click.stop></i>
|
||||
</div>
|
||||
</draggable>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-bottom-btns" @click.stop>
|
||||
@@ -39,6 +93,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import draggable from 'vuedraggable'
|
||||
export default {
|
||||
props: {
|
||||
customTableTitle: Array, // 自定义的title
|
||||
@@ -48,6 +103,9 @@ export default {
|
||||
tableClass: Boolean,
|
||||
operationTrue: Boolean
|
||||
},
|
||||
components: {
|
||||
draggable
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
custom: []
|
||||
@@ -113,6 +171,19 @@ export default {
|
||||
JSON.stringify(this.custom)
|
||||
)
|
||||
this.esc()
|
||||
},
|
||||
// 禁止拖动的对象
|
||||
move (e) {
|
||||
const index = e.relatedContext.index
|
||||
const item = e.relatedContext.element
|
||||
if (index == 0 || index == 1 || item.NotSet) return false
|
||||
return true
|
||||
},
|
||||
start () {
|
||||
document.body.classList.add('isDrag')
|
||||
},
|
||||
end () {
|
||||
document.body.classList.remove('isDrag')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -1344,6 +1344,14 @@ export default {
|
||||
let localStorageTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId)
|
||||
localStorageTableTitle = localStorageTableTitle ? JSON.parse(localStorageTableTitle) : tableTitle
|
||||
if (tableTitle) {
|
||||
// 先根据本地缓存中的prop进行排序
|
||||
tableTitle.sort(function (a, b) {
|
||||
return localStorageTableTitle.findIndex(function (c) {
|
||||
return c.prop === a.prop
|
||||
}) - localStorageTableTitle.findIndex(function (c) {
|
||||
return c.prop === b.prop
|
||||
})
|
||||
})
|
||||
this.tools.customTableTitle = tableTitle.map((item, index) => { // 修复切换中英文的问题
|
||||
item.show = localStorageTableTitle[index].show
|
||||
return item
|
||||
|
||||
@@ -45,9 +45,8 @@
|
||||
>
|
||||
<draggable
|
||||
v-model="elements"
|
||||
:move="move"
|
||||
@end="end"
|
||||
@start="start"
|
||||
@end="end"
|
||||
:scroll-sensitivity="150"
|
||||
:options="{
|
||||
dragClass:'drag-chart-class',
|
||||
@@ -59,7 +58,8 @@
|
||||
filter: '.drag-disabled',
|
||||
animation: 150,
|
||||
handle: '.drag-sort'
|
||||
}">
|
||||
}"
|
||||
>
|
||||
<el-row
|
||||
class="element-item form-row-item form-row-item-full thresholds-from-item"
|
||||
style="margin-bottom: 10px !important"
|
||||
@@ -454,8 +454,8 @@ export default {
|
||||
hideError (key, index) {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
move () {
|
||||
|
||||
start () {
|
||||
document.body.classList.add('isDrag')
|
||||
},
|
||||
end (event) {
|
||||
this.expressions = []
|
||||
@@ -482,9 +482,7 @@ export default {
|
||||
})
|
||||
}
|
||||
this.change()
|
||||
},
|
||||
start () {
|
||||
|
||||
document.body.classList.remove('isDrag')
|
||||
},
|
||||
init () {
|
||||
// 重置相关属性
|
||||
|
||||
@@ -808,7 +808,8 @@
|
||||
<el-row class="el-form">
|
||||
<draggable
|
||||
v-model="pen.data.valueMapping"
|
||||
@end="change"
|
||||
@start="start"
|
||||
@end="end"
|
||||
:scroll-sensitivity="150"
|
||||
:options="{
|
||||
dragClass:'drag-valueMapping-class',
|
||||
@@ -1225,6 +1226,13 @@ export default {
|
||||
mounted () {
|
||||
},
|
||||
methods: {
|
||||
start () {
|
||||
document.body.classList.add('isDrag')
|
||||
},
|
||||
end () {
|
||||
this.change()
|
||||
document.body.classList.remove('isDrag')
|
||||
},
|
||||
change (key) {
|
||||
if (key === 'lineDash') {
|
||||
const val = this.pen.borderType
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="(item, index) in assetTableTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in endpointTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in endpointTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -14,9 +14,8 @@
|
||||
>
|
||||
<draggable
|
||||
v-model="chartConfig.elements"
|
||||
:move="move"
|
||||
@end="end"
|
||||
@start="start"
|
||||
@end="end"
|
||||
:scroll-sensitivity="150"
|
||||
:options="{
|
||||
dragClass:'drag-chart-class',
|
||||
@@ -690,7 +689,8 @@
|
||||
</div>
|
||||
<draggable
|
||||
v-model="chartConfig.param.columns"
|
||||
@end="change"
|
||||
@start="start"
|
||||
@end="onEnd"
|
||||
:scroll-sensitivity="150"
|
||||
:options="{
|
||||
dragClass:'drag-columns-class',
|
||||
@@ -791,7 +791,8 @@
|
||||
<el-row v-if="chartConfig.param.enable.valueMapping">
|
||||
<draggable
|
||||
v-model="chartConfig.param.valueMapping"
|
||||
@end="change"
|
||||
@start="start"
|
||||
@end="onEnd"
|
||||
:scroll-sensitivity="150"
|
||||
:options="{
|
||||
dragClass:'drag-valueMapping-class',
|
||||
@@ -1389,8 +1390,8 @@ export default {
|
||||
})
|
||||
this.change()
|
||||
},
|
||||
move () {
|
||||
|
||||
start () {
|
||||
document.body.classList.add('isDrag')
|
||||
},
|
||||
end (event) {
|
||||
this.expressions = []
|
||||
@@ -1419,9 +1420,11 @@ export default {
|
||||
this.$refs.chartForm.clearValidate(arr)
|
||||
}
|
||||
this.change()
|
||||
document.body.classList.remove('isDrag')
|
||||
},
|
||||
start () {
|
||||
|
||||
onEnd () {
|
||||
this.change()
|
||||
document.body.classList.remove('isDrag')
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
@@ -439,7 +439,8 @@
|
||||
</div>
|
||||
<draggable
|
||||
v-model="chartConfig.param.columns"
|
||||
@end="change"
|
||||
@start="start"
|
||||
@end="end"
|
||||
:scroll-sensitivity="150"
|
||||
:options="{
|
||||
dragClass:'drag-columns-class',
|
||||
@@ -540,7 +541,8 @@
|
||||
<el-row v-if="chartConfig.param.enable.valueMapping">
|
||||
<draggable
|
||||
v-model="chartConfig.param.valueMapping"
|
||||
@end="change"
|
||||
@start="start"
|
||||
@end="end"
|
||||
:scroll-sensitivity="150"
|
||||
:options="{
|
||||
dragClass:'drag-valueMapping-class',
|
||||
@@ -1121,6 +1123,13 @@ export default {
|
||||
},
|
||||
showsystemInput (index, flag) {
|
||||
this.systemNameShow[index].hideInput = flag
|
||||
},
|
||||
start () {
|
||||
document.body.classList.add('isDrag')
|
||||
},
|
||||
end () {
|
||||
this.change()
|
||||
document.body.classList.remove('isDrag')
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
</div>
|
||||
<draggable
|
||||
v-model="editPanel.param.variables"
|
||||
@start="start"
|
||||
@end="end"
|
||||
:scroll-sensitivity="150"
|
||||
:options="{
|
||||
dragClass:'drag-columns-class',
|
||||
@@ -99,7 +101,8 @@
|
||||
filter: '.drag-disabled',
|
||||
animation: 150,
|
||||
handle: '.drag-sort'
|
||||
}">
|
||||
}"
|
||||
>
|
||||
<el-row
|
||||
v-for="(item,index) of editPanel.param.variables"
|
||||
:key="item.uid"
|
||||
@@ -530,6 +533,12 @@ export default {
|
||||
this.getUserData()
|
||||
},
|
||||
methods: {
|
||||
start () {
|
||||
document.body.classList.add('isDrag')
|
||||
},
|
||||
end () {
|
||||
document.body.classList.remove('isDrag')
|
||||
},
|
||||
// 变量类型改变 清空数据
|
||||
variableTypeChange (index) {
|
||||
this.$set(this.editPanel.param.variables[index], 'customOptions', '')
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
show-overflow-tooltip
|
||||
v-for="(item, index) in tableLabels"
|
||||
:width="item.width"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
style="max-height: 200px"
|
||||
>
|
||||
<template slot="header">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, index) in columns"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:min-width="`${item.minWidth}`"
|
||||
:width="`${item.width}`"
|
||||
:prop="item.prop"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<el-table-column
|
||||
class="table-column__head"
|
||||
v-for="(item, index) in customTableTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:width="`${item.width}`"
|
||||
:min-width="`${item.minWidth}`"
|
||||
:label="item.label"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
:resizable="true"
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:label="item.label">
|
||||
<template slot-scope="scope" :column="item">
|
||||
<span v-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop]}}</span>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
border>
|
||||
<el-table-column
|
||||
v-for="(item, index) in serviceTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
@@ -31,7 +31,7 @@
|
||||
border>
|
||||
<el-table-column
|
||||
v-for="(item, index) in serviceTitleSub"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
@@ -62,7 +62,7 @@
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, index) in ingesterTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
border>
|
||||
<el-table-column
|
||||
v-for="(item, index) in serviceTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
@@ -31,7 +31,7 @@
|
||||
border>
|
||||
<el-table-column
|
||||
v-for="(item, index) in serviceTitleSub"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
@@ -61,7 +61,7 @@
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, index) in ingesterTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
:prop="item.prop"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
:prop="item.prop"
|
||||
|
||||
@@ -681,6 +681,9 @@ export default {
|
||||
const oldLabelTitle = title.slice(tableTitle.length, title.length) // 旧labelTitle
|
||||
|
||||
const newLabel = showData.filter(item => { return !oldLabelTitle.find(t => { return item.label === t.label }) })
|
||||
newLabel.forEach(item => {
|
||||
item.minWidth = item.label.length * 16 + 20
|
||||
})
|
||||
const keepLabel = oldLabelTitle.filter(item => showData.find(t => item.label === t.label))
|
||||
|
||||
let result = originalTitle.concat([{ label: this.$t('overall.labels'), show: false, NotSet: true, type: 'title', prop: 'table-label' }])
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in tools.customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:prop="item.prop"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:fixed="item.fixed"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in tools.customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:label="item.label"
|
||||
:prop="item.prop"
|
||||
:resizable="false"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<el-table-column
|
||||
v-for="(item, index) in tools.customTableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:label="item.label"
|
||||
:prop="item.prop"
|
||||
:resizable="false"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="(item, index) in tableTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
:prop="item.prop"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
>
|
||||
<el-table-column
|
||||
v-for="(item, index) in tableTitle"
|
||||
:key="`col-${index}`"
|
||||
:key="`col-${index}-${item.prop}`"
|
||||
:label="item.label"
|
||||
:min-width="`${item.minWidth}`"
|
||||
:prop="item.prop"
|
||||
|
||||
Reference in New Issue
Block a user