cloud-web-corejs 1.0.54-dev.800 → 1.0.54-dev.802
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 +1 -1
- package/src/components/baseArea/index.vue +82 -27
- package/src/components/bizTab/BizBillActions.vue +2 -2
- package/src/components/bizTab/bizBillDetailMixin.js +27 -9
- package/src/components/excelExport/exportFieldDialog.vue +11 -9
- package/src/components/table/config.js +6 -4
- package/src/components/table/index.js +78 -22
- package/src/components/table/state.js +42 -0
- package/src/components/table/tableForm.vue +16 -5
- package/src/components/table/tableFormMixin.js +35 -7
- package/src/components/table/vxeFilter/index.js +4 -2
- package/src/components/table/vxeFilter/mixin.js +10 -4
- package/src/components/wf/content.vue +12 -0
- package/src/components/wf/wf.js +72 -23
- package/src/components/wf/wfActionDropdown.vue +85 -0
- package/src/components/wf/wfActionItems.js +136 -0
- package/src/components/wf/wfAutoConfirm.js +55 -0
- package/src/components/wf/wfUserRange.js +53 -0
- package/src/components/wf/wfUtil.js +46 -2
- package/src/components/xform/form-designer/designer.js +6 -1
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +9 -3
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +2 -1
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +3 -2
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +3 -12
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +2 -46
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/relative-default-mixin.js +107 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/relativeDateUtil.js +321 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +2 -17
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +3 -2
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +3 -12
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +5 -5
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +48 -26
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +16 -19
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +13 -12
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +16 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/afterColumnsCreated-editor.vue +30 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +35 -36
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +35 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +34 -36
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +35 -18
- package/src/components/xform/form-designer/setting-panel/property-editor/fixedQuery-editor.vue +39 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +20 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -178
- package/src/components/xform/form-designer/setting-panel/property-editor/relative-default-block.vue +369 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +35 -2
- package/src/components/xform/form-render/container-item/data-table-mixin.js +150 -75
- package/src/components/xform/form-render/container-item/detail-item.vue +8 -12
- package/src/components/xform/lang/en-US.js +3 -0
- package/src/components/xform/lang/zh-CN.js +3 -0
- package/src/components/xform/mixins/defaultHandle.js +18 -3
- package/src/components/xform/utils/fixedQueryUtil.js +93 -0
- package/src/views/user/outLink/cc_form_view.vue +33 -30
- package/src/views/user/wf/wf_manage/list.vue +17 -1
- package/src/components/xform/form-render/container-item/data-table-mixin copy.js +0 -5910
|
@@ -1,178 +1,188 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-form-item class="form-item-label-top" prop="name" :rules="nameRequiredRule">
|
|
4
|
-
<span slot="label"
|
|
5
|
-
>{{ i18nt("designer.setting.uniqueName") }}
|
|
6
|
-
<el-tooltip effect="light" :content="i18nt('designer.setting.editNameHelp')">
|
|
7
|
-
<i class="el-icon-info"></i
|
|
8
|
-
></el-tooltip>
|
|
9
|
-
</span>
|
|
10
|
-
<template
|
|
11
|
-
v-if="
|
|
12
|
-
(!!selectedWidget.category && selectedWidget.type !== 'sub-form') || noFieldList
|
|
13
|
-
"
|
|
14
|
-
>
|
|
15
|
-
<el-input
|
|
16
|
-
type="text"
|
|
17
|
-
v-model="optionModel.name"
|
|
18
|
-
:readonly="widgetNameReadonly"
|
|
19
|
-
@change="updateWidgetNameAndRef"
|
|
20
|
-
></el-input>
|
|
21
|
-
</template>
|
|
22
|
-
<template v-else>
|
|
23
|
-
<el-select
|
|
24
|
-
v-model="optionModel.name"
|
|
25
|
-
allow-create
|
|
26
|
-
filterable
|
|
27
|
-
:disabled="true"
|
|
28
|
-
@change="updateWidgetNameAndRef"
|
|
29
|
-
:title="i18nt('designer.setting.editNameHelp')"
|
|
30
|
-
>
|
|
31
|
-
<el-option
|
|
32
|
-
v-for="(sf, sfIdx) in serverFieldList"
|
|
33
|
-
:key="sfIdx"
|
|
34
|
-
:label="sf.label"
|
|
35
|
-
:value="sf.name"
|
|
36
|
-
></el-option>
|
|
37
|
-
</el-select>
|
|
38
|
-
</template>
|
|
39
|
-
</el-form-item>
|
|
40
|
-
<el-form-item label="按钮编码" v-show="showAuthCode">
|
|
41
|
-
<div style="word-break: break-all">
|
|
42
|
-
<el-tooltip effect="light" content="复制">
|
|
43
|
-
<a class="a-link" style="
|
|
44
|
-
</el-tooltip>
|
|
45
|
-
</div>
|
|
46
|
-
</el-form-item>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
import i18n from "../../../../../components/xform/utils/i18n";
|
|
52
|
-
import { isEmptyStr } from "../../../../../components/xform/utils/util";
|
|
53
|
-
import Clipboard from 'clipboard'
|
|
54
|
-
|
|
55
|
-
export default {
|
|
56
|
-
name: "name-editor",
|
|
57
|
-
mixins: [i18n],
|
|
58
|
-
props: {
|
|
59
|
-
designer: Object,
|
|
60
|
-
selectedWidget: Object,
|
|
61
|
-
optionModel: Object,
|
|
62
|
-
parentList: Array,
|
|
63
|
-
},
|
|
64
|
-
inject: ["serverFieldList", "getDesignerConfig", "isDataTableChildWidget"],
|
|
65
|
-
data() {
|
|
66
|
-
return {
|
|
67
|
-
nameRequiredRule: [{ required: true, message: "name required" }],
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
computed: {
|
|
71
|
-
noFieldList() {
|
|
72
|
-
return !this.serverFieldList || this.serverFieldList.length <= 0;
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
widgetNameReadonly() {
|
|
76
|
-
return !!this.getDesignerConfig().widgetNameReadonly;
|
|
77
|
-
},
|
|
78
|
-
showAuthCode() {
|
|
79
|
-
// return this.selectedWidget.category !== "container";
|
|
80
|
-
return [
|
|
81
|
-
"button",
|
|
82
|
-
"a-text",
|
|
83
|
-
"a-link",
|
|
84
|
-
"a-link2",
|
|
85
|
-
"search_button",
|
|
86
|
-
"save_button",
|
|
87
|
-
"reset_button",
|
|
88
|
-
"table-export-button",
|
|
89
|
-
"select-export-button",
|
|
90
|
-
"add_button",
|
|
91
|
-
"import-button",
|
|
92
|
-
"import2-button",
|
|
93
|
-
"print-button",
|
|
94
|
-
"print-detail-button",
|
|
95
|
-
"download-button",
|
|
96
|
-
"copy_button",
|
|
97
|
-
"save_submit_wf_button",
|
|
98
|
-
"tempStorage",
|
|
99
|
-
"dropdown",
|
|
100
|
-
"dropdown-item",
|
|
101
|
-
].includes(this.selectedWidget.type);
|
|
102
|
-
},
|
|
103
|
-
authCode() {
|
|
104
|
-
return (
|
|
105
|
-
this.designer.vueInstance?.reportTemplate?.formCode + ":" + this.optionModel.name
|
|
106
|
-
);
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
methods: {
|
|
110
|
-
copyAuthCode(e){
|
|
111
|
-
this.copyToClipboard(this.authCode, e, this.$message, '复制成功', '复制失败');
|
|
112
|
-
},
|
|
113
|
-
copyToClipboard(content, clickEvent, $message, successMsg, errorMsg) {
|
|
114
|
-
const clipboard = new Clipboard(clickEvent.target, {
|
|
115
|
-
text: () => content
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
clipboard.on('success', () => {
|
|
119
|
-
$message.success(successMsg);
|
|
120
|
-
clipboard.destroy();
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
clipboard.on('error', () => {
|
|
124
|
-
$message.error(errorMsg);
|
|
125
|
-
clipboard.destroy();
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
clipboard.onClick(clickEvent);
|
|
129
|
-
},
|
|
130
|
-
updateWidgetNameAndRef(newName) {
|
|
131
|
-
let oldName = this.designer.selectedWidgetName;
|
|
132
|
-
if (isEmptyStr(newName)) {
|
|
133
|
-
this.selectedWidget.options.name = oldName;
|
|
134
|
-
this.$message.info(this.i18nt("designer.hint.nameRequired"));
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (!!this.designer.formWidget) {
|
|
139
|
-
let foundRef = this.designer.formWidget.getWidgetRef(newName); // 检查newName是否已存在!!
|
|
140
|
-
|
|
141
|
-
if (!!foundRef) {
|
|
142
|
-
if (this.isDataTableChildWidget()) {
|
|
143
|
-
let parentList = this.parentList;
|
|
144
|
-
for (let i; i < parentList.length; i++) {}
|
|
145
|
-
} else {
|
|
146
|
-
this.selectedWidget.options.name = oldName;
|
|
147
|
-
this.$message.info(this.i18nt("designer.hint.duplicateName") + newName);
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
let widgetInDesign = this.designer.formWidget.getWidgetRef(oldName);
|
|
153
|
-
if (!!widgetInDesign && !!widgetInDesign.registerToRefList) {
|
|
154
|
-
widgetInDesign.registerToRefList(oldName); //注册组件新的ref名称并删除老的ref!!
|
|
155
|
-
let newLabel = this.getLabelByFieldName(newName);
|
|
156
|
-
this.designer.updateSelectedWidgetNameAndLabel(
|
|
157
|
-
this.selectedWidget,
|
|
158
|
-
newName,
|
|
159
|
-
newLabel
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
getLabelByFieldName(fieldName) {
|
|
166
|
-
for (let i = 0; i < this.serverFieldList.length; i++) {
|
|
167
|
-
if (this.serverFieldList[i].name === fieldName) {
|
|
168
|
-
return this.serverFieldList[i].label;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
return null;
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
</script>
|
|
177
|
-
|
|
178
|
-
<style lang="scss" scoped
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form-item class="form-item-label-top" prop="name" :rules="nameRequiredRule">
|
|
4
|
+
<span slot="label"
|
|
5
|
+
>{{ i18nt("designer.setting.uniqueName") }}
|
|
6
|
+
<el-tooltip effect="light" :content="i18nt('designer.setting.editNameHelp')">
|
|
7
|
+
<i class="el-icon-info"></i
|
|
8
|
+
></el-tooltip>
|
|
9
|
+
</span>
|
|
10
|
+
<template
|
|
11
|
+
v-if="
|
|
12
|
+
(!!selectedWidget.category && selectedWidget.type !== 'sub-form') || noFieldList
|
|
13
|
+
"
|
|
14
|
+
>
|
|
15
|
+
<el-input
|
|
16
|
+
type="text"
|
|
17
|
+
v-model="optionModel.name"
|
|
18
|
+
:readonly="widgetNameReadonly"
|
|
19
|
+
@change="updateWidgetNameAndRef"
|
|
20
|
+
></el-input>
|
|
21
|
+
</template>
|
|
22
|
+
<template v-else>
|
|
23
|
+
<el-select
|
|
24
|
+
v-model="optionModel.name"
|
|
25
|
+
allow-create
|
|
26
|
+
filterable
|
|
27
|
+
:disabled="true"
|
|
28
|
+
@change="updateWidgetNameAndRef"
|
|
29
|
+
:title="i18nt('designer.setting.editNameHelp')"
|
|
30
|
+
>
|
|
31
|
+
<el-option
|
|
32
|
+
v-for="(sf, sfIdx) in serverFieldList"
|
|
33
|
+
:key="sfIdx"
|
|
34
|
+
:label="sf.label"
|
|
35
|
+
:value="sf.name"
|
|
36
|
+
></el-option>
|
|
37
|
+
</el-select>
|
|
38
|
+
</template>
|
|
39
|
+
</el-form-item>
|
|
40
|
+
<el-form-item label="按钮编码" v-show="showAuthCode" class="form-item-label-top">
|
|
41
|
+
<div style="word-break: break-all">
|
|
42
|
+
<el-tooltip effect="light" content="复制">
|
|
43
|
+
<a class="a-link" style="" @click="copyAuthCode"><i class="el-icon-copy-document"></i><span>{{ authCode }}</span></a>
|
|
44
|
+
</el-tooltip>
|
|
45
|
+
</div>
|
|
46
|
+
</el-form-item>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import i18n from "../../../../../components/xform/utils/i18n";
|
|
52
|
+
import { isEmptyStr } from "../../../../../components/xform/utils/util";
|
|
53
|
+
import Clipboard from 'clipboard'
|
|
54
|
+
|
|
55
|
+
export default {
|
|
56
|
+
name: "name-editor",
|
|
57
|
+
mixins: [i18n],
|
|
58
|
+
props: {
|
|
59
|
+
designer: Object,
|
|
60
|
+
selectedWidget: Object,
|
|
61
|
+
optionModel: Object,
|
|
62
|
+
parentList: Array,
|
|
63
|
+
},
|
|
64
|
+
inject: ["serverFieldList", "getDesignerConfig", "isDataTableChildWidget"],
|
|
65
|
+
data() {
|
|
66
|
+
return {
|
|
67
|
+
nameRequiredRule: [{ required: true, message: "name required" }],
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
noFieldList() {
|
|
72
|
+
return !this.serverFieldList || this.serverFieldList.length <= 0;
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
widgetNameReadonly() {
|
|
76
|
+
return !!this.getDesignerConfig().widgetNameReadonly;
|
|
77
|
+
},
|
|
78
|
+
showAuthCode() {
|
|
79
|
+
// return this.selectedWidget.category !== "container";
|
|
80
|
+
return [
|
|
81
|
+
"button",
|
|
82
|
+
"a-text",
|
|
83
|
+
"a-link",
|
|
84
|
+
"a-link2",
|
|
85
|
+
"search_button",
|
|
86
|
+
"save_button",
|
|
87
|
+
"reset_button",
|
|
88
|
+
"table-export-button",
|
|
89
|
+
"select-export-button",
|
|
90
|
+
"add_button",
|
|
91
|
+
"import-button",
|
|
92
|
+
"import2-button",
|
|
93
|
+
"print-button",
|
|
94
|
+
"print-detail-button",
|
|
95
|
+
"download-button",
|
|
96
|
+
"copy_button",
|
|
97
|
+
"save_submit_wf_button",
|
|
98
|
+
"tempStorage",
|
|
99
|
+
"dropdown",
|
|
100
|
+
"dropdown-item",
|
|
101
|
+
].includes(this.selectedWidget.type);
|
|
102
|
+
},
|
|
103
|
+
authCode() {
|
|
104
|
+
return (
|
|
105
|
+
this.designer.vueInstance?.reportTemplate?.formCode + ":" + this.optionModel.name
|
|
106
|
+
);
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
copyAuthCode(e){
|
|
111
|
+
this.copyToClipboard(this.authCode, e, this.$message, '复制成功', '复制失败');
|
|
112
|
+
},
|
|
113
|
+
copyToClipboard(content, clickEvent, $message, successMsg, errorMsg) {
|
|
114
|
+
const clipboard = new Clipboard(clickEvent.target, {
|
|
115
|
+
text: () => content
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
clipboard.on('success', () => {
|
|
119
|
+
$message.success(successMsg);
|
|
120
|
+
clipboard.destroy();
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
clipboard.on('error', () => {
|
|
124
|
+
$message.error(errorMsg);
|
|
125
|
+
clipboard.destroy();
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
clipboard.onClick(clickEvent);
|
|
129
|
+
},
|
|
130
|
+
updateWidgetNameAndRef(newName) {
|
|
131
|
+
let oldName = this.designer.selectedWidgetName;
|
|
132
|
+
if (isEmptyStr(newName)) {
|
|
133
|
+
this.selectedWidget.options.name = oldName;
|
|
134
|
+
this.$message.info(this.i18nt("designer.hint.nameRequired"));
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (!!this.designer.formWidget) {
|
|
139
|
+
let foundRef = this.designer.formWidget.getWidgetRef(newName); // 检查newName是否已存在!!
|
|
140
|
+
|
|
141
|
+
if (!!foundRef) {
|
|
142
|
+
if (this.isDataTableChildWidget()) {
|
|
143
|
+
let parentList = this.parentList;
|
|
144
|
+
for (let i; i < parentList.length; i++) {}
|
|
145
|
+
} else {
|
|
146
|
+
this.selectedWidget.options.name = oldName;
|
|
147
|
+
this.$message.info(this.i18nt("designer.hint.duplicateName") + newName);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
let widgetInDesign = this.designer.formWidget.getWidgetRef(oldName);
|
|
153
|
+
if (!!widgetInDesign && !!widgetInDesign.registerToRefList) {
|
|
154
|
+
widgetInDesign.registerToRefList(oldName); //注册组件新的ref名称并删除老的ref!!
|
|
155
|
+
let newLabel = this.getLabelByFieldName(newName);
|
|
156
|
+
this.designer.updateSelectedWidgetNameAndLabel(
|
|
157
|
+
this.selectedWidget,
|
|
158
|
+
newName,
|
|
159
|
+
newLabel
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
getLabelByFieldName(fieldName) {
|
|
166
|
+
for (let i = 0; i < this.serverFieldList.length; i++) {
|
|
167
|
+
if (this.serverFieldList[i].name === fieldName) {
|
|
168
|
+
return this.serverFieldList[i].label;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return null;
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
</script>
|
|
177
|
+
|
|
178
|
+
<style lang="scss" scoped>
|
|
179
|
+
.a-link{
|
|
180
|
+
display:flex;line-height:1.2;width:100%;align-items:center;color:rgba(0,0,0,0.65);
|
|
181
|
+
> i{
|
|
182
|
+
margin-right:8px;
|
|
183
|
+
}
|
|
184
|
+
> span{
|
|
185
|
+
flex:1
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
</style>
|