From d71cff1109ac21c47a6ce4ffd7e0e75eb9101f59 Mon Sep 17 00:00:00 2001 From: jinna Date: Wed, 10 Jan 2024 17:54:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=89=8D=E7=AB=AF=E6=B5=8B?= =?UTF-8?q?=E8=AF=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/const/limsConfig/equipmentManage.js | 1 + src/views/inspection/plan.vue | 3 ++- src/views/inspection/setting/points.vue | 24 ++++++++++++++++++------ src/views/limsConfig/equipmentManage.vue | 2 +- src/views/limsConfig/maintenance.vue | 1 + src/views/oiling/plan.vue | 1 + src/views/oiling/task.vue | 11 ++++++++--- 7 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/const/limsConfig/equipmentManage.js b/src/const/limsConfig/equipmentManage.js index 164263e..ef41e27 100644 --- a/src/const/limsConfig/equipmentManage.js +++ b/src/const/limsConfig/equipmentManage.js @@ -209,6 +209,7 @@ export const tableOption = { label: "dictValue", value: "dictKey", }, + rules: [{ required: true, message: "请选择运行状态", trigger: "blur" }], }, { type: "input", diff --git a/src/views/inspection/plan.vue b/src/views/inspection/plan.vue index 482d244..f920729 100644 --- a/src/views/inspection/plan.vue +++ b/src/views/inspection/plan.vue @@ -897,7 +897,7 @@ pointsForm.notes }} - +
@@ -1391,6 +1391,7 @@ export default { this.showProjectDialog = true; this.page[0].current = 1 this.searchProject() + this.$refs.maintainTable.clearSelection(); }, // 删除保养项目 removeSpecimen(index, row){ diff --git a/src/views/inspection/setting/points.vue b/src/views/inspection/setting/points.vue index 04de175..b885c19 100644 --- a/src/views/inspection/setting/points.vue +++ b/src/views/inspection/setting/points.vue @@ -736,8 +736,8 @@ {{ pointsForm.notes }} - - + +
@@ -1161,9 +1161,18 @@ export default { // this.fileList.push({url:response.data}) }, handleRemove(file, fileList){ + console.log('file ===>',file) + console.log('imgList ===>',this.imgList) + console.log('fileList ===>',this.fileList) if(file.status == "success"){ - this.imgList = this.imgList.filter(item => item != file.url) - this.fileList = this.imgList.filter(item => item.url != file.url) + if(file.response){ + this.imgList = this.imgList.filter(item => item != file.response.data) + this.fileList = this.imgList.filter(item => item.url != file.response.data) + }else{ + this.imgList = this.imgList.filter(item => item != file.url) + this.fileList = this.imgList.filter(item => item.url != file.url) + } + } }, // 切换周期 @@ -1242,6 +1251,7 @@ export default { this.showProjectDialog = true; this.page[0].current = 1 this.searchProject() + this.$refs.maintainTable.clearSelection(); // getProList({current:1,size:200}).then(res =>{ // this.tableData = res.data.data.records @@ -1359,8 +1369,10 @@ export default { console.log('res ============>',res) this.addForm = res.data.data; this.addForm.orderList = this.addForm.checkItemList - this.imgList.push(process.env.NODE_ENV == 'development' ? this.addForm.picture.replace('127.0.0.1','192.168.1.104') : this.addForm.picture) - this.fileList = [{url:process.env.NODE_ENV == 'development' ? this.addForm.picture.replace('127.0.0.1','192.168.1.104') : this.addForm.picture}] + this.addForm.picture ? this.imgList.push(process.env.NODE_ENV == 'development' ? this.addForm.picture.replace('127.0.0.1','192.168.1.104') : this.addForm.picture) : this.imgList = [] + this.fileList = this.addForm.picture ? [{url:process.env.NODE_ENV == 'development' ? this.addForm.picture.replace('127.0.0.1','192.168.1.104') : this.addForm.picture}] : [] + console.log('file ===>',this.fileList) + console.log('omg ===>',this.imgList) this.title = '编辑巡检点位' this.showAddDialog = true; this.$nextTick(() =>{ diff --git a/src/views/limsConfig/equipmentManage.vue b/src/views/limsConfig/equipmentManage.vue index c13f7c8..6f25f61 100644 --- a/src/views/limsConfig/equipmentManage.vue +++ b/src/views/limsConfig/equipmentManage.vue @@ -332,7 +332,7 @@ export default { }, methods: { editDecive(row,index){ - row.runStatus = row.runStatus + '' + row.runStatus = row.runStatus ? row.runStatus + '' : '' this.$refs.crud.rowEdit(row, index) }, diff --git a/src/views/limsConfig/maintenance.vue b/src/views/limsConfig/maintenance.vue index 221e6f2..1a4b021 100644 --- a/src/views/limsConfig/maintenance.vue +++ b/src/views/limsConfig/maintenance.vue @@ -253,6 +253,7 @@ export default { if(file.response.code == 200){ this.imgList = this.imgList.filter(item => item.url != file.response.data) } + console.log('img ===>',this.imgList) }, /** * 取当前用户的的信息 diff --git a/src/views/oiling/plan.vue b/src/views/oiling/plan.vue index 6fde0f8..a12a659 100644 --- a/src/views/oiling/plan.vue +++ b/src/views/oiling/plan.vue @@ -1161,6 +1161,7 @@ export default { this.showProjectDialog = true; this.page[0].current = 1 this.searchProject() + this.$refs.maintainTable.clearSelection(); // getProList({current:1,size:200}).then(res =>{ // this.tableData = res.data.data.records diff --git a/src/views/oiling/task.vue b/src/views/oiling/task.vue index a08e7ba..ea31d3c 100644 --- a/src/views/oiling/task.vue +++ b/src/views/oiling/task.vue @@ -1592,8 +1592,10 @@ export default { if(this.addForm.orderList.length !== 0){ this.addForm.orderList.forEach(row => { this.tableData.map((item,index) =>{ - if(item.id == row.id){ - this.$refs.maintainTable.toggleRowSelection(this.tableData[index],true); + if(item.id == row.projectId){ + this.$nextTick(() =>{ + this.$refs.maintainTable.toggleRowSelection(this.tableData[index],true); + }) } }) }); @@ -1689,6 +1691,9 @@ export default { addSpecimen() { this.showProjectDialog = true; this.page[0].current = 1 + this.$nextTick(() =>{ + this.$refs.maintainTable.clearSelection(); + }) this.searchProject() // getProList({current:1,size:200}).then(res =>{ // this.tableData = res.data.data.records @@ -1830,7 +1835,7 @@ export default { handleUpload(row, index) { this.showResultDialog = true; this.resultForm = row; - this.resultForm.status = 0 + // this.resultForm.status = 0 }, handleResult(){ console.log('res ===>',this.resultForm)