vue2-client 1.14.82 → 1.14.83
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/.history/public/his/editor/editor_20250606134713.html +51 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527173925.vue +509 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174316.vue +524 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174419.vue +524 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174422.vue +524 -0
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172825.vue +207 -0
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172945.vue +211 -0
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172949.vue +212 -0
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611173010.vue +212 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250508134122.vue +1320 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171604.vue +1332 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171613.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171703.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171720.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527174327.vue +1339 -0
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612092804.vue +731 -0
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612112546.vue +748 -0
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612113808.vue +748 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115237.vue +1071 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115346.vue +1078 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115350.vue +1077 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115415.vue +1077 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115429.vue +1077 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611091619.vue +442 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092547.vue +442 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092552.vue +442 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092744.vue +475 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092955.vue +475 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092957.vue +475 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095652.vue +477 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095701.vue +477 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095704.vue +477 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100005.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100011.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100014.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100833.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100853.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100940.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101011.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101013.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101014.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101159.vue +473 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101238.vue +474 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101240.vue +474 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101242.vue +474 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101404.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101410.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101459.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101500.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101502.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101504.vue +472 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101610.vue +501 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101700.vue +501 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101702.vue +501 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101741.vue +504 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101749.vue +504 -0
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101759.vue +504 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611091349.vue +131 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105854.vue +160 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105902.vue +160 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105924.vue +160 -0
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105932.vue +158 -0
- package/.history/src/base-client/components/his/XList/XList_20250609135848.vue +173 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141026.vue +222 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141035.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141103.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141105.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141334.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141404.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141406.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141801.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142033.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142038.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142435.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142503.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142504.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143012.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143044.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143046.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143210.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144339.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144410.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144412.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144647.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144716.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144729.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151232.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151247.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151252.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161220.vue +317 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161258.vue +306 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161319.vue +306 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161320.vue +306 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250609151519.vue +222 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +206 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +209 -0
- package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +36 -0
- package/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +1 -0
- package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +4 -2
- package/package.json +1 -1
- package/src/base-client/components/TreeList/TreeList.vue +91 -0
- package/src/base-client/components/TreeList/TreeNode.vue +81 -0
- package/src/base-client/components/common/XCardSet/XTiltle.vue +191 -0
- package/src/base-client/components/common/XUploadFilesView/index.vue +485 -485
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.vue +13 -236
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireDemo.vue +3 -14
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireItem.vue +280 -0
- package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +32 -45
- package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
- package/src/base-client/components/his/XTreeRows/TreeNode.vue +100 -100
- package/src/base-client/components/his/XTreeRows/XTreeRows.vue +197 -197
- package/src/base-client/components/his/threeTestOrders/editor.vue +111 -111
- package/src/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue +388 -388
- package/src/router/async/router.map.js +3 -1
|
@@ -1,79 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="list-
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class="list-container"
|
|
7
|
-
ref="listRef"
|
|
8
|
-
split="config.split"
|
|
9
|
-
>
|
|
10
|
-
<template v-if="config.header" #header>
|
|
11
|
-
<div >{{ config.header }}</div>
|
|
12
|
-
</template>
|
|
13
|
-
<a-list-item
|
|
14
|
-
:class="{'header-row': item.type === 'header'}"
|
|
15
|
-
slot="renderItem"
|
|
16
|
-
slot-scope="item, index">
|
|
17
|
-
<div
|
|
18
|
-
class="row-item"
|
|
19
|
-
:style="{ justifyContent: getFlexJustify(item.style) }"
|
|
20
|
-
>
|
|
21
|
-
<template v-for="(column, idx) in item.item">
|
|
22
|
-
<template v-if="column.type === 'selectionBox'">
|
|
23
|
-
<a-checkbox @change="handleChange($event,column,index)" v-model="column.value" :key="`row-${index}-item-${idx}`" :class="['column-item']"></a-checkbox>
|
|
24
|
-
</template>
|
|
25
|
-
<template v-else-if="column.type === 'input'">
|
|
26
|
-
<a-input @change="handleChange($event,column,index)" :key="`row-${index}-item-${idx}`" :class="['column-item','item-input']" v-model="column.value" />
|
|
27
|
-
</template>
|
|
28
|
-
<template v-else-if="column.type === 'radio'">
|
|
29
|
-
<x-radio
|
|
30
|
-
:class="['column-item']"
|
|
31
|
-
:key="`row-${index}-item-${idx}`"
|
|
32
|
-
:queryParamsName="column.configName"
|
|
33
|
-
@change="handleChange($event,column,index)">
|
|
34
|
-
</x-radio>
|
|
35
|
-
</template>
|
|
36
|
-
<template v-else-if="column.type === 'time'">
|
|
37
|
-
<x-time-select :key="`row-${index}-item-${idx}`" :class="['column-item']" @change="handleChange($event,column,index)" :queryParamsName="column.configName">
|
|
38
|
-
</x-time-select>
|
|
39
|
-
</template>
|
|
40
|
-
<template v-else-if="column.type === 'text'">
|
|
41
|
-
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-text']"> {{ column.value }} </span>
|
|
42
|
-
</template>
|
|
43
|
-
<template v-else-if="column.type === 'describe'">
|
|
44
|
-
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-describe']"> {{ column.value }} </span>
|
|
45
|
-
</template>
|
|
46
|
-
<template v-else-if="column.type === 'header'">
|
|
47
|
-
<span :key="`row-${index}-item-${idx}`" :class="['item-header']"> {{ column.value }} </span>
|
|
48
|
-
</template>
|
|
49
|
-
<template v-else-if="column.type === 'button'">
|
|
50
|
-
<a-button
|
|
51
|
-
:class="['column-item']"
|
|
52
|
-
:key="`row-${index}-item-${idx}`"
|
|
53
|
-
:disabled="column.disabled"
|
|
54
|
-
:icon="column.icon"
|
|
55
|
-
:loading="column.loading"
|
|
56
|
-
:type="column.buttonType || 'default'"
|
|
57
|
-
@click="handleButtonClick(column)"
|
|
58
|
-
>
|
|
59
|
-
{{ column.label }}
|
|
60
|
-
</a-button>
|
|
61
|
-
</template>
|
|
62
|
-
<template v-else>
|
|
63
|
-
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-text']"> {{ column.value }} </span>
|
|
64
|
-
</template>
|
|
65
|
-
</template>
|
|
66
|
-
</div>
|
|
67
|
-
</a-list-item>
|
|
68
|
-
</a-list>
|
|
2
|
+
<div class="list-container" style="display: flex;">
|
|
3
|
+
<template v-for="(config, index) in configs">
|
|
4
|
+
<x-questionnaire-item :queryParamsName="config" :ref="el => setItemRef(el, index)" :key="`questionnaire-${index}`"></x-questionnaire-item>
|
|
5
|
+
</template>
|
|
69
6
|
</div>
|
|
70
7
|
</template>
|
|
71
8
|
|
|
72
9
|
<script>
|
|
73
10
|
|
|
74
11
|
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
75
|
-
import
|
|
76
|
-
|
|
12
|
+
import XQuestionnaireItem from './XQuestionnaireItem.vue'
|
|
13
|
+
|
|
77
14
|
export default {
|
|
78
15
|
name: 'XQuestionnaire',
|
|
79
16
|
props: {
|
|
@@ -84,18 +21,12 @@ export default {
|
|
|
84
21
|
},
|
|
85
22
|
inject: ['getComponentByName'],
|
|
86
23
|
components: {
|
|
87
|
-
|
|
88
|
-
XRadio
|
|
24
|
+
XQuestionnaireItem
|
|
89
25
|
},
|
|
90
26
|
data () {
|
|
91
27
|
return {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
split: true,
|
|
95
|
-
header: null
|
|
96
|
-
},
|
|
97
|
-
results: [],
|
|
98
|
-
mapping: [] // 行索引 results数据所在的行
|
|
28
|
+
configs: [],
|
|
29
|
+
questionnaireItemRefs: [] // 存储子组件实例
|
|
99
30
|
}
|
|
100
31
|
},
|
|
101
32
|
created () {
|
|
@@ -106,170 +37,16 @@ export default {
|
|
|
106
37
|
async getData (queryParamsName) {
|
|
107
38
|
const that = this
|
|
108
39
|
getConfigByName(queryParamsName, 'af-his', res => {
|
|
109
|
-
that.
|
|
110
|
-
...that.config,
|
|
111
|
-
...res.config
|
|
112
|
-
}
|
|
113
|
-
that.data = res.content || []
|
|
114
|
-
// 将又返回值的数据创建到results
|
|
115
|
-
for (let i = 0; i < res.content.length; i++) {
|
|
116
|
-
const fields = res.content[i]
|
|
117
|
-
if (!fields.item) {
|
|
118
|
-
continue
|
|
119
|
-
}
|
|
120
|
-
const value = {}
|
|
121
|
-
let hasValidData = false // 标识是否有有效数据
|
|
122
|
-
for (let j = 0; j < fields.item.length; j++) {
|
|
123
|
-
const field = fields.item[j]
|
|
124
|
-
if (field.type === 'selectionBox' || field.type === 'input' || field.type === 'radio' || field.type === 'time') {
|
|
125
|
-
value[field.key] = field.value
|
|
126
|
-
hasValidData = true
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if (hasValidData) {
|
|
130
|
-
this.mapping.push(this.results.length)
|
|
131
|
-
value.row_key = fields.key
|
|
132
|
-
this.results.push(value)
|
|
133
|
-
} else {
|
|
134
|
-
this.mapping.push(undefined)
|
|
135
|
-
}
|
|
136
|
-
}
|
|
40
|
+
that.configs = res.configs || []
|
|
137
41
|
})
|
|
138
42
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this.results = []
|
|
143
|
-
this.mapping = []
|
|
144
|
-
this.results = []
|
|
145
|
-
this.getData(this.queryParamsName, param)
|
|
146
|
-
},
|
|
147
|
-
// 行数据排量方式
|
|
148
|
-
getFlexJustify (style) {
|
|
149
|
-
const validStyles = [
|
|
150
|
-
'flex-start', 'flex-end', 'center',
|
|
151
|
-
'space-between', 'space-around'
|
|
152
|
-
]
|
|
153
|
-
return validStyles.includes(style) ? style : 'flex-start'
|
|
154
|
-
},
|
|
155
|
-
// 数据发生改变--将修改后的值填充到results
|
|
156
|
-
handleChange (e, column, rowIndex) {
|
|
157
|
-
const resultIndex = this.mapping[rowIndex]
|
|
158
|
-
if (resultIndex === undefined) return
|
|
159
|
-
if (column.type === 'selectionBox') {
|
|
160
|
-
this.results[resultIndex][column.key] = e.target.checked
|
|
161
|
-
} else if (column.type === 'input') {
|
|
162
|
-
this.results[resultIndex][column.key] = column.value
|
|
163
|
-
} else if (column.type === 'radio' || column.type === 'time') {
|
|
164
|
-
this.results[resultIndex][column.key] = e
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
handleButtonClick (item) {
|
|
168
|
-
item.loading = true
|
|
169
|
-
const callback = () => {
|
|
170
|
-
item.loading = false
|
|
171
|
-
}
|
|
172
|
-
if (item.clickEventName && this.$listeners[item.clickEventName]) {
|
|
173
|
-
// 交由父级处理
|
|
174
|
-
this.$emit(item.clickEventName, item, callback)
|
|
175
|
-
} else {
|
|
176
|
-
this.defaultAction(item.clickEventName, item, callback)
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
defaultAction (clickEventName, item, callback) {
|
|
180
|
-
setTimeout(() => {
|
|
181
|
-
this.$message.warn(`已触发按钮 [${item.key}],注册事件名 [${clickEventName}],未实现事件函数`)
|
|
182
|
-
callback()
|
|
183
|
-
}, 200)
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
watch: {
|
|
187
|
-
fixedQueryForm: {
|
|
188
|
-
deep: true,
|
|
189
|
-
handler (val) {
|
|
190
|
-
this.refreshList(val)
|
|
43
|
+
setItemRef (el, index) {
|
|
44
|
+
if (el) {
|
|
45
|
+
this.questionnaireItemRefs[index] = el // 保存实例
|
|
191
46
|
}
|
|
192
47
|
}
|
|
193
48
|
},
|
|
194
|
-
beforeDestroy () {
|
|
195
|
-
this.clearAllTimers()
|
|
196
|
-
}
|
|
197
49
|
}
|
|
198
50
|
</script>
|
|
199
|
-
|
|
200
51
|
<style scoped>
|
|
201
|
-
|
|
202
|
-
.list-wrapper {
|
|
203
|
-
border: 1px solid #f0f0f0;
|
|
204
|
-
}
|
|
205
|
-
.list-container {
|
|
206
|
-
width: 100%;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/** 自定义滚动条样式
|
|
210
|
-
.list-wrapper {
|
|
211
|
-
max-height: 240px;
|
|
212
|
-
overflow-y: auto;
|
|
213
|
-
padding-right: 2px;
|
|
214
|
-
}
|
|
215
|
-
.list-wrapper::-webkit-scrollbar {
|
|
216
|
-
width: 6px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.list-wrapper::-webkit-scrollbar-thumb {
|
|
220
|
-
background-color: #d9d9d9;
|
|
221
|
-
border-radius: 3px;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.list-wrapper::-webkit-scrollbar-track {
|
|
225
|
-
background-color: #f0f0f0;
|
|
226
|
-
}
|
|
227
|
-
*/
|
|
228
|
-
/* header样式 */
|
|
229
|
-
.list-wrapper ::v-deep .ant-list-header {
|
|
230
|
-
background-color: #F4F4F4; /* 自定义背景色 */
|
|
231
|
-
display: flex;
|
|
232
|
-
justify-content: center;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.list-wrapper ::v-deep .x-radio-item {
|
|
236
|
-
margin-bottom: 0;
|
|
237
|
-
}
|
|
238
|
-
.list-wrapper ::v-deep .x-radio-item-container{
|
|
239
|
-
padding: 0;
|
|
240
|
-
}
|
|
241
|
-
.list-wrapper ::v-deep span.ant-radio + *{
|
|
242
|
-
padding: 0;
|
|
243
|
-
}
|
|
244
|
-
.list-wrapper ::v-deep .x-time-select {
|
|
245
|
-
width: auto !important;
|
|
246
|
-
}
|
|
247
|
-
.list-wrapper ::v-deep .header-row {
|
|
248
|
-
background-color: #F4F4F4; /* 自定义背景色 */
|
|
249
|
-
height: 45px !important;
|
|
250
|
-
}
|
|
251
|
-
/*每一行的整体样式*/
|
|
252
|
-
.row-item{
|
|
253
|
-
width: 100%;
|
|
254
|
-
display: flex;
|
|
255
|
-
align-items: center;
|
|
256
|
-
padding: 2px;
|
|
257
|
-
}
|
|
258
|
-
/*行中每一列的数据*/
|
|
259
|
-
.column-item{
|
|
260
|
-
margin-left: 10px;
|
|
261
|
-
}
|
|
262
|
-
.item-text {
|
|
263
|
-
color: black;
|
|
264
|
-
}
|
|
265
|
-
.item-describe {
|
|
266
|
-
color: #808080 ;
|
|
267
|
-
}
|
|
268
|
-
.item-input{
|
|
269
|
-
width: auto !important;
|
|
270
|
-
}
|
|
271
|
-
.item-header {
|
|
272
|
-
color: rgba(0, 0, 0, 0.65)
|
|
273
|
-
}
|
|
274
|
-
|
|
275
52
|
</style>
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import XQuestionnaire from './XQuestionnaire.vue'
|
|
3
|
-
import XRadio from '../XRadio/XRadio.vue'
|
|
4
3
|
export default {
|
|
5
|
-
name: '
|
|
4
|
+
name: 'XList2Demo',
|
|
6
5
|
components: {
|
|
7
6
|
XQuestionnaire,
|
|
8
|
-
XRadio
|
|
9
7
|
},
|
|
10
8
|
data () {
|
|
11
9
|
return {
|
|
12
|
-
|
|
13
|
-
queryParamsName3: 'surgeryRiskAssessConfig3',
|
|
14
|
-
queryParamsName4: 'surgeryRiskAssessConfig4'
|
|
10
|
+
queryParamsName: 'surgeryRiskAssessConfig'
|
|
15
11
|
}
|
|
16
12
|
}
|
|
17
13
|
}
|
|
@@ -19,14 +15,7 @@ export default {
|
|
|
19
15
|
|
|
20
16
|
<template>
|
|
21
17
|
<div style="display: flex">
|
|
22
|
-
|
|
23
|
-
<x-questionnaire :queryParamsName="queryParamsName2">
|
|
24
|
-
</x-questionnaire>
|
|
25
|
-
|
|
26
|
-
<x-questionnaire :queryParamsName="queryParamsName3">
|
|
27
|
-
</x-questionnaire>
|
|
28
|
-
|
|
29
|
-
<x-questionnaire :queryParamsName="queryParamsName4">
|
|
18
|
+
<x-questionnaire :queryParamsName="queryParamsName">
|
|
30
19
|
</x-questionnaire>
|
|
31
20
|
</div>
|
|
32
21
|
</template>
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="list-wrapper">
|
|
3
|
+
<a-list size="large"
|
|
4
|
+
:data-source="data"
|
|
5
|
+
itemLayout="horizontal"
|
|
6
|
+
class="list-container"
|
|
7
|
+
ref="listRef"
|
|
8
|
+
split="config.split"
|
|
9
|
+
>
|
|
10
|
+
<template v-if="config.header" #header>
|
|
11
|
+
<div >{{ config.header }}</div>
|
|
12
|
+
</template>
|
|
13
|
+
<a-list-item
|
|
14
|
+
:class="{'header-row': item.type === 'header'}"
|
|
15
|
+
slot="renderItem"
|
|
16
|
+
slot-scope="item, index">
|
|
17
|
+
<div
|
|
18
|
+
class="row-item"
|
|
19
|
+
:style="{ justifyContent: getFlexJustify(item.style) }"
|
|
20
|
+
>
|
|
21
|
+
<template v-for="(column, idx) in item.item">
|
|
22
|
+
<template v-if="column.type === 'selectionBox'">
|
|
23
|
+
<a-checkbox @change="handleChange($event,column,index)" v-model="column.value" :key="`row-${index}-item-${idx}`" :class="['column-item']"></a-checkbox>
|
|
24
|
+
</template>
|
|
25
|
+
<template v-else-if="column.type === 'input'">
|
|
26
|
+
<a-input @change="handleChange($event,column,index)" :key="`row-${index}-item-${idx}`" :class="['column-item','item-input']" v-model="column.value" />
|
|
27
|
+
</template>
|
|
28
|
+
<template v-else-if="column.type === 'radio'">
|
|
29
|
+
<x-radio
|
|
30
|
+
:class="['column-item']"
|
|
31
|
+
:key="`row-${index}-item-${idx}`"
|
|
32
|
+
:queryParamsName="column.configName"
|
|
33
|
+
@change="handleChange($event,column,index)">
|
|
34
|
+
</x-radio>
|
|
35
|
+
</template>
|
|
36
|
+
<template v-else-if="column.type === 'time'">
|
|
37
|
+
<x-time-select :key="`row-${index}-item-${idx}`" :class="['column-item']" @change="handleChange($event,column,index)" :queryParamsName="column.configName">
|
|
38
|
+
</x-time-select>
|
|
39
|
+
</template>
|
|
40
|
+
<template v-else-if="column.type === 'text'">
|
|
41
|
+
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-text']"> {{ column.value }} </span>
|
|
42
|
+
</template>
|
|
43
|
+
<template v-else-if="column.type === 'describe'">
|
|
44
|
+
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-describe']"> {{ column.value }} </span>
|
|
45
|
+
</template>
|
|
46
|
+
<template v-else-if="column.type === 'header'">
|
|
47
|
+
<span :key="`row-${index}-item-${idx}`" :class="['item-header']"> {{ column.value }} </span>
|
|
48
|
+
</template>
|
|
49
|
+
<template v-else-if="column.type === 'button'">
|
|
50
|
+
<a-button
|
|
51
|
+
:class="['column-item']"
|
|
52
|
+
:key="`row-${index}-item-${idx}`"
|
|
53
|
+
:disabled="column.disabled"
|
|
54
|
+
:icon="column.icon"
|
|
55
|
+
:loading="column.loading"
|
|
56
|
+
:type="column.buttonType || 'default'"
|
|
57
|
+
@click="handleButtonClick(column)"
|
|
58
|
+
>
|
|
59
|
+
{{ column.label }}
|
|
60
|
+
</a-button>
|
|
61
|
+
</template>
|
|
62
|
+
<template v-else>
|
|
63
|
+
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-text']"> {{ column.value }} </span>
|
|
64
|
+
</template>
|
|
65
|
+
</template>
|
|
66
|
+
</div>
|
|
67
|
+
</a-list-item>
|
|
68
|
+
</a-list>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script>
|
|
73
|
+
|
|
74
|
+
import { runLogic } from '@vue2-client/services/api/common'
|
|
75
|
+
import XRadio from '@vue2-client/base-client/components/his/XRadio/XRadio'
|
|
76
|
+
import XTimeSelect from '@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect'
|
|
77
|
+
export default {
|
|
78
|
+
name: 'XQuestionnaireItem',
|
|
79
|
+
props: {
|
|
80
|
+
queryParamsName: {
|
|
81
|
+
type: Object,
|
|
82
|
+
default: null
|
|
83
|
+
},
|
|
84
|
+
fixedQueryForm: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default: { condition: '1=1' }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
inject: ['getComponentByName'],
|
|
90
|
+
components: {
|
|
91
|
+
XTimeSelect,
|
|
92
|
+
XRadio
|
|
93
|
+
},
|
|
94
|
+
data () {
|
|
95
|
+
return {
|
|
96
|
+
data: [],
|
|
97
|
+
config: {
|
|
98
|
+
split: true,
|
|
99
|
+
header: null
|
|
100
|
+
},
|
|
101
|
+
results: [],
|
|
102
|
+
mapping: [] // 行索引 results数据所在的行
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
created () {
|
|
106
|
+
console.log('queryParamsName', this.queryParamsName)
|
|
107
|
+
this.getData(this.queryParamsName, this.fixedQueryForm)
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
// 获取配置
|
|
111
|
+
async getData (config, param) {
|
|
112
|
+
const that = this
|
|
113
|
+
that.config = {
|
|
114
|
+
...that.config,
|
|
115
|
+
...config
|
|
116
|
+
}
|
|
117
|
+
runLogic(config.data, param, 'af-his').then(res => {
|
|
118
|
+
that.data = res || []
|
|
119
|
+
// 将又返回值的数据创建到results
|
|
120
|
+
for (let i = 0; i < res.length; i++) {
|
|
121
|
+
const fields = res[i]
|
|
122
|
+
if (!fields.item) {
|
|
123
|
+
continue
|
|
124
|
+
}
|
|
125
|
+
const value = {}
|
|
126
|
+
let hasValidData = false // 标识是否有有效数据
|
|
127
|
+
for (let j = 0; j < fields.item.length; j++) {
|
|
128
|
+
const field = fields.item[j]
|
|
129
|
+
if (field.type === 'selectionBox' || field.type === 'input' || field.type === 'radio' || field.type === 'time') {
|
|
130
|
+
value[field.key] = field.value
|
|
131
|
+
hasValidData = true
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (hasValidData) {
|
|
135
|
+
this.mapping.push(this.results.length)
|
|
136
|
+
value.row_key = fields.key
|
|
137
|
+
this.results.push(value)
|
|
138
|
+
} else {
|
|
139
|
+
this.mapping.push(undefined)
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
},
|
|
144
|
+
refreshList (param) {
|
|
145
|
+
// 清空当前数据和映射关系
|
|
146
|
+
this.data = []
|
|
147
|
+
this.results = []
|
|
148
|
+
this.mapping = []
|
|
149
|
+
this.results = []
|
|
150
|
+
this.getData(this.queryParamsName, param)
|
|
151
|
+
},
|
|
152
|
+
// 行数据排量方式
|
|
153
|
+
getFlexJustify (style) {
|
|
154
|
+
const validStyles = [
|
|
155
|
+
'flex-start', 'flex-end', 'center',
|
|
156
|
+
'space-between', 'space-around'
|
|
157
|
+
]
|
|
158
|
+
return validStyles.includes(style) ? style : 'flex-start'
|
|
159
|
+
},
|
|
160
|
+
// 数据发生改变--将修改后的值填充到results
|
|
161
|
+
handleChange (e, column, rowIndex) {
|
|
162
|
+
const resultIndex = this.mapping[rowIndex]
|
|
163
|
+
if (resultIndex === undefined) return
|
|
164
|
+
if (column.type === 'selectionBox') {
|
|
165
|
+
this.results[resultIndex][column.key] = e.target.checked
|
|
166
|
+
} else if (column.type === 'input') {
|
|
167
|
+
this.results[resultIndex][column.key] = column.value
|
|
168
|
+
} else if (column.type === 'radio' || column.type === 'time') {
|
|
169
|
+
this.results[resultIndex][column.key] = e
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
handleButtonClick (item) {
|
|
173
|
+
item.loading = true
|
|
174
|
+
const callback = () => {
|
|
175
|
+
item.loading = false
|
|
176
|
+
}
|
|
177
|
+
if (item.clickEventName && this.$listeners[item.clickEventName]) {
|
|
178
|
+
// 交由父级处理
|
|
179
|
+
this.$emit(item.clickEventName, item, callback)
|
|
180
|
+
} else {
|
|
181
|
+
this.defaultAction(item.clickEventName, item, callback)
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
defaultAction (clickEventName, item, callback) {
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
this.$message.warn(`已触发按钮 [${item.key}],注册事件名 [${clickEventName}],未实现事件函数`)
|
|
187
|
+
callback()
|
|
188
|
+
}, 200)
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
watch: {
|
|
192
|
+
fixedQueryForm: {
|
|
193
|
+
deep: true,
|
|
194
|
+
handler (val) {
|
|
195
|
+
this.refreshList(val)
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
beforeDestroy () {
|
|
200
|
+
this.clearAllTimers()
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
</script>
|
|
204
|
+
|
|
205
|
+
<style scoped>
|
|
206
|
+
|
|
207
|
+
.list-wrapper {
|
|
208
|
+
border: 1px solid #f0f0f0;
|
|
209
|
+
}
|
|
210
|
+
.list-container {
|
|
211
|
+
width: 100%;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** 自定义滚动条样式
|
|
215
|
+
.list-wrapper {
|
|
216
|
+
max-height: 240px;
|
|
217
|
+
overflow-y: auto;
|
|
218
|
+
padding-right: 2px;
|
|
219
|
+
}
|
|
220
|
+
.list-wrapper::-webkit-scrollbar {
|
|
221
|
+
width: 6px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.list-wrapper::-webkit-scrollbar-thumb {
|
|
225
|
+
background-color: #d9d9d9;
|
|
226
|
+
border-radius: 3px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.list-wrapper::-webkit-scrollbar-track {
|
|
230
|
+
background-color: #f0f0f0;
|
|
231
|
+
}
|
|
232
|
+
*/
|
|
233
|
+
/* header样式 */
|
|
234
|
+
.list-wrapper ::v-deep .ant-list-header {
|
|
235
|
+
background-color: #F4F4F4; /* 自定义背景色 */
|
|
236
|
+
display: flex;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.list-wrapper ::v-deep .x-radio-item {
|
|
241
|
+
margin-bottom: 0;
|
|
242
|
+
}
|
|
243
|
+
.list-wrapper ::v-deep .x-radio-item-container{
|
|
244
|
+
padding: 0;
|
|
245
|
+
}
|
|
246
|
+
.list-wrapper ::v-deep span.ant-radio + *{
|
|
247
|
+
padding: 0;
|
|
248
|
+
}
|
|
249
|
+
.list-wrapper ::v-deep .x-time-select {
|
|
250
|
+
width: auto !important;
|
|
251
|
+
}
|
|
252
|
+
.list-wrapper ::v-deep .header-row {
|
|
253
|
+
background-color: #F4F4F4; /* 自定义背景色 */
|
|
254
|
+
height: 45px !important;
|
|
255
|
+
}
|
|
256
|
+
/*每一行的整体样式*/
|
|
257
|
+
.row-item{
|
|
258
|
+
width: 100%;
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
padding: 2px;
|
|
262
|
+
}
|
|
263
|
+
/*行中每一列的数据*/
|
|
264
|
+
.column-item{
|
|
265
|
+
margin-left: 10px;
|
|
266
|
+
}
|
|
267
|
+
.item-text {
|
|
268
|
+
color: black;
|
|
269
|
+
}
|
|
270
|
+
.item-describe {
|
|
271
|
+
color: #808080 ;
|
|
272
|
+
}
|
|
273
|
+
.item-input{
|
|
274
|
+
width: auto !important;
|
|
275
|
+
}
|
|
276
|
+
.item-header {
|
|
277
|
+
color: rgba(0, 0, 0, 0.65)
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
</style>
|
|
@@ -7,11 +7,16 @@
|
|
|
7
7
|
<span slot="time" class="time-title">
|
|
8
8
|
<span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
|
|
9
9
|
</span>
|
|
10
|
+
<a-button slot="lastWeek" icon="left" size="large" />
|
|
11
|
+
<div v-for="(item, index) in weekDays" :key="index" >
|
|
12
|
+
<span>{{item}}</span>
|
|
13
|
+
</div>
|
|
10
14
|
<template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
|
|
11
15
|
<div class="time-title" :key="day.key">
|
|
12
16
|
<a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
|
|
13
17
|
</div>
|
|
14
18
|
</template>
|
|
19
|
+
<a-button slot="nextWeek" icon="right" size="large" />
|
|
15
20
|
<template slot="sk_limit" slot-scope="text, record">
|
|
16
21
|
<a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
|
|
17
22
|
</template>
|
|
@@ -36,56 +41,38 @@ export default {
|
|
|
36
41
|
originalData: [],
|
|
37
42
|
// 配置参数
|
|
38
43
|
configData: {},
|
|
44
|
+
weekDays: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
|
|
45
|
+
const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
|
|
46
|
+
return { title, key }
|
|
47
|
+
})],
|
|
39
48
|
// 排班时间表
|
|
40
49
|
shiftTable: [
|
|
41
50
|
{
|
|
42
|
-
|
|
43
|
-
key: '
|
|
44
|
-
|
|
45
|
-
scopedSlots: { customRender: '
|
|
46
|
-
align: 'center'
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
title: '周二',
|
|
50
|
-
key: 'Tuesday',
|
|
51
|
-
dataIndex: 'Tuesday',
|
|
52
|
-
scopedSlots: { customRender: 'Tuesday' },
|
|
53
|
-
align: 'center'
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
title: '周三',
|
|
57
|
-
key: 'Wednesday',
|
|
58
|
-
dataIndex: 'Wednesday',
|
|
59
|
-
scopedSlots: { customRender: 'Wednesday' },
|
|
60
|
-
align: 'center'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: '周四',
|
|
64
|
-
key: 'Thursday',
|
|
65
|
-
dataIndex: 'Thursday',
|
|
66
|
-
scopedSlots: { customRender: 'Thursday' },
|
|
67
|
-
align: 'center'
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
title: '周五',
|
|
71
|
-
key: 'Friday',
|
|
72
|
-
dataIndex: 'Friday',
|
|
73
|
-
scopedSlots: { customRender: 'Friday' },
|
|
74
|
-
align: 'center'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
title: '周六',
|
|
78
|
-
key: 'Saturday',
|
|
79
|
-
dataIndex: 'Saturday',
|
|
80
|
-
scopedSlots: { customRender: 'Saturday' },
|
|
81
|
-
align: 'center'
|
|
51
|
+
dataIndex: 'lastWeek',
|
|
52
|
+
key: 'lastWeek',
|
|
53
|
+
slots: { title: 'lastWeek' },
|
|
54
|
+
scopedSlots: { customRender: 'lastWeekTitle' },
|
|
55
|
+
align: 'center',
|
|
56
|
+
width: 80
|
|
82
57
|
},
|
|
58
|
+
...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
|
|
59
|
+
const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
|
|
60
|
+
return {
|
|
61
|
+
title,
|
|
62
|
+
key,
|
|
63
|
+
dataIndex: key,
|
|
64
|
+
scopedSlots: { customRender: key },
|
|
65
|
+
slots: { title: key },
|
|
66
|
+
align: 'center'
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
83
69
|
{
|
|
84
|
-
|
|
85
|
-
key: '
|
|
86
|
-
|
|
87
|
-
scopedSlots: { customRender: '
|
|
88
|
-
align: 'center'
|
|
70
|
+
dataIndex: 'nextWeek',
|
|
71
|
+
key: 'nextWeek',
|
|
72
|
+
slots: { title: 'nextWeek' },
|
|
73
|
+
scopedSlots: { customRender: 'nextWeekTitle' },
|
|
74
|
+
align: 'center',
|
|
75
|
+
width: 80
|
|
89
76
|
},
|
|
90
77
|
{
|
|
91
78
|
title: '排班数',
|