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

Merge branch 'feature/zl2' into 'develop'

Feature/zl2

See merge request !25
...@@ -9,10 +9,10 @@ export const getDetectionDetail = (id) => { ...@@ -9,10 +9,10 @@ export const getDetectionDetail = (id) => {
}; };
// 检测详情节点查询 // 检测详情节点查询
export const getDetectionDetailProces = (id) => { export const getDetectionDetailProces = (data) => {
return request({ return request({
method: 'get', method: 'get',
url: `/trade/detection/record/process/${id}`, url: `/trade/detection/record/process/${data.id}?channel=${data.channel}`,
withCredentials: true, withCredentials: true,
}); });
}; };
......
...@@ -228,7 +228,6 @@ export default { ...@@ -228,7 +228,6 @@ export default {
} }
console.log('geolocation', url); console.log('geolocation', url);
window.open(url); window.open(url);
}, },
bindingCode() { bindingCode() {
this.$router.push({ this.$router.push({
......
...@@ -113,10 +113,11 @@ ...@@ -113,10 +113,11 @@
提交 提交
</div> </div>
</div> </div>
<van-overlay <van-popup
z-index="11" v-model="showProtocol"
lock-scroll="false" position="bottom"
:show="showProtocol" :style="{ height: '80%' }"
:transition-appear="true"
@click="showProtocol = false" @click="showProtocol = false"
> >
<div class="protocol-content"> <div class="protocol-content">
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
知情并提交 知情并提交
</van-button> </van-button>
</div> </div>
</van-overlay> </van-popup>
<van-dialog <van-dialog
v-model="showBindingInfo" v-model="showBindingInfo"
confirm-button-color="#00BDA5" confirm-button-color="#00BDA5"
...@@ -206,9 +207,8 @@ export default { ...@@ -206,9 +207,8 @@ export default {
background: '', background: '',
}, },
showBindingInfo: false, showBindingInfo: false,
showEditModal: false,
isCheck: false, isCheck: false,
barCode: '020987654321', barCode: '',
protocolName: '', protocolName: '',
prototypeId: '', prototypeId: '',
prototypeLogId: '', prototypeLogId: '',
...@@ -247,28 +247,11 @@ export default { ...@@ -247,28 +247,11 @@ export default {
validateIdNo: 0, validateIdNo: 0,
}; };
this.detectionData = mock; this.detectionData = mock;
this.getProtocolName(); const { pprotocolType, detectionRecordId } = this.$route.query;
this.getRecordInfo(); this.getProtocolName(pprotocolType);
this.getRecordInfo(detectionRecordId);
}, },
methods: { methods: {
triggerEditModal() {
this.$dialog.confirm({
title: '确认提交',
message: '点击修改,将需要重新登记检测信息',
confirmButtonColor:'#00BDA5',
cancelButtonColor:'#00BDA5',
confirmButtonText:'确认',
cancelButtonText:'返回'
})
.then(() => {
// on confirm
})
.catch(() => {
// on cancel
});
this.showEditModal = true;
},
clearCode() { clearCode() {
this.barCode = ''; this.barCode = '';
}, },
...@@ -280,13 +263,13 @@ export default { ...@@ -280,13 +263,13 @@ export default {
scanType: ['barCode'], // 可以指定扫二维码还是一维码,默认二者都有 scanType: ['barCode'], // 可以指定扫二维码还是一维码,默认二者都有
success: function (res) { success: function (res) {
console.log('---res', res); console.log('---res', res);
const s = res.resultStr;
that.barCode = s && s.spilt(',')[1];
} }
}; };
this.$rocNative && this.$rocNative.scanQRCode(p, (res) => { this.$rocNative && this.$rocNative.scanQRCode(p, (res) => {
console.log('====', res); if(res.resultStr) {
const s = String(res.resultStr).split(',');
that.barCode = s[1];
}
}); });
}, },
toggleBindingInfo() { toggleBindingInfo() {
...@@ -336,9 +319,8 @@ export default { ...@@ -336,9 +319,8 @@ export default {
if (res.code !== '000000') { if (res.code !== '000000') {
return this.$toast(res.message); return this.$toast(res.message);
} }
this.agreeText = res.data;
this.showProtocol = true; this.showProtocol = true;
const protoData = res.data;
this.agreeText = protoData;
}); });
}, },
getProtocolName() { getProtocolName() {
......
...@@ -136,7 +136,6 @@ export default { ...@@ -136,7 +136,6 @@ export default {
document.execCommand('Copy'); document.execCommand('Copy');
document.body.removeChild(input); document.body.removeChild(input);
this.$toast('已复制'); this.$toast('已复制');
window.scrollTo(0, 1);
}, },
}, },
}; };
......
...@@ -168,18 +168,18 @@ ...@@ -168,18 +168,18 @@
</div> </div>
<!-- v-if="[3].includes(dataDetail.status)"--> <!-- v-if="[3].includes(dataDetail.status)"-->
<div <div
v-if="dataDetail.checkName"
class="submit-button" class="submit-button"
@click="getJumpToWebapp"
> >
<wx-open-launch-weapp <wx-open-launch-weapp
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%"
username="gh_e92f58174364" :username="openWebAppConfig.username"
path="pages/health/detection-detail/index" :path="openWebAppConfig.path"
:env-version="VUE_APP_ENV != 'testing' ? 'release' : 'trial'" env-version="trial"
:extra-data="{id: 113}" :extra-data="openWebAppConfig.extraData"
> >
<script type="text/wxtag-template"> <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">{{ dataDetail.checkName }}</div>
</script> </script>
</wx-open-launch-weapp> </wx-open-launch-weapp>
</div> </div>
...@@ -187,7 +187,8 @@ ...@@ -187,7 +187,8 @@
</div> </div>
</template> </template>
<script> <script>
const { VUE_APP_ENV } = process.env;
// const { VUE_APP_ENV } = process.env;
import { getDetectionDetail, getDetectionDetailProces, getJumpToWebapp } from '@/api/detection'; import { getDetectionDetail, getDetectionDetailProces, getJumpToWebapp } from '@/api/detection';
// UNCOMMITTED(0,"待完善信息"), // UNCOMMITTED(0,"待完善信息"),
// UNDER_DETECTION(1,"待采样"), // UNDER_DETECTION(1,"待采样"),
...@@ -252,16 +253,20 @@ export default { ...@@ -252,16 +253,20 @@ export default {
waitIcon: [0, 1, 6], // icon 显示等待状态 waitIcon: [0, 1, 6], // icon 显示等待状态
noShowBottomBtn: [0, 21, 22, 5, 1, 6, 2, 25, 27], // 这几种状态不显示底部操作按钮 noShowBottomBtn: [0, 21, 22, 5, 1, 6, 2, 25, 27], // 这几种状态不显示底部操作按钮
openWebAppConfig:{ 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>', // 标签内容 content:'', // 标签内容
username:'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康 username:'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康
path:'', // 打开页面 path:'pagesInsurance/all-entrance/index', // 打开页面
envVersion: VUE_APP_ENV != 'testing' ? 'release' : 'trial', // release 生产 extraData: JSON.stringify({})
extraData:''
}, },
}; };
}, },
created() { created() {
this.id = this.$route.query.id || 11073; this.id = this.$route.query.id || 11073;
this.openWebAppConfig.extraData = JSON.stringify({
channelSource: 'insurance_channel',
path: 'pagesInsurance/all-entrance/index',
query: {id:this.id}
});
this.init(); this.init();
}, },
mounted() { mounted() {
...@@ -288,11 +293,10 @@ export default { ...@@ -288,11 +293,10 @@ export default {
document.body.removeChild(input); document.body.removeChild(input);
this.$toast('已复制'); this.$toast('已复制');
console.log('已复制的内容:', val); console.log('已复制的内容:', val);
window.scrollTo(0, 1);
}, },
// 检测详情 // 检测详情
getDetailProces() { getDetailProces() {
getDetectionDetailProces(this.id).then((res) => { getDetectionDetailProces({id:this.id, channel: 4} ).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
var flag = false; var flag = false;
const data = res.data || []; const data = res.data || [];
...@@ -340,7 +344,7 @@ export default { ...@@ -340,7 +344,7 @@ export default {
if(this.picaWechat == 'wechat') { if(this.picaWechat == 'wechat') {
return false; 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 => { getJumpToWebapp(p).then(res => {
console.log('--res', res); console.log('--res', res);
window.location.href = res.data; window.location.href = res.data;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册