cloud-web-corejs 1.0.54-dev.47 → 1.0.54-dev.48

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.
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <div>
3
+ <companyInfoDialog v-if="showCompanyInfoDialog" :visiable.sync="showCompanyInfoDialog"
4
+ :title="$t1('批量设置表单流程类型')"
5
+ :beforeConfirm="beforeConfirmCompanyInfoDialog"
6
+ :beforeCancel="beforeCloseCompanyInfoDialog"
7
+ @confirm="confirmCompanyInfoDialog"></companyInfoDialog>
8
+ <el-dialog
9
+ ref="importDialog"
10
+ :title="$t1('批量设置企业流程对象')"
11
+ :append-to-body="falseValue"
12
+ :modal-append-to-body="falseValue"
13
+ :close-on-click-modal="falseValue"
14
+ :visible.sync="showImportDialog2"
15
+ :modal="falseValue"
16
+ custom-class="dialog-style"
17
+ width="501px"
18
+ height="250px"
19
+ @close="dialogClose2"
20
+ v-el-drag-dialog
21
+ >
22
+ <div>
23
+ <div class="import-box">
24
+ <div class="i-status" style="margin-top: 14px;">
25
+ <div class="item">
26
+ <i class="el-icon-success f-green"></i>
27
+ {{ $t2('成功', 'components.excelImport.success') }}:
28
+ <span class="successNum" @click="showSuccessResult">{{ totalSuccessNum }}</span>
29
+ </div>
30
+ <div class="item">
31
+ <i class="el-icon-error f-red"></i>
32
+ {{ $t2('失败', 'components.excelImport.fail') }}:
33
+ <span class="failNum" @click="showErrorResult">{{ totalErrorNum }}</span>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <div slot="footer" class="dialog-footer" center="true">
39
+ <div class="fl import-count">
40
+ <span class="f-red doneNum">{{ doneSize }}</span>
41
+ /
42
+ <span class="dataSize">{{ dataSize }}</span>
43
+ </div>
44
+ <el-button type="primary" plain class="button-sty" @click="dialogClose2">
45
+ <i class="el-icon-close el-icon"></i>
46
+ {{ $t1('取 消') }}
47
+ </el-button>
48
+ <el-button type="primary" class="button-sty" @click="dialogPrimary2">
49
+ <i class="el-icon-check el-icon"></i>
50
+ {{ $t1('确 定') }}
51
+ </el-button>
52
+ </div>
53
+ </el-dialog>
54
+ <el-dialog
55
+ :title="$t1(resultType==1?'结果(成功)':'结果(失败)')"
56
+ :append-to-body="true"
57
+ :modal-append-to-body="true"
58
+ :close-on-click-modal="falseValue"
59
+ :visible.sync="showImportResult"
60
+ :modal="falseValue"
61
+ custom-class="dialog-style list-dialog"
62
+ width="1200px"
63
+ v-el-drag-dialog
64
+ >
65
+ <div>
66
+ <div class="box-style">
67
+ <div class="cont">
68
+ <div class="table-div">
69
+ <vxe-grid
70
+ id="resGrid"
71
+ ref="resGrid"
72
+ height="440px"
73
+ v-bind="resOption"
74
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
75
+ @custom="$vxeTableUtil.customHandle"
76
+ >
77
+ <template #form>
78
+ <div class="clearfix screen-btns">
79
+ <div class="fl">
80
+ <vxe-button status="primary" class="button-sty" icon="el-icon-upload2" @click="exportToExcel()">
81
+ {{ $t1('导出') }}
82
+ </vxe-button>
83
+ </div>
84
+ <div class="fr"></div>
85
+ </div>
86
+ </template>
87
+ </vxe-grid>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </el-dialog>
93
+ </div>
94
+ </template>
95
+
96
+ <script>
97
+ import {mixins} from './mixins/batchWfObjConfigDialog';
98
+ import companyInfoDialog from "@base/views/user/company_info/dialog.vue";
99
+
100
+
101
+ export default {
102
+ mixins: [mixins],
103
+ components: {companyInfoDialog}
104
+ };
105
+ </script>
@@ -17,7 +17,9 @@
17
17
  <template #form>
18
18
  <tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
19
19
  <template #buttonLeft>
20
-
20
+ <vxe-button icon="el-icon-brush" class="button-sty" @click="openBatchWfObjConfigDialog" type="text" status="primary"
21
+ plain>{{ $t1('批量设置企业流程对象') }}
22
+ </vxe-button>
21
23
  </template>
