From 172c09e3c59dccd870a0e464f045ca33789cd107 Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期六, 09 九月 2023 17:10:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main.js | 2
src/components/view/rawInsDetail.vue | 60 ++++++++++++++++++++----------
src/assets/api/controller.js | 1
3 files changed, 42 insertions(+), 21 deletions(-)
diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 74439e1..e9c4312 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -23,6 +23,7 @@
updateRawInspectsById: "/rawInspect/updateRawInspectsById/", //涓婃姤,
rawSelectDevice: "/rawInsProduct/selectDevice", //鏌ヨ璁惧淇℃伅
addRawInspects: "/rawInspect/addRawInspects", // 娣诲姞
+ updateDevByRpId: "/rawInsProduct/updateDevByRpId", // 鏇存敼璁惧
}
//涓嶅悎鏍煎師鏉愭枡
const unqualifiedaa ={
diff --git a/src/components/view/rawInsDetail.vue b/src/components/view/rawInsDetail.vue
index 93ad190..9f5a5d6 100644
--- a/src/components/view/rawInsDetail.vue
+++ b/src/components/view/rawInsDetail.vue
@@ -51,7 +51,7 @@
<el-input
v-if="detailId !== null"
:disabled="detailId !== null"
- v-model="detailInfo.rname"
+ v-model="detailInfo.name"
></el-input>
<el-input
v-else
@@ -64,7 +64,7 @@
<el-input
v-if="detailId !== null"
:disabled="detailId !== null"
- v-model="detailInfo.rcode"
+ v-model="detailInfo.code"
></el-input>
<el-input
v-else
@@ -190,9 +190,10 @@
<el-input v-else v-model="scope.row.rpUnit" disabled></el-input>
</template>
</el-table-column>
- <el-table-column prop="required" label="鏍囧噯" min-width="150">
+ <el-table-column prop="required" label="鏍囧噯鍊�" min-width="150">
<template slot-scope="scope">
<el-input
+ :disabled="detailId != null"
v-model="scope.row.required"
placeholder="璇疯緭鍏ユ爣鍑嗗��"
></el-input>
@@ -201,6 +202,7 @@
<el-table-column prop="internal" label="鍐呮帶鍊�" min-width="150">
<template slot-scope="scope">
<el-input
+ :disabled="detailId != null"
v-model="scope.row.internal"
placeholder="璇疯緭鍏ュ唴鎺у��"
></el-input>
@@ -272,11 +274,11 @@
<el-table :data="conclusionTable" style="100%">
<el-table-column prop="code" label="鐗╂枡缂栧彿"> </el-table-column>
<el-table-column prop="name" label="鐗╂枡鍚嶇О"> </el-table-column>
- <el-table-column prop="names" label="妫�楠屽憳">
+ <el-table-column prop="uName" label="妫�楠屽憳">
<template slot-scope="scope">
<span
- v-for="item in scope.row.names"
- :key="item && item.userName"
+ v-for="item in scope.row.uName"
+ :key="item && item.uName"
:style="{ marginRight: '8px' }"
>{{ item }}</span
>
@@ -357,9 +359,8 @@
this.detailInfo = {};
if (this.detailId) {
this.getDetailInfo();
- } else {
- this.getOptions();
}
+ this.getOptions();
},
mounted() {},
computed: {
@@ -367,8 +368,8 @@
const conclusion = {};
conclusion.name = this.detailInfo.name;
conclusion.code = this.detailInfo.code;
- conclusion.names = [
- ...new Set(this.projectTable.map(item => item.userName))
+ conclusion.uName = [
+ ...new Set(this.projectTable.map(item => item.uName))
];
if (
this.projectTable.filter(item => item.testState === null).length ===
@@ -409,7 +410,10 @@
label: "name"
},
nodeData: "", // node鐐瑰嚮淇濆瓨褰撳墠鐐瑰嚮鏁版嵁
- clickSelectSaveIndex: "" // 鐐瑰嚮閫夋嫨瀛樺偍鍒楄〃绱㈠紩
+ clickSelectDevice: {
+ index: "", // 鐐瑰嚮閫夋嫨瀛樺偍褰撳墠琛岀储寮�
+ rpId: "" // 鐐瑰嚮閫夋嫨瀛樺偍褰撳墠琛岄」鐩甀d
+ }
};
},
watch: {
@@ -434,7 +438,8 @@
this.detailInfo = res.data;
this.projectTable = res.data.children;
this.projectTable.forEach(i => {
- i.testValueList = i.testValue.split(",");
+ // 瑙e喅閲嶆柊璧嬪�兼棤娉曠紪杈戞搷浣�
+ this.$set(i, "testValueList", i.testValue.split(","));
// 鍙栨渶闀跨殑鍒楄〃鏁�
if (i.testValueList.length > this.empiricalValueAdd) {
this.empiricalValueAdd = i.testValueList.length;
@@ -465,8 +470,8 @@
if (this.detailId !== null) {
const res = await this.$axios.post(this.$api.url.updaterawInsProduct, {
DevId: row.deviceId,
- rpId: this.detailId,
- testValue: row.testValueList[index]
+ rpId: row.rpId,
+ testValue: row.testValueList.join(",")
});
this.$message.success("鎻愪氦鎴愬姛");
this.getDetailInfo(); //閲嶆柊鍒锋柊淇℃伅鏁版嵁
@@ -510,15 +515,30 @@
// 鐐瑰嚮琛ㄦ牸閫夋嫨瑙﹀彂
clickTableSelect(scope) {
this.centerDialogVisible = true;
- this.clickSelectSaveIndex = scope.$index;
+ this.clickSelectDevice.index = scope.$index;
+ this.clickSelectDevice.rpId = scope.row.rpId;
},
// 鐐瑰嚮鏍戦噷闈㈢殑纭畾
clickNodeSure() {
- this.projectTable[this.clickSelectSaveIndex].deviceId = this.nodeData.id;
- this.projectTable[
- this.clickSelectSaveIndex
- ].deviceName = this.nodeData.name;
- this.centerDialogVisible = false;
+ if (this.detailId == null) {
+ this.projectTable[
+ this.clickSelectDevice.index
+ ].deviceId = this.nodeData.id;
+ this.projectTable[
+ this.clickSelectDevice.index
+ ].deviceName = this.nodeData.name;
+ this.centerDialogVisible = false;
+ } else {
+ this.$axios
+ .post(this.$api.url.updateDevByRpId, {
+ rpId: this.clickSelectDevice.rpId,
+ devId: this.nodeData.id
+ })
+ .then(res => {
+ this.getDetailInfo();
+ this.centerDialogVisible = false;
+ });
+ }
},
// 鍒犻櫎妫�楠屽�煎垪
clickDeleteInspectionColumn() {
diff --git a/src/main.js b/src/main.js
index 1cef795..9aff47f 100644
--- a/src/main.js
+++ b/src/main.js
@@ -23,7 +23,7 @@
Vue.use(qs);
Vue.use(api);
-const javaApi = 'http://192.168.0.23:8001'
+const javaApi = 'http://192.168.0.25:8001'
// const javaApi = '192.168.0.6'
--
Gitblit v1.9.3