Browse Source

根据字典表修改代码

develop
ljlong_2630 1 year ago
parent
commit
596ee17611
  1. 2
      src/views/model/heatapiconf/index.vue
  2. 8
      src/views/system/dept/index.vue

2
src/views/model/heatapiconf/index.vue

@ -470,7 +470,7 @@ const calculateTableHeight = () => {
function getDeptTreeNew(data) { function getDeptTreeNew(data) {
const result = []; const result = [];
data.forEach(item => { data.forEach(item => {
if (item.orgType === '2') { if (item.orgType === '1003') {
const newItem = { ...item }; // 使 const newItem = { ...item }; // 使
newItem.children = []; // children newItem.children = []; // children
newItem.isLeaf = false; newItem.isLeaf = false;

8
src/views/system/dept/index.vue

@ -32,7 +32,7 @@
<el-form-item label="类别" prop="orgType"> <el-form-item label="类别" prop="orgType">
<el-select v-model="queryParams.orgType" placeholder="部门类别" clearable style="width: 240px"> <el-select v-model="queryParams.orgType" placeholder="部门类别" clearable style="width: 240px">
<el-option <el-option
v-for="dict in sys_org_type" v-for="dict in dc_dept_attr"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -78,7 +78,7 @@
<el-table-column prop="allName" label="全名" width="100"></el-table-column> <el-table-column prop="allName" label="全名" width="100"></el-table-column>
<el-table-column prop="orgType" label="类型" width="100"> <el-table-column prop="orgType" label="类型" width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :options="sys_org_type" :value="scope.row.orgType" /> <dict-tag :options="dc_dept_attr" :value="scope.row.orgType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderNum" label="排序" width="100"></el-table-column> <el-table-column prop="orderNum" label="排序" width="100"></el-table-column>
@ -131,7 +131,7 @@
<el-form-item label="类别" prop="orgType"> <el-form-item label="类别" prop="orgType">
<el-select v-model="form.orgType" placeholder="部门类别" clearable style="width: 240px"> <el-select v-model="form.orgType" placeholder="部门类别" clearable style="width: 240px">
<el-option <el-option
v-for="dict in sys_org_type" v-for="dict in dc_dept_attr"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -186,7 +186,7 @@
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept"; import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { sys_normal_disable,sys_org_type } = proxy.useDict("sys_normal_disable","sys_org_type"); const { sys_normal_disable,dc_dept_attr } = proxy.useDict("sys_normal_disable","dc_dept_attr");
const deptList = ref([]); const deptList = ref([]);
const open = ref(false); const open = ref(false);

Loading…
Cancel
Save