|
|
@@ -1,16 +1,65 @@
|
|
|
<template>
|
|
|
<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"
|
|
|
+ :form-type="formType"
|
|
|
+ :visible="dialogFormVisible"
|
|
|
+ :readonly="readonly"
|
|
|
+ :span="span"
|
|
|
+ @dialog-callback="search"
|
|
|
+ @close="(visible) => (dialogFormVisible = visible)"
|
|
|
+ />
|
|
|
<!-- 重置密码 -->
|
|
|
- <change-password :ids="changePasswordIds" :visible="changePasswordVisible" :title="$t('platform.org.employee.change-password.resetPassword')" is-reset :reg-open="true" @dialog-callback="search" @close="(visible) => (changePasswordVisible = visible)" />
|
|
|
- <more-search ref="moreSearch" :title="moreSearchTitle" :visible="dialogMoreSearchVisible" party-type="employee" @callback="search" @close="(visible) => (dialogMoreSearchVisible = visible)" @action-event="handleMoreSearchAction" />
|
|
|
+ <change-password
|
|
|
+ :ids="changePasswordIds"
|
|
|
+ :visible="changePasswordVisible"
|
|
|
+ :title="$t('platform.org.employee.change-password.resetPassword')"
|
|
|
+ is-reset
|
|
|
+ :reg-open="true"
|
|
|
+ @dialog-callback="search"
|
|
|
+ @close="(visible) => (changePasswordVisible = visible)"
|
|
|
+ />
|
|
|
+ <more-search
|
|
|
+ ref="moreSearch"
|
|
|
+ :title="moreSearchTitle"
|
|
|
+ :visible="dialogMoreSearchVisible"
|
|
|
+ party-type="employee"
|
|
|
+ @callback="search"
|
|
|
+ @close="(visible) => (dialogMoreSearchVisible = visible)"
|
|
|
+ @action-event="handleMoreSearchAction"
|
|
|
+ />
|
|
|
</ibps-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { queryPageList, remove, active, disable } from '@/api/platform/org/employee'
|
|
|
+import {
|
|
|
+ queryPageList,
|
|
|
+ remove,
|
|
|
+ active,
|
|
|
+ disable
|
|
|
+} from '@/api/platform/org/employee'
|
|
|
import ActionUtils from '@/utils/action'
|
|
|
import { statusOptions, genderOptions, typeOptions } from './constants'
|
|
|
import { mapActions, mapMutations } from 'vuex'
|
|
|
@@ -18,7 +67,6 @@ import Edit from './edit/index'
|
|
|
import ChangePassword from './change-password'
|
|
|
import CustomDataDisplayMixin from '@/business/platform/system/mixins/customDataDisplay'
|
|
|
import MoreSearch from './more-search'
|
|
|
-import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
Edit,
|
|
|
@@ -26,7 +74,7 @@ export default {
|
|
|
MoreSearch
|
|
|
},
|
|
|
mixins: [CustomDataDisplayMixin],
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
height: document.clientHeight,
|
|
|
title: '',
|
|
|
@@ -52,13 +100,31 @@ export default {
|
|
|
{ key: 'add' },
|
|
|
{ key: 'edit' },
|
|
|
{ key: 'remove' },
|
|
|
- { key: 'changePassword', label: this.$t('platform.org.employee.button.changePassword'), icon: 'el-icon-refresh' }
|
|
|
+ {
|
|
|
+ key: 'changePassword',
|
|
|
+ label: this.$t(
|
|
|
+ 'platform.org.employee.button.changePassword'
|
|
|
+ ),
|
|
|
+ icon: 'el-icon-refresh'
|
|
|
+ }
|
|
|
// { key: 'more', icon: 'ibps-icon-ellipsis-h' }
|
|
|
],
|
|
|
searchForm: {
|
|
|
forms: [
|
|
|
- { prop: 'Q^NAME_^SL', label: this.$t('platform.org.employee.prop.name'), labelWidth: 40, itemWidth: 150 },
|
|
|
- { prop: 'Q^ACCOUNT_^SL', label: this.$t('platform.org.employee.prop.account'), labelWidth: 40, itemWidth: 150 },
|
|
|
+ {
|
|
|
+ prop: 'Q^NAME_^SL',
|
|
|
+ label: this.$t('platform.org.employee.prop.name'),
|
|
|
+ labelWidth: 40,
|
|
|
+ itemWidth: 150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'Q^ACCOUNT_^SL',
|
|
|
+ label: this.$t(
|
|
|
+ 'platform.org.employee.prop.account'
|
|
|
+ ),
|
|
|
+ labelWidth: 40,
|
|
|
+ itemWidth: 150
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'Q^STATUS_^SL',
|
|
|
label: this.$t('platform.org.employee.prop.status'),
|
|
|
@@ -88,19 +154,44 @@ export default {
|
|
|
},
|
|
|
// 表格字段配置
|
|
|
columns: [
|
|
|
- { 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: 'wcAccount', label: this.$t('platform.org.employee.prop.wcAccount'),width:120},
|
|
|
- { prop: 'positionsName', label: this.$t('platform.org.employee.prop.orgPath'),sortable: false, width: 500 },
|
|
|
+ {
|
|
|
+ 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: 'wcAccount', label: this.$t('platform.org.employee.prop.wcAccount'),width:120},
|
|
|
+ {
|
|
|
+ prop: 'positionsPath',
|
|
|
+ label: this.$t('platform.org.employee.prop.orgPath'),
|
|
|
+ sortable: false,
|
|
|
+ minWidth: 300
|
|
|
+ },
|
|
|
// { prop: 'qq', label: '客户单位名称', width: 250 },
|
|
|
- { prop: 'status', label: this.$t('platform.org.employee.prop.status'), tags: statusOptions, width: 100 },
|
|
|
- { prop: 'createTime', label: this.$t('common.field.createTime') }
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: this.$t('platform.org.employee.prop.status'),
|
|
|
+ tags: statusOptions,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: this.$t('common.field.createTime'),
|
|
|
+ width: 150
|
|
|
+ }
|
|
|
],
|
|
|
rowHandle: {
|
|
|
actions: [
|
|
|
{
|
|
|
key: 'changePassword',
|
|
|
- label: this.$t('platform.org.employee.button.changePassword'),
|
|
|
+ label: this.$t(
|
|
|
+ 'platform.org.employee.button.changePassword'
|
|
|
+ ),
|
|
|
icon: 'el-icon-refresh',
|
|
|
hidden: (rowData, index) => {
|
|
|
if (rowData.status === 'deleted') {
|
|
|
@@ -147,7 +238,9 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
key: 'actived',
|
|
|
- label: this.$t('platform.org.employee.button.actived'),
|
|
|
+ label: this.$t(
|
|
|
+ 'platform.org.employee.button.actived'
|
|
|
+ ),
|
|
|
icon: 'ibps-icon-unlock',
|
|
|
hidden: (rowData, index) => {
|
|
|
if (rowData.status === 'actived') {
|
|
|
@@ -163,7 +256,9 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
key: 'disable',
|
|
|
- label: this.$t('platform.org.employee.button.disable'),
|
|
|
+ label: this.$t(
|
|
|
+ 'platform.org.employee.button.disable'
|
|
|
+ ),
|
|
|
icon: 'ibps-icon-ban',
|
|
|
hidden: function (rowData, index) {
|
|
|
if (rowData.status !== 'actived') {
|
|
|
@@ -179,13 +274,21 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
key: 'switchUser',
|
|
|
- label: this.$t('platform.org.employee.button.switchUser'),
|
|
|
+ label: this.$t(
|
|
|
+ 'platform.org.employee.button.switchUser'
|
|
|
+ ),
|
|
|
icon: 'el-icon-sort',
|
|
|
hidden: function (rowData, index) {
|
|
|
const userId = this.$store.getters.userId
|
|
|
const isSuper = this.$store.getters.isSuper
|
|
|
- const isTenantAdmin = this.$store.getters.isTenantAdmin
|
|
|
- return isTenantAdmin === true || rowData.status !== 'actived' || userId === rowData.id || !isSuper
|
|
|
+ const isTenantAdmin =
|
|
|
+ this.$store.getters.isTenantAdmin
|
|
|
+ return (
|
|
|
+ isTenantAdmin === true ||
|
|
|
+ rowData.status !== 'actived' ||
|
|
|
+ userId === rowData.id ||
|
|
|
+ !isSuper
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
@@ -198,8 +301,8 @@ export default {
|
|
|
positionsList: []
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- this.getOrg().then(res =>{
|
|
|
+ created () {
|
|
|
+ this.getOrg().then(res => {
|
|
|
this.loadData()
|
|
|
this.loadDisplayField()
|
|
|
})
|
|
|
@@ -214,40 +317,62 @@ export default {
|
|
|
switchUser: 'ibps/user/switchUser'
|
|
|
}),
|
|
|
// 加载数据
|
|
|
- loadData() {
|
|
|
+ loadData () {
|
|
|
this.loading = true
|
|
|
- queryPageList(this.getSearcFormData())
|
|
|
- .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)
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.loading = false
|
|
|
+ queryPageList(this.getSearcFormData()).then((response) => {
|
|
|
+ response.data.dataResult.forEach(item => {
|
|
|
+ if (item.positions) {
|
|
|
+ // 转换岗位名
|
|
|
+ const name = this.getPositionsName(item.positions)
|
|
|
+ this.$set(item, 'positionsName', name)
|
|
|
+ // 转换岗位路径
|
|
|
+ const path = this.getPositionsPath(item.positions)
|
|
|
+ console.log(path)
|
|
|
+ this.$set(item, 'positionsPath', path)
|
|
|
+ }
|
|
|
})
|
|
|
+ ActionUtils.handleListData(this, response.data)
|
|
|
+ this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ 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{
|
|
|
+ getPositionsName (valueList) {
|
|
|
+ const postList = valueList.split(',')
|
|
|
+ const list = []
|
|
|
+ if (!postList.length) {
|
|
|
return ''
|
|
|
}
|
|
|
+ postList.forEach((item) => {
|
|
|
+ const dataItem = this.positionsList.find(i => i.ID_ === item)
|
|
|
+ list.push(dataItem.NAME_)
|
|
|
+ })
|
|
|
+ return list.join(',')
|
|
|
+ },
|
|
|
+ getPositionsPath (valueList) {
|
|
|
+ console.log(valueList)
|
|
|
+ const postList = valueList.split(',')
|
|
|
+ const list = []
|
|
|
+ if (!postList.length) {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ postList.forEach((item) => {
|
|
|
+ const temp = this.positionsList.find(i => i.ID_ === item)
|
|
|
+ const pathList = temp ? temp.PATH_.split('.') : []
|
|
|
+ console.log(pathList)
|
|
|
+ let p = ''
|
|
|
+ pathList.filter(i => i).forEach(k => {
|
|
|
+ const t = this.positionsList.find(i => i.ID_ === k)
|
|
|
+ p += `${t.NAME_}.`
|
|
|
+ })
|
|
|
+ list.push(p)
|
|
|
+ })
|
|
|
+ return list.join('\r\n')
|
|
|
},
|
|
|
/**
|
|
|
* 获取格式化参数
|
|
|
*/
|
|
|
- getSearcFormData() {
|
|
|
+ getSearcFormData () {
|
|
|
const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
|
|
|
if (this.moreSearchParams) {
|
|
|
Object.assign(params, this.moreSearchParams)
|
|
|
@@ -257,14 +382,14 @@ export default {
|
|
|
/**
|
|
|
* 处理分页事件
|
|
|
*/
|
|
|
- handlePaginationChange(page) {
|
|
|
+ handlePaginationChange (page) {
|
|
|
ActionUtils.setPagination(this.pagination, page)
|
|
|
this.loadData()
|
|
|
},
|
|
|
/**
|
|
|
* 处理排序
|
|
|
*/
|
|
|
- handleSortChange(sort) {
|
|
|
+ handleSortChange (sort) {
|
|
|
ActionUtils.setSorts(this.sorts, sort)
|
|
|
this.loadData()
|
|
|
},
|
|
|
@@ -272,12 +397,12 @@ export default {
|
|
|
/**
|
|
|
* 获取显示字段
|
|
|
*/
|
|
|
- loadDisplayField() {
|
|
|
+ loadDisplayField () {
|
|
|
this.getCustomDataDisplay(this.listIdentity).then((data) => {
|
|
|
this.listConfig.displayFieldData = data
|
|
|
})
|
|
|
},
|
|
|
- handleHeaderDragend(newWidth, oldWidth, column, event) {
|
|
|
+ handleHeaderDragend (newWidth, oldWidth, column, event) {
|
|
|
const displayFieldData = this.listConfig.displayFieldData
|
|
|
for (let i = 0; i < displayFieldData.length; i++) {
|
|
|
const displayField = displayFieldData[i]
|
|
|
@@ -296,26 +421,24 @@ export default {
|
|
|
/**
|
|
|
* 保存显示字段
|
|
|
*/
|
|
|
- handleDisplayField(data, callback, hasMessage) {
|
|
|
- this.saveCustomDataDisplay(data, this.listIdentity)
|
|
|
- .then((response) => {
|
|
|
- if (hasMessage) ActionUtils.success(response.message)
|
|
|
- callback(true)
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- callback(false)
|
|
|
- })
|
|
|
+ handleDisplayField (data, callback, hasMessage) {
|
|
|
+ this.saveCustomDataDisplay(data, this.listIdentity).then((response) => {
|
|
|
+ if (hasMessage) ActionUtils.success(response.message)
|
|
|
+ callback(true)
|
|
|
+ }).catch(() => {
|
|
|
+ callback(false)
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* 查询
|
|
|
*/
|
|
|
- search() {
|
|
|
+ search () {
|
|
|
this.loadData()
|
|
|
},
|
|
|
/**
|
|
|
* 处理按钮事件
|
|
|
*/
|
|
|
- handleAction(buttonKey, position, selection, data) {
|
|
|
+ handleAction (buttonKey, position, selection, data) {
|
|
|
switch (buttonKey) {
|
|
|
case 'search': // 查询
|
|
|
ActionUtils.setFirstPagination(this.pagination)
|
|
|
@@ -323,40 +446,38 @@ export default {
|
|
|
break
|
|
|
case 'add': // 添加
|
|
|
this.handleEdit()
|
|
|
- this.title = this.$t('common.title.add', { title: this.$t('platform.org.employee.title') })
|
|
|
+ this.title = this.$t('common.title.add', {
|
|
|
+ title: this.$t('platform.org.employee.title')
|
|
|
+ })
|
|
|
this.span = 13
|
|
|
break
|
|
|
case 'edit': // 编辑
|
|
|
- ActionUtils.selectedRecord(selection)
|
|
|
- .then((id) => {
|
|
|
- this.handleEdit(id,false,'edit')
|
|
|
- this.title = this.$t('common.title.edit', { title: this.$t('platform.org.employee.title') })
|
|
|
- this.span = 13
|
|
|
+ ActionUtils.selectedRecord(selection).then((id) => {
|
|
|
+ this.handleEdit(id, false, 'edit')
|
|
|
+ this.title = this.$t('common.title.edit', {
|
|
|
+ title: this.$t('platform.org.employee.title')
|
|
|
})
|
|
|
- .catch(() => {})
|
|
|
+ this.span = 13
|
|
|
+ }).catch(() => {})
|
|
|
break
|
|
|
case 'changePassword': // 重置密码
|
|
|
- ActionUtils.selectedMultiRecord(selection)
|
|
|
- .then((ids) => {
|
|
|
- this.handlereChangePassword(ids)
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ ActionUtils.selectedMultiRecord(selection).then((ids) => {
|
|
|
+ this.handlereChangePassword(ids)
|
|
|
+ }).catch(() => {})
|
|
|
break
|
|
|
case 'detail': // 明细
|
|
|
- ActionUtils.selectedRecord(selection)
|
|
|
- .then((id) => {
|
|
|
- this.handleEdit(id, true, 'detail')
|
|
|
- this.span = 24
|
|
|
- this.title = this.$t('common.title.detail', { title: this.$t('platform.org.employee.title') })
|
|
|
+ ActionUtils.selectedRecord(selection).then((id) => {
|
|
|
+ this.handleEdit(id, true, 'detail')
|
|
|
+ this.span = 24
|
|
|
+ this.title = this.$t('common.title.detail', {
|
|
|
+ title: this.$t('platform.org.employee.title')
|
|
|
})
|
|
|
- .catch(() => {})
|
|
|
+ }).catch(() => {})
|
|
|
break
|
|
|
case 'remove': // 删除
|
|
|
- ActionUtils.removeRecord(selection)
|
|
|
- .then((ids) => {
|
|
|
- this.handleRemove(ids)
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ ActionUtils.removeRecord(selection).then((ids) => {
|
|
|
+ this.handleRemove(ids)
|
|
|
+ }).catch(() => {})
|
|
|
break
|
|
|
case 'actived': // 激活
|
|
|
this.handleActived(selection)
|
|
|
@@ -377,10 +498,10 @@ export default {
|
|
|
/**
|
|
|
* 处理更多
|
|
|
*/
|
|
|
- handleMoreSearchParams() {
|
|
|
+ handleMoreSearchParams () {
|
|
|
this.dialogMoreSearchVisible = true
|
|
|
},
|
|
|
- handleMoreSearchAction(data) {
|
|
|
+ handleMoreSearchAction (data) {
|
|
|
ActionUtils.setFirstPagination(this.pagination)
|
|
|
this.moreSearchParams = data
|
|
|
this.loadData()
|
|
|
@@ -388,7 +509,7 @@ export default {
|
|
|
/**
|
|
|
* 处理编辑
|
|
|
*/
|
|
|
- handleEdit(editId, readonly = false,type = 'add') {
|
|
|
+ handleEdit (editId, readonly = false, type = 'add') {
|
|
|
this.editId = editId || ''
|
|
|
this.formType = type
|
|
|
this.dialogFormVisible = true
|
|
|
@@ -397,30 +518,30 @@ export default {
|
|
|
/**
|
|
|
* 处理重置密码
|
|
|
*/
|
|
|
- handlereChangePassword(ids) {
|
|
|
+ handlereChangePassword (ids) {
|
|
|
this.changePasswordIds = ids
|
|
|
this.changePasswordVisible = true
|
|
|
},
|
|
|
- handleRemove(ids) {
|
|
|
+ handleRemove (ids) {
|
|
|
// 删除数据
|
|
|
remove({ employeeIds: ids }).then((response) => {
|
|
|
ActionUtils.removeSuccessMessage()
|
|
|
this.search()
|
|
|
})
|
|
|
},
|
|
|
- handleActived(id) {
|
|
|
+ handleActived (id) {
|
|
|
active({ employeeId: id }).then((response) => {
|
|
|
ActionUtils.successMessage('激活成功!')
|
|
|
this.search()
|
|
|
})
|
|
|
},
|
|
|
- handleDisable(id) {
|
|
|
+ handleDisable (id) {
|
|
|
disable({ employeeId: id }).then((response) => {
|
|
|
ActionUtils.successMessage('禁用成功!')
|
|
|
this.search()
|
|
|
})
|
|
|
},
|
|
|
- handleSwitchUser(username) {
|
|
|
+ handleSwitchUser (username) {
|
|
|
this.switchUser(username).then(() => {
|
|
|
ActionUtils.successMessage('切换用户成功!')
|
|
|
// 由于已经加载过设置 需要清空缓存设置
|
|
|
@@ -429,27 +550,23 @@ export default {
|
|
|
this.$router.replace('/')
|
|
|
})
|
|
|
},
|
|
|
- //获取组织的数据
|
|
|
- getOrg(){
|
|
|
+ // 获取组织的数据
|
|
|
+ getOrg () {
|
|
|
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
|
|
|
+ const sql = `select a.ID_ as ID_, a.NAME_ as NAME_, b.path_ as PATH_ FROM ibps_party_position a, ibps_party_entity b where a.id_ = b.id_`
|
|
|
+ this.$common.request('sql', sql).then((res) => {
|
|
|
+ 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()
|
|
|
- }
|
|
|
+ this.listConfig.searchForm.forms[3].options = datas
|
|
|
+ resolve()
|
|
|
})
|
|
|
-
|
|
|
})
|
|
|
-
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|