Kaynağa Gözat

Merge branch 'master' of http://119.23.210.103:3000/wy/zdqy_firm_former

cfort 2 yıl önce
ebeveyn
işleme
8ab97d5183

+ 1 - 1
src/business/platform/form/constants/fieldOptions.js

@@ -245,7 +245,7 @@ export const selectorTypeOptions = [{
 },
 },
 {
 {
   value: 'position',
   value: 'position',
-  label: '岗位'
+  label: '部门'
 },
 },
 {
 {
   value: 'role',
   value: 'role',

+ 452 - 452
src/business/platform/org/employee/panel.vue

@@ -1,484 +1,484 @@
 <template>
 <template>
-  <ibps-layout ref="layout" style="width: 99%;">
-    <div v-if="showTree" slot="west" :style="{width:width+'px'}"  class="ibps-employee-selector-tree">
-      <div ref="searchForm" class="ibps-tree-search-form">
-        <el-select
-          v-model="partyType"
-          :disabled="currentOrgIdValue===''?false:$store.getters.isSuper?false:!isUseScope"
-          placeholder="请选择"
-          @change="changePartyType"
-        >
-          <el-option
-            v-for="option in partyTypeOptions"
-            :key="option.value"
-            :value="option.value"
-            :label="option.label"
+    <ibps-layout ref="layout" style="width: 99%;">
+      <div v-if="showTree" slot="west" :style="{width:width+'px'}"  class="ibps-employee-selector-tree">
+        <div ref="searchForm" class="ibps-tree-search-form">
+          <el-select
+            v-model="partyType"
+            :disabled="currentOrgIdValue===''?false:$store.getters.isSuper?false:!isUseScope"
+            placeholder="请选择"
+            @change="changePartyType"
+          >
+            <el-option
+              v-for="option in partyTypeOptions"
+              :key="option.value"
+              :value="option.value"
+              :label="option.label"
+            />
+          </el-select>
+          <!-- <el-checkbox v-model="inclueChild" :disabled="partyType==='role'||partyType==='group'" style="margin:5px 0 0 5px;">包含子项</el-checkbox> -->
+          <!-- 重置 -->
+        </div>
+        <div v-if="toolbars" ref="toolbar" class="ibps-tree-toolbar">
+          <ibps-toolbar
+            :actions="toolbars"
+            type="icon"
+            @action-event="handleTreeAction"
           />
           />
-        </el-select>
-        <!-- <el-checkbox v-model="inclueChild" :disabled="partyType==='role'||partyType==='group'" style="margin:5px 0 0 5px;">包含子项</el-checkbox> -->
-        <!-- 重置 -->
-      </div>
-      <div v-if="toolbars" ref="toolbar" class="ibps-tree-toolbar">
-        <ibps-toolbar
-          :actions="toolbars"
-          type="icon"
-          @action-event="handleTreeAction"
-        />
-      </div>
-      <div
-        :style="{ height:auto}"
-      >
-        <el-scrollbar
-          style="height: 100%;width:100%; padding-bottom:8px;"
-          wrap-class="ibps-tree-wrapper ibps-scrollbar-wrapper"
+        </div>
+        <div
+          :style="{ height:(tableHeight)+'px'}"
         >
         >
-          <el-tree
-            v-if="!isUseScope||!hiddenTree"
-            ref="elTree"
-            v-loading="loadingTree"
-            :data="treeData"
-            :expand-on-click-node="false"
-            :props="{ children: 'children', label: 'name',isLeaf: 'leaf'}"
-            :default-expanded-keys="defaultExpandedKeys"
-            :default-expand-all="defaultExpandAll"
-            :load="lazyTree?partyType==='org'&&partyTypeId==='3'?loadOrgTreeNode3:partyType==='position'?partyTypeId==='3'?loadPosTreeNode3:loadPosTreeNode:loadOrgTreeNode:null"
-            :lazy="lazyTree"
-            node-key="id"
-            pid-key="parentId"
-            highlight-current
-            @node-click="handleNodeClick"
-          />
-        </el-scrollbar>
+          <el-scrollbar
+            style="height: 100%;width:100%; padding-bottom:8px;"
+            wrap-class="ibps-tree-wrapper ibps-scrollbar-wrapper"
+          >
+            <el-tree
+              v-if="!isUseScope||!hiddenTree"
+              ref="elTree"
+              v-loading="loadingTree"
+              :data="treeData"
+              :expand-on-click-node="false"
+              :props="{ children: 'children', label: 'name',isLeaf: 'leaf'}"
+              :default-expanded-keys="defaultExpandedKeys"
+              :default-expand-all="defaultExpandAll"
+              :load="lazyTree?partyType==='org'&&partyTypeId==='3'?loadOrgTreeNode3:partyType==='position'?partyTypeId==='3'?loadPosTreeNode3:loadPosTreeNode:loadOrgTreeNode:null"
+              :lazy="lazyTree"
+              node-key="id"
+              pid-key="parentId"
+              highlight-current
+              @node-click="handleNodeClick"
+            />
+          </el-scrollbar>
+        </div>
       </div>
       </div>
-    </div>
-    <ibps-crud
-      ref="crud"
-      :height="'auto'"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :pagination="pagination"
-      :loading="loading"
-      :selection-type="multiple?'checkbox':'radio'"
-      @selection-change="handleSelectionChange"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @pagination-change="handlePaginationChange"
-    />
-    <more-search
-      :title="title"
-      :visible="dialogFormVisible"
-      class-name="org-panel-more-search-dialog"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-      @action-event="handleMoreSearchAction"
-    />
-  </ibps-layout>
-</template>
-<script>
-import { getScriptValue } from '@/api/platform/form/formDef'// 脚本
-import { partyTypeOptions, statusOptions, genderOptions } from './constants'
-import selectorScope from './mixins/selectorScope'
-import panelTree from './mixins/panelTree'
+      <ibps-crud
+        ref="crud"
+        height="520"
+        :data="listData"
+        :toolbars="listConfig.toolbars"
+        :search-form="listConfig.searchForm"
+        :pk-key="pkKey"
+        :columns="listConfig.columns"
+        :pagination="pagination"
+        :loading="loading"
+        :selection-type="multiple?'checkbox':'radio'"
+        @selection-change="handleSelectionChange"
+        @action-event="handleAction"
+        @sort-change="handleSortChange"
+        @pagination-change="handlePaginationChange"
+      />
+      <more-search
+        :title="title"
+        :visible="dialogFormVisible"
+        class-name="org-panel-more-search-dialog"
+        @callback="search"
+        @close="visible => dialogFormVisible = visible"
+        @action-event="handleMoreSearchAction"
+      />
+    </ibps-layout>
+  </template>
+  <script>
+  import { getScriptValue } from '@/api/platform/form/formDef'// 脚本
+  import { partyTypeOptions, statusOptions, genderOptions } from './constants'
+  import selectorScope from './mixins/selectorScope'
+  import panelTree from './mixins/panelTree'
 
 
-import { query } from '@/api/platform/org/user'
-import { queryWoutOrg, queryPageList, queryWithOrg4Position } from '@/api/platform/org/employee'
-import ActionUtils from '@/utils/action'
-import TreeUtils from '@/utils/tree'
-import MoreSearch from './more-search'
-import SelectionMixin from '@/components/ibps-selector/mixins/selection'
+  import { query } from '@/api/platform/org/user'
+  import { queryWoutOrg, queryPageList, queryWithOrg4Position } from '@/api/platform/org/employee'
+  import ActionUtils from '@/utils/action'
+  import TreeUtils from '@/utils/tree'
+  import MoreSearch from './more-search'
+  import SelectionMixin from '@/components/ibps-selector/mixins/selection'
 
 
-export default {
-  components: {
-    MoreSearch
-  },
-  mixins: [SelectionMixin, selectorScope, panelTree],
-  props: {
-    value: [Object, Array],
-    multiple: Boolean,
-    seetingSearchPartyType: String, // 设置查询用户类型
-    height: {
-      type: String,
-    //   default: '400px'
-    },
-    partyTypeId: { // 类型节点ID
-      type: [String, Number],
-      default: ''
-    },
-    partyTypeScope: String,
-    currentOrgId: { // 当前用户组ID
-      type: [String, Number],
-      default: ''
-    },
-    script: String,
-    customPartyTypeOptions: {
-      type: [Object, Array],
-      default: () => {}
+  export default {
+    components: {
+      MoreSearch
     },
     },
-    showTree: { // 是否显示左树
-      type: Boolean,
-      default: true
-    },
-    isSuperInitTree: { // 是否为超管初始化树类型数据
-      type: Object,
-      default: () => {}
-    },
-    orgAddIndex: {
-      type: String,
-      default: '',
-    },
-    orgAddId:{
+    mixins: [SelectionMixin, selectorScope, panelTree],
+    props: {
+      value: [Object, Array],
+      multiple: Boolean,
+      seetingSearchPartyType: String, // 设置查询用户类型
+      height: {
         type: String,
         type: String,
-      default: '',
-    },
-    orgAddList:{
-        type: Array,
-        default: ()=>{
-            return []
-        }
+      //   default: '400px'
+      },
+      partyTypeId: { // 类型节点ID
+        type: [String, Number],
+        default: ''
+      },
+      partyTypeScope: String,
+      currentOrgId: { // 当前用户组ID
+        type: [String, Number],
+        default: ''
+      },
+      script: String,
+      customPartyTypeOptions: {
+        type: [Object, Array],
+        default: () => {}
+      },
+      showTree: { // 是否显示左树
+        type: Boolean,
+        default: true
+      },
+      isSuperInitTree: { // 是否为超管初始化树类型数据
+        type: Object,
+        default: () => {}
+      },
+      orgAddIndex: {
+        type: String,
+        default: '',
+      },
+      orgAddId:{
+          type: String,
+        default: '',
+      },
+      orgAddList:{
+          type: Array,
+          default: ()=>{
+              return []
+          }
+      },
     },
     },
-  },
-  data() {
-    return {
-      width: 200,
-      dialogFormVisible: false, // 弹窗
-      editId: '',
-      title: '更多查询条件',
-      partyTypeOptions: this.orgAddIndex === 'qita'? this.orgAddList : this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions : partyTypeOptions,
-      statusOptions: statusOptions,
-      genderOptions: genderOptions,
-      partyType: this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions[0].value : 'org',
-      // inclueChild: true,
-      partyId: '',
-      treeDatas: [],
+    data() {
+      return {
+        width: 200,
+        dialogFormVisible: false, // 弹窗
+        editId: '',
+        title: '更多查询条件',
+        partyTypeOptions: this.orgAddIndex === 'qita'? this.orgAddList : this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions : partyTypeOptions,
+        statusOptions: statusOptions,
+        genderOptions: genderOptions,
+        partyType: this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions[0].value : 'org',
+        // inclueChild: true,
+        partyId: '',
+        treeDatas: [],
 
 
-      // 树配置
-      loadingTree: false,
-      treeData: [],
-      toolbars: [{
-        key: 'refresh'
-      }, {
-        key: 'expand'
-      }, {
-        key: 'compress'
-      }],
-      // 列表配置
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      loading: false,
-      listData: [],
-      loazTreeData: [],
-      listConfig: {
-        // 工具栏
-        toolbars: [
-          { key: 'search' }
-          // { key: 'moreSearch' }
-        ],
-        // 查询条件
-        searchForm: {
-          labelWidth: 50,
-          forms: [
-            { prop: 'Q^FULL_NAME_^SL', label: '姓名', itemWidth: '200' },
+        // 树配置
+        loadingTree: false,
+        treeData: [],
+        toolbars: [{
+          key: 'refresh'
+        }, {
+          key: 'expand'
+        }, {
+          key: 'compress'
+        }],
+        // 列表配置
+        pkKey: 'id', // 主键  如果主键不是pk需要传主键
+        loading: false,
+        listData: [],
+        loazTreeData: [],
+        listConfig: {
+          // 工具栏
+          toolbars: [
+            { key: 'search' }
+            // { key: 'moreSearch' }
+          ],
+          // 查询条件
+          searchForm: {
+            labelWidth: 50,
+            forms: [
+              { prop: 'Q^FULL_NAME_^SL', label: '姓名', itemWidth: '200' },
+            ]
+          },
+          // 表格字段配置
+          columns: [
+            { prop: 'name', label: '姓名', width: 100 },
+            { prop: 'createTime', label: '创建时间', width: 100 },
           ]
           ]
         },
         },
-        // 表格字段配置
-        columns: [
-          { prop: 'name', label: '姓名', width: 100 },
-          { prop: 'createTime', label: '创建时间', width: 100 },
-        ]
-      },
-      pagination: {},
-      sorts: {},
-      moreSearchParams: {},
-      lazyTree: true,
-      defaultExpandedKeys: ['0'],
-      defaultExpandAll: false,
-      lazyOrgTree: true,
-      partyTypeIdValue: '',
-      currentOrgIdValue: '',
-      scriptValue: '',
-      scriptExecuteTime: false, // 脚本函数是否只执行一次
-      hiddenTree: false // 由于树形懒加载load函数的变换,需要重现渲染tree,load才能生效
-    }
-  },
-  computed: {
-    tableHeight() {
-      const h = this.height.substr(0, this.height.length - 2)
-      return parseInt(h)
-    },
-    changeParams() {
-      const { partyTypeId, currentOrgId, isUseScope, script, partyTypeScope } = this
-      return {
-        partyTypeId,
-        currentOrgId,
-        isUseScope,
-        script,
-        partyTypeScope
+        pagination: {},
+        sorts: {},
+        moreSearchParams: {},
+        lazyTree: true,
+        defaultExpandedKeys: ['0'],
+        defaultExpandAll: false,
+        lazyOrgTree: true,
+        partyTypeIdValue: '',
+        currentOrgIdValue: '',
+        scriptValue: '',
+        scriptExecuteTime: false, // 脚本函数是否只执行一次
+        hiddenTree: false // 由于树形懒加载load函数的变换,需要重现渲染tree,load才能生效
       }
       }
-    }
-  },
-  watch: {
-    showTree: {
-      handler: function(val, oldVal) {
-        this.lazyTree = this.partyType === 'org'
-       /* if (val === false) { */
-          this.listConfig.searchForm.forms = [
-            { prop: 'name', label: '姓名' }
-          ]
-          this.listConfig.columns = [
-            { prop: 'name', label: '姓名'},
-            { prop: 'createTime', label: '创建时间' ,width:200}
-          ]
-        /* } else {
-          this.listConfig.searchForm.forms = [
-            { prop: 'Q^NAME_^SL', label: '姓名', itemWidth: '200' },
-            { prop: 'Q^ACCOUNT_^SL', label: '帐号', itemWidth: '200' }
-          ]
-          this.listConfig.columns = [
-            { prop: 'name', label: '姓名' },
-            { prop: 'status', label: '状态' }
-          ]
-        } */
+    },
+    computed: {
+      tableHeight() {
+        const h = this.height.substr(0, this.height.length - 2)
+        return parseInt(h)
       },
       },
-      immediate: true
+      changeParams() {
+        const { partyTypeId, currentOrgId, isUseScope, script, partyTypeScope } = this
+        return {
+          partyTypeId,
+          currentOrgId,
+          isUseScope,
+          script,
+          partyTypeScope
+        }
+      }
     },
     },
-    changeParams: {
-      handler: function(newval, oldval) {
-        this.partyTypeIdValue = newval.partyTypeId
-        this.currentOrgIdValue = newval.currentOrgId
-        this.scriptValue = newval.script
-        // 普通模式与选择器范围模式切换调用
-        let initDesignatedAType // 机构和岗位懒加载时的特殊处理参数【类型为3时的切换】
-        if (oldval === undefined) {
-          initDesignatedAType = false
-        } else {
-          if ((newval.partyTypeScope === 'org' || newval.partyTypeScope === 'position') && newval.partyTypeId === '3') {
+    watch: {
+      showTree: {
+        handler: function(val, oldVal) {
+          this.lazyTree = this.partyType === 'org'
+         /* if (val === false) { */
+            this.listConfig.searchForm.forms = [
+              { prop: 'name', label: '姓名' }
+            ]
+            this.listConfig.columns = [
+              { prop: 'name', label: '姓名'},
+              { prop: 'createTime', label: '创建时间' ,width:200}
+            ]
+          /* } else {
+            this.listConfig.searchForm.forms = [
+              { prop: 'Q^NAME_^SL', label: '姓名', itemWidth: '200' },
+              { prop: 'Q^ACCOUNT_^SL', label: '帐号', itemWidth: '200' }
+            ]
+            this.listConfig.columns = [
+              { prop: 'name', label: '姓名' },
+              { prop: 'status', label: '状态' }
+            ]
+          } */
+        },
+        immediate: true
+      },
+      changeParams: {
+        handler: function(newval, oldval) {
+          this.partyTypeIdValue = newval.partyTypeId
+          this.currentOrgIdValue = newval.currentOrgId
+          this.scriptValue = newval.script
+          // 普通模式与选择器范围模式切换调用
+          let initDesignatedAType // 机构和岗位懒加载时的特殊处理参数【类型为3时的切换】
+          if (oldval === undefined) {
             initDesignatedAType = false
             initDesignatedAType = false
           } else {
           } else {
-            initDesignatedAType = true
+            if ((newval.partyTypeScope === 'org' || newval.partyTypeScope === 'position') && newval.partyTypeId === '3') {
+              initDesignatedAType = false
+            } else {
+              initDesignatedAType = true
+            }
           }
           }
-        }
-        newval.isUseScope ? this.loadTreeData(true, initDesignatedAType) : null
-      },
-      deep: true,
-      immediate: true
-    }
-  },
-  mounted() {
-    if (this.showTree) {
-      if (this.isUseScope) return
-      this.loadTreeData(true)
-    } else {
-      this.loadListData()
-    }
-  },
-  methods: {
-    /**
-     * 加载数据
-     */
-    loadListData() {
-      let type = this.partyType
-      this.loading = true
+          newval.isUseScope ? this.loadTreeData(true, initDesignatedAType) : null
+        },
+        deep: true,
+        immediate: true
+      }
+    },
+    mounted() {
       if (this.showTree) {
       if (this.showTree) {
-        if (this.$utils.isNotEmpty(this.partyId) || this.isUseScope) {
-          type = this.partyType
-        } else if (this.currentOrgIdValue && this.currentOrgIdValue !== '') {
-          type = 'org'
-        }
-        query(type, this.getFormatParams()).then(response => {
-          this.loading = false
-          ActionUtils.handleListData(this, response.data)
-          this.setSelectRow()
-        }).catch(() => {
-          this.loading = false
-        })
-      } else if (this.seetingSearchPartyType === 'position') {
-        queryWithOrg4Position(this.getFormatParams()).then(response => {
-          this.loading = false
-          ActionUtils.handleListData(this, response.data)
-          this.setSelectRow()
-        }).catch(() => {
-          this.loading = false
-        })
-      } else if (this.$utils.isNotEmpty(this.currentOrgIdValue)) {
-        queryWoutOrg(this.getFormatParams()).then(response => {
-          this.loading = false
-          ActionUtils.handleListData(this, response.data)
-          this.setSelectRow()
-        }).catch(() => {
-          this.loading = false
-        })
+        if (this.isUseScope) return
+        this.loadTreeData(true)
       } else {
       } else {
-        queryPageList(this.getFormatParams()).then(response => {
-          this.loading = false
-          ActionUtils.handleListData(this, response.data)
-          this.setSelectRow()
-        }).catch(() => {
-          this.loading = false
-        })
+        this.loadListData()
       }
       }
     },
     },
-    getScriptData(scriptValue, once = false) {
-      if (this.scriptExecuteTime) return
-      getScriptValue({
-        script: scriptValue,
-        vars: ''
-      }).then(response => {
-        const data = JSON.parse(response.data)
-        this.treeData = TreeUtils.transformToTreeFormat(data.data)
-        this.setTree(this.partyType === 'org', this.treeData)
-        this.scriptExecuteTime = once
-      })
-    },
-    /**
-     * 获取查询条件格式化参数
-     */
-    getFormatParams() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      const key = this.partyType === 'org' ? 'orgId' : this.partyType === 'position' ? 'positionId' : this.partyType === 'role' ? 'roleId' : this.partyType === 'group' ? 'groupId' : ''
-      if (this.showTree) {
-        if (this.$utils.isNotEmpty(this.partyId) || this.currentOrgIdValue !== '') {
-          if (this.partyId !== 0 && this.partyId !== '0') {
-            params[key] = this.partyId === '' ? this.currentOrgIdValue : this.partyId
+    methods: {
+      /**
+       * 加载数据
+       */
+      loadListData() {
+        let type = this.partyType
+        this.loading = true
+        if (this.showTree) {
+          if (this.$utils.isNotEmpty(this.partyId) || this.isUseScope) {
+            type = this.partyType
+          } else if (this.currentOrgIdValue && this.currentOrgIdValue !== '') {
+            type = 'org'
           }
           }
+          query(type, this.getFormatParams()).then(response => {
+            this.loading = false
+            ActionUtils.handleListData(this, response.data)
+            this.setSelectRow()
+          }).catch(() => {
+            this.loading = false
+          })
+        } else if (this.seetingSearchPartyType === 'position') {
+          queryWithOrg4Position(this.getFormatParams()).then(response => {
+            this.loading = false
+            ActionUtils.handleListData(this, response.data)
+            this.setSelectRow()
+          }).catch(() => {
+            this.loading = false
+          })
+        } else if (this.$utils.isNotEmpty(this.currentOrgIdValue)) {
+          queryWoutOrg(this.getFormatParams()).then(response => {
+            this.loading = false
+            ActionUtils.handleListData(this, response.data)
+            this.setSelectRow()
+          }).catch(() => {
+            this.loading = false
+          })
         } else {
         } else {
-          params[key] = this.partyTypeId === '1' ? '' : this.partyTypeId
+          queryPageList(this.getFormatParams()).then(response => {
+            this.loading = false
+            ActionUtils.handleListData(this, response.data)
+            this.setSelectRow()
+          }).catch(() => {
+            this.loading = false
+          })
         }
         }
+      },
+      getScriptData(scriptValue, once = false) {
+        if (this.scriptExecuteTime) return
+        getScriptValue({
+          script: scriptValue,
+          vars: ''
+        }).then(response => {
+          const data = JSON.parse(response.data)
+          this.treeData = TreeUtils.transformToTreeFormat(data.data)
+          this.setTree(this.partyType === 'org', this.treeData)
+          this.scriptExecuteTime = once
+        })
+      },
+      /**
+       * 获取查询条件格式化参数
+       */
+      getFormatParams() {
+        const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+        const key = this.partyType === 'org' ? 'orgId' : this.partyType === 'position' ? 'positionId' : this.partyType === 'role' ? 'roleId' : this.partyType === 'group' ? 'groupId' : ''
+        if (this.showTree) {
+          if (this.$utils.isNotEmpty(this.partyId) || this.currentOrgIdValue !== '') {
+            if (this.partyId !== 0 && this.partyId !== '0') {
+              params[key] = this.partyId === '' ? this.currentOrgIdValue : this.partyId
+            }
+          } else {
+            params[key] = this.partyTypeId === '1' ? '' : this.partyTypeId
+          }
+        }
+        if (this.seetingSearchPartyType === 'position') {
+          params['positionId'] = this.partyTypeId
+        }
+        if (this.moreSearchParams) {
+          Object.assign(params, this.moreSearchParams)
+        }
+        // if (this.$utils.isNotEmpty(this.currentOrgId)) {
+        //   params['orgId'] = this.partyId || this.currentOrgId
+        // }
+        //筛选客户不要了
+        if(this.orgAddIndex=='qita' && this.partyId=='' && this.partyType == 'org'){
+          params['orgId'] = this.orgAddId
+        }
+        return ActionUtils.formatParams(
+          params,
+          this.pagination,
+          this.sorts)
+      },
+      /**
+       * 处理分页事件
+       */
+      handlePaginationChange(page) {
+        this.changePageCoreRecordData()
+        ActionUtils.setPagination(this.pagination, page)
+        this.loadListData()
+      },
+      /**
+       * 处理排序
+       */
+      handleSortChange(sort) {
+        ActionUtils.setSorts(this.sorts, sort)
+        this.loadListData()
+      },
+      /**
+       * 查询
+       */
+      search() {
+        this.loadListData()
+      },
+      /**
+       * 重置查询条件
+       */
+      reset() {
+        this.$refs['crud'].handleReset()
+      },
+      /**
+       * 处理按钮事件
+       */
+      handleAction(command, position, selection, data) {
+        switch (command) {
+          case 'search':// 查询
+            ActionUtils.setFirstPagination(this.pagination)
+            this.search()
+            break
+          case 'moreSearch':// 更多
+            this.handleMoreSearch()
+            break
+          default:
+            break
+        }
+      },
+      /**
+       * 处理按钮事件
+       */
+      handleMoreSearchAction(data) {
+        ActionUtils.setFirstPagination(this.pagination)
+        this.moreSearchParams = data
+        this.loadListData()
+      },
+      /**
+       * 处理更多
+       */
+      handleMoreSearch() {
+        this.dialogFormVisible = true
+      },
+      changePartyType(value) {
+        this.loadingTree = true
+        if (this.isUseScope) {
+          this.hiddenTree = true
+        }
+        this.partyType = value
+        const ref = this.$refs.elTree
+        const { loadPosTreeNode, loadPosTreeNode3, loadOrgTreeNode3, loadOrgTreeNode } = this
+        ref.store.load = value === 'position' ? this.partyTypeId === '3' ? loadPosTreeNode3 : loadPosTreeNode : value === 'org' ? this.partyTypeId === '3' ? loadOrgTreeNode3 : loadOrgTreeNode : null
+        // 选择器范围模式函数回调
+        this.moreSearchParams = {}
+        // 普通模式与选择器范围模式切换调用
+        !this.isUseScope ? this.loadTreeData() : null
+        this.scriptExecuteTime = false // 初始化脚本类型时的函数调用
+        this.$emit('change-party-type', value)
+      },
+      getChildrenIds(data, list) {
+        list.push(data.id)
+        const children = data.children
+        if (this.$utils.isNotEmpty(children)) {
+          for (let i = 0; i < children.length; i++) {
+            const element = children[i]
+            this.getChildrenIds(element, list)
+          }
+        }
+        return list
       }
       }
-      if (this.seetingSearchPartyType === 'position') {
-        params['positionId'] = this.partyTypeId
-      }
-      if (this.moreSearchParams) {
-        Object.assign(params, this.moreSearchParams)
-      }
-      // if (this.$utils.isNotEmpty(this.currentOrgId)) {
-      //   params['orgId'] = this.partyId || this.currentOrgId
-      // }
-      //筛选客户不要了
-      if(this.orgAddIndex=='qita' && this.partyId=='' && this.partyType == 'org'){
-        params['orgId'] = this.orgAddId
+
+    }
+  }
+  </script>
+  <style lang="scss" >
+  $border-color: #e5e6e7;
+  .org-panel-more-search-dialog{
+    .el-dialog__body{
+      height:  calc(40vh - 120px) !important;
+    }
+  }
+  .ibps-employee-selector-tree{
+    .ibps-tree-toolbar {
+        border: 1px solid $border-color;
+        height: 30px;
+        padding: 5px;
       }
       }
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      this.changePageCoreRecordData()
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadListData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadListData()
-    },
-    /**
-     * 查询
-     */
-    search() {
-      this.loadListData()
-    },
-    /**
-     * 重置查询条件
-     */
-    reset() {
-      this.$refs['crud'].handleReset()
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'moreSearch':// 更多
-          this.handleMoreSearch()
-          break
-        default:
-          break
+      .ibps-tree-search-form {
+        padding: 5px;
+        padding-bottom: 20px;
+        border-right: 1px solid $border-color;
+        background: #ffffff;
       }
       }
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleMoreSearchAction(data) {
-      ActionUtils.setFirstPagination(this.pagination)
-      this.moreSearchParams = data
-      this.loadListData()
-    },
-    /**
-     * 处理更多
-     */
-    handleMoreSearch() {
-      this.dialogFormVisible = true
-    },
-    changePartyType(value) {
-      this.loadingTree = true
-      if (this.isUseScope) {
-        this.hiddenTree = true
+      .ibps-tree-main {
+        border: 1px solid $border-color;
       }
       }
-      this.partyType = value
-      const ref = this.$refs.elTree
-      const { loadPosTreeNode, loadPosTreeNode3, loadOrgTreeNode3, loadOrgTreeNode } = this
-      ref.store.load = value === 'position' ? this.partyTypeId === '3' ? loadPosTreeNode3 : loadPosTreeNode : value === 'org' ? this.partyTypeId === '3' ? loadOrgTreeNode3 : loadOrgTreeNode : null
-      // 选择器范围模式函数回调
-      this.moreSearchParams = {}
-      // 普通模式与选择器范围模式切换调用
-      !this.isUseScope ? this.loadTreeData() : null
-      this.scriptExecuteTime = false // 初始化脚本类型时的函数调用
-      this.$emit('change-party-type', value)
-    },
-    getChildrenIds(data, list) {
-      list.push(data.id)
-      const children = data.children
-      if (this.$utils.isNotEmpty(children)) {
-        for (let i = 0; i < children.length; i++) {
-          const element = children[i]
-          this.getChildrenIds(element, list)
+      .ibps-tree-wrapper {
+        background: #ffffff;
+        .el-tree > .el-tree-node {
+          display: inline-block;
         }
         }
       }
       }
-      return list
-    }
-
   }
   }
-}
-</script>
-<style lang="scss" >
-$border-color: #e5e6e7;
-.org-panel-more-search-dialog{
-  .el-dialog__body{
-    height:  calc(40vh - 120px) !important;
-  }
-}
-.ibps-employee-selector-tree{
-  .ibps-tree-toolbar {
-      border: 1px solid $border-color;
-      height: 30px;
-      padding: 5px;
-    }
-    .ibps-tree-search-form {
-      padding: 5px;
-      padding-bottom: 20px;
-      border-right: 1px solid $border-color;
-      background: #ffffff;
-    }
-    .ibps-tree-main {
-      border: 1px solid $border-color;
-    }
-    .ibps-tree-wrapper {
-      background: #ffffff;
-      .el-tree > .el-tree-node {
-        display: inline-block;
-      }
-    }
-}
-</style>
+  </style>

+ 4 - 0
src/business/platform/org/position/panel.vue

@@ -209,6 +209,10 @@ export default {
         getTreeData(params).then(res => {
         getTreeData(params).then(res => {
           this.loading = false
           this.loading = false
           const arr = JSON.parse(JSON.stringify(res.data))
           const arr = JSON.parse(JSON.stringify(res.data))
+          //岗位数改成部门树
+          if(node.level == '0' && arr.length > 0 && arr[0].name == '岗位树'){
+            arr[0].name = '部门树'
+          }
           let treeData
           let treeData
           if (this.$utils.isEmpty(node.data)) {
           if (this.$utils.isEmpty(node.data)) {
             treeData = arr
             treeData = arr

+ 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>

+ 2 - 2
src/views/platform/org/position/detail/index.vue

@@ -4,13 +4,13 @@
       v-model="activeName"
       v-model="activeName"
       @tab-click="handleTabClick"
       @tab-click="handleTabClick"
     >
     >
-      <el-tab-pane label="岗位明细" name="detail">
+      <el-tab-pane label="部门明细" name="detail">
         <detail :id="id" :readonly="readonly" />
         <detail :id="id" :readonly="readonly" />
       </el-tab-pane>
       </el-tab-pane>
       <el-tab-pane label="归属组织" name="positionOrg">
       <el-tab-pane label="归属组织" name="positionOrg">
         <position-org :id="id" :height="height" :visible="activeName==='positionOrg'" />
         <position-org :id="id" :height="height" :visible="activeName==='positionOrg'" />
       </el-tab-pane>
       </el-tab-pane>
-      <el-tab-pane label="岗位人员" name="positionEmployee">
+      <el-tab-pane label="部门人员" name="positionEmployee">
         <position-employee :id="id" seeting-search-party-type="position" :height="height" :visible="activeName==='positionEmployee'" />
         <position-employee :id="id" seeting-search-party-type="position" :height="height" :visible="activeName==='positionEmployee'" />
       </el-tab-pane>
       </el-tab-pane>
       <el-tab-pane label="扩展属性" name="extraAttr">
       <el-tab-pane label="扩展属性" name="extraAttr">

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

@@ -2,16 +2,16 @@
   <div>
   <div>
     <div v-if="readonly">
     <div v-if="readonly">
       <el-form :label-width="formLabelWidth" @submit.native.prevent>
       <el-form :label-width="formLabelWidth" @submit.native.prevent>
-        <el-form-item label="岗位名称:" prop="name">
+        <el-form-item label="部门名称:" prop="name">
           <span>{{ position.name }}</span>
           <span>{{ position.name }}</span>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="岗位别名:" prop="posAlias">
+        <el-form-item label="部门别名:" prop="posAlias">
           <span>{{ position.posAlias }}</span>
           <span>{{ position.posAlias }}</span>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="岗位等级:" prop="level">
+        <el-form-item label="部门等级:" prop="level">
           {{ position.levelID|optionsFilter(levelOptions,'label') }}
           {{ position.levelID|optionsFilter(levelOptions,'label') }}
         </el-form-item>
         </el-form-item>
-        <el-form-item label="岗位说明:" prop="desc">
+        <el-form-item label="部门说明:" prop="desc">
           <pre class="ibps-m-0">{{ position.desc }}</pre>
           <pre class="ibps-m-0">{{ position.desc }}</pre>
         </el-form-item>
         </el-form-item>
         <el-form-item label="创建时间:" prop="createTime">
         <el-form-item label="创建时间:" prop="createTime">
@@ -27,18 +27,18 @@
         <el-button type="primary" icon="ibps-icon-save" @click="handleSave()">保存</el-button>
         <el-button type="primary" icon="ibps-icon-save" @click="handleSave()">保存</el-button>
       </template>
       </template>
       <el-form ref="positionForm" :model="position" :rules="rules" :label-width="formLabelWidth">
       <el-form ref="positionForm" :model="position" :rules="rules" :label-width="formLabelWidth">
-        <el-form-item label="岗位名称" prop="name">
+        <el-form-item label="部门名称" prop="name">
           <el-input v-model="position.name" v-pinyin="{vm:position,key:'posAlias'}" autocomplete="off" :disabled="reading" />
           <el-input v-model="position.name" v-pinyin="{vm:position,key:'posAlias'}" autocomplete="off" :disabled="reading" />
         </el-form-item>
         </el-form-item>
-        <el-form-item label="岗位别名" prop="posAlias">
+        <el-form-item label="部门别名" prop="posAlias">
           <el-input v-model="position.posAlias" :disabled="formId!==''||reading" autocomplete="off" />
           <el-input v-model="position.posAlias" :disabled="formId!==''||reading" autocomplete="off" />
         </el-form-item>
         </el-form-item>
-        <el-form-item label="岗位等级" prop="levelID">
+        <el-form-item label="部门等级" prop="levelID">
           <el-select v-model="position.levelID" style="width:100%;" :disabled="reading" @focus="getWidth">
           <el-select v-model="position.levelID" style="width:100%;" :disabled="reading" @focus="getWidth">
             <el-option v-for="(v,i) in levelOptions" :key="i" :label="v.label" :value="v.value" :style="{'max-width':optionsWidth}" />
             <el-option v-for="(v,i) in levelOptions" :key="i" :label="v.label" :value="v.value" :style="{'max-width':optionsWidth}" />
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="岗位说明" prop="desc">
+        <el-form-item label="部门说明" prop="desc">
           <el-input v-model="position.desc" :rows="4" type="textarea" :disabled="reading" />
           <el-input v-model="position.desc" :rows="4" type="textarea" :disabled="reading" />
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>

+ 7 - 2
src/views/platform/org/position/manage.vue

@@ -9,7 +9,7 @@
         :contextmenus="orgTreeContextmenus"
         :contextmenus="orgTreeContextmenus"
         :load="loadNode"
         :load="loadNode"
         lazy
         lazy
-        title="岗位管理"
+        title="部门管理"
         @action-event="handleTreeAction"
         @action-event="handleTreeAction"
         @node-click="handleNodeClick"
         @node-click="handleNodeClick"
         @expand-collapse="handleExpandCollapse"
         @expand-collapse="handleExpandCollapse"
@@ -39,7 +39,7 @@
         <el-alert
         <el-alert
           v-else
           v-else
           :closable="false"
           :closable="false"
-          title="尚未指定一个岗位"
+          title="尚未指定一个部门"
           type="warning"
           type="warning"
           show-icon
           show-icon
           style="height:50px;"
           style="height:50px;"
@@ -126,6 +126,11 @@ export default {
         type: 1,
         type: 1,
         posId: node.level === 0 ? null : node.data.id
         posId: node.level === 0 ? null : node.data.id
       }).then(res => {
       }).then(res => {
+        let data = res.data
+        //岗位树改成部门树
+        if(node.level === 0 && data.length > 0 && data[0].name == '岗位树'){
+            data[0].name = '部门树'
+        }
         this.loading = false
         this.loading = false
         resolve(this.toTree(res.data))
         resolve(this.toTree(res.data))
       }).catch(res => {
       }).catch(res => {