cloud-web-corejs 1.0.54-dev.756 → 1.0.54-dev.759
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/jsonImport/mixins.js +350 -350
- package/src/components/langImport/mixins.js +502 -502
- package/src/components/wf/wf.js +2221 -2221
- package/src/components/xform/form-designer/designer.js +2027 -2027
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1774 -1774
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +1553 -1553
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +370 -370
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +655 -655
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +173 -173
- package/src/components/xform/form-render/container-item/detail-item.vue +287 -287
- package/src/components/xform/form-render/indexMixin.js +23 -23
- package/src/components/xform/utils/util.js +5 -5
- package/src/index.js +17 -0
- package/src/layout/components/AppMain.vue +7 -0
- package/src/microRouter/index.js +83 -7
- package/src/store/modules/micro.js +5 -0
- package/src/store/modules/permission.js +46 -1
- package/src/views/user/home/default2.vue +1158 -1158
- package/src/views/user/login/indexMixin.js +661 -661
|
@@ -1,173 +1,173 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
/**
|
|
3
|
-
* author: vformAdmin
|
|
4
|
-
* email: vdpadmin@163.com
|
|
5
|
-
* website: https://www.vform666.com
|
|
6
|
-
* date: 2021.08.18
|
|
7
|
-
* remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
|
|
8
|
-
*/
|
|
9
|
-
-->
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<container-item-wrapper :widget="widget">
|
|
13
|
-
<div class="h5-detail-wrap grid-container" :class="[customClass]" :ref="widget.id">
|
|
14
|
-
<div class="h5-header">{{ widget.options.label }}</div>
|
|
15
|
-
<div>
|
|
16
|
-
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
17
|
-
<template v-if="!!widget.panes && (widget.panes.length > 0)">
|
|
18
|
-
<template v-for="(subWidget, swIdx) in widget.panes">
|
|
19
|
-
<template v-if="'container' === subWidget.category">
|
|
20
|
-
<component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
|
|
21
|
-
:parent-list="widget.panes"
|
|
22
|
-
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
23
|
-
<!-- 递归传递插槽!!! -->
|
|
24
|
-
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
25
|
-
<slot :name="slot" v-bind="scope"/>
|
|
26
|
-
</template>
|
|
27
|
-
</component>
|
|
28
|
-
</template>
|
|
29
|
-
<template v-else>
|
|
30
|
-
<component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
|
|
31
|
-
:parent-list="widget.panes"
|
|
32
|
-
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
33
|
-
<!-- 递归传递插槽!!! -->
|
|
34
|
-
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
35
|
-
<slot :name="slot" v-bind="scope"/>
|
|
36
|
-
</template>
|
|
37
|
-
</component>
|
|
38
|
-
</template>
|
|
39
|
-
</template>
|
|
40
|
-
</template>
|
|
41
|
-
</transition-group>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="h5-fixed-bottom-btns ">
|
|
44
|
-
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
45
|
-
<template v-if="!!widget.widgetList && (widget.widgetList.length > 0)">
|
|
46
|
-
<template v-for="(subWidget, swIdx) in widget.widgetList">
|
|
47
|
-
<template v-if="'container' === subWidget.category">
|
|
48
|
-
<component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
|
|
49
|
-
:parent-list="widget.widgetList"
|
|
50
|
-
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
51
|
-
<!-- 递归传递插槽!!! -->
|
|
52
|
-
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
53
|
-
<slot :name="slot" v-bind="scope"/>
|
|
54
|
-
</template>
|
|
55
|
-
</component>
|
|
56
|
-
</template>
|
|
57
|
-
<template v-else>
|
|
58
|
-
<component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
|
|
59
|
-
:parent-list="widget.widgetList"
|
|
60
|
-
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
61
|
-
<!-- 递归传递插槽!!! -->
|
|
62
|
-
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
63
|
-
<slot :name="slot" v-bind="scope"/>
|
|
64
|
-
</template>
|
|
65
|
-
</component>
|
|
66
|
-
</template>
|
|
67
|
-
</template>
|
|
68
|
-
</template>
|
|
69
|
-
</transition-group>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
</container-item-wrapper>
|
|
74
|
-
</template>
|
|
75
|
-
|
|
76
|
-
<script>
|
|
77
|
-
|
|
78
|
-
import emitter from '../../../../components/xform/utils/emitter'
|
|
79
|
-
import i18n from "../../../../components/xform/utils/i18n"
|
|
80
|
-
import refMixin from "../../../../components/xform/form-render/refMixin"
|
|
81
|
-
import ContainerItemWrapper from './container-item-wrapper'
|
|
82
|
-
import containerItemMixin from "./containerItemMixin"
|
|
83
|
-
import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
import {initWf} from '../../../../components/wf/wfUtil'
|
|
87
|
-
|
|
88
|
-
export default {
|
|
89
|
-
name: "detail-h5-item",
|
|
90
|
-
componentName: 'ContainerItem',
|
|
91
|
-
mixins: [emitter, i18n, refMixin, containerItemMixin],
|
|
92
|
-
components: {
|
|
93
|
-
ContainerItemWrapper,
|
|
94
|
-
...FieldComponents,
|
|
95
|
-
},
|
|
96
|
-
props: {
|
|
97
|
-
widget: Object,
|
|
98
|
-
},
|
|
99
|
-
inject: ['refList', 'sfRefList', 'globalModel', 'previewState'],
|
|
100
|
-
created() {
|
|
101
|
-
this.initRefList()
|
|
102
|
-
this.handleOnCreated();
|
|
103
|
-
},
|
|
104
|
-
mounted() {
|
|
105
|
-
this.handleOnMounted();
|
|
106
|
-
this.$nextTick(() => {
|
|
107
|
-
this.createWf();
|
|
108
|
-
})
|
|
109
|
-
},
|
|
110
|
-
beforeDestroy() {
|
|
111
|
-
this.unregisterFromRefList()
|
|
112
|
-
},
|
|
113
|
-
data() {
|
|
114
|
-
return {
|
|
115
|
-
wfInfo: {}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
methods: {
|
|
119
|
-
reload() {
|
|
120
|
-
this.getFormRef().$parent.$baseReload()
|
|
121
|
-
},
|
|
122
|
-
saveData() {
|
|
123
|
-
if (!!this.previewState) return
|
|
124
|
-
this.getFormRef().saveForm();
|
|
125
|
-
},
|
|
126
|
-
createWf() {
|
|
127
|
-
if (!!this.previewState || !this.widget.options.wfEnabled) return
|
|
128
|
-
let formTarget = this.getFormRef();
|
|
129
|
-
let formData = formTarget.formData;
|
|
130
|
-
if (formData && formData.object_foreign_id) {
|
|
131
|
-
let reportTemplate = formTarget.reportTemplate;
|
|
132
|
-
let formCode = reportTemplate.formCode;
|
|
133
|
-
let option = {
|
|
134
|
-
objId: formData.object_foreign_id, //单据ID
|
|
135
|
-
wfCode: formCode, //流程编码
|
|
136
|
-
showStartBtn: true, //是否放出启动按钮,流程已启动时此参数失效
|
|
137
|
-
serviceId: 'user',
|
|
138
|
-
startConfirmText: () => formTarget.getWfStartConfirmText(),
|
|
139
|
-
callback: ({wfInfo}) => {
|
|
140
|
-
this.wfInfo = wfInfo;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
initWf.call(formTarget.$parent, option);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
}
|
|
149
|
-
</script>
|
|
150
|
-
|
|
151
|
-
<style lang="scss" scoped>
|
|
152
|
-
.grid-container {
|
|
153
|
-
min-height: 50px;
|
|
154
|
-
//line-height: 48px;
|
|
155
|
-
//padding: 6px;
|
|
156
|
-
//outline: 1px dashed #336699;
|
|
157
|
-
|
|
158
|
-
> div {
|
|
159
|
-
height: 100%;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.form-widget-list {
|
|
163
|
-
// min-height: 28px;
|
|
164
|
-
height: 100%;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.grid-container.selected, .grid-cell.selected {
|
|
170
|
-
outline: 2px solid $--color-primary !important;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
</style>
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* author: vformAdmin
|
|
4
|
+
* email: vdpadmin@163.com
|
|
5
|
+
* website: https://www.vform666.com
|
|
6
|
+
* date: 2021.08.18
|
|
7
|
+
* remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
|
|
8
|
+
*/
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<container-item-wrapper :widget="widget">
|
|
13
|
+
<div class="h5-detail-wrap grid-container" :class="[customClass]" :ref="widget.id">
|
|
14
|
+
<div class="h5-header">{{ widget.options.label }}</div>
|
|
15
|
+
<div>
|
|
16
|
+
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
17
|
+
<template v-if="!!widget.panes && (widget.panes.length > 0)">
|
|
18
|
+
<template v-for="(subWidget, swIdx) in widget.panes">
|
|
19
|
+
<template v-if="'container' === subWidget.category">
|
|
20
|
+
<component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
|
|
21
|
+
:parent-list="widget.panes"
|
|
22
|
+
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
23
|
+
<!-- 递归传递插槽!!! -->
|
|
24
|
+
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
25
|
+
<slot :name="slot" v-bind="scope"/>
|
|
26
|
+
</template>
|
|
27
|
+
</component>
|
|
28
|
+
</template>
|
|
29
|
+
<template v-else>
|
|
30
|
+
<component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
|
|
31
|
+
:parent-list="widget.panes"
|
|
32
|
+
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
33
|
+
<!-- 递归传递插槽!!! -->
|
|
34
|
+
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
35
|
+
<slot :name="slot" v-bind="scope"/>
|
|
36
|
+
</template>
|
|
37
|
+
</component>
|
|
38
|
+
</template>
|
|
39
|
+
</template>
|
|
40
|
+
</template>
|
|
41
|
+
</transition-group>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="h5-fixed-bottom-btns ">
|
|
44
|
+
<transition-group name="fade" tag="div" class="form-widget-list">
|
|
45
|
+
<template v-if="!!widget.widgetList && (widget.widgetList.length > 0)">
|
|
46
|
+
<template v-for="(subWidget, swIdx) in widget.widgetList">
|
|
47
|
+
<template v-if="'container' === subWidget.category">
|
|
48
|
+
<component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
|
|
49
|
+
:parent-list="widget.widgetList"
|
|
50
|
+
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
51
|
+
<!-- 递归传递插槽!!! -->
|
|
52
|
+
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
53
|
+
<slot :name="slot" v-bind="scope"/>
|
|
54
|
+
</template>
|
|
55
|
+
</component>
|
|
56
|
+
</template>
|
|
57
|
+
<template v-else>
|
|
58
|
+
<component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
|
|
59
|
+
:parent-list="widget.widgetList"
|
|
60
|
+
:index-of-parent-list="swIdx" :parent-widget="widget">
|
|
61
|
+
<!-- 递归传递插槽!!! -->
|
|
62
|
+
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
|
63
|
+
<slot :name="slot" v-bind="scope"/>
|
|
64
|
+
</template>
|
|
65
|
+
</component>
|
|
66
|
+
</template>
|
|
67
|
+
</template>
|
|
68
|
+
</template>
|
|
69
|
+
</transition-group>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
</container-item-wrapper>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script>
|
|
77
|
+
|
|
78
|
+
import emitter from '../../../../components/xform/utils/emitter'
|
|
79
|
+
import i18n from "../../../../components/xform/utils/i18n"
|
|
80
|
+
import refMixin from "../../../../components/xform/form-render/refMixin"
|
|
81
|
+
import ContainerItemWrapper from './container-item-wrapper'
|
|
82
|
+
import containerItemMixin from "./containerItemMixin"
|
|
83
|
+
import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
import {initWf} from '../../../../components/wf/wfUtil'
|
|
87
|
+
|
|
88
|
+
export default {
|
|
89
|
+
name: "detail-h5-item",
|
|
90
|
+
componentName: 'ContainerItem',
|
|
91
|
+
mixins: [emitter, i18n, refMixin, containerItemMixin],
|
|
92
|
+
components: {
|
|
93
|
+
ContainerItemWrapper,
|
|
94
|
+
...FieldComponents,
|
|
95
|
+
},
|
|
96
|
+
props: {
|
|
97
|
+
widget: Object,
|
|
98
|
+
},
|
|
99
|
+
inject: ['refList', 'sfRefList', 'globalModel', 'previewState'],
|
|
100
|
+
created() {
|
|
101
|
+
this.initRefList()
|
|
102
|
+
this.handleOnCreated();
|
|
103
|
+
},
|
|
104
|
+
mounted() {
|
|
105
|
+
this.handleOnMounted();
|
|
106
|
+
this.$nextTick(() => {
|
|
107
|
+
this.createWf();
|
|
108
|
+
})
|
|
109
|
+
},
|
|
110
|
+
beforeDestroy() {
|
|
111
|
+
this.unregisterFromRefList()
|
|
112
|
+
},
|
|
113
|
+
data() {
|
|
114
|
+
return {
|
|
115
|
+
wfInfo: {}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
reload() {
|
|
120
|
+
this.getFormRef().$parent.$baseReload()
|
|
121
|
+
},
|
|
122
|
+
saveData() {
|
|
123
|
+
if (!!this.previewState) return
|
|
124
|
+
this.getFormRef().saveForm();
|
|
125
|
+
},
|
|
126
|
+
createWf() {
|
|
127
|
+
if (!!this.previewState || !this.widget.options.wfEnabled) return
|
|
128
|
+
let formTarget = this.getFormRef();
|
|
129
|
+
let formData = formTarget.formData;
|
|
130
|
+
if (formData && formData.object_foreign_id) {
|
|
131
|
+
let reportTemplate = formTarget.reportTemplate;
|
|
132
|
+
let formCode = reportTemplate.formCode;
|
|
133
|
+
let option = {
|
|
134
|
+
objId: formData.object_foreign_id, //单据ID
|
|
135
|
+
wfCode: formCode, //流程编码
|
|
136
|
+
showStartBtn: true, //是否放出启动按钮,流程已启动时此参数失效
|
|
137
|
+
serviceId: 'user',
|
|
138
|
+
startConfirmText: () => formTarget.getWfStartConfirmText(),
|
|
139
|
+
callback: ({wfInfo}) => {
|
|
140
|
+
this.wfInfo = wfInfo;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
initWf.call(formTarget.$parent, option);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
}
|
|
149
|
+
</script>
|
|
150
|
+
|
|
151
|
+
<style lang="scss" scoped>
|
|
152
|
+
.grid-container {
|
|
153
|
+
min-height: 50px;
|
|
154
|
+
//line-height: 48px;
|
|
155
|
+
//padding: 6px;
|
|
156
|
+
//outline: 1px dashed #336699;
|
|
157
|
+
|
|
158
|
+
> div {
|
|
159
|
+
height: 100%;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.form-widget-list {
|
|
163
|
+
// min-height: 28px;
|
|
164
|
+
height: 100%;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.grid-container.selected, .grid-cell.selected {
|
|
170
|
+
outline: 2px solid $--color-primary !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
</style>
|