From 5ed6e3f917ac579156588d70b6dc0f262c30f58f Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 24 四月 2026 11:26:04 +0800
Subject: [PATCH] 标准库:查看新增和更新人信息
---
src/views/standard/standardLibrary/index.vue | 95 +++++++++++++++++++++++++++++++++++------------
1 files changed, 70 insertions(+), 25 deletions(-)
diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue
index 1016fc7..15ec225 100644
--- a/src/views/standard/standardLibrary/index.vue
+++ b/src/views/standard/standardLibrary/index.vue
@@ -33,16 +33,34 @@
}`"></i>
{{ data.label }}
</div>
- <div v-if="(node.data.children === null || node.data.children === undefined)" style="width:50px">
- <el-button v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" size="mini" type="text"
+ <div v-if="(node.data.children === null || node.data.children === undefined)" style="width:80px">
+ <el-button style="margin-left: 2px;" v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" size="mini" type="text"
@click.stop="editTreeName(node.data)">
<i class="el-icon-edit"></i>
</el-button>
- <el-button style="margin-left: 0" size="mini"
+ <el-button style="margin-left: 2px;" size="mini"
v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" type="text"
@click.stop="remove(node, data)">
<i class="el-icon-delete"></i>
</el-button>
+ <el-popover
+ placement="right"
+ width="100%"
+ @show="showModelDetail(node.data)"
+ trigger="hover">
+ <el-table border :data="modelDetailTableData" :header-cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}">
+ <el-table-column width="120" property="sampleType" label="浜у搧澶х被" show-overflow-tooltip></el-table-column>
+ <el-table-column width="120" property="sample" label="鏍峰搧鍚嶇О" show-overflow-tooltip></el-table-column>
+ <el-table-column width="120" property="model" label="鍨嬪彿" show-overflow-tooltip></el-table-column>
+ <el-table-column width="80" property="createUserName" label="鍒涘缓浜�" show-overflow-tooltip></el-table-column>
+ <el-table-column width="160" property="createTime" label="鍒涘缓鏃堕棿" show-overflow-tooltip></el-table-column>
+ <el-table-column width="80" property="updateUserName" label="鏇存柊浜�" show-overflow-tooltip></el-table-column>
+ <el-table-column width="160" property="updateTime" label="鏇存柊鏃堕棿" show-overflow-tooltip></el-table-column>
+ </el-table>
+ <el-button slot="reference" size="mini" type="text" >
+ <i class="el-icon-view"></i>
+ </el-button>
+ </el-popover>
</div>
</div>
</div>
@@ -203,7 +221,7 @@
<el-button :loading="addLoad" type="primary" @click="addStandardTree">纭� 瀹�</el-button>
</span>
</el-dialog>
- <el-dialog :visible.sync="updateDia" title="鍒嗙被淇敼" width="400px">
+ <el-dialog :visible.sync="updateDia" title="鍒嗙被淇敼" width="400px" @close="()=>{this.addOb.model=''}">
<div class="body">
<el-row style="line-height: 50px">
<el-col :span="6" style="text-align: right">
@@ -306,6 +324,7 @@
selectsStandardMethodByFLSSM,
upStandardProductList,
selectStandardProductListByMethodId,
+ selectStandardTreeById,
updateSection,
upStandardProducts,
getStandardTemplate,
@@ -338,6 +357,7 @@
updateDia: false, // 淇敼鏍戝悕瀛楀脊妗�
oldModel: "",
addOb: {
+ id: null,
factory: null,
laboratory: null,
sampleType: null,
@@ -397,6 +417,7 @@
batchCopyDia: false,
VUE_APP_BASE_API: process.env.VUE_APP_BASE_API,
moreSelects: [],
+ modelDetailTableData:[],
};
},
computed: {
@@ -423,10 +444,22 @@
};
},
methods: {
+ showModelDetail(nodeData) {
+ if(nodeData){
+ let standardTreeId = nodeData.standardTreeId
+ selectStandardTreeById(standardTreeId).then(res=>{
+ if(res.code===200){
+ this.modelDetailTableData = [res.data]
+ }
+ }).catch(error=>{
+ console.error(error)
+ })
+ }
+ },
// 淇敼鏈�瀛愮骇鍚嶅瓧
editTreeName(info) {
+ this.addOb.model = info.label;
this.updateDia = true;
- this.oldModel = info.label;
},
// 鎷栨嫿鏃跺垽瀹氱洰鏍囪妭鐐硅兘鍚﹁鏀剧疆
// 'prev'銆�'inner' 鍜� 'next'锛屽墠銆佹彃鍏ャ�佸悗
@@ -573,11 +606,17 @@
if (node.childNodes.length === 0) {
this.selectsStandardMethodByFLSSM();
}
- let trees = this.selectTree.split(" - ");
+ let trees = this.selectTree.split(" - ").map(a => {
+ if (a === "null") {
+ return null;
+ }
+ return a;
+ });
this.addOb.factory = trees[0];
this.addOb.laboratory = trees[1];
this.addOb.sampleType = trees[2];
this.addOb.sample = trees[3];
+ this.addOb.id = val.standardTreeId || null
},
getNodeParent(val) {
if (val.parent != null) {
@@ -651,7 +690,11 @@
selectStandardTreeList().then((res) => {
this.list = res.data;
this.list.forEach((a) => {
- this.expandedKeys.push(a.label);
+ if(a.children){
+ a.children.forEach(f=>{
+ this.expandedKeys.push(f.label);
+ })
+ }
});
this.treeLoad = false;
});
@@ -703,22 +746,16 @@
return;
}
this.addLoad = true;
- addStandardTree(this.addOb)
- .then((res) => {
- this.$message.success("娣诲姞鎴愬姛");
- this.addDia = false;
- this.list
- .find((a) => a.label == this.addOb.factory)
- .children.find((a) => a.label == this.addOb.laboratory)
- .children.find((a) => a.label == this.addOb.sampleType)
- .children.find((a) => a.label == this.addOb.sample)
- .children.push({
- code: "[5]",
- label: this.addOb.model,
- value: this.addOb.model,
- });
- this.addLoad = false;
- })
+ addStandardTree(this.addOb).then((res) => {
+ if(res.code===200){
+ this.$message.success("娣诲姞鎴愬姛");
+ this.selectStandardTreeList();
+ }
+ this.$nextTick(()=>{
+ this.addDia = false;
+ this.addLoad = false;
+ })
+ })
.catch((e) => {
this.addDia = false;
this.addLoad = false;
@@ -1240,7 +1277,7 @@
}
.custom-tree-node .el-icon-delete {
- color: #3a7bfa;
+ color:rgb(245, 108, 108);
opacity: 0;
font-size: 18px;
}
@@ -1250,7 +1287,6 @@
}
.custom-tree-node .el-icon-edit {
- color: #3a7bfa;
opacity: 0;
font-size: 18px;
}
@@ -1259,6 +1295,15 @@
opacity: 1;
}
+.custom-tree-node .el-icon-view {
+ opacity: 0;
+ font-size: 18px;
+}
+
+.custom-tree-node:hover .el-icon-view {
+ opacity: 1;
+}
+
.node_i {
color: orange;
font-size: 18px;
--
Gitblit v1.9.3