|
|
@@ -191,7 +191,10 @@
|
|
|
:urlList="urlList"
|
|
|
:reportRemarksIndex="reportRemarksIndex"
|
|
|
:reportContents="reportContents"
|
|
|
- :checkedPlan="checkedPlan"></share>
|
|
|
+ :checkedPlan="checkedPlan"
|
|
|
+ :isTarget="isTarget"
|
|
|
+ :isReportCustom="isReportCustom"
|
|
|
+ :isHistory="reportTarget.isHistory"></share>
|
|
|
<!--分享图片列表 -->
|
|
|
<el-dialog
|
|
|
title="选择分享的内容"
|
|
|
@@ -201,36 +204,50 @@
|
|
|
:close-on-click-modal="false"
|
|
|
@close="wuliaoTableClose"
|
|
|
custom-class="shareImgFlag">
|
|
|
- <div v-if="reportTarget.photoSummary">
|
|
|
+ <div>
|
|
|
<!-- <p style="margin-bottom: 10px; margin-top: 0; display: flex">
|
|
|
今日总结&明日规划的文本内容<van-checkbox
|
|
|
v-model="checkedPlan"
|
|
|
style="margin-left: 10px"></van-checkbox>
|
|
|
</p> -->
|
|
|
- <p style="margin-top: 0">请点击勾选想要分享的今日拜访照片</p>
|
|
|
- <div class="shareVisitImg">
|
|
|
- <template v-for="(itemImg, indexImg) in reportTarget.photoSummary">
|
|
|
- <div>
|
|
|
- <img :src="itemImg.fileUrl" alt="" @click="selectImg(itemImg)" />
|
|
|
- <van-icon
|
|
|
- @click.stop
|
|
|
- name="success"
|
|
|
- class="activaImg"
|
|
|
- color="#fff"
|
|
|
- size="15"
|
|
|
- style="
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- bottom: 0;
|
|
|
- /* margin: -15px 0 0 -15px; */
|
|
|
- pointer-events: none;
|
|
|
- background: #2b73cf;
|
|
|
- border: 2px solid #fff;
|
|
|
- "
|
|
|
- v-if="itemImg.checked" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
+ <p
|
|
|
+ style="margin-bottom: 10px; margin-top: 0; display: flex"
|
|
|
+ v-if="reportTarget.isHistory == '0'">
|
|
|
+ 日报指标<van-checkbox v-model="isTarget" style="margin-left: 10px"></van-checkbox>
|
|
|
+ </p>
|
|
|
+ <p
|
|
|
+ style="margin-bottom: 10px; margin-top: 0; display: flex"
|
|
|
+ v-if="reportTarget.isHistory == '0'">
|
|
|
+ 日报填写内容<van-checkbox
|
|
|
+ v-model="isReportCustom"
|
|
|
+ style="margin-left: 10px"></van-checkbox>
|
|
|
+ </p>
|
|
|
+ <template v-if="reportTarget.photoSummary">
|
|
|
+ <p style="margin-top: 0">请点击勾选想要分享的今日拜访照片</p>
|
|
|
+ <div class="shareVisitImg">
|
|
|
+ <template v-for="(itemImg, indexImg) in reportTarget.photoSummary">
|
|
|
+ <div>
|
|
|
+ <img :src="itemImg.fileUrl" alt="" @click="selectImg(itemImg)" />
|
|
|
+ <van-icon
|
|
|
+ @click.stop
|
|
|
+ name="success"
|
|
|
+ class="activaImg"
|
|
|
+ color="#fff"
|
|
|
+ size="15"
|
|
|
+ style="
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ /* margin: -15px 0 0 -15px; */
|
|
|
+ pointer-events: none;
|
|
|
+ background: #2b73cf;
|
|
|
+ border: 2px solid #fff;
|
|
|
+ "
|
|
|
+ v-if="itemImg.checked" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<span slot="footer" class="footer-btn">
|
|
|
<van-button plain type="primary" @click="shareImgFlag = false">取 消</van-button>
|
|
|
@@ -351,6 +368,8 @@ export default {
|
|
|
shareReportConfig: null,
|
|
|
postName: '',
|
|
|
homePageIndicatorList: null,
|
|
|
+ isTarget: false, //日报指标
|
|
|
+ isReportCustom: true, //日报填写内容
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -402,29 +421,66 @@ export default {
|
|
|
});
|
|
|
this.urlList = [];
|
|
|
this.reportRemarksIndex = index;
|
|
|
+ // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
|
|
|
+ if (this.reportTarget.isHistory == '0') {
|
|
|
+ this.setPhotoSummary();
|
|
|
+ this.shareImgFlag = true;
|
|
|
+ } else {
|
|
|
+ this.setPhotoSummary();
|
|
|
+ // 没有图片直接打开分享
|
|
|
+ if (this.reportTarget.photoSummary && this.reportTarget.photoSummary.length) {
|
|
|
+ // 选择分享的图片
|
|
|
+ this.setShareFlag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setPhotoSummary() {
|
|
|
if (this.reportTarget.photoSummary && this.reportTarget.photoSummary.length) {
|
|
|
// 重置分享图片状态
|
|
|
this.reportTarget.photoSummary.forEach((item) => {
|
|
|
- // item.photos.forEach((val) => {
|
|
|
this.$set(item, 'checked', false);
|
|
|
- // });
|
|
|
});
|
|
|
- // 选择分享的图片
|
|
|
- this.shareImgFlag = true;
|
|
|
- } else {
|
|
|
- this.setShareFlag = true;
|
|
|
}
|
|
|
},
|
|
|
// 确认分享
|
|
|
confirmShare() {
|
|
|
- this.reportTarget.photoSummary.forEach((item) => {
|
|
|
- // item.photos.forEach((val) => {
|
|
|
- if (item.checked) this.urlList.push(item.fileUrl);
|
|
|
- // });
|
|
|
- });
|
|
|
- if (this.urlList.length == 0 && !this.checkedPlan) {
|
|
|
- this.$notify({ type: 'warning', message: '请选择分享内容!', className: 'notifyIndex' });
|
|
|
- return;
|
|
|
+ // 旧的分享没有图标不会进来
|
|
|
+ // 是否有图片
|
|
|
+ if (this.reportTarget.photoSummary) {
|
|
|
+ this.reportTarget.photoSummary.forEach((item) => {
|
|
|
+ if (item.checked) this.urlList.push(item.fileUrl);
|
|
|
+ });
|
|
|
+
|
|
|
+ if (this.reportTarget.isHistory == '0') {
|
|
|
+ if (this.urlList.length == 0 && !this.isTarget && !this.isReportCustom) {
|
|
|
+ this.$notify({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择分享内容!',
|
|
|
+ className: 'notifyIndex',
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.urlList.length == 0 && !this.checkedPlan) {
|
|
|
+ this.$notify({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择分享内容!',
|
|
|
+ className: 'notifyIndex',
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.reportTarget.isHistory == '0') {
|
|
|
+ if (!this.isTarget && !this.isReportCustom) {
|
|
|
+ this.$notify({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择分享内容!',
|
|
|
+ className: 'notifyIndex',
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
buryingPoint({
|
|
|
systemModel: '日报审核',
|