Browse Source

页面调整

master
aBin 4 years ago
parent
commit
e785ebac80
  1. 6
      .env.development
  2. 21
      src/App.vue
  3. 6
      src/components/BiologicalSampleSearch/Search.vue
  4. 15
      src/components/CaseTable/CaseTable.vue
  5. 6
      src/components/Echarts/Analysis.vue
  6. 24
      src/components/Echarts/Categorymap.vue
  7. 36
      src/components/Echarts/Cisualmap.vue
  8. 124
      src/components/Echarts/PatientProgress.vue
  9. 29
      src/components/Echarts/Piemap.vue
  10. 50
      src/components/Echarts/Treemap.vue
  11. 3
      src/components/PatientInfo/PatientTable.vue
  12. 2
      src/components/PatientInfo/Search.vue
  13. 6
      src/config/api.js
  14. 2
      src/plugins/ant-design-vue.js
  15. 4
      src/views/BiologicalSamples/BiologicalSamples.vue
  16. 20
      src/views/CaseAnalysis/CaseAnalysis.vue
  17. 1157
      src/views/CaseSearch/CaseSearch.vue
  18. 11
      src/views/Index/Index.vue
  19. 61
      src/views/Meeting/Meeting.vue
  20. 17
      src/views/Mixin/mixin.js
  21. 133
      src/views/PatientInfo/PatientInfo.vue
  22. 74
      src/views/PersonalStats/PersonalStats.vue
  23. 80
      src/views/PersonalStats/components/AdjacentTasks.vue

6
.env.development

@ -1,10 +1,10 @@
VUE_APP_MODE=development
VUE_APP_NODE_ENV=development
VUE_APP_SCENE=tcm
VUE_APP_BASE_URL=https://test.tall.wiki/
VUE_APP_API_URL=https://test.tall.wiki/gateway
VUE_APP_BASE_URL=http://www.sxwikionline.com/
VUE_APP_API_URL=http://www.sxwikionline.com/gateway
VUE_APP_PROXY_URL=/gateway
VUE_APP_PUBLIC_PATH=/tcm
VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws
VUE_APP_MSG_URL=wss://www.sxwikionline.com/websocket/message/v4.0/ws
VUE_APP_TITLE=中医药大学课题数据库
VUE_APP_DESCRIPTION=中医药大学课题数据库

21
src/App.vue

