|
|
@@ -1,8 +1,36 @@
|
|
|
<template>
|
|
|
<div class="main-container">
|
|
|
- <ibps-crud ref="crud" :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" :index-row="false" :displayField="title" @action-event="handleAction" @sort-change="handleSortChange" @pagination-change="handlePaginationChange">
|
|
|
+ <ibps-crud
|
|
|
+ ref="crud"
|
|
|
+ :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"
|
|
|
+ :index-row="false"
|
|
|
+ :display-field="title"
|
|
|
+ @action-event="handleAction"
|
|
|
+ @sort-change="handleSortChange"
|
|
|
+ @pagination-change="handlePaginationChange"
|
|
|
+ >
|
|
|
<template slot="delegatorId">
|
|
|
- <ibps-employee-selector :value="searchDelegatorId" style="width: 200px" @input="getDelegatorId" />
|
|
|
+ <!-- <ibps-employee-selector :value="searchDelegatorId" style="width: 200px" @input="getDelegatorId" /> -->
|
|
|
+ <ibps-user-selector
|
|
|
+ v-model="searchDelegatorId"
|
|
|
+ :type="type"
|
|
|
+ :filter="filter"
|
|
|
+ :multiple="multiple"
|
|
|
+ :filtrate="filtrate"
|
|
|
+ :store="store"
|
|
|
+ :disabled="disabled"
|
|
|
+ :readonly-text="readonlyText"
|
|
|
+ placeholder="请选择代理人"
|
|
|
+ @change-link-data="callbackAgenterInfo"
|
|
|
+ />
|
|
|
</template>
|
|
|
</ibps-crud>
|
|
|
<edit :id="editId" :title="title" :visible="dialogFormVisible" :readonly="readonly" @callback="search" @close="(visible) => (dialogFormVisible = visible)" />
|
|
|
@@ -12,6 +40,7 @@
|
|
|
<script>
|
|
|
import IbpsEmployeeSelector from '@/business/platform/org/employee/selector'
|
|
|
import { queryPageList, remove, setEnable } from '@/api/platform/bpmn/bpmAgent'
|
|
|
+import ibpsUserSelector from '@/business/platform/org/selector'
|
|
|
import ActionUtils from '@/utils/action'
|
|
|
import FixHeight from '@/mixins/height'
|
|
|
import { statusOptions, agentTypeOptions } from './constants'
|
|
|
@@ -20,10 +49,11 @@ import Edit from './edit'
|
|
|
export default {
|
|
|
components: {
|
|
|
IbpsEmployeeSelector,
|
|
|
- Edit
|
|
|
+ Edit,
|
|
|
+ ibpsUserSelector
|
|
|
},
|
|
|
mixins: [FixHeight],
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
dialogFormVisible: false, // 弹窗
|
|
|
editId: '', // 编辑dialog需要使用
|
|
|
@@ -57,8 +87,6 @@ export default {
|
|
|
forms: [
|
|
|
// { prop: 'Q^TITLE_^SL', label: '标题' },
|
|
|
{
|
|
|
- //agenterId
|
|
|
- // prop: 'Q^DELEGATOR_ID_^S',
|
|
|
prop: 'Q^AGENTER_ID_^S',
|
|
|
label: '代理人',
|
|
|
fieldType: 'slot',
|
|
|
@@ -69,7 +97,7 @@ export default {
|
|
|
label: '是否启用',
|
|
|
fieldType: 'select',
|
|
|
options: statusOptions
|
|
|
- },
|
|
|
+ }
|
|
|
// {
|
|
|
// prop: 'Q^AGENT_TYPE_^S',
|
|
|
// label: '代理类型',
|
|
|
@@ -111,18 +139,39 @@ export default {
|
|
|
// key: 'detail'
|
|
|
// }]
|
|
|
// }
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 委托人和代理人 选择器修改通用选择器,需要这些参数
|
|
|
+ type: 'user',
|
|
|
+ filter: [{
|
|
|
+ descVal: '2',
|
|
|
+ includeSub: true,
|
|
|
+ old: 'position',
|
|
|
+ partyId: '',
|
|
|
+ partyName: '',
|
|
|
+ scriptContent: '',
|
|
|
+ type: 'user',
|
|
|
+ userType: 'position'
|
|
|
+ }],
|
|
|
+ multiple: false,
|
|
|
+ filtrate: true,
|
|
|
+ store: 'id',
|
|
|
+ disabled: false,
|
|
|
+ readonlyText: 'null'
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.loadData()
|
|
|
},
|
|
|
methods: {
|
|
|
- getDelegatorId(value) {
|
|
|
+ getDelegatorId (value) {
|
|
|
+ this.searchDelegatorId = value
|
|
|
+ },
|
|
|
+ callbackAgenterInfo (value, data, type) {
|
|
|
+ console.log(value)
|
|
|
this.searchDelegatorId = value
|
|
|
},
|
|
|
// 加载数据
|
|
|
- loadData() {
|
|
|
+ loadData () {
|
|
|
this.loading = true
|
|
|
queryPageList(this.getSearcFormData())
|
|
|
.then((response) => {
|
|
|
@@ -136,35 +185,35 @@ export default {
|
|
|
/**
|
|
|
* 获取格式化参数
|
|
|
*/
|
|
|
- getSearcFormData() {
|
|
|
+ getSearcFormData () {
|
|
|
const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
|
|
|
- params['Q^DELEGATOR_ID_^S'] = this.searchDelegatorId
|
|
|
+ params['Q^AGENTER_ID_^S'] = this.searchDelegatorId
|
|
|
return ActionUtils.formatParams(params, this.pagination, this.sorts)
|
|
|
},
|
|
|
/**
|
|
|
* 处理分页事件
|
|
|
*/
|
|
|
- handlePaginationChange(page) {
|
|
|
+ handlePaginationChange (page) {
|
|
|
ActionUtils.setPagination(this.pagination, page)
|
|
|
this.loadData()
|
|
|
},
|
|
|
/**
|
|
|
* 处理排序
|
|
|
*/
|
|
|
- handleSortChange(sort) {
|
|
|
+ handleSortChange (sort) {
|
|
|
ActionUtils.setSorts(this.sorts, sort)
|
|
|
this.loadData()
|
|
|
},
|
|
|
/**
|
|
|
* 查询
|
|
|
*/
|
|
|
- search() {
|
|
|
+ search () {
|
|
|
this.loadData()
|
|
|
},
|
|
|
/**
|
|
|
* 处理按钮事件
|
|
|
*/
|
|
|
- handleAction(command, position, selection, data) {
|
|
|
+ handleAction (command, position, selection, data) {
|
|
|
switch (command) {
|
|
|
case 'search': // 查询
|
|
|
ActionUtils.setFirstPagination(this.pagination)
|
|
|
@@ -210,7 +259,7 @@ export default {
|
|
|
/**
|
|
|
* 处理编辑。
|
|
|
*/
|
|
|
- handleEdit(id = '', readonly = false) {
|
|
|
+ handleEdit (id = '', readonly = false) {
|
|
|
this.editId = id
|
|
|
this.readonly = readonly
|
|
|
this.dialogFormVisible = true
|
|
|
@@ -218,7 +267,7 @@ export default {
|
|
|
/**
|
|
|
* 处理删除
|
|
|
*/
|
|
|
- handleRemove(ids) {
|
|
|
+ handleRemove (ids) {
|
|
|
remove({ ids: ids })
|
|
|
.then((response) => {
|
|
|
ActionUtils.removeSuccessMessage()
|
|
|
@@ -226,7 +275,7 @@ export default {
|
|
|
})
|
|
|
.catch(() => {})
|
|
|
},
|
|
|
- handleSetEnable(id, status) {
|
|
|
+ handleSetEnable (id, status) {
|
|
|
const params = { id: id, isEnabled: status }
|
|
|
setEnable(params)
|
|
|
.then((response) => {
|