cloud-web-corejs 1.0.54-dev.1 → 1.0.54-dev.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.1",
4
+ "version": "1.0.54-dev.3",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -13,6 +13,12 @@
13
13
  <el-form-item :label="i18nt('启用流程')">
14
14
  <el-switch v-model="formConfig.wfEnabled"></el-switch>
15
15
  </el-form-item>
16
+ <el-form-item label="流程单据定义">
17
+ <a href="javascript:void(0);" class="a-link link-oneLind" @click="openWfObjConfigDialog">
18
+ <span>{{ wfObjConfigs.length ? '已维护' : null}}</span>
19
+ <i class="el-icon-edit"></i>
20
+ </a>
21
+ </el-form-item>
16
22
  <el-form-item :label="i18nt('加载详情数据')">
17
23
  <el-switch v-model="formConfig.isLoadEntity"></el-switch>
18
24
  </el-form-item>
@@ -290,6 +296,8 @@
290
296
 
291
297
  <formTemplateDialog v-if="showFormTemplateDialog" :visiable.sync="showFormTemplateDialog"
292
298
  @confirm="confirmFormTemplate" multi="false"/>
299
+ <wfObjConfigDialog v-if="showWfObjConfigDialog" :visiable.sync="showWfObjConfigDialog"
300
+ @confirm="confirmWfObjConfigDialog" :formTemplate="designer.vueInstance.reportTemplate"/>
293
301
  </div>
294
302
  </template>
295
303
 
@@ -297,12 +305,15 @@
297
305
  import i18n from '../../../../components/xform/utils/i18n';
298
306
  import {deepClone, insertCustomCssToHead, insertGlobalFunctionsToHtml} from '../../../../components/xform/utils/util';
299
307
  import formTemplateDialog from '../../../../views/bd/setting/form_template/dialog.vue'
308
+ import wfObjConfigDialog from "./wfObjConfigDialog.vue";
309
+
300
310
 
301
311
  export default {
302
312
  name: 'form-setting',
303
313
  mixins: [i18n],
304
314
  components: {
305
- formTemplateDialog
315
+ formTemplateDialog,
316
+ wfObjConfigDialog
306
317
  },
307
318
  props: {
308
319
  designer: Object,
@@ -348,7 +359,9 @@ export default {
348
359
  formScriptParam:null,
349
360
  showFormScriptParamDialog: false,
350
361
  formScriptSuccess:null,
351
- showFormScriptSuccessDialog: false
362
+ showFormScriptSuccessDialog: false,
363
+ wfObjConfigs:[],
364
+ showWfObjConfigDialog:false
352
365
  };
353
366
  },
354
367
  created() {
@@ -369,6 +382,7 @@ export default {
369
382
  this.extractCssClass();
370
383
  this.designer.emitEvent('form-css-updated', deepClone(this.cssClassList));
371
384
  }, 1200);
385
+ this.getListByObjTypeCode();
372
386
  },
373
387
  methods: {
374
388
  showEventCollapse() {
@@ -545,6 +559,26 @@ export default {
545
559
  this.designer.formConfig.formScriptSuccess = this.formScriptSuccess;
546
560
  this.showFormScriptSuccessDialog = false;
547
561
  },
562
+ openWfObjConfigDialog(){
563
+ this.showWfObjConfigDialog = true;
564
+ },
565
+ confirmWfObjConfigDialog(rows){
566
+ this.wfObjConfigs = rows || [];
567
+ },
568
+ getListByObjTypeCode(){
569
+ let reportTemplate = this.designer.vueInstance.reportTemplate
570
+ this.$http({
571
+ url: `/${reportTemplate.serviceName}/wf_obj_config/listByObjTypeCode`,
572
+ method: `post`,
573
+ data:{
574
+ stringOne:reportTemplate.objTypeCode
575
+ },
576
+ isLoading: true,
577
+ success: res => {
578
+ this.wfObjConfigs = res.objx || [];
579
+ }
580
+ });
581
+ },
548
582
  }
549
583
  };
550
584
  </script>
@@ -43,7 +43,7 @@
43
43
  <el-table-column type="index" width="35" fixed="left"></el-table-column>
