提交 1c06d651 authored 作者: 龙菲's avatar 龙菲

优化文物导入提示、优化预览模板

上级 aa21a8cf
......@@ -93,7 +93,6 @@ export default {
},
getFileSize(fileSize) {
return (fileSize) => {
console.log(fileSize);
return (Number(fileSize) / 1024 / 1024).toFixed(2) + "M";
};
},
......
......@@ -553,7 +553,7 @@ export default {
params.textureType[params.textureType.length - 1].trim();
}
// 处理行政区划
// 处理馆藏单位
if (params.deptId instanceof Array) {
params.deptId = params.deptId[params.deptId.length - 1];
}
......
<template>
<el-dialog
:visible="dialogVisible"
width="50%"
width="60%"
style="height: 98%"
:before-close="handleClose"
top="5vh"
......@@ -10,6 +10,10 @@
<div class="title" slot="title">
<div class="divider"></div>
<span class="label">上传列表</span>
<span class="tips">
<i class="el-icon-info"></i
>提示:上传过程中请勿关闭此弹窗或刷新页面等操作
</span>
</div>
<div class="upload-progress">
<el-table :data="filesList" fit>
......@@ -23,6 +27,7 @@
<template slot-scope="scope">
<el-progress
:percentage="scope.row.percent"
v-if="!isNaN(parseInt(scope.row.percent))"
:status="scope.row.status"
></el-progress>
</template>
......@@ -34,7 +39,7 @@
size="48"
icon="el-icon-circle-close"
@click.native="handleCancel(scope.$index)"
v-if="scope.row.status==null"
v-if="scope.row.status == null"
></el-button>
</template>
</el-table-column>
......@@ -105,7 +110,7 @@ export default {
this.handleClose();
},
handleCancel(index) {
this.$emit('handleCancel',index)
this.$emit("handleCancel", index);
},
handleClose() {
this.$emit("handleClose");
......@@ -117,6 +122,7 @@ export default {
<style lang='scss' scoped>
.title {
display: flex;
align-items: center;
.divider {
width: 8px;
height: 16px;
......@@ -126,6 +132,11 @@ export default {
.label {
font-weight: bold;
}
.tips{
font-size: 14px;
color: #666;
margin-left: 10px;
}
}
.dialog-content {
padding: 0 32px;
......
......@@ -152,7 +152,7 @@ export const importRecordsTitle = [{
prop: "fileName",
label: "文件名称",
columnAlign: "center",
width: 220
width: 260
},
{
prop: "fileSize",
......
......@@ -4,48 +4,51 @@
<SearchBar :config="searchConfig" @search="search" @reset="reset" />
</div>
<div class="tools">
<el-button
type="primary"
@click.native="handleOperation({ type: 'add' })"
icon="el-icon-plus"
>
添加</el-button
>
<el-upload
class="upload-button"
:action="importZipUrl"
:headers="headers"
accept=".zip"
:show-file-list="false"
:on-exceed="handleExceed"
:before-upload="handleUpload"
:on-success="handleSuccess"
multiple
>
<div class="tools-item">
<el-button
type="success"
@click.native="handleOperation({ type: 'multiAdd' })"
icon="el-icon-upload"
type="primary"
@click.native="handleOperation({ type: 'add' })"
icon="el-icon-plus"
>
批量导入</el-button
添加</el-button
>
<el-upload
class="upload-button"
:action="importZipUrl"
:headers="headers"
accept=".zip"
:show-file-list="false"
:on-exceed="handleExceed"
:before-upload="handleUpload"
:on-success="handleSuccess"
multiple
>
<el-button
type="success"
@click.native="handleOperation({ type: 'multiAdd' })"
icon="el-icon-upload"
>
批量导入</el-button
>
</el-upload>
</div>
<div class="tools-item">
<el-button
type="primary"
@click.native="handleOperation({ type: 'downloadTemplate' })"
icon="el-icon-download"
>
下载导入模板</el-button
>
</el-upload>
<el-button
type="primary"
@click.native="handleOperation({ type: 'downloadTemplate' })"
icon="el-icon-download"
>
下载导入模板</el-button
>
<el-button
type="primary"
@click.native="handleOperation({ type: 'viewImportRecord' })"
icon="el-icon-document"
>
查看导入记录</el-button
>
<el-button
type="primary"
@click.native="handleOperation({ type: 'viewImportRecord' })"
icon="el-icon-document"
>
查看导入记录</el-button
>
</div>
</div>
<TablePage
:data="list.records"
......@@ -149,7 +152,7 @@ export default {
InfoEditDialog,
SearchBar,
ImportRecordDialog,
UploadListDialog
UploadListDialog,
},
data() {
return {
......@@ -506,9 +509,9 @@ export default {
};
},
handleImportRecordClose(){
this.importRecordVisible =false
}
handleImportRecordClose() {
this.importRecordVisible = false;
},
},
};
</script>
......@@ -532,7 +535,15 @@ export default {
// }
.tools {
display: flex;
margin-bottom: 20px;
align-items: center;
justify-content: space-between;
margin-bottom: 14px;
.tools-item{
display: flex;
&:last-child{
justify-content: flex-end;
}
}
.upload-button {
margin: 0 10px;
}
......
......@@ -37,6 +37,16 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="展览单位" :label-width="formLabelWidth">
<el-cascader
style="width: 100%"
v-model="dialogForm.deptId"
:options="orgTreeData"
:props="optionProps"
placeholder="请选择展览单位"
>
</el-cascader>
</el-form-item>
<el-form-item
label="展览性质"
:label-width="formLabelWidth"
......@@ -344,6 +354,11 @@ export default {
}
});
}
// 回填展览单位
if (this.dialogForm.deptId) {
this.dialogForm.deptId = [this.dialogForm.deptId];
}
}
},
immediate: true,
......@@ -414,6 +429,13 @@ export default {
theme: "snow",
placeholder: "请输入单元介绍",
},
orgTreeData: [],
optionProps: {
value: "id",
label: "name",
children: "children",
checkStrictly: true, //单选选择任意一级选项
},
};
},
async created() {
......@@ -421,6 +443,9 @@ export default {
"displayType",
"displayCharacter",
]);
this.$store.dispatch("org/getMuseumTreeData", false).then((res) => {
this.orgTreeData = res[0].children; //去掉根节点的文旅厅
});
},
methods: {
......@@ -771,6 +796,7 @@ export default {
let literature = this.literatureValues.join(",");
let crIds = this.crIds.join(",");
let status = this.dialogForm.status ? 1 : 0;
// return;
const params = {
exhibitionId,
......@@ -793,7 +819,10 @@ export default {
displayCharacter,
exhibitionUnits: unitData,
};
// 处理馆藏单位
if (params.deptId instanceof Array) {
params.deptId = params.deptId[params.deptId.length - 1];
}
// return;
editDisplay(params)
.then(async (res) => {
......
......@@ -74,7 +74,7 @@
</div>
<el-row :span="20">
<el-col :span="15" class="left">
<el-col :span="24" class="left">
<div class="basic-info">
<div class="body-item">
<span class="label">
......@@ -113,7 +113,7 @@
</div>
</div>
</el-col>
<el-col :span="9" class="right">
<el-col :span="10" class="right">
<!-- <div class="qrcode">
<img
src="@/assets/imgs/display/normal/test-qrcode.png"
......
......@@ -95,7 +95,6 @@ export default {
},
getFileSize(fileSize) {
return (fileSize) => {
console.log(fileSize);
return (Number(fileSize) / 1024 / 1024).toFixed(2) + "M";
};
},
......
<template>
<el-dialog
:visible.sync="dialogVisible"
width="40%"
width="60%"
style="height: 98%"
:before-close="handleClose"
top="5vh"
......@@ -78,14 +78,20 @@
/>
</el-form-item>
<el-form-item label="简介" :label-width="formLabelWidth">
<el-input
<!-- <el-input
type="textarea"
placeholder="请输入博物馆简介"
v-model="dialogForm.intro"
maxlength="600"
show-word-limit
>
</el-input>
</el-input> -->
<quill-editor
ref="myQuillEditor"
v-model="dialogForm.intro"
:options="editorOption"
class=".editor"
/>
</el-form-item>
</el-form>
</div>
......@@ -104,10 +110,13 @@ import ManualUploader from "@/components/Uploader/ManualUploader.vue";
import { mapGetters } from "vuex";
import { uploadV1 } from "@/utils/file";
import { deleteFiles } from "@/api/file";
import { quillEditor } from "vue-quill-editor";
export default {
name: "InfoEditDialog",
components: {
ManualUploader,
quillEditor
},
props: {
visible: {
......@@ -188,6 +197,23 @@ 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 {
dialogForm: {},
formLabelWidth: "100px",
......@@ -209,6 +235,16 @@ export default {
regionCodeModalKey: 0,
faceImage: [],
parentPid: null, //博物馆根节点id
editorOption: {
// 富文本编辑器配置
modules: {
//工具栏定义的
toolbar: toolbarOptions,
},
//主题
theme: "snow",
placeholder: "请输入单元介绍",
},
};
},
methods: {
......
......@@ -56,8 +56,11 @@
prop="intro"
label="简介"
show-overflow-tooltip
/>
>
<template slot-scope="scope">
<span v-html="scope.row.intro"></span>
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-button
......@@ -152,7 +155,7 @@ export default {
expandRow: [],
tabelData: [],
imgList: [],
imgViewerVisible:false
imgViewerVisible: false,
};
},
computed: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论