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>
相關文章
相關標籤/搜索