From 80aaf3aa575d87b2e3abcd0e7f8659a03020a983 Mon Sep 17 00:00:00 2001
From: leiyang <alex1886@yeah.net>
Date: Fri, 28 Mar 2025 09:43:25 +0800
Subject: [PATCH] =?UTF-8?q?fix:=E6=9D=83=E9=87=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/api/user.js                    |   4 +-
 src/views/class/Classification.vue | 881 ++++++++++++++---------------
 src/views/lookupClass/classify.vue |  49 +-
 src/views/system/user/index.vue    | 101 +++-
 4 files changed, 569 insertions(+), 466 deletions(-)

diff --git a/src/api/user.js b/src/api/user.js
index f9bc7f3..0f445c8 100644
--- a/src/api/user.js
+++ b/src/api/user.js
@@ -2,7 +2,7 @@ import request from '@/utils/request'
 // 鑾峰彇淇℃伅鍒嗙被鏁版嵁
 export function getAllCategory(params) {
   return request({
-    url: '/api/informationClass/findAllInformationClass',
+    url: '/api/informationClass/findInformationClassByPidTree',
     method: 'get',
     params
   })
@@ -12,7 +12,7 @@ export function addAssignWeight(data) {
   return request({
     url: '/api/tabAssignWeight/insertWeight',
     method: 'post',
-    data,
+    data
   })
 }
 export function showAssignWeight(params) {
diff --git a/src/views/class/Classification.vue b/src/views/class/Classification.vue
index 0729fb5..2fafa9e 100644
--- a/src/views/class/Classification.vue
+++ b/src/views/class/Classification.vue
@@ -1,8 +1,8 @@
 <!-- 淇℃伅鍒嗙被 -->
 <template>
-      <div class="datamanage-wrapper">
-        <div class="search-wrapper">
-		 <!-- <el-select
+  <div class="datamanage-wrapper">
+    <div class="search-wrapper">
+      <!-- <el-select
 		    v-model="name"
 		    placeholder="璇烽€夋嫨绫诲埆"
 		    clearable
@@ -15,7 +15,7 @@
 			:value="item.name"
 		    />
 		  </el-select> -->
-			<!-- <treeselect
+      <!-- <treeselect
 				v-model="newManage.customerSource"
 				:options="infoTree.menus"
 				:load-options="loadInfoTreeMenus"
@@ -23,13 +23,14 @@
 				placeholder="璇烽€夋嫨绫诲埆"
 			/> -->
 
-
-          <!-- <el-button size="mini" type="primary" icon="el-icon-search" @click="toSearch()" class="searchbtn">鎼滅储</el-button> -->
-          <el-button size="mini" type="primary" icon="el-icon-circle-plus" @click="addDialogData()" class="addbtn">鏂板</el-button>
-        </div>
-        <div class="table-wrapper">
-          <div  class="infoline">淇℃伅鍒嗙被鍒楄〃</div>
-			  <!-- <el-table  :data="typeManage.fromData" style="width: 100%;">
+      <!-- <el-button size="mini" type="primary" icon="el-icon-search" @click="toSearch()" class="searchbtn">鎼滅储</el-button> -->
+      <el-button size="mini" type="primary" icon="el-icon-circle-plus" @click="addDialogData()" class="addbtn"
+        >鏂板</el-button
+      >
+    </div>
+    <div class="table-wrapper">
+      <div class="infoline">淇℃伅鍒嗙被鍒楄〃</div>
+      <!-- <el-table  :data="typeManage.fromData" style="width: 100%;">
 				<el-table-column type="index" label="搴忓彿" width="300"/>
 				<el-table-column prop="name" label="鍒嗙被鍚嶇О"/>
 				<el-table-column label="鎿嶄綔" fixed="right">
@@ -52,37 +53,27 @@
 				</el-table-column>
 			  </el-table> -->
 
-			<el-table
-				ref="table"
-				lazy
-				:load="getDeptDatas"
-				:tree-props="{children:'children', hasChildren:'hasChildren'}"
-				:data="typeManage.fromData"
-				row-key="id"
-			>
-			  <!-- <el-table-column :selectable="checkboxT" type="selection" width="55" /> -->
-			  <el-table-column label="鍚嶇О" prop="label" style="width:100px;"/>
-			  <el-table-column type="index" label="搴忓彿" style="width:100px;"/>
-			  <el-table-column label="鎿嶄綔" fixed="right">
-				<template slot-scope="scope">
-					<el-button
-					  size="mini"
-					  type="primary"
-					  icon="el-icon-edit"
-					  @click="typeEdit($event, scope.$index, scope.row)"
-					  >缂栬緫</el-button
-					>
-					<el-button
-					  size="mini"
-					  type="danger"
-					  icon="el-icon-delete"
-					  @click="typeDelete(scope.row)"
-					  >鍒犻櫎</el-button
-					>
-				</template>
-			  </el-table-column>
-			</el-table>
-          <!-- <el-pagination
+      <el-table
+        ref="table"
+        lazy
+        :load="getDeptDatas"
+        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+        :data="typeManage.fromData"
+        row-key="id"
+      >
+        <!-- <el-table-column :selectable="checkboxT" type="selection" width="55" /> -->
+        <el-table-column label="鍚嶇О" prop="label" style="width: 100px" />
+        <el-table-column type="index" label="搴忓彿" style="width: 100px" />
+        <el-table-column label="鎿嶄綔" fixed="right">
+          <template slot-scope="scope">
+            <el-button size="mini" type="primary" icon="el-icon-edit" @click="typeEdit($event, scope.$index, scope.row)"
+              >缂栬緫</el-button
+            >
+            <el-button size="mini" type="danger" icon="el-icon-delete" @click="typeDelete(scope.row)">鍒犻櫎</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- <el-pagination
             :page-sizes="[10, 20, 30, 40]"
             layout="total, sizes, prev, pager, next, jumper"
             :total="typeManage.total"
@@ -90,458 +81,458 @@
             @current-change="handleCurrentChange"
             style="margin-top: 20px;"
           /> -->
-        </div>
-        <el-dialog title="鏂板鍒嗙被鍚嶇О" :visible.sync="typeManage.addDialog">
-          <el-form
-            :model="typeManage.from"
-            :rules="formrules"
-		     ref="addDataForm"
+    </div>
+    <el-dialog title="鏂板鍒嗙被鍚嶇О" :visible.sync="typeManage.addDialog">
+      <el-form :model="typeManage.from" :rules="formrules" ref="addDataForm">
+        <el-form-item prop="addname" label="鍒嗙被鍚嶇О:" :label-width="'120px'">
+          <el-input clearable v-model="typeManage.from.addname" style="width: 220px" placeholder="璇疯緭鍏ョ被鍒�" />
+        </el-form-item>
+        <el-form-item prop="test" label="鎺ㄩ€佷俊鎭�:" :label-width="'120px'">
+          <el-select v-model="typeManage.from.test" multiple placeholder="璇烽€夋嫨" style="width: 220px">
+            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="id" label="娣诲姞鍒�:" :label-width="'120px'">
+          <treeselect
+            v-model="typeManage.from.id"
+            :options="infoTree.menus"
+            :load-options="loadInfoTreeMenus"
+            style="width: 180px"
+            placeholder="閫夋嫨涓婄骇绫荤洰"
+          />
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button type="primary" @click="determine" :loading="typeManage.flag === 0">纭畾</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="缂栬緫鍒嗙被鍚嶇О" :visible.sync="typeManage.editDialog">
+      <el-form :model="editFormInfo" :rules="rules" ref="editDataForm">
+        <el-form-item prop="type" label="鍒嗙被鍚嶇О:" :label-width="'120px'">
+          <el-input
+            v-model="editFormInfo.type"
+            clearable
+            style="width: 220px; margin-left: 20px"
+            placeholder="璇疯緭鍏ョ被鍒�"
+          />
+        </el-form-item>
+        <el-form-item prop="choose" label="鎺ㄩ€佷俊鎭�:" :label-width="'120px'">
+          <el-select
+            v-model="editFormInfo.choose"
+            multiple
+            placeholder="璇烽€夋嫨"
+            @change="selectChange"
+            style="width: 220px; margin-left: 20px"
           >
-            <el-form-item prop="addname" label="鍒嗙被鍚嶇О:" :label-width="'120px'">
-				<el-input
-				  clearable
-				  v-model="typeManage.from.addname"
-				  style="width:220px;"
-				  placeholder="璇疯緭鍏ョ被鍒�"
-				/>
-            </el-form-item>
-            <el-form-item prop="test" label="鎺ㄩ€佷俊鎭�:" :label-width="'120px'">
-				<el-select v-model="typeManage.from.test" multiple placeholder="璇烽€夋嫨"  style="width:220px">
-				    <el-option
-				      v-for="item in options"
-				      :key="item.value"
-				      :label="item.label"
-				      :value="item.value">
-				    </el-option>
-				</el-select>
-            </el-form-item>
-			 <el-form-item prop="id" label="娣诲姞鍒�:" :label-width="'120px'">
-			 	<treeselect
-					v-model="typeManage.from.id"
-					:options="infoTree.menus"
-					:load-options="loadInfoTreeMenus"
-					style="width: 180px;"
-					placeholder="閫夋嫨涓婄骇绫荤洰"
-				/>
-			 </el-form-item>
-          </el-form>
-          <div slot="footer">
-            <el-button type="primary" @click="determine" :loading="typeManage.flag === 0">纭畾</el-button>
-          </div>
-        </el-dialog>
-        <el-dialog title="缂栬緫鍒嗙被鍚嶇О" :visible.sync="typeManage.editDialog">
-          <el-form
-            :model="editFormInfo"
-            :rules="rules"
-			 ref="editDataForm"
-          >
-            <el-form-item prop="type" label="鍒嗙被鍚嶇О:" :label-width="'120px'">
-            <el-input
-              v-model="editFormInfo.type"
-			  clearable
-              style="width:220px;margin-left: 20px;"
-              placeholder="璇疯緭鍏ョ被鍒�"
-            />
-            </el-form-item>
-            <el-form-item prop="choose" label="鎺ㄩ€佷俊鎭�:" :label-width="'120px'">
-				<el-select v-model="editFormInfo.choose" multiple placeholder="璇烽€夋嫨" @change="selectChange" style="width:220px;margin-left: 20px;">
-				    <el-option
-				      v-for="item in newoptions"
-				      :key="item.value"
-				      :label="item.label"
-				      :value="item.value">
-				    </el-option>
-				</el-select>
-            </el-form-item>
-			 <el-form-item prop="pid" label="娣诲姞鍒�:" :label-width="'120px'">
-			 	<treeselect
-					v-model="editFormInfo.pid"
-					:options="infoTree.menus"
-					:load-options="loadInfoTreeMenus"
-					style="width: 180px;"
-					placeholder="閫夋嫨涓婄骇绫荤洰"
-				/>
-			 </el-form-item>
-          </el-form>
-          <div slot="footer">
-            <el-button type="primary" @click="uploadAddForm" icon="el-icon-success" :loading="editFormInfo.flag === 0">纭畾</el-button>
-          </div>
-        </el-dialog>
-        </div>
+            <el-option v-for="item in newoptions" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="pid" label="娣诲姞鍒�:" :label-width="'120px'">
+          <treeselect
+            v-model="editFormInfo.pid"
+            :options="infoTree.menus"
+            :load-options="loadInfoTreeMenus"
+            style="width: 180px"
+            placeholder="閫夋嫨涓婄骇绫荤洰"
+          />
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button type="primary" @click="uploadAddForm" icon="el-icon-success" :loading="editFormInfo.flag === 0"
+          >纭畾</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
 import {
-  getAllCategory,getNameCategory,addClassification,editClassification,deleteTypeDict
-} from "@/api/category.js";
-import {reqInformationTreeList, reqAllInfoTreeList} from "@/api/treeMenus.js";
-import Treeselect from '@riophae/vue-treeselect';
-import '@riophae/vue-treeselect/dist/vue-treeselect.css';
+  getAllCategory,
+  getNameCategory,
+  addClassification,
+  editClassification,
+  deleteTypeDict
+} from '@/api/category.js'
+import { reqInformationTreeList, reqAllInfoTreeList } from '@/api/treeMenus.js'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 export default {
   data() {
     return {
-	  //1.鑾峰彇鍏ㄩ儴淇℃伅鍒嗙被
-	  typeManage:{
-	    page:1,
-	    size:10,
-	    total:0,
-	    selectdata:[],
-		dropData:[],
-		addDialog:false,
-		flag:1,
-		pid:0,
-		from:{
-			addname:'',
-			 test:[], // 榛樿閫夐」锛岃鍦╡l-checkbox-group閲岀粦瀹氫竴涓┖鏁扮粍
-		},
-		editDialog:false,
-		fromData:[]
-	  },
-	  //2.鏍规嵁鍚嶇О鑾峰彇淇℃伅鍒嗙被
-	  name: '',
-	  
-	  // 3.鏂板淇℃伅鍒嗙被
-	  options: [{
-	           value: '濮撳悕',
-	           label: '濮撳悕'
-	         }, {
-	           value: '鐢佃瘽',
-	           label: '鐢佃瘽'
-	         }, {
-	           value: '鍏徃鍚嶇О',
-	           label: '鍏徃鍚嶇О'
-	         }, {
-	           value: '闇€姹傛弿杩�',
-	           label: '闇€姹傛弿杩�'
-	  }], 
-		chooseString:'',
-	  // 4.缂栬緫淇℃伅鍒嗙被
-	  editFormInfo: {
-		flag:1,
-	    type: "",
-		send:'',
-		id:'',
-		choose:[],
-		pid:0,
-	  },
-	  editString:'',
-	  checkList:[],
-	  newoptions: [{
-	         value: '濮撳悕',
-	         label: '濮撳悕'
-	       }, {
-	         value: '鐢佃瘽',
-	         label: '鐢佃瘽'
-	       }, {
-	         value: '鍏徃鍚嶇О',
-	         label: '鍏徃鍚嶇О'
-	       }, {
-	         value: '闇€姹傛弿杩�',
-	         label: '闇€姹傛弿杩�'
-	       }],
-		newval:[],
-	   // 楠岃瘉
-	   formrules:{
-			addname: [{ required: true, message: "璇疯緭鍏ョ被鍒�", trigger: "blur"}],
-			test: [{ required: true, message: "璇烽€夋嫨鎺ㄩ€佷俊鎭�", trigger: "change"}],
-		},
-		rules:{
-			type: [{ required: true, message: "璇疯緭鍏ョ被鍒�", trigger: "blur"}],
-			choose: [{ required: true, message: "璇烽€夋嫨鎺ㄩ€佷俊鎭�", trigger: "change"}],
-		},
-		infoTree:{
-			menus:[{id:0, label:'淇℃伅鍒嗙被', children:null, pid:-1}],
-		},
-    };
+      //1.鑾峰彇鍏ㄩ儴淇℃伅鍒嗙被
+      typeManage: {
+        page: 1,
+        size: 10,
+        total: 0,
+        selectdata: [],
+        dropData: [],
+        addDialog: false,
+        flag: 1,
+        pid: 0,
+        from: {
+          addname: '',
+          test: [] // 榛樿閫夐」锛岃鍦╡l-checkbox-group閲岀粦瀹氫竴涓┖鏁扮粍
+        },
+        editDialog: false,
+        fromData: []
+      },
+      //2.鏍规嵁鍚嶇О鑾峰彇淇℃伅鍒嗙被
+      name: '',
+
+      // 3.鏂板淇℃伅鍒嗙被
+      options: [
+        {
+          value: '濮撳悕',
+          label: '濮撳悕'
+        },
+        {
+          value: '鐢佃瘽',
+          label: '鐢佃瘽'
+        },
+        {
+          value: '鍏徃鍚嶇О',
+          label: '鍏徃鍚嶇О'
+        },
+        {
+          value: '闇€姹傛弿杩�',
+          label: '闇€姹傛弿杩�'
+        }
+      ],
+      chooseString: '',
+      // 4.缂栬緫淇℃伅鍒嗙被
+      editFormInfo: {
+        flag: 1,
+        type: '',
+        send: '',
+        id: '',
+        choose: [],
+        pid: 0
+      },
+      editString: '',
+      checkList: [],
+      newoptions: [
+        {
+          value: '濮撳悕',
+          label: '濮撳悕'
+        },
+        {
+          value: '鐢佃瘽',
+          label: '鐢佃瘽'
+        },
+        {
+          value: '鍏徃鍚嶇О',
+          label: '鍏徃鍚嶇О'
+        },
+        {
+          value: '闇€姹傛弿杩�',
+          label: '闇€姹傛弿杩�'
+        }
+      ],
+      newval: [],
+      // 楠岃瘉
+      formrules: {
+        addname: [{ required: true, message: '璇疯緭鍏ョ被鍒�', trigger: 'blur' }],
+        test: [{ required: true, message: '璇烽€夋嫨鎺ㄩ€佷俊鎭�', trigger: 'change' }]
+      },
+      rules: {
+        type: [{ required: true, message: '璇疯緭鍏ョ被鍒�', trigger: 'blur' }],
+        choose: [{ required: true, message: '璇烽€夋嫨鎺ㄩ€佷俊鎭�', trigger: 'change' }]
+      },
+      infoTree: {
+        menus: [{ id: 0, label: '淇℃伅鍒嗙被', children: null, pid: -1 }]
+      }
+    }
   },
-  components: {Treeselect},
+  components: { Treeselect },
   mounted() {
-	  var that = this;
-	  // 淇℃伅鍒嗙被瀛楀吀
-	  this.reqBuildTreeList();
-
-	   this.classification();
-	   this.getSelectInfo();
+    var that = this
+    // 淇℃伅鍒嗙被瀛楀吀
+    this.reqBuildTreeList()
 
+    this.classification()
+    this.getSelectInfo()
   },
   methods: {
-		// 鏋勫缓 Tree鍒楄〃
-		reqBuildTreeList: function(){
-			var that = this;
-			reqAllInfoTreeList().then(function(res){
-				if(res.code === 200){
-					var list = res.object.records || [];
-					that.infoTree.menus = [{id:0, label:'淇℃伅鍒嗙被', children:null, pid:-1}];
-					list.push(that.infoTree.menus[0]);
-					qf.Utils.treeListBuild(list);
-				} 
-			});
-		},
+    // 鏋勫缓 Tree鍒楄〃
+    reqBuildTreeList: function () {
+      var that = this
+      reqAllInfoTreeList().then(function (res) {
+        if (res.code === 200) {
+          var list = res.object.records || []
+          that.infoTree.menus = [{ id: 0, label: '淇℃伅鍒嗙被', children: null, pid: -1 }]
+          list.push(that.infoTree.menus[0])
+          qf.Utils.treeListBuild(list)
+        }
+      })
+    },
+
+    //1.鑾峰彇鍏ㄩ儴淇℃伅鍒嗙被
+    classification(params) {
+      var typeM = this.typeManage
+      var params = {
+        page: typeM.page,
+        pageSize: typeM.size
+      }
+      reqInformationTreeList({ pid: 0 }).then((res) => {
+        var list = res.object.records || []
+        for (var item of list) {
+          item.hasChildren = !item.leaf
+        }
+        typeM.selectdata = list
+        typeM.fromData = list
+        typeM.total = res.object.total
+      })
+    },
+    // 鑾峰彇鍒嗙被涓嬫媺鍒楄〃
+    getSelectInfo() {
+      var typeM = this.typeManage
+      var params = {
+        page: 1,
+        pageSize: 999
+      }
+      getAllCategory(params).then((res) => {
+        var dropDown = res.object.records || []
+        typeM.dropData = dropDown
+      })
+    },
+    //鑾峰彇鍏ㄩ儴淇℃伅鍒嗙被鍒嗛〉
+    handleSizeChange(val) {
+      // 姣忛〉澶氬皯鏉�
+      this.typeManage.size = val
+      this.classification()
+    },
+    handleCurrentChange(val) {
+      // 褰撳墠鏄灏戦〉
+      this.typeManage.page = val
+      this.classification()
+    },
 
-	  //1.鑾峰彇鍏ㄩ儴淇℃伅鍒嗙被
-	  classification(params){
-		var typeM = this.typeManage;
-		var params = {
-			page:typeM.page, 
-			pageSize:typeM.size,
-		};
-		reqInformationTreeList({pid:0}).then((res) => {
-			var list = res.object.records || [];
-			for(var item of list){
-				item.hasChildren = !item.leaf;
-			};
-			typeM.selectdata = list;
-			typeM.fromData = list;
-			typeM.total = res.object.total;
-		});
-	  },
-	  // 鑾峰彇鍒嗙被涓嬫媺鍒楄〃
-	  getSelectInfo(){
-		  var typeM = this.typeManage;
-		  var params = {
-			page:1, 
-			pageSize:999,
-		  };
-		  getAllCategory(params).then((res) => {
-		    var dropDown = res.object.records || [];
-		    typeM.dropData = dropDown;
-		  });
-	  },
-	  //鑾峰彇鍏ㄩ儴淇℃伅鍒嗙被鍒嗛〉
-	  handleSizeChange(val) {
-		// 姣忛〉澶氬皯鏉�
-		this.typeManage.size =val ;
-		this.classification();
-	  },
-	  handleCurrentChange(val) {
-		// 褰撳墠鏄灏戦〉
-		this.typeManage.page = val;
-		this.classification();
-	  },
-	  
-	  //2.鏍规嵁鍚嶇О鑾峰彇淇℃伅鍒嗙被
-	  toSearch() {
-		var typeM = this.typeManage;
-		var param = {
-			page: this.typeManage.page,
-			pageSize: this.typeManage.size,
-		};
-		this.name && (param.name = this.name);
-		var typeM = this.typeManage;
-		getNameCategory(param).then((res) => {
-			var selectlist = res.object.records || [];
-			typeM.fromData = selectlist;
-			typeM.total = res.object.total;
-		});
-	  },
-		// 鏂板
-	 addDialogData(){
-	   this.typeManage.addDialog = true;
-	   this.typeManage.from.addname='';
-	   this.typeManage.from.id=0;
-	   this.typeManage.from.test=''
-	 },
-	 determine(){
-		if(this.typeManage.flag){  
-			this.typeManage.flag = 0;
-			this.chooseString=this.typeManage.from.test.join();
-			this.$refs.addDataForm.validate((valid) => {
-			    if (valid) {
-				 var params = {
-					 name:this.typeManage.from.addname,
-					 pushNew:this.chooseString,
-					 pid:this.typeManage.from.id,
-				 };
+    //2.鏍规嵁鍚嶇О鑾峰彇淇℃伅鍒嗙被
+    toSearch() {
+      var typeM = this.typeManage
+      var param = {
+        page: this.typeManage.page,
+        pageSize: this.typeManage.size
+      }
+      this.name && (param.name = this.name)
+      var typeM = this.typeManage
+      getNameCategory(param).then((res) => {
+        var selectlist = res.object.records || []
+        typeM.fromData = selectlist
+        typeM.total = res.object.total
+      })
+    },
+    // 鏂板
+    addDialogData() {
+      this.typeManage.addDialog = true
+      this.typeManage.from.addname = ''
+      this.typeManage.from.id = 0
+      this.typeManage.from.test = ''
+    },
+    determine() {
+      if (this.typeManage.flag) {
+        this.typeManage.flag = 0
+        this.chooseString = this.typeManage.from.test.join()
+        this.$refs.addDataForm.validate((valid) => {
+          if (valid) {
+            var params = {
+              name: this.typeManage.from.addname,
+              pushNew: this.chooseString,
+              pid: this.typeManage.from.id
+            }
 
-				  var self = this;
-				 addClassification(params).then((res) => {
-					this.typeManage.addDialog = false;
-					this.classification();
-					setTimeout(function(){
-						self.typeManage.flag = 1;
-					}, 300);
-					self.$message({
-					  type: "success",
-					  message: "鏂板鎴愬姛",
-					});
-				  }, 
-				  () => {
-					self.$message.error("鏂板澶辫触");
-					}
-				   );
-			    }
-			}) 
-		}
-	 },
-	 
-	 // 4銆佷慨鏀逛俊鎭垎绫�
-	 typeEdit(e, index, item){
-		this.typeManage.editDialog = true; 
-		this.editFormInfo.send=item.pushnew;
-		this.editFormInfo.id=item.id;
-		this.editFormInfo.choose=this.editFormInfo.send.split(",")
-		this.editFormInfo.type=item.label;
-		this.editFormInfo.pid=item.pid;
+            var self = this
+            addClassification(params).then(
+              (res) => {
+                this.typeManage.addDialog = false
+                this.classification()
+                setTimeout(function () {
+                  self.typeManage.flag = 1
+                }, 300)
+                self.$message({
+                  type: 'success',
+                  message: '鏂板鎴愬姛'
+                })
+              },
+              () => {
+                self.$message.error('鏂板澶辫触')
+              }
+            )
+          }
+        })
+      }
+    },
 
-		this.CacheItem = item;
-	 },
-	 selectChange(val){
-		this.newval=val
-		this.editFormInfo.send = this.newval.join();
-	 },
-	 uploadAddForm(){
-		if(this.editFormInfo.flag){ 
-			this.editFormInfo.flag = 0;
-			this.$refs.editDataForm.validate((valid) => {
-				if (valid) {
-					var params = {
-						id:this.editFormInfo.id,
-						name:this.editFormInfo.type,
-						pushNew:this.editFormInfo.send,	 
-						pid:this.editFormInfo.pid,	 
-					};
-					var self = this;
-					editClassification(params).then((res) => {
-						if(res.code === 200){
-							this.typeManage.editDialog = false;
-							
-							this.CacheItem.label = params.name;
-							this.CacheItem.pushnew = params.pushNew;
-							setTimeout(function(){
-								self.editFormInfo.flag = 1;
-							}, 300);
-							// 閲嶆柊鏋勫缓鍒楄〃
-							this.classification();
-						};
+    // 4銆佷慨鏀逛俊鎭垎绫�
+    typeEdit(e, index, item) {
+      this.typeManage.editDialog = true
+      this.editFormInfo.send = item.pushnew
+      this.editFormInfo.id = item.id
+      this.editFormInfo.choose = this.editFormInfo.send.split(',')
+      this.editFormInfo.type = item.label
+      this.editFormInfo.pid = item.pid
 
-						// message
-						self.$message({
-							type: "success",
-							message: "缂栬緫鎴愬姛",
-						}, ()=>{
-							self.$message.error("缂栬緫澶辫触");
-						});
-					}); 
-				 }
-			}) 
-		}
-	 },
+      this.CacheItem = item
+    },
+    selectChange(val) {
+      this.newval = val
+      this.editFormInfo.send = this.newval.join()
+    },
+    uploadAddForm() {
+      if (this.editFormInfo.flag) {
+        this.editFormInfo.flag = 0
+        this.$refs.editDataForm.validate((valid) => {
+          if (valid) {
+            var params = {
+              id: this.editFormInfo.id,
+              name: this.editFormInfo.type,
+              pushNew: this.editFormInfo.send,
+              pid: this.editFormInfo.pid
+            }
+            var self = this
+            editClassification(params).then((res) => {
+              if (res.code === 200) {
+                this.typeManage.editDialog = false
 
-	 // 5.鍒犻櫎
-	 typeDelete(item) {
-	 	var id = item.id;
-	   this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?", "鎻愮ず", {
-	     confirmButtonText: "纭畾",
-	     cancelButtonText: "鍙栨秷",
-	     type: "warning",
-	   }).then(() => {
-	     deleteTypeDict({id:id}).then(
-	       (res) => {
+                this.CacheItem.label = params.name
+                this.CacheItem.pushnew = params.pushNew
+                setTimeout(function () {
+                  self.editFormInfo.flag = 1
+                }, 300)
+                // 閲嶆柊鏋勫缓鍒楄〃
+                this.classification()
+              }
 
-				this.$message({
-					message: "鍒犻櫎鎴愬姛",
-					type: "success",
-				});
-				this.classification();
-	       },
-	       () => {
-	         this.$message.error("鍒犻櫎澶辫触");
-	       }
-	     );
-	   });
-	 },
+              // message
+              self.$message(
+                {
+                  type: 'success',
+                  message: '缂栬緫鎴愬姛'
+                },
+                () => {
+                  self.$message.error('缂栬緫澶辫触')
+                }
+              )
+            })
+          }
+        })
+      }
+    },
 
