creatingSituations.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  1. <template>
  2. <view class="creatingSituations">
  3. <uni-popup ref="popup" type="bottom" :maskClick="true" @change="popupChangehandle">
  4. <tm-radio-group v-if="popupType==1" :list="situationTypeList" :defaultValue='situationPreview.situationType'
  5. :setting="{
  6. value: 'situationType',
  7. name: 'situationTypeName'
  8. }" :openkeys="[0]" @change="situationTypeChanged" />
  9. <tm-radio-group v-if="popupType==2" :list="templateList" :defaultValue='situationPreview.pageTemplateId'
  10. :setting="{
  11. value: 'id',
  12. name: 'name'
  13. }" :openkeys="[0]" @change="templateTypeChanged" />
  14. </uni-popup>
  15. <check-map-detail v-if="showCheckMapDetail"></check-map-detail>
  16. <view v-else class="page-wrap" :style="{paddingBottom: stepActive !== 0 ? '75rpx' : 0}">
  17. <tm-steps class="tm-steps" :options="options" :active="stepActive"></tm-steps>
  18. <scroll-view scroll-y="true" class="component-wrap">
  19. <!-- <component :is="options[active].component"></component> -->
  20. <!-- 当流程下标为0且非职能科室负责人执行计划设置时展示 -->
  21. <theme v-if="stepActive==0&&!isPlanSet"></theme>
  22. <div v-if="theme.type == 'NORMAL'">
  23. <condition v-if="stepActive==1&&theme.id != 0"></condition>
  24. <!-- 个案情境条件 -->
  25. <conditionCard v-if="stepActive==1&&theme.id == 0"></conditionCard>
  26. <checkRent v-if="stepActive==2"></checkRent>
  27. <checkMap v-if="stepActive==3"></checkMap>
  28. <checkPlan v-if="stepActive==4"></checkPlan>
  29. <situationPreview v-if="stepActive==5"></situationPreview>
  30. </div>
  31. <div v-if="isPlanSet">
  32. <!--自查督查计划设置 -->
  33. <condition v-if="stepActive==0"></condition>
  34. <person v-if="stepActive==1"></person>
  35. <checkMap v-if="stepActive==2"></checkMap>
  36. <checkPlan v-if="stepActive==3"></checkPlan>
  37. <taskPreview v-if="stepActive==4"></taskPreview>
  38. </div>
  39. <!-- <div v-if="theme.type == 'MULTI'">
  40. <typeList v-if="stepActive==1"></typeList>
  41. <typeList v-if="stepActive==2" :isMultiMode="true"></typeList>
  42. <planPreview v-if="stepActive==3"></planPreview>
  43. </div> -->
  44. <div v-if="theme.type == 'MULTI'">
  45. <!--创建 自查+督查 -->
  46. <typeList v-if="stepActive==1"></typeList>
  47. <typeList v-if="stepActive==2" :isMultiMode="true"></typeList>
  48. <planPreview v-if="stepActive==3"></planPreview>
  49. </div>
  50. </scroll-view>
  51. <tm-simple-btn-group v-if="stepActive != 0 || isPlanSet" :options="botmBtnGroup" v-on:callback="changeStep">
  52. </tm-simple-btn-group>
  53. </view>
  54. <check-map-add v-if="showCheckMapAdd"></check-map-add>
  55. </view>
  56. </template>
  57. <script>
  58. import {
  59. mapState
  60. } from "vuex";
  61. import theme from "./components/theme.vue";
  62. import condition from "./components/condition.vue";
  63. import checkRent from "./components/checkRent.vue";
  64. import checkMap from "./components/checkMap.vue";
  65. import checkMapDetail from "./components/checkMapDetail.vue";
  66. import checkMapAdd from "./components/checkMapAdd.vue";
  67. import checkPlan from "./components/checkPlan.vue";
  68. import situationPreview from "./components/situationPreview.vue";
  69. import typeList from "./components/type.vue"
  70. import planPreview from "./components/preview.vue"
  71. import taskPreview from "./components/taskPreview.vue"
  72. import person from "./components/person.vue"
  73. import conditionCard from "./components/conditionCard.vue";
  74. import {
  75. themeList,
  76. normalBtnGroup,
  77. btnGroupPlan1,
  78. btnGroupPlan2,
  79. btnGroupSituationPreview,
  80. optionsHandle,
  81. checkDep,
  82. firstStepBtnGroup,
  83. checkGroup,
  84. editCondition,
  85. editCheckRent,
  86. editCheckMap,
  87. editCheckPlan,
  88. checkPlanList,
  89. editSituationPreview
  90. } from "./components/utils.js";
  91. import {
  92. dateHandle
  93. } from "../../utils/dateHandle.js";
  94. export default {
  95. data() {
  96. return {
  97. isPlanSet: false, //自查督查负责人操作计划设置
  98. saveType: 'POST',
  99. editID: '',
  100. }
  101. },
  102. computed: {
  103. ...mapState({
  104. popupType: state => state.creatingSituations.popupType,
  105. showCheckMapDetail: state => state.creatingSituations.showCheckMapDetail,
  106. showCheckMapAdd: state => state.creatingSituations.showCheckMapAdd,
  107. showCheckPlan1: state => state.creatingSituations.showCheckPlan1,
  108. stepActive: state => state.creatingSituations.stepActive,
  109. theme: state => state.creatingSituations.theme,
  110. condition: state => state.creatingSituations.condition,
  111. checkRent: state => state.creatingSituations.checkRent,
  112. checkMap: state => state.creatingSituations.checkMap,
  113. checkPlan: state => state.creatingSituations.checkPlan,
  114. situationPreview: state => state.creatingSituations.situationPreview,
  115. templateList: state => state.creatingSituations.templateList,
  116. situationTypeList: state => state.creatingSituations.situationTypeList,
  117. showPopupSelectorList: state => state.creatingSituations.showPopupSelectorList,
  118. zhinengDepartments:state=>state.creatingSituations.zhinengDepartments,
  119. typeList:state=>state.creatingSituations.typeList,
  120. checkPerson:state=>state.creatingSituations.checkPerson,
  121. conditionCard: state => state.creatingSituations.conditionCard
  122. }),
  123. situationTypeName() {
  124. const temp = this.situationTypeList.filter(item => item.situationType == this.situationPreview
  125. .situationType);
  126. return temp[0].situationTypeName;
  127. },
  128. botmBtnGroup: function() {
  129. if(this.stepActive === 0){
  130. return firstStepBtnGroup;
  131. }
  132. if (this.stepActive === 4 && this.theme.id != 2) {
  133. if (this.showCheckPlan1) {
  134. return btnGroupPlan1;
  135. } else {
  136. return btnGroupPlan2;
  137. }
  138. } else if (this.stepActive === 5 || (this.stepActive === 3 && this.theme.type == 'MULTI')||(this.stepActive === 4&&this.theme.id == 2)) {
  139. //普通情境和自查督查
  140. return btnGroupSituationPreview;
  141. } else {
  142. return normalBtnGroup;
  143. }
  144. },
  145. dataIsNull() {
  146. let data = this.checkMap.list.filter((item) => item.status !== 'disable');
  147. return data.length === 0;
  148. },
  149. themeType() {
  150. //planSet 职能科室负责人操作计划设置
  151. return this.theme.type?this.theme.type:'planSet'
  152. },
  153. options() {
  154. if (this.theme.type == 'MULTI'&&!this.isPlanSet) {
  155. //管理员创建自查督查
  156. return [{
  157. id: 'theme',
  158. title: '主题',
  159. component: theme
  160. },
  161. {
  162. id: 'typeList',
  163. title: '类型',
  164. component: typeList,
  165. hint: '追踪条件'
  166. },
  167. {
  168. id: 'departmentList',
  169. title: '职能科室',
  170. component: typeList,
  171. hint: '查核组'
  172. },
  173. {
  174. id: 'checkRent',
  175. title: '预览',
  176. component: checkRent,
  177. hint: '查核组'
  178. },
  179. ]
  180. }
  181. if (this.isPlanSet) {
  182. //自查督查负责人操作计划设置流程集合
  183. return [
  184. {
  185. id: 'condition',
  186. title: '条件',
  187. component: condition,
  188. hint: '追踪条件'
  189. },
  190. {
  191. id: 'person',
  192. title: '人员',
  193. component: person,
  194. hint: '人员'
  195. },
  196. {
  197. id: 'checkMap',
  198. title: '地图',
  199. component: checkMap,
  200. hint: '地图'
  201. },
  202. {
  203. id: 'checkPlan',
  204. title: '计划',
  205. component: checkPlan,
  206. hint: '制定计划'
  207. },
  208. {
  209. id: 'situationPreview',
  210. title: '预览',
  211. component: situationPreview
  212. },
  213. ]
  214. }
  215. //普通情境流程
  216. return [{
  217. id: 'theme',
  218. title: '主题',
  219. component: theme
  220. },
  221. {
  222. id: 'condition',
  223. title: '条件',
  224. component: condition,
  225. hint: '追踪条件'
  226. },
  227. {
  228. id: 'checkRent',
  229. title: '查核组',
  230. component: checkRent,
  231. hint: '查核组'
  232. },
  233. {
  234. id: 'checkMap',
  235. title: '地图',
  236. component: checkMap,
  237. hint: '地图'
  238. },
  239. {
  240. id: 'checkPlan',
  241. title: '计划',
  242. component: checkPlan,
  243. hint: '制定计划'
  244. },
  245. {
  246. id: 'situationPreview',
  247. title: '预览',
  248. component: situationPreview
  249. },
  250. ]
  251. }
  252. },
  253. watch: {
  254. /**
  255. * @param {Boolen} newVal
  256. * @param {Boolen} oldVal
  257. */
  258. showPopupSelectorList: function(newVal, oldVal) {
  259. if (newVal) {
  260. this.$refs.popup.open();
  261. } else {
  262. this.$refs.popup.close();
  263. }
  264. }
  265. },
  266. onLoad: function({
  267. id,
  268. type,
  269. actTarget,
  270. situationId,
  271. themeName, //情境名
  272. systemSituationType, //系统情境类型 0 个案 1 普通 2自查督查
  273. }) {
  274. this.isPlanSet = actTarget == 'planSet';
  275. this.situationId = situationId;
  276. this.saveType = type ? type : 'POST';
  277. if(systemSituationType == 2){
  278. this.myCommit('theme', {
  279. ...this.theme,
  280. id: systemSituationType, title:themeName, des: null,
  281. situationId:situationId,
  282. }); // 设置为自查督查
  283. this.myCommit('checkPerson', {
  284. ...this.checkPerson,
  285. situationId:situationId
  286. }); // 自查督查时,人员获取需要适用情境筛选
  287. }
  288. this.dispatch('getSituationTypes').then(res => {
  289. this.myCommit('situationTypeList', res);
  290. });
  291. if (id) {
  292. this.editID = id;
  293. this.dispatch('detialConfig', {
  294. id
  295. }).then((data) => {
  296. if (data) {
  297. const {
  298. topic
  299. } = data;
  300. let theme = themeList[Number(topic)],
  301. condition = editCondition(data),
  302. editConfig = {};
  303. this.myCommit('theme', theme); // 主题
  304. if (type === 'PUT') { // 编辑
  305. let checkRent = editCheckRent(data),
  306. checkMap = editCheckMap(data),
  307. checkPlan = editCheckPlan(data),
  308. situationPreview = editSituationPreview(data);
  309. this.myCommit('checkPlan', checkPlan); // 查核计划
  310. this.myCommit('situationPreview', situationPreview); // 预览
  311. editConfig = {
  312. theme,
  313. condition,
  314. checkRent,
  315. checkMap,
  316. checkPlan,
  317. situationPreview
  318. };
  319. } else { // 复制创建
  320. this.myCommit('condition', condition); // 条件
  321. editConfig = {
  322. theme,
  323. condition,
  324. };
  325. }
  326. this.myCommit('editConfig', editConfig);
  327. // 回到第一步或者第三步
  328. this.myCommit('stepActive', type === 'PUT' ? 0 : 2);
  329. }
  330. });
  331. }
  332. },
  333. methods: {
  334. situationTypeChanged(type, name) {
  335. // console.log({type,name});
  336. this.$store.commit('creatingSituations/comChangeState', {
  337. key: 'situationPreview',
  338. data: {
  339. ...this.situationPreview,
  340. situationType: type
  341. }
  342. });
  343. },
  344. templateTypeChanged(type, item) {
  345. // console.log({type,item});
  346. this.$store.commit('creatingSituations/comChangeState', {
  347. key: 'situationPreview',
  348. data: {
  349. ...this.situationPreview,
  350. pageTemplateId: type,
  351. templateName: item.name
  352. }
  353. });
  354. },
  355. zichaduchaSave: function() {
  356. let data = {
  357. name:this.situationPreview.sitName,
  358. checkPlanStartDate:'',
  359. checkPlanEndDate:'',
  360. functionCodes:this.zhinengDepartments.checkedItems.map(v=>v.id),
  361. filterCodes:this.typeList.checkedItems.map(v=>v.id),
  362. permission:1
  363. }
  364. this.dispatch(`addDuchazichaSituation`, data).then((data) => {
  365. if (data) {
  366. // 保存成功先清空数据
  367. this.clearData();
  368. uni.navigateTo({
  369. url: '/pages/situationsCenter/situationsCenter'
  370. });
  371. }
  372. });
  373. },
  374. zichaduchaPlanSave(){
  375. //自查督查计划保存
  376. const param = {
  377. name:this.theme.title,
  378. topic: this.theme.id,
  379. id:this.situationId,
  380. num: this.checkPlan.checkList.length,
  381. checkPlanEndDate:`${this.checkPlan.dateObj.end} 23:59`,
  382. checkPlanStartDate:`${this.checkPlan.dateObj.start} 00:00`,
  383. day:this.checkPlan.dateObj.dayNum,
  384. employeeList:this.checkPerson.checkedItems,
  385. filterCondition:this.condition.checkedItems,
  386. frequency:this.checkPlan.checkedItem.value,
  387. planList: [...this.checkPlan.checkList].map((date, i) => {
  388. return {
  389. startDate:`${date} 00:00`,
  390. endDate: `${dateHandle.getNewData(date, this.checkPlan.checkedItem.model - 1)} 23:59`
  391. }
  392. }),
  393. filterDepartments:this.checkMap.list.map(item=>item.departmentId)
  394. }
  395. this.dispatch(`saveZichaduchaPlan`, param).then((data) => {
  396. if (data) {
  397. // 保存成功先清空数据
  398. this.clearData();
  399. uni.navigateTo({
  400. url: '/pages/situationsCenter/situationsCenter'
  401. });
  402. }
  403. });
  404. },
  405. save: function() {
  406. const {
  407. sitName,
  408. preDay,
  409. preH,
  410. startDay,
  411. description,
  412. situationType,
  413. showNotApplicable,
  414. showCountNum,
  415. pageTemplateId
  416. } = this.situationPreview;
  417. const {
  418. dateObj,
  419. checkedItem,
  420. checkList
  421. } = this.checkPlan;
  422. const {
  423. depType,
  424. options,
  425. conditionIds
  426. } = this.condition;
  427. if (!sitName || sitName.length < 2) {
  428. uni.showModal({
  429. title: '温馨提示',
  430. content: `情境名称不能为空也不能少于2个字!`,
  431. showCancel: false
  432. });
  433. return;
  434. }
  435. if (preDay > 31) {
  436. uni.showModal({
  437. title: '温馨提示',
  438. content: `提醒天数不得大于31天!`,
  439. showCancel: false
  440. });
  441. return;
  442. }
  443. if (preH > 24) {
  444. uni.showModal({
  445. title: '温馨提示',
  446. content: `提醒天数不得大于24小时!`,
  447. showCancel: false
  448. });
  449. return;
  450. }
  451. if (preDay != null && !/^\d+$/.test(preDay)) {
  452. uni.showModal({
  453. title: '温馨提示',
  454. content: `提醒天数不能是小数!`,
  455. showCancel: false
  456. });
  457. return;
  458. }
  459. if (preH != null && !/^\d+$/.test(preH)) {
  460. uni.showModal({
  461. title: '温馨提示',
  462. content: `提醒小时不能是小数!`,
  463. showCancel: false
  464. });
  465. return;
  466. }
  467. let data = {
  468. description,
  469. name: sitName,
  470. topic: this.theme.id,
  471. checkPlanStartDate: dateObj.start,
  472. checkPlanEndDate: dateObj.end,
  473. remindPlanDay: preDay,
  474. remindPlanHour: preH,
  475. remindCheckDay: startDay,
  476. depType,
  477. showNotApplicable: showNotApplicable,
  478. subtotal: showCountNum,
  479. situationType: situationType,
  480. pageTemplateId: pageTemplateId,
  481. filterCondition:optionsHandle(options, conditionIds),
  482. checkGroup: checkGroup(this.checkRent),
  483. checkDep: checkDep(this.checkMap.list),
  484. planConfig: {
  485. frequency: checkedItem.value,
  486. day: checkedItem.model,
  487. startDate: dateObj.start,
  488. endDate: dateObj.end,
  489. num: checkList.length
  490. },
  491. planList: [...checkList].map((date, i) => {
  492. return {
  493. startDate: date,
  494. endDate: dateHandle.getNewData(date, checkedItem.model - 1)
  495. }
  496. })
  497. };
  498. if (this.saveType === 'PUT') {
  499. data.id = this.editID;
  500. }
  501. this.dispatch(`save${this.saveType}`, data).then((data) => {
  502. if (data) {
  503. // 保存成功先清空数据
  504. this.clearData();
  505. uni.navigateTo({
  506. url: '/pages/situationsCenter/situationsCenter'
  507. });
  508. }
  509. });
  510. },
  511. changeStep: function(id) {
  512. // console.log({id,'stepActive':this.stepActive,'this.options':this.options});
  513. switch (id) {
  514. case 'goback':
  515. uni.navigateBack({
  516. delta: 1
  517. });
  518. break;
  519. case 'pre': // 上一步
  520. if (this.stepActive > 0){
  521. this.myCommit('needReload', false);
  522. this.myCommit('stepActive', this.stepActive - 1);
  523. }else {
  524. console.log({'this.stepActive':this.stepActive});
  525. }
  526. break;
  527. case 'next': // 下一步
  528. if (this.stepActive < this.options.length)
  529. this.nextHandle(this.stepActive);
  530. break;
  531. case 'checkPlanCreate': // 生成查核计划
  532. if (this.checkPlan.checkList.length === 0 && this.checkPlan.dateObj.dayNum < 1) {
  533. uni.showModal({
  534. title: '错误提示',
  535. content: '查核频次必须大于或等于1!',
  536. showCancel: false
  537. });
  538. } else {
  539. console.log('checkPlanCreate');
  540. this.myCommit('showCheckPlan1', false);
  541. }
  542. break;
  543. case 'checkPlanCallback': // 生成查核计划-返回
  544. this.myCommit('showCheckPlan1', true);
  545. break;
  546. case 'situationPreviewOK': // 完成
  547. if (this.theme.type == 'MULTI') {
  548. //自查督查
  549. this.zichaduchaSave();
  550. break;
  551. }
  552. if (this.theme.id == 2) {
  553. //自查督查
  554. this.zichaduchaPlanSave();
  555. break;
  556. }
  557. this.save();
  558. break;
  559. }
  560. },
  561. /**
  562. * 处理【下一步】逻辑
  563. */
  564. nextHandle: function(stepActive) {
  565. console.log({stepActive,'themeType':this.themeType})
  566. let flage = false;
  567. if (this.themeType == 'NORMAL') {
  568. //非督查+自查
  569. switch (stepActive) {
  570. case 1:
  571. if(this.theme.id == 0){
  572. //创建个案情境
  573. flage = this.errorHandle(this.condition.conditionIds.length >= this.conditionCard.requireds.length, 1);
  574. }else{
  575. flage = this.errorHandle(this.condition.conditionIds.length > 0, 1);
  576. }
  577. break;
  578. case 2:
  579. const {
  580. points
  581. } = this.checkRent.checkedItem;
  582. let condition = this.checkRent.checkedItem.id !== null && points;
  583. flage = this.errorHandle(condition, 2);
  584. break;
  585. case 3:
  586. flage = this.errorHandle(!this.dataIsNull, 3);
  587. break;
  588. case 4:
  589. const {
  590. checkList
  591. } = this.checkPlan;
  592. flage = this.errorHandle(checkList.length > 0, 4);
  593. break;
  594. case 5:
  595. this.dispatch('getSituationTypes').then(res => {
  596. console.log({
  597. res
  598. });
  599. })
  600. break;
  601. default:
  602. flage = true;
  603. break;
  604. }
  605. }
  606. if (this.themeType == 'MULTI') {
  607. //管理员创建 督查+自查
  608. switch (stepActive) {
  609. case 1:
  610. flage = true;
  611. break;
  612. case 2:
  613. flage = true;
  614. break;
  615. case 3:
  616. flage = true;
  617. break;
  618. default:
  619. flage = true;
  620. break;
  621. }
  622. }
  623. if(this.isPlanSet){
  624. //职能科室负责人 督查+自查 计划设置
  625. switch (stepActive) {
  626. case 1:
  627. flage = true;
  628. break;
  629. case 2:
  630. flage = true;
  631. break;
  632. case 3:
  633. flage = true;
  634. break;
  635. default:
  636. flage = true;
  637. break;
  638. }
  639. }
  640. if (flage) {
  641. this.myCommit('needReload', true);
  642. this.myCommit('stepActive', stepActive + 1);
  643. }
  644. },
  645. /**
  646. * 错误处理,满足条件返回true
  647. * @param {Object} condition 条件
  648. * @param {Object} index 当前下标
  649. */
  650. errorHandle: function(conditionflag, index) {
  651. //add by yfb 20230214 检查子选项选择情况
  652. if (!this.checkCondition(this.condition)){
  653. uni.showModal({
  654. title: '温馨提示',
  655. content: `请先选择${this.options[1].hint}!`,
  656. showCancel: false
  657. });
  658. return false;
  659. }
  660. if (conditionflag) {
  661. return true;
  662. } else {
  663. uni.showModal({
  664. title: '温馨提示',
  665. content: index === 3 ? '查核地图不能为空' : `请先选择${this.options[index].hint}!`,
  666. showCancel: false
  667. });
  668. return false;
  669. }
  670. },
  671. myCommit: function(key, data) {
  672. this.$store.commit({
  673. type: 'creatingSituations/comChangeState',
  674. key,
  675. data
  676. });
  677. },
  678. dispatch: function(key, data) {
  679. return this.$store.dispatch({
  680. type: 'creatingSituations/commActions',
  681. key,
  682. data
  683. });
  684. },
  685. clearData: function() {
  686. checkPlanList[5].model = null;
  687. this.$store.commit({
  688. type: 'creatingSituations/setInit'
  689. });
  690. },
  691. popupChangehandle: function(data) {
  692. const {
  693. show
  694. } = data;
  695. this.$store.commit('creatingSituations/comChangeState', {
  696. key: 'showPopupSelectorList',
  697. data: show
  698. });
  699. },
  700. checkCondition:function(condition){
  701. console.log('测试',condition);
  702. // for(var i=0;i<condition.conditionIds.length;i++){
  703. // // console.log('测试',condition.childContainer[i].list[0].id);
  704. // let tempdata=condition.options.filter((item) => item. == condition.conditionIds[i]);
  705. // console.log('选择项测试',tempdata);
  706. // }
  707. let checklist=condition.options.filter(item=>item.child.length>1);
  708. console.log('带监测队列',checklist);
  709. //checklist.
  710. return true;
  711. }
  712. },
  713. destroyed() {
  714. this.clearData();
  715. },
  716. components: {
  717. checkMapDetail,
  718. checkMapAdd,
  719. theme,
  720. condition,
  721. checkRent,
  722. checkMap,
  723. checkPlan,
  724. situationPreview,
  725. typeList,
  726. person,
  727. planPreview,
  728. taskPreview,
  729. conditionCard
  730. }
  731. }
  732. </script>
  733. <style lang="less">
  734. .creatingSituations {
  735. width: 100%;
  736. height: 100%;
  737. background-color: #F5F6FA;
  738. .page-wrap {
  739. padding-bottom: 75rpx;
  740. width: 100%;
  741. height: 100%;
  742. .tm-steps {
  743. height: auto;
  744. }
  745. .component-wrap {
  746. padding-bottom: 87.5rpx;
  747. }
  748. }
  749. }
  750. </style>