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

展览编辑增加左右切换按钮和回到顶部

上级 5f300396
......@@ -105,9 +105,6 @@ export default {
immediate: true,
deep: true,
},
advice(value) {
console.log(value);
},
},
computed: {
// 是否显示提示
......@@ -262,4 +259,12 @@ export default {
.disabled .el-upload--picture-card {
display: none !important;
}
// 上传抖动修复
.el-upload-list__item.is-ready {
display: none;
}
// 隐藏回显动画
.el-upload-list__item {
transition: none !important;
}
</style>
\ No newline at end of file
......@@ -6,6 +6,7 @@
:options="editorOption"
@change="onEditorChange($event)"
class=".editor"
@click.native="handleEditAblequestion"
/>
</template>
......@@ -76,14 +77,25 @@ export default {
theme: "snow",
placeholder: "",
},
qillInit: true,
};
},
mounted() {
this.$refs.myQuillEditor.quill.enable(false);
},
methods: {
onEditorChange() {
//内容改变事件
this.$emit("input", this.content);
},
handleEditAblequestion() {
if (this.qillInit) {
this.$refs.text.quill.enable(true);
console.log(111);
this.$refs.text.quill.focus();
this.qillInit = false;
}
},
},
};
</script>
......
......@@ -13,7 +13,7 @@ const service = axios.create({
// baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
baseURL: process.env.VUE_APP_BASE_API,
timeout: 5000,
timeout: 10*1000,
})
// request interceptor
service.interceptors.request.use(
......
......@@ -3,7 +3,7 @@
<div class="exhibiton-unit" ref="exhibitionUnit">
<el-row class="tree-container" v-if="treeData.length > 0">
<el-col :span="9">
<el-tree :data="treeData" node-key="euId" >
<el-tree :data="treeData" node-key="euId">
<div class="exhibition-units-tree-node" slot-scope="{ node, data }">
<div style="display: flex; align-items: center">
<div class="title" @click="handleClickNode(node, data)">
......@@ -54,7 +54,12 @@
<el-input placeholder="请输入标题" v-model="currentData.title">
</el-input>
</el-col>
<el-col :span="24" class="mg-bt20">
<VueQuillEditor
v-model="currentData.intro"
placeholder="请输入单元介绍"
/>
</el-col>
<el-col :span="24" class="mg-bt20">
<el-select
v-model="currentData.crIds"
......@@ -66,9 +71,10 @@
:remote-method="searchCR"
:loading="loading"
style="width: 100%"
ref="remoteSelect"
>
<el-option
v-for="item in CRList"
v-for="item in crList"
:key="item.crId"
:label="item.name"
:value="item.crId"
......@@ -76,32 +82,6 @@
</el-option>
</el-select>
</el-col>
<el-col :span="24">
<!-- <el-input
placeholder="请输入介绍"
v-model="currentData.intro"
type="textarea"
rows="4"
maxlength="800"
show-word-limit
>
</el-input> -->
<!-- <quill-editor
ref="myQuillEditor"
v-model="currentData.intro"
:options="editorOption"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@ready="onEditorReady($event)"
class=".editor"
/> -->
<VueQuillEditor v-model="currentData.intro" placeholder="请输入单元介绍"/>
</el-col>
</el-row>
<el-collapse-transition>
<el-row :gutter="50">
<el-col :span="24">
<div>单元图片:</div>
<ManualUploader
......@@ -115,7 +95,11 @@
/>
</el-col>
</el-row>
</el-collapse-transition>
<!-- <el-collapse-transition>
<el-row :gutter="50">
</el-row>
</el-collapse-transition> -->
<div class="next-prev">
<el-button
size="mini"
......@@ -193,16 +177,28 @@ export default {
if (arr.length > 0) {
arr.forEach((item) => {
if (item.culturalRelics && item.culturalRelics.length > 0) {
that.$set(that, "CRList", item.culturalRelics);
that.$set(that, "crList", item.culturalRelics);
item.crIds = [];
item.culturalRelics.map((cr) => {
item.crIds.push(cr.crId);
// item.crIds.push(cr.crId);
that.$nextTick(() => {
// console.log("remoteSelect", that.$refs["remoteSelect"]);
that.$refs["remoteSelect"].cachedOptions.push({
currentLabel: cr.name, // 当前绑定的数据的label
currentValue: cr.crId, // 当前绑定数据的value
label: cr.name, // 当前绑定的数据的label
value: cr.crId, // 当前绑定数据的value
});
item.imagesVo = item.imagesVo ? item.imagesVo : [];
item.videosVo = item.videosVo ? item.videosVo : [];
});
});
} else {
that.$set(that, "CRList", []);
that.$set(that, "crList", []);
}
item.imagesVo = item.imagesVo || [];
item.videosVo = item.videosVo || [];
if (item.children) {
loopData(item.children);
}
......@@ -217,11 +213,9 @@ export default {
},
},
data() {
return {
treeData: [],
CRList: [], //文物列表,关联文物使用
crList: [], //文物列表,关联文物使用
loading: false,
imagesVo: [],
videosVo: [],
......@@ -231,13 +225,12 @@ export default {
},
methods: {
getUnitData() {
return this.treeData;
},
// 关联文献查询
searchCR(queryString) {
if (!queryString.trim()) {
this.CRList = [];
this.crList = [];
return;
}
this.loading = true;
......@@ -250,9 +243,9 @@ export default {
this.loading = false;
const res = await getCulturalRelicListPer(params);
if (res.code == 0) {
this.CRList = res.data.records;
this.crList = res.data.records;
} else {
this.CRList = [];
this.crList = [];
this.$message.error(res.msg);
}
}, 500);
......@@ -433,7 +426,7 @@ export default {
width: 100%;
flex-direction: column;
.title {
width:200px;
width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
......
......@@ -70,8 +70,11 @@
<InfoEditDialog
:visible="editDialogVisible"
:form="form"
:currentPageIds="currentPageIds"
@handleClose="handleClose"
@refresh="loadData"
@changeDisplay="reloadDisplay"
ref="InfoEditDialog"
/>
<PreviewDialog
v-if="Object.keys(curPreviewObj).length > 0"
......@@ -121,6 +124,7 @@ export default {
import("element-ui/packages/image/src/image-viewer"),
},
data() {
let that = this;
return {
list: {
record: [],
......@@ -181,6 +185,7 @@ export default {
previewVideos: [],
displayTypes: {},
curPreviewObj: {}, //当前预览的对象
currentPageIds: [], //当前的id数组,用于给详情页切换用
};
},
computed: {
......@@ -222,11 +227,13 @@ export default {
let res = await getListPer(params);
if (res.code == 0) {
this.list = res.data;
this.currentPageIds = this.list.records.map((item) => {
return item.exhibitionId;
});
}
},
reset() {
this.loadData();
console.log("reset");
},
// 加载表格数据
......@@ -237,13 +244,14 @@ export default {
};
let res = await getListPer(params);
if (res.code == 0) {
console.log(res.data);
this.list = res.data;
this.currentPageIds = this.list.records.map((item) => {
return item.exhibitionId;
});
}
},
async handleOperation(value, row) {
console.log(value, row);
switch (value.type) {
case "add":
this.editDialogVisible = true;
......@@ -270,6 +278,16 @@ export default {
break;
}
},
async reloadDisplay(exhibitionId) {
this.$refs.InfoEditDialog.submitLoading = true;
this.$refs.InfoEditDialog.loadingText = "加载中...";
let editRes = await getDisplayById({
exhibitionId,
});
this.form = editRes.data;
this.$refs.InfoEditDialog.submitLoading = false;
},
async handleChangeStatus(row) {
const { status } = row;
let newStatus = status === "0" ? "1" : "0";
......
......@@ -109,7 +109,7 @@ export default {
},
searchConfig: [
{
prop: "name",
prop: "title",
type: "input",
label: "文创名称",
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论