cloud-web-corejs 1.0.163 → 1.0.165

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 (66) 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/bd/setting/config_manage/list.vue +7 -0
  59. package/src/views/user/area/dialog.vue +223 -116
  60. package/src/views/user/area/list.vue +318 -0
  61. package/src/views/user/form/vform/render.vue +54 -36
  62. package/src/views/user/form/view/list.vue +103 -10
  63. package/src/views/user/menu/list.vue +24 -1
  64. package/src/views/user/role/authConfig.vue +89 -0
  65. package/src/views/user/role/dialog.vue +70 -48
  66. package/src/views/user/role/edit.vue +114 -4
@@ -0,0 +1,318 @@
1
+ <template>
2
+ <div id="containt">
3
+ <el-tabs v-model="activeName" class="tab-box">
4
+ <el-tab-pane :label="$t1('列表')" name="second">
5
+ <div class="grid-height">
6
+ <vxe-grid
7
+ class="is-pointer"
8
+ ref="table-m1"
9
+ v-bind="vxeOption"
10
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
11
+ @custom="$vxeTableUtil.customHandle"
12
+ >
13
+ <template #form>
14
+ <div class="clearfix screen-btns">
15
+ <div class="fl">
16
+ <vxe-button
17
+ status="primary"
18
+ class="button-sty"
19
+ icon="el-icon-plus"
20
+ @click="addTopItem"
21
+ ><i></i>
22
+ {{ $t1("新增一级地区") }}
23
+ </vxe-button>
24
+ <!-- <vxe-button
25
+ status="primary"
26
+ class="button-sty"
27
+ icon="el-icon-plus"
28
+ @click="showAreaDialog = true"
29
+ ><i></i>
30
+ {{ $t1("测试") }}
31
+ </vxe-button> -->
32
+ </div>
33
+ <div class="fr">
34
+ <vxe-button
35
+ icon="el-icon-brush"
36
+ class="button-sty"
37
+ @click="resetEvent"
38
+ type="text"
39
+ status="primary"
40
+ plain
41
+ >{{ $t1("重置") }}
42
+ </vxe-button>
43
+ <vxe-button
44
+ status="warning"
45
+ icon="el-icon-search"
46
+ class="button-sty"
47
+ @click="searchEvent"
48
+ >
49
+ {{ $t1("搜索") }}
50
+ </vxe-button>
51
+ </div>
52
+ </div>
53
+ <vxe-form
54
+ class="screen-box"
55
+ title-width="92px"
56
+ title-align="right"
57
+ :data="formData"
58
+ @submit="searchEvent"
59
+ @reset="resetEvent"
60
+ >
61
+ <vxe-form-item :title="$t1('地区名称') + ':'" field="name">
62
+ <template v-slot>
63
+ <el-input v-model="formData.name" size="small" clearable />
64
+ </template>
65
+ </vxe-form-item>
66
+ <vxe-form-item :title="$t1('地区全称') + ':'" field="fullName">
67
+ <template v-slot>
68
+ <el-input v-model="formData.fullName" size="small" clearable />
69
+ </template>
70
+ </vxe-form-item>
71
+ <vxe-form-item :title="$t1('国家名称') + ':'" field="countryName">
72
+ <template v-slot>
73
+ <el-input
74
+ class="search-input"
75
+ max="200"
76
+ v-model="formData.countryName"
77
+ @clear="formData.locale = null"
78
+ placeholder="默认中国"
79
+ v-el-readonly
80
+ clearable
81
+ >
82
+ <i
83
+ slot="suffix"
84
+ class="el-input__icon el-icon-search"
85
+ @click="showCountryDialog = true"
86
+ ></i>
87
+ </el-input>
88
+ </template>
89
+ </vxe-form-item>
90
+ <vxe-button
91
+ type="submit"
92
+ @click="searchEvent"
93
+ v-show="false"
94
+ ></vxe-button>
95
+ </vxe-form>
96
+ </template>
97
+ <template #operate="obj">
98
+ <div class="cell-operate">
99
+ <template v-if="$refs['table-m1'].isActiveByRow(obj.row)">
100
+ <a @click="saveRowEvent(obj)" class="a-link">
101
+ <el-tooltip
102
+ :enterable="false"
103
+ effect="dark"
104
+ :content="$t1('保存')"
105
+ placement="top"
106
+ popper-class="tooltip-skin"
107
+ ><i class="el-icon-circle-check"></i
108
+ ></el-tooltip>
109
+ </a>
110
+ <a
111
+ @click="cancleRowEvent(obj)"
112
+ class="a-link"
113
+ v-if="hasSaveRow(obj.row)"
114
+ >
115
+ <el-tooltip
116
+ :enterable="false"
117
+ effect="dark"
118
+ :content="$t1('取消行编辑')"
119
+ placement="top"
120
+ popper-class="tooltip-skin"
121
+ ><i class="el-icon-circle-close"></i
122
+ ></el-tooltip>
123
+ </a>
124
+ <a
125
+ @click="removeRowEvent(obj)"
126
+ class="a-link"
127
+ v-if="!hasSaveRow(obj.row)"
128
+ >
129
+ <el-tooltip
130
+ :enterable="false"
131
+ effect="dark"
132
+ :content="$t1('删除')"
133
+ placement="top"
134
+ popper-class="tooltip-skin"
135
+ ><i class="el-icon-delete"></i
136
+ ></el-tooltip>
137
+ </a>
138
+ </template>
139
+ <template v-else>
140
+ <a class="a-link" @click="insertChildEvent(obj)">
141
+ <el-tooltip
142
+ :enterable="false"
143
+ effect="dark"
144
+ :content="$t1('新增')"
145
+ placement="top"
146
+ popper-class="tooltip-skin"
147
+ ><i class="el-icon-circle-plus-outline"></i
148
+ ></el-tooltip>
149
+ </a>
150
+ <a @click="editRowEvent(obj)" class="a-link" v-if="obj.row">
151
+ <el-tooltip
152
+ :enterable="false"
153
+ effect="dark"
154
+ :content="$t1('行编辑')"
155
+ placement="top"
156
+ popper-class="tooltip-skin"
157
+ ><i class="el-icon-edit-outline"></i
158
+ ></el-tooltip>
159
+ </a>
160
+ </template>
161
+ </div>
162
+ </template>
163
+ </vxe-grid>
164
+ </div>
165
+ </el-tab-pane>
166
+ </el-tabs>
167
+ <countryDialog
168
+ v-if="showCountryDialog"
169
+ :visiable.sync="showCountryDialog"
170
+ :multi="false"
171
+ @confirm="countryDialogConfirm"
172
+ ></countryDialog>
173
+ <!-- <areaDialog
174
+ v-if="showAreaDialog"
175
+ :visiable.sync="showAreaDialog"
176
+ :multi="false"
177
+ ></areaDialog> -->
178
+ </div>
179
+ </template>
180
+
181
+ <script>
182
+ import { tableTreeMixins } from "@base/mixins/tableTree/index.js";
183
+ import countryDialog from "@base/views/user/country/dialog.vue";
184
+ // import areaDialog from "@base/views/user/area/dialog.vue";
185
+
186
+ export default {
187
+ name: "menu:in_list",
188
+ components: { countryDialog /* , areaDialog */ },
189
+ mixins: [tableTreeMixins],
190
+ mounted() {
191
+ this.initTableList();
192
+ },
193
+ data() {
194
+ let that = this;
195
+ return {
196
+ activeName: "second",
197
+ dataId: "",
198
+ formData: {
199
+ countryName: null,
200
+ locale: null,
201
+ },
202
+ vxeOption: {},
203
+ showCountryDialog: false,
204
+ showAreaDialog: false,
205
+ };
206
+ },
207
+ methods: {
208
+ searchEvent() {
209
+ this.$refs["table-m1"].commitProxy("reload");
210
+ },
211
+ resetEvent() {
212
+ this.formData = {};
213
+ this.$refs["table-m1"].commitProxy("reload");
214
+ },
215
+ initTableList() {
216
+ let that = this;
217
+ let tableOption = {
218
+ vue: this,
219
+ tableRef: "table-m1",
220
+ tableName: "user_area_list-m1",
221
+ path: USER_PREFIX + "/area/list",
222
+ treeNodeUrl: USER_PREFIX + "/area/getChildren",
223
+ editSaveUrl: USER_PREFIX + "/area/save",
224
+ editDefaultRow: ({ row }) => {
225
+ let locale = row?.locale || null;
226
+ return { enabled: true };
227
+ },
228
+ param: () => {
229
+ let locale = this.formData.locale || null;
230
+ return {
231
+ ...this.formData,
232
+ locale,
233
+ };
234
+ },
235
+ treeNodeParam: (row) => {
236
+ return {
237
+ id: row.id,
238
+ // enabled: this.formData.enabled,
239
+ };
240
+ },
241
+ config: {
242
+ treeConfig: {
243
+ parentField: "parent",
244
+ },
245
+ },
246
+ columns: [
247
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
248
+ {
249
+ title: this.$t1("地区名称"),
250
+ field: "name",
251
+ width: 250,
252
+ fixed: "left",
253
+ treeNode: true,
254
+ editRender: {},
255
+ slots: {
256
+ edit: ({ row }) => {
257
+ return [<el-input v-model={row.name} clearable />];
258
+ },
259
+ },
260
+ },
261
+ {
262
+ field: "code",
263
+ title: this.$t1("地区编码"),
264
+ width: 250,
265
+ editRender: {},
266
+ slots: {
267
+ edit: ({ row }) => {
268
+ return [<el-input v-model={row.code} clearable />];
269
+ },
270
+ },
271
+ },
272
+ {
273
+ field: "fullName",
274
+ title: this.$t1("地区全称"),
275
+ width: 250,
276
+ },
277
+ {
278
+ field: "locale",
279
+ title: this.$t1("国家编码"),
280
+ width: 250,
281
+ editRender: {},
282
+ slots: {
283
+ edit: ({ row }) => {
284
+ return [<el-input v-model={row.locale} clearable />];
285
+ },
286
+ },
287
+ },
288
+ { title: this.$t1("创建人"), field: "createBy", width: 150 },
289
+ { title: this.$t1("创建时间"), field: "createDate", width: 150 },
290
+ { title: this.$t1("更新人"), field: "modifyBy", width: 100 },
291
+ { title: this.$t1("更新时间"), field: "modifyDate", width: 150 },
292
+ {
293
+ width: 100,
294
+ title: "",
295
+ fixed: "right",
296
+ sortable: false,
297
+ slots: { default: "operate" },
298
+ },
299
+ ],
300
+ };
301
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
302
+ this.vxeOption = opts;
303
+ });
304
+ },
305
+ addTopItem(type, parentParam) {
306
+ this.insertTopRow(this.$refs["table-m1"]);
307
+ },
308
+ countryDialogConfirm(rows) {
309
+ if (rows.length > 0) {
310
+ let row = rows[0];
311
+ this.formData.locale = row.countryCode;
312
+ this.formData.countryName = row.simpleName;
313
+ }
314
+ },
315
+ },
316
+ };
317
+ </script>
318
+ <style scoped lang="scss"></style>
@@ -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>