Browse Source

迭代八数据填报:解决部门树传参

zhangyihao 6 tháng trước cách đây
mục cha
commit
e4b1a919ce

+ 0 - 1
src/views/inspectionWork/completed.vue

@@ -75,7 +75,6 @@ const data = reactive({
 });
 
 const { queryParams, form } = toRefs(data);
-data.queryParams.area_code = '';
 const formatStatus = (status) => {
   return Number(status) === 1 ? '已完成' : '未完成';
 };

+ 2 - 3
src/views/inspectionWork/incompleted.vue

@@ -84,7 +84,6 @@ const filterNode = (value: string, data: any) => {
   if (!value) return true;
   return data.label.indexOf(value) !== -1;
 };
-data.queryParams.area_code = '';
 
 const getTreeSelect = async () => {
   const res = await inspectorDivision();
@@ -127,8 +126,8 @@ watch(queryParams, () => {
 
 const handleNodeClick = (data: any) => {
   queryParams.value.deptId = data.id;
-  queryParams.value.area_code = data.code; // 设置area_code为点击节点的code值
-  fetchUserData();
+  queryParams.value.area_code = data.code; // 设置 area_code
+  fetchUserData(); // 调用 fetchUserData 函数更新表格数据
 };
 
 const handleSelectionChange = (selection) => {