checkMainPoints.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197
  1. <template>
  2. <view class="checkMainPoints">
  3. <u-navbar :title="ifSearchMod?'':'查核要点'" title-color="#292C33">
  4. <view v-if="ifSearchMod" class="slot-wrap" back-icon-size="25rpx">
  5. <input confirm-type="search" class="searchBar" type="text" v-model="searchKey" @input="filterFromName"
  6. placeholder-class="searchBarHolder" placeholder="搜索查核要点或查核项" />
  7. <image @click="clearSearch" v-if="searchKey" class="clearIcon" src="../../static/text-clear.png"
  8. mode=""></image>
  9. </view>
  10. <view v-if="ifSearchMod" class="navbar-right" slot="right">
  11. <text @click="cancelSearchMod" class="searchActiveBtn">取消</text>
  12. </view>
  13. </u-navbar>
  14. <uni-popup ref="popup" type="center" :maskClick="true" @change="onMaskChange"></uni-popup>
  15. <tm-top-menu v-if="!ifSearchMod" class="tm-top-menu">
  16. <template v-if="situationType != 2">
  17. <view class="top-search">
  18. <view class="search">
  19. <input confirm-type="search" @input="filterFromName" placeholder="搜索查核要点或查核项" />
  20. <image src="../../static/search.png"></image>
  21. </view>
  22. <view class="btnGroup">
  23. <image @click="toBindPeople(true)" class="searchBtn" src="../../static/bindPeople.png" mode="">
  24. </image>
  25. <image @click="openFilter" class="filterBtn" src="../../static/filterIcon.png" mode="">
  26. </image>
  27. </view>
  28. </view>
  29. </template>
  30. <!-- 查核分页模式下// -->
  31. <template v-if="situationType == 2">
  32. <view class="top-search-two">
  33. <view class="rowOne" v-if="nowPermission == 3 && situationType == 2">
  34. <view class="selectPeople" @click="toSelectVisiter">
  35. <template v-if="investigationUsers.length>0">
  36. <image
  37. v-if="currentSelectedInvestigationUser&&currentSelectedInvestigationUser['investigationStatus'] != 1"
  38. class="completePeopleIcon" src="../../static/peopleIcon.png" mode=""></image>
  39. <image
  40. v-if="currentSelectedInvestigationUser&&currentSelectedInvestigationUser['investigationStatus'] == 1"
  41. class="completePeopleIcon" src="../../static/completePeopleIcon.png" mode="">
  42. </image>
  43. <text
  44. class="peopleName">{{currentSelectedInvestigationUser?currentSelectedInvestigationUser['contentVOs'][0].value:''}}</text>
  45. <image class="fullArrow" src="../../static/close-icon.png" mode=""></image>
  46. </template>
  47. <template v-if="investigationUsers.length==0">
  48. <image @click="toSelectVisiter" class="addPeopleBtn" src="../../static/icon-add.png"
  49. mode=""></image>
  50. </template>
  51. </view>
  52. <view class="btnGroup">
  53. <image @click="toSearch" class="searchBtn" src="../../static/search.png" mode=""></image>
  54. <image @click="openFilter" class="filterBtn" src="../../static/filterIcon.png" mode="">
  55. </image>
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <!-- 只有当查核者进入才展示 -->
  61. <view class="rowTwo" v-if="nowPermission == 3||nowPermission == 1" :animation="animationData">
  62. <text class="rowTwoName">查核状态</text>
  63. <view class="filterBtnWrap">
  64. <com-button v-for="(item, index) in btnArr" :btnText="item.label" :width="350" :height="80"
  65. :type="active === item.id ? 'pramary':'default'" v-on:btnClick="btnClick(item.id)" />
  66. </view>
  67. </view>
  68. </tm-top-menu>
  69. <tm-modal v-show="showModal" v-on:click="toggleModal(false)">
  70. <view class="content-list">
  71. <view class="list-item" v-for="(item, index) in point"
  72. :class="{active: checkPointId === item.checkPointId}" @click="checkPointHandle(item.checkPointId)">
  73. <text>{{item.checkPointName}}</text>
  74. <image class="check-img" v-if="checkPointId === item.checkPointId"
  75. src="../../static/checkStatus.png"></image>
  76. </view>
  77. </view>
  78. </tm-modal>
  79. <view class="contentContainer">
  80. <scroll-view @scroll="scrollHandle" scroll-y="true"
  81. :class="(detailList.length>0&&active != 2&&finishedStatus != 1)?'scroll-Y':'scroll-Y noBtn'">
  82. <view class="list" v-for="(item, index) in detailList" :key="index">
  83. <view class="title" v-if="item.responseList.length > 0">查核要点:{{item.checkPointName}}</view>
  84. <view class="item" v-for="(child, n) in item.responseList"
  85. @click="childClick(child,item.checkPointId)" :key="n">
  86. <view class="top-box">
  87. <view class="top-box-left">
  88. <view :class="[child.completeFlag?'index-icon done':'index-icon']">{{n + 1}}</view>
  89. <text>{{child.checkItemName}}</text>
  90. <!-- <text>ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)的抢救全过程(访谈)</text> -->
  91. </view>
  92. <view class="topRightGroup">
  93. <!-- showNotApplicable==0展示,1不展示 -->
  94. <view class="checkStatus" v-if="!child.showNotApplicable"
  95. @click.stop="checkNoApplicable(child)">
  96. <image v-if="child.isNoApplicable&&!notApplicableList.includes(child.id)"
  97. class="checkIcon" src="../../static/check-no.png" mode=""></image>
  98. <image v-if="notApplicableList.includes(child.id)||!child.isNoApplicable"
  99. class="checkIcon" src="../../static/check-checkbox.png" mode=""></image>
  100. <text class="checkStatusText">{{child.notApplicableName}}</text>
  101. </view>
  102. <image src="../../static/tuli.png"
  103. @tap.stop="goLegendDetails($event ,child.checkItemId, item.checkPointId)"></image>
  104. </view>
  105. </view>
  106. <view class="children">
  107. <view class="child">
  108. <text>{{child.deptName || '--'}}</text>
  109. <text>查核单位</text>
  110. </view>
  111. <view class="child">
  112. <text>{{child.checkModelName || '--'}}</text>
  113. <text>查核方式</text>
  114. </view>
  115. <view class="child">
  116. <text :style="{color:`#${child.lastResultColor}`}">{{child.lastResult || '--'}}</text>
  117. <text>上次结果</text>
  118. </view>
  119. <view class="child">
  120. <text :style="{color:`#${child.checkResultColor}`}">{{child.checkResult || '--'}}</text>
  121. <text>本次结果</text>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </scroll-view>
  127. </view>
  128. <tm-callback-listpage />
  129. <view class="bottomBtnGroup" v-if="!ifSearchMod">
  130. <view v-if="!subtotalScore&&subtotalScore != 0" class="score">
  131. <view class="box">
  132. <text class="label">得分</text>
  133. <text class="currentScore">{{currentScore}}</text>
  134. </view>
  135. <view class="midLine"></view>
  136. <view class="box">
  137. <text class="label">总分</text>
  138. <text class="totalScore">{{totalScore}}</text>
  139. </view>
  140. </view>
  141. <view v-if="subtotalScore != null&&subtotalScore>=0" class="score scoreTypeTwo">
  142. <view class="box">
  143. <view class="rowOne">
  144. <text class="currentScore">{{currentScore}}</text>
  145. <text class="subLabel">得分</text>
  146. </view>
  147. <view class="rowTwo">
  148. <text class="label">总分:</text>
  149. <text class="currentScore">{{totalScore}}</text>
  150. </view>
  151. </view>
  152. <view class="midLine"></view>
  153. <view class="box">
  154. <view class="rowOne">
  155. <text class="currentScore xiaoji">{{subtotalScore}}</text>
  156. <text class="subLabel">小计</text>
  157. </view>
  158. <view class="rowTwo">
  159. <text class="label">总分:</text>
  160. <text class="currentScore">{{totalSubtotalScore}}</text>
  161. </view>
  162. </view>
  163. </view>
  164. <view v-if="detailList.length>0&&active != 2&&finishedStatus != 1" @click="onkeyCheckHandle"
  165. :class="[subtotalScore != null&&subtotalScore>=0?'botOneKeyCheck typeTwo':'botOneKeyCheck']">完成</view>
  166. </view>
  167. </view>
  168. </template>
  169. <script>
  170. import {
  171. mapState
  172. } from 'vuex';
  173. import {
  174. _stopPropagation
  175. } from "../../utils/compatible.js";
  176. export default {
  177. data() {
  178. return {
  179. btnArr: [{
  180. id: 0,
  181. label: '全部'
  182. },
  183. {
  184. id: 1,
  185. label: '未查核'
  186. },
  187. {
  188. id: 2,
  189. label: '已查核'
  190. },
  191. ],
  192. showModal: false,
  193. detailList: [],
  194. copyDetailList: [],
  195. point: [{
  196. checkPointId: 'all',
  197. checkPointName: '全部要点'
  198. }],
  199. checkPointId: 'all',
  200. nowPermission: uni.getStorageSync('nowPermission'),
  201. active: 0,
  202. checkId: '',
  203. deptId: '',
  204. currentScrollHeight: 0,
  205. finishedStatus: 0, //所有计划里的查核项是否都以完成
  206. totalScore: 0,
  207. currentScore: 0,
  208. subtotalScore: 0, //小计得分
  209. totalSubtotalScore: 0, //小计总分
  210. animationData: {}, //动画对象
  211. ifOpenFilter: false,
  212. searchKey: '', //搜索关键字
  213. ifSearchMod: false, //搜索模式
  214. applicable: true, //是否适用
  215. situationType: null, //情境类型
  216. notApplicableList: [], //保存本次check的查核项id
  217. };
  218. },
  219. computed: {
  220. ...mapState({
  221. investigationUsers: state => state.checkMainPoints.investigationUsers,
  222. currentSelectedInvestigationUser: state => state.checkMainPoints.currentSelectedInvestigationUser,
  223. ifReloadPageData: state => state.checkMainPoints.ifReloadPageData,
  224. }),
  225. getCheckPointName() {
  226. let item = this.point.find((item) => item.checkPointId === this.checkPointId);
  227. return item ? item.checkPointName : '';
  228. }
  229. },
  230. watch: {
  231. currentSelectedInvestigationUser(newVal, oldVal) {
  232. if (this.situationType == 2) {
  233. //更换受访对象时拉取新数据
  234. if (newVal && newVal.investigationUserName == '') {
  235. //已删除所有访查对象
  236. this.$store.commit('checkMainPoints/comChangeState', {
  237. key: 'detailList',
  238. data: []
  239. });
  240. this.detailList = [];
  241. } else {
  242. this.loadItemData();
  243. }
  244. }
  245. },
  246. ifReloadPageData(newVal){
  247. if(newVal){
  248. this.loadItemData();
  249. }
  250. }
  251. },
  252. onBackPress() {
  253. this.$store.commit('checkList/comChangeState', { //刷新前一页数据
  254. key: 'ifReloadPageData',
  255. data: true
  256. });
  257. // return true;
  258. },
  259. onLoad: function({
  260. checkId,
  261. deptId,
  262. finishedStatus,
  263. situationType,
  264. pageTemplateId
  265. }) {
  266. this.deptId = deptId;
  267. this.checkId = checkId;
  268. this.finishedStatus = finishedStatus;
  269. this.situationType = situationType;
  270. this.pageTemplateId = pageTemplateId;
  271. if (situationType == 2) {
  272. this.getInvestigationUsers();
  273. }
  274. //非分页情况下
  275. if (situationType != 2) {
  276. this.loadItemData();
  277. }
  278. },
  279. onShow: function() {
  280. if (this.ifReloadPageData) {
  281. //页面重新拉取数据
  282. this.loadItemData();
  283. }
  284. //创建动画实例
  285. const animation = uni.createAnimation({
  286. duration: 300,
  287. timingFunction: 'ease',
  288. })
  289. this.animation = animation;
  290. },
  291. onUnload() {
  292. this.$store.commit('checkMainPoints/comChangeState', {
  293. key: 'ifReloadPageData',
  294. data: false
  295. });
  296. },
  297. methods: {
  298. //绑定当事人
  299. /**
  300. * @param {Boolean} bool true直接执行设置当事人,忽略本地以缓存的deptTd
  301. */
  302. toBindPeople(bool) {
  303. if (this.isBindResponsible && bool) {
  304. uni.showToast({
  305. icon: 'none',
  306. title: '已绑定过当事人!',
  307. duration: 2000
  308. });
  309. return;
  310. };
  311. let notNowBindPeopledeptIds = uni.getStorageSync('notNowBindPeopledeptIds');
  312. if (!notNowBindPeopledeptIds) {
  313. notNowBindPeopledeptIds = []
  314. } else {
  315. notNowBindPeopledeptIds = JSON.parse(notNowBindPeopledeptIds);
  316. }
  317. if (!notNowBindPeopledeptIds.includes(this.deptId) || bool) {
  318. const nowPermission = JSON.parse(uni.getStorageSync('nowPermission'));
  319. // console.log(this.isBindResponsible,this.checkDetailMapResponses.length,nowPermission)
  320. if (!this.isBindResponsible && this.checkDetailMapResponses.length > 0 && nowPermission == 3) {
  321. //当是否已绑定当事人状态为false,可查核项大于0且当前角色是查核组员时
  322. //只有从查核列表进来才提示
  323. uni.showModal({
  324. title: '提示',
  325. content: '目前未批量分配当事人,是否前往选择?',
  326. confirmText: '前往设置',
  327. cancelText: '暂不设置',
  328. success: (res) => {
  329. if (res.confirm) {
  330. uni.navigateTo({
  331. url: `/pages/responsibleList/responsibleList?deptId=${this.deptId}&isFromCheckMainPoints=true`,
  332. });
  333. } else if (res.cancel) {
  334. //将当前病区保存,之后不在提示
  335. notNowBindPeopledeptIds.push(this.deptId);
  336. uni.setStorageSync('notNowBindPeopledeptIds', JSON.stringify(
  337. notNowBindPeopledeptIds));
  338. }
  339. }
  340. });
  341. }else{
  342. uni.showModal({
  343. title: '提示',
  344. content: '你目前无法批量分配当事人',
  345. confirmText: '确定',
  346. showCancel:false
  347. });
  348. }
  349. }
  350. },
  351. loadItemData() {
  352. this.checkTaskDetailList({
  353. 'deptId': this.deptId,
  354. 'checkId': this.checkId,
  355. 'situationType': this.situationType,
  356. 'investigationId': this.currentSelectedInvestigationUser && this
  357. .currentSelectedInvestigationUser.investigationId
  358. })
  359. },
  360. //不适用回调
  361. checkNoApplicable({
  362. id,
  363. isNoApplicable
  364. }) {
  365. this.$store.dispatch({
  366. type: 'checkMainPoints/commActions',
  367. key: 'oneKeyNotApplicable',
  368. data: id
  369. }).then(data => {
  370. if (data) {
  371. //重新拉去列表数据
  372. this.loadItemData();
  373. }
  374. })
  375. },
  376. toSelectVisiter() {
  377. //更新受访对象状态,可能已经是进行中了
  378. this.$store.dispatch({
  379. type: 'checkMainPoints/commActions',
  380. key: 'getInvestigationUsers',
  381. data: {
  382. checkId: this.checkId,
  383. situationType: this.situationType,
  384. deptId: this.deptId
  385. }
  386. }).then(data => {
  387. this.$store.commit('checkMainPoints/comChangeState', {
  388. key: 'investigationUsers',
  389. data: data.map((t,index)=>({...t,id:t.investigationId}))
  390. });
  391. uni.navigateTo({
  392. url: `/pages/selectVisitPerson/selectVisitPerson?checkId=${this.checkId}&situationType=${this.situationType}&deptId=${this.deptId}&pageTemplateId=${this.pageTemplateId}`
  393. });
  394. });
  395. },
  396. toSearch() {
  397. this.ifSearchMod = true;
  398. this.detailList = [];
  399. },
  400. cancelSearchMod() {
  401. this.ifSearchMod = false;
  402. this.detailList = [...this.copyDetailList];
  403. },
  404. onMaskChange({
  405. show
  406. }) {
  407. if (!show) {
  408. this.ifOpenFilter = false;
  409. this.animation.height(0).step();
  410. this.animationData = this.animation.export()
  411. }
  412. },
  413. openFilter() {
  414. const status = this.ifOpenFilter;
  415. if (!status) {
  416. this.$refs.popup.open();
  417. this.ifOpenFilter = true;
  418. this.animation.height('11vh').step();
  419. } else {
  420. this.$refs.popup.close();
  421. this.ifOpenFilter = false;
  422. this.animation.height(0).step();
  423. }
  424. this.animationData = this.animation.export()
  425. },
  426. //滚动监听事件,记录滚动高度
  427. scrollHandle(e) {
  428. this.currentScrollHeight = e.detail.scrollTop;
  429. },
  430. //一键查核
  431. onkeyCheckHandle() {
  432. if(this.situationType == 2&&!this.currentSelectedInvestigationUser){
  433. //当分页模式且未添加/选择受访对象时
  434. uni.showToast({
  435. title: '请先选择或添加受访对象!',
  436. duration: 2000,
  437. icon:'none'
  438. });
  439. return;
  440. }
  441. uni.showModal({
  442. title: '注意',
  443. content: '确定所有未填写查核结果项默认无缺失结果吗?',
  444. success: (res) => {
  445. if (res.confirm) {
  446. console.log('用户点击确定');
  447. this.oneKeyCheckCommit();
  448. } else if (res.cancel) {
  449. console.log('用户点击取消');
  450. }
  451. }
  452. });
  453. },
  454. oneKeyCheckCommit() {
  455. let ids = [];
  456. // console.log('this.detailList',this.detailList);
  457. this.detailList.forEach(item => {
  458. // console.log(item.responseList);
  459. //筛选掉已查核项
  460. const temp = item.responseList.filter(v => !v.checkResult);
  461. const arr = temp.map(v => v.id);
  462. ids = ids.concat(arr);
  463. });
  464. this.$store.dispatch({
  465. type: 'checkMainPoints/commActions',
  466. key: 'oneKeyCheck',
  467. data: ids
  468. }).then(data => {
  469. if (data) {
  470. uni.showModal({
  471. title: '查核完成!',
  472. content: '',
  473. showCancel: false,
  474. success: function(res) {
  475. if (res.confirm) {
  476. console.log('用户点击确定');
  477. uni.navigateBack({
  478. delta: 1
  479. });
  480. }
  481. }
  482. });
  483. }
  484. });
  485. },
  486. btnClick(id) {
  487. // console.log({id});
  488. this.active = id;
  489. this.filterCompleteFlag(id);
  490. },
  491. //获取访查对象列表
  492. getInvestigationUsers() {
  493. this.$store.dispatch({
  494. type: 'checkMainPoints/commActions',
  495. key: 'getInvestigationUsers',
  496. data: {
  497. checkId: this.checkId,
  498. situationType: this.situationType,
  499. deptId: this.deptId
  500. }
  501. }).then(data => {
  502. this.$store.commit('checkMainPoints/comChangeState', {
  503. key: 'investigationUsers',
  504. data: data
  505. });
  506. this.$store.commit('checkMainPoints/comChangeState', {
  507. key: 'currentSelectedInvestigationUser',
  508. data: data[0]
  509. })
  510. });
  511. },
  512. checkTaskDetailList({
  513. checkId,
  514. deptId,
  515. situationType,
  516. investigationId
  517. }) {
  518. const params = {
  519. checkId,
  520. deptId,
  521. situationType,
  522. }
  523. //增加受访人
  524. if (situationType == 2) params['investigationId'] = investigationId;
  525. this.dispatch('checkTaskDetailList', {
  526. ...params
  527. }).then((data) => {
  528. if (data) {
  529. if (!data.checkDetailMapResponses) return;
  530. this.$store.commit('checkMainPoints/comChangeState', {
  531. key: 'detailList',
  532. data: data.checkDetailMapResponses
  533. });
  534. this.isBindResponsible = data.isBindResponsible;
  535. this.detailList = data.checkDetailMapResponses;
  536. this.copyDetailList = data.checkDetailMapResponses;
  537. this.currentScore = data.getScore;
  538. this.totalScore = data.totalScore;
  539. this.subtotalScore = data.subtotalScore;
  540. this.totalSubtotalScore = data.totalSubtotalScore;
  541. this.checkDetailMapResponses = data.checkDetailMapResponses;
  542. data.checkDetailMapResponses.map(({
  543. checkPointId,
  544. checkPointName
  545. }) => {
  546. this.point.push({
  547. checkPointId,
  548. checkPointName
  549. });
  550. });
  551. //检查是否需要弹绑定当事人弹窗
  552. this.toBindPeople();
  553. //页面获取完数据时,保持筛选
  554. this.filterCompleteFlag(this.active);
  555. }
  556. });
  557. },
  558. childClick(child, checkPointId) {
  559. // 查核者,管理员
  560. if (this.nowPermission == 1 || this.nowPermission == 3) {
  561. let str = '',
  562. that = this;
  563. if (child.checkResult && !child.allowEdit) {
  564. // 当存在查核结果且不允许再修改时 跳转到查核项详情
  565. str = 'auditItemDetails/auditItemDetails';
  566. } else {
  567. if (this.nowPermission == 1) {
  568. uni.showModal({
  569. title: '提示',
  570. content: '请切换至查核者角色再进行查核操作!',
  571. showCancel: false
  572. });
  573. return;
  574. } else {
  575. // 跳转到查核结果提交
  576. str = 'mainPointsDetail/mainPointsDetail';
  577. }
  578. }
  579. uni.navigateTo({
  580. url: `/pages/${str}?id=${child.id}&checkPointId=${checkPointId}&checkItemId=${child.checkItemId}&situationType=${this.situationType}`,
  581. success: function(res) {
  582. const currentGroup = that.detailList.filter(item => item.checkPointId ==
  583. checkPointId);
  584. // 通过eventChannel向被打开页面传送数据
  585. res.eventChannel.emit('acceptDataFromOpenerPage', {
  586. data: currentGroup
  587. });
  588. }
  589. });
  590. }
  591. },
  592. toggleModal(flage) {
  593. this.showModal = flage;
  594. },
  595. checkPointHandle(id) {
  596. this.checkPointId = id;
  597. if (id === 'all') {
  598. this.detailList = [...this.copyDetailList];
  599. } else {
  600. this.detailList = this.copyDetailList
  601. .filter((item) => item.checkPointId === id);
  602. }
  603. },
  604. filterCompleteFlag(btnId) {
  605. if (btnId === 0) {
  606. this.detailList = [...this.copyDetailList];
  607. } else {
  608. let completeFlag = btnId === 1 ? false : true;
  609. this.detailList = this.copyDetailList.map((item) => {
  610. return {
  611. ...item,
  612. responseList: item.responseList
  613. .filter((child) => child.completeFlag === completeFlag)
  614. }
  615. });
  616. }
  617. },
  618. clearSearch() {
  619. this.searchKey = '';
  620. this.detailList = [...this.copyDetailList];
  621. },
  622. filterFromName(e) {
  623. const {
  624. value
  625. } = e.detail;
  626. this.searchKey = value;
  627. if (value === '') {
  628. this.detailList = [...this.copyDetailList];
  629. } else {
  630. this.detailList = [];
  631. this.copyDetailList.map((item) => {
  632. let responseList = item.responseList
  633. .filter((child) => child.checkItemName.indexOf(value) >= 0);
  634. if (item.checkPointName.indexOf(value) >= 0) {
  635. this.detailList.push({
  636. ...item
  637. });
  638. } else if (responseList.length > 0) {
  639. this.detailList.push({
  640. ...item,
  641. responseList
  642. });
  643. }
  644. });
  645. }
  646. },
  647. goLegendDetails(e, checkItemId, checkPointId) {
  648. _stopPropagation(e);
  649. //跳转到图例详情
  650. uni.navigateTo({
  651. url: `/pages/legendDetails/legendDetails?checkItemId=${checkItemId}&checkPointId=${checkPointId}`
  652. });
  653. },
  654. dispatch(key, data) {
  655. return this.$store.dispatch({
  656. type: 'checkList/commActions',
  657. key,
  658. data
  659. });
  660. },
  661. }
  662. }
  663. </script>
  664. <style lang="less">
  665. .checkMainPoints {
  666. position: relative;
  667. height: 100%;
  668. display: flex;
  669. flex-direction: column;
  670. // font-size: 22.5rpx;
  671. // line-height: 33.75rpx;
  672. background-color: #F5F6FA;
  673. .slot-wrap {
  674. display: flex;
  675. flex: 1;
  676. justify-content: center;
  677. align-items: center;
  678. background: #F0F2F7;
  679. border-radius: 44px;
  680. padding-left: 20rpx;
  681. .searchBar {
  682. flex: 1;
  683. width: 100%;
  684. height: 55rpx;
  685. font-size: 22.5rpx;
  686. }
  687. .clearIcon {
  688. width: 25rpx;
  689. height: 25rpx;
  690. margin: 0 20.5rpx;
  691. }
  692. .searchBarHolder {
  693. font-size: 22.5rpx;
  694. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  695. font-weight: 400;
  696. color: #A1A7B3;
  697. }
  698. }
  699. .navbar-right {
  700. display: flex;
  701. justify-content: center;
  702. align-items: center;
  703. padding: 0 25rpx;
  704. .searchActiveBtn {
  705. font-size: 22.5rpx;
  706. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  707. font-weight: 400;
  708. color: #292C33;
  709. }
  710. }
  711. .botOneKeyCheck {
  712. text-align: center;
  713. height: 75rpx;
  714. width: 100%;
  715. line-height: 75rpx;
  716. font-size: 22.5rpx;
  717. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  718. font-weight: 400;
  719. color: #FFFFFF;
  720. background: #3377FF;
  721. }
  722. .bottomBtnGroup {
  723. // position: fixed;
  724. width: 100%;
  725. // left:0;
  726. // bottom: 0;
  727. display: flex;
  728. flex-direction: row;
  729. border-top: 1px solid #DADEE6;
  730. background-color: #fff;
  731. .score {
  732. display: flex;
  733. width: 50%;
  734. flex-direction: row;
  735. justify-content: center;
  736. align-items: center;
  737. height: 75rpx;
  738. .box {
  739. width: 50%;
  740. text-align: center;
  741. white-space: nowrap;
  742. vertical-align: bottom;
  743. .label {
  744. color: #666E80;
  745. font-size: 17.5rpx;
  746. margin-right: 10rpx;
  747. }
  748. .currentScore {
  749. font-size: 30rpx;
  750. font-weight: bold;
  751. color: #3377FF;
  752. &.xiaoji {
  753. color: #19BE6B;
  754. }
  755. }
  756. .totalScore {
  757. font-size: 30rpx;
  758. font-weight: bold;
  759. color: #292C33;
  760. }
  761. }
  762. .midLine {
  763. height: 17.5rpx;
  764. border-left: 0.62rpx solid #DADEE6;
  765. }
  766. &.scoreTypeTwo {
  767. height: 100rpx;
  768. .box {
  769. .rowOne {
  770. .subLabel {
  771. font-size: 10rpx;
  772. color: #82848A;
  773. margin-left: 10rpx;
  774. }
  775. }
  776. .rowTwo {
  777. .currentScore {
  778. font-size: 20rpx;
  779. font-weight: bold;
  780. color: #666E80;
  781. }
  782. }
  783. }
  784. .midLine {
  785. height: 25rpx;
  786. }
  787. }
  788. }
  789. .botOneKeyCheck {
  790. display: flex;
  791. justify-content: center;
  792. align-items: center;
  793. height: 100%;
  794. flex-grow: 1;
  795. font-size: 22.5rpx;
  796. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  797. font-weight: 400;
  798. color: #FFFFFF;
  799. background: #3377FF;
  800. &.typeTwo {
  801. font-size: 32.5rpx;
  802. }
  803. }
  804. }
  805. .tm-top-menu {
  806. .rowTwo {
  807. display: flex;
  808. width: 100%;
  809. height: 0;
  810. overflow: hidden;
  811. flex-direction: column;
  812. box-sizing: border-box;
  813. padding: 0 25rpx;
  814. overflow: hidden;
  815. .rowTwoName {
  816. font-size: 22.5rpx;
  817. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  818. font-weight: 400;
  819. color: #666F80;
  820. margin-bottom: 12.5rpx;
  821. padding-top: 35rpx;
  822. }
  823. .filterBtnWrap {
  824. display: flex;
  825. flex-direction: row;
  826. justify-content: space-between;
  827. }
  828. }
  829. }
  830. .top-search {
  831. display: flex;
  832. flex-direction: row;
  833. align-items: center;
  834. justify-content: space-between;
  835. padding: 25rpx;
  836. background-color: #fff;
  837. box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
  838. .search {
  839. position: relative;
  840. width: 70%;
  841. height: 55rpx;
  842. line-height: 55rpx;
  843. background-color: #F0F2F7;
  844. input {
  845. padding: 0 45rpx 0 15rpx;
  846. height: 55rpx;
  847. line-height: 55rpx;
  848. font-size: 22.5rpx;
  849. }
  850. image {
  851. position: absolute;
  852. top: 16.87rpx;
  853. right: 15rpx;
  854. width: 21.25rpx;
  855. height: 21.25rpx;
  856. }
  857. }
  858. .btnGroup {
  859. display: flex;
  860. flex-direction: row;
  861. justify-content: center;
  862. align-items: center;
  863. .searchBtn {
  864. width: 30rpx;
  865. height: 30rpx;
  866. margin-right: 30rpx;
  867. }
  868. .filterBtn {
  869. width: 30rpx;
  870. height: 27.5rpx;
  871. }
  872. }
  873. .top-btn-wrap {
  874. padding-left: 25rpx;
  875. .btn-list {
  876. display: flex;
  877. flex-direction: row;
  878. .com-button {
  879. margin-left: 5rpx;
  880. &:first-child {
  881. margin-left: 0;
  882. }
  883. }
  884. }
  885. .select-wrap {
  886. display: flex;
  887. flex-direction: row;
  888. align-items: center;
  889. white-space: nowrap;
  890. image {
  891. margin-left: 9.37rpx;
  892. width: 12.5rpx;
  893. height: 12.5rpx;
  894. }
  895. }
  896. }
  897. }
  898. .top-search-two {
  899. display: flex;
  900. flex-direction: column;
  901. align-items: flex-start;
  902. justify-content: center;
  903. padding: 25rpx;
  904. background-color: #fff;
  905. box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
  906. .rowOne {
  907. display: flex;
  908. width: 100%;
  909. flex-direction: row;
  910. justify-content: space-between;
  911. align-items: center;
  912. .selectPeople {
  913. display: flex;
  914. flex-direction: row;
  915. justify-content: space-between;
  916. align-items: center;
  917. .completePeopleIcon {
  918. width: 50rpx;
  919. height: 50rpx;
  920. margin-right: 15rpx;
  921. }
  922. .peopleName {
  923. font-size: 25rpx;
  924. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  925. font-weight: 400;
  926. color: #292C33;
  927. }
  928. .fullArrow {
  929. width: 11.25rpx;
  930. height: 7.5rpx;
  931. margin-left: 15rpx;
  932. }
  933. .addPeopleBtn {
  934. width: 30rpx;
  935. height: 30rpx;
  936. margin-right: 12.5rpx;
  937. }
  938. }
  939. .btnGroup {
  940. .searchBtn {
  941. width: 30rpx;
  942. height: 30rpx;
  943. margin-right: 50rpx;
  944. }
  945. .filterBtn {
  946. width: 30rpx;
  947. height: 27.5rpx;
  948. }
  949. }
  950. }
  951. }
  952. .content-list {
  953. // padding-top: 105rpx;
  954. width: 100%;
  955. background-color: #fff;
  956. .list-item {
  957. display: flex;
  958. flex-direction: row;
  959. justify-content: space-between;
  960. align-items: center;
  961. border-bottom: 1px solid #DADEE6;
  962. padding: 0 25rpx;
  963. width: 100%;
  964. height: 87.5rpx;
  965. font-size: 22.5rpx;
  966. line-height: 33.75rpx;
  967. color: #292C33;
  968. .check-img {
  969. float: right;
  970. width: 19.37rpx;
  971. height: 14.37rpx;
  972. }
  973. &.active {
  974. color: #3377FF;
  975. }
  976. }
  977. }
  978. .contentContainer {
  979. display: flex;
  980. flex: 1;
  981. height: 100%;
  982. overflow: hidden;
  983. .scroll-Y {
  984. height: 100%;
  985. &.noBtn {
  986. height: 100%;
  987. }
  988. }
  989. }
  990. .list {
  991. .title {
  992. padding-left: 25rpx;
  993. width: 100%;
  994. height: 62.5rpx;
  995. line-height: 62.5rpx;
  996. color: #666F80;
  997. }
  998. .item {
  999. margin-top: 15rpx;
  1000. padding: 25rpx 0;
  1001. min-height: 167.5rpx;
  1002. background-color: #fff;
  1003. &:nth-child(2) {
  1004. margin-top: 0;
  1005. }
  1006. .top-box {
  1007. display: flex;
  1008. flex-direction: row;
  1009. justify-content: space-between;
  1010. align-items: center;
  1011. .top-box-left {
  1012. display: flex;
  1013. flex-direction: row;
  1014. width: calc(100% - 55rpx);
  1015. .index-icon {
  1016. margin-right: 15rpx;
  1017. border-radius: 0 62.5rpx 62.5rpx 0;
  1018. width: 50rpx;
  1019. height: 35rpx;
  1020. line-height: 35rpx;
  1021. text-align: center;
  1022. color: #fff;
  1023. background-color: #66B2FE;
  1024. &.done {
  1025. background-color: rgba(195, 202, 217, 1);
  1026. }
  1027. }
  1028. >text {
  1029. display: -webkit-box;
  1030. overflow: hidden;
  1031. width: calc(100% - 65rpx);
  1032. text-overflow: ellipsis;
  1033. -webkit-line-clamp: 2;
  1034. /*! autoprefixer: off */
  1035. -webkit-box-orient: vertical;
  1036. }
  1037. }
  1038. .topRightGroup {
  1039. display: flex;
  1040. flex-direction: row;
  1041. .checkStatus {
  1042. display: flex;
  1043. flex-direction: row;
  1044. justify-content: center;
  1045. align-items: center;
  1046. width: 125rpx;
  1047. height: 40rpx;
  1048. margin-right: 15rpx;
  1049. background: #F2F4F7;
  1050. border-radius: 20rpx;
  1051. .checkIcon {
  1052. width: 25rpx;
  1053. height: 25rpx;
  1054. margin-right: 10rpx;
  1055. }
  1056. .checkStatusText {
  1057. font-size: 20rpx;
  1058. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  1059. font-weight: 400;
  1060. color: #292C33;
  1061. }
  1062. }
  1063. image {
  1064. margin-right: 15rpx;
  1065. width: 40rpx;
  1066. height: 40rpx;
  1067. }
  1068. }
  1069. }
  1070. .children {
  1071. display: flex;
  1072. flex-direction: row;
  1073. align-items: center;
  1074. margin-top: 18.75rpx;
  1075. .child {
  1076. display: flex;
  1077. flex-direction: column;
  1078. justify-content: center;
  1079. align-items: center;
  1080. flex: 1;
  1081. border-right: 1px solid #DADEE6;
  1082. text {
  1083. width: 150rpx;
  1084. font-weight: 500;
  1085. text-align: center;
  1086. overflow: hidden;
  1087. text-overflow: ellipsis;
  1088. white-space: nowrap;
  1089. &:last-child {
  1090. font-size: 17.5rpx;
  1091. line-height: 26.25rpx;
  1092. color: #7A8599;
  1093. text-align: center;
  1094. font-weight: 400;
  1095. }
  1096. }
  1097. &:last-child {
  1098. border-right: 0;
  1099. }
  1100. }
  1101. }
  1102. }
  1103. }
  1104. }
  1105. </style>