|
|
@ -39,7 +39,6 @@ |
|
|
|
<div v-else-if="a.type === 7"> |
|
|
|
<a-upload |
|
|
|
:action="action" |
|
|
|
:default-file-list="fileList" |
|
|
|
:headers="headers" |
|
|
|
@change="fileChange($event, a.id)" |
|
|
|
:before-upload="beforeUpload1" |
|
|
@ -164,8 +163,8 @@ |
|
|
|
<div v-else-if="h.type === 7"> |
|
|
|
<a-upload |
|
|
|
:action="action" |
|
|
|
:default-file-list="fileList" |
|
|
|
:headers="headers" |
|
|
|
:default-file-list="getDefultList(h.answer, h.domList)" |
|
|
|
@change="fileChange($event, h.id)" |
|
|
|
list-type="picture" |
|
|
|
:before-upload="beforeUpload1" |
|
|
@ -427,8 +426,8 @@ |
|
|
|
<div v-else-if="h.type === 7"> |
|
|
|
<a-upload |
|
|
|
:action="action" |
|
|
|
:default-file-list="fileList" |
|
|
|
:headers="headers" |
|
|
|
:default-file-list="getDefultList(h.answer, h.domList)" |
|
|
|
@change="fileChange($event, h.id)" |
|
|
|
:before-upload="beforeUpload1" |
|
|
|
list-type="picture" |
|
|
@ -701,8 +700,8 @@ |
|
|
|
<div v-else-if="e.type === 7"> |
|
|
|
<a-upload |
|
|
|
:action="action" |
|
|
|
:default-file-list="fileList" |
|
|
|
:headers="headers" |
|
|
|
:default-file-list="getDefultList(e.answer, e.domList)" |
|
|
|
@change="fileChange($event, e.id, e.recordId)" |
|
|
|
:before-upload="beforeUpload1" |
|
|
|
list-type="picture" |
|
|
@ -829,8 +828,8 @@ |
|
|
|
<div v-else-if="h.type === 7"> |
|
|
|
<a-upload |
|
|
|
:action="action" |
|
|
|
:default-file-list="fileList" |
|
|
|
:headers="headers" |
|
|
|
:default-file-list="getDefultList(h.answer, h.domList)" |
|
|
|
@change="fileChange($event, h.id)" |
|
|
|
:before-upload="beforeUpload1" |
|
|
|
list-type="picture" |
|
|
@ -1096,7 +1095,7 @@ |
|
|
|
<div v-else-if="h.type === 7"> |
|
|
|
<a-upload |
|
|
|
:action="action" |
|
|
|
:default-file-list="fileList" |
|
|
|
:default-file-list="getDefultList(h.answer, h.domList)" |
|
|
|
:headers="headers" |
|
|
|
@change="fileChange($event, h.id)" |
|
|
|
:before-upload="beforeUpload1" |
|
|
@ -1504,6 +1503,36 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapMutations('home', ['setCallback']), |
|
|
|
/** |
|
|
|
* 获取默认的图片数组 |
|
|
|
*/ |
|
|
|
getDefultList(answer, list) { |
|
|
|
let arr = []; |
|
|
|
if (list.length) { |
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
let obj = { |
|
|
|
uid: i, |
|
|
|
url: list[i], |
|
|
|
status: 'done', |
|
|
|
name: `${i}`, |
|
|
|
}; |
|
|
|
arr.push(obj); |
|
|
|
} |
|
|
|
} |
|
|
|
if (answer) { |
|
|
|
let obj = { |
|
|
|
uid: 0, |
|
|
|
url: answer, |
|
|
|
status: 'done', |
|
|
|
name: `${0}`, |
|
|
|
}; |
|
|
|
console.log([{ ...obj }, ...arr]); |
|
|
|
return [{ ...obj }, ...arr]; |
|
|
|
} else { |
|
|
|
console.log(arr); |
|
|
|
return [...arr]; |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 重新选择病例 |
|
|
|
*/ |
|
|
|