checkMainPoints.vue 32 KB

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