Browse Source

加载提示,表格展示问题

master
aBin 4 years ago
parent
commit
cde6c010bc
  1. 26
      src/App.vue
  2. 2
      src/common/portrait.styl
  3. 14
      src/components/BiologicalSampleSearch/SampleTable.vue
  4. 3
      src/components/BiologicalSampleSearch/Search.vue
  5. 3
      src/components/CaseTable/CaseKTOne.vue
  6. 10
      src/components/CaseTable/CaseTable.vue
  7. 2
      src/components/Echarts/Analysis.vue
  8. 3
      src/components/Echarts/Categorymap.vue
  9. 1
      src/components/Echarts/Cisualmap.vue
  10. 3
      src/components/Echarts/PatientProgress.vue
  11. 5
      src/components/Echarts/Piemap.vue
  12. 6
      src/components/Echarts/PiemapHos.vue
  13. 9
      src/components/MeetingPreview/MeetingPreview.vue
  14. 26
      src/components/PatientInfo/PatientTable.vue
  15. 5
      src/components/TypeTable/TypeTable.vue
  16. 4
      src/config/api.js
  17. 8
      src/store/modules/home/mutations.js
  18. 5
      src/store/modules/home/state.js
  19. 70
      src/views/CaseAnalysis/CaseAnalysis.vue
  20. 73
      src/views/CaseSearch/CaseSearch.vue
  21. 2
      src/views/Index/Index.vue
  22. 63
      src/views/PatientInfo/PatientInfo.vue
  23. 9
      src/views/PersonalStats/PersonalStats.vue
  24. 76
      src/views/SelectPatient/SelectPatient.vue

26
src/App.vue

