Commit 1f0a8abc by web

fix: 完善

1 parent b628da2c
...@@ -342,6 +342,12 @@ export default { ...@@ -342,6 +342,12 @@ export default {
data: { data: [], message: '操作成功', status: '1' } data: { data: [], message: '操作成功', status: '1' }
}; };
}, },
// 获取是否含有照片题
getImageQuestionCount() {
return {
data: { data: 2, message: '操作成功', status: '1' }
};
},
// 当期BI-保持选择的图片 // 当期BI-保持选择的图片
saveBiPicList() { saveBiPicList() {
return { return {
...@@ -361,6 +367,18 @@ export default { ...@@ -361,6 +367,18 @@ export default {
taskId: 123, //任务记录ID taskId: 123, //任务记录ID
imageUrl: imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png' 'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
},
{
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
},
{
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
} }
] ]
}, },
...@@ -374,6 +392,8 @@ export default { ...@@ -374,6 +392,8 @@ export default {
return { return {
data: { data: {
data: { data: {
has: true,
isDelete: 0,
imageStyle: 1, //展示样式 1 流式 2平铺 imageStyle: 1, //展示样式 1 流式 2平铺
imageSize: 2, //图片大小 1 大 2中 3小 imageSize: 2, //图片大小 1 大 2中 3小
imageUrls: [ imageUrls: [
...@@ -383,6 +403,20 @@ export default { ...@@ -383,6 +403,20 @@ export default {
taskId: 123, //任务记录ID taskId: 123, //任务记录ID
imageUrl: imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png' 'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
},
{
id: 1,
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
},
{
id: 1,
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
} }
] ]
}, },
......
...@@ -74,7 +74,6 @@ export default { ...@@ -74,7 +74,6 @@ export default {
// return cataloguePageSize; // return cataloguePageSize;
// } // }
}, },
created() {},
watch: { watch: {
catalogueArr: { catalogueArr: {
handler() { handler() {
......
<template> <template>
<div :style="{ columnCount }"> <ul :style="{ columnCount }">
<img <li v-for="(item, index) in taskImageInfo.imageUrls" :key="index">
v-for="(item, index) in taskImageInfo.imageUrls" <img :src="setUrl(item.imageUrl)" />
:key="index" </li>
:src="setUrl(item.imageUrl)" </ul>
/>
</div>
</template> </template>
<script> <script>
...@@ -90,7 +88,7 @@ export default { ...@@ -90,7 +88,7 @@ export default {
// } // }
// } // }
// } // }
div { ul {
padding: 0 30px; padding: 0 30px;
padding-top: 35px; padding-top: 35px;
position: relative; position: relative;
......
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
value: { value: {
default() { default() {
return { return {
isDelete: 0, // 1删除
imageStyle: 2, // 1流式 2平铺 流式不限制高度,但是有max-height,平铺为正方形 imageStyle: 2, // 1流式 2平铺 流式不限制高度,但是有max-height,平铺为正方形
imageSize: 2, //图片大小 1 大 2中 3小 imageSize: 2, //图片大小 1 大 2中 3小
imageUrls: [ imageUrls: [
...@@ -86,7 +87,10 @@ export default { ...@@ -86,7 +87,10 @@ export default {
}); });
}, },
onDel() { onDel() {
this.$refs['bi-photo'].style.display = 'none'; this.$emit('input', {
...this.value,
isDelete: 1
});
} }
}, },
watch: { watch: {
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
* @Description: * @Description:
* @Author: jml * @Author: jml
* @Date: 2021-02-26 15:38:10 * @Date: 2021-02-26 15:38:10
* @LastEditors: Please set LastEditors * @LastEditTime: 2022-05-18 18:35:06
* @LastEditTime: 2022-05-17 11:46:23
--> -->
<template> <template>
<div class="xrk-components-bi bi" :class="{ 'bi-print': print }"> <div class="xrk-components-bi bi" :class="{ 'bi-print': print }">
...@@ -94,6 +93,10 @@ export default { ...@@ -94,6 +93,10 @@ export default {
getImageList: { getImageList: {
type: Function, type: Function,
default: () => {} default: () => {}
},
getImageQuestionCount: {
type: Function,
default: () => {}
} }
}, },
components: { components: {
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
<BiSingleChoiceInfo index="4" name="照片集合"></BiSingleChoiceInfo> <BiSingleChoiceInfo index="4" name="照片集合"></BiSingleChoiceInfo>
</BiSingleChoice> --> </BiSingleChoice> -->
<BiPhoto <BiPhoto
v-if="!hideTaskImage"
class="bi-block" class="bi-block"
ref="bi-photo" ref="bi-photo"
name="照片集合" name="照片集合"
...@@ -72,7 +73,7 @@ ...@@ -72,7 +73,7 @@
/> />
<BiCoverEnd title="奇正藏药医学沙龙推广项目数据报告"></BiCoverEnd> <BiCoverEnd title="奇正藏药医学沙龙推广项目数据报告"></BiCoverEnd>
<BiOperate <BiOperate
:questionData="[...singleChoice, ...singleChoiceMixin]" :questionData="[...singleChoice, ...singleChoiceMixin, taskImageInfo]"
:saveInfo="saveInfo" :saveInfo="saveInfo"
:exportBi="exportBi" :exportBi="exportBi"
></BiOperate> ></BiOperate>
...@@ -138,6 +139,11 @@ export default { ...@@ -138,6 +139,11 @@ export default {
textData: [], textData: [],
biInfo: {}, biInfo: {},
taskImageInfo: { taskImageInfo: {
title: {
name: '照片墙'
},
has: true,
isDelete: 0,
imageStyle: 2, //展示样式 1 流式 2平铺 imageStyle: 2, //展示样式 1 流式 2平铺
imageSize: 2, //图片大小 1 大 2中 3小 imageSize: 2, //图片大小 1 大 2中 3小
imageUrls: [ imageUrls: [
...@@ -210,15 +216,17 @@ export default { ...@@ -210,15 +216,17 @@ export default {
}) })
] ]
}, },
{ ...(!this.hideTaskImage && [
name: '照片集合', {
child: [ name: '照片集合',
{ child: [
name: '照片集合', {
page: 4 name: '照片集合',
} page: 4
] }
} ]
}
])
]; ];
}, },
showSingleChoice() { showSingleChoice() {
...@@ -232,6 +240,9 @@ export default { ...@@ -232,6 +240,9 @@ export default {
}, },
hideSingleChoiceMixin() { hideSingleChoiceMixin() {
return this.dealSingleChoice(this.singleChoiceMixin, true); return this.dealSingleChoice(this.singleChoiceMixin, true);
},
hideTaskImage() {
return !!this.taskImageInfo.isDelete || !this.taskImageInfo.has;
} }
}, },
methods: { methods: {
...@@ -495,7 +506,6 @@ export default { ...@@ -495,7 +506,6 @@ export default {
return new Promise(resolve => { return new Promise(resolve => {
const { biInfoId, styleConfigureId } = this.biInfo; const { biInfoId, styleConfigureId } = this.biInfo;
const { content } = this.$refs['cover']; const { content } = this.$refs['cover'];
console.log(this.$refs['bi-photo']);
Promise.all([ Promise.all([
this.Bi.saveInfo({ this.Bi.saveInfo({
biInfoId: biInfoId, biInfoId: biInfoId,
...@@ -557,7 +567,7 @@ export default { ...@@ -557,7 +567,7 @@ export default {
this.dealChoice(topicInfo.data.data || []); this.dealChoice(topicInfo.data.data || []);
this.dealChoiceMixin(topicMixinInfo.data.data || []); this.dealChoiceMixin(topicMixinInfo.data.data || []);
this.coverList = tempaletList.data.data || []; this.coverList = tempaletList.data.data || [];
this.taskImageInfo = taskImageInfo.data.data; Object.assign(this.taskImageInfo, taskImageInfo.data.data);
this.$nextTick(async () => { this.$nextTick(async () => {
await this.preloadImg(this.coverUrl); await this.preloadImg(this.coverUrl);
window.status = '1'; window.status = '1';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!