Commit 26c338a1 by 孙文琦

78

parent e6f4ad85
<template>
<!-- 化药参考文献 -->
<div style="background:#fff;border-radius:6px;box-shadow: 1px 1px 3px rgba(0,0,0,.2);">
<header>
<el-button type="success" @click="saveInfo" style="margin: 10px;">保存</el-button>
</header>
<main>
<quill-editor v-model="informedConsent" ref="myQuillEditor" class="editer" style="padding:10px">
</quill-editor>
</main>
</div>
</template>
<script>
import { GetChemicalDrugTxt,SaveChemicalDrugTxt } from "../../api/api";
export default {
data() {
return {
informedConsent:'',
OID:''
}
},
mounted(){
this.getData()
},
methods: {
getData(){
GetChemicalDrugTxt().then(res=>{
this.informedConsent=res.data
})
},
saveInfo(){
let para={
chemicalDrugReferencesTxt:this.informedConsent
}
this.$confirm('确认保存吗?', '提示', { type: 'warning'}).then(()=>{
SaveChemicalDrugTxt(para).then(res=>{
if(res.status=='SUCCESS'){
this.$message({ type: 'success', message: '保存成功!'});
this.getData();
}
else{
this.$message({ type: 'error', message: res.msg});
}
})
}).catch(()=>{ return})
}
},
}
</script>
<style scoped>
header {
height: 40px;
/* border:1px solid red; */
width: 100%;
}
</style>
<template>
<!-- 化药参考文献 -->
<div style="background:#fff;border-radius:6px;box-shadow: 1px 1px 3px rgba(0,0,0,.2);">
<header>
<el-button type="success" @click="saveInfo" style="margin: 10px;">保存</el-button>
</header>
<main>
<quill-editor v-model="informedConsent" ref="myQuillEditor" class="editer" style="padding:10px">
</quill-editor>
</main>
</div>
</template>
<script>
import { GetChemicalDrugTxt,SaveChemicalDrugTxt } from "../../api/api";
export default {
data() {
return {
informedConsent:'',
OID:''
}
},
mounted(){
this.getData()
},
methods: {
getData(){
GetChemicalDrugTxt().then(res=>{
this.informedConsent=res.data
})
},
saveInfo(){
let para={
chemicalDrugReferencesTxt:this.informedConsent
}
this.$confirm('确认保存吗?', '提示', { type: 'warning'}).then(()=>{
SaveChemicalDrugTxt(para).then(res=>{
if(res.status=='SUCCESS'){
this.$message({ type: 'success', message: '保存成功!'});
this.getData();
}
else{
this.$message({ type: 'error', message: res.msg});
}
})
}).catch(()=>{ return})
}
},
}
</script>
<style scoped>
header {
height: 40px;
/* border:1px solid red; */
width: 100%;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论