feat(index): dialog 对话框点击其他部分不会关闭

duizhaopin_ui
duan 2 years ago
parent 3b0ce964b9
commit 10428072c2

@ -58,7 +58,7 @@ export default {
selectChange(val) {
if (val === 'loginout') {
this.$store.commit('user/RESET_STATE')
this.$store.commit('permission/SET_ROUTES', [])
this.$store.commit('permission/RESET_STATE')
this.$router.push('/login')
return
}

@ -4,7 +4,7 @@ import store from './store'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import getPageTitle from '@/utils/get-page-title'
import { filterAsyncRoutes, getALLRouter } from '@/utils'
import { getALLRouter } from '@/utils'
NProgress.configure({ showSpinner: false }) // NProgress Configuration

@ -20,6 +20,12 @@ const mutations = {
},
SET_OPTS: (state, opt) => {
state.opts = opt
},
RESET_STATE: (state) => {
state.routes = []
state.addRoutes = []
state.roleData = {}
state.opts = []
}
}

@ -71,7 +71,7 @@ service.interceptors.response.use(
type: 'warning'
}).then(() => {
store.commit('user/RESET_STATE')
store.commit('permission/SET_ROUTES', [])
store.commit('permission/RESET_STATE', [])
router.push('/login')
})
}

@ -96,7 +96,7 @@
@current-change="pageChange"
/>
</div>
<el-dialog :title="dialogTitile" :visible.sync="dialogVisible" @close="onClose">
<el-dialog :title="dialogTitile" :close-on-click-modal="false" :visible.sync="dialogVisible" @close="onClose">
<el-row :gutter="15">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="80px">
<el-col :span="24">
@ -180,7 +180,7 @@
<el-button type="primary" @click="handelConfirm"></el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogDrawVisible" title="分配抽屉权限">
<el-dialog :visible.sync="dialogDrawVisible" :close-on-click-modal="false" title="分配抽屉权限">
<div class="user-header">
<el-select v-model="drawer_id" placeholder="请选择抽屉" @change="handleDrawSelect">
<el-option
@ -223,7 +223,7 @@
/>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogUserVisible" width="60%" title="分配禁用用户">
<el-dialog :visible.sync="dialogUserVisible" :close-on-click-modal="false" width="60%" title="分配禁用用户">
<div class="user-header">
<el-input v-model="seach_user" clearable placeholder="请输入内容" />
<el-button type="primary" icon="el-icon-search" @click="getUserList"></el-button>

@ -71,7 +71,7 @@
@current-change="pageChange"
/>
</div>
<el-dialog :visible.sync="dialogVisible" width="30%" :title="title" @close="handleClose">
<el-dialog :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false" :title="title" @close="handleClose">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="50px">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable :style="{width: '100%'}" />

@ -92,7 +92,7 @@
/>
</div>
</div>
<el-dialog :visible.sync="dialogVisible" title="温度记录详情" @close="handleClose">
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" title="温度记录详情" @close="handleClose">
<div class="env-header">
<el-time-picker
v-model="record_value"

@ -83,7 +83,7 @@
@current-change="pageChange"
/>
</div>
<el-dialog :visible.sync="dialogVisible" width="30%" title="录入库存" @close="onClose">
<el-dialog :close-on-click-modal="false" :visible.sync="dialogVisible" width="30%" title="录入库存" @close="onClose">
<div v-for="item in multipleSelection" :key="item.id" class="add-item">
<div>{{ `${item.name} ${item.purity}` }}</div>
<el-input v-model.number="item.num" placement="请输入校验在库数量" />
@ -93,7 +93,7 @@
<el-button type="primary" @click="handelConfirm"></el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogHistoryVisible" width="60%" title="历史记录">
<el-dialog :close-on-click-modal="false" :visible.sync="dialogHistoryVisible" width="60%" title="历史记录">
<div class="header">
<div class="header-left">
<!-- <el-date-picker-->

@ -198,7 +198,7 @@
</div>
</div>
<!-- // -->
<el-dialog title="预警信息" width="70%" :visible.sync="dialogTableVisible">
<el-dialog :close-on-click-modal="false" title="预警信息" width="70%" :visible.sync="dialogTableVisible">
<div class="header-custom">
<el-date-picker
v-model="start_time"