22
24
  <template #buttonRight>
23
25
  <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
@@ -27,20 +29,21 @@
27
29
  {{ $t1('搜索') }}
28
30
  </vxe-button>
29
31
  </template>
30
- <template #tag>
31
- <vxe-form-item :title="$t1('项目标签') + ':'" field="tag">
32
+ <template #menuKindName>
33
+ <vxe-form-item :title="$t1('表单分类') + ':'" field="menuKindName">
32
34
  <template v-slot>
33
35
  <el-input
34
36
  class="search-input"
35
37
  max="200"
36
- :value="getTabNames()"
38
+ v-model="formData.menuKindName"
37
39
  @clear="
38
- checkTags = [];
39
- "
40
+ formData.menuKindName = null;
41
+ formData.menuKindCode = null;
42
+ "
40
43
  v-el-readonly
41
44
  clearable
42
45
  >
43
- <i slot="suffix" class="el-input__icon el-icon-search" @click="openProjectTagDialog3"></i>
46
+ <i slot="suffix" class="el-input__icon el-icon-search" @click="showMenuKindDialog=true"></i>
44
47
  </el-input>
45
48
  </template>
46
49
  </vxe-form-item>
@@ -63,7 +66,8 @@
63
66
  :closable="true">
64
67
  <editView v-if="tab.showContent" :_dataId="tab.dataId" :currentFormType="currentFormType"
65
68
  :parent-target="_self"
66
- @reload="reloadTabContent" @openDesignDialog="openDesingerDialogByChild" :readonly="true"></editView>
69
+ @reload="reloadTabContent" @openDesignDialog="openDesingerDialogByChild"
70
+ :readonly="true"></editView>
67
71
  </el-tab-pane>
68
72
  </template>
69
73
  </x-tabs>
@@ -94,44 +98,30 @@
94
98
  </el-drawer>
95
99
  <wfObjConfigDialog v-if="showWfObjConfigDialog" :visiable.sync="showWfObjConfigDialog"
96
100
  @confirm="confirmWfObjConfigDialog" :formTemplate="formTemplate"/>
101
+ <MenuKindDialog v-if="showMenuKindDialog"
102
+ :visiable.sync="showMenuKindDialog"
103
+ @confirm="confirmInsertMenuKind"
104
+ :param="{ taType: 0 }"
105
+ :multi="false"
106
+ />
97
107
 
108
+ <batchWfObjConfigDialog v-if="showBatchWfObjConfigDialog" :visiable.sync="showBatchWfObjConfigDialog"
109
+ :formTemplates="formTemplates" @confirm="confirmBatchWfObjConfigDialog"></batchWfObjConfigDialog>
98
110
  </div>
99
111
  </template>
100
112
 
101
113
  <script>
102
114
  import mixin from "./mixins/list2";
103
115
  import wfObjConfigDialog from "./wfObjConfigDialog.vue";
116
+ import MenuKindDialog from "@/views/bd/setting/menu_kind/dialog.vue";
117
+ import batchWfObjConfigDialog from "./batchWfObjConfigDialog.vue";
104
118
 
105
119
  export default {
106
120
  name: 'bd_form_template:list2',
107
- components: {wfObjConfigDialog},
121
+ components: {MenuKindDialog, wfObjConfigDialog,batchWfObjConfigDialog},
108
122
  mixins: [mixin]
109
123
  }
110
124
  </script>
111
125
  <style scoped lang="scss">
112
- ::v-deep .tab-boxOnly > .el-tabs__header {
113
- position: absolute;
114
- right: 130px;
115
- top: 0;
116
- }
117
-
118
- ::v-deep .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
119
- .detail-wrap .d-cont {
120
- height: calc(100vh - 158px) !important
121
- }
122
126
 
123
- .grid-height {
124
- height: calc(100vh - 126px) !important
125
- }
126
- }
127
-
128
- ::v-deep .designer-drawer.is-fullscreen .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
129
- .detail-wrap .d-cont {
130
- height: calc(100vh - 116px) !important
131
- }
132
-
133
- .grid-height {
134
- height: calc(100vh - 84px) !important
135
- }
136
- }
137
127
  </style>
