From d4e357730a2aca5db5cebcf6cd83dc79c43d7f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Tue, 9 Jul 2024 15:07:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=97=85=E7=A7=8D=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=92=8C=E5=AD=90=E8=B7=AF=E5=BE=84=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=94=BB=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/components/wangEditor.vue | 96 +++-- src/views/system/departmentDisease/index.vue | 368 ++++++++++++++----- 2 files changed, 339 insertions(+), 125 deletions(-) diff --git a/src/views/system/components/wangEditor.vue b/src/views/system/components/wangEditor.vue index c2d30ca..511870e 100644 --- a/src/views/system/components/wangEditor.vue +++ b/src/views/system/components/wangEditor.vue @@ -7,7 +7,7 @@ :mode="mode" /> { if (this.modify) { this.modify = false; @@ -254,13 +263,17 @@ export default { }; this.editor.insertNode(resume); }); - ++this.isResouceShow; this.selectedOptions = []; this.addlist = []; - setTimeout(() => { - this.editor.focus(); - }, 30); + console.log(this.html,'this.html') + + setTimeout(() => { + console.log(22222222) + this. editor.focus({ toEnd: true }); + // this.editor.focus(); + this.$forceUpdate() + }, 30); }, 100); }, fieldclick() { @@ -322,9 +335,8 @@ export default { // el.fieldName = el.contentName; // }); // }); - if(res){ + if (res) { this.labeloptions = res; - } }); @@ -352,24 +364,23 @@ export default { }, watch: { nodeContent(newValue, oldValue) { - console.log(newValue,'newValue') + // console.log(newValue,'newValue') this.html = newValue; }, taskSubdivision(newvalue, oldvalue) { this.taskSubdivision = newvalue; }, - specialDiseaseNodeId(newvalue,oldvalue){ + specialDiseaseNodeId(newvalue, oldvalue) { console.log(newvalue, "specialDiseaseNodeId"); this.specialDiseaseNodeId = newvalue; - }, taskPartitionDictId(newValue, oldValue) { console.log(newValue, "taskPartitionDictId"); // this.labeloptions = []; - this.taskPartitionDictId = newValue; - this.info(); + that.taskPartitionDictId = newValue; + that.info(); }, }, mounted() { @@ -479,8 +490,11 @@ function withAttachment(editor) { const { isInline, isVoid } = editor; const newEditor = editor; newEditor.isInline = (elem) => { + // console.log(elem,'elem') const type = DomEditor.getNodeType(elem); - if (type === "attachment") return false; // 针对 type: attachment ,设置为 inline + // console.log(type,'type') + + if (type === "attachment") return true; // 针对 type: attachment ,设置为 inline if (type === "attachmenttwo") return true; // 针对 type: attachment ,设置为 inline return isInline(elem); }; @@ -571,6 +585,7 @@ function renderAttachment(elem, children, editor) { props: { contentEditable: false }, // HTML 属性,驼峰式写法 style: { color: "#fff", + margin: "0 0 0 20px", background: "#009A82", padding: "5px 10px" /* 其他... */, }, // style ,驼峰式写法 @@ -731,7 +746,7 @@ function attachmentToHtml(elem, childrenHtml) { data-fieldMark="${fieldMark}" data-fileName="${fileName}"> - ${fileName} + ${fileName} ${fileSpan} `; @@ -836,39 +851,42 @@ Boot.registerModule(parseHtmlConfmodule); ::v-deep .el-textarea__inner { color: black !important; background-color: #fff !important; - cursor: default !important + cursor: default !important; } .path-tag-wrap { - font-size: 18px; + font-size: 10px; line-height: 32px; border-radius: 5px; + margin-left: 20px; } +.finame{ +margin-left: 20px +; +} +::v-deep .el-textarea__inner { + color: black !important; + background-color: #fff !important; + cursor: default !important; +} + +// .path-tag-wrap { +// font-size: 18px; +// line-height: 32px; +// border-radius: 5px; +// } ::v-deep .el-textarea__inner { color: black !important; background-color: #fff !important; - cursor: default !important + cursor: default !important; } -.path-tag-wrap { - font-size: 18px; - line-height: 32px; - border-radius: 5px; -} - - -::v-deep .el-textarea__inner { - color: black !important; - background-color: #fff !important; - cursor: default !important -} - -.path-tag-wrap { - font-size: 18px; - line-height: 32px; - border-radius: 5px; -} +// .path-tag-wrap { +// font-size: 18px; +// line-height: 32px; +// border-radius: 5px; +// } // ::v-deep .el-textarea__inner { // color: black !important; diff --git a/src/views/system/departmentDisease/index.vue b/src/views/system/departmentDisease/index.vue index 173f5e7..4f6331a 100644 --- a/src/views/system/departmentDisease/index.vue +++ b/src/views/system/departmentDisease/index.vue @@ -1,13 +1,23 @@ @@ -332,8 +529,8 @@ export default { this.infolists(); }, mounted() { - this.getMaxTableHeight() - this.screenChange() + this.getMaxTableHeight(); + this.screenChange(); }, watch: { name(val) { @@ -416,8 +613,8 @@ export default { this.$refs.upload.clearFiles(); this.$alert( "
" + - response.msg + - "
", + response.msg + + "", "导入结果", { dangerouslyUseHTMLString: true } ); @@ -492,7 +689,7 @@ export default { }, /** 重置按钮操作 */ resetQuery() { - this.queryParams.diseaseTypeName = '' + this.queryParams.diseaseTypeName = ""; this.resetForm("queryForm"); this.handleQuery(); }, @@ -530,17 +727,16 @@ export default { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); - this.departmentName = '' - this.infolists() + this.departmentName = ""; + this.infolists(); }); } else { addDepartmentDisease(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); - this.departmentName = '' - this.infolists() - + this.departmentName = ""; + this.infolists(); }); } } @@ -556,12 +752,12 @@ export default { }) .then(() => { this.getList(); - this.departmentName = '' - this.infolists() + this.departmentName = ""; + this.infolists(); this.$modal.msgSuccess("删除成功"); }) - .catch(() => { }); + .catch(() => {}); }, /** 导出按钮操作 */ handleExport() { @@ -574,37 +770,38 @@ export default { ); }, updateCPage(index, size) { - this.queryParams.pageNum = index - this.queryParams.pageSize = size + this.queryParams.pageNum = index; + this.queryParams.pageSize = size; this.getList(); }, updateCPagetwo(index, size) { - this.informationqueryParams.pageNum = index - this.informationqueryParams.pageSize = size + this.informationqueryParams.pageNum = index; + this.informationqueryParams.pageSize = size; this.informationInfoinfo(); }, // 获取表格最高高度 getMaxTableHeight() { - const windowInnerHeight = window.innerHeight // 屏幕可视高度 - const layoutDiv = this.$refs.layout - const formDiv = this.$refs.topform - const mb8Div = this.$refs.mb8 + const windowInnerHeight = window.innerHeight; // 屏幕可视高度 + const layoutDiv = this.$refs.layout; + const formDiv = this.$refs.topform; + const mb8Div = this.$refs.mb8; this.maxTableHeight = - windowInnerHeight - 134 - + windowInnerHeight - + 134 - this.getBoxPadding(layoutDiv) - this.getBoxHeight(mb8Div) - - this.getBoxHeight(formDiv) + this.getBoxHeight(formDiv); }, // 屏幕resize监听 screenChange() { // 屏幕resize监听事件:一旦屏幕宽高发生变化,就会执行resize - window.addEventListener('resize', this.getMaxTableHeight, true) + window.addEventListener("resize", this.getMaxTableHeight, true); // 将屏幕监听事件移除 // 这步是必须的。离开页面时不移除,再返回,或者进入到别的有相同元素的页面会报错 // 或者将这里的方法直接写在beforeDestroy函数中也可以 - this.$once('hook:beforeDestroy', () => { - window.removeEventListener('resize', this.getMaxTableHeight, true) - }) + this.$once("hook:beforeDestroy", () => { + window.removeEventListener("resize", this.getMaxTableHeight, true); + }); }, }, }; @@ -661,7 +858,6 @@ export default {