Browse Source

新增项目助理及项目总助理界面,及病例选择界面修改

master
aBin 4 years ago
parent
commit
4232b01209
  1. 4
      .env.development
  2. 4
      rest/http-client.env.json
  3. 4
      src/App.vue
  4. 2
      src/common/portrait.styl
  5. 19
      src/components/BiologicalSampleSearch/SampleTable.vue
  6. 36
      src/components/BiologicalSampleSearch/Search.vue
  7. 3
      src/components/BtnCom/BtnCon.vue
  8. 2
      src/components/CaseTable/CaseTable.vue
  9. 10
      src/components/Echarts/Analysis.vue
  10. 25
      src/components/Echarts/PatientProgress.vue
  11. 34
      src/components/PatientInfo/PatientAdd.vue
  12. 84
      src/components/PatientInfo/PatientTable.vue
  13. 104
      src/components/PatientInfo/SampleTable.vue
  14. 9
      src/components/PatientInfo/Search.vue
  15. 13
      src/config/api.js
  16. 7
      src/plugins/axios.js
  17. 18
      src/router/index.js
  18. 33
      src/store/modules/home/actions.js
  19. 27
      src/store/modules/home/mutations.js
  20. 9
      src/store/modules/home/state.js
  21. 21
      src/views/BiologicalSampleSearch/BiologicalSampleSearch.vue
  22. 62
      src/views/BiologicalSamples/BiologicalSamples.vue
  23. 10
      src/views/CaseAnalysis/CaseAnalysis.vue
  24. 16
      src/views/CaseSearch/CaseSearch.vue
  25. 393
      src/views/PatientInfo/PatientInfo.vue
  26. 37
      src/views/PersonalStats/PersonalStats.vue
  27. 10
      src/views/PersonalStats/components/AdjacentTasks.vue
  28. 285
      src/views/ProjectAssistant/Examine.vue
  29. 318
      src/views/ProjectAssistant/General.vue
  30. 106
      src/views/ProjectAssistant/Statistics.vue
  31. 74
      src/views/SelectPatient/SelectPatient.vue

4
.env.development

@ -1,8 +1,8 @@
VUE_APP_MODE=development
VUE_APP_NODE_ENV=development
VUE_APP_SCENE=tcm
VUE_APP_BASE_URL=http://sxzxyzzlm.tall.wiki/
VUE_APP_API_URL=http://sxzxyzzlm.tall.wiki/gateway
VUE_APP_BASE_URL=https://sxzxyzzlm.tall.wiki/
VUE_APP_API_URL=https://sxzxyzzlm.tall.wiki/gateway
VUE_APP_PROXY_URL=/gateway
VUE_APP_PUBLIC_PATH=/tcm
VUE_APP_MSG_URL=wss://sxzxyzzlm.tall.wiki/websocket/message/v4.0/ws

4
rest/http-client.env.json

@ -6,10 +6,10 @@
},
"dev": {
"name": "dev",
"url": "http://192.168.0.99/gateway"
"url": "http://192.168.31.13/gateway"
},
"local": {
"version": "v2",
"url": "http://192.168.0.99/gateway"
"url": "http://192.168.31.13/gateway"
}
}