@ -1,7 +1,7 @@
<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>
@ -10,12 +10,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 };
},
@ -27,17 +27,16 @@ export default {
if (val.userId) {
const params = { userId: val.userId };
this.getUserId(params);
this.getHospitalId(val.projectId);
console.log('val.userId:' + val.userId);
}
},
},
created() {
const userId = '1218763410024566784';
const params = { userId };
this.getUserId(params);
// this.getToken();
this.getHospitalId();
// const userId = '1218763410024566784';
// const params = { userId };
// await this.getUserId(params);
// await this.getToken();
if (localStorage.getItem('patientId')) {
this.setPatientId(localStorage.getItem('patientId'));
}
@ -56,9 +55,9 @@ export default {
...mapActions('home', ['getUserId']),
...mapMutations('home', ['setPtProps', 'setHospitalId', 'setPatientId', 'getToken']),
async getHospitalId() {
async getHospitalId(Id) {
try {
const res = await getHId(1);
const res = await getHId(Id);
const { code, msg, data } = res.data;
if (code === 200) {
this.setHospitalId(data.id);

6
src/components/BiologicalSampleSearch/Search.vue

@ -4,12 +4,12 @@
<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']">
<a-select placeholder="请选择医院" style="min-width: 150px" 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']">
<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-form-item>
@ -17,7 +17,7 @@
<a-input placeholder="患者住院号" style="width: 14em" v-decorator="['inpatientNumber']" />
</a-form-item>
<a-form-item>
<a-select placeholder="请选择采集时间" style="min-width: 150px" v-decorator="['acquisitionTime']">
<a-select placeholder="请选择采集时间" style="min-width: 150px" 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>

15
src/components/CaseTable/CaseTable.vue

@ -22,6 +22,9 @@
<span v-else-if="record.inputStatus === 3">数据搜集超时</span>
<span v-else-if="record.inputStatus === 4">废弃</span>
</template>
<template slot="id" slot-scope="text, record">
<a-button type="primary" @click="details(record.id)">查看详情</a-button>
</template>
</a-table>
</div>
<a-empty v-else />
@ -58,6 +61,13 @@ const columns = [
key: 'inputStatus',
scopedSlots: { customRender: 'inputStatus' },
},
{
title: '操作',
align: 'center',
dataIndex: 'id',
key: 'id',
scopedSlots: { customRender: 'id' },
},
];
export default {
@ -94,6 +104,11 @@ export default {
const { current } = pagination;
this.$emit('setData', current);
},
details(Id) {
console.log(Id);
localStorage.setItem('patientId', Id);
this.$router.push('/patientInfo');
},
},
};
</script>

6
src/components/Echarts/Analysis.vue

@ -13,8 +13,10 @@
</template>
<script>
import { HospitalComplete } from 'config/api';
import mixins from 'views/Mixin/mixin.js';
export default {
name: 'Analysis',
mixins: [mixins],
props: {
lists: {
type: Object,
@ -87,12 +89,10 @@ export default {
this.series.push(obj);
}
this.drawLine();
console.log(this.dataList);
console.log(this.series);
},
},
mounted() {
this.drawLine();
this.init(this.drawLine);
},
methods: {
drawLine() {

24
src/components/Echarts/Categorymap.vue

@ -13,14 +13,15 @@
</template>
<script>
import { HospitalComplete } from 'config/api';
import mixins from 'views/Mixin/mixin.js';
export default {
name: 'Categorymap',
mixins: [mixins],
data() {
return {
// msg: 'Welcome to Your Vue.js App',
width: '',
height: '',
timer: null,
list: [],
xDataList: [],
aList: [], //
@ -31,26 +32,7 @@ export default {
};
},
mounted() {
this.drawLine();
// this.timer = setInterval(() => {
// this.drawLine();
// }, 10000);
// let wh = window.innerWidth;
// let hg = window.innerHeight;
// this.width = wh + 'px';
// this.height = hg + 'px';
// console.log(this.height);
// window.onresize = () => {
// return (() => {
// wh = window.innerWidth;
// hg = window.innerHeight;
// this.width = wh + 'px';
// this.height = hg + 'px';
// })();
// };
},
destroyed() {
clearInterval(this.timer);
this.init(this.drawLine);
},
methods: {
async drawLine() {

36
src/components/Echarts/Cisualmap.vue

@ -6,9 +6,12 @@
</div>
</template>
<script>
import { mapState } from 'vuex';
import { countCase } from 'config/api';
import mixins from 'views/Mixin/mixin.js';
export default {
name: 'Cisualmap',
mixins: [mixins],
data() {
return {
// msg: 'Welcome to Your Vue.js App',
@ -22,24 +25,9 @@ export default {
dataList2: [], //
};
},
computed: mapState('home', ['ptProps', 'hospitalId']),
mounted() {
this.drawLine();
// this.timer = setInterval(() => {
// this.drawLine();
// }, 10000);
// let wh = window.innerWidth;
// let hg = window.innerHeight;
// this.width = wh + 'px';
// this.height = hg + 'px';
// console.log(this.height);
// window.onresize = () => {
// return (() => {
// wh = window.innerWidth;
// hg = window.innerHeight;
// this.width = wh + 'px';
// this.height = hg + 'px';
// })();
// };
this.init(this.drawLine);
},
methods: {
async drawLine() {
@ -53,6 +41,10 @@ export default {
left: 'center',
text: '新建病例',
},
tooltip: {
trigger: 'item',
formatter: '数量 : {c}',
},
dataZoom: [
{
type: 'slider',
@ -86,6 +78,10 @@ export default {
left: 'center',
text: '已完成病例',
},
tooltip: {
trigger: 'item',
formatter: '数量 : {c}',
},
dataZoom: [
{
type: 'slider',
@ -121,10 +117,8 @@ export default {
try {
const params = {
param: {
endDate: '',
hospitalId: '',
startDate: '',
userId: '',
hospitalId: this.hospitalId ? this.hospitalId : '',
userId: this.ptProps && this.ptProps.userId ? this.ptProps.userId : '',
},
};
const res = await countCase(params);

124
src/components/Echarts/PatientProgress.vue

@ -0,0 +1,124 @@
<template>
<!-- <div>数据统计组件</div> -->
<div style="width: 100%; height: 500px" class="chart-box">
<div id="PatientProgress" style="height: 500px"></div>
</div>
</template>
<script>
import { HospitalComplete } from 'config/api';
import mixins from 'views/Mixin/mixin.js';
export default {
name: 'PatientProgress',
mixins: [mixins],
props: {
lists: {
type: Array,
default: () => [],
},
},
data() {
return {
// msg: 'Welcome to Your Vue.js App',
width: '',
height: '',
stringList: ['0', '14', '90', '180', '360'], // legend
stringList1: ['0天', '14天', '90天', '180天', '360天'], // legend
nameList: [], // Id
dataList: [],
series: [], //
colorList: ['#5470C6', '#91CC75', '#FAC858', '#EE6666', '#73C0DE'],
};
},
watch: {
lists() {
this.nameList = [];
this.dataList = [];
this.series = [];
console.log(this.lists);
//
for (let i = 0; i < this.lists.length; i++) {
// Y
this.nameList.push(this.lists[i].hospitalization);
let arr = [];
//
for (let j = 0; j < this.stringList.length; j++) {
// list
for (let k = 0; k < this.lists[i].collectTime.length; k++) {
// listcontent content value
if (this.lists[i].collectTime[k] === this.stringList[j] - 0) {
let obj = {
name: this.lists[i].collectTime[k],
value: 100,
};
arr.push(obj);
break;
// list
} else if (k === this.lists[i].collectTime.length - 1) {
let obj = {
name: this.stringList[j] - 0,
value: 0,
};
arr.push(obj);
break;
}
}
}
this.dataList.push(arr);
}
//
for (let i = 0; i < this.dataList[0].length; i++) {
let arr1 = [];
for (let k = 0; k < this.dataList.length; k++) {
arr1.push(this.dataList[k][i].value);
}
let obj = {
name: this.dataList[0][i].name + '天',
type: 'bar',
stack: 'total',
label: { show: true },
itemStyle: {
normal: {
label: { show: false },
color: this.colorList[`${i % 5}`],
},
},
emphasis: { focus: 'series' },
data: arr1,
};
this.series.push(obj);
}
console.log(this.stringList);
console.log(this.series);
this.drawLine();
},
},
mounted() {
this.init(this.drawLine);
},
methods: {
drawLine() {
// domecharts
let myChart = this.$echarts.init(document.getElementById('PatientProgress'));
//
var option = {
legend: { data: this.stringList1 },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
},
xAxis: { type: 'value' },
yAxis: {
type: 'category',
data: this.nameList,
},
series: this.series,
};
myChart.setOption(option);
},
},
};
</script>
<style lang="stylus" scoped ></style>

29
src/components/Echarts/Piemap.vue

@ -1,43 +1,25 @@
<template>
<!-- <div>数据统计组件</div> -->
<div style="width: 100%; height: 300px" class="chart-box">
<div style="width: 50%; height: 300px" class="chart-box">
<div id="Piemap" style="height: 300px"></div>
</div>
</template>
<script>
import { selAllYBS } from 'config/api';
import mixins from 'views/Mixin/mixin.js';
export default {
name: 'Piemap',
mixins: [mixins],
data() {
return {
// msg: 'Welcome to Your Vue.js App',
width: '',
height: '',
timer: null,
dataList: [],
};
},
mounted() {
this.drawLine();
// this.timer = setInterval(() => {
// this.drawLine();
// }, 10000);
// let wh = window.innerWidth;
// let hg = window.innerHeight;
// this.width = wh + 'px';
// this.height = hg + 'px';
// console.log(this.height);
// window.onresize = () => {
// return (() => {
// wh = window.innerWidth;
// hg = window.innerHeight;
// this.width = wh + 'px';
// this.height = hg + 'px';
// })();
// };
},
destroyed() {
clearInterval(this.timer);
this.init(this.drawLine);
},
methods: {
async drawLine() {
@ -46,11 +28,12 @@ export default {
//
await this.getData();
var option = {
tooltip: { trigger: 'item' },
color: ['#FE9C58', '#7AEBFF', '#FFCC00', '#744CFF'],
legend: { top: 'bottom' },
series: [
{
name: '面积模式',
name: '生物样本数量',
type: 'pie',
radius: [20, 100],
center: ['50%', '50%'],

50
src/components/Echarts/Treemap.vue

@ -1,21 +1,17 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-01-29 14:27:20
* @LastEditors: wally
* @LastEditTime: 2021-02-18 16:30:34
-->
<template>
<!-- <div>数据统计组件</div> -->
<div style="width: 100%; height: 300px" class="chart-box">
<div style="width: 50%; height: 300px" class="chart-box">
<div id="Treemap" style="height: 300px"></div>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { complete } from 'config/api';
import mixins from 'views/Mixin/mixin.js';
export default {
name: 'Treemap',
mixins: [mixins],
data() {
return {
// msg: 'Welcome to Your Vue.js App',
@ -23,30 +19,12 @@ export default {
height: '',
valueList: [],
timer: null,
maxNum: 0,
};
},
computed: mapState('home', ['ptProps', 'hospitalId']),
mounted() {
// this.drawLine();
// this.timer = setInterval(() => {
this.drawLine();
// }, 10000);
// let wh = window.innerWidth;
// let hg = window.innerHeight;
// this.width = wh + 'px';
// this.height = hg + 'px';
// console.log(this.height);
// window.onresize = () => {
// return (() => {
// wh = window.innerWidth;
// hg = window.innerHeight;
// this.width = wh + 'px';
// this.height = hg + 'px';
// })();
// };
},
destroyed() {
clearInterval(this.timer);
this.init(this.drawLine);
},
methods: {
async drawLine() {
@ -60,10 +38,10 @@ export default {
radar: [
{
indicator: [
{ text: '已完成', max: 10 },
{ text: '废弃', max: 10 },
{ text: '进行中', max: 10 },
{ text: '未完成', max: 10 },
{ text: '已完成', max: this.maxNum },
{ text: '废弃', max: this.maxNum },
{ text: '进行中', max: this.maxNum },
{ text: '未完成', max: this.maxNum },
],
center: ['50%', '50%'],
radius: 120,
@ -90,7 +68,7 @@ export default {
async getData() {
const params = {
param: {
hospitalId: this.ptProps && this.ptProps.hospitalId ? this.ptProps.hospitalId : '',
hospitalId: this.hospitalId ? this.hospitalId : '',
userId: this.ptProps && this.ptProps.userId ? this.ptProps.userId : '',
},
};
@ -101,6 +79,12 @@ export default {
for (let key in data) {
this.valueList.push(data[key]);
}
for (let i = 0; i < this.valueList.length; i++) {
if (this.valueList[i] > this.maxNum) {
this.maxNum = this.valueList[i];
}
}
console.log(this.maxNum);
} else {
console.log(msg);
}

3
src/components/PatientInfo/PatientTable.vue

@ -111,6 +111,9 @@ export default {
chooseItem(id) {
this.setPatientId(id);
localStorage.setItem('patientId', id);
if (localStorage.getItem('patientId')) {
this.$message.success('选择成功');
}
},
handleTableChange(pagination) {

2
src/components/PatientInfo/Search.vue

@ -7,7 +7,7 @@
<a-input placeholder="住院号" style="width: 14em" v-decorator="['inpatientNumber']" />
</a-form-item>
<a-form-item>
<a-select placeholder="请选择对照组" style="min-width: 450px" v-decorator="['groupValue']">
<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>

6
src/config/api.js

@ -80,3 +80,9 @@ export const addBiologicalSamples = params => axios.post(`${biologicalSamples}/a
// 搜索生物样本
export const selBiologicalSamples = params => axios.post(`${biologicalSamples}/selBiologicalSamples`, params);
// 进行中的患者进度
export const patientProgress = params => axios.post(`${statistics}/selPatientProgress`, params);
// 临近任务统计
export const adjacentTasks = params => axios.post(`${statistics}/adjacentTasks`, params);

2
src/plugins/ant-design-vue.js

@ -10,6 +10,7 @@ import {
Pagination,
Button,
Input,
InputNumber,
message,
notification,
Modal,
@ -74,6 +75,7 @@ Vue.use(Card);
Vue.use(List);
Vue.use(Collapse);
Vue.use(Cascader);
Vue.use(InputNumber);
Vue.prototype.$message = message;
Vue.prototype.$notification = notification;

4
src/views/BiologicalSamples/BiologicalSamples.vue

@ -21,13 +21,13 @@
</a-form-item>
<!-- 样本类型 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="样本类型">
<a-select placeholder="请选择样本类型" style="min-width: 150px" v-decorator="['sampleType']">
<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-form-item>
<!-- 样本类型 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="采集时间">
<a-select placeholder="请选择采集时间" style="min-width: 150px" v-decorator="['acquisitionTime']">
<a-select placeholder="请选择采集时间" style="min-width: 150px" 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>

20
src/views/CaseAnalysis/CaseAnalysis.vue

@ -4,7 +4,13 @@
<div class="d-flex flex-row flex-wrap">
<a-form :form="form1" class="d-flex flex-wrap align-center" layout="inline">
<a-form-item>
<a-select placeholder="请选择医院" style="min-width: 150px" v-decorator="['hospital']" @change="chooseHos($event, 1)">
<a-select
placeholder="请选择医院"
style="min-width: 150px"
v-decorator="['hospital']"
@change="chooseHos($event, 1)"
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>
@ -12,7 +18,7 @@
<a-input placeholder="患者住院号" style="width: 14em" v-model="setObj.hospitalization" />
</a-form-item>
<a-form-item>
<a-select placeholder="请选择录入状态" style="min-width: 150px" @change="chooseHos($event, 3)">
<a-select placeholder="请选择录入状态" style="min-width: 150px" @change="chooseHos($event, 3)" allow-clear>
<a-select-option :key="item.id" :value="item.id" v-for="item in statusList">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
@ -711,7 +717,7 @@
</a-select-option>
</a-select>
</div>
<a-button class="white--text px-10" type="primary" @click="setData()" v-if="list.length > 0">提交</a-button>
<a-button class="white--text px-10" type="primary" @click="setData()">提交</a-button>
<a-card style="width: 100%; height: 600px; margin-top: 10px" title="病例分析统计">
<analysis :lists="lists" />
</a-card>
@ -782,7 +788,7 @@ export default {
},
],
lists: {},
activeKey: ['0'], //
activeKey: [], //
options: [], //
testQuestionsId: '', // Id
inpatientList: [], // Id
@ -994,7 +1000,11 @@ export default {
console.log(value);
for (let i = 0; i < contentList.length; i++) {
if (contentList[i].testQuestionsId === id) {
contentList[i].contents = value;
if (value === '') {
contentList.splice(i, 1);
} else {
contentList[i].contents = value;
}
break;
}
}

1157
src/views/CaseSearch/CaseSearch.vue

File diff suppressed because it is too large

11
src/views/Index/Index.vue

@ -1,8 +1,9 @@
<template>
<div class="flex-wrap">
<div class="fill-width mb-3">
<a-card style="width: 100%; height: 400px" title="病例统计">
<treemap />
<div class="fill-width mb-3 flex-wrap">
<a-card style="width: 100%; height: 400px" title="病例统计及各医院生物样本统计">
<treemap style="float: left" />
<piemap style="float: left" />
</a-card>
</div>
<div class="fill-width mb-3">
@ -15,11 +16,11 @@
<cisualmap />
</a-card>
</div>
<div class="fill-width">
<!-- <div class="fill-width">
<a-card style="width: 100%; height: 400px" title="各医院生物样本统计">
<piemap />
</a-card>
</div>
</div> -->
</div>
</template>

61
src/views/Meeting/Meeting.vue

@ -10,11 +10,7 @@
</div>
<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-range-picker
:placeholder="['开始时间', '结束时间']"
@change="onChangeTime"
@ -25,61 +21,24 @@
/>
</a-form-item>
<!-- 会议地点 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="会议地点"
required
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="会议地点" required>
<a-input placeholder="会议地点" v-model="place" />
</a-form-item>
<!-- 主持人 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="主持人"
required
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="主持人" required>
<a-input placeholder="主持人" v-model="host" />
</a-form-item>
<!-- 参会人员 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="参会人员"
>
<quill-editor
:max-size="maxSize"
:placeholder="placeholderParticipants"
:value="participants"
@changeInput="changeInput"
/>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="参会人员">
<quill-editor :max-size="maxSize" :placeholder="placeholderParticipants" :value="participants" @changeInput="changeInput" />
</a-form-item>
<!-- 研讨内容 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="研讨内容"
>
<quill-editor
:max-size="maxSize"
:placeholder="placeholderContent"
:value="discussionContent"
@changeInput="changeInput"
/>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="研讨内容">
<quill-editor :max-size="maxSize" :placeholder="placeholderContent" :value="discussionContent" @changeInput="changeInput" />
</a-form-item>
<!-- 会议纪要 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="会议纪要"
>
<quill-editor
:max-size="maxSize"
:placeholder="placeholderMeeting"
:value="meetingMinutes"
@changeInput="changeInput"
/>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="会议纪要">
<quill-editor :max-size="maxSize" :placeholder="placeholderMeeting" :value="meetingMinutes" @changeInput="changeInput" />
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
@ -170,7 +129,7 @@ export default {
const { host, place, startTime, endTime, participants, discussionContent, meetingMinutes } = this;
const previewInfo = { host, place, startTime, endTime, participants, meetingMinutes, discussionContent };
//
const params = previewInfo;
const params = { param: previewInfo };
this.saveConRec(params);
} catch (error) {
this.$message.error(error || '提交失败');

17
src/views/Mixin/mixin.js

@ -0,0 +1,17 @@
const mixins = {
data() {
return {};
},
methods: {
init(fn) {
if (sessionStorage.getItem('anyringToken')) {
fn();
} else {
setTimeout(() => {
this.init(fn);
}, 10);
}
},
},
};
export default mixins;

133
src/views/PatientInfo/PatientInfo.vue

@ -1,5 +1,8 @@
<template>
<div class="flex-column">
<a-tabs type="card" @change="callback">
<a-tab-pane width="100" v-for="item in tabList" :key="item" :tab="item + '天'" />
</a-tabs>
<a-form :form="form">
<!-- 首先遍历整个data大数组 -->
<div v-for="(item, index) in list" :key="index">
@ -10,9 +13,14 @@
<!-- 一级标题下的各种问题questionVos判断类型1-12展示不同需要填写的内容 -->
<div v-for="a in item.questionVos" :key="a.name">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="a.question">
<a-input v-if="a.type === 1" @change="onChange($event, a.type, a.id, a.recordId)" />
<a-textarea v-else-if="a.type === 2" style="height: 100px" @change="onChange($event, a.type, a.id, a.recordId)" />
<a-radio-group v-else-if="a.type === 3" v-model="value" @change="onChange($event, a.type, a.id, a.recordId)">
<a-input v-model="a.answer" v-if="a.type === 1" @change="onChange($event, a.type, a.id, a.recordId)" />
<a-textarea
v-model="a.answer"
v-else-if="a.type === 2"
style="height: 100px"
@change="onChange($event, a.type, a.id, a.recordId)"
/>
<a-radio-group v-model="a.answer" v-else-if="a.type === 3" @change="onChange($event, a.type, a.id, a.recordId)">
<a-radio v-for="(b, c) in a.optionVos" :key="c" :style="radioStyle" :value="b.showValue"> {{ b.showValue }} </a-radio>
</a-radio-group>
<a-checkbox-group v-else-if="a.type === 4" @change="onChange($event, a.type, a.id, a.recordId)">
@ -22,13 +30,14 @@
</a-col>
</a-row>
</a-checkbox-group>
<a-select v-else-if="a.type === 5" style="width: 120px" @change="onChange($event, a.type, a.id, a.recordId)">
<a-select v-model="a.answer" v-else-if="a.type === 5" style="width: 120px" @change="onChange($event, a.type, a.id, a.recordId)">
<a-select-option v-for="(b, c) in a.optionVos" :key="c" :value="b.showValue"> {{ b.showValue }} </a-select-option>
</a-select>
<a-date-picker
show-time
placeholder="日期时间选择"
v-else-if="a.type === 6"
:default-value="a.answer ? $moment(a.answer, dateFormat) : ''"
@change="onChange($event, a.type, a.id, a.recordId)"
/>
<a-upload
@ -42,12 +51,14 @@
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
</a-upload>
<a-radio-group v-else-if="a.type === 8" v-model="value" @change="onChange($event, a.type, a.id, a.recordId)">
<a-radio-group @change="onChange($event, a.type, a.id, a.recordId)">
<a-radio-group v-model="a.answer" v-else-if="a.type === 8" @change="onChange($event, a.type, a.id, a.recordId)">
<!-- <a-radio-group @change="onChange($event, a.type, a.id, a.recordId)"> -->
<div>
<a-radio v-for="(f, g) in a.optionVos" :key="g" :style="radioStyle" :value="f.showValue">
{{ f.showValue }}
</a-radio>
</a-radio-group>
</div>
<!-- </a-radio-group> -->
<div v-for="(j, k) in a.optionVos" :key="k">
<div
v-if="
@ -161,11 +172,7 @@
style="height: 100px"
@change="onChange($event, ohter.type, ohter.id)"
/>
<a-radio-group
v-else-if="ohter.type === 3"
v-model="value"
@change="onChange($event, ohter.type, ohter.id, ohter.recordId)"
>
<a-radio-group v-else-if="ohter.type === 3" @change="onChange($event, ohter.type, ohter.id, ohter.recordId)">
<a-radio v-for="(b, c) in ohter.optionVos" :key="c" :style="radioStyle" :value="b.showValue">
{{ b.showValue }}
</a-radio>
@ -203,11 +210,7 @@
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
</a-upload>
<a-radio-group
v-else-if="ohter.type === 8"
v-model="value"
@change="onChange($event, ohter.type, ohter.id, ohter.recordId)"
>
<a-radio-group v-else-if="ohter.type === 8" @change="onChange($event, ohter.type, ohter.id, ohter.recordId)">
<a-radio-group @change="onChange($event, ohter.type, ohter.id)">
<a-radio v-for="(f, g) in ohter.optionVos" :key="g" :style="radioStyle" :value="f.showValue">
{{ f.showValue }}
@ -344,7 +347,7 @@
</div>
</div>
<div v-else-if="a.type === 13">
<a-input-number @change="onChange($event, a.type, a.id, a.recordId)" />
<a-input-number v-model="a.answer" @change="onChange($event, a.type, a.id, a.recordId)" />
</div>
<div v-else-if="a.type === 14">图片识别</div>
</a-form-item>
@ -360,7 +363,7 @@
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="e.question">
<a-input v-if="e.type === 1" @change="onChange($event, e.type, e.id, e.recordId)" />
<a-textarea v-else-if="e.type === 2" style="height: 100px" @change="onChange($event, e.type, e.id, e.recordId)" />
<a-radio-group v-else-if="e.type === 3" v-model="value" @change="onChange($event, e.type, e.id, e.recordId)">
<a-radio-group v-else-if="e.type === 3" @change="onChange($event, e.type, e.id, e.recordId)">
<a-radio v-for="(b, c) in e.optionVos" :key="c" :style="radioStyle" :value="b.showValue"> {{ b.showValue }} </a-radio>
</a-radio-group>
<a-checkbox-group v-else-if="e.type === 4" @change="onChange($event, e.type, e.id, e.recordId)">
@ -390,7 +393,7 @@
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
</a-upload>
<a-radio-group v-else-if="e.type === 8" v-model="value" @change="onChange($event, e.type, e.id, e.recordId)">
<a-radio-group v-else-if="e.type === 8" @change="onChange($event, e.type, e.id, e.recordId)">
<a-radio-group @change="onChange($event, e.type, e.id)">
<a-radio v-for="(f, g) in e.optionVos" :key="g" :style="radioStyle" :value="f.showValue">
{{ f.showValue }}
@ -504,7 +507,7 @@
style="height: 100px"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
<a-radio-group v-else-if="h.type === 3" v-model="value" @change="onChange($event, h.type, h.id, h.recordId)">
<a-radio-group v-else-if="h.type === 3" @change="onChange($event, h.type, h.id, h.recordId)">
<a-radio v-for="(b, c) in h.optionVos" :key="c" :style="radioStyle" :value="b.showValue">
{{ b.showValue }}
</a-radio>
@ -538,7 +541,7 @@
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
</a-upload>
<a-radio-group v-else-if="h.type === 8" v-model="value" @change="onChange($event, h.type, h.id, h.recordId)">
<a-radio-group v-else-if="h.type === 8" @change="onChange($event, h.type, h.id, h.recordId)">
<a-radio-group @change="onChange($event, h.type, h.id, h.recordId)">
<a-radio v-for="(f, g) in h.optionVos" :key="g" :style="radioStyle" :value="f.showValue">
{{ f.showValue }}
@ -714,6 +717,8 @@ export default {
lineHeight: '30px',
},
list: [],
tabList: [],
tabNums: 0,
contentList: [],
numList: [1, 2, 3, 4, 5],
action: upload, //
@ -722,8 +727,10 @@ export default {
dateFormat: 'YYYY-MM-DD HH:mm:ss',
dateChoose: new Date(),
subDateTime: '',
getCode: '',
};
},
computed: {
...mapState('home', ['patientId']),
//
@ -732,28 +739,57 @@ export default {
return { Authorization: `Bearer ${token}` };
},
},
async created() {
try {
const params = {
param: {
code: '',
id: 1,
nums: 0,
},
};
const res = await queryAll(params);
const { code, data, msg } = res.data;
if (code === 200) {
// console.log(data);
this.list = data;
} else {
console.log(msg);
}
} catch (error) {
console.log(error);
watch: {
tabNums() {
this.getQuery();
},
},
created() {
this.getCode = '';
this.tabNums = 0;
if (this.$route.query && this.$route.query.code) {
// vue code
this.getCode = this.$route.query.code;
}
this.getQuery();
},
methods: {
callback(key) {
console.log(key);
this.tabNums = key;
},
async getQuery() {
try {
const params = {
param: {
code: this.getCode ? this.getCode : '',
id: localStorage.getItem('patientId') ? localStorage.getItem('patientId') : '',
nums: this.tabNums,
},
};
const res = await queryAll(params);
const { code, data, msg } = res.data;
if (code === 200) {
// console.log(data);
this.list = data;
if (this.getCode) {
if (data[0].reportType === 0) {
this.tabList = [];
} else if (data[0].reportType === 1) {
this.tabList = [0, 14, 90];
} else {
this.tabList = [180, 360];
}
} else {
this.tabList = [0, 14, 90];
}
} else {
console.log(msg);
}
} catch (error) {
console.log(error);
}
},
onChange(e, type, id, recordId) {
//
if (this.contentList.find(item => item.testQuestionsId === id)) {
@ -825,7 +861,7 @@ export default {
this.forFn(id, e.target.value, recordId);
} else if (type === 13) {
//
this.forFn(id, e.target.value, recordId);
this.forFn(id, e, recordId);
} else if (type === 14) {
//
}
@ -871,7 +907,7 @@ export default {
this.failFn(id, e.target.value, recordId);
} else if (type === 13) {
//
this.failFn(id, e.target.value, recordId);
this.failFn(id, e, recordId);
} else if (type === 14) {
//
}
@ -915,7 +951,7 @@ export default {
//
inputChange(id, e, value, recordId) {
for (let i = 0; i < this.contentList.length; i++) {
if (this.contentList[i].testQuestionsId === id && this.contentList[i].type === 1) {
if (this.contentList[i].testQuestionsId === id && this.contentList[i].contentsType === 1) {
this.contentList.splice(i, 1);
i -= 1;
}
@ -925,16 +961,15 @@ export default {
testQuestionsId: id,
contents: value + ':' + e.target.value,
patientRecordId: recordId ? recordId : '',
type: 1,
contentsType: 1,
};
this.contentList.push(obj);
}
console.log(this.contentList);
},
//
explainChange(id, e, recordId) {
for (let i = 0; i < this.contentList.length; i++) {
if (this.contentList[i].testQuestionsId === id && this.contentList[i].type === 2) {
if (this.contentList[i].testQuestionsId === id && this.contentList[i].contentsType === 2) {
this.contentList.splice(i, 1);
}
}
@ -942,12 +977,11 @@ export default {
let obj = {
testQuestionsId: id,
contents: e.target.value,
type: 2,
contentsType: 2,
patientRecordId: recordId ? recordId : '',
};
this.contentList.push(obj);
}
console.log(this.contentList);
},
//
fileChange(info, id, recordId) {
@ -990,6 +1024,7 @@ export default {
list: this.contentList,
patientId: this.patientId,
timeSlot: this.subDateTime ? this.subDateTime : this.$moment(this.dateChoose).format('YYYY-MM-DD HH:mm:ss'),
nums: this.tabNums,
},
};
const res = await saveCaseMes(params);

74
src/views/PersonalStats/PersonalStats.vue

@ -1,44 +1,76 @@
<template>
<div class="flex-wrap">
<div class="fill-width mb-3">
<a-card style="width: 100%; height: 400px" title="病例统计">
<treemap />
<a-card style="width: 100%; min-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: 400px" title="各院病例分析">
<categorymap />
</a-card>
</div>
<div class="fill-width mb-3">
<a-card style="width: 100%; height: 400px" title="每日病例统计">
<cisualmap />
</a-card>
</div>
<div class="fill-width">
<a-card style="width: 100%; height: 400px" title="各医院生物样本统计">
<piemap />
<a-card style="width: 100%; height: 600px" title="进行中患者进度">
<patientProgress :lists="lists" />
</a-card>
</div>
</div>
</template>
<script>
import Treemap from 'components/Echarts/Treemap.vue';
import Cisualmap from 'components/Echarts/Cisualmap.vue';
import Categorymap from 'components/Echarts/Categorymap.vue';
import Piemap from 'components/Echarts/Piemap.vue';
import PatientProgress from 'components/Echarts/PatientProgress.vue';
import AdjacentTasks from './components/AdjacentTasks.vue';
import { patientProgress, adjacentTasks } from 'config/api';
export default {
name: 'Index',
components: { Treemap, Cisualmap, Categorymap, Piemap },
components: { PatientProgress, AdjacentTasks },
data() {
return {
lists: [],
objList: {},
str: '',
showVideo: false,
pageNum: 1,
pageSize: 10,
};
},
methods: {},
created() {
this.getProgressData();
this.getTableData();
},
methods: {
async getProgressData() {
try {
const params = { param: {} };
const res = await patientProgress(params);
const { code, data, msg } = res.data;
if (code === 200) {
console.log(data);
this.lists = data;
} else {
this.$message.error(msg);
}
} catch (error) {
this.$message.error(error);
}
},
async getTableData(current) {
try {
const params = {
param: {
pageNum: this.pageNum,
pageSize: this.pageSize,
},
};
const res = await adjacentTasks(params);
const { code, data, msg } = res.data;
if (code === 200) {
this.objList = data;
} else {
this.$message.error(msg);
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>

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

@ -0,0 +1,80 @@
<template>
<div>
<!-- search -->
<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 />
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
const columns = [
{
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
},
{
title: '日期',
align: 'center',
dataIndex: 'shijian',
key: 'shijian',
scopedSlots: { customRender: 'shijian' },
},
{
title: '任务',
align: 'center',
dataIndex: 'task',
key: 'task',
scopedSlots: { customRender: 'task' },
},
];
export default {
name: 'AdjacentTasks',
props: { objList: { type: Object, default: () => {} } },
data() {
return {
columns,
loading: false,
};
},
computed: {
pagination() {
const { pageNum, pageSize, total } = this.objList;
return {
current: pageNum,
pageSize,
total: +total,
};
},
},
methods: {
...mapMutations('home', ['setPatientId']),
getTableData(pagination) {
const { current } = pagination;
this.$emit('getTableData', current);
},
},
};
</script>
Loading…
Cancel
Save