Browse Source

基础信息界面修改

master
aBin 4 years ago
parent
commit
84d1dd57c2
  1. 11
      src/App.vue
  2. 15
      src/common/portrait.styl
  3. 95
      src/components/Echarts/Cisualmap.vue
  4. 89
      src/components/Echarts/Treemap.vue
  5. 34
      src/components/PatientInfo/PatientTable.vue
  6. 2
      src/config/api-user.js
  7. 2
      src/config/api.js
  8. 4
      src/config/setting.js
  9. 9
      src/store/modules/home/mutations.js
  10. 3
      src/store/modules/home/state.js
  11. 66
      src/views/CaseAnalysis/CaseAnalysis.vue
  12. 66
      src/views/CaseSearch/CaseSearch.vue
  13. 215
      src/views/PatientInfo/PatientInfo.vue

11
src/App.vue

@ -40,6 +40,9 @@ export default {
if (localStorage.getItem('patientId')) {
this.setPatientId(localStorage.getItem('patientId'));
}
if (localStorage.getItem('hospitalization')) {
this.setHospitalization(localStorage.getItem('hospitalization'));
}
const that = this;
window.plugin = window.TallPlugin.init();
// created created便
@ -53,7 +56,7 @@ export default {
methods: {
...mapActions('home', ['getUserId']),
...mapMutations('home', ['setPtProps', 'setHospitalId', 'setPatientId', 'getToken']),
...mapMutations('home', ['setPtProps', 'setHospitalId', 'setPatientId', 'getToken', 'setHospitalization']),
async getHospitalId(Id) {
try {
@ -61,12 +64,8 @@ export default {
const { code, msg, data } = res.data;
if (code === 200) {
this.setHospitalId(data.id);
} else {
this.$message.error('医院查询失败');
}
} catch (error) {
this.$message.error(error);
}
} catch (error) {}
},
},
};

15
src/common/portrait.styl

@ -186,8 +186,19 @@
width: 200px;
margin: 0 auto
}
.bot-right-btn{
position: fixed;
height: 40px;
right: 50px;
bottom: 50px;
}
.bot-right-tips {
position: fixed;
height: 40px;
font-size: 14px;
right: 50px;
top: 60px;
}
// flex
.d-flex{
display: flex;

95
src/components/Echarts/Cisualmap.vue

@ -25,7 +25,92 @@ export default {
dataList2: [], //
};
},
computed: mapState('home', ['ptProps', 'hospitalId']),
computed: {
...mapState('home', ['ptProps', 'hospitalId']),
option1() {
return {
title: {
left: 'center',
text: '新建病例',
},
tooltip: {
trigger: 'item',
formatter: '数量 : {c}',
},
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'empty',
},
{
type: 'inside',
xAxisIndex: 0,
filterMode: 'empty',
},
],
xAxis: {
type: 'category',
data: this.dateList1,
},
yAxis: { type: 'value' },
series: [
{
data: this.dataList1,
type: 'line',
areaStyle: { color: 'rgba(229,244,254,1)' },
lineStyle: { color: 'rgb(45,151,213)' },
itemStyle: { color: 'rgb(45,151,213)' },
smooth: true,
},
],
};
},
option2() {
return {
title: {
left: 'center',
text: '已完成病例',
},
tooltip: {
trigger: 'item',
formatter: '数量 : {c}',
},
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'empty',
},
{
type: 'inside',
xAxisIndex: 0,
filterMode: 'empty',
},
],
xAxis: {
type: 'category',
data: this.dateList2,
},
yAxis: { type: 'value' },
series: [
{
data: this.dataList2,
type: 'line',
areaStyle: { color: 'rgba(229,244,254,1)' },
lineStyle: { color: 'rgb(45,151,213)' },
itemStyle: { color: 'rgb(45,151,213)' },
smooth: true,
},
],
};
},
},
watch: {
hospitalId() {
this.init(this.drawLine);
},
},
mounted() {
this.init(this.drawLine);
},
@ -110,11 +195,15 @@ export default {
},
],
};
myChart1.setOption(option1);
myChart2.setOption(option2);
myChart1.setOption(this.option1);
myChart2.setOption(this.option2);
},
async getData() {
try {
this.dateList1 = [];
this.dataList1 = [];
this.dateList2 = [];
this.dataList2 = [];
const params = {
param: {
hospitalId: this.hospitalId ? this.hospitalId : '',

89
src/components/Echarts/Treemap.vue

@ -18,11 +18,49 @@ export default {
width: '',
height: '',
valueList: [],
timer: null,
maxNum: 0,
};
},
computed: mapState('home', ['ptProps', 'hospitalId']),
computed: {
...mapState('home', ['ptProps', 'hospitalId']),
option() {
return {
tooltip: { trigger: 'axis' },
radar: [
{
indicator: [
{ text: '已完成', max: this.maxNum },
{ text: '废弃', max: this.maxNum },
{ text: '进行中', max: this.maxNum },
{ text: '未完成', max: this.maxNum },
],
center: ['50%', '50%'],
radius: 120,
},
],
series: [
{
type: 'radar',
tooltip: { trigger: 'item' },
areaStyle: { color: 'rgba(84,112,198,0.9)' },
lineStyle: { color: 'rgb(84,112,198)' },
itemStyle: { color: 'rgb(84,112,198)' },
data: [
{
value: this.valueList === [] ? [0, 0, 0, 0, 0] : this.valueList,
name: '病例统计',
},
],
},
],
};
},
},
watch: {
hospitalId() {
this.init(this.drawLine);
},
},
mounted() {
this.init(this.drawLine);
},
@ -30,7 +68,6 @@ export default {
async drawLine() {
// domecharts
await this.getData();
console.log(this.valueList);
let myChart = this.$echarts.init(document.getElementById('Treemap'));
//
var option = {
@ -63,30 +100,36 @@ export default {
},
],
};
myChart.setOption(option);
myChart.setOption(this.option);
},
async getData() {
const params = {
param: {
hospitalId: this.hospitalId ? this.hospitalId : '',
userId: this.ptProps && this.ptProps.userId ? this.ptProps.userId : '',
},
};
const res = await complete(params);
const { code, data, msg } = res.data;
if (code === 200) {
// console.log(data);
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];
try {
this.valueList = [];
this.maxNum = 0;
const params = {
param: {
hospitalId: this.hospitalId ? this.hospitalId : '',
userId: this.ptProps && this.ptProps.userId ? this.ptProps.userId : '',
},
};
const res = await complete(params);
const { code, data, msg } = res.data;
if (code === 200) {
// console.log(data);
for (let key in data) {
this.valueList.push(data[key]);
}
console.log(this.valueList);
for (let i = 0; i < this.valueList.length; i++) {
if (this.valueList[i] > this.maxNum) {
this.maxNum = this.valueList[i];
}
}
} else {
console.log(msg);
}
console.log(this.maxNum);
} else {
console.log(msg);
} catch (error) {
console.log(error);
}
},
},

34
src/components/PatientInfo/PatientTable.vue

@ -33,11 +33,16 @@
</template>
<template slot="edit" slot-scope="text, record">
<a-button @click="chooseItem(record.id)" class="ml-4" size="small" type="primary">选择</a-button>
<a-button @click="showModal(record.id, record.hospitalization)" class="ml-4" size="small" type="primary">选择</a-button>
</template>
</a-table>
</div>
<a-empty v-else />
<a-modal title="会议记录预览" width="600px" v-model="visible" @ok="handleOk" @cancel="handleCancel">
是否要录入住院号为
<span style="color: green">{{ hospitalization }}</span>
的患者的相关数据
</a-modal>
</div>
</template>
@ -90,6 +95,9 @@ export default {
return {
columns,
loading: false,
visible: false,
patientId: '',
hospitalization: '',
};
},
@ -105,24 +113,34 @@ export default {
},
methods: {
...mapMutations('home', ['setPatientId']),
...mapMutations('home', ['setPatientId', 'setHospitalization']),
showModal(id, hospitalization) {
this.patientId = id;
this.hospitalization = hospitalization;
this.visible = true;
},
handleCancel(e) {
this.visible = false;
},
handleOk() {
this.chooseItem(this.patientId, this.hospitalization);
},
//
async chooseItem(id) {
async chooseItem(id, hospitalization) {
try {
this.setPatientId(id);
this.setHospitalization(hospitalization);
localStorage.setItem('patientId', id);
localStorage.setItem('hospitalization', hospitalization);
const params = { param: { patientId: id } };
const res = await generatePatientReport(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data);
localStorage.setItem('reportId', data.id);
if (localStorage.getItem('reportId')) {
this.$message.success('生成报告单成功');
}
}
if (localStorage.getItem('patientId')) {
if (localStorage.getItem('patientId') && localStorage.getItem('hospitalization')) {
this.visible = false;
this.$message.success('选择成功');
}
} catch (error) {

2
src/config/api-user.js

@ -4,7 +4,7 @@
* email: 18603454788@163.com
*/
import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
let { proxyUrl } = require('@/config/setting');
const tall = `${proxyUrl}/tall/v1.0`;
const users = `${tall}/users`;

2
src/config/api.js

@ -6,7 +6,7 @@
* @LastEditTime: 2021-02-19 18:01:03
*/
import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
let { proxyUrl } = require('@/config/setting');
const tcm = `${proxyUrl}/tcm`;
const question = `${proxyUrl}/question`;

4
src/config/setting.js

@ -4,7 +4,7 @@ const baseUrl = process.env.VUE_APP_BASE_URL;
const apiUrl = process.env.VUE_APP_API_URL;
const proxyUrl = process.env.VUE_APP_PROXY_URL;
const publicPath = process.env.VUE_APP_PUBLIC_PATH;
const msgUrl = process.env.VUE_APP_MSG_URL;
// const msgUrl = process.env.VUE_APP_MSG_URL;
module.exports = {
// 首页标题
@ -20,7 +20,7 @@ module.exports = {
apiUrl,
// 消息系统地址
msgUrl,
// msgUrl,
// api代理地址
proxyUrl,

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

@ -45,7 +45,14 @@ const mutations = {
setPatientId(state, data) {
state.patientId = data;
},
/**
* 设置病患住院号
* @param {object} state
* @param {string} data
*/
setHospitalization(state, data) {
state.hospitalization = data;
},
/**
* 设置预览信息
* @param {object} state

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

@ -3,9 +3,10 @@ const state = {
user: { id: '', phone: '', account: '' },
controlGroups: [], // 对照组
patientId: '', // 病患id
hospitalization: '', // 病患住院号
previewInfo: { host: '', place: '', startTime: '', endTime: '', participants: '', meetingMinutes: '', discussionContent: '' }, // 预览信息
ptProps: null, // 接受PT传过来的 pluginId,projectId,roleId,taskId,userId
hospitalId: '',
hospitalId: '', // 医院Id
};
export default state;

66
src/views/CaseAnalysis/CaseAnalysis.vue

@ -40,7 +40,7 @@
<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-radio-group 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)">
@ -63,9 +63,17 @@
@change="fileChange($event, a.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === a.id;
})
"
>
<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 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)">
<a-radio v-for="(f, g) in a.optionVos" :key="g" :style="radioStyle" :value="f.showValue">
{{ f.showValue }}
@ -184,11 +192,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>
@ -226,13 +230,17 @@
@change="fileChange($event, ohter.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === ohter.id;
})
"
>
<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 }}
@ -388,7 +396,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)">
@ -411,9 +419,17 @@
@change="fileChange($event, e.id, e.recordId)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === e.id;
})
"
>
<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 }}
@ -527,7 +543,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>
@ -554,9 +570,17 @@
@change="fileChange($event, h.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === h.id;
})
"
>
<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 }}
@ -717,7 +741,7 @@
</a-select-option>
</a-select>
</div>
<a-button class="white--text px-10" type="primary" @click="setData()">提交</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>

66
src/views/CaseSearch/CaseSearch.vue

@ -37,7 +37,7 @@
<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-radio-group 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)">
@ -60,9 +60,17 @@
@change="fileChange($event, a.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === a.id;
})
"
>
<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 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)">
<a-radio v-for="(f, g) in a.optionVos" :key="g" :style="radioStyle" :value="f.showValue">
{{ f.showValue }}
@ -181,11 +189,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>
@ -223,13 +227,17 @@
@change="fileChange($event, ohter.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === ohter.id;
})
"
>
<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 }}
@ -385,7 +393,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)">
@ -408,9 +416,17 @@
@change="fileChange($event, e.id, e.recordId)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === e.id;
})
"
>
<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 }}
@ -524,7 +540,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>
@ -551,9 +567,17 @@
@change="fileChange($event, h.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === h.id;
})
"
>
<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 }}
@ -698,7 +722,7 @@
<!-- </div> -->
</a-collapse>
</a-form>
<a-button class="white--text px-10" type="primary" @click="setData()" style="margin-top: 40px">提交</a-button>
<a-button class="white--text px-10" type="primary" @click="setData()" style="margin-top: 40px">搜索</a-button>
<case-table :lists="lists" @setData="setData" class="mt-3" />
</div>
</template>

215
src/views/PatientInfo/PatientInfo.vue

@ -18,7 +18,7 @@
<a-textarea
v-model="a.answer"
v-else-if="a.type === 2"
style="height: 100px"
style="height: 100px; width: 100%"
@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)">
@ -35,12 +35,13 @@
</a-col>
</a-row>
</a-checkbox-group>
<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 v-model="a.answer" v-else-if="a.type === 5" style="width: 100%" @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="日期时间选择"
style="width: 100%"
v-else-if="a.type === 6"
:default-value="a.answer ? $moment(a.answer, dateFormat) : ''"
@change="onChange($event, a.type, a.id, a.recordId)"
@ -54,10 +55,19 @@
@change="fileChange($event, a.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === a.id;
})
"
>
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
<a-radio-group
:default-value="getAnswer(a.answer)"
style="width: 100%"
v-else-if="a.type === 8"
@change="onChange($event, a.type, a.id, a.recordId)"
>
@ -80,8 +90,8 @@
}))
"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-input v-model="j.otherInformation" style="width: 200px" @change="inputChange(a.id, $event, j.showValue)"></a-input>
<a-form-item>
<a-input v-model="j.otherInformation" style="width: 100%" @change="inputChange(a.id, $event, j.showValue)"></a-input>
</a-form-item>
</div>
</div>
@ -90,6 +100,7 @@
<a-checkbox-group
:default-value="getList(a.optionVos)"
v-else-if="a.type === 9"
style="width: 100%"
@change="onChange($event, a.type, a.id, a.recordId)"
>
<a-row>
@ -99,10 +110,10 @@
<a-col :span="100">
<div v-for="(j, k) in a.optionVos" :key="k">
<div v-if="j.afterOperation === 1">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item>
<a-input
v-model="j.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange1(a.id, $event, j.showValue, a.recordId, a.optionVos)"
></a-input>
</a-form-item>
@ -112,7 +123,7 @@
</a-row>
</a-checkbox-group>
<div v-else-if="a.type === 10">
<a-select :default-value="getAnswer(a.answer)" style="width: 120px" @change="onChange($event, a.type, a.id, a.recordId)">
<a-select :default-value="getAnswer(a.answer)" style="width: 100%" @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>
<div v-for="(b, c) in a.optionVos" :key="c">
@ -128,14 +139,18 @@
}))
"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-input v-model="b.otherInformation" style="width: 200px" @change="inputChange(a.id, $event, b.showValue)"></a-input>
<a-form-item>
<a-input v-model="b.otherInformation" style="width: 100%" @change="inputChange(a.id, $event, b.showValue)"></a-input>
</a-form-item>
</div>
</div>
</div>
<div v-else-if="a.type === 11">
<a-checkbox-group :default-value="getList(a.optionVos)" @change="onChange($event, a.type, a.id, a.recordId)">
<a-checkbox-group
style="width: 100%"
:default-value="getList(a.optionVos)"
@change="onChange($event, a.type, a.id, a.recordId)"
>
<a-row>
<a-col :span="24" v-for="(ques, indexNum) in a.optionVos" :key="indexNum">
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox>
@ -145,14 +160,14 @@
<div v-if="b.afterOperation > 0">
<a-input
v-model="b.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange1(a.id, $event, j.showValue, a.recordId, a.optionVos)"
/>
</div>
</div>
</a-col>
</a-row>
说明 <a-textarea style="width: 200px" @change="explainChange(a.id, $event)" />
说明 <a-textarea style="width: 100%" @change="explainChange(a.id, $event)" />
</a-checkbox-group>
</div>
<!-- 当类型为12时为单选+关联 -->
@ -173,7 +188,7 @@
"
>
<div v-for="(h, i) in j.questionVos" :key="i">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item :label-col="formItemLayout1.labelCol" :wrapper-col="formItemLayout1.wrapperCol">
<a-input
v-if="j.afterOperation === 1"
style="width: 200px"
@ -182,11 +197,16 @@
<a-textarea v-else-if="j.afterOperation === 2" @change="inputChange(a.id, $event, j.showValue)"></a-textarea>
<div v-else-if="j.afterOperation === 3">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="h.question">
<a-input v-model="h.answer" v-if="h.type === 1" @change="onChange($event, h.type, h.id, h.recordId)" />
<a-input
v-model="h.answer"
style="width: 100%"
v-if="h.type === 1"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
<a-textarea
v-model="h.answer"
v-else-if="h.type === 2"
style="height: 100px"
style="height: 100px; width: 100%"
@change="onChange($event, h.type, h.id)"
/>
<a-radio-group v-model="h.answer" v-else-if="h.type === 3" @change="onChange($event, h.type, h.id, h.recordId)">
@ -218,6 +238,7 @@
<a-date-picker
show-time
placeholder="日期时间选择"
style="width: 100%"
v-else-if="h.type === 6"
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''"
@change="onChange($event, h.type, h.id, h.recordId)"
@ -231,10 +252,19 @@
@change="fileChange($event, h.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === h.id;
})
"
>
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
<a-radio-group
:default-value="getAnswer(h.answer)"
style="width: 100%"
v-else-if="h.type === 8"
@change="onChange($event, h.type, h.id, h.recordId)"
>
@ -258,10 +288,10 @@
}))
"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item>
<a-input
v-model="m.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange(h.id, $event, m.showValue)"
></a-input>
</a-form-item>
@ -271,6 +301,7 @@
<a-checkbox-group
:default-value="getList(h.optionVos)"
v-else-if="h.type === 9"
style="width: 100%"
@change="onChange($event, h.type, h.id, h.recordId)"
>
<a-row>
@ -280,10 +311,10 @@
<a-col :span="100">
<div v-for="(m, n) in h.optionVos" :key="n">
<div v-if="m.afterOperation === 1">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item>
<a-input
v-model="m.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange1(h.id, $event, m.showValue, h.recordId, h.optionVos)"
></a-input>
</a-form-item>
@ -295,7 +326,7 @@
<div v-else-if="h.type === 10">
<a-select
:default-value="getAnswer(h.answer)"
style="width: 120px"
style="width: 100%"
@change="onChange($event, h.type, h.id, h.recordId)"
>
<a-select-option v-for="(b, c) in h.optionVos" :key="c" :value="b.showValue">
@ -315,10 +346,10 @@
}))
"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item>
<a-input
v-model="b.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange(h.id, $event, b.showValue)"
></a-input>
</a-form-item>
@ -326,7 +357,11 @@
</div>
</div>
<div v-else-if="h.type === 11">
<a-checkbox-group :default-value="getList(h.optionVos)" @change="onChange($event, h.type, h.id, h.recordId)">
<a-checkbox-group
style="width: 100%"
:default-value="getList(h.optionVos)"
@change="onChange($event, h.type, h.id, h.recordId)"
>
<a-row>
<a-col :span="24" v-for="(ques, indexNum) in h.optionVos" :key="indexNum">
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox>
@ -336,14 +371,14 @@
<div v-if="b.afterOperation > 0">
<a-input
v-model="b.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange1(h.id, $event, b.showValue, h.recordId, h.optionVos)"
></a-input>
</div>
</div>
</a-col>
</a-row>
说明 <a-input style="width: 200px" @change="explainChange(h.id, $event)" />
说明 <a-input style="width: 100%" @change="explainChange(h.id, $event)" />
</a-checkbox-group>
</div>
<!-- 当类型为12时为单选+关联 -->
@ -383,7 +418,8 @@
</div>
</div>
<div v-else-if="h.type === 13">
<a-input-number v-model="h.answer" @change="onChange($event, h.type, h.id, h.recordId)" />
<a-input-number style="width: 200px%" v-model="h.answer" @change="onChange($event, h.type, h.id, h.recordId)" />
<span style="margin-left: 10px">{{ h.units }}</span>
</div>
<div v-else-if="h.type === 14">图片识别</div>
</a-form-item>
@ -394,7 +430,8 @@
</div>
</div>
<div v-else-if="a.type === 13">
<a-input-number v-model="a.answer" @change="onChange($event, a.type, a.id, a.recordId)" />
<a-input-number v-model="a.answer" style="width: 200px" @change="onChange($event, a.type, a.id, a.recordId)" />
<span style="margin-left: 10px">{{ a.units }}</span>
</div>
<div v-else-if="a.type === 14">图片识别</div>
</a-form-item>
@ -412,7 +449,7 @@
<a-textarea
v-model="e.answer"
v-else-if="e.type === 2"
style="height: 100px"
style="height: 100px; width: 100%"
@change="onChange($event, e.type, e.id, e.recordId)"
/>
<a-radio-group v-model="e.answer" v-else-if="e.type === 3" @change="onChange($event, e.type, e.id, e.recordId)">
@ -432,7 +469,7 @@
<a-select
v-model="e.answer"
v-else-if="e.type === 5"
style="width: 120px"
style="width: 100%"
@change="onChange($event, e.type, e.id, e.recordId)"
>
<a-select-option v-for="(b, c) in e.optionVos" :key="c" :value="b.showValue"> {{ b.showValue }} </a-select-option>
@ -441,6 +478,7 @@
show-time
placeholder="日期时间选择"
v-else-if="e.type === 6"
style="width: 100%"
:default-value="e.answer ? $moment(e.answer, dateFormat) : ''"
@change="onChange($event, e.type, e.id, e.recordId)"
/>
@ -453,11 +491,20 @@
@change="fileChange($event, e.id, e.recordId)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === e.id;
})
"
>
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
<a-radio-group
:default-value="getAnswer(e.answer)"
v-else-if="e.type === 8"
style="width: 100%"
@change="onChange($event, e.type, e.id, e.recordId)"
>
<a-radio-group @change="onChange($event, e.type, e.id)">
@ -478,8 +525,8 @@
}))
"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-input v-model="j.otherInformation" style="width: 200px" @change="inputChange(e.id, $event, j.showValue)"></a-input>
<a-form-item>
<a-input v-model="j.otherInformation" style="width: 100%" @change="inputChange(e.id, $event, j.showValue)"></a-input>
</a-form-item>
</div>
</div>
@ -487,6 +534,7 @@
<a-checkbox-group
:default-value="getList(e.optionVos)"
v-else-if="e.type === 9"
style="width: 100%"
@change="onChange($event, e.type, e.id, e.recordId)"
>
<a-row>
@ -496,10 +544,10 @@
<a-col :span="100">
<div v-for="(j, k) in e.optionVos" :key="k">
<div v-if="j.afterOperation === 1">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item>
<a-input
v-model="j.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange1(e.id, $event, j.showValue, e.recordId, e.optionVos)"
></a-input>
</a-form-item>
@ -509,7 +557,7 @@
</a-row>
</a-checkbox-group>
<div v-else-if="e.type === 10">
<a-select :default-value="getAnswer(e.answer)" style="width: 120px" @change="onChange($event, e.type, e.id, e.recordId)">
<a-select :default-value="getAnswer(e.answer)" style="width: 100%" @change="onChange($event, e.type, e.id, e.recordId)">
<a-select-option v-for="(b, c) in e.optionVos" :key="c" :value="b.showValue"> {{ b.showValue }} </a-select-option>
</a-select>
<div v-for="(b, c) in e.optionVos" :key="c">
@ -525,14 +573,14 @@
}))
"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-input v-model="b.otherInformation" style="width: 200px" @change="inputChange(e.id, $event, b.showValue)"></a-input>
<a-form-item>
<a-input v-model="b.otherInformation" style="width: 100%" @change="inputChange(e.id, $event, b.showValue)"></a-input>
</a-form-item>
</div>
</div>
</div>
<div v-else-if="e.type === 11">
<a-checkbox-group :default-value="getList(e.optionVos)" @change="onChange($event, e.type, e.id, e.recordId)">
<a-checkbox-group style="100%" :default-value="getList(e.optionVos)" @change="onChange($event, e.type, e.id, e.recordId)">
<a-row>
<a-col :span="24" v-for="(ques, indexNum) in e.optionVos" :key="indexNum">
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox>
@ -542,14 +590,14 @@
<div v-if="b.afterOperation > 0">
<a-input
v-model="b.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange1(e.id, $event, b.showValue, e.recordId, e.optionVos)"
></a-input>
</div>
</div>
</a-col>
</a-row>
说明 <a-input style="width: 200px" @change="explainChange(e.id, $event)" />
说明 <a-input style="width: 100%" @change="explainChange(e.id, $event)" />
</a-checkbox-group>
</div>
<!-- 当类型为12时为单选+关联 -->
@ -573,7 +621,7 @@
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="h.question">
<a-input
v-if="j.afterOperation === 1"
style="width: 200px"
style="width: 100%"
@change="inputChange(e.id, $event, j.showValue)"
></a-input>
<a-textarea v-else-if="j.afterOperation === 2" @change="inputChange(e.id, $event, j.showValue)"></a-textarea>
@ -583,7 +631,7 @@
<a-textarea
v-model="h.answer"
v-else-if="h.type === 2"
style="height: 100px"
style="height: 100%"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
<a-radio-group v-model="h.answer" v-else-if="h.type === 3" @change="onChange($event, h.type, h.id, h.recordId)">
@ -605,7 +653,7 @@
<a-select
v-model="h.answer"
v-else-if="h.type === 5"
style="width: 120px"
style="width: 100%"
@change="onChange($event, h.type, h.id, h.recordId)"
>
<a-select-option v-for="(b, c) in h.optionVos" :key="c" :value="b.showValue">
@ -616,6 +664,7 @@
show-time
placeholder="日期时间选择"
v-else-if="h.type === 6"
style="width: 100%"
:default-value="h.answer ? $moment(h.answer, dateFormat) : ''"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
@ -628,11 +677,20 @@
@change="fileChange($event, h.id)"
name="files"
>
<a-button v-show="fileList.length === 0"> <a-icon type="upload" /> 点击上传 </a-button>
<a-button
v-show="
!contentList.find(item => {
return item.testQuestionsId === h.id;
})
"
>
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
<a-radio-group
:default-value="getAnswer(h.answer)"
v-else-if="h.type === 8"
style="100%"
@change="onChange($event, h.type, h.id, h.recordId)"
>
<!-- <a-radio-group @change="onChange($event, h.type, h.id, h.recordId)"> -->
@ -655,10 +713,10 @@
}))
"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item>
<a-input
v-model="m.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange(h.id, $event, m.showValue)"
></a-input>
</a-form-item>
@ -668,6 +726,7 @@
<a-checkbox-group
:default-value="getList(h.optionVos)"
v-else-if="h.type === 9"
style="width: 100%"
@change="onChange($event, h.type, h.id, h.recordId)"
>
<a-row>
@ -677,10 +736,10 @@
<a-col :span="100">
<div v-for="(m, n) in h.optionVos" :key="n">
<div v-if="m.afterOperation === 1">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item>
<a-input
v-model="m.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange1(h.id, $event, m.showValue, h.recordId, h.optionVos)"
></a-input>
</a-form-item>
@ -692,7 +751,7 @@
<div v-else-if="h.type === 10">
<a-select
:default-value="getAnswer(h.answer)"
style="width: 120px"
style="width: 100%"
@change="onChange($event, h.type, h.id, h.recordId)"
>
<a-select-option v-for="(b, c) in h.optionVos" :key="c" :value="b.showValue">
@ -712,10 +771,10 @@
}))
"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-form-item>
<a-input
v-model="b.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange(h.id, $event, b.showValue)"
></a-input>
</a-form-item>
@ -723,7 +782,11 @@
</div>
</div>
<div v-else-if="h.type === 11">
<a-checkbox-group :default-value="getList(h.optionVos)" @change="onChange($event, h.type, h.id, h.recordId)">
<a-checkbox-group
style="100%"
:default-value="getList(h.optionVos)"
@change="onChange($event, h.type, h.id, h.recordId)"
>
<a-row>
<a-col :span="24" v-for="(ques, indexNum) in h.optionVos" :key="indexNum">
<a-checkbox :value="ques.submitValue"> {{ ques.showValue }} </a-checkbox>
@ -733,14 +796,14 @@
<div v-if="b.afterOperation > 0">
<a-input
v-model="b.otherInformation"
style="width: 200px"
style="width: 100%"
@change="inputChange1(h.id, $event, b.showValue, h.recordId, h.optionVos)"
></a-input>
</div>
</div>
</a-col>
</a-row>
说明 <a-input style="width: 200px" @change="explainChange(h.id, $event)" />
说明 <a-input style="width: 100%" @change="explainChange(h.id, $event)" />
</a-checkbox-group>
</div>
<!-- 当类型为12时为单选+关联 -->
@ -780,7 +843,12 @@
</div>
</div>
<div v-else-if="h.type === 13">
<a-input-number v-model="h.answer" @change="onChange($event, h.type, h.id, h.recordId)" />
<a-input-number
style="width: 200px"
v-model="h.answer"
@change="onChange($event, h.type, h.id, h.recordId)"
/>
<span style="margin-left: 10px">{{ h.units }}</span>
</div>
<div v-else-if="h.type === 14">图片识别</div>
</a-form-item>
@ -791,7 +859,8 @@
</div>
</div>
<div v-else-if="e.type === 13">
<a-input-number v-model="e.answer" @change="onChange($event, e.type, e.id, e.recordId)" />
<a-input-number style="width: 200px" v-model="e.answer" @change="onChange($event, e.type, e.id, e.recordId)" />
<span style="margin-left: 10px">{{ e.units }}</span>
</div>
<div v-else-if="e.type === 14">图片识别</div>
</a-form-item>
@ -799,14 +868,23 @@
</div>
</div>
</a-form>
<a-date-picker
<!-- <a-date-picker
v-if="list.length > 0"
:default-value="$moment(dateChoose, dateFormat)"
:format="dateFormat"
class="white--text"
@change="changeDate"
/>
<a-button class="white--text px-10" type="primary" @click="setData()" v-if="list.length > 0 && getCode" style="margin-top: 40px">
/> -->
<div class="bot-right-tips">
当前选择患者的住院号为<span style="color: green">{{ hospitalization }}</span>
</div>
<a-button
class="white--text px-10 bot-right-btn"
type="primary"
@click="setData()"
v-if="list.length > 0 && getCode"
style="margin-top: 40px"
>
提交
</a-button>
</div>
@ -819,12 +897,17 @@ const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 12 },
};
const formItemLayout1 = {
labelCol: { span: 0 },
wrapperCol: { span: 24 },
};
const tailItemLayout = { wrapperCol: { span: 18, offset: 4 } };
export default {
name: 'PatientInfo',
data() {
return {
formItemLayout,
formItemLayout1,
tailItemLayout,
form: this.$form.createForm(this, { name: 'page-add' }),
value: 1,
@ -850,7 +933,7 @@ export default {
},
computed: {
...mapState('home', ['patientId']),
...mapState('home', ['patientId', 'hospitalization']),
//
headers() {
const token = sessionStorage.getItem('anyringToken');
@ -1186,9 +1269,9 @@ export default {
}
},
//
changeDate(date) {
this.subDateTime = this.$moment(date._d).format('YYYY-MM-DD HH:mm:ss');
},
// changeDate(date) {
// this.subDateTime = this.$moment(date._d).format('YYYY-MM-DD HH:mm:ss');
// },
//
async setData() {
try {
@ -1196,7 +1279,7 @@ export default {
param: {
list: this.contentList,
patientId: this.patientId,
timeSlot: this.subDateTime ? this.subDateTime : this.$moment(this.dateChoose).format('YYYY-MM-DD HH:mm:ss'),
// timeSlot: this.subDateTime ? this.subDateTime : this.$moment(this.dateChoose).format('YYYY-MM-DD HH:mm:ss'),
nums: this.tabNums,
},
};

Loading…
Cancel
Save