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. 66
      src/views/PatientInfo/PatientInfo.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=http://www.sxwikionline.com/
VUE_APP_API_URL=http://www.sxwikionline.com/gateway
VUE_APP_BASE_URL=http://sxzxyzzlm.tall.wiki/
VUE_APP_API_URL=http://sxzxyzzlm.tall.wiki/gateway
VUE_APP_PROXY_URL=/gateway
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_DESCRIPTION=中医药大学课题数据库

6
.env.production

@ -1,10 +1,10 @@
VUE_APP_MODE=production
VUE_APP_NODE_ENV=production
VUE_APP_SCENE=tcm
VUE_APP_BASE_URL=https://www.tall.wiki/
VUE_APP_API_URL=https://www.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://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_DESCRIPTION=中医药大学课题数据库

2
src/App.vue

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

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

@ -3,17 +3,17 @@
* @email: 18603454788@163.com
* @Date: 2021-02-22 09:20:03
* @LastEditors: wally
* @LastEditTime: 2021-04-01 19:58:27
* @LastEditTime: 2021-04-02 08:31:38
*/
const state = {
anyringToken: '',
user: { id: '', phone: '', account: '' },
controlGroups: [], // 对照组
patientId: '1369189040502611968', // 病患id
patientId: '', // 病患id
hospitalization: '', // 病患住院号
previewInfo: { host: '', place: '', startTime: '', endTime: '', participants: '', meetingMinutes: '', discussionContent: '' }, // 预览信息
ptProps: null, // 接受PT传过来的 pluginId,projectId,roleId,taskId,userId
hospitalId: 1, // 医院Id
hospitalId: '', // 医院Id
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>
<div class="flex-wrap">
<div class="fill-width mb-3 flex-wrap">

66
src/views/PatientInfo/PatientInfo.vue

@ -470,17 +470,17 @@
</a-form-item>
</div>
<!-- 一级标题下的各种二级标题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">
<!-- 二级大标题 -->
<span class="hhh2"> {{ w.name }}</span>
<a-upload
v-if="w.recordType"
v-if="w.recordType && getCode"
name="files"
:multiple="true"
:action="action"
: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-button> <a-icon type="upload" />上传图片</a-button>
@ -1044,12 +1044,6 @@ export default {
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() {
console.log(this.patientId);
@ -1122,7 +1116,7 @@ export default {
}
},
onChange(e, type, id, recordId) {
console.log(e);
// console.log(e);
//
if (this.contentList.find(item => item.testQuestionsId === id)) {
if (type === 1) {
@ -1248,7 +1242,7 @@ export default {
// for
forFn(id, value, recordId) {
const { contentList } = this;
console.log(value);
// console.log(value);
for (let i = 0; i < contentList.length; i++) {
if (contentList[i].testQuestionsId === id) {
contentList[i].contents = value;
@ -1256,7 +1250,7 @@ export default {
}
}
this.contentList = [...contentList];
console.log(this.contentList);
// console.log(this.contentList);
},
//
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') {
console.log(info.file.response.data[0].visitUrl);
const { list } = this;
const objList = list[indexA].subReportCodes[indexB];
const params = {
param: {
hospitalId: this.hospitalId,
@ -1397,30 +1392,23 @@ export default {
const res = await basic(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.changeType(data, recordId);
this.changeType(data, recordId);
console.log(this.contentList);
} else {
console.log(msg);
for (let k = 0; k < data.length; k++) {
for (let i = 0; i < objList.questionVos.length; i++) {
if (objList.questionVos[i].id === data[k].questionId) {
objList.questionVos[i].answer = data[k].content;
}
}
},
async changeType(data) {
await this.changeTypeList(data);
// // contentList
for (let i = 0; i < data.length; i++) {
if (this.contentList.length > 0) {
for (let k = 0; k < this.contentList.length; k++) {
for (let i = 0; i < this.contentList.length; i++) {
//
if (data[i].questionId === this.contentList[k].testQuestionsId) {
this.contentList[k].contents = data[i].content;
if (data[k].questionId === this.contentList[i].testQuestionsId) {
this.contentList[i].contents = data[k].content;
break;
//
} else if (k === this.contentList.length - 1) {
//
} else if (i === this.contentList.length - 1) {
let obj = {
testQuestionsId: data[i].questionId,
contents: data[i].content,
testQuestionsId: data[k].questionId,
contents: data[k].content,
};
this.contentList.push(obj);
break;
@ -1428,15 +1416,19 @@ export default {
}
} else {
let obj = {
testQuestionsId: data[i].questionId,
contents: data[i].content,
testQuestionsId: data[k].questionId,
contents: data[k].content,
};
this.contentList.push(obj);
}
}
},
changeTypeList(data) {
this.recordTypeList = data;
list[indexA].subReportCodes[indexB] = { ...objList };
this.list = [...list];
} else {
console.log(msg);
}
}
},
//
// changeDate(date) {

Loading…
Cancel
Save