From 6c76e7bdba80eb1317a08af2a5930b13e5f9ea34 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 26 二月 2025 11:03:13 +0800
Subject: [PATCH] 质量监控计划联调
---
src/views/standard/standardLibrary/index.vue | 126 ++++++-----------------------------------
1 files changed, 20 insertions(+), 106 deletions(-)
diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue
index 21eeeb8..180ad2c 100644
--- a/src/views/standard/standardLibrary/index.vue
+++ b/src/views/standard/standardLibrary/index.vue
@@ -212,10 +212,10 @@
<el-col :class="{ sort: node.level > 3 }" :span="19" :title="data.label" style="text-align: left">
<span>
<i :class="`node_i ${data.children != undefined
- ? data.code === '[1]'
- ? 'el-icon-folder-opened'
- : 'el-icon-folder'
- : 'el-icon-tickets'
+ ? data.code === '[1]'
+ ? 'el-icon-folder-opened'
+ : 'el-icon-folder'
+ : 'el-icon-tickets'
}`"></i>
{{ data.label }}
</span>
@@ -225,7 +225,7 @@
(node.data.children === null ||
node.data.children === undefined)
" :span="2" style="text-align: right">
- <el-button size="mini" type="text" @click="editTreeName(node.data)">
+ <el-button size="mini" type="text" @click.stop="editTreeName(node.data)">
<i class="el-icon-edit"></i>
</el-button>
</el-col>
@@ -286,8 +286,8 @@
<template slot-scope="scope">
<el-input v-if="
checkPermi(['standard:standardLibrary:upStandardProduct'])
- " v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鍊�"
- size="small" type="textarea" @change="(value) => upStandardProductList(value, scope.row.id)"></el-input>
+ " v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鍊�" size="small"
+ type="textarea" @change="(value) => upStandardProductList(value, scope.row.id)"></el-input>
<span v-else>{{ scope.row.ask }}</span>
</template>
</el-table-column>
@@ -306,7 +306,7 @@
<el-select v-if="
checkPermi(['standard:standardLibrary:upStandardProduct'])
" v-model="scope.row.methodS" clearable placeholder="璇曢獙鏂规硶" size="small" @change="(value) => upStandardProductListOfMethodS(value, scope.row.id)
- ">
+ ">
<el-option v-for="(a, i) in scope.row.method &&
JSON.parse(scope.row.method)" :key="i" :label="a" :value="a"></el-option>
</el-select>
@@ -318,7 +318,7 @@
<el-select v-if="
checkPermi(['standard:standardLibrary:upStandardProduct'])
" v-model="scope.row.radius" clearable placeholder="鏉′欢" size="small" @change="(value) => upStandardProductListOfRadius(value, scope.row.id)
- ">
+ ">
<el-option v-for="(a, i) in scope.row.radiusList &&
JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option>
</el-select>
@@ -331,7 +331,7 @@
<el-input v-if="
checkPermi(['standard:standardLibrary:upStandardProduct'])
" v-model="scope.row.price" placeholder="鍗曚环(鍏�)" size="small" @change="(value) => upStandardProductListOfPrice(value, scope.row.id)
- ">
+ ">
</el-input>
<span v-else>{{ scope.row.price }}</span>
</template>
@@ -341,7 +341,7 @@
<el-input v-if="
checkPermi(['standard:standardLibrary:upStandardProduct'])
" v-model="scope.row.manHour" placeholder="鍗曚环(鍏�)" size="small" @change="(value) => upStandardProductListOfManHour(value, scope.row.id)
- ">
+ ">
</el-input>
<span v-else>{{ scope.row.manHour }}</span>
</template>
@@ -351,7 +351,7 @@
<template slot-scope="scope">
<el-select v-model="scope.row.templateId" :disabled="!checkPermi(['standard:standardLibrary:upStandardProduct'])
" filterable size="small" @change="(value) =>
- upStandardProductListOfTemplate(value, scope.row.id)
+ upStandardProductListOfTemplate(value, scope.row.id)
">
<el-option v-for="(a, ai) in templateList" :key="ai" :label="a.name" :value="a.id"></el-option>
</el-select>
@@ -367,10 +367,10 @@
</template>
</el-table-column>
</el-table>
- <el-pagination :current-page="currentPage" :page-size="300" :total="total"
- layout="total, prev, pager, next, jumper" style="position: absolute; right: 16px; bottom: 1px"
- @current-change="handleCurrentChange">
- </el-pagination>
+ <!-- <el-pagination :current-page="currentPage" :page-size="300" :total="total" layout="total"
+ style="position: absolute; right: 16px; bottom: 1px" @current-change="handleCurrentChange">
+ </el-pagination> -->
+ <p style="text-align: right;margin-right: 20px;color: #333;">鍏眥{ total }}鏉�</p>
</el-row>
</div>
@@ -488,14 +488,10 @@
obtainItemParameterList,
selectTestObjectByName,
selectStandardMethods,
- addStandardMethodList,
addStandardTree,
updateStandardTree,
selectsStandardMethodByFLSSM,
upStandardProductList,
- delStandardMethodByFLSSM,
- delStandardProductByIds,
- addStandardProduct,
selectStandardProductListByMethodId,
updateSection,
upStandardProducts,
@@ -592,6 +588,7 @@
this.selectTestObjectByName();
this.selectStandardMethods();
this.selectEnumByCategoryForSonLaboratory();
+ this.selectEnumByCategoryForsampleType();
this.getStandardTemplate();
this.selectStandardMethodsSec();
this.token = {
@@ -845,22 +842,6 @@
this.standardEnum = data;
});
},
- addStandardMethodList() {
- if (this.standardId == null || this.standardId == "") {
- this.$message.error("鏍囧噯鏂规硶鏈�夋嫨");
- return;
- }
- this.addLoad2 = true;
- addStandardMethodList({
- standardId: this.standardId,
- tree: this.selectTree,
- }).then((res) => {
- this.addLoad2 = false;
- this.addStandardDia = false;
- this.$message.success("娣诲姞鎴愬姛");
- this.selectsStandardMethodByFLSSM();
- });
- },
// 鎻愪氦鍒嗙被娣诲姞
addStandardTree() {
if (this.addOb.sampleType == null || this.addOb.sampleType == "") {
@@ -916,7 +897,8 @@
return;
}
this.$message.success("娣诲姞鎴愬姛");
- this.selectStandardTreeList();
+ this.$tab.refreshPage();
+ // this.selectStandardTreeList();
this.updateDia = false;
this.updateLoad = false;
})
@@ -1040,81 +1022,13 @@
this.$message.success("宸蹭繚瀛�");
});
},
- delStandardMethodByFLSSM(id) {
- this.$confirm("鏄惁鍒犻櫎褰撳墠鏁版嵁?", "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- this.tableLoad = true;
- delStandardMethodByFLSSM({ id: id }).then((res) => {
- if (res.code == 201) {
- return;
- }
- this.$message.success("宸插垹闄�");
- this.selectsStandardMethodByFLSSM();
- });
- })
- .catch(() => { });
- },
handleSelectionChange(val) {
this.selects = [];
val.forEach((a) => {
this.selects.push(a.id);
});
},
- delStandardProductByIds() {
- if (this.selects.length == 0) {
- this.$message.error("鏈�変腑鏁版嵁");
- return;
- }
- this.$confirm(
- "鏄惁鍒犻櫎褰撳墠閫変腑 " + this.selects.length + " 鏉℃暟鎹�?",
- "璀﹀憡",
- {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- }
- )
- .then(() => {
- this.tableLoad = true;
- delStandardProductByIds({
- ids: JSON.stringify(this.selects),
- }).then((res) => {
- if (res.code == 201) {
- return;
- }
- this.$message.success("宸插垹闄�");
- this.selectsStandardMethodByFLSSM();
- });
- })
- .catch(() => { });
- },
- addStandardProductDo() {
- let selects = this.$refs.ValueTable.multipleSelection;
- if (selects.length == 0) {
- this.$message.error("鏈�夋嫨鏁版嵁");
- return;
- }
- let select = [];
- selects.forEach((a) => {
- select.push(a.id);
- });
- this.tableLoad = true;
- addStandardProduct({
- ids: JSON.stringify(select),
- tree: this.selectTree,
- }).then((res) => {
- if (res.code == 201) {
- return;
- }
- this.$message.success("娣诲姞鎴愬姛");
- this.selectsStandardMethodByFLSSM();
- });
- this.addProductDia = false;
- },
+
refreshList() {
this.batchCopyDia = false;
const index = this.standardList.findIndex(
--
Gitblit v1.9.3