checkMainPoints.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188
  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['investigationUserName']:''}}</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. }) {
  265. this.deptId = deptId;
  266. this.checkId = checkId;
  267. this.finishedStatus = finishedStatus;
  268. this.situationType = situationType;
  269. if (situationType == 2) {
  270. this.getInvestigationUsers();
  271. }
  272. //非分页情况下
  273. if (situationType != 2) {
  274. this.loadItemData();
  275. }
  276. },
  277. onShow: function() {
  278. if (this.ifReloadPageData) {
  279. //页面重新拉取数据
  280. this.loadItemData();
  281. }
  282. //创建动画实例
  283. const animation = uni.createAnimation({
  284. duration: 300,
  285. timingFunction: 'ease',
  286. })
  287. this.animation = animation;
  288. },
  289. onUnload() {
  290. this.$store.commit('checkMainPoints/comChangeState', {
  291. key: 'ifReloadPageData',
  292. data: false
  293. });
  294. },
  295. methods: {
  296. //绑定当事人
  297. /**
  298. * @param {Boolean} bool true直接执行设置当事人,忽略本地以缓存的deptTd
  299. */
  300. toBindPeople(bool) {
  301. if (this.isBindResponsible && bool) {
  302. uni.showToast({
  303. icon: 'none',
  304. title: '已绑定过当事人!',
  305. duration: 2000
  306. });
  307. return;
  308. };
  309. let notNowBindPeopledeptIds = uni.getStorageSync('notNowBindPeopledeptIds');
  310. if (!notNowBindPeopledeptIds) {
  311. notNowBindPeopledeptIds = []
  312. } else {
  313. notNowBindPeopledeptIds = JSON.parse(notNowBindPeopledeptIds);
  314. }
  315. if (!notNowBindPeopledeptIds.includes(this.deptId) || bool) {
  316. const nowPermission = JSON.parse(uni.getStorageSync('nowPermission'));
  317. // console.log(!this.isBindResponsible,this.checkDetailMapResponses.length,nowPermission)
  318. if (!this.isBindResponsible && this.checkDetailMapResponses.length > 0 && nowPermission == 3) {
  319. //当未绑定当事人状态为false,可查核项大于0且当前角色是查核组员时
  320. //只有从查核列表进来才提示
  321. uni.showModal({
  322. title: '提示',
  323. content: '目前未批量分配当事人,是否前往选择?',
  324. confirmText: '前往设置',
  325. cancelText: '暂不设置',
  326. success: (res) => {
  327. if (res.confirm) {
  328. uni.navigateTo({
  329. url: `/pages/responsibleList/responsibleList?deptId=${this.deptId}&isFromCheckMainPoints=true`,
  330. });
  331. } else if (res.cancel) {
  332. //将当前病区保存,之后不在提示
  333. notNowBindPeopledeptIds.push(this.deptId);
  334. uni.setStorageSync('notNowBindPeopledeptIds', JSON.stringify(
  335. notNowBindPeopledeptIds));
  336. }
  337. }
  338. });
  339. }else{
  340. uni.showModal({
  341. title: '提示',
  342. content: '你目前无法批量分配当事人',
  343. confirmText: '确定',
  344. showCancel:false
  345. });
  346. }
  347. }
  348. },
  349. loadItemData() {
  350. this.checkTaskDetailList({
  351. 'deptId': this.deptId,
  352. 'checkId': this.checkId,
  353. 'situationType': this.situationType,
  354. 'investigationUserName': this.currentSelectedInvestigationUser && this
  355. .currentSelectedInvestigationUser.investigationUserName
  356. })
  357. },
  358. //不适用回调
  359. checkNoApplicable({
  360. id,
  361. isNoApplicable
  362. }) {
  363. this.$store.dispatch({
  364. type: 'checkMainPoints/commActions',
  365. key: 'oneKeyNotApplicable',
  366. data: id
  367. }).then(data => {
  368. if (data) {
  369. //重新拉去列表数据
  370. this.loadItemData();
  371. }
  372. })
  373. },
  374. toSelectVisiter() {
  375. //更新受访对象状态,可能已经是进行中了
  376. this.$store.dispatch({
  377. type: 'checkMainPoints/commActions',
  378. key: 'getInvestigationUsers',
  379. data: {
  380. checkId: this.checkId,
  381. situationType: this.situationType,
  382. deptId: this.deptId
  383. }
  384. }).then(data => {
  385. this.$store.commit('checkMainPoints/comChangeState', {
  386. key: 'investigationUsers',
  387. data: data
  388. });
  389. uni.navigateTo({
  390. url: `/pages/selectVisitPerson/selectVisitPerson?checkId=${this.checkId}&situationType=${this.situationType}&deptId=${this.deptId}`
  391. });
  392. });
  393. },
  394. toSearch() {
  395. console.log('toSearch')
  396. this.ifSearchMod = true;
  397. this.detailList = [];
  398. },
  399. cancelSearchMod() {
  400. this.ifSearchMod = false;
  401. this.detailList = [...this.copyDetailList];
  402. },
  403. onMaskChange({
  404. show
  405. }) {
  406. if (!show) {
  407. this.ifOpenFilter = false;
  408. this.animation.height(0).step();
  409. this.animationData = this.animation.export()
  410. }
  411. },
  412. openFilter() {
  413. const status = this.ifOpenFilter;
  414. if (!status) {
  415. this.$refs.popup.open();
  416. this.ifOpenFilter = true;
  417. this.animation.height('11vh').step();
  418. } else {
  419. this.$refs.popup.close();
  420. this.ifOpenFilter = false;
  421. this.animation.height(0).step();
  422. }
  423. this.animationData = this.animation.export()
  424. },
  425. //滚动监听事件,记录滚动高度
  426. scrollHandle(e) {
  427. this.currentScrollHeight = e.detail.scrollTop;
  428. },
  429. //一键查核
  430. onkeyCheckHandle() {
  431. uni.showModal({
  432. title: '注意',
  433. content: '确定所有未填写查核结果项默认无缺失结果吗?',
  434. success: (res) => {
  435. if (res.confirm) {
  436. console.log('用户点击确定');
  437. this.oneKeyCheckCommit();
  438. } else if (res.cancel) {
  439. console.log('用户点击取消');
  440. }
  441. }
  442. });
  443. },
  444. oneKeyCheckCommit() {
  445. let ids = [];
  446. // console.log('this.detailList',this.detailList);
  447. this.detailList.forEach(item => {
  448. // console.log(item.responseList);
  449. //筛选掉已查核项
  450. const temp = item.responseList.filter(v => !v.checkResult);
  451. const arr = temp.map(v => v.id);
  452. ids = ids.concat(arr);
  453. });
  454. this.$store.dispatch({
  455. type: 'checkMainPoints/commActions',
  456. key: 'oneKeyCheck',
  457. data: ids
  458. }).then(data => {
  459. if (data) {
  460. uni.showModal({
  461. title: '查核完成!',
  462. content: '',
  463. showCancel: false,
  464. success: function(res) {
  465. if (res.confirm) {
  466. console.log('用户点击确定');
  467. uni.navigateBack({
  468. delta: 1
  469. });
  470. }
  471. }
  472. });
  473. }
  474. });
  475. },
  476. btnClick(id) {
  477. // console.log({id});
  478. this.active = id;
  479. this.filterCompleteFlag(id);
  480. },
  481. //获取访查对象列表
  482. getInvestigationUsers() {
  483. this.$store.dispatch({
  484. type: 'checkMainPoints/commActions',
  485. key: 'getInvestigationUsers',
  486. data: {
  487. checkId: this.checkId,
  488. situationType: this.situationType,
  489. deptId: this.deptId
  490. }
  491. }).then(data => {
  492. this.$store.commit('checkMainPoints/comChangeState', {
  493. key: 'investigationUsers',
  494. data: data
  495. });
  496. this.$store.commit('checkMainPoints/comChangeState', {
  497. key: 'currentSelectedInvestigationUser',
  498. data: data[0]
  499. })
  500. });
  501. },
  502. checkTaskDetailList({
  503. checkId,
  504. deptId,
  505. situationType,
  506. investigationUserName
  507. }) {
  508. const params = {
  509. checkId,
  510. deptId,
  511. situationType,
  512. }
  513. //增加受访人
  514. if (situationType == 2) params['investigationUser'] = investigationUserName;
  515. this.dispatch('checkTaskDetailList', {
  516. ...params
  517. }).then((data) => {
  518. if (data) {
  519. if (!data.checkDetailMapResponses) return;
  520. this.$store.commit('checkMainPoints/comChangeState', {
  521. key: 'detailList',
  522. data: data.checkDetailMapResponses
  523. });
  524. this.isBindResponsible = data.isBindResponsible;
  525. this.detailList = data.checkDetailMapResponses;
  526. this.copyDetailList = data.checkDetailMapResponses;
  527. this.currentScore = data.getScore;
  528. this.totalScore = data.totalScore;
  529. this.subtotalScore = data.subtotalScore;
  530. this.totalSubtotalScore = data.totalSubtotalScore;
  531. this.checkDetailMapResponses = data.checkDetailMapResponses;
  532. data.checkDetailMapResponses.map(({
  533. checkPointId,
  534. checkPointName
  535. }) => {
  536. this.point.push({
  537. checkPointId,
  538. checkPointName
  539. });
  540. });
  541. //检查是否需要弹绑定当事人弹窗
  542. this.toBindPeople();
  543. //页面获取完数据时,保持筛选
  544. this.filterCompleteFlag(this.active);
  545. }
  546. });
  547. },
  548. childClick(child, checkPointId) {
  549. // 查核者,管理员
  550. if (this.nowPermission == 1 || this.nowPermission == 3) {
  551. let str = '',
  552. that = this;
  553. if (child.checkResult && !child.allowEdit) {
  554. // 当存在查核结果且不允许再修改时 跳转到查核项详情
  555. str = 'auditItemDetails/auditItemDetails';
  556. } else {
  557. if (this.nowPermission == 1) {
  558. uni.showModal({
  559. title: '提示',
  560. content: '请切换至查核者角色再进行查核操作!',
  561. showCancel: false
  562. });
  563. return;
  564. } else {
  565. // 跳转到查核结果提交
  566. str = 'mainPointsDetail/mainPointsDetail';
  567. }
  568. }
  569. uni.navigateTo({
  570. url: `/pages/${str}?id=${child.id}&checkPointId=${checkPointId}&checkItemId=${child.checkItemId}&situationType=${this.situationType}`,
  571. success: function(res) {
  572. const currentGroup = that.detailList.filter(item => item.checkPointId ==
  573. checkPointId);
  574. // 通过eventChannel向被打开页面传送数据
  575. res.eventChannel.emit('acceptDataFromOpenerPage', {
  576. data: currentGroup
  577. });
  578. }
  579. });
  580. }
  581. },
  582. toggleModal(flage) {
  583. this.showModal = flage;
  584. },
  585. checkPointHandle(id) {
  586. this.checkPointId = id;
  587. if (id === 'all') {
  588. this.detailList = [...this.copyDetailList];
  589. } else {
  590. this.detailList = this.copyDetailList
  591. .filter((item) => item.checkPointId === id);
  592. }
  593. },
  594. filterCompleteFlag(btnId) {
  595. if (btnId === 0) {
  596. this.detailList = [...this.copyDetailList];
  597. } else {
  598. let completeFlag = btnId === 1 ? false : true;
  599. this.detailList = this.copyDetailList.map((item) => {
  600. return {
  601. ...item,
  602. responseList: item.responseList
  603. .filter((child) => child.completeFlag === completeFlag)
  604. }
  605. });
  606. }
  607. },
  608. clearSearch() {
  609. this.searchKey = '';
  610. this.detailList = [...this.copyDetailList];
  611. },
  612. filterFromName(e) {
  613. const {
  614. value
  615. } = e.detail;
  616. this.searchKey = value;
  617. if (value === '') {
  618. this.detailList = [...this.copyDetailList];
  619. } else {
  620. this.detailList = [];
  621. this.copyDetailList.map((item) => {
  622. let responseList = item.responseList
  623. .filter((child) => child.checkItemName.indexOf(value) >= 0);
  624. if (item.checkPointName.indexOf(value) >= 0) {
  625. this.detailList.push({
  626. ...item
  627. });
  628. } else if (responseList.length > 0) {
  629. this.detailList.push({
  630. ...item,
  631. responseList
  632. });
  633. }
  634. });
  635. }
  636. },
  637. goLegendDetails(e, checkItemId, checkPointId) {
  638. _stopPropagation(e);
  639. //跳转到图例详情
  640. uni.navigateTo({
  641. url: `/pages/legendDetails/legendDetails?checkItemId=${checkItemId}&checkPointId=${checkPointId}`
  642. });
  643. },
  644. dispatch(key, data) {
  645. return this.$store.dispatch({
  646. type: 'checkList/commActions',
  647. key,
  648. data
  649. });
  650. },
  651. }
  652. }
  653. </script>
  654. <style lang="less">
  655. .checkMainPoints {
  656. position: relative;
  657. height: 100%;
  658. display: flex;
  659. flex-direction: column;
  660. // font-size: 22.5rpx;
  661. // line-height: 33.75rpx;
  662. background-color: #F5F6FA;
  663. .slot-wrap {
  664. display: flex;
  665. flex: 1;
  666. justify-content: center;
  667. align-items: center;
  668. background: #F0F2F7;
  669. border-radius: 44px;
  670. padding-left: 20rpx;
  671. .searchBar {
  672. flex: 1;
  673. width: 100%;
  674. height: 55rpx;
  675. font-size: 22.5rpx;
  676. }
  677. .clearIcon {
  678. width: 25rpx;
  679. height: 25rpx;
  680. margin: 0 20.5rpx;
  681. }
  682. .searchBarHolder {
  683. font-size: 22.5rpx;
  684. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  685. font-weight: 400;
  686. color: #A1A7B3;
  687. }
  688. }
  689. .navbar-right {
  690. display: flex;
  691. justify-content: center;
  692. align-items: center;
  693. padding: 0 25rpx;
  694. .searchActiveBtn {
  695. font-size: 22.5rpx;
  696. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  697. font-weight: 400;
  698. color: #292C33;
  699. }
  700. }
  701. .botOneKeyCheck {
  702. text-align: center;
  703. height: 75rpx;
  704. width: 100%;
  705. line-height: 75rpx;
  706. font-size: 22.5rpx;
  707. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  708. font-weight: 400;
  709. color: #FFFFFF;
  710. background: #3377FF;
  711. }
  712. .bottomBtnGroup {
  713. // position: fixed;
  714. width: 100%;
  715. // left:0;
  716. // bottom: 0;
  717. display: flex;
  718. flex-direction: row;
  719. border-top: 1px solid #DADEE6;
  720. background-color: #fff;
  721. .score {
  722. display: flex;
  723. width: 50%;
  724. flex-direction: row;
  725. justify-content: center;
  726. align-items: center;
  727. height: 75rpx;
  728. .box {
  729. width: 50%;
  730. text-align: center;
  731. white-space: nowrap;
  732. vertical-align: bottom;
  733. .label {
  734. color: #666E80;
  735. font-size: 17.5rpx;
  736. margin-right: 10rpx;
  737. }
  738. .currentScore {
  739. font-size: 30rpx;
  740. font-weight: bold;
  741. color: #3377FF;
  742. &.xiaoji {
  743. color: #19BE6B;
  744. }
  745. }
  746. .totalScore {
  747. font-size: 30rpx;
  748. font-weight: bold;
  749. color: #292C33;
  750. }
  751. }
  752. .midLine {
  753. height: 17.5rpx;
  754. border-left: 0.62rpx solid #DADEE6;
  755. }
  756. &.scoreTypeTwo {
  757. height: 100rpx;
  758. .box {
  759. .rowOne {
  760. .subLabel {
  761. font-size: 10rpx;
  762. color: #82848A;
  763. margin-left: 10rpx;
  764. }
  765. }
  766. .rowTwo {
  767. .currentScore {
  768. font-size: 20rpx;
  769. font-weight: bold;
  770. color: #666E80;
  771. }
  772. }
  773. }
  774. .midLine {
  775. height: 25rpx;
  776. }
  777. }
  778. }
  779. .botOneKeyCheck {
  780. display: flex;
  781. justify-content: center;
  782. align-items: center;
  783. height: 100%;
  784. flex-grow: 1;
  785. font-size: 22.5rpx;
  786. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  787. font-weight: 400;
  788. color: #FFFFFF;
  789. background: #3377FF;
  790. &.typeTwo {
  791. font-size: 32.5rpx;
  792. }
  793. }
  794. }
  795. .tm-top-menu {
  796. .rowTwo {
  797. display: flex;
  798. width: 100%;
  799. height: 0;
  800. overflow: hidden;
  801. flex-direction: column;
  802. box-sizing: border-box;
  803. padding: 0 25rpx;
  804. overflow: hidden;
  805. .rowTwoName {
  806. font-size: 22.5rpx;
  807. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  808. font-weight: 400;
  809. color: #666F80;
  810. margin-bottom: 12.5rpx;
  811. padding-top: 35rpx;
  812. }
  813. .filterBtnWrap {
  814. display: flex;
  815. flex-direction: row;
  816. justify-content: space-between;
  817. }
  818. }
  819. }
  820. .top-search {
  821. display: flex;
  822. flex-direction: row;
  823. align-items: center;
  824. justify-content: space-between;
  825. padding: 25rpx;
  826. background-color: #fff;
  827. box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
  828. .search {
  829. position: relative;
  830. width: 70%;
  831. height: 55rpx;
  832. line-height: 55rpx;
  833. background-color: #F0F2F7;
  834. input {
  835. padding: 0 45rpx 0 15rpx;
  836. height: 55rpx;
  837. line-height: 55rpx;
  838. font-size: 22.5rpx;
  839. }
  840. image {
  841. position: absolute;
  842. top: 16.87rpx;
  843. right: 15rpx;
  844. width: 21.25rpx;
  845. height: 21.25rpx;
  846. }
  847. }
  848. .btnGroup {
  849. display: flex;
  850. flex-direction: row;
  851. justify-content: center;
  852. align-items: center;
  853. .searchBtn {
  854. width: 30rpx;
  855. height: 30rpx;
  856. margin-right: 30rpx;
  857. }
  858. .filterBtn {
  859. width: 30rpx;
  860. height: 27.5rpx;
  861. }
  862. }
  863. .top-btn-wrap {
  864. padding-left: 25rpx;
  865. .btn-list {
  866. display: flex;
  867. flex-direction: row;
  868. .com-button {
  869. margin-left: 5rpx;
  870. &:first-child {
  871. margin-left: 0;
  872. }
  873. }
  874. }
  875. .select-wrap {
  876. display: flex;
  877. flex-direction: row;
  878. align-items: center;
  879. white-space: nowrap;
  880. image {
  881. margin-left: 9.37rpx;
  882. width: 12.5rpx;
  883. height: 12.5rpx;
  884. }
  885. }
  886. }
  887. }
  888. .top-search-two {
  889. display: flex;
  890. flex-direction: column;
  891. align-items: flex-start;
  892. justify-content: center;
  893. padding: 25rpx;
  894. background-color: #fff;
  895. box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
  896. .rowOne {
  897. display: flex;
  898. width: 100%;
  899. flex-direction: row;
  900. justify-content: space-between;
  901. align-items: center;
  902. .selectPeople {
  903. display: flex;
  904. flex-direction: row;
  905. justify-content: space-between;
  906. align-items: center;
  907. .completePeopleIcon {
  908. width: 50rpx;
  909. height: 50rpx;
  910. margin-right: 15rpx;
  911. }
  912. .peopleName {
  913. font-size: 25rpx;
  914. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  915. font-weight: 400;
  916. color: #292C33;
  917. }
  918. .fullArrow {
  919. width: 11.25rpx;
  920. height: 7.5rpx;
  921. margin-left: 15rpx;
  922. }
  923. .addPeopleBtn {
  924. width: 30rpx;
  925. height: 30rpx;
  926. margin-right: 12.5rpx;
  927. }
  928. }
  929. .btnGroup {
  930. .searchBtn {
  931. width: 30rpx;
  932. height: 30rpx;
  933. margin-right: 50rpx;
  934. }
  935. .filterBtn {
  936. width: 30rpx;
  937. height: 27.5rpx;
  938. }
  939. }
  940. }
  941. }
  942. .content-list {
  943. // padding-top: 105rpx;
  944. width: 100%;
  945. background-color: #fff;
  946. .list-item {
  947. display: flex;
  948. flex-direction: row;
  949. justify-content: space-between;
  950. align-items: center;
  951. border-bottom: 1px solid #DADEE6;
  952. padding: 0 25rpx;
  953. width: 100%;
  954. height: 87.5rpx;
  955. font-size: 22.5rpx;
  956. line-height: 33.75rpx;
  957. color: #292C33;
  958. .check-img {
  959. float: right;
  960. width: 19.37rpx;
  961. height: 14.37rpx;
  962. }
  963. &.active {
  964. color: #3377FF;
  965. }
  966. }
  967. }
  968. .contentContainer {
  969. display: flex;
  970. flex: 1;
  971. height: 100%;
  972. overflow: hidden;
  973. .scroll-Y {
  974. height: 100%;
  975. &.noBtn {
  976. height: 100%;
  977. }
  978. }
  979. }
  980. .list {
  981. .title {
  982. padding-left: 25rpx;
  983. width: 100%;
  984. height: 62.5rpx;
  985. line-height: 62.5rpx;
  986. color: #666F80;
  987. }
  988. .item {
  989. margin-top: 15rpx;
  990. padding: 25rpx 0;
  991. min-height: 167.5rpx;
  992. background-color: #fff;
  993. &:nth-child(2) {
  994. margin-top: 0;
  995. }
  996. .top-box {
  997. display: flex;
  998. flex-direction: row;
  999. justify-content: space-between;
  1000. align-items: center;
  1001. .top-box-left {
  1002. display: flex;
  1003. flex-direction: row;
  1004. width: calc(100% - 55rpx);
  1005. .index-icon {
  1006. margin-right: 15rpx;
  1007. border-radius: 0 62.5rpx 62.5rpx 0;
  1008. width: 50rpx;
  1009. height: 35rpx;
  1010. line-height: 35rpx;
  1011. text-align: center;
  1012. color: #fff;
  1013. background-color: #66B2FE;
  1014. &.done {
  1015. background-color: rgba(195, 202, 217, 1);
  1016. }
  1017. }
  1018. >text {
  1019. display: -webkit-box;
  1020. overflow: hidden;
  1021. width: calc(100% - 65rpx);
  1022. text-overflow: ellipsis;
  1023. -webkit-line-clamp: 2;
  1024. /*! autoprefixer: off */
  1025. -webkit-box-orient: vertical;
  1026. }
  1027. }
  1028. .topRightGroup {
  1029. display: flex;
  1030. flex-direction: row;
  1031. .checkStatus {
  1032. display: flex;
  1033. flex-direction: row;
  1034. justify-content: center;
  1035. align-items: center;
  1036. width: 125rpx;
  1037. height: 40rpx;
  1038. margin-right: 15rpx;
  1039. background: #F2F4F7;
  1040. border-radius: 20rpx;
  1041. .checkIcon {
  1042. width: 25rpx;
  1043. height: 25rpx;
  1044. margin-right: 10rpx;
  1045. }
  1046. .checkStatusText {
  1047. font-size: 20rpx;
  1048. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  1049. font-weight: 400;
  1050. color: #292C33;
  1051. }
  1052. }
  1053. image {
  1054. margin-right: 15rpx;
  1055. width: 40rpx;
  1056. height: 40rpx;
  1057. }
  1058. }
  1059. }
  1060. .children {
  1061. display: flex;
  1062. flex-direction: row;
  1063. align-items: center;
  1064. margin-top: 18.75rpx;
  1065. .child {
  1066. display: flex;
  1067. flex-direction: column;
  1068. justify-content: center;
  1069. align-items: center;
  1070. flex: 1;
  1071. border-right: 1px solid #DADEE6;
  1072. text {
  1073. width: 150rpx;
  1074. font-weight: 500;
  1075. text-align: center;
  1076. overflow: hidden;
  1077. text-overflow: ellipsis;
  1078. white-space: nowrap;
  1079. &:last-child {
  1080. font-size: 17.5rpx;
  1081. line-height: 26.25rpx;
  1082. color: #7A8599;
  1083. text-align: center;
  1084. font-weight: 400;
  1085. }
  1086. }
  1087. &:last-child {
  1088. border-right: 0;
  1089. }
  1090. }
  1091. }
  1092. }
  1093. }
  1094. }
  1095. </style>