|
|
|
|
@ -24,98 +24,97 @@
|
|
|
|
|
<!-- 表格 -->
|
|
|
|
|
<xy-table :list="list" :table-item="tableItem" :total="total" @delete="destroy" @editor="editor"
|
|
|
|
|
@pageSizeChange="e => select.page_size = e" @pageIndexChange="e => {select.page = e;getWorkers()}">
|
|
|
|
|
<template v-slot:forms>
|
|
|
|
|
<!-- 遍历列配置 forms,每个列对应一个配置项 -->
|
|
|
|
|
<el-table-column
|
|
|
|
|
v-for="(colConfig, index) in forms"
|
|
|
|
|
:key="index"
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
align="center"
|
|
|
|
|
:label="colConfig.ask"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<!-- 找到当前列对应的行实际数据(通过索引匹配) -->
|
|
|
|
|
<!-- 假设 forms 和 scope.row.forms 顺序一致,索引相同 -->
|
|
|
|
|
<template v-if="scope.row.forms && scope.row.forms[index]">
|
|
|
|
|
<!-- 当前行的实际数据项 -->
|
|
|
|
|
<!-- 处理 checkbox 类型 -->
|
|
|
|
|
<template v-if="colConfig.type === 'checkbox'">
|
|
|
|
|
<div>
|
|
|
|
|
{{ joinSelectedOptions(scope.row.forms[index].options || []) }}
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 处理普通分数类型 -->
|
|
|
|
|
<template v-else>
|
|
|
|
|
<div>
|
|
|
|
|
{{ scope.row.forms[index].score !== '' ? scope.row.forms[index].score : '-' }} <!-- 空值显示 - -->
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 行数据不存在时显示默认值 -->
|
|
|
|
|
<template v-else>
|
|
|
|
|
<div>-</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:files>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
align="center"
|
|
|
|
|
label="回访图片"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<template v-if="scope.row.files">
|
|
|
|
|
<div style="display:flex">
|
|
|
|
|
<el-image
|
|
|
|
|
v-for="item in scope.row.files"
|
|
|
|
|
style="width: 60px; height: 60px;margin:5px"
|
|
|
|
|
:src="item.url"
|
|
|
|
|
:preview-src-list="scope.row.files.map(item=>item.url)"></el-image>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:sign_image>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
align="center"
|
|
|
|
|
label="服务对象/家属签名"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<el-image
|
|
|
|
|
v-if="scope.row.sign_image"
|
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
|
:src="scope.row.sign_image.url"
|
|
|
|
|
:preview-src-list="[scope.row.sign_image.url]"></el-image>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:admin_sign_image>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
align="center"
|
|
|
|
|
label="调查人员签名"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<el-image
|
|
|
|
|
v-if="scope.row.admin_sign_image"
|
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
|
:src="scope.row.admin_sign_image.url"
|
|
|
|
|
:preview-src-list="[scope.row.admin_sign_image.url]"></el-image>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<template v-slot:forms>
|
|
|
|
|
<!-- 遍历列配置 forms,每个列对应一个配置项 -->
|
|
|
|
|
<el-table-column
|
|
|
|
|
v-for="(colConfig, index) in forms"
|
|
|
|
|
:key="index"
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
align="center"
|
|
|
|
|
:label="colConfig.ask"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<!-- 找到当前列对应的行实际数据(通过索引匹配) -->
|
|
|
|
|
<!-- 假设 forms 和 scope.row.forms 顺序一致,索引相同 -->
|
|
|
|
|
<template v-if="scope.row.forms && scope.row.forms[index]">
|
|
|
|
|
<!-- 当前行的实际数据项 -->
|
|
|
|
|
<!-- 处理 checkbox 类型 -->
|
|
|
|
|
<template v-if="colConfig.type === 'checkbox'">
|
|
|
|
|
<div>
|
|
|
|
|
{{ joinSelectedOptions(scope.row.forms[index].options || []) }}
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 处理普通分数类型 -->
|
|
|
|
|
<template v-else>
|
|
|
|
|
<div>
|
|
|
|
|
{{ scope.row.forms[index].score !== '' ? scope.row.forms[index].score : '-' }} <!-- 空值显示 - -->
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 行数据不存在时显示默认值 -->
|
|
|
|
|
<template v-else>
|
|
|
|
|
<div>-</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:files>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
align="center"
|
|
|
|
|
label="回访图片"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<template v-if="scope.row.files">
|
|
|
|
|
<div style="display:flex">
|
|
|
|
|
<el-image
|
|
|
|
|
v-for="item in scope.row.files"
|
|
|
|
|
style="width: 60px; height: 60px;margin:5px"
|
|
|
|
|
:src="item.url"
|
|
|
|
|
:preview-src-list="scope.row.files.map(item=>item.url)"></el-image>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:sign_image>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
align="center"
|
|
|
|
|
label="服务对象/家属签名"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<el-image
|
|
|
|
|
v-if="scope.row.sign_image"
|
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
|
:src="scope.row.sign_image.url"
|
|
|
|
|
:preview-src-list="[scope.row.sign_image.url]"></el-image>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:admin_sign_image>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
align="center"
|
|
|
|
|
label="调查人员签名"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<el-image
|
|
|
|
|
v-if="scope.row.admin_sign_image"
|
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
|
:src="scope.row.admin_sign_image.url"
|
|
|
|
|
:preview-src-list="[scope.row.admin_sign_image.url]"></el-image>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<div></div>
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
|
<el-table-column
|
|
|
|
|
fixed="right"
|
|
|
|
|
width="200"
|
|
|
|
|
header-align="center"
|
|
|
|
|
@ -123,35 +122,18 @@
|
|
|
|
|
label="操作"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:default="scope">
|
|
|
|
|
<Poptip
|
|
|
|
|
v-if="!$store.getters.myRoles.find(i => i.name === '质控员')"
|
|
|
|
|
transfer
|
|
|
|
|
confirm
|
|
|
|
|
title="确认要删除?"
|
|
|
|
|
@on-ok="destroy(scope.row)"
|
|
|
|
|
>
|
|
|
|
|
<Button size="small" type="error" ghost style="margin-right: 6px"
|
|
|
|
|
>删除</Button
|
|
|
|
|
>
|
|
|
|
|
</Poptip>
|
|
|
|
|
<Button
|
|
|
|
|
v-if="!$store.getters.myRoles.find(i => i.name === '质控员')"
|
|
|
|
|
size="small"
|
|
|
|
|
ghost
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="editor(scope.row)"
|
|
|
|
|
style="margin-right: 6px"
|
|
|
|
|
>编辑</Button
|
|
|
|
|
>
|
|
|
|
|
<Button size="small" type="primary" @click="openShowQuality(scope.row)">查看</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
|
|
|
|
|
<!-- <add-worker
|
|
|
|
|
ref="addWorker"
|
|
|
|
|
@refresh="getWorkers"></add-worker> -->
|
|
|
|
|
</div>
|
|
|
|
|
<show-quality
|
|
|
|
|
ref="showQuality"></show-quality>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
@ -160,11 +142,13 @@
|
|
|
|
|
destroy
|
|
|
|
|
} from '@/api/quality'
|
|
|
|
|
import { download } from "@/utils/downloadRequest"
|
|
|
|
|
import showQuality from "@/views/quality/components/showQuality"
|
|
|
|
|
// import addWorker from "@/views/worker/component/addWorker";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
// addWorker
|
|
|
|
|
showQuality
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -243,21 +227,21 @@ import { download } from "@/utils/downloadRequest"
|
|
|
|
|
label: '回访地址',
|
|
|
|
|
width: 180,
|
|
|
|
|
align: 'left'
|
|
|
|
|
},{
|
|
|
|
|
prop: 'files',
|
|
|
|
|
label: '回访图片',
|
|
|
|
|
width: 180,
|
|
|
|
|
align: 'left'
|
|
|
|
|
},{
|
|
|
|
|
prop: 'sign_image',
|
|
|
|
|
label: '服务对象/家属签名',
|
|
|
|
|
width: 180,
|
|
|
|
|
align: 'left',
|
|
|
|
|
},{
|
|
|
|
|
prop: 'admin_sign_image',
|
|
|
|
|
label: '调查人员签名',
|
|
|
|
|
width: 180,
|
|
|
|
|
align: 'left'
|
|
|
|
|
},{
|
|
|
|
|
prop: 'files',
|
|
|
|
|
label: '回访图片',
|
|
|
|
|
width: 180,
|
|
|
|
|
align: 'left'
|
|
|
|
|
},{
|
|
|
|
|
prop: 'sign_image',
|
|
|
|
|
label: '服务对象/家属签名',
|
|
|
|
|
width: 180,
|
|
|
|
|
align: 'left',
|
|
|
|
|
},{
|
|
|
|
|
prop: 'admin_sign_image',
|
|
|
|
|
label: '调查人员签名',
|
|
|
|
|
width: 180,
|
|
|
|
|
align: 'left'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
forms: [{
|
|
|
|
|
@ -383,6 +367,10 @@ import { download } from "@/utils/downloadRequest"
|
|
|
|
|
this.list = res.data
|
|
|
|
|
this.total = res.total
|
|
|
|
|
},
|
|
|
|
|
openShowQuality(row) {
|
|
|
|
|
this.$refs['showQuality'].setId(row.id)
|
|
|
|
|
this.$refs['showQuality'].show()
|
|
|
|
|
},
|
|
|
|
|
joinSelectedOptions(options) {
|
|
|
|
|
console.log("options", options)
|
|
|
|
|
// 过滤出 checked 为 true 的项
|
|
|
|
|
@ -399,11 +387,11 @@ import { download } from "@/utils/downloadRequest"
|
|
|
|
|
background: "rgba(0,0,0,0.4)",
|
|
|
|
|
text: "正在导出..."
|
|
|
|
|
})
|
|
|
|
|
download('/api/admin/quality-callbacks/get-list','get',{
|
|
|
|
|
...this.select,
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 9999,
|
|
|
|
|
is_export:1
|
|
|
|
|
download('/api/admin/quality-callbacks/get-list','get',{
|
|
|
|
|
...this.select,
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 9999,
|
|
|
|
|
is_export:1
|
|
|
|
|
},`质控回访.xlsx`)
|
|
|
|
|
loading.close()
|
|
|
|
|
} catch (err) {
|
|
|
|
|
@ -429,4 +417,4 @@ import { download } from "@/utils/downloadRequest"
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|