提交 864dd81b 编写于 作者: 张敬贤's avatar 张敬贤

Merge branch 'develop' of...

Merge branch 'develop' of http://192.168.110.53/com.pica.cloud.frontend/pica-insurance into feature/zjx
......@@ -9,10 +9,10 @@ export const getDetectionDetail = (id) => {
};
// 检测详情节点查询
export const getDetectionDetailProces = (id) => {
export const getDetectionDetailProces = (data) => {
return request({
method: 'get',
url: `/trade/detection/record/process/${id}`,
url: `/trade/detection/record/process/${data.id}?channel=${data.channel}`,
withCredentials: true,
});
};
......
......@@ -55,10 +55,20 @@ const routerConfig = [
component: () => import('@/views/pdf-preview/index.vue'),
},
];
// // 无问卷-0001 有问卷未填写-0101 已填写问卷未出结果-0102 已出结果无需领用-0401 已出结果未预约-0201 已预约未采样-0301 已预约已采样-0302
// const routerMap = {
// '0001': null,
// '0101': null,
// '0102': null,
// '0401': null,
// '0201': '/appoint',
// '0301': null,
// '0302': null,
// };
router.beforeEach(async (to, from, next) => {
console.log(to, from, next);
next();
});
router.addRoutes(routerConfig);
......
......@@ -113,10 +113,11 @@
提交
</div>
</div>
<van-overlay
z-index="11"
lock-scroll="false"
:show="showProtocol"
<van-popup
v-model="showProtocol"
position="bottom"
:style="{ height: '80%' }"
:transition-appear="true"
@click="showProtocol = false"
>
<div class="protocol-content">
......@@ -134,7 +135,7 @@
知情并提交
</van-button>
</div>
</van-overlay>
</van-popup>
<van-dialog
v-model="showBindingInfo"
confirm-button-color="#00BDA5"
......@@ -206,9 +207,8 @@ export default {
background: '',
},
showBindingInfo: false,
showEditModal: false,
isCheck: false,
barCode: '020987654321',
barCode: '',
protocolName: '',
prototypeId: '',
prototypeLogId: '',
......@@ -247,28 +247,11 @@ export default {
validateIdNo: 0,
};
this.detectionData = mock;
this.getProtocolName();
this.getRecordInfo();
const { pprotocolType, detectionRecordId } = this.$route.query;
this.getProtocolName(pprotocolType);
this.getRecordInfo(detectionRecordId);
},
methods: {
triggerEditModal() {
this.$dialog.confirm({
title: '确认提交',
message: '点击修改,将需要重新登记检测信息',
confirmButtonColor:'#00BDA5',
cancelButtonColor:'#00BDA5',
confirmButtonText:'确认',
cancelButtonText:'返回'
})
.then(() => {
// on confirm
})
.catch(() => {
// on cancel
});
this.showEditModal = true;
},
clearCode() {
this.barCode = '';
},
......@@ -280,13 +263,13 @@ export default {
scanType: ['barCode'], // 可以指定扫二维码还是一维码,默认二者都有
success: function (res) {
console.log('---res', res);
const s = res.resultStr;
that.barCode = s && s.spilt(',')[1];
}
};
this.$rocNative && this.$rocNative.scanQRCode(p, (res) => {
console.log('====', res);
if(res.resultStr) {
const s = String(res.resultStr).split(',');
that.barCode = s[1];
}
});
},
toggleBindingInfo() {
......@@ -336,9 +319,8 @@ export default {
if (res.code !== '000000') {
return this.$toast(res.message);
}
this.agreeText = res.data;
this.showProtocol = true;
const protoData = res.data;
this.agreeText = protoData;
});
},
getProtocolName() {
......
......@@ -136,7 +136,6 @@ export default {
document.execCommand('Copy');
document.body.removeChild(input);
this.$toast('已复制');
window.scrollTo(0, 1);
},
},
};
......
......@@ -9,12 +9,7 @@
<div class="detail-box">
<div class="status">
<img
v-if="waitIcon.indexOf(dataDetail.status) != -1"
src="https://files.yunqueyi.com/image/png/common/20220816135321860.png"
alt="wait"
>
<img
v-else-if="dataDetail.status == 5"
v-if="dataDetail.status == 5"
src="https://files.yunqueyi.com/image/png/common/20220817141150961.png"
alt="success"
>
......@@ -29,7 +24,10 @@
v-if="dataDetail.status != 0 && dataDetail.status != 1"
class="content"
>
<div class="p30">
<div
v-if="![1,3,5].includes(dataDetail.status)"
class="p30"
>
<div
v-if="[2, 21, 22, 25].includes(Number(dataDetail.status|| 0))"
class="flex-wrap"
......@@ -154,14 +152,13 @@
</div>
</div>
</div>
<!-- howBtn == 0 针对诺辉的走单独送检流程 不显示去送检按钮 -->
<!-- v-if="[1, 3].includes(dataDetail.status)"-->
<!-- v-if="[1, 3].includes(dataDetail.status)"-->
<div
class="submit-container multi-sub-wrap"
>
<!-- :class="[3].includes(dataDetail.status) && 'multi-sub-wrap'"-->
<div
class="submit-button"
:class="[3].includes(dataDetail.status) && 'multi-sub-wrap'"
@click="bottomBtnFun(dataDetail.status)"
>
{{ dataDetail.status | showBtnTextFilter }}
......@@ -169,17 +166,16 @@
<!-- v-if="[3].includes(dataDetail.status)"-->
<div
class="submit-button"
@click="getJumpToWebapp"
>
<wx-open-launch-weapp
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%"
username="gh_e92f58174364"
path="pages/health/detection-detail/index"
:env-version="VUE_APP_ENV != 'testing' ? 'release' : 'trial'"
:extra-data="{id: 113}"
:username="openWebAppConfig.username"
:path="openWebAppConfig.path"
env-version="trial"
:extra-data="openWebAppConfig.extraData"
>
<script type="text/wxtag-template">
<style>.btn {position:absolute; top: 0; left: 0; width:100%; height: 100%;}</style> <div class="btn">报告解读{{dataDetail.status}}</div>
<style>.btn {position:absolute; top: 0; color: #ffffff;text-align: center;line-height: 40px; left: 0; width:100%; height: 100%;}</style> <div class="btn">{{ }}</div>
</script>
</wx-open-launch-weapp>
</div>
......@@ -187,19 +183,8 @@
</div>
</template>
<script>
const { VUE_APP_ENV } = process.env;
import { getDetectionDetail, getDetectionDetailProces, getJumpToWebapp } from '@/api/detection';
// UNCOMMITTED(0,"待完善信息"),
// UNDER_DETECTION(1,"待采样"),
// UNPAID(6, "待支付"),
// DETECTING(2,"已采样"),
// COMPLETED(3,"已完成"),
// ARRIVED(21,"已送检"),
// ACCEPT(22,"已签收"),
// CHECK_ACCEPT(25,"已接收"),
// TESTING(27, "已上机"),
// CANCEL(4, "取消"),
// INVALID(5, "样本失效")
// 0待完善信息、1待采样、2已采样、21已送检、22快递已签收、 25实验室已收样、 27已上机、 3已完成、5样本失效、 6待支付
export default {
filters: {
sexFilter(val) {
......@@ -243,21 +228,13 @@ export default {
},
id: '',
dataDetail: {},
canClick: true,
needPaybackOrderid: '',
needPaybackGoodId: '',
payAmountData: [],
payLogId: '', // 预支付记录ID
dataList: [],
waitIcon: [0, 1, 6], // icon 显示等待状态
noShowBottomBtn: [0, 21, 22, 5, 1, 6, 2, 25, 27], // 这几种状态不显示底部操作按钮
openWebAppConfig:{
content:'<script' + ' type=text/wxtag-template><style>.btn {position:absolute; top: 0; left: 0; width:100%; height: 100%;}</style> <div class="btn"></div></' + 'script>', // 标签内容
username:'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康
path:'', // 打开页面
envVersion: VUE_APP_ENV != 'testing' ? 'release' : 'trial', // release 生产
extraData:''
path:'pagesInsurance/all-entrance/index', // 打开页面
extraData: JSON.stringify({})
},
openWebAppBtnName: '报告解读'
};
},
created() {
......@@ -268,13 +245,33 @@ export default {
},
methods: {
init() {
const that = this;
const ed = {
channelSource: 'insurance_channel',
targetPath: 'pagesInsurance/all-entrance/index',
query: {id:this.id},
fromOriginPage:'insuranceDetectionDetail',
};
getDetectionDetail(this.id).then((res) => {
if (res.code === '000000') {
this.dataDetail = res.data;
this.getDetailProces();
const {inquiryStatus} = res.data;
let n = '';
if(inquiryStatus == 0) {
ed.targetPath = '/pages/consultation-info/consultation/index';
n = '报告解读';
}else if([4, 6].includes(inquiryStatus)) {
n = '查看专家建议';
ed.targetPath = '/pages/health/detection-detail/index';
}else {
n = '已预约待咨询';
ed.targetPath = '/pages/consultation-im/index?initTRTC=false';
}
that.openWebAppBtnName = n;
console.log(res, 'eeeeeeeeeee', this.dataDetail);
} else {
this.$toast(res.message);
that.$toast(res.message);
}
});
},
......@@ -288,11 +285,10 @@ export default {
document.body.removeChild(input);
this.$toast('已复制');
console.log('已复制的内容:', val);
window.scrollTo(0, 1);
},
// 检测详情
getDetailProces() {
getDetectionDetailProces(this.id).then((res) => {
getDetectionDetailProces({id:this.id, channel: 4} ).then((res) => {
if (res.code === '000000') {
var flag = false;
const data = res.data || [];
......@@ -316,7 +312,6 @@ export default {
this.$toast(res.message);
}
});
console.log('999000999');
},
// 查看报告
seeReport() {
......@@ -340,7 +335,7 @@ export default {
if(this.picaWechat == 'wechat') {
return false;
}
const p = {params:{path:'pages/health/myCheck/index', query:'zl---test'}, type: 2};
const p = {params:{path:'pagesInsurance/all-entrance/index', query:{channelSource:'insurance_channel', detectionRecordId:this.id }}, type: 2};
getJumpToWebapp(p).then(res => {
console.log('--res', res);
window.location.href = res.data;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册