Browse Source

图片识别回显问题

master
aBin 4 years ago
parent
commit
ed7ea924b7
  1. 6
      .env.development
  2. 6
      .env.production
  3. 2
      src/App.vue
  4. 6
      src/store/modules/home/state.js
  5. 7
      src/views/Index/Index.vue
  6. 84
      src/views/PatientInfo/PatientInfo.vue

6
.env.development

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

6
.env.production

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

2
src/App.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com * @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03 * @Date: 2021-02-22 09:20:03
* @LastEditors: wally * @LastEditors: wally
* @LastEditTime: 2021-04-01 22:02:43 * @LastEditTime: 2021-04-02 08:31:28
--> -->
<template> <template>
<a-config-provider :locale="zh_CN"> <a-config-provider :locale="zh_CN">

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

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

7
src/views/Index/Index.vue

@ -1,3 +1,10 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-04-02 08:50:23
-->
<template> <template>
<div class="flex-wrap"> <div class="flex-wrap">
<div class="fill-width mb-3 flex-wrap"> <div class="fill-width mb-3 flex-wrap">

84
src/views/PatientInfo/PatientInfo.vue

@ -470,17 +470,17 @@
</a-form-item> </a-form-item>
</div> </div>
<!-- 一级标题下的各种二级标题subReportCodes --> <!-- 一级标题下的各种二级标题subReportCodes -->
<div v-for="w in item.subReportCodes" :key="w.name"> <div v-for="(w, indexB) in item.subReportCodes" :key="w.name">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"> <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<!-- 二级大标题 --> <!-- 二级大标题 -->
<span class="hhh2"> {{ w.name }}</span> <span class="hhh2"> {{ w.name }}</span>
<a-upload <a-upload
v-if="w.recordType" v-if="w.recordType && getCode"
name="files" name="files"
:multiple="true" :multiple="true"
:action="action" :action="action"
:headers="headers" :headers="headers"
@change="handleChange($event, w.code, w.recordId)" @change="handleChange($event, w.code, w.recordId, index, indexB)"
> >
<!-- <a-upload :multiple="true" :action="action" :headers="headers" @change="handleChange"> --> <!-- <a-upload :multiple="true" :action="action" :headers="headers" @change="handleChange"> -->
<a-button> <a-icon type="upload" />上传图片</a-button> <a-button> <a-icon type="upload" />上传图片</a-button>
@ -1044,12 +1044,6 @@ export default {
this.getQuery(); this.getQuery();
} }
}, },
recordTypeList() {
for (let i = 0; i < this.recordTypeList.length; i++) {
var dom = document.getElementById(`${this.recordTypeList[i].questionId}`);
dom.value = this.recordTypeList[i].content;
}
},
}, },
async created() { async created() {
console.log(this.patientId); console.log(this.patientId);
@ -1122,7 +1116,7 @@ export default {
} }
}, },
onChange(e, type, id, recordId) { onChange(e, type, id, recordId) {
console.log(e); // console.log(e);
// //
if (this.contentList.find(item => item.testQuestionsId === id)) { if (this.contentList.find(item => item.testQuestionsId === id)) {
if (type === 1) { if (type === 1) {
@ -1248,7 +1242,7 @@ export default {
// for // for
forFn(id, value, recordId) { forFn(id, value, recordId) {
const { contentList } = this; const { contentList } = this;
console.log(value); // console.log(value);
for (let i = 0; i < contentList.length; i++) { for (let i = 0; i < contentList.length; i++) {
if (contentList[i].testQuestionsId === id) { if (contentList[i].testQuestionsId === id) {
contentList[i].contents = value; contentList[i].contents = value;
@ -1256,7 +1250,7 @@ export default {
} }
} }
this.contentList = [...contentList]; this.contentList = [...contentList];
console.log(this.contentList); // console.log(this.contentList);
}, },
// //
failFn(id, value, recordId) { failFn(id, value, recordId) {
@ -1384,9 +1378,10 @@ export default {
} }
}, },
// //
async handleChange(info, title, recordId) { async handleChange(info, title, recordId, indexA, indexB) {
if (info.file.status === 'done') { if (info.file.status === 'done') {
console.log(info.file.response.data[0].visitUrl); const { list } = this;
const objList = list[indexA].subReportCodes[indexB];
const params = { const params = {
param: { param: {
hospitalId: this.hospitalId, hospitalId: this.hospitalId,
@ -1397,47 +1392,44 @@ export default {
const res = await basic(params); const res = await basic(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
this.changeType(data, recordId); for (let k = 0; k < data.length; k++) {
this.changeType(data, recordId); for (let i = 0; i < objList.questionVos.length; i++) {
console.log(this.contentList); if (objList.questionVos[i].id === data[k].questionId) {
} else { objList.questionVos[i].answer = data[k].content;
console.log(msg); }
} }
} if (this.contentList.length > 0) {
}, for (let i = 0; i < this.contentList.length; i++) {
//
async changeType(data) { if (data[k].questionId === this.contentList[i].testQuestionsId) {
await this.changeTypeList(data); this.contentList[i].contents = data[k].content;
// // contentList break;
for (let i = 0; i < data.length; i++) { //
if (this.contentList.length > 0) { } else if (i === this.contentList.length - 1) {
for (let k = 0; k < this.contentList.length; k++) { let obj = {
// testQuestionsId: data[k].questionId,
if (data[i].questionId === this.contentList[k].testQuestionsId) { contents: data[k].content,
this.contentList[k].contents = data[i].content; };
break; this.contentList.push(obj);
// break;
} else if (k === this.contentList.length - 1) { }
}
} else {
let obj = { let obj = {
testQuestionsId: data[i].questionId, testQuestionsId: data[k].questionId,
contents: data[i].content, contents: data[k].content,
}; };
this.contentList.push(obj); this.contentList.push(obj);
break;
} }
} }
list[indexA].subReportCodes[indexB] = { ...objList };
this.list = [...list];
} else { } else {
let obj = { console.log(msg);
testQuestionsId: data[i].questionId,
contents: data[i].content,
};
this.contentList.push(obj);
} }
} }
}, },
changeTypeList(data) {
this.recordTypeList = data;
},
// //
// changeDate(date) { // changeDate(date) {
// this.subDateTime = this.$moment(date._d).format('YYYY-MM-DD HH:mm:ss'); // this.subDateTime = this.$moment(date._d).format('YYYY-MM-DD HH:mm:ss');

Loading…
Cancel
Save