|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="NoiseTemplateWrapper TemplateWrapper">
|
|
|
+ <div class="NoiseTemplateWrapper TemplateWrapper knowledgeWrapper">
|
|
|
<crumbs
|
|
|
:title="'医学术语静态知识维护-'+title"
|
|
|
class="topBack"
|
|
@@ -48,7 +48,6 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="upload" label="上传文件:" label-width="160px">
|
|
|
<el-upload
|
|
|
-
|
|
|
class="upload-demo"
|
|
|
:action="config.urls.promptServer"
|
|
|
name="upfile"
|
|
@@ -159,12 +158,11 @@
|
|
|
const data = res.data.data;
|
|
|
|
|
|
if(this.form.typeId === 82 || this.form.typeId === 83){
|
|
|
+ console.log('data',data)
|
|
|
this.form.fileList=data&&data.map((it)=>{
|
|
|
- return {
|
|
|
- name: it.text,
|
|
|
- url: it.content.replace(config.imgHost,"")
|
|
|
- };
|
|
|
+ return JSON.parse(it.content);
|
|
|
});
|
|
|
+ console.log(' this.form.fileList', this.form.fileList)
|
|
|
this.showFileList = true
|
|
|
this.showUpLoad = false
|
|
|
}else{
|
|
@@ -187,7 +185,6 @@
|
|
|
},
|
|
|
methods: {
|
|
|
changeWord(newVal){
|
|
|
- console.log('newVal',newVal)
|
|
|
const name = newVal.nameType;
|
|
|
this.form.selectedTermName = name;
|
|
|
this.form.selectedTerm=name;
|
|
@@ -308,15 +305,18 @@
|
|
|
const item=this.form.prags;
|
|
|
let param= []
|
|
|
if(this.form.typeId === 82 || this.form.typeId === 83){
|
|
|
+ if(this.form.fileList.length === 0){
|
|
|
+ this.warning("文件未上传,不存储数据")
|
|
|
+ return
|
|
|
+ }
|
|
|
param.push(Object.assign({},{
|
|
|
position: this.form.typeId === 82 ? "8" : "9",
|
|
|
conceptId:this.form.conceptId,
|
|
|
title: this.form.fileTitle,
|
|
|
orderNo:0,
|
|
|
- content:this.form.fileList[0].url,
|
|
|
- text:this.form.fileList[0].name
|
|
|
+ content:JSON.stringify(this.form.fileList[0]),
|
|
|
}))
|
|
|
-
|
|
|
+
|
|
|
}else {
|
|
|
param =item.map((it,i)=>{
|
|
|
return Object.assign({},it,{
|
|
@@ -380,7 +380,8 @@
|
|
|
this.form.fileList=[]
|
|
|
this.form.fileList.push({
|
|
|
name: response.data.title,
|
|
|
- url: config.imgHost+response.data.url
|
|
|
+ url: response.data.url,
|
|
|
+ size: response.data.size
|
|
|
})
|
|
|
this.showUpLoad = false
|
|
|
if(!this.form.fileTitle){
|
|
@@ -441,5 +442,11 @@
|
|
|
.NoiseTemplateWrapper .el-select .el-input .el-icon-circle-close{
|
|
|
display: inherit!important;
|
|
|
}
|
|
|
+ .el-button--default{
|
|
|
+ color: #22ccc8!important;
|
|
|
+ }
|
|
|
+ .el-button--primary{
|
|
|
+ color: #ffffff!important;
|
|
|
+ }
|
|
|
</style>
|
|
|
|