提交 a64c923e 编写于 作者: 张磊's avatar 张磊

quick detect

上级 db5f726a
......@@ -106,10 +106,10 @@ export const sampleCodeValidate = (data) => {
};
// 获取检测人信息
export const detectionRecordInfo = (id) => {
export const detectionRecordInfo = (data) => {
return request({
method: 'get',
url: `/trade/detection/record/record/info?detectionRecordId=${id}`,
url: `/trade/detection/record/record/info?detectionRecordId=${data.detectionRecordId}&detectionKind=${data.detectionKind}`,
withCredentials: true,
});
};
......
......@@ -94,14 +94,16 @@ export default {
this.provinceList = await this.getProvinceList();
this.cityList = await this.getCityList(nv[0]);
this.countyList = await this.getCountyList(nv[1]);
const provinceIndex = this.provinceList.findIndex(ele => ele.id === nv[0]);
const cityIndex = this.cityList.findIndex(ele => ele.id === nv[1]);
const countyIndex = this.countyList.findIndex(ele => ele.id === nv[2]);
this.columns = [{ values: this.provinceList, defaultIndex:provinceIndex}, { values: this.cityList, defaultIndex:cityIndex}, { values: this.countyList, defaultIndex:countyIndex }];
console.log('locationAreaCode', this.provinceList, provinceIndex);
const data = [this.provinceList[provinceIndex], this.cityList[cityIndex], this.countyList[countyIndex]];
if (this.result) {
this.$emit('confirm', data);
if(this.cityList) {
const provinceIndex = this.provinceList.findIndex(ele => ele.id === nv[0]);
const cityIndex = this.cityList && this.cityList.findIndex(ele => ele.id === nv[1]);
const countyIndex = this.countyList && this.countyList.findIndex(ele => ele.id === nv[2]);
this.columns = [{ values: this.provinceList, defaultIndex:provinceIndex}, { values: this.cityList, defaultIndex:cityIndex}, { values: this.countyList, defaultIndex:countyIndex }];
console.log('locationAreaCode', this.provinceList, provinceIndex);
const data = [this.provinceList[provinceIndex], this.cityList[cityIndex], this.countyList[countyIndex]];
if (this.result) {
this.$emit('confirm', data);
}
}
}
},
......
......@@ -152,10 +152,10 @@ export default {
getHospitalList(data).then(res => {
console.log('getHospitalList', res);
this.list = res.data.data;
this.list = res.data.data || [];
this.finished = true;
this.loading = false;
const hospitalIdIndex = this.list.findIndex(ele => ele.hospitalId === this.hospitalId);
const hospitalIdIndex = (this.list.length > 0) && this.list.findIndex(ele => ele.hospitalId === this.hospitalId);
console.log('hospitalIdIndex', hospitalIdIndex);
if (this.externalData.cityId && this.externalData.countyId && this.externalData.provinceId && hospitalIdIndex == -1) {
this.$emit('clean');
......
......@@ -265,7 +265,7 @@ export default {
};
},
computed: {
...mapGetters(['insuranceInfo']),
...mapGetters('home', ['insuranceInfo']),
},
mounted() {
this.$loading.show();
......
......@@ -76,17 +76,18 @@ export default {
},
// 目前是配置一个检测信息,可能会拓展,所以返回的是一个list
getDetectionName(yunOrderNo) {
getDetectionName(yunOrderNo).then(res => {
if (res.code === '000000' && res.data) {
const dectionData = res.data[0] || {};
console.log('getDetectionName', dectionData);
this.dectionData = dectionData;
this.dectionForm.detectName = dectionData.detectionName;
this.dectionForm.goodsId = dectionData.goodsId;
this.$store.dispatch('home/setInsuranceInfo', dectionData);
}
this.$loading.hide();
});
return new Promise((resolve) => {
getDetectionName(yunOrderNo).then(res => {
if (res.code === '000000' && res.data) {
const dectionData = res.data[0] || {};
console.log('getDetectionName', dectionData);
this.dectionData = dectionData;
this.$store.dispatch('home/setInsuranceInfo', dectionData);
resolve(dectionData);
}
this.$loading.hide();
});
});
},
// 获取跳转状态
getJumpPageStatus(data) {
......@@ -102,7 +103,7 @@ export default {
}
});
},
checkStatus(res) {
async checkStatus(res) {
this.yunOrderNo = res.data.yunOrderNo;
this.query.yunOrderNo = res.data.yunOrderNo;
this.projectEquityNo = res.data.projectEquityNo;
......@@ -111,7 +112,10 @@ export default {
this.query.externalOrderNo = this.externalOrderNo;
this.status = res.data.statusCode;
this.hasQuestionnaire = res.data.hasQuestionnaire;
this.getDetectionName(this.yunOrderNo);
// 快检结果
const result = await this.getDetectionName(this.yunOrderNo);
const {detectionKind} = result;
console.log('---result', result);
switch (this.status) {
case '0101':
window.location.href = res.data.questionnaireUrl;
......@@ -124,9 +128,10 @@ export default {
case '0902':
this.turnToPage(this.routerMap[this.status], this.query);
break;
case '0302':
case '0901':
this.query.detectionRecordId = res.data.detectionRecordId;
this.turnToPage(this.routerMap[this.status], this.query);
this.turnToPage(this.pageMap(detectionKind), this.query);
break;
case '0201':
// hasQuestionnaire 有问卷 跳领用,没问卷直接跳 预约
......@@ -138,10 +143,6 @@ export default {
this.turnToPage('/appoint', this.query);
}
break;
case '0302':
this.query.detectionRecordId = res.data.detectionRecordId;
this.turnToPage(this.routerMap[this.status], this.query);
break;
default:
this.turnToPage('/insuranceDetectionDetail', this.query);
break;
......@@ -156,11 +157,17 @@ export default {
});
},
turnToPage(path, query) {
this.$router.push({
path, query
});
}
},
pageMap(s) {
const m = {
0:'/insuranceDetectionDetail',
1: '/insuranceQuickDetectionDetail'
};
return m[s];
},
}
};
</script>
......
......@@ -207,7 +207,7 @@
<script>
import { mapGetters } from 'vuex';
import { signDetection, getProtocolContent, getProtocolName, sampleCodeValidate, detectionRecordInfo, bindingSampleCode, bindingQuickSampleCode, detectionQuickRecordInfo} from '@/api/detection.js';
import { signDetection, getProtocolContent, getProtocolName, sampleCodeValidate, detectionRecordInfo, bindingSampleCode, bindingQuickSampleCode} from '@/api/detection.js';
import {getDetectionName} from '@/api/appoint';
export default {
data() {
......@@ -333,8 +333,8 @@ export default {
console.log('res', res);
if (res.code === '000000' && res.data) {
this.insuranceInfo = res.data[0];
this.$store.dispatch('home/setInsuranceInfo', res.data[0]);
this.getRecordInfo();
console.log('----', this.insuranceInfo);
}
});
......@@ -380,32 +380,40 @@ export default {
});
},
getRecordInfo() {
if(this.insuranceInfo.detectionKind == 0) {
detectionRecordInfo(this.detectionRecordId).then(res => {
if (res.code === '000000') {
this.recordInfo.name = res.data.patientName;
this.recordInfo.sex = res.data.sex === 1 ? '男' : '女';
this.recordInfo.date = res.data.birthday;
this.recordInfo.checkName = res.data.checkName;
this.recordInfo.projectId = res.data.projectId;
this.recordInfo.patientId = res.data.patientId;
this.recordInfo.hospitalId = res.data.hospitalId;
}
});
}
if(this.insuranceInfo.detectionKind == 1) {
detectionQuickRecordInfo(this.detectionRecordId).then(res => {
if (res.code === '000000') {
this.recordInfo.name = res.data.patientName;
this.recordInfo.sex = res.data.sex === 1 ? '男' : '女';
this.recordInfo.date = res.data.birthday;
this.recordInfo.checkName = res.data.checkName;
this.recordInfo.projectId = res.data.projectId;
this.recordInfo.patientId = res.data.patientId;
this.recordInfo.hospitalId = res.data.hospitalId;
}
});
}
const o = {
detectionRecordId: this.detectionRecordId,
detectionKind: this.insuranceInfo.detectionKind
};
console.log('----detectionRecordInfo', o);
detectionRecordInfo(o).then(res => {
console.log('---res--', res);
if (res.code === '000000') {
this.recordInfo.name = res.data.patientName;
this.recordInfo.sex = res.data.sex === 1 ? '男' : '女';
this.recordInfo.date = res.data.birthday;
this.recordInfo.checkName = res.data.checkName;
this.recordInfo.projectId = res.data.projectId;
this.recordInfo.patientId = res.data.patientId;
this.recordInfo.hospitalId = res.data.hospitalId;
}
});
// if(this.insuranceInfo.detectionKind == 0) {
//
// }
// if(this.insuranceInfo.detectionKind == 1) {
// detectionQuickRecordInfo(this.detectionRecordId).then(res => {
// if (res.code === '000000') {
// this.recordInfo.name = res.data.patientName;
// this.recordInfo.sex = res.data.sex === 1 ? '男' : '女';
// this.recordInfo.date = res.data.birthday;
// this.recordInfo.checkName = res.data.checkName;
// this.recordInfo.projectId = res.data.projectId;
// this.recordInfo.patientId = res.data.patientId;
// this.recordInfo.hospitalId = res.data.hospitalId;
// }
// });
// }
},
// 绑定条形码
bindingCode() {
......@@ -425,8 +433,8 @@ export default {
},
// 绑定条形码
quickBindingCode(obj) {
console.log('--obj--', obj);
bindingQuickSampleCode(obj).then(res => {
const o = {...obj, userId:this.recordInfo.patientId};
bindingQuickSampleCode(o).then(res => {
if (res.code !== '000000') {
return this.$toast(res.message);
} else {
......@@ -444,6 +452,7 @@ export default {
});
},
earlyBindingCode(obj) {
// quickBindingCode userId
bindingSampleCode(obj).then(res => {
if (res.code !== '000000') {
return this.$toast(res.message);
......
......@@ -114,7 +114,7 @@ export default {
};
},
computed: {
...mapGetters(['insuranceInfo']),
...mapGetters('home', ['insuranceInfo']),
},
created() {
const {detectionRecordId, yunOrderNo} = this.$route.query;
......
......@@ -15,7 +15,7 @@
<div class="info-top-name">
{{ detectionName }}
</div>
<div class="info-top-tips">
<div v-if="insuranceInfo && insuranceInfo.detectionKind == 0" class="info-top-tips">
<div class="tips-item">
<div class="tips-item-dot" />
DNA甲基化检测技术,对比传统肿瘤标志物检查,早期癌变检出率高5-10倍
......@@ -29,6 +29,16 @@
检测报告阳性,最高可报销300元复查费用
</div>
</div>
<div v-if="insuranceInfo && insuranceInfo.detectionKind == 1" class="info-top-tips">
<div class="tips-item">
<div class="tips-item-dot" />
居家快速自测、方便卫生、轻松操作;
</div>
<div class="tips-item">
<div class="tips-item-dot" />
检测快速,5-10分钟即可获得结果
</div>
</div>
</div>
<img
src="https://files.yunqueyi.com/image/gif/common/20230228173135233.gif"
......@@ -63,16 +73,6 @@
</div>
</template>
</div>
<!-- <div
v-if="!needDetect"
class="custom-style"
@click="toAppoint"
>
{{ buttonText || '免费预约检测' }}
</div> -->
<div
class="tips-fixed"
>
......@@ -85,6 +85,7 @@
<script>
import { getButtonStatus } from '@/api/question';
import {getDetectionName} from '@/api/appoint';
import { mapGetters } from 'vuex';
export default {
data() {
return {
......@@ -106,12 +107,13 @@ export default {
status:null,
query: {},
buttonStatus: false,
buttonText:''
buttonText:'',
};
},
computed: {
...mapGetters('home', ['insuranceInfo']),
},
mounted() {
const { query } = this.$route;
this.$loading.show();
this.query = query;
......@@ -138,7 +140,7 @@ export default {
getDetectionName(yunOrderNo).then(res => {
if (res.code === '000000' && res.data) {
const dectionData = res.data[0] || {};
console.log('dectionData.detectionName', dectionData.detectionName);
console.log('dectionData.detectionName', this.insuranceInfo, dectionData);
this.detectionName = dectionData.detectionName;
this.$store.dispatch('home/setInsuranceInfo', dectionData);
this.$loading.hide();
......@@ -193,7 +195,8 @@ background: #F3FCFF;
margin: 168px auto 54px;
.info-top{
width: 308px;
height: 200px;
height: auto;
padding-bottom: 50px;
background: #FFFBF9;
border-radius: 11px;
margin: 10px auto 20px;
......
......@@ -23,37 +23,6 @@
<div
class="content"
>
<div
v-if="![0,1,3,5].includes(dataDetail.status)"
class="p30"
>
<div
v-if="[2, 21, 22, 25, 27].includes(Number(dataDetail.status|| 0))"
class="flex-wrap"
>
<div>
预期报告生成时间:
</div>
<div class=" fc-blue">
{{
dataDetail.detectChargeType == 10
? dataDetail.reportExpectDate
: dataDetail.reportExpectDateHigh
}}
</div>
</div>
<div
v-if="dataDetail.status == 3"
class="flex-wrap"
>
<div>
报告生成时间
</div>
<div class="fc-blue">
{{ dataDetail.reportDate }}
</div>
</div>
</div>
<div class="flow">
<div class="f-list">
<div
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册