Browse Source

适配手机端样式修改

master
aBin 4 years ago
parent
commit
16093856be
  1. 22
      src/App.vue
  2. 4
      src/common/portrait.styl
  3. 4
      src/components/BiologicalSampleSearch/Search.vue
  4. 18
      src/components/Echarts/Treemap.vue
  5. 168
      src/components/PatientInfo/PatientTable.vue
  6. 12
      src/components/PatientInfo/Search.vue
  7. 2
      src/store/modules/home/state.js
  8. 559
      src/views/PatientInfo/PatientInfo.vue
  9. 4
      src/views/ProjectAssistant/General.vue
  10. 4
      src/views/SelectPatient/SelectPatient.vue

22
src/App.vue

@ -2,13 +2,13 @@
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19
* @LastEditors: wally
* @LastEditTime: 2021-05-24 15:33:46
* @LastEditors: aBin
* @LastEditTime: 2021-05-28 16:42:55
-->
<template>
<a-config-provider :locale="zh_CN">
<div class="d-flex flex-row flex-nowrap" id="app">
<!-- <btn-con /> -->
<btn-con />
<router-view class="flex-1 bg" style="padding: 6px"></router-view>
</div>
</a-config-provider>
@ -17,12 +17,12 @@
<script>
import { mapState, mapActions, mapMutations } from 'vuex';
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
// import BtnCon from 'components/BtnCom/BtnCon.vue';
import BtnCon from 'components/BtnCom/BtnCon.vue';
import { getHId } from 'config/api';
export default {
name: 'App',
// components: { BtnCon },
components: { BtnCon },
data() {
return { zh_CN };
},
@ -38,12 +38,12 @@ export default {
}
},
},
created() {
// async created() {
// const userId = '1387952026067013632';
// const params = { userId };
// await this.getUserId(params);
// await this.getToken();
// created() {
async created() {
const userId = '1387952026067013632';
const params = { userId };
await this.getUserId(params);
await this.getToken();
if (localStorage.getItem('patientId')) {
this.setPatientId(localStorage.getItem('patientId'));
}

4
src/common/portrait.styl

@ -201,8 +201,8 @@
.bot-right-btn{
position: fixed;
height: 40px;
right: 50px;
bottom: 150px;
right: 6px;
bottom: 20px;
}
.bot-right-tips {
position: fixed;

4
src/components/BiologicalSampleSearch/Search.vue

@ -2,8 +2,8 @@
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-05-20 10:07:43
* @LastEditors: aBin
* @LastEditTime: 2021-05-28 09:18:00
-->
<template>
<!-- search -->

18
src/components/Echarts/Treemap.vue

@ -53,8 +53,13 @@ export default {
},
},
watch: {
hospitalId() {
this.init(this.drawLine);
async hospitalId() {
this.valueList = [];
this.nameList = [];
this.maxNum = 0;
if (this.valueList === [] && this.nameList === [] && this.maxNum === 0) {
await this.init(this.drawLine);
}
},
},
mounted() {
@ -64,11 +69,12 @@ export default {
async drawLine() {
// domecharts
await this.getData();
let myChart = document.getElementById('Treemap');
let myChart = this.$echarts.init(document.getElementById('Treemap'));
//
myChart.removeAttribute('_echarts_instance_');
let myChart1 = this.$echarts.init(myChart);
myChart1.setOption(this.option);
// myChart.removeAttribute('_echarts_instance_');
// let myChart1 = this.$echarts.init(myChart);
myChart.clear();
myChart.setOption(this.option);
},
async getData() {
try {

168
src/components/PatientInfo/PatientTable.vue

@ -74,6 +74,31 @@
</a-popconfirm>
</div>
</template>
<template slot="expandedRowRender" slot-scope="record">
<div class="d-flex flex-wrap">
<p class="fill-width">住院号 {{ record.hospitalization }}</p>
<p class="fill-width">主治医生 {{ record.doctorName }}</p>
<p class="fill-width">
状态
{{
record.inputStatus === 0
? '新建'
: record.inputStatus === 1
? '数据收集中'
: record.inputStatus === 2
? '数据收集按时完成'
: record.inputStatus === 3
? '数据收集超时'
: record.inputStatus === 4
? '废弃'
: record.inputStatus === 5
? '审核通过'
: '已结算'
}}.
</p>
</div>
</template>
</a-table>
</div>
<a-empty v-else />
@ -91,62 +116,6 @@
import { mapMutations, mapState } from 'vuex';
import { checkPatientComplete, upPatientMes } from 'config/api';
const columns = [
// {
// title: '',
// align: 'center',
// dataIndex: 'id',
// width: 60,
// key: 'id',
// scopedSlots: { customRender: 'id' },
// },
{
title: '研究编号',
align: 'center',
dataIndex: 'code',
width: 100,
key: 'code',
},
{
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
width: 160,
key: 'hospitalization',
},
{
title: '主治医生',
align: 'center',
dataIndex: 'doctorName',
width: 100,
key: 'doctorName',
},
{
title: '组别',
align: 'center',
dataIndex: 'name',
width: 160,
key: 'name',
},
{
title: '状态',
align: 'center',
dataIndex: 'inputStatus',
key: 'inputStatus',
width: 120,
scopedSlots: { customRender: 'inputStatus' },
},
{
title: '操作',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 80,
textAlign: 'center',
scopedSlots: { customRender: 'edit' },
},
];
export default {
name: 'PatientTable',
@ -154,7 +123,7 @@ export default {
data() {
return {
columns,
columns: [],
loading: false,
hasPatientId: false,
patientId: '', // Id
@ -170,6 +139,7 @@ export default {
height: '30px',
lineHeight: '30px',
},
isMobile: false,
};
},
@ -184,6 +154,84 @@ export default {
},
},
mounted() {
if (this._isMobile()) {
this.columns = [
{
title: '研究编号',
align: 'center',
dataIndex: 'code',
width: 100,
key: 'code',
},
{
title: '组别',
align: 'center',
dataIndex: 'name',
width: 160,
key: 'name',
},
{
title: '操作',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 80,
textAlign: 'center',
scopedSlots: { customRender: 'edit' },
},
];
} else {
this.columns = [
{
title: '研究编号',
align: 'center',
dataIndex: 'code',
width: 100,
key: 'code',
},
{
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
width: 160,
key: 'hospitalization',
},
{
title: '主治医生',
align: 'center',
dataIndex: 'doctorName',
width: 100,
key: 'doctorName',
},
{
title: '组别',
align: 'center',
dataIndex: 'name',
width: 160,
key: 'name',
},
{
title: '状态',
align: 'center',
dataIndex: 'inputStatus',
key: 'inputStatus',
width: 120,
scopedSlots: { customRender: 'inputStatus' },
},
{
title: '操作',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 80,
textAlign: 'center',
scopedSlots: { customRender: 'edit' },
},
];
}
},
methods: {
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode', 'setShowTable']),
showModal(id, hospitalization, recordCode) {
@ -191,6 +239,12 @@ export default {
this.hospitalization = hospitalization;
this.recordCode = recordCode;
},
_isMobile() {
let flag = navigator.userAgent.match(
/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i,
);
return flag;
},
handleOk() {
this.chooseItem(this.patientId, this.hospitalization, this.recordCode);

12
src/components/PatientInfo/Search.vue

@ -2,14 +2,14 @@
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19
* @LastEditors: wally
* @LastEditTime: 2021-05-11 11:14:47
* @LastEditors: aBin
* @LastEditTime: 2021-05-28 09:28:47
-->
<template>
<!-- search -->
<div>
<div class="d-flex flex-row flex-nowrap">
<a-form :form="form" @submit="handleSubmit" class="d-flex flex-nowrap align-center" layout="inline">
<a-form :form="form" @submit="handleSubmit" class="d-flex flex-wrap align-center" layout="inline">
<a-form-item>
<a-input placeholder="研究编号" style="width: 10em" v-decorator="['code']" />
</a-form-item>
@ -21,10 +21,12 @@
<a-select-option :key="item.id" :value="item.id" v-for="item in controlGroups">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-button class="mr-2" html-type="submit" icon="search" type="primary">搜索</a-button>
</a-form>
<div class="flex-1"></div>
<a-button @click="showModal" class="mt-1" html-type="submit" icon="plus" type="primary">新增</a-button>
<div style="text-align: right">
<a-button class="mt-1 mb-1" html-type="submit" icon="search" type="primary">搜索</a-button>
<a-button @click="showModal" class="ml-2 mt-1" html-type="submit" icon="plus" type="primary">新增</a-button>
</div>
</div>
<patient-add :visible="visible" @closeModal="closeModal" @searchMes="searchMes" />
</div>

2
src/store/modules/home/state.js

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19
* @LastEditors: wally
* @LastEditTime: 2021-05-20 09:30:53
* @LastEditTime: 2021-05-26 10:07:28
*/
const state = {
anyringToken: '',

559
src/views/PatientInfo/PatientInfo.vue

@ -1,11 +1,13 @@
<template>
<div class="flex-column">
<a-tabs @change="callback" type="card">
<a-tab-pane :key="item" :tab="typeof item === 'number' ? item + '天' : item" v-for="item in tabList" width="100" />
</a-tabs>
<div :style="{ width: width }">
<a-tabs @change="callback" tab-position="top">
<a-tab-pane :key="item" :tab="typeof item === 'number' ? item + '天' : item" v-for="item in tabList" width="100" />
</a-tabs>
</div>
<a-form :form="form" v-if="typeof tabNums === 'number'">
<a-spin :spinning="spinning">
<a-collapse v-model="activeKey" style="boeder-bottom: none !important">
<a-collapse v-model="activeKey" style="boeder-bottom: none !important" accordion>
<!-- 首先遍历整个data大数组 -->
<!-- <div v-for="(item, index) in list" :key="index"> -->
<a-collapse-panel :header="item.name" :key="index.toString()" v-for="(item, index) in list">
@ -84,7 +86,7 @@
style="width: 100%"
>
<a-row class="flex-1 flex-wrap">
<div style="width: 100%" :key="indexNum" :span="24" v-for="(ques, indexNum) in a.optionVos">
<div style="width: 60%" :key="indexNum" :span="24" v-for="(ques, indexNum) in a.optionVos">
<a-col>
<a-checkbox :value="ques.submitValue">{{ ques.showValue }}</a-checkbox>
</a-col>
@ -305,7 +307,11 @@
/>
</div>
<div v-else-if="h.type === 15">
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" />
<a-time-picker
placeholder="时间选择"
:input-read-only="true"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
</div>
<div v-else-if="h.type === 16">
<a-date-picker
@ -367,7 +373,11 @@
return item.testQuestionsId === a.id && item.contents === `${j.showValue}`;
}) &&
j.afterOperation > 0) ||
(j.afterOperation > 0 && (j.showValue === a.answer || getRadioAnswer(a.optionVos) === j.showValue))
(j.afterOperation > 0 &&
(j.showValue === a.answer || getRadioAnswer(a.optionVos) === j.showValue) &&
!contentList.find(item => {
return item.testQuestionsId === a.id;
}))
"
>
<a-input
@ -383,222 +393,207 @@
@change="inputChange(a.id, $event, j.showValue)"
></a-textarea>
<div v-else-if="j.afterOperation === 3" :key="i" v-for="(h, i) in j.questionVos" style="position: relative">
<a-form-item
:label-col="formItemLayout1.labelCol"
:wrapper-col="formItemLayout1.wrapperCol"
class="d-flex align-center mb-3"
>
<a-form-item
:label="h.question"
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="d-flex align-center mb-3"
<a-form-item :label="h.question" class="d-flex align-center mb-3">
<a-input
:max-length="500"
@change="onChange($event, h.type, h.id, h.recordId)"
style="width: 100%"
v-if="h.type === 1"
v-model="h.answer"
/>
<a-textarea
@change="onChange($event, h.type, h.id)"
style="height: 150px; width: 100%"
v-else-if="h.type === 2"
v-model="h.answer"
/>
<a-select
@change="onChange($event, h.type, h.id, h.recordId)"
style="width: 120px"
v-else-if="h.type === 5"
v-model="h.answer"
>
<a-input
:max-length="500"
@change="onChange($event, h.type, h.id, h.recordId)"
style="width: 100%"
v-if="h.type === 1"
v-model="h.answer"
/>
<a-textarea
@change="onChange($event, h.type, h.id)"
style="height: 150px; width: 100%"
v-else-if="h.type === 2"
v-model="h.answer"
/>
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{ b.showValue }}</a-select-option>
</a-select>
<a-date-picker
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''"
@change="onChange($event, h.type, h.id, h.recordId)"
placeholder="日期选择"
:input-read-only="true"
show-time
style="width: 100%"
v-else-if="h.type === 6"
/>
<div v-else-if="h.type === 7">
<a-upload
:action="action"
:headers="headers"
:default-file-list="getDefultList(h.answer, h.domList)"
@change="fileChange($event, h.id)"
:before-upload="beforeUpload1"
list-type="picture"
name="files"
v-if="code || showrzlb"
>
<a-button> <a-icon type="upload" />点击上传 </a-button>
</a-upload>
<img :src="h.answer" v-if="h.answer && !code" />
<template v-if="h.domList && h.domList.length && !code">
<img v-for="imgSrc in h.domList" :key="imgSrc" :src="imgSrc" />
</template>
</div>
<div v-else-if="h.type === 10">
<a-select
:default-value="getAnswer(h.answer)"
@change="onChange($event, h.type, h.id, h.recordId)"
style="width: 120px"
v-else-if="h.type === 5"
v-model="h.answer"
style="width: 100%"
>
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{
b.showValue
}}</a-select-option>
</a-select>
<a-date-picker
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''"
@change="onChange($event, h.type, h.id, h.recordId)"
placeholder="日期选择"
:input-read-only="true"
show-time
style="width: 100%"
v-else-if="h.type === 6"
/>
<div v-else-if="h.type === 7">
<a-upload
:action="action"
:headers="headers"
:default-file-list="getDefultList(h.answer, h.domList)"
@change="fileChange($event, h.id)"
:before-upload="beforeUpload1"
list-type="picture"
name="files"
v-if="code || showrzlb"
>
<a-button> <a-icon type="upload" />点击上传 </a-button>
</a-upload>
<img :src="h.answer" v-if="h.answer && !code" />
<template v-if="h.domList && h.domList.length && !code">
<img v-for="imgSrc in h.domList" :key="imgSrc" :src="imgSrc" />
</template>
</div>
<div v-else-if="h.type === 10">
<a-select
:default-value="getAnswer(h.answer)"
@change="onChange($event, h.type, h.id, h.recordId)"
style="width: 100%"
>
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{
b.showValue
}}</a-select-option>
</a-select>
<div :key="c" v-for="(b, c) in h.optionVos">
<div
v-if="
(contentList.find(item => {
return item.testQuestionsId === h.id && item.contents === `${b.showValue}`;
}) &&
b.afterOperation === 1) ||
(b.afterOperation === 1 &&
!contentList.find(item => {
return item.testQuestionsId === h.id;
}))
"
>
<a-form-item class="d-flex align-center mb-3">
<a-input
:max-length="500"
@change="inputChange(h.id, $event, b.showValue)"
style="width: 100%"
v-model="b.otherInformation"
></a-input>
</a-form-item>
</div>
</div>
</div>
<div v-else-if="h.type === 4">
<a-checkbox-group
:default-value="getList(h.optionVos)"
@change="onChange($event, h.type, h.id, h.recordId)"
class="d-flex flex-row flex-wrap"
style="width: 100%"
>
<a-row class="flex-1 flex-wrap">
<div style="width: 100%" :key="indexNum" :span="24" v-for="(ques, indexNum) in h.optionVos">
<a-col>
<a-checkbox :value="ques.submitValue">{{ ques.showValue }}</a-checkbox>
</a-col>
<a-col>
<div
v-if="
(contentList.find(item => {
return item.testQuestionsId === h.id && item.contents === `${ques.showValue}`;
}) &&
ques.afterOperation > 0) ||
(ques.afterOperation > 0 && ques.choose === 1)
"
>
<!-- <div v-if="ques.afterOperation > 0"> -->
<a-input
:max-length="500"
@change="inputChange1(h.id, $event, ques.showValue, h.recordId, h.optionVos, ques.id)"
style="width: 100%"
v-model="ques.otherInformation"
v-if="ques.afterOperation === 1"
/>
<a-textarea
@change="inputChange1(h.id, $event, ques.showValue, h.recordId, h.optionVos, ques.id)"
style="width: 100%; height: 150px"
:max-length="500"
v-else-if="ques.afterOperation === 2"
/>
<div v-else-if="ques.afterOperation === 3">当前程序已无法嵌套</div>
</div>
</a-col>
</div>
</a-row>
</a-checkbox-group>
</div>
<!-- 当类型为12时为单选+关联 -->
<div v-else-if="h.type === 3">
<a-radio-group
@change="onChange($event, h.type, h.id, h.recordId)"
class="d-flex flex-row flex-wrap"
v-model="h.answer"
<div :key="c" v-for="(b, c) in h.optionVos">
<div
v-if="
(contentList.find(item => {
return item.testQuestionsId === h.id && item.contents === `${b.showValue}`;
}) &&
b.afterOperation === 1) ||
(b.afterOperation === 1 &&
!contentList.find(item => {
return item.testQuestionsId === h.id;
}))
"
>
<a-radio :key="g" :style="radioStyle" :value="f.showValue" v-for="(f, g) in h.optionVos">{{
f.showValue
}}</a-radio>
</a-radio-group>
<div :key="n" v-for="(m, n) in h.optionVos">
<div
v-if="
contentList.find(item => {
return item.testQuestionsId === h.id && item.contents === `${m.showValue}`;
}) && m.afterOperation > 0
"
>
<a-form-item class="d-flex align-center mb-3">
<a-input
:max-length="500"
@change="inputChange(h.id, $event, m.showValue)"
style="width: 200px"
v-if="m.afterOperation === 1"
@change="inputChange(h.id, $event, b.showValue)"
style="width: 100%"
v-model="b.otherInformation"
></a-input>
<a-textarea
:max-length="500"
style="width: 100%; height: 150px"
@change="inputChange(h.id, $event, m.showValue)"
v-else-if="m.afterOperation === 2"
></a-textarea>
<div v-else-if="m.afterOperation === 3" :key="q" v-for="(p, q) in m.questionVos">
<a-form-item
:label="p.question"
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="d-flex align-center mb-3"
</a-form-item>
</div>
</div>
</div>
<div v-else-if="h.type === 4">
<a-checkbox-group
:default-value="getList(h.optionVos)"
@change="onChange($event, h.type, h.id, h.recordId)"
class="d-flex flex-row flex-wrap"
style="width: 100%"
>
<a-row class="flex-1 flex-wrap">
<div style="width: 100%" :key="indexNum" :span="24" v-for="(ques, indexNum) in h.optionVos">
<a-col>
<a-checkbox :value="ques.submitValue">{{ ques.showValue }}</a-checkbox>
</a-col>
<a-col>
<div
v-if="
(contentList.find(item => {
return item.testQuestionsId === h.id && item.contents === `${ques.showValue}`;
}) &&
ques.afterOperation > 0) ||
(ques.afterOperation > 0 && ques.choose === 1)
"
>
<div>当前程序已无法嵌套</div>
</a-form-item>
</div>
<!-- <div v-if="ques.afterOperation > 0"> -->
<a-input
:max-length="500"
@change="inputChange1(h.id, $event, ques.showValue, h.recordId, h.optionVos, ques.id)"
style="width: 100%"
v-model="ques.otherInformation"
v-if="ques.afterOperation === 1"
/>
<a-textarea
@change="inputChange1(h.id, $event, ques.showValue, h.recordId, h.optionVos, ques.id)"
style="width: 100%; height: 150px"
:max-length="500"
v-else-if="ques.afterOperation === 2"
/>
<div v-else-if="ques.afterOperation === 3">当前程序已无法嵌套</div>
</div>
</a-col>
</div>
</a-row>
</a-checkbox-group>
</div>
<!-- 当类型为12时为单选+关联 -->
<div v-else-if="h.type === 3">
<a-radio-group
@change="onChange($event, h.type, h.id, h.recordId)"
class="d-flex flex-row flex-wrap"
v-model="h.answer"
>
<a-radio :key="g" :style="radioStyle" :value="f.showValue" v-for="(f, g) in h.optionVos">{{
f.showValue
}}</a-radio>
</a-radio-group>
<div :key="n" v-for="(m, n) in h.optionVos">
<div
v-if="
contentList.find(item => {
return item.testQuestionsId === h.id && item.contents === `${m.showValue}`;
}) && m.afterOperation > 0
"
>
<a-input
:max-length="500"
@change="inputChange(h.id, $event, m.showValue)"
style="width: 200px"
v-if="m.afterOperation === 1"
></a-input>
<a-textarea
:max-length="500"
style="width: 100%; height: 150px"
@change="inputChange(h.id, $event, m.showValue)"
v-else-if="m.afterOperation === 2"
></a-textarea>
<div v-else-if="m.afterOperation === 3" :key="q" v-for="(p, q) in m.questionVos">
<a-form-item
:label="p.question"
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="d-flex align-center mb-3"
>
<div>当前程序已无法嵌套</div>
</a-form-item>
</div>
</div>
</div>
<div v-else-if="h.type === 13">
<a-input-number
@change="onChange($event, h.type, h.id, h.recordId)"
style="width: 200px%"
v-model="h.answer"
/>
</div>
<div v-else-if="h.type === 15">
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" />
</div>
<div v-else-if="h.type === 16">
<a-date-picker
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''"
placeholder="日期时间选择"
:input-read-only="true"
@change="onChange($event, h.type, h.id, h.recordId)"
show-time
/>
</div>
<div v-for="(dom, domIndex) in h.domList" :key="domIndex">
<a-input v-if="h.type === 1" v-model="h.domList[domIndex]"></a-input>
<a-textarea v-else-if="h.type === 2" v-model="h.domList[domIndex]"></a-textarea>
</div>
<div v-if="h.remark && JSON.parse(h.remark).type === 'desc'">
说明
<a-textarea @change="explainChange(h.id, $event)" v-model="h.explains" />
</div>
<p class="units-position" style="margin-left: 10px">
<span v-if="h.units">{{ h.units }}</span>
<span v-if="typeof h.referenceLower === 'number'">
({{ h.referenceLower + '-' }}{{ h.referenceUpper }})
</span>
</p>
</a-form-item>
</div>
<div v-else-if="h.type === 13">
<a-input-number @change="onChange($event, h.type, h.id, h.recordId)" style="width: 200px%" v-model="h.answer" />
</div>
<div v-else-if="h.type === 15">
<a-time-picker
placeholder="时间选择"
:input-read-only="true"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
</div>
<div v-else-if="h.type === 16">
<a-date-picker
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''"
placeholder="日期时间选择"
:input-read-only="true"
@change="onChange($event, h.type, h.id, h.recordId)"
show-time
/>
</div>
<div v-for="(dom, domIndex) in h.domList" :key="domIndex">
<a-input v-if="h.type === 1" v-model="h.domList[domIndex]"></a-input>
<a-textarea v-else-if="h.type === 2" v-model="h.domList[domIndex]"></a-textarea>
</div>
<div v-if="h.remark && JSON.parse(h.remark).type === 'desc'">
说明
<a-textarea @change="explainChange(h.id, $event)" v-model="h.explains" />
</div>
<p class="units-position" style="margin-left: 10px">
<span v-if="h.units">{{ h.units }}</span>
<span v-if="typeof h.referenceLower === 'number'"> ({{ h.referenceLower + '-' }}{{ h.referenceUpper }}) </span>
</p>
</a-form-item>
<a-button
v-if="h.remark && JSON.parse(h.remark).type === 'add'"
@ -615,7 +610,7 @@
<a-input-number @change="onChange($event, a.type, a.id)" style="width: 200px" v-model="a.answer" />
</div>
<div v-else-if="a.type === 15">
<a-time-picker placeholder="时间选择" @change="onChange($event, a.type, a.id)" />
<a-time-picker placeholder="时间选择" :input-read-only="true" @change="onChange($event, a.type, a.id)" />
</div>
<div v-else-if="a.type === 16">
<a-date-picker
@ -985,7 +980,11 @@
/>
</div>
<div v-else-if="h.type === 15">
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" />
<a-time-picker
placeholder="时间选择"
:input-read-only="true"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
</div>
<div v-else-if="h.type === 16">
<a-date-picker
@ -1045,7 +1044,11 @@
return item.testQuestionsId === e.id && item.contents === `${j.showValue}`;
}) &&
j.afterOperation > 0) ||
(j.afterOperation > 0 && (j.showValue === e.answer || getRadioAnswer(e.optionVos) === j.showValue))
(j.afterOperation > 0 &&
(j.showValue === e.answer || getRadioAnswer(e.optionVos) === j.showValue) &&
!contentList.find(item => {
return item.testQuestionsId === e.id && item.contents === `${j.showValue}`;
}))
"
>
<a-input
@ -1249,7 +1252,11 @@
/>
</div>
<div v-else-if="h.type === 15">
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" />
<a-time-picker
placeholder="时间选择"
:input-read-only="true"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
</div>
<div v-else-if="h.type === 16">
<a-date-picker
@ -1294,7 +1301,7 @@
<a-input-number @change="onChange($event, e.type, e.id, e.recordId)" style="width: 200px" v-model="e.answer" />
</div>
<div v-else-if="e.type === 15">
<a-time-picker placeholder="时间选择" @change="onChange($event, e.type, e.id, e.recordId)" />
<a-time-picker placeholder="时间选择" :input-read-only="true" @change="onChange($event, e.type, e.id, e.recordId)" />
</div>
<div v-else-if="e.type === 16">
<a-date-picker
@ -1346,15 +1353,19 @@
class="white--text"
@change="changeDate"
/>-->
<div class="bot-right-tips">
<!-- <div class="bot-right-tips">
当前选择病例的住院号为
<span style="color: green">{{ hospitalization }}</span>
,研究编号为
<span style="color: green">{{ recordCode }}</span>
</div>
<a-button @click="choosePatient" class="choose-btn" type="primary">
</div> -->
<a-button @click="choosePatient" id="dragBox" class="choose-btn" type="primary">
<!-- @touchstart="touchstartHandle('dragBox', $event)"
@touchmove="touchmoveHandle('dragBox', $event)"
@touchend="touchendHandle" -->
<a-icon type="retweet" />
重新选择病例
{{ recordCode }}
<!-- 重新选择 -->
</a-button>
<a-button
v-if="list.length > 0 && typeof tabNums === 'number' && (getCode || code || showrzlb)"
@ -1444,8 +1455,9 @@ export default {
checked: true,
radioStyle: {
display: 'block',
height: '30px',
lineHeight: '30px',
textOverflow: 'ellipsis',
whiteSpace: 'normal',
},
activeKey: [0],
list: [],
@ -1468,7 +1480,12 @@ export default {
rzlbcpSrc: '',
lists: {},
height: '',
width: '',
queryPath: '',
coordinate: {
client: {},
elePosition: {},
},
};
},
@ -1487,11 +1504,17 @@ export default {
this.getQuery();
}
},
activeKey(val) {
window,scrollTo(0,0)
}
},
mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight + 'px';
this.width = document.getElementsByClassName('main')[0].offsetWidth - 6 + 'px';
console.log(this.width);
this.rzlbSrc = `https://sxzxyzzlm.tall.wiki/ht-common/home/reportHistory?code=LSBGD&userId=${this.ptProps.userId}`;
this.rzlbcpSrc = `https://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.ptProps.userId}`;
window.addEventListener('scroll', this.handleScroll);
},
async created() {
@ -1510,8 +1533,65 @@ export default {
await this.getlists();
this.setCallback(0);
},
destroyed() {
document.removeEventListener('scroll', this.handleScroll);
},
methods: {
...mapMutations('home', ['setCallback']),
...mapMutations('home', ['setCallback', 'setPatientId', 'setHospitalization', 'setRecordCode', 'setShowTable']),
handleScroll() {
//
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
//
// console.log(scrollTop)
if (scrollTop > 50) {
//50
let dom = document.getElementById('dragBox');
dom.style.top = '8px';
} else {
let dom = document.getElementById('dragBox');
dom.style.top = 58 - scrollTop + 'px';
}
},
// /**
// *
// */
// touchstartHandle(refName, e) {
// const scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
// document.body.style.cssText += `position: fixed;top:-${scrollTop}px`;
// let element = e.targetTouches[0];
// let dom = document.getElementById(`${refName}`);
// //
// this.coordinate.client = {
// x: element.clientX,
// y: element.clientY,
// };
// //
// this.coordinate.elePosition.left = dom.offsetLeft;
// this.coordinate.elePosition.top = dom.offsetTop;
// },
// touchmoveHandle(refName, e) {
// try {
// let element = e.targetTouches[0];
// let dom = document.getElementById(`${refName}`);
// // client (=+-)
// let x = this.coordinate.elePosition.left + (element.clientX - this.coordinate.client.x);
// let y = this.coordinate.elePosition.top + (element.clientY - this.coordinate.client.y);
// //
// x = x <= 0 ? 0 : x >= innerWidth - dom.offsetWidth ? innerWidth - dom.offsetWidth : x;
// y = y <= 0 ? 0 : y >= innerHeight - dom.offsetHeight ? innerHeight - dom.offsetHeight : y;
// //
// dom.style.left = x + 'px';
// dom.style.top = y + 'px';
// } catch (error) {}
// },
// touchendHandle() {
// const body = document.body;
// body.style.position = '';
// const top = body.style.top;
// document.body.scrollTop = document.documentElement.scrollTop = -parseInt(top);
// body.style.top = '';
// },
/**
* 获取默认的图片数组
*/
@ -1548,7 +1628,20 @@ export default {
if (this.queryPath) {
this.$router.push(`${this.queryPath}`);
} else {
this.$router.push('/selectPatient');
// this.$router.push('/selectPatient');
this.setPatientId('');
this.setHospitalization('');
this.setRecordCode('');
if (localStorage.getItem('patientId')) {
localStorage.removeItem('patientId');
}
if (localStorage.getItem('hospitalization')) {
localStorage.removeItem('hospitalization');
}
if (localStorage.getItem('recordCode')) {
localStorage.removeItem('recordCode');
}
this.setShowTable(0);
}
},
// 'AB',a.id, index,k,h.id
@ -2234,7 +2327,31 @@ export default {
.choose-btn {
position: fixed;
top: 20px;
right: 12px;
top: 10px;
right: 6px;
}
@media (max-width: 575px) {
/deep/.ant-form-item-label, .ant-form-item-control-wrapper {
display: block;
width: 50%;
}
.add-btn {
position: absolute;
right: 0;
top: -3px;
}
/deep/span.ant-radio + * {
padding-right: 12px;
padding-left: 4px;
}
.choose-btn {
position: fixed;
top: 58px;
right: 6px;
}
}
</style>

4
src/views/ProjectAssistant/General.vue

@ -75,9 +75,9 @@
<div class="d-flex flex-column">
<a-popconfirm placement="left" ok-text="确定" cancel-text="取消" @confirm="changeRecordStatus(record.id)">
<template slot="title">
<p>是否确定通过该病例记录</p>
<p>是否确定结算</p>
</template>
<a-button v-if="record.inputStatus === 5" size="small" type="primary">审核通过</a-button>
<a-button v-if="record.inputStatus === 5" size="small" type="primary">结算</a-button>
</a-popconfirm>
<a-button type="primary" size="small" class="mt-4" @click="details(record.id, record.hospitalization, record.code)">

4
src/views/SelectPatient/SelectPatient.vue

@ -30,10 +30,10 @@
</div>
<!-- </a-tab-pane>
</a-tabs> -->
<a-button @click="choosePatient" class="choose-btn" type="primary">
<!-- <a-button @click="choosePatient" class="choose-btn" type="primary">
<a-icon type="retweet" />
重新选择病例
</a-button>
</a-button> -->
</div>
</div>
</template>

Loading…
Cancel
Save