From 785fd3a05f38d3b3f98698497294866447880a28 Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期一, 04 九月 2023 18:00:38 +0800
Subject: [PATCH] 基础数据

---
 src/components/view/self-inspection.vue |   89 ++++++++++++++++----------------------------
 1 files changed, 32 insertions(+), 57 deletions(-)

diff --git a/src/components/view/self-inspection.vue b/src/components/view/self-inspection.vue
index 44c9b99..be60b33 100644
--- a/src/components/view/self-inspection.vue
+++ b/src/components/view/self-inspection.vue
@@ -120,7 +120,7 @@
 		</div>
 		<div class="choose">
 			<span>绫诲瀷锛�</span>
-			<el-select v-model="search.type" size="small" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;">
+			<el-select v-model="search.type" size="small" @change="TYpe" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;">
 				<el-option label="姗¤兌杩炴帴鍣�" :value="0"></el-option>
 				<el-option label="閲戝睘杩炴帴鍣�" :value="1"></el-option>
 				<el-option label="婀挎彃鎷旂數杩炴帴鍣�" :value="2"></el-option>
@@ -164,9 +164,9 @@
 					</el-table-column>
 					<el-table-column prop="unit" label="鍗曚綅">
 					</el-table-column>
-					<el-table-column prop="stand" label="鏍囧噯鍊�">
+					<el-table-column prop="required" label="鏍囧噯鍊�">
 					</el-table-column>
-					<el-table-column prop="ask" label="鍐呮帶鍊�">
+					<el-table-column prop="internal" label="鍐呮帶鍊�">
 					</el-table-column>
 					<el-table-column label="鎿嶄綔" width="130">
 						<template slot-scope="scope">
@@ -371,63 +371,14 @@
 				dialogVisible:false,
 				process: [],
 				product: [],
-				list: [{
-					id: 0,
-					name: "鍘熸潗鏂�",
-					children: [{
-						id: 3,
-						name: "宸ヨ壓"
-					}]
-				}, {
-					id: 1,
-					name: "鎴愬搧",
-					children: [{
-						id: 4,
-						name: "宸ヨ壓"
-					}]
-				}, {
-					id: 2,
-					name: "鍗婃垚鍝�",
-					children: [{
-						id: 5,
-						name: "宸ヨ壓"
-					}]
-				}],
+				list: [],
 				checkTreeNode: {},
-				tableData: [{
-					id: 1,
-					name: "鐢电紗瑙勬牸",
-					unit: "dajskda",
-					stand: "12348",
-					ask: "564165"
-				}, {
-					id: 2,
-					name: "浣滀笟浜哄憳",
-					unit: "dajskda",
-					stand: "12348",
-					ask: "564165"
-				}, {
-					id: 3,
-					name: "瑙勬牸",
-					unit: "dajskda",
-					stand: "12348",
-					ask: "564165"
-				}, {
-					id: 4,
-					name: "瑙勬牸",
-					unit: "dajskda",
-					stand: "12348",
-					ask: "564165"
-				}, {
-					id: 5,
-					name: "瑙勬牸",
-					unit: "dajskda",
-					stand: "12348",
-					ask: "564165"
-				}],
+				tableData: [],
 				upIndex: 0,
 				selects: [],
 				upDia: false,
+				typeselect:0,
+				checkTreeNode:[],
 				upData: {
 					id: 0,
 					name: null,
@@ -438,9 +389,32 @@
 			}
 		},
 		mounted() {
-			this.selectDataList()
+			this.selectAllleft()
 		},
 		methods: {
+			TYpe(val) {
+                this.typeselect = val
+                console.log(this.typeselect);
+                this.selectAllleft()
+            },
+            //涓讳綋宸�
+            selectAllleft() {
+			this.$axios.get(this.$api.url.selectAllleft,{
+				params:{type:this.typeselect}
+			}).then(res => {
+				this.list = res.data;
+                console.log(this.list);
+			})
+			},
+			//selectAllSelf   checkTreeNode
+			selectAllSelf() {
+			this.$axios.get(this.$api.url.selectAllSelf,{
+				params:{id:this.checkTreeNode.id}
+			}).then(res => {
+				this.tableData = res.data;
+                console.log(this.tableData);
+			})
+			},
 			modify(){
                 this.modifyVisible = true
             },
@@ -474,6 +448,7 @@
 			},
 			handleNodeClick(data) {
 				this.checkTreeNode = data
+				this.selectAllSelf()
 				if(data.code=='[2]'){
 					console.log(data);
 				}

--
Gitblit v1.9.3