Sfoglia il codice sorgente

1、机构SysOrg增加“机构类型”。
2、用户SysUser增加一些常用属性字段。

13728789855 3 anni fa
parent
commit
5b1a260563

+ 7 - 0
Admin.NET/Admin.NET.Core/Entity/SysOrg.cs

@@ -27,6 +27,13 @@ public class SysOrg : EntityTenant
     [MaxLength(64)]
     public string? Code { get; set; }
 
+    /// <summary>
+    /// 机构类型
+    /// </summary>
+    [SugarColumn(ColumnDescription = "机构类型", Length = 64)]
+    [MaxLength(64)]
+    public string? OrgType { get; set; }
+
     /// <summary>
     /// 排序
     /// </summary>

+ 30 - 2
Admin.NET/Admin.NET.Core/Entity/SysUser.cs

@@ -173,8 +173,8 @@ public class SysUser : EntityTenant
     /// <summary>
     /// 备注
     /// </summary>
-    [SugarColumn(ColumnDescription = "备注", Length = 128)]
-    [MaxLength(128)]
+    [SugarColumn(ColumnDescription = "备注", Length = 256)]
+    [MaxLength(256)]
     public string? Remark { get; set; }
 
     /// <summary>
@@ -223,6 +223,34 @@ public class SysUser : EntityTenant
     [MaxLength(32)]
     public string? PosLevel { get; set; }
 
+    /// <summary>
+    /// 职称
+    /// </summary>
+    [SugarColumn(ColumnDescription = "职称", Length = 32)]
+    [MaxLength(32)]
+    public string? PosTitle { get; set; }
+
+    /// <summary>
+    /// 擅长领域
+    /// </summary>
+    [SugarColumn(ColumnDescription = "擅长领域", Length = 32)]
+    [MaxLength(32)]
+    public string? Expertise { get; set; }
+
+    /// <summary>
+    /// 办公区域
+    /// </summary>
+    [SugarColumn(ColumnDescription = "办公区域", Length = 32)]
+    [MaxLength(32)]
+    public string? OfficeZone { get; set; }
+
+    /// <summary>
+    /// 办公室
+    /// </summary>
+    [SugarColumn(ColumnDescription = "办公室", Length = 32)]
+    [MaxLength(32)]
+    public string? Office { get; set; }
+
     /// <summary>
     /// 入职日期
     /// </summary>

+ 6 - 0
Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs

@@ -59,6 +59,12 @@ public class SysDictDataSeedData : ISqlSugarEntitySeedData<SysDictData>
             new SysDictData{ Id=1300000000503, DictTypeId=1300000000105, Value="EntityTenantId【租户实体Id】", Code="EntityTenantId", OrderNo=1, Remark="【租户实体Id】", Status=StatusEnum.Disable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
             new SysDictData{ Id=1300000000504, DictTypeId=1300000000105, Value="EntityTenant【租户实体】", Code="EntityTenant", OrderNo=1, Remark="【租户实体】", Status=StatusEnum.Disable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
             new SysDictData{ Id=1300000000505, DictTypeId=1300000000105, Value="EntityBaseData【业务实体】", Code="EntityBaseData", OrderNo=1, Remark="【业务实体】", Status=StatusEnum.Disable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+
+            new SysDictData{ Id=1300000000601, DictTypeId=1300000000106, Value="总公司", Code="1", OrderNo=1, Remark="总公司", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
+            new SysDictData{ Id=1300000000602, DictTypeId=1300000000106, Value="区域分公司", Code="2", OrderNo=2, Remark="区域分公司", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
+            new SysDictData{ Id=1300000000603, DictTypeId=1300000000106, Value="直营门店", Code="3", OrderNo=3, Remark="直营门店", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
+            new SysDictData{ Id=1300000000604, DictTypeId=1300000000106, Value="加盟门店", Code="4", OrderNo=4, Remark="加盟门店", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
+            new SysDictData{ Id=1300000000605, DictTypeId=1300000000106, Value="代理商", Code="5", OrderNo=5, Remark="代理商", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
         };
     }
 }

+ 1 - 0
Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs

@@ -19,6 +19,7 @@ public class SysDictTypeSeedData : ISqlSugarEntitySeedData<SysDictType>
             new SysDictType{ Id=1300000000103, Name="代码生成.NET类型", Code="code_gen_net_type", OrderNo=100, Remark="代码生成.NET类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
             new SysDictType{ Id=1300000000104, Name="代码生成方式", Code="code_gen_create_type", OrderNo=100, Remark="代码生成方式", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
             new SysDictType{ Id=1300000000105, Name="代码生成基类", Code="code_gen_base_class", OrderNo=100, Remark="代码生成基类", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+            new SysDictType{ Id=1300000000106, Name="机构类型", Code="org_type", OrderNo=100, Remark="机构类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
         };
     }
 }

+ 3 - 3
Admin.NET/Admin.NET.Core/SeedData/SysOrgSeedData.cs

@@ -14,19 +14,19 @@ public class SysOrgSeedData : ISqlSugarEntitySeedData<SysOrg>
     {
         return new[]
         {
-            new SysOrg{ Id=1300000000101, Pid=0, Name="大名科技", Code="1001", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="大名科技", TenantId=1300000000001 },
+            new SysOrg{ Id=1300000000101, Pid=0, Name="大名科技", Code="1001", OrgType = "1", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="大名科技", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000102, Pid=1300000000101, Name="市场部", Code="100101", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000103, Pid=1300000000101, Name="研发部", Code="100102", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="研发部", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000104, Pid=1300000000101, Name="财务部", Code="100103", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000105, Pid=1300000000104, Name="财务部1", Code="10010301", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部1", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000106, Pid=1300000000104, Name="财务部2", Code="10010302", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部2", TenantId=1300000000001 },
 
-            new SysOrg{ Id=1300000000201, Pid=0, Name="分公司1", Code="1002", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="分公司1", TenantId=1300000000001 },
+            new SysOrg{ Id=1300000000201, Pid=0, Name="分公司1", Code="1002", OrgType = "2", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="分公司1", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000202, Pid=1300000000201, Name="市场部", Code="100201", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000203, Pid=1300000000201, Name="研发部", Code="100202", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="研发部", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000204, Pid=1300000000201, Name="财务部", Code="100203", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部", TenantId=1300000000001 },
 
-            new SysOrg{ Id=1300000000301, Pid=0, Name="分公司2", Code="1003", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="分公司2", TenantId=1300000000001 },
+            new SysOrg{ Id=1300000000301, Pid=0, Name="分公司2", Code="1003", OrgType = "2", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="分公司2", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000302, Pid=1300000000301, Name="市场部", Code="100301", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000303, Pid=1300000000301, Name="研发部", Code="100302", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 },
             new SysOrg{ Id=1300000000304, Pid=1300000000301, Name="财务部", Code="100303", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=1300000000001 },

+ 5 - 0
Admin.NET/Admin.NET.Core/Service/Org/Dto/OrgInput.cs

@@ -11,6 +11,11 @@ public class OrgInput : BaseIdInput
     /// 编码
     /// </summary>
     public string Code { get; set; }
+
+    /// <summary>
+    /// 机构类型
+    /// </summary>
+    public string OrgType { get; set; }
 }
 
 public class AddOrgInput : SysOrg

+ 2 - 1
Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs

@@ -40,11 +40,12 @@ public class SysOrgService : IDynamicApiController, ITransient
         var iSugarQueryable = _sysOrgRep.AsQueryable().OrderBy(u => u.OrderNo);
 
         // 条件筛选可能造成无法构造树(列表数据)
-        if (!string.IsNullOrWhiteSpace(input.Name) || !string.IsNullOrWhiteSpace(input.Code))
+        if (!string.IsNullOrWhiteSpace(input.Name) || !string.IsNullOrWhiteSpace(input.Code) || !string.IsNullOrWhiteSpace(input.OrgType))
         {
             return await iSugarQueryable.WhereIF(orgIdList.Count > 0, u => orgIdList.Contains(u.Id))
                 .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name))
                 .WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => u.Code.Contains(input.Code))
+                .WhereIF(!string.IsNullOrWhiteSpace(input.OrgType), u => u.OrgType.Contains(input.OrgType))
                 .ToListAsync();
         }
 

+ 15 - 7
Web/src/api-services/apis/sys-org-api.ts

@@ -115,10 +115,11 @@ export const SysOrgApiAxiosParamCreator = function (configuration?: Configuratio
          * @param {number} id 主键Id
          * @param {string} [name] 名称
          * @param {string} [code] 编码
+         * @param {string} [orgType] 机构类型
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        apiSysOrgListGet: async (id: number, name?: string, code?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+        apiSysOrgListGet: async (id: number, name?: string, code?: string, orgType?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
             // verify required parameter 'id' is not null or undefined
             if (id === null || id === undefined) {
                 throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysOrgListGet.');
@@ -144,6 +145,10 @@ export const SysOrgApiAxiosParamCreator = function (configuration?: Configuratio
                 localVarQueryParameter['Code'] = code;
             }
 
+            if (orgType !== undefined) {
+                localVarQueryParameter['OrgType'] = orgType;
+            }
+
             if (id !== undefined) {
                 localVarQueryParameter['Id'] = id;
             }
@@ -248,11 +253,12 @@ export const SysOrgApiFp = function(configuration?: Configuration) {
          * @param {number} id 主键Id
          * @param {string} [name] 名称
          * @param {string} [code] 编码
+         * @param {string} [orgType] 机构类型
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async apiSysOrgListGet(id: number, name?: string, code?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysOrg>>> {
-            const localVarAxiosArgs = await SysOrgApiAxiosParamCreator(configuration).apiSysOrgListGet(id, name, code, options);
+        async apiSysOrgListGet(id: number, name?: string, code?: string, orgType?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysOrg>>> {
+            const localVarAxiosArgs = await SysOrgApiAxiosParamCreator(configuration).apiSysOrgListGet(id, name, code, orgType, options);
             return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                 const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                 return axios.request(axiosRequestArgs);
@@ -307,11 +313,12 @@ export const SysOrgApiFactory = function (configuration?: Configuration, basePat
          * @param {number} id 主键Id
          * @param {string} [name] 名称
          * @param {string} [code] 编码
+         * @param {string} [orgType] 机构类型
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async apiSysOrgListGet(id: number, name?: string, code?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysOrg>> {
-            return SysOrgApiFp(configuration).apiSysOrgListGet(id, name, code, options).then((request) => request(axios, basePath));
+        async apiSysOrgListGet(id: number, name?: string, code?: string, orgType?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysOrg>> {
+            return SysOrgApiFp(configuration).apiSysOrgListGet(id, name, code, orgType, options).then((request) => request(axios, basePath));
         },
         /**
          * 
@@ -361,12 +368,13 @@ export class SysOrgApi extends BaseAPI {
      * @param {number} id 主键Id
      * @param {string} [name] 名称
      * @param {string} [code] 编码
+     * @param {string} [orgType] 机构类型
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysOrgApi
      */
-    public async apiSysOrgListGet(id: number, name?: string, code?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysOrg>> {
-        return SysOrgApiFp(this.configuration).apiSysOrgListGet(id, name, code, options).then((request) => request(this.axios, this.basePath));
+    public async apiSysOrgListGet(id: number, name?: string, code?: string, orgType?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysOrg>> {
+        return SysOrgApiFp(this.configuration).apiSysOrgListGet(id, name, code, orgType, options).then((request) => request(this.axios, this.basePath));
     }
     /**
      * 

+ 6 - 0
Web/src/api-services/models/add-org-input.ts

@@ -73,6 +73,12 @@ export interface AddOrgInput {
      * @memberof AddOrgInput
      */
     code?: string | null;
+    /**
+     * 机构类型
+     * @type {string}
+     * @memberof AddOrgInput
+     */
+    orgType?: string | null;
     /**
      * 排序
      * @type {number}

+ 24 - 0
Web/src/api-services/models/add-user-input.ts

@@ -241,6 +241,30 @@ export interface AddUserInput {
      * @memberof AddUserInput
      */
     posLevel?: string | null;
+    /**
+     * 职称
+     * @type {string}
+     * @memberof AddUserInput
+     */
+    posTitle?: string | null;
+    /**
+     * 擅长领域
+     * @type {string}
+     * @memberof AddUserInput
+     */
+    expertise?: string | null;
+    /**
+     * 办公区域
+     * @type {string}
+     * @memberof AddUserInput
+     */
+    officeZone?: string | null;
+    /**
+     * 办公室
+     * @type {string}
+     * @memberof AddUserInput
+     */
+    office?: string | null;
     /**
      * 入职日期
      * @type {Date}

+ 6 - 0
Web/src/api-services/models/sys-org.ts

@@ -79,6 +79,12 @@ export interface SysOrg {
      * @memberof SysOrg
      */
     code?: string | null;
+    /**
+     * 机构类型
+     * @type {string}
+     * @memberof SysOrg
+     */
+    orgType?: string | null;
     /**
      * 排序
      * @type {number}

+ 24 - 0
Web/src/api-services/models/sys-user.ts

@@ -252,6 +252,30 @@ export interface SysUser {
      * @memberof SysUser
      */
     posLevel?: string | null;
+    /**
+     * 职称
+     * @type {string}
+     * @memberof SysUser
+     */
+    posTitle?: string | null;
+    /**
+     * 擅长领域
+     * @type {string}
+     * @memberof SysUser
+     */
+    expertise?: string | null;
+    /**
+     * 办公区域
+     * @type {string}
+     * @memberof SysUser
+     */
+    officeZone?: string | null;
+    /**
+     * 办公室
+     * @type {string}
+     * @memberof SysUser
+     */
+    office?: string | null;
     /**
      * 入职日期
      * @type {Date}

+ 6 - 0
Web/src/api-services/models/update-org-input.ts

@@ -73,6 +73,12 @@ export interface UpdateOrgInput {
      * @memberof UpdateOrgInput
      */
     code?: string | null;
+    /**
+     * 机构类型
+     * @type {string}
+     * @memberof UpdateOrgInput
+     */
+    orgType?: string | null;
     /**
      * 排序
      * @type {number}

+ 24 - 0
Web/src/api-services/models/update-user-input.ts

@@ -241,6 +241,30 @@ export interface UpdateUserInput {
      * @memberof UpdateUserInput
      */
     posLevel?: string | null;
+    /**
+     * 职称
+     * @type {string}
+     * @memberof UpdateUserInput
+     */
+    posTitle?: string | null;
+    /**
+     * 擅长领域
+     * @type {string}
+     * @memberof UpdateUserInput
+     */
+    expertise?: string | null;
+    /**
+     * 办公区域
+     * @type {string}
+     * @memberof UpdateUserInput
+     */
+    officeZone?: string | null;
+    /**
+     * 办公室
+     * @type {string}
+     * @memberof UpdateUserInput
+     */
+    office?: string | null;
     /**
      * 入职日期
      * @type {Date}

+ 15 - 2
Web/src/views/system/org/component/editOrg.vue

@@ -36,6 +36,13 @@
 							<el-input v-model="state.ruleForm.code" placeholder="机构编码" clearable />
 						</el-form-item>
 					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="机构类型" prop="orgType">
+							<el-select v-model="state.ruleForm.orgType" filterable clearable class="w100">
+								<el-option v-for="item in state.orgTypeList" :key="item.value" :label="item.value" :value="item.code" />
+							</el-select>
+						</el-form-item>
+					</el-col>
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
 						<el-form-item label="排序">
 							<el-input-number v-model="state.ruleForm.orderNo" placeholder="排序" class="w100" />
@@ -67,11 +74,11 @@
 </template>
 
 <script lang="ts" setup name="sysEditOrg">
-import { reactive, ref } from 'vue';
+import {onMounted, reactive, ref } from 'vue';
 import mittBus from '/@/utils/mitt';
 
 import { getAPI } from '/@/utils/axios-utils';
-import { SysOrgApi } from '/@/api-services/api';
+import { SysOrgApi, SysDictDataApi } from '/@/api-services/api';
 import { SysOrg, UpdateOrgInput } from '/@/api-services/models';
 
 const props = defineProps({
@@ -83,6 +90,12 @@ const ruleFormRef = ref();
 const state = reactive({
 	isShowDialog: false,
 	ruleForm: {} as UpdateOrgInput,
+	orgTypeList: [] as any,
+});
+
+onMounted(async () => {
+	let resDicData = await getAPI(SysDictDataApi).apiSysDictDataDataListCodeGet('org_type');
+	state.orgTypeList = resDicData.data.result;
 });
 
 // 打开弹窗

+ 29 - 4
Web/src/views/system/org/index.vue

@@ -14,6 +14,11 @@
 						<el-form-item label="机构编码" prop="code">
 							<el-input placeholder="机构编码" clearable @keyup.enter="handleQuery" v-model="state.queryParams.code" />
 						</el-form-item>
+						<el-form-item label="机构类型" prop="orgType">
+							<el-select v-model="state.queryParams.orgType" filterable clearable class="w100">
+								<el-option v-for="item in state.orgTypeList" :key="item.value" :label="item.value" :value="item.code" />
+							</el-select>
+						</el-form-item>
 						<el-form-item>
 							<el-button-group>
 								<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysOrg:list'"> 查询 </el-button>
@@ -30,6 +35,7 @@
 					<el-table :data="state.orgData" style="width: 100%" v-loading="state.loading" row-key="id" default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" border>
 						<el-table-column prop="name" label="机构名称" show-overflow-tooltip />
 						<el-table-column prop="code" label="机构编码" show-overflow-tooltip />
+						<el-table-column prop="orgType" label="机构类型" :formatter="dictFormatter" show-overflow-tooltip />
 						<el-table-column prop="orderNo" label="排序" width="70" align="center" show-overflow-tooltip />
 						<el-table-column label="状态" width="70" align="center" show-overflow-tooltip>
 							<template #default="scope">
@@ -61,7 +67,7 @@ import OrgTree from '/@/views/system/org/component/orgTree.vue';
 import EditOrg from '/@/views/system/org/component/editOrg.vue';
 
 import { getAPI } from '/@/utils/axios-utils';
-import { SysOrgApi } from '/@/api-services/api';
+import { SysOrgApi, SysDictDataApi } from '/@/api-services/api';
 import { SysOrg } from '/@/api-services/models';
 
 const editOrgRef = ref<InstanceType<typeof EditOrg>>();
@@ -74,11 +80,13 @@ const state = reactive({
 		id: -1,
 		name: undefined,
 		code: undefined,
+		orgType: undefined,
 	},
 	editOrgTitle: '',
+	orgTypeList: [] as any,
 });
 
-onMounted(() => {
+onMounted(async () => {
 	handleQuery();
 
 	mittBus.on('submitRefresh', async () => {
@@ -87,6 +95,9 @@ onMounted(() => {
 		// 编辑删除后更新机构数据
 		orgTreeRef.value?.initTreeData();
 	});
+
+	let resDicData = await getAPI(SysDictDataApi).apiSysDictDataDataListCodeGet('org_type');
+	state.orgTypeList = resDicData.data.result;
 });
 
 onUnmounted(() => {
@@ -96,12 +107,12 @@ onUnmounted(() => {
 // 查询操作
 const handleQuery = async () => {
 	state.loading = true;
-	var res = await getAPI(SysOrgApi).apiSysOrgListGet(state.queryParams.id, state.queryParams.name, state.queryParams.code);
+	var res = await getAPI(SysOrgApi).apiSysOrgListGet(state.queryParams.id, state.queryParams.name, state.queryParams.code, state.queryParams.orgType);
 	state.orgData = res.data.result ?? [];
 	state.loading = false;
 
 	// 若无选择节点并且查询条件为空时
-	if (state.queryParams.id == -1 && state.queryParams.name == undefined && state.queryParams.code == undefined) state.orgTreeData = state.orgData;
+	if (state.queryParams.id == -1 && state.queryParams.name == undefined && state.queryParams.code == undefined && state.queryParams.orgType == undefined) state.orgTreeData = state.orgData;
 };
 
 // 重置操作
@@ -109,6 +120,7 @@ const resetQuery = () => {
 	state.queryParams.id = -1;
 	state.queryParams.name = undefined;
 	state.queryParams.code = undefined;
+	state.queryParams.orgType = undefined;
 	handleQuery();
 };
 
@@ -144,6 +156,19 @@ const nodeClick = async (node: any) => {
 	state.queryParams.id = node.id;
 	state.queryParams.name = undefined;
 	state.queryParams.code = undefined;
+	state.queryParams.orgType = undefined;
 	handleQuery();
 };
+
+//字典转换
+const dictFormatter = (row: any, column: any, cellValue: any) => {
+	var ret = "";
+      state.orgTypeList.forEach(function (item: any, index: any) {
+        if (cellValue == item.code) {
+          ret = item.value;
+        }
+      });
+      return ret;
+}
+
 </script>