4
src/App.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-04-28 09:57:13
* @LastEditTime: 2021-05-09 21:17:03
-->
<template>
@ -40,7 +40,7 @@ export default {
},
},
created() {
// const userId = '1218763410024566784';
// const userId = '1210049212671201280';
// const params = { userId };
// await this.getUserId(params);
// await this.getToken();

2
src/common/portrait.styl

@ -209,7 +209,7 @@
height: 40px;
font-size: 14px;
right: 18px;
top: 50px;
top: 0;
}
// flex
.d-flex{

19
src/components/BiologicalSampleSearch/SampleTable.vue

@ -13,9 +13,8 @@
class="white pa-3"
>
<template slot="sampleType" slot-scope="text, record">
<span v-if="record.sampleType === 0">血标本上清液</span>
<span v-else-if="record.sampleType === 1">血标本细胞</span>
<span v-else-if="record.sampleType === 2">尿标本</span>
<span v-if="record.sampleType === 0">尿标本</span>
<span v-else-if="record.sampleType === 1">抗凝血标本</span>
</template>
<template slot="collectTime" slot-scope="text, record">
<span>{{ record.collectTime }}</span>
@ -48,12 +47,12 @@ const columns = [
dataIndex: 'patientCode',
key: 'patientCode',
},
{
title: '生物样本编号',
align: 'center',
dataIndex: 'code',
key: 'code',
},
// {
// title: '',
// align: 'center',
// dataIndex: 'code',
// key: 'code',
// },
{
title: '类型',
align: 'center',
@ -79,7 +78,7 @@ const columns = [
export default {
name: 'PatientTable',
props: { lists: { type: Object, default: null } },
props: { lists: { type: Object, default: () => {} } },
data() {
return {

36
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-26 18:12:49
* @LastEditTime: 2021-05-06 12:56:38
-->
<template>
<!-- search -->
@ -11,23 +11,30 @@
<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-item>
<a-select placeholder="请选择医院" style="min-width: 150px" v-decorator="['hospital']" allow-clear>
<a-select placeholder="请选择医院" style="min-width: 200px" v-decorator="['hospital']" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in hospitals">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<a-select placeholder="请选择样本类型" style="min-width: 150px" v-decorator="['sampleType']" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in types">{{ item.title }}</a-select-option>
</a-select>
<a-input placeholder="住院号" style="width: 200px" v-decorator="['inpatientNumber']" />
</a-form-item>
<a-form-item>
<a-input placeholder="患者编号" style="width: 14em" v-decorator="['inpatientNumber']" />
<a-input placeholder="研究编号" style="width: 200px" v-decorator="['code']" />
</a-form-item>
<a-form-item>
<a-select placeholder="请选择采集时间" style="min-width: 150px" v-decorator="['acquisitionTime']" allow-clear>
<a-select placeholder="请选择采集时间" style="min-width: 200px" v-decorator="['acquisitionTime']" allow-clear>
<a-select-option :key="t.id" :value="t.id" v-for="t in acquisitionTime">{{ t.title }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<!-- <a-select placeholder="请选择样本类型" style="min-width: 150px" v-decorator="['sampleType']" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in types">{{ item.title }}</a-select-option>
</a-select> -->
<span> 样本类型: </span>
<a-checkbox-group @change="changeType">
<a-checkbox v-for="item in types" :key="item.id" :value="item.id">{{ item.title }}</a-checkbox>
</a-checkbox-group>
</a-form-item>
<a-button class="mr-4" html-type="submit" icon="search" type="primary">搜索</a-button>
</a-form>
<div class="flex-1"></div>
@ -46,17 +53,14 @@ export default {
types: [
{
id: 0,
title: '血标本上清液',
title: '尿标本',
},
{
id: 1,
title: '血标本细胞',
},
{
id: 2,
title: '尿标本',
title: '抗凝血标本',
},
],
sampleType: [],
acquisitionTime: [
{
id: 0,
@ -87,12 +91,16 @@ export default {
}
},
methods: {
changeType(e) {
this.sampleType = e;
},
//
handleSubmit(e) {
e.preventDefault();
const { sampleType } = this;
this.form.validateFields(async (err, values) => {
if (!err) {
this.$emit('searchPatientMes', values);
this.$emit('searchPatientMes', values, sampleType);
}
});
},

3
src/components/BtnCom/BtnCon.vue

@ -12,6 +12,9 @@
<div @click="jump('/messagePush')" class="btn">消息推送</div>
<div @click="jump('/personalStats')" class="btn">个人数据统计</div>
<div @click="jump('/cognitiveScale')" class="btn">认知量表</div>
<div @click="jump('/Statistics')" class="btn">项目助理统计医生数据</div>
<div @click="jump('/Examine')" class="btn">项目助理审核</div>
<div @click="jump('/General')" class="btn">项目总助理审核</div>
</div>
</template>

2
src/components/CaseTable/CaseTable.vue

@ -61,7 +61,7 @@ const columns = [
scopedSlots: { customRender: 'hosName' },
},
{
title: '对照组',
title: '组',
align: 'center',
dataIndex: 'name',
key: 'name',

10
src/components/Echarts/Analysis.vue

@ -30,7 +30,7 @@ export default {
// msg: 'Welcome to Your Vue.js App',
width: '',
height: '',
nameList: [], //
nameList: [], //
dataList: [],
series: [],
stringList: [],
@ -70,9 +70,9 @@ export default {
this.nameList = [];
this.dataList = [];
this.series = [];
//
//
for (let i = 0; i < this.lists.selGroupNums.length; i++) {
// Y
// Y
this.nameList.push(this.lists.selGroupNums[i].name);
let arr = [];
//
@ -82,9 +82,9 @@ export default {
name: this.lists.stringList[j],
value: 0,
};
// list
// list
for (let k = 0; k < this.lists.selGroupNums[i].list.length; k++) {
// listcontent content value
// listcontent content value
if (this.lists.selGroupNums[i].list[k].content === this.lists.stringList[j]) {
obj.value = this.lists.selGroupNums[i].list[k].nums;
break;

25
src/components/Echarts/PatientProgress.vue

@ -1,7 +1,7 @@
<template>
<!-- <div>数据统计组件</div> -->
<div style="width: 100%; height: 500px" class="chart-box">
<div id="PatientProgress" style="height: 500px"></div>
<div style="width: 100%; height: auto" class="chart-box">
<div id="PatientProgress" style="height: 300px"></div>
</div>
</template>
<script>
@ -21,8 +21,8 @@ export default {
// msg: 'Welcome to Your Vue.js App',
width: '',
height: '',
stringList: ['0', '14', '90', '180', '365'], // legend
stringList1: ['0天', '14天', '90天', '180天', '365天'], // legend
stringList: ['0', '14', '90'], // legend
stringList1: ['0天', '14天', '90天'], // legend
nameList: [], // Id
dataList: [],
series: [], //
@ -31,19 +31,20 @@ export default {
},
watch: {
lists() {
console.log(this.lists);
this.nameList = [];
this.dataList = [];
this.series = [];
//
//
for (let i = 0; i < this.lists.length; i++) {
// Y
this.nameList.push(this.lists[i].hospitalization);
this.nameList.push(this.lists[i].code);
let arr = [];
//
for (let j = 0; j < this.stringList.length; j++) {
// list
// list
for (let k = 0; k < this.lists[i].collectTime.length; k++) {
// listcontent content value
// listcontent content value
if (this.lists[i].collectTime[k] === this.stringList[j] - 0) {
let obj = {
name: this.lists[i].collectTime[k],
@ -72,6 +73,8 @@ export default {
}
let obj = {
name: this.dataList[0][i].name + '天',
barWidth: 30,
barGap: '100%',
type: 'bar',
stack: 'total',
label: { show: true },
@ -112,7 +115,13 @@ export default {
},
series: this.series,
};
const autoHeight = this.dataList.length * 30 + this.dataList.length * 30; // this.counts
myChart.setOption(option);
myChart.getDom().style.height = autoHeight + 'px';
myChart.getDom().childNodes[0].style.height = autoHeight + 'px';
myChart.getDom().childNodes[0].childNodes[0].setAttribute('height', autoHeight);
myChart.getDom().childNodes[0].childNodes[0].style.height = autoHeight + 'px';
myChart.resize();
},
},
};

34
src/components/PatientInfo/PatientAdd.vue

@ -3,32 +3,44 @@
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-04-20 17:20:18
* @LastEditTime: 2021-05-06 16:47:25
-->
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="新增病" v-model="visible" width="700px">
<a-modal :closable="false" footer title="新增病" v-model="visible" width="700px" :mask-closable="false">
<a-form :form="form" @submit="handleSubmit" ref="form">
<!-- 研究编号 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="研究序号">
<a-input-number
style="width: 100%"
placeholder="研究序号"
:min="0"
:max="999"
v-decorator="[
'codeNum',
{
rules: [{ required: true, message: '研究序号不能为空' }],
},
]"
/>
</a-form-item>
<!-- 住院号 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="患者住院号">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="住院号">
<a-input
style="width: 100%"
placeholder="住院号"
v-decorator="[
'hospitalization',
{
rules: [
{ required: true, message: '住院号不能为空' },
{ whitespace: true, message: '住院号不能为空' },
{ max: 140, massage: '住院号最多140个字符' },
],
rules: [{ required: true, message: '住院号不能为空' }],
},
]"
/>
</a-form-item>
<!-- 对照 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="对照组">
<a-select placeholder="对照组" v-decorator="['inpatientId', { rules: [{ required: true, message: '对照组不能为空' }] }]">
<!-- -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="组">
<a-select placeholder="请选择组别" v-decorator="['inpatientId', { rules: [{ required: true, message: '组不能为空' }] }]">
<a-select-option :key="index" :value="group.id" v-for="(group, index) in controlGroups">{{ group.name }}</a-select-option>
</a-select>
</a-form-item>

84
src/components/PatientInfo/PatientTable.vue

@ -27,15 +27,25 @@
? '数据收集按时完成'
: record.inputStatus === 3
? '数据收集超时中'
: '废弃'
: record.inputStatus === 4
? '废弃'
: record.inputStatus === 5
? '审核通过'
: '已结算'
}}
</span>
</template>
<template slot="edit" slot-scope="text, record">
<a-button @click="showModal(record.id, record.hospitalization, record.code)" class="ml-4" size="small" type="primary">
<a-button @click="showModal(record.id, record.hospitalization, record.code)" class="mr-4" size="small" type="primary">
选择
</a-button>
<a-button type="primary" size="small" class="mr-4" @click="details(record.id, record.hospitalization, record.code)">
查看详情
</a-button>
<a-button v-if="record.inputStatus < 5" size="small" type="primary" @click="showStatus(record.id, record.inputStatus)">
修改状态
</a-button>
</template>
</a-table>
</div>
@ -47,12 +57,18 @@
<span style="color: green">{{ recordCode }}</span>
, 的患者的相关数据
</a-modal>
<a-modal title="修改状态" width="600px" v-model="statusModal" @ok="submit">
<a-select :default-value="recordStatus" style="width: 240px" @change="handleChange">
<a-select-option v-for="(item, index) in status" :value="index" :key="index"> {{ item }} </a-select-option>
</a-select>
</a-modal>
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
import { generatePatientReport } from 'config/api';
import { generatePatientReport, upPatientMes } from 'config/api';
const columns = [
{
title: '序号',
@ -74,7 +90,13 @@ const columns = [
key: 'hospitalization',
},
{
title: '对照组',
title: '主治医生',
align: 'center',
dataIndex: 'doctorName',
key: 'doctorName',
},
{
title: '组别',
align: 'center',
dataIndex: 'name',
key: 'name',
@ -87,11 +109,11 @@ const columns = [
scopedSlots: { customRender: 'inputStatus' },
},
{
title: '编辑',
title: '操作',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 200,
width: 300,
scopedSlots: { customRender: 'edit' },
},
];
@ -110,6 +132,10 @@ export default {
patientId: '', // Id
hospitalization: '', //
recordCode: '', //
status: ['新建', '数据搜集中', '数据搜集完成', '数据搜集超时', '废弃'],
statusModal: false,
recordStatus: 0,
recordId: '',
};
},
@ -125,7 +151,7 @@ export default {
},
methods: {
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode']),
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode', 'setShowTable']),
showModal(id, hospitalization, recordCode) {
this.patientId = id;
this.hospitalization = hospitalization;
@ -140,6 +166,31 @@ export default {
this.chooseItem(this.patientId, this.hospitalization, this.recordCode);
this.visible1 = true;
},
handleChange(e) {
this.recordType = e;
},
//
async submit() {
try {
const params = {
param: {
id: this.recordId,
inputStatus: this.recordType,
},
};
const res = await upPatientMes(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$emit('handleSelPatientMes');
this.statusModal = false;
this.$message.success('修改成功');
} else {
this.$message.error('修改失败');
}
} catch (error) {
this.$message.error(error);
}
},
//
async chooseItem(id, hospitalization, recordCode) {
try {
@ -159,6 +210,7 @@ export default {
if (localStorage.getItem('patientId') && localStorage.getItem('hospitalization')) {
this.visible = false;
this.$message.success('选择成功');
this.setShowTable(1);
}
} catch (error) {
console.log(error);
@ -169,6 +221,24 @@ export default {
const { current } = pagination;
this.$emit('handleSelPatientMes', current);
},
//
details(Id, hospitalization, code) {
this.setPatientId(Id);
this.setHospitalization(hospitalization);
this.setRecordCode(code);
localStorage.setItem('patientId', Id);
localStorage.setItem('hospitalization', hospitalization);
localStorage.setItem('recordCode', code);
this.$router.push('/patientInfo');
},
//
showStatus(id, inputStatus) {
this.recordId = id;
this.recordStatus = inputStatus;
this.statusModal = true;
},
},
};
</script>

104
src/components/PatientInfo/SampleTable.vue

@ -0,0 +1,104 @@
<template>
<div>
<!-- search -->
<div style="width: 100%" v-if="list && list.length > 0">
<a-table
:columns="columns"
:data-source="list"
:loading="loading"
:pagination="false"
:row-key="record => record.hospitalization"
@change="handleTableChange"
bordered
class="white pa-3"
>
<template slot="sampleType" slot-scope="text, record">
<span v-if="record.sampleType === 0">尿标本</span>
<span v-else-if="record.sampleType === 1">抗凝血标本</span>
</template>
<template slot="collectTime" slot-scope="text, record">
<span>{{ record.collectTime }}</span>
</template>
</a-table>
</div>
<a-empty v-else />
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
const columns = [
{
title: '医院',
align: 'center',
dataIndex: 'name',
key: 'name',
},
{
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
},
{
title: '研究编号',
align: 'center',
dataIndex: 'patientCode',
key: 'patientCode',
},
// {
// title: '',
// align: 'center',
// dataIndex: 'code',
// key: 'code',
// },
{
title: '类型',
align: 'center',
dataIndex: 'sampleType',
key: 'sampleType',
scopedSlots: { customRender: 'sampleType' },
},
{
title: '修改时间',
align: 'center',
dataIndex: 'updateAt',
key: 'updateAt',
scopedSlots: { customRender: 'updateAt' },
},
{
title: '采集时间',
align: 'center',
dataIndex: 'collectTime',
scopedSlots: { customRender: 'collectTime' },
},
];
export default {
name: 'PatientTable',
props: { list: { type: Array, default: () => [] } },
data() {
return {
columns,
loading: false,
};
},
methods: {
...mapMutations('home', ['setPatientId']),
//
chooseItem(id) {
this.setPatientId(id);
},
handleTableChange(pagination) {
const { current } = pagination;
this.$emit('handleSelPatientMes', current);
},
},
};
</script>

9
src/components/PatientInfo/Search.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19
* @LastEditors: wally
* @LastEditTime: 2021-04-20 17:19:13
* @LastEditTime: 2021-05-06 14:55:47
-->
<template>
<!-- search -->
@ -11,10 +11,13 @@
<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-item>
<a-input placeholder="研究编号" style="width: 14em" v-decorator="['inpatientNumber']" />
<a-input placeholder="研究编号" style="width: 14em" v-decorator="['code']" />
</a-form-item>
<a-form-item>
<a-select placeholder="请选择对照组" style="min-width: 450px" v-decorator="['groupValue']" allow-clear>
<a-input placeholder="住院号" style="width: 14em" v-decorator="['hospitalization']" />
</a-form-item>
<a-form-item>
<a-select placeholder="请选择组别" style="min-width: 450px" v-decorator="['groupValue']" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in controlGroups">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>

13
src/config/api.js

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-01-29 11:16:27
* @LastEditors: wally
* @LastEditTime: 2021-04-26 17:59:22
* @LastEditTime: 2021-05-08 19:25:11
*/
import axios from 'axios';
let { proxyUrl } = require('@/config/setting');
@ -12,7 +12,7 @@ const tcm = `${proxyUrl}/tcm`;
const question = `${proxyUrl}/question`;
const patient = `${tcm}/patient`; // 患者相关接口
const imp = `${tcm}/import`; // 试题相关接口
const inpatient = `${tcm}/inpatient`; // 对照组接口
const inpatient = `${tcm}/inpatient`; // 组接口
const statistics = `${tcm}/statistics`; // 数据统计相关接口
const conferenceRecords = `${tcm}/conferenceRecords`; // 会议纪要相关接口
const biologicalSamples = `${tcm}/biologicalSamples`; // 生物样本相关接口
@ -52,7 +52,7 @@ export const queryAll = params => axios.post(`${tcm}/question/query`, params);
// 查询所有得题目的类型和题目相关信息
export const queryQuestion = params => axios.get(`${tcm}/question/queryQuestion`);
// 查询所有对照组的信息
// 查询所有组的信息
export const getQuery = params => axios.post(`${inpatient}/query`, params);
// 查询统计病例数据
@ -70,6 +70,9 @@ export const countCase = params => axios.post(`${statistics}/countCase`, params)
// 统计生物样本数量
export const selAllYBS = params => axios.get(`${biologicalSamples}/selAllYBS`);
// 获取某个患者的生物样本
export const queryByPatient = params => axios.post(`${biologicalSamples}/queryByPatient`, params);
// 添加会议记录
export const saveConRec = params => axios.post(`${conferenceRecords}/save`, params);
@ -102,3 +105,7 @@ export const searchParam = params => axios.post(`${question}/patientReport/searc
// 图像识别
export const basic = params => axios.post(`${tcm}/ocr/general/basic`, params);
export const getHospitalTask = params => axios.post(`${tcm}/statistics/hospitalAdjacentTasks`, params);
export const simpleMsg = params => axios.post(`${tcm}/doctor/simpleMsg`, params);

7
src/plugins/axios.js

@ -1,3 +1,10 @@
/*
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19
* @LastEditors: wally
* @LastEditTime: 2021-05-06 11:42:20
*/
'use strict';
import Vue from 'vue';

18
src/router/index.js

@ -77,6 +77,24 @@ const routes = [
name: 'cognitiveScale',
component: () => import('@/views/CognitiveScale/CognitiveScale.vue'),
},
// 项目助理审核界面
{
path: '/Examine',
name: 'Examine',
component: () => import('@/views/ProjectAssistant/Examine.vue'),
},
// 项目总助理审核界面
{
path: '/General',
name: 'General',
component: () => import('@/views/ProjectAssistant/General.vue'),
},
// 项目助理统计医生数据
{
path: '/Statistics',
name: 'Statistics',
component: () => import('@/views/ProjectAssistant/Statistics.vue'),
},
];
const router = new VueRouter({

33
src/store/modules/home/actions.js

@ -1,7 +1,14 @@
/*
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-04-19 10:23:19
* @LastEditors: wally
* @LastEditTime: 2021-05-06 13:05:58
*/
import axios from 'axios';
import { message } from 'ant-design-vue';
import { getUserId } from 'config/api-user';
import { getQuery } from 'config/api';
import { getQuery, simpleMsg } from 'config/api';
const actions = {
/**
@ -27,7 +34,7 @@ const actions = {
},
/**
* 查询所有对照组的信息
* 查询所有组的信息
* @param {any} commit
* @param {object} params 提交的参数
*/
@ -41,7 +48,27 @@ const actions = {
throw msg;
}
} catch (error) {
throw error || '获取对照组信息失败';
throw error || '获取组别信息失败';
}
},
/**
* 查询所有医生
* @param {any} commit
* @param {object} params 提交的参数
*/
async getDoctor({ commit }, authority) {
try {
const params = { param: { authority } };
const res = await simpleMsg(params);
const { code, msg, data } = res.data;
if (code === 200) {
commit('setDoctorList', data);
} else {
throw msg;
}
} catch (error) {
throw error || '获取组别信息失败';
}
},
};

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

@ -96,6 +96,33 @@ const mutations = {
setCaseData(state, data) {
state.caseData = data;
},
/**
* 设置选择患者信息界面是否显示列表
* @param {object} state
* @param {object} data
*/
setShowTable(state, data) {
state.showTable = data;
},
/**
* 存储当前选择了那个阶段的数据查询 (0,14,90)
* @param {object} state
* @param {number} data
*/
setCallback(state, data) {
state.callback = data;
},
/**
* 存储当前选择了那个阶段的数据查询 (0,14,90)
* @param {object} state
* @param {Array} data
*/
setDoctorList(state, data) {
state.doctorList = [...data];
},
};
export default mutations;

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

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

21
src/views/BiologicalSampleSearch/BiologicalSampleSearch.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-02-19 16:04:48
* @LastEditors: wally
* @LastEditTime: 2021-02-19 17:59:27
* @LastEditTime: 2021-05-06 12:54:17
-->
<template>
<div class="d-flex flex-column">
@ -29,6 +29,7 @@ export default {
hospitalization: '', //
pageNum: 1, //
sampleType: '', //
codes: '',
};
},
@ -40,12 +41,13 @@ export default {
methods: {
...mapActions('home', ['getControlGroups']),
searchPatientMes(value) {
searchPatientMes(value, sampleType) {
if (value) {
this.hospitalId = value.hospital;
this.collectTime = value.acquisitionTime;
this.hospitalization = value.inpatientNumber;
this.sampleType = value.sampleType;
this.sampleTypes = sampleType;
this.codes = code;
}
this.handleSelPatientMes();
},
@ -55,15 +57,16 @@ export default {
if (current) {
this.pageNum = current;
}
const { collectTime, hospitalId, hospitalization, pageNum, sampleType } = this;
const { collectTime, hospitalId, hospitalization, pageNum, sampleTypes, codes } = this;
const params = {
param: {
collectTime: collectTime, //
hospitalId: hospitalId, // id
hospitalization: hospitalization, //
pageNum: pageNum, //
collectTime, //
hospitalId, // id
hospitalization, //
pageNum, //
pageSize: 10, //
sampleType: sampleType, //
sampleTypes, //
code: codes,
},
};
const res = await selBiologicalSamples(params);

62
src/views/BiologicalSamples/BiologicalSamples.vue

@ -5,31 +5,38 @@
<a-card :bordered="false" title="生物样本">
<a-form :form="form" @submit="handleSubmit">
<!-- 患者编号 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="患者编号">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="研究编号">
<a-input
placeholder="患者编号"
:disabled="showrzlb"
placeholder="研究编号"
v-decorator="[
'inpatientNumber',
{
rules: [
{ required: true, message: '患者编号不能为空' },
{ whitespace: true, message: '患者编号不能为空' },
{ max: 140, massage: '患者编号最多140个字符' },
{ required: true, message: '研究编号不能为空' },
{ whitespace: true, message: '研究编号不能为空' },
{ max: 140, massage: '研究编号最多140个字符' },
],
initialValue: hospitalization,
initialValue: recordCode,
},
]"
/>
</a-form-item>
<!-- 样本类型 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="样本类型" required>
<a-select placeholder="请选择样本类型" style="min-width: 150px" v-decorator="['sampleType']" allow-clear>
<!-- <a-select placeholder="请选择样本类型" style="min-width: 150px" v-decorator="['sampleType']" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in types">{{ item.title }}</a-select-option>
</a-select>
</a-select> -->
<a-checkbox-group @change="chanegType">
<a-checkbox v-for="item in types" :key="item.id" :value="item.id">{{ item.title }}</a-checkbox>
</a-checkbox-group>
</a-form-item>
<!-- 样本类型 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="采集时间" required>
<a-select placeholder="请选择采集时间" style="min-width: 150px" v-decorator="['acquisitionTime']" allow-clear>
<!-- {
initialValue: callback,
}, -->
<a-select-option :key="t.id" :value="t.id" v-for="t in acquisitionTime">{{ t.title }}</a-select-option>
</a-select>
</a-form-item>
@ -45,6 +52,7 @@
</template>
<script>
import { mapState } from 'vuex';
import { addBiologicalSamples } from 'config/api';
const formItemLayout = {
@ -54,27 +62,30 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 18, offset: 4 } };
export default {
name: 'BiologicalSamples',
props: {
showrzlb: {
type: Boolean,
default: false,
},
},
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'page-add' }),
inpatientNumber: '', //
hospitalization: '',
recordCode: '',
types: [
{
id: 0,
title: '血标本上清液',
title: '尿标本',
},
{
id: 1,
title: '血标本细胞',
},
{
id: 2,
title: '尿标本',
title: '抗凝血标本',
},
],
sampleType: [], //
acquisitionTime: [
{
id: 0,
@ -84,24 +95,29 @@ export default {
id: 14,
title: '14天',
},
{
id: 90,
title: '90天',
},
// {
// id: 90,
// title: '90',
// },
],
};
},
computed: mapState('home', ['callback']),
created() {
this.hospitalization = localStorage.getItem('hospitalization');
this.recordCode = localStorage.getItem('recordCode');
},
methods: {
chanegType(e) {
console.log(e);
this.sampleType = e;
},
//
handleSubmit(e) {
e.preventDefault();
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
console.log(values);
if (!values.sampleType && values.sampleType !== 0) {
if (this.sampleType && this.sampleType.length === 0) {
this.$message.error('请填写完整信息');
return;
}
@ -111,8 +127,8 @@ export default {
}
try {
const param = {
sampleType: values.sampleType,
hospitalization: values.inpatientNumber,
sampleTypes: this.sampleType,
code: values.inpatientNumber,
collectTime: values.acquisitionTime,
};
const params = { param };

10
src/views/CaseAnalysis/CaseAnalysis.vue

@ -1359,7 +1359,7 @@
placeholder="请选择类型"
style="width: 200px"
/>
<a-select @change="changeList" mode="multiple" placeholder="请选择对照组" size="default" style="width: 450px; margin-left: 40px">
<a-select @change="changeList" mode="multiple" placeholder="请选择组" size="default" style="width: 450px; margin-left: 40px">
<a-select-option :key="i.id" v-for="i in controlGroups">{{ i.name }}</a-select-option>
</a-select>
</div>
@ -1410,7 +1410,7 @@ export default {
setObj: {
hospitalId: '', // Id
hospitalization: '', //
inpatientId: '', // Id
inpatientId: '', // Id
inputStatus: '', //
},
action: upload, //
@ -1445,7 +1445,7 @@ export default {
activeKey: [], //
options: [], //
testQuestionsId: '', // Id
inpatientList: [], // Id
inpatientList: [], // Id
caseList: [],
caseAnswer: [], //
activeKey1: [],
@ -1926,7 +1926,7 @@ export default {
return labels[labels.length - 1];
},
/**
* 选择对照
* 选择组
*/
changeList(value) {
console.log(`Selected: ${value}`);
@ -2094,7 +2094,7 @@ export default {
conditionListDate: this.conditionListDate,
hospitalId: this.setObj.hospitalId, // id
hospitalization: this.setObj.hospitalization, //
inpatientId: this.inpatientList, // id
inpatientId: this.inpatientList, // id
inputStatus: this.setObj.inputStatus, //
reportParams: this.caseAnswer, //
testQuestionsId: this.testQuestionsId,

16
src/views/CaseSearch/CaseSearch.vue

@ -11,7 +11,7 @@
<a-input placeholder="患者编号" style="width: 14em" v-model="setObj.hospitalization" />
</a-form-item>
<a-form-item>
<a-select @change="chooseHos($event, 2)" allow-clear placeholder="请选择对照组" style="min-width: 450px">
<a-select @change="chooseHos($event, 2)" allow-clear placeholder="请选择组" style="min-width: 450px">
<a-select-option :key="item.id" :value="item.id" v-for="item in controlGroups">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
@ -1389,7 +1389,7 @@ export default {
setObj: {
hospitalId: '', // Id
hospitalization: '', //
inpatientId: '', // Id
inpatientId: '', // Id
inputStatus: '', //
},
action: upload, //
@ -1930,10 +1930,10 @@ export default {
list[indexA].subReportCodes[indexB] = { ...objList };
this.list = [...list];
this.spinning = true;
this.spinning = false;
} else {
console.log(msg);
this.spinning = true;
this.spinning = false;
}
}
},
@ -2044,7 +2044,7 @@ export default {
conditionListDate: this.conditionListDate,
hospitalId: this.setObj.hospitalId, // id
hospitalization: this.setObj.hospitalization, //
inpatientId: this.setObj.inpatientId, // id
inpatientId: this.setObj.inpatientId, // id
inputStatus: this.setObj.inputStatus, //
reportParams: this.caseAnswer, //
pageNum: this.pageNum,
@ -2056,14 +2056,14 @@ export default {
if (code === 200) {
this.lists = data;
console.log(this.lists);
this.spinning = true;
this.spinning = false;
} else {
this.$message.error('搜索失败');
this.spinning = true;
this.spinning = false;
}
} catch (error) {
this.$message.error('error');
this.spinning = true;
this.spinning = false;
}
},
//

393
src/views/PatientInfo/PatientInfo.vue

@ -5,7 +5,7 @@
</a-tabs>
<a-form :form="form" v-if="typeof tabNums === 'number'">
<a-spin :spinning="spinning">
<a-collapse v-model="activeKey">
<a-collapse v-model="activeKey" style="boeder-bottom: none !important">
<!-- 首先遍历整个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">
@ -36,25 +36,23 @@
:input-read-only="true"
v-else-if="a.type === 6"
/>
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, a.id)"
list-type="picture"
name="files"
v-else-if="a.type === 7"
>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === a.id;
})
"
<div v-else-if="a.type === 7">
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, a.id)"
list-type="picture"
name="files"
v-if="code || showrzlb"
>
<a-icon type="upload" />点击上传
</a-button>
</a-upload>
<a-button> <a-icon type="upload" />点击上传 </a-button>
</a-upload>
<img :src="a.answer" v-if="a.answer && !code" />
<template v-if="a.domList && a.domList.length && !code">
<img v-for="imgSrc in a.domList" :key="imgSrc" :src="imgSrc" />
</template>
</div>
<div v-else-if="a.type === 10">
<a-select :default-value="getAnswer(a.answer)" @change="onChange($event, a.type, a.id, a.recordId)" style="width: 100%">
<a-select-option :key="c" :value="b.showValue" v-for="(b, c) in a.optionVos">{{ b.showValue }}</a-select-option>
@ -162,26 +160,26 @@
:input-read-only="true"
v-else-if="h.type === 6"
/>
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, h.id)"
list-type="picture"
name="files"
v-else-if="h.type === 7"
>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === h.id;
})
"
<div v-else-if="h.type === 7">
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, h.id)"
list-type="picture"
name="files"
v-if="code || showrzlb"
>
<a-icon type="upload" />
点击上传
</a-button>
</a-upload>
<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)"
@ -424,25 +422,23 @@
style="width: 100%"
v-else-if="h.type === 6"
/>
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, h.id)"
list-type="picture"
name="files"
v-else-if="h.type === 7"
>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === h.id;
})
"
<div v-else-if="h.type === 7">
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, h.id)"
list-type="picture"
name="files"
v-if="code || showrzlb"
>
<a-icon type="upload" />点击上传
</a-button>
</a-upload>
<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)"
@ -646,7 +642,7 @@
<!-- 二级大标题 -->
<span class="hhh2">{{ w.name }}</span>
<a-upload
v-if="w.recordType && (getCode || code)"
v-if="w.recordType && (getCode || code || showrzlb)"
name="files"
:multiple="true"
:action="action"
@ -698,25 +694,23 @@
style="width: 100%"
v-else-if="e.type === 6"
/>
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, e.id, e.recordId)"
list-type="picture"
name="files"
v-else-if="e.type === 7"
>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === e.id;
})
"
<div v-else-if="e.type === 7">
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, e.id, e.recordId)"
list-type="picture"
name="files"
v-if="code || showrzlb"
>
<a-icon type="upload" />点击上传
</a-button>
</a-upload>
<a-button> <a-icon type="upload" />点击上传 </a-button>
</a-upload>
<img :src="e.answer" v-if="e.answer && !code" />
<template v-if="e.domList && e.domList.length && !code">
<img v-for="imgSrc in e.domList" :key="imgSrc" :src="imgSrc" />
</template>
</div>
<div v-else-if="e.type === 10">
<a-select
:default-value="getAnswer(e.answer)"
@ -827,26 +821,31 @@
style="width: 100%"
v-else-if="h.type === 6"
/>
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, h.id)"
list-type="picture"
name="files"
v-else-if="h.type === 7"
>
<a-button
v-show="
<div v-else-if="h.type === 7">
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, h.id)"
list-type="picture"
name="files"
v-if="code || showrzlb"
>
<a-button>
<!-- v-show="
!contentList.find(item => {
return item.testQuestionsId === h.id;
})
"
>
<a-icon type="upload" />
点击上传
</a-button>
</a-upload>
" -->
<a-icon type="upload" />
点击上传
</a-button>
<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>
</a-upload>
</div>
<div v-else-if="h.type === 10">
<a-select
:default-value="getAnswer(h.answer)"
@ -1088,26 +1087,26 @@
style="width: 100%"
v-else-if="h.type === 6"
/>
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, h.id)"
list-type="picture"
name="files"
v-else-if="h.type === 7"
>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === h.id;
})
"
<div v-else-if="h.type === 7">
<a-upload
:action="action"
:default-file-list="fileList"
:headers="headers"
@change="fileChange($event, h.id)"
list-type="picture"
name="files"
v-if="code || showrzlb"
>
<a-icon type="upload" />
点击上传
</a-button>
</a-upload>
<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)"
@ -1319,7 +1318,12 @@
</a-collapse>
</a-spin>
</a-form>
<iframe frameborder="0" height="100%" :src="rzlbSrc" v-else></iframe>
<iframe style="width: 100%; border: none !important" frameborder="0" height="100%" :src="rzlbSrc" v-else-if="tabNums === '认知量表'">
</iframe>
<sample-table v-else-if="tabNums === '生物样本'" :list="lists" class="mt-3" />
<iframe v-else-if="tabNums === '认知测评'" style="width: 100%; border: none !important" :style="{ height: height }" :src="rzlbcpSrc">
</iframe>
<biological-samples v-else-if="tabNums === '生物样本添加'" style="width: 100%" :showrzlb="showrzlb" />
<!-- <a-date-picker
v-if="list.length > 0"
:default-value="$moment(dateChoose, dateFormat)"
@ -1333,8 +1337,12 @@
,研究编号为
<span style="color: green">{{ recordCode }}</span>
</div>
<a-button @click="choosePatient" class="choose-btn" type="primary">
<a-icon type="retweet" />
重新选择患者
</a-button>
<a-button
v-if="list.length > 0 && (getCode || code)"
v-if="list.length > 0 && typeof tabNums === 'number' && (getCode || code || showrzlb)"
@click="showModal"
class="white--text px-10 bot-right-btn"
style="margin-top: 40px"
@ -1352,9 +1360,11 @@
</template>
<script>
import { mapState } from 'vuex';
import { queryAll, saveCaseMes, upload, basic } from 'config/api';
import { mapState, mapMutations } from 'vuex';
import { queryAll, saveCaseMes, upload, basic, queryByPatient } from 'config/api';
import TypeTable from 'components/TypeTable/TypeTable.vue';
import SampleTable from 'components/PatientInfo/SampleTable.vue';
import BiologicalSamples from 'views/BiologicalSamples/BiologicalSamples.vue';
const formItemLayout = {
labelCol: { span: 6 },
@ -1367,12 +1377,16 @@ const formItemLayout1 = {
const tailItemLayout = { wrapperCol: { span: 18, offset: 4 } };
export default {
name: 'PatientInfo',
components: { TypeTable },
components: { TypeTable, SampleTable, BiologicalSamples },
props: {
code: {
type: String,
default: '',
},
showrzlb: {
type: Boolean,
default: false,
},
},
data() {
@ -1406,6 +1420,9 @@ export default {
recordTypeList: [],
spinning: false,
rzlbSrc: '',
rzlbcpSrc: '',
lists: {},
height: '',
};
},
@ -1426,8 +1443,11 @@ export default {
},
},
mounted() {},
mounted() {
this.rzlbSrc = `http://sxzxyzzlm.tall.wiki/ht-common/home/reportHistory?code=LSBGD&userId=${this.ptProps.userId}`;
this.height = document.getElementsByClassName('main')[0].offsetHeight + 'px';
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}`;
},
async created() {
@ -1435,14 +1455,24 @@ export default {
this.spinning = true;
this.getCode = '';
this.tabNums = 0;
this.rzlbSrc = `http://sxzxyzzlm.tall.wiki/ht-common/home/reportHistory?code=LSBGD&userId=${this.user.id}`;
this.rzlbSrc = `https://sxzxyzzlm.tall.wiki/ht-common/home/reportHistory?code=LSBGD&userId=${this.user.id}`;
this.rzlbcpSrc = `https://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.user.id}`;
if (this.$route.query && this.$route.query.code) {
// vue code
this.getCode = this.$route.query.code;
}
await this.getQuery();
await this.getlists();
this.setCallback(0);
},
methods: {
...mapMutations('home', ['setCallback']),
/**
* 重新选择患者
*/
choosePatient() {
this.$router.push('/selectPatient');
},
// 'AB',a.id, index,k,h.id
addDom(type, id, index, quesIndex, quesId) {
const { list } = this;
@ -1455,6 +1485,7 @@ export default {
}
quesObj.domList.push('');
this.list = [...list];
console.log(this.list);
},
addDomB(type, index, indexB, id, quesIndex, quesId) {
const { list } = this;
@ -1492,6 +1523,7 @@ export default {
callback(key) {
this.contentList = [];
this.tabNums = key;
this.setCallback(key);
},
async getQuery() {
try {
@ -1507,10 +1539,14 @@ export default {
if (code === 200) {
this.list = data;
if (this.getCode || this.code) {
console.log(data);
this.tabList = data[0].reportTypes;
// this.tabList.push('');
} else {
this.tabList = [0, 14, 90, 180, 365, '认知量表'];
if (this.showrzlb) {
this.tabList = [0, 14, 90, '认知测评', '生物样本添加'];
} else {
this.tabList = [0, 14, 90, '认知量表', '生物样本'];
}
}
} else {
console.log(msg);
@ -1792,26 +1828,24 @@ 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++) {
if (this.contentList[i].testQuestionsId === id) {
this.contentList.splice(i, 1);
}
}
// for (let i = 0; i < this.contentList.length; i++) {
// if (this.contentList[i].testQuestionsId === id) {
// this.contentList.splice(i, 1);
// }
// }
console.log(info.fileList);
if (info.fileList.length > 0) {
let obj = {
testQuestionsId: id,
patientRecordId: recordId ? recordId : '',
contents: info.fileList[0].response.data[0].visitUrl,
contents: info.fileList[info.fileList.length - 1].response.data[0].visitUrl,
};
this.contentList.push(obj);
}
this.spinning = false;
console.log(this.contentList);
console.log(this.fileList);
} else if (info.file.status === 'removed') {
this.fileList = info.fileList;
for (let i = 0; i < this.contentList.length; i++) {
@ -1821,6 +1855,7 @@ export default {
}
this.spinning = false;
}
console.log(this.contentList);
},
//
async handleChange(info, title, recordId, indexA, indexB) {
@ -1830,7 +1865,7 @@ export default {
const objList = list[indexA].subReportCodes[indexB];
const params = {
param: {
hospitalId: this.hospitalId,
patientId: this.patientId,
code: title,
url: info.file.response.data[0].visitUrl,
},
@ -1888,6 +1923,20 @@ export default {
for (let k = 0; k < item.questionVos.length; k++) {
const itemADom = item.questionVos[k];
if (itemADom.domList && itemADom.domList.length) {
// domList,answer,
// , answer
// domList,answer
if (
!this.contentList.find(item => {
item.testQuestionsId === itemADom.id;
})
) {
let objAnswer = {
testQuestionsId: itemADom.id,
contents: itemADom.answer,
};
this.contentList.push(objAnswer);
}
for (let m = 0; m < itemADom.domList.length; m++) {
const listItem = itemADom.domList[m];
if (listItem !== '') {
@ -1906,6 +1955,20 @@ export default {
for (let n = 0; n < itemBDom.questionVos.length; n++) {
const itemCDOM = itemBDom.questionVos[n];
if (itemCDOM.domList && itemCDOM.domList.length) {
// domList,answer,
// , answer
// domList,answer
if (
!this.contentList.find(item => {
item.testQuestionsId === itemCDOM.id;
})
) {
let objAnswer = {
testQuestionsId: itemCDOM.id,
contents: itemCDOM.answer,
};
this.contentList.push(objAnswer);
}
for (let p = 0; p < itemCDOM.domList.length; p++) {
const listItem = itemCDOM.domList[p];
if (listItem !== '') {
@ -1931,6 +1994,20 @@ export default {
for (let q = 0; q < subVos.length; q++) {
const itemADom = subVos[q];
if (itemADom.domList && itemADom.domList.length) {
// domList,answer,
// , answer
// domList,answer
if (
!this.contentList.find(item => {
item.testQuestionsId === itemADom.id;
})
) {
let objAnswer = {
testQuestionsId: itemADom.id,
contents: itemADom.answer,
};
this.contentList.push(objAnswer);
}
for (let m = 0; m < itemADom.domList.length; m++) {
const listItem = itemADom.domList[m];
if (listItem !== '') {
@ -1949,6 +2026,20 @@ export default {
for (let n = 0; n < itemBDom.questionVos.length; n++) {
const itemCDOM = itemBDom.questionVos[n];
if (itemCDOM.domList && itemCDOM.domList.length) {
// domList,answer,
// , answer
// domList,answer
if (
!this.contentList.find(item => {
item.testQuestionsId === itemCDOM.id;
})
) {
let objAnswer = {
testQuestionsId: itemCDOM.id,
contents: itemCDOM.answer,
};
this.contentList.push(objAnswer);
}
for (let p = 0; p < itemCDOM.domList.length; p++) {
const listItem = itemCDOM.domList[p];
if (listItem !== '') {
@ -1975,6 +2066,13 @@ export default {
this.contentList.splice(i, 1);
}
}
if (this.contentList.length === 0) {
this.spinning = false;
this.confirmLoading = false;
this.visible = false;
this.$message.error('用户未进行改动,无需保存');
return;
}
const params = {
param: {
list: this.contentList,
@ -1988,20 +2086,33 @@ export default {
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;
this.getQuery();
}
} catch (error) {
this.spinning = false;
this.$message.error('error');
this.$message.error('提交失败');
}
let { contentList } = this;
contentList = [];
this.contentList = [...contentList];
this.visible = false;
this.confirmLoading = false;
},
//
async getlists() {
try {
const { patientId } = this;
const params = { param: { patientId } };
const res = await queryByPatient(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data);
this.lists = data;
} else {
this.$message.error(msg);
}
} catch (error) {}
},
},
};
</script>
@ -2029,4 +2140,10 @@ export default {
/deep/ .ant-tabs-bar {
margin-bottom: 0 !important;
}
.choose-btn {
position: fixed;
top: 20px;
right: 12px;
}
</style>

37
src/views/PersonalStats/PersonalStats.vue

@ -1,21 +1,19 @@
<!--
* @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%; max-height: 500px; height: auto" title="临近任务">
<adjacentTasks :obj-list="objList" @getTableData="getTableData" />
</a-card>
</div>
<div class="fill-width mb-3">
<a-card style="width: 100%; height: 600px" title="进行中患者进度">
<patientProgress :lists="lists" />
</a-card>
<div style="flex: 1">
<div class="fill-width">
<div class="mb-3">
<a-card style="height: auto" title="临近任务">
<adjacentTasks :obj-list="objList" @getTableData="getTableData" />
</a-card>
</div>
<div class="mb-3">
<a-card style="height: auto" title="进行中病例进度">
<patientProgress v-show="lists.length" :lists="lists" />
<a-empty v-if="!lists.length">
<span slot="description" style="color: #bfbfbf"> 暂无进行中病例 </span>
</a-empty>
</a-card>
</div>
</div>
</div>
</template>
@ -49,8 +47,9 @@ export default {
const res = await patientProgress(params);
const { code, data, msg } = res.data;
if (code === 200) {
console.log(data);
this.lists = data;
let { lists } = this;
lists = data;
this.lists = [...lists];
} else {
this.$message.error(msg);
}

10
src/views/PersonalStats/components/AdjacentTasks.vue

@ -17,7 +17,9 @@
</template>
</a-table>
</div>
<a-empty v-else />
<a-empty v-else>
<span slot="description" style="color: #bfbfbf"> 暂无任务 </span>
</a-empty>
</div>
</template>
@ -25,10 +27,10 @@
import { mapMutations, mapState } from 'vuex';
const columns = [
{
title: '患者编号',
title: '研究编号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
dataIndex: 'code',
key: 'code',
},
{
title: '日期',

285
src/views/ProjectAssistant/Examine.vue

@ -0,0 +1,285 @@
<template>
<div class="flex-1 flex-wrap">
<div style="width: 100%">
<a-form :form="form" class="d-flex flex-nowrap align-center" layout="inline">
<a-form-item>
<a-select placeholder="请选择医生" style="min-width: 120px" @change="changeDoctorId" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in doctorList">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<a-range-picker @change="changeTime">
<template slot="dateRender" slot-scope="current">
<div class="ant-calendar-date" :style="getCurrentStyle(current)">
{{ current.date() }}
</div>
</template>
</a-range-picker>
</a-form-item>
<a-form-item>
<a-select placeholder="请选择状态" :default-value="recordStatus" style="min-width: 120px" @change="changeStatus" allow-clear>
<a-select-option :key="index" :value="index" v-for="(item, index) in status">{{ item }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<a-select placeholder="请选择组别" style="min-width: 360px" @change="changeInpatientId" allow-clear>
<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 @click="handleSearch" class="mr-4" html-type="submit" icon="search" type="primary">搜索</a-button>
</a-form>
<a-table
v-if="lists && lists.list && lists.list.length > 0"
:columns="columns"
:data-source="lists.list"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
bordered
class="white pa-3 mt-3"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<template slot="inputStatus" slot-scope="text, record">
<span>
{{
record.inputStatus === 0
? '新建'
: record.inputStatus === 1
? '数据收集中'
: record.inputStatus === 2
? '数据收集按时完成'
: record.inputStatus === 3
? '数据收集超时中'
: record.inputStatus === 4
? '废弃'
: record.inputStatus === 5
? '审核通过'
: '已结算'
}}
</span>
</template>
<template slot="edit" slot-scope="text, record">
<a-popconfirm placement="left" ok-text="确定" cancel-text="取消" @confirm="changeRecordStatus(record.id)">
<template slot="title">
<p>是否确定通过该患者记录</p>
</template>
<a-button v-if="record.inputStatus === 2" size="small" type="primary">审核通过</a-button>
</a-popconfirm>
<a-button type="primary" size="small" class="ml-4" @click="details(record.id, record.hospitalization, record.code)">
查看详情
</a-button>
</template>
</a-table>
<a-empty v-else />
</div>
</div>
</template>
<script>
import { mapState, mapActions, mapMutations } from 'vuex';
import { selPatientMes, upPatientMes } from 'config/api';
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
scopedSlots: { customRender: 'id' },
},
{
title: '研究编号',
align: 'center',
dataIndex: 'code',
key: 'code',
},
{
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
},
{
title: '主治医生',
align: 'center',
dataIndex: 'doctorName',
key: 'doctorName',
},
{
title: '组别',
align: 'center',
dataIndex: 'name',
key: 'name',
},
{
title: '状态',
align: 'center',
dataIndex: 'inputStatus',
key: 'inputStatus',
scopedSlots: { customRender: 'inputStatus' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 250,
scopedSlots: { customRender: 'edit' },
},
];
export default {
name: 'Examine',
data() {
return {
str: '项目助理审核界面',
columns,
form: this.$form.createForm(this, { name: 'search' }),
loading: false,
visible: false,
lists: { pageNum: 1, pageSize: 10, total: 1, list: [] },
codes: '',
pagination: {
current: 1,
pageSize: 10,
total: 0,
},
hospitalization: '',
inpatientId: '',
statusModal: false,
recordStatus: 2,
status: ['新建', '数据搜集中', '数据搜集完成', '数据搜集超时', '废弃', '审核通过', '已结算'],
startTime: '',
endTime: '',
doctorId: '',
};
},
computed: mapState('home', ['controlGroups', 'doctorList']),
created() {
this.getControlGroups();
this.getDoctor(1);
this.handleSelPatientMes();
},
methods: {
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode']),
...mapActions('home', ['getDoctor', 'getControlGroups']),
handleSearch() {
this.pagination.current = 1;
this.handleSelPatientMes();
},
async handleSelPatientMes() {
try {
const { hospitalization, pagination, inpatientId, doctorId, codes, startTime, endTime, recordStatus } = this;
const params = {
param: {
hospitalization,
inpatientId,
pageNum: pagination.current,
code: codes,
inputStatus: recordStatus,
pageSize: 10,
doctorId,
role: 1,
startTime,
endTime,
},
};
const res = await selPatientMes(params);
const { code, msg, data } = res.data;
console.log('获取列表');
if (code === 200) {
let { lists } = this;
lists = { ...data };
this.lists = { ...lists };
} else {
this.$message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw new Error(error);
}
},
//
details(Id, hospitalization, code) {
this.setPatientId(Id);
this.setHospitalization(hospitalization);
this.setRecordCode(code);
localStorage.setItem('patientId', Id);
localStorage.setItem('hospitalization', hospitalization);
localStorage.setItem('recordCode', code);
this.$router.push('/patientInfo');
},
//
showStatus(inputStatus) {
this.recordStatus = inputStatus;
this.statusModal = true;
},
//
getCurrentStyle(current, today) {
const style = {};
if (current.date() === 1) {
style.border = '1px solid #1890ff';
style.borderRadius = '50%';
}
return style;
},
//
changeDoctorId(e) {
if (typeof e !== 'number') {
this.doctorId = e;
} else {
this.doctorId = '';
}
},
//
changeTime(e) {
if (e && e.length) {
this.startTime = this.$moment(e[0]._d).format('YYYY-MM-DD HH:mm:ss');
this.endTime = this.$moment(e[1]._d).format('YYYY-MM-DD HH:mm:ss');
} else {
this.startTime = '';
this.endTime = '';
}
},
//
changeInpatientId(e) {
if (typeof e !== 'number') {
this.inpatientId = e;
} else {
this.inpatientId = '';
}
},
//
changeStatus(e) {
if (typeof e) {
this.recordStatus = e;
} else {
this.changeStatus = '';
}
},
//
async changeRecordStatus(id) {
try {
const params = {
param: {
id,
inputStatus: 5,
},
};
const res = await upPatientMes(params);
const { code } = res.data;
if (code === 200) {
this.$message.success('已通过');
this.handleSelPatientMes();
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>
<style lang="stylus" scoped ></style>

318
src/views/ProjectAssistant/General.vue

@ -0,0 +1,318 @@
<template>
<div class="flex-1 flex-wrap">
<div style="width: 100%">
<a-form :form="form" class="d-flex flex-nowrap align-center" layout="inline">
<a-form-item>
<a-select placeholder="请选择医院" style="min-width: 240px" @change="changeHospitalId" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in hospitals">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<a-select placeholder="请选择医生" style="min-width: 120px" @change="changeDoctorId" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in doctorList">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<a-range-picker @change="changeTime" style="width: 300px">
<template slot="dateRender" slot-scope="current">
<div class="ant-calendar-date" :style="getCurrentStyle(current)">
{{ current.date() }}
</div>
</template>
</a-range-picker>
</a-form-item>
<a-form-item>
<a-select placeholder="请选择状态" :default-value="recordStatus" style="min-width: 120px" @change="changeStatus" allow-clear>
<a-select-option :key="index" :value="index" v-for="(item, index) in status">{{ item }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<a-select placeholder="请选择组别" style="min-width: 360px" @change="changeInpatientId" allow-clear>
<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 @click="handleSearch" class="mr-4" html-type="submit" icon="search" type="primary">搜索</a-button>
</a-form>
<a-table
v-if="lists && lists.list && lists.list.length > 0"
:columns="columns"
:data-source="lists.list"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
bordered
class="white pa-3 mt-3"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<template slot="inputStatus" slot-scope="text, record">
<span>
{{
record.inputStatus === 0
? '新建'
: record.inputStatus === 1
? '数据收集中'
: record.inputStatus === 2
? '数据收集按时完成'
: record.inputStatus === 3
? '数据收集超时中'
: record.inputStatus === 4
? '废弃'
: record.inputStatus === 5
? '审核通过'
: '已结算'
}}
</span>
</template>
<template slot="edit" slot-scope="text, record">
<a-popconfirm placement="left" ok-text="确定" cancel-text="取消" @confirm="changeRecordStatus(record.id)">
<template slot="title">
<p>是否确定通过该患者记录</p>
</template>
<a-button v-if="record.inputStatus === 5" size="small" type="primary">审核通过</a-button>
</a-popconfirm>
<a-button type="primary" size="small" class="ml-4" @click="details(record.id, record.hospitalization, record.code)">
查看详情
</a-button>
</template>
</a-table>
<a-empty v-else />
</div>
</div>
</template>
<script>
import { mapState, mapActions, mapMutations } from 'vuex';
import { selPatientMes, upPatientMes, getHList } from 'config/api';
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
scopedSlots: { customRender: 'id' },
},
{
title: '研究编号',
align: 'center',
dataIndex: 'code',
key: 'code',
},
{
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
},
{
title: '主治医生',
align: 'center',
dataIndex: 'doctorName',
key: 'doctorName',
},
{
title: '组别',
align: 'center',
dataIndex: 'name',
key: 'name',
},
{
title: '状态',
align: 'center',
dataIndex: 'inputStatus',
key: 'inputStatus',
scopedSlots: { customRender: 'inputStatus' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 250,
scopedSlots: { customRender: 'edit' },
},
];
export default {
name: 'General',
data() {
return {
str: '项目助理审核界面',
columns,
form: this.$form.createForm(this, { name: 'search' }),
loading: false,
visible: false,
lists: { pageNum: 1, pageSize: 10, total: 1, list: [] },
codes: '',
pagination: {
current: 1,
pageSize: 10,
total: 0,
},
hospitals: [],
hospitalization: '',
inpatientId: '',
statusModal: false,
recordStatus: 5,
status: ['新建', '数据搜集中', '数据搜集完成', '数据搜集超时', '废弃', '审核通过', '已结算'],
startTime: '',
endTime: '',
doctorId: '',
HospitalId: '',
};
},
computed: mapState('home', ['controlGroups', 'doctorList']),
created() {
this.getHospital();
this.getControlGroups();
this.getDoctor(1);
this.handleSelPatientMes();
},
methods: {
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode']),
...mapActions('home', ['getDoctor', 'getControlGroups']),
//
changeHospitalId(e) {
console.log(typeof e);
if (typeof e === 'string') {
this.HospitalId = e;
} else {
this.HospitalId = '';
}
},
//
async getHospital() {
try {
const res = await getHList();
const { code, msg, data } = res.data;
if (code === 200) {
this.hospitals = data;
console.log(data);
} else {
this.$message.error('查询医院列表失败');
}
} catch (error) {
this.$message.error('查询医院列表失败');
}
},
handleSearch() {
this.pagination.current = 1;
this.handleSelPatientMes();
},
async handleSelPatientMes() {
try {
const { HospitalId, hospitalization, pagination, inpatientId, doctorId, codes, startTime, endTime, recordStatus } = this;
const params = {
param: {
hospitalId: HospitalId,
hospitalization,
inpatientId,
pageNum: pagination.current,
code: codes,
inputStatus: recordStatus,
pageSize: 10,
doctorId,
role: 1,
startTime,
endTime,
},
};
const res = await selPatientMes(params);
const { code, msg, data } = res.data;
console.log('获取列表');
if (code === 200) {
let { lists } = this;
lists = { ...data };
this.lists = { ...lists };
} else {
this.$message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw new Error(error);
}
},
//
details(Id, hospitalization, code) {
this.setPatientId(Id);
this.setHospitalization(hospitalization);
this.setRecordCode(code);
localStorage.setItem('patientId', Id);
localStorage.setItem('hospitalization', hospitalization);
localStorage.setItem('recordCode', code);
this.$router.push('/patientInfo');
},
//
showStatus(inputStatus) {
this.recordStatus = inputStatus;
this.statusModal = true;
},
//
getCurrentStyle(current, today) {
const style = {};
if (current.date() === 1) {
style.border = '1px solid #1890ff';
style.borderRadius = '50%';
}
return style;
},
//
changeDoctorId(e) {
if (typeof e !== 'number') {
this.doctorId = e;
} else {
this.doctorId = '';
}
},
//
changeTime(e) {
if (e && e.length) {
this.startTime = this.$moment(e[0]._d).format('YYYY-MM-DD HH:mm:ss');
this.endTime = this.$moment(e[1]._d).format('YYYY-MM-DD HH:mm:ss');
} else {
this.startTime = '';
this.endTime = '';
}
},
//
changeInpatientId(e) {
if (typeof e !== 'number') {
this.inpatientId = e;
} else {
this.inpatientId = '';
}
},
//
changeStatus(e) {
if (typeof e) {
this.recordStatus = e;
} else {
this.changeStatus = '';
}
},
//
async changeRecordStatus(id) {
try {
const params = {
param: {
id,
inputStatus: 6,
},
};
const res = await upPatientMes(params);
const { code } = res.data;
if (code === 200) {
this.$message.success('已通过');
this.handleSelPatientMes();
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>
<style lang="stylus" scoped ></style>

106
src/views/ProjectAssistant/Statistics.vue

@ -0,0 +1,106 @@
<template>
<div>
<div style="width: 100%" v-if="objList && objList.list && objList.list.length > 0">
<a-table
:columns="columns"
:data-source="objList.list"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
@change="getTableData"
bordered
class="white pa-3"
>
<template slot="shijian" slot-scope="text, record">
<span>{{ record.shijian.toLocaleString().replace(/:\d{1,2}$/, ' ') }}</span>
</template>
</a-table>
</div>
<a-empty v-else>
<span slot="description" style="color: #bfbfbf"> 暂无任务 </span>
</a-empty>
</div>
</template>
<script>
import { getHospitalTask } from 'config/api';
const columns = [
{
title: '研究编号',
align: 'center',
dataIndex: 'code',
key: 'code',
},
{
title: '日期',
align: 'center',
dataIndex: 'shijian',
key: 'shijian',
scopedSlots: { customRender: 'shijian' },
},
{
title: '医生',
align: 'center',
dataIndex: 'doctorName',
key: 'doctorName',
scopedSlots: { customRender: 'doctorName' },
},
{
title: '任务',
align: 'center',
dataIndex: 'task',
key: 'task',
scopedSlots: { customRender: 'task' },
},
];
export default {
name: 'Statistics',
data() {
return {
str: '项目助理数据统计界面',
columns,
objList: {},
pagination: {
current: 1,
pageSize: 20,
total: 0,
},
loading: false,
};
},
created() {
this.getData();
},
methods: {
async getData() {
try {
this.loading = true;
const params = {
param: {
pageNum: this.pagination.current,
pageSize: this.pagination.pageSize,
},
};
const res = await getHospitalTask(params);
console.log(res);
const { code, msg, data } = res.data;
if (code === 200) {
this.objList = { ...data };
console.log(data);
this.loading = false;
}
} catch (error) {
console.log(error);
}
},
getTableData(pagination) {
const { current } = pagination;
this.pagination.current = current;
this.getData();
},
},
};
</script>
<style lang="stylus" scoped ></style>

74
src/views/SelectPatient/SelectPatient.vue

@ -1,24 +1,35 @@
<template>
<div class="d-flex flex-column main">
<div v-if="!patientId">
<div v-if="showTable === 0">
<search @searchPatientMes="searchPatientMes" />
<patient-table :lists="lists" @handleSelPatientMes="handleSelPatientMes" class="mt-3" />
</div>
<div v-else style="position: relative">
<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' : ''">
<!-- <a-tabs default-active-key="OTHER" @tabClick="changeShow">
<a-tab-pane v-for="item in codeTypeList" :key="item.code" :tab="item.name">
<div v-if="item.code === 'SWYB'" class="flex-1">
<biological-samples style="width: 100%" />
</div>
<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'" class="flex-1">
<patient-info :code="item.code" style="width: 100%" />
</div>
</a-tab-pane>
</a-tabs>
</div> -->
<div class="flex-1">
<div style="width: 100%">
<patient-info style="width: 100%" :showrzlb="showrzlb" />
<!-- <a-collapse style="width: 100%; border-top: none !important">
<a-collapse-panel v-for="item in codeTypeList" :key="item.code" :header="item.name">
<div v-if="item.code === 'RZLB'" class="flex-1" style="position: relative">
<iframe style="width: 100%; border: none !important" :style="{ height: height }" :src="rzlbSrc"></iframe>
</div>
<div v-else-if="item.code === 'SWYB'" class="flex-1">
<biological-samples style="width: 100%" :showrzlb="showrzlb" />
</div>
</a-collapse-panel>
</a-collapse> -->
</div>
</div>
<!-- </a-tab-pane>
</a-tabs> -->
<a-button @click="choosePatient" class="choose-btn" type="primary">
<a-icon type="retweet" />
重新选择患者
@ -31,13 +42,13 @@
import Search from 'components/PatientInfo/Search.vue';
import PatientTable from 'components/PatientInfo/PatientTable.vue';
import PatientInfo from 'views/PatientInfo/PatientInfo.vue';
import BiologicalSamples from 'views/BiologicalSamples/BiologicalSamples.vue';
// import BiologicalSamples from 'views/BiologicalSamples/BiologicalSamples.vue';
import { selPatientMes } from 'config/api';
import { mapState, mapActions, mapMutations } from 'vuex';
export default {
name: 'SelectPatient',
components: { Search, PatientTable, PatientInfo, BiologicalSamples },
components: { Search, PatientTable, PatientInfo },
data() {
return {
lists: { pageNum: 1, pageSize: 10, total: 1, list: [] },
@ -45,22 +56,6 @@ export default {
inpatientId: '',
height: '',
codeTypeList: [
{
code: 'OTHER',
name: '基础信息',
},
{
code: 'ZLXG',
name: '诊疗相关',
},
{
code: 'XYJC',
name: '血液检查',
},
{
code: 'QXJC',
name: '器械检查',
},
{
code: 'RZLB',
name: '认知量表',
@ -72,28 +67,33 @@ export default {
],
isShow: true,
rzlbSrc: '',
codes: '',
showrzlb: true,
};
},
computed: mapState('home', ['patientId', 'ptProps', 'user']),
computed: mapState('home', ['patientId', 'ptProps', 'user', 'showTable']),
mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight + 'px';
this.rzlbSrc = `http://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.ptProps.userId}`;
this.rzlbSrc = `https://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.ptProps.userId}`;
},
created() {
this.setShowTable(0);
this.handleSelPatientMes();
this.getControlGroups();
this.rzlbSrc = `http://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.user.id}`;
this.choosePatient();
this.rzlbSrc = `https://sxzxyzzlm.tall.wiki/ht-common?code=KT&userId=${this.user.id}`;
},
methods: {
...mapActions('home', ['getControlGroups']),
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode']),
...mapMutations('home', ['setPatientId', 'setHospitalization', 'setRecordCode', 'setShowTable']),
searchPatientMes(value) {
if (value) {
this.hospitalization = value.inpatientNumber;
this.hospitalization = value.hospitalization;
this.codes = value.code;
this.inpatientId = value.groupValue;
}
this.handleSelPatientMes();
@ -101,13 +101,15 @@ export default {
async handleSelPatientMes(pageNum = 1) {
try {
const { hospitalization, inpatientId } = this;
const { hospitalization, inpatientId, codes } = this;
const params = {
param: {
hospitalization,
inpatientId,
pageNum,
code: codes,
pageSize: 10,
role: 0,
},
};
const res = await selPatientMes(params);
@ -140,6 +142,8 @@ export default {
if (localStorage.getItem('recordCode')) {
localStorage.removeItem('recordCode');
}
this.handleSelPatientMes();
this.setShowTable(0);
},
changeShow() {
@ -153,7 +157,7 @@ export default {
<style lang="stylus" scoped>
.choose-btn {
position: fixed;
top: 74px;
top: 20px;
right: 12px;
}

Loading…
Cancel
Save