From e3b49d33e9c2e8ba75ce3d6fdef0da27d529c72c Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期四, 14 十二月 2023 10:43:00 +0800 Subject: [PATCH] 样式调整 --- src/views/safetyReview/law/components/lawDialog.vue | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/views/safetyReview/law/components/lawDialog.vue b/src/views/safetyReview/law/components/lawDialog.vue index 2f6cd50..fb09f86 100644 --- a/src/views/safetyReview/law/components/lawDialog.vue +++ b/src/views/safetyReview/law/components/lawDialog.vue @@ -40,7 +40,8 @@ <span v-else>{{state.form.pubDate}}</span> </el-form-item> <el-form-item label="内容:" v-if="showEditor" required> - <we-editor ref="myEditor" :propData="state.form.content" @childFn="getEditorData" /> +<!-- <we-editor ref="myEditor" :propData="state.form.content" @childFn="getEditorData" />--> + <t-editor style="width: 800px" ref="myEditor" :value="state.form.content" ></t-editor> </el-form-item> <el-form-item label="内容:" v-else> <div class="ql-container ql-snow" style="height: 500px;width: 100%;margin-top: 10px;" > @@ -62,6 +63,7 @@ <script setup> import {reactive, ref, toRefs} from 'vue' import weEditor from "@/components/WeEditor/index.vue"; +import TEditor from "@/components/Tinymce/Tinymce.vue" import {ElMessage} from "element-plus"; import {addLaw, editLaw, getLawDetail} from "@/api/backManage/law"; import axios from "axios"; @@ -163,12 +165,12 @@ } else { this.$message.error('获取文件失败') } - this.handleClose(); + // this.handleClose(); }) } } const onSubmit = async () => { - myEditor.value.submit(); + state.form.content = tinyMCE.activeEditor.getContent(); const valid = await lawRef.value.validate(); if(valid){ if(state.form.content == "") { @@ -179,11 +181,13 @@ return; } if(title.value === '新增'){ + state.form.pubDate = state.form.pubDate.concat(" 00:00:00") + state.form.pubDate = state.form.pubDate.substring(0,19) const param = { content: state.form.content, lawType: state.form.lawType, pubAgency: state.form.pubAgency, - pubDate: state.form.pubDate.concat(" 00:00:00"), + pubDate: state.form.pubDate, subTitle: state.form.subTitle, title: state.form.title } @@ -198,11 +202,13 @@ } emit("getList") reset(); + showEditor.value=false myEditor.value.clear(); lawRef.value.clearValidate(); dialogVisible.value = false; }else if(title.value === '编辑') { state.form.pubDate = state.form.pubDate.concat(" 00:00:00") + state.form.pubDate = state.form.pubDate.substring(0,19) const res = await editLaw(state.form) if(res.code === 200){ ElMessage({ @@ -214,6 +220,7 @@ } emit("getList") reset(); + showEditor.value=false myEditor.value.clear(); lawRef.value.clearValidate(); dialogVisible.value = false; @@ -223,7 +230,7 @@ } const handleClose = () => { - if(title ==="新增"|| title ==='编辑'){ + if(title.value ==="新增"|| title.value ==='编辑'){ myEditor.value.clear(); showEditor.value=false -- Gitblit v1.9.2