cloud-web-corejs 1.0.54-dev.16 → 1.0.54-dev.160
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 +9 -3
- package/src/components/Qrcode/fileParse.vue +0 -1
- package/src/components/VabUpload/index.vue +2 -1
- package/src/components/VabUpload/mixins.js +1 -1
- package/src/components/VabUpload/view.vue +4 -3
- package/src/components/advancedSearchDialog/mixins.js +1 -1
- package/src/components/baseAttachment/index.vue +22 -13
- package/src/components/baseAttachment/mixins.js +248 -1
- package/src/components/excelExport/exportFieldDialog.vue +16 -6
- package/src/components/excelExport/index.js +2 -1
- package/src/components/excelExport/index.vue +8 -6
- package/src/components/excelExport/mixins.js +1 -2
- package/src/components/excelImport/index.vue +1 -0
- package/src/components/excelImport/mixins.js +1 -1
- package/src/components/fileLibrary/fileObjAuthDialog.vue +1 -1
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +7 -1
- package/src/components/fileLibrary/fileObjNotifyEdit.vue +90 -68
- package/src/components/fileLibrary/filterDialog.vue +383 -0
- package/src/components/fileLibrary/index.vue +23 -24
- package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
- package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +337 -207
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +33 -26
- package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +5 -5
- package/src/components/fileLibrary/mixins/indexMixins.js +77 -27
- package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +63 -3
- package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +1 -1
- package/src/components/fileLibrary/propertiesDialog.vue +18 -0
- package/src/components/fileLibrary/shareDialog.vue +1 -1
- package/src/components/jsonImport/mixins.js +1 -1
- package/src/components/onlineTalk/index.vue +327 -5
- package/src/components/onlineTalk/mixins.js +1 -1
- package/src/components/table/CellSlot.vue +1 -0
- package/src/components/table/index.js +12 -10
- package/src/components/table/tableForm.vue +99 -63
- package/src/components/table/tableFormMixin.js +1 -1
- package/src/components/table/vxeFilter/mixin.js +1 -1
- package/src/components/vb-tabs/x-tabs.vue +3 -2
- package/src/components/wf/wf.js +1 -1
- package/src/components/wf/wfStartDialog.vue +1 -1
- package/src/components/wf/wfUtil.js +1 -1
- package/src/components/xform/form-designer/designer.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +16 -4
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +35 -5
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +3 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +23 -7
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +31 -5
- package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +10 -5
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1245 -16
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +138 -6
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +4 -2
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +49 -8
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +61 -88
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +13 -0
- package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +67 -3
- package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +9 -4
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +8 -2
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +6 -1
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +46 -34
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +80 -0
- package/src/components/xform/form-designer/indexMixin.js +784 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +67 -36
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +322 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1051 -1042
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +643 -300
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +27 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +17 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +42 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +177 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +22 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +170 -20
- package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +242 -27
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +5 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +4 -7
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +276 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +225 -252
- package/src/components/xform/form-render/container-item/containerItemMixin.js +330 -1
- package/src/components/xform/form-render/container-item/data-table-item.vue +33 -11
- package/src/components/xform/form-render/container-item/data-table-mixin.js +2132 -18
- package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
- package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
- package/src/components/xform/form-render/container-item/tab-item.vue +11 -6
- package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
- package/src/components/xform/form-render/container-item/table-item.vue +4 -2
- package/src/components/xform/form-render/indexMixin.js +1802 -1
- package/src/components/xform/lang/zh-CN.js +1 -1
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/mixins/scriptHttp.js +164 -1
- package/src/components/xform/utils/emitter.js +4 -4
- package/src/components/xform/utils/util.js +1631 -1
- package/src/layout/components/Sidebar/default.vue +50 -6
- package/src/layout/components/TagsView/index.vue +0 -1
- package/src/layout/components/extractedCode/createDialog.vue +92 -0
- package/src/layout/components/extractedCode/queryDialog.vue +96 -0
- package/src/layout/components/extractedCode/viewDialog.vue +192 -0
- package/src/mixins/selectDialog/index.js +1 -1
- package/src/router/modules/customer.js +15 -0
- package/src/store/config/index.js +1 -1
- package/src/store/modules/permission.js +1 -1
- package/src/store/modules/user.js +1 -1
- package/src/utils/index.js +4 -2
- package/src/utils/pddLog.js +103 -0
- package/src/utils/request.js +28 -28
- package/src/utils/vab.js +19 -27
- package/src/views/bd/setting/form_import_log/edit.vue +127 -0
- package/src/views/bd/setting/form_import_log/list.vue +205 -0
- package/src/views/bd/setting/form_script/edit1.vue +1 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +3 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +1 -1
- package/src/views/bd/setting/form_script/mixins/list.js +1 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +14 -14
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
- package/src/views/bd/setting/form_template/edit.vue +9 -1
- package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +4 -0
- package/src/views/bd/setting/form_template/mixins/edit.js +1 -1
- package/src/views/bd/setting/form_template/mixins/list.js +25 -22
- package/src/views/bd/setting/form_template/mixins/wf_list.js +12 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -0
- package/src/views/bd/setting/form_template/wf_list.vue +127 -0
- package/src/views/bd/setting/menu_kind/mixins/list.js +1 -1
- package/src/views/bd/setting/table_model/edit.vue +830 -426
- package/src/views/bd/setting/table_model/mixins/edit.js +1057 -13
- package/src/views/bd/setting/table_model/mixins/list.js +14 -14
- package/src/views/user/area/dialog.vue +21 -9
- package/src/views/user/bill_setting/edit.vue +1 -1
- package/src/views/user/bill_setting/list.vue +1 -1
- package/src/views/user/common_attribute/itemEdit.vue +2 -2
- package/src/views/user/common_attribute/list.vue +1 -1
- package/src/views/user/common_script/edit.vue +1 -1
- package/src/views/user/common_script/list.vue +1 -1
- package/src/views/user/company_info/dialog.vue +164 -154
- package/src/views/user/company_info/edit.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +1 -0
- package/src/views/user/extend_datasource/edit.vue +3 -0
- package/src/views/user/extend_datasource/list.vue +2 -1
- package/src/views/user/file_type/edit.vue +30 -1
- package/src/views/user/file_type/list.vue +28 -0
- package/src/views/user/form/vform/designer.vue +772 -749
- package/src/views/user/form/view/list.vue +27 -9
- package/src/views/user/groups/edit.vue +2 -0
- package/src/views/user/groups/list.vue +1 -0
- package/src/views/user/home/default.vue +1007 -979
- package/src/views/user/home/dev.vue +29 -0
- package/src/views/user/home/index.vue +16 -6
- package/src/views/user/login/default.vue +4 -2
- package/src/views/user/login/index2.vue +131 -0
- package/src/views/user/notify_message/dialog.vue +1 -1
- package/src/views/user/notify_template/edit.vue +188 -187
- package/src/views/user/notify_template/edit2.vue +176 -0
- package/src/views/user/notify_template/list.vue +4 -1
- package/src/views/user/notify_template/list2.vue +190 -0
- package/src/views/user/outLink/form_view.vue +39 -12
- package/src/views/user/outLink/index.vue +17 -0
- package/src/views/user/outLink/view.vue +39 -13
- package/src/views/user/position/list.vue +4 -4
- package/src/views/user/push_setting/list.vue +2 -2
- package/src/views/user/role/dialog.vue +1 -1
- package/src/views/user/role/list.vue +4 -4
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/user/dialog.vue +1 -1
- package/src/views/user/user/edit.vue +9 -9
- package/src/views/user/user/form_edit.vue +63 -2
- package/src/views/user/user/form_info.vue +210 -0
- package/src/views/user/user/form_list.vue +1 -0
- package/src/views/user/user/list.vue +4 -4
- package/src/views/user/wf/wf_manage/list.vue +1 -1
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
- package/src/views/user/wf/wf_obj_config/list.vue +1 -13
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +2 -2
@@ -9,10 +9,18 @@
|
|
9
9
|
-->
|
10
10
|
|
11
11
|
<template>
|
12
|
-
<div class="field-wrapper" :class="{'design-time-bottom-margin': !!this.designer}"
|
12
|
+
<div class="field-wrapper" :class="{'design-time-bottom-margin': !!this.designer}"
|
13
|
+
v-show="!field.options.hidden || (designState === true)">
|
13
14
|
<div>
|
14
15
|
<template v-if="formItemProp=='false'">
|
15
|
-
<
|
16
|
+
<template v-if="!field.options.hidden">
|
17
|
+
<template v-if="showType === 0">
|
18
|
+
<slot></slot>
|
19
|
+
</template>
|
20
|
+
<template v-else>
|
21
|
+
<span>{{ getShowValue() }}</span>
|
22
|
+
</template>
|
23
|
+
</template>
|
16
24
|
</template>
|
17
25
|
<template v-else>
|
18
26
|
<el-form-item v-if="!!field.formItemFlag && (!field.options.hidden || (designState === true))"
|
@@ -22,7 +30,8 @@
|
|
22
30
|
:class="[selected ? 'selected' : '', labelAlign, customClass, field.options.required ? 'required' : '']"
|
23
31
|
@click.native.stop="selectField(field)">
|
24
32
|
|
25
|
-
<span v-if="!!field.options.labelIconClass" slot="label" class="custom-label"
|
33
|
+
<span v-if="!!field.options.labelIconClass" slot="label" class="custom-label"
|
34
|
+
:style="{'color':field.options.labelColor}">
|
26
35
|
<template v-if="field.options.labelIconPosition === 'front'">
|
27
36
|
<template v-if="!!field.options.labelTooltip">
|
28
37
|
<el-tooltip :content="field.options.labelTooltip" effect="light">
|
@@ -38,10 +47,15 @@
|
|
38
47
|
{{ label }}<i :class="field.options.labelIconClass"></i></template>
|
39
48
|
</template>
|
40
49
|
</span>
|
41
|
-
<span v-if="!!field.options.labelColor" slot="label"
|
50
|
+
<span v-if="!!field.options.labelColor" slot="label" :style="{'color':field.options.labelColor}">
|
42
51
|
{{ label }}
|
43
52
|
</span>
|
44
|
-
<
|
53
|
+
<template v-if="showType === 0">
|
54
|
+
<slot></slot>
|
55
|
+
</template>
|
56
|
+
<template v-else>
|
57
|
+
<span>{{ getShowValue() }}</span>
|
58
|
+
</template>
|
45
59
|
</el-form-item>
|
46
60
|
</template>
|
47
61
|
</div>
|
@@ -160,8 +174,14 @@ export default {
|
|
160
174
|
},
|
161
175
|
|
162
176
|
},
|
177
|
+
data() {
|
178
|
+
return {
|
179
|
+
showType: 0
|
180
|
+
}
|
181
|
+
},
|
163
182
|
created() {
|
164
183
|
//
|
184
|
+
this.initShowType();
|
165
185
|
},
|
166
186
|
methods: {
|
167
187
|
isSubFormItem() {
|
@@ -252,7 +272,119 @@ export default {
|
|
252
272
|
},
|
253
273
|
getI18nLabel(label, path, param) {
|
254
274
|
return !this.designState && label ? this.$t2(label, path, param) : label;
|
255
|
-
}
|
275
|
+
},
|
276
|
+
initShowType() {
|
277
|
+
if (!!this.designer)return
|
278
|
+
let that = this.$parent
|
279
|
+
let formRef = that.getFormRef?that.getFormRef():that;
|
280
|
+
let bdService = formRef.bdService;
|
281
|
+
let companyCode = this.$store.getters.companyCode;
|
282
|
+
let loginAccount = this.$store.getters.loginAccount;
|
283
|
+
|
284
|
+
let userSaleOrgDTOs = formRef.userSaleOrgDTOs;
|
285
|
+
let userRoleDTOs = formRef.userRoleDTOs;
|
286
|
+
|
287
|
+
let saleOrgCodeList = userSaleOrgDTOs.map(item => item.sn);
|
288
|
+
let roleCodeList = userRoleDTOs.map(item => item.roleCode);
|
289
|
+
|
290
|
+
let optionModel = this.field.options;
|
291
|
+
|
292
|
+
let flag = 0;//0 原本组件,1明文文本,2密文文本
|
293
|
+
if (optionModel.showTextEnabled) {
|
294
|
+
flag = 1;
|
295
|
+
} else if (optionModel.showEncryptTextEnabled) {
|
296
|
+
flag = 2;
|
297
|
+
}
|
298
|
+
if (optionModel.userTextRuleEnabled) {
|
299
|
+
let userTextRuleConfig = optionModel.userTextRuleConfig || [];
|
300
|
+
userTextRuleConfig.forEach(item => {
|
301
|
+
let type = item.type ?? null;
|
302
|
+
if (type !== null && type !== "") {
|
303
|
+
let companyCodeStr = item.companyCodes;
|
304
|
+
let companyCodes = companyCodeStr ? companyCodeStr.split(",").filter(item => !!item) : [];
|
305
|
+
/*
|
306
|
+
|
307
|
+
let loginAccountStr = item.loginAccounts;
|
308
|
+
let loginAccounts = loginAccountStr ? loginAccountStr.split(",").filter(item => !!item) : [];
|
309
|
+
|
310
|
+
let saleOrgCodeStr = item.saleOrgCodes;
|
311
|
+
let saleOrgCodes = saleOrgCodeStr ? saleOrgCodeStr.split(",").filter(item => !!item) : [];
|
312
|
+
*/
|
313
|
+
|
314
|
+
let roleCodeStr = item.roleCodes;
|
315
|
+
let roleCodes = roleCodeStr ? roleCodeStr.split(",").filter(item => !!item) : [];
|
316
|
+
|
317
|
+
let flag1 = !item.serveName || item.serveName == bdService;
|
318
|
+
let flag2 = !companyCodes.length || companyCodes.includes(companyCode)
|
319
|
+
// let flag3 = !loginAccounts.length || loginAccounts.includes(loginAccount)
|
320
|
+
// let flag4 = this.compareToList(saleOrgCodes, saleOrgCodeList)
|
321
|
+
let flag5 = this.compareToList(roleCodes, roleCodeList)
|
322
|
+
let result = flag1 && flag2 && flag5 ;
|
323
|
+
if (result) {
|
324
|
+
flag = type;
|
325
|
+
}
|
326
|
+
}
|
327
|
+
})
|
328
|
+
}
|
329
|
+
this.showType = flag;
|
330
|
+
},
|
331
|
+
compareToList(list1, list2) {
|
332
|
+
if (!list1.length) {
|
333
|
+
return true;
|
334
|
+
}
|
335
|
+
if (!list2.length) {
|
336
|
+
return false;
|
337
|
+
}
|
338
|
+
return list1.some(item => {
|
339
|
+
return list2.some(item2 => item == item2)
|
340
|
+
});
|
341
|
+
},
|
342
|
+
getShowValue() {
|
343
|
+
let fieldModel = this.$parent.fieldModel;
|
344
|
+
let showValue = fieldModel
|
345
|
+
if (this.showType == 2) {
|
346
|
+
let optionModel = this.field.options;
|
347
|
+
showValue = "*******";
|
348
|
+
if ((optionModel.textRule1 || optionModel.textRule2 || optionModel.textRule3)) {
|
349
|
+
if (fieldModel && !optionModel.textRule1) {
|
350
|
+
let size = fieldModel.length;
|
351
|
+
let optionModel = this.field.options;
|
352
|
+
|
353
|
+
let str1 = "";
|
354
|
+
let str2 = "";
|
355
|
+
let flag2 = optionModel.textRule2 && optionModel.textRule2Number;
|
356
|
+
let flag3 = optionModel.textRule3 && optionModel.textRule3Number;
|
357
|
+
if (flag2) {
|
358
|
+
if (size >= optionModel.textRule2Number) {
|
359
|
+
str1 = fieldModel.slice(0, optionModel.textRule2Number)
|
360
|
+
}
|
361
|
+
}
|
362
|
+
if (flag3) {
|
363
|
+
if (size >= optionModel.textRule3Number) {
|
364
|
+
str2 = fieldModel.slice(0, optionModel.textRule3Number)
|
365
|
+
}
|
366
|
+
}
|
367
|
+
if (flag2 && flag3) {
|
368
|
+
if (size >= optionModel.textRule2Number + optionModel.textRule3Number) {
|
369
|
+
showValue = str1 + "*****" + str2;
|
370
|
+
}
|
371
|
+
} else if (flag2) {
|
372
|
+
if (str1) {
|
373
|
+
showValue = str1 + "*****"
|
374
|
+
}
|
375
|
+
} else if (flag3) {
|
376
|
+
if (str2) {
|
377
|
+
showValue = "*****" + str2
|
378
|
+
}
|
379
|
+
}
|
380
|
+
|
381
|
+
}
|
382
|
+
}
|
383
|
+
|
384
|
+
}
|
385
|
+
|
386
|
+
return showValue;
|
387
|
+
},
|
256
388
|
|
257
389
|
}
|
258
390
|
}
|
package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
:parent-widget="parentWidget" :parent-list="parentList"
|
6
6
|
:index-of-parent-list="indexOfParentList">
|
7
7
|
<el-button type="primary" class="button-sty" size="mini" icon="el-icon-download" @click="importHandle"
|
8
|
-
:disabled="field.options.disabled">{{$t1('导入')}}
|
8
|
+
:disabled="field.options.disabled">{{ $t1('导入') }}
|
9
9
|
</el-button>
|
10
10
|
</static-content-wrapper>
|
11
11
|
|
@@ -67,8 +67,10 @@ export default {
|
|
67
67
|
// let importCodes = this.field.options.importCodes;
|
68
68
|
this.getFormRef().openImportDialog({
|
69
69
|
importOption: this.field.options,
|
70
|
-
|
70
|
+
importSaveDisabled: !!this.field.options.importSaveDisabled,
|
71
|
+
callback: (resultData, file, done) => {
|
71
72
|
// this.getWidgetRef(tableTarget).searchEvent();
|
73
|
+
this.handleCustomEvent(this.field.options.onConfirmImport, ['resultData', 'file', 'done'], [resultData, file, done])
|
72
74
|
}
|
73
75
|
});
|
74
76
|
}
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js
CHANGED
@@ -3,7 +3,7 @@ import i18n from '../../../../../../components/xform/utils/i18n';
|
|
3
3
|
import fieldMixin from '../../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin';
|
4
4
|
|
5
5
|
import {deepClone} from '../../../../../../components/xform/utils/util';
|
6
|
-
|
6
|
+
import {extendDeeply} from "@base/utils/index.js";
|
7
7
|
import {use} from 'echarts/core';
|
8
8
|
import {CanvasRenderer} from 'echarts/renderers';
|
9
9
|
import {BarChart} from 'echarts/charts';
|
@@ -53,7 +53,6 @@ modules = {
|
|
53
53
|
serieClone: {},
|
54
54
|
showChart: true,
|
55
55
|
colors: [
|
56
|
-
|
57
56
|
{
|
58
57
|
type: 'linear',
|
59
58
|
x: 0.5,
|
@@ -206,6 +205,9 @@ modules = {
|
|
206
205
|
delete chartOptions.yAxis.data;
|
207
206
|
}
|
208
207
|
}
|
208
|
+
},
|
209
|
+
chartOption() {
|
210
|
+
return this.field.options.echarBarOption
|
209
211
|
}
|
210
212
|
},
|
211
213
|
beforeCreate() {
|
@@ -220,6 +222,7 @@ modules = {
|
|
220
222
|
this.initEventHandler();
|
221
223
|
|
222
224
|
this.handleOnCreated();
|
225
|
+
this.initOption();
|
223
226
|
this.serieClone = deepClone(this.field.options.echarBarOption.series[0]);
|
224
227
|
},
|
225
228
|
|
@@ -232,6 +235,37 @@ modules = {
|
|
232
235
|
},
|
233
236
|
|
234
237
|
methods: {
|
238
|
+
reflush(){
|
239
|
+
this.showChart = false;
|
240
|
+
this.$nextTick(()=>{
|
241
|
+
this.showChart = true
|
242
|
+
})
|
243
|
+
},
|
244
|
+
getColors(){
|
245
|
+
let chartColors = this.field.options.echarBarOption.colors || [];
|
246
|
+
let colors = [...chartColors, ...this.colors];
|
247
|
+
return colors
|
248
|
+
},
|
249
|
+
adjustColor() {
|
250
|
+
let colors = this.getColors();
|
251
|
+
let colorsSize = colors.length;
|
252
|
+
this.field.options.echarBarOption.series.forEach((serie, index) => {
|
253
|
+
if (colorsSize > index) {
|
254
|
+
if (serie.itemStyle) {
|
255
|
+
serie.itemStyle.color = colors[index]
|
256
|
+
} else {
|
257
|
+
serie.itemStyle = {
|
258
|
+
color: colors[index]
|
259
|
+
}
|
260
|
+
}
|
261
|
+
}
|
262
|
+
})
|
263
|
+
},
|
264
|
+
initOption() {
|
265
|
+
let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
|
266
|
+
this.field.options.echarBarOption = extendDeeply(this.field.options.echarBarOption, echartConfig);
|
267
|
+
this.adjustColor();
|
268
|
+
},
|
235
269
|
/*async loadData() {
|
236
270
|
if (this.designState) {
|
237
271
|
this.showChart = true;
|
@@ -364,7 +398,7 @@ modules = {
|
|
364
398
|
});
|
365
399
|
},
|
366
400
|
setValue(rows) {
|
367
|
-
this.showChart
|
401
|
+
this.showChart = false;
|
368
402
|
let serieClone = this.serieClone;
|
369
403
|
let resDatas = rows || [];
|
370
404
|
let axisDatas = [];
|
@@ -383,14 +417,18 @@ modules = {
|
|
383
417
|
nameDatas.push(resData.name);
|
384
418
|
}
|
385
419
|
});
|
386
|
-
let colors = this.
|
420
|
+
let colors = this.getColors();
|
387
421
|
let colorsSize = colors.length;
|
388
422
|
nameDatas.forEach((nameItem, index) => {
|
389
423
|
let serie = deepClone(serieClone);
|
390
424
|
serie.name = nameItem;
|
391
|
-
if (
|
392
|
-
if (
|
425
|
+
if (colorsSize > index) {
|
426
|
+
if (serie.itemStyle) {
|
393
427
|
serie.itemStyle.color = colors[index]
|
428
|
+
} else {
|
429
|
+
serie.itemStyle = {
|
430
|
+
color: colors[index]
|
431
|
+
}
|
394
432
|
}
|
395
433
|
}
|
396
434
|
let serieDatas = [];
|
@@ -409,9 +447,12 @@ modules = {
|
|
409
447
|
let chartOptions = this.field.options.echarBarOption;
|
410
448
|
chartOptions[this.alignField].data = axisDatas;
|
411
449
|
chartOptions.series = newSeries;
|
412
|
-
this.$nextTick(()=>{
|
413
|
-
this.showChart
|
450
|
+
this.$nextTick(() => {
|
451
|
+
this.showChart = true;
|
414
452
|
})
|
453
|
+
},
|
454
|
+
getChart() {
|
455
|
+
return this.$refs.chart;
|
415
456
|
}
|
416
457
|
}
|
417
458
|
};
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js
CHANGED
@@ -9,6 +9,7 @@ import {CanvasRenderer} from 'echarts/renderers';
|
|
9
9
|
import {LineChart} from 'echarts/charts';
|
10
10
|
import {TitleComponent, TooltipComponent, LegendComponent} from 'echarts/components';
|
11
11
|
import {THEME_KEY} from 'vue-echarts';
|
12
|
+
import {extendDeeply} from "@base/utils/index.js";
|
12
13
|
|
13
14
|
use([CanvasRenderer, LineChart, TitleComponent, TooltipComponent, LegendComponent]);
|
14
15
|
let modules = {};
|
@@ -52,87 +53,8 @@ modules = {
|
|
52
53
|
requestAccesses: [],
|
53
54
|
requestAccess: null,
|
54
55
|
serieClone: {},
|
55
|
-
showChart:true,
|
56
|
-
colors: [
|
57
|
-
|
58
|
-
{
|
59
|
-
type: 'linear',
|
60
|
-
x: 0.5,
|
61
|
-
y: 0.9,
|
62
|
-
r: 0.2,
|
63
|
-
colorStops: [{
|
64
|
-
offset: 1, color: '#08C084' // 0% 处的颜色
|
65
|
-
}, {
|
66
|
-
offset: 0, color: '#97EACE' // 100% 处的颜色
|
67
|
-
}],
|
68
|
-
},
|
69
|
-
{
|
70
|
-
type: 'linear',
|
71
|
-
x: 0.5,
|
72
|
-
y: 0.9,
|
73
|
-
r: 0.2,
|
74
|
-
colorStops: [{
|
75
|
-
offset: 1, color: '#29ABE3' // 0% 处的颜色
|
76
|
-
}, {
|
77
|
-
offset: 0, color: '#AADEF4' // 100% 处的颜色
|
78
|
-
}],
|
79
|
-
},
|
80
|
-
{
|
81
|
-
type: 'linear',
|
82
|
-
x: 0.5,
|
83
|
-
y: 0.9,
|
84
|
-
r: 0.2,
|
85
|
-
colorStops: [{
|
86
|
-
offset: 1, color: '#0044FE' // 0% 处的颜色
|
87
|
-
}, {
|
88
|
-
offset: 0, color: '#97B3FF' // 100% 处的颜色
|
89
|
-
}],
|
90
|
-
},
|
91
|
-
{
|
92
|
-
type: 'linear',
|
93
|
-
x: 0.5,
|
94
|
-
y: 0.9,
|
95
|
-
r: 0.2,
|
96
|
-
colorStops: [{
|
97
|
-
offset: 1, color: '#75018A' // 0% 处的颜色
|
98
|
-
}, {
|
99
|
-
offset: 0, color: '#C492CD' // 100% 处的颜色
|
100
|
-
}],
|
101
|
-
},
|
102
|
-
{
|
103
|
-
type: 'linear',
|
104
|
-
x: 0.5,
|
105
|
-
y: 0.9,
|
106
|
-
r: 0.2,
|
107
|
-
colorStops: [{
|
108
|
-
offset: 1, color: '#BF0104' // 0% 处的颜色
|
109
|
-
}, {
|
110
|
-
offset: 0, color: '#E59697' // 100% 处的颜色
|
111
|
-
}],
|
112
|
-
},
|
113
|
-
{
|
114
|
-
type: 'linear',
|
115
|
-
x: 0.5,
|
116
|
-
y: 0.9,
|
117
|
-
r: 0.2,
|
118
|
-
colorStops: [{
|
119
|
-
offset: 1, color: '#FF8B01' // 0% 处的颜色
|
120
|
-
}, {
|
121
|
-
offset: 0, color: '#FFCF95' // 100% 处的颜色
|
122
|
-
}],
|
123
|
-
},
|
124
|
-
{
|
125
|
-
type: 'linear',
|
126
|
-
x: 0.5,
|
127
|
-
y: 0.9,
|
128
|
-
r: 0.2,
|
129
|
-
colorStops: [{
|
130
|
-
offset: 1, color: '#FAFE09' // 0% 处的颜色
|
131
|
-
}, {
|
132
|
-
offset: 0, color: '#FCFFAF' // 100% 处的颜色
|
133
|
-
}],
|
134
|
-
}
|
135
|
-
]
|
56
|
+
showChart: true,
|
57
|
+
colors: []
|
136
58
|
};
|
137
59
|
},
|
138
60
|
computed: {
|
@@ -157,6 +79,9 @@ modules = {
|
|
157
79
|
return height;
|
158
80
|
}
|
159
81
|
return '';
|
82
|
+
},
|
83
|
+
chartOption() {
|
84
|
+
return this.field.options.echarCategoryOption
|
160
85
|
}
|
161
86
|
},
|
162
87
|
beforeCreate() {
|
@@ -171,6 +96,7 @@ modules = {
|
|
171
96
|
this.initEventHandler();
|
172
97
|
|
173
98
|
this.handleOnCreated();
|
99
|
+
this.initOption();
|
174
100
|
this.serieClone = deepClone(this.field.options.echarCategoryOption.series[0]);
|
175
101
|
// this.loadData();
|
176
102
|
},
|
@@ -184,6 +110,38 @@ modules = {
|
|
184
110
|
},
|
185
111
|
|
186
112
|
methods: {
|
113
|
+
getColors() {
|
114
|
+
let chartColors = this.field.options.echarCategoryOption.colors || [];
|
115
|
+
let colors = [...chartColors, ...this.colors];
|
116
|
+
return colors
|
117
|
+
},
|
118
|
+
adjustColor() {
|
119
|
+
let colors = this.getColors();
|
120
|
+
let colorsSize = colors.length;
|
121
|
+
this.field.options.echarCategoryOption.series.forEach((serie, index) => {
|
122
|
+
if (colorsSize > index) {
|
123
|
+
if (serie.lineStyle) {
|
124
|
+
serie.lineStyle.color = colors[index]
|
125
|
+
} else {
|
126
|
+
serie.lineStyle = {
|
127
|
+
color: colors[index]
|
128
|
+
}
|
129
|
+
}
|
130
|
+
if (serie.itemStyle) {
|
131
|
+
serie.itemStyle.color = colors[index]
|
132
|
+
} else {
|
133
|
+
serie.itemStyle = {
|
134
|
+
color: colors[index]
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
})
|
139
|
+
},
|
140
|
+
initOption() {
|
141
|
+
let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
|
142
|
+
this.field.options.echarCategoryOption = extendDeeply(this.field.options.echarCategoryOption, echartConfig);
|
143
|
+
this.adjustColor();
|
144
|
+
},
|
187
145
|
/*async loadData() {
|
188
146
|
if (this.designState) {
|
189
147
|
return;
|
@@ -312,7 +270,7 @@ modules = {
|
|
312
270
|
});
|
313
271
|
},
|
314
272
|
setValue(rows) {
|
315
|
-
this.showChart
|
273
|
+
this.showChart = false;
|
316
274
|
let serieClone = this.serieClone;
|
317
275
|
let resDatas = rows || [];
|
318
276
|
let axisDatas = [];
|
@@ -331,16 +289,28 @@ modules = {
|
|
331
289
|
nameDatas.push(resData.name);
|
332
290
|
}
|
333
291
|
});
|
334
|
-
let colors = this.
|
292
|
+
let colors = this.getColors();
|
335
293
|
let colorsSize = colors.length;
|
336
294
|
nameDatas.forEach((nameItem, index) => {
|
337
295
|
let serie = deepClone(serieClone);
|
338
296
|
serie.name = nameItem;
|
339
|
-
|
340
|
-
if (
|
297
|
+
if (colorsSize > index) {
|
298
|
+
if (serie.lineStyle) {
|
341
299
|
serie.lineStyle.color = colors[index]
|
300
|
+
} else {
|
301
|
+
serie.lineStyle = {
|
302
|
+
color: colors[index]
|
303
|
+
}
|
304
|
+
}
|
305
|
+
if (serie.itemStyle) {
|
306
|
+
serie.itemStyle.color = colors[index]
|
307
|
+
} else {
|
308
|
+
serie.itemStyle = {
|
309
|
+
color: colors[index]
|
310
|
+
}
|
342
311
|
}
|
343
|
-
}
|
312
|
+
}
|
313
|
+
|
344
314
|
delete serie.lineStyle
|
345
315
|
|
346
316
|
let serieDatas = [];
|
@@ -360,9 +330,12 @@ modules = {
|
|
360
330
|
chartOptions.xAxis.data = axisDatas;
|
361
331
|
chartOptions.series = newSeries;
|
362
332
|
|
363
|
-
this.$nextTick(()=>{
|
364
|
-
this.showChart
|
333
|
+
this.$nextTick(() => {
|
334
|
+
this.showChart = true;
|
365
335
|
})
|
336
|
+
},
|
337
|
+
getChart() {
|
338
|
+
return this.$refs.chart;
|
366
339
|
}
|
367
340
|
}
|
368
341
|
};
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js
CHANGED
@@ -9,6 +9,7 @@ import {CanvasRenderer} from 'echarts/renderers';
|
|
9
9
|
import {PieChart} from 'echarts/charts';
|
10
10
|
import {TitleComponent, TooltipComponent, LegendComponent} from 'echarts/components';
|
11
11
|
import {THEME_KEY} from 'vue-echarts';
|
12
|
+
import {extendDeeply} from "@base/utils/index.js";
|
12
13
|
|
13
14
|
use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, LegendComponent]);
|
14
15
|
|
@@ -53,6 +54,7 @@ modules = {
|
|
53
54
|
requestAccess: null,
|
54
55
|
serieClone: {},
|
55
56
|
showChart: true,
|
57
|
+
colors:[]
|
56
58
|
};
|
57
59
|
},
|
58
60
|
computed: {
|
@@ -77,6 +79,9 @@ modules = {
|
|
77
79
|
return height;
|
78
80
|
}
|
79
81
|
return '';
|
82
|
+
},
|
83
|
+
chartOption() {
|
84
|
+
return this.field.options.echarPieOption
|
80
85
|
}
|
81
86
|
},
|
82
87
|
beforeCreate() {
|
@@ -91,6 +96,7 @@ modules = {
|
|
91
96
|
this.initEventHandler();
|
92
97
|
|
93
98
|
this.handleOnCreated();
|
99
|
+
this.initOption();
|
94
100
|
this.serieClone = deepClone(this.field.options.echarPieOption.series[0]);
|
95
101
|
// this.loadData();
|
96
102
|
},
|
@@ -104,6 +110,10 @@ modules = {
|
|
104
110
|
},
|
105
111
|
|
106
112
|
methods: {
|
113
|
+
initOption() {
|
114
|
+
let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
|
115
|
+
this.field.options.echarPieOption = extendDeeply(this.field.options.echarPieOption, echartConfig);
|
116
|
+
},
|
107
117
|
/*async loadData() {
|
108
118
|
if (this.designState) {
|
109
119
|
return;
|
@@ -188,6 +198,9 @@ modules = {
|
|
188
198
|
this.$nextTick(() => {
|
189
199
|
this.showChart = true;
|
190
200
|
})
|
201
|
+
},
|
202
|
+
getChart() {
|
203
|
+
return this.$refs.chart;
|
191
204
|
}
|
192
205
|
}
|
193
206
|
};
|
@@ -4,7 +4,21 @@
|
|
4
4
|
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
|
5
5
|
:sub-form-row-id="subFormRowId">
|
6
6
|
<el-button icon="el-icon-plus" type="warning" class="el-button-tag" v-if="designState"></el-button>
|
7
|
-
<
|
7
|
+
<div v-else>
|
8
|
+
<el-tag
|
9
|
+
v-for="(tag,index) in fieldModel"
|
10
|
+
:key="index"
|
11
|
+
type="warning"
|
12
|
+
:disable-transitions="false"
|
13
|
+
:closable="!field.options.disabled && field.options.tabDeleteEnabled"
|
14
|
+
@close="deleteCallback(index)"
|
15
|
+
>
|
16
|
+
{{ tag[field.options.tagLabelField] }}
|
17
|
+
</el-tag>
|
18
|
+
<el-button icon="el-icon-plus" type="warning" class="el-button-tag" @click="openProjectTagDialog"
|
19
|
+
v-if="!field.options.disabled"></el-button>
|
20
|
+
</div>
|
21
|
+
|
8
22
|
</form-item-wrapper>
|
9
23
|
</template>
|
10
24
|
|
@@ -13,7 +27,6 @@ import FormItemWrapper from './form-item-wrapper'
|
|
13
27
|
import emitter from '../../../../../components/xform/utils/emitter'
|
14
28
|
import i18n from "../../../../../components/xform/utils/i18n";
|
15
29
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
16
|
-
import projectTagView from "../../../../../components/projectTag/view.vue";
|
17
30
|
|
18
31
|
export default {
|
19
32
|
name: "project-tag-widget",
|
@@ -45,7 +58,6 @@ export default {
|
|
45
58
|
}
|
46
59
|
},
|
47
60
|
components: {
|
48
|
-
projectTagView,
|
49
61
|
FormItemWrapper,
|
50
62
|
},
|
51
63
|
inject: ['refList', 'globalOptionData', 'globalModel', 'getFormConfig'],
|
@@ -124,6 +136,58 @@ export default {
|
|
124
136
|
});
|
125
137
|
|
126
138
|
},
|
139
|
+
openProjectTagDialog() {
|
140
|
+
if (this.field.options.onClick) {
|
141
|
+
this.handleCustomEvent(this.field.options.onClick);
|
142
|
+
return
|
143
|
+
}
|
144
|
+
let formCode = this.field.options.tagFormCode;
|
145
|
+
let tagLabelField = this.field.options.tagLabelField;
|
146
|
+
let tagUniqueField = this.field.options.tagUniqueField;
|
147
|
+
let tagFormLabelField = this.field.options.tagFormLabelField;
|
148
|
+
let tagFormUniqueField = this.field.options.tagFormUniqueField;
|
149
|
+
/*let checkRows = this.fieldModel.map(item => {
|
150
|
+
return {
|
151
|
+
[tagFormUniqueField]: item[tagUniqueField] ?? null,
|
152
|
+
[tagFormLabelField]: item[tagLabelField] ?? null,
|
153
|
+
}
|
154
|
+
})*/
|
155
|
+
let tagFormParam = this.handleCustomEvent(this.field.options.tagFormParam)
|
156
|
+
this.getFormRef().openSearchDialog({
|
157
|
+
formCode,
|
158
|
+
param: tagFormParam,
|
159
|
+
// rows: checkRows,
|
160
|
+
multiple: true,
|
161
|
+
confirm: (rows) => {
|
162
|
+
if (!this.field.options.tagConfirmCallback) {
|
163
|
+
let tagFillConfig = this.field.options.tagFillConfig || [];
|
164
|
+
let items = rows.map(item => {
|
165
|
+
let newData = {
|
166
|
+
[tagUniqueField]: item[tagFormUniqueField],
|
167
|
+
[tagLabelField]: item[tagFormLabelField],
|
168
|
+
}
|
169
|
+
tagFillConfig.forEach(item1 => {
|
170
|
+
newData[item1.targetField] = item[item1.sourceField]
|
171
|
+
})
|
172
|
+
return newData
|
173
|
+
});
|
174
|
+
this.addTagData(items);
|
175
|
+
} else {
|
176
|
+
this.handleCustomEvent(this.field.options.tagConfirmCallback, ['rows'], [rows])
|
177
|
+
}
|
178
|
+
}
|
179
|
+
});
|
180
|
+
},
|
181
|
+
addTagData(rows) {
|
182
|
+
let tagUniqueField = this.field.options.tagUniqueField;
|
183
|
+
let keys = this.fieldModel.map(item => item[tagUniqueField]);
|
184
|
+
let items = rows.filter(item => !keys.includes(item[tagUniqueField]))
|
185
|
+
this.fieldModel.push(...items);
|
186
|
+
},
|
187
|
+
deleteCallback(index) {
|
188
|
+
this.fieldModel.splice(index, 1)
|
189
|
+
this.handleCustomEvent(this.field.options.tagDeleteCallback)
|
190
|
+
}
|
127
191
|
}
|
128
192
|
}
|
129
193
|
</script>
|