提交 9e654589 编写于 作者: yi.li's avatar yi.li

更改随访状态弹层

上级 f66041a2
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<span style="color: #606266">随访时间节点</span> <span style="color: #606266">随访时间节点</span>
</div> </div>
<div class="plan-btns-group" v-if="activeTab === 'first'"> <div class="plan-btns-group" v-if="activeTab === 'first'">
<el-button class="button-white" plain >取 消</el-button> <el-button class="button-white" plain @click="cancelEdit" >取 消</el-button>
<el-button type="primary">下一步</el-button> <el-button type="primary">下一步</el-button>
</div> </div>
<div class="plan-btns-group" v-if="activeTab === 'second'"> <div class="plan-btns-group" v-if="activeTab === 'second'">
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<p class="tips">随访计划创建成功后,模板不可更换,请谨慎选择。</p>
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间" prop="startTime"> <el-form-item label="随访开始时间" prop="startTime">
<el-date-picker <el-date-picker
...@@ -181,6 +182,17 @@ ...@@ -181,6 +182,17 @@
this.isShowSelectedDialog = val; this.isShowSelectedDialog = val;
this.isShowSelectPatient = true; this.isShowSelectPatient = true;
}, },
cancelEdit() {
this.$confirm('是否放弃本次创建,放弃后数据不能被保存', '', {
confirmButtonText: '继续创建',
cancelButtonText: '确定放弃',
type: 'warning'
}).then(() => {
// 关闭弹层,继续创建
}).catch(() => {
// 确定放弃,跳出当前编辑页面
});
},
}, },
watch: { watch: {
} }
...@@ -206,5 +218,11 @@ ...@@ -206,5 +218,11 @@
margin-top: 10px; margin-top: 10px;
} }
} }
.tips{
font-size: 12px;
line-height: 18px;
margin-top: 6px;
color: #9B9997;
}
} }
</style> </style>
<template>
<div class="dialog-wrap">
<el-dialog
title="变更随访状态"
:visible.sync="dialogFormVisible"
v-if="isShowChangeDialog"
center
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close="closeChange"
width="800px">
<el-form ref="statusForm" :model="statusForm" :rules="rules" label-suffix=":" label-width="120px">
<el-form-item label="居民" style="margin-bottom:0;">
<span>{{statusForm.nickname}}</span>
</el-form-item>
<el-form-item label="变更状态">
<span>{{statusForm.status==1 ? '未完成' : '已完成'}}</span>
</el-form-item>
<el-form-item label="变更原因" prop="reason">
<el-input type="textarea" v-model="statusForm.reason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button plain @click="closeChange">取 消</el-button>
<el-button type="primary" @click="saveReason('statusForm')">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
components: {},
data(){
return{
dialogFormVisible: true,
// statusForm: {
// reason: ''
// },
rules: {
reason: [{ required: true,message: '请输入变更原因', trigger: ['blur']}]
}
}
},
props: {
isShowChangeDialog: {
type: Boolean,
default: false
},
statusForm: {
type: Object,
default: function () {
return {};
}
}
},
computed: {
},
created() {},
methods: {
closeChange(){
this.$refs['statusForm'].resetFields();
this.$emit('closeChangeStatus',false)
},
saveReason(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
//后面更改为接口调用
// this.$emit('closeChangeStatus',false,this.statusForm);
this.$emit('closeChangeStatus',false);
this.$refs['statusForm'].resetFields();
} else {
return false;
}
});
},
}
}
</script>
<style scoped lang="scss">
@import '../../../../style/followup/followup-common';
@import '../../../../style/followup/element-reset.css';
.warn-tips{
font-size: 12px;
color: #e6a23c;
padding-top: 5px;
}
.el-dialog{
min-width: 580px!important;
}
</style>
...@@ -88,55 +88,23 @@ ...@@ -88,55 +88,23 @@
</el-row> </el-row>
</div> </div>
</div> </div>
<el-dialog title="变更随访状态" :visible.sync="dialogFormVisible" center :close-on-click-modal="false" :close-on-press-escape="false" width="800px">
<el-form ref="statusForm" :model="statusForm" :rules="rules" label-suffix=":" label-width="120px">
<el-form-item label="居民" style="margin-bottom:0;">
<span>{{statusForm.nickname}}</span>
</el-form-item>
<el-form-item label="变更状态">
<span>{{statusForm.status==1 ? '未完成' : '已完成'}}</span>
</el-form-item>
<el-form-item label="变更原因" prop="reason">
<el-input type="textarea" v-model="statusForm.reason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input>
</el-form-item>
</el-form>
<!--<div class="form-content">-->
<!--<div class="item-div"><span class="left-title">居民:</span><span class="right-item">{{statusForm.nickname}}</span></div>-->
<!--<div class="item-div"><span class="left-title">变更状态:</span><span class="right-item">{{statusForm.status==1 ? '未完成' : '已完成'}}</span></div>-->
<!--<div class="item-div textarea-add"><span class="left-title"><span class="required-mark">*</span>变更原因:</span><span class="right-item">-->
<!--<custom-textarea-->
<!--:placeholderTxt="placeholderTxt"-->
<!--:inputContentFrom="statusForm.reason"-->
<!--@inputHandler="inputHandler"-->
<!--@inputHandlerBlur="inputHandlerBlur"></custom-textarea></span></div>-->
<!--</div>-->
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="saveReason('statusForm')">确 定</el-button>
</div>
</el-dialog>
<followup-detail :dialogFormVisible="dialogDetailShow" @closeDetail="closeDetail"></followup-detail> <followup-detail :dialogFormVisible="dialogDetailShow" @closeDetail="closeDetail"></followup-detail>
<change-followup-status :isShowChangeDialog="isShowChangeDialog" :statusForm="statusForm" @closeChangeStatus="closeChangeStatus()"></change-followup-status>
</div> </div>
</template> </template>
<script> <script>
import BreadCrumb from "@/components/breadcrumb"; import BreadCrumb from "@/components/breadcrumb";
// import customTextarea from "@/components/followup/customTextarea";
import followupDetail from "./dialog/followupDetail"; import followupDetail from "./dialog/followupDetail";
import ChangeFollowupStatus from "./dialog/change-followup-status";
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
export default { export default {
components:{ components:{
BreadCrumb, BreadCrumb,
followupDetail followupDetail,
ChangeFollowupStatus
}, },
data(){ data(){
// let validDate = (rule, value, callback) => {
// if(!value) {
// callback(new Error('请输入变更原因'))
// } else {
// callback()
// }
// };
return{ return{
curmbFirst: '随访管理', curmbFirst: '随访管理',
curmbSecond: '录入管理', curmbSecond: '录入管理',
...@@ -173,17 +141,12 @@ ...@@ -173,17 +141,12 @@
total: 0, total: 0,
pageSizes: [10,20,50,100] pageSizes: [10,20,50,100]
}, },
dialogFormVisible: false,
statusForm: {
reason: ''
},
rules: {
reason: [{ required: true,message: '请输入变更原因', trigger: ['blur']}]
},
placeholderTxt: '请输入变更原因',
errTips: false,
dialogDetailShow: false, dialogDetailShow: false,
statusTabls:[], statusTabls:[],
isShowChangeDialog: false,
statusForm: {},
reason: '',
} }
}, },
computed: { computed: {
...@@ -218,10 +181,7 @@ ...@@ -218,10 +181,7 @@
editRow(row){}, editRow(row){},
changeStatusRow(row){ changeStatusRow(row){
this.statusForm = row; this.statusForm = row;
this.dialogFormVisible = true; this.isShowChangeDialog = true;
if (this.$refs['statusForm']) {
this.$refs['statusForm'].resetFields();
}
}, },
sendRow(row){}, sendRow(row){},
handleSizeChangePre(pageSize){ handleSizeChangePre(pageSize){
...@@ -231,33 +191,15 @@ ...@@ -231,33 +191,15 @@
handleCurrentChangePre(pageNum){ handleCurrentChangePre(pageNum){
this.paginationSet['pageNum'] = pageNum this.paginationSet['pageNum'] = pageNum
}, },
saveReason(formName){
// if(this.statusForm.reason){
// this.$message.success('保存成功')
// this.dialogFormVisible = false;
// }else {
// this.$message.error('请填写变更原因!')
// return false;
// }
this.$refs[formName].validate((valid) => {
if (valid) {
this.dialogFormVisible = false;
} else {
return false;
}
});
},
// inputHandler(val){
// this.statusForm.reason = val;
// },
// inputHandlerBlur(val){
// if(!val){
// this.$message.error('请填写变更原因!')
// }
// },
closeDetail(val){ closeDetail(val){
this.dialogDetailShow = val; this.dialogDetailShow = val;
}, },
closeChangeStatus(val){
this.isShowChangeDialog = val;
// let getArguments = arguments[0];
// this.isShowChangeDialog = getArguments[0];
// this.statusForm = getArguments[1];
},
}, },
filters: { filters: {
statusFileter: function(value) { statusFileter: function(value) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册