situationDetail.vue 14 KB

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