situationDetail.vue 13 KB

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