situationDetail.vue 13 KB

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