@@ -0,0 +1,281 @@
1
+ /**version-1.0*/
2
+ let tmixins = {};
3
+ tmixins = {
4
+ props: ['formTemplates'],
5
+ data() {
6
+ return {
7
+ showImportDialog: false,
8
+ showImportDialog2: false,
9
+ falseValue: false,
10
+ dataSize: 0,
11
+ doneSize: 0,
12
+ totalSuccessNum: 0,
13
+ totalErrorNum: 0,
14
+ percentageNum: 0,
15
+ successRows: [],
16
+ failRows: [],
17
+ oriCols: [],
18
+ showImportResult: false,
19
+ resultType: '',
20
+ option: {},
21
+ showContent: false,
22
+ resOption: {},
23
+
24
+ showCompanyInfoDialog: true,
25
+ tableDatas: [],
26
+ resultColumns: []
27
+ }
28
+ },
29
+ created() {
30
+
31
+ },
32
+ beforeDestroy() {
33
+
34
+ },
35
+ methods: {
36
+ initResGird() {
37
+ var that = this;
38
+ let tableRef = 'resGrid';
39
+ let resultColumns = [
40
+ {
41
+ title: this.$t1('模板名称'),
42
+ field: 'formName',
43
+ width: 250
44
+ },
45
+ {
46
+ title: this.$t1('模板编码'),
47
+ field: 'formCode',
48
+ width: 250
49
+ },
50
+ {field: 'objTypeName', title: this.$t1('默认流程对象名'), width: 150},
51
+ {field: '_companyNames', title: this.$t1('本次设置的组织名称'), width: 250},
52
+ {field: 'menuKindName', title: this.$t1('表单分类'), width: 200},
53
+ {field: 'serviceName', title: this.$t1('服务名'), width: 150},
54
+ ];
55
+
56
+ let columns = [
57
+ {
58
+ type: 'checkbox',
59
+ fixed: 'left',
60
+ width: 48,
61
+ resizable: false,
62
+ headerClassName: 'vxe-hcs',
63
+ className: 'vxe-hcs'
64
+ },
65
+ {
66
+ field: '_resultContent',
67
+ title: this.$t1('结果'),
68
+ width: 250,
69
+ fixed: 'left',
70
+ slots: {
71
+ default: ({
72
+ row,
73
+ $rowIndex,
74
+ $table
75
+ }) => {
76
+ return that.handleRes(row.resultMessage);
77
+ }
78
+ }
79
+ },
80
+ ...resultColumns
81
+ ];
82
+ let cCols = this.oriCols.map((oriCol, index) => {
83
+ let col = {
84
+ field: oriCol.field,
85
+ title: oriCol.title,
86
+ width: 150
87
+ };
88
+ if (index == 0) {
89
+ col.fixed = 'left';
90
+ }
91
+ return col;
92
+ });
93
+ columns = columns.concat(cCols);
94
+
95
+ let tableOption = {
96
+ vue: this,
97
+ tableRef: tableRef,
98
+ tableNameRequired: false,
99
+ columns: columns,
100
+ config: {
101
+ toolbarConfig: {
102
+ custom: false
103
+ }
104
+ }
105
+ };
106
+
107
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
108
+ this.resOption = opts;
109
+ this.$nextTick(() => {
110
+ let rows = this.resultType == 1 ? this.successRows : this.failRows;
111
+ let tDatas = rows.map((item, index) => {
112
+ return item;
113
+ });
114
+ this.$refs.resGrid.loadData(tDatas);
115
+ });
116
+ });
117
+ },
118
+ showSuccessResult() {
119
+ this.showImportResult = true;
120
+ this.resultType = 1;
121
+ setTimeout(() => {
122
+ this.$nextTick(() => {
123
+ this.initResGird();
124
+ });
125
+ }, 0)
126
+ },
127
+ showErrorResult() {
128
+ this.showImportResult = true;
129
+ this.resultType = 0;
130
+ setTimeout(() => {
131
+ this.$nextTick(() => {
132
+ this.initResGird();
133
+ });
134
+ }, 0)
135
+ },
136
+ dialogClose1() {
137
+ this.$emit("update:visiable", false);
138
+ },
139
+ dialogClose2() {
140
+ this.$emit("confirm");
141
+ this.dialogClose1();
142
+ },
143
+ dialogPrimary2() {
144
+ this.$emit("confirm");
145
+ this.dialogClose1();
146
+ },
147
+ handleRes(val) {
148
+ var content = val;
149
+ var text = content;
150
+ if (content && content.indexOf("Exception") >= 0) {
151
+ var index0 = content.lastIndexOf("*]");
152
+ if (index0 >= 0) {
153
+ text = content.substr(index0);
154
+ if (text) {
155
+ var index1 = text.indexOf("Exception:");
156
+ if (index1 >= 0) {
157
+ text = text.substr(index1 + 10);
158
+ }
159
+ }
160
+ }
161
+ }
162
+ return text;
163
+ },
164
+ beforeCloseCompanyInfoDialog() {
165
+ debugger
166
+ this.dialogClose1()
167
+ },
168
+ beforeConfirmCompanyInfoDialog(rows) {
169
+ if (!rows.length) {
170
+ this.$message({
171
+ type: "error",
172
+ message: this.$t1('请选择需要设置的组织')
173
+ })
174
+ return false
175
+ }
176
+ },
177
+ confirmCompanyInfoDialog(rows) {
178
+ let that = this;
179
+ let companyNames = rows.map(row=>row.companyName).join(',')
180
+ let tableDatas = this.formTemplates.map(formTemplate => {
181
+ let wfObjConfigDTOs = rows.map(row => {
182
+ return {
183
+ objTypeCode: formTemplate.objTypeCode,
184
+ objTypeName: formTemplate.objTypeName || formTemplate.formName,
185
+ serviceId: formTemplate.serviceName,
186
+ url: "form",
187
+ companyCode: row.companyCode,
188
+ companyName: row.companyName
189
+ }
190
+ })
191
+ let formData = {
192
+ objTypeCode: formTemplate.objTypeCode,
193
+ wfObjConfigDTOs: wfObjConfigDTOs,
194
+ save0nly: true
195
+ }
196
+ return {
197
+ ...formTemplate,
198
+ _companyNames:companyNames,
199
+ resultMessage: null,
200
+ resultType: null,
201
+ formData: formData
202
+ }
203
+ });
204
+ let successNum = 0;
205
+ let failNum = 0;
206
+ this.tableDatas = tableDatas;
207
+ let dataSize = tableDatas.length;
208
+ this.dataSize = dataSize;
209
+ let doneSize = 0;
210
+ let limitSize = 5;
211
+ let num = -1;
212
+ let excNum = 0;
213
+ let loopDo = function () {
214
+ if (excNum >= limitSize) return
215
+ num++;
216
+ if (num >= dataSize) return
217
+ excNum++;
218
+ let item = tableDatas[num];
219
+ if (item.objTypeName) {
220
+ let url = `/${item.serviceName}/wf_obj_config/saveUpdates`;
221
+ that.$http({
222
+ url: url,
223
+ method: `post`,
224
+ data: item.formData,
225
+ isLoading: true,
226
+ failMsg: false,
227
+ callback: res => {
228
+ if (res.type == "success") {
229
+ item.resultMessage = that.$t1('成功')
230
+ item.resultType = res.type;
231
+ successNum++
232
+ that.totalSuccessNum = successNum;
233
+ that.successRows.push(item)
234
+ } else {
235
+ item.resultMessage = that.handleRes(res.content);
236
+ item.resultType = res.type;
237
+ failNum++
238
+ that.totalErrorNum = failNum;
239
+ that.failRows.push(item)
240
+ }
241
+ excNum--;
242
+ doneSize++
243
+ that.doneSize = doneSize;
244
+ },
245
+ error: (e) => {
246
+ excNum--;
247
+ doneSize++
248
+ failNum++
249
+ that.doneSize = doneSize;
250
+ that.totalErrorNum = failNum;
251
+ item.resultMessage = that.handleRes(e.message);
252
+ item.resultType = res.type;
253
+ that.failRows.push(item)
254
+ }
255
+ });
256
+ } else {
257
+ item.resultMessage = that.$t1('默认流程对象名不能为空');
258
+ item.resultType = "error";
259
+ failNum++
260
+ that.totalErrorNum = failNum;
261
+ that.failRows.push(item)
262
+ excNum--;
263
+ doneSize++
264
+ that.doneSize = doneSize;
265
+ }
266
+
267
+ };
268
+ let timer = setInterval(function () {
269
+ if (num < dataSize) {
270
+ loopDo();
271
+ } else {
272
+ clearInterval(timer);
273
+ timer = null;
274
+ }
275
+ }, 200)
276
+ this.showImportDialog2 = true;
277
+ },
278
+
279
+ }
280
+ };
281
+ export const mixins = tmixins;