dailyDetails.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974
  1. <template>
  2. <div class="dailyDetails">
  3. <div class="dailyDetailsBox" v-if="setDailyDetailsBoxFlag">
  4. <!-- 顶部条-->
  5. <div class="navBarTOP">
  6. <van-nav-bar class="navBar" title="日报详情" left-arrow @click-left="onClickLeft">
  7. <template #right>
  8. <div
  9. class="shareBtn"
  10. @click="clickShareFlag(-1)"
  11. v-if="reportTarget && source != 'share'">
  12. <van-icon name="share" />
  13. <div class="vedioLinks" @click.stop>
  14. <span>一键分享日报,</span>
  15. <span>
  16. <span class="linkSpan" @click.stop="shareVedioLinks"> 点击查看 </span>
  17. 操作视频
  18. </span>
  19. <van-icon name="play" />
  20. </div>
  21. </div>
  22. </template>
  23. </van-nav-bar>
  24. </div>
  25. <div class="lineGrey"></div>
  26. <div class="lineGrey"></div>
  27. <div class="lineGrey"></div>
  28. <div class="lineGrey"></div>
  29. <div class="lineGrey"></div>
  30. <!-- 主体内容-->
  31. <div class="container linep">
  32. <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
  33. <target :homePageIndicatorDate="homePageIndicatorList"></target>
  34. </template>
  35. <template v-else>
  36. <van-collapse v-model="activeNames" style="margin-top: -3px">
  37. <template v-if="!YFQuota">
  38. <template v-if="reportTarget.postType == 'GZ' || reportTarget.BMDType == 'BMD'">
  39. <!-- 0-历史指标 1-动态指标,String类型 -->
  40. <target
  41. v-if="reportTarget.targetType == '1'"
  42. :homePageIndicatorDate="homePageIndicatorList"></target>
  43. <template v-else>
  44. <!-- 历史指标 -->
  45. <Atarget :reportInfo="reportTarget"></Atarget>
  46. <Btarget :reportInfo="reportTarget"></Btarget>
  47. </template>
  48. </template>
  49. <template v-else>
  50. <!-- YFQuota:应用服务平台 不显示各项指标 -->
  51. <Atarget :reportInfo="reportTarget"></Atarget>
  52. <Btarget :reportInfo="reportTarget"></Btarget>
  53. </template>
  54. </template>
  55. </van-collapse>
  56. </template>
  57. <div class="contentContainer">
  58. <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  59. <reportCustom
  60. ref="reportCustom"
  61. v-if="reportTarget.isHistory == '0'"
  62. :disabled="true"
  63. :reportCustomData="reportTarget.customTaskList"></reportCustom>
  64. <template v-else>
  65. <div v-if="GZQuota">
  66. <p class="contentContainerTitle">今日项目跟进数</p>
  67. <div style="padding: 10px 0">
  68. <van-field readonly v-model="projectFollowNum" type="digit" />
  69. </div>
  70. <p class="contentContainerTitle">今日TUC成功报备数量</p>
  71. <div style="padding: 10px 0">
  72. <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
  73. </div>
  74. </div>
  75. <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
  76. <div v-if="reportTarget.notVisitReason && reportTarget.notVisitReason != ''">
  77. <p class="contentContainerTitle">截至日报提交时间,今日拜访0家店的原因</p>
  78. <div style="padding: 10px 0">
  79. <van-field
  80. readonly
  81. v-model="reportTarget.notVisitReason"
  82. rows="4"
  83. autosize
  84. type="textarea" />
  85. </div>
  86. </div>
  87. <p class="contentContainerTitle">今日机会与挑战总结</p>
  88. <div style="padding: 10px 0">
  89. <van-field v-model="Content" rows="4" autosize readonly type="textarea" />
  90. </div>
  91. <p class="contentContainerTitle">明日工作规划</p>
  92. <div style="padding: 10px 0">
  93. <van-field v-model="Content2" rows="4" autosize readonly type="textarea" />
  94. </div>
  95. </template>
  96. </div>
  97. <div
  98. class="contentContainer"
  99. v-if="reportTarget.status > 1 || reportTarget.reportRemarks != null">
  100. <p class="texttitle texttitledaily">
  101. <span class="opint"></span>
  102. <span v-if="reportTarget.status == 1">待审批</span>
  103. <span v-if="reportTarget.status == 3">审批完成</span>
  104. <span v-if="reportTarget.status == 2">退回重写</span>
  105. <span v-if="reportTarget.status == -1">过期未汇报</span>
  106. <span v-if="reportTarget.status > 1"><{{ ptitle }}审批></span>
  107. </p>
  108. <div style="padding: 10px 0" v-if="reportTarget.status > 1">
  109. <van-rate
  110. v-model="reportTarget.number"
  111. :size="25"
  112. readonly
  113. color="#ffd21e"
  114. void-icon="star"
  115. void-color="#eee" /><span class="rateText"
  116. >&nbsp;&nbsp;&nbsp;&nbsp;{{ reportTarget.number }}分</span
  117. >
  118. </div>
  119. <p class="contentContainerTitle" v-if="reportTarget.status > 1">评语</p>
  120. <div style="padding: 10px 0" v-if="reportTarget.status > 1">
  121. <van-field v-model="successContent" rows="4" autosize readonly type="textarea" />
  122. </div>
  123. </div>
  124. <div class="contentContainer" v-if="reportTarget.reportRemarks != null">
  125. <div>
  126. <div v-for="(item, index) in reportTarget.reportRemarks" :key="index">
  127. <div class="contentContainerTitle redisplay">
  128. <div class="nameTitle">
  129. <template v-if="item.deptName">{{ item.deptName }}-</template
  130. >{{ item.postName }}-{{ item.nickName }}点评
  131. </div>
  132. <div
  133. class="shareBtn"
  134. @click="clickShareFlag(index)"
  135. v-if="reportTarget && source != 'share'">
  136. <van-icon name="share" />
  137. </div>
  138. </div>
  139. <p class="contentContainerTitle">
  140. <template v-if="item.deptName">{{ item.deptName }}-</template>{{ item.postName }}-{{
  141. item.nickName
  142. }}点评
  143. </p>
  144. <div style="padding: 10px 0">
  145. <van-field
  146. v-model="item.remarkContent"
  147. rows="4"
  148. autosize
  149. readonly
  150. type="textarea" />
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. <div class="contentContainer" v-if="reportTarget.reportRemarks != null">
  156. <p class="contentContainerTitle">点评</p>
  157. <div style="padding: 10px 0">
  158. <van-field
  159. v-model="managerRemarkContent"
  160. rows="4"
  161. autosize
  162. maxlength="800"
  163. show-word-limit
  164. type="textarea"
  165. :formatter="formatter" />
  166. </div>
  167. </div>
  168. </div>
  169. <br />
  170. <div class="contentborder" v-if="reportTarget.status == 2">
  171. <van-button type="info" size="small" plain class="Btn1" @click="submint"
  172. >重新填写</van-button
  173. >
  174. </div>
  175. <br />
  176. <div class="contentborder" v-if="reportTarget.reportRemarks != null">
  177. <van-button type="info" size="small" plain class="Btn1" @click="submintRemark"
  178. >提交点评</van-button
  179. >
  180. </div>
  181. <br />
  182. <br />
  183. </div>
  184. <share
  185. v-if="setShareFlag"
  186. :reportTarget="reportTarget"
  187. :reportId="$route.query.reportId"
  188. @setShareImg="setShareImg"
  189. @setDailyDetailsBox="setDailyDetailsBox"
  190. :urlList="urlList"
  191. :reportRemarksIndex="reportRemarksIndex"
  192. :reportContents="reportContents"
  193. :checkedPlan="checkedPlan"
  194. :isTarget="isTarget"
  195. :isReportCustom="isReportCustom"
  196. :isHistory="reportTarget.isHistory"></share>
  197. <!--分享图片列表 -->
  198. <el-dialog
  199. title="选择分享的内容"
  200. :visible.sync="shareImgFlag"
  201. width="90%"
  202. :append-to-body="true"
  203. :close-on-click-modal="false"
  204. @close="wuliaoTableClose"
  205. custom-class="shareImgFlag">
  206. <div>
  207. <!-- <p style="margin-bottom: 10px; margin-top: 0; display: flex">
  208. 今日总结&明日规划的文本内容<van-checkbox
  209. v-model="checkedPlan"
  210. style="margin-left: 10px"></van-checkbox>
  211. </p> -->
  212. <p
  213. style="
  214. margin-bottom: 10px;
  215. margin-top: 0;
  216. display: flex;
  217. align-items: center;
  218. cursor: pointer;
  219. "
  220. v-if="reportTarget.isHistory == '0'"
  221. @click="isTarget = !isTarget">
  222. <van-checkbox v-model="isTarget" style="margin-right: 10px" @click.stop></van-checkbox>
  223. <span>日报指标</span>
  224. </p>
  225. <p
  226. style="
  227. margin-bottom: 10px;
  228. margin-top: 0;
  229. display: flex;
  230. align-items: center;
  231. cursor: pointer;
  232. "
  233. v-if="reportTarget.isHistory == '0'"
  234. @click="isReportCustom = !isReportCustom">
  235. <van-checkbox
  236. v-model="isReportCustom"
  237. style="margin-right: 10px"
  238. @click.stop></van-checkbox>
  239. <span>日报填写内容</span>
  240. </p>
  241. <template v-if="reportTarget.photoSummary">
  242. <p style="margin-top: 0">请点击勾选想要分享的今日拜访照片</p>
  243. <div class="shareVisitImg">
  244. <template v-for="(itemImg, indexImg) in reportTarget.photoSummary">
  245. <div>
  246. <img :src="itemImg.fileUrl" alt="" @click="selectImg(itemImg)" />
  247. <van-icon
  248. @click.stop
  249. name="success"
  250. class="activaImg"
  251. color="#fff"
  252. size="15"
  253. style="
  254. position: absolute;
  255. right: 0;
  256. bottom: 0;
  257. /* margin: -15px 0 0 -15px; */
  258. pointer-events: none;
  259. background: #2b73cf;
  260. border: 2px solid #fff;
  261. "
  262. v-if="itemImg.checked" />
  263. </div>
  264. </template>
  265. </div>
  266. </template>
  267. </div>
  268. <span slot="footer" class="footer-btn">
  269. <van-button plain type="primary" @click="shareImgFlag = false">取 消</van-button>
  270. <van-button type="primary" @click="confirmShare">确 定</van-button>
  271. </span>
  272. </el-dialog>
  273. </div>
  274. </template>
  275. <script>
  276. import history from '@/assets/Icon/history.png';
  277. import {
  278. userTodayPlanNum,
  279. loginLog,
  280. getDetailById,
  281. getReportInfo,
  282. buryingPoint,
  283. getDictOption,
  284. insertRemark,
  285. } from '@/api/index';
  286. import { ImagePreview } from 'vant';
  287. import visitedRealTime from '@/views/componentsTarget/visitedRealTime';
  288. import createStoreBJ from '@/views/componentsTarget/createStoreBJ';
  289. import placeOrder from '@/views/componentsTarget/placeOrder';
  290. import ZYPlaceOrder from '@/views/componentsTarget/ZYPlaceOrder';
  291. import performanceSAP from '@/views/componentsTarget/performanceSAP';
  292. import ZYSAP from '@/views/componentsTarget/ZYSAP';
  293. import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
  294. import share from '@/components/share';
  295. import chatBIReport from './chatBIReport.vue';
  296. import reportCustom from './reportCustom';
  297. import target from './target.vue';
  298. import Atarget from '@/views/home/Atarget.vue';
  299. import Btarget from '@/views/home/Btarget.vue';
  300. export default {
  301. name: 'dailyDetails',
  302. components: {
  303. visitedRealTime,
  304. createStoreBJ,
  305. placeOrder,
  306. ZYPlaceOrder,
  307. performanceSAP,
  308. ZYSAP,
  309. veryGoodPlaceOrder,
  310. share,
  311. chatBIReport,
  312. reportCustom,
  313. target,
  314. Atarget,
  315. Btarget,
  316. },
  317. data() {
  318. return {
  319. show: true,
  320. num: 0,
  321. todayGoal: {},
  322. progressWidth: 0,
  323. history: history,
  324. imgArr: [],
  325. activeNames: [
  326. '1',
  327. '2',
  328. '3',
  329. '4',
  330. '5',
  331. '6',
  332. '7',
  333. '8',
  334. '10',
  335. '16',
  336. '17',
  337. '20',
  338. '21',
  339. '22',
  340. '23',
  341. '11',
  342. '29',
  343. '33',
  344. '40',
  345. '41',
  346. '42',
  347. '43',
  348. ],
  349. value: '2',
  350. message: '',
  351. powerGrade: '',
  352. Content: '',
  353. Content2: '',
  354. reportTargetAll: {},
  355. reportContents: [],
  356. reportTarget: {},
  357. successContent: '',
  358. projectFollowNum: '',
  359. tucReportingSuccessNum: '',
  360. tucUndertakingNum: '',
  361. imgList: [],
  362. type: '-1',
  363. JZQuota: false,
  364. GZQuota: false,
  365. YFQuota: false, //应用服务
  366. titlejz: '',
  367. saptitle: '业绩目标SAP(千元)',
  368. ptitle: '',
  369. setShareFlag: false,
  370. source: '',
  371. reportRemarksIndex: -1,
  372. shareImgFlag: false,
  373. urlList: [],
  374. title: '',
  375. setDailyDetailsBoxFlag: true,
  376. sourceType: '',
  377. checkedPlan: true, //今日总结&明日规划
  378. shareVisible: true,
  379. visitIMG1Flag: false,
  380. shareReportConfig: null,
  381. managerRemarkContent: '',
  382. postName: '',
  383. homePageIndicatorList: null,
  384. isTarget: false, //日报指标
  385. isReportCustom: true, //日报填写内容
  386. };
  387. },
  388. created() {
  389. this.getDetailById();
  390. },
  391. watch: {
  392. $route(to, from) {
  393. this.powerGrade = localStorage.getItem('powerGrade');
  394. if (to.path == '/dailyDetails') {
  395. this.getDetailById();
  396. }
  397. // &&from.path=="/dailyApprovalList"
  398. // if(to.path=="/dailyDetails"&&from.path=="/myHistoricalDaily"){
  399. // this.getDetailById()
  400. // }
  401. },
  402. },
  403. activated() {
  404. this.source = this.$route.query.source || '';
  405. this.sourceType = this.$route.query.sourceType || '';
  406. this.powerGrade = localStorage.getItem('powerGrade');
  407. this.setDailyDetailsBoxFlag = true;
  408. this.shareImgFlag = false;
  409. this.num = 0;
  410. this.userTodayPlanNum();
  411. this.setShareFlag = false;
  412. },
  413. methods: {
  414. setVisitIMG1Flag(item) {
  415. // this.$set(item, 'visitIMG1Flag', !item.visitIMG1Flag);
  416. this.$forceUpdate();
  417. },
  418. setDailyDetailsBox(flag) {
  419. this.setDailyDetailsBoxFlag = flag;
  420. },
  421. setShareImg(flag) {
  422. this.setShareFlag = flag;
  423. },
  424. // 打开分享
  425. clickShareFlag(index = -1) {
  426. buryingPoint({
  427. systemModel: '日报审核',
  428. buryingPointType: 2,
  429. buryingPointValue: this.$route.query.reportId,
  430. buryingPointName: '日报详情分享',
  431. buryingPointPosition: '日报详情',
  432. });
  433. this.isReportCustom = true;
  434. this.urlList = [];
  435. this.reportRemarksIndex = index;
  436. // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  437. if (this.reportTarget.isHistory == '0') {
  438. this.setPhotoSummary();
  439. this.shareImgFlag = true;
  440. } else {
  441. this.setPhotoSummary();
  442. // 没有图片直接打开分享
  443. if (this.reportTarget.photoSummary && this.reportTarget.photoSummary.length) {
  444. // 选择分享的图片
  445. this.setShareFlag = true;
  446. }
  447. }
  448. },
  449. setPhotoSummary() {
  450. if (this.reportTarget.photoSummary && this.reportTarget.photoSummary.length) {
  451. // 重置分享图片状态
  452. this.reportTarget.photoSummary.forEach((item) => {
  453. this.$set(item, 'checked', false);
  454. });
  455. }
  456. },
  457. // 确认分享
  458. confirmShare() {
  459. // 旧的分享没有图标不会进来
  460. // 是否有图片
  461. if (this.reportTarget.photoSummary) {
  462. this.reportTarget.photoSummary.forEach((item) => {
  463. if (item.checked) this.urlList.push(item.fileUrl);
  464. });
  465. if (this.reportTarget.isHistory == '0') {
  466. if (this.urlList.length == 0 && !this.isTarget && !this.isReportCustom) {
  467. this.$notify({
  468. type: 'warning',
  469. message: '请选择分享内容!',
  470. className: 'notifyIndex',
  471. });
  472. return;
  473. }
  474. } else {
  475. if (this.urlList.length == 0 && !this.checkedPlan) {
  476. this.$notify({
  477. type: 'warning',
  478. message: '请选择分享内容!',
  479. className: 'notifyIndex',
  480. });
  481. return;
  482. }
  483. }
  484. } else {
  485. if (this.reportTarget.isHistory == '0') {
  486. if (!this.isTarget && !this.isReportCustom) {
  487. this.$notify({
  488. type: 'warning',
  489. message: '请选择分享内容!',
  490. className: 'notifyIndex',
  491. });
  492. return;
  493. }
  494. }
  495. }
  496. buryingPoint({
  497. systemModel: '日报审核',
  498. buryingPointType: 2,
  499. buryingPointValue: `文本${this.checkedPlan ? '是' : '否'},图片${this.urlList.length}`,
  500. buryingPointName: '日报分享确认',
  501. buryingPointPosition: '日报详情',
  502. });
  503. this.shareImgFlag = false;
  504. this.setShareFlag = true;
  505. },
  506. pviewFn(index) {
  507. var imgList = [];
  508. var photos = this.reportTarget.photoSummary;
  509. for (let i = 0; i < photos.length; i++) {
  510. imgList.push(photos[i].fileUrl);
  511. }
  512. ImagePreview({ images: imgList, startPosition: index });
  513. },
  514. submint() {
  515. this.$router.push({
  516. path: '/daily',
  517. query: { reportId: this.$route.query.reportId, temporaryShow: 'N' },
  518. });
  519. },
  520. submintRemark() {
  521. let loading1 = this.$toast.loading({
  522. duration: 0,
  523. message: '数据提交中...',
  524. forbidClick: true,
  525. });
  526. if (this.managerRemarkContent.trim() == '') {
  527. this.$toast('点评内容未填写');
  528. return false;
  529. }
  530. if (this.managerRemarkContent.length > 800) {
  531. this.$toast('点评内容超过800字');
  532. return false;
  533. }
  534. var remak = {
  535. remarkContent: this.managerRemarkContent,
  536. reportId: this.$route.query.reportId,
  537. };
  538. insertRemark(remak).then((res) => {
  539. loading1.clear();
  540. if (res.code == 200) {
  541. this.$dialog
  542. .alert({
  543. title: '系统提示',
  544. message: '提交成功',
  545. })
  546. .then(() => {
  547. this.managerRemarkContent = '';
  548. this.getDetailById();
  549. });
  550. } else {
  551. this.$toast.fail(res.msg);
  552. }
  553. });
  554. },
  555. formatter(value) {
  556. return value.replace(
  557. /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
  558. '',
  559. );
  560. },
  561. getDetailById() {
  562. let loading1 = this.$toast.loading({
  563. duration: 0,
  564. message: '加载中...',
  565. forbidClick: true,
  566. });
  567. // 获取店招异常原因字典
  568. getDictOption({}, 'share_report_config').then((res) => {
  569. this.shareReportConfig = res.data;
  570. });
  571. getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
  572. loading1.clear();
  573. this.homePageIndicatorList = res.data.homePageIndicatorList;
  574. this.postName = res.data.postName;
  575. this.reportTargetAll = res.data.reportTargetAll;
  576. this.reportTarget = res.data;
  577. this.JZQuota = false;
  578. this.GZQuota = false;
  579. this.YFQuota = res.data.postType == 'YF' ? true : false;
  580. this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;
  581. this.title =
  582. res.data.deptName + '-' + res.data.postName + '-' + res.data.nickName + '的日报';
  583. if (res.data.postType == 'JZ') {
  584. this.JZQuota = true;
  585. } else if (res.data.postType == 'GZ') {
  586. this.GZQuota = true;
  587. this.saptitle = '公裝业绩SAP(千元)';
  588. } else {
  589. this.saptitle = '业绩目标SAP(千元)';
  590. }
  591. this.type = res.data.userType;
  592. if (res.data.status == 3) {
  593. this.successContent = res.data.successContent;
  594. } else {
  595. this.successContent = res.data.failContent;
  596. }
  597. this.Content = '';
  598. this.Content2 = '';
  599. this.reportContents = [];
  600. // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  601. if (this.reportTarget.isHistory == '0') {
  602. if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
  603. for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
  604. let sfaReportCustomCollections =
  605. this.reportTarget.customTaskList[x].sfaReportCustomCollections;
  606. if (sfaReportCustomCollections) {
  607. for (let y = 0; y < sfaReportCustomCollections.length; y++) {
  608. let custom = this.shareReportConfig.filter(
  609. (val) =>
  610. val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName,
  611. );
  612. if (custom.length) {
  613. custom[0].content = sfaReportCustomCollections[y].answerValue;
  614. this.reportContents = this.reportContents.concat(custom);
  615. }
  616. }
  617. }
  618. }
  619. }
  620. } else {
  621. if (res.data.reportContents.length > 0) {
  622. this.Content = res.data.reportContents[0].dayContent;
  623. if (res.data.reportContents.length > 1) {
  624. this.Content2 = res.data.reportContents[1].dayContent;
  625. } else {
  626. this.Content2 = '';
  627. }
  628. if (res.data.reportContents.length > 2) {
  629. this.projectFollowNum = res.data.reportContents[2].projectFollowNum;
  630. this.tucReportingSuccessNum = res.data.reportContents[3].tucReportingSuccessNum;
  631. }
  632. }
  633. this.reportContents = [
  634. {
  635. dictValue: '今日机会与挑战总结',
  636. content: this.Content,
  637. },
  638. {
  639. dictValue: '明日工作计划',
  640. content: this.Content2,
  641. },
  642. ];
  643. }
  644. var imgList = [];
  645. if (res.data.photoSummary != null) {
  646. for (var k = 0; k < res.data.photoSummary.length; k++) {
  647. imgList.push(res.data.photoSummary[k].fileUrl + '');
  648. }
  649. }
  650. console.log(res.data.photoSummary);
  651. this.imgList = imgList;
  652. if (this.sourceType == 'daily') {
  653. this.$nextTick(() => {
  654. this.clickShareFlag(-1);
  655. });
  656. }
  657. });
  658. },
  659. userTodayPlanNum() {
  660. userTodayPlanNum().then((res) => {
  661. if (res.code == 200) {
  662. this.todayGoal = res.data;
  663. this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + '%';
  664. localStorage.setItem('nickName', res.data.user.nickName);
  665. localStorage.setItem('storeType', res.data.user.type);
  666. } else {
  667. this.$toast.fail(res.msg);
  668. }
  669. });
  670. },
  671. onClickLeft() {
  672. this.$router.replace({
  673. path: 'myHistoricalDaily',
  674. });
  675. },
  676. wuliaoTableClose() {
  677. this.shareImgFlag = false;
  678. },
  679. // 选中的图片
  680. selectImg(item) {
  681. this.$set(item, 'checked', !item.checked);
  682. console.log(item);
  683. },
  684. },
  685. };
  686. </script>
  687. <style scoped lang="scss">
  688. .dailyDetails {
  689. position: relative;
  690. // background: #fff;
  691. width: 100%;
  692. height: 100%;
  693. .shareBtn {
  694. width: 30px;
  695. height: 30px;
  696. border-radius: 50%;
  697. background: #666;
  698. display: flex;
  699. align-items: center;
  700. justify-content: center;
  701. position: relative;
  702. .van-icon-share {
  703. color: #fff;
  704. }
  705. .vedioLinks {
  706. max-width: vw(190);
  707. position: absolute;
  708. bottom: 1px;
  709. background: #dae7f6;
  710. padding: 2px 7px;
  711. /* word-break: keep-all; */
  712. white-space: nowrap;
  713. /* text-overflow: ellipsis; */
  714. right: 0;
  715. border-radius: 5px;
  716. font-size: 8px;
  717. right: 40px;
  718. display: flex;
  719. flex-direction: column;
  720. justify-content: center;
  721. align-items: flex-start;
  722. z-index: 999999;
  723. span {
  724. line-height: 13px;
  725. }
  726. .linkSpan {
  727. text-decoration: underline;
  728. }
  729. .van-icon-play {
  730. position: absolute;
  731. top: 12px;
  732. /* transform: rotate(270deg); */
  733. right: -8px;
  734. color: #dae7f6;
  735. }
  736. }
  737. }
  738. }
  739. .container {
  740. margin: 10px;
  741. }
  742. .container .van-collapse-item {
  743. margin-bottom: 10px;
  744. border-radius: 6px;
  745. overflow: hidden;
  746. }
  747. .linep p {
  748. margin: 6px 0 0 0;
  749. font-size: 14px;
  750. color: #666;
  751. }
  752. .linep .texttitle {
  753. color: #0057ba;
  754. position: relative;
  755. padding-left: 10px;
  756. }
  757. .linep .texttitledaily {
  758. color: #000;
  759. position: relative;
  760. padding-left: 10px;
  761. }
  762. .linep .texttitle2 {
  763. padding-left: 0;
  764. }
  765. .linep .texttitledaily .opint {
  766. position: absolute;
  767. left: 0px;
  768. top: 6px;
  769. margin-right: 6px;
  770. display: inline-block;
  771. width: 6px;
  772. height: 6px;
  773. border-radius: 10px;
  774. background-color: #0057ba;
  775. }
  776. .leftTitle {
  777. background-color: #74a4d9;
  778. color: #fff;
  779. display: inline-block;
  780. padding: 0 4px;
  781. border-radius: 2px;
  782. }
  783. .rightTitle {
  784. background-color: #e7b4bb;
  785. color: #fff;
  786. display: inline-block;
  787. padding: 0 4px;
  788. border-radius: 2px;
  789. }
  790. .redisplay {
  791. display: flex;
  792. align-items: center;
  793. justify-content: space-between;
  794. .nameTitle {
  795. flex: 1;
  796. }
  797. }
  798. </style>
  799. <style lang="scss">
  800. .linep .van-cell__title {
  801. color: #1e5398;
  802. font-weight: 500;
  803. }
  804. .linep .contentContainer {
  805. background-color: white;
  806. border-radius: 8px;
  807. padding: 10px 16px;
  808. margin-bottom: 10px;
  809. }
  810. .linep .contentContainer .contentContainerTitle {
  811. color: #222;
  812. }
  813. .linep .contentContainer .contentContainerTitle span {
  814. font-size: 12px;
  815. color: #666;
  816. }
  817. .linep .contentContainer .van-field__control {
  818. background-color: #ebf4ff;
  819. padding: 10px;
  820. border-radius: 8px;
  821. }
  822. .linep .contentContainer .van-cell {
  823. padding: 0;
  824. }
  825. .colorbalck {
  826. color: #333;
  827. }
  828. .visitIMG1 {
  829. img {
  830. display: block;
  831. width: 100%;
  832. height: 75px;
  833. border-radius: 6px;
  834. }
  835. }
  836. .el-dialog__wrapper {
  837. z-index: 9999 !important;
  838. display: flex;
  839. justify-content: center;
  840. align-items: center;
  841. background: rgba(0, 0, 0, 0.5) !important;
  842. .shareImgFlag {
  843. overflow: hidden;
  844. display: flex;
  845. flex-direction: column;
  846. max-height: 70%;
  847. margin-top: 0 !important;
  848. border-radius: 12px;
  849. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  850. z-index: 10000;
  851. .el-dialog__header {
  852. height: 50px;
  853. display: flex;
  854. align-items: center;
  855. justify-content: center;
  856. border-bottom: 1px solid #ebeef5;
  857. padding: 0 20px;
  858. background-color: #fff;
  859. .el-dialog__title {
  860. font-size: 16px;
  861. font-weight: 500;
  862. color: #303133;
  863. }
  864. .el-dialog__headerbtn {
  865. position: absolute;
  866. right: 15px;
  867. top: 15px;
  868. }
  869. }
  870. .el-dialog__body {
  871. padding: 20px !important;
  872. overflow-y: auto;
  873. flex: 1;
  874. background-color: #fff;
  875. }
  876. .cell {
  877. font-size: 12px;
  878. }
  879. .footer-btn {
  880. display: flex;
  881. justify-content: center;
  882. gap: 30px;
  883. padding: 15px 20px;
  884. border-top: 1px solid #ebeef5;
  885. background-color: #fff;
  886. border-radius: 0 0 12px 12px;
  887. margin-top: 0 !important;
  888. button {
  889. width: 120px;
  890. height: 36px;
  891. border-radius: 18px;
  892. }
  893. .van-button--primary {
  894. background-color: #2b73cf;
  895. border-color: #2b73cf;
  896. }
  897. .van-button--primary.van-button--plain {
  898. color: #999;
  899. border-color: #dcdfe6;
  900. background-color: #f5f7fa;
  901. }
  902. }
  903. }
  904. }
  905. .shareImgFlag {
  906. .shareVisitImg {
  907. display: flex;
  908. flex-wrap: wrap;
  909. div {
  910. width: 22%;
  911. height: 80px;
  912. margin-right: 3%;
  913. margin-top: 10px;
  914. position: relative;
  915. border-radius: 8px;
  916. overflow: hidden;
  917. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  918. img {
  919. width: 100%;
  920. height: 100%;
  921. object-fit: cover;
  922. }
  923. }
  924. }
  925. .el-dialog__title {
  926. height: 50px;
  927. line-height: 50px !important;
  928. }
  929. .el-dialog__footer {
  930. padding: 0;
  931. }
  932. }
  933. .notifyIndex {
  934. z-index: 999999 !important;
  935. }
  936. .table-headermd {
  937. font-size: 12px;
  938. text-align: center;
  939. position: initial;
  940. width: 98% !important;
  941. margin: 0 auto;
  942. border-right: 0;
  943. border-radius: 10px;
  944. .el-table__cell {
  945. padding: 6px 0 !important;
  946. }
  947. }
  948. .table-headermd th.el-table__cell {
  949. background-color: #1989fa;
  950. color: #fff;
  951. }
  952. .van-nav-bar__right:active {
  953. opacity: 1 !important;
  954. }
  955. </style>