cloud-web-corejs 1.0.163 → 1.0.164

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.
Files changed (63) hide show
  1. package/package.json +2 -1
  2. package/src/components/vb-tabs/x-tabs.vue +30 -13
  3. package/src/components/xform/form-designer/designer.js +1 -1
  4. package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +419 -0
  5. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +1 -1
  6. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
  7. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
  8. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +71 -50
  9. package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
  10. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
  11. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +102 -73
  12. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
  13. package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +41 -27
  14. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +4 -1
  15. package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
  16. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +13 -2
  17. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +9 -2
  18. package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
  19. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +2 -1
  20. package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +962 -0
  21. package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
  22. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +1 -1
  23. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +7 -0
  24. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +1 -0
  25. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +44 -27
  26. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +19 -11
  27. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +19 -1
  28. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +11 -7
  29. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +11 -8
  30. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +1 -1
  31. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +1 -1
  32. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +1 -1
  33. package/src/components/xform/form-designer/setting-panel/form-setting.vue +106 -76
  34. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +13 -263
  35. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +47 -81
  36. package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
  37. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -7
  38. package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
  39. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +37 -16
  40. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +42 -18
  41. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +2 -2
  42. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +57 -34
  43. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +84 -53
  44. package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +35 -44
  45. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
  46. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +68 -3
  47. package/src/components/xform/form-render/container-item/containerItemMixin.js +2 -2
  48. package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
  49. package/src/components/xform/form-render/container-item/tab-item.vue +64 -32
  50. package/src/components/xform/form-render/index.vue +69 -23
  51. package/src/components/xform/form-render/indexMixin.js +18 -17
  52. package/src/components/xform/lang/zh-CN.js +8 -2
  53. package/src/components/xform/utils/formula-util.js +306 -5
  54. package/src/components/xform/utils/util.js +1 -1
  55. package/src/components/xform/utils/vue2js-generator.js +2 -2
  56. package/src/utils/request.js +1 -1
  57. package/src/utils/vab.js +1 -1
  58. package/src/views/user/form/vform/render.vue +54 -36
  59. package/src/views/user/form/view/list.vue +103 -10
  60. package/src/views/user/menu/list.vue +24 -1
  61. package/src/views/user/role/authConfig.vue +89 -0
  62. package/src/views/user/role/dialog.vue +70 -48
  63. package/src/views/user/role/edit.vue +114 -4
@@ -1,30 +1,46 @@
1
1
  <template>
2
2
  <div>
3
- <div class="designer-view" :class="[layoutType === 'H5' ? 'h5-layout' : layoutType === 'Pad' ? 'pad-layout' : '']">
4
- <v-form-render :form-json.sync="formJson" :form-data="formData" :option-data="optionData" ref="vFormRef"
5
- :reportTemplate.sync="formTemplate" :conditionParam.sync="conditionParam"
6
- :formInsData.sync="formInsData"
7
- v-if="showRender" visible-key="showRender" :parent-target="_self" @reload="$baseReload()"
8
- :dataId.sync="dataId" :param="param" v-bind="$attrs" @openCopyEditTab="openCopyEditTab"/>
3
+ <div
4
+ class="designer-view"
5
+ :class="[
6
+ layoutType === 'H5' ? 'h5-layout' : layoutType === 'Pad' ? 'pad-layout' : '',
7
+ ]"
8
+ >
9
+ <v-form-render
10
+ :form-json.sync="formJson"
11
+ :form-data="formData"
12
+ :option-data="optionData"
13
+ ref="vFormRef"
14
+ :reportTemplate.sync="formTemplate"
15
+ :conditionParam.sync="conditionParam"
16
+ :formInsData.sync="formInsData"
17
+ v-if="showRender"
18
+ visible-key="showRender"
19
+ :visiable.sync="showRender"
20
+ :parent-target="_self"
21
+ @reload="$baseReload()"
22
+ :dataId.sync="dataId"
23
+ :param="param"
24
+ v-bind="$attrs"
25
+ @openCopyEditTab="openCopyEditTab"
26
+ />
9
27
  </div>
10
28
  </div>
11
-
12
29
  </template>
13
30
  <script>
14
- import {loadExtension} from '@base/components/xform/extension/extension-loader'
31
+ import { loadExtension } from "@base/components/xform/extension/extension-loader";
15
32
 
16
- loadExtension()
17
- import VFormRender from '@base/components/xform/form-render/index.vue'
33
+ loadExtension();
34
+ import VFormRender from "@base/components/xform/form-render/index.vue";
18
35
  import scriptHttpMixin from "@base/components/xform/mixins/scriptHttp";
