提交 b0312616 authored 作者: 龙菲's avatar 龙菲

布展单元增加富文本编辑器

上级 b732a5a1
......@@ -22,6 +22,7 @@
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"vue": "2.6.10",
"vue-quill-editor": "^3.0.6",
"vue-router": "3.0.6",
"vuex": "3.1.0"
},
......
......@@ -102,7 +102,7 @@ export default {
color: #61666d;
}
.like {
color: #d4237a;
color: #831122;
}
.collect {
color: #2069c4;
......
......@@ -22,14 +22,13 @@
<el-button v-else size="small" type="primary">点击上传</el-button>
<div v-if="showTip" slot="tip" class="el-upload__tip">
只能上传{{ fileTypeName || "jpg/png" }}文件,且不超过
提示:只能上传{{ fileTypeName || "jpg/png" }}文件,且不超过
{{ fileSize }}MB,最多上传{{ fileLimit }}个文件
</div>
</el-upload>
</div>
</template>
<script>
export default {
name: "ManualUploader",
props: {
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1661151424504" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1635" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M563.2 1006.933333s-3.413333 0 0 0l-549.546667-102.4c-6.826667-3.413333-13.653333-10.24-13.653333-17.066666V170.666667c0-6.826667 6.826667-13.653333 13.653333-17.066667l546.133334-136.533333c3.413333 0 10.24 0 13.653333 3.413333 3.413333 3.413333 6.826667 6.826667 6.826667 13.653333v955.733334c0 3.413333-3.413333 10.24-6.826667 13.653333-3.413333 3.413333-6.826667 3.413333-10.24 3.413333zM34.133333 873.813333l512 95.573334V54.613333L34.133333 184.32v689.493333z" p-id="1636"></path><path d="M1006.933333 938.666667h-443.733333c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066667H989.866667v-785.066666H580.266667c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066667h426.666666c10.24 0 17.066667 6.826667 17.066667 17.066667v819.2c0 10.24-6.826667 17.066667-17.066667 17.066667zM392.533333 699.733333c-6.826667 0-10.24-3.413333-13.653333-6.826666l-204.8-341.333334c-6.826667-10.24-3.413333-20.48 3.413333-23.893333s17.066667-3.413333 23.893334 6.826667l204.8 341.333333c3.413333 6.826667 3.413333 17.066667-6.826667 23.893333h-6.826667z" p-id="1637"></path><path d="M187.733333 699.733333c-3.413333 0-6.826667 0-10.24-3.413333-6.826667-3.413333-10.24-13.653333-3.413333-23.893333l204.8-341.333334c3.413333-6.826667 13.653333-10.24 23.893333-6.826666 6.826667 3.413333 10.24 13.653333 6.826667 23.893333l-204.8 341.333333c-6.826667 6.826667-10.24 10.24-17.066667 10.24zM733.866667 938.666667c-10.24 0-17.066667-6.826667-17.066667-17.066667V119.466667c0-10.24 6.826667-17.066667 17.066667-17.066667s17.066667 6.826667 17.066666 17.066667V921.6c0 10.24-6.826667 17.066667-17.066666 17.066667z" p-id="1638"></path><path d="M989.866667 802.133333H563.2c-10.24 0-17.066667-6.826667-17.066667-17.066666s6.826667-17.066667 17.066667-17.066667H989.866667c10.24 0 17.066667 6.826667 17.066666 17.066667s-6.826667 17.066667-17.066666 17.066666zM1006.933333 665.6h-443.733333c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066666h443.733333c10.24 0 17.066667 6.826667 17.066667 17.066666s-6.826667 17.066667-17.066667 17.066667zM1006.933333 529.066667H580.266667c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066667h426.666666c10.24 0 17.066667 6.826667 17.066667 17.066667s-6.826667 17.066667-17.066667 17.066667zM1000.106667 392.533333H573.44c-10.24 0-17.066667-6.826667-17.066667-17.066666s6.826667-17.066667 17.066667-17.066667h426.666667c10.24 0 17.066667 6.826667 17.066666 17.066667s-10.24 17.066667-17.066666 17.066666zM1006.933333 256h-443.733333c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066666h443.733333c10.24 0 17.066667 6.826667 17.066667 17.066666s-6.826667 17.066667-17.066667 17.066667z" p-id="1639"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1661151433531" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1841" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M563.2 1006.933333s-3.413333 0 0 0l-549.546667-102.4c-6.826667-3.413333-13.653333-10.24-13.653333-17.066666V170.666667c0-6.826667 6.826667-13.653333 13.653333-17.066667l546.133334-136.533333c3.413333 0 10.24 0 13.653333 3.413333s6.826667 6.826667 6.826667 13.653333v955.733334c0 3.413333-3.413333 10.24-6.826667 13.653333-3.413333 3.413333-6.826667 3.413333-10.24 3.413333zM34.133333 873.813333l512 95.573334V54.613333L34.133333 184.32v689.493333z" p-id="1842"></path><path d="M1006.933333 938.666667h-443.733333c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066667H989.866667v-785.066666H563.2c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066667h443.733333c10.24 0 17.066667 6.826667 17.066667 17.066667v819.2c0 10.24-6.826667 17.066667-17.066667 17.066667zM358.4 699.733333c-6.826667 0-13.653333-6.826667-17.066667-13.653333l-68.266666-249.173333-68.266667 249.173333c-3.413333 6.826667-6.826667 13.653333-17.066667 13.653333-6.826667 0-13.653333-3.413333-17.066666-10.24l-102.4-307.2c-3.413333-10.24 3.413333-17.066667 10.24-20.48 10.24-3.413333 17.066667 3.413333 20.48 10.24l85.333333 252.586667 71.68-252.586667c3.413333-13.653333 27.306667-13.653333 34.133333 0l71.68 252.586667 85.333334-252.586667c3.413333-10.24 13.653333-13.653333 20.48-10.24 10.24 3.413333 13.653333 13.653333 10.24 20.48l-102.4 307.2c-3.413333 6.826667-10.24 10.24-17.066667 10.24z" p-id="1843"></path><path d="M904.533333 256h-341.333333c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066666h341.333333c10.24 0 17.066667 6.826667 17.066667 17.066666s-6.826667 17.066667-17.066667 17.066667zM904.533333 392.533333h-334.506666c-10.24 0-17.066667-6.826667-17.066667-17.066666s6.826667-17.066667 17.066667-17.066667h334.506666c10.24 0 17.066667 6.826667 17.066667 17.066667s-6.826667 17.066667-17.066667 17.066666zM904.533333 529.066667h-341.333333c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066667h341.333333c10.24 0 17.066667 6.826667 17.066667 17.066667s-6.826667 17.066667-17.066667 17.066667zM904.533333 665.6h-341.333333c-10.24 0-17.066667-6.826667-17.066667-17.066667s6.826667-17.066667 17.066667-17.066666h341.333333c10.24 0 17.066667 6.826667 17.066667 17.066666s-6.826667 17.066667-17.066667 17.066667zM904.533333 802.133333H580.266667c-10.24 0-17.066667-6.826667-17.066667-17.066666s6.826667-17.066667 17.066667-17.066667h324.266666c10.24 0 17.066667 6.826667 17.066667 17.066667s-6.826667 17.066667-17.066667 17.066666z" p-id="1844"></path></svg>
\ No newline at end of file
<!-- -->
<template>
<div class="exhibiton-unit" ref="exhibitionUnit">
<el-tree
:data="treeData"
node-key="euId"
default-expand-all
:expand-on-click-node="false"
v-if="treeData.length > 0"
>
<div class="exhibition-units-tree-node" slot-scope="{ node, data }">
<el-row :gutter="20">
<!-- <el-col :span="10" class="mg-bt20">
<el-input
placeholder="请输入层级(如:第一单元)"
v-model="data.unit"
>
</el-input>
<span style="display: inline-block; padding: 0 4px"></span>
</el-col> -->
<el-col :span="20" class="mg-bt20">
<el-input placeholder="请输入标题" v-model="data.title"> </el-input>
</el-col>
<el-col :span="4">
<el-row class="tree-container" v-if="treeData.length > 0">
<el-col :span="8">
<el-tree :data="treeData" node-key="euId" default-expand-all>
<div class="exhibition-units-tree-node" slot-scope="{ node, data }">
<div style="display: flex; align-items: center">
<el-tooltip content="删除当前节点" placement="top">
<div class="title" @click="handleClickNode(node, data)">
<el-input
placeholder="请输入标题"
v-model="data.title"
v-if="data.isEditing"
:ref="data.euId + 'Title'"
@blur="() => handleInputBlur(node, data)"
>
</el-input>
<span v-else>{{ data.title }}</span>
</div>
<el-tooltip content="编辑标题" placement="top">
<i
class="el-icon-close delete"
@click="() => remove(node, data)"
v-if="!data.isEditing"
class="el-icon-edit plus-peer"
@click="() => editNode(node, data)"
></i>
</el-tooltip>
<el-tooltip content="添加子节点" placement="top">
......@@ -44,11 +38,26 @@
@click="() => appendPeerNode(node, data)"
></i>
</el-tooltip>
<el-tooltip content="删除当前节点" placement="top">
<i
class="el-icon-close delete"
@click="() => remove(node, data)"
></i>
</el-tooltip>
</div>
</div>
</el-tree>
</el-col>
<el-col class="node-detail" :span="16">
<el-row :gutter="20">
<el-col :span="24" class="mg-bt20">
<el-input placeholder="请输入标题" v-model="currentData.title">
</el-input>
</el-col>
<el-col :span="20" class="mg-bt20">
<el-col :span="24" class="mg-bt20">
<el-select
v-model="data.crIds"
v-model="currentData.crIds"
multiple
filterable
remote
......@@ -68,76 +77,70 @@
</el-select>
</el-col>
<el-col :span="20">
<el-input
<el-col :span="24">
<!-- <el-input
placeholder="请输入介绍"
v-model="data.intro"
v-model="currentData.intro"
type="textarea"
rows="4"
maxlength="800"
show-word-limit
>
</el-input>
</el-input> -->
<quill-editor
ref="myQuillEditor"
v-model="currentData.intro"
:options="editorOption"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@ready="onEditorReady($event)"
class=".editor"
/>
</el-col>
</el-row>
<el-row :gutter="10">
<!-- <el-col :span="24" style="display: flex; flex-direction: column">
<div class="buttons">
<el-button
type="text"
@click.native="handleAddUnitMedia(node, data)"
>
<div class="add-image">
<svg-icon
:icon-class="data.showMediaUploader ? 'fold' : 'image'"
/>
<span>{{
data.showMediaUploader ? "收起" : "添加/显示"
}}</span>
<span>单元媒体资源</span>
</div>
</el-button>
</div>
</el-col> -->
<!-- <el-col :span="12">123</el-col> -->
</el-row>
<el-collapse-transition>
<el-row :gutter="50">
<el-col :span="12">
<div>单元图片</div>
<el-col :span="24">
<div>单元封面</div>
<ManualImageUploader
v-model="data.imagesVo"
:files="data.imagesVo"
:fileLimit="6"
v-model="currentData.imagesVo"
:files="currentData.imagesVo"
:fileLimit="1"
:fileSize="50"
:fileType="['jpeg', 'jpg', 'png']"
listType="picture-card"
:ref="'unit-images-' + data.euId"
/>
</el-col>
<el-col :span="12">
<div>单元视频:</div>
<ManualVideoUploader
v-model="data.videosVo"
:files="data.videosVo"
:fileLimit="6"
:fileSize="50"
:fileType="['mp4']"
listType="picture-card"
:ref="'unit-videos-' + data.euId"
:ref="'unit-images-' + currentData.euId"
/>
</el-col>
</el-row>
</el-collapse-transition>
</div>
</el-tree>
</el-col>
</el-row>
<el-button
v-else
v-if="!treeData.length > 0"
type="primary"
icon="el-icon-circle-plus-outline"
@click="handleAddUnit"
>添加展览单元</el-button
size="small"
>手动添加展览单元</el-button
>
<el-button
v-if="!treeData.length > 0"
type="success"
@click="handleAddUnit"
size="small"
>
<svg-icon icon-class="word"></svg-icon>
Word批量导入
</el-button>
<el-button
v-if="!treeData.length > 0"
type="success"
@click="handleAddUnit"
size="small"
>
<svg-icon icon-class="excel"></svg-icon>
Excel批量导入</el-button
>
</div>
</template>
......@@ -145,12 +148,18 @@
<script>
let euId = 1000;
import ManualImageUploader from "@/components/Uploader/ManualUploader.vue";
import ManualVideoUploader from "@/components/Uploader/ManualUploader.vue";
import { getCulturalRelicList } from "@/api/culturalRelic";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import { quillEditor } from "vue-quill-editor";
export default {
components: {
ManualImageUploader,
ManualVideoUploader,
quillEditor,
},
props: {
exhibitionUnits: {
......@@ -163,8 +172,11 @@ export default {
handler: function (value) {
if (value) {
let that = this;
// debugger
that.treeData = JSON.parse(JSON.stringify(value));
// console.log('currentData',this.treeData);
if (value.length > 0) {
that.currentData = that.treeData[0];
loopData(that.treeData);
function loopData(arr) {
if (arr.length > 0) {
......@@ -195,15 +207,46 @@ export default {
},
},
data() {
// 工具栏配置
const toolbarOptions = [
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 -----['bold', 'italic', 'underline', 'strike']
["blockquote", "code-block"], // 引用 代码块-----['blockquote', 'code-block']
[{ header: 1 }, { header: 2 }], // 1、2 级标题-----[{ header: 1 }, { header: 2 }]
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表-----[{ list: 'ordered' }, { list: 'bullet' }]
[{ script: "sub" }, { script: "super" }], // 上标/下标-----[{ script: 'sub' }, { script: 'super' }]
[{ indent: "-1" }, { indent: "+1" }], // 缩进-----[{ indent: '-1' }, { indent: '+1' }]
[{ direction: "rtl" }], // 文本方向-----[{'direction': 'rtl'}]
[{ size: ["small", false, "large", "huge"] }], // 字体大小-----[{ size: ['small', false, 'large', 'huge'] }]
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题-----[{ header: [1, 2, 3, 4, 5, 6, false] }]
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色-----[{ color: [] }, { background: [] }]
[{ font: [] }], // 字体种类-----[{ font: [] }]
[{ align: [] }], // 对齐方式-----[{ align: [] }]
["clean"], // 清除文本格式-----['clean']
["image", "video"], // 链接、图片、视频-----['link', 'image', 'video']
];
return {
treeData: [],
CRList: [], //文物列表,关联文物使用
loading: false,
imagesVo: [],
videosVo: [],
currentData: {}, //当前点击的树节点
// 富文本编辑器默认内容
content: "",
//富文本编辑器配置
editorOption: {
// 富文本编辑器配置
modules: {
//工具栏定义的
toolbar: toolbarOptions,
},
//主题
theme: "snow",
placeholder: "请输入单元介绍",
},
};
},
mounted() {},
methods: {
getUnitData() {
return this.treeData;
......@@ -231,21 +274,36 @@ export default {
}
}, 500);
},
handleInputBlur(node, data) {
this.$set(data, "isEditing", false);
},
handleClickNode(node, data) {
this.currentData = data;
},
editNode(node, data) {
this.$set(data, "isEditing", true);
setTimeout(() => {
let ref = data.euId + "Title";
this.$refs[ref].focus();
console.log(this.$refs[`1Title`]);
}, 100);
// this.$refs[data.euId+'Title'].focus();
},
appendChild(data) {
const newChild = {
euId: euId++,
// unit: "",
title: "",
// intro: "",
title: "单元标题",
intro: "",
showMediaUploader: false,
// showImageUploader: false,
// showVideoUploader: false,
images: "",
crIds: [],
// imagesVo: [],
videos: "",
// videosVo: [],
children: [],
// unit: "",
// imagesVo: [],
// videosVo: [],
};
if (!data.children) {
this.$set(data, "children", []);
......@@ -258,16 +316,12 @@ export default {
const newChild = {
euId: euId++,
unit: "",
title: "",
title: "单元标题",
intro: "",
crIds: [],
showMediaUploader: false,
// showImageUploader: false,
// showVideoUploader: false,
images: "",
// imagesVo: [],
videos: "",
// videosVo: [],
children: [],
};
parent.push(newChild);
......@@ -284,15 +338,11 @@ export default {
children.splice(index, 1);
},
handleAddUnitMedia(node, data) {
this.$set(data, "showMediaUploader", !data.showMediaUploader);
},
handleAddUnit() {
let obj = {
euId: 1, //后期去掉
unit: "", //单元名称,如前言、第一单元,暂时忽略
title: "", //单元标题,类似主题名称
title: "单元标题", //单元标题,类似主题名称
intro: "", //单元介绍
images: "", //图片id集合
videos: "", //视频id集合
......@@ -300,6 +350,25 @@ export default {
// showMediaUploader: false,
};
this.$set(this.treeData, 0, obj);
this.currentData = this.treeData[0];
},
//失去焦点事件
onEditorBlur(quill) {
console.log("editor blur!", quill);
},
//获得焦点事件
onEditorFocus(quill) {
console.log("editor focus!", quill);
},
// 准备富文本编辑器
onEditorReady(quill) {
console.log("editor ready!", quill);
},
//内容改变事件
onEditorChange({ quill, html, text }) {
console.log("editor change!", quill, html, text);
this.content = html;
},
},
};
......@@ -310,20 +379,33 @@ export default {
display: flex;
width: 100%;
flex-direction: column;
border: 1px #ccc dashed;
padding: 40px;
.title {
width: 100px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
::v-deep .el-tree-node__content {
// padding: 10px;
// min-height: 140px;
height: auto;
padding: 10px;
padding: 10px 46px;
display: flex;
align-items: flex-start;
}
.tree-container {
border: 1px #ccc dashed;
}
.node-detail {
background: #f4f9ff;
padding: 16px;
}
.plus-child {
font-size: 20px;
font-weight: bold;
// font-weight: bold;
color: #409eff;
transition: all ease 0.5s;
padding: 4px;
......@@ -336,7 +418,7 @@ export default {
}
.plus-peer {
font-size: 20px !important;
font-weight: bold;
// font-weight: bold;
color: #409eff;
transition: all ease 0.5s;
padding: 4px;
......@@ -349,7 +431,7 @@ export default {
}
.delete {
font-size: 20px;
font-weight: bold;
// font-weight: bold;
color: #f56c6c;
transition: all ease 0.5s;
padding: 4px;
......@@ -382,3 +464,85 @@ export default {
}
}
</style>
<style lang='scss' >
// 富文本编辑器汉化
.editor {
line-height: normal !important;
height: 500px;
}
.ql-snow .ql-tooltip[data-mode="link"]::before {
content: "请输入链接地址:";
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px;
content: "保存";
padding-right: 0px;
}
.ql-snow .ql-tooltip[data-mode="video"]::before {
content: "请输入视频地址:";
}
.ql-snow .ql-picker{
height: 40px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: "14px";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
content: "10px";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
content: "18px";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
content: "32px";
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: "文本";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: "标题1";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: "标题2";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: "标题3";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: "标题4";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: "标题5";
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: "标题6";
}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: "标准字体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
content: "衬线字体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
content: "等宽字体";
}
</style>
......@@ -37,7 +37,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="展览性质" :label-width="formLabelWidth">
<el-form-item label="展览性质" :label-width="formLabelWidth" style="display:none">
<el-select
v-model="dialogForm.displayCharacter"
placeholder="请选择展览性质"
......@@ -102,8 +102,8 @@
:files="videos"
:fileLimit="6"
:fileSize="50"
:fileType="['mp4', 'wav']"
listType="picture"
:fileType="['mp4']"
listType="card"
ref="videos"
/>
</el-form-item>
......@@ -181,7 +181,7 @@
:fileLimit="1"
:fileSize="50"
:fileType="['mp3']"
listType="picture"
listType="card"
@handleFileReady="handleAudiosReady"
ref="audios"
/>
......@@ -201,7 +201,7 @@
<div class="dialog-footer">
<el-button @click="cancelForm">取 消</el-button>
<el-button type="primary" @click="handleSubmit" :disabled="loading"
>确定<i class="el-icon-right" style="margin-left: 5px"></i
>发布<i class="el-icon-right" style="margin-left: 5px"></i
></el-button>
</div>
</el-dialog>
......@@ -243,7 +243,7 @@ export default {
if (this.dialogForm.exhibitionId) {
return "修改信息";
} else {
return "新增发布";
return "发布展览";
}
},
themeTypeOptions() {
......@@ -416,6 +416,9 @@ export default {
},
// 取消编辑
cancelForm() {
if (this.loading) {
this.loading = false;
}
this.reload();
},
......@@ -597,7 +600,7 @@ export default {
if (!that.dialogForm.exhibitionId) {
let crIdArr = unit.crIds;
unit.crIds = crIdArr.join(",");
var deleteArr = ["euId", "showMediaUploader"];
var deleteArr = ["euId", "isEditing"];
deleteArr.forEach((i) => {
if (unit[i]) {
delete unit[i];
......@@ -607,8 +610,8 @@ export default {
// 编辑时
// console.log("修改时---unit.crIds ", unit.crIds);
let crIdArr = unit.crIds;
unit.crIds = crIdArr.join(",");
var deleteArr = ["euId", "showMediaUploader"];
unit.crIds = crIdArr ? crIdArr.join(",") : "";
var deleteArr = ["euId", "isEditing"];
deleteArr.forEach((i) => {
if (unit[i]) {
delete unit[i];
......@@ -635,7 +638,7 @@ export default {
params.crIds = this.crIds.join(",");
params.displayCharacter = 1; //传布展
let res = await addDisplay(params);
if (res.code == 0) {
this.$message.success("提交成功!");
this.loading = false;
......@@ -686,7 +689,7 @@ export default {
displayCharacter,
exhibitionUnits: unitData,
};
console.log("修改参数-----------", params);
// return;
let res = await editDisplay(params);
let deleteRes = await deleteFiles(deleteFileArr);
......
......@@ -159,7 +159,7 @@ export default {
deptId: "", //展览单位id--暂填入用户自己的单位
regionCode: "", // 所在地域--暂填入用户自己的地区
intro: "", //展览介绍,
themeType: "", //模板主题--前端枚举
themeType: "1", //模板主题--前端枚举
literature: "", //关联文献。id1,id2,id3--接口查询
remark: "", //备注
status: false, //上下架状态(0-下架,1-上架)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论