@ -150,7 +150,7 @@
@current-change="pageChange"
/>
</div>
<el-dialog :visible.sync="dialogHistoryVisible" width="60%" title="查看流转记录" @close="handleHistoryClose">
<el-dialog :close-on-click-modal="false" :visible.sync="dialogHistoryVisible" width="60%" title="查看流转记录" @close="handleHistoryClose">
<el-table
v-loading="loadingHistory"
element-loading-text="拼命加载中"
@ -193,7 +193,7 @@
/>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogUserVisible" width="60%" title="分配禁用用户">
<el-dialog :close-on-click-modal="false" :visible.sync="dialogUserVisible" width="60%" title="分配禁用用户">
<div class="user-header">
<el-input v-model="seach_user" clearable placeholder="请输入内容" />
<el-button type="primary" icon="el-icon-search" @click="getUserList"></el-button>
@ -237,7 +237,7 @@
</div>
</el-dialog>
<el-dialog :visible.sync="dialogEditVisible" width="60%" title="编辑试剂" @close="onClose">
<el-dialog :visible.sync="dialogEditVisible" :close-on-click-modal="false" width="60%" title="编辑试剂" @close="onClose">
<el-row :gutter="15">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="110px">
<el-col :span="24">

@ -61,7 +61,7 @@
/>
</div>
</div>
<el-dialog :visible.sync="dialogVisible" width="40%">
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%">
<el-radio-group v-model="place">
<el-radio :label="3">备选项1</el-radio>
<el-radio :label="6">备选项2</el-radio>

@ -94,7 +94,7 @@
/>
</div>
<!-- 选择试剂入库 弹框 -->
<el-dialog title="选择试剂入库" width="70%" :visible.sync="dialogTableVisible" @close="handleSelectClose">
<el-dialog title="选择试剂入库" width="70%" :close-on-click-modal="false" :visible.sync="dialogTableVisible" @close="handleSelectClose">
<div class="search-header">
<el-input v-model="selectReagentValue" clearable placeholder="请输入搜索试剂名称" />
<el-button type="primary" icon="el-icon-search" @click="searchReagent"></el-button>
@ -137,6 +137,7 @@
<el-dialog
width="53%"
title="编辑试剂信息"
:close-on-click-modal="false"
:visible.sync="formVisible"
append-to-body
@close="formClose"
@ -145,7 +146,7 @@
</el-dialog>
</el-dialog>
<!-- 新增试剂模板弹框 -->
<el-dialog :title="opTitle" width="70%" :visible.sync="reagentAddVisible" @close="handleAddClose">
<el-dialog :title="opTitle" width="70%" :close-on-click-modal="false" :visible.sync="reagentAddVisible" @close="handleAddClose">
<div class="header-select">
<el-input v-model="reagentAddTmpName" placeholder="请输入模板名称" />
<el-select v-model="reagentAddClient" placeholder="请选择柜体">
@ -189,6 +190,7 @@
</div>
<el-dialog
width="53%"
:close-on-click-modal="false"
:title="reagentAddFormTitle"
:visible.sync="reagentAddFormVisible"
append-to-body
@ -198,7 +200,7 @@
</el-dialog>
</el-dialog>
<!-- 绑定入库-->
<el-dialog title="绑定入库" width="70%" :visible.sync="bindToDBVisible" @close="handleCloseToDB">
<el-dialog title="绑定入库" width="70%" :close-on-click-modal="false" :visible.sync="bindToDBVisible" @close="handleCloseToDB">
<div class="to-database">
<div class="bind-to-db-title">请扫描试剂条码</div>
<div>

@ -117,6 +117,7 @@
/>
</div>
<el-dialog
:close-on-click-modal="false"
:title="userFormTitle"
:visible.sync="dialogVisible"
width="38%"
@ -126,6 +127,7 @@
</el-dialog>
<el-dialog
title="分配用户权限"
:close-on-click-modal="false"
:visible.sync="roleDialogVisible"
width="30%"
@close="handleClose"

@ -62,6 +62,7 @@
/>
</div>
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
:title="title"
width="80%"

Loading…
Cancel
Save