cloud-module-bpm 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/babel.config.js +3 -0
- package/dist/cloud-module-bpm.common.js +104959 -0
- package/dist/cloud-module-bpm.common.js.map +1 -0
- package/dist/cloud-module-bpm.css +1 -0
- package/dist/cloud-module-bpm.umd.js +104969 -0
- package/dist/cloud-module-bpm.umd.js.map +1 -0
- package/dist/cloud-module-bpm.umd.min.js +48 -0
- package/dist/cloud-module-bpm.umd.min.js.map +1 -0
- package/dist/demo.html +10 -0
- package/dist/fonts/element-icons.535877f5.woff +0 -0
- package/dist/fonts/element-icons.732389de.ttf +0 -0
- package/examples/App.vue +221 -0
- package/examples/main.js +17 -0
- package/package.json +66 -0
- package/packages/bpm-back-anylink-dialog/bpm-back-anylink-dialog.vue +377 -0
- package/packages/bpm-back-anylink-dialog/index.js +7 -0
- package/packages/bpm-back-anylink-dialog/readme.md +1 -0
- package/packages/bpm-form-tools/bpm-form-tools.vue +216 -0
- package/packages/bpm-form-tools/index.js +7 -0
- package/packages/bpm-form-tools/readme.md +5 -0
- package/packages/bpm-grid-buttons/bpm-grid-buttons.vue +140 -0
- package/packages/bpm-grid-buttons/index.js +7 -0
- package/packages/bpm-grid-buttons/readme.md +5 -0
- package/packages/bpm-grid-buttons-new/bpm-grid-buttons-new.vue +189 -0
- package/packages/bpm-grid-buttons-new/index.js +7 -0
- package/packages/bpm-grid-buttons-new/readme.md +8 -0
- package/packages/bpm-jump-dialog/bpm-jump-dialog.vue +311 -0
- package/packages/bpm-jump-dialog/index.js +7 -0
- package/packages/bpm-jump-dialog/readme.md +1 -0
- package/packages/bpm-jump-latest-dialog/Tree.vue +91 -0
- package/packages/bpm-jump-latest-dialog/bpm-jump-latest-dialog.vue +453 -0
- package/packages/bpm-jump-latest-dialog/index.js +7 -0
- package/packages/bpm-jump-latest-dialog/readme.md +1 -0
- package/packages/bpm-opinion-dialog/bpm-opinion.vue +291 -0
- package/packages/bpm-opinion-dialog/index.js +7 -0
- package/packages/bpm-proctrack-dialog/bpm-proctrack.vue +102 -0
- package/packages/bpm-proctrack-dialog/index.js +7 -0
- package/packages/bpm-send-read-dialog/SelectedGrid.vue +99 -0
- package/packages/bpm-send-read-dialog/SourceGrid.vue +396 -0
- package/packages/bpm-send-read-dialog/Tree.vue +74 -0
- package/packages/bpm-send-read-dialog/bpm-next-node.vue +51 -0
- package/packages/bpm-send-read-dialog/bpm-send-read.vue +100 -0
- package/packages/bpm-send-read-dialog/index.js +7 -0
- package/packages/bpm-send-read-opinion-dialog/bpm-send-read-opinion.vue +261 -0
- package/packages/bpm-send-read-opinion-dialog/index.js +7 -0
- package/packages/bpm-sign-dialog/SelectedGrid.vue +102 -0
- package/packages/bpm-sign-dialog/SourceGrid.vue +413 -0
- package/packages/bpm-sign-dialog/Tree.vue +197 -0
- package/packages/bpm-sign-dialog/bpm-next-node.vue +57 -0
- package/packages/bpm-sign-dialog/bpm-sign-select.vue +116 -0
- package/packages/bpm-sign-dialog/index.js +7 -0
- package/packages/bpm-sign-opinion-dialog/bpm-sign-opinion.vue +259 -0
- package/packages/bpm-sign-opinion-dialog/index.js +7 -0
- package/packages/bpm-user-select-dialog/SelectedGrid.vue +155 -0
- package/packages/bpm-user-select-dialog/SourceGrid.vue +419 -0
- package/packages/bpm-user-select-dialog/Tree.vue +98 -0
- package/packages/bpm-user-select-dialog/bpm-next-node.vue +51 -0
- package/packages/bpm-user-select-dialog/bpm-user-select.vue +108 -0
- package/packages/bpm-user-select-dialog/index.js +7 -0
- package/packages/i18n/i18n.js +15 -0
- package/packages/i18n/langs/en_US.js +42 -0
- package/packages/i18n/langs/index.js +6 -0
- package/packages/i18n/langs/zh_CN.js +86 -0
- package/packages/index.js +48 -0
- package/packages/utils/merit-bpm.js +900 -0
- package/public/favicon.ico +0 -0
- package/vue.config.js +55 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-row style="float:left;padding:11px 7px 3px 9px;">{{
|
|
4
|
+
$t('base.selected_list')
|
|
5
|
+
}}</el-row>
|
|
6
|
+
<el-table
|
|
7
|
+
:data="tableData"
|
|
8
|
+
stripe
|
|
9
|
+
:height="tableHeight"
|
|
10
|
+
style="width: 100%;"
|
|
11
|
+
@row-click="handleRowClick"
|
|
12
|
+
:element-loading-text="$t('base.table.loading')"
|
|
13
|
+
element-loading-spinner="el-icon-loading"
|
|
14
|
+
>
|
|
15
|
+
<el-table-column prop="name" :label="$t('base.user.name')" fit="true">
|
|
16
|
+
<template slot-scope="scope">
|
|
17
|
+
<div :title="scope.row.name" class="cell-hidden">
|
|
18
|
+
{{ scope.row.name }}
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
</el-table-column>
|
|
22
|
+
<el-table-column
|
|
23
|
+
prop="code"
|
|
24
|
+
:label="$t('base.user.user_name')"
|
|
25
|
+
fit="true"
|
|
26
|
+
>
|
|
27
|
+
<template slot-scope="scope">
|
|
28
|
+
<div :title="scope.row.code" class="cell-hidden">
|
|
29
|
+
{{ scope.row.code }}
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
</el-table-column>
|
|
33
|
+
<el-table-column prop="deptName" :label="$t('base.dept.name')" fit="true">
|
|
34
|
+
<template slot-scope="scope">
|
|
35
|
+
<div :title="scope.row.deptName" class="cell-hidden">
|
|
36
|
+
{{ scope.row.deptName }}
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
</el-table-column>
|
|
40
|
+
</el-table>
|
|
41
|
+
<el-pagination
|
|
42
|
+
class="SelectedGrid"
|
|
43
|
+
@current-change="handleCurrentChange"
|
|
44
|
+
:current-page="currentPage"
|
|
45
|
+
:page-size="pagesize"
|
|
46
|
+
layout="total, prev, pager, next"
|
|
47
|
+
:total="total"
|
|
48
|
+
></el-pagination>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
import { Row, Table, TableColumn, Pagination } from 'element-ui';
|
|
54
|
+
export default {
|
|
55
|
+
props: {
|
|
56
|
+
opt: {
|
|
57
|
+
type: Object,
|
|
58
|
+
required: true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
components: {
|
|
62
|
+
'el-row': Row,
|
|
63
|
+
'el-table': Table,
|
|
64
|
+
'el-table-column': TableColumn,
|
|
65
|
+
'el-pagination': Pagination
|
|
66
|
+
},
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
tableHeight: 375,
|
|
70
|
+
tableData: [],
|
|
71
|
+
currentPage: 1,
|
|
72
|
+
pagesize: 10,
|
|
73
|
+
total: 0,
|
|
74
|
+
tempTableData:[]
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
created() {
|
|
78
|
+
let _this = this;
|
|
79
|
+
// this.tableHeight = window.outerHeight > 900 ? 430 : 310;
|
|
80
|
+
this.tableData = [];
|
|
81
|
+
this.EventBus.$on(
|
|
82
|
+
'refresh-selected-grid' + this.opt.taskDeKey,
|
|
83
|
+
selectData => {
|
|
84
|
+
_this.tempTableData = selectData;
|
|
85
|
+
// 每次重发数据默认显示第一页
|
|
86
|
+
_this.currentPage = 1;
|
|
87
|
+
_this.total = _this.tempTableData.length;
|
|
88
|
+
_this.tableData = _this.tempTableData.slice(
|
|
89
|
+
_this.pagesize * (_this.currentPage - 1),
|
|
90
|
+
_this.pagesize * _this.currentPage
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
},
|
|
95
|
+
watch: {
|
|
96
|
+
opt(old, newVal) {
|
|
97
|
+
this.tableData = [];
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
//行单击事件只有单人审批是选人才生效,其他审批方式,通过checkbox生效
|
|
102
|
+
handleRowClick(row, event, column) {
|
|
103
|
+
let _this = this;
|
|
104
|
+
// 删除掉临时数组中点击的元素
|
|
105
|
+
_this.tempTableData = _this.tempTableData.filter(t => t.code != row.code);
|
|
106
|
+
// 重新修改total值
|
|
107
|
+
_this.total = _this.tempTableData.length;
|
|
108
|
+
|
|
109
|
+
// 重新给currentPage赋值 若当前页数据等于0时,修改为上一页,若只剩一页则是第一页
|
|
110
|
+
if(_this.tempTableData.slice(
|
|
111
|
+
_this.pagesize * (_this.currentPage - 1),
|
|
112
|
+
_this.pagesize * _this.currentPage
|
|
113
|
+
).length == 0) {
|
|
114
|
+
_this.currentPage = _this.currentPage > 1 ? _this.currentPage-1 : 1;
|
|
115
|
+
}
|
|
116
|
+
_this.tableData = _this.tempTableData.slice(
|
|
117
|
+
_this.pagesize * (_this.currentPage - 1),
|
|
118
|
+
_this.pagesize * _this.currentPage
|
|
119
|
+
);
|
|
120
|
+
this.EventBus.$emit('cancel-seleced-user' + this.opt.taskDeKey, row);
|
|
121
|
+
},
|
|
122
|
+
//页码变化时调用
|
|
123
|
+
handleCurrentChange(val) {
|
|
124
|
+
let _this = this;
|
|
125
|
+
_this.currentPage = val;
|
|
126
|
+
_this.tableData = _this.tempTableData.slice(
|
|
127
|
+
_this.pagesize * (_this.currentPage - 1),
|
|
128
|
+
_this.pagesize * _this.currentPage
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
</script>
|
|
134
|
+
<style scoped>
|
|
135
|
+
.el-table--scrollable-x .el-table__body-wrapper {
|
|
136
|
+
overflow-x: hidden;
|
|
137
|
+
}
|
|
138
|
+
.el-table__empty-block {
|
|
139
|
+
width: 100%;
|
|
140
|
+
}
|
|
141
|
+
.el-table th {
|
|
142
|
+
background-color: #fff;
|
|
143
|
+
}
|
|
144
|
+
.el-pagination {
|
|
145
|
+
position: unset !important;
|
|
146
|
+
}
|
|
147
|
+
.el-pagination {
|
|
148
|
+
position: absolute;
|
|
149
|
+
right: 40px;
|
|
150
|
+
margin: 10px auto;
|
|
151
|
+
}
|
|
152
|
+
.SelectedGrid .el-pager li {
|
|
153
|
+
min-width: 20px !important;
|
|
154
|
+
}
|
|
155
|
+
</style>
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-row justify="space-between" style="padding: 5px;">
|
|
4
|
+
<el-col
|
|
5
|
+
:span="7"
|
|
6
|
+
style="float: left;padding-right: 40px;margin-top: 5px;padding-left: 2px;"
|
|
7
|
+
>{{ $t('base.list_alternatives') }}</el-col
|
|
8
|
+
>
|
|
9
|
+
<el-col :span="17" style="float:right;" v-if="opt.showSearch">
|
|
10
|
+
<el-input
|
|
11
|
+
placeholder="请输入姓名或编码"
|
|
12
|
+
v-model="searchName"
|
|
13
|
+
clearable
|
|
14
|
+
@change="requestGridData"
|
|
15
|
+
>
|
|
16
|
+
<el-button
|
|
17
|
+
class="el-icon-search-button"
|
|
18
|
+
slot="append"
|
|
19
|
+
icon="el-icon-search"
|
|
20
|
+
@click="requestGridData"
|
|
21
|
+
></el-button>
|
|
22
|
+
</el-input>
|
|
23
|
+
</el-col>
|
|
24
|
+
</el-row>
|
|
25
|
+
<el-table
|
|
26
|
+
ref="sourceGrid"
|
|
27
|
+
:data="empTableData"
|
|
28
|
+
stripe
|
|
29
|
+
:height="tableHeight"
|
|
30
|
+
style="width: 100%;"
|
|
31
|
+
:element-loading-text="$t('base.table.loading')"
|
|
32
|
+
element-loading-spinner="el-icon-loading"
|
|
33
|
+
element-loading-background="rgba(255, 255, 255, 0.8)"
|
|
34
|
+
@select-all="handleSelectAll"
|
|
35
|
+
@select="handleSelect"
|
|
36
|
+
@row-click="handleRowClick"
|
|
37
|
+
>
|
|
38
|
+
<div class=""></div>
|
|
39
|
+
<el-table-column
|
|
40
|
+
style="height: 18px"
|
|
41
|
+
type="selection"
|
|
42
|
+
v-if="notOnlyApprove"
|
|
43
|
+
></el-table-column>
|
|
44
|
+
<el-table-column prop="name" :label="$t('base.user.name')" fit="true">
|
|
45
|
+
<template slot-scope="scope">
|
|
46
|
+
<div :title="scope.row.name" class="cell-hidden">
|
|
47
|
+
{{ scope.row.name }}
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
</el-table-column>
|
|
51
|
+
<el-table-column
|
|
52
|
+
prop="code"
|
|
53
|
+
:label="$t('base.user.user_name')"
|
|
54
|
+
fit="true"
|
|
55
|
+
>
|
|
56
|
+
<template slot-scope="scope">
|
|
57
|
+
<div :title="scope.row.code" class="cell-hidden">
|
|
58
|
+
{{ scope.row.code }}
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
</el-table-column>
|
|
62
|
+
<el-table-column prop="deptName" :label="$t('base.dept.name')" fit="true">
|
|
63
|
+
<template slot-scope="scope">
|
|
64
|
+
<div :title="scope.row.deptName" class="cell-hidden">
|
|
65
|
+
{{ scope.row.deptName }}
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
</el-table-column>
|
|
69
|
+
</el-table>
|
|
70
|
+
<el-pagination
|
|
71
|
+
class="SourceGrid"
|
|
72
|
+
@size-change="handleSizeChange"
|
|
73
|
+
@current-change="handleCurrentChange"
|
|
74
|
+
:current-page="currentPage"
|
|
75
|
+
:page-size="pageSize"
|
|
76
|
+
layout="total, prev, pager, next"
|
|
77
|
+
:total="empTotal"
|
|
78
|
+
:pager-count="pagerCount"
|
|
79
|
+
></el-pagination>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<script>
|
|
84
|
+
import {
|
|
85
|
+
Main,
|
|
86
|
+
Container,
|
|
87
|
+
Row,
|
|
88
|
+
Col,
|
|
89
|
+
Table,
|
|
90
|
+
TableColumn,
|
|
91
|
+
Pagination,
|
|
92
|
+
Input,
|
|
93
|
+
Button
|
|
94
|
+
} from 'element-ui';
|
|
95
|
+
import axios from 'cloud-module-base/packages/httpConfig/http';
|
|
96
|
+
export default {
|
|
97
|
+
props: {
|
|
98
|
+
opt: {
|
|
99
|
+
type: Object,
|
|
100
|
+
required: true
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
components: {
|
|
104
|
+
'el-main': Main,
|
|
105
|
+
'el-container': Container,
|
|
106
|
+
'el-row': Row,
|
|
107
|
+
'el-col': Col,
|
|
108
|
+
'el-table': Table,
|
|
109
|
+
'el-table-column': TableColumn,
|
|
110
|
+
'el-pagination': Pagination,
|
|
111
|
+
'el-input': Input,
|
|
112
|
+
'el-button': Button
|
|
113
|
+
},
|
|
114
|
+
data() {
|
|
115
|
+
return {
|
|
116
|
+
empUrl: '/api/identity/bpm-user/list-by-deptcode', //人员数据接口
|
|
117
|
+
searchName: '',
|
|
118
|
+
multipleSelection: [],
|
|
119
|
+
tableHeight: 375,
|
|
120
|
+
currentPage: 1,
|
|
121
|
+
pageSize: 10,
|
|
122
|
+
pagerCount: 5,
|
|
123
|
+
treeNode: {},
|
|
124
|
+
empTableData: [],
|
|
125
|
+
sourceAllData: [],
|
|
126
|
+
empTotal: 0,
|
|
127
|
+
loading: false,
|
|
128
|
+
receiverIds: []
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
computed: {
|
|
132
|
+
//是否是单人审批,如果不是单人审批则展示多选框
|
|
133
|
+
notOnlyApprove() {
|
|
134
|
+
return this.opt.approve.type != 'onlyApprove';
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
created() {
|
|
138
|
+
// this.tableHeight = window.outerHeight > 900 ? 385 : 265;
|
|
139
|
+
this.opt.bpmUsers.forEach(bpmUser => {
|
|
140
|
+
this.receiverIds.push(bpmUser.code);
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
watch: {
|
|
144
|
+
opt(old, newVal) {
|
|
145
|
+
this.empTotal = this.opt.bpmUsers.length;
|
|
146
|
+
|
|
147
|
+
this.empTableData = this.sourceAllData.slice(
|
|
148
|
+
this.pageSize * (this.currentPage - 1),
|
|
149
|
+
this.pageSize * this.currentPage
|
|
150
|
+
);
|
|
151
|
+
this.opt.bpmUsers.forEach(bpmUser => {
|
|
152
|
+
this.receiverIds.push(bpmUser.code);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
//加载时调用方法 函数
|
|
157
|
+
mounted() {
|
|
158
|
+
let _this = this;
|
|
159
|
+
|
|
160
|
+
// 初始化选择数据分页
|
|
161
|
+
this.sourceAllData = this.opt.bpmUsers;
|
|
162
|
+
if (!this.treeNode.code) {
|
|
163
|
+
this.resultDataChange();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
this.empTotal = this.opt.bpmUsers.length;
|
|
167
|
+
//点击树节点,刷新待选列表
|
|
168
|
+
this.EventBus.$on('refresh-source-grid' + this.opt.taskDeKey, treeNode => {
|
|
169
|
+
_this.pageSize = 10;
|
|
170
|
+
_this.currentPage = 1;
|
|
171
|
+
_this.treeNode = treeNode.attributes || treeNode;
|
|
172
|
+
_this.requestGridData();
|
|
173
|
+
});
|
|
174
|
+
//点击已选列表,取消刷新列表选择
|
|
175
|
+
this.EventBus.$on('cancel-seleced-user' + this.opt.taskDeKey, row => {
|
|
176
|
+
_this.cancelSelecedUser(row);
|
|
177
|
+
});
|
|
178
|
+
//监听保存按钮事件。点击后,清除已选择处理人对象
|
|
179
|
+
this.EventBus.$on('save-button-click', function() {
|
|
180
|
+
_this.searchName = '';
|
|
181
|
+
_this.currentPage = 1;
|
|
182
|
+
_this.multipleSelection = [];
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
methods: {
|
|
186
|
+
//每页显示数据个数变化时调用
|
|
187
|
+
handleSizeChange(val) {
|
|
188
|
+
this.pageSize = val;
|
|
189
|
+
//点击过tree,this.treeNode.code有值进行分页
|
|
190
|
+
if (this.treeNode.code) {
|
|
191
|
+
this.requestGridData();
|
|
192
|
+
} else {
|
|
193
|
+
//未点击tree进行分页
|
|
194
|
+
this.resultDataChange();
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
//页码变化时调用
|
|
198
|
+
handleCurrentChange(val) {
|
|
199
|
+
this.currentPage = val;
|
|
200
|
+
if (this.treeNode.code) {
|
|
201
|
+
this.requestGridData();
|
|
202
|
+
} else {
|
|
203
|
+
this.resultDataChange();
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
//判断是否是选择一条数据还是取消选择
|
|
207
|
+
selectRow(select, row) {
|
|
208
|
+
return select.some(element => {
|
|
209
|
+
if (element.code == row.code) {
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
},
|
|
214
|
+
resultDataChange() {
|
|
215
|
+
if (this.sourceAllData) {
|
|
216
|
+
var result = this.sourceAllData.slice(
|
|
217
|
+
this.pageSize * (this.currentPage - 1),
|
|
218
|
+
this.pageSize * this.currentPage
|
|
219
|
+
);
|
|
220
|
+
this.empTableData = result;
|
|
221
|
+
} else {
|
|
222
|
+
this.empTableData = [];
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
//判断是否已经选择该条数据
|
|
226
|
+
indexOfMultipleSelection(row) {
|
|
227
|
+
let index = -1;
|
|
228
|
+
for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
229
|
+
const element = this.multipleSelection[i];
|
|
230
|
+
if (element.code == row.code) {
|
|
231
|
+
index = i;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return index;
|
|
235
|
+
},
|
|
236
|
+
//行单击事件只有单人审批是选人才生效,其他审批方式,通过checkbox生效
|
|
237
|
+
handleRowClick(row, event, column) {
|
|
238
|
+
let _this = this;
|
|
239
|
+
let index = this.indexOfMultipleSelection(row);
|
|
240
|
+
if (this.notOnlyApprove) {
|
|
241
|
+
this.$refs.sourceGrid.toggleRowSelection(row);
|
|
242
|
+
if (index != -1) {
|
|
243
|
+
this.multipleSelection.splice(index, 1);
|
|
244
|
+
} else {
|
|
245
|
+
this.multipleSelection.push(row);
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
this.multipleSelection.forEach(element => {
|
|
249
|
+
_this.$refs.sourceGrid.toggleRowSelection(element, false);
|
|
250
|
+
});
|
|
251
|
+
this.multipleSelection = [];
|
|
252
|
+
if (index == -1) {
|
|
253
|
+
this.$refs.sourceGrid.toggleRowSelection(row, true);
|
|
254
|
+
this.multipleSelection.push(row);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
let dealUserCodes = [];
|
|
258
|
+
this.multipleSelection.forEach(element => {
|
|
259
|
+
dealUserCodes.push(element.code);
|
|
260
|
+
});
|
|
261
|
+
this.EventBus.$emit(
|
|
262
|
+
'refresh-selected-grid' + this.opt.taskDeKey,
|
|
263
|
+
this.multipleSelection
|
|
264
|
+
);
|
|
265
|
+
this.EventBus.$emit('update-selected-user', {
|
|
266
|
+
nodekey: this.opt.taskDeKey + '_' + this.opt.approve.type,
|
|
267
|
+
dealUserCodes: dealUserCodes.join(',')
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
handleSelect(select, row) {
|
|
271
|
+
if (this.selectRow(select, row)) {
|
|
272
|
+
if (this.indexOfMultipleSelection(row) == -1) {
|
|
273
|
+
this.multipleSelection.push(row);
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
let index = this.indexOfMultipleSelection(row);
|
|
277
|
+
if (index != -1) {
|
|
278
|
+
this.multipleSelection.splice(index, 1);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
let dealUserCodes = [];
|
|
282
|
+
this.multipleSelection.forEach(element => {
|
|
283
|
+
dealUserCodes.push(element.code);
|
|
284
|
+
});
|
|
285
|
+
this.EventBus.$emit(
|
|
286
|
+
'refresh-selected-grid' + this.opt.taskDeKey,
|
|
287
|
+
this.multipleSelection
|
|
288
|
+
);
|
|
289
|
+
this.EventBus.$emit('update-selected-user', {
|
|
290
|
+
nodekey: this.opt.taskDeKey + '_' + this.opt.approve.type,
|
|
291
|
+
dealUserCodes: dealUserCodes.join(',')
|
|
292
|
+
});
|
|
293
|
+
},
|
|
294
|
+
handleSelectAll(selection) {
|
|
295
|
+
let _this = this;
|
|
296
|
+
if (selection == 0) {
|
|
297
|
+
this.empTableData.forEach(row => {
|
|
298
|
+
let index = _this.indexOfMultipleSelection(row);
|
|
299
|
+
if (index != -1) {
|
|
300
|
+
_this.multipleSelection.splice(index, 1);
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
} else {
|
|
304
|
+
selection.forEach(row => {
|
|
305
|
+
if (_this.indexOfMultipleSelection(row) == -1) {
|
|
306
|
+
_this.multipleSelection.push(row);
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
let dealUserCodes = [];
|
|
311
|
+
this.multipleSelection.forEach(element => {
|
|
312
|
+
dealUserCodes.push(element.code);
|
|
313
|
+
});
|
|
314
|
+
this.EventBus.$emit(
|
|
315
|
+
'refresh-selected-grid' + this.opt.taskDeKey,
|
|
316
|
+
this.multipleSelection
|
|
317
|
+
);
|
|
318
|
+
this.EventBus.$emit('update-selected-user', {
|
|
319
|
+
nodekey: this.opt.taskDeKey + '_' + this.opt.approve.type,
|
|
320
|
+
dealUserCodes: dealUserCodes.join(',')
|
|
321
|
+
});
|
|
322
|
+
},
|
|
323
|
+
//请求数据
|
|
324
|
+
requestGridData() {
|
|
325
|
+
let _this = this;
|
|
326
|
+
let param = {
|
|
327
|
+
page: this.currentPage,
|
|
328
|
+
rows: this.pageSize,
|
|
329
|
+
deptCode: this.treeNode.code,
|
|
330
|
+
name: this.searchName,
|
|
331
|
+
userNames: this.receiverIds.join(',')
|
|
332
|
+
};
|
|
333
|
+
axios['bpm-engine']
|
|
334
|
+
.post(this.empUrl, param)
|
|
335
|
+
.then(function(res) {
|
|
336
|
+
if (res.success) {
|
|
337
|
+
_this.empTableData = res.data.rows;
|
|
338
|
+
_this.empTotal = res.data.total;
|
|
339
|
+
//必须等列表重新渲染完毕,才能执行此方法。
|
|
340
|
+
setTimeout(function() {
|
|
341
|
+
_this.setRowStatus();
|
|
342
|
+
}, 100);
|
|
343
|
+
}
|
|
344
|
+
_this.loading = false;
|
|
345
|
+
})
|
|
346
|
+
.catch(function(err) {
|
|
347
|
+
console.log(err);
|
|
348
|
+
});
|
|
349
|
+
},
|
|
350
|
+
setRowStatus() {
|
|
351
|
+
let _this = this;
|
|
352
|
+
this.empTableData.forEach(row => {
|
|
353
|
+
let index = _this.indexOfMultipleSelection(row);
|
|
354
|
+
if (index != -1) {
|
|
355
|
+
_this.$refs.sourceGrid.toggleRowSelection(row, true);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
},
|
|
359
|
+
cancelSelecedUser(row) {
|
|
360
|
+
let index = this.indexOfMultipleSelection(row);
|
|
361
|
+
if (index != -1) {
|
|
362
|
+
this.multipleSelection.splice(index, 1);
|
|
363
|
+
}
|
|
364
|
+
this.$refs.sourceGrid.toggleRowSelection(row);
|
|
365
|
+
let dealUserCodes = [];
|
|
366
|
+
this.multipleSelection.forEach(element => {
|
|
367
|
+
dealUserCodes.push(element.code);
|
|
368
|
+
});
|
|
369
|
+
this.EventBus.$emit('update-selected-user', {
|
|
370
|
+
nodekey: this.opt.taskDeKey + '_' + this.opt.approve.type,
|
|
371
|
+
dealUserCodes: dealUserCodes.join(',')
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
</script>
|
|
377
|
+
<style lang="less">
|
|
378
|
+
.el-pagination {
|
|
379
|
+
position: unset !important;
|
|
380
|
+
}
|
|
381
|
+
.el-table__empty-block {
|
|
382
|
+
width: 100%;
|
|
383
|
+
overflow-x: hidden;
|
|
384
|
+
}
|
|
385
|
+
.el-pagination {
|
|
386
|
+
position: absolute;
|
|
387
|
+
right: 40px;
|
|
388
|
+
margin: 5px auto;
|
|
389
|
+
}
|
|
390
|
+
.el-table th {
|
|
391
|
+
background-color: #fff;
|
|
392
|
+
}
|
|
393
|
+
.table-tools-btn {
|
|
394
|
+
float: left;
|
|
395
|
+
margin-top: 5px;
|
|
396
|
+
padding-right: 40px;
|
|
397
|
+
padding-left: 2px;
|
|
398
|
+
}
|
|
399
|
+
.el-icon-search-button {
|
|
400
|
+
padding: 0 10px;
|
|
401
|
+
margin: -17px -17px;
|
|
402
|
+
}
|
|
403
|
+
.filter-tree {
|
|
404
|
+
width: 100%;
|
|
405
|
+
}
|
|
406
|
+
.span-ellipsis {
|
|
407
|
+
text-align: left;
|
|
408
|
+
width: 100%;
|
|
409
|
+
overflow: hidden;
|
|
410
|
+
white-space: nowrap;
|
|
411
|
+
text-overflow: ellipsis;
|
|
412
|
+
}
|
|
413
|
+
.el-table--scrollable-x .el-table__body-wrapper {
|
|
414
|
+
overflow-x: hidden !important;
|
|
415
|
+
}
|
|
416
|
+
.el-table th {
|
|
417
|
+
background-color: #fff;
|
|
418
|
+
}
|
|
419
|
+
</style>
|