cloud-web-corejs 1.0.54-dev.113 → 1.0.54-dev.116
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/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +10 -5
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +40 -3
- package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +54 -14
- 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/vabUpload-widget.vue +1 -0
- package/src/components/xform/form-designer/indexMixin.js +3 -1
- 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/data-table-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +86 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +39 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +15 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +2 -1
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/xform/form-designer/toolbar-panel/index.vue +4 -3
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +35 -2
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1926 -1
- package/src/components/xform/form-render/indexMixin.js +11 -0
- package/src/components/xform/mixins/defaultHandle.js +1 -0
- package/src/components/xform/mixins/scriptHttp.js +82 -1
- package/src/components/xform/utils/util.js +2 -2
- package/src/layout/components/Sidebar/default.vue +35 -3
- 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 +188 -0
- package/src/views/bd/setting/form_script/edit1.vue +1 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +2 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +2 -1
- package/src/views/bd/setting/form_template/edit.vue +9 -1
- package/src/views/bd/setting/form_template/mixins/edit.js +1 -1
- package/src/views/bd/setting/table_model/edit.vue +12 -2
- package/src/views/bd/setting/table_model/mixins/edit.js +20 -4
- package/src/views/user/form/vform/designer.vue +5 -1
- package/src/views/user/home/default.vue +15 -11
package/package.json
CHANGED
@@ -11,9 +11,9 @@
|
|
11
11
|
:style="{display: field.options.displayStyle}">{{ getI18nLabel(item.label) }}</el-checkbox-button>
|
12
12
|
</template>
|
13
13
|
<template v-else>
|
14
|
-
<el-checkbox v-for="(item, index) in field.options.optionItems" :key="index" :label="item
|
14
|
+
<el-checkbox v-for="(item, index) in field.options.optionItems" :key="index" :label="item[valueField]"
|
15
15
|
:disabled="item.disabled" :border="field.options.border"
|
16
|
-
:style="{display: field.options.displayStyle}">{{ getI18nLabel(item
|
16
|
+
:style="{display: field.options.displayStyle}">{{ getI18nLabel(item[labelField]) }}</el-checkbox>
|
17
17
|
</template>
|
18
18
|
</el-checkbox-group>
|
19
19
|
</form-item-wrapper>
|
@@ -62,12 +62,17 @@
|
|
62
62
|
data() {
|
63
63
|
return {
|
64
64
|
oldFieldValue: null, //field组件change之前的值
|
65
|
-
fieldModel:
|
65
|
+
fieldModel: [],
|
66
66
|
rules: [],
|
67
67
|
}
|
68
68
|
},
|
69
69
|
computed: {
|
70
|
-
|
70
|
+
labelField(){
|
71
|
+
return this.field.options.labelKey || "label";
|
72
|
+
},
|
73
|
+
valueField(){
|
74
|
+
return this.field.options.valueKey || "value";
|
75
|
+
},
|
71
76
|
},
|
72
77
|
beforeCreate() {
|
73
78
|
/* 这里不能访问方法和属性!! */
|
@@ -78,8 +83,8 @@
|
|
78
83
|
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
79
84
|
需要在父组件created中初始化!! */
|
80
85
|
this.handleCreatedEnterEvent();
|
81
|
-
this.initOptionItems()
|
82
86
|
this.initFieldModel()
|
87
|
+
this.initOptionItems()
|
83
88
|
this.registerToRefList()
|
84
89
|
this.initEventHandler()
|
85
90
|
this.buildFieldRules()
|
@@ -178,6 +178,7 @@ modules = {
|
|
178
178
|
let defaultValue = this.field.options.defaultValue;
|
179
179
|
let dataId = this.getFormRef()?.dataId ?? null;
|
180
180
|
if (void 0 === currentData[this.fieldKeyName]) {
|
181
|
+
|
181
182
|
this.$set(currentData, this.fieldKeyName, null);
|
182
183
|
}
|
183
184
|
if (flag) {
|
@@ -382,7 +383,43 @@ modules = {
|
|
382
383
|
|
383
384
|
if ((this.field.type === 'radio') || (this.field.type === 'checkbox')
|
384
385
|
|| (this.field.type === 'select') || (this.field.type === 'cascader')) {
|
385
|
-
|
386
|
+
let reportTemplate = this.getFormRef().reportTemplate;
|
387
|
+
let formCode = reportTemplate.formCode;
|
388
|
+
let formScriptEnabled = this.field.options.formScriptEnabled || false;
|
389
|
+
let scriptCode = this.field.options.formScriptCode || "getList"
|
390
|
+
if(formScriptEnabled){
|
391
|
+
let accessParam = this.handleCustomEvent(this.field.options.formScriptParam)
|
392
|
+
return this.formHttp({
|
393
|
+
scriptCode: scriptCode,
|
394
|
+
data: {
|
395
|
+
formCode: formCode,
|
396
|
+
formVersion: reportTemplate.formVersion,
|
397
|
+
taBm: this.fieldKeyName,
|
398
|
+
data: {
|
399
|
+
...accessParam,
|
400
|
+
}
|
401
|
+
},
|
402
|
+
callback: res => {
|
403
|
+
let rows = res.objx || [];
|
404
|
+
this.loadOptions(rows);
|
405
|
+
this.handleCustomEvent(this.field.options.formScriptSuccess,['res'],[res]);
|
406
|
+
}
|
407
|
+
});
|
408
|
+
}else if(this.field.options.commonAttributeEnabled){
|
409
|
+
let commonAttributeCode = this.field.options.commonAttributeCode
|
410
|
+
if(!commonAttributeCode)return
|
411
|
+
this.$getBaseDicts({
|
412
|
+
code: commonAttributeCode,
|
413
|
+
success: ({dicts, dictMap}) => {
|
414
|
+
this.loadOptions(dicts);
|
415
|
+
this.handleCustomEvent(this.field.options.formScriptSuccess,['res'],[dicts]);
|
416
|
+
}
|
417
|
+
});
|
418
|
+
}
|
419
|
+
|
420
|
+
|
421
|
+
return
|
422
|
+
/*if (t.field.options.isLoadDataByAccess && t.field.options.scriptUuid) {
|
386
423
|
this.scriptHttp(
|
387
424
|
{
|
388
425
|
options: t.field.options,
|
@@ -393,7 +430,7 @@ modules = {
|
|
393
430
|
}
|
394
431
|
});
|
395
432
|
} else if (!t.field.options.dsEnabled) {
|
396
|
-
|
433
|
+
/!* 异步更新option-data之后globalOptionData不能获取到最新值,改用provide的getOptionData()方法 *!/
|
397
434
|
const newOptionItems = this.getOptionData();
|
398
435
|
if (!!newOptionItems && newOptionItems.hasOwnProperty(this.fieldKeyName)) {
|
399
436
|
if (!!keepSelected) {
|
@@ -423,7 +460,7 @@ modules = {
|
|
423
460
|
.$message).then(res => {
|
424
461
|
t.loadOptions(res || []);
|
425
462
|
});
|
426
|
-
}
|
463
|
+
}*/
|
427
464
|
}
|
428
465
|
},
|
429
466
|
refreshDefaultValue: function () {
|
@@ -10,19 +10,13 @@
|
|
10
10
|
:key="index"
|
11
11
|
type="warning"
|
12
12
|
:disable-transitions="false"
|
13
|
-
:closable="!field.options.disabled && field.options.
|
14
|
-
@close="
|
13
|
+
:closable="!field.options.disabled && field.options.tabDeleteEnabled"
|
14
|
+
@close="deleteCallback(index)"
|
15
15
|
>
|
16
|
-
{{ tag[field.options.
|
16
|
+
{{ tag[field.options.tagLabelField] }}
|
17
17
|
</el-tag>
|
18
18
|
<el-button icon="el-icon-plus" type="warning" class="el-button-tag" @click="openProjectTagDialog"
|
19
19
|
v-if="!field.options.disabled"></el-button>
|
20
|
-
<projectTagDialog v-if="showProjectTagDialog"
|
21
|
-
:visiable.sync="showProjectTagDialog"
|
22
|
-
@confirm="confirmProjectTagDialog"
|
23
|
-
:multi="true"
|
24
|
-
:rows="checkRows"
|
25
|
-
fieldKey="tagCode"></projectTagDialog>
|
26
20
|
</div>
|
27
21
|
|
28
22
|
</form-item-wrapper>
|
@@ -33,8 +27,6 @@ import FormItemWrapper from './form-item-wrapper'
|
|
33
27
|
import emitter from '../../../../../components/xform/utils/emitter'
|
34
28
|
import i18n from "../../../../../components/xform/utils/i18n";
|
35
29
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
36
|
-
import projectTagView from "../../../../../components/projectTag/view.vue";
|
37
|
-
import projectTagDialog from "@base/views/user/project_tag/dialog.vue";
|
38
30
|
|
39
31
|
export default {
|
40
32
|
name: "project-tag-widget",
|
@@ -66,7 +58,6 @@ export default {
|
|
66
58
|
}
|
67
59
|
},
|
68
60
|
components: {
|
69
|
-
projectTagDialog,
|
70
61
|
FormItemWrapper,
|
71
62
|
},
|
72
63
|
inject: ['refList', 'globalOptionData', 'globalModel', 'getFormConfig'],
|
@@ -145,8 +136,57 @@ export default {
|
|
145
136
|
});
|
146
137
|
|
147
138
|
},
|
148
|
-
openProjectTagDialog(){
|
149
|
-
|
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)
|
150
190
|
}
|
151
191
|
}
|
152
192
|
}
|
@@ -11,9 +11,9 @@
|
|
11
11
|
:style="{display: field.options.displayStyle}">{{ getI18nLabel(item.label) }}</el-radio-button>
|
12
12
|
</template>
|
13
13
|
<template v-else>
|
14
|
-
<el-radio v-for="(item, index) in field.options.optionItems" :key="index" :label="item
|
14
|
+
<el-radio v-for="(item, index) in field.options.optionItems" :key="index" :label="item[valueField]"
|
15
15
|
:disabled="item.disabled" :border="field.options.border"
|
16
|
-
:style="{display: field.options.displayStyle}">{{ getI18nLabel(item
|
16
|
+
:style="{display: field.options.displayStyle}">{{ getI18nLabel(item[labelField]) }}</el-radio>
|
17
17
|
</template>
|
18
18
|
</el-radio-group>
|
19
19
|
</form-item-wrapper>
|
@@ -67,7 +67,12 @@
|
|
67
67
|
}
|
68
68
|
},
|
69
69
|
computed: {
|
70
|
-
|
70
|
+
labelField(){
|
71
|
+
return this.field.options.labelKey || "label";
|
72
|
+
},
|
73
|
+
valueField(){
|
74
|
+
return this.field.options.valueKey || "value";
|
75
|
+
},
|
71
76
|
},
|
72
77
|
beforeCreate() {
|
73
78
|
/* 这里不能访问方法和属性!! */
|
@@ -78,8 +83,8 @@
|
|
78
83
|
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
79
84
|
需要在父组件created中初始化!! */
|
80
85
|
this.handleCreatedEnterEvent();
|
81
|
-
this.initOptionItems()
|
82
86
|
this.initFieldModel()
|
87
|
+
this.initOptionItems()
|
83
88
|
this.registerToRefList()
|
84
89
|
this.initEventHandler()
|
85
90
|
this.buildFieldRules()
|
@@ -18,8 +18,8 @@
|
|
18
18
|
@change="handleChangeEvent"
|
19
19
|
:style="'width:'+field.options.widgetWidth+' !important;'"
|
20
20
|
:class="{'custom-width':field.options.widgetWidth!=null}">
|
21
|
-
<el-option v-for="item in field.options.optionItems" :key="item
|
22
|
-
:value="item
|
21
|
+
<el-option v-for="item in field.options.optionItems" :key="item[valueField]" :label="getI18nLabel(item[labelField])"
|
22
|
+
:value="item[valueField]" :disabled="item.disabled">
|
23
23
|
</el-option>
|
24
24
|
</el-select>
|
25
25
|
<span v-else>{{ fieldModelLabel }}</span>
|
@@ -73,6 +73,12 @@ export default {
|
|
73
73
|
}
|
74
74
|
},
|
75
75
|
computed: {
|
76
|
+
labelField(){
|
77
|
+
return this.field.options.labelKey || "label";
|
78
|
+
},
|
79
|
+
valueField(){
|
80
|
+
return this.field.options.valueKey || "value";
|
81
|
+
},
|
76
82
|
allowDefaultFirstOption() {
|
77
83
|
return (!!this.field.options.filterable && !!this.field.options.allowCreate)
|
78
84
|
},
|
@@ -92,6 +92,7 @@ modules = {
|
|
92
92
|
globalDsv: {type: Object, default: () => ({})},
|
93
93
|
formTemplates: {type: Array, default: null},
|
94
94
|
testOptionData: {type: Object, default: null},
|
95
|
+
readonly: Boolean
|
95
96
|
},
|
96
97
|
data() {
|
97
98
|
return {
|
@@ -136,7 +137,8 @@ modules = {
|
|
136
137
|
},
|
137
138
|
getObjectFieldFlag: () => !1,
|
138
139
|
getObjectName: () => "",
|
139
|
-
getHasWf: () => false
|
140
|
+
getHasWf: () => false,
|
141
|
+
readonly:this.readonly
|
140
142
|
};
|
141
143
|
},
|
142
144
|
created() {
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-form-item :label="i18nt('启用词汇查询')">
|
4
|
+
<el-switch v-model="optionModel.commonAttributeEnabled" @change="changeCommonAttributeEnabled"></el-switch>
|
5
|
+
</el-form-item>
|
6
|
+
<el-form-item :label="i18nt('词汇编码')">
|
7
|
+
<el-input type="text" v-model="optionModel.commonAttributeCode"></el-input>
|
8
|
+
</el-form-item>
|
9
|
+
<el-form-item :label="i18nt('显示字段')">
|
10
|
+
<el-input type="text" v-model="optionModel.optionItemLabel"></el-input>
|
11
|
+
</el-form-item>
|
12
|
+
<el-form-item :label="i18nt('关联字段')">
|
13
|
+
<el-input type="text" v-model="optionModel.optionItemValue"></el-input>
|
14
|
+
</el-form-item>
|
15
|
+
</div>
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<script>
|
19
|
+
import i18n from "../../../../../components/xform/utils/i18n"
|
20
|
+
|
21
|
+
export default {
|
22
|
+
name: "commonAttributeEnabled-editor",
|
23
|
+
mixins: [i18n],
|
24
|
+
props: {
|
25
|
+
designer: Object,
|
26
|
+
selectedWidget: Object,
|
27
|
+
optionModel: Object,
|
28
|
+
},
|
29
|
+
methods:{
|
30
|
+
changeCommonAttributeEnabled(val){
|
31
|
+
if(val){
|
32
|
+
this.optionModel.formScriptEnabled = false;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
</script>
|
38
|
+
|
39
|
+
<style scoped>
|
40
|
+
|
41
|
+
</style>
|
@@ -25,6 +25,9 @@
|
|
25
25
|
<el-form-item :label="i18nt('designer.setting.showPagination')">
|
26
26
|
<el-switch v-model="optionModel.showPagination"></el-switch>
|
27
27
|
</el-form-item>
|
28
|
+
<el-form-item :label="i18nt('显示表尾数据行')">
|
29
|
+
<el-switch v-model="optionModel.showGridFooter"></el-switch>
|
30
|
+
</el-form-item>
|
28
31
|
<!-- <el-form-item :label="i18nt('显示导出')">
|
29
32
|
<el-switch v-model="optionModel.showExportBtn"></el-switch>
|
30
33
|
</el-form-item>-->
|
@@ -116,7 +116,7 @@
|
|
116
116
|
</el-select>
|
117
117
|
</template>
|
118
118
|
</el-table-column>
|
119
|
-
<el-table-column label="编辑插槽配置" width="
|
119
|
+
<el-table-column label="编辑插槽配置" width="150" align="center">
|
120
120
|
<template slot-scope="scope">
|
121
121
|
<el-button size="mini" plain="" round="" icon="el-icon-edit"
|
122
122
|
@click="openEditFormatConfigDialog(scope.row,scope.$index)"
|
@@ -131,6 +131,25 @@
|
|
131
131
|
</el-select>
|
132
132
|
</template>
|
133
133
|
</el-table-column>
|
134
|
+
|
135
|
+
|
136
|
+
<el-table-column :label="i18nt('表尾数据类型')" width="200" prop="formatS">
|
137
|
+
<template slot-scope="scope">
|
138
|
+
<el-select v-model="scope.row.footerDataType" clearable>
|
139
|
+
<el-option value="1" label="合计"></el-option>
|
140
|
+
<el-option value="2" label="平均"></el-option>
|
141
|
+
<el-option value="3" label="自定义"></el-option>
|
142
|
+
</el-select>
|
143
|
+
</template>
|
144
|
+
</el-table-column>
|
145
|
+
<el-table-column label="表尾数据配置" width="150" align="center">
|
146
|
+
<template slot-scope="scope">
|
147
|
+
<el-button size="mini" plain="" round="" icon="el-icon-edit"
|
148
|
+
@click="editFormEventHandler(scope.row,scope.$index,'footerMethodConfg')"
|
149
|
+
:disabled="scope.row.footerDataType !== '3'"></el-button>
|
150
|
+
</template>
|
151
|
+
</el-table-column>
|
152
|
+
|
134
153
|
<el-table-column label="格式化配置" width="90" fixed="right" align="center">
|
135
154
|
<template slot-scope="scope">
|
136
155
|
<el-button size="mini" plain="" round="" icon="el-icon-edit"
|
@@ -268,6 +287,34 @@
|
|
268
287
|
</el-button>
|
269
288
|
</div>
|
270
289
|
</el-dialog>
|
290
|
+
<el-dialog
|
291
|
+
:title="i18nt('designer.setting.editFormEventHandler')"
|
292
|
+
:visible.sync="showFormEventDialogFlag"
|
293
|
+
v-if="showFormEventDialogFlag"
|
294
|
+
:show-close="true"
|
295
|
+
custom-class="dialog-style list-dialog"
|
296
|
+
v-dialog-drag
|
297
|
+
:close-on-click-modal="false"
|
298
|
+
:close-on-press-escape="false"
|
299
|
+
:destroy-on-close="true"
|
300
|
+
:append-to-body="true"
|
301
|
+
:modal-append-to-body="true"
|
302
|
+
top="5vh"
|
303
|
+
>
|
304
|
+
<div class="cont">
|
305
|
+
<el-alert type="info" :closable="false" :title="'form.' + eventParamsMap[curEventName]"></el-alert>
|
306
|
+
<code-editor :mode="'javascript'" :readonly="false" v-model="formEventHandlerCode" ref="ecEditor"></code-editor>
|
307
|
+
<el-alert type="info" :closable="false" title="}"></el-alert>
|
308
|
+
</div>
|
309
|
+
<div slot="footer" class="dialog-footer">
|
310
|
+
<el-button @click="showFormEventDialogFlag = false" class="button-sty" icon="el-icon-close">
|
311
|
+
{{ i18nt('designer.hint.cancel') }}
|
312
|
+
</el-button>
|
313
|
+
<el-button type="primary" @click="saveFormEventHandler" class="button-sty" icon="el-icon-check">
|
314
|
+
{{ i18nt('designer.hint.confirm') }}
|
315
|
+
</el-button>
|
316
|
+
</div>
|
317
|
+
</el-dialog>
|
271
318
|
</div>
|
272
319
|
|
273
320
|
</template>
|
@@ -503,6 +550,16 @@ export default {
|
|
503
550
|
moveDownRow: 'a-link',
|
504
551
|
removeTreeRow: 'a-link'
|
505
552
|
},
|
553
|
+
|
554
|
+
showFormEventDialogFlag: false,
|
555
|
+
formEventHandlerCode: '',
|
556
|
+
curEventName: '',
|
557
|
+
|
558
|
+
eventParamsMap: {
|
559
|
+
footerMethodConfg: 'footerMethodConfg(dataId,formCode,param) {',
|
560
|
+
|
561
|
+
},
|
562
|
+
|
506
563
|
}
|
507
564
|
},
|
508
565
|
beforeDestroy() {
|
@@ -515,6 +572,31 @@ export default {
|
|
515
572
|
this.init();
|
516
573
|
},
|
517
574
|
methods: {
|
575
|
+
editFormEventHandler(row,index,eventName) {
|
576
|
+
this.curEventName = eventName;
|
577
|
+
this.curEventIndex = index;
|
578
|
+
this.formEventHandlerCode = row[eventName];
|
579
|
+
this.showFormEventDialogFlag = true;
|
580
|
+
},
|
581
|
+
|
582
|
+
saveFormEventHandler() {
|
583
|
+
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
584
|
+
let syntaxErrorFlag = false;
|
585
|
+
if (!!codeHints && codeHints.length > 0) {
|
586
|
+
codeHints.forEach(chItem => {
|
587
|
+
if (chItem.type === 'error') {
|
588
|
+
syntaxErrorFlag = true;
|
589
|
+
}
|
590
|
+
});
|
591
|
+
|
592
|
+
if (syntaxErrorFlag) {
|
593
|
+
this.$message.error(this.i18nt('designer.setting.syntaxCheckWarning'));
|
594
|
+
return;
|
595
|
+
}
|
596
|
+
}
|
597
|
+
this.tableData[this.curEventIndex] [this.curEventName] = this.formEventHandlerCode;
|
598
|
+
this.showFormEventDialogFlag = false;
|
599
|
+
},
|
518
600
|
init() {
|
519
601
|
this.tableData = this.$baseLodash.cloneDeep(this.optionModel.tableColumns);
|
520
602
|
this.$nextTick(() => {
|
@@ -613,7 +695,9 @@ export default {
|
|
613
695
|
align: 'left',
|
614
696
|
show: true,
|
615
697
|
sortable: true,
|
616
|
-
|
698
|
+
exportType: null,
|
699
|
+
footerDataType: null,
|
700
|
+
footerMethodConfg:null
|
617
701
|
// treeNode: false,
|
618
702
|
|
619
703
|
};
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<el-divider class="custom-divider-margin-top">请求访问设置</el-divider>
|
5
5
|
</el-form-item>
|
6
6
|
<el-form-item label="启用表单脚本" v-if="formScriptEnabledTypes.includes(selectedWidget.type)">
|
7
|
-
<el-switch v-model="optionModel.formScriptEnabled"></el-switch>
|
7
|
+
<el-switch v-model="optionModel.formScriptEnabled" @change="changeFormScriptEnabled"></el-switch>
|
8
8
|
</el-form-item>
|
9
9
|
<template>
|
10
10
|
<el-form-item label="表单脚本编码">
|
@@ -18,6 +18,27 @@
|
|
18
18
|
</a>
|
19
19
|
</el-form-item>
|
20
20
|
</template>
|
21
|
+
<template v-if="formScriptEnabledTypes.includes(selectedWidget.type)">
|
22
|
+
<el-form-item :label="i18nt('启用词汇查询')">
|
23
|
+
<el-switch v-model="optionModel.commonAttributeEnabled" @change="changeCommonAttributeEnabled"></el-switch>
|
24
|
+
</el-form-item>
|
25
|
+
<el-form-item :label="i18nt('词汇编码')">
|
26
|
+
<el-input type="text" v-model="optionModel.commonAttributeCode"></el-input>
|
27
|
+
</el-form-item>
|
28
|
+
<el-form-item :label="i18nt('显示字段')">
|
29
|
+
<el-input type="text" v-model="optionModel.labelKey"></el-input>
|
30
|
+
</el-form-item>
|
31
|
+
<el-form-item :label="i18nt('关联字段')">
|
32
|
+
<el-input type="text" v-model="optionModel.valueKey"></el-input>
|
33
|
+
</el-form-item>
|
34
|
+
</template>
|
35
|
+
<el-form-item label="查询回调">
|
36
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
37
|
+
@click="editEventHandler('formScriptSuccess', ['dataId', 'formCode','res'])">
|
38
|
+
<span>{{ optionModel.formScriptSuccess }}</span>
|
39
|
+
<i class="el-icon-edit"></i>
|
40
|
+
</a>
|
41
|
+
</el-form-item>
|
21
42
|
</div>
|
22
43
|
</template>
|
23
44
|
|
@@ -42,6 +63,23 @@ export default {
|
|
42
63
|
methods: {
|
43
64
|
getIsShow() {
|
44
65
|
return this.selectedWidget.type !== 'data-table';
|
66
|
+
},
|
67
|
+
changeFormScriptEnabled(val){
|
68
|
+
if(val){
|
69
|
+
if(this.optionModel.hasOwnProperty("commonAttributeEnabled")){
|
70
|
+
this.optionModel.commonAttributeEnabled = false
|
71
|
+
}
|
72
|
+
}
|
73
|
+
},
|
74
|
+
changeCommonAttributeEnabled(val){
|
75
|
+
if(val){
|
76
|
+
this.optionModel.formScriptEnabled = false;
|
77
|
+
this.optionModel.labelKey = "value";
|
78
|
+
this.optionModel.valueKey = "sn";
|
79
|
+
}else{
|
80
|
+
this.optionModel.labelKey = null;
|
81
|
+
this.optionModel.valueKey = null;
|
82
|
+
}
|
45
83
|
}
|
46
84
|
}
|
47
85
|
}
|
package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
3
|
<el-form-item label-width="0">
|
4
|
-
<el-divider class="custom-divider-margin-top"
|
4
|
+
<el-divider class="custom-divider-margin-top">项目标签设置</el-divider>
|
5
5
|
</el-form-item>
|
6
6
|
<el-form-item label="表单编码">
|
7
7
|
<el-input v-model="optionModel.tagFormCode" clearable></el-input>
|
@@ -12,8 +12,20 @@
|
|
12
12
|
<el-form-item label="唯一关键字段">
|
13
13
|
<el-input v-model="optionModel.tagUniqueField" clearable></el-input>
|
14
14
|
</el-form-item>
|
15
|
+
<el-form-item label="来源展示字段">
|
16
|
+
<el-input v-model="optionModel.tagFormLabelField" clearable></el-input>
|
17
|
+
</el-form-item>
|
18
|
+
<el-form-item label="来源唯一关键字段">
|
19
|
+
<el-input v-model="optionModel.tagFormUniqueField" clearable></el-input>
|
20
|
+
</el-form-item>
|
21
|
+
<el-form-item label="表单参数">
|
22
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
23
|
+
@click="editEventHandler('tagFormParam', ['dataId', 'formCode'])">
|
24
|
+
<span>{{ optionModel.cf_vendor_item }}</span>
|
25
|
+
<i class="el-icon-edit"></i>
|
26
|
+
</a>
|
27
|
+
</el-form-item>
|
15
28
|
<el-form-item label="明细字段回填">
|
16
|
-
<el-input v-model="optionModel.tagFillConfig" clearable></el-input>
|
17
29
|
<a href="javascript:void(0);" class="a-link link-oneLind"
|
18
30
|
@click="openDialog">
|
19
31
|
<span>{{ optionModel.tagFillConfig.length ? "已维护" : "" }}</span>
|
@@ -23,7 +35,7 @@
|
|
23
35
|
<el-form-item label="确认回调">
|
24
36
|
<!-- <el-input v-model="optionModel.tagConfirmCallback" clearable></el-input>-->
|
25
37
|
<a href="javascript:void(0);" class="a-link link-oneLind"
|
26
|
-
@click="editEventHandler('tagConfirmCallback', ['dataId', 'formCode'])">
|
38
|
+
@click="editEventHandler('tagConfirmCallback', ['dataId', 'formCode','rows'])">
|
27
39
|
<span>{{ optionModel.tagConfirmCallback }}</span>
|
28
40
|
<i class="el-icon-edit"></i>
|
29
41
|
</a>
|
package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue
CHANGED
@@ -17,7 +17,8 @@
|
|
17
17
|
},
|
18
18
|
methods:{
|
19
19
|
showProperty(){
|
20
|
-
|
20
|
+
let widgetRef = this.designer.formWidget.getWidgetRef(this.selectedWidget.options.name);
|
21
|
+
return widgetRef.$attrs && $attrs.$attrs['table-condition']!==true;
|
21
22
|
}
|
22
23
|
}
|
23
24
|
}
|
@@ -148,6 +148,8 @@ const COMMON_PROPERTIES = {
|
|
148
148
|
"submitFlag": "submitFlag-editor",
|
149
149
|
"aLinkFlag": "a-link-editor",
|
150
150
|
"aTextFlag": "a-text-editor",
|
151
|
+
"tagFormCode": "project-tag-editor",
|
152
|
+
// "commonAttributeEnabled": "commonAttributeEnabled-editor"
|
151
153
|
}
|
152
154
|
|
153
155
|
const ADVANCED_PROPERTIES = {
|
@@ -43,12 +43,12 @@
|
|
43
43
|
表单/列表设置
|
44
44
|
</el-button>-->
|
45
45
|
<el-button type="primary" @click="saveReportTemplate()" plain
|
46
|
-
v-if="designer.vueInstance.isDev && designer.vueInstance.menuKindAuth.editAuth===1">
|
46
|
+
v-if="designer.vueInstance.isDev && designer.vueInstance.menuKindAuth.editAuth===1 && !readonly">
|
47
47
|
<i class="el-icon-check"/>
|
48
48
|
保存
|
49
49
|
</el-button>
|
50
50
|
<el-divider direction="vertical"></el-divider>
|
51
|
-
<el-button v-if="showToolButton('clearDesignerButton')" type="text" @click="clearFormWidget">
|
51
|
+
<el-button v-if="showToolButton('clearDesignerButton') && !readonly" type="text" @click="clearFormWidget">
|
52
52
|
<i class="el-icon-delete"/>
|
53
53
|
{{ i18nt('designer.toolbar.clear') }}
|
54
54
|
</el-button>
|
@@ -57,7 +57,7 @@
|
|
57
57
|
{{ i18nt('designer.toolbar.preview') }}
|
58
58
|
</el-button>
|
59
59
|
<el-divider direction="vertical"></el-divider>
|
60
|
-
<el-button v-if="showToolButton('importJsonButton')" type="text" @click="importJson">
|
60
|
+
<el-button v-if="showToolButton('importJsonButton') && !readonly" type="text" @click="importJson">
|
61
61
|
{{ i18nt('designer.toolbar.importJson') }}
|
62
62
|
</el-button>
|
63
63
|
<el-button v-if="showToolButton('exportJsonButton')" type="text" @click="exportJson">
|
@@ -437,6 +437,7 @@ export default {
|
|
437
437
|
Clipboard,
|
438
438
|
FormSetting
|
439
439
|
},
|
440
|
+
inject:["readonly"],
|
440
441
|
mixins: [indexMixin],
|
441
442
|
data() {
|
442
443
|
return {
|