LiGuang 3 years ago
parent
commit
026246c708

+ 384 - 0
src/views/system/UserChange.vue

@@ -0,0 +1,384 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper" >
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24" v-if="isShow==1||isShow=='1'">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24" >
+            <a-form-item label="姓名">
+              <a-input placeholder="请输入姓名" v-model="queryParam.userName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="部门名称">
+              <j-tree-select style="width: 200px" v-model="queryParam.deptId" dict="sys_depart,depart_name,id"
+                pid-field="parent_id" placeholder="请选择部门">
+              </j-tree-select>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="状态">
+             <j-dict-select-tag  v-model="queryParam.state" placeholder="请选择类型"
+               dictCode="state" />
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+            </span>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24" v-if="isShow==2||isShow=='2'">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24" >
+            <a-form-item label="姓名">
+              <j-input placeholder="请输入姓名" v-model="queryParam2.realname"></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="类型">
+              <j-dict-select-tag  v-model="queryParam2.type" placeholder="请选择类型"
+                dictCode="change_type" />
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="状态">
+             <j-dict-select-tag  v-model="queryParam2.state" placeholder="请选择类型"
+               dictCode="state" />
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuerys()" icon="search">查询</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+
+
+      <a-tabs default-active-key="1" @change="callback">
+        <a-tab-pane key="1" tab="离职">
+    <!-- table区域-begin -->
+    <div>
+     
+
+      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
+        :pagination="ipagination" :loading="loading" class="j-table-force-nowrap"
+         @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record" v-if="record.state==0||record.state=='0'">
+          <a @click="handleEdits(record,1)">同意</a>
+          <a-divider type="vertical" />
+          <a @click="handleEdits(record,2)">拒绝</a>
+        </span>
+
+      <span slot="types" slot-scope="text, record" >
+        <a-tag  color="blue" v-if="text=='未审核'" >{{text}}</a-tag>
+        <a-tag  color="#87d068" v-if="text=='同意'" >{{text}}</a-tag>
+        <a-tag  color="#cd201f" v-if="text=='拒绝'" >{{text}}</a-tag>
+        </span>
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+</a-tab-pane>
+<a-tab-pane key="2" tab="人事变动">
+  <div>
+  
+    <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns2" :dataSource="dataSources"
+      :pagination="ipaginations" :loading="loadings" class="j-table-force-nowrap"
+      @change="handleTableChanges">
+  
+      <span slot="action" slot-scope="text, record" v-if="record.state==0||record.state=='0'">
+        <a @click="changeEdit(record,1)">同意</a>
+        <a-divider type="vertical" />
+         <a @click="changeEdit(record,2)">拒绝</a>
+      </span>
+      
+      <span slot="changeType" slot-scope="text, record" >
+        <a-tag  color="blue" v-if="text=='未审核'" >{{text}}</a-tag>
+        <a-tag  color="#87d068" v-if="text=='同意'" >{{text}}</a-tag>
+        <a-tag  color="#cd201f" v-if="text=='拒绝'" >{{text}}</a-tag>
+        </span>
+    </a-table>
+  </div>
+</a-tab-pane>
+</a-tabs>
+    <!-- 表单区域 -->
+    <userContract-modal ref="modalForm" @ok="modalFormOk"></userContract-modal>
+  </a-card>
+</template>
+
+<script>
+  import '@/assets/less/TableExpand.less'
+  import { httpAction,getAction } from '@/api/manage'
+  import UserContractModal from './modules/UserContractModal'
+  import moment from "moment"
+  import pick from 'lodash.pick'
+  import JInput from '@/components/jeecg/JInput'
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "UserContractList",
+    mixins: [JeecgListMixin],
+    components: {
+      UserContractModal,
+      JInput
+    },
+    data() {
+      return {
+        description: '人事变动',
+        dataSources:[],
+        isShow:1,
+        loadings:false,
+        queryParam:{
+          state:"0"
+        },
+        queryParam2:{
+          state:"0",
+          type:"工资调整"
+        },
+        // 表头
+        columns: [
+          {
+            title: '姓名',
+            align: "center",
+            dataIndex: 'userName'
+          },
+          {
+            title: '部门',
+            align: "center",
+            dataIndex: 'dept'
+          },
+          {
+            title: '职位',
+            align: "center",
+            dataIndex: 'post'
+          },
+          {
+            title: '预计离职日期',
+            align: "center",
+            dataIndex: 'endDate',
+            customRender: function(t, r, index) {
+              return moment(t).format('YYYY-MM-DD');
+            }
+          },
+          {
+            title: '实际离职日期',
+            align: "center",
+            dataIndex: 'newDate',
+            customRender: function(t, r, index) {
+              return moment(t).format('YYYY-MM-DD');
+            }
+          },
+          {
+            title: '备注',
+            align: "center",
+            dataIndex: 'remarks',
+            ellipsis: true,
+          },
+          {
+            title: '提交时间',
+            align: "center",
+            dataIndex: 'applyTime',
+            customRender: function(t, r, index) {
+              return moment(t).format('YYYY-MM-DD');
+            }
+          },
+          {
+            title: '状态',
+            align: "center",
+            dataIndex: 'state_dictText',
+            ellipsis: true,
+            scopedSlots: {
+              customRender: 'types'
+            },
+          },
+          
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: "center",
+            scopedSlots: {
+              customRender: 'action'
+            },
+          }
+        ],columns2: [
+          {
+            title: '姓名',
+            align: "center",
+            dataIndex: 'realname'
+          },
+          {
+            title: '类型',
+            align: "center",
+            dataIndex: 'type',
+          },
+          {
+            title: '原部门',
+            align: "center",
+            dataIndex: 'deptName'
+          },
+          {
+            title: '新部门',
+            align: "center",
+            dataIndex: 'newDeptName'
+          },
+          {
+            title: '原职位',
+            align: "center",
+            dataIndex: 'startPost'
+          },
+          {
+            title: '新职位',
+            align: "center",
+            dataIndex: 'endPost'
+          },
+          {
+            title: '原薪资',
+            align: "center",
+            dataIndex: 'startWages'
+          },
+          {
+            title: '调整后薪资',
+            align: "center",
+            dataIndex: 'endWages'
+          },
+          {
+            title: '生效日期',
+            align: "center",
+            dataIndex: 'time',
+            customRender: function(t, r, index) {
+              return moment(t).format('YYYY-MM-DD');
+            }
+          },
+          {
+            title: '备注',
+            align: "center",
+            dataIndex: 'demo',
+            ellipsis: true,
+          },
+         {
+           title: '状态',
+           align: "center",
+           dataIndex: 'state_dictText',
+           scopedSlots: {
+             customRender: 'changeType'
+           },
+         },
+         {
+           title: '操作员',
+           dataIndex: 'conmitId_dictText',
+           align: "center",
+           
+         },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: "center",
+            scopedSlots: {
+              customRender: 'action'
+            },
+          }
+        ],
+        ipaginations:{
+          current: 1,
+          pageSize: 20,
+          pageSizeOptions: ['10', '20', '30'],
+          showTotal: (total, range) => {
+            return range[0] + "-" + range[1] + " 共" + total + "条"
+          },
+          showQuickJumper: true,
+          showSizeChanger: true,
+          total: 0
+        },
+        url: {
+          list: "/userquit/userQuit/list",
+          list2: "/userchange/userChage/list",
+          delete: "/usercontract/userContract/delete",
+          deleteBatch: "/usercontract/userContract/deleteBatch",
+          exportXlsUrl: "usercontract/userContract/exportXls",
+          importExcelUrl: "usercontract/userContract/importExcel",
+          update:"/userquit/userQuit/edit",
+          updateChage:"/userchange/userChage/edit"
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function() {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+        handleEdits(e,a){
+        let formData = Object.assign({},e);
+        formData.state=a;
+        httpAction(this.url.update,formData,"put").then((res)=>{
+          if(res.success){
+            this.$message.success(res.message);
+          }else{
+            this.$message.warning(res.message);
+          }
+        }).finally(() => {
+          this.$options.methods.searchQuery.call(this)
+        })
+      },
+      callback(key) {
+        this.isShow=key;
+        if(key==1||key=='1'){
+          this.$options.methods.searchQuery.call(this)
+        }else if(key==2||key=='2'){
+          this.querys()
+        }
+      },
+      querys(){
+        this.loadings=true;
+        let param = Object.assign({},this.queryParam2);
+        param.pageNo = this.ipaginations.current;
+        param.pageSize = this.ipaginations.pageSize;
+        getAction(this.url.list2,param).then((res)=>{
+          if(res.success){
+           this.dataSources = res.result.records||res.result;
+           if(res.result.total)
+           {
+             this.ipaginations.total = res.result.total;
+           }else{
+             this.ipaginations.total = 0;
+           }
+          }
+        }).finally(() => {
+          this.loadings=false;
+        })
+      },
+      searchQuerys(){
+        this.querys();
+      },
+      changeEdit(e,a){
+        this.loadings=true;
+        let formData = Object.assign({},e);
+        formData.state=a;
+        httpAction(this.url.updateChage,formData,"put").then((res)=>{
+          if(res.success){
+            this.$message.success(res.message);
+          }else{
+            this.$message.warning(res.message);
+          }
+        }).finally(() => {
+          this.loadings=false;
+          this.querys();
+        })
+      },
+      handleTableChanges(pagination, filters, sorter) {
+        //分页、排序、筛选变化时触发
+        //TODO 筛选
+        this.ipagination = pagination;
+        this.querys();
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 210 - 0
src/views/system/UserContractList.vue

@@ -0,0 +1,210 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="姓名">
+              <a-input placeholder="请输入姓名" v-model="queryParam.realname"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="合同类型">
+              <j-dict-select-tag v-model="queryParam.contractType"  placeholder="请选择合同类型"
+                dictCode="contract_type" />
+             
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="部门名称">
+                <j-tree-select style="width: 200px" v-model="queryParam.deptId" dict="sys_depart,depart_name,id"
+                  pid-field="parent_id" placeholder="请选择部门">
+                </j-tree-select>
+              </a-form-item>
+            </a-col>
+            <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="开始时间">
+              <a-input placeholder="请输入开始时间" v-model="queryParam.startDate"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="结束时间">
+              <a-input placeholder="请输入结束时间" v-model="queryParam.endDate"></a-input>
+            </a-form-item>
+          </a-col> -->
+          </template>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+              </a>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('员工合同')">导出</a-button>
+      <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
+        @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel">
+            <a-icon type="delete" />删除
+          </a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作
+          <a-icon type="down" />
+        </a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
+          style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
+        :pagination="ipagination" :loading="loading" class="j-table-force-nowrap"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多
+              <a-icon type="down" />
+            </a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <userContract-modal ref="modalForm" @ok="modalFormOk"></userContract-modal>
+  </a-card>
+</template>
+
+<script>
+  import '@/assets/less/TableExpand.less'
+  import UserContractModal from './modules/UserContractModal'
+  import moment from "moment"
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "UserContractList",
+    mixins: [JeecgListMixin],
+    components: {
+      UserContractModal
+    },
+    data() {
+      return {
+        description: '员工合同管理页面',
+        // 表头
+        columns: [
+          {
+            title: '姓名',
+            align: "center",
+            dataIndex: 'realname'
+          },
+          {
+            title: '一级部门',
+            align: "center",
+            dataIndex: 'deptName'
+          },
+          {
+            title: '二级部门',
+            align: "center",
+            dataIndex: 'deptName1'
+          },
+          {
+            title: '三级部门',
+            align: "center",
+            dataIndex: 'deptName2'
+          },
+          {
+            title: '合同类型',
+            align: "center",
+            dataIndex: 'contractType_dictText'
+          },
+          {
+            title: '开始时间',
+            align: "center",
+            dataIndex: 'startDate',
+            customRender: function(t, r, index) {
+              return moment(t).format('YYYY-MM-DD');
+            }
+          },
+          {
+            title: '结束时间',
+            align: "center",
+            dataIndex: 'endDate',
+            customRender: function(t, r, index) {
+              return moment(t).format('YYYY-MM-DD');
+            }
+          },
+          {
+            title: '操作员',
+            dataIndex: 'createBy_dictText',
+            align: "center",
+           
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: "center",
+            scopedSlots: {
+              customRender: 'action'
+            },
+          }
+        ],
+        url: {
+          list: "/usercontract/userContract/list",
+          delete: "/usercontract/userContract/delete",
+          deleteBatch: "/usercontract/userContract/deleteBatch",
+          exportXlsUrl: "usercontract/userContract/exportXls",
+          importExcelUrl: "usercontract/userContract/importExcel",
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function() {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 224 - 0
src/views/system/modules/UserContractModal.vue

@@ -0,0 +1,224 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+       <a-form-item
+         :labelCol="labelCol"
+         :wrapperCol="wrapperCol"
+         label="员工姓名">
+         <a-input placeholder="请输入员工姓名" v-decorator="['realname', validatorRules.realname ]" />
+       </a-form-item>
+       <a-form-item
+         :labelCol="labelCol"
+         :wrapperCol="wrapperCol"
+         label="部门名称">
+         <a-input placeholder="请输入部门名称" v-decorator="['deptNames', validatorRules.deptname ]" />
+       </a-form-item>
+       <a-form-item
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="合同类型">
+          <j-dict-select-tag v-decorator="['contractType', validatorRules.type]" :triggerChange="true" placeholder="请选择合同类型"
+            dictCode="contract_type" />
+          
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="开始时间">
+          <a-date-picker showTime format='YYYY-MM-DD' v-decorator="[ 'startDate', validatorRules.startDate]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="结束时间">
+          <a-date-picker showTime format='YYYY-MM-DD' v-decorator="[ 'endDate', validatorRules.endDate]" />
+        </a-form-item>
+		
+      </a-form>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+  import { httpAction,getAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+
+  export default {
+    name: "UserContractModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        userid:"",
+        deptid:"",
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+          realname:{rules: [{ required: true, message: '请输入员工名称!' },{
+                validator: this.validateRealname
+              }]},
+          deptname:{rules: [{ required: true, message: '请输入部门名称!' },
+          ]},
+          type:{rules: [{ required: true, message: '请选择合同类型' }]},
+          startDate:{rules: [{ required: true, message: '请选择合同开始日期' }]},
+          endDate:{rules: [{ required: true, message: '请选择合同结束日期' }]},
+        },
+        url: {
+          add: "/usercontract/userContract/add",
+          edit: "/usercontract/userContract/edit",
+          dept:"/sys/user/queryUsersByusername"
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.deptid=record.deptId;
+        this.userid=record.userId;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'realname','contractType','deptNames'))
+		  //时间格式化
+          this.form.setFieldsValue({startDate:this.model.startDate?moment(this.model.startDate):null})
+          this.form.setFieldsValue({endDate:this.model.endDate?moment(this.model.endDate):null})
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if(this.userid==null||this.userid==""){
+            this.form.setFieldsValue({
+              realname:""
+            })
+             that.$message.warning("未查询到此员工!");
+             return;
+          }else if(this.deptid==null||this.deptid==""){
+            this.form.setFieldsValue({
+              deptNames:""
+            })
+             that.$message.warning("员工对应部门不存在!");
+             return;
+          }
+          
+          
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            formData.userId=this.userid;
+            formData.deptId=this.deptid;
+            //时间格式化
+            formData.startDate = formData.startDate?formData.startDate.format('YYYY-MM-DD HH:mm:ss'):null;
+            formData.endDate = formData.endDate?formData.endDate.format('YYYY-MM-DD HH:mm:ss'):null;
+            
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
+
+
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+      validateRealname(rule, value, callback) {
+        if (!value) {
+          callback()
+        } else {
+          this.queryDeptName(value);
+          callback()
+        }
+      },
+      queryDeptName(e){
+        getAction(this.url.dept,{realname:e}).then((res)=>{
+          if(res.success){
+            if(res.result.length>0){
+              var list=res.result;
+              this.userid= list[0].id;
+              var deptids=[];
+              var deptname=[];
+              for(var i=0;i<list.length;i++){
+                deptids.push(list[i].deptid);
+                deptname.push(list[i].deptname);
+              }
+              this.deptid=deptids.join(",");
+              this.form.setFieldsValue({
+                deptNames:deptname.join(",")
+              })
+            }else{
+              this.userid="";
+              this.deptid="";
+              this.form.setFieldsValue({
+                deptNames:""
+              })
+            }
+          
+          
+          }
+        }).finally(() => {
+         
+        })
+      }
+      
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>