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

quick detect

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