-	 getDeptDatas(tree, treeNode, resolve) {
-		const params = { pid: tree.id };
-		reqInformationTreeList(params).then((res) => {
-			var list = res.object.records || [];
-			for(var item of list){
-				item.hasChildren = !item.leaf;
-			};
-			resolve(list)
-		});
-	 },
+    // 5.鍒犻櫎
+    typeDelete(item) {
+      var id = item.id
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        deleteTypeDict({ id: id }).then(
+          (res) => {
+            this.$message({
+              message: '鍒犻櫎鎴愬姛',
+              type: 'success'
+            })
+            this.classification()
+          },
+          () => {
+            this.$message.error('鍒犻櫎澶辫触')
+          }
+        )
+      })
+    },
 
+    getDeptDatas(tree, treeNode, resolve) {
+      const params = { pid: tree.id }
+      reqInformationTreeList(params).then((res) => {
+        var list = res.object.records || []
+        for (var item of list) {
+          item.hasChildren = !item.leaf
+        }
+        resolve(list)
+      })
+    },
 
-		// 鍔犺浇淇℃伅鍒嗙被鍒楄〃
-		loadInfoTreeMenus({ action, parentNode, callback }) {
-			if(action === 'LOAD_CHILDREN_OPTIONS'){
-				setTimeout(() => {
-					callback()
-				}, 100)
-			};
-		},
+    // 鍔犺浇淇℃伅鍒嗙被鍒楄〃
+    loadInfoTreeMenus({ action, parentNode, callback }) {
+      if (action === 'LOAD_CHILDREN_OPTIONS') {
+        setTimeout(() => {
+          callback()
+        }, 100)
+      }
+    }
   }