19
36
 
20
-
21
37
  export default {
22
- name: 'vform_render',
38
+ name: "vform_render",
23
39
  mixins: [scriptHttpMixin],
24
40
  components: {
25
- VFormRender
41
+ VFormRender,
26
42
  },
27
- props: ['object_foreign_id', 'dataId', 'param'],
43
+ props: ["object_foreign_id", "dataId", "param"],
28
44
  data() {
29
45
  return {
30
46
  formJson: {},
@@ -35,7 +51,7 @@ export default {
35
51
  formCode: null,
36
52
  layoutType: null,
37
53
  conditionParam: null,
38
- formInsData: null
54
+ formInsData: null,
39
55
  };
40
56
  },
41
57
  created() {
@@ -47,7 +63,7 @@ export default {
47
63
  let code = this.$attrs.formCode;
48
64
  if (!code) {
49
65
  var hash = window.location.hash;
50
- let str = '#/report/xform/render/';
66
+ let str = "#/report/xform/render/";
51
67
  if (hash.indexOf(str) == 0) {
52
68
  code = hash.slice(str.length);
53
69
  }
@@ -61,12 +77,12 @@ export default {
61
77
  let param = {
62
78
  objTypeCode: this.$attrs.objTypeCode,
63
79
  objId: this.$attrs.objId,
64
- taskId: this.$attrs.taskId
80
+ taskId: this.$attrs.taskId,
65
81
  };
66
82
  this.conditionParam = param;
67
83
  let url, data;
68
84
  url = USER_PREFIX + `/formTemplate/getByFormCode`;
69
- data = {stringOne: this.formCode};
85
+ data = { stringOne: this.formCode };
70
86
  this.$http({
71
87
  aes: true,
72
88
  url: url,
@@ -75,26 +91,28 @@ export default {
75
91
  // isLoading: true,
76
92
  // loadingTarget: document.body,
77
93
  // modalStrictly: true,
78
- success: async res => {
94
+ success: async (res) => {
79
95
  let formTemplate = res.objx || {};
80
96
  this.formTemplate = formTemplate;
81
- this.formJson = formTemplate.formViewContent ? JSON.parse(formTemplate.formViewContent) : {};
82
- this.layoutType = this.formJson.formConfig.layoutType
97
+ this.formJson = formTemplate.formViewContent
98
+ ? JSON.parse(formTemplate.formViewContent)
99
+ : {};
100
+ this.layoutType = this.formJson.formConfig.layoutType;
83
101
  this.getFormInsData2();
84
- }
102
+ },
85
103
  });
86
104
  },
87
105
  getReqParam(item, dataId, billData) {
88
106
  let param = {};
89
107
  if (item.accessParam) {
90
108
  if (typeof item.accessParam === "string") {
91
- let n = new Function('billData', item.accessParam);
109
+ let n = new Function("billData", item.accessParam);
92
110
  param = n.call(this, billData);
93
111
  } else {
94
- param = item.accessParam
112
+ param = item.accessParam;
95
113
  }
96
114
  } else {
97
- param = {id: dataId}
115
+ param = { id: dataId };
98
116
  }
99
117
  return param;
100
118
  },
@@ -103,13 +121,13 @@ export default {
103
121
  let formConfig = this.formJson.formConfig;
104
122
  let dataId = this.dataId;
105
123
  if (formConfig.onBeforeCreated) {
106
- let n = new Function('dataId', "formCode", "done", formConfig.onBeforeCreated);
124
+ let n = new Function("dataId", "formCode", "done", formConfig.onBeforeCreated);
107
125
  let toDo = function (res) {
108
126
  let formData = res && res.objx ? res.objx : {};
109
127
  that.formData = formData;
110
128
  that.formInsData = formData;
111
129
  that.showRender = true;
112
- }
130
+ };
113
131
  n.call(this, dataId, this.formCode, toDo);
114
132
  } else {
115
133
  this.formData = this.$attrs.formData ?? {};
@@ -121,25 +139,25 @@ export default {
121
139
  let getConfig = formConfig.getConfig || {};
122
140
  let dataId = this.dataId;
123
141
  if (dataId) {
124
- let reqParam = {id: dataId};
125
- let accessParamArguments = [{name: "id", value: dataId}]
142
+ let reqParam = { id: dataId };
143
+ let accessParamArguments = [{ name: "id", value: dataId }];
126
144
  this.scriptHttp({
127
145
  options: getConfig,
128
146
  params: reqParam,
129
147
  targetFormTemplate: this.formTemplate,
130
148
  accessParamArguments: accessParamArguments,
131
- success: res => {
149
+ success: (res) => {
132
150
  let formData = res.objx || {};
133
151
  this.formData = formData;
134
152
  this.formInsData = res.objx;
135
153
  this.showRender = true;
136
- }
137
- })
154
+ },
155
+ });
138
156
  }
139
157
  },
140
- openCopyEditTab(formData){
141
- this.$emit("openCopyEditTab",formData)
142
- }
143
- }
158
+ openCopyEditTab(formData) {
159
+ this.$emit("openCopyEditTab", formData);
160
+ },
161
+ },
144
162
  };
145
163
  </script>
@@ -1,42 +1,70 @@
1
1
  <template>
2
2
  <div id="containt">
3
3
  <template v-if="layoutType == 'PC'">
4
- <x-tabs ref="xTabs" v-model="activeName" class="tab-box">
4
+ <x-tabs ref="xTabs" v-model="activeName" class="tab-box" :tabNameEnable="true">
5
5
  <el-tab-pane :label="$t2('常规')" name="first">
6
6
  <vFormRender
7
+ ref="edit"
7
8
  :formCode.sync="formCode1"
8
9
  :dataId.sync="dataId"
9
10
  :param="param"
10
11
  :formData="formData"
11
12
  v-if="showEdit"
12
13
  visible-key="showEdit"
14
+ :visiable.sync="showEdit"
13
15
  :parent-target="_self"
14
16
  @reload="reload"
15
17
  @openCopyEditTab="openCopyEditTab"
16
18
  ></vFormRender>
17
19
  </el-tab-pane>
18
- <el-tab-pane :label="$t2('列表')" name="second">
20
+ <el-tab-pane :label="$t2(formConfig.customListTabLabel || '列表')" name="second">
19
21
  <div class="grid-height">
20
22
  <vFormRender
23
+ ref="list"
21
24
  :formCode="formCode"
22
25
  style="height: 100%"
23
26
  v-if="showRender"
24
27
  visible-key="showRender"
28
+ :visiable.sync="showRender"
25
29
  :parent-target="_self"
26
30
  @reload="$reloadHandle"
27
31
  :openEditDialog="openEditDialog"
28
32
  ></vFormRender>
29
33
  </div>
30
34
  </el-tab-pane>
35
+ <el-tab-pane
36
+ v-for="(item, index) in otherTabList"
37
+ :key="index"
38
+ :label="$t2(item.label)"
39
+ :name="`otherTab${index}`"
40
+ >
41
+ <div class="grid-height">
42
+ <vFormRender
43
+ :ref="`list${index}`"
44
+ :formCode.sync="item.formCode"
45
+ :dataId.sync="item.dataId"
46
+ :param="item.param"
47
+ v-if="item.showContent"
48
+ :parent-target="_self"
49
+ @reload="
50
+ (...args) => {
51
+ reloadAutoContent(...args);
52
+ }
53
+ "
54
+ :openEditDialog="openEditDialog1"
55
+ ></vFormRender>
56
+ </div>
57
+ </el-tab-pane>
31
58
  <template #editTab="{ tab, index, reloadTabContent }">
32
59
  <el-tab-pane
33
- :key="tab.data.id"
34
- :label="tab.data[multiTabLabelField]"
35
- :name="tab.data.id + ''"
60
+ :key="tab.tabName"
61
+ :label="tab.data[tab.tabLabelField]"
62
+ :name="tab.tabName"
36
63
  :closable="true"
37
64
  >
38
65
  <vFormRender
39
- :formCode="tab.formCode"
66
+ ref="multiEdit"
67
+ :formCode.sync="tab.formCode"
40
68
  :dataId.sync="tab.dataId"
41
69
  :param="tab.param"
42
70
  v-if="tab.showContent"
@@ -103,8 +131,7 @@ export default {
103
131
  return {
104
132
  activeName: "second",
105
133
  showEdit: false,
106
-
107
- formJson: {},
134
+ formJson: { formConfig: {} },
108
135
  formConfig: {},
109
136
  showRender: false,
110
137
  formTemplate: null,
@@ -119,12 +146,30 @@ export default {
119
146
  param: {},
120
147
  multiTabLabelField: null,
121
148
  formData: null,
149
+ otherTabList: [],
122
150
  };
123
151
  },
152
+ watch: {
153
+ activeName(val) {
154
+ if (
155
+ this.formJson.formConfig.otherTabEnabled &&
156
+ this.otherTabList.length > 0 &&
157
+ val.startsWith("otherTab")
158
+ ) {
159
+ let num = Number(val.substring("otherTab".length));
160
+ this.otherTabList[num].showContent = true;
161
+ }
162
+ },
163
+ },
124
164
  created() {
125
165
  this.initParam();
126
166
  this.getReportTemplate();
127
167
  },
168
+ provide() {
169
+ return {
170
+ _self: this,
171
+ };
172
+ },
128
173
  methods: {
129
174
  initParam() {
130
175
  let path = this.$route.path;
@@ -135,7 +180,7 @@ export default {
135
180
  },
136
181
  getReportTemplate() {
137
182
  this.$http({
138
- aes: true,
183
+ // aes: true,
139
184
  url: USER_PREFIX + `/formTemplate/getByFormCode`,
140
185
  method: `post`,
141
186
  data: { stringOne: this.formCode },
@@ -149,6 +194,7 @@ export default {
149
194
  ? JSON.parse(formTemplate.formViewContent)
150
195
  : {};
151
196
  this.formJson = formJson;
197
+ this.formConfig = formJson.formConfig || {};
152
198
  this.layoutType = formJson.formConfig?.layoutType;
153
199
  let addFormCode = formJson.formConfig?.addFormCode ?? null;
154
200
  let formCode2 = formJson.formConfig?.editFormCode ?? null;
@@ -158,6 +204,7 @@ export default {
158
204
  }
159
205
  this.addFormCode = addFormCode;
160
206
  this.multiTabLabelField = formJson.formConfig?.multiTabLabelField;
207
+ this.initOtherTabList();
161
208
  },
162
209
  });
163
210
  },
@@ -167,7 +214,16 @@ export default {
167
214
  return;
168
215
  }
169
216
  let formConfig = this.formJson.formConfig;
170
- let multiTabEnabled = formConfig.multiTabEnabled && formConfig.multiTabLabelField;
217
+ let tabLabelField = option?.multiTabLabelField || formConfig.multiTabLabelField;
218
+ let multiTabEnabled = false;
219
+ if (tabLabelField) {
220
+ if (option?.multiTabEnabled) {
221
+ multiTabEnabled = true;
222
+ } else if (formConfig.multiTabEnabled && option?.multiTabEnabled !== false) {
223
+ multiTabEnabled = true;
224
+ }
225
+ }
226
+
171
227
  let dataId = row && row.id ? row.id : null;
172
228
  this.dataId = dataId;
173
229
  let formCode = null;
@@ -180,6 +236,8 @@ export default {
180
236
  this.$refs.xTabs.openEditTab(row, param, {
181
237
  tabParam: {
182
238
  formCode,
239
+ tabLabelField,
240
+ tabName: formCode + dataId,
183
241
  },
184
242
  });
185
243
  } else {
@@ -192,6 +250,9 @@ export default {
192
250
  this.$openEditView("showEdit");
193
251
  }
194
252
  },
253
+ openEditDialog1(row, param, option) {
254
+ this.openEditDialog(row, param, { multiTabEnabled: false, ...option });
255
+ },
195
256
  openEditH5Dialog(row) {
196
257
  this.formCode1 = this.addFormCode;
197
258
  this.dataId = row && row.id ? row.id : null;
@@ -221,6 +282,38 @@ export default {
221
282
  this.formData = {};
222
283
  this.$reloadHandle(...arguments);
223
284
  },
285
+ initOtherTabList() {
286
+ if (!this.formJson.formConfig.otherTabEnabled) return;
287
+ this.otherTabList = this.formJson.formConfig.otherTabList
288
+ .filter((item) => !!item.formCode && !!item.label)
289
+ .map((item) => {
290
+ return {
291
+ label: item.label,
292
+ formCode: item.formCode,
293
+ showContent: false,
294
+ dataId: null,
295
+ param: null,
296
+ };
297
+ });
298
+ },
299
+ reloadAutoContent(target, param, tab) {
300
+ let updateParam =
301
+ param != null && param.updateParam != null ? param.updateParam : {};
302
+ for (let key in updateParam) {
303
+ target.$emit("update:" + key, updateParam[key]);
304
+ }
305
+
306
+ if (!tab) {
307
+ let activeName = this.activeName;
308
+ tab = this.tabs.find((item) => item.label == activeName);
309
+ }
310
+ if (tab) {
311
+ tab.showContent = false;
312
+ setTimeout(() => {
313
+ tab.showContent = true;
314
+ }, 200);
315
+ }
316
+ },
224
317
  },
225
318
  };
226
319
  </script>
@@ -351,7 +351,7 @@ export default {
351
351
  treeNodeUrl: USER_PREFIX + '/menu/listChildren',
352
352
  editSaveUrl: USER_PREFIX + '/menu/save',
353
353
  editDefaultRow: () => {
354
- return {enabled: true, type: this.menuType};
354
+ return {enabled: true, type: this.menuType,checkPermission: 0};
355
355
  },
356
356
  param: () => {
357
357
  return this.formData;
@@ -450,6 +450,29 @@ export default {
450
450
  }
451
451
  }
452
452
  },
453
+ {
454
+ field: 'checkPermission',
455
+ title: this.$t1('查询数据权限'),
456
+ width: 150,
457
+ editRender: {},
458
+ slots: {
459
+ default: ({row}) => {
460
+ if (row.checkPermission) {
461
+ return [<div class="txt-status">{this.$t1('启用')}</div>];
462
+ } else {
463
+ return [<div class="txt-status s-3">{this.$t1('禁用')}</div>];
464
+ }
465
+ },
466
+ edit: ({row}) => {
467
+ return [
468
+ <el-select v-model={row.checkPermission}>
469
+ <el-option value={1} label={this.$t1('启用')}></el-option>
470
+ <el-option value={0} label={this.$t1('禁用')}></el-option>
471
+ </el-select>
472
+ ]
473
+ }
474
+ }
475
+ },
453
476
  // { field: 'treePathName', title: '上级菜单', width: 200 },
454
477
  {field: 'orders', title: this.$t1('序号'), width: 100, editRender: {name: 'input'}},
455
478
  {
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <el-form
3
+ :model="formData"
4
+ status-icon
5
+ label-width="100px"
6
+ class="demo-ruleForm"
7
+ style="border: solid 1px #e9e9e9; padding: 5px"
8
+ >
9
+ <el-form-item :label="$t1('查询数据权限')">
10
+ <el-radio-group
11
+ v-model="formData.permissions"
12
+ @change="formData.menuRolePermOrgDTOs = []"
13
+ >
14
+ <el-radio :label="1">{{ $t1("创建人") }}</el-radio>
15
+ <el-radio :label="3">{{ $t1("所有") }}</el-radio>
16
+ <el-radio :label="2">{{ $t1("当前与下级所有机构权限") }}</el-radio>
17
+ </el-radio-group>
18
+ </el-form-item>
19
+ <el-form-item :label="$t1('额外机构')" v-if="formData.permissions == 2">
20
+ <el-tag
21
+ v-for="(item, index) in formData.menuRolePermOrgDTOs"
22
+ :key="index"
23
+ type="warning"
24
+ :disable-transitions="false"
25
+ :closable="true"
26
+ @close="formData.menuRolePermOrgDTOs.splice(index, 1)"
27
+ >
28
+ <el-tooltip
29
+ :enterable="false"
30
+ effect="dark"
31
+ :content="item.saleOrgName"
32
+ placement="bottom"
33
+ >
34
+ <span>{{ item.saleOrgName }}</span>
35
+ </el-tooltip>
36
+ </el-tag>
37
+ <el-button
38
+ icon="el-icon-plus"
39
+ type="warning"
40
+ class="el-button-tag"
41
+ @click="openProjectTagDialog"
42
+ ></el-button>
43
+ </el-form-item>
44
+ <saleOrgsDialog
45
+ v-if="showSaleOrgsDialog"
46
+ :visiable.sync="showSaleOrgsDialog"
47
+ @confirm="confirmSaleOrgsDialog"
48
+ ></saleOrgsDialog>
49
+ </el-form>
50
+ </template>
51
+ <script>
52
+ import saleOrgsDialog from "@base/views/user/sale_org/dialog.vue";
53
+ export default {
54
+ props: {
55
+ formData: {
56
+ type: Object,
57
+ default: () => {},
58
+ },
59
+ },
60
+ components: {
61
+ saleOrgsDialog,
62
+ },
63
+ data() {
64
+ return {
65
+ showSaleOrgsDialog: false,
66
+ };
67
+ },
68
+ methods: {
69
+ openProjectTagDialog() {
70
+ this.showSaleOrgsDialog = true;
71
+ },
72
+ confirmSaleOrgsDialog(rows) {
73
+ if (rows.length) {
74
+ let ids = this.formData.menuRolePermOrgDTOs.map((item) => item.saleOrgId);
75
+ let items = rows
76
+ .filter((item) => !ids.includes(item.id))
77
+ .map((item) => {
78
+ return {
79
+ menus: this.formData.id,
80
+ saleOrgId: item.id,
81
+ saleOrgName: item.name,
82
+ };
83
+ });
84
+ if (items.length) this.formData.menuRolePermOrgDTOs.push(...items);
85
+ }
86
+ },
87
+ },
88
+ };
89
+ </script>