cloud-web-corejs 1.0.54-dev.627 → 1.0.54-dev.628
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/baseTabs/index.vue +16 -8
- package/src/components/table/index.js +116 -83
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/form-render/container-item/detail-item.vue +72 -48
- package/src/components/xform/form-render/container-item/table2-item.vue +24 -10
- package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
- package/src/components/table/index - /345/211/257/346/234/254.js" +0 -1103
|
@@ -10,13 +10,17 @@
|
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
12
|
<container-item-wrapper :widget="widget">
|
|
13
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
class="detail-wrap grid-container"
|
|
15
|
+
:class="[customClass]"
|
|
16
|
+
:ref="widget.id"
|
|
17
|
+
>
|
|
14
18
|
<div class="d-header clearfix">
|
|
15
19
|
<div class="fl">
|
|
16
|
-
<i class="el-icon-info"/>
|
|
20
|
+
<i class="el-icon-info" />
|
|
17
21
|
{{ getI18nLabel(widget.options.label) }}
|
|
18
22
|
</div>
|
|
19
|
-
<!-- <div class="fr">
|
|
23
|
+
<!-- <div class="fr">
|
|
20
24
|
<el-button type="primary" plain class="button-sty" icon="el-icon-refresh-right" @click="reload">重置
|
|
21
25
|
</el-button>
|
|
22
26
|
<el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData" v-if="!wfInfo.id">保存
|
|
@@ -25,54 +29,76 @@
|
|
|
25
29
|
<div class="fr">
|
|
26
30
|
<template v-for="(subWidget, swIdx) in widget.widgetList">
|
|
27
31
|
<template v-if="'container' === subWidget.category">
|
|
28
|
-
<component
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
<component
|
|
33
|
+
:is="subWidget.type + '-item'"
|
|
34
|
+
:widget="subWidget"
|
|
35
|
+
:key="swIdx"
|
|
36
|
+
:parent-list="widget.widgetList"
|
|
37
|
+
:index-of-parent-list="swIdx"
|
|
38
|
+
:parent-widget="widget"
|
|
39
|
+
>
|
|
31
40
|
<!-- 递归传递插槽!!! -->
|
|
32
|
-
<template
|
|
33
|
-
|
|
41
|
+
<template
|
|
42
|
+
v-for="slot in Object.keys($scopedSlots)"
|
|
43
|
+
v-slot:[slot]="scope"
|
|
44
|
+
>
|
|
45
|
+
<slot :name="slot" v-bind="scope" />
|
|
34
46
|
</template>
|
|
35
47
|
</component>
|
|
36
48
|
</template>
|
|
37
49
|
<template v-else>
|
|
38
|
-
<component
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
<component
|
|
51
|
+
:is="subWidget.type + '-widget'"
|
|
52
|
+
:field="subWidget"
|
|
53
|
+
:designer="null"
|
|
54
|
+
:key="swIdx"
|
|
55
|
+
:parent-list="widget.widgetList"
|
|
56
|
+
:index-of-parent-list="swIdx"
|
|
57
|
+
:parent-widget="widget"
|
|
58
|
+
>
|
|
41
59
|
<!-- 递归传递插槽!!! -->
|
|
42
|
-
<template
|
|
43
|
-
|
|
60
|
+
<template
|
|
61
|
+
v-for="slot in Object.keys($scopedSlots)"
|
|
62
|
+
v-slot:[slot]="scope"
|
|
63
|
+
>
|
|
64
|
+
<slot :name="slot" v-bind="scope" />
|
|
44
65
|
</template>
|
|
45
66
|
</component>
|
|
46
67
|
</template>
|
|
47
68
|
</template>
|
|
48
69
|
</div>
|
|
49
70
|
</div>
|
|
50
|
-
<baseTabs
|
|
51
|
-
<detail-pane-widget
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
71
|
+
<baseTabs :showNav="!widget.options.hideNav">
|
|
72
|
+
<detail-pane-widget
|
|
73
|
+
v-for="(paneWidget, index) in widget.panes"
|
|
74
|
+
:key="index"
|
|
75
|
+
:widget="paneWidget"
|
|
76
|
+
:parent-list="widget.panes"
|
|
77
|
+
:index-of-parent-list="index"
|
|
78
|
+
:parent-widget="widget"
|
|
79
|
+
:col-height="widget.options.colHeight"
|
|
80
|
+
tabRef="baseTabRef"
|
|
81
|
+
:tabPaneGrade="2"
|
|
82
|
+
></detail-pane-widget>
|
|
55
83
|
</baseTabs>
|
|
56
84
|
</div>
|
|
57
85
|
</container-item-wrapper>
|
|
58
86
|
</template>
|
|
59
87
|
|
|
60
88
|
<script>
|
|
89
|
+
import emitter from "../../../../components/xform/utils/emitter";
|
|
90
|
+
import i18n from "../../../../components/xform/utils/i18n";
|
|
91
|
+
import refMixin from "../../../../components/xform/form-render/refMixin";
|
|
92
|
+
import ContainerItemWrapper from "./container-item-wrapper";
|
|
93
|
+
import containerItemMixin from "./containerItemMixin";
|
|
94
|
+
import detailPaneWidget from "../../../../components/xform/form-render/container-item/detail-pane-item";
|
|
95
|
+
import FieldComponents from "../../../../components/xform/form-designer/form-widget/field-widget/index";
|
|
61
96
|
|
|
62
|
-
import
|
|
63
|
-
import i18n from "../../../../components/xform/utils/i18n"
|
|
64
|
-
import refMixin from "../../../../components/xform/form-render/refMixin"
|
|
65
|
-
import ContainerItemWrapper from './container-item-wrapper'
|
|
66
|
-
import containerItemMixin from "./containerItemMixin"
|
|
67
|
-
import detailPaneWidget from "../../../../components/xform/form-render/container-item/detail-pane-item"
|
|
68
|
-
import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
import {initWf} from '../../../../components/wf/wfUtil'
|
|
97
|
+
import { initWf } from "../../../../components/wf/wfUtil";
|
|
72
98
|
|
|
73
99
|
export default {
|
|
74
100
|
name: "detail-item",
|
|
75
|
-
componentName:
|
|
101
|
+
componentName: "ContainerItem",
|
|
76
102
|
mixins: [emitter, i18n, refMixin, containerItemMixin],
|
|
77
103
|
components: {
|
|
78
104
|
ContainerItemWrapper,
|
|
@@ -82,35 +108,35 @@ export default {
|
|
|
82
108
|
props: {
|
|
83
109
|
widget: Object,
|
|
84
110
|
},
|
|
85
|
-
inject: [
|
|
111
|
+
inject: ["refList", "sfRefList", "globalModel", "previewState"],
|
|
86
112
|
created() {
|
|
87
|
-
this.initRefList()
|
|
113
|
+
this.initRefList();
|
|
88
114
|
this.handleOnCreated();
|
|
89
115
|
},
|
|
90
116
|
mounted() {
|
|
91
117
|
this.handleOnMounted();
|
|
92
118
|
this.$nextTick(() => {
|
|
93
119
|
this.createWf();
|
|
94
|
-
})
|
|
120
|
+
});
|
|
95
121
|
},
|
|
96
122
|
beforeDestroy() {
|
|
97
|
-
this.unregisterFromRefList()
|
|
123
|
+
this.unregisterFromRefList();
|
|
98
124
|
},
|
|
99
125
|
data() {
|
|
100
126
|
return {
|
|
101
|
-
wfInfo: {}
|
|
102
|
-
}
|
|
127
|
+
wfInfo: {},
|
|
128
|
+
};
|
|
103
129
|
},
|
|
104
130
|
methods: {
|
|
105
131
|
reload() {
|
|
106
|
-
this.getFormRef().$parent.$baseReload()
|
|
132
|
+
this.getFormRef().$parent.$baseReload();
|
|
107
133
|
},
|
|
108
134
|
saveData() {
|
|
109
|
-
if (!!this.previewState) return
|
|
135
|
+
if (!!this.previewState) return;
|
|
110
136
|
this.getFormRef().saveForm();
|
|
111
137
|
},
|
|
112
138
|
createWf() {
|
|
113
|
-
if (!!this.previewState || !this.widget.options.wfEnabled) return
|
|
139
|
+
if (!!this.previewState || !this.widget.options.wfEnabled) return;
|
|
114
140
|
let formTarget = this.getFormRef();
|
|
115
141
|
let formData = formTarget.formData;
|
|
116
142
|
if (formData && formData.object_foreign_id) {
|
|
@@ -120,17 +146,16 @@ export default {
|
|
|
120
146
|
objId: formData.object_foreign_id, //单据ID
|
|
121
147
|
wfCode: formCode, //流程编码
|
|
122
148
|
showStartBtn: true, //是否放出启动按钮,流程已启动时此参数失效
|
|
123
|
-
serviceId:
|
|
124
|
-
callback: ({wfInfo}) => {
|
|
149
|
+
serviceId: "user",
|
|
150
|
+
callback: ({ wfInfo }) => {
|
|
125
151
|
this.wfInfo = wfInfo;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
152
|
+
},
|
|
153
|
+
};
|
|
128
154
|
initWf.call(formTarget.$parent, option);
|
|
129
155
|
}
|
|
130
|
-
|
|
131
|
-
}
|
|
156
|
+
},
|
|
132
157
|
},
|
|
133
|
-
}
|
|
158
|
+
};
|
|
134
159
|
</script>
|
|
135
160
|
|
|
136
161
|
<style lang="scss" scoped>
|
|
@@ -148,11 +173,10 @@ export default {
|
|
|
148
173
|
// min-height: 28px;
|
|
149
174
|
height: 100%;
|
|
150
175
|
}
|
|
151
|
-
|
|
152
176
|
}
|
|
153
177
|
|
|
154
|
-
.grid-container.selected,
|
|
178
|
+
.grid-container.selected,
|
|
179
|
+
.grid-cell.selected {
|
|
155
180
|
outline: 2px solid $--color-primary !important;
|
|
156
181
|
}
|
|
157
|
-
|
|
158
182
|
</style>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<container-item-wrapper :widget="widget">
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
:key="widget.id"
|
|
5
|
+
class="table-container"
|
|
6
|
+
v-show="!widget.options.hidden"
|
|
7
|
+
>
|
|
4
8
|
<table
|
|
5
9
|
:ref="widget.id"
|
|
6
10
|
class="table-layout table-d-box"
|
|
@@ -22,7 +26,10 @@
|
|
|
22
26
|
:row.sync="rowData"
|
|
23
27
|
>
|
|
24
28
|
<!-- 递归传递插槽!!! -->
|
|
25
|
-
<template
|
|
29
|
+
<template
|
|
30
|
+
v-for="slot in Object.keys($scopedSlots)"
|
|
31
|
+
v-slot:[slot]="scope"
|
|
32
|
+
>
|
|
26
33
|
<slot :name="slot" v-bind="scope" />
|
|
27
34
|
</template>
|
|
28
35
|
</table-cell-item>
|
|
@@ -92,7 +99,7 @@ export default {
|
|
|
92
99
|
1: "textarea",
|
|
93
100
|
2: "date",
|
|
94
101
|
3: "number",
|
|
95
|
-
4: "text"
|
|
102
|
+
4: "text",
|
|
96
103
|
},
|
|
97
104
|
};
|
|
98
105
|
},
|
|
@@ -195,7 +202,9 @@ export default {
|
|
|
195
202
|
let formScriptEnabled = this.widget.options.formScriptEnabled || false;
|
|
196
203
|
let scriptCode = this.widget.options.formScriptCode;
|
|
197
204
|
if (!scriptCode) return;
|
|
198
|
-
let accessParam = this.handleCustomEvent(
|
|
205
|
+
let accessParam = this.handleCustomEvent(
|
|
206
|
+
this.widget.options.formScriptParam
|
|
207
|
+
);
|
|
199
208
|
return this.formHttp({
|
|
200
209
|
scriptCode: scriptCode,
|
|
201
210
|
data: {
|
|
@@ -209,6 +218,11 @@ export default {
|
|
|
209
218
|
},
|
|
210
219
|
success: (res) => {
|
|
211
220
|
let rows = res.objx || [];
|
|
221
|
+
this.handleCustomEvent(
|
|
222
|
+
this.widget.options.formScriptSuccess,
|
|
223
|
+
["res"],
|
|
224
|
+
[res]
|
|
225
|
+
);
|
|
212
226
|
this.setValue(rows);
|
|
213
227
|
},
|
|
214
228
|
});
|
|
@@ -265,12 +279,12 @@ export default {
|
|
|
265
279
|
f_field_value: "6",
|
|
266
280
|
},
|
|
267
281
|
{
|
|
268
|
-
f_field_name: "姓名"
|
|
269
|
-
f_key: "name"
|
|
270
|
-
f_field_type: 4
|
|
271
|
-
f_is_required: false
|
|
272
|
-
f_field_value: "张三"
|
|
273
|
-
}
|
|
282
|
+
f_field_name: "姓名", //显示名称
|
|
283
|
+
f_key: "name", //字段名
|
|
284
|
+
f_field_type: 4, //类型,0: "文本输入框",1: "多行输入框",2: "日期输入框",3: "数字输入框",4:"纯文本"
|
|
285
|
+
f_is_required: false, //是否必填
|
|
286
|
+
f_field_value: "张三", //字段值
|
|
287
|
+
},
|
|
274
288
|
];
|
|
275
289
|
let a = 1;
|
|
276
290
|
this.setValue(items);
|