cloud-web-corejs 1.0.54-dev.335 → 1.0.54-dev.336
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/dialog/importDialogMixin.js +15 -2
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +2 -0
- package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +171 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +24 -0
- package/src/components/xform/lang/zh-CN.js +1 -0
package/package.json
CHANGED
@@ -774,10 +774,23 @@ tmixins = {
|
|
774
774
|
} else {
|
775
775
|
// error_win(resultMsg);
|
776
776
|
// layer.close(opts.dialogObjIndex);
|
777
|
-
|
777
|
+
|
778
|
+
let items = param.map(item=>{
|
779
|
+
return {
|
780
|
+
...item,
|
781
|
+
_resultType: "error",
|
782
|
+
_resultContent: resultMsg.content,
|
783
|
+
}
|
784
|
+
})
|
785
|
+
failNum = failNum + items.length;
|
786
|
+
that.failRows.push(...items);
|
787
|
+
|
788
|
+
that.failRows = that.failRows.sort(compareV('impSeq'));
|
789
|
+
|
790
|
+
/* that.$errorMsg(resultMsg);
|
778
791
|
that.showContent = false;
|
779
792
|
that.clearImportTimer();
|
780
|
-
return;
|
793
|
+
return; */
|
781
794
|
}
|
782
795
|
} else {
|
783
796
|
var data = that.resultData.data[index];
|
package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue
CHANGED
@@ -62,11 +62,13 @@ export default {
|
|
62
62
|
methods: {
|
63
63
|
importHandle() {
|
64
64
|
let multi = this.field.options.importMultiple || false;
|
65
|
+
let multiSize = this.field.options.importMultiSize || 1;
|
65
66
|
this.getFormRef().openImportDialog({
|
66
67
|
target: this,
|
67
68
|
importOption: this.field.options,
|
68
69
|
importFrontOnly: false,
|
69
70
|
multi,
|
71
|
+
multiSize,
|
70
72
|
callback: (resultData, file, done) => {
|
71
73
|
|
72
74
|
}
|
@@ -0,0 +1,171 @@
|
|
1
|
+
<template>
|
2
|
+
<static-content-wrapper :designer="designer" :field="field" :design-state="designState"
|
3
|
+
:display-style="field.options.displayStyle"
|
4
|
+
:parent-widget="parentWidget" :parent-list="parentList"
|
5
|
+
:index-of-parent-list="indexOfParentList"
|
6
|
+
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
|
7
|
+
:sub-form-row-id="subFormRowId">
|
8
|
+
<vxe-grid ref="table-m1" :data="oplogDTOs" v-bind="m1Option" @resizable-change="$vxeTableUtil.onColumnWitchChange" @custom="$vxeTableUtil.customHandle"></vxe-grid>
|
9
|
+
</static-content-wrapper>
|
10
|
+
</template>
|
11
|
+
|
12
|
+
<script>
|
13
|
+
import StaticContentWrapper from './static-content-wrapper'
|
14
|
+
import emitter from '../../../utils/emitter'
|
15
|
+
import i18n from "../../../utils/i18n";
|
16
|
+
import fieldMixin from "./fieldMixin";
|
17
|
+
|
18
|
+
export default {
|
19
|
+
name: "oplog-widget",
|
20
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
21
|
+
mixins: [emitter, fieldMixin, i18n],
|
22
|
+
props: {
|
23
|
+
field: Object,
|
24
|
+
parentWidget: Object,
|
25
|
+
parentList: Array,
|
26
|
+
indexOfParentList: Number,
|
27
|
+
designer: Object,
|
28
|
+
|
29
|
+
designState: {
|
30
|
+
type: Boolean,
|
31
|
+
default: false
|
32
|
+
},
|
33
|
+
|
34
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
35
|
+
type: Number,
|
36
|
+
default: -1
|
37
|
+
},
|
38
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
39
|
+
type: Number,
|
40
|
+
default: -1
|
41
|
+
},
|
42
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
43
|
+
type: String,
|
44
|
+
default: ''
|
45
|
+
},
|
46
|
+
|
47
|
+
},
|
48
|
+
components: {
|
49
|
+
StaticContentWrapper,
|
50
|
+
},
|
51
|
+
computed: {
|
52
|
+
showLabel(){
|
53
|
+
return this.field.options.labelHidden? null: this.label;
|
54
|
+
},
|
55
|
+
label() {
|
56
|
+
return this.field.options.isFormLabel ? this.currentValue : this.getI18nLabel(this.field.options.label);
|
57
|
+
},
|
58
|
+
widgetClass() {
|
59
|
+
let list = [];
|
60
|
+
let optionModel = this.field.options
|
61
|
+
if (optionModel.colorClass) list.push(optionModel.colorClass);
|
62
|
+
if (optionModel.underline) list.push('underLine');
|
63
|
+
if (optionModel.disabled) list.push('is-disabled');
|
64
|
+
return list
|
65
|
+
}
|
66
|
+
},
|
67
|
+
beforeCreate() {
|
68
|
+
/* 这里不能访问方法和属性!! */
|
69
|
+
},
|
70
|
+
data(){
|
71
|
+
return {
|
72
|
+
m1Option:{},
|
73
|
+
oplogDTOs:[]
|
74
|
+
}
|
75
|
+
},
|
76
|
+
|
77
|
+
created() {
|
78
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
79
|
+
需要在父组件created中初始化!! */
|
80
|
+
this.registerToRefList()
|
81
|
+
this.initEventHandler()
|
82
|
+
|
83
|
+
this.handleOnCreated()
|
84
|
+
},
|
85
|
+
|
86
|
+
mounted() {
|
87
|
+
this.handleOnMounted()
|
88
|
+
this.initOplogDTOs();
|
89
|
+
},
|
90
|
+
|
91
|
+
beforeDestroy() {
|
92
|
+
this.unregisterFromRefList()
|
93
|
+
},
|
94
|
+
|
95
|
+
methods: {
|
96
|
+
initOplogDTOs() {
|
97
|
+
const tableOption = {
|
98
|
+
vue: this,
|
99
|
+
tableRef: 'table-m1',
|
100
|
+
tableName: 'xform-oplog-oplogList-m1Grid',
|
101
|
+
columns: [{
|
102
|
+
type: 'checkbox',
|
103
|
+
fixed: 'left',
|
104
|
+
width: 48,
|
105
|
+
resizable: false
|
106
|
+
},
|
107
|
+
{
|
108
|
+
title: this.$t2('操作时间', 'components.oplogTable.createDate'),
|
109
|
+
field: 'createDate',
|
110
|
+
width: 150
|
111
|
+
},
|
112
|
+
{
|
113
|
+
title: this.$t2('操作人员', 'components.oplogTable.createBy'),
|
114
|
+
field: '_createBy',
|
115
|
+
width: 150
|
116
|
+
},
|
117
|
+
{
|
118
|
+
title: this.$t2('操作日志', 'components.oplogTable.content'),
|
119
|
+
field: 'content',
|
120
|
+
width: 150
|
121
|
+
},
|
122
|
+
{
|
123
|
+
width: 47,
|
124
|
+
fixed: 'right',
|
125
|
+
title: '',
|
126
|
+
sortable: false
|
127
|
+
}
|
128
|
+
]
|
129
|
+
};
|
130
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
131
|
+
this.m1Option = opts;
|
132
|
+
});
|
133
|
+
this.initData();
|
134
|
+
},
|
135
|
+
initData(option) {
|
136
|
+
let reportTemplate = this.getFormRef().reportTemplate;
|
137
|
+
let formCode = reportTemplate.formCode;
|
138
|
+
let scriptCode = this.field.options.formScriptCode;
|
139
|
+
let oplogTypeCode = this.field.options.oplogTypeCode || formCode;
|
140
|
+
let oplogBusinessKey = this.field.options.oplogBusinessKey || "id";
|
141
|
+
if (!scriptCode) return;
|
142
|
+
let business_code = this.formModel[oplogBusinessKey];
|
143
|
+
if(!business_code) return;
|
144
|
+
this.formHttp({
|
145
|
+
scriptCode: scriptCode,
|
146
|
+
data: {
|
147
|
+
formCode: formCode,
|
148
|
+
formVersion: reportTemplate.formVersion,
|
149
|
+
data: {
|
150
|
+
log_type: oplogTypeCode,
|
151
|
+
business_code: business_code
|
152
|
+
}
|
153
|
+
},
|
154
|
+
callback: res => {
|
155
|
+
let rows = res.objx || [];
|
156
|
+
this.oplogDTOs = rows;
|
157
|
+
}
|
158
|
+
});
|
159
|
+
},
|
160
|
+
}
|
161
|
+
|
162
|
+
}
|
163
|
+
</script>
|
164
|
+
|
165
|
+
<style lang="scss" scoped>
|
166
|
+
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
167
|
+
a.is-disabled {
|
168
|
+
cursor: not-allowed;
|
169
|
+
}
|
170
|
+
|
171
|
+
</style>
|
@@ -32,6 +32,9 @@
|
|
32
32
|
<el-form-item label="批量导入">
|
33
33
|
<el-switch v-model="optionModel.importMultiple"></el-switch>
|
34
34
|
</el-form-item>
|
35
|
+
<el-form-item label="批量导入大小">
|
36
|
+
<base-input-number v-model="optionModel.importMultiSize" :max="200"></base-input-number>
|
37
|
+
</el-form-item>
|
35
38
|
|
36
39
|
<el-form-item label="启用图片处理">
|
37
40
|
<el-switch v-model="optionModel.enabledImportPreHandle"></el-switch>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-form-item :label="i18nt('脚本编码')">
|
4
|
+
<el-input type="text" v-model="optionModel.formScriptCode"></el-input>
|
5
|
+
</el-form-item>
|
6
|
+
<el-form-item :label="i18nt('日志类型')">
|
7
|
+
<el-input type="text" v-model="optionModel.oplogTypeCode" placeholder="默认表单模板编码"></el-input>
|
8
|
+
</el-form-item>
|
9
|
+
<el-form-item :label="i18nt('业务唯一字段')">
|
10
|
+
<el-input type="text" v-model="optionModel.oplogBusinessKey" placeholder="默认单据id"></el-input>
|
11
|
+
</el-form-item>
|
12
|
+
</div>
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<script>
|
16
|
+
import i18n from "../../../utils/i18n"
|
17
|
+
|
18
|
+
export default {
|
19
|
+
name: "oplogFlag-editor",
|
20
|
+
mixins: [i18n],
|
21
|
+
props: {
|
22
|
+
designer: Object,
|
23
|
+
selectedWidget: Object,
|
24
|
+
optionModel: Object,
|
25
|
+
},
|
26
|
+
}
|
27
|
+
</script>
|
28
|
+
|
29
|
+
<style scoped>
|
30
|
+
|
31
|
+
</style>
|
@@ -3044,6 +3044,7 @@ export const advancedFields = [
|
|
3044
3044
|
hiddenByWf: true,
|
3045
3045
|
...defaultWidgetShowRuleConfig,
|
3046
3046
|
importMultiple:false,
|
3047
|
+
importMultiSize: 1,
|
3047
3048
|
importFileLimitSize: 200,
|
3048
3049
|
importEntity: "",
|
3049
3050
|
importAttachCode: "",
|
@@ -3680,6 +3681,29 @@ export const businessFields = [
|
|
3680
3681
|
...defaultWidgetShowRuleConfig,
|
3681
3682
|
},
|
3682
3683
|
},
|
3684
|
+
{
|
3685
|
+
type: "oplog",
|
3686
|
+
icon: "uploadbox",
|
3687
|
+
commonFlag: !0,
|
3688
|
+
formItemFlag: !1,
|
3689
|
+
options: {
|
3690
|
+
name: "",
|
3691
|
+
// label: "操作日志",
|
3692
|
+
disabled: !1,
|
3693
|
+
hidden: !1,
|
3694
|
+
|
3695
|
+
oplogFlag:1,
|
3696
|
+
formScriptCode: "listUserLog",
|
3697
|
+
oplogTypeCode:null,
|
3698
|
+
oplogBusinessKey:null,
|
3699
|
+
|
3700
|
+
|
3701
|
+
customClass: "",
|
3702
|
+
onCreated: "",
|
3703
|
+
onMounted: "",
|
3704
|
+
|
3705
|
+
},
|
3706
|
+
},
|
3683
3707
|
];
|
3684
3708
|
|
3685
3709
|
export const keyNamePrefixMap = {
|