checkMainPoints.vue 32 KB

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