无设备处理
This commit is contained in:
@@ -1,46 +1,46 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<div class="default-main">
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='用户状态'>
|
||||
<el-select v-model='tableStore.table.params.searchState' placeholder='选择用户状态'>
|
||||
<el-form-item label="用户状态">
|
||||
<el-select v-model="tableStore.table.params.searchState" placeholder="选择用户状态">
|
||||
<el-option
|
||||
v-for='(item, index) in userState'
|
||||
:label='item.label'
|
||||
:key='index'
|
||||
:value='item.value'
|
||||
v-for="(item, index) in userState"
|
||||
:label="item.label"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='用户类型:'>
|
||||
<el-select v-model='tableStore.table.params.casualUser' placeholder='选择用户类型'>
|
||||
<el-form-item label="用户类型:">
|
||||
<el-select v-model="tableStore.table.params.casualUser" placeholder="选择用户类型">
|
||||
<el-option
|
||||
v-for='(item, index) in casualUser'
|
||||
:label='item.label'
|
||||
:key='index'
|
||||
:value='item.value'
|
||||
v-for="(item, index) in casualUser"
|
||||
:label="item.label"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='关键词:'>
|
||||
<el-form-item label="关键词:">
|
||||
<el-input
|
||||
style='width: 240px'
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
style="width: 240px"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder='仅根据用户名/登录名'
|
||||
placeholder="仅根据用户名/登录名"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button :icon='Plus' type='primary' @click='addUser'>添加</el-button>
|
||||
<el-button :icon="Plus" type="primary" @click="addUser">添加</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' />
|
||||
<PopupEdit ref='popupEditRef'></PopupEdit>
|
||||
<PopupPwd ref='popupPwdRef'></PopupPwd>
|
||||
<Table ref="tableRef" />
|
||||
<PopupEdit ref="popupEditRef"></PopupEdit>
|
||||
<PopupPwd ref="popupPwdRef"></PopupPwd>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
@@ -119,7 +119,15 @@ const tableStore = new TableStore({
|
||||
return row.state !== 1
|
||||
},
|
||||
click: row => {
|
||||
popupPwdRef.value.open(row.id, row.loginName)
|
||||
ElMessageBox.prompt('二次校验密码确认', '注销用户', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'password'
|
||||
}).then(({ value }) => {
|
||||
passwordConfirm(value).then(res => {
|
||||
popupPwdRef.value.open(row.id)
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -154,17 +162,16 @@ const tableStore = new TableStore({
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'password'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
passwordConfirm(value).then(res => {
|
||||
deluser({
|
||||
id: row.id
|
||||
}).then(() => {
|
||||
ElMessage.success('注销成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}).then(({ value }) => {
|
||||
passwordConfirm(value).then(res => {
|
||||
deluser({
|
||||
id: row.id
|
||||
}).then(() => {
|
||||
ElMessage.success('注销成功')
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user