doubleWeekly.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. <template>
  2. <div>
  3. <!-- 顶部条-->
  4. <div class="navBarTOP">
  5. <van-nav-bar class="navBar" title="填写半月报" left-arrow @click-left="onClickLeft">
  6. <template #right>
  7. <span
  8. v-if="temporaryShow != 'N'"
  9. @click="tsContentsFn"
  10. style="
  11. color: white;
  12. background: #74a4d9;
  13. display: block;
  14. padding: 6px 10px;
  15. border-radius: 6px;
  16. "
  17. >暂存</span
  18. >
  19. </template>
  20. </van-nav-bar>
  21. </div>
  22. <!-- 主体内容-->
  23. <div class="container linepAdd">
  24. <div class="lineGrey"></div>
  25. <div class="lineGrey"></div>
  26. <div class="lineGrey"></div>
  27. <div class="lineGrey"></div>
  28. <div class="lineGrey"></div>
  29. <van-collapse v-model="activeNames">
  30. <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
  31. <!-- 0-历史指标 1-动态指标,String类型 -->
  32. <template v-if="reportTarget.targetType == '1'">
  33. <target :homePageIndicatorDate="homePageIndicatorList"></target>
  34. </template>
  35. <template v-if="reportTarget.targetType == '0'">
  36. <Atarget :reportInfo="reportTarget"></Atarget>
  37. <Btarget :reportInfo="reportTarget"></Btarget>
  38. </template>
  39. </template>
  40. <template v-else>
  41. <Atarget :reportInfo="reportTarget"></Atarget>
  42. <Btarget :reportInfo="reportTarget"></Btarget>
  43. </template>
  44. <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
  45. <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
  46. <reportCustom
  47. ref="reportCustom"
  48. :reportCustomData="reportTarget.customTaskList"></reportCustom>
  49. </div>
  50. <template v-else>
  51. <van-collapse-item title="上期工作成果" name="7" class="collapsettitle">
  52. <template #title>
  53. <div>上期工作成果 <span class="colorRed">(必填)</span></div>
  54. </template>
  55. <div style="margin-top: -10px">
  56. <div class="weekContent" v-for="(item2, index2) in reportContentsList2" :key="index2">
  57. <!-- <p class="texttitle"><span class="opint"></span><span>{{ item2.title }}</span><span-->
  58. <!-- class="colorRed">(必填)</span></p>-->
  59. <p class="texttitle texttitle2">计划工作进度</p>
  60. <p class="contentContainerp1">
  61. <van-field
  62. v-model="reportContentsList3[index2].doubleWeekContent"
  63. rows="4"
  64. autosize
  65. readonly
  66. :formatter="formatter"
  67. type="textarea" />
  68. </p>
  69. <!-- <p style="min-height: 32px;">{{ reportContentsList3[index2].doubleWeekContent }}</p>-->
  70. <p class="texttitle texttitle2">实际工作进度</p>
  71. <p class="contentContainerp">
  72. <van-field
  73. v-model="item2.doubleWeekContent"
  74. rows="4"
  75. autosize
  76. maxlength="800"
  77. :formatter="formatter"
  78. type="textarea"
  79. show-word-limit />
  80. </p>
  81. </div>
  82. </div>
  83. </van-collapse-item>
  84. <van-collapse-item title="本期工作规划" name="8" class="collapsettitle">
  85. <template #title>
  86. <div>本期工作规划 <span class="colorRed">(必填)</span></div>
  87. </template>
  88. <div style="margin-top: -10px">
  89. <div class="weekContent" v-for="(item, index) in reportContentsList1" :key="index">
  90. <p class="contentContainerp">
  91. <van-field
  92. v-model="item.doubleWeekContent"
  93. rows="4"
  94. autosize
  95. maxlength="800"
  96. type="textarea"
  97. show-word-limit
  98. :formatter="formatter" />
  99. </p>
  100. </div>
  101. </div>
  102. </van-collapse-item>
  103. </template>
  104. </van-collapse>
  105. <br />
  106. <br />
  107. <van-button type="info" size="small" plain class="Btn100" @click="submint"
  108. >提交半月报</van-button
  109. >
  110. </div>
  111. <br />
  112. <br />
  113. </div>
  114. </template>
  115. <script>
  116. import {
  117. getDetailById,
  118. double_week_type,
  119. updateReport,
  120. getReportInfo,
  121. tsContents,
  122. } from '@/api/index';
  123. import createStoreBJ from '@/views/componentsTarget/createStoreBJ';
  124. import ZYPlaceOrder from '@/views/componentsTarget/ZYPlaceOrder';
  125. import performanceSAP from '@/views/componentsTarget/performanceSAP';
  126. import ZYSAP from '@/views/componentsTarget/ZYSAP';
  127. import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
  128. import neiwaiqiangpingtu from '@/views/componentsTarget/neiwaiqiangpingtu';
  129. import zhiganwaiqiangSAP from '@/views/componentsTarget/zhiganwaiqiangSAP';
  130. import Atarget from '@/views/home/Atarget.vue';
  131. import Btarget from '@/views/home/Btarget.vue';
  132. import reportCustom from './reportCustom.vue';
  133. import target from './target.vue';
  134. export default {
  135. name: 'home',
  136. components: {
  137. createStoreBJ,
  138. ZYPlaceOrder,
  139. performanceSAP,
  140. ZYSAP,
  141. veryGoodPlaceOrder,
  142. neiwaiqiangpingtu,
  143. zhiganwaiqiangSAP,
  144. Atarget,
  145. Btarget,
  146. reportCustom,
  147. target,
  148. },
  149. data() {
  150. return {
  151. activeNames: [
  152. '1',
  153. '2',
  154. '3',
  155. '4',
  156. '5',
  157. '6',
  158. '7',
  159. '8',
  160. '11',
  161. '12',
  162. '16',
  163. '17',
  164. '27',
  165. '28',
  166. '29',
  167. ],
  168. powerGrade: '',
  169. value: '2',
  170. isclick: true,
  171. reportTargetAll: {},
  172. reportTarget: {},
  173. reportContentsList1: [],
  174. reportContentsList2: [],
  175. reportContentsList3: [],
  176. weekType: [],
  177. temporaryShow: '',
  178. type: '-1',
  179. JZQuota: false,
  180. homePageIndicatorList: null,
  181. };
  182. },
  183. created() {
  184. this.powerGrade = localStorage.getItem('powerGrade');
  185. this.temporaryShow = this.$route.query.temporaryShow;
  186. double_week_type().then((res) => {
  187. this.weekType = res.data;
  188. });
  189. if (this.$route.query.reportId != undefined) {
  190. this.getDetailById();
  191. } else {
  192. this.getReportInfo();
  193. }
  194. },
  195. watch: {
  196. $route(to, from) {
  197. this.powerGrade = localStorage.getItem('powerGrade');
  198. this.getReportInfo();
  199. this.temporaryShow = this.$route.query.temporaryShow;
  200. if (to.path == '/doubleWeekly') {
  201. if (this.$route.query.reportId != undefined) {
  202. this.getDetailById();
  203. } else {
  204. this.getReportInfo();
  205. }
  206. }
  207. // &&from.path=="/home"
  208. // if(to.path=="/doubleWeekly"&&from.path=="/myHistoricalDaily"){
  209. // if(this.$route.query.reportId!=undefined){
  210. // this.getDetailById()
  211. // }else{
  212. // this.getReportInfo()
  213. // }
  214. // }
  215. },
  216. },
  217. methods: {
  218. formatter(value) {
  219. return value.replace(
  220. /[\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,
  221. '',
  222. );
  223. },
  224. getDetailById() {
  225. let loading1 = this.$toast.loading({
  226. duration: 0,
  227. message: '加载中...',
  228. forbidClick: true,
  229. });
  230. getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
  231. loading1.clear();
  232. if (res.code == 200) {
  233. this.JZQuota = false;
  234. if (res.data.postType == 'JZ') {
  235. this.JZQuota = true;
  236. }
  237. if (res.data.status != '0' && res.data.status != '2') {
  238. this.$dialog
  239. .alert({
  240. title: '系统提示',
  241. message: '半月报已提交或过期',
  242. })
  243. .then(() => {
  244. window.location.replace(window.location.origin + '/mobile/home');
  245. });
  246. } else {
  247. this.homePageIndicatorList = res.data.homePageIndicatorList || null;
  248. this.reportTargetAll = res.data.reportTargetAll;
  249. this.reportTarget = res.data;
  250. this.type = res.data.userType;
  251. this.reportContents = res.data.reportContents;
  252. var reportContentsList1 = [];
  253. var reportContentsList2 = [];
  254. var reportContentsList3 = [];
  255. var reportContentsdata = res.data.reportContents;
  256. for (var i = 0; i < res.data.reportContents.length; i++) {
  257. reportContentsdata[i].title = this.selectDictLabel(
  258. this.weekType,
  259. res.data.reportContents[i].doubleWeekType,
  260. );
  261. if (res.data.reportContents[i].type == '2') {
  262. reportContentsList1.push(reportContentsdata[i]);
  263. }
  264. if (res.data.reportContents[i].type == '3') {
  265. reportContentsList2.push(reportContentsdata[i]);
  266. }
  267. if (res.data.reportContents[i].type == '1') {
  268. reportContentsList3.push(reportContentsdata[i]);
  269. }
  270. }
  271. // var ln1 = reportContentsList1.length
  272. // var ln2 = reportContentsList3.length
  273. // if (reportContentsList1.length > reportContentsList3.length) {
  274. // var len = ln1 - ln2
  275. // for (var x = 0; x < len; x++) {
  276. // reportContentsList3.push({
  277. // // contentTime: "",
  278. // // weekContentAm: "",
  279. // doubleWeekContent: "",
  280. // })
  281. // }
  282. // }
  283. if (reportContentsdata.length == 0) {
  284. // for (var i = 0; i < 6; i++) {
  285. // var doubleWeekType = ""
  286. // var title = ""
  287. // if (i == "0") {
  288. // doubleWeekType = "cpm"
  289. // title = "产品"
  290. //
  291. // }
  292. // if (i == "1") {
  293. // doubleWeekType = "qdm"
  294. // title = "渠道"
  295. // }
  296. // if (i == "2") {
  297. // doubleWeekType = "yym"
  298. // title = "运营"
  299. // }
  300. // if (i == "3") {
  301. // doubleWeekType = "jpm"
  302. // title = "竞品"
  303. // }
  304. // if (i == "4") {
  305. // doubleWeekType = "cwm"
  306. // title = "财务"
  307. // }
  308. // if (i == "5") {
  309. // doubleWeekType = "rlm"
  310. // title = "人力"
  311. // }
  312. reportContentsList1.push({
  313. title: '',
  314. doubleWeekContent: '',
  315. doubleWeekType: '',
  316. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  317. type: 2,
  318. });
  319. reportContentsList3.push({
  320. title: '',
  321. doubleWeekContent: '',
  322. doubleWeekType: '',
  323. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  324. type: 1,
  325. });
  326. reportContentsList2.push({
  327. title: '',
  328. doubleWeekContent: '',
  329. doubleWeekType: '',
  330. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  331. type: 3,
  332. });
  333. } else {
  334. if (reportContentsList1.length < 1) {
  335. reportContentsList1.push({
  336. title: '',
  337. doubleWeekContent: '',
  338. doubleWeekType: '',
  339. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  340. type: 2,
  341. });
  342. }
  343. if (reportContentsList3.length < 1) {
  344. reportContentsList3.push({
  345. title: '',
  346. doubleWeekContent: '',
  347. doubleWeekType: '',
  348. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  349. type: 1,
  350. });
  351. }
  352. if (reportContentsList2.length < 1) {
  353. reportContentsList2.push({
  354. title: '',
  355. doubleWeekContent: '',
  356. doubleWeekType: '',
  357. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  358. type: 3,
  359. });
  360. }
  361. }
  362. // }
  363. this.reportContentsList1 = reportContentsList2; // 1 2 2 3 3 1
  364. this.reportContentsList2 = reportContentsList1;
  365. this.reportContentsList3 = reportContentsList3;
  366. }
  367. } else {
  368. this.$toast(res.msg);
  369. }
  370. });
  371. },
  372. tsContentsFn() {
  373. if (this.isclick) {
  374. if (this.reportTarget.isHistory == '1') {
  375. this.reportTarget.reportContents = [];
  376. this.reportTarget.reportContents = this.reportContentsList2
  377. .concat(this.reportContentsList1)
  378. .concat(this.reportContentsList3);
  379. this.tsContentsFun(null);
  380. } else {
  381. // 新的
  382. if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
  383. // 配置任务
  384. this.filterReportCustomData((reportCustomAnswers) => {
  385. this.tsContentsFun(reportCustomAnswers);
  386. });
  387. } else {
  388. // 没有配置任务
  389. this.tsContentsFun(null);
  390. }
  391. }
  392. }
  393. },
  394. tsContentsFun(reportCustomAnswers) {
  395. let loading1 = this.$toast.loading({
  396. duration: 0,
  397. message: '数据提交中...',
  398. forbidClick: true,
  399. });
  400. if (reportCustomAnswers) this.reportTarget.reportCustomAnswers = reportCustomAnswers;
  401. this.reportTarget.status = '1';
  402. this.isclick = false;
  403. tsContents(this.reportTarget).then((res) => {
  404. loading1.clear();
  405. this.isclick = true;
  406. if (res.code == 200) {
  407. this.$dialog
  408. .alert({
  409. title: '系统提示',
  410. message: '暂存成功',
  411. })
  412. .then(() => {
  413. // if(this.$route.query.reportId!=undefined){
  414. // window.location.replace(window.location.origin+"/mobile/myHistoricalDaily")
  415. // }else{
  416. // window.location.replace(window.location.origin+"/mobile/home")
  417. // }
  418. });
  419. } else {
  420. this.$toast.fail(res.msg);
  421. }
  422. });
  423. },
  424. reportCustomTabstoreVal(callback) {
  425. // 必填校验
  426. this.$refs.reportCustom.$refs.tabstoreVal
  427. .validate()
  428. .then(() => {
  429. // 验证通过
  430. this.filterReportCustomData(callback);
  431. })
  432. .catch((errors) => {
  433. this.toastLoading().clear();
  434. return;
  435. });
  436. },
  437. filterReportCustomData(callback) {
  438. let reportCustomData = this.$refs.reportCustom ? this.$refs.reportCustom.fromData : {} || {};
  439. let reportCustomAnswers = [];
  440. for (let i = 0; i < reportCustomData.length; i++) {
  441. let customData = reportCustomData[i].sfaReportCustomCollections
  442. ? reportCustomData[i].sfaReportCustomCollections
  443. : [];
  444. for (let x = 0; x < customData.length; x++) {
  445. if (
  446. customData[x].reportCustomCollectionType == 'dx' ||
  447. customData[x].reportCustomCollectionType == 'duox'
  448. ) {
  449. let optionData = customData[x].sfaReportCustomOptions;
  450. for (let y = 0; y < optionData.length; y++) {
  451. if (optionData[y].answerValue == 'Y') {
  452. reportCustomAnswers.push({
  453. reportCustomTaskId: customData[x].reportCustomTaskId,
  454. reportCustomCollectionId: optionData[y].reportCustomCollectionId,
  455. reportCustomOptionId: optionData[y].reportCustomOptionId,
  456. answerValue: 'Y',
  457. });
  458. }
  459. }
  460. } else {
  461. if (customData[x].answerValue)
  462. reportCustomAnswers.push({
  463. reportCustomTaskId: customData[x].reportCustomTaskId,
  464. reportCustomCollectionId: customData[x].reportCustomCollectionId,
  465. answerValue: customData[x].answerValue,
  466. });
  467. }
  468. }
  469. }
  470. console.log(reportCustomAnswers);
  471. callback && callback(reportCustomAnswers);
  472. },
  473. // 提交日报
  474. submint() {
  475. if (this.isclick) {
  476. // 旧的
  477. if (this.reportTarget.isHistory == '1') {
  478. this.reportTarget.reportContents = [];
  479. for (var x = 0; x < this.reportContentsList2.length; x++) {
  480. if (this.reportContentsList2[x].doubleWeekContent.trim() == '') {
  481. this.$toast('请完善上期半月报内容!');
  482. return false;
  483. }
  484. }
  485. for (var j = 0; j < this.reportContentsList1.length; j++) {
  486. if (this.reportContentsList1[j].doubleWeekContent.trim() == '') {
  487. this.$toast('请完善本期半月报内容!');
  488. return false;
  489. }
  490. }
  491. if (this.reportContentsList2[0].doubleWeekContent.length > 800) {
  492. this.$toast('上期半月报内容超过800字!');
  493. return false;
  494. }
  495. if (this.reportContentsList1[0].doubleWeekContent.length > 800) {
  496. this.$toast('本期半月报内容超过800字!');
  497. return false;
  498. }
  499. this.reportTarget.reportContents = this.reportContentsList2
  500. .concat(this.reportContentsList1)
  501. .concat(this.reportContentsList3);
  502. this.submintFun();
  503. } else {
  504. // 新的
  505. if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
  506. // 配置任务
  507. this.reportCustomTabstoreVal((reportCustomAnswers) => {
  508. this.submintFun(reportCustomAnswers);
  509. });
  510. } else {
  511. // 没有配置任务
  512. this.submintFun(null);
  513. }
  514. }
  515. }
  516. },
  517. submintFun(reportCustomAnswers) {
  518. let loading1 = this.$toast.loading({
  519. duration: 0,
  520. message: '数据提交中...',
  521. forbidClick: true,
  522. });
  523. if (reportCustomAnswers) this.reportTarget.reportCustomAnswers = reportCustomAnswers;
  524. this.reportTarget.status = '1';
  525. this.isclick = false;
  526. updateReport(this.reportTarget).then((res) => {
  527. loading1.clear();
  528. this.isclick = true;
  529. if (res.code == 200) {
  530. this.$dialog
  531. .alert({
  532. title: '系统提示',
  533. message: '提交成功',
  534. })
  535. .then(() => {
  536. if (this.$route.query.reportId != undefined) {
  537. window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
  538. } else {
  539. this.onClickLeft();
  540. // window.location.replace(window.location.origin + '/mobile/home');
  541. }
  542. });
  543. } else {
  544. this.$toast.fail(res.msg);
  545. }
  546. });
  547. },
  548. getReportInfo() {
  549. let loading1 = this.$toast.loading({
  550. duration: 0,
  551. message: '加载中...',
  552. forbidClick: true,
  553. });
  554. getReportInfo({ isContent: true }).then((res) => {
  555. loading1.clear();
  556. localStorage.setItem('powerGrade', res.data.positionId);
  557. localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
  558. this.powerGrade = res.data.positionId;
  559. this.showButton = res.data.showButton;
  560. this.reportTargetAll = res.data.reportTargetAll;
  561. this.reportTarget = res.data;
  562. this.type = res.data.userType;
  563. this.homePageIndicatorList = res.data.homePageIndicatorList || null;
  564. var reportContentsList1 = [];
  565. var reportContentsList2 = [];
  566. var reportContentsList3 = [];
  567. if (res.data.reportContents.length == '0') {
  568. // for (var i = 0; i < 6; i++) {
  569. // var doubleWeekType = ""
  570. // var title = ""
  571. // if (i == "0") {
  572. // doubleWeekType = "cpm"
  573. // title = "产品"
  574. // }
  575. // if (i == "1") {
  576. // doubleWeekType = "qdm"
  577. // title = "渠道"
  578. // }
  579. // if (i == "2") {
  580. // doubleWeekType = "yym"
  581. // title = "运营"
  582. // }
  583. // if (i == "3") {
  584. // doubleWeekType = "jpm"
  585. // title = "竞品"
  586. // }
  587. // if (i == "4") {
  588. // doubleWeekType = "cwm"
  589. // title = "财务"
  590. // }
  591. // if (i == "5") {
  592. // doubleWeekType = "rlm"
  593. // title = "人力"
  594. // }
  595. reportContentsList1.push({
  596. title: '',
  597. doubleWeekContent: '',
  598. doubleWeekType: '',
  599. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  600. type: 3,
  601. });
  602. reportContentsList3.push({
  603. title: '',
  604. doubleWeekContent: '',
  605. doubleWeekType: '',
  606. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  607. type: 1,
  608. });
  609. reportContentsList2.push({
  610. title: '',
  611. doubleWeekContent: '',
  612. doubleWeekType: '',
  613. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  614. type: 2,
  615. });
  616. // }
  617. this.reportContentsList2 = reportContentsList2;
  618. this.reportContentsList1 = reportContentsList1;
  619. this.reportContentsList3 = reportContentsList3;
  620. } else {
  621. var reportContentsdata = res.data.reportContents;
  622. for (var i = 0; i < res.data.reportContents.length; i++) {
  623. // reportContentsdata[i].title = this.selectDictLabel(this.weekType, res.data.reportContents[i].doubleWeekType)
  624. if (res.data.reportContents[i].type == '2') {
  625. reportContentsList2.push(reportContentsdata[i]);
  626. }
  627. if (res.data.reportContents[i].type == '3') {
  628. reportContentsList1.push(reportContentsdata[i]);
  629. }
  630. if (res.data.reportContents[i].type == '1') {
  631. reportContentsList3.push(reportContentsdata[i]);
  632. }
  633. }
  634. if (reportContentsList2.length > 0) {
  635. this.reportContentsList2 = reportContentsList2;
  636. } else {
  637. reportContentsList2.push({
  638. title: '',
  639. doubleWeekContent: '',
  640. doubleWeekType: '',
  641. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  642. type: 2,
  643. });
  644. this.reportContentsList2 = reportContentsList2;
  645. }
  646. if (reportContentsList1.length > 0) {
  647. this.reportContentsList1 = reportContentsList1;
  648. } else {
  649. reportContentsList1.push({
  650. title: '',
  651. doubleWeekContent: '',
  652. doubleWeekType: '',
  653. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  654. type: 3,
  655. });
  656. this.reportContentsList1 = reportContentsList1;
  657. }
  658. if (reportContentsList3.length > 0) {
  659. this.reportContentsList3 = reportContentsList3;
  660. } else {
  661. reportContentsList3.push({
  662. title: '',
  663. doubleWeekContent: '',
  664. doubleWeekType: '',
  665. contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
  666. type: 1,
  667. });
  668. this.reportContentsList3 = reportContentsList3;
  669. }
  670. }
  671. });
  672. },
  673. onClickLeft() {
  674. this.$router.go(-1);
  675. },
  676. },
  677. };
  678. </script>
  679. <style scoped>
  680. .container {
  681. margin: 10px;
  682. }
  683. .container .van-collapse-item {
  684. margin-bottom: 10px;
  685. border-radius: 6px;
  686. overflow: hidden;
  687. }
  688. .linepAdd p {
  689. margin: 10px 0 0 0;
  690. font-size: 14px;
  691. color: #666;
  692. }
  693. .linepAdd .weekContent {
  694. padding-top: 5px;
  695. }
  696. .linepAdd .weekContent p {
  697. padding: 5px 0;
  698. margin: 0;
  699. padding-left: 10px;
  700. }
  701. .linepAdd .weekContent .texttitle {
  702. color: #0057ba;
  703. position: relative;
  704. padding-left: 10px;
  705. }
  706. .linepAdd .weekContent .texttitle .opint {
  707. position: absolute;
  708. left: 0px;
  709. top: 10px;
  710. margin-right: 6px;
  711. display: inline-block;
  712. width: 6px;
  713. height: 6px;
  714. border-radius: 10px;
  715. background-color: #004d8c;
  716. }
  717. .leftTitle {
  718. background-color: #74a4d9;
  719. color: #fff;
  720. display: inline-block;
  721. padding: 0 4px;
  722. border-radius: 2px;
  723. }
  724. .rightTitle {
  725. background-color: #e7b4bb;
  726. color: #fff;
  727. display: inline-block;
  728. padding: 0 4px;
  729. border-radius: 2px;
  730. }
  731. </style>
  732. <style>
  733. .linepAdd .van-cell__title {
  734. color: #1e5398;
  735. font-weight: 500;
  736. font-size: 16px;
  737. }
  738. .Btn100 {
  739. display: block;
  740. width: 100%;
  741. border-radius: 6px;
  742. color: #fff !important;
  743. background-color: #0057ba;
  744. border: 1px solid #0057ba;
  745. height: 44px;
  746. }
  747. .linepAdd .contentContainer {
  748. background-color: white;
  749. border-radius: 8px;
  750. padding: 10px 16px;
  751. margin-bottom: 10px;
  752. }
  753. .linepAdd .contentContainer .contentContainerTitle {
  754. color: #222;
  755. }
  756. .linepAdd .contentContainer .contentContainerTitle span {
  757. font-size: 12px;
  758. color: #666;
  759. }
  760. .linepAdd .contentContainer .van-field__control,
  761. .linepAdd .contentContainerp .van-field__control {
  762. background-color: #f8f8f8;
  763. padding: 10px;
  764. border-radius: 8px;
  765. }
  766. .linepAdd .contentContainer .van-cell,
  767. .linepAdd .contentContainerp .van-cell {
  768. padding: 0;
  769. }
  770. .colorbalck {
  771. color: #333333;
  772. }
  773. .collapsettitle .van-cell__title {
  774. color: #333;
  775. }
  776. .van-dialog__confirm,
  777. .van-dialog__confirm:active {
  778. color: #0057ba;
  779. }
  780. .colorRed {
  781. color: red;
  782. }
  783. </style>