checkMainPoints.vue 34 KB

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