44
44
  <el-table-column :label="i18nt('匹配规则')" width="250" prop="label">
45
45
  <template slot-scope="scope">
46
- <el-select v-model="scope.row.ruleType">
46
+ <el-select v-model="scope.row.ruleType" @change="changeRuleType(scope.row)">
47
47
  <el-option :value="1" label="用户"></el-option>
48
48
  <el-option :value="2" label="机构"></el-option>
49
49
  <el-option :value="3" label="角色"></el-option>
@@ -52,7 +52,19 @@
52
52
  </el-table-column>
53
53
  <el-table-column :label="i18nt('值')" width="300" prop="prop">
54
54
  <template slot-scope="scope">
55
- <el-input v-model="scope.row.value"></el-input>
55
+ <el-input
56
+ class="search-input"
57
+ :value="getRowValueName(scope.row)"
58
+ clearable
59
+ @clear="
60
+ scope.row.value = [];
61
+ "
62
+ v-el-readonly
63
+ >
64
+ <i slot="suffix" class="el-input__icon el-icon-search"
65
+ @click="openRowValueDialog(scope.row, scope.$index )"></i>
66
+ </el-input>
67
+
56
68
  </template>
57
69
  </el-table-column>
58
70
  <el-table-column :label="i18nt('是否可见')" width="150" prop="prop">
@@ -89,14 +101,29 @@
89
101
  </el-button>
90
102
  </div>
91
103
  </el-dialog>
104
+ <userDialog v-if="showUserDialog" :visiable.sync="showUserDialog" @confirm="confirmUserDialog"
105
+ multi="true" :rows="operateRows"/>
106
+ <saleOrgDialog v-if="showSaleOrgDialog" :visiable.sync="showSaleOrgDialog" @confirm="confirmSaleOrgDialog"
107
+ multi="true" :rows="operateRows"/>
108
+ <roleDialog v-if="showRoleDialog" :visiable.sync="showRoleDialog" @confirm="confirmRoleDialog"
109
+ multi="true" :rows="operateRows"/>
92
110
  </div>
93
111
  </template>
94
112
 
95
113
  <script>
96
114
  import i18n from "../../../../../components/xform/utils/i18n"
115
+ import userDialog from "@base/views/user/user/dialog.vue";
116
+ import saleOrgDialog from "@base/views/user/sale_org/dialog.vue";
117
+ import roleDialog from "@base/views/user/role/dialog.vue";
118
+
97
119
 
98
120
  export default {
99
121
  name: "showRuleFlag-editor",
122
+ components: {
123
+ userDialog,
124
+ saleOrgDialog,
125
+ roleDialog
126
+ },
100
127
  mixins: [i18n],
101
128
  props: {
102
129
  designer: Object,
@@ -109,7 +136,12 @@ export default {
109
136
  dialogVisible: false,
110
137
  tableData: [],
111
138
  wfDefItems: [],
112
- wfNodeMap: {}
139
+ wfNodeMap: {},
140
+ showUserDialog: false,
141
+ showSaleOrgDialog: false,
142
+ showRoleDialog: false,
143
+ operateRows: [],
144
+ operateIndex: 0
113
145
  }
114
146
  },
115
147
  computed: {
@@ -129,14 +161,59 @@ export default {
129
161
  addItem() {
130
162
  this.tableData.push({
131
163
  ruleType: 1,
132
- value: null,
164
+ value: [],
133
165
  show: true
134
166
  });
135
167
  },
136
168
  colSubmit() {
137
169
  this.dialogVisible = !1;
138
170
  this.optionModel.showRules = this.tableData;
139
- }
171
+ },
172
+ changeRuleType(row) {
173
+ row.value = [];
174
+ },
175
+ getRowValueName(row) {
176
+ let ruleType = row.ruleType;
177
+ let nameField = null;
178
+ if (ruleType == 1) {
179
+ nameField = 'nickName';
180
+ } else if (ruleType == 2) {
181
+ nameField = 'name';
182
+ } else if (ruleType == 3) {
183
+ nameField = 'name';
184
+ }
185
+ let rows = row.value || []
186
+ return rows.map(item => {
187
+ return item[nameField];
188
+ }).join(',');
189
+ },
190
+ openRowValueDialog(row, rowIndex) {
191
+ let ruleType = row.ruleType;
192
+ this.operateIndex = rowIndex;
193
+ this.operateRows = this.$baseLodash.cloneDeep(row.value || []);
194
+ if (ruleType == 1) {
195
+ this.showUserDialog = true;
196
+ } else if (ruleType == 2) {
197
+ this.showSaleOrgDialog = true;
198
+ } else if (ruleType == 3) {
199
+ this.showRoleDialog = true;
200
+ }
201
+ },
202
+ confirmUserDialog(rows) {
203
+ let item = this.tableData[this.operateIndex]
204
+ item.value.length = 0;
205
+ item.value.push(...rows)
206
+ },
207
+ confirmSaleOrgDialog(rows) {
208
+ let item = this.tableData[this.operateIndex]
209
+ item.value.length = 0;
210
+ item.value.push(...rows)
211
+ },
212
+ confirmRoleDialog(rows) {
213
+ let item = this.tableData[this.operateIndex]
214
+ item.value.length = 0;
215
+ item.value.push(...rows)
216
+ },
140
217
  }
141
218
  }
