|
|
|
@ -20,10 +20,10 @@ |
|
|
|
Math.floor(((window.pageWidth - 110 - 60) * 3) / 4) + |
|
|
|
'px;' |
|
|
|
"> |
|
|
|
<div @contextmenu.prevent="onContextmenu"> |
|
|
|
<div @contextmenu.prevent="onContextmenu" id="report_tjbg"> |
|
|
|
<u-table :data="tableDatas" border ref="info" id="info" |
|
|
|
:height="(window.pageHeight < 600) ? 230 : (window.pageHeight - 370)" highlight-current-row |
|
|
|
@row-click="rowClick" size="small" row-key="patientRegisterId" |
|
|
|
@row-click="rowClick" size="small" row-key="patientRegisterId" |
|
|
|
@selection-change="handleSelectionChange" @row-contextmenu="rowContextmenu" |
|
|
|
@table-body-scroll="scrollFull" use-virtual :row-height="35" big-data-checkbox |
|
|
|
:data-changes-scroll-top="false"> |
|
|
|
@ -33,8 +33,8 @@ |
|
|
|
:type="dragCol[index].type" :min-width="dragCol[index].minWidth" :align="dragCol[index].align" |
|
|
|
:label="dragCol[index].type ? '' : item.label" :prop="dragCol[index].prop" |
|
|
|
:sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true" |
|
|
|
:sort-method="(a, b) => chineseSort(a, b, dragCol[index].prop)" |
|
|
|
:show-overflow-tooltip="dragCol[index].showTooltip"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="dragCol[index].prop == 'sn'"> |
|
|
|
{{ scope.$index + 1 }} |
|
|
|
@ -53,16 +53,13 @@ |
|
|
|
<div v-else-if="dragCol[index].prop == 'isLock'"> |
|
|
|
<i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" /> |
|
|
|
</div> |
|
|
|
<div v-else-if=" |
|
|
|
dragCol[index].prop == 'isVip' || |
|
|
|
dragCol[index].prop == 'isUpload' || |
|
|
|
dragCol[index].prop == 'isUploadAppoint' || |
|
|
|
dragCol[index].prop == 'isReceiveReport' |
|
|
|
"> |
|
|
|
<div |
|
|
|
v-else-if="['isVip', 'isUpload', 'isUploadAppoint', 'isReceiveReport', 'isPushThirdResult'].includes(dragCol[index].prop)"> |
|
|
|
<el-checkbox :value="scope.row[dragCol[index].prop] == 'Y'" true-label="Y" false-label="N" /> |
|
|
|
</div> |
|
|
|
<!-- String(scope.row[dragCol[index]?.prop]||'') 屏蔽没有字段--> |
|
|
|
<div v-else> |
|
|
|
{{ scope.row[dragCol[index].prop] }} |
|
|
|
{{ '\u200C' + String(scope.row[dragCol[index]?.prop]||'') }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -128,7 +125,7 @@ |
|
|
|
导出/推送<i class="el-icon-arrow-down el-icon--right"></i> |
|
|
|
</el-button> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item command="exp" @click="btnExport">人员信息导出</el-dropdown-item> |
|
|
|
<el-dropdown-item command="exp" @click="btnExport('report_tjbg')">人员信息导出</el-dropdown-item> |
|
|
|
<el-dropdown-item command="zip" @click="exportZip">导出Zip</el-dropdown-item> |
|
|
|
<el-dropdown-item command="jpg" @click="exportJpg">导出Jpg</el-dropdown-item> |
|
|
|
<el-dropdown-item command="pdf" @click="btnReportExport(false)">导出 pdf 报告</el-dropdown-item> |
|
|
|
@ -136,6 +133,9 @@ |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
</div> |
|
|
|
<div class="listBtn" v-if="false"> |
|
|
|
<el-button type="primary" class="commonbutton" @click="btnTest">test</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -199,6 +199,8 @@ |
|
|
|
import moment from "moment"; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import Sortable from "sortablejs"; |
|
|
|
import FileSaver from 'file-saver'; |
|
|
|
import pinyin from 'pinyin'; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { |
|
|
|
tcdate, |
|
|
|
@ -304,6 +306,7 @@ export default { |
|
|
|
{ label: "序号", prop: "sn", minWidth: 40, align: "center" }, |
|
|
|
{ label: "打印", prop: "isReportPrint", minWidth: 60, align: "center" }, |
|
|
|
{ label: "领取", prop: "isReceiveReport", minWidth: 60, align: "center" }, |
|
|
|
{ label: "上传", prop: "isUpload", minWidth: 60, align: "center" }, |
|
|
|
{ label: "体检进度", prop: "completeFlag", minWidth: 90, align: "center" }, |
|
|
|
{ label: "体检日期", prop: "medicalStartDate", minWidth: 100, align: "center" }, |
|
|
|
{ label: "单位名称", prop: "org", minWidth: 180, align: "left", showTooltip: true }, |
|
|
|
@ -342,9 +345,8 @@ export default { |
|
|
|
{ label: "领取时间", prop: "reportReceiveDate", minWidth: 140, align: "center" }, |
|
|
|
{ label: "锁住", prop: "isLock", minWidth: 60, align: "center" }, |
|
|
|
{ label: "预约备单", prop: "isUploadAppoint", minWidth: 90, align: "center" }, |
|
|
|
{ label: "上传", prop: "isUpload", minWidth: 60, align: "center" }, |
|
|
|
{ label: "检后推送", prop: "isPushThirdResult", minWidth: 90, align: "center" }, |
|
|
|
|
|
|
|
|
|
|
|
// { label: "标准金额", prop: "standardAmount", minWidth: 80, align: "center" }, |
|
|
|
// { label: "应收金额", prop: "receivableAmount", minWidth: 80, align: "center" }, |
|
|
|
// { label: "实收金额", prop: "chargeAmount", minWidth: 80, align: "center" }, |
|
|
|
@ -408,6 +410,42 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
dddw, setPrStatusColor, |
|
|
|
|
|
|
|
// 强制将单元格值转换为字符串 |
|
|
|
// forceStringFormatter(row, column, cellValue) { |
|
|
|
// //console.log('row, column, cellValue',row, column.property, cellValue) |
|
|
|
// // 如果 cellValue 存在,则转为字符串;否则返回原值 |
|
|
|
// if(['idNo','patientRegisterNo','patientNo','mobileTelephone','telephone'].includes(column.property)){ |
|
|
|
// return cellValue ? "\u200C" + String(cellValue) : cellValue |
|
|
|
// }else{ |
|
|
|
// return cellValue |
|
|
|
// } |
|
|
|
// }, |
|
|
|
|
|
|
|
// 如果不想预处理,也可以在排序方法中动态计算 |
|
|
|
chineseSort(a, b, colName) { |
|
|
|
// console.log('a, b', a, b) |
|
|
|
// const pinyinA = pinyin(a[colName], { style: pinyin.STYLE_NORMAL }).join(''); |
|
|
|
// const pinyinB = pinyin(b[colName], { style: pinyin.STYLE_NORMAL }).join(''); |
|
|
|
let valA = a[colName],valB = b[colName] |
|
|
|
if (typeof valA == 'string'){ |
|
|
|
// 单位、部门、姓名、地址、备注 |
|
|
|
if(['patientName','org','dept','address','remark'].includes(colName)){ |
|
|
|
return valA.localeCompare(valB,'zh'); |
|
|
|
}else{ |
|
|
|
return valA.localeCompare(valB); |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
return valA - valB |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
btnTest() { |
|
|
|
console.log('this.tableDatas3', this.tableDatas) |
|
|
|
}, |
|
|
|
|
|
|
|
//数据初始化 |
|
|
|
dictInit() { |
|
|
|
//性别 |
|
|
|
@ -1086,7 +1124,7 @@ export default { |
|
|
|
this.upTsjh() |
|
|
|
break; |
|
|
|
default: //lis |
|
|
|
this.btnExport() |
|
|
|
this.btnExport('report_tjbg') |
|
|
|
break; |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -1271,14 +1309,14 @@ export default { |
|
|
|
|
|
|
|
//推送检后信息--健康评估 |
|
|
|
async upTsjh() { |
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
this.checkedRows && |
|
|
|
this.checkedRows.length > 0 |
|
|
|
) { |
|
|
|
this.elProgress.display = true; |
|
|
|
this.elProgress.percentage = 0; |
|
|
|
|
|
|
|
|
|
|
|
for ( |
|
|
|
let i = 0; |
|
|
|
i < this.checkedRows.length; |
|
|
|
@ -1291,11 +1329,11 @@ export default { |
|
|
|
|
|
|
|
// 调上传接口 |
|
|
|
try { |
|
|
|
let res = await postapi('/api/app/ThirdResultPush/PushHtyResultByPatientRegisterId',{patientRegisterId:e.patientRegisterId}) |
|
|
|
if(res.code > -1){ |
|
|
|
let res = await postapi('/api/app/ThirdResultPush/PushHtyResultByPatientRegisterId', { patientRegisterId: e.patientRegisterId }) |
|
|
|
if (res.code > -1) { |
|
|
|
// 推送检后成功,更新状态 |
|
|
|
e.isPushThirdResult = "Y"; |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log("error", error); |
|
|
|
this.$message.warning({ showClose: true, message: error }); |
|
|
|
@ -1608,58 +1646,15 @@ export default { |
|
|
|
return rd; |
|
|
|
}, |
|
|
|
|
|
|
|
//通用导出 |
|
|
|
//通用导出 |
|
|
|
btnExport(elId) { |
|
|
|
require.ensure([], () => { |
|
|
|
const tHeader = []; |
|
|
|
const filterVal = []; |
|
|
|
this.dragCol.forEach((e) => { |
|
|
|
tHeader.push(e.label); |
|
|
|
filterVal.push(e.prop); |
|
|
|
}); |
|
|
|
const list = this.tableDatas.map((row, index) => { |
|
|
|
const newRow = { ...row }; // 创建副本,避免修改原数据 |
|
|
|
// 使用对象映射优化数据转换 |
|
|
|
newRow.sn = index + 1; |
|
|
|
if (newRow.completeFlag) |
|
|
|
newRow.completeFlag = |
|
|
|
newRow.isAudit == "Y" |
|
|
|
? "已审核" |
|
|
|
: dddw( |
|
|
|
this.dict.completeFlag, |
|
|
|
"id", |
|
|
|
newRow.completeFlag, |
|
|
|
"displayName" |
|
|
|
); |
|
|
|
newRow.isReportPrint = newRow.isReportPrint == "Y" ? "√" : ""; |
|
|
|
if (newRow.idNo) newRow.idNo = "\u200C" + newRow.idNo; |
|
|
|
if (newRow.patientRegisterNo) |
|
|
|
newRow.patientRegisterNo = "\u200C" + newRow.patientRegisterNo; |
|
|
|
if (newRow.patientNo) newRow.patientNo = "\u200C" + newRow.patientNo; |
|
|
|
if (newRow.isLock) newRow.isLock = newRow.isLock == "Y" ? "√" : ""; |
|
|
|
if (newRow.isVip) newRow.isVip = newRow.isVip == "Y" ? "√" : ""; |
|
|
|
if (newRow.isUpload) |
|
|
|
newRow.isUpload = newRow.isUpload == "Y" ? "√" : ""; |
|
|
|
if (newRow.isUploadAppoint) |
|
|
|
newRow.isUploadAppoint = newRow.isUploadAppoint == "Y" ? "√" : ""; |
|
|
|
if (newRow.isReceiveReport) |
|
|
|
newRow.isReceiveReport = newRow.isReceiveReport == "Y" ? "√" : ""; |
|
|
|
|
|
|
|
|
|
|
|
if (newRow.birthDate) |
|
|
|
newRow.birthDate = moment(newRow.birthDate).format("yyyy-MM-DD"); |
|
|
|
|
|
|
|
return newRow; |
|
|
|
}); |
|
|
|
const data = list.map((v) => filterVal.map((j) => v[j])); |
|
|
|
exportJsonToExcel( |
|
|
|
tHeader, |
|
|
|
data, |
|
|
|
"人员列表" + moment(new Date()).format("yyyyMMDDHHmmss") |
|
|
|
); //"列表excel" 是下载后的表名 可修改 |
|
|
|
}); |
|
|
|
|
|
|
|
let table = document.getElementById(elId); |
|
|
|
let tableData = table.innerHTML |
|
|
|
let fileName = moment(new Date()).format('yyyyMMDDHHmmss') + '.xls' |
|
|
|
let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" }); |
|
|
|
FileSaver.saveAs(blob, fileName); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
|