cloud-web-corejs 1.0.54-dev.278 → 1.0.54-dev.279

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.
@@ -25,6 +25,7 @@
25
25
  :_viewType="1"
26
26
  @reload="$reloadHandle"
27
27
  @openDesignDialog="openDesingerDialogByChild"
28
+ :extractedObj="extractedObj"
28
29
  ></component>
29
30
  <el-drawer :title="$t1('表单设计({formName})',{formName})" :visible.sync="showDesingerDialog" :modal="false"
30
31
  :destroy-on-close="true"
@@ -1,209 +1,234 @@
1
- import projectTagView from "@base/components/projectTag/view.vue";
2
- import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
3
- import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
4
- import formOplogTable from "@base/components/formOplog/index.vue";
5
- import {getBdFlag} from "@base/api/user";
6
- import otherAuthDialog from "../otherAuthDialog.vue";
7
-
8
- let modules = {};
9
- modules = {
10
- name: 'bd_form_templateEdit',
11
- props: {
12
- _dataId: [String, Number],
13
- currentFormType: Object,
14
- readonly: Boolean,
15
- otherFlag:Boolean
16
- },
17
- components: {
18
- projectTagView,
19
- MenuKindDialog,
20
- preformDialog,
21
- formOplogTable,
22
- otherAuthDialog
23
- },
24
- data() {
25
- return {
26
- isEdit: false,
27
- tabIndex: 'first',
28
- dataId: '',
29
- formTemplate: {
30
- enabled: true,
31
- history: false,
32
- serviceId: 'user',
33
- formTypeCode: null,
34
- menuKindName: null,
35
- menuKindCode: null,
36
- serviceName: null,
37
- formTemplateTagDTOs: [],
38
- hasWf: false
39
- },
40
- isInited: false,
41
- serviceIds: ['user'],
42
- showMenuKindDialog: false,
43
- isDev: true,
44
- showPreformDialog: false,
45
- menuKindAuth: {
46
- editAuth: 0
47
- },
48
- sid: null,
49
- showOtherAuthDialog:false
50
- };
51
- },
52
- created() {
53
- if (this._dataId) {
54
- this.dataId = this._dataId;
55
- } else {
56
- this.formTemplate.menuKindName = this.currentFormType?.name || null;
57
- this.formTemplate.menuKindCode = this.currentFormType?.menuKindCode || null;
58
- this.formTemplate.serviceName = this.currentFormType?.serviceName || null;
59
- }
60
- },
61
- mounted() {
62
- this.getBdEnv();
63
- this.getData();
64
- },
65
- methods: {
66
- getData() {
67
- if (this.dataId) {
68
- this.isEdit = true;
69
- this.$commonHttp({
70
- aes: true,
71
- url: USER_PREFIX + `/formTemplate/getByFormCode`,
72
- method: `post`,
73
- data: {
74
- stringOne: this.dataId
75
- },
76
- isLoading: true,
77
- modalStrictly: true,
78
- success: res => {
79
- this.formTemplate = res.objx || {};
80
- this.getMenuKindAuth(this.formTemplate.menuKindCode);
81
- this.$nextTick(() => {
82
- this.isInited = true;
83
- });
84
- //获取操作日志数据
85
- this.$refs['oplogTable'].initData({
86
- param: () => {
87
- return {
88
- logType: "FormTemplate",
89
- logObjCode: this.formTemplate.formCode
90
- };
91
- }
92
- });
93
- }
94
- });
95
- } else {
96
- this.getMenuKindAuth(this.formTemplate.menuKindCode);
97
- this.isInited = true;
98
- }
99
- },
100
- saveData() {
101
- this.$refs.editForm.$baseValidate(valid => {
102
- if (valid) {
103
- this.openPreformDialog();
104
- }
105
- });
106
- },
107
- saveDataHandle(preformData) {
108
- var url = USER_PREFIX + (this.isEdit ? `/formTemplate/update` : `/formTemplate/save`);
109
- let formData = {
110
- ...this.formTemplate,
111
- logContent: preformData.logContent
112
- };
113
- this.$http({
114
- aes: true,
115
- url: url,
116
- method: `post`,
117
- data: formData,
118
- isLoading: true,
119
- success: res => {
120
- this.$message({
121
- message: res.content,
122
- type: 'success',
123
- duration: 500,
124
- onClose: t => {
125
- if (this.isEdit) {
126
- this.$baseReload();
127
- } else {
128
- this.$baseReload({
129
- updateParam: {
130
- _dataId: this.formTemplate.formCode
131
- }
132
- });
133
- }
134
- }
135
- });
136
- }
137
- });
138
- },
139
- openPreformDialog() {
140
- this.showPreformDialog = true;
141
- },
142
- confirmPreformDialog(preformData) {
143
- this.saveDataHandle(preformData);
144
- },
145
- confirmInsertMenuKind(rows) {
146
- if (rows.length > 0) {
147
- let row = rows[0];
148
- this.$set(this.formTemplate, 'menuKindCode', row.menuKindCode);
149
- this.$set(this.formTemplate, 'menuKindName', row.name);
150
- }
151
- },
152
- getBdEnv() {
153
- getBdFlag({
154
- success: res => {
155
- this.isDev = res.objx == 1
156
- }
157
- });
158
- },
159
- openDesignDialog() {
160
- let readonly = !this.menuKindAuth.editAuth
161
- this.$emit('openDesignDialog', {
162
- row: this.formTemplate,
163
- readonly,
164
- callback: () => {
165
- this.$baseReload()
166
- }
167
- })
168
- },
169
- getMenuKindAuth(menuKindCode) {
170
- if(this.otherFlag){
171
- this.getOtherMenuKindAuth();
172
- }else if (menuKindCode) {
173
- this.$http({
174
- // aes: true,
175
- url: USER_PREFIX + '/menu_kind_auth/getAuth',
176
- method: `post`,
177
- data: {stringOne: menuKindCode},
178
- isLoading: true,
179
- success: res => {
180
- this.menuKindAuth = res.objx || {}
181
- }
182
- });
183
- }
184
- },
185
-
186
- getOtherMenuKindAuth() {
187
- if (this.otherFlag && this.formTemplate.sid) {
188
- this.$http({
189
- aes: true,
190
- url: USER_PREFIX + "/form_template_auth/getAuth",
191
- method: `post`,
192
- data: {stringOne: this.formTemplate.sid},
193
- isLoading: true,
194
- success: (res) => {
195
- this.menuKindAuth = res.objx || {};
196
- },
197
- });
198
- }
199
- },
200
- openOtherAuthDialog(){
201
- this.sid = this.formTemplate.sid
202
- this.showOtherAuthDialog = true
203
- },
204
- confirmOtherAuthDialog(){
205
- this.$baseReload()
206
- },
207
- }
208
- };
209
- export default modules
1
+ import projectTagView from "@base/components/projectTag/view.vue";
2
+ import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
3
+ import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
4
+ import formOplogTable from "@base/components/formOplog/index.vue";
5
+ import {getBdFlag} from "@base/api/user";
6
+ import otherAuthDialog from "../otherAuthDialog.vue";
7
+
8
+ let modules = {};
9
+ modules = {
10
+ name: 'bd_form_templateEdit',
11
+ props: {
12
+ _dataId: [String, Number],
13
+ currentFormType: Object,
14
+ readonly: Boolean,
15
+ otherFlag:Boolean,
16
+ extractedObj:{
17
+ type:Object,
18
+ default:()=> null
19
+ }
20
+ },
21
+ components: {
22
+ projectTagView,
23
+ MenuKindDialog,
24
+ preformDialog,
25
+ formOplogTable,
26
+ otherAuthDialog
27
+ },
28
+ data() {
29
+ return {
30
+ isEdit: false,
31
+ tabIndex: 'first',
32
+ dataId: '',
33
+ formTemplate: {
34
+ enabled: true,
35
+ history: false,
36
+ serviceId: 'user',
37
+ formTypeCode: null,
38
+ menuKindName: null,
39
+ menuKindCode: null,
40
+ serviceName: null,
41
+ formTemplateTagDTOs: [],
42
+ hasWf: false
43
+ },
44
+ isInited: false,
45
+ serviceIds: ['user'],
46
+ showMenuKindDialog: false,
47
+ isDev: true,
48
+ showPreformDialog: false,
49
+ menuKindAuth: {
50
+ editAuth: 0
51
+ },
52
+ sid: null,
53
+ showOtherAuthDialog:false
54
+ };
55
+ },
56
+ created() {
57
+ if(this.extractedObj?.objx?.id){
58
+ this.dataId = this.extractedObj.obj.id;
59
+ }else if (this._dataId) {
60
+ this.dataId = this._dataId;
61
+ } else {
62
+ this.formTemplate.menuKindName = this.currentFormType?.name || null;
63
+ this.formTemplate.menuKindCode = this.currentFormType?.menuKindCode || null;
64
+ this.formTemplate.serviceName = this.currentFormType?.serviceName || null;
65
+ }
66
+ },
67
+ mounted() {
68
+ this.getBdEnv();
69
+ this.getData();
70
+ },
71
+ methods: {
72
+ initData(formData){
73
+ this.isEdit = true;
74
+ this.formTemplate = formData || {};
75
+ this.getMenuKindAuth(this.formTemplate.menuKindCode);
76
+ this.$nextTick(() => {
77
+ this.isInited = true;
78
+ });
79
+ },
80
+ getData() {
81
+ if(this.extractedObj?.objx){
82
+ this.initData(this.extractedObj.objx)
83
+ }else if (this.dataId) {
84
+ this.$commonHttp({
85
+ aes: true,
86
+ url: USER_PREFIX + `/formTemplate/getByFormCode`,
87
+ method: `post`,
88
+ data: {
89
+ stringOne: this.dataId
90
+ },
91
+ isLoading: true,
92
+ modalStrictly: true,
93
+ success: res => {
94
+ this.initData(res.objx)
95
+ //获取操作日志数据
96
+ this.$refs['oplogTable'].initData({
97
+ param: () => {
98
+ return {
99
+ logType: "FormTemplate",
100
+ logObjCode: this.formTemplate.formCode
101
+ };
102
+ }
103
+ });
104
+ /* this.formTemplate = res.objx || {};
105
+ this.getMenuKindAuth(this.formTemplate.menuKindCode);
106
+ this.$nextTick(() => {
107
+ this.isInited = true;
108
+ });
109
+ //获取操作日志数据
110
+ this.$refs['oplogTable'].initData({
111
+ param: () => {
112
+ return {
113
+ logType: "FormTemplate",
114
+ logObjCode: this.formTemplate.formCode
115
+ };
116
+ }
117
+ }); */
118
+ }
119
+ });
120
+ } else {
121
+ this.getMenuKindAuth(this.formTemplate.menuKindCode);
122
+ this.isInited = true;
123
+ }
124
+ },
125
+ saveData() {
126
+ this.$refs.editForm.$baseValidate(valid => {
127
+ if (valid) {
128
+ this.openPreformDialog();
129
+ }
130
+ });
131
+ },
132
+ saveDataHandle(preformData) {
133
+ var url = USER_PREFIX + (this.isEdit ? `/formTemplate/update` : `/formTemplate/save`);
134
+ let formData = {
135
+ ...this.formTemplate,
136
+ logContent: preformData.logContent
137
+ };
138
+ this.$http({
139
+ aes: true,
140
+ url: url,
141
+ method: `post`,
142
+ data: formData,
143
+ isLoading: true,
144
+ success: res => {
145
+ this.$message({
146
+ message: res.content,
147
+ type: 'success',
148
+ duration: 500,
149
+ onClose: t => {
150
+ if (this.isEdit) {
151
+ this.$baseReload();
152
+ } else {
153
+ this.$baseReload({
154
+ updateParam: {
155
+ _dataId: this.formTemplate.formCode
156
+ }
157
+ });
158
+ }
159
+ }
160
+ });
161
+ }
162
+ });
163
+ },
164
+ openPreformDialog() {
165
+ this.showPreformDialog = true;
166
+ },
167
+ confirmPreformDialog(preformData) {
168
+ this.saveDataHandle(preformData);
169
+ },
170
+ confirmInsertMenuKind(rows) {
171
+ if (rows.length > 0) {
172
+ let row = rows[0];
173
+ this.$set(this.formTemplate, 'menuKindCode', row.menuKindCode);
174
+ this.$set(this.formTemplate, 'menuKindName', row.name);
175
+ }
176
+ },
177
+ getBdEnv() {
178
+ getBdFlag({
179
+ success: res => {
180
+ this.isDev = res.objx == 1
181
+ }
182
+ });
183
+ },
184
+ openDesignDialog() {
185
+ let readonly = !this.menuKindAuth.editAuth
186
+ this.$emit('openDesignDialog', {
187
+ row: this.formTemplate,
188
+ readonly,
189
+ callback: () => {
190
+ this.$baseReload()
191
+ }
192
+ })
193
+ },
194
+ getMenuKindAuth(menuKindCode) {
195
+ if(this.otherFlag){
196
+ this.getOtherMenuKindAuth();
197
+ }else if (menuKindCode) {
198
+ this.$http({
199
+ // aes: true,
200
+ url: USER_PREFIX + '/menu_kind_auth/getAuth',
201
+ method: `post`,
202
+ data: {stringOne: menuKindCode},
203
+ isLoading: true,
204
+ success: res => {
205
+ this.menuKindAuth = res.objx || {}
206
+ }
207
+ });
208
+ }
209
+ },
210
+
211
+ getOtherMenuKindAuth() {
212
+ if (this.otherFlag && this.formTemplate.sid) {
213
+ this.$http({
214
+ aes: true,
215
+ url: USER_PREFIX + "/form_template_auth/getAuth",
216
+ method: `post`,
217
+ data: {stringOne: this.formTemplate.sid},
218
+ isLoading: true,
219
+ success: (res) => {
220
+ this.menuKindAuth = res.objx || {};
221
+ },
222
+ });
223
+ }
224
+ },
225
+ openOtherAuthDialog(){
226
+ this.sid = this.formTemplate.sid
227
+ this.showOtherAuthDialog = true
228
+ },
229
+ confirmOtherAuthDialog(){
230
+ this.$baseReload()
231
+ },
232
+ }
233
+ };
234
+ export default modules
@@ -348,6 +348,18 @@
348
348
  ></el-option>
