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

Merge branch 'feature/zl' into 'master'

init-project

See merge request !1
...@@ -7,7 +7,7 @@ if [ ! $hasGit ];then ...@@ -7,7 +7,7 @@ if [ ! $hasGit ];then
else else
git fetch --all git fetch --all
result=`git symbolic-ref --short -q HEAD` # 获取分支名 result=`git symbolic-ref --short -q HEAD` # 获取分支名
current_id=`git log -n 1 origin/release --pretty=format:"%H"` current_id=`git log -n 1 origin/develop --pretty=format:"%H"`
git reset --soft $current_id git reset --soft $current_id
git add . git add .
git commit -m "$msg" git commit -m "$msg"
......
import request from 'mn-template/plugins/http';
// 获取检测详情 接口
export const getDetectionDetail = (id) => {
return request({
method: 'get',
url: `/trade/detection/record/record/info/?detectionRecordId=${id}&userType=0`,
withCredentials: true,
});
};
// 检测详情节点查询
export const getDetectionDetailProces = (id) => {
return request({
method: 'get',
url: `/trade/detection/record/process/${id}`,
withCredentials: true,
});
};
// 发送报告到钉钉工作站
export const sendReportWorkStation = (data) => {
return request({
method: 'get',
url: `/store/admin/hospital/detection/reportShare/${data.id}?reportType=${data.reportType}`,
withCredentials: true,
});
};
// 获取报告
export const sendReportShareInfo = (data) => {
return request({
method: 'get',
url: `/store/admin/hospital/detection/reportShareInfo/${data.id}?reportType=${data.reportType}`,
withCredentials: true,
});
};
// 获取阳性报告类型列表
export const getTypeCodeList = () => {
return request({
url: 'basic-data/constants/app?typeCodeList=P326',
method: 'get',
withCredentials: true,
});
};
// 跟进报告提交
// /trade/detection/record/operation/submit
export const operationSubmit = (data) => {
return request({
method: 'post',
url: '/trade/detection/record/operation/submit',
data: data,
withCredentials: true,
});
};
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a
href="https://cli.vuejs.org"
target="_blank"
rel="noopener"
>vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li>
<a
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel"
target="_blank"
rel="noopener"
>babel</a>
</li>
<li>
<a
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint"
target="_blank"
rel="noopener"
>eslint</a>
</li>
</ul>
<h3>Essential Links</h3>
<ul>
<li>
<a
href="https://vuejs.org"
target="_blank"
rel="noopener"
>Core Docs</a>
</li>
<li>
<a
href="https://forum.vuejs.org"
target="_blank"
rel="noopener"
>Forum</a>
</li>
<li>
<a
href="https://chat.vuejs.org"
target="_blank"
rel="noopener"
>Community Chat</a>
</li>
<li>
<a
href="https://twitter.com/vuejs"
target="_blank"
rel="noopener"
>Twitter</a>
</li>
<li>
<a
href="https://news.vuejs.org"
target="_blank"
rel="noopener"
>News</a>
</li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li>
<a
href="https://router.vuejs.org"
target="_blank"
rel="noopener"
>vue-router</a>
</li>
<li>
<a
href="https://vuex.vuejs.org"
target="_blank"
rel="noopener"
>vuex</a>
</li>
<li>
<a
href="https://github.com/vuejs/vue-devtools#vue-devtools"
target="_blank"
rel="noopener"
>vue-devtools</a>
</li>
<li>
<a
href="https://vue-loader.vuejs.org"
target="_blank"
rel="noopener"
>vue-loader</a>
</li>
<li>
<a
href="https://github.com/vuejs/awesome-vue"
target="_blank"
rel="noopener"
>awesome-vue</a>
</li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
import LoadingComponent from './loading.vue';
const loading = {
install: function (Vue) {
// 创建一个Vue的“子类”组件
const LoadingConstructor = Vue.extend(LoadingComponent);
// 创建一个该子类的实例,并挂载到一个元素上
const instance = new LoadingConstructor();
// 将这个实例挂载到动态创建的元素上,并将元素添加到全局结构中
instance.$mount(document.createElement('div'));
document.body.appendChild(instance.$el);
// 在Vue的原型链上注册方法,控制组件
Vue.prototype.$loading = {
show: () => {
console.log('show');
instance.show = true;
},
hide: () => {
console.log('hide');
instance.show = false;
},
};
},
show() {
console.log('show');
},
};
export default loading;
<template>
<van-popup
v-model="show"
:close-on-click-overlay="false"
style="background-color: transparent"
>
<div class="loadingWrap">
<van-loading
v-if="show"
type="spinner"
/>
</div>
</van-popup>
</template>
<script>
export default {
name: 'Loading',
data() {
return {
show: false,
};
},
};
</script>
<style lang="sass" scoped>
.loadingWrap{
::v-deep .van-popup{
background-color:rgba(0,0,0,.7);
}
}
</style>
...@@ -2,3 +2,40 @@ import { router, store, vueApp } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/ ...@@ -2,3 +2,40 @@ import { router, store, vueApp } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/
import '@/router'; import '@/router';
console.log('router, store, vueApp: ', router, store, vueApp); console.log('router, store, vueApp: ', router, store, vueApp);
const { Vue } = window;
import Loading from '@/components/loading.js';
Vue.use(Loading);
// 禁用双指放大
var lastTouchEnd = 0;
document.addEventListener('touchstart', function (event) {
if (event.touches.length > 1) {
event.preventDefault();
}
});
document.addEventListener(
'touchend',
function (event) {
var now = new Date().getTime();
if (now - lastTouchEnd <= 300) {
event.preventDefault();
}
lastTouchEnd = now;
},
false
);
document.documentElement.addEventListener(
'touchstart',
function (event) {
if (event.touches.length > 1) {
event.preventDefault();
}
},
{
passive: false,
}
);
vueApp.$rocNative.appInit();
console.log('router, store, vueApp: ', router, store, vueApp);
console.log('window :>> ', window);
/**
* @name: router-config
* @author: alan
* @date: 2022-01-04 19:29
* @description:router-config
* @update: 2022-01-04 19:29
*/
export default { export default {
scrollBehavior(to, from, savedPosition) {
if (savedPosition && to.meta.keepAlive) {
return savedPosition;
}
return { x: 0, y: 0 };
},
}; };
/**
* @name: vue-component
* @author: alan
* @date: 2021-11-16 18:03
* @description:vue-component
* @update: 2021-11-16 18:03
*/
import Vue from 'vue'; import Vue from 'vue';
import picaGuideApp from '@pica-kit/pica-ui-component/lib/pica-guide-app';
import PageModel from '@pica-kit/page-model'; import PageModel from '@pica-kit/page-model';
Vue.use(picaGuideApp);
Vue.use(PageModel); Vue.use(PageModel);
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
*/ */
import Vue from 'vue'; import Vue from 'vue';
import WebBuriedPoint, {sendBuriedData} from '@pica-core/web-buried-point'; import WebBuriedPoint, {sendBuriedData} from '@pica-core/web-buried-point';
import picaBridge from '@pica-core/JsBridge';
const {name} = require('../../package.json'); const {name} = require('../../package.json');
Vue.prototype.$sendBuriedData = sendBuriedData; Vue.prototype.$sendBuriedData = sendBuriedData;
Vue.prototype.$rocNative = new picaBridge();
Vue.use(WebBuriedPoint, { Vue.use(WebBuriedPoint, {
class_name: name, class_name: name,
url: `${process.env.VUE_APP_SERVICE_URL}/file/log/trace1`, url: `${process.env.VUE_APP_SERVICE_URL}/file/log/trace1`,
......
import { router } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/auto'; import { router } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/auto';
import Index from '@/views/index.vue'; import insuranceBindCode from '@/views/insurance-bind-code/insurance-bind-code';
import insuranceDetectionDetail from '@/views/insurance-detection-detail/insurance-detection-detail';
import {toggleSkeletonRouter} from 'mn-template/plugins/toggleSkeleton.js'; import {toggleSkeletonRouter} from 'mn-template/plugins/toggleSkeleton.js';
import handleAllRouter from '../public_uat'; import handleAllRouter from '../public_uat';
const routerConfig = [ const routerConfig = [
{ {
path: '/', path: '/insuranceBindCode',
name: 'Index', name: 'insuranceBindCode',
component: Index component: insuranceBindCode
},
{
path: '/insuranceDetectionDetail',
name: 'insuranceDetectionDetail',
component: insuranceDetectionDetail
}, },
{ {
path: '*', path: '*',
......
该目录下放置需要路由的页面
> 如开启自动创建路由配置,则会自动把该目录的vue文件自动配置到routers。
#### 以__(两个下划线,例如__foo __.vue)开头和结尾的目录和文件将被忽略。
例如:
```
views/
├── __partial__.vue
├── index.vue
├── users.vue
└── users/
└── _id.vue
```
自动生成路由:
```js
export default [
{
name: 'index',
path: '/',
component: () => import('@/views/index.vue')
},
{
name: 'users',
path: '/users',
component: () => import('@/views/users.vue'),
children: [
{
name: 'users-id',
path: ':id?',
component: () => import('@/views/users/_id.vue')
}
]
}
]
```
如果路由页面采用分文件方式:template 为.vue文件,scss为样式等:
```
views/
└── users/
└── index.vue
```
自动生成路由:
```js
export default [
{
name: 'users',
path: '/users',
component: () => import('@/views/users/index.vue')
}
]
```
如果要使路由参数为必须,则创建一个该参数的目录,然后在该目录中添加`index.vue`。 在上面的示例中,如果将`users/_id.vue`替换为`users/_id/index.vue`,则需要:`id`参数。
### <route> 自定义标签块
如果页面组件有<route>自定义标签块,则该标签内的内容json将与route config合并。
例如,如果index.vue具有以下<route>块:
```vue
<route>
{
"name": "home",
"meta": {
"requiresAuth": true
}
}
</route>
<template>
<h1>Hello</h1>
</template>
```
生成的路由配置如下:
```js
module.exports = [
{
name: 'home',
path: '/',
component: () => import('@/views/index.vue'),
meta: {
requiresAuth: true
}
}
]
```
<template>
<fragment>
<H1 class="flex-row flex-center">
This is Demo Page
</H1>
<div class="flex-row flex-center">
store.count: {{ count }}
</div>
</fragment>
</template>
<script>
export default {
name: 'Home',
computed: {
count () {
return this.$store.state.home.count;
}
},
mounted () {
console.log(this.$route.meta); // {requiresAuth: true}
const a = 1;
let b = 2;
b = 3;
console.log(b);
console.log(a);
},
methods: {
}
};
</script>
<style scoped>
</style>
<template>
<div class="insurance-binding-code-container">
<page-model
ref="PageModel"
:header-info="headerInfo"
/>
<div class="code-container">
<div class="code-content">
<div class="code-input-item-l detection-container">
<div class="input-title">
检测服务
</div>
<div class="input-content">
<div
type="text"
class="code"
placeholder-style="font-size: 32px;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #999999;"
>
{{ checkName || '' }}
</div>
<div class="code-input-item-r">
<div
class="scan-qr-img-container"
@click="triggerEditModal"
>
修改
</div>
</div>
</div>
</div>
</div>
</div>
<div class="code-container">
<div
class="code-content"
:class="{'bar-code-content' : errorMessage != ''}"
>
<div class="code-input-item-l">
<div class="input-title">
条形码
</div>
<div class="input-content-group">
<div class="input-content input-content-scan">
<input
v-model="barCode"
type="text"
class="code"
placeholder-style="font-size: 32px;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #999999;"
placeholder="请输入条形码"
>
<div class="code-input-item-r">
<div
v-if="barCode"
class="clear-img-container"
@click="clearCode"
>
<img
class="clear-img"
src="https://files.yunqueyi.com/icon/2022/clear.png"
/>
</div>
<div
class="scan-qr-img-container-code"
@click="scanCode()"
>
<img
class="scan-qr-img"
src="https://files.yunqueyi.com/image/png/common/20221128114549858.png"
mode=""
/>
<span>扫码识别</span>
</div>
</div>
</div>
<div
v-if="errorMessage != ''"
class="input-error-message"
>
{{ errorMessage || '' }}
</div>
</div>
</div>
</div>
</div>
<div class="sumbit-button-top">
<div
class="sumbit-button"
:class="barCode.length > 0 ? 'sumbit-button-active' : ''"
@click="toggleBindingInfo"
>
提交
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
headerInfo: {
title: '绑定条码',
isBlack: false,
backMethod: 'web',
style: 'zIndex:100;',
background: '',
},
showBindingInfo: false,
showEditModal: false,
isCheck: false,
barCode: '',
protocolName: '',
prototypeId: '',
prototypeLogId: '',
isLoading: false,
recordInfo: {
name: '',
sex: '',
date: '',
checkName: ''
},
goodsId: '',
status: '',
errorMessage: '',
detectionRecordId: '',
showProtocol: false,
agreeText: '',
};
},
computed: {
},
created() {
},
methods: {
}
};
</script>
<style lang="scss" scoped>
.insurance-binding-code-container{
width: 100%;
background-color: #F5F6F8;
height: 100%;
position: absolute;
}
</style>
.d-box {
background-color: #f5f6f8;
min-height: 100vh;
width: 100%;
position: relative;
.title {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 260px;
background: linear-gradient(180deg, #00bda5 0%, #20c5b0 52%, #f5f6f8 100%);
}
}
.detail-box {
padding: 0 12px;
height: auto;
padding-bottom: 60px;
position: relative;
z-index: 1;
.status {
padding: 16px 0;
display: flex;
align-items: center;
img {
width: 27px;
}
div {
padding-left: 9px;
width: 120px;
height: 20px;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 20px;
}
}
.content {
height: auto;
.info {
width: 100%;
height: auto;
background: #ffffff;
border-radius: 10px;
margin-bottom: 10px;
padding-top: 20px;
.list {
padding: 0px 15px 12px 15px;
display: flex;
justify-content: flex-start;
align-items: center;
.l-left {
width: 62px;
height: 14px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 14px;
}
.l-right {
padding-left: 2px;
width: auto;
height: auto;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #212121;
flex: 1;
line-height: 20px;
span {
display: inline-block;
padding-right: 15px;
}
}
}
.list-bottom {
padding: 0px 15px 15px 15px;
.l-b-code {
padding: 16px 14px;
padding-bottom: 3px;
height: auto;
background: #f7fffe;
border-radius: 11px;
border: 0.5px solid #ade9e1;
.l-b-list {
display: flex;
justify-content: flex-start;
align-items: center;
padding-bottom: 13px;
.l-left {
width: auto;
height: 15px;
font-size: 15px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #212121;
line-height: 15px;
}
.l-right {
padding-left: 6px;
height: 15px;
font-size: 15px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #00bda5;
line-height: 15px;
}
.l-copy {
text-align: center;
width: 41px;
height: 20px;
border-radius: 10px;
border: 0.5px solid #00bda5;
font-size: 12px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #00bda5;
line-height: 22px;
margin-left: 6px;
margin-top: -2px;
}
}
}
}
}
.flow {
padding: 20px;
height: auto;
background: #ffffff;
border-radius: 10px;
.express-step {
display: flex;
padding-bottom: 24px;
position: relative;
justify-content: flex-start;
.express-step-icon {
width: 18px;
height: 18px;
margin-right: 7px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 2;
.step-pg {
margin-left: -11px;
display: block;
width: 18px;
height: auto;
}
.oval-pg {
display: block;
width: 6px;
height: 6px;
}
}
.express-step-msg {
.step-title {
height: 18px;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #999999;
line-height: 18px;
}
.step-m {
width: 300px;
word-break:break-all;
margin-top: 4px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 19px;
}
.step-unusual {
color: #ff4b33;
}
.step-time {
margin-top: 5px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 12px;
}
}
.noButton {
margin-left: 22px;
}
&::before {
content: '';
position: absolute;
top: 5px;
left: 0;
display: block;
width: 6px;
height: 6px;
border-radius: 50%;
background: #e7e7e7;
}
&::after {
content: '';
position: absolute;
top: 11px;
bottom: 0;
height: calc(100% - 5px);
left: 3px;
display: block;
width: 1px;
background: #e7e7e7;
}
&.first {
&::before {
display: none;
}
}
&.last {
padding-bottom: 0;
&::after {
display: none;
}
}
}
.isComplate {
&::after {
background: #00bda5;
}
&::before {
background: #00bda5;
}
.express-step-msg {
.step-title {
color: #212121;
}
}
}
.hideCircle {
&::before {
width: 0;
display: none;
}
.express-step-msg {
.step-title {
color: #212121;
}
}
}
}
}
}
.sumbit-container {
box-sizing: border-box;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 99;
padding: 5px 12px;
z-index: 99;
padding-bottom: calc(5px + env(safe-area-inset-bottom) / 2);
background: #ffffff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.sumbit-button {
width: 352px;
height: 40px;
background: #d9d9d9;
border-radius: 20px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 700;
color: #ffffff;
font-size: 16px;
display: flex;
align-items: center;
background: #00bda5;
justify-content: center;
}
}
<template>
<div class="d-box">
<page-model
ref="PageModel"
:header-info="headerInfo"
/>
<div class="title" />
<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"
src="https://files.yunqueyi.com/image/png/common/20220817141150961.png"
alt="success"
>
<img
v-else
src="https://files.yunqueyi.com/image/png/common/20220816135250298.png"
alt="success"
>
<div>{{ dataDetail.status | statusFilter }}</div>
</div>
<div class="content">
<div class="info">
<div class="list">
<p class="l-left">
受检人:
</p>
<p class="l-right">
<span>{{ dataDetail.patientName || '--' }}</span><span>{{ dataDetail.sex | sexFilter }}</span><span class="font">{{
dataDetail.ageMonth
? dataDetail.ageMonth + '月'
: dataDetail.patientAge + '岁'
}}</span>
</p>
</div>
<div class="list">
<p class="l-left">
检测项目:
</p>
<p class="l-right">
{{ dataDetail.checkName || '--' }}
</p>
</div>
<div class="list">
<p class="l-left">
开单医生:
</p>
<p class="l-right">
{{ dataDetail.doctorName || '--' }}
</p>
</div>
<div class="list">
<p class="l-left">
检测编号:
</p>
<p class="l-right">
{{ dataDetail.recordNo || '--' }}
</p>
</div>
<div
v-if="dataDetail.status != 0 && dataDetail.status != 1"
class="list-bottom"
>
<div class="l-b-code">
<div class="l-b-list">
<div class="l-left">
条形码:
</div>
<div class="l-right">
{{ dataDetail.sampleCode || '--' }}
</div>
<div
class="l-copy"
@click="copyText(dataDetail.sampleCode)"
>
复制
</div>
</div>
<div
v-if="[2, 21, 22, 25].includes(Number(dataDetail.status|| 0))"
class="l-b-list"
>
<div class="l-left">
预期报告生成时间:
</div>
<div class="l-right">
{{
dataDetail.detectChargeType == 10
? dataDetail.reportExpectDate
: dataDetail.reportExpectDateHigh
}}
</div>
</div>
<div
v-if="dataDetail.status == 3"
class="l-b-list"
>
<div class="l-left">
报告生成时间
</div>
<div class="l-right">
{{ dataDetail.reportDate }}
</div>
</div>
</div>
</div>
</div>
<div class="flow">
<div class="f-list">
<div
v-for="(item, index) in dataList"
:key="index"
class="express-step"
:class="{
hideCircle: item.status == dataDetail.status,
last: index == dataList.length - 1,
isComplate: item.complate,
}"
>
<div
v-if="item.status == dataDetail.status"
class="express-step-icon"
>
<!-- 等待 -->
<img
v-if="waitIcon.indexOf(item.status) != -1"
class="step-pg"
src="https://files.yunqueyi.com/image/png/common/20220816120131913.png"
mode="aspectFill"
>
<!-- 成功 -->
<img
v-else
class="step-pg"
src="https://files.yunqueyi.com/image/png/common/2022081612011851.png"
mode="aspectFill"
>
</div>
<div
class="express-step-msg"
:class="{ noButton: item.status != dataDetail.status }"
>
<div class="step-title">
{{ item.nodeName }}
</div>
<div
v-if="item.exceptionDetail && item.exceptionDetail.exceptionTypeStr"
class="step-m step-unusual"
>
<span
class="fb"
>{{ item.exceptionDetail.exceptionTypeStr }}:
</span>
<span
v-if="item.exceptionDetail.exceptionDesc"
class="text-abnormal"
>{{ item.exceptionDetail.exceptionDesc }}</span>
</div>
<div
v-else
class="step-m"
:class="{ 'step-unusual': item.status == 5 }"
>
{{ item.nodeDesc }}
</div>
<div
v-if="item.nodeTime"
class="step-time"
>
{{ item.nodeTime }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-if="
noShowBottomBtn.indexOf(dataDetail.status) == -1 ||
(dataDetail.status == 6 && !dataDetail.detectOrderType)
"
class="sumbit-container"
>
<div
class="sumbit-button"
@click="bottomBtnFun"
>
{{ dataDetail.status | showBtnTextFilter }}
</div>
</div>
<!-- howBtn == 0 针对诺辉的走单独送检流程 不显示去送检按钮 -->
<div
v-if="dataDetail.status == 2 && dataDetail.showSendBtn == 1"
class="sumbit-container"
>
<div
class="sumbit-button"
@click="bottomBtnFun"
>
去送检
</div>
</div>
</div>
</template>
<script>
import { getDetectionDetail, getDetectionDetailProces } from '@/api/detection';
export default {
filters: {
sexFilter(val) {
const str = val == 2 ? '女' : '男';
return str;
},
showReportTime(val) {
console.log(val, 'val----===');
if (val == 2 || val == 22 || val == 21) {
return true;
} else {
return false;
}
},
statusShowFilter(val) {
// 10:免费;20:收费
if (!val || val == 1) {
return false;
} else {
return true;
}
},
statusFilter(type) {
const obj = {
0: '待完善信息',
1: '待采样',
2: '已采样',
21: '已送检',
25: '已接收',
27: '已上机',
22: '已签收',
3: '已完成',
5: '样本失效',
6: '待支付',
};
return obj[type];
},
showBtnTextFilter(status) {
// 0 21 2 22
const obj = {
6: '立即支付', // 待支付
1: '绑定条形码', // 待采样
3: '查看报告', // 已完成
2: '样本送检',
};
return obj[status];
},
},
data() {
return {
status: '',
headerInfo: {
title: '检测详情',
isBlack: false,
backMethod: 'web',
style: 'zIndex:100;',
background: '',
},
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], // 这几种状态不显示底部操作按钮
};
},
created() {
this.id = this.$route.query.id || 123;
this.init();
},
mounted() {
},
methods: {
init() {
getDetectionDetail(this.id).then((res) => {
if (res.code === '000000') {
this.dataDetail = res.data;
this.getDetailProces();
console.log(res, 'eeeeeeeeeee', this.dataDetail);
} else {
this.$toast(res.message);
}
});
},
copyText(val) {
const input = document.createElement('input');
input.value = val;
document.body.appendChild(input);
input.select();
input.setSelectionRange(0, input.value.length);
document.execCommand('Copy');
document.body.removeChild(input);
this.$toast('已复制');
console.log('已复制的内容:', val);
window.scrollTo(0, 1);
},
sampleDetection() {
// 样本送检测sale-mall-crm/sample-inspection?hospitalId=58436
this.$router.push({
name: 'SampleInspection',
query: {
hospitalId: this.dataDetail.hospitalId,
},
});
},
// 检测详情
getDetailProces() {
getDetectionDetailProces(this.id).then((res) => {
if (res.code === '000000') {
var flag = false;
const data = res.data || [];
console.log(this.dataDetail);
data.forEach((item) => {
if (item.status == this.dataDetail.status) {
item.complate = false;
flag = true;
} else {
console.log(flag, 'flag');
if (!flag) {
item.complate = true;
} else {
item.complate = false;
}
}
});
this.dataList = data;
console.log(this.dataList, 'res111111');
} else {
this.$toast(res.message);
}
});
console.log('999000999');
},
// 查看报告
seeReport() {
// window.open(this.dataDetail.reportUrl + '?response-content-type=application/pdf');
const l =
this.dataDetail.reportUrl + '?response-content-type=application/pdf';
this.$DDObj.ddOpenLink({ url: l });
},
bottomBtnFun() {
// 底部按钮点击
const objFun = {
3: 'seeReport', // 已完成 查看报告
// 1: 'goBindCode', // 待采样 绑定条形码
// 6: 'goPay', // 去支付
2: 'sampleDetection', // 去送检
};
console.log(this.dataDetail.status);
const funName = objFun[this.dataDetail.status];
console.log(funName);
funName && this[funName]();
},
},
};
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册