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

4
src/common/portrait.styl

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

4
src/components/BiologicalSampleSearch/Search.vue

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

18
src/components/Echarts/Treemap.vue

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

168
src/components/PatientInfo/PatientTable.vue

@ -74,6 +74,31 @@
</a-popconfirm> </a-popconfirm>
</div> </div>
</template> </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> </a-table>
</div> </div>
<a-empty v-else /> <a-empty v-else />
@ -91,62 +116,6 @@
import { mapMutations, mapState } from 'vuex'; import { mapMutations, mapState } from 'vuex';
import { checkPatientComplete, upPatientMes } from 'config/api'; 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 { export default {
name: 'PatientTable', name: 'PatientTable',
@ -154,7 +123,7 @@ export default {
data() { data() {
return { return {
columns, columns: [],
loading: false, loading: false,
hasPatientId: false, hasPatientId: false,
patientId: '', // Id patientId: '', // Id
@ -170,6 +139,7 @@ export default {
height: '30px', height: '30px',
lineHeight: '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: { methods: {
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode', 'setShowTable']), ...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode', 'setShowTable']),
showModal(id, hospitalization, recordCode) { showModal(id, hospitalization, recordCode) {
@ -191,6 +239,12 @@ export default {
this.hospitalization = hospitalization; this.hospitalization = hospitalization;
this.recordCode = recordCode; 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() { handleOk() {
this.chooseItem(this.patientId, this.hospitalization, this.recordCode); this.chooseItem(this.patientId, this.hospitalization, this.recordCode);

12
src/components/PatientInfo/Search.vue

@ -2,14 +2,14 @@
* @Author: wally * @Author: wally
* @email: 18603454788@163.com * @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19 * @Date: 2021-04-19 10:23:19
* @LastEditors: wally * @LastEditors: aBin
* @LastEditTime: 2021-05-11 11:14:47 * @LastEditTime: 2021-05-28 09:28:47
--> -->
<template> <template>
<!-- search --> <!-- search -->
<div> <div>
<div class="d-flex flex-row flex-nowrap"> <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-form-item>
<a-input placeholder="研究编号" style="width: 10em" v-decorator="['code']" /> <a-input placeholder="研究编号" style="width: 10em" v-decorator="['code']" />
</a-form-item> </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-option :key="item.id" :value="item.id" v-for="item in controlGroups">{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-button class="mr-2" html-type="submit" icon="search" type="primary">搜索</a-button>
</a-form> </a-form>
<div class="flex-1"></div> <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> </div>
<patient-add :visible="visible" @closeModal="closeModal" @searchMes="searchMes" /> <patient-add :visible="visible" @closeModal="closeModal" @searchMes="searchMes" />
</div> </div>

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

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

559
src/views/PatientInfo/PatientInfo.vue

@ -1,11 +1,13 @@
<template> <template>
<div class="flex-column"> <div class="flex-column">
<a-tabs @change="callback" type="card"> <div :style="{ width: width }">
<a-tab-pane :key="item" :tab="typeof item === 'number' ? item + '天' : item" v-for="item in tabList" width="100" /> <a-tabs @change="callback" tab-position="top">
</a-tabs> <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-form :form="form" v-if="typeof tabNums === 'number'">
<a-spin :spinning="spinning"> <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大数组 --> <!-- 首先遍历整个data大数组 -->
<!-- <div v-for="(item, index) in list" :key="index"> --> <!-- <div v-for="(item, index) in list" :key="index"> -->
<a-collapse-panel :header="item.name" :key="index.toString()" v-for="(item, index) in list"> <a-collapse-panel :header="item.name" :key="index.toString()" v-for="(item, index) in list">
@ -84,7 +86,7 @@
style="width: 100%" style="width: 100%"
> >
<a-row class="flex-1 flex-wrap"> <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-col>
<a-checkbox :value="ques.submitValue">{{ ques.showValue }}</a-checkbox> <a-checkbox :value="ques.submitValue">{{ ques.showValue }}</a-checkbox>
</a-col> </a-col>
@ -305,7 +307,11 @@
/> />
</div> </div>
<div v-else-if="h.type === 15"> <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>
<div v-else-if="h.type === 16"> <div v-else-if="h.type === 16">
<a-date-picker <a-date-picker
@ -367,7 +373,11 @@
return item.testQuestionsId === a.id && item.contents === `${j.showValue}`; return item.testQuestionsId === a.id && item.contents === `${j.showValue}`;
}) && }) &&
j.afterOperation > 0) || 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 <a-input
@ -383,222 +393,207 @@
@change="inputChange(a.id, $event, j.showValue)" @change="inputChange(a.id, $event, j.showValue)"
></a-textarea> ></a-textarea>
<div v-else-if="j.afterOperation === 3" :key="i" v-for="(h, i) in j.questionVos" style="position: relative"> <div v-else-if="j.afterOperation === 3" :key="i" v-for="(h, i) in j.questionVos" style="position: relative">
<a-form-item <a-form-item :label="h.question" class="d-flex align-center mb-3">
:label-col="formItemLayout1.labelCol" <a-input
:wrapper-col="formItemLayout1.wrapperCol" :max-length="500"
class="d-flex align-center mb-3" @change="onChange($event, h.type, h.id, h.recordId)"
> style="width: 100%"
<a-form-item v-if="h.type === 1"
:label="h.question" v-model="h.answer"
:label-col="formItemLayout.labelCol" />
:wrapper-col="formItemLayout.wrapperCol" <a-textarea
class="d-flex align-center mb-3" @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 <a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{ b.showValue }}</a-select-option>
:max-length="500" </a-select>
@change="onChange($event, h.type, h.id, h.recordId)" <a-date-picker
style="width: 100%" :default-value="h.answer ? $moment(h.answer, dateFormat) : ''"
v-if="h.type === 1" @change="onChange($event, h.type, h.id, h.recordId)"
v-model="h.answer" placeholder="日期选择"
/> :input-read-only="true"
<a-textarea show-time
@change="onChange($event, h.type, h.id)" style="width: 100%"
style="height: 150px; width: 100%" v-else-if="h.type === 6"
v-else-if="h.type === 2" />
v-model="h.answer" <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 <a-select
:default-value="getAnswer(h.answer)"
@change="onChange($event, h.type, h.id, h.recordId)" @change="onChange($event, h.type, h.id, h.recordId)"
style="width: 120px" style="width: 100%"
v-else-if="h.type === 5"
v-model="h.answer"
> >
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{ <a-select-option :key="c" :value="b.showValue" v-for="(b, c) in h.optionVos">{{
b.showValue b.showValue
}}</a-select-option> }}</a-select-option>
</a-select> </a-select>
<a-date-picker <div :key="c" v-for="(b, c) in h.optionVos">
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''" <div
@change="onChange($event, h.type, h.id, h.recordId)" v-if="
placeholder="日期选择" (contentList.find(item => {
:input-read-only="true" return item.testQuestionsId === h.id && item.contents === `${b.showValue}`;
show-time }) &&
style="width: 100%" b.afterOperation === 1) ||
v-else-if="h.type === 6" (b.afterOperation === 1 &&
/> !contentList.find(item => {
<div v-else-if="h.type === 7"> return item.testQuestionsId === h.id;
<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"
> >
<a-radio :key="g" :style="radioStyle" :value="f.showValue" v-for="(f, g) in h.optionVos">{{ <a-form-item class="d-flex align-center mb-3">
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 <a-input
:max-length="500" :max-length="500"
@change="inputChange(h.id, $event, m.showValue)" @change="inputChange(h.id, $event, b.showValue)"
style="width: 200px" style="width: 100%"
v-if="m.afterOperation === 1" v-model="b.otherInformation"
></a-input> ></a-input>
<a-textarea </a-form-item>
:max-length="500" </div>
style="width: 100%; height: 150px" </div>
@change="inputChange(h.id, $event, m.showValue)" </div>
v-else-if="m.afterOperation === 2" <div v-else-if="h.type === 4">
></a-textarea> <a-checkbox-group
<div v-else-if="m.afterOperation === 3" :key="q" v-for="(p, q) in m.questionVos"> :default-value="getList(h.optionVos)"
<a-form-item @change="onChange($event, h.type, h.id, h.recordId)"
:label="p.question" class="d-flex flex-row flex-wrap"
:label-col="formItemLayout.labelCol" style="width: 100%"
:wrapper-col="formItemLayout.wrapperCol" >
class="d-flex align-center mb-3" <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> <!-- <div v-if="ques.afterOperation > 0"> -->
</a-form-item> <a-input
</div> :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>
</div> </div>
<div v-else-if="h.type === 13"> </div>
<a-input-number <div v-else-if="h.type === 13">
@change="onChange($event, h.type, h.id, h.recordId)" <a-input-number @change="onChange($event, h.type, h.id, h.recordId)" style="width: 200px%" v-model="h.answer" />
style="width: 200px%" </div>
v-model="h.answer" <div v-else-if="h.type === 15">
/> <a-time-picker
</div> placeholder="时间选择"
<div v-else-if="h.type === 15"> :input-read-only="true"
<a-time-picker placeholder="时间选择" @change="onChange($event, h.type, h.id, h.recordId)" /> @change="onChange($event, h.type, h.id, h.recordId)"
</div> />
<div v-else-if="h.type === 16"> </div>
<a-date-picker <div v-else-if="h.type === 16">
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''" <a-date-picker
placeholder="日期时间选择" :default-value="h.answer ? $moment(h.answer, dateFormat) : ''"
:input-read-only="true" placeholder="日期时间选择"
@change="onChange($event, h.type, h.id, h.recordId)" :input-read-only="true"
show-time @change="onChange($event, h.type, h.id, h.recordId)"
/> show-time
</div> />
<div v-for="(dom, domIndex) in h.domList" :key="domIndex"> </div>
<a-input v-if="h.type === 1" v-model="h.domList[domIndex]"></a-input> <div v-for="(dom, domIndex) in h.domList" :key="domIndex">
<a-textarea v-else-if="h.type === 2" v-model="h.domList[domIndex]"></a-textarea> <a-input v-if="h.type === 1" v-model="h.domList[domIndex]"></a-input>
</div> <a-textarea v-else-if="h.type === 2" v-model="h.domList[domIndex]"></a-textarea>
<div v-if="h.remark && JSON.parse(h.remark).type === 'desc'"> </div>
说明 <div v-if="h.remark && JSON.parse(h.remark).type === 'desc'">
<a-textarea @change="explainChange(h.id, $event)" v-model="h.explains" /> 说明
</div> <a-textarea @change="explainChange(h.id, $event)" v-model="h.explains" />
<p class="units-position" style="margin-left: 10px"> </div>
<span v-if="h.units">{{ h.units }}</span> <p class="units-position" style="margin-left: 10px">
<span v-if="typeof h.referenceLower === 'number'"> <span v-if="h.units">{{ h.units }}</span>
({{ h.referenceLower + '-' }}{{ h.referenceUpper }}) <span v-if="typeof h.referenceLower === 'number'"> ({{ h.referenceLower + '-' }}{{ h.referenceUpper }}) </span>
</span> </p>
</p>
</a-form-item>
</a-form-item> </a-form-item>
<a-button <a-button
v-if="h.remark && JSON.parse(h.remark).type === 'add'" 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" /> <a-input-number @change="onChange($event, a.type, a.id)" style="width: 200px" v-model="a.answer" />
</div> </div>
<div v-else-if="a.type === 15"> <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>
<div v-else-if="a.type === 16"> <div v-else-if="a.type === 16">
<a-date-picker <a-date-picker
@ -985,7 +980,11 @@
/> />
</div> </div>
<div v-else-if="h.type === 15"> <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>
<div v-else-if="h.type === 16"> <div v-else-if="h.type === 16">
<a-date-picker <a-date-picker
@ -1045,7 +1044,11 @@
return item.testQuestionsId === e.id && item.contents === `${j.showValue}`; return item.testQuestionsId === e.id && item.contents === `${j.showValue}`;
}) && }) &&
j.afterOperation > 0) || 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 <a-input
@ -1249,7 +1252,11 @@
/> />
</div> </div>
<div v-else-if="h.type === 15"> <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>
<div v-else-if="h.type === 16"> <div v-else-if="h.type === 16">
<a-date-picker <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" /> <a-input-number @change="onChange($event, e.type, e.id, e.recordId)" style="width: 200px" v-model="e.answer" />
</div> </div>
<div v-else-if="e.type === 15"> <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>
<div v-else-if="e.type === 16"> <div v-else-if="e.type === 16">
<a-date-picker <a-date-picker
@ -1346,15 +1353,19 @@
class="white--text" class="white--text"
@change="changeDate" @change="changeDate"
/>--> />-->
<div class="bot-right-tips"> <!-- <div class="bot-right-tips">
当前选择病例的住院号为 当前选择病例的住院号为
<span style="color: green">{{ hospitalization }}</span> <span style="color: green">{{ hospitalization }}</span>
,研究编号为 ,研究编号为
<span style="color: green">{{ recordCode }}</span> <span style="color: green">{{ recordCode }}</span>
</div> </div> -->
<a-button @click="choosePatient" class="choose-btn" type="primary"> <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" /> <a-icon type="retweet" />
重新选择病例 {{ recordCode }}
<!-- 重新选择 -->
</a-button> </a-button>
<a-button <a-button
v-if="list.length > 0 && typeof tabNums === 'number' && (getCode || code || showrzlb)" v-if="list.length > 0 && typeof tabNums === 'number' && (getCode || code || showrzlb)"
@ -1444,8 +1455,9 @@ export default {
checked: true, checked: true,
radioStyle: { radioStyle: {
display: 'block', display: 'block',
height: '30px',
lineHeight: '30px', lineHeight: '30px',
textOverflow: 'ellipsis',
whiteSpace: 'normal',
}, },
activeKey: [0], activeKey: [0],
list: [], list: [],
@ -1468,7 +1480,12 @@ export default {
rzlbcpSrc: '', rzlbcpSrc: '',
lists: {}, lists: {},
height: '', height: '',
width: '',
queryPath: '', queryPath: '',
coordinate: {
client: {},
elePosition: {},
},
}; };
}, },
@ -1487,11 +1504,17 @@ export default {
this.getQuery(); this.getQuery();
} }
}, },
activeKey(val) {
window,scrollTo(0,0)
}
}, },
mounted() { mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight + 'px'; 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.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}`; this.rzlbcpSrc = `https://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.ptProps.userId}`;
window.addEventListener('scroll', this.handleScroll);
}, },
async created() { async created() {
@ -1510,8 +1533,65 @@ export default {
await this.getlists(); await this.getlists();
this.setCallback(0); this.setCallback(0);
}, },
destroyed() {
document.removeEventListener('scroll', this.handleScroll);
},
methods: { 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) { if (this.queryPath) {
this.$router.push(`${this.queryPath}`); this.$router.push(`${this.queryPath}`);
} else { } 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 // 'AB',a.id, index,k,h.id
@ -2234,7 +2327,31 @@ export default {
.choose-btn { .choose-btn {
position: fixed; position: fixed;
top: 20px; top: 10px;
right: 12px; 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> </style>

4
src/views/ProjectAssistant/General.vue

@ -75,9 +75,9 @@
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<a-popconfirm placement="left" ok-text="确定" cancel-text="取消" @confirm="changeRecordStatus(record.id)"> <a-popconfirm placement="left" ok-text="确定" cancel-text="取消" @confirm="changeRecordStatus(record.id)">
<template slot="title"> <template slot="title">
<p>是否确定通过该病例记录</p> <p>是否确定结算</p>
</template> </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-popconfirm>
<a-button type="primary" size="small" class="mt-4" @click="details(record.id, record.hospitalization, record.code)"> <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> </div>
<!-- </a-tab-pane> <!-- </a-tab-pane>
</a-tabs> --> </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-icon type="retweet" />
重新选择病例 重新选择病例
</a-button> </a-button> -->
</div> </div>
</div> </div>
</template> </template>

Loading…
Cancel
Save