暂存修改审核加入地图与其他信息修改

This commit is contained in:
yyhouc 2023-04-12 17:09:51 +08:00
parent 7ea4fa8598
commit c8c3e40c54
1 changed files with 45 additions and 27 deletions

View File

@ -2,7 +2,7 @@
<div class="system-role-container layout-padding">
<div class="system-role-padding layout-padding-auto layout-padding-view">
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 20px">
<el-tab-pane label="Not reviewed" name="first">
<el-tab-pane label="unchecked" name="first">
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
<el-table-column type="index" label="ID" width="50" />
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
@ -57,7 +57,7 @@
:total="state.tableData.total">
</el-pagination>
</el-tab-pane>
<el-tab-pane label="Reviewed" name="second">
<el-tab-pane label="checked" name="second">
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
<el-table-column type="index" label="ID" width="50" />
<el-table-column prop="username" label="User name" show-overflow-tooltip></el-table-column>
@ -113,7 +113,22 @@
</el-tab-pane>
</el-tabs>
</div>
<RoleDialog ref="roleDialogRef" @refresh="getTableData()" />
<el-dialog
v-model="state.dialogVisible"
title="Tips"
width="30%"
:before-close="handleClose"
>
<Map style="height:400px ; width:600px"></Map>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">Cancel</el-button>
<el-button type="primary" @click="dialogVisible = false">
Confirm
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
@ -122,6 +137,9 @@ import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
import { ElMessageBox, ElMessage} from 'element-plus';
import {getList ,review } from '/@/api/disasterInfo/index';
import { getDictionary } from '/@/api/system/dictbiz';
//
import Map from '/@/components/Map.vue';
const activeName = ref('first');
@ -129,12 +147,11 @@ const handleClick = (tab ,event) => {
state.selectName=tab.props.name;
getTableData();
};
//
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
//
const roleDialogRef = ref();
const state = reactive({
dialogVisible: false,
tableData: {
data: [],
total: 0,
@ -171,28 +188,29 @@ const onHandleSizeChange = (val) => {
};
const onOpenEditRole = (type, row) => {
//使
ElMessageBox.confirm('Are you sure you want to review this data ?', 'Tips', {
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
type: 'warning',
})
.then(() => {
//
review(row.id).then(() => {
ElMessage({
type: 'success',
message: 'Review success!',
});
getTableData();
});
})
.catch(() => {
//
ElMessage({
type: 'info',
message: 'Review failed!',
});
});
// ElMessageBox.confirm('Are you sure you want to review this data ?', 'Tips', {
// confirmButtonText: 'OK',
// cancelButtonText: 'Cancel',
// type: 'warning',
// })
// .then(() => {
// //
// review(row.id,state.tableData.loading).then(() => {
// ElMessage({
// type: 'success',
// message: 'Review success!',
// });
// getTableData();
// });
// })
// .catch(() => {
// //
// ElMessage({
// type: 'info',
// message: 'Review failed!',
// });
// });
state.dialogVisible = true;
};
//