situationDetail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  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. 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. computed: {
  92. canEdit: function() {
  93. return this.compareTime(this.firstCheckTime) && this.isAdmin;
  94. }
  95. },
  96. onLoad({ situationId }){ // situationId:情景id
  97. this.situationID=situationId;
  98. },
  99. created: function() {
  100. this.nowPermission=uni.getStorageSync('nowPermission');
  101. console.log(this.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=new Date();
  182. let firstCheckTime=time.replace(/-/g,"/");
  183. firstCheckTime=Date.parse(firstCheckTime);
  184. if(myDate>firstCheckTime){
  185. return false;
  186. }else{
  187. return true;
  188. }
  189. },
  190. gotoCheckPage(){
  191. //跳转到查核列表
  192. uni.navigateTo({
  193. url: `/pages/checkList/checkList?situationId=${this.situationID}`
  194. });
  195. },
  196. gotoImprovePage(){
  197. //跳转到改善列表
  198. uni.navigateTo({
  199. url: `/pages/improve-mission-list/improve-mission-list?situationId=${this.situationID}`
  200. });
  201. },
  202. gotoPlanPage(){
  203. //跳转到计划列表
  204. uni.navigateTo({
  205. url: `/pages/planList/planList?situationId=${this.situationID}&checkGroupId=${this.checkGroupId}`
  206. });
  207. },
  208. startUnplanned(){
  209. this.isUnplanned=true;
  210. this.isChecker=false;
  211. },
  212. startCheck(){
  213. this.$refs.popup.show();
  214. },
  215. createCheck(){
  216. this.$store.dispatch({
  217. type: 'situationDetail/commActions',
  218. payload: {
  219. key: 'planList',
  220. data:{
  221. situationId:this.situationID
  222. }
  223. }
  224. }).then((data) => {
  225. if (data) {
  226. data.map((item,index)=>{
  227. if(this.compareTime(item.startDate)==false||this.compareTime(item.endDate)){
  228. this.checkItemList.push(item);
  229. }
  230. else{
  231. return;
  232. }
  233. });
  234. this.$store.dispatch({
  235. type: 'situationDetail/commActions',
  236. payload: {
  237. key: 'createCheck',
  238. data:{
  239. checkId:this.checkItemList[0].id
  240. }
  241. }
  242. }).then((data) => {
  243. if(data){
  244. this.gotoCheckPage();
  245. }
  246. });
  247. }
  248. });
  249. }
  250. },
  251. components: {
  252. popup,
  253. }
  254. }
  255. </script>
  256. <style lang="less">
  257. .detail-page{
  258. margin-top: 50rpx;
  259. .copy-btn {
  260. border: 0;
  261. height: 50rpx;
  262. &::after {
  263. border: 0;
  264. }
  265. }
  266. .content-info{
  267. background-color: #FFFFFF;
  268. .top-box{
  269. width: 750rpx;
  270. height: 300rpx;
  271. background: linear-gradient(270deg, #3071F2 0%, #4C95FC 100%);
  272. .subscript{
  273. width: 84.37rpx;
  274. height: 35rpx;
  275. float: right;
  276. margin-top: 15rpx;
  277. text-align: center;
  278. background-image: url(../../static/sDetail-subscript.png);
  279. .sub-text{
  280. font-size: 17.5rpx;
  281. font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  282. font-weight: 500;
  283. color: #2E6CE6;
  284. line-height: 35rpx;
  285. }
  286. }
  287. .name-text{
  288. font-size: 40rpx;
  289. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  290. font-weight: 400;
  291. color: #FFFFFF;
  292. float: left;
  293. margin-left: 50rpx;
  294. margin-top: 50rpx;
  295. margin-bottom: 31.25rpx;
  296. }
  297. .time-text{
  298. overflow: hidden;
  299. position: absolute;
  300. top: 115rpx;
  301. left: 55rpx;
  302. width: 70%;
  303. white-space: nowrap;
  304. font-size: 20rpx;
  305. font-weight: 400;
  306. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  307. text-overflow: ellipsis;
  308. color: #FFFFFF;
  309. }
  310. .nextTime-text{
  311. font-size: 20rpx;
  312. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  313. font-weight: 400;
  314. color: #FFFFFF;
  315. position: absolute;
  316. left: 55rpx;
  317. top: 155rpx;
  318. }
  319. .startEndTime-text{
  320. font-size: 20rpx;
  321. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  322. font-weight: 400;
  323. color: #FFFFFF;
  324. position: absolute;
  325. left: 55rpx;
  326. top: 195rpx;
  327. }
  328. .team-text{
  329. font-size: 20rpx;
  330. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  331. font-weight: 400;
  332. color: #FFFFFF;
  333. position: absolute;
  334. top: 115rpx;
  335. right: 50rpx;
  336. }
  337. }
  338. .list-box{
  339. width: 687.5rpx;
  340. height: 137.5rpx;
  341. background: #FFFFFF;
  342. box-shadow: 0px 10px 30px 0px rgba(0, 13, 51, 0.1);
  343. border-radius: 16px;
  344. position: absolute;
  345. left: 31.25rpx;
  346. top: 250rpx;
  347. .check-list{
  348. width: 225rpx;
  349. height: 97.5rpx;
  350. float: left;
  351. margin-top: 40rpx;
  352. margin-left: 81.25rpx;
  353. .check-pic{
  354. width: 38.75rpx;
  355. height: 41.87rpx;
  356. margin-top: 8.12rpx;
  357. }
  358. .list-title{
  359. font-size: 25rpx;
  360. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  361. font-weight: 400;
  362. color: #292C33;
  363. position: absolute;
  364. left: 145rpx;
  365. top: 40rpx;
  366. }
  367. .list-info{
  368. font-size: 17.5rpx;
  369. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  370. font-weight: 400;
  371. color: #666F80;
  372. position: absolute;
  373. left: 145rpx;
  374. top: 80rpx;
  375. }
  376. }
  377. .improve-list{
  378. width: 225rpx;
  379. height:97.5rpx;
  380. float: right;
  381. margin-top: 40rpx;
  382. margin-right: 81.25rpx;
  383. .improve-pic{
  384. width: 40rpx;
  385. height: 40rpx;
  386. margin-top: 8.12rpx;
  387. }
  388. .list-title{
  389. font-size: 25rpx;
  390. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  391. font-weight: 400;
  392. color: #292C33;
  393. position: absolute;
  394. top: 40rpx;
  395. left: 458.75rpx;
  396. }
  397. .list-info{
  398. font-size: 17.5rpx;
  399. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  400. font-weight: 400;
  401. color: #666F80;
  402. position: absolute;
  403. top: 80rpx;
  404. left: 458.75rpx;
  405. }
  406. }
  407. .plan-list{
  408. width: 225rpx;
  409. height: 97.5rpx;
  410. float: left;
  411. margin-top: 40rpx;
  412. margin-left: 81.25rpx;
  413. .check-pic{
  414. width: 38.75rpx;
  415. height: 41.87rpx;
  416. margin-top: 8.12rpx;
  417. }
  418. .list-title{
  419. font-size: 25rpx;
  420. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  421. font-weight: 400;
  422. color: #292C33;
  423. position: absolute;
  424. left: 145rpx;
  425. top: 40rpx;
  426. }
  427. .list-info{
  428. font-size: 17.5rpx;
  429. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  430. font-weight: 400;
  431. color: #666F80;
  432. position: absolute;
  433. left: 145rpx;
  434. top: 80rpx;
  435. }
  436. }
  437. }
  438. .info-box{
  439. height: 823.12rpx;
  440. .text-box{
  441. width: 687.5rpx;
  442. margin-top: 116.87rpx;
  443. margin-left: 31.25rpx;
  444. .info-text{
  445. font-size: 22.5rpx;
  446. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  447. font-weight: 400;
  448. color: #292C33;
  449. }
  450. }
  451. }
  452. }
  453. .button-box{
  454. display: flex;
  455. flex-direction: row;
  456. width: 750rpx;
  457. height: 75rpx;
  458. position: fixed;
  459. bottom: 0;
  460. .btn-item {
  461. flex: 1;
  462. }
  463. .btn-center{
  464. background: #3377FF;
  465. text-align: center;
  466. .center-text{
  467. font-size: 22.5rpx;
  468. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  469. font-weight: 400;
  470. color: #FFFFFF;
  471. line-height: 75rpx;
  472. }
  473. }
  474. .btn-left{
  475. // width: 375rpx;
  476. // height: 75rpx;
  477. background: #FFFFFF;
  478. // float: left;
  479. text-align: center;
  480. border: 0.62rpx solid #DADEE6;
  481. .left-text{
  482. font-size: 22.5rpx;
  483. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  484. font-weight: 400;
  485. color: #3377FF;
  486. line-height: 75rpx;
  487. }
  488. }
  489. .btn-right{
  490. // width: 375rpx;
  491. // height: 75rpx;
  492. background: #3377FF;
  493. // float: right;
  494. text-align: center;
  495. .right-text{
  496. font-size: 22.5rpx;
  497. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  498. font-weight: 400;
  499. color: #FFFFFF;
  500. line-height: 75rpx;
  501. }
  502. }
  503. }
  504. }
  505. </style>