situationDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. <template>
  2. <view class="detail-page">
  3. <tm-top-menu>
  4. <button class="copy-btn" @click="editSituation('POST')">复制创建</button>
  5. </tm-top-menu>
  6. <view class="content-info">
  7. <view class="top-box">
  8. <view class="subscript">
  9. <!-- <image class="sub-pic" src="../../static/sDetail-subscript.png"></image> -->
  10. <text class="sub-text">{{topic}}</text>
  11. </view>
  12. <text class="name-text">{{name}}</text>
  13. <text class="time-text">| 情境起止时间:{{startDate}}~{{endDate}}</text>
  14. <text class="nextTime-text">| 下次查核时间:{{nextCheckTime}}</text>
  15. <text class="startEndTime-text" v-show="isStartEndTimeShow">| {{startEndTime}}</text>
  16. <text class="team-text">{{checkGroupName}}</text>
  17. </view>
  18. <view class="list-box">
  19. <view class="check-list" v-show="isCheckImproveShow" @click="gotoCheckPage">
  20. <image class="check-pic" src="../../static/check-list.png"></image>
  21. <text class="list-title">查核列表</text>
  22. <text class="list-info">{{checkStatus}}</text>
  23. </view>
  24. <view class="improve-list" v-show="isCheckImproveShow" @click="gotoImprovePage">
  25. <image class="improve-pic" src="../../static/improve-list.png"></image>
  26. <text class="list-title">改善列表</text>
  27. <text class="list-info">查看改善记录</text>
  28. </view>
  29. <view class="plan-list" v-show="isCheckLeader" @click="gotoPlanPage">
  30. <image class="check-pic" src="../../static/check-list.png"></image>
  31. <text class="list-title">计划列表</text>
  32. <text class="list-info">共{{planCount}}次查核计划,剩余{{toDistribute}}个待分配</text>
  33. </view>
  34. </view>
  35. <view class="info-box">
  36. <view class="text-box">
  37. <text class="info-text">评价医院对医院评审标准与要点的遵从程度,即评价医院对规章、制度、流程、诊疗常规与操作规程的执行力。评价病人在接受诊疗的服务过程品质、环境设施,注重病人的安全、权益及隐私的保护、医院感染的控制。</text>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="button-box">
  42. <view class="btn-left" @click="delSituation" v-show="isAdmin">
  43. <text class="left-text">作废</text>
  44. </view>
  45. <view class="btn-right" @click="editSituation('PUT')" v-show="isAdmin">
  46. <text class="right-text">编辑</text>
  47. </view>
  48. <view class="btn-center" v-show="isChecker" @click="startUnplanned">
  49. <text class="center-text">开始一次计划外查核</text>
  50. </view>
  51. <view class="btn-left" v-show="isUnplanned" @click="createCheck">
  52. <text class="left-text">新建一个计划外查核</text>
  53. </view>
  54. <view class="btn-right" v-show="isUnplanned" @click="startCheck">
  55. <text class="right-text">提前开始一个计划内查核</text>
  56. </view>
  57. </view>
  58. <popup ref="popup" :situationID="situationID"></popup>
  59. </view>
  60. </template>
  61. <script>
  62. import popup from './components/bottom-popup.vue'
  63. export default {
  64. data() {
  65. return {
  66. nowPermission:'',//用户当前权限
  67. situationID:'',//情境id
  68. checkGroupName:'',//查核组名
  69. checkStatus:'',//查核状态
  70. name:'',//查核名
  71. startDate:'',//查核开始时间
  72. endDate:'',//查核结束时间
  73. nextCheckTime:'',//下次查核时间
  74. topic:'',//个案或系统
  75. startEndTime:'',//距离情境开始或结束时间
  76. planCount:'',//总查核计划数
  77. toDistribute:'',//待分配计划数
  78. firstCheckTime:'',//首次查核时间
  79. isCheckImproveShow:false,//查核改善列表是否显示
  80. isStartEndTimeShow:false,//距离情境开始或结束时间是否显示
  81. isAdmin:false,//是否为管理员
  82. isCheckLeader:false,//是否为查核组长
  83. isChecker:false,//是否为查核者
  84. isUnplanned:false,//是否计划外查核
  85. checkFlag:'',//计划查核标志,是新建还是提前开始
  86. checkID:'',//新建查核计划时,计划列表中的前一个计划 id
  87. checkItemList:[],//时间区间包含当前时间的item
  88. checkGroupId: 0 // 查核组id
  89. }
  90. },
  91. onLoad({ situationId }){ // situationId:情景id
  92. this.situationID=situationId;
  93. },
  94. created: function() {
  95. this.nowPermission=uni.getStorageSync('nowPermission');
  96. console.log(this.nowPermission);
  97. this.isAdmin=this.nowPermission==1?true:false;
  98. this.isCheckLeader=this.nowPermission==2?true:false;
  99. this.isChecker=this.nowPermission==3?true:false;
  100. this.isStartEndTimeShow=this.nowPermission==2||this.nowPermission==3?true:false;
  101. this.isCheckImproveShow=this.nowPermission==1||this.nowPermission==4||this.nowPermission==3?true:false;
  102. this.$store.dispatch({
  103. type: 'situationDetail/commActions',
  104. payload: {
  105. key: 'situationDetail',
  106. data:{
  107. id:this.situationID
  108. }
  109. }
  110. }).then((data) => {
  111. if (data) {
  112. this.name=data.name;
  113. this.startDate=data.startDate;
  114. this.endDate=data.endDate;
  115. this.nextCheckTime=data.nextCheckTime;
  116. this.checkGroupName=data.checkGroupName;
  117. this.topic=data.topic==0?'个案':'系统';
  118. this.checkStatus=data.checkStatus;
  119. this.startEndTime=data.startEndTime;
  120. this.planCount=data.planCount;
  121. this.toDistribute=data.toDistribute;
  122. this.firstCheckTime=data.firstCheckTime;
  123. this.checkGroupId = data.checkGroupId;
  124. }
  125. });
  126. },
  127. methods: {
  128. delSituation(){
  129. uni.showModal({
  130. title:'提示',
  131. content:'请确认是否作废此情境,作废的情境无法被还原',
  132. success: (res) => {
  133. if(res.confirm){
  134. this.$store.dispatch({
  135. type: 'situationDetail/commActions',
  136. payload: {
  137. key: 'situationDelete',
  138. data:{
  139. id:this.situationID
  140. }
  141. }
  142. }).then((data) => {
  143. if (data) {
  144. uni.showModal({
  145. title:'提示',
  146. content:'作废成功',
  147. showCancel: false,
  148. success: (res) => {
  149. uni.navigateTo({url: `/pages/situationsCenter/situationsCenter`});
  150. }
  151. });
  152. }
  153. });
  154. }
  155. }
  156. })
  157. },
  158. editSituation(type){
  159. let url=`/pages/creatingSituations/creatingSituations?id=${this.situationID}&type=${type}`;
  160. if(type === 'PUT') {
  161. let editEnable=this.compareTime(this.firstCheckTime);
  162. // if(editEnable){
  163. uni.navigateTo({url});
  164. // } else{
  165. // uni.showModal({
  166. // title:'提示',
  167. // content:'已进行过一次查核,不可编辑',
  168. // showCancel:false
  169. // })
  170. // }
  171. } else {
  172. uni.navigateTo({url});
  173. }
  174. },
  175. compareTime(time){
  176. let myDate=new Date();
  177. let firstCheckTime=time.replace(/-/g,"/");
  178. firstCheckTime=Date.parse(firstCheckTime);
  179. if(myDate>firstCheckTime){
  180. return false;
  181. }else{
  182. return true;
  183. }
  184. },
  185. gotoCheckPage(){
  186. //跳转到查核列表
  187. uni.navigateTo({
  188. url: `/pages/checkList/checkList?situationId=${this.situationID}`
  189. });
  190. },
  191. gotoImprovePage(){
  192. //跳转到改善列表
  193. uni.navigateTo({
  194. url: `/pages/improve-mission-list/improve-mission-list?situationId=${this.situationID}`
  195. });
  196. },
  197. gotoPlanPage(){
  198. //跳转到计划列表
  199. uni.navigateTo({
  200. url: `/pages/planList/planList?situationId=${this.situationID}&checkGroupId=${this.checkGroupId}`
  201. });
  202. },
  203. startUnplanned(){
  204. this.isUnplanned=true;
  205. this.isChecker=false;
  206. },
  207. startCheck(){
  208. this.$refs.popup.show();
  209. },
  210. createCheck(){
  211. this.$store.dispatch({
  212. type: 'situationDetail/commActions',
  213. payload: {
  214. key: 'planList',
  215. data:{
  216. situationId:this.situationID
  217. }
  218. }
  219. }).then((data) => {
  220. if (data) {
  221. data.map((item,index)=>{
  222. if(this.compareTime(item.startDate)==false||this.compareTime(item.endDate)){
  223. this.checkItemList.push(item);
  224. }
  225. else{
  226. return;
  227. }
  228. });
  229. this.$store.dispatch({
  230. type: 'situationDetail/commActions',
  231. payload: {
  232. key: 'createCheck',
  233. data:{
  234. checkId:this.checkItemList[0].id
  235. }
  236. }
  237. }).then((data) => {
  238. if(data){
  239. this.gotoCheckPage();
  240. }
  241. });
  242. }
  243. });
  244. }
  245. },
  246. components: {
  247. popup,
  248. }
  249. }
  250. </script>
  251. <style lang="less">
  252. .detail-page{
  253. margin-top: 50rpx;
  254. .copy-btn {
  255. border: 0;
  256. height: 50rpx;
  257. &::after {
  258. border: 0;
  259. }
  260. }
  261. .content-info{
  262. background-color: #FFFFFF;
  263. .top-box{
  264. width: 750rpx;
  265. height: 300rpx;
  266. background: linear-gradient(270deg, #3071F2 0%, #4C95FC 100%);
  267. .subscript{
  268. width: 84.37rpx;
  269. height: 35rpx;
  270. float: right;
  271. margin-top: 15rpx;
  272. text-align: center;
  273. background-image: url(../../static/sDetail-subscript.png);
  274. .sub-text{
  275. font-size: 17.5rpx;
  276. font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  277. font-weight: 500;
  278. color: #2E6CE6;
  279. line-height: 35rpx;
  280. }
  281. }
  282. .name-text{
  283. font-size: 40rpx;
  284. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  285. font-weight: 400;
  286. color: #FFFFFF;
  287. float: left;
  288. margin-left: 50rpx;
  289. margin-top: 50rpx;
  290. margin-bottom: 31.25rpx;
  291. }
  292. .time-text{
  293. overflow: hidden;
  294. position: absolute;
  295. top: 115rpx;
  296. left: 55rpx;
  297. width: 70%;
  298. white-space: nowrap;
  299. font-size: 20rpx;
  300. font-weight: 400;
  301. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  302. text-overflow: ellipsis;
  303. color: #FFFFFF;
  304. }
  305. .nextTime-text{
  306. font-size: 20rpx;
  307. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  308. font-weight: 400;
  309. color: #FFFFFF;
  310. position: absolute;
  311. left: 55rpx;
  312. top: 155rpx;
  313. }
  314. .startEndTime-text{
  315. font-size: 20rpx;
  316. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  317. font-weight: 400;
  318. color: #FFFFFF;
  319. position: absolute;
  320. left: 55rpx;
  321. top: 195rpx;
  322. }
  323. .team-text{
  324. font-size: 20rpx;
  325. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  326. font-weight: 400;
  327. color: #FFFFFF;
  328. position: absolute;
  329. top: 115rpx;
  330. right: 50rpx;
  331. }
  332. }
  333. .list-box{
  334. width: 687.5rpx;
  335. height: 137.5rpx;
  336. background: #FFFFFF;
  337. box-shadow: 0px 10px 30px 0px rgba(0, 13, 51, 0.1);
  338. border-radius: 16px;
  339. position: absolute;
  340. left: 31.25rpx;
  341. top: 250rpx;
  342. .check-list{
  343. width: 225rpx;
  344. height: 97.5rpx;
  345. float: left;
  346. margin-top: 40rpx;
  347. margin-left: 81.25rpx;
  348. .check-pic{
  349. width: 38.75rpx;
  350. height: 41.87rpx;
  351. margin-top: 8.12rpx;
  352. }
  353. .list-title{
  354. font-size: 25rpx;
  355. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  356. font-weight: 400;
  357. color: #292C33;
  358. position: absolute;
  359. left: 145rpx;
  360. top: 40rpx;
  361. }
  362. .list-info{
  363. font-size: 17.5rpx;
  364. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  365. font-weight: 400;
  366. color: #666F80;
  367. position: absolute;
  368. left: 145rpx;
  369. top: 80rpx;
  370. }
  371. }
  372. .improve-list{
  373. width: 225rpx;
  374. height:97.5rpx;
  375. float: right;
  376. margin-top: 40rpx;
  377. margin-right: 81.25rpx;
  378. .improve-pic{
  379. width: 40rpx;
  380. height: 40rpx;
  381. margin-top: 8.12rpx;
  382. }
  383. .list-title{
  384. font-size: 25rpx;
  385. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  386. font-weight: 400;
  387. color: #292C33;
  388. position: absolute;
  389. top: 40rpx;
  390. left: 458.75rpx;
  391. }
  392. .list-info{
  393. font-size: 17.5rpx;
  394. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  395. font-weight: 400;
  396. color: #666F80;
  397. position: absolute;
  398. top: 80rpx;
  399. left: 458.75rpx;
  400. }
  401. }
  402. .plan-list{
  403. width: 225rpx;
  404. height: 97.5rpx;
  405. float: left;
  406. margin-top: 40rpx;
  407. margin-left: 81.25rpx;
  408. .check-pic{
  409. width: 38.75rpx;
  410. height: 41.87rpx;
  411. margin-top: 8.12rpx;
  412. }
  413. .list-title{
  414. font-size: 25rpx;
  415. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  416. font-weight: 400;
  417. color: #292C33;
  418. position: absolute;
  419. left: 145rpx;
  420. top: 40rpx;
  421. }
  422. .list-info{
  423. font-size: 17.5rpx;
  424. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  425. font-weight: 400;
  426. color: #666F80;
  427. position: absolute;
  428. left: 145rpx;
  429. top: 80rpx;
  430. }
  431. }
  432. }
  433. .info-box{
  434. height: 823.12rpx;
  435. .text-box{
  436. width: 687.5rpx;
  437. margin-top: 116.87rpx;
  438. margin-left: 31.25rpx;
  439. .info-text{
  440. font-size: 22.5rpx;
  441. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  442. font-weight: 400;
  443. color: #292C33;
  444. }
  445. }
  446. }
  447. }
  448. .button-box{
  449. width: 750rpx;
  450. height: 75rpx;
  451. position: fixed;
  452. bottom: 0;
  453. .btn-center{
  454. background: #3377FF;
  455. text-align: center;
  456. .center-text{
  457. font-size: 22.5rpx;
  458. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  459. font-weight: 400;
  460. color: #FFFFFF;
  461. line-height: 75rpx;
  462. }
  463. }
  464. .btn-left{
  465. width: 375rpx;
  466. height: 75rpx;
  467. background: #FFFFFF;
  468. float: left;
  469. text-align: center;
  470. border: 0.62rpx solid #DADEE6;
  471. .left-text{
  472. font-size: 22.5rpx;
  473. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  474. font-weight: 400;
  475. color: #3377FF;
  476. line-height: 75rpx;
  477. }
  478. }
  479. .btn-right{
  480. width: 375rpx;
  481. height: 75rpx;
  482. background: #3377FF;
  483. float: right;
  484. text-align: center;
  485. .right-text{
  486. font-size: 22.5rpx;
  487. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  488. font-weight: 400;
  489. color: #FFFFFF;
  490. line-height: 75rpx;
  491. }
  492. }
  493. }
  494. }
  495. </style>