349
349
  </el-select>
350
350
  </template>
351
+ <template #zdLength="{ row, rowIndex }">
352
+ <el-form-item
353
+ :prop="'szTaZdMbDTOs.' + rowIndex + '.zdLength'"
354
+ :rules="[{ required: false, trigger: ['blur', 'change'] }]"
355
+ >
356
+ <el-input
357
+ v-model="row.zdLength"
358
+ clearable
359
+ :disabled="!!row.systems || !!row.relationZd"
360
+ />
361
+ </el-form-item>
362
+ </template>
351
363
  <template #referenceZd="{ row, rowIndex, $table }">
352
364
  <el-input
353
365
  class="search-input"
@@ -311,6 +311,14 @@ modules = {
311
311
  default: "zdType",
312
312
  },
313
313
  },
314
+ {
315
+ title: this.$t1("字段长度"),
316
+ field: "zdLength",
317
+ width: 150,
318
+ slots: {
319
+ default: "zdLength",
320
+ },
321
+ },
314
322
  {
315
323
  title: this.$t1("树标识"),
316
324
  field: "treeFlag",
@@ -510,23 +518,30 @@ modules = {
510
518
  // }
511
519
  // this.customer.szTaZdMbDTOs.push({tacitly: tacitly});
512
520
  let newIndex = this.getNewIndex();
513
- let item = {
521
+ /* let item = {
514
522
  zdEn: null,
515
523
  zdCh: null,
524
+ taZdMc: null,
516
525
  zdTypeValues: null,
517
526
  required: false,
518
527
  codeType: null,
519
528
  referenceZd: null,
520
529
  zdType: "Text",
530
+ zdLength: "255",
521
531
  enabled: true,
522
532
  orders: newIndex,
533
+ relationZd:null,
534
+ refServiceName:null,
535
+
523
536
  generateCode: false,
524
537
  fromTable: false,
525
538
  toTaBmZd: null,
526
539
  treeFlag: null,
527
540
  atened: false,
528
541
  updateIgnore: false
529
- };
542
+ }; */
543
+ let item = this.createRow();
544
+ item.orders = newIndex,
530
545
  this.szTaMb.szTaZdMbDTOs.splice(0, 0, item);
531
546
  },
532
547
  deleteItem(row, rowIndex) {
@@ -643,6 +658,14 @@ modules = {
643
658
  this.showReferenceZdDialog = true;
644
659
  },
645
660
  changeZdType(row) {
661
+ let map = {
662
+ "Integer": "11",
663
+ "Long": "20",
664
+ "Decimal": "21,6",
665
+ "Money": "21,2",
666
+ "Text": "255"
667
+ }
668
+ row.zdLength = map[row.zdType] || null;
646
669
  this.clearReferenceZd(row);
647
670
  },
648
671
  clearReferenceZd(row) {
@@ -739,22 +762,21 @@ modules = {
739
762
  addReferenceShowRows.forEach((item, index) => {
740
763
  let rIndex = addIndex + index;
741
764
  let orders = (row.orders || 0) + index + 1;
742
- let newItem = {
765
+
766
+ let newItem = this.createRow();
767
+ Object.assign(newItem, {
743
768
  zdEn: "ref_" + item.zdEn,
744
- taZdMc: null,
745
769
  zdCh: item.zdCh,
746
- zdType: "Text",
747
- referenceZd: referenceEntity + "." + item.taZdMc,
748
- relationZd: referenceZd + "." + row.zdEn,
749
- refServiceName,
750
- zdTypeValues: null,
751
770
  required: false,
771
+ referenceZd: referenceEntity + "." + item.taZdMc,
772
+ zdType: "Text",
773
+ zdLength: "255",
752
774
  enabled: true,
753
- requiredMsg: null,
754
- regexp: null,
755
- regexpMsg: null,
756
775
  orders,
757
- };
776
+ relationZd: referenceZd + "." + row.zdEn,
777
+ refServiceName,
778
+ })
779
+
758
780
  this.szTaMb.szTaZdMbDTOs.splice(rIndex, 0, newItem);
759
781
  });
760
782
  row.referenceZd = referenceZd;
@@ -762,7 +784,37 @@ modules = {
762
784
  this.handleReferenceOrders(row);
763
785
  this.showReferenceZdDialog = false;
764
786
  },
765
-
787
+ createRow(){
788
+ let row = {
789
+ "orders": null,
790
+ "taCode": null,
791
+ "zdCode": null,
792
+ "zdEn": null,
793
+ "zdCh": null,
794
+ "taZdMc": null,
795
+ "zdType": "Text",
796
+ "zdLength": "255",
797
+ "referenceZd": null,
798
+ "relationZd": null,
799
+ "refServiceName": null,
800
+ "zdTypeValues": null,
801
+ "required": false,
802
+ "requiredMsg": null,
803
+ "regexpVal": null,
804
+ "regexpMsg": null,
805
+ "enabled": true,
806
+ "systems": false,
807
+ "generateCode": false,
808
+ "codeType": null,
809
+ "toTaBmZd": null,
810
+ "fromTable": false,
811
+ "treeFlag": null,
812
+ "atened": false,
813
+ "updateIgnore": false,
814
+ "abc": null
815
+ }
816
+ return row;
817
+ },
766
818
  changeOrders(row) {
767
819
  this.handleReferenceOrders(row);
768
820
  },