checkMainPoints.vue 38 KB

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