| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="适用疾病" prop="region"> |
| | | <el-button type="warning" @click="$refs.child.handleAddpatient()" |
| | | >添加疾病</el-button |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button type="warning" @click="$refs.child.handleAddpatient()" |
| | | >添加疾病诊断</el-button |
| | | > |
| | | </div> |
| | | <el-tag |
| | | v-for="tag in displayedTags" |
| | | :key="tag.icdid" |
| | | type="warning" |
| | | :disable-transitions="false" |
| | | > |
| | | {{ tag.icdname }} |
| | | </el-tag> |
| | | <el-tag v-if="hasMore" type="info">+{{ remaining }} more</el-tag> |
| | | </el-form-item> |
| | | <el-form-item label="适用院区" prop="region"> |
| | | <el-select |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- 宣教内容 --> |
| | | <!-- 宣教内容 --> |
| | | <div v-if="Editprogress == 2"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="4"> |
| | |
| | | |
| | | <div> |
| | | <el-button @click="laststep('ruleForm')">上一步</el-button> |
| | | <el-button type="success" @click="Departmenttreatment('ruleForm')">保存</el-button> |
| | | <el-button type="warning" @click="Departmenttreatment('ruleForm')">另存新版本</el-button> |
| | | <el-button type="success" @click="Departmenttreatment('ruleForm')" |
| | | >保存</el-button |
| | | > |
| | | <el-button type="warning" @click="Departmenttreatment('ruleForm')" |
| | | >另存新版本</el-button |
| | | > |
| | | <el-button type="info" @click="closeFm('ruleForm')">关闭</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import { Editor, Toolbar } from "@wangeditor/editor-for-vue"; |
| | | import '@wangeditor/editor/dist/css/style.css'; |
| | | import "@wangeditor/editor/dist/css/style.css"; |
| | | import axios from "axios"; |
| | | import { getToken } from "@/utils/auth"; |
| | | |
| | |
| | | addrichText, |
| | | getlibraryinfo, |
| | | getillnesslist, |
| | | getillness, |
| | | } from "@/api/AiCentre/index"; |
| | | import OptionalForm from "@/components/OptionalForm"; |
| | | import { listDept } from "@/api/system/dept"; |
| | |
| | | components: { OptionalForm, Editor, Toolbar }, |
| | | data() { |
| | | return { |
| | | // 编辑器实例 |
| | | // 编辑器实例 |
| | | editorRef: null, |
| | | |
| | | // 编辑器内容 |
| | |
| | | |
| | | // 编辑器模式 |
| | | mode: "default", |
| | | |
| | | fileList:[], |
| | | // 工具栏配置 |
| | | toolbarConfig: { |
| | | excludeKeys: [ |
| | |
| | | "uploadVideo", |
| | | "emotion", |
| | | "codeBlock", |
| | | ] |
| | | ], |
| | | }, |
| | | |
| | | // 编辑器配置 |
| | |
| | | maxNumberOfFiles: 1, |
| | | allowedFileTypes: ["image/*"], |
| | | headers: { |
| | | Authorization: "Bearer " + getToken() |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | customUpload: async (file, insertFn) => { |
| | | try { |
| | |
| | | formData, |
| | | { |
| | | headers: { |
| | | "Content-Type": "multipart/form-data", |
| | | Authorization: "Bearer " + getToken() |
| | | } |
| | | // "Content-Type": "multipart/form-data", |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | } |
| | | ); |
| | | |
| | |
| | | console.error("图片上传失败", error); |
| | | this.$message.error("图片上传失败"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | // 上传配置 |
| | | headers: { |
| | | Authorization: "Bearer " + getToken() |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | uploadImgUrlword: process.env.VUE_APP_BASE_API + "/common/uploadShow", |
| | | |
| | |
| | | preachname: "", |
| | | preachcontent: "", |
| | | isAvailable: "", |
| | | suitway: [] |
| | | suitway: [], |
| | | }, |
| | | |
| | | // 其他数据 |
| | |
| | | variablelist: [ |
| | | { variatename: "姓名", variate: "${name}", default: 1 }, |
| | | { variatename: "电话", variate: "${phone}", default: 1 }, |
| | | { variatename: "病情", variate: "${illness}", default: 1 } |
| | | { variatename: "病情", variate: "${illness}", default: 1 }, |
| | | ], |
| | | |
| | | props: { |
| | | multiple: true, |
| | | value: "deptId", |
| | | label: "deptName" |
| | | label: "deptName", |
| | | }, |
| | | fileName: "", //文件名 |
| | | inputVisible: false, |
| | |
| | | ], |
| | | addvalue: "添加题目", |
| | | |
| | | |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | // }, |
| | | content(newVal) { |
| | | // 内容变化时触发,可以在这里处理自动保存等逻辑 |
| | | this.$emit('content-change', newVal) |
| | | } |
| | | this.$emit("content-change", newVal); |
| | | }, |
| | | }, |
| | | beforeDestroy() { |
| | | const editor = this.editor; |
| | | if (editor == null) return; |
| | | editor.destroy(); // 组件销毁时,及时销毁编辑器 |
| | | }, |
| | | computed: { |
| | | displayedTags() { |
| | | // 返回前10个tag |
| | | return this.illnesslist.slice(0, 10); |
| | | }, |
| | | hasMore() { |
| | | // 判断是否有更多的tag |
| | | return this.illnesslist.length > 10; |
| | | }, |
| | | remaining() { |
| | | // 计算剩余的tag数量 |
| | | return this.illnesslist.length - 10; |
| | | }, |
| | | }, |
| | | methods: { |
| | | onCreated(editor) { |
| | | this.editor = Object.seal(editor); // 一定要用 Object.seal(),否则会报错 |
| | | }, |
| | | // 编辑器创建回调 |
| | | handleEditorCreated(editor) { |
| | | handleEditorCreated(editor) { |
| | | this.editorRef = editor; |
| | | console.log("编辑器已创建", editor); |
| | | }, |
| | | |
| | | // 销毁编辑器 |
| | | // 销毁编辑器 |
| | | destroyEditor() { |
| | | if (this.editorRef) { |
| | | this.editorRef.destroy(); |
| | |
| | | // }, |
| | | // 获取远程内容 |
| | | Getmissioncontent(url) { |
| | | axios.get(url) |
| | | axios |
| | | .get(url) |
| | | .then((response) => { |
| | | this.content = response.data; |
| | | }) |
| | |
| | | }, |
| | | // 生命周期钩子 |
| | | beforeUnmount() { |
| | | this.destroyEditor() |
| | | this.destroyEditor(); |
| | | }, |
| | | }; |
| | | </script> |