situationDetail.vue 13 KB

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