Commit 750f8b6f by web

fix: 修改变量名,完善数据

1 parent 8c7157c1
......@@ -348,16 +348,19 @@ export default {
data: { data: [], message: '操作成功', status: '1' }
};
},
// 当期BI-保持选择的图片
// 当期BI-任务记录图片列表
getTaskPicList() {
return {
data: {
data: {
imageStyle: 1, //展示样式 1 流式 2平铺
imageSize: 2, //图片大小 1 大 2中 3小
taskImages: [
{
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl: '图片地址'
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
}
]
},
......
<template>
<div :style="{ columnCount }">
<img v-for="(item, index) in imageUrl" :key="index" :src="setUrl(item)" />
<img v-for="(item, index) in imageUrls" :key="index" :src="setUrl(item)" />
</div>
</template>
......@@ -22,7 +22,7 @@ const IMG_MAPPING = {
export default {
name: 'bi-photo-wall-images',
props: {
imageUrl: {
imageUrls: {
type: Array,
default() {
return [];
......
......@@ -8,12 +8,12 @@
<template #handler>
<div class="bi-title-photo-btn">
<SelectStyle :layout="layout" @handleSave="selectStyleSave" />
<SelectImages :imageUrl="imageUrl" @handleSave="selectImgSave" />
<SelectImages :imageUrls="imageUrls" @handleSave="selectImgSave" />
<Del @del="onDel" />
</div>
</template>
</BiTitle>
<BiImages :imageUrl="imageUrl" :layout="layout" />
<BiImages :imageUrls="imageUrls" :layout="layout" />
</div>
</template>
......@@ -36,7 +36,7 @@ export default {
},
props: {
name: String,
data: {
initUrl: {
default: () => [],
type: Array
},
......@@ -47,7 +47,7 @@ export default {
},
data() {
return {
imageUrl: [],
imageUrls: [],
layout: {
imageStyle: 2, // 1流式 2平铺 流式不限制高度,但是有max-height,平铺为正方形
imageSize: 2 // 1大548px 2中355px 3小262px
......@@ -57,7 +57,7 @@ export default {
methods: {
// 选择图片的保存
selectImgSave(e) {
this.imageUrl = e;
this.imageUrls = e;
},
// 选择样式的保存
selectStyleSave(e) {
......@@ -67,9 +67,14 @@ export default {
this.$refs['bi-photo'].style.display = 'none';
}
},
mounted() {},
watch: {
data: {
initUrl: {
immediate: true,
handler(v) {
this.imageUrls = [...v];
}
},
imageUrls: {
handler() {
this.$nextTick(() => {
this.$emit('page', heightToPage(this.$refs['bi-photo'].offsetHeight));
......
......@@ -71,7 +71,7 @@ export default {
name: 'select-img',
props: {
// 已勾选数据 [url,url]
imageUrl: {
imageUrls: {
type: Array,
default() {
return [];
......
......@@ -3,7 +3,7 @@
* @Author: jml
* @Date: 2021-02-26 15:38:10
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-09-08 15:00:42
* @LastEditTime: 2022-05-17 11:46:23
-->
<template>
<div class="xrk-components-bi bi" :class="{ 'bi-print': print }">
......@@ -82,6 +82,18 @@ export default {
getTemplateList: {
type: Function,
default: () => {}
},
saveBiPicList: {
type: Function,
default: () => {}
},
getTaskPicList: {
type: Function,
default: () => {}
},
getImageList: {
type: Function,
default: () => {}
}
},
components: {
......
......@@ -66,6 +66,7 @@
<BiPhoto
class="bi-block"
name="照片集合"
:initUrl="photoUrls"
@page="setPage(arguments, 'page4')"
/>
<BiCoverEnd title="奇正藏药医学沙龙推广项目数据报告"></BiCoverEnd>
......@@ -134,7 +135,8 @@ export default {
projectName: '',
baseInfo: [],
textData: [],
biInfo: {}
biInfo: {},
photoUrls: []
};
},
computed: {
......@@ -510,7 +512,8 @@ export default {
this.Bi.getFixedInfo(),
this.Bi.getTopicInfo(),
this.Bi.getGroupInfo(),
this.Bi.getTemplateList()
this.Bi.getTemplateList(),
this.Bi.getTaskPicList()
])
.then(
([
......@@ -518,13 +521,17 @@ export default {
fixedInfo,
topicInfo,
topicMixinInfo,
tempaletList = { data: { data: [] } }
tempaletList = { data: { data: [] } },
photoInfo
]) => {
this.dealBaseInfo(baseInfo.data.data[0] || {});
this.dealFixedInfo(fixedInfo.data.data || []);
this.dealChoice(topicInfo.data.data || []);
this.dealChoiceMixin(topicMixinInfo.data.data || []);
this.coverList = tempaletList.data.data || [];
this.photoUrls = photoInfo.data.data.taskImages.map(
item => item.imageUrl
);
this.$nextTick(async () => {
await this.preloadImg(this.coverUrl);
window.status = '1';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!