Browse Source

upweb

master
pengjun 2 years ago
parent
commit
395d930f28
  1. 44
      src/components/report/BtnReport.vue
  2. 6
      src/components/report/PatientRegisterQueryNobtn.vue
  3. 6
      src/utlis/proFunc.js

44
src/components/report/BtnReport.vue

@ -20,7 +20,7 @@
<el-button type="primary" class="commonbutton" @click="btnGetReport">领用报告</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="commonbutton" @click="btnUpReport">上传报告</el-button>
<el-button type="primary" class="commonbutton" @click="btnUpReport">上传Web</el-button>
</div>
</div>
<div>
@ -60,7 +60,7 @@ export default {
},
computed: {
...mapState(["dict", "elProgress","dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]),
...mapState(["dict", "elProgress", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]),
},
methods: {
@ -113,7 +113,7 @@ export default {
this.elProgress.display = true;
this.elProgress.percentage = 0;
let ReportCode = '0005';
let ReportCode = '0005';
let token = window.sessionStorage.getItem('token');
let user = window.sessionStorage.getItem('user');
let toOutShell = {
@ -135,24 +135,34 @@ export default {
};
for (let i = 0; i < this.dataTransOpts.tableM.patient_register.length; i++) {
let e = this.dataTransOpts.tableM.patient_register[i];
this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.dataTransOpts.tableM.patient_register.length);
if (e.completeFlag != '3') continue
//
try {
toOutShell.BusinessCode = e.patientRegisterId
let jsonToOutShell = JSON.stringify(toOutShell)
console.log('toOutShell',jsonToOutShell)
let res = await this.$peisAPI.upLoadReportPdf(jsonToOutShell)
if (JSON.parse(res).code < 0){
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
}else{
//
e.isUpload = 'Y'
console.log('btnUpReport success',JSON.parse(res))
if (e.completeFlag == '3') {
toOutShell.BusinessCode = e.patientRegisterId
let jsonToOutShell = JSON.stringify(toOutShell)
console.log('toOutShell', jsonToOutShell)
let res = await this.$peisAPI.upLoadReportPdf(jsonToOutShell)
if (JSON.parse(res).code < 0) {
console.log('$peisAPI.upLoadReportPdf err', res)
} else {
//
e.isUpload = 'Y'
console.log('btnUpReport success', JSON.parse(res))
}
} else {
patientRegisterId = e.patientRegisterId
let res2 = await postapi('/api/app/TransToWebPeis/TransPatientRegisterByPatientRegisterId', { patientRegisterId })
if (res2.code == -1) {
console.log('TransToWebPeis err', res2)
}
}
} catch (error) {
console.log('error',error)
console.log('error', error)
this.$message.warning({ showClose: true, message: error });
}
}
@ -180,7 +190,7 @@ export default {
///3a0c990e-5756-2dc0-19d5-69a617fe4048
let ReportCode = '0005';
if(this.dataTransOpts.tableS.patient_register.isPatientOccupationalDisease == 'Y') ReportCode = '0006'
if (this.dataTransOpts.tableS.patient_register.isPatientOccupationalDisease == 'Y') ReportCode = '0006'
let token = window.sessionStorage.getItem('token');
let user = window.sessionStorage.getItem('user');
let toOutShell = {
@ -212,7 +222,7 @@ export default {
// let res = await postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.patientRegister.patientRegisterId}`)
// toOutShell.ReportTable = res.data
let JSONtoOutShell = JSON.stringify(toOutShell)
console.log('$peisAPI.printPre',JSONtoOutShell)
console.log('$peisAPI.printPre', JSONtoOutShell)
if (isPreview) {
this.$peisAPI.printPre(JSONtoOutShell)
.then(res => {

6
src/components/report/PatientRegisterQueryNobtn.vue

@ -54,8 +54,8 @@
<div class="query">
<span class="spanClass">检查状态</span>
<el-select v-model="patientRegister.query.completeFlag" placeholder="请选择" clearable style="width: 80px"
size="small">
<el-option v-for="item in local.completeFlag" :key="item.id" :label="item.displayName" :value="item.id"/>
size="small" align="center">
<el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName" :value="item.id"/>
</el-select>
</div>
<div class="query">
@ -134,7 +134,7 @@ export default {
mounted() {
this.local.completeFlag = deepCopy(this.dict.completeFlag)
this.local.completeFlag.splice(0, 1) //
// this.local.completeFlag.splice(0, 1) //
this.local.completeFlag.splice(2, 0, { id: '5', displayName: '全部已检(未总检)' }) //
this.enterToQuery()

6
src/utlis/proFunc.js

@ -2,10 +2,10 @@
//多级联动选择数据处理 add by pengjun
function tcdate(date) {
for (var i = 0; i < date.length; i++) {
if (date[i].treeChildren.length == 0) {
date[i].treeChildren = undefined;
} else {
if (date[i].treeChildren && Array.isArray(date[i].treeChildren) && date[i].treeChildren.length > 0) {
tcdate(date[i].treeChildren);
}else{
delete date[i].treeChildren
}
}
};

Loading…
Cancel
Save