checkMainPoints.vue 37 KB

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