checkMainPoints.vue 34 KB

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