situationDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  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/checkList/checkList?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. this.gotoCheckPage();
  233. }
  234. });
  235. }
  236. });
  237. }
  238. },
  239. components: {
  240. popup,
  241. }
  242. }
  243. </script>
  244. <style lang="less">
  245. .detail-page{
  246. .content-info{
  247. background-color: #FFFFFF;
  248. .top-box{
  249. width: 750rpx;
  250. height: 300rpx;
  251. background: linear-gradient(270deg, #3071F2 0%, #4C95FC 100%);
  252. .subscript{
  253. width: 84.37rpx;
  254. height: 35rpx;
  255. float: right;
  256. margin-top: 15rpx;
  257. text-align: center;
  258. background-image: url(../../static/sDetail-subscript.png);
  259. .sub-text{
  260. font-size: 17.5rpx;
  261. font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  262. font-weight: 500;
  263. color: #2E6CE6;
  264. line-height: 35rpx;
  265. }
  266. }
  267. .name-text{
  268. font-size: 40rpx;
  269. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  270. font-weight: 400;
  271. color: #FFFFFF;
  272. float: left;
  273. margin-left: 50rpx;
  274. margin-top: 50rpx;
  275. margin-bottom: 31.25rpx;
  276. }
  277. .time-text{
  278. font-size: 20rpx;
  279. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  280. font-weight: 400;
  281. color: #FFFFFF;
  282. position: absolute;
  283. top: 115rpx;
  284. left: 55rpx;
  285. }
  286. .nextTime-text{
  287. font-size: 20rpx;
  288. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  289. font-weight: 400;
  290. color: #FFFFFF;
  291. position: absolute;
  292. left: 55rpx;
  293. top: 155rpx;
  294. }
  295. .startEndTime-text{
  296. font-size: 20rpx;
  297. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  298. font-weight: 400;
  299. color: #FFFFFF;
  300. position: absolute;
  301. left: 55rpx;
  302. top: 195rpx;
  303. }
  304. .team-text{
  305. font-size: 20rpx;
  306. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  307. font-weight: 400;
  308. color: #FFFFFF;
  309. position: absolute;
  310. top: 115rpx;
  311. right: 50rpx;
  312. }
  313. }
  314. .list-box{
  315. width: 687.5rpx;
  316. height: 137.5rpx;
  317. background: #FFFFFF;
  318. box-shadow: 0px 10px 30px 0px rgba(0, 13, 51, 0.1);
  319. border-radius: 16px;
  320. position: absolute;
  321. left: 31.25rpx;
  322. top: 250rpx;
  323. .check-list{
  324. width: 225rpx;
  325. height: 97.5rpx;
  326. float: left;
  327. margin-top: 40rpx;
  328. margin-left: 81.25rpx;
  329. .check-pic{
  330. width: 38.75rpx;
  331. height: 41.87rpx;
  332. margin-top: 8.12rpx;
  333. }
  334. .list-title{
  335. font-size: 25rpx;
  336. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  337. font-weight: 400;
  338. color: #292C33;
  339. position: absolute;
  340. left: 145rpx;
  341. top: 40rpx;
  342. }
  343. .list-info{
  344. font-size: 17.5rpx;
  345. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  346. font-weight: 400;
  347. color: #666F80;
  348. position: absolute;
  349. left: 145rpx;
  350. top: 80rpx;
  351. }
  352. }
  353. .improve-list{
  354. width: 225rpx;
  355. height:97.5rpx;
  356. float: right;
  357. margin-top: 40rpx;
  358. margin-right: 81.25rpx;
  359. .improve-pic{
  360. width: 40rpx;
  361. height: 40rpx;
  362. margin-top: 8.12rpx;
  363. }
  364. .list-title{
  365. font-size: 25rpx;
  366. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  367. font-weight: 400;
  368. color: #292C33;
  369. position: absolute;
  370. top: 40rpx;
  371. left: 458.75rpx;
  372. }
  373. .list-info{
  374. font-size: 17.5rpx;
  375. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  376. font-weight: 400;
  377. color: #666F80;
  378. position: absolute;
  379. top: 80rpx;
  380. left: 458.75rpx;
  381. }
  382. }
  383. .plan-list{
  384. width: 225rpx;
  385. height: 97.5rpx;
  386. float: left;
  387. margin-top: 40rpx;
  388. margin-left: 81.25rpx;
  389. .check-pic{
  390. width: 38.75rpx;
  391. height: 41.87rpx;
  392. margin-top: 8.12rpx;
  393. }
  394. .list-title{
  395. font-size: 25rpx;
  396. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  397. font-weight: 400;
  398. color: #292C33;
  399. position: absolute;
  400. left: 145rpx;
  401. top: 40rpx;
  402. }
  403. .list-info{
  404. font-size: 17.5rpx;
  405. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  406. font-weight: 400;
  407. color: #666F80;
  408. position: absolute;
  409. left: 145rpx;
  410. top: 80rpx;
  411. }
  412. }
  413. }
  414. .info-box{
  415. height: 823.12rpx;
  416. .text-box{
  417. width: 687.5rpx;
  418. margin-top: 116.87rpx;
  419. margin-left: 31.25rpx;
  420. .info-text{
  421. font-size: 22.5rpx;
  422. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  423. font-weight: 400;
  424. color: #292C33;
  425. }
  426. }
  427. }
  428. }
  429. .button-box{
  430. width: 750rpx;
  431. height: 75rpx;
  432. position: absolute;
  433. bottom: 0rpx;
  434. .btn-center{
  435. background: #3377FF;
  436. text-align: center;
  437. .center-text{
  438. font-size: 22.5rpx;
  439. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  440. font-weight: 400;
  441. color: #FFFFFF;
  442. line-height: 75rpx;
  443. }
  444. }
  445. .btn-left{
  446. width: 375rpx;
  447. height: 75rpx;
  448. background: #FFFFFF;
  449. float: left;
  450. text-align: center;
  451. border: 0.62rpx solid #DADEE6;
  452. .left-text{
  453. font-size: 22.5rpx;
  454. font-family: SourceHanSansCN-Normal, SourceHanSansCN;
  455. font-weight: 400;
  456. color: #3377FF;
  457. line-height: 75rpx;
  458. }
  459. }
  460. .btn-right{
  461. width: 375rpx;
  462. height: 75rpx;
  463. background: #3377FF;
  464. float: right;
  465. text-align: center;
  466. .right-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. }
  475. }
  476. </style>