From a8fb5d596d0fef7421c3946ad331588b84a390cd Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 09 十一月 2023 10:04:39 +0800
Subject: [PATCH] modified: src/views/quality/finishedProductInspection/finishedProduct-form.vue modified: src/views/quality/rawMaterial/rawMaterial-form.vue modified: vue.config.js
---
src/views/quality/rawMaterial/rawMaterial-form.vue | 97 ++++++++++---------------------
vue.config.js | 4
src/views/quality/finishedProductInspection/finishedProduct-form.vue | 41 -------------
3 files changed, 35 insertions(+), 107 deletions(-)
diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
index 03d109d..17c5246 100644
--- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue
+++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -75,13 +75,8 @@
</div>
</el-form>
</div>
-
-
-
-
- <div class="finishedProduct-detail" v-if="resultVal!=null && processInspectVo.id!=null" >
+ <div class="finishedProduct-detail">
<el-row style="width:100%;z-index: 10;height:30px;">
- <el-col :span="12" class="inspectionProject_span" @click="increase">娣诲姞</el-col>
<el-col :span="12" class="inspectionProject_span">妫�楠岄」鐩�</el-col>
<el-col v-if="resultVal==null" :span="12" class="inspectionProject_span" style="text-align: right;">
<el-button size="mini" @click="clickAddInspectionColumn()">娣诲姞妫�娴嬪�煎垪</el-button>
@@ -182,40 +177,6 @@
</el-col>
</el-row>
</div>
- <div v-else>
-
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<div class="finishedProduct-result">
<el-row style="width:100%">
<el-col :span="24">妫�娴嬬粨鏋�</el-col>
diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue
index ec6ec28..4a13e4a 100644
--- a/src/views/quality/rawMaterial/rawMaterial-form.vue
+++ b/src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -127,7 +127,7 @@
</el-table-column>
<el-table-column prop="father" label="妫�楠岄」鐩�" width="260">
<template slot-scope="scope">
- <el-input v-if="scope.row.children" style="width:120px" :disabled="dataForm.id!=null" v-model="scope.row.father" placeholder="璇疯緭鍏ユ楠岄」鐩�"></el-input>
+ <el-input v-if="scope.row.children" style="width:90%" :disabled="dataForm.id!=null" v-model="scope.row.father" placeholder="璇疯緭鍏ユ楠岄」鐩�"></el-input>
</template>
</el-table-column>
<el-table-column prop="name" label="椤圭洰" width="260">
@@ -167,8 +167,7 @@
<el-col v-else>
<el-select style="width: 100%;"
:disabled="scope.row.deviceId == null || (dataForm.id!=null&&resultVal!=null)"
- v-model="scope.row.testValueList[index]" @change="aaa(scope.row)"
- placeholder="璇烽�夋嫨">
+ v-model="scope.row.testValueList[index]" placeholder="璇烽�夋嫨">
<el-option v-for="item in dataVal" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
@@ -198,16 +197,18 @@
</el-table-column>
<el-table-column fixed="right" v-if="dataForm.id != null" prop="testState" label="缁撹" min-width="150">
<template slot-scope="scope">
- <span v-if="scope.row.testState == 0" style="color:#F56C6C">涓嶅悎鏍�</span>
- <span v-else-if="scope.row.testState == 1" style="color:#67C23A">鍚堟牸</span>
- <span v-else>鏆傛棤缁撹</span>
+ <div v-if="!scope.row.children">
+ <span v-if="scope.row.testState == 0" style="color:#F56C6C">涓嶅悎鏍�</span>
+ <span v-else-if="scope.row.testState == 1" style="color:#67C23A">鍚堟牸</span>
+ <span v-else>鏆傛棤缁撹</span>
+ </div>
</template>
</el-table-column>
<el-table-column fixed="right" style="background-color: white;" v-if="dataForm.id == null" label="鎿嶄綔" width="150">
<template slot-scope="scope">
- <div v-if="!scope.row.children">
- <el-button type="text" @click="addwaydata(scope)">鏂板</el-button>
- <el-button type="text" @click="clickDeleteline(scope)">鍙栨秷</el-button>
+ <div>
+ <el-button v-if="scope.row.father!=null" type="text" @click="addChildren(scope.row)">娣诲姞椤圭洰</el-button>
+ <el-button v-else type="text" @click="delChildren(scope,scope.$index)">鍙栨秷</el-button>
</div>
</template>
</el-table-column>
@@ -337,7 +338,6 @@
dataRule: {},
deviceList: [],
restaurants:[],
- whetherNot:'',
}
},
beforeUpdate(){
@@ -355,9 +355,6 @@
this.init()
this.getDeviceList()
this.restaurants = this.loadAll();
-
- console.log(this.dataForm);
-
},
watch:{
dialogVisible(newVal){
@@ -365,7 +362,6 @@
this.unqualifiedNum = null
}
},
-
},
methods:{
querySearch(queryString, cb) {
@@ -408,11 +404,6 @@
this.dataForm.message = param.message
this.dataForm.projectName = param.projectName
this.projectList = param.rawInsProducts == null ? [] : param.rawInsProducts
- console.log(param.rawInsProducts);
- param.rawInsProducts.forEach(item =>{
- item.iid = Math.random()
- console.log(item);
- })
param.rawInsProducts.forEach(o=>{
this.clickAddLine(o)
})
@@ -426,8 +417,6 @@
this.showPart = true
},
updateDevice(row,index){
- console.log(row);
- return
if(this.dataForm.id != null){
updateDeviceById({deviceId:row.deviceId,rpId:row.rpId}).then(res=>{
this.list[index].testValue = ''
@@ -450,9 +439,6 @@
this.resultVal = resultVal
this.conclusionTable[0].testState = resultVal
sessionStorage.setItem("raw-resultVal-"+this.dataForm.id,resultVal)
- },
- aaa(row){
- console.log(row);
},
showDialog(){
let pro = this.list.filter(item => {
@@ -488,7 +474,6 @@
if(row){
let userNameList = []
row.children.forEach(item => {
- console.log("item--",item);
item.iid = Math.random()
let arr = []
item.testValue = ''
@@ -503,7 +488,6 @@
if (arr.length > this.empiricalValueAdd) {
this.empiricalValueAdd = arr.length
}
- console.log("aaaa----",row);
this.list.push(row)
})
}else{
@@ -623,38 +607,29 @@
this.conclusionTable = []
}
},
- // 鍒犻櫎琛�
- clickDeleteline(scope) {
- console.log(scope);
- let index = this.list.findIndex(el =>{
- return el.children.find(ele => ele.iid == scope.row.iid)
- })
-
- let childrenIndex = this.list[index].children.findIndex(el => {
- return el.iid == scope.row.iid
- })
- // console.log(this.list);
- console.log(index);
- console.log(childrenIndex);
-
- this.list[index].children.splice(childrenIndex , 1);
- if(childrenIndex == 0){
- this.list.splice(scope.row,1)
- }
+ // 鍒犻櫎瀛愰」鐩�
+ delChildren(scope,index) {
+ console.log(scope,index);
+
},
- addwaydata(row){
- console.log(row.row);
- let index = this.list.findIndex(el =>{
- return el.children.find(ele => ele.iid == row.row.iid)
- })
- console.log(index);
+ //娣诲姞瀛愰」鐩�
+ addChildren(row){
+ console.log(row);
let obj = {
- iid:Math.random(),
- name:'',
- required:'',
- unit:''
+ deviceId: null,
+ deviceName: null,
+ iid: Math.random(),
+ required: null,
+ rpId: null,
+ name: null,
+ unit: null,
+ userName: null,
+ testValue: null,
+ testValueList: [],
+ note: null,
+ testState: null
}
- this.list[index].children.push(obj)
+ row.children.push(obj)
},
save(){
console.log(this.dataForm);
@@ -662,20 +637,12 @@
console.log(data);
console.log(this.list);
data.rawInsProducts = this.list
- // console.log(data.rawInsProducts);
- // data.rawInsProducts.forEach(item=>{
- // console.log(item);
- // let val = item.testValueList.join(",")
- // item.testValue = val
- // console.log(item.testValue);
- // })
- // console.log(data);
console.log('=====>');
addRawInspects(data).then(res=>{
- // this.$message.success("淇濆瓨鎴愬姛")
+ this.$message.success("淇濆瓨鎴愬姛")
this.$router.go(-1)
}).catch(error=>{
- // this.$message.error(error||'error')
+ this.$message.error(error)
})
},
getDeviceList(){
diff --git a/vue.config.js b/vue.config.js
index a1d3246..f55c91d 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -2,8 +2,8 @@
* 閰嶇疆鍙傝��:
* https://cli.vuejs.org/zh/config/
*/
-// const url = 'http://192.168.0.23:9999'
-const url = 'http://192.168.0.51:9999'
+const url = 'http://192.168.0.23:9999'
+// const url = 'http://192.168.0.51:9999'
// const url = 'http://ztt-gateway:9999'
const localUrl = 'http://localhost:8089'
//const localUrl = 'http://10.88.15.95:8089'
--
Gitblit v1.9.3