-};
+}
 </script>
 
 <style lang="scss" scoped>
-	.datamanage-wrapper{
-	width: 100%;
-		height:100%;
-		padding: 10px;
-		border-radius: 5px;
-		background-color: #f5f6fb;
-	}
-	.search-wrapper {
-		width:100%;
-		display: flex;
-		padding: 10px;
-		border-radius: 5px;
-		margin: 10px 0px 10px 0px;
-		background: #fff;
-	}
+.datamanage-wrapper {
+  width: 100%;
+  height: 100%;
+  padding: 10px;
+  border-radius: 5px;
+  background-color: #f5f6fb;
+}
+.search-wrapper {
+  width: 100%;
+  display: flex;
+  padding: 10px;
+  border-radius: 5px;
+  margin: 10px 0px 10px 0px;
+  background: #fff;
+}
 
-  .table-wrapper {
-	width: 100%;
-    padding: 10px;
-    border-radius: 5px;
-    margin: 10px 0px 10px 0px;
-    background: #fff;
-  }
-.searchbtn{
+.table-wrapper {
+  width: 100%;
+  padding: 10px;
+  border-radius: 5px;
+  margin: 10px 0px 10px 0px;
+  background: #fff;
+}
+.searchbtn {
   margin-left: 30px;
-  padding:6px 15px;
-  font-size:14px;
+  padding: 6px 15px;
+  font-size: 14px;
   display: flex;
   justify-content: center;
   align-items: center;
   height: 30px;
   background-color: #13ce66;
-  border-color:#13ce66;
-
+  border-color: #13ce66;
 }
-.addbtn{
+.addbtn {
   margin-left: 30px;
-  padding:6px 15px;
-  font-size:14px;
+  padding: 6px 15px;
+  font-size: 14px;
   display: flex;
   justify-content: center;
   align-items: center;
   height: 30px;
-
 }
-.infoline{
-  width:100%;
-  height:100px;
-  font-weight:bold;
+.infoline {
+  width: 100%;
+  height: 100px;
+  font-weight: bold;
   font-size: 24px;
   display: flex;
   justify-content: flex-start;
   align-items: center;
   margin-left: 20px;
-
 }
 </style>
 
 <style rel="stylesheet/scss" lang="scss" scoped>
- ::v-deep .vue-treeselect__control,::v-deep .vue-treeselect__placeholder,::v-deep .vue-treeselect__single-value {
-    height: 30px;
-    line-height: 30px;
-  }
+::v-deep .vue-treeselect__control,
+::v-deep .vue-treeselect__placeholder,
+::v-deep .vue-treeselect__single-value {
+  height: 30px;
+  line-height: 30px;
+}
 </style>
 <style rel="stylesheet/scss" lang="scss" scoped>
- ::v-deep .el-input-number .el-input__inner {
-    text-align: left;
-  }
+::v-deep .el-input-number .el-input__inner {
+  text-align: left;
+}
 </style>
diff --git a/src/views/lookupClass/classify.vue b/src/views/lookupClass/classify.vue
index 71bcc26..a88d74f 100644
--- a/src/views/lookupClass/classify.vue
+++ b/src/views/lookupClass/classify.vue
@@ -191,9 +191,44 @@ import {
 import { reqInformationTreeList, reqAllInfoTreeList } from '@/api/treeMenus.js'
 import Treeselect from '@riophae/vue-treeselect'
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+function deepHasValue(data, targetValue) {
+  const items = Array.isArray(data) ? data : [data]
+
+  for (const item of items) {
+    // 鐩存帴鍖归厤鍩烘湰绫诲瀷
+    if (item === targetValue) return true
+
+    // 澶勭悊瀵硅薄绫诲瀷
+    if (typeof item === 'object' && item !== null) {
+      // 娣卞害閬嶅巻鎵€鏈夊睘鎬у€�
+      for (const value of Object.values(item)) {
+        if (value === targetValue || deepHasValue(value, targetValue)) {
+          return true
+        }
+      }
+    }
+  }
+
+  return false
+}
+
 export default {
   components: { Treeselect },
   data() {
+    let self = this
+    var checkRepeat = (rule, value, callback) => {
+      var onOf = deepHasValue(self.infoTree.menus, value)
+
+      if (onOf) {
+        self.typeManage.flag = 1
+        self.typeManage.flag = 1
+        return callback(new Error('鍒嗙被鍚嶇О閲嶅'))
+      } else {
+        self.typeManage.flag = 1
+        self.typeManage.flag = 1
+        callback()
+      }
+    }
     return {
       // 1.鑾峰彇鍏ㄩ儴淇℃伅鍒嗙被
       typeManage: {
@@ -209,6 +244,9 @@ export default {
           addname: '',
           test: [] // 榛樿閫夐」锛岃鍦╡l-checkbox-group閲岀粦瀹氫竴涓┖鏁扮粍
         },
+        rules: {
+          addname: []
+        },
         editDialog: false,
         fromData: []
       },
@@ -267,11 +305,17 @@ export default {
       newval: [],
       // 楠岃瘉
       formrules: {
-        addname: [{ required: true, message: '璇疯緭鍏ョ被鍒�', trigger: 'blur' }],
+        addname: [
+          { required: true, message: '璇疯緭鍏ョ被鍒�', trigger: 'blur' },
+          { validator: checkRepeat, trigger: 'blur' }
+        ],
         test: [{ required: true, message: '璇烽€夋嫨鎺ㄩ€佷俊鎭�', trigger: 'change' }]
       },
       rules: {
-        type: [{ required: true, message: '璇疯緭鍏ョ被鍒�', trigger: 'blur' }],
+        type: [
+          { required: true, message: '璇疯緭鍏ョ被鍒�', trigger: 'blur' },
+          { validator: checkRepeat, trigger: 'blur' }
+        ],
         choose: [{ required: true, message: '璇烽€夋嫨鎺ㄩ€佷俊鎭�', trigger: 'change' }]
       },
       infoTree: {
@@ -376,6 +420,7 @@ export default {
     determine() {
       if (this.typeManage.flag) {
         this.typeManage.flag = 0
+
         this.chooseString = this.typeManage.from.test.join()
         this.$refs.addDataForm.validate((valid) => {
           if (valid) {
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index dd95c82..d97f7e5 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -199,15 +199,31 @@
       <div v-for="(item, i) in typeList">
         <el-form ref="addDataForm" :model="typeList[i]" :rules="fromrules">
           <el-form-item prop="infoClass" label="淇℃伅鍒嗙被" :label-width="'120px'">
-            <el-select clearable v-model="typeList[i].infoClass" placeholder="璇烽€夋嫨绫诲埆" filterable allow-create>
-              <el-option v-for="(item, index) in listType" :key="index" :label="item.type" :value="item.typeId" />
-            </el-select>
+            <el-cascader
+              clearable
+              v-model="typeList[i].infoClass"
+              :options="listType"
+              :show-all-levels="false"
+              :props="{
+                emitPath: false,
+                checkStrictly: true,
+                value: 'id',
+                label: 'label',
+                children: 'children',
+                disabled: 'disabled'
+              }"
+              placeholder="璇烽€夋嫨绫诲埆"
+              filterable
+              allow-create
+            >
+              <!-- <el-option v-for="(item, index) in listType" :key="index" :label="item.type" :value="item.typeId" /> -->
+            </el-cascader>
           </el-form-item>
           <el-form-item prop="value" label="鏉冮噸鍊�:" :label-width="'120px'">
-            <el-input-number v-model="typeList[i].value" :min="1" :max="5" label="鎻忚堪鏂囧瓧"></el-input-number>
+            <el-input-number v-model="typeList[i].value" :min="1" :max="3" label="鎻忚堪鏂囧瓧"></el-input-number>
           </el-form-item>
-          <el-button circle icon="el-icon-plus" @click="addList()"></el-button>
-          <el-button circle icon="el-icon-minus" @click="subList(i)" v-if="i > 0"></el-button>
+          <el-button circle icon="el-icon-plus" @click="addList(item)"></el-button>
+          <el-button circle icon="el-icon-minus" @click="subList(item, i)" v-if="i > 0"></el-button>
         </el-form>
       </div>
       <div slot="footer">
@@ -315,7 +331,7 @@ export default {
       //
       newManage: {
         page: 1,
-        size: 10,
+        size: '',
         total: 0
       },
       // 鑾峰彇淇℃伅鍒嗙被鏁版嵁
@@ -347,20 +363,22 @@ export default {
   },
   methods: {
     //鍔犲彿
-    addList() {
-      console.log(this.typeList.length)
-      console.log(this.totalTypeNumber)
+    addList(i) {
       if (this.typeList.length <= this.totalTypeNumber) {
         this.typeList.push({ infoClass: '', value: '' })
+        this.typeList.forEach((el) => {
+          this.listType = this.disableByField(this.listType, 'id', el.infoClass, true)
+        })
+        console.log(this.listType, i.infoClass)
       } else {
         this.$message.error('宸茶秴杩囨潈閲嶆€绘暟')
         return
       }
     },
     //鍑忓彿
-    subList(index) {
-      console.log(index)
+    subList(item, index) {
       this.typeList.splice(index, 1)
+      this.listType = this.disableByField(this.listType, 'id', item.infoClass, false)
     },
     // 鑾峰彇淇℃伅鍒嗙被
     classification(params) {
@@ -372,11 +390,24 @@ export default {
       getAllCategory(params).then((res) => {
         var newlist = res.object.records || []
         this.totalTypeNumber = newlist.length
-        console.log(this.totalTypeNumber, 'this.totalTypeNumber')
-        for (var i = 0; i < newlist.length; i++) {
-          this.listType.push({ type: newlist[i].name, typeId: newlist[i].id })
-          console.log(this.listType, 'this.listType')
-        }
+        console.log(newlist)
+
+        newlist.forEach((e) => {
+          console.log(e.id)
+
+          if (e.children.length !== 0) {
+            this.listType.push({ ...e, disabled: true })
+          } else {
+            this.listType.push({ ...e })
+          }
+        })
+        console.log(this.listType, 'huoqu')
+
+        // console.log(this.totalTypeNumber, 'this.totalTypeNumber')
+        // for (var i = 0; i < newlist.length; i++) {
+        //   this.listType.push({ type: newlist[i].name, typeId: newlist[i].id })
+        //   console.log(this.listType, 'this.listType')
+        // }
       })
     },
     handleChange(value) {},
@@ -625,6 +656,42 @@ export default {
         })
         .catch(() => {})
     },
+    /**
+     * 鏍规嵁鎸囧畾瀛楁鍊兼爣璁板祵濂楃粨鏋勪腑鐨勫璞�
+     * @param {Array} nestedArray - 鍖呭惈 children 鐨勫灞傚祵濂楁暟鎹�
+     * @param {string} field - 鐩爣瀛楁鍚�
+     * @param {*} value - 瑕佸尮閰嶇殑瀛楁鍊�
+     * @returns {Array} 鏍囪鍚庣殑鏂版暟鎹粨鏋�
+     */
+    disableByField(nestedArray, field, value, tf) {
+      return nestedArray.map((item) => {
+        // 澶勭悊鏁扮粍鍏冪礌
+        if (Array.isArray(item)) {
+          return this.disableByField(item, field, value, tf)
+        }
+
+        // 澶勭悊瀵硅薄鍏冪礌
+        if (typeof item === 'object' && item !== null) {
+          // 鍒涘缓鏂板璞★紙淇濇寔涓嶅彲鍙樻€э級
+          const newItem = { ...item }
+
+          // 鏍囪鍖归厤鍏冪礌
+          if (newItem[field] === value) {
+            newItem.disabled = tf
+          }
+
+          // 閫掑綊澶勭悊 children
+          if (Array.isArray(newItem.children)) {
+            newItem.children = this.disableByField(newItem.children, field, value, tf)
+          }
+
+          return newItem
+        }
+
+        // 鍏朵粬绫诲瀷鐩存帴杩斿洖
+        return item
+      })
+    },
     checkboxT(row, rowIndex) {
       return row.id !== this.user.id
     }
-- 
2.22.0