vue2-client 1.16.91 → 1.16.94
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/base-client/components/common/HIS/HButtons/HButtons.vue +1 -0
- package/src/base-client/components/common/XDatePicker/index.vue +16 -4
- package/src/base-client/components/common/XForm/XFormItem.vue +2 -1
- package/src/base-client/components/common/XTable/XTableWrapper.vue +3 -2
- package/src/base-client/components/his/XImportExcelButton/XFrontImportExcel.vue +36 -11
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +3 -1
- package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +33 -3
package/package.json
CHANGED
|
@@ -40,6 +40,11 @@ export default {
|
|
|
40
40
|
type: Boolean,
|
|
41
41
|
default: false,
|
|
42
42
|
},
|
|
43
|
+
// 是否启用时间弹出到最外层
|
|
44
|
+
enablePopupToBody: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
43
48
|
getCalendarContainer: {
|
|
44
49
|
type: Function,
|
|
45
50
|
default: (triggerNode) => triggerNode.parentNode,
|
|
@@ -187,6 +192,9 @@ export default {
|
|
|
187
192
|
moment(value[1]).format(this.formatType),
|
|
188
193
|
]
|
|
189
194
|
},
|
|
195
|
+
getBodyContainer (triggerNode) {
|
|
196
|
+
return document.body
|
|
197
|
+
}
|
|
190
198
|
},
|
|
191
199
|
}
|
|
192
200
|
</script>
|
|
@@ -199,7 +207,8 @@ export default {
|
|
|
199
207
|
(attr?.queryType !== 'BETWEEN' || mode !== '查询')) ||
|
|
200
208
|
(['rangePicker'].includes(attr.type) && mode !== '查询')
|
|
201
209
|
"
|
|
202
|
-
:getCalendarContainer="getCalendarContainer"
|
|
210
|
+
:getCalendarContainer="enablePopupToBody? undefined :getCalendarContainer"
|
|
211
|
+
:getPopupContainer="enablePopupToBody? getBodyContainer : undefined"
|
|
203
212
|
v-model="localValue"
|
|
204
213
|
:disabled="disabled || readOnly"
|
|
205
214
|
style="width: 100%"
|
|
@@ -215,7 +224,8 @@ export default {
|
|
|
215
224
|
attr.type === 'monthPicker' ||
|
|
216
225
|
(attr.type === 'monthRangePicker' && mode !== '查询')
|
|
217
226
|
"
|
|
218
|
-
:getCalendarContainer="
|
|
227
|
+
:getCalendarContainer="enablePopupToBody? undefined :getCalendarContainer"
|
|
228
|
+
:getPopupContainer="enablePopupToBody? getBodyContainer : undefined"
|
|
219
229
|
v-model="localValue"
|
|
220
230
|
:disabled="disabled || readOnly"
|
|
221
231
|
:show-time="true"
|
|
@@ -229,7 +239,8 @@ export default {
|
|
|
229
239
|
attr.type === 'yearPicker' ||
|
|
230
240
|
(attr.type === 'yearRangePicker' && mode !== '查询')
|
|
231
241
|
"
|
|
232
|
-
:getCalendarContainer="
|
|
242
|
+
:getCalendarContainer="enablePopupToBody? undefined :getCalendarContainer"
|
|
243
|
+
:getPopupContainer="enablePopupToBody? getBodyContainer : undefined"
|
|
233
244
|
v-model="localValue"
|
|
234
245
|
:disabled="disabled || readOnly"
|
|
235
246
|
format="YYYY"
|
|
@@ -254,7 +265,8 @@ export default {
|
|
|
254
265
|
(attr.type === 'rangePicker' && mode === '查询') ||
|
|
255
266
|
['yearRangePicker', 'monthRangePicker'].includes(attr.type)
|
|
256
267
|
"
|
|
257
|
-
:getCalendarContainer="
|
|
268
|
+
:getCalendarContainer="enablePopupToBody? undefined :getCalendarContainer"
|
|
269
|
+
:getPopupContainer="enablePopupToBody? getBodyContainer : undefined"
|
|
258
270
|
v-model="localValue"
|
|
259
271
|
:disabled="disabled"
|
|
260
272
|
:placeholder="placeholder"
|
|
@@ -381,6 +381,7 @@
|
|
|
381
381
|
<XFormDatePicker
|
|
382
382
|
:attr="attr"
|
|
383
383
|
:mode="mode"
|
|
384
|
+
:enablePopupToBody="enablePopupToBody"
|
|
384
385
|
:getCalendarContainer="getPopupContainer"
|
|
385
386
|
:disabled="disabled"
|
|
386
387
|
:readOnly="readOnly"
|
|
@@ -1487,7 +1488,7 @@ export default {
|
|
|
1487
1488
|
},
|
|
1488
1489
|
getPopupContainer (triggerNode) {
|
|
1489
1490
|
// 行编辑模式特殊处理
|
|
1490
|
-
if (this.$vnode?.key.startsWith('editRow')) {
|
|
1491
|
+
if (typeof this.$vnode?.key === 'string' && this.$vnode.key.startsWith('editRow')) {
|
|
1491
1492
|
// 限制最多向上查找5层
|
|
1492
1493
|
let parent = triggerNode.parentNode
|
|
1493
1494
|
let depth = 0
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<span v-else-if="item.slotType === 'gotoUserDetail'" :key="'gotoUserDetail-' + c_index">
|
|
72
72
|
<a @click="tableContext.gotoUserDetail(item.dataIndex,text,record)">{{ text }}</a>
|
|
73
73
|
</span>
|
|
74
|
-
<span v-else-if="item.slotType
|
|
74
|
+
<span v-else-if="['ellipsis','fixed'].includes(item.slotType)" :key="'ellipsis-' + c_index">
|
|
75
75
|
<span>{{ text === '' ? '--' : text }}</span>
|
|
76
76
|
</span>
|
|
77
77
|
<span v-else-if="item.slotType === 'badge'" :key="'badge-' + c_index">
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
<span v-else-if="item.slotType === 'gotoUserDetail'" :key="'gotoUserDetail-' + c_index">
|
|
209
209
|
<a @click="tableContext.gotoUserDetail(item.dataIndex,text,record)">{{ text }}</a>
|
|
210
210
|
</span>
|
|
211
|
-
<span v-else-if="item.slotType
|
|
211
|
+
<span v-else-if="['ellipsis','fixed'].includes(item.slotType)" :key="'ellipsis-' + c_index">
|
|
212
212
|
<!-- <ellipsis :length="item.slotValue" tooltip>{{ text === '' ? '--' : text }}</ellipsis> -->
|
|
213
213
|
<span>{{ text === '' ? '--' : text }}</span>
|
|
214
214
|
</span>
|
|
@@ -321,6 +321,7 @@ export default {
|
|
|
321
321
|
return this.tableContext.expandedGrid ? this.$refs.expandableTable : this.$refs.simpleTable
|
|
322
322
|
},
|
|
323
323
|
realTableColumns () {
|
|
324
|
+
console.warn('====', this.tableContext.tableColumns)
|
|
324
325
|
return this.tableContext.tableColumns.filter(item => item.slotType !== 'action' || !this.disableAction).map((item) => {
|
|
325
326
|
// todo delete 后台现在也是200 不过要清楚配置缓存 这里是为了让不清缓存也能达到争取的效果
|
|
326
327
|
// if (item.slotType === 'date' || item.slotType === 'dateTime') {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
<script>
|
|
52
52
|
|
|
53
|
-
import { importData, downloadImportExcel,
|
|
53
|
+
import { importData, downloadImportExcel, getConfigByName } from '@vue2-client/services/api/common'
|
|
54
54
|
import { excleParseArrays } from '@vue2-client/utils/excel/Export2Excel'
|
|
55
55
|
import { mapState } from 'vuex'
|
|
56
56
|
|
|
@@ -135,18 +135,43 @@ export default {
|
|
|
135
135
|
this.readTemplateConfig()
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
-
/** 读取
|
|
139
|
-
|
|
138
|
+
/** 读取Excel导入模板配置 */
|
|
139
|
+
async readTemplateConfig () {
|
|
140
140
|
try {
|
|
141
|
-
const isProd = process.env.NODE_ENV === 'production'
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
// const isProd = process.env.NODE_ENV === 'production'
|
|
142
|
+
await getConfigByName(
|
|
143
|
+
this.queryParamsName,
|
|
144
|
+
'af-his',
|
|
145
|
+
(config) => {
|
|
146
|
+
// 更严格的空值检查
|
|
147
|
+
if (config?.tableAliasName && config?.excelImportTemplate?.[0]?.column) {
|
|
148
|
+
const { tableAliasName } = config
|
|
149
|
+
const columns = config.excelImportTemplate[0].column
|
|
150
|
+
// 生成Excel导入模板列
|
|
151
|
+
this.excelImportTemplate = columns.map(item =>
|
|
152
|
+
`${tableAliasName}_${item}`
|
|
153
|
+
)
|
|
154
|
+
console.log('Excel模板列配置加载成功', this.excelImportTemplate)
|
|
155
|
+
// 可以将中文字段名称也拿出来,解析数据的时候可以和表头对比
|
|
156
|
+
} else {
|
|
157
|
+
console.warn('配置信息不完整,无法生成Excel模板列')
|
|
158
|
+
this.excelImportTemplate = []
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
} catch (error) {
|
|
163
|
+
// 更完善的错误处理
|
|
164
|
+
console.error('读取Excel模板配置失败:', error.message || error.msg || error)
|
|
165
|
+
// 可以根据错误类型进行不同的处理
|
|
166
|
+
if (error.code === 'CONFIG_NOT_FOUND') {
|
|
167
|
+
// 处理配置不存在的情况
|
|
168
|
+
this.excelImportTemplate = []
|
|
169
|
+
} else if (error.code === 'NETWORK_ERROR') {
|
|
170
|
+
// 处理网络错误
|
|
171
|
+
console.error('网络连接失败,请检查网络设置')
|
|
147
172
|
}
|
|
148
|
-
|
|
149
|
-
|
|
173
|
+
// 可以选择抛出错误或返回默认值
|
|
174
|
+
throw new Error(`读取Excel模板配置失败: ${error.message}`)
|
|
150
175
|
}
|
|
151
176
|
},
|
|
152
177
|
beforeUpload (file) {
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
<h4>{{ item.days }}</h4>
|
|
18
18
|
<div class="file-items">
|
|
19
19
|
<div v-for="file in item.arrays" :key="file.id" class="file-card">
|
|
20
|
-
<img :src="file.f_downloadpath" class="file-image" v-if="file.f_filetype.includes('jpg') || file.f_filetype.includes('png')" @click="openPreview(file.f_downloadpath)" style="cursor:pointer" />
|
|
20
|
+
<img :src="getFileUrl(file.f_downloadpath)" class="file-image" v-if="file.f_filetype.includes('jpg') || file.f_filetype.includes('png')" @click="openPreview(file.f_downloadpath)" style="cursor:pointer" />
|
|
21
21
|
<p>上传时间: {{ file.f_uploaddate }}</p>
|
|
22
22
|
<p>操作员: {{ file.f_username }}</p>
|
|
23
23
|
<p>分类: {{ file.fusetype }}</p>
|
|
24
24
|
<p>说明: {{ file.fremarks }}</p>
|
|
25
|
-
<a :href="file.f_downloadpath" target="_blank">预览</a>
|
|
25
|
+
<a :href="getFileUrl(file.f_downloadpath)" target="_blank">预览</a>
|
|
26
26
|
<a-button v-if="isDelete === '1'" @click="delet(file.id)">删除</a-button>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -86,8 +86,38 @@ export default {
|
|
|
86
86
|
this.getFiles()
|
|
87
87
|
},
|
|
88
88
|
openPreview (src) {
|
|
89
|
-
this.previewImg = src
|
|
89
|
+
this.previewImg = this.getFileUrl(src)
|
|
90
90
|
this.previewVisible = true
|
|
91
|
+
},
|
|
92
|
+
getFileUrl (path) {
|
|
93
|
+
if (!path) return ''
|
|
94
|
+
|
|
95
|
+
console.log('原始路径:', path)
|
|
96
|
+
|
|
97
|
+
// 获取当前域名和端口
|
|
98
|
+
const baseUrl = `${window.location.protocol}//${window.location.host}`
|
|
99
|
+
|
|
100
|
+
// 如果是本地文件路径,转换为新的转发路径
|
|
101
|
+
if (path.match(/^[A-Za-z]:[\/\\]/)) {
|
|
102
|
+
// 提取文件名
|
|
103
|
+
const fileName = path.split(/[/\\]/).pop()
|
|
104
|
+
const newUrl = `${baseUrl}/rs/image/file/${fileName}`
|
|
105
|
+
console.log('转换后路径:', newUrl)
|
|
106
|
+
return newUrl
|
|
107
|
+
}
|
|
108
|
+
// 如果已经是HTTP路径,直接返回
|
|
109
|
+
if (path.startsWith('http')) {
|
|
110
|
+
console.log('HTTP路径,直接返回:', path)
|
|
111
|
+
return path
|
|
112
|
+
}
|
|
113
|
+
// 如果是相对路径,添加域名前缀
|
|
114
|
+
if (path.startsWith('/resource/')) {
|
|
115
|
+
const newUrl = `${baseUrl}${path}`
|
|
116
|
+
console.log('相对路径转换:', newUrl)
|
|
117
|
+
return newUrl
|
|
118
|
+
}
|
|
119
|
+
console.log('其他路径,直接返回:', path)
|
|
120
|
+
return path
|
|
91
121
|
}
|
|
92
122
|
},
|
|
93
123
|
mounted () {
|