checkMainPoints.vue 34 KB

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