Procházet zdrojové kódy

reactor:流程调整;

zhangchong před 1 rokem
rodič
revize
45a9d1325b

+ 30 - 10
src/components/ProcessApproval/index.vue

@@ -295,7 +295,7 @@
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="!returnArr.includes(state.processType)">
 						<el-form-item label="下一环节" prop="nextStepCode" :rules="[{ required: true, message: '请选择下一环节', trigger: 'change' }]">
 							<el-select v-model="state.ruleForm.nextStepCode" placeholder="请选择下一环节" class="w100" @change="selectNextStep">
-								<el-option v-for="item in state.nextStepOptions" :key="item.code" :label="item.name" :value="item.code" />
+								<el-option v-for="item in state.nextStepOptions" :key="item.key" :label="item.value" :value="item.key" />
 							</el-select>
 						</el-form-item>
 					</el-col>
@@ -324,7 +324,7 @@
 							</el-select>
 						</el-form-item>
 					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" v-if="formComponents.includes('Sms')">
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
 						<el-form-item label="短信通知" prop="isSms">
 							<el-checkbox v-model="state.ruleForm.isSms" label="短信通知" />
 						</el-form-item>
@@ -512,8 +512,12 @@ const state = reactive<any>({
 	ruleForm: {
 		//流程表单
 		opinion: '', // 意见
+    nextStepCode: '', // 下一节点
+    backToCountersignEnd: false, // 是否回到会签结束节点
 		nextHandlers: [], // 下一节点处理人
 		nextMainHandler: '', // 主办人
+    isSms: false, // 是否短信通知
+    isStartCountersign: false, // 是否发起会签
 	},
 	delayForm: {
 		//延期申请表单
@@ -567,6 +571,10 @@ const pushRangesOptions = ref<EmptyArrayType>([]); // 公告范围
 const orgsOptions = ref<EmptyArrayType>([]); // 来源单位
 const handleResult = (res: any) => {
 	state.nextStepOptions = res.result.steps; //处理人选择内容
+  state.ruleForm.backToCountersignEnd = res.result.backToCountersignEnd ?? false; // 是否回到会签结束节点
+
+
+
 	state.handleId = res.result.id; //流程ID
 	formComponents.value = res.result.components ?? []; // 表单组件
 	console.log(formComponents.value, '21');
@@ -576,7 +584,7 @@ const handleResult = (res: any) => {
 		// 办理才有期满时间
 		state.ruleForm.expiredTime = res.result.expiredTime ?? null; // 期满时间
 	}
-	if (state.nextStepOptions.length === 1) {
+	/*if (state.nextStepOptions.length === 1) {
 		// 下一节点是否只有一个 默认选中第一个
 		state.ruleForm.nextStepCode = state.nextStepOptions[0].code; // 下一节点
 		getNextStepOption(res.result.id, state.nextStepOptions[0].code); // 查询流程下一节点参数
@@ -584,7 +592,17 @@ const handleResult = (res: any) => {
 	} else {
 		state.ruleForm.nextStepCode = '';
 		isCollect.value = false;
+	}*/
+  if (state.nextStepOptions.length === 1) {
+		// 下一节点是否只有一个 默认选中第一个
+		state.ruleForm.nextStepCode = state.nextStepOptions[0].key; // 下一节点
+    selectNextStep(state.nextStepOptions[0].key); // 查询流程下一节点参数
+		isCollect.value = state.nextStepOptions[0].stepType === 3 && handelArr.includes(state.processType); // 是否是汇总节点(汇总需要填入其他参数)
+	} else {
+		state.ruleForm.nextStepCode = '';
+		isCollect.value = false;
 	}
+
 };
 // 打开弹窗
 const openDialog = async (val: any) => {
@@ -706,22 +724,24 @@ watchEffect(() => {
 // 流程选择下一环节
 const isCollect = ref(false); // 是否是汇总节点(汇总需要填入其他参数)
 const selectNextStep = (val: any) => {
-	ruleFormRef.value.resetFields('nextHandlers');
-	ruleFormRef.value.resetFields('nextMainHandler');
-	let next: any;
-	next = state.nextStepOptions.find((item: any) => item.code === val);
+	ruleFormRef.value?.resetFields('nextHandlers');
+	ruleFormRef.value?.resetFields('nextMainHandler');
+  const items = state.nextStepOptions.find((item: any) => item.key === val).items;
+  console.log(items,'21')
+  state.handlerOptions = items ?? [];
+	/*const next = state.nextStepOptions.find((item: any) => item.code === val);
 	getNextStepOption(state.handleId, next.code);
-	isCollect.value = next.stepType === 3 && handelArr.includes(state.processType); // 是否是汇总节点(汇总需要填入其他参数)
+	isCollect.value = next.stepType === 3 && handelArr.includes(state.processType); // 是否是汇总节点(汇总需要填入其他参数)*/
 };
 // 查询流程下一节点参数
-const getNextStepOption = async (DefineId: string, Code: string) => {
+/*const getNextStepOption = async (DefineId: string, Code: string) => {
 	try {
 		const res: any = await workflowStepOptions({ DefineId, Code });
 		state.handlerOptions = res.result.handlers ?? [];
 	} catch (error) {
 		console.log(error);
 	}
-};
+};*/
 // 选择处理人
 const selectHandlers = () => {
 	ruleFormRef.value?.resetFields('nextMainHandler');

+ 1 - 1
src/stores/userInfo.ts

@@ -45,7 +45,7 @@ export const useUserInfo = defineStore('userInfo', {
 				this.userInfos.roles = userInfo.result.roles ?? [];
 				this.userInfos.token = Cookie.get('token') ?? '';
 				this.userInfos.photo = "";
-				this.userInfos.orgName = userInfo.result.organization?.orgName ?? '';
+				this.userInfos.orgName = userInfo.result.organization?.name ?? '';
 				//授权按钮
 				this.userInfos.showTelControl = buttons.includes('public:seat:panel'); // 查询是否有展示面板权限
 				this.userInfos.authBtnList = buttons;

+ 123 - 0
src/views/business/order/accept/Company-search.vue

@@ -0,0 +1,123 @@
+<template>
+  <el-dialog v-model="state.dialogVisible" draggable title="服务企业查找" ref="dialogRef" width="800px" append-to-body destroy-on-close>
+    <el-form :model="state.queryParams" ref="ruleFormRef" :inline="true" @submit.native.prevent>
+      <el-form-item label="关键词" prop="Keyword">
+        <el-input v-model="state.queryParams.Keyword" placeholder="企业名称" clearable @keyup.enter="handleQuery" />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+        <el-button @click="resetQuery(ruleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+      </el-form-item>
+    </el-form>
+    <el-table :data="state.tableData" @current-change="handleSelectionChange">
+      <el-table-column label="选择" width="70">
+        <template #default="{row}">
+          <el-radio v-model="tableRadio" :label="row.id" @change="handleRowChange(row)">&nbsp;</el-radio>
+        </template>
+      </el-table-column>
+      <el-table-column prop="phoneNo" label="企业名称" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="hotspotName" label="专班名称" show-overflow-tooltip> </el-table-column>
+      <template #empty>
+        <Empty />
+      </template>
+    </el-table>
+    <pagination
+        :total="state.total"
+        v-model:page="state.queryParams.PageIndex"
+        v-model:limit="state.queryParams.PageSize"
+        @pagination="queryList"
+    />
+    <template #footer>
+				<span class="dialog-footer">
+					<el-button class="default-button" @click="state.dialogVisible = false">取 消</el-button>
+					<el-button type="primary" @click="selectConfirm" :disabled="!tableRadio">确 定</el-button>
+				</span>
+    </template>
+  </el-dialog>
+</template>
+
+<script setup lang="ts" name="orderCompanySearch">
+import { reactive, ref} from 'vue';
+import type { FormInstance } from 'element-plus';
+import { historyOrder } from '/@/api/business/order';
+import { useRoute } from 'vue-router';
+// 引入组件
+const emit = defineEmits(['saveSelect']);
+// 定义变量内容
+const state = reactive<any>({
+  dialogVisible: false, // 弹窗显示隐藏
+  queryParams: {
+    PageIndex: 1, // 当前页
+    PageSize: 10, // 每页条数
+    Keyword: '',  // 关键字
+  },
+  tableData: [], // 表格数据
+  total: 0,   // 总条数
+  loading: false, // 加载状态
+});
+const ruleFormRef = ref<RefType>(); // 表单ref
+const tableRadio = ref<String>(''); // 选择的单选框
+const selectRow = ref<EmptyObjectType>({}); // 选择的行
+const route = useRoute(); // 路由
+// 打开弹窗
+const openDialog = (row: any) => {
+  // tableRadio.value = row.duplicateId ?? '';
+  // queryList();
+  state.dialogVisible = true;
+};
+const dialogRef = ref<RefType>();
+// 关闭弹窗
+const closeDialog = () => {
+  state.dialogVisible = false;
+};
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  state.queryParams.PageIndex = 1;
+  // queryList();
+};
+/** 重置按钮操作 */
+const resetQuery = (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  formEl.resetFields();
+  handleQuery();
+};
+/** 获取历史工单 */
+const queryList = () => {
+  state.loading = true;
+  let request = {
+    ...state.queryParams,
+    PhoneNo: state.ruleForm.contact,
+    OrderId: route.params.id ?? '', //传入id 排除重复工单选择自己
+  };
+  historyOrder(request)
+      .then((response: any) => {
+        state.tableData = response?.result.items ?? [];
+        state.total = response?.result.total;
+        state.loading = false;
+      })
+      .catch(() => {
+        state.loading = false;
+      });
+};
+// 选择重复件
+const handleSelectionChange = (row: any) => {
+  if (row) {
+    tableRadio.value = row.id;
+    selectRow.value  = row;
+  }
+};
+const handleRowChange = (row: any) => {
+  tableRadio.value  = row.id;
+  selectRow.value  = row;
+};
+
+// 确定选择历史工单
+const selectConfirm = () => {
+  emit('saveSelect', state.selectRow);
+};
+// 暴露变量
+defineExpose({
+  openDialog,
+  closeDialog,
+});
+</script>

+ 46 - 5
src/views/business/order/accept/Repeat-event.vue

@@ -60,8 +60,20 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <el-form-item label="关键词" prop="keyword" :rules="[{ required: true, message: '请输入关键词', trigger: 'blur' }]">
-              <el-input v-model="state.ruleForm.keyword" placeholder="请输入关键词" clearable type="text" show-word-limit maxlength="200"></el-input>
+            <el-form-item label="关键词" prop="synonym" :rules="[{ required: false, message: '请输入关键词', trigger: 'change' }]">
+              <el-tag v-for="tag in dynamicTags" :key="tag" class="mr10 mb10"  size="large" closable :disable-transitions="false" @close="handleClose(tag)">
+                {{ tag }}
+              </el-tag>
+              <el-input
+                  v-if="inputVisible"
+                  ref="InputRef"
+                  v-model="inputValue"
+                  @keyup.enter="handleInputConfirm"
+                  @blur="handleInputConfirm"
+                  style="max-width: 200px"
+                  class="mb10"
+              />
+              <el-button v-else @click="showInput" class="mb10"> 添加关键词 </el-button>
             </el-form-item>
           </el-col>
         </el-row>
@@ -77,8 +89,8 @@
   </div>
 </template>
 <script setup lang="ts" name="orderAcceptRepeatEvent">
-import {reactive,ref} from "vue";
-import {ElButton, ElMessage, FormInstance} from "element-plus";
+import {nextTick, reactive, ref} from "vue";
+import {ElButton, ElInput, ElMessage, FormInstance} from "element-plus";
 import {shortcuts} from "/@/utils/constants";
 import {throttle} from "/@/utils/tools";
 import {auth} from "/@/utils/authFunction";
@@ -102,6 +114,31 @@ const state = reactive<any>({
   }
 })
 
+const inputValue = ref('');
+const dynamicTags = ref<EmptyArrayType>([]);
+const inputVisible = ref(false);
+const InputRef = ref<InstanceType<typeof ElInput>>();
+// 删除同义词
+const handleClose = (tag: string) => {
+  dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
+};
+// 展示输入框
+const showInput = () => {
+  inputVisible.value = true;
+  nextTick(() => {
+    InputRef.value!.input!.focus();
+  });
+};
+// 确定添加
+const handleInputConfirm = () => {
+  if (inputValue.value) {
+    dynamicTags.value.push(inputValue.value);
+  }
+  inputVisible.value = false;
+  inputValue.value = '';
+};
+
+
 const queryParamsRef = ref<RefType>(); // 查询参数
 const handleTimeChange = (val: string[], startKey: string, endKey: string) => {
   if (val) {
@@ -144,7 +181,11 @@ const onSubmit = throttle(async (formEl: FormInstance | undefined) => {
   await formEl.validate((valid: boolean) => {
     if (!valid) return;
     state.loading = true;
-    addCommon(state.ruleForm)
+    const request = {
+      ...state.ruleForm,
+      synonym: dynamicTags.value.join(','),
+    };
+    addCommon(request)
         .then(() => {
           ElMessage({
             message: '操作成功',

+ 26 - 41
src/views/business/order/accept/index.vue

@@ -223,22 +223,29 @@
 									</el-form-item>
 								</el-col>
 								<!-- 当“来电/信人身份”为“企业”时必填 -->
-								<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+								<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
 									<el-form-item
-										label="工作单位"
-										prop="company"
-										:rules="[{ required: state.ruleForm.identityType === 2, message: '请填写工作单位', trigger: 'blur' }]"
+										label="企业名称"
+										prop="enterpriseName"
+										:rules="[{ required: state.ruleForm.identityType === 2, message: '请填写企业名称', trigger: 'blur' }]"
 									>
-										<el-autocomplete
-											v-model="state.ruleForm.company"
-											:fetch-suggestions="querySearchAsync"
-											placeholder="请输入企业名称"
-											@select="handleSelect"
-											clearable
-											class="w100"
-										/>
+                    <el-input v-model="state.ruleForm.enterpriseName" placeholder="请输入企业名称" clearable>
+                    </el-input>
 									</el-form-item>
 								</el-col>
+                <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+                  <el-form-item
+                      label="专班名称"
+                      prop="zhuanBanMingCheng"
+                      :rules="[{ required: state.ruleForm.identityType === 2, message: '请填写专班名称', trigger: 'blur' }]"
+                  >
+                    <el-input v-model="state.ruleForm.zhuanBanMingCheng" placeholder="请填写专班名称" clearable>
+                      <template #append>
+                        <el-button type="primary" @click="handleSelect"><SvgIcon name="ele-Search" class="mr4"/> 查询企业</el-button>
+                      </template>
+                    </el-input>
+                  </el-form-item>
+                </el-col>
 							</el-row>
 							<p class="border-title mb10">诉求信息</p>
 							<el-row>
@@ -489,6 +496,8 @@
 		<process-approval ref="processApprovalRef" @orderProcessSuccess="orderProcessSuccess" />
     <!-- 地图选点 -->
     <map-dialog ref="mapDialogRef" @confirm="selectMap"/>
+    <!-- 企业搜索 -->
+    <company-search ref="companySearchRef"/>
 	</div>
 </template>
 
@@ -519,6 +528,7 @@ const CommonAdvice = defineAsyncComponent(() => import('/@/components/CommonAdvi
 const AnnexList = defineAsyncComponent(() => import('/@/components/AnnexList/index.vue')); // 附件列表
 const ProcessApproval = defineAsyncComponent(() => import('/@/components/ProcessApproval/index.vue')); // 流程审批
 const MapDialog = defineAsyncComponent(() => import('/@/views/business/order/components/Map-Dialog.vue')); // 地图定位
+const CompanySearch = defineAsyncComponent(() => import('/@/views/business/order/accept/Company-search.vue')); // 企业搜索
 // 定义变量内容
 const state = reactive<any>({
 	createBy: 'manual', // 工单创建方式 默认手动创建  tel:来电弹单  letter:互联网来信 默认表示手动创建
@@ -541,7 +551,8 @@ const state = reactive<any>({
 		contact: '', // 联系电话
 		acceptSms: false, // 是否接收短信 默认false
 		isSecret: false, // 是否保密 默认false
-		company: '', // 工作单位
+    enterpriseName: '', // 企业名称
+    zhuanBanMingCheng: '', // 专班名称
 		no: '', // 工单编码
 		title: '', // 工单标题
 		orderType: 0, // 工单类型 默认通用工单
@@ -595,36 +606,10 @@ const route = useRoute(); // 路由
 const router = useRouter(); // 路由
 const historyParams = history.state;
 
-const links = ref<any[]>([]);
-const loadAll = () => {
-	return [
-		{ value: 'vue', link: 'https://github.com/vuejs/vue' },
-		{ value: 'element', link: 'https://github.com/ElemeFE/element' },
-		{ value: 'cooking', link: 'https://github.com/ElemeFE/cooking' },
-		{ value: 'mint-ui', link: 'https://github.com/ElemeFE/mint-ui' },
-		{ value: 'vuex', link: 'https://github.com/vuejs/vuex' },
-		{ value: 'vue-router', link: 'https://github.com/vuejs/vue-router' },
-		{ value: 'babel', link: 'https://github.com/babel/babel' },
-	];
-};
-let timeout: ReturnType<typeof setTimeout>;
-const querySearchAsync = (queryString: string, cb: (arg: any) => void) => {
-	const results = queryString ? links.value.filter(createFilter(queryString)) : links.value;
-
-	clearTimeout(timeout);
-	timeout = setTimeout(() => {
-		cb(results);
-	}, 3000 * Math.random());
-};
-const createFilter = (queryString: string) => {
-	return (restaurant: any) => {
-		return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
-	};
-};
-links.value = loadAll();
 // 选择企业
+const companySearchRef = ref<RefType>();
 const handleSelect = (item: Record<string, any>) => {
-	console.log(item);
+  companySearchRef.value.openDialog()
 };
 // 证件号码验证
 const licenceNoPattern = computed(() => {

+ 1 - 1
src/views/business/order/index.vue

@@ -232,7 +232,7 @@
 				</el-table-column>
 				<el-table-column label="操作" width="100" fixed="right" align="center">
 					<template #default="{ row }">
-						<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.status === 0" v-auth="'business:order:edit'">
+						<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="[0,1].includes(row.status)" v-auth="'business:order:edit'">
 							修改
 						</el-button>
 						<el-button link type="primary" @click="onOrderDetail(row)" title="查看工单详情" v-auth="'business:order:detail'" v-else> 详情 </el-button>

+ 1 - 1
src/views/knowledge/knowledge/index.vue

@@ -28,7 +28,7 @@
 									ref="orgRef"
 									v-loading="state.loading"
 									:filter-node-method="filterNode"
-									node-key="orgCode"
+									node-key="id"
                   :style="state.activeName === '0'? '' : 'display:none'"
 									:default-expanded-keys="state.defaultExpandedOrgKeys"
 								>

+ 3 - 2
src/views/quality/lexicon/components/Lexicon-add.vue

@@ -23,7 +23,7 @@
 				</el-col>
 				<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
 					<el-form-item label="违禁同义词" prop="synonym" :rules="[{ required: false, message: '请选择违禁同义词', trigger: 'change' }]">
-						<el-tag v-for="tag in dynamicTags" :key="tag" class="mr10" closable :disable-transitions="false" @close="handleClose(tag)">
+						<el-tag v-for="tag in dynamicTags" :key="tag" class="mr10 mb10" size="large" closable :disable-transitions="false" @close="handleClose(tag)">
 							{{ tag }}
 						</el-tag>
 						<el-input
@@ -33,8 +33,9 @@
 							@keyup.enter="handleInputConfirm"
 							@blur="handleInputConfirm"
 							style="max-width: 200px"
+              class="mb10"
 						/>
-						<el-button v-else @click="showInput"> 添加同义词 </el-button>
+						<el-button v-else @click="showInput" class="mb10"> 添加同义词 </el-button>
 					</el-form-item>
 				</el-col>
 			</el-row>

+ 3 - 2
src/views/quality/lexicon/components/Lexicon-edit.vue

@@ -23,7 +23,7 @@
 				</el-col>
 				<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
 					<el-form-item label="违禁同义词" prop="synonym" :rules="[{ required: false, message: '请选择违禁同义词', trigger: 'change' }]">
-						<el-tag v-for="tag in dynamicTags" :key="tag" class="mr10" closable :disable-transitions="false" @close="handleClose(tag)">
+						<el-tag v-for="tag in dynamicTags" :key="tag" size="large" class="mr10 mb10" closable :disable-transitions="false" @close="handleClose(tag)">
 							{{ tag }}
 						</el-tag>
 						<el-input
@@ -33,8 +33,9 @@
 							@keyup.enter="handleInputConfirm"
 							@blur="handleInputConfirm"
 							style="max-width: 200px"
+              class="mb10"
 						/>
-						<el-button v-else @click="showInput"> 添加同义词 </el-button>
+						<el-button v-else @click="showInput" class="mb10"> 添加同义词 </el-button>
 					</el-form-item>
 				</el-col>
 			</el-row>

+ 1 - 1
src/views/system/organize/component/Org-add.vue

@@ -18,7 +18,7 @@
 						<el-cascader
 							:options="state.orgData"
 							filterable
-							:props="{ checkStrictly: true, value: 'id', label: 'orgName', emitPath: false }"
+							:props="{ checkStrictly: true, value: 'id', label: 'name', emitPath: false }"
 							placeholder="请选择上级部门"
 							clearable
 							class="w100"

+ 1 - 1
src/views/system/organize/component/Org-edit.vue

@@ -17,7 +17,7 @@
 						<el-cascader
 							:options="state.orgData"
 							filterable
-							:props="{ checkStrictly: true, value: 'id', label: 'orgName', emitPath: false }"
+							:props="{ checkStrictly: true, value: 'id', label: 'name', emitPath: false }"
 							placeholder="请选择上级部门"
 							clearable
 							class="w100"

+ 2 - 2
src/views/system/user/component/User-add.vue

@@ -32,7 +32,7 @@
 						<el-cascader
 							:options="state.orgData"
 							filterable
-							:props="{ checkStrictly: true, value: 'id', label: 'orgName', emitPath: false }"
+							:props="{ checkStrictly: true, value: 'id', label: 'name', emitPath: false }"
 							placeholder="请选择所属部门"
 							clearable
 							class="w100"
@@ -144,7 +144,7 @@ const cascadeRef = ref<RefType>();
 // 获取选择组织name值
 const getKnowledgeList = () => {
 	let currentNode = cascadeRef.value.getCheckedNodes();
-	state.ruleForm.orgCode = currentNode[0]?.data.orgCode ?? '';
+	state.ruleForm.orgCode = currentNode[0]?.data.id ?? '';
 };
 // 获取分机列表
 const getTelsListFn = async (object?: object) => {

+ 2 - 2
src/views/system/user/component/User-edit.vue

@@ -32,7 +32,7 @@
 						<el-cascader
 							:options="state.OrgData"
 							filterable
-							:props="{ checkStrictly: true, value: 'id', label: 'orgName', emitPath: false }"
+							:props="{ checkStrictly: true, value: 'id', label: 'name', emitPath: false }"
 							placeholder="请选择所属部门"
 							clearable
 							class="w100"
@@ -151,7 +151,7 @@ const cascadeRef = ref<RefType>();
 // 获取选择组织name值
 const getKnowledgeList = () => {
 	let currentNode = cascadeRef.value.getCheckedNodes();
-	state.ruleForm.orgCode = currentNode[0]?.data.orgCode ?? '';
+	state.ruleForm.orgCode = currentNode[0]?.data.id ?? '';
 };
 // 获取分机列表
 const getTelsListFn = async (object?: object) => {

+ 4 - 4
src/views/system/user/index.vue

@@ -16,7 +16,7 @@
 									@node-click="handleNodeClick"
 									ref="treRef"
 									v-loading="state.loading"
-									node-key="orgCode"
+									node-key="id"
 									style="min-width: 100%; display: inline-block"
 									:filter-node-method="filterNodeOrg"
 									:default-expanded-keys="state.defaultExpandedKeys"
@@ -159,10 +159,10 @@ const getOrgListApi = () => {
 				state.orgData = res?.result ?? [];
 				state.defaultExpandedKeys = state.orgData.map((v: any) => {
 					return v.children.map((i: any) => {
-						return i.orgCode;
+						return i.id;
 					});
 				});
-				state.defaultExpandedKeys.push(state.orgData[0].orgCode); //默认展开一级部门
+				state.defaultExpandedKeys.push(state.orgData[0].id); //默认展开一级部门
 				state.loading = false;
 			})
 			.catch(() => {
@@ -203,7 +203,7 @@ const getRolesFn = () => {
 };
 // 点击节点
 const handleNodeClick = (data: any) => {
-	state.queryParams.OrgCode = data.orgCode;
+	state.queryParams.OrgCode = data.id;
 	getList();
 };
 // 打开新增用户弹窗