mainPointsDetail.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189
  1. <template>
  2. <view class="mainPointsDetailPage">
  3. <tm-modal v-if="showSelectModal" @click="clickModalhandle">
  4. <view class="checkItemResultModal">
  5. <view class="modalContent">
  6. <view class="modalBar">请选择查核结果</view>
  7. <scroll-view class="scroll" scroll-y="true" >
  8. <view v-for="item in checkItemResultList" :class="[checkedSelectResultListIds.includes(item.id)?'list on':'list']" :key="item.id" @click.stop="selectResultHandle(item)" >
  9. <image class="checkIcon" src="../../static/check-checkbox.png" mode=""></image>
  10. {{item.resultName}}
  11. </view>
  12. </scroll-view>
  13. <view class="comfirmBtn" @click="commitSelectResult">确定</view>
  14. </view>
  15. </view>
  16. </tm-modal>
  17. <scroll-view scroll-y="true" class="scroll-y">
  18. <view class="checkItem">
  19. <view class="chBg">
  20. <image
  21. src="../../static/chahexiang-bg.png"
  22. mode=""
  23. class="img"
  24. ></image>
  25. <text class="title">查核项</text>
  26. </view>
  27. <image
  28. src="../../static/tuli.png"
  29. mode=""
  30. class="tlImg"
  31. @click="toTuLi"
  32. ></image>
  33. <view class="chContent">
  34. <view class="checkItemName">{{ data.checkItemName ? data.checkItemName : "" }}</view>
  35. <view class="checkPointName">{{ data.checkPointName ? data.checkPointName : "" }}</view>
  36. <view class="cont">
  37. <view class="floatLeft other">
  38. <view class="letterTitle2">{{ data.deptName ? data.deptName : "" }}</view>
  39. <view class="letterTitle">查核单位</view>
  40. </view>
  41. <view class="floatLeft borderLine"></view>
  42. <view class="floatLeft other">
  43. <view class="letterTitle2">{{ data.checkModelName ? data.checkModelName : "" }}</view>
  44. <view class="letterTitle">查核方式</view>
  45. </view>
  46. <view class="floatLeft borderLine"></view>
  47. <view class="floatLeft other">
  48. <view class="letterTitle2">{{ data.lastResult ? data.lastResult : "" }}</view>
  49. <view class="letterTitle">上次结果</view>
  50. </view>
  51. <view class="floatLeft borderLine"></view>
  52. <view class="floatLeft other">
  53. <view class="letterTitle2">{{ data.checkResult ? data.checkResult : "" }}</view>
  54. <view class="letterTitle">本次结果</view>
  55. </view>
  56. </view>
  57. <view class="checked">
  58. <view
  59. class="checked-checkItem"
  60. v-for="item in checkConfiglist"
  61. :key="item.attr"
  62. @click="checkedOne(item)"
  63. :style="
  64. Index == item.attr
  65. ? { backgroundColor: '#3377FF', color: '#fff' }
  66. : { backgroundColor: '#EBEFF7' }
  67. "
  68. >{{item.attr}}
  69. <view v-if="lastIndex == item.attr"
  70. ><image
  71. src="../../static/shangci.png"
  72. mode=""
  73. class="img"
  74. ></image>
  75. <text class="lastName">上次</text></view
  76. >
  77. </view>
  78. </view>
  79. <view class="more" @click="toHistory">
  80. <text>查看改善历史</text>
  81. <view class="moreImg">
  82. <image
  83. src="../../static/blue-arrow.png"
  84. mode=""
  85. class="moreImg2"
  86. ></image>
  87. </view>
  88. </view>
  89. <view class="multipleResponsible">
  90. <view class="inner" @click="toSelectResponsible">
  91. <text class="label">当事人</text>
  92. <input type="text" disabled v-model="checkedResponsibleList.join(',')" placeholder="请选择当事人(可多选)" class="value" placeholder-class="valuePlaceholder" />
  93. <image class="arrow" src="../../static/incon-more.png" mode=""></image>
  94. </view>
  95. </view>
  96. <view class="score">
  97. <view class="box">
  98. <text class="lable">总分</text>
  99. <text class="totalScore">{{totalScore}}</text>
  100. </view>
  101. <view class="box">
  102. <text class="lable">本次得分</text>
  103. <text class="currentScore">{{currentScore}}</text>
  104. </view>
  105. </view>
  106. <view class="inputScore">
  107. <text class="label">本项评分</text>
  108. <input class="value" @input="onInputScore" type="number" value="" placeholder="请输入分值" placeholder-class="placeholder" />
  109. </view>
  110. </view>
  111. </view>
  112. <view v-if="data.checkModelName == '访谈'" class="talk">
  113. <view v-for="(item, i) in talkList">
  114. <view class="talkTitle">
  115. <text
  116. >访谈内容{{ i + 1 }}{{ i == 0 ? "" : "(访谈人员:护士、医生)" }}</text
  117. >
  118. <text v-if="i != 0" class="del" @click="del(i)">删除</text>
  119. </view>
  120. <view>
  121. <view class="talkResult">
  122. <view class="seeResultFloorOne">
  123. <text class="seeName">查核结果</text>
  124. <view class="plusAction" v-if="checkItemResultList.length>0" @click="openSelectModal">
  125. <image class="plusIcon" src="../../static/icon-add.png" mode=""></image>
  126. <text class="threePoint" >缺陷</text>
  127. </view>
  128. <!-- <text v-if="checkItemResultList.length>0" class="threePoint" @click="openSelectModal(i)">⋮</text> -->
  129. </view>
  130. <textarea
  131. maxlength="300"
  132. class="seeTextarea"
  133. value=""
  134. placeholder="请输入"
  135. :value="item.talkResult"
  136. @blur="changeTextarea($event, i)"
  137. ></textarea>
  138. </view>
  139. <view class="talkImg" @click="imgClick(i)">
  140. <tm-upload-img
  141. label="上传图片"
  142. :filePaths="item.filePath"
  143. :isMultiple="true"
  144. @changeFilePaths="changeFilePaths2"
  145. />
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. <view v-else class="see">
  151. <view class="seeResult">
  152. <view class="seeResultFloorOne">
  153. <text class="seeName">查核结果</text>
  154. <view class="plusAction" v-if="checkItemResultList.length>0" @click="openSelectModal">
  155. <image class="plusIcon" src="../../static/icon-add.png" mode=""></image>
  156. <text class="threePoint" >缺陷</text>
  157. </view>
  158. <!-- <text class="threePoint" v-if="checkItemResultList" @click="openSelectModal">⋮</text> -->
  159. <!-- <dropdown :list="checkItemResultList" :current="currentSelect" @onClick="dropDownChange"></dropdown> -->
  160. </view>
  161. <textarea
  162. maxlength="300"
  163. class="seeTextarea"
  164. placeholder="请输入"
  165. :value="recordList[0].seeResult"
  166. @blur="changeTextarea2"
  167. ></textarea>
  168. </view>
  169. <view class="seeImg">
  170. <tm-upload-img
  171. label="上传图片"
  172. :filePaths="filePath"
  173. :isMultiple="true"
  174. @changeFilePaths="changeFilePaths"
  175. />
  176. </view>
  177. </view>
  178. <button
  179. class="insert"
  180. @click="insert"
  181. v-if="data.checkModelName == '访谈'"
  182. >
  183. + 增加一条记录
  184. </button>
  185. </scroll-view>
  186. <!-- <button type="primary" class="sureDetail" @click="sureDetail" v-if="data.display?data.display:false">完成</button> -->
  187. <view class="bottomMenuGroup">
  188. <view class="menuBtn" @click="goToPrevPage">
  189. <image class="threeLineMenuIcon" src="/static/threeLineMenu.png" ></image>
  190. </view>
  191. <view class="prevBtn" @click="switchItem(1)">下一项</view>
  192. <view class="nextBtn" @click="sureDetail('back')" v-if="data.display?data.display:false">完成</view>
  193. </view>
  194. </view>
  195. </template>
  196. <script>
  197. import {_goBackFresh} from '../../utils/compatible.js';
  198. // import ldSelect from '@/components/ld-select/ld-select.vue'
  199. export default {
  200. // components:{ldSelect},
  201. data() {
  202. return {
  203. value:'',
  204. showSelectModal:false,
  205. data: {}, //详情数据
  206. lastIndex: null, //上次选中的结果
  207. Index: null, //点击修改本次选中样式
  208. filePath: [],
  209. recordList: [{ seeResult: "", filePath: [] }],
  210. talkLength: 1,
  211. talkList: [{ talkResult: "", filePath: [] }],
  212. editIndex: null,
  213. resultConfigList: [],
  214. id: "",
  215. checkPointId: "",
  216. itemBelongGroup:[],
  217. itemId:'',
  218. currentEditTextAreaIndex:'',
  219. checkItemResultList:[],//查核结果说明下拉列表
  220. checkedSelectResultList:[],//下拉结果选中集合
  221. checkedSelectResultListIds:[],
  222. currentSelect:'',
  223. checkItemScore:null,//查核选中的分数
  224. checkItemValue:null,//查核选中的分数占比
  225. checkConfiglist:[],//查核情况可配置列表
  226. totalScore:10,//总分
  227. // currentScore:0,//当前得分
  228. inputScore:0,//手动填写分值
  229. selectedScore:0,//缺失项分值
  230. checkedResponsibleList:[],
  231. deptId:'',//病区id
  232. checkedResponsibleData:[],
  233. checkedSelectResultListData:[],
  234. };
  235. },
  236. onShow() {
  237. const {responsibleList} = this.$store.state;
  238. this.checkedResponsibleData = responsibleList.checkedResponsibleList;
  239. this.checkedResponsibleList = responsibleList.checkedResponsibleList.map(item=>item.main);
  240. },
  241. computed:{
  242. currentScore:function(){
  243. return (this.totalScore-this.inputScore-this.selectedScore-this.checkItemScore).toFixed(2);
  244. },
  245. deductPoint:function(){
  246. // console.log(Number(this.inputScore)+Number(this.selectedScore)+Number(this.checkItemScore));
  247. return (Number(this.inputScore)+Number(this.selectedScore)+Number(this.checkItemScore)).toFixed(2)
  248. }
  249. },
  250. watch:{
  251. checkedResponsibleList:function(){
  252. const {responsibleList} = this.$store.state;
  253. // console.log({responsibleList});
  254. return responsibleList.checkedResponsibleList.map(item=>item.main);
  255. }
  256. },
  257. mounted() {
  258. this.checkTaskDetail(this.id);
  259. this.getPeizhiList();
  260. },
  261. methods: {
  262. clickModalhandle(){
  263. this.showSelectModal = false;
  264. },
  265. openSelectModal(index){
  266. // console.log({index});
  267. if(index>=0){
  268. this.currentEditTextAreaIndex = index;
  269. }
  270. this.showSelectModal = true;
  271. },
  272. //跳转选择当事人
  273. toSelectResponsible(){
  274. // console.log(this.deptId);
  275. uni.navigateTo({
  276. url: `/pages/responsibleList/responsibleList?deptId=${this.deptId}&checkId=${this.id}`,
  277. });
  278. },
  279. onInputScore(e){
  280. this.inputScore = e.target.value;
  281. },
  282. selectResultHandle(item){
  283. // console.log({val});
  284. // console.log('currentEditTextAreaIndex',this.currentEditTextAreaIndex);
  285. if(this.checkedSelectResultListIds.includes(item.id)){
  286. const tempIdsArr = JSON.parse(JSON.stringify(this.checkedSelectResultListIds));
  287. const tempArr = JSON.parse(JSON.stringify(this.checkedSelectResultList));
  288. const tempArrData = JSON.parse(JSON.stringify(this.checkedSelectResultListData));
  289. tempIdsArr.splice(tempIdsArr.indexOf(item.id),1);
  290. tempArr.splice(tempArr.indexOf(item.resultName),1);
  291. tempArrData.splice(tempArrData.indexOf(item.id),1);
  292. this.checkedSelectResultListIds = tempIdsArr;
  293. this.checkedSelectResultList = tempArr;
  294. this.checkedSelectResultListData = tempArrData;
  295. }else {
  296. this.checkedSelectResultListIds.push(item.id);
  297. this.checkedSelectResultList.push(item.resultName);
  298. this.checkedSelectResultListData.push(item);
  299. }
  300. },
  301. commitSelectResult(){
  302. if(this.data.checkModelName == '访谈'){
  303. this.talkList[this.currentEditTextAreaIndex].talkResult = this.checkedSelectResultList.join(',');
  304. }else {
  305. this.recordList[0].seeResult = this.checkedSelectResultList.join(',');
  306. }
  307. const tempArr = this.checkedSelectResultListData.map(item=>item.percentScore);
  308. const tempScore = tempArr.reduce((prev,cur)=>{
  309. return (prev/100)+(cur/100)
  310. },0);
  311. this.selectedScore = this.totalScore*tempScore;
  312. // console.log({tempScore});
  313. // console.log(this.selectedScore);
  314. this.showSelectModal = false;
  315. },
  316. checkTaskDetail(id) {
  317. this.$store.dispatch({
  318. type: "mainPointsDetail/commActions",
  319. payload: {
  320. key: "checkTaskDetail",
  321. data: {
  322. id: id,
  323. },
  324. },
  325. }).then((res) => {
  326. // console.log({res});
  327. this.id = id;
  328. this.deptId = res.deptId;
  329. //用于当时人页面回显
  330. if(res.responsibleUserName){
  331. const tempResponsibleUserName = res.responsibleUserName.split(',');
  332. const tempResponsibleUserId = res.responsibleUserId.split(',');
  333. this.checkedResponsibleList = tempResponsibleUserName;
  334. const arr = tempResponsibleUserName.map((item,index)=>({
  335. main:item,
  336. id:parseInt(tempResponsibleUserId[index])
  337. }));
  338. this.$store.commit('responsibleList/updateCheckedResponsibleList',arr);
  339. }
  340. if (res) {
  341. this.data = res;
  342. if (res && res.lastResult == "不适用") {
  343. // this.lastIndex = 1;
  344. this.lastIndex = res.lastResult;
  345. } else if (res && res.lastResult == "无缺失") {
  346. this.lastIndex = res.lastResult;
  347. } else if (res && res.lastResult == "主要缺失") {
  348. this.lastIndex = res.lastResult;
  349. } else if (res && res.lastResult == "次要缺失") {
  350. this.lastIndex = res.lastResult;
  351. } else if (res && res.lastResult == "观察事项") {
  352. this.lastIndex = res.lastResult;
  353. } else {
  354. this.lastIndex = 0;
  355. }
  356. }
  357. });
  358. },
  359. getPeizhiList() {
  360. this.$store.dispatch({
  361. type: "configure/commActions",
  362. payload: {
  363. key: "getResultConfig",
  364. },
  365. }).then((res) => {
  366. this.resultConfigList = res ? res : [];
  367. });
  368. },
  369. //查核点击回调
  370. checkedOne(data) {
  371. const parsedData = JSON.parse(JSON.stringify(data));
  372. // console.log({parsedData})
  373. this.Index = parsedData.attr;
  374. this.data.checkResult = parsedData.attr;
  375. this.checkItemScore = parsedData.score;
  376. this.checkItemValue = parsedData.value;
  377. // this.Index = data;
  378. // this.data.checkResult = data;
  379. // if (data == 1) {
  380. // this.data.checkResult = "不适用";
  381. // } else if (data == 2) {
  382. // this.data.checkResult = "无缺失";
  383. // } else if (data == 3) {
  384. // this.data.checkResult = "主要缺失";
  385. // } else if (data == 4) {
  386. // this.data.checkResult = "次要缺失";
  387. // } else if (data == 5) {
  388. // this.data.checkResult = "观察事项";
  389. // } else {
  390. // this.data.checkResult = "";
  391. // }
  392. },
  393. changeFilePaths(filePaths, index) {
  394. let _recordList = [...this.recordList];
  395. _recordList[index].filePath = filePaths;
  396. this.filePath = _recordList[0].filePath;
  397. },
  398. insert() {
  399. let list = [...this.talkList];
  400. if (list.length < 10) {
  401. list.push({ talkResult: "", filePath: [] });
  402. this.talkList = list;
  403. }
  404. },
  405. del(index) {
  406. let list = [...this.talkList];
  407. let list2 = [];
  408. for (let i = 0; i < list.length; i++) {
  409. if (i != index) {
  410. list2.push(list[i]);
  411. }
  412. }
  413. this.talkList = list2;
  414. },
  415. changeFilePaths2(filePaths, index) {
  416. for (let j = 0; j < this.talkList.length; j++) {
  417. this.talkList[this.editIndex].filePath = filePaths;
  418. }
  419. },
  420. changeTextarea(e, i) {
  421. for (let j = 0; j < this.talkList.length; j++) {
  422. this.talkList[i].talkResult = e.detail.value;
  423. }
  424. },
  425. changeTextarea2(e) {
  426. this.recordList[0].seeResult = e.target.value;
  427. },
  428. imgClick(i) {
  429. this.editIndex = i;
  430. },
  431. sureDetail(key) {
  432. if (this.Index) {
  433. let params = {
  434. id: this.data.id,
  435. checkResult: this.data.checkResult,
  436. checkResultRequestList: [],
  437. checkItemScore:this.checkItemScore,
  438. value:this.checkItemValue,
  439. // responsibleUserId:(this.checkedResponsibleData.map(item=>item.id)).join(','),
  440. // responsibleUserName:(this.checkedResponsibleData.map(item=>item.main)).join(','),
  441. score:Number(this.currentScore),
  442. deductPoint:Number(this.deductPoint),
  443. };
  444. if (this.data.checkModelName == "访谈") {
  445. let list = [];
  446. for (let i = 0; i < this.talkList.length; i++) {
  447. let path = "";
  448. for (let j = 0; j < this.talkList[i].filePath.length; j++) {
  449. if (j == 0) {
  450. path += `${this.talkList[i].filePath[j]}`;
  451. } else {
  452. path += `,${this.talkList[i].filePath[j]}`;
  453. }
  454. }
  455. let item = {
  456. checkResultId: i,
  457. checkResultDescribe: this.talkList[i].talkResult,
  458. checkResultUrl: path,
  459. };
  460. list.push(item);
  461. }
  462. params.checkResultRequestList = list;
  463. } else {
  464. let list = [];
  465. let path = "";
  466. for (let j = 0; j < this.recordList[0].filePath.length; j++) {
  467. if (j == 0) {
  468. path += `${this.recordList[0].filePath[j]}`;
  469. } else {
  470. path += `,${this.recordList[0].filePath[j]}`;
  471. }
  472. }
  473. let item = {
  474. checkResultId: 1,
  475. checkResultDescribe: this.recordList[0].seeResult,
  476. checkResultUrl: path,
  477. };
  478. list.push(item);
  479. params.checkResultRequestList = list;
  480. }
  481. const checkConfiglist = JSON.parse(JSON.stringify(this.checkConfiglist));
  482. // console.log({params});
  483. // return;
  484. this.$store.dispatch({
  485. type: "mainPointsDetail/commActions",
  486. payload: {
  487. key: "saveCheckTaskDetail",
  488. data: {
  489. ...params,
  490. },
  491. },
  492. }).then((res) => {
  493. console.log({'res':res,'checkConfiglist':checkConfiglist});
  494. if (res) {
  495. for (let i = 0; i < checkConfiglist.length; i++) {
  496. if (
  497. checkConfiglist[i].attr == params.checkResult &&
  498. (checkConfiglist[i].resultType == 2 ||
  499. checkConfiglist[i].resultType == 3)
  500. ) {
  501. console.log('开始提交改善前准备');
  502. let param = {
  503. situationId: this.data.situationId,
  504. situationName: this.data.situationName,
  505. checkGroupId: this.data.checkGroupId,
  506. checkGroupName: this.data.checkGroupName,
  507. checkItemId: this.data.checkItemId,
  508. checkItemName: this.data.checkItemName,
  509. checkPointId: this.data.checkPointId,
  510. checkPointName: this.data.checkPointName,
  511. deptName: this.data.deptName,
  512. deptId: this.data.deptId,
  513. appointFlag: false,
  514. desicion: 0,
  515. taskType: "1",
  516. checkId: this.data.checkId,
  517. checkResult:0,
  518. newResultType:checkConfiglist[i].resultType,
  519. // checkResult: this.resultConfigList[i].id,
  520. receiveEmpId: this.data.receiveEmpId,
  521. receiveEmpName: this.data.receiveEmpName,
  522. checkDetailId: this.data.id,
  523. };
  524. this.$store.dispatch({
  525. type: "mission/commActions",
  526. payload: {
  527. key: "comTaskCirculation",
  528. data: {
  529. ...param,
  530. },
  531. },
  532. }).then(() => {
  533. });
  534. }else {
  535. console.log('改善条件为false');
  536. }
  537. }
  538. if(key=='back'){
  539. //点完成时返回
  540. _goBackFresh('pages/checkMainPoints/checkMainPoints');
  541. }
  542. // _goBackFresh('pages/checkMainPoints/checkMainPoints');
  543. //去查核详情页
  544. // uni.navigateTo({
  545. // url: `/pages/auditItemDetails/auditItemDetails?id=${this.data.id}&checkPointId=${this.checkPointId}`,
  546. // });
  547. }else {
  548. console.log('res为false');
  549. }
  550. });
  551. } else {
  552. uni.showModal({
  553. title: "检查选项未选择",
  554. showCancel: false,
  555. });
  556. }
  557. },
  558. toTuLi() {
  559. uni.navigateTo({
  560. url: `/pages/legendDetails/legendDetails?checkItemId=${this.data.checkItemId}&checkPointId=${this.checkPointId}`,
  561. });
  562. },
  563. toHistory() {
  564. const situationId = this.data.situationId;
  565. this.$store.dispatch({
  566. type: 'mission/commActions',
  567. payload: {
  568. key: "getMissionList",
  569. data:{situationId}
  570. }
  571. }).then(data => {
  572. if(data) {
  573. if(data.improvingTaskResponses.length>0){
  574. uni.navigateTo({
  575. url: `/pages/improve-mission-list/improve-mission-list?situationId=${this.data.situationId}`,
  576. });
  577. }else {
  578. uni.showModal({
  579. content: '暂无改善历史',
  580. showCancel:false
  581. });
  582. }
  583. // this.improvingTaskList = data.improvingTaskResponses || [];
  584. // this.completeTaskList = data.improveCompleteResponses || [];
  585. }
  586. });
  587. /** 请求参数 data
  588. * situationId: 情境id 当管路员或者查核者通过情境进入任务列表时 必传
  589. * checkItemId 单位负责人通过 查核要点进入改善任务列表时 必传
  590. */
  591. },
  592. clearForm(){
  593. this.Index = '';
  594. if(this.data.checkModelName == '访谈'){
  595. this.talkList[this.currentEditTextAreaIndex].talkResult = '';
  596. }else {
  597. this.recordList[0].talkResult ='';
  598. }
  599. },
  600. goToPrevPage(){
  601. _goBackFresh('pages/checkMainPoints/checkMainPoints');
  602. },
  603. switchItem:async function(num){
  604. await this.sureDetail();
  605. let current = this.itemBelongGroup.filter(item=>{
  606. return item.id == this.id;
  607. });
  608. if(num<0){
  609. if(current[0].index==0){
  610. uni.showToast({
  611. title: '已经没有上一项',
  612. duration: 2000,
  613. icon:'none'
  614. });
  615. return;
  616. }
  617. }
  618. if(num>0){
  619. if(current[0].index==this.itemBelongGroup.length-1){
  620. uni.showToast({
  621. title: '已经没有下一项',
  622. duration: 2000,
  623. icon:'none'
  624. });
  625. return;
  626. }
  627. }
  628. let needItemIndex = num>0?current[0].index+1:current[0].index-1;
  629. let needItemId = this.itemBelongGroup[needItemIndex].id;
  630. // console.log({needItemIndex,needItemId});
  631. this.clearForm();
  632. this.checkTaskDetail(needItemId);
  633. },
  634. // 获取查核项可配置列表
  635. getCheckConfigList(checkItemId) {
  636. this.$store.dispatch({
  637. type: 'mainPointsDetail/commActions',
  638. payload: {
  639. key:'getCheckItemAttr',
  640. data:checkItemId
  641. }
  642. }).then(data=>{
  643. this.checkConfiglist = data
  644. })
  645. },
  646. // 获取查核项结果说明下拉列表
  647. getCheckItemResultList(checkItemId) {
  648. this.$store.dispatch({
  649. type: 'mainPointsDetail/commActions',
  650. payload: {
  651. key:'getCheckItemResultList',
  652. data:checkItemId
  653. }
  654. }).then(data=>{
  655. // console.log({data});
  656. // const temp = [
  657. // {resultName:'1',id:0},
  658. // {resultName:'2',id:1},
  659. // {resultName:'3',id:2},
  660. // {resultName:'4',id:3}
  661. // ]
  662. // this.checkItemResultList = temp;
  663. this.checkItemResultList = data;
  664. })
  665. },
  666. },
  667. onLoad({ id, checkPointId,checkItemId }) {
  668. this.id = id;
  669. this.checkPointId = checkPointId;
  670. this.getCheckConfigList(checkItemId);
  671. this.getCheckItemResultList(checkItemId);
  672. //接收来自上个页面所传过来的数据
  673. const eventChannel = this.getOpenerEventChannel();
  674. eventChannel.on('acceptDataFromOpenerPage', (data)=>{
  675. // console.log({data});
  676. this.itemBelongGroup =data.data[0].responseList.map((item,index)=>{
  677. return({
  678. index:index,
  679. id:item['id'],
  680. })
  681. });
  682. //重新导航进页面,删除缓存并设置最新数据
  683. uni.removeStorageSync('itemBelongGroup');
  684. uni.setStorageSync('itemBelongGroup',this.itemBelongGroup);
  685. });
  686. //手动刷新页面,获取本地缓存
  687. const itemBelongGroup = uni.getStorageSync('itemBelongGroup');
  688. this.itemBelongGroup = itemBelongGroup;
  689. },
  690. };
  691. </script>
  692. <style lang="less">
  693. .mainPointsDetailPage {
  694. position: relative;
  695. // min-height: 75rpx;
  696. // overflow-y: auto;
  697. height: 100%;
  698. .checkItemResultModal {
  699. display: flex;
  700. height: 100%;
  701. justify-content: center;
  702. align-items: center;
  703. .modalContent {
  704. width: 90%;
  705. height:600rpx;
  706. border-radius: 10rpx;
  707. overflow: hidden;
  708. background-color: #FFFFFF;
  709. .modalBar{
  710. display: flex;
  711. justify-content: center;
  712. align-items: center;
  713. height: 80rpx;
  714. color: #4E78FF;
  715. font-size: 22.5rpx;
  716. box-shadow: 0 6rpx 6rpx #E5E5E5;
  717. border-bottom: 0.1rpx solid #E5E5E5;
  718. }
  719. .comfirmBtn {
  720. font-size: 22rpx;
  721. color: #FFFFFF;
  722. height: 80rpx;
  723. line-height: 80rpx;
  724. text-align: center;
  725. background-color: #3377FF;
  726. }
  727. .scroll {
  728. height: calc(100% - 160rpx);
  729. .list {
  730. position: relative;
  731. display: flex;
  732. height: 80rpx;
  733. justify-content: center;
  734. align-items: center;
  735. border-bottom: 0.1rpx solid #E5E5E5;
  736. .checkIcon {
  737. display: none;
  738. position: absolute;
  739. left:5%;
  740. width: 25rpx;
  741. height:25rpx;
  742. }
  743. &.on {
  744. color: #3377FF;
  745. .checkIcon {
  746. display: block;
  747. }
  748. }
  749. }
  750. }
  751. }
  752. }
  753. .scroll-y {
  754. height: calc(100% - 75rpx);
  755. }
  756. .checkItem {
  757. padding-top: 47.5rpx;
  758. width: 100%;
  759. min-height: 450rpx;
  760. background-color: #fff;
  761. position: relative;
  762. .chBg {
  763. position: absolute;
  764. top: 0;
  765. left: 0;
  766. width: 125rpx;
  767. height: 37.5rpx;
  768. .img {
  769. width: 125rpx;
  770. height: 37.5rpx;
  771. }
  772. .title {
  773. position: absolute;
  774. top: 8.75rpx;
  775. left: 25rpx;
  776. font-size: 20rpx;
  777. color: #fff;
  778. font-weight: 500;
  779. line-height: 20rpx;
  780. }
  781. }
  782. .tlImg {
  783. width: 40rpx;
  784. height: 40rpx;
  785. position: absolute;
  786. right: 25rpx;
  787. top: 25rpx;
  788. }
  789. .chContent {
  790. width: 100%;
  791. .checkItemName {
  792. margin-left: 31.25rpx;
  793. font-size: 25rpx;
  794. line-height: 55rpx;
  795. color: #292c33;
  796. }
  797. .checkPointName {
  798. margin-left: 31.25rpx;
  799. font-size: 17.5rpx;
  800. line-height: 17.5rpx;
  801. color: #7a8599;
  802. }
  803. .cont {
  804. height: 135rpx;
  805. .floatLeft {
  806. float: left;
  807. }
  808. .borderLine {
  809. margin-top: 56.25rpx;
  810. width: 0.62rpx;
  811. height: 25rpx;
  812. background-color: #dadee6;
  813. }
  814. .other {
  815. padding: 40rpx 0rpx;
  816. height: 95rpx;
  817. width: 187.18rpx;
  818. text-align: center;
  819. .letterTitle {
  820. font-size: 17.5rpx;
  821. color: #7a8599;
  822. line-height: 17.5rpx;
  823. }
  824. .letterTitle2 {
  825. height: 22.5rpx;
  826. font-size: 22.5rpx;
  827. line-height: 22.5rpx;
  828. color: #292c33;
  829. margin-bottom: 15rpx;
  830. font-weight: 500;
  831. }
  832. }
  833. }
  834. .checked {
  835. margin-bottom: 40rpx;
  836. padding: 0rpx 15.62rpx;
  837. height: 75rpx;
  838. .checked-checkItem {
  839. margin: 0rpx 9.37rpx;
  840. padding: 0;
  841. width: 125rpx;
  842. height: 75rpx;
  843. background: #ebeff7;
  844. float: left;
  845. line-height: 75rpx;
  846. text-align: center;
  847. color: #292c33;
  848. border-radius: 20rpx;
  849. position: relative;
  850. .img {
  851. width: 51.25rpx;
  852. height: 25rpx;
  853. position: absolute;
  854. right: -6.25rpx;
  855. top: -6.25rpx;
  856. }
  857. .lastName {
  858. color: #fff;
  859. font-size: 13.75rpx;
  860. line-height: 13.75rpx;
  861. position: absolute;
  862. right: 5rpx;
  863. top: -1.87rpx;
  864. }
  865. }
  866. }
  867. .more {
  868. margin: 0rpx 25rpx 0rpx 25rpx;
  869. text-align: center;
  870. border-top: 0.62rpx solid #dadee6;
  871. text {
  872. padding: 29.37rpx 0rpx 27.5rpx;
  873. margin-right: 10rpx;
  874. line-height: 22.5rpx;
  875. font-size: 22.5rpx;
  876. color: #3377ff;
  877. display: inline-block;
  878. vertical-align: top;
  879. }
  880. .moreImg {
  881. margin-top: 28.75rpx;
  882. width: 12.37rpx;
  883. height: 21.21rpx;
  884. display: inline-block;
  885. }
  886. .moreImg2 {
  887. width: 12.37rpx;
  888. height: 21.21rpx;
  889. }
  890. }
  891. .multipleResponsible {
  892. padding-top:15rpx;
  893. background-color:#F5F6FA;
  894. .inner {
  895. position: relative;
  896. display: flex;
  897. height: 87.5rpx;
  898. z-index: 10;
  899. flex-direction: row;
  900. justify-content: flex-start;
  901. align-items: center;
  902. padding: 0 25rpx;
  903. background-color: #FFFFFF;
  904. .label {
  905. display: inline-block;
  906. font-size: 22.5rpx;
  907. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  908. font-weight: 400;
  909. color: #525866;
  910. margin-right: 105rpx;
  911. }
  912. .value {
  913. flex: 0.9;
  914. font-size: 22.5rpx;
  915. overflow:hidden; //超出的文本隐藏
  916. text-overflow:ellipsis; //溢出用省略号显示
  917. white-space:nowrap; //溢出不换行
  918. }
  919. .valuePlaceholder {
  920. font-size: 22.5rpx;
  921. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  922. font-weight: 400;
  923. color: #B8BECC;
  924. }
  925. .arrow {
  926. position: absolute;
  927. right:25rpx;
  928. width: 12.5rpx;
  929. height: 20rpx;
  930. }
  931. }
  932. }
  933. .score {
  934. display: flex;
  935. height: 87.5rpx;
  936. flex-direction:row;
  937. justify-content: space-between;
  938. align-items: center;
  939. padding: 0 25rpx;
  940. background: #F5F6FA;
  941. .box {
  942. text-align: center;
  943. vertical-align: bottom;
  944. .lable {
  945. display: inline-block;
  946. font-size: 22.5rpx;
  947. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  948. font-weight: 400;
  949. color: #525866;
  950. margin-right: 10rpx;
  951. }
  952. .totalScore {
  953. font-size: 30rpx;
  954. font-family: SourceHanSansCN-Bold, SourceHanSansCN;
  955. font-weight: bold;
  956. color: #292C33;
  957. }
  958. .currentScore {
  959. font-size: 30rpx;
  960. font-family: SourceHanSansCN-Bold, SourceHanSansCN;
  961. font-weight: bold;
  962. color: #3377FF;
  963. }
  964. }
  965. }
  966. .inputScore {
  967. display: flex;
  968. flex-direction: row;
  969. justify-content: flex-start;
  970. align-items:center;
  971. height: 87.5rpx;
  972. padding: 0 25rpx;
  973. background-color: #FFFFFF;
  974. .label {
  975. display: inline-block;
  976. font-size: 22.5rpx;
  977. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  978. font-weight: 400;
  979. color: #525866;
  980. margin-right: 81.25rpx;
  981. }
  982. .value {
  983. font-size: 22.5rpx;
  984. }
  985. .placeholder {
  986. font-size: 22.5rpx;
  987. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  988. font-weight: 400;
  989. color: #B8BECC;
  990. }
  991. }
  992. }
  993. }
  994. .see {
  995. margin-top: 15rpx;
  996. height: 287.5rpx;
  997. background-color: #fff;
  998. // padding-left: 25rpx;
  999. .seeResult {
  1000. margin-left: 25rpx;
  1001. padding-top: 32.5rpx;
  1002. // height: 200rpx;
  1003. border-bottom: 1px solid #dadee6;
  1004. .seeResultFloorOne {
  1005. display: flex;
  1006. flex-direction: row;
  1007. justify-content:space-between;
  1008. align-items: center;
  1009. margin-bottom: 25rpx;
  1010. padding-right: 25rpx;
  1011. .plusAction {
  1012. display: flex;
  1013. flex-direction: row;
  1014. justify-content: center;
  1015. align-items: center;
  1016. .plusIcon {
  1017. width: 25rpx;
  1018. height: 25rpx;
  1019. margin-right: 10rpx;
  1020. }
  1021. .threePoint {
  1022. font-size: 22.5rpx;
  1023. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  1024. font-weight: 400;
  1025. color: #7A8599;
  1026. }
  1027. }
  1028. }
  1029. .seeName {
  1030. width: 175rpx;
  1031. font-size: 22.5rpx;
  1032. color: #525866;
  1033. line-height: 22.5rpx;
  1034. display: inline-block;
  1035. }
  1036. .seeTextarea {
  1037. width: 97%;
  1038. height: 155rpx;
  1039. display: inline-block;
  1040. font-size: 22.5rpx;
  1041. line-height: 27.5rpx;
  1042. }
  1043. }
  1044. .seeImg {
  1045. min-height: 87.5rpx;
  1046. .seeName2 {
  1047. width: 175rpx;
  1048. font-size: 22.5rpx;
  1049. color: #525866;
  1050. line-height: 87.5rpx;
  1051. display: inline-block;
  1052. }
  1053. }
  1054. }
  1055. .talk {
  1056. .talkTitle {
  1057. padding: 25rpx 25rpx 15rpx;
  1058. font-size: 22.5rpx;
  1059. line-height: 22.5rpx;
  1060. color: #666f80;
  1061. .del {
  1062. float: right;
  1063. color: #3377ff;
  1064. }
  1065. }
  1066. .talkResult {
  1067. padding-left: 25rpx;
  1068. padding-top: 32.5rpx;
  1069. border-bottom: 1px solid #dadee6;
  1070. background-color: #fff;
  1071. .seeResultFloorOne {
  1072. display: flex;
  1073. flex-direction: row;
  1074. justify-content:space-between;
  1075. align-items: center;
  1076. margin-bottom: 25rpx;
  1077. padding-right: 25rpx;
  1078. .threePoint {
  1079. padding-left: 12.5rpx;
  1080. font-size: 20rpx;
  1081. font-weight:700;
  1082. }
  1083. }
  1084. .seeName {
  1085. width: 175rpx;
  1086. font-size: 22.5rpx;
  1087. color: #525866;
  1088. line-height: 22.5rpx;
  1089. display: inline-block;
  1090. }
  1091. .seeTextarea {
  1092. width: 531.25rpx;
  1093. height: 155rpx;
  1094. display: inline-block;
  1095. font-size: 22.5rpx;
  1096. line-height: 27.5rpx;
  1097. }
  1098. }
  1099. .talkImg {
  1100. min-height: 87.5rpx;
  1101. .seeName2 {
  1102. width: 175rpx;
  1103. font-size: 22.5rpx;
  1104. color: #525866;
  1105. line-height: 87.5rpx;
  1106. display: inline-block;
  1107. }
  1108. }
  1109. }
  1110. .insert {
  1111. background-color: #fff;
  1112. font-size: 22.5rpx;
  1113. line-height: 22.5rpx;
  1114. color: #3377ff;
  1115. padding: 26.25rpx;
  1116. }
  1117. .sureDetail {
  1118. width: 100%;
  1119. height: 75rpx;
  1120. font-size: 22.5rpx;
  1121. background-color: #3377ff;
  1122. line-height: 75rpx;
  1123. position: absolute;
  1124. bottom: 0rpx;
  1125. }
  1126. .bottomMenuGroup {
  1127. position: fixed;
  1128. bottom: 0;
  1129. width: 100%;
  1130. height: 75rpx;
  1131. display: flex;
  1132. flex-direction: row;
  1133. background: #FFFFFF;
  1134. border-top:0.62rpx solid #DADEE6;
  1135. .menuBtn {
  1136. display: flex;
  1137. width: 75rpx;
  1138. height: 75rpx;
  1139. justify-content: center;
  1140. align-items: center;
  1141. border-right: 0.62rpx solid #DADEE6;
  1142. .threeLineMenuIcon {
  1143. width: 26.25rpx;
  1144. height: 21.25rpx;
  1145. }
  1146. }
  1147. .prevBtn,.nextBtn {
  1148. display: flex;
  1149. flex: 1;
  1150. justify-content: center;
  1151. height:75rpx;
  1152. line-height:75rpx;
  1153. font-size: 22.5rpx;
  1154. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  1155. font-weight: 400;
  1156. color: #3377FF;
  1157. }
  1158. .prevBtn {
  1159. border-right: 0.62rpx solid #DADEE6;
  1160. }
  1161. .nextBtn{
  1162. color: #FFFFFF;
  1163. background: #3377FF;
  1164. }
  1165. }
  1166. }
  1167. </style>