Commit 26c338a1 by 孙文琦

78

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