situationDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  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:function(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.showToast({
  145. title:'作废成功',
  146. icon:'none',
  147. duration:1000
  148. });
  149. }
  150. });
  151. }
  152. else if(res.cancel){
  153. return;
  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. font-size: 20rpx;
  294. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  295. font-weight: 400;
  296. color: #FFFFFF;
  297. position: absolute;
  298. top: 115rpx;
  299. left: 55rpx;
  300. }
  301. .nextTime-text{
  302. font-size: 20rpx;
  303. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  304. font-weight: 400;
  305. color: #FFFFFF;
  306. position: absolute;
  307. left: 55rpx;
  308. top: 155rpx;
  309. }
  310. .startEndTime-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: 195rpx;
  318. }
  319. .team-text{
  320. font-size: 20rpx;
  321. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  322. font-weight: 400;
  323. color: #FFFFFF;
  324. position: absolute;
  325. top: 115rpx;
  326. right: 50rpx;
  327. }
  328. }
  329. .list-box{
  330. width: 687.5rpx;
  331. height: 137.5rpx;
  332. background: #FFFFFF;
  333. box-shadow: 0px 10px 30px 0px rgba(0, 13, 51, 0.1);
  334. border-radius: 16px;
  335. position: absolute;
  336. left: 31.25rpx;
  337. top: 250rpx;
  338. .check-list{
  339. width: 225rpx;
  340. height: 97.5rpx;
  341. float: left;
  342. margin-top: 40rpx;
  343. margin-left: 81.25rpx;
  344. .check-pic{
  345. width: 38.75rpx;
  346. height: 41.87rpx;
  347. margin-top: 8.12rpx;
  348. }
  349. .list-title{
  350. font-size: 25rpx;
  351. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  352. font-weight: 400;
  353. color: #292C33;
  354. position: absolute;
  355. left: 145rpx;
  356. top: 40rpx;
  357. }
  358. .list-info{
  359. font-size: 17.5rpx;
  360. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  361. font-weight: 400;
  362. color: #666F80;
  363. position: absolute;
  364. left: 145rpx;
  365. top: 80rpx;
  366. }
  367. }
  368. .improve-list{
  369. width: 225rpx;
  370. height:97.5rpx;
  371. float: right;
  372. margin-top: 40rpx;
  373. margin-right: 81.25rpx;
  374. .improve-pic{
  375. width: 40rpx;
  376. height: 40rpx;
  377. margin-top: 8.12rpx;
  378. }
  379. .list-title{
  380. font-size: 25rpx;
  381. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  382. font-weight: 400;
  383. color: #292C33;
  384. position: absolute;
  385. top: 40rpx;
  386. left: 458.75rpx;
  387. }
  388. .list-info{
  389. font-size: 17.5rpx;
  390. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  391. font-weight: 400;
  392. color: #666F80;
  393. position: absolute;
  394. top: 80rpx;
  395. left: 458.75rpx;
  396. }
  397. }
  398. .plan-list{
  399. width: 225rpx;
  400. height: 97.5rpx;
  401. float: left;
  402. margin-top: 40rpx;
  403. margin-left: 81.25rpx;
  404. .check-pic{
  405. width: 38.75rpx;
  406. height: 41.87rpx;
  407. margin-top: 8.12rpx;
  408. }
  409. .list-title{
  410. font-size: 25rpx;
  411. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  412. font-weight: 400;
  413. color: #292C33;
  414. position: absolute;
  415. left: 145rpx;
  416. top: 40rpx;
  417. }
  418. .list-info{
  419. font-size: 17.5rpx;
  420. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  421. font-weight: 400;
  422. color: #666F80;
  423. position: absolute;
  424. left: 145rpx;
  425. top: 80rpx;
  426. }
  427. }
  428. }
  429. .info-box{
  430. height: 823.12rpx;
  431. .text-box{
  432. width: 687.5rpx;
  433. margin-top: 116.87rpx;
  434. margin-left: 31.25rpx;
  435. .info-text{
  436. font-size: 22.5rpx;
  437. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  438. font-weight: 400;
  439. color: #292C33;
  440. }
  441. }
  442. }
  443. }
  444. .button-box{
  445. width: 750rpx;
  446. height: 75rpx;
  447. position: fixed;
  448. bottom: 0;
  449. .btn-center{
  450. background: #3377FF;
  451. text-align: center;
  452. .center-text{
  453. font-size: 22.5rpx;
  454. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  455. font-weight: 400;
  456. color: #FFFFFF;
  457. line-height: 75rpx;
  458. }
  459. }
  460. .btn-left{
  461. width: 375rpx;
  462. height: 75rpx;
  463. background: #FFFFFF;
  464. float: left;
  465. text-align: center;
  466. border: 0.62rpx solid #DADEE6;
  467. .left-text{
  468. font-size: 22.5rpx;
  469. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  470. font-weight: 400;
  471. color: #3377FF;
  472. line-height: 75rpx;
  473. }
  474. }
  475. .btn-right{
  476. width: 375rpx;
  477. height: 75rpx;
  478. background: #3377FF;
  479. float: right;
  480. text-align: center;
  481. .right-text{
  482. font-size: 22.5rpx;
  483. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  484. font-weight: 400;
  485. color: #FFFFFF;
  486. line-height: 75rpx;
  487. }
  488. }
  489. }
  490. }
  491. </style>