|
@@ -64,6 +64,16 @@
|
|
|
<el-tag size="small">{{ scope.row.status }}</el-tag>
|
|
<el-tag size="small">{{ scope.row.status }}</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+ <el-table-column label="采集完整度" width="120">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag
|
|
|
|
|
+ v-if="scope.row.collectValidation"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :type="collectPass(scope.row) ? 'success' : 'danger'"
|
|
|
|
|
+ >{{ collectText(scope.row) }}</el-tag>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="createdAt" label="创建时间" width="160">
|
|
<el-table-column prop="createdAt" label="创建时间" width="160">
|
|
|
<template slot="header">
|
|
<template slot="header">
|
|
|
<span class="sort-header" @click.stop="onSortClick('createdAt', $event)">创建时间{{ sortIcon('createdAt') }}</span>
|
|
<span class="sort-header" @click.stop="onSortClick('createdAt', $event)">创建时间{{ sortIcon('createdAt') }}</span>
|
|
@@ -175,12 +185,18 @@ export default {
|
|
|
}).then(function(res) {
|
|
}).then(function(res) {
|
|
|
if (res.data && res.data.data) {
|
|
if (res.data && res.data.data) {
|
|
|
var d = res.data.data
|
|
var d = res.data.data
|
|
|
|
|
+ var cv = null
|
|
|
|
|
+ try { cv = d.collectValidation ? JSON.parse(d.collectValidation) : null } catch (e) { cv = null }
|
|
|
|
|
+ var cvLine = '<p>采集完整度: ' + (cv
|
|
|
|
|
+ ? (cv.matched + '/' + cv.expected + (cv.pass ? '(通过)' : '(缺失: ' + ((cv.missing || []).join('、') || '-') + ')'))
|
|
|
|
|
+ : '-') + '</p>'
|
|
|
self.$alert(
|
|
self.$alert(
|
|
|
'<p>标题: ' + d.title + '</p>' +
|
|
'<p>标题: ' + d.title + '</p>' +
|
|
|
'<p>类型: ' + d.reportTypeName + '</p>' +
|
|
'<p>类型: ' + d.reportTypeName + '</p>' +
|
|
|
'<p>主体: ' + d.subjectName + '</p>' +
|
|
'<p>主体: ' + d.subjectName + '</p>' +
|
|
|
'<p>日期: ' + d.reportDate + '</p>' +
|
|
'<p>日期: ' + d.reportDate + '</p>' +
|
|
|
'<p>评分: ' + (d.overallScore || '-') + '</p>' +
|
|
'<p>评分: ' + (d.overallScore || '-') + '</p>' +
|
|
|
|
|
+ cvLine +
|
|
|
'<p>状态: ' + d.status + '</p>',
|
|
'<p>状态: ' + d.status + '</p>',
|
|
|
'报告详情',
|
|
'报告详情',
|
|
|
{ dangerouslyUseHTMLString: true }
|
|
{ dangerouslyUseHTMLString: true }
|
|
@@ -188,6 +204,15 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ parseCollect(row) {
|
|
|
|
|
+ if (!row || !row.collectValidation) return null
|
|
|
|
|
+ try { return JSON.parse(row.collectValidation) } catch (e) { return null }
|
|
|
|
|
+ },
|
|
|
|
|
+ collectPass(row) { const c = this.parseCollect(row); return !!(c && c.pass === true) },
|
|
|
|
|
+ collectText(row) {
|
|
|
|
|
+ const c = this.parseCollect(row)
|
|
|
|
|
+ return c ? (c.matched + '/' + c.expected) : '-'
|
|
|
|
|
+ },
|
|
|
getTypeTag(type) {
|
|
getTypeTag(type) {
|
|
|
var map = { gut_flora: 'success', physical_exam: 'primary', dan: 'warning', insurance: 'info', fortune: 'danger' }
|
|
var map = { gut_flora: 'success', physical_exam: 'primary', dan: 'warning', insurance: 'info', fortune: 'danger' }
|
|
|
return map[type] || 'info'
|
|
return map[type] || 'info'
|