From ff490948055a71676f65d0b8436e0d9d7a62ab46 Mon Sep 17 00:00:00 2001
From: 李林 <z1292839451@163.com>
Date: 星期四, 28 三月 2024 18:01:13 +0800
Subject: [PATCH] 检验任务
---
src/components/view/a5-capacity-scope.vue | 4 +-
src/components/do/b1-inspect-order-plan/Inspection.vue | 86 +++++++++++++++++++++++++++++++++---------
src/App.vue | 1
src/view/index.vue | 2
src/assets/api/controller.js | 4 +
5 files changed, 74 insertions(+), 23 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 99d5e8d..6c5cb58 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -111,6 +111,7 @@
.el-popover {
padding: 0;
+ z-index: 9999 !important;
}
.el-popper .popper__arrow {
diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 45db478..f97a408 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -37,7 +37,8 @@
selectCustomPageList: "/user/selectCustomPageList", //鑾峰彇瀹㈡埛鍒楄〃
delCustomById: "/user/delCustomById", //鍒犻櫎瀹㈡埛淇℃伅
addCustom: "/user/addCustom", //鏂板瀹㈡埛淇℃伅
- getUserNow: "/user/getUserNow", //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴蜂俊鎭�
+ getUserNow: "/user/getUserNow", //鑾峰彇褰撳墠鐧诲綍鐨勫鎴蜂俊鎭�
+ getUserInfo: "/user/getUserInfo", //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴蜂俊鎭�
}
const dataReporting = {
@@ -135,6 +136,7 @@
selectInsOrderPlanList: "/insOrderPlan/selectInsOrderPlanList", //鏌ヨ妫�楠屼换鍔�
claimInsOrderPlan: "/insOrderPlan/claimInsOrderPlan",//璁ら妫�楠屼换鍔�
doInsOrder: "/insOrderPlan/doInsOrder",//鎵ц妫�楠屾搷浣�
+ saveInsContext: "/insOrderPlan/saveInsContext",//淇濆瓨妫�楠屽唴瀹�
}
const systemLog = {
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index ec425c4..87ce163 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -169,7 +169,7 @@
<div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`">
<template v-if="n.v.ps!=undefined && n.v.ps.value==='妫�楠屽��'">
<el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v"
- :disabled="getInspectionItemType(n.i) == 1"
+ :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')"
@change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" />
<el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea"
:autosize="{ minRows: 1}" v-model="n.v.v" />
@@ -181,7 +181,7 @@
v-else-if="getInspectionValueType(n.i) == 4">/</span>
<el-button type="primary" icon="el-icon-edit" size="mini" circle
v-if="getInspectionItemType(n.i) == 1" style="border: 0;margin-left: 2px;"
- @click="getSystemValue(n)">
+ @click="getSystemValue(n)" :disabled="n.u != userId && n.u != undefined && n.u != ''">
</el-button>
</template>
<template v-else-if="n.v.ps!=undefined && n.v.ps.value==='缁撹'">
@@ -195,7 +195,7 @@
v-for="item in equipOptions"
:key="item.value"
:label="item.label"
- :value="item.value">
+ :value="item.label">
</el-option>
</el-select>
</template>
@@ -297,12 +297,14 @@
currentKey: 1,
comparisonList: [],
excelMethodList: [],
- equipOptions:[]
+ equipOptions:[],
+ userId: 0
}
},
created() {
this.componentData.entity.sonLaboratory = this.sonLaboratory;
this.id = this.orderId;
+ this.getUserInfo()
},
mounted() {
this.getTypeDicts()
@@ -327,9 +329,9 @@
this.param[a.id] = {
insValue: [],
comValue: [],
- resValue: [],
+ resValue: null,
equipValue:null,
- intResult: null
+ insResult: null
}
})
if (this.currentSample.index == undefined) this.currentSample['index'] = 1
@@ -347,9 +349,9 @@
this.param[a.id] = {
insValue: [],
comValue: [],
- resValue: [],
+ resValue: null,
equipValue:null,
- intResult: null
+ insResult: null
}
})
this.handleTableData()
@@ -495,6 +497,7 @@
}
if (b.v.ps != undefined && b.v.ps.value === '妫�楠屽��') {
b.v.v = ''
+ b.u = ''
this.param[b.i].insValue.push(b)
}
if (b.v.ps != undefined && b.v.ps.value === '璁$畻鍊�') {
@@ -509,10 +512,10 @@
b.v.v = ''
if (b.i === undefined) {
for (var c in this.param) {
- this.param[c].resValue.push(b)
+ this.param[c].resValue = b
}
} else {
- this.param[b.i].resValue.push(b)
+ this.param[b.i].resValue = b
}
}
if (b.v.ps!=undefined&&b.v.ps.value==='缁撹'){
@@ -555,11 +558,26 @@
})
a.arr = arrs
})
- /* this.currentSample.insProduct.forEach(a=>{
- for(var i=0;i<a.param.comValue.length;i++){
- this.param[a.id].comValue[i].v.v = a.param.comValue[i].v.v
- }
- }) */
+ this.currentSample.insProduct.forEach(a=>{
+ try{
+ let comValue = JSON.parse(a.insProductResult.comValue)
+ for(var i=0;i<comValue.length;i++){
+ this.param[a.id].comValue[i].v.v = comValue[i].v
+ }
+ }catch(e){}
+ try{
+ let insValue = JSON.parse(a.insProductResult.insValue)
+ for(var i=0;i<insValue.length;i++){
+ this.param[a.id].insValue[i].v.v = insValue[i].v
+ this.param[a.id].insValue[i].u = insValue[i].u
+ }
+ }catch(e){}
+ try{
+ this.param[a.id].equipValue.v.v = a.insProductResult.equipValue
+ }catch(e){}
+ this.param[a.id].resValue.v.v = a.lastValue
+ this.param[a.id].insResult.v.v = a.insResult
+ })
this.handleExcelMethod()
},
changeInput(m, code) {
@@ -625,17 +643,34 @@
} else {
item.v.v = 0
}
- console.log(33333333333, this.param)
+ this.$axios.post(this.$api.insOrderPlan.saveInsContext, this.param, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res=>{
+ if(res.code==201){
+ this.$message.error('淇濆瓨澶辫触')
+ return
+ }
+ this.$message.success('宸蹭繚瀛�')
+ })
}
} else {
let comResult = 0;
switch (item.methodName) {
case 'AVERAGE':
+ let num = 0
+ for (var a in comValue) {
+ num += comValue[a]
+ }
+ comResult = num / Object.keys(comValue).length
+ break;
+ case 'SUM':
let sum = 0
for (var a in comValue) {
sum += comValue[a]
}
- comResult = sum / Object.keys(comValue).length
+ comResult = sum
break;
default:
break;
@@ -723,6 +758,14 @@
}
},
getSystemValue(n) {
+ try{
+ if(this.param[n.i].equipValue.v.v == null||this.param[n.i].equipValue.v.v == ''){
+ this.$message.error('璇峰厛閫夋嫨閲囬泦鐨勮澶�')
+ return
+ }
+ }catch(e){
+ this.$message.error('鎵句笉鍒拌澶囧唴瀹�')
+ }
this.$message.error('閲囬泦澶辫触銆愬凡寮�鏀炬墜鍔ㄦ柟寮忋��')
for (var a in this.currentSample.insProduct) {
if (this.currentSample.insProduct[a].id == n.i) {
@@ -732,7 +775,7 @@
},
getEquipOptions(e,id){
if(e){
- let category = this.tableList.find(m=>m.id==id).deviceGroup
+ let category = this.currentSample.insProduct.find(m=>m.id==id).deviceGroup
this.$axios.post(this.$api.deviceScope.selectDeviceByCategory, {category}).then(res => {
if (res.code === 200 && res.data) {
this.equipOptions = res.data.map(m=>{
@@ -745,7 +788,12 @@
console.error(error)
})
}
- }
+ },
+ getUserInfo() {
+ this.$axios.get(this.$api.user.getUserInfo).then(res => {
+ this.userId = res.data.id
+ })
+ },
}
}
</script>
diff --git a/src/components/view/a5-capacity-scope.vue b/src/components/view/a5-capacity-scope.vue
index bf6e2dd..b538c92 100644
--- a/src/components/view/a5-capacity-scope.vue
+++ b/src/components/view/a5-capacity-scope.vue
@@ -188,8 +188,8 @@
sonLaboratory: {select:[]},
unit: {select:[]}
},
- requiredAdd: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','sample'],
- requiredUp: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','sample']
+ requiredAdd: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','sample'],
+ requiredUp: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','sample']
},
testObjectData: {
entity: {
diff --git a/src/view/index.vue b/src/view/index.vue
index 04e57ba..8813684 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -235,7 +235,7 @@
top: 0;
left: 0;
display: none;
- z-index: 999;
+ z-index: 9998;
padding: 0;
}
--
Gitblit v1.9.3