master
qsj 2 years ago
parent d77e1b0d42
commit f1b893a32e

@ -329,15 +329,13 @@
<el-form-item label="模式名称" :prop="`liningMode${index}`">
<el-select v-model="item.modeList" multiple placeholder="请选择"
@change="clothmodeIdsValueChang(item)">
<el-option v-for="item in Modetions" :key="item.value" :label="item.modeName"
:value="item.id">
<el-option v-for="item in Modetions" :label="item.modeName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="带NEW标识模式名称" :prop="`liningNewMode${index}`">
<el-select v-model="item.newModeIdList" multiple placeholder="请选择">
<el-option v-for="item in NewOptions" :key="item.value" :label="item.modeName"
:value="item.id">
<el-option v-for="(item, index) in NewOptions" :label="item.modeName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
@ -1229,6 +1227,8 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.wxLiningList = []
// debugger
this.reset()
this.open = true
this.title = '添加仪器列'
@ -1247,7 +1247,7 @@ export default {
}
})
this.mode.modeIdsOptions = response.data
this.Modetions = JSON.parse(JSON.stringify(response.data))
}
})
listLining().then(e => {
@ -1257,13 +1257,21 @@ export default {
label: item.name
})
})
console.log(this.ClothOptions, '111111');
})
},
/** 修改按钮操作 */
handleUpdate(row) {
this.wxLiningList = []
this.reset()
const id = row.id || this.ids
getInstrument(id).then((response) => {
if (response.data.model === "WE200") {
this.WEClothShow = true
this.wxLiningList = response.data.wxLiningList
}
this.form = response.data
//
this.bannerFile = {
@ -1381,6 +1389,7 @@ export default {
instrumentType: this.form.type,
instrumentModel: this.form.model,
}).then((response) => {
if (response.code != 200) {
this.$message.error('模式获取失败')
}
@ -1412,10 +1421,36 @@ export default {
}
if (temp !== undefined && temp.length > 0) {
this.newModeOptionList = temp
console.log(temp, '查看你');
this.NewOptions = JSON.parse(JSON.stringify(temp))
}
}
/* 带new标识选项回显 */
if (
this.wxLiningList[0].modeList != null &&
this.wxLiningList[0].modeList.length > 0
) {
let temp = []
for (let i = 0; i < this.wxLiningList[0].modeList.length; i++) {
let filterModeArr = this.Modetions.filter(
(item) =>
item !== undefined && this.wxLiningList[0].modeList[i] === item.id
)
if (filterModeArr !== undefined && filterModeArr.length > 0) {
temp.push(filterModeArr[0])
}
}
if (temp !== undefined && temp.length > 0) {
// this.newModeOptionList = temp
this.NewOptions = JSON.parse(JSON.stringify(temp))
}
}
})
// IOT
@ -1436,6 +1471,8 @@ export default {
})
})
})
},
/** 提交按钮 */
submitForm() {
@ -1471,14 +1508,14 @@ export default {
this.form.nurseList = this.nurseList
this.form.introduceList = this.introduceList
if(this.form.model == 'WE200') {
if(this.wxLiningList.length == 0) {
if (this.form.model == 'WE200') {
if (this.wxLiningList.length == 0) {
this.$modal.msgError('请添加膜布');
return
}
console.log("wxLiningList => ", this.wxLiningList);
if(this.wxLiningList.length > 0) {
if (this.wxLiningList.length > 0) {
this.form.wxLiningList = this.wxLiningList;
}
}
@ -1759,7 +1796,7 @@ export default {
this.form.we200BluetoothConnectingContent = null;
//
this.WEClothShow = false;
this.ClothOptions = [];
// this.Modetions = [];
// this.NewOptions = [];
this.wxLiningList = [];
@ -1777,9 +1814,27 @@ export default {
console.log(this.form, '查看列表');
if (this.form.model === 'WE200') {
this.WEClothShow = true
this.wxLiningList = []
listAllMode({
instrumentType: this.form.type,
instrumentModel: this.form.model
}).then((response) => {
if (response.code != 200) {
this.$message.error('模式获取失败')
}
if (response.data.length > 0) {
response.data.map((item) => {
if (item.modeDesc != null) {
item.modeName = item.modeName + "" + item.modeDesc + "";
}
})
this.Modetions = response.data
}
})
} else {
this.WEClothShow = false
this.ClothOptions = []
// this.ClothOptions = []
// this.Modetions = []
// this.NewOptions = []
this.wxLiningList = []

Loading…
Cancel
Save