element 弹框关闭报错
<template>
<el-container style="padding: 00px 20px 0px 20px">
<el-dialog
title="售电公司注册审批记录"
:visible.sync="innerVisible"
width="60%"
@close="closeDialog"
:close-on-click-modal="true"
:modal="false"
>
</el-dialog>
</el-container>
</template> <script>
import FlowNodeInsInfoRegApi from '@/api/pxf-service-imarketservice/imarketMemberManage/registerCheck/FlowNodeInsInfoRegApi'
import moment from 'moment'
export default {
props: {
accessVisible: Boolean,
membersRegInfo: {
type: Object,
default: function() {
return {}
}
},
states: {
type: Object,
default: function() {
return {}
}
},
processNum: {
type: String,
default: ''
}
},
data() {
return {
innerVisible: false,
mmFlowNodeInsInfoRegList: [],
scopeFlowNodeInsInfoRegList: [],
scopeInfos: [],
scopeProcessNum: '',
scopeAll: '',
}
},
watch: { accessVisible(newValue) {
this.innerVisible = newValue
}
},
mounted() {
if (this.accessVisible) {
this.init()
this.queryByProcessNum(this.processNum, 1)
this.queryByProcessNum(this.scopeProcessNum, 0)
}
},
methods: {
closeDialog() {
this.$emit('close-dialog')
},
close() {
this.$emit('update:visible') // 传递关闭事件
this.$emit('close-dialog')
},
closeModal(e) {
if (this.visible) {
document.querySelector('.dialog').contains(e.target) ? '' : this.close() // 判断点击的落点在不在dialog对话框内,如果在对话框外就调用this.close()方法关闭对话框
}
},
init() {
this.scopeInfos = this.membersRegInfo.scopeInfos.filter(item => item.isRegAdd !== 1 && item.state !== '01')
// 默认第一业务范围
this.scopeProcessNum = ''
if (this.scopeInfos.length > 0) {
if (this.scopeProcessNum === '') {
this.scopeProcessNum = this.scopeInfos[0].processNum
}
}
// 拼接所有业务范围
this.scopeAll = ''
this.membersRegInfo.scopeInfos.forEach((item) => {
this.scopeAll += item.name + '、'
})
if (this.scopeAll.indexOf('、') > -1) {
this.scopeAll = this.scopeAll.substr(0, this.scopeAll.length - 1)
}
},
queryByProcessNum(processNum, isRegAdd) {
if (!processNum) {
return
}
FlowNodeInsInfoRegApi.queryByProcessNum(processNum).then(result => {
if (isRegAdd === 1) {
this.mmFlowNodeInsInfoRegList = result.data
} else {
this.scopeFlowNodeInsInfoRegList = result.data
}
}).catch(err => {
console.log(err)
})
},
applicationDateFormat(row) {
var date = row.applicationDate
if (!date) {
return ''
}
return moment(date).format('YYYY-MM-DD')
},
dateFormat(row, column) {
var date = row[column.property]
if (!date) {
return ''
}
return moment(date).format('YYYY-MM-DD HH:mm:ss')
},
close() {
this.$emit('close-dialog')
},
formatterState(row, column) {
var state = row[column.property]
return this.states[state]
}
}
}
</script> <style scoped> </style>
element 弹框关闭报错的更多相关文章
- angularJs $mdDialog和$uibModal弹框关闭传值
$mdDialog以一个点击button按钮出现弹框为例: $scope.btn=function($event,row){ var dScope = $scope.$new(true); dScop ...
- 记一次layui弹框关闭问题
我在博客园记录过layui关于弹框关闭问题,文章为layui关闭弹出层,这次出现了特殊情况,之前是通过layer.closeAll()解决了这个问题,但是这次解决不了.而换成parent.layer. ...
- 关于点击弹框外部区域弹框关闭的交互处理(前端JS)
常见需求场景 前端在处理交互的时候,经常遇到这样的场景,点击一个按钮,出现一个弹框,点击外部区域,弹框关闭. 解决方法 思路说明: 1.给弹框的div父级都加个类名,如: 2.在document绑定一 ...
- TOMCAT 关闭报错:Tomcat did not stop in time. PID file was not removed
关闭tomcat的时候,报出如下错误信息: # ./shutdown.sh Using CATALINA_BASE: /opt/openkm-6.3.1-community/tomcat Using ...
- Element和vue框架报错提示
上面报错提示Error in render function: "TypeError:Cannot read property '$options' of undefined" 就 ...
- spring boot thymeleaf 标签未关闭报错
每天学习一点点 编程PDF电子书免费下载: http://www.shitanlife.com/code spring boot,input标签未关闭报bug,代码稍有不慎就出小问题,后来百度,goo ...
- netty-websocket-spring-boot-starter关闭报错 io/netty/channel/AbstractChannel$AbstractUnsafe io/netty/util/concurrent/GlobalEventExecutor
报错 java.lang.NoClassDefFoundError: io/netty/channel/AbstractChannel$AbstractUnsafe$ at io.netty.chan ...
- gridView AspNetPager 翻页时 弹出窗体关闭报错
gridView AspNetPager 翻页后,你右击刷新或F5会发现弹出一个刷新页面. 这是因为默认翻页都是用dopostback方式回发的.因为这时的页面已经不是原来的页面.所以会弹出提示. 这 ...
- mysql配置mha高可用防火墙未关闭报错
########################################################################## l 问题背景:检查主从复制之后做高可用报错 [r ...
随机推荐
- SQL 介绍和操作
1.什么是SQL SQL的全称是“结构话查询语句”(Structured Query Language ),是1974年有Boyce和chamberlin 提出来的.经过多年的发展,SQL语言已经成为 ...
- Element ui 中的表单提交按钮多次点击bug修复
- HDU 4027 Can you answer these queries? (线段树成段更新 && 开根操作 && 规律)
题意 : 给你N个数以及M个操作,操作分两类,第一种输入 "0 l r" 表示将区间[l,r]里的每个数都开根号.第二种输入"1 l r",表示查询区间[l,r ...
- All men are brothers
All men are brothers 牛客多校第九场E 给定n个人,起初互不认识 然后m各阶段 每个阶段有两个人x.y认识 求每个阶段选出四个人互不认识的方式 并查集 #include<bi ...
- 前端入门——day1(简介及推荐书籍和网站)
写给谁 这篇文章写给想要入门前端或者刚入门前端的小白~如果是已经工作好几年的小伙伴们可以直接跳过这一系列文章啦. 为啥写这篇文章 终于决定给自己挖这个坑了,之前一直没打算写这样的系列文章.回想起自己的 ...
- AMD - Learning JavaScript Design Patterns [Book] - O'Reilly
AMD - Learning JavaScript Design Patterns [Book] - O'Reilly The overall goal for the Asynchronous Mo ...
- day49—JavaScript阻止浏览器默认行为
转行学开发,代码100天——2018-05-04 今天主要说明一下通过JavaScript对浏览器默认行为的阻止操作.比如右键菜单的行为. 阻止默认行为的语句为: return false; 例如,阻 ...
- 阶段1 语言基础+高级_1-3-Java语言高级_1-常用API_1_第1节 Scanner类_3-Scanner的使用步骤
Scanner如何进行键盘输入,引用类型就包含了Scanner,它就是引用类型,所以也有这三个步骤, 导包.创建.使用 先通过api文档找到它.左边输入要查找scanner.双夹scanner右边就会 ...
- 阶段1 语言基础+高级_1-3-Java语言高级_05-异常与多线程_第2节 线程实现方式_1_并发与并行
并发,相当于 一个人吃两个馒头,吃一口这个再吃一口另外一个.这里是cpu一会执行任务1,一会又执行任务2 并行,相当于两个人 吃两个馒头,各自吃各自的,这样速度就会快
- shell脚本一一项目5
主题:一键查看占用内存.cpu高的进程 echo "----------------cpu top 10 list----------------"ps -eo pid,pcpu, ...