NEX-717 fix:bug修改

This commit is contained in:
zhangyu
2021-06-02 16:55:17 +08:00
parent 38d62fbe43
commit 9ee8b0f7ba
7 changed files with 37 additions and 6 deletions

View File

@@ -103,7 +103,7 @@
</el-radio-group>
</template>
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.CHECKBOX">
<el-checkbox-group v-model="label.value[0]">
<el-checkbox-group v-model="label.value">
<el-checkbox v-for="item in JSON.parse(label.param).items" :key="item.name" :label="item.name" :value="item.name"></el-checkbox>
</el-checkbox-group>
</template>
@@ -481,9 +481,27 @@ export default {
},
blankLabelValue (label) {
if (label.type.toUpperCase() === this.assetConstants.labelTypeData.CHECKBOX) {
return []
const arr = []
if (label.param && JSON.parse(label.param).items) {
JSON.parse(label.param).items.forEach(item => {
if (item.check) {
arr.push(item.name)
}
})
}
return arr
} else if (label.type.toUpperCase() === this.assetConstants.labelTypeData.MULTITEXT || label.type.toUpperCase() === assetConstants.labelTypeData.TEXT || label.type.toUpperCase() === assetConstants.labelTypeData.TEXTAREA) {
return ['']
} else if (label.type.toUpperCase() === this.assetConstants.labelTypeData.RADIO || label.type.toUpperCase() === assetConstants.labelTypeData.SELECT) {
const arr = ['']
if (label.param && JSON.parse(label.param).items) {
JSON.parse(label.param).items.forEach(item => {
if (item.check) {
arr[0] = item.name
}
})
}
return arr
} else {
return ['']
}

View File

@@ -279,6 +279,7 @@ export default {
t.disabled = false
})
}
this.selectType(this.editAssetMeta.type, false)
},
clickOutside () {
this.esc(false)

View File

@@ -60,7 +60,14 @@
<template v-else-if="item.prop === 'parent'">{{scope.row.parent ? scope.row.parent.name : '-'}}</template>
<template v-else-if="item.prop === 'brand'">{{scope.row.brand ? scope.row.brand.name : '-'}}</template>
<template v-else-if="item.prop === 'purchaseDate'">{{scope.row.purchaseDate ? scope.row.purchaseDate : '--'}}</template>
<template v-else>{{scope.row[item.prop]}}</template>
<template v-else>
<span v-if="scope.row.fields&&scope.row.fields.find(field => field.name === item.prop)">
{{scope.row.fields.find(field => field.name === item.prop).value.join(',')}}
</span>
<span v-else>
{{scope.row[item.prop]}}
</span>
</template>
</template>
</el-table-column>
<el-table-column

View File

@@ -49,7 +49,7 @@
active-color="#ee9d3f"
active-value="ON"
inactive-value="OFF"
@change="(val)=>{statusChange(scope.row)}"
@change="(val)=>{$emit('statusChange', scope.row)}"
/>
</template>
<template v-else-if="item.prop === 'longitude'">

View File

@@ -362,7 +362,7 @@ export default {
const data = []
const searchableData = response.data.list.filter(d => d.search === 1)
const showData = response.data.list.filter(d => d.display === 1).map(item => {
return { label: item.name, prop: 'Label', show: false, allowed: true, type: 'label' }
return { label: item.name, prop: item.name, show: false, allowed: true, type: 'label' }
})
searchableData.forEach(m => {
if (m.param) {

View File

@@ -29,6 +29,7 @@
@orderBy="tableDataSort"
@reload="getTableData"
@selectionChange="selectionChange"
@statusChange='statusChange'
@showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }"></dc-table>
</template>
<!-- 分页组件 -->

View File

@@ -248,7 +248,7 @@
<el-form-item v-show="editChart.type !='text' && editChart.type !=='url'&& editChart.type !=='group'" :label="$t('dashboard.panel.chartForm.unit')" class="form-item--half-width" prop="unit">
<el-cascader id="chart-box-unit" v-model="editChart.unit" :options="unitOptions" :props="{ expandTrigger: 'hover',emitPath:false }" :show-all-levels="false" filterable
placeholder=""
popper-class="dc-dropdown prevent-clickoutside"
popper-class="dc-dropdown prevent-clickoutside chart-box-unit"
size="small"
style="width: 100%"
@change="unitSelected"
@@ -1787,4 +1787,8 @@ export default {
.el-color-dropdown{
z-index: 2200!important;
}
.chart-box-unit .el-scrollbar{
height: 195px;
overflow-y: auto;
}
</style>