142
219
  </script>
@@ -0,0 +1,189 @@
1
+ <template>
2
+ <el-dialog
3
+ custom-class="dialog-style list-dialog"
4
+ title="流程单据定义"
5
+ :visible.sync="dialogVisible"
6
+ :show-close="!0"
7
+ :append-to-body="false"
8
+ :modal="false"
9
+ :close-on-click-modal="!1"
10
+ :close-on-press-escape="!1"
11
+ :destroy-on-close="!0"
12
+ width="1220px"
13
+ top="5vh"
14
+ v-dialog-drag
15
+ @close="closeDialog"
16
+ >
17
+ <div class="cont">
18
+ <el-form ref="editForm" :model="formData">
19
+ <el-table
20
+ ref="singleTable"
21
+ width="100%"
22
+ :data="formData.wfObjConfigDTOs"
23
+ height="500"
24
+ border=""
25
+ row-key="columnId"
26
+ stripe=""
27
+ >
28
+ <el-table-column type="index" width="35" fixed="left"></el-table-column>
29
+ <el-table-column :label="i18nt('表单类型名称')" width="150" prop="objTypeName">
30
+ <template slot-scope="scope">
31
+ <el-form-item :prop="'wfObjConfigDTOs.'+scope.$index+'.objTypeName'"
32
+ :rules="[{ required: true, trigger: 'blur' }]">
33
+ <el-input v-model="scope.row.objTypeName"></el-input>
34
+ </el-form-item>
35
+ </template>
36
+ </el-table-column>
37
+ <el-table-column :label="i18nt('组织名称')" width="150" prop="companyCode">
38
+ <template slot-scope="scope">
39
+ {{ scope.row.companyName }}
40
+ </template>
41
+ </el-table-column>
42
+ <el-table-column :label="i18nt('表单类型编码')" width="200" prop="objTypeCode"></el-table-column>
43
+ <el-table-column :label="i18nt('服务名')" width="150" prop="serviceId"></el-table-column>
44
+ <el-table-column :label="i18nt('designer.setting.actionColumn')" width="100" align="center">
45
+ <template #header>
46
+ <span>{{ i18nt('designer.setting.actionColumn') }}</span>
47
+ <el-button :title="i18nt('designer.setting.addTableColumn')" size="mini" type="" circle=""
48
+ icon="el-icon-plus" @click="openCompanyDialog"></el-button>
49
+ </template>
50
+ <template slot-scope="scope">
51
+ <el-button
52
+ :title="i18nt('designer.setting.deleteTableColumn')"
53
+ size="mini"
54
+ type=""
55
+ circle=""
56
+ icon="el-icon-minus"
57
+ @click="formData.wfObjConfigDTOs.splice(scope.$index,1)"
58
+ ></el-button>
59
+ </template>
60
+ </el-table-column>
61
+
62
+ </el-table>
63
+ </el-form>
64
+ </div>
65
+ <div class="dialog-footer" slot="footer">
66
+ <el-button @click="closeDialog" class="button-sty" icon="el-icon-close">
67
+ {{ i18nt('designer.hint.cancel') }}
68
+ </el-button>
69
+ <el-button type="primary" @click="saveData" class="button-sty" icon="el-icon-check">
70
+ {{ i18nt('designer.hint.confirm') }}
71
+ </el-button>
72
+ </div>
73
+ <companyInfoDialog v-if="showCompanyInfoDialog" :visiable.sync="showCompanyInfoDialog"
74
+ @confirm="confirmCompanyDialog" multi="false"/>
75
+ </el-dialog>
76
+ </template>
77
+ <script>
78
+ import i18n from '../../../../components/xform/utils/i18n';
79
+ import companyInfoDialog from "@base/views/user/company_info/dialog.vue";
80
+
81
+ export default {
82
+ components: {companyInfoDialog},
83
+ props: ['formTemplate'],
84
+ mixins: [i18n],
85
+ data() {
86
+ return {
87
+ dialogVisible: true,
88
+ formData: {
89
+ objTypeCode: null,
90
+ wfObjConfigDTOs: []
91
+ },
92
+ operateIndex: 0,
93
+ showCompanyInfoDialog: false
94
+ }
95
+ },
96
+ created() {
97
+
98
+ },
99
+ mounted() {
100
+ this.formData.objTypeCode = this.formTemplate.objTypeCode;
101
+ this.getListByObjTypeCode();
102
+ },
103
+ methods: {
104
+ getListByObjTypeCode(callback) {
105
+ let formTemplate = this.formTemplate
106
+ this.$http({
107
+ url: `/${formTemplate.serviceName}/wf_obj_config/listByObjTypeCode`,
108
+ method: `post`,
109
+ data: {
110
+ stringOne: formTemplate.objTypeCode
111
+ },
112
+ isLoading: true,
113
+ success: res => {
114
+ let rows = res.objx || [];
115
+ this.formData.wfObjConfigDTOs = rows;
116
+ callback && callback(rows)
117
+ }
118
+ });
119
+ },
120
+ saveData() {
121
+ this.$refs.editForm.$baseValidate(valid => {
122
+ if (valid) {
123
+ this.$baseConfirm(this.$t1('您确定要保存吗?')).then(() => {
124
+ var url = `/${this.formTemplate.serviceName}/wf_obj_config/saveUpdates`;
125
+ this.$http({
126
+ url: url,
127
+ method: `post`,
128
+ data: this.formData,
129
+ isLoading: true,
130
+ success: res => {
131
+ this.$message({
132
+ message: res.content,
133
+ type: 'success',
134
+ duration: 1000
135
+ });
136
+ this.getListByObjTypeCode(rows => {
137
+ this.$emit('confirm', rows)
138
+ this.closeDialog();
139
+ })
140
+ }
141
+ });
142
+ });
143
+ }
144
+ });
145
+ },
146
+ addItem() {
147
+ let formTemplate = this.formTemplate;
148
+ let row = {
149
+ objTypeCode: formTemplate.objTypeCode,
150
+ objTypeName: formTemplate.objTypeName,
151
+ serviceId: formTemplate.serviceName,
152
+ url: "form",
153
+ companyCode: null,
154
+ companyName: null
155
+ }
156
+ this.formData.wfObjConfigDTOs.push(row);
157
+ },
158
+ closeDialog() {
159
+ this.dialogVisible = false;
160
+ this.$emit("update:visiable", false);
161
+ },
162
+ openCompanyDialog() {
163
+ this.showCompanyInfoDialog = true;
164
+ },
165
+ confirmCompanyDialog(rows) {
166
+ if (rows.length) {
167
+ let row = rows[0];
168
+ let formTemplate = this.formTemplate;
169
+ if (!this.formData.wfObjConfigDTOs.find(item => item.companyCode == row.companyCode)) {
170
+ let newrow = {
171
+ objTypeCode: formTemplate.objTypeCode,
172
+ objTypeName: formTemplate.formName,
173
+ serviceId: formTemplate.serviceName,
174
+ url: "form",
175
+ companyCode: row.companyCode,
176
+ companyName: row.companyName
177
+ }
178
+ this.formData.wfObjConfigDTOs.push(newrow);
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ </script>
185
+
186
+
187
+ <style scoped>
188
+
189
+ </style>