|
|
@@ -79,7 +79,7 @@
|
|
|
:value="item.key" :label="item.value"></vxe-option>
|
|
|
</vxe-select>
|
|
|
<vxe-select transfer v-if="row.valueKind == 'M-CHOICE'" v-model="row.settingValue" multiple
|
|
|
- size="mini" @change="changeOption($event,row)" :disabled="!row.flgModifiable">
|
|
|
+ size="mini" @change="changeOptionMulti($event,row)" :disabled="!row.flgModifiable">
|
|
|
<vxe-option v-for="item in row.valueFormat.items" :key="item.key"
|
|
|
:value="item.key" :label="item.value"></vxe-option>
|
|
|
</vxe-select>
|
|
|
@@ -171,6 +171,24 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ changeOptionMulti(e, row) {
|
|
|
+ console.log(e.value)
|
|
|
+ // 值是否发生变化
|
|
|
+ if (row.settingValueBack != row.settingValue) {
|
|
|
+ this.tableRightData.forEach(it => {
|
|
|
+ if (it.settingCode == row.settingCode) {
|
|
|
+ // valueChangeFlg为true值发生变化
|
|
|
+ // let arraySettingValue = it.valueFormat.items.filter(iv => e.value.some(s => s == iv.key))
|
|
|
+ // if (arraySettingValue && arraySettingValue.length > 0) {
|
|
|
+ // it.settingValue = arraySettingValue[0].value
|
|
|
+ // }
|
|
|
+ // 新增加的
|
|
|
+ it.settingValueKey = e.value
|
|
|
+ it['valueChangeFlg'] = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
/**
|
|
|
* @desc : 开关值变化事件
|
|
|
* @author : 寇珊珊
|
|
|
@@ -270,7 +288,7 @@ export default {
|
|
|
let list = this.tableRightData?.copy();
|
|
|
if (list && list.length > 0) {
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
- if (list[i].valueChangeFlg && !(list[i].valueKind == 'BOOL' || list[i].valueKind == 'S-CHOICE') && !list[i].settingValue) {
|
|
|
+ if (list[i].valueChangeFlg && !(list[i].valueKind == 'BOOL' || list[i].valueKind == 'S-CHOICE' || list[i].valueKind == 'M-CHOICE') && !list[i].settingValue) {
|
|
|
this.$Message.warning(this.$t('W_089', {'param1': (i + 1), 'param2': "参数值"}))
|
|
|
return false;
|
|
|
}
|
|
|
@@ -292,7 +310,7 @@ export default {
|
|
|
if (list && list.length > 0) {
|
|
|
let message = ''
|
|
|
list.forEach(it => {
|
|
|
- if (!(it.valueKind == 'BOOL' || it.valueKind == 'S-CHOICE') && (it.settingValue == '' || it.settingValue === undefined)) {
|
|
|
+ if (!(it.valueKind == 'BOOL' || it.valueKind == 'S-CHOICE' || it.valueKind == 'M-CHOICE') && (it.settingValue == '' || it.settingValue === undefined)) {
|
|
|
message += this.$t('W_001', {'param': this.$t('settingValue')})
|
|
|
return
|
|
|
}
|
|
|
@@ -309,6 +327,12 @@ export default {
|
|
|
settingValue: it.settingValueKey,//参数值
|
|
|
ftyId: this.$store.state.user.ftyId,
|
|
|
})
|
|
|
+ } else if (it.valueKind == 'M-CHOICE') {
|
|
|
+ params.push({
|
|
|
+ settingCode: it.settingCode, //参数代码
|
|
|
+ settingValue: it.settingValueKey?JSON.stringify(it.settingValueKey):null,//参数值
|
|
|
+ ftyId: this.$store.state.user.ftyId,
|
|
|
+ })
|
|
|
} else {
|
|
|
params.push({
|
|
|
settingCode: it.settingCode, //参数代码
|
|
|
@@ -346,6 +370,12 @@ export default {
|
|
|
settingValue: it.settingValueKey,//参数值
|
|
|
ftyId: this.$store.state.user.ftyId,
|
|
|
})
|
|
|
+ } else if (it.valueKind == 'M-CHOICE') {
|
|
|
+ params.push({
|
|
|
+ settingCode: it.settingCode, //参数代码
|
|
|
+ settingValue: it.settingValueKey?JSON.stringify(it.settingValueKey):null,//参数值
|
|
|
+ ftyId: this.$store.state.user.ftyId,
|
|
|
+ })
|
|
|
} else {
|
|
|
params.push({
|
|
|
settingCode: it.settingCode, //参数代码
|
|
|
@@ -426,6 +456,25 @@ export default {
|
|
|
it.settingDefault = arraySettingDefault[0].value
|
|
|
}
|
|
|
|
|
|
+ } else if (it.valueKind == 'M-CHOICE') {
|
|
|
+
|
|
|
+ //循环同步数据源key值类型 和系统参数、默认值 值类型
|
|
|
+ it.valueFormat.items.forEach(str => {
|
|
|
+ str.key = String(str.key);
|
|
|
+ str.value = str.name[this.$store.state.app.local_lan]
|
|
|
+ })
|
|
|
+ it.settingValue = JSON.parse(it.settingValue)
|
|
|
+ // 当前值
|
|
|
+ // let arraySettingValue = it.valueFormat.items.filter(iv => it.settingValue.some(s => s == iv.key))
|
|
|
+ // 默认值
|
|
|
+ // let arraySettingDefault = it.valueFormat.items.filter(iv => iv.key == it.settingDefault)
|
|
|
+ // if (arraySettingValue.length > 0) {
|
|
|
+ // it.settingValue = arraySettingValue[0].value
|
|
|
+ // }
|
|
|
+ // if (arraySettingDefault.length > 0) {
|
|
|
+ // it.settingDefault = arraySettingDefault[0].value
|
|
|
+ // }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// 判断是否值和原来的值发生变化
|