123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484 |
- <template>
- <view class="detail-page">
- <view class="content-info">
- <view class="top-box">
- <view class="subscript">
- <!-- <image class="sub-pic" src="../../static/sDetail-subscript.png"></image> -->
- <text class="sub-text">{{topic}}</text>
- </view>
- <text class="name-text">{{name}}</text>
- <text class="time-text">| 情境起止时间:{{startDate}}~{{endDate}}</text>
- <text class="nextTime-text">| 下次查核时间:{{nextCheckTime}}</text>
- <text class="startEndTime-text" v-show="isStartEndTimeShow">| {{startEndTime}}</text>
- <text class="team-text">{{checkGroupName}}</text>
- </view>
- <view class="list-box">
- <view class="check-list" v-show="isCheckImproveShow" @click="gotoCheckPage">
- <image class="check-pic" src="../../static/check-list.png"></image>
- <text class="list-title">查核列表</text>
- <text class="list-info">{{checkStatus}}</text>
- </view>
- <view class="improve-list" v-show="isCheckImproveShow" @click="gotoImprovePage">
- <image class="improve-pic" src="../../static/improve-list.png"></image>
- <text class="list-title">改善列表</text>
- <text class="list-info">查看改善记录</text>
- </view>
- <view class="plan-list" v-show="isCheckLeader" @click="gotoPlanPage">
- <image class="check-pic" src="../../static/check-list.png"></image>
- <text class="list-title">计划列表</text>
- <text class="list-info">共{{planCount}}次查核计划,剩余{{toDistribute}}个待分配</text>
- </view>
- </view>
- <view class="info-box">
- <view class="text-box">
- <text class="info-text">评价医院对医院评审标准与要点的遵从程度,即评价医院对规章、制度、流程、诊疗常规与操作规程的执行力。评价病人在接受诊疗的服务过程品质、环境设施,注重病人的安全、权益及隐私的保护、医院感染的控制。</text>
- </view>
- </view>
- </view>
- <view class="button-box">
- <view class="btn-left" @click="delSituation" v-show="isAdmin">
- <text class="left-text">作废</text>
- </view>
- <view class="btn-right" @click="editSituation" v-show="isAdmin">
- <text class="right-text">编辑</text>
- </view>
- <view class="btn-center" v-show="isChecker" @click="startUnplanned">
- <text class="center-text">开始一次计划外查核</text>
- </view>
- <view class="btn-left" v-show="isUnplanned" @click="createCheck">
- <text class="left-text">新建一个计划外查核</text>
- </view>
- <view class="btn-right" v-show="isUnplanned" @click="startCheck">
- <text class="right-text">提前开始一个计划内查核</text>
- </view>
- </view>
- <popup ref="popup" :situationID="situationID"></popup>
- </view>
- </template>
- <script>
- import popup from './components/bottom-popup.vue'
- export default {
- data() {
- return {
- nowPermission:'',//用户当前权限
- situationID:'',//情境id
- checkGroupName:'',//查核组名
- checkStatus:'',//查核状态
- name:'',//查核名
- startDate:'',//查核开始时间
- endDate:'',//查核结束时间
- nextCheckTime:'',//下次查核时间
- topic:'',//个案或系统
- startEndTime:'',//距离情境开始或结束时间
- planCount:'',//总查核计划数
- toDistribute:'',//待分配计划数
- firstCheckTime:'',//首次查核时间
- isCheckImproveShow:false,//查核改善列表是否显示
- isStartEndTimeShow:false,//距离情境开始或结束时间是否显示
- isAdmin:false,//是否为管理员
- isCheckLeader:false,//是否为查核组长
- isChecker:false,//是否为查核者
- isUnplanned:false,//是否计划外查核
- checkFlag:'',//计划查核标志,是新建还是提前开始
- checkID:'',//新建查核计划时,计划列表中的前一个计划 id
- checkItemList:[],//时间区间包含当前时间的item
- checkGroupId: 0 // 查核组id
- }
- },
- onLoad({ situationId }){ // situationId:情景id
- this.situationID=situationId;
- },
- created: function() {
- this.nowPermission=uni.getStorageSync('nowPermission');
- console.log(this.nowPermission);
- this.isAdmin=this.nowPermission==1?true:false;
- this.isCheckLeader=this.nowPermission==2?true:false;
- this.isChecker=this.nowPermission==3?true:false;
- this.isStartEndTimeShow=this.nowPermission==2||this.nowPermission==3?true:false;
- this.isCheckImproveShow=this.nowPermission==1||this.nowPermission==4||this.nowPermission==3?true:false;
- this.$store.dispatch({
- type: 'situationDetail/commActions',
- payload: {
- key: 'situationDetail',
- data:{
- id:this.situationID
- }
- }
- }).then((data) => {
- if (data) {
- this.name=data.name;
- this.startDate=data.startDate;
- this.endDate=data.endDate;
- this.nextCheckTime=data.nextCheckTime;
- this.checkGroupName=data.checkGroupName;
- this.topic=data.topic==0?'个案':'系统';
- this.checkStatus=data.checkStatus;
- this.startEndTime=data.startEndTime;
- this.planCount=data.planCount;
- this.toDistribute=data.toDistribute;
- this.firstCheckTime=data.firstCheckTime;
- this.checkGroupId = data.checkGroupId;
- }
- });
- },
- methods: {
- delSituation(){
- uni.showModal({
- title:'提示',
- content:'请确认是否作废此情境,作废的情境无法被还原',
- success:function(res){
- if(res.confirm){
- this.$store.dispatch({
- type: 'situationDetail/commActions',
- payload: {
- key: 'situationDelete',
- data:{
- id:this.situationID
- }
- }
- }).then((data) => {
- if (data) {
- uni.showToast({
- title:'作废成功',
- icon:'none',
- duration:1000
- });
- }
- });
- }
- else if(res.cancel){
- return;
- }
- }
- })
- },
- editSituation(){
- let editEnable=this.compareTime(this.firstCheckTime);
- if(editEnable){
- uni.navigateTo({
- url: '/pages/creatingSituations/creatingSituations'
- });
- }
- else{
- uni.showModal({
- title:'提示',
- content:'已进行过一次查核,不可编辑',
- showCancel:false
- })
- }
- },
- compareTime(time){
- let myDate=new Date();
- let firstCheckTime=time.replace(/-/g,"/");
- firstCheckTime=Date.parse(firstCheckTime);
- if(myDate>firstCheckTime){
- return false;
- }else{
- return true;
- }
- },
- gotoCheckPage(){
- //跳转到查核列表
- uni.navigateTo({
- url: `/pages/checkList/checkList?situationId=${this.situationID}`
- });
- },
- gotoImprovePage(){
- //跳转到改善列表
- uni.navigateTo({
- url: `/pages/improve-mission-list/improve-mission-list?situationId=${this.situationID}`
- });
- },
- gotoPlanPage(){
- //跳转到计划列表
- uni.navigateTo({
- url: `/pages/planList/planList?situationId=${this.situationID}&checkGroupId=${this.checkGroupId}`
- });
- },
- startUnplanned(){
- this.isUnplanned=true;
- this.isChecker=false;
- },
- startCheck(){
- this.$refs.popup.show();
- },
- createCheck(){
- this.$store.dispatch({
- type: 'situationDetail/commActions',
- payload: {
- key: 'planList',
- data:{
- situationId:this.situationID
- }
- }
- }).then((data) => {
- if (data) {
- data.map((item,index)=>{
- if(this.compareTime(item.startDate)==false||this.compareTime(item.endDate)){
- this.checkItemList.push(item);
- }
- else{
- return;
- }
- });
- this.$store.dispatch({
- type: 'situationDetail/commActions',
- payload: {
- key: 'createCheck',
- data:{
- checkId:this.checkItemList[0].id
- }
- }
- }).then((data) => {
- if(data){
- this.gotoCheckPage();
- }
- });
- }
- });
- }
- },
- components: {
- popup,
- }
- }
- </script>
- <style lang="less">
- .detail-page{
- .content-info{
- background-color: #FFFFFF;
- .top-box{
- width: 750rpx;
- height: 300rpx;
- background: linear-gradient(270deg, #3071F2 0%, #4C95FC 100%);
- .subscript{
- width: 84.37rpx;
- height: 35rpx;
- float: right;
- margin-top: 15rpx;
- text-align: center;
- background-image: url(../../static/sDetail-subscript.png);
- .sub-text{
- font-size: 17.5rpx;
- font-family: SourceHanSansCN-Medium, SourceHanSansCN;
- font-weight: 500;
- color: #2E6CE6;
- line-height: 35rpx;
- }
- }
- .name-text{
- font-size: 40rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- float: left;
- margin-left: 50rpx;
- margin-top: 50rpx;
- margin-bottom: 31.25rpx;
- }
- .time-text{
- font-size: 20rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- position: absolute;
- top: 115rpx;
- left: 55rpx;
- }
- .nextTime-text{
- font-size: 20rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- position: absolute;
- left: 55rpx;
- top: 155rpx;
- }
- .startEndTime-text{
- font-size: 20rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- position: absolute;
- left: 55rpx;
- top: 195rpx;
- }
- .team-text{
- font-size: 20rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- position: absolute;
- top: 115rpx;
- right: 50rpx;
- }
- }
- .list-box{
- width: 687.5rpx;
- height: 137.5rpx;
- background: #FFFFFF;
- box-shadow: 0px 10px 30px 0px rgba(0, 13, 51, 0.1);
- border-radius: 16px;
- position: absolute;
- left: 31.25rpx;
- top: 250rpx;
- .check-list{
- width: 225rpx;
- height: 97.5rpx;
- float: left;
- margin-top: 40rpx;
- margin-left: 81.25rpx;
- .check-pic{
- width: 38.75rpx;
- height: 41.87rpx;
- margin-top: 8.12rpx;
- }
- .list-title{
- font-size: 25rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #292C33;
- position: absolute;
- left: 145rpx;
- top: 40rpx;
- }
- .list-info{
- font-size: 17.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #666F80;
- position: absolute;
- left: 145rpx;
- top: 80rpx;
- }
- }
- .improve-list{
- width: 225rpx;
- height:97.5rpx;
- float: right;
- margin-top: 40rpx;
- margin-right: 81.25rpx;
- .improve-pic{
- width: 40rpx;
- height: 40rpx;
- margin-top: 8.12rpx;
- }
- .list-title{
- font-size: 25rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #292C33;
- position: absolute;
- top: 40rpx;
- left: 458.75rpx;
- }
- .list-info{
- font-size: 17.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #666F80;
- position: absolute;
- top: 80rpx;
- left: 458.75rpx;
- }
- }
- .plan-list{
- width: 225rpx;
- height: 97.5rpx;
- float: left;
- margin-top: 40rpx;
- margin-left: 81.25rpx;
- .check-pic{
- width: 38.75rpx;
- height: 41.87rpx;
- margin-top: 8.12rpx;
- }
- .list-title{
- font-size: 25rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #292C33;
- position: absolute;
- left: 145rpx;
- top: 40rpx;
- }
- .list-info{
- font-size: 17.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #666F80;
- position: absolute;
- left: 145rpx;
- top: 80rpx;
- }
- }
- }
- .info-box{
- height: 823.12rpx;
- .text-box{
- width: 687.5rpx;
- margin-top: 116.87rpx;
- margin-left: 31.25rpx;
- .info-text{
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #292C33;
- }
- }
- }
- }
- .button-box{
- width: 750rpx;
- height: 75rpx;
- position: absolute;
- bottom: 0rpx;
- .btn-center{
- background: #3377FF;
- text-align: center;
- .center-text{
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 75rpx;
- }
- }
- .btn-left{
- width: 375rpx;
- height: 75rpx;
- background: #FFFFFF;
- float: left;
- text-align: center;
- border: 0.62rpx solid #DADEE6;
- .left-text{
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #3377FF;
- line-height: 75rpx;
- }
- }
- .btn-right{
- width: 375rpx;
- height: 75rpx;
- background: #3377FF;
- float: right;
- text-align: center;
- .right-text{
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 75rpx;
- }
- }
- }
- }
- </style>
|