完善宣教库

This commit is contained in:
shidongli 2025-01-03 10:13:32 +08:00
parent 1200a83f93
commit 2c8efad8a0
2 changed files with 116 additions and 92 deletions

View File

@ -324,6 +324,9 @@ export default {
this.Quill = null; this.Quill = null;
}, },
methods: { methods: {
getEditor() {
return this.Quill;
},
// //
updateCPagefour(index, size) { updateCPagefour(index, size) {
this.querymaterial.pageNum = index this.querymaterial.pageNum = index
@ -571,6 +574,11 @@ button.ql-scmages {
margin-left: -14px; margin-left: -14px;
margin-top: -8px; margin-top: -8px;
width: 24px !important; width: 24px !important;
cursor: none;
-webkit-user-select: none; /* 针对WebKit浏览器的兼容性设置 */
-moz-user-select: none; /* 针对Firefox浏览器的兼容性设置 */
-ms-user-select: none; /* 针对IE浏览器的兼容性设置 */
user-select: none; /* 标准属性 */
} }
.bodytopxjsc { .bodytopxjsc {
width: 100%; width: 100%;

View File

@ -21,7 +21,7 @@
> >
<el-form-item label="创建时间" prop=""> <el-form-item label="创建时间" prop="">
<el-date-picker <el-date-picker
style="width:205px" style="width: 205px"
v-model="queryParams.createTimeStart" v-model="queryParams.createTimeStart"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -32,7 +32,7 @@
</el-date-picker> </el-date-picker>
- -
<el-date-picker <el-date-picker
style="width:205px" style="width: 205px"
v-model="queryParams.createTimeEnd" v-model="queryParams.createTimeEnd"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -46,7 +46,7 @@
<el-select <el-select
v-model="queryParams.propagandaType" v-model="queryParams.propagandaType"
placeholder="请选择" placeholder="请选择"
clearable clearable
> >
<el-option <el-option
v-for="item in optionstype" v-for="item in optionstype"
@ -452,7 +452,7 @@
<el-form-item label="正文内容" prop="propagandaContent" v-if="open"> <el-form-item label="正文内容" prop="propagandaContent" v-if="open">
<editor <editor
id="id" id="id"
ref="myTextarea" ref="quillEditor"
v-model="form.propagandaContent" v-model="form.propagandaContent"
:min-height="192" :min-height="192"
style="width: 800px" style="width: 800px"
@ -562,65 +562,69 @@
append-to-body append-to-body
:before-close="canceldiseases" :before-close="canceldiseases"
> >
<div style="padding-bottom: 23px;"> <div style="padding-bottom: 23px">
<el-form <el-form
ref="queryForm" ref="queryForm"
:model="querydisease" :model="querydisease"
:rules="rules" :rules="rules"
label-width="80px" label-width="80px"
:inline="true" :inline="true"
> >
<el-form-item label="病种名称" prop="diseaseTypeName" label-width="120"> <el-form-item
<el-input label="病种名称"
v-model="querydisease.diseaseTypeName" prop="diseaseTypeName"
placeholder="请输入病种名称" label-width="120"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="infodisease"
>搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetdisease" <el-input
>重置</el-button v-model="querydisease.diseaseTypeName"
> placeholder="请输入病种名称"
</el-form-item> clearable
</el-form> />
<el-table </el-form-item>
:data="listdisease" <el-form-item>
@cell-dblclick="nurseclickdisease"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
style="width: 15px; height: 15px" icon="el-icon-search"
v-if="form.diseaseTypeId == scope.row.id" size="mini"
circle @click="infodisease"
@click="nurseclickdisease(scope.row)" >搜索</el-button
></el-button> >
<el-button <el-button icon="el-icon-refresh" size="mini" @click="resetdisease"
v-else >重置</el-button
style="width: 15px; height: 15px" >
circle </el-form-item>
@click="nurseclickdisease(scope.row)" </el-form>
></el-button> <el-table
</template> :data="listdisease"
</el-table-column> @cell-dblclick="nurseclickdisease"
<el-table-column v-loading="loading"
property="diseaseTypeName"
label="病种名称"
align="center"
:show-overflow-tooltip="true"
> >
</el-table-column> <el-table-column label="请选择" width="100" align="center">
</el-table> <template slot-scope="scope">
</div> <el-button
type="primary"
style="width: 15px; height: 15px"
v-if="form.diseaseTypeId == scope.row.id"
circle
@click="nurseclickdisease(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclickdisease(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="diseaseTypeName"
label="病种名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
</div>
<!-- <pagination v-show="diseasetotal > 0" :total="diseasetotal" :page.sync="querydisease.pageNum" <!-- <pagination v-show="diseasetotal > 0" :total="diseasetotal" :page.sync="querydisease.pageNum"
:limit.sync="querydisease.pageSize" @pagination="infodisease" /> --> :limit.sync="querydisease.pageSize" @pagination="infodisease" /> -->
<myPagination <myPagination
@ -661,8 +665,8 @@
<div> <div>
<img :src="baseUrl + formview.propagandaCoverPath" alt="" /> <img :src="baseUrl + formview.propagandaCoverPath" alt="" />
<div class="know">知识卡片</div> <div class="know">知识卡片</div>
<div class="knowlist" v-html="formview.propagandaContent"> <div class="knowlist" v-html="formview.propagandaContent"></div>
</div> <!-- <Editorxj v-model="formview.propagandaContent" :min-height="192" /> --> <!-- <Editorxj v-model="formview.propagandaContent" :min-height="192" /> -->
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -893,15 +897,15 @@ export default {
copyid: null,//id copyid: null,//id
examineid: null,//id examineid: null,//id
// //
optionspublick:[ optionspublick: [
{ {
value: 'PRIVATE', value: 'PRIVATE',
label: '私有' label: '私有'
}, },
{ {
value: 'PUBLIC', value: 'PUBLIC',
label: '公共' label: '公共'
}, },
], ],
optionstype: [{ optionstype: [{
@ -980,7 +984,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
source:'PRIVATE', source: 'PRIVATE',
patientId: null, patientId: null,
propagandaId: null, propagandaId: null,
departmentName: null, departmentName: null,
@ -1108,7 +1112,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
}, },
// //
handlePaste(event) { async handlePaste(event) {
console.log(event, 'event') console.log(event, 'event')
const clipboardData = event.clipboardData || window.clipboardData; const clipboardData = event.clipboardData || window.clipboardData;
const pastedText = clipboardData.getData('text'); const pastedText = clipboardData.getData('text');
@ -1124,15 +1128,30 @@ export default {
}); });
} }
else { else {
event.preventDefault(); const editor = this.$refs.quillEditor.getEditor();
// let length = editor.selection.savedRange.index;
event.target.outerText += pastedText; const text = clipboardData.getData('text/plain');
// // text
const dom = document.getElementById('id') console.log(text, 'length + text.length')
dom && dom.focus() editor.insertEmbed(length, text);
// document.execCommand('selectAll', false, null);
// document.getSelection().collapseToEnd(); await setTimeout(() => {
console.log(event, '222222222222222') //
editor.setSelection(length + text.length);
}, 10); // 使 setTimeout
// editor.insertText(range.index, text);
// editor.setSelection(range.index + text.length);
// //
// event.preventDefault();
// //
// event.target.outerText += pastedText;
// //
// const dom = document.getElementById('id')
// dom && dom.focus()
// // document.execCommand('selectAll', false, null);
// // document.getSelection().collapseToEnd();
// console.log(event, '222222222222222')
} }
}, },
// checkContentLength(event) { // checkContentLength(event) {
@ -1449,9 +1468,9 @@ export default {
resetQuery() { resetQuery() {
this.queryParams.createTimeEnd = null this.queryParams.createTimeEnd = null
this.queryParams.createTimeStart = null this.queryParams.createTimeStart = null
this.queryParams.propagandaType=null this.queryParams.propagandaType = null
this.queryParams.propagandaStatus=null this.queryParams.propagandaStatus = null
this.queryParams.source=null this.queryParams.source = null
this.informationqueryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId this.informationqueryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.queryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId this.queryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.resetForm("queryForms"); this.resetForm("queryForms");
@ -1614,20 +1633,17 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-dialog{ ::v-deep .el-dialog {
top:-25px; top: -25px;
// height:95vh; // height:95vh;
} }
::v-deep .ql-editor { ::v-deep .ql-editor {
::v-deep .ql-video { ::v-deep .ql-video {
width: 100% !important; width: 100% !important;
} }
} }
::v-deep .el-dialog__body ::v-deep .el-dialog__body {
{ padding-top: 10px !important;
padding-top: 10px !important;
} }
.articleSummary { .articleSummary {
@ -1739,7 +1755,7 @@ audio {
} }
::v-deep img { ::v-deep img {
max-width: 950px; max-width: 950px;
// width: 362px; // width: 362px;
// height: 127px; // height: 127px;
margin: 0px 0px 0px 30px; margin: 0px 0px 0px 30px;