内容样式

This commit is contained in:
2024-03-19 10:31:08 +08:00
parent 34ce2c25ae
commit f148efa6e5
3 changed files with 608 additions and 460 deletions

View File

@@ -1,5 +1,5 @@
<script type="text/javascript"> <script type="text/javascript">
// const baseUrl = "http://192.168.110.100:9200/pb"//张川川后端 // const baseUrl = "http://192.168.110.100:9200/pb"; //张川川后端
// const baseUrl = 'http://59.110.212.44:9100/pb' // const baseUrl = 'http://59.110.212.44:9100/pb'
const baseUrl = 'https://testapi.nuttyreading.com' const baseUrl = 'https://testapi.nuttyreading.com'
// function commonFun() { // function commonFun() {

View File

@@ -1,9 +1,22 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item label="内容归类"> <el-form-item label="内容归类">
<el-select v-model="dataForm.dictType" placeholder="请选择内容归类" clearable> <el-select
<el-option v-for="(item,index) in typeList" :key="index" :label="item.dictValue" :value="item.dictType"> v-model="dataForm.dictType"
placeholder="请选择内容归类"
clearable
>
<el-option
v-for="(item, index) in typeList"
:key="index"
:label="item.dictValue"
:value="item.dictType"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -11,12 +24,33 @@
<el-input v-model="dataForm.title" placeholder="请输入标题"></el-input> <el-input v-model="dataForm.title" placeholder="请输入标题"></el-input>
</el-form-item> --> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button @click="pageIndex = 1;getDataList()">查询</el-button> <el-button
<el-button v-if="isAuth('book:shopproduct:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button> @click="
pageIndex = 1;
getDataList();
"
>查询</el-button
>
<el-button
v-if="isAuth('book:shopproduct:save')"
type="primary"
@click="addOrUpdateHandle()"
>新增</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;"> <el-table
<el-table-column prop="title" header-align="center" align="center" label="标题"> :data="dataList"
border
v-loading="dataListLoading"
style="width: 100%"
>
<el-table-column
prop="title"
header-align="center"
align="center"
label="标题"
>
</el-table-column> </el-table-column>
<el-table-column label="内容归类" align="center" prop="type"> <el-table-column label="内容归类" align="center" prop="type">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -40,63 +74,142 @@
{{ scope.row.sort }} {{ scope.row.sort }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" header-align="center" align="center" width="100" label="操作"> <el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="editOrUpdateHandle(scope.row)">修改</el-button> <el-button
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> type="text"
size="small"
@click="editOrUpdateHandle(scope.row)"
>修改</el-button
>
<el-button
type="text"
size="small"
@click="deleteHandle(scope.row.id)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex" <el-pagination
:page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage" @size-change="sizeChangeHandle"
layout="total, sizes, prev, pager, next, jumper"> @current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<el-dialog :visible.sync="addOrUpdateVisible" :close-on-click-modal="false" :append-to-body="true" :title="titlesub" <el-dialog
width="50%" @close="cancleClose"> :visible.sync="addOrUpdateVisible"
<el-form :inline="true" :model="addForm" ref="addFormRef" :rules="addFormRule"> :close-on-click-modal="false"
<el-row type="flex" justify="center"> :append-to-body="true"
<el-form-item label="标题" prop="title" label-width="80px"> :title="titlesub"
<el-input style="width:500px" v-model="addForm.title"></el-input> width="1200px"
class="dialog_box"
@close="cancleClose"
>
<el-form
:inline="true"
:model="addForm"
ref="addFormRef"
:rules="addFormRule"
label-width="90px"
>
<!-- <el-row type="flex" justify="center"> -->
<div class="form_item">
<el-form-item label="标题" prop="title">
<el-input v-model="addForm.title"></el-input>
</el-form-item> </el-form-item>
</el-row> <el-form-item label="内容归类" prop="type">
<el-row type="flex" justify="center"> <el-select v-model="addForm.type" placeholder="请选择内容归类">
<el-form-item label="内容归类" prop="type" label-width="80px"> <el-option
<el-select v-model="addForm.type" placeholder="请选择内容归类" style="width: 500px;"> v-for="(item, index) in typeList"
<el-option v-for="(item,index) in typeList" :key="index" :label="item.dictValue" :value="item.dictType"> :key="index"
:label="item.dictValue"
:value="item.dictType"
>
</el-option> </el-option>
</el-select> </el-select> </el-form-item
</el-form-item> ><el-form-item label="内容形式" prop="contentType">
</el-row> <el-select v-model="addForm.contentType" placeholder="请选择形式">
<el-row type="flex" justify="center"> <el-option
<el-form-item label="内容形式" prop="contentType" label-width="80px"> v-for="(item, index) in contentTypeList"
<el-select v-model="addForm.contentType" placeholder="请选择形式" style="width: 500px;"> :key="index"
<el-option v-for="(item,index) in contentTypeList" :key="index" :label="item.dictValue" :value="item.dictType"> :label="item.dictValue"
:value="item.dictType"
>
</el-option> </el-option>
</el-select> </el-select> </el-form-item
><el-form-item label="排序">
<el-input v-model="addForm.sort"></el-input>
</el-form-item> </el-form-item>
</div>
<!-- </el-row> -->
<!-- <el-row type="flex" justify="center">
</el-row> </el-row>
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-form-item label="排序" label-width="80px">
<el-input style="width:500px" v-model="addForm.sort"></el-input>
</el-form-item>
</el-row> </el-row>
<el-row type="flex" justify="center" v-if="addForm.contentType == 2"> <el-row type="flex" justify="center">
<el-form-item label="url" prop="url" label-width="80px">
<el-input style="width:500px" v-model="addForm.url"></el-input> </el-row> -->
<!-- <el-row type="flex" justify="center" > -->
<el-form-item
label="url"
prop="url"
v-if="addForm.contentType == 2"
style="width: 100%"
>
<el-input
v-model="addForm.url"
style="width: calc(100% - 10px)"
></el-input>
</el-form-item> </el-form-item>
</el-row> <!-- </el-row> -->
<el-row type="flex" justify="center" v-if="addForm.contentType == 1"> <!-- <el-row
<el-form-item label="内容" prop="content" label-width="80px" class="custom-height"> type="flex"
justify="center"
> -->
<el-form-item
label="内容"
v-if="addForm.contentType == 1"
class="editor_form custom-height"
prop="content"
style="margin-right: 0"
>
<!-- <el-input style="width:500px" v-model="addForm.content" :rows="5" type="textarea"></el-input> --> <!-- <el-input style="width:500px" v-model="addForm.content" :rows="5" type="textarea"></el-input> -->
<el-upload class="avatar-uploader" :action="baseUrl + '/oss/fileoss'" accept=".jpeg,.jpg,.gif,.png" :show-file-list="false" :on-success="contentUploadSuccess" > <el-upload
class="avatar-uploader"
:action="baseUrl + '/oss/fileoss'"
accept=".jpeg,.jpg,.gif,.png"
:show-file-list="false"
:on-success="contentUploadSuccess"
>
</el-upload> </el-upload>
<quill-editor v-model="addForm.content" ref="myQuillEditor" :options="editorOption" <quill-editor
@blur="onEditorBlur($event)" @focus="onEditorFocus($event)" v-model="addForm.content"
@ready="onEditorReady($event)" class="general_editor"> ref="myQuillEditor"
:options="editorOption"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@ready="onEditorReady($event)"
class="general_editor"
>
</quill-editor> </quill-editor>
</el-form-item> </el-form-item>
</el-row> <!-- </el-row> -->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="cancleClose"> </el-button> <el-button @click="cancleClose"> </el-button>
@@ -108,30 +221,39 @@
</div> </div>
</template> </template>
<script> <script>
import { import { quillEditor } from "vue-quill-editor";
quillEditor import global from "../../common/common.vue"; //引入共用组间
} from 'vue-quill-editor'
import global from '../../common/common.vue' //引入共用组间
import 'quill/dist/quill.core.css' import "quill/dist/quill.core.css";
import 'quill/dist/quill.snow.css' import "quill/dist/quill.snow.css";
import 'quill/dist/quill.bubble.css' import "quill/dist/quill.bubble.css";
const toolbarOptions = [ const toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线 ["bold", "italic", "underline", "strike"], // 加粗,斜体,下划线,删除线
['blockquote', 'code-block'], //引用,代码块 ["blockquote", "code-block"], //引用,代码块
[{ 'header': 1 }, { 'header': 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': ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial'] }],// 字体 [
[{ 'align': [] }], // 居中 {
['clean'], // 清除样式, font: [
['link', 'image'], // 上传图片、上传视频 "SimSun",
] "SimHei",
"Microsoft-YaHei",
"KaiTi",
"FangSong",
"Arial",
],
},
], // 字体
[{ align: [] }], // 居中
["clean"], // 清除样式,
["link", "image"], // 上传图片、上传视频
];
// import global from '../../common/common.vue' //引入共用组间 // import global from '../../common/common.vue' //引入共用组间
export default { export default {
data() { data() {
@@ -139,49 +261,61 @@
baseUrl: global.baseUrl, baseUrl: global.baseUrl,
// cityEntity: [], // cityEntity: [],
// provinceEntity: [], //省地址 // provinceEntity: [], //省地址
typeList: [{ typeList: [
dictType: '1', {
dictValue: '学术思想' dictType: "1",
},{ dictValue: "学术思想",
dictType: '2', },
dictValue: '学术平台' {
}], dictType: "2",
contentTypeList: [{ dictValue: "学术平台",
dictType: '1', },
dictValue: '文章' ],
},{ contentTypeList: [
dictType: '2', {
dictValue: '外链' dictType: "1",
}], dictValue: "文章",
},
{
dictType: "2",
dictValue: "外链",
},
],
// booknameList: [], // booknameList: [],
dataForm: { dataForm: {
dictType: '', //分类 dictType: "", //分类
// bookName: '', //书名 // bookName: '', //书名
}, },
// fileList: [], // fileList: [],
addForm: { addForm: {
id: '', //新增不传 id: "", //新增不传
title: '', //姓名 title: "", //姓名
type: '', //分类 type: "", //分类
contentType: '', //分类 contentType: "", //分类
url: '', url: "",
content: '', content: "",
sort: 0 sort: 0,
}, },
editId: '', editId: "",
addFormRule: { addFormRule: {
type: [{ type: [
{
required: true, required: true,
message: "请选择内容归类" message: "请选择内容归类",
}], },
contentType: [{ ],
contentType: [
{
required: true, required: true,
message: "请选择内容形式" message: "请选择内容形式",
}], },
title: [{ ],
title: [
{
required: true, required: true,
message: "请输入标题" message: "请输入标题",
}] },
],
}, },
dataList: [], dataList: [],
// publishStatus: false, // publishStatus: false,
@@ -192,7 +326,7 @@
dataListSelections: [], dataListSelections: [],
addOrUpdateVisible: false, addOrUpdateVisible: false,
// bookIds: [], // bookIds: [],
titlesub: '新增', titlesub: "新增",
// dialogVisible: false // dialogVisible: false
// 富文本编辑器配置 // 富文本编辑器配置
editorOption: { editorOption: {
@@ -200,7 +334,7 @@
history: { history: {
delay: 1000, delay: 1000,
maxStack: 50, maxStack: 50,
userOnly: false userOnly: false,
}, },
toolbar: { toolbar: {
container: toolbarOptions, container: toolbarOptions,
@@ -208,21 +342,20 @@
image: function (value) { image: function (value) {
if (value) { if (value) {
// 调用element的图片上传组件 // 调用element的图片上传组件
document.querySelector('.avatar-uploader input').click() document.querySelector(".avatar-uploader input").click();
} else { } else {
this.quill.format('image', false) this.quill.format("image", false);
}
}
} }
}, },
}, },
placeholder: '请输入正文',
}, },
} },
placeholder: "请输入正文",
},
};
}, },
components: { components: {
quillEditor quillEditor,
// AddOrUpdate, // AddOrUpdate,
// chooseBook // chooseBook
}, },
@@ -231,7 +364,7 @@
// this.getprovinceEntity() // this.getprovinceEntity()
}, },
activated() { activated() {
this.getDataList() this.getDataList();
// this.gettypeList() // this.gettypeList()
// this.getprovinceEntity() // this.getprovinceEntity()
}, },
@@ -253,20 +386,19 @@
// }, // },
contentUploadSuccess(res, file) { contentUploadSuccess(res, file) {
// console.log(res) // console.log(res)
let quill = this.$refs.myQuillEditor.quill let quill = this.$refs.myQuillEditor.quill;
// 如果上传成功 // 如果上传成功
if (res) { if (res) {
// 获取光标所在位置 // 获取光标所在位置
let length = quill.getSelection().index; let length = quill.getSelection().index;
// 插入图片res为服务器返回的图片链接地址 // 插入图片res为服务器返回的图片链接地址
quill.insertEmbed(length, 'image', res.url) quill.insertEmbed(length, "image", res.url);
// 调整光标到最后 // 调整光标到最后
quill.setSelection(length + 1) quill.setSelection(length + 1);
} else { } else {
// 提示信息需引入Message // 提示信息需引入Message
this.$message.error('图片插入失败!') this.$message.error("图片插入失败!");
} }
}, },
// 失去焦点事件 // 失去焦点事件
onEditorBlur(quill) { onEditorBlur(quill) {
@@ -282,21 +414,19 @@
}, },
// 获取数据列表 // 获取数据列表
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true;
this.$http({ this.$http({
url: this.$http.adornUrl('/book/generalArticle/articleByPage'), url: this.$http.adornUrl("/book/generalArticle/articleByPage"),
method: 'post', method: "post",
data: this.$http.adornData({ data: this.$http.adornData({
"type": this.dataForm.dictType||'', type: this.dataForm.dictType || "",
// "name": this.dataForm.bookName, // "name": this.dataForm.bookName,
"current": this.pageIndex, current: this.pageIndex,
"limit": this.pageSize limit: this.pageSize,
}) }),
}).then(({ }).then(({ data }) => {
data
}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.result.records this.dataList = data.result.records;
// for (let i = 0; i < this.dataList.length; i++) { // for (let i = 0; i < this.dataList.length; i++) {
// let imgList = [] // let imgList = []
// if (this.dataList[i].img != '') { // if (this.dataList[i].img != '') {
@@ -311,13 +441,13 @@
// this.dataList[i].imgList = imgList // this.dataList[i].imgList = imgList
// } // }
this.totalPage = data.result.total this.totalPage = data.result.total;
} else { } else {
this.dataList = [] this.dataList = [];
this.totalPage = 0 this.totalPage = 0;
} }
this.dataListLoading = false this.dataListLoading = false;
}) });
}, },
// provinceChange() { // provinceChange() {
// this.addForm.cityId = '' // this.addForm.cityId = ''
@@ -338,14 +468,14 @@
// }, // },
// 每页数 // 每页数
sizeChangeHandle(val) { sizeChangeHandle(val) {
this.pageSize = val this.pageSize = val;
this.pageIndex = 1 this.pageIndex = 1;
this.getDataList() this.getDataList();
}, },
// 当前页 // 当前页
currentChangeHandle(val) { currentChangeHandle(val) {
this.pageIndex = val this.pageIndex = val;
this.getDataList() this.getDataList();
}, },
// 多选 // 多选
// selectionChangeHandle(val) { // selectionChangeHandle(val) {
@@ -353,15 +483,15 @@
// }, // },
// 新增 / 修改 // 新增 / 修改
editOrUpdateHandle(row) { editOrUpdateHandle(row) {
console.log('rowzz', row.img); console.log("rowzz", row.img);
this.titlesub = '修改' this.titlesub = "修改";
this.editId = row.id this.editId = row.id;
this.addForm.title = row.title this.addForm.title = row.title;
this.addForm.url = row.url this.addForm.url = row.url;
this.addForm.content = row.content this.addForm.content = row.content;
this.addForm.contentType = row.contentType+'' this.addForm.contentType = row.contentType + "";
this.addForm.type = row.type.toString() this.addForm.type = row.type.toString();
this.addForm.sort = row.sort this.addForm.sort = row.sort;
// this.fileList = row.imgList // this.fileList = row.imgList
// for (var i = 0; i < this.provinceEntity.length; i++) { // for (var i = 0; i < this.provinceEntity.length; i++) {
// for (var j = 0; j < this.provinceEntity[i].cityList.length; j++) { // for (var j = 0; j < this.provinceEntity[i].cityList.length; j++) {
@@ -374,25 +504,25 @@
// console.log('this.addForm.provId', this.addForm.provId); // console.log('this.addForm.provId', this.addForm.provId);
// this.addForm.cityId = row.cityId // this.addForm.cityId = row.cityId
this.addOrUpdateVisible = true this.addOrUpdateVisible = true;
}, },
addOrUpdateHandle() { addOrUpdateHandle() {
this.editId = '' this.editId = "";
this.titlesub = '新增' this.titlesub = "新增";
this.addOrUpdateVisible = true this.addOrUpdateVisible = true;
}, },
cancleClose() { cancleClose() {
this.addOrUpdateVisible = false this.addOrUpdateVisible = false;
this.$refs["addFormRef"].resetFields(); this.$refs["addFormRef"].resetFields();
this.addForm = { this.addForm = {
id: '', //新增不传 id: "", //新增不传
title: '', //姓名 title: "", //姓名
url: '', //分类 url: "", //分类
content: '', content: "",
contentType: '', contentType: "",
type: '', type: "",
sort: 0 sort: 0,
} };
// this.fileList = [] // this.fileList = []
}, },
// getprovinceEntity() { // getprovinceEntity() {
@@ -413,34 +543,32 @@
// }, // },
// 删除 // 删除
deleteHandle(id) { deleteHandle(id) {
this.$confirm('请确认是否删除?', '提示', { this.$confirm("请确认是否删除?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl(`/book/generalArticle/delArticle?id=${id}`), url: this.$http.adornUrl(`/book/generalArticle/delArticle?id=${id}`),
method: 'post', method: "post",
}).then(({ }).then(({ data }) => {
data
}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: '操作成功', message: "操作成功",
type: 'success', type: "success",
duration: 1000, duration: 1000,
onClose: () => { onClose: () => {
this.getDataList() this.getDataList();
} },
}) });
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg);
} }
}) });
}) });
}, },
addOreEditCate() { addOreEditCate() {
this.$refs["addFormRef"].validate(valid => { this.$refs["addFormRef"].validate((valid) => {
if (valid) { if (valid) {
// var imageslist = [] // var imageslist = []
// var arr = [] // var arr = []
@@ -452,33 +580,32 @@
// imageslist = arr.join(";"); // imageslist = arr.join(";");
this.$http({ this.$http({
url: this.$http.adornUrl('/book/generalArticle/saveOrUpdateArticle'), url: this.$http.adornUrl(
method: 'post', "/book/generalArticle/saveOrUpdateArticle"
),
method: "post",
data: this.$http.adornData({ data: this.$http.adornData({
"id": this.editId, //新增不传 id: this.editId, //新增不传
"title": this.addForm.title, title: this.addForm.title,
"url": this.addForm.url, url: this.addForm.url,
// "img": imageslist, // "img": imageslist,
"content": this.addForm.content, content: this.addForm.content,
"contentType": this.addForm.contentType, contentType: this.addForm.contentType,
"type": this.addForm.type, type: this.addForm.type,
// "cityId": this.addForm.cityId, // "cityId": this.addForm.cityId,
"sort": this.addForm.sort sort: this.addForm.sort,
}) }),
}).then(({ }).then(({ data }) => {
data
}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success("成功"); this.$message.success("成功");
this.addOrUpdateVisible = false this.addOrUpdateVisible = false;
this.getDataList() this.getDataList();
} else { } else {
this.$message.error("失败"); this.$message.error("失败");
} }
}) });
} }
}) });
}, },
// handlePicSuccess(res, file) { // handlePicSuccess(res, file) {
@@ -500,13 +627,13 @@
// // this.addForm.noneBtnImg = fileList.length >= this.addForm.limitCountImg; // // this.addForm.noneBtnImg = fileList.length >= this.addForm.limitCountImg;
// }, // },
filterAA(val) { filterAA(val) {
var aa = this.typeList.filter(obj => obj.dictType == val) var aa = this.typeList.filter((obj) => obj.dictType == val);
return aa[0].dictValue return aa[0].dictValue;
// return aa // return aa
}, },
filterBB(val) { filterBB(val) {
var aa = this.contentTypeList.filter(obj => obj.dictType == val) var aa = this.contentTypeList.filter((obj) => obj.dictType == val);
return aa[0].dictValue return aa[0].dictValue;
// return aa // return aa
}, },
// translateaddr(code) { // translateaddr(code) {
@@ -518,19 +645,37 @@
// } // }
// } // }
// } // }
} },
} };
</script> </script>
<style lang="less" > <style lang="less" >
.custom-height{ ::v-deep.custom-height {
height: 370px; height: 370px;
} }
.avatar-uploader { .avatar-uploader {
height: 1px; height: 1px;
} }
.general_editor { .general_editor {
height: 250px; height: 420px;
width:500px width: 1060px !important;
}
.editor_form {
height: 500px;
}
.dialog_box {
.el-form-item__content {
width: calc(100% - 90px) !important;
}
.form_item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.el-form-item {
width: 290px;
}
}
} }
</style> </style>

View File

@@ -415,7 +415,6 @@ export default {
that.fileList[that.fileList.length - 1].ststus = "error"; that.fileList[that.fileList.length - 1].ststus = "error";
onError(); onError();
} }
}); });
// var prom = new Promise((resolve, reject) => {}); // var prom = new Promise((resolve, reject) => {});
// prom.abort = () => {}; // prom.abort = () => {};
@@ -580,6 +579,10 @@ export default {
addOreEditCate() { addOreEditCate() {
this.$refs["addFormRef"].validate((valid) => { this.$refs["addFormRef"].validate((valid) => {
if (valid) { if (valid) {
if (this.isUpload) {
this.$message.error("文件正在上传中,请稍后...");
return false;
}
this.$http({ this.$http({
url: this.$http.adornUrl("/book/medicaldes/saveOrUpdateLight"), url: this.$http.adornUrl("/book/medicaldes/saveOrUpdateLight"),
method: "post", method: "post",