vue2-client 1.14.97 → 1.15.1
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/.env.message +19 -19
- package/package.json +109 -109
- package/src/base-client/components/common/XFormTable/XFormTable.vue +2 -2
- package/src/base-client/components/common/XFormTable/demo.vue +86 -86
- package/src/base-client/components/common/XTable/XTable.vue +1587 -1571
- package/src/base-client/components/common/XUploadFilesView/index.vue +485 -485
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.vue +10 -14
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireItem.vue +23 -47
- package/src/base-client/components/layout/XPageView/RenderRow.vue +88 -88
- package/src/base-client/components/layout/XPageView/XPageView.vue +223 -223
- package/src/base-client/components/layout/XPageView/XTab/XTab.vue +96 -96
- package/src/base-client/components/layout/XPageView/componentTypes.js +22 -22
- package/src/pages/WorkflowDetail/WorkFlowDemo2.vue +70 -1
- package/src/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue +388 -388
- package/src/pages/XPageViewExample/index.vue +149 -149
- package/src/router/async/router.map.js +127 -127
- package/vue.config.js +220 -220
@@ -47,13 +47,14 @@ export default {
|
|
47
47
|
})
|
48
48
|
})
|
49
49
|
},
|
50
|
-
customizeEvent (
|
50
|
+
customizeEvent (customize, callback) {
|
51
51
|
console.log(this.$listeners)
|
52
|
-
|
52
|
+
console.log(customize)
|
53
|
+
if (customize.clickEventName && this.$listeners[customize.clickEventName]) {
|
53
54
|
// 交由父级处理
|
54
|
-
this.$emit(
|
55
|
+
this.$emit(customize.clickEventName, customize, callback)
|
55
56
|
} else {
|
56
|
-
this.defaultAction(
|
57
|
+
this.defaultAction(customize.clickEventName, customize, callback)
|
57
58
|
}
|
58
59
|
},
|
59
60
|
defaultAction (clickEventName, item, callback) {
|
@@ -70,21 +71,16 @@ export default {
|
|
70
71
|
}
|
71
72
|
},
|
72
73
|
async init (conditionData) { // 接收完整条件对象
|
74
|
+
// this.$emit('init')
|
75
|
+
console.log('conditionData===>', conditionData)
|
73
76
|
await this.getData(this.queryParamsName, conditionData)
|
74
77
|
},
|
75
|
-
|
76
|
-
// this.getData(this.queryParamsName, conditions)
|
77
|
-
// // 初始化或更新时
|
78
|
-
// this.conditionsMap = {
|
79
|
-
// ...this.conditionsMap,
|
80
|
-
// [configId]: conditions // 响应式更新
|
81
|
-
// }
|
82
|
-
// },
|
78
|
+
|
83
79
|
refreshList (tmpKey, condition) {
|
84
80
|
// 更新条件映射
|
85
81
|
this.$set(this.conditionsMap, tmpKey, condition)
|
86
|
-
// 调用子组件刷新
|
87
|
-
this.questionnaireItemRefs.get(tmpKey)?.refreshList(condition)
|
82
|
+
// // 调用子组件刷新
|
83
|
+
// this.questionnaireItemRefs.get(tmpKey)?.refreshList(condition)
|
88
84
|
},
|
89
85
|
},
|
90
86
|
}
|
@@ -111,38 +111,34 @@ export default {
|
|
111
111
|
// 获取配置
|
112
112
|
async getData (config, param) {
|
113
113
|
const that = this
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
114
|
+
that.config = { ...that.config, ...config }
|
115
|
+
console.log(param)
|
116
|
+
runLogic(config.data, param, 'af-his').then(res => {
|
117
|
+
that.data = res || []
|
118
|
+
that.results = {}
|
119
|
+
// 将又返回值的数据创建到results
|
120
|
+
for (let i = 0; i < res.length; i++) {
|
121
|
+
const fields = res[i]
|
122
|
+
if (!fields.columns) {
|
123
|
+
continue
|
124
|
+
}
|
125
|
+
console.log('2', fields)
|
126
|
+
for (let j = 0; j < fields.columns.length; j++) {
|
127
|
+
const field = fields.columns[j]
|
128
|
+
console.log('3', field)
|
129
|
+
if (this.results[field.config_id]) {
|
130
|
+
console.error(`Config_id 冲突: ${field.config_id} 重复,同一个模板中不能有形同的配置项`)
|
131
|
+
return
|
126
132
|
}
|
127
|
-
|
128
|
-
|
129
|
-
const field = fields.columns[j]
|
130
|
-
console.log('3', field)
|
131
|
-
if (this.results[field.config_id]) {
|
132
|
-
console.error(`Config_id 冲突: ${field.config_id} 重复,同一个模板中不能有形同的配置项`)
|
133
|
-
return
|
134
|
-
}
|
135
|
-
if (field.type === 'selectionBox' || field.type === 'input' || field.type === 'radio' || field.type === 'time') {
|
136
|
-
this.results[field.config_id] = { value: field.value, data_id: field.data_id }
|
137
|
-
}
|
138
|
-
console.log(this.results)
|
133
|
+
if (field.type === 'selectionBox' || field.type === 'input' || field.type === 'radio' || field.type === 'time') {
|
134
|
+
this.results[field.config_id] = { value: field.value, data_id: field.data_id }
|
139
135
|
}
|
136
|
+
console.log(this.results)
|
140
137
|
}
|
141
|
-
}
|
138
|
+
}
|
139
|
+
})
|
142
140
|
},
|
143
141
|
refreshList (param) {
|
144
|
-
this.data = []
|
145
|
-
this.results = {}
|
146
142
|
this.getData(this.queryParamsName, param)
|
147
143
|
},
|
148
144
|
// 行数据排量方式
|
@@ -190,26 +186,6 @@ export default {
|
|
190
186
|
.list-container {
|
191
187
|
width: 100%;
|
192
188
|
}
|
193
|
-
|
194
|
-
/** 自定义滚动条样式
|
195
|
-
.list-wrapper {
|
196
|
-
max-height: 240px;
|
197
|
-
overflow-y: auto;
|
198
|
-
padding-right: 2px;
|
199
|
-
}
|
200
|
-
.list-wrapper::-webkit-scrollbar {
|
201
|
-
width: 6px;
|
202
|
-
}
|
203
|
-
|
204
|
-
.list-wrapper::-webkit-scrollbar-thumb {
|
205
|
-
background-color: #d9d9d9;
|
206
|
-
border-radius: 3px;
|
207
|
-
}
|
208
|
-
|
209
|
-
.list-wrapper::-webkit-scrollbar-track {
|
210
|
-
background-color: #f0f0f0;
|
211
|
-
}
|
212
|
-
*/
|
213
189
|
/* header样式 */
|
214
190
|
.list-wrapper ::v-deep .ant-list-header {
|
215
191
|
background-color: #F4F4F4; /* 自定义背景色 */
|
@@ -1,88 +1,88 @@
|
|
1
|
-
<template>
|
2
|
-
<a-row
|
3
|
-
type="flex"
|
4
|
-
:gutter="row.gutter || 0"
|
5
|
-
:align="row.align || 'top'"
|
6
|
-
:justify="row.justify || 'start'"
|
7
|
-
>
|
8
|
-
<a-col
|
9
|
-
v-for="col in getColumns"
|
10
|
-
:key="`page-col-${col.id}`"
|
11
|
-
:span="col.span || 24"
|
12
|
-
:xs="col.xs"
|
13
|
-
:sm="col.sm"
|
14
|
-
:md="col.md"
|
15
|
-
:lg="col.lg"
|
16
|
-
:xl="col.xl"
|
17
|
-
:xxl="col.xxl"
|
18
|
-
>
|
19
|
-
<!-- 行类型,递归渲染子行 -->
|
20
|
-
<template v-if="col.type === 'row'">
|
21
|
-
<x-page-row-template :template="col.template">
|
22
|
-
<render-row
|
23
|
-
v-for="(nestedRow, index) in col.children"
|
24
|
-
:row="nestedRow"
|
25
|
-
:key="`nested-row-${col.id}-${index}`"
|
26
|
-
/>
|
27
|
-
</x-page-row-template>
|
28
|
-
</template>
|
29
|
-
|
30
|
-
<!-- 组件类型,渲染动态组件 -->
|
31
|
-
<template v-else>
|
32
|
-
<x-page-row-template :template="col.template">
|
33
|
-
<component
|
34
|
-
:ref="(el) => registerComponentRef(col.id, el)"
|
35
|
-
:is="resolveComponentType(col.type)"
|
36
|
-
v-bind="col.props"
|
37
|
-
>
|
38
|
-
<!-- 如果组件有子组件,递归渲染子行 -->
|
39
|
-
<template v-if="col.children && col.children.length">
|
40
|
-
<!-- 处理纯文本节点 -->
|
41
|
-
<template v-for="(nestedItem, index) in col.children">
|
42
|
-
<template v-if="nestedItem.text">{{ nestedItem.text }}</template>
|
43
|
-
<render-row
|
44
|
-
v-else
|
45
|
-
:row="nestedItem"
|
46
|
-
:key="`comp-child-${col.id}-${index}`"
|
47
|
-
/>
|
48
|
-
</template>
|
49
|
-
</template>
|
50
|
-
</component>
|
51
|
-
</x-page-row-template>
|
52
|
-
</template>
|
53
|
-
</a-col>
|
54
|
-
</a-row>
|
55
|
-
</template>
|
56
|
-
|
57
|
-
<script setup>
|
58
|
-
import { defineProps, inject, computed } from 'vue'
|
59
|
-
import XPageRowTemplate from './XPageRowTemplate.vue'
|
60
|
-
|
61
|
-
import { resolveComponentType } from './componentTypes'
|
62
|
-
|
63
|
-
// 注入注册组件方法
|
64
|
-
const registerComponent = inject('registerComponent')
|
65
|
-
|
66
|
-
// 定义属性
|
67
|
-
const props = defineProps({
|
68
|
-
row: {
|
69
|
-
type: Object,
|
70
|
-
required: true
|
71
|
-
}
|
72
|
-
})
|
73
|
-
|
74
|
-
// 获取列数组
|
75
|
-
const getColumns = computed(() => {
|
76
|
-
return props.row.type === 'row' ? props.row.children : [props.row]
|
77
|
-
})
|
78
|
-
|
79
|
-
// 注册组件引用
|
80
|
-
const registerComponentRef = (id, el) => {
|
81
|
-
if (el) {
|
82
|
-
registerComponent(id, el)
|
83
|
-
}
|
84
|
-
}
|
85
|
-
</script>
|
86
|
-
|
87
|
-
<style scoped lang="less">
|
88
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<a-row
|
3
|
+
type="flex"
|
4
|
+
:gutter="row.gutter || 0"
|
5
|
+
:align="row.align || 'top'"
|
6
|
+
:justify="row.justify || 'start'"
|
7
|
+
>
|
8
|
+
<a-col
|
9
|
+
v-for="col in getColumns"
|
10
|
+
:key="`page-col-${col.id}`"
|
11
|
+
:span="col.span || 24"
|
12
|
+
:xs="col.xs"
|
13
|
+
:sm="col.sm"
|
14
|
+
:md="col.md"
|
15
|
+
:lg="col.lg"
|
16
|
+
:xl="col.xl"
|
17
|
+
:xxl="col.xxl"
|
18
|
+
>
|
19
|
+
<!-- 行类型,递归渲染子行 -->
|
20
|
+
<template v-if="col.type === 'row'">
|
21
|
+
<x-page-row-template :template="col.template">
|
22
|
+
<render-row
|
23
|
+
v-for="(nestedRow, index) in col.children"
|
24
|
+
:row="nestedRow"
|
25
|
+
:key="`nested-row-${col.id}-${index}`"
|
26
|
+
/>
|
27
|
+
</x-page-row-template>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
<!-- 组件类型,渲染动态组件 -->
|
31
|
+
<template v-else>
|
32
|
+
<x-page-row-template :template="col.template">
|
33
|
+
<component
|
34
|
+
:ref="(el) => registerComponentRef(col.id, el)"
|
35
|
+
:is="resolveComponentType(col.type)"
|
36
|
+
v-bind="col.props"
|
37
|
+
>
|
38
|
+
<!-- 如果组件有子组件,递归渲染子行 -->
|
39
|
+
<template v-if="col.children && col.children.length">
|
40
|
+
<!-- 处理纯文本节点 -->
|
41
|
+
<template v-for="(nestedItem, index) in col.children">
|
42
|
+
<template v-if="nestedItem.text">{{ nestedItem.text }}</template>
|
43
|
+
<render-row
|
44
|
+
v-else
|
45
|
+
:row="nestedItem"
|
46
|
+
:key="`comp-child-${col.id}-${index}`"
|
47
|
+
/>
|
48
|
+
</template>
|
49
|
+
</template>
|
50
|
+
</component>
|
51
|
+
</x-page-row-template>
|
52
|
+
</template>
|
53
|
+
</a-col>
|
54
|
+
</a-row>
|
55
|
+
</template>
|
56
|
+
|
57
|
+
<script setup>
|
58
|
+
import { defineProps, inject, computed } from 'vue'
|
59
|
+
import XPageRowTemplate from './XPageRowTemplate.vue'
|
60
|
+
|
61
|
+
import { resolveComponentType } from './componentTypes'
|
62
|
+
|
63
|
+
// 注入注册组件方法
|
64
|
+
const registerComponent = inject('registerComponent')
|
65
|
+
|
66
|
+
// 定义属性
|
67
|
+
const props = defineProps({
|
68
|
+
row: {
|
69
|
+
type: Object,
|
70
|
+
required: true
|
71
|
+
}
|
72
|
+
})
|
73
|
+
|
74
|
+
// 获取列数组
|
75
|
+
const getColumns = computed(() => {
|
76
|
+
return props.row.type === 'row' ? props.row.children : [props.row]
|
77
|
+
})
|
78
|
+
|
79
|
+
// 注册组件引用
|
80
|
+
const registerComponentRef = (id, el) => {
|
81
|
+
if (el) {
|
82
|
+
registerComponent(id, el)
|
83
|
+
}
|
84
|
+
}
|
85
|
+
</script>
|
86
|
+
|
87
|
+
<style scoped lang="less">
|
88
|
+
</style>
|