@ -3,13 +3,13 @@
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-04-20 10:11:13
* @LastEditTime: 2021-04-26 18:12:14
-->
<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 pa-3"></router-view>
</div>
</a-config-provider>
@ -18,12 +18,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 };
},
@ -36,35 +36,37 @@ export default {
const params = { userId: val.userId };
this.getUserId(params);
this.getHospitalId(val.projectId);
console.log('val.userId:' + val.userId);
}
},
},
async created() {
const userId = '1218763410024566784';
const params = { userId };
await this.getUserId(params);
await this.getToken();
created() {
// const userId = '1218763410024566784';
// const params = { userId };
// await this.getUserId(params);
// await this.getToken();
if (localStorage.getItem('patientId')) {
this.setPatientId(localStorage.getItem('patientId'));
}
if (localStorage.getItem('hospitalization')) {
this.setHospitalization(localStorage.getItem('hospitalization'));
}
if (localStorage.getItem('recordCode')) {
this.setRecordCode(localStorage.getItem('recordCode'));
}
const that = this;
window.plugin = window.TallPlugin.init();
// created created便
// created created
// PT ididididuserId
window.plugin.created(function(props) {
console.log('props: ', props);
that.setPtProps(props);
that.getHospitalId(props.projectId);
});
},
methods: {
...mapActions('home', ['getUserId']),
...mapMutations('home', ['setPtProps', 'setHospitalId', 'setPatientId', 'getToken', 'setHospitalization']),
...mapMutations('home', ['setPtProps', 'setHospitalId', 'setPatientId', 'getToken', 'setHospitalization', 'setRecordCode']),
async getHospitalId(Id) {
try {

2
src/common/portrait.styl

@ -208,7 +208,7 @@
position: fixed;
height: 40px;
font-size: 14px;
right: 12px;
right: 18px;
top: 50px;
}
// flex

14
src/components/BiologicalSampleSearch/SampleTable.vue

@ -37,11 +37,23 @@ const columns = [
key: 'name',
},
{
title: '患者编号',
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
},
{
title: '研究编号',
align: 'center',
dataIndex: 'patientCode',
key: 'patientCode',
},
{
title: '生物样本编号',
align: 'center',
dataIndex: 'code',
key: 'code',
},
{
title: '类型',
align: 'center',

3
src/components/BiologicalSampleSearch/Search.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-04-14 18:30:24
* @LastEditTime: 2021-04-26 18:12:49
-->
<template>
<!-- search -->
@ -92,7 +92,6 @@ export default {
e.preventDefault();
this.form.validateFields(async (err, values) => {
if (!err) {
console.log('values: ', values);
this.$emit('searchPatientMes', values);
}
});

3
src/components/CaseTable/CaseKTOne.vue

@ -50,7 +50,7 @@
:min="0"
@change="onChange($event, item.code, 'min')"
placeholder="最小值"
style="width: 150px;"
style="width: 150px"
v-model="item.minValue"
/>
<div class="px-2">~</div>
@ -100,7 +100,6 @@ export default {
methods: {
...mapMutations('home', ['setCaseData']),
onChange(e, code, str) {
console.log(e);
let obj = {};
if (str === 'min') {
obj = {

10
src/components/CaseTable/CaseTable.vue

@ -42,11 +42,17 @@ import { mapMutations, mapState } from 'vuex';
import { upPatientMes } from 'config/api';
const columns = [
{
title: '患者编号',
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
},
{
title: '研究编号',
align: 'center',
dataIndex: 'code',
key: 'code',
},
{
title: '医院',
align: 'center',
@ -125,7 +131,6 @@ export default {
this.$emit('setData', current);
},
details(Id, hospitalization) {
console.log(Id, hospitalization);
this.setPatientId(Id);
this.setHospitalization(hospitalization);
this.$router.push('/patientInfo');
@ -135,7 +140,6 @@ export default {
this.recordType = inputStatus;
this.defaultValue = this.statusList[inputStatus];
this.visible = true;
console.log(this.recordType);
},
async handleOk() {
try {

2
src/components/Echarts/Analysis.vue

@ -77,7 +77,6 @@ export default {
let arr = [];
//
// if (this.lists.selGroupNums[i].list.length > 0) {
console.log(this.lists.stringList);
for (let j = 0; j < this.lists.stringList.length; j++) {
let obj = {
name: this.lists.stringList[j],
@ -116,7 +115,6 @@ export default {
};
this.series.push(obj);
}
console.log(this.series);
await this.drawLine();
},
},

3
src/components/Echarts/Categorymap.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-01-29 14:45:02
* @LastEditors: wally
* @LastEditTime: 2021-02-19 15:50:23
* @LastEditTime: 2021-04-26 18:13:05
-->
<template>
<!-- <div>数据统计组件</div> -->
@ -220,7 +220,6 @@ export default {
const res = await HospitalComplete(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data);
for (let i = 0; i < data.length; i++) {
this.forList(data[i]);
}

1
src/components/Echarts/Cisualmap.vue

@ -150,7 +150,6 @@ export default {
this.forOverList(data.overNums[i]);
}
} else {
console.log(msg);
}
} catch (error) {
this.$message.error('获取数据失败');

3
src/components/Echarts/PatientProgress.vue

@ -34,7 +34,6 @@ export default {
this.nameList = [];
this.dataList = [];
this.series = [];
console.log(this.lists);
//
for (let i = 0; i < this.lists.length; i++) {
// Y
@ -87,8 +86,6 @@ export default {
};
this.series.push(obj);
}
console.log(this.stringList);
console.log(this.series);
this.drawLine();
},
},

5
src/components/Echarts/Piemap.vue

@ -59,11 +59,8 @@ export default {
this.dataList.push(obj);
}
} else {
console.log(msg);
}
} catch (error) {
console.log(error);
}
} catch (error) {}
},
},
};

6
src/components/Echarts/PiemapHos.vue

@ -53,7 +53,6 @@ export default {
const res = await selByHosAllYBS(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data, 123);
for (let i = 0; i < data.length; i++) {
var obj = {
value: data[i].nums,
@ -62,11 +61,8 @@ export default {
this.dataList.push(obj);
}
} else {
console.log(msg, 132);
}
} catch (error) {
console.log(error);
}
} catch (error) {}
},
},
};

9
src/components/MeetingPreview/MeetingPreview.vue

@ -1,7 +1,14 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19
* @LastEditors: wally
* @LastEditTime: 2021-04-23 18:52:43
-->
<template>
<div>
<a-button class="mr-3" type="primary">预览</a-button>
<a-modal footer title="会议记录预览" v-model="visible" width="1000px">
<a-modal footer title="会议记录预览" v-model="visible" width="1000px" v-if="visible">
<div class="fill-width">
<a-card :bordered="false">
<a-list class="metting">

26
src/components/PatientInfo/PatientTable.vue

@ -33,15 +33,19 @@
</template>
<template slot="edit" slot-scope="text, record">
<a-button @click="showModal(record.id, record.hospitalization)" class="ml-4" size="small" type="primary">选择</a-button>
<a-button @click="showModal(record.id, record.hospitalization, record.code)" class="ml-4" size="small" type="primary">
选择
</a-button>
</template>
</a-table>
</div>
<a-empty v-else />
<a-modal title="选择患者" width="600px" v-model="visible" @ok="handleOk" @cancel="handleCancel">
是否要录入患者编号为
是否要录入住院号为
<span style="color: green">{{ hospitalization }}</span>
的患者的相关数据
, 研究编号为:
<span style="color: green">{{ recordCode }}</span>
, 的患者的相关数据
</a-modal>
</div>
</template>
@ -103,8 +107,9 @@ export default {
loading: false,
visible: false,
hasPatientId: false,
patientId: '',
hospitalization: '',
patientId: '', // Id
hospitalization: '', //
recordCode: '', //
};
},
@ -120,10 +125,11 @@ export default {
},
methods: {
...mapMutations('home', ['setPatientId', 'setHospitalization']),
showModal(id, hospitalization) {
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode']),
showModal(id, hospitalization, recordCode) {
this.patientId = id;
this.hospitalization = hospitalization;
this.recordCode = recordCode;
this.visible = true;
},
handleCancel(e) {
@ -131,16 +137,18 @@ export default {
this.visible1 = false;
},
handleOk() {
this.chooseItem(this.patientId, this.hospitalization);
this.chooseItem(this.patientId, this.hospitalization, this.recordCode);
this.visible1 = true;
},
//
async chooseItem(id, hospitalization) {
async chooseItem(id, hospitalization, recordCode) {
try {
this.setPatientId(id);
this.setHospitalization(hospitalization);
this.setRecordCode(recordCode);
localStorage.setItem('patientId', id);
localStorage.setItem('hospitalization', hospitalization);
localStorage.setItem('recordCode', recordCode);
const params = { param: { patientId: id } };
const res = await generatePatientReport(params);
const { code, msg, data } = res.data;

5
src/components/TypeTable/TypeTable.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-04-20 17:44:23
* @LastEditors: wally
* @LastEditTime: 2021-04-20 21:32:09
* @LastEditTime: 2021-04-26 15:55:24
-->
<template>
<div>
@ -54,7 +54,8 @@ export default {
const data = JSON.parse(this.remark);
this.changeRow(data.param);
this.changeCol(data.param);
console.log(this.list);
console.log('list:', this.list);
console.log('remark:', this.remark);
},
methods: {
/**

4
src/config/api.js

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-01-29 11:16:27
* @LastEditors: wally
* @LastEditTime: 2021-04-01 19:25:20
* @LastEditTime: 2021-04-26 17:59:22
*/
import axios from 'axios';
let { proxyUrl } = require('@/config/setting');
@ -22,7 +22,7 @@ const file = `${tcm}/file`; // 文件相关接口
// 上传文件
export const upload = `${file}/upload`;
// 通过任务Id查询项目Id
// 通过任务Id查询医院Id
export const getHId = params => axios.get(`${hospatil}/byProjectId?projectId=${params}`);
// 查询医院列表

8
src/store/modules/home/mutations.js

@ -53,6 +53,14 @@ const mutations = {
setHospitalization(state, data) {
state.hospitalization = data;
},
/**
* 设置病患住研究编号
* @param {object} state
* @param {string} data
*/
setRecordCode(state, data) {
state.recordCode = data;
},
/**
* 设置预览信息
* @param {object} state

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

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-04-02 08:31:38
* @LastEditTime: 2021-04-26 17:28:17
*/
const state = {
anyringToken: '',
@ -11,8 +11,9 @@ const state = {
controlGroups: [], // 对照组
patientId: '', // 病患id
hospitalization: '', // 病患住院号
recordCode: '', // 患者研究编号
previewInfo: { host: '', place: '', startTime: '', endTime: '', participants: '', meetingMinutes: '', discussionContent: '' }, // 预览信息
ptProps: null, // 接受PT传过来的 pluginId,projectId,roleId,taskId,userId
ptProps: { userId: '' }, // 接受PT传过来的 pluginId,projectId,roleId,taskId,userId
hospitalId: '', // 医院Id
caseData: null, // 病例 搜索/分析 下的认知量表所做的每道题,每次改变重新存一次
};

70
src/views/CaseAnalysis/CaseAnalysis.vue

@ -27,6 +27,7 @@
</div>
</div>
<a-form :form="form">
<a-spin :spinning="spinning">
<a-collapse v-model="activeKey">
<!-- 首先遍历整个data大数组 -->
<!-- <div v-for="(item, index) in list" :key="index"> -->
@ -141,7 +142,12 @@
:max-length="500"
v-else-if="ques.afterOperation === 2"
/>
<div v-else-if="ques.afterOperation === 3" :key="i" v-for="(h, i) in ques.questionVos" style="position: relative">
<div
v-else-if="ques.afterOperation === 3"
:key="i"
v-for="(h, i) in ques.questionVos"
style="position: relative"
>
<a-form-item
:label="h.question"
:label-col="formItemLayout.labelCol"
@ -428,7 +434,9 @@
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">{{ b.showValue }}</a-select-option>
<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) : ''"
@ -580,7 +588,11 @@
</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" />
<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)" />
@ -603,7 +615,9 @@
</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>
<span v-if="typeof h.referenceLower === 'number'">
({{ h.referenceLower + '-' }}{{ h.referenceUpper }})
</span>
</p>
</a-form-item>
</a-form-item>
@ -645,7 +659,9 @@
<span v-if="typeof a.referenceLower === 'number'">({{ a.referenceLower + '-' }}{{ a.referenceUpper }})</span>
</p>
</a-form-item>
<a-button v-if="a.remark && JSON.parse(a.remark).type === 'add'" class="add-btn" @click="addDom('AA', a.id, index)">+</a-button>
<a-button v-if="a.remark && JSON.parse(a.remark).type === 'add'" class="add-btn" @click="addDom('AA', a.id, index)">
+
</a-button>
</div>
<!-- 一级标题下的各种二级标题subReportCodes -->
<div v-for="(w, indexB) in item.subReportCodes" :key="w.name">
@ -661,7 +677,7 @@
@change="handleChange($event, w.code, w.recordId, index, indexB)"
>
<!-- <a-upload :multiple="true" :action="action" :headers="headers" @change="handleChange"> -->
<a-button> <a-icon type="upload" />上传图片 </a-button>
<a-button> <a-icon type="upload" />图像识别 </a-button>
</a-upload>
</a-form-item>
<!-- 二级标题下的各种类型 -->
@ -671,7 +687,8 @@
:remark="w.remark"
:list="w.questionVos"
/>
<div :key="e.name" v-for="e in w.questionVos" style="position: relative">
<div :key="e.name" v-for="(e, eIndex) in w.questionVos" style="position: relative">
<div v-if="w.remark === '' || eIndex > JSON.parse(w.remark).param.total - 1">
<a-form-item :label="e.question" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-input
:id="e.id"
@ -724,7 +741,11 @@
</a-button>
</a-upload>
<div v-else-if="e.type === 10">
<a-select :default-value="getAnswer(e.answer)" @change="onChange($event, e.type, e.id, e.recordId)" style="width: 100%">
<a-select
:default-value="getAnswer(e.answer)"
@change="onChange($event, e.type, e.id, e.recordId)"
style="width: 100%"
>
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in e.optionVos">{{ b.showValue }}</a-select-option>
</a-select>
<div :key="c" v-for="(b, c) in e.optionVos">
@ -1023,7 +1044,11 @@
</div>
<!-- 当类型为12时为单选+关联 -->
<div v-else-if="e.type === 3">
<a-radio-group @change="onChange($event, e.type, e.id, e.recordId)" class="d-flex flex-row flex-wrap" v-model="e.answer">
<a-radio-group
@change="onChange($event, e.type, e.id, e.recordId)"
class="d-flex flex-row flex-wrap"
v-model="e.answer"
>
<a-radio :key="g" :style="radioStyle" :value="f.showValue" v-for="(f, g) in e.optionVos">{{ f.showValue }}</a-radio>
</a-radio-group>
<div :key="k" v-for="(j, k) in e.optionVos">
@ -1073,7 +1098,9 @@
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">{{ b.showValue }}</a-select-option>
<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) : ''"
@ -1257,7 +1284,9 @@
</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>
<span v-if="typeof h.referenceLower === 'number'">
({{ h.referenceLower + '-' }}{{ h.referenceUpper }})
</span>
</p>
</a-form-item>
<a-button
@ -1298,14 +1327,20 @@
<span v-if="typeof e.referenceLower === 'number'">({{ e.referenceLower + '-' }}{{ e.referenceUpper }})</span>
</p>
</a-form-item>
<a-button v-if="e.remark && JSON.parse(e.remark).type === 'add'" class="add-btn" @click="addDomB('BA', index, indexB, e.id)">
<a-button
v-if="e.remark && JSON.parse(e.remark).type === 'add'"
class="add-btn"
@click="addDomB('BA', index, indexB, e.id)"
>
+
</a-button>
</div>
</div>
</div>
</a-collapse-panel>
<!-- </div> -->
</a-collapse>
</a-spin>
</a-form>
<a-collapse v-model="activeKey1">
<a-collapse-panel header="认知量表">
@ -1414,6 +1449,7 @@ export default {
caseList: [],
caseAnswer: [], //
activeKey1: [],
spinning: false,
};
},
computed: {
@ -1838,6 +1874,7 @@ export default {
//
fileChange(info, id, recordId) {
console.log(info);
this.spinning = true;
if (info.file.status === 'done') {
this.fileList = info.fileList;
for (let i = 0; i < this.contentList.length; i++) {
@ -1853,6 +1890,7 @@ export default {
};
this.contentList.push(obj);
}
this.spinning = false;
console.log(this.contentList);
console.log(this.fileList);
} else if (info.file.status === 'removed') {
@ -1862,6 +1900,7 @@ export default {
this.contentList.splice(i, 1);
}
}
this.spinning = false;
}
},
// ID
@ -1898,6 +1937,7 @@ export default {
},
//
async handleChange(info, title, recordId, indexA, indexB) {
this.spinning = true;
if (info.file.status === 'done') {
const { list } = this;
const objList = list[indexA].subReportCodes[indexB];
@ -1944,10 +1984,13 @@ export default {
list[indexA].subReportCodes[indexB] = { ...objList };
this.list = [...list];
this.spinning = false;
} else {
console.log(msg);
this.spinning = false;
}
}
this.spinning = false;
},
//
async setData() {
@ -2061,12 +2104,15 @@ export default {
const { code, msg, data } = res.data;
if (code === 200) {
this.lists = data;
this.spinning = false;
// console.log(this.lists);
} else {
this.$message.error('搜索失败');
this.spinning = false;
}
} catch (error) {
this.$message.error('error');
this.spinning = false;
}
},
//

73
src/views/CaseSearch/CaseSearch.vue

@ -24,6 +24,7 @@
<div class="flex-1"></div>
</div>
<a-form :form="form">
<a-spin :spinning="spinning">
<a-collapse v-model="activeKey">
<!-- 首先遍历整个data大数组 -->
<!-- <div v-for="(item, index) in list" :key="index"> -->
@ -138,7 +139,12 @@
:max-length="500"
v-else-if="ques.afterOperation === 2"
/>
<div v-else-if="ques.afterOperation === 3" :key="i" v-for="(h, i) in ques.questionVos" style="position: relative">
<div
v-else-if="ques.afterOperation === 3"
:key="i"
v-for="(h, i) in ques.questionVos"
style="position: relative"
>
<a-form-item
:label="h.question"
:label-col="formItemLayout.labelCol"
@ -425,7 +431,9 @@
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">{{ b.showValue }}</a-select-option>
<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) : ''"
@ -577,7 +585,11 @@
</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" />
<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)" />
@ -600,7 +612,9 @@
</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>
<span v-if="typeof h.referenceLower === 'number'">
({{ h.referenceLower + '-' }}{{ h.referenceUpper }})
</span>
</p>
</a-form-item>
</a-form-item>
@ -642,7 +656,9 @@
<span v-if="typeof a.referenceLower === 'number'">({{ a.referenceLower + '-' }}{{ a.referenceUpper }})</span>
</p>
</a-form-item>
<a-button v-if="a.remark && JSON.parse(a.remark).type === 'add'" class="add-btn" @click="addDom('AA', a.id, index)">+</a-button>
<a-button v-if="a.remark && JSON.parse(a.remark).type === 'add'" class="add-btn" @click="addDom('AA', a.id, index)">
+
</a-button>
</div>
<!-- 一级标题下的各种二级标题subReportCodes -->
<div v-for="(w, indexB) in item.subReportCodes" :key="w.name">
@ -658,7 +674,7 @@
@change="handleChange($event, w.code, w.recordId, index, indexB)"
>
<!-- <a-upload :multiple="true" :action="action" :headers="headers" @change="handleChange"> -->
<a-button> <a-icon type="upload" />上传图片 </a-button>
<a-button> <a-icon type="upload" />图像识别 </a-button>
</a-upload>
</a-form-item>
<!-- 二级标题下的各种类型 -->
@ -668,7 +684,8 @@
:remark="w.remark"
:list="w.questionVos"
/>
<div :key="e.name" v-for="e in w.questionVos" style="position: relative">
<div :key="e.name" v-for="(e, eIndex) in w.questionVos" style="position: relative">
<div v-if="w.remark === '' || eIndex > JSON.parse(w.remark).param.total - 1">
<a-form-item :label="e.question" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-input
:id="e.id"
@ -721,7 +738,11 @@
</a-button>
</a-upload>
<div v-else-if="e.type === 10">
<a-select :default-value="getAnswer(e.answer)" @change="onChange($event, e.type, e.id, e.recordId)" style="width: 100%">
<a-select
:default-value="getAnswer(e.answer)"
@change="onChange($event, e.type, e.id, e.recordId)"
style="width: 100%"
>
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in e.optionVos">{{ b.showValue }}</a-select-option>
</a-select>
<div :key="c" v-for="(b, c) in e.optionVos">
@ -1020,7 +1041,11 @@
</div>
<!-- 当类型为12时为单选+关联 -->
<div v-else-if="e.type === 3">
<a-radio-group @change="onChange($event, e.type, e.id, e.recordId)" class="d-flex flex-row flex-wrap" v-model="e.answer">
<a-radio-group
@change="onChange($event, e.type, e.id, e.recordId)"
class="d-flex flex-row flex-wrap"
v-model="e.answer"
>
<a-radio :key="g" :style="radioStyle" :value="f.showValue" v-for="(f, g) in e.optionVos">{{ f.showValue }}</a-radio>
</a-radio-group>
<div :key="k" v-for="(j, k) in e.optionVos">
@ -1070,7 +1095,9 @@
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">{{ b.showValue }}</a-select-option>
<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) : ''"
@ -1254,7 +1281,9 @@
</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>
<span v-if="typeof h.referenceLower === 'number'">
({{ h.referenceLower + '-' }}{{ h.referenceUpper }})
</span>
</p>
</a-form-item>
<a-button
@ -1295,14 +1324,20 @@
<span v-if="typeof e.referenceLower === 'number'">({{ e.referenceLower + '-' }}{{ e.referenceUpper }})</span>
</p>
</a-form-item>
<a-button v-if="e.remark && JSON.parse(e.remark).type === 'add'" class="add-btn" @click="addDomB('BA', index, indexB, e.id)">
<a-button
v-if="e.remark && JSON.parse(e.remark).type === 'add'"
class="add-btn"
@click="addDomB('BA', index, indexB, e.id)"
>
+
</a-button>
</div>
</div>
</div>
</a-collapse-panel>
<!-- </div> -->
</a-collapse>
</a-spin>
</a-form>
<a-collapse v-model="activeKey1">
<a-collapse-panel header="认知量表">
@ -1390,6 +1425,7 @@ export default {
activeKey1: [],
caseList: [],
caseAnswer: [], //
spinning: false,
};
},
computed: {
@ -1533,11 +1569,14 @@ export default {
if (code === 200) {
// console.log('data: ', data);
this.list = data;
this.spinning = false;
} else {
this.$message.error(msg || '查询失败');
this.spinning = false;
throw msg;
}
} catch (error) {
this.spinning = false;
throw new Error(`CaseSearch.vue method selSearchCriteriaList: ${error}`);
}
},
@ -1812,6 +1851,7 @@ export default {
},
//
fileChange(info, id, recordId) {
this.spinning = true;
console.log(info);
if (info.file.status === 'done') {
this.fileList = info.fileList;
@ -1828,6 +1868,7 @@ export default {
};
this.contentList.push(obj);
}
this.spinning = false;
console.log(this.contentList);
console.log(this.fileList);
} else if (info.file.status === 'removed') {
@ -1837,10 +1878,12 @@ export default {
this.contentList.splice(i, 1);
}
}
this.spinning = false;
}
},
//
async handleChange(info, title, recordId, indexA, indexB) {
this.spinning = true;
if (info.file.status === 'done') {
const { list } = this;
const objList = list[indexA].subReportCodes[indexB];
@ -1887,14 +1930,17 @@ export default {
list[indexA].subReportCodes[indexB] = { ...objList };
this.list = [...list];
this.spinning = true;
} else {
console.log(msg);
this.spinning = true;
}
}
},
//
async setData(current) {
// console.log(this.caseAnswer);
this.spinning = true;
if (current) {
this.pageNum = current;
}
@ -2010,11 +2056,14 @@ export default {
if (code === 200) {
this.lists = data;
console.log(this.lists);
this.spinning = true;
} else {
this.$message.error('搜索失败');
this.spinning = true;
}
} catch (error) {
this.$message.error('error');
this.spinning = true;
}
},
//

2
src/views/Index/Index.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-04-02 08:50:23
* @LastEditTime: 2021-04-21 19:27:05
-->
<template>
<div class="flex-wrap">

63
src/views/PatientInfo/PatientInfo.vue

@ -4,6 +4,7 @@
<a-tab-pane :key="item" :tab="typeof item === 'number' ? item + '天' : item" v-for="item in tabList" width="100" />
</a-tabs>
<a-form :form="form" v-if="typeof tabNums === 'number'">
<a-spin :spinning="spinning">
<a-collapse v-model="activeKey">
<!-- 首先遍历整个data大数组 -->
<!-- <div v-for="(item, index) in list" :key="index"> -->
@ -118,7 +119,12 @@
:max-length="500"
v-else-if="ques.afterOperation === 2"
/>
<div v-else-if="ques.afterOperation === 3" :key="i" v-for="(h, i) in ques.questionVos" style="position: relative">
<div
v-else-if="ques.afterOperation === 3"
:key="i"
v-for="(h, i) in ques.questionVos"
style="position: relative"
>
<a-form-item
:label="h.question"
:label-col="formItemLayout.labelCol"
@ -405,7 +411,9 @@
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">{{ b.showValue }}</a-select-option>
<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) : ''"
@ -557,7 +565,11 @@
</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" />
<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)" />
@ -580,7 +592,9 @@
</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>
<span v-if="typeof h.referenceLower === 'number'">
({{ h.referenceLower + '-' }}{{ h.referenceUpper }})
</span>
</p>
</a-form-item>
</a-form-item>
@ -622,7 +636,9 @@
<span v-if="typeof a.referenceLower === 'number'">({{ a.referenceLower + '-' }}{{ a.referenceUpper }})</span>
</p>
</a-form-item>
<a-button v-if="a.remark && JSON.parse(a.remark).type === 'add'" class="add-btn" @click="addDom('AA', a.id, index)">+</a-button>
<a-button v-if="a.remark && JSON.parse(a.remark).type === 'add'" class="add-btn" @click="addDom('AA', a.id, index)">
+
</a-button>
</div>
<!-- 一级标题下的各种二级标题subReportCodes -->
<div v-for="(w, indexB) in item.subReportCodes" :key="w.name">
@ -630,7 +646,7 @@
<!-- 二级大标题 -->
<span class="hhh2">{{ w.name }}</span>
<a-upload
v-if="w.recordType && getCode"
v-if="w.recordType && (getCode || code)"
name="files"
:multiple="true"
:action="action"
@ -638,7 +654,7 @@
@change="handleChange($event, w.code, w.recordId, index, indexB)"
>
<!-- <a-upload :multiple="true" :action="action" :headers="headers" @change="handleChange"> -->
<a-button> <a-icon type="upload" />上传图片 </a-button>
<a-button> <a-icon type="upload" />图像识别 </a-button>
</a-upload>
</a-form-item>
<!-- 二级标题下的各种类型 -->
@ -702,7 +718,11 @@
</a-button>
</a-upload>
<div v-else-if="e.type === 10">
<a-select :default-value="getAnswer(e.answer)" @change="onChange($event, e.type, e.id, e.recordId)" style="width: 100%">
<a-select
:default-value="getAnswer(e.answer)"
@change="onChange($event, e.type, e.id, e.recordId)"
style="width: 100%"
>
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in e.optionVos">{{ b.showValue }}</a-select-option>
</a-select>
<div :key="c" v-for="(b, c) in e.optionVos">
@ -1297,6 +1317,7 @@
</a-collapse-panel>
<!-- </div> -->
</a-collapse>
</a-spin>
</a-form>
<iframe frameborder="0" height="100%" src="http://www.sxwikionline.com/ht-common/home/reportHistory?code=LSBGD" v-else></iframe>
<!-- <a-date-picker
@ -1307,8 +1328,10 @@
@change="changeDate"
/>-->
<div class="bot-right-tips">
当前选择患者的号为
当前选择患者的住院号为
<span style="color: green">{{ hospitalization }}</span>
,研究编号为
<span style="color: green">{{ recordCode }}</span>
</div>
<a-button
v-if="list.length > 0 && (getCode || code)"
@ -1381,11 +1404,12 @@ export default {
visible: false,
confirmLoading: false,
recordTypeList: [],
spinning: false,
};
},
computed: {
...mapState('home', ['patientId', 'hospitalization', 'hospitalId']),
...mapState('home', ['patientId', 'hospitalization', 'hospitalId', 'recordCode']),
//
headers() {
const token = sessionStorage.getItem('anyringToken');
@ -1402,6 +1426,7 @@ export default {
},
async created() {
console.log(this.patientId);
this.spinning = true;
this.getCode = '';
this.tabNums = 0;
if (this.$route.query && this.$route.query.code) {
@ -1466,7 +1491,7 @@ export default {
const params = {
param: {
code: this.code ? this.code : this.getCode ? this.getCode : '',
id: this.patientId ? this.patientId : '1377810337931468800',
id: this.patientId ? this.patientId : '',
nums: this.tabNums,
},
};
@ -1486,6 +1511,7 @@ export default {
} catch (error) {
console.log(error);
}
this.spinning = false;
},
onChange(e, type, id, recordId) {
// console.log(e);
@ -1760,6 +1786,7 @@ export default {
//
fileChange(info, id, recordId) {
console.log(info);
this.spinning = true;
if (info.file.status === 'done') {
this.fileList = info.fileList;
for (let i = 0; i < this.contentList.length; i++) {
@ -1775,6 +1802,7 @@ export default {
};
this.contentList.push(obj);
}
this.spinning = false;
console.log(this.contentList);
console.log(this.fileList);
} else if (info.file.status === 'removed') {
@ -1784,10 +1812,12 @@ export default {
this.contentList.splice(i, 1);
}
}
this.spinning = false;
}
},
//
async handleChange(info, title, recordId, indexA, indexB) {
this.spinning = true;
if (info.file.status === 'done') {
const { list } = this;
const objList = list[indexA].subReportCodes[indexB];
@ -1801,6 +1831,7 @@ export default {
const res = await basic(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.spinning = false;
for (let k = 0; k < data.length; k++) {
for (let i = 0; i < objList.questionVos.length; i++) {
if (objList.questionVos[i].id === data[k].questionId) {
@ -1831,11 +1862,11 @@ export default {
this.contentList.push(obj);
}
}
list[indexA].subReportCodes[indexB] = { ...objList };
this.list = [...list];
} else {
console.log(msg);
this.spinning = false;
}
}
},
@ -1843,6 +1874,7 @@ export default {
async setData() {
try {
this.confirmLoading = true;
this.spinning = true;
for (let i = 0; i < this.list.length; i++) {
const item = this.list[i];
if (item.questionVos && item.questionVos.length) {
@ -1947,15 +1979,18 @@ export default {
const res = await saveCaseMes(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.spinning = false;
this.$message.success('提交成功');
this.confirmLoading = false;
this.visible = false;
this.contentList = [];
} else {
this.spinning = false;
this.$message.error('提交失败');
this.confirmLoading = false;
}
} catch (error) {
this.spinning = false;
this.$message.error('error');
}
this.confirmLoading = false;
@ -1983,4 +2018,8 @@ export default {
right: -10px;
transform: translate3d(100%, -100%, 0);
}
/deep/ .ant-tabs-bar {
margin-bottom: 0 !important;
}
</style>

9
src/views/PersonalStats/PersonalStats.vue

@ -1,7 +1,14 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19
* @LastEditors: wally
* @LastEditTime: 2021-04-21 19:27:51
-->
<template>
<div class="flex-wrap">
<div class="fill-width mb-3">
<a-card style="width: 100%; min-height: 500px; height: auto" title="临近任务">
<a-card style="width: 100%; max-height: 500px; height: auto" title="临近任务">
<adjacentTasks :obj-list="objList" @getTableData="getTableData" />
</a-card>
</div>

76
src/views/SelectPatient/SelectPatient.vue

@ -1,20 +1,21 @@
<template>
<div class="d-flex flex-column">
<div class="d-flex flex-column main">
<div v-if="!patientId">
<search @searchPatientMes="searchPatientMes" />
<patient-table :lists="lists" @handleSelPatientMes="handleSelPatientMes" class="mt-3" />
</div>
<div v-else style="position: relative">
<a-tabs default-active-key="OTHER">
<a-tab-pane v-for="item in codeTypeList" :key="item.code" :tab="item.name">
<div v-if="item.code === 'SWYB'">
<biological-samples />
<a-button v-if="isShow === true" type="primary" class="full-screen" @click="changeShow">取消全屏</a-button>
<a-tabs default-active-key="OTHER" @tabClick="changeShow">
<a-tab-pane v-for="item in codeTypeList" :key="item.code" :tab="item.name" :class="isShow ? 'fixed-pane' : ''">
<div v-if="item.code === 'SWYB'" class="flex-1">
<biological-samples style="width: 100%" />
</div>
<div v-else-if="item.code === 'RZLB'">
<iframe style="width: 100%; heigt: 100%" height="100%" :src="rzlbSrc"></iframe>
<div v-else-if="item.code === 'RZLB'" class="flex-1">
<iframe style="width: 100%; border: none !important" :style="{ height: height }" :src="rzlbSrc"></iframe>
</div>
<div v-else-if="item.code !== 'SWYB' && item.code !== 'RZLB'">
<patient-info :code="item.code" />
<div v-else-if="item.code !== 'SWYB' && item.code !== 'RZLB'" class="flex-1">
<patient-info :code="item.code" style="width: 100%" />
</div>
</a-tab-pane>
</a-tabs>
@ -42,6 +43,7 @@ export default {
lists: { pageNum: 1, pageSize: 10, total: 1, list: [] },
hospitalization: '',
inpatientId: '',
height: '',
codeTypeList: [
{
code: 'OTHER',
@ -59,21 +61,27 @@ export default {
code: 'QXJC',
name: '器械检查',
},
{
code: 'SWYB',
name: '生物样本',
},
{
code: 'RZLB',
name: '认知量表',
},
{
code: 'SWYB',
name: '生物样本',
},
],
rzlbSrc: `http://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=1218763410024566784`,
isShow: true,
rzlbSrc: '',
};
},
computed: mapState('home', ['patientId', 'ptProps', 'user']),
mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight + 'px';
this.rzlbSrc = `http://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.ptProps.userId}`;
},
created() {
this.handleSelPatientMes();
this.getControlGroups();
@ -82,7 +90,7 @@ export default {
methods: {
...mapActions('home', ['getControlGroups']),
...mapMutations('home', ['setPatientId']),
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode']),
searchPatientMes(value) {
if (value) {
this.hospitalization = value.inpatientNumber;
@ -121,6 +129,22 @@ export default {
*/
choosePatient() {
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');
}
},
changeShow() {
this.isShow = !this.isShow;
console.log(this.isShow);
},
},
};
@ -129,7 +153,27 @@ export default {
<style lang="stylus" scoped>
.choose-btn {
position: fixed;
top: 12px;
top: 74px;
right: 12px;
}
.fixed-pane {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #eee;
z-index: 100;
max-height: 100%;
overflow-y: auto;
scroll-y: auto;
}
.full-screen {
position: fixed;
z-index: 101;
right: 18px;
top: 4px;
}
</style>

Loading…
Cancel
Save