linweizeng преди 2 години
родител
ревизия
96d95fa73c

+ 8 - 7
src/views/platform/org/employee/edit/index.vue

@@ -34,7 +34,7 @@
                     @input="data => employee.attrItemList = data"
                     @input="data => employee.attrItemList = data"
                 />
                 />
             </el-tab-pane>
             </el-tab-pane>
-            <el-tab-pane
+            <!-- <el-tab-pane
                 v-if="!infoIncludes('org-info')"
                 v-if="!infoIncludes('org-info')"
                 label="组织信息"
                 label="组织信息"
                 name="org-info"
                 name="org-info"
@@ -47,9 +47,10 @@
                     :groupID="employee.groupID"
                     :groupID="employee.groupID"
                     @input="data => employee.orgItem = data"
                     @input="data => employee.orgItem = data"
                 />
                 />
-            </el-tab-pane>
+            </el-tab-pane> -->
 
 
-            <!-- <el-tab-pane label="岗位信息" name="position-info">
+            <!-- 原岗位 -->
+            <el-tab-pane label="部门信息" name="position-info">
                 <position-info
                 <position-info
                     ref="positionInfo"
                     ref="positionInfo"
                     :span="span"
                     :span="span"
@@ -58,7 +59,7 @@
                     :data="employee.posItemList"
                     :data="employee.posItemList"
                     @input="data => employee.posItemList = data"
                     @input="data => employee.posItemList = data"
                 />
                 />
-            </el-tab-pane> -->
+            </el-tab-pane>
             <el-tab-pane v-if="!infoIncludes('role-info')"  label="角色信息" name="role-info">
             <el-tab-pane v-if="!infoIncludes('role-info')"  label="角色信息" name="role-info">
                 <!-- <span slot="label">角色信息
                 <!-- <span slot="label">角色信息
                     <el-tooltip
                     <el-tooltip
@@ -307,9 +308,9 @@
                 this.activeName = 'basic-info'
                 this.activeName = 'basic-info'
                 this.employee = this.$utils.newData(this.defaultEmployee)
                 this.employee = this.$utils.newData(this.defaultEmployee)
                 this.$nextTick(() => {
                 this.$nextTick(() => {
-                    if (this.$refs.orgInfo) {
-                        this.$refs.orgInfo.init()
-                    }
+                    // if (this.$refs.orgInfo) {
+                    //     this.$refs.orgInfo.init()
+                    // }
                     // this.$refs.positionInfo.init()
                     // this.$refs.positionInfo.init()
                     if (this.$refs.roleInfo) {
                     if (this.$refs.roleInfo) {
                         this.$refs.roleInfo.init()
                         this.$refs.roleInfo.init()

+ 8 - 4
src/views/platform/org/employee/edit/position-info.vue

@@ -34,14 +34,14 @@
         border
         border
       >
       >
         <el-table-column
         <el-table-column
-          label="岗位名称"
+          label="部门名称"
         >
         >
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span style="margin-left: 10px">{{ scope.row.name }}</span>
             <span style="margin-left: 10px">{{ scope.row.name }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
-          label="是否主岗位"
+          label="是否主部门"
           width="100"
           width="100"
         >
         >
           <template slot-scope="scope">
           <template slot-scope="scope">
@@ -111,7 +111,8 @@ export default {
       treeData: [],
       treeData: [],
       posItemList: [],
       posItemList: [],
       height: document.clientHeight,
       height: document.clientHeight,
-      checkStrictly: true
+      checkStrictly: true,
+      defaultTreeData: []
     }
     }
   },
   },
   computed: {
   computed: {
@@ -169,7 +170,10 @@ export default {
         this.loading = false
         this.loading = false
         const arr = JSON.parse(JSON.stringify(res.data))
         const arr = JSON.parse(JSON.stringify(res.data))
         const treeData = this.toTree(arr)
         const treeData = this.toTree(arr)
-        if (treeData[0].id === '0') { treeData[0].disabled = true } // 根节点不能选择
+        if (treeData[0].id === '0') {
+          treeData[0].name = '部门树'
+          treeData[0].disabled = true
+        } // 根节点不能选择
         resolve(treeData)
         resolve(treeData)
       }).catch(res => {
       }).catch(res => {
         this.loading = false
         this.loading = false

+ 51 - 21
src/views/platform/org/employee/list.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
     <ibps-container type="full" class="page">
     <ibps-container type="full" class="page">
-        <ibps-crud ref="crud" style="width: 100%" :height="height" :data="listData" :toolbars="listConfig.toolbars" :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns" :row-handle="listConfig.rowHandle" :pagination="pagination" :loading="loading" display-field="用户管理" :display-field-data="listConfig.displayFieldData" @display-field-change="handleDisplayField" @header-dragend="handleHeaderDragend" @action-event="handleAction" @sort-change="handleSortChange" @pagination-change="handlePaginationChange" />
+        <ibps-crud ref="crud" style="width: 100%" :height="height" :data="listData" :toolbars="listConfig.toolbars" :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns" :row-handle="listConfig.rowHandle" :pagination="pagination" :loading="loading" display-field="用户管理" :display-field-data="listConfig.displayFieldData" @display-field-change="handleDisplayField" @header-dragend="handleHeaderDragend" @action-event="handleAction" @sort-change="handleSortChange" @pagination-change="handlePaginationChange"/>
         <!-- 新增、编辑、明细 -->
         <!-- 新增、编辑、明细 -->
         <edit :id="editId" :title="title" :formType="formType" :visible="dialogFormVisible" :readonly="readonly" :span="span" @dialog-callback="search" @close="(visible) => (dialogFormVisible = visible)" />
         <edit :id="editId" :title="title" :formType="formType" :visible="dialogFormVisible" :readonly="readonly" :span="span" @dialog-callback="search" @close="(visible) => (dialogFormVisible = visible)" />
         <!-- 重置密码 -->
         <!-- 重置密码 -->
@@ -70,10 +70,10 @@ export default {
                             itemWidth: 150
                             itemWidth: 150
                         },
                         },
                         {
                         {
-                            prop: 'Q^group_id_^SL',
+                            prop: 'Q^POSITIONS_^SL',
                             label: '归属组织',
                             label: '归属组织',
                             fieldType: 'select',
                             fieldType: 'select',
-                            options: [],
+                            options: this.positionsList,
                             labelWidth: 60,
                             labelWidth: 60,
                             itemWidth: 150
                             itemWidth: 150
                         },
                         },
@@ -88,11 +88,11 @@ export default {
                 },
                 },
                 // 表格字段配置
                 // 表格字段配置
                 columns: [
                 columns: [
-                    { prop: 'name', label: this.$t('platform.org.employee.prop.name'), width: 120 },
+                    { prop: 'name', label: this.$t('platform.org.employee.prop.name'),formatter: this.aaa, width: 120 },
                     { prop: 'account', label: this.$t('platform.org.employee.prop.account'), width: 150 },
                     { prop: 'account', label: this.$t('platform.org.employee.prop.account'), width: 150 },
                     //{ prop: 'wcAccount', label: this.$t('platform.org.employee.prop.wcAccount'),width:120},
                     //{ prop: 'wcAccount', label: this.$t('platform.org.employee.prop.wcAccount'),width:120},
-                    { prop: 'orgName', label: this.$t('platform.org.employee.prop.orgPath'), sortable: false, width: 250 },
-                    { prop: 'qq', label: '客户单位名称', width: 250 },
+                    { prop: 'positionsName', label: this.$t('platform.org.employee.prop.orgPath'),sortable: false, width: 500 },
+                    // { prop: 'qq', label: '客户单位名称', width: 250 },
                     { prop: 'status', label: this.$t('platform.org.employee.prop.status'), tags: statusOptions, width: 100 },
                     { prop: 'status', label: this.$t('platform.org.employee.prop.status'), tags: statusOptions, width: 100 },
                     { prop: 'createTime', label: this.$t('common.field.createTime') }
                     { prop: 'createTime', label: this.$t('common.field.createTime') }
                 ],
                 ],
@@ -194,13 +194,17 @@ export default {
             pagination: {},
             pagination: {},
             sorts: {},
             sorts: {},
             moreSearchParams: {},
             moreSearchParams: {},
-            dialogMoreSearchVisible: false
+            dialogMoreSearchVisible: false,
+            positionsList: []
         }
         }
     },
     },
     created() {
     created() {
-        this.getOrg()
-        this.loadData()
-        this.loadDisplayField()
+        this.getOrg().then(res =>{
+            this.loadData()
+            this.loadDisplayField()
+        })
+        // this.loadData()
+        // this.loadDisplayField()
     },
     },
     methods: {
     methods: {
         ...mapMutations({
         ...mapMutations({
@@ -214,6 +218,12 @@ export default {
             this.loading = true
             this.loading = true
             queryPageList(this.getSearcFormData())
             queryPageList(this.getSearcFormData())
                 .then((response) => {
                 .then((response) => {
+                    response.data.dataResult.forEach(item => {
+                        if(item.positions){
+                            let name = this.getPositionsName(item.positions)
+                            this.$set(item,'positionsName',name)
+                        }
+                    })
                     ActionUtils.handleListData(this, response.data)
                     ActionUtils.handleListData(this, response.data)
                     this.loading = false
                     this.loading = false
                 })
                 })
@@ -221,6 +231,19 @@ export default {
                     this.loading = false
                     this.loading = false
                 })
                 })
         },
         },
+        getPositionsName(valueList){
+            let postList = valueList.split(",")
+            let list = []
+            if(postList.length > 0){
+                postList.forEach(item => {
+                    let dataItem = this.positionsList.find(ite => ite.ID_ == item)
+                    list.push(dataItem.NAME_)
+                })
+                return list.join(",")
+            }else{
+                return ''
+            }
+        },
         /**
         /**
          * 获取格式化参数
          * 获取格式化参数
          */
          */
@@ -408,18 +431,25 @@ export default {
         },
         },
         //获取组织的数据
         //获取组织的数据
         getOrg(){
         getOrg(){
-            let sql = `select * FROM ibps_party_org ORDER BY field(ORG_ALIAS_,'szslhyyjtxbzljcsys','glc','zhgls','jcs','kh')`
-            curdPost('sql', sql).then(res => {
-                if(res.state == '200'){
-                    const datas = res.variables.data
-                    datas.forEach((item,index) => {
-                        this.$set(item,'value',item.ID_)
-                        this.$set(item,'label',item.NAME_)
-                    })
-                    this.listConfig.searchForm.forms[3].options = datas
-                }
+            return new Promise((resolve, reject) => {
+                let sql = `select ID_,NAME_ FROM ibps_party_position order by CREATE_TIME_`
+                curdPost('sql', sql).then(res => {
+                    if(res.state == '200'){
+                        const datas = res.variables.data
+                        datas.forEach((item,index) => {
+                            this.$set(item,'value',item.ID_)
+                            this.$set(item,'label',item.NAME_)
+                        })
+                        this.positionsList = datas
+
+                        this.listConfig.searchForm.forms[3].options = datas
+                        resolve()
+                    }
+                })
+                
             })
             })
-        }
+            
+        },
     }
     }
 }
 }
 </script>
 </script>