代码提交,分页转右侧
This commit is contained in:
parent
1a82c09598
commit
ac02974a87
|
@ -380,7 +380,7 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -278,7 +278,7 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -291,8 +291,8 @@ onMounted(() => {
|
|||
</script>
|
||||
<style>
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.demo-tabs>.el-tabs__content {
|
||||
|
|
|
@ -641,7 +641,7 @@ const searchDisasterDate = () => {
|
|||
padding-left: 1%;
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
|
@ -49,7 +49,7 @@
|
|||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="time" label="time" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="date" label="date" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="frequency" label="frequency" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="word" label="word" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
|
@ -367,7 +367,7 @@ onMounted(() => {
|
|||
font-weight: 600;
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
<template>
|
||||
<div class="system-user-container" style="width:calc(100% - 10px) !important ;">
|
||||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-card shadow="hover">
|
||||
<div class="system-user-search mb15">
|
||||
<el-form>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-card shadow="hover">
|
||||
<div class="system-user-search mb15">
|
||||
<el-form>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="UserName"><el-input size="default" style="max-width: 180px"
|
||||
v-model="state.query.userName" clearable placeholder="Please enter the UserName">
|
||||
</el-input>
|
||||
v-model="state.query.userName" clearable
|
||||
placeholder="Please enter the UserName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="checked" style="margin-left: 10px;">
|
||||
<el-select size="default" v-model="state.query.status" clearable style="max-width: 180px"
|
||||
placeholder="Replied">
|
||||
<el-select size="default" v-model="state.query.status" clearable
|
||||
style="max-width: 180px" placeholder="Replied">
|
||||
<el-option label="UnReplied" :value="0"></el-option>
|
||||
<el-option label="Replied" :value="1"></el-option>
|
||||
<el-option label="Observed" :value="2"></el-option>
|
||||
|
@ -36,66 +37,64 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" style="width: 100%" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column prop="userName" label="userName"> </el-table-column>
|
||||
<el-table-column prop="email" label="email"> </el-table-column>
|
||||
<el-table-column prop="organization" label="organization"> </el-table-column>
|
||||
<el-table-column prop="message" label="message"> </el-table-column>
|
||||
<el-table-column label="Operate" width="180">
|
||||
<template #default="scope">
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" v-if="scope.row.status != 2 " text type="primary"
|
||||
@click="onObserved(scope.row)">Observed</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" v-if="scope.row.status != 1 " text type="primary"
|
||||
@click="onOpenEdit(scope.row)">Reply e-mail</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" v-if="scope.row.status == 1 " text type="primary"
|
||||
@click="onOpenEdit(scope.row)">Reply Info</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
||||
@click="onRowDel(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum"
|
||||
background v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog v-model="state.dialogVisible" title="Send Email" width="60%" :before-close="handleClose">
|
||||
<el-form-item label="Subject:" >
|
||||
<el-input v-model="state.email.subject" placeholder="Please enter the Subject"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Content:" > -->
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" style="width: 100%" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column prop="userName" label="userName"> </el-table-column>
|
||||
<el-table-column prop="email" label="email"> </el-table-column>
|
||||
<el-table-column prop="organization" label="organization"> </el-table-column>
|
||||
<el-table-column prop="message" label="message"> </el-table-column>
|
||||
<el-table-column label="Operate" width="180">
|
||||
<template #default="scope">
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small"
|
||||
v-if="scope.row.status != 2" text type="primary"
|
||||
@click="onObserved(scope.row)">Observed</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small"
|
||||
v-if="scope.row.status != 1" text type="primary"
|
||||
@click="onOpenEdit(scope.row)">Reply e-mail</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small"
|
||||
v-if="scope.row.status == 1" text type="primary"
|
||||
@click="onOpenEdit(scope.row)">Reply Info</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
||||
@click="onRowDel(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.tableData.param.pageNum" background
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog v-model="state.dialogVisible" title="Send Email" width="60%" :before-close="handleClose">
|
||||
<el-form-item label="Subject:">
|
||||
<el-input v-model="state.email.subject" placeholder="Please enter the Subject"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Content:" > -->
|
||||
|
||||
<QuillEditor ref="myQuillEditor"
|
||||
theme="snow"
|
||||
v-model:content="state.email.text"
|
||||
:options="state.options"
|
||||
contentType="html"
|
||||
@update:content="setValue()"
|
||||
style="height:500px ;"
|
||||
/>
|
||||
<!-- </el-form-item> -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="state.dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" @click="send()" v-if="state.email.status != 1">
|
||||
Send
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
<QuillEditor ref="myQuillEditor" theme="snow" v-model:content="state.email.text" :options="state.options"
|
||||
contentType="html" @update:content="setValue()" style="height:500px ;" />
|
||||
<!-- </el-form-item> -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="state.dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" @click="send()" v-if="state.email.status != 1">
|
||||
Send
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="contact">
|
||||
import { getList, remove,emailSend } from '/@/api/contact/index'
|
||||
import { getList, remove, emailSend } from '/@/api/contact/index'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { ref, reactive, onMounted, nextTick,toRaw } from 'vue';
|
||||
import { ref, reactive, onMounted, nextTick, toRaw } from 'vue';
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import { QuillEditor } from '@vueup/vue-quill'
|
||||
import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
||||
|
@ -116,7 +115,7 @@ const state = reactive({
|
|||
},
|
||||
selected: [],
|
||||
dialogVisible: false,
|
||||
options:{
|
||||
options: {
|
||||
modules: {
|
||||
toolbar: [
|
||||
['bold', 'italic', 'underline', 'strike'],
|
||||
|
@ -133,20 +132,20 @@ const state = reactive({
|
|||
},
|
||||
placeholder: '请输入内容...'
|
||||
},
|
||||
email:{
|
||||
subject:'Thank You for Your Support',
|
||||
text:'Dear Rising Sun,'+
|
||||
'I would like to express my heartfelt gratitude to you for your kind support and assistance during my recent project. I appreciate the time and effort you have dedicated to helping me with technical and news-related issues.'+
|
||||
'It has been a pleasure working with such a knowledgeable and professional individual like you. Your expertise and guidance have proven to be invaluable to me, and I am truly grateful for your assistance throughout the process.'+
|
||||
'Once again, thank you so much for your help and cooperation. I look forward to collaborating with you again in the future.'+
|
||||
' Best regards,'+
|
||||
' yyhouc'
|
||||
} ,
|
||||
email: {
|
||||
subject: 'Thank You for Your Support',
|
||||
text: 'Dear Rising Sun,' +
|
||||
'I would like to express my heartfelt gratitude to you for your kind support and assistance during my recent project. I appreciate the time and effort you have dedicated to helping me with technical and news-related issues.' +
|
||||
'It has been a pleasure working with such a knowledgeable and professional individual like you. Your expertise and guidance have proven to be invaluable to me, and I am truly grateful for your assistance throughout the process.' +
|
||||
'Once again, thank you so much for your help and cooperation. I look forward to collaborating with you again in the future.' +
|
||||
' Best regards,' +
|
||||
' yyhouc'
|
||||
},
|
||||
//字典数据
|
||||
});
|
||||
const setValue = () => {
|
||||
const text = toRaw(myQuillEditor.value).getHTML()
|
||||
console.log(text)
|
||||
const text = toRaw(myQuillEditor.value).getHTML()
|
||||
console.log(text)
|
||||
}
|
||||
// 初始化表格数据
|
||||
const initTableData = () => {
|
||||
|
@ -174,7 +173,7 @@ const onOpenEdit = (row) => {
|
|||
|
||||
};
|
||||
const send = () => {
|
||||
state.email.email="792163605@qq.com"
|
||||
state.email.email = "792163605@qq.com"
|
||||
emailSend(state.email).then(res => {
|
||||
ElMessage.success('发送成功');
|
||||
state.dialogVisible = false;
|
||||
|
@ -218,9 +217,8 @@ onMounted(() => {
|
|||
});
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -224,7 +224,7 @@ onMounted(() => {
|
|||
getTableData();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
.demo-tabs>.el-tabs__content {
|
||||
padding: 32px;
|
||||
color: #6b778c;
|
||||
|
@ -242,7 +242,7 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
|
||||
<div class="system-user-container" style="width:calc(100% - 10px) !important ;">
|
||||
<el-config-provider :locale="en">
|
||||
<div class="system-user-container" style="width:calc(100% - 10px) !important ;">
|
||||
<el-config-provider :locale="en">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-card shadow="hover">
|
||||
|
@ -54,8 +53,8 @@
|
|||
<el-table-column prop="reviewTime" label="Review Time"></el-table-column>
|
||||
<el-table-column label="Operate" width="140">
|
||||
<template #default="scope">
|
||||
<el-button :style='scope.row.reviewTime?"display:none;":"" ' size="small" text type="primary"
|
||||
@click="onOpenEdit(scope.row)">Review</el-button>
|
||||
<el-button :style='scope.row.reviewTime ? "display:none;" : ""' size="small" text
|
||||
type="primary" @click="onOpenEdit(scope.row)">Review</el-button>
|
||||
<el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary"
|
||||
@click="onRowDel(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
|
@ -64,20 +63,19 @@
|
|||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange"
|
||||
class="mt15" :pager-count="3" :page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.tableData.param.pageNum" background
|
||||
v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="systemUser">
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import { getList, remove ,review } from '/@/api/tool/index'
|
||||
import { getList, remove, review } from '/@/api/tool/index'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { reactive, ref, onMounted, nextTick } from 'vue';
|
||||
const AddRef = ref();
|
||||
|
@ -126,13 +124,13 @@ const onOpenEdit = (row) => {
|
|||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
review({id:row.id}).then(res => {
|
||||
ElMessage.success('success');
|
||||
initTableData();
|
||||
.then(() => {
|
||||
review({ id: row.id }).then(res => {
|
||||
ElMessage.success('success');
|
||||
initTableData();
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => { });
|
||||
|
||||
};
|
||||
// 删除用户
|
||||
|
@ -172,9 +170,8 @@ onMounted(() => {
|
|||
});
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
|
@ -5,27 +5,28 @@
|
|||
<div class="system-user-search mb15">
|
||||
<el-input size="default" placeholder="Name" style="max-width: 180px"
|
||||
v-model="state.tableData.query.name"> </el-input>
|
||||
<el-button size="default" type="primary" class="ml10" @click="getTableData" >
|
||||
<el-button size="default" type="primary" class="ml10" @click="getTableData">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
search
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%" @selection-change = "selectionChange">
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%"
|
||||
@selection-change="selectionChange">
|
||||
<el-table-column type="selection" width="60" @select="selectRow" />
|
||||
<el-table-column prop="name" label="Name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="email" label="E-mail" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum"
|
||||
background v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="state.tableData.total">
|
||||
background v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="state.isShowDialog = false" >Cancel</el-button>
|
||||
<el-button @click="state.isShowDialog = false">Cancel</el-button>
|
||||
<el-button type="success" @click="save()">
|
||||
Save
|
||||
</el-button>
|
||||
|
@ -37,7 +38,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getUserList,submit } from '/@/api/disasterInfo/index';
|
||||
import { getUserList, submit } from '/@/api/disasterInfo/index';
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
|
||||
const formRef = ref();
|
||||
|
@ -81,9 +82,9 @@ const save = async () => {
|
|||
return;
|
||||
}
|
||||
let params = {
|
||||
id:state.rowData.id,
|
||||
chiefId:state.selectData[0].id,
|
||||
chiefName:state.selectData[0].name,
|
||||
id: state.rowData.id,
|
||||
chiefId: state.selectData[0].id,
|
||||
chiefName: state.selectData[0].name,
|
||||
};
|
||||
let res = await submit(params);
|
||||
emit('callback');
|
||||
|
@ -133,7 +134,7 @@ defineExpose({
|
|||
</script>
|
||||
<style>
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
|
@ -118,8 +118,6 @@
|
|||
<el-input placeholder="请输入内容" style="height:35px;"></el-input>
|
||||
</el-container>
|
||||
|
||||
<Map style="height:350px ; width:100% ;margin-bottom: 10px;" ref="map"></Map>
|
||||
|
||||
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
|
||||
|
||||
<el-form-item label="Disaster Time">
|
||||
|
@ -386,7 +384,7 @@ const getValue = (key) => {
|
|||
}
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,89 +2,50 @@
|
|||
<div class="system-role-container layout-padding">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<div class="system-user-search mb15">
|
||||
<el-input v-model="state.tableData.param.search"
|
||||
size="default"
|
||||
placeholder="请输入角色名称"
|
||||
style="max-width: 180px"> </el-input>
|
||||
<el-button size="default"
|
||||
type="primary"
|
||||
class="ml10">
|
||||
<el-input v-model="state.tableData.param.search" size="default" placeholder="请输入角色名称" style="max-width: 180px">
|
||||
</el-input>
|
||||
<el-button size="default" type="primary" class="ml10">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
查询
|
||||
</el-button>
|
||||
<el-button size="default"
|
||||
type="success"
|
||||
class="ml10"
|
||||
@click="onOpenAddRole('add')">
|
||||
<el-button size="default" type="success" class="ml10" @click="onOpenAddRole('add')">
|
||||
<el-icon>
|
||||
<ele-FolderAdd />
|
||||
</el-icon>
|
||||
新增角色
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data"
|
||||
v-loading="state.tableData.loading"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index"
|
||||
label="序号"
|
||||
width="60" />
|
||||
<el-table-column prop="roleName"
|
||||
label="角色名称"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="roleSign"
|
||||
label="角色标识"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sort"
|
||||
label="排序"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="status"
|
||||
label="角色状态"
|
||||
show-overflow-tooltip>
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="60" />
|
||||
<el-table-column prop="roleName" label="角色名称" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="roleSign" label="角色标识" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sort" label="排序" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="status" label="角色状态" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag type="success"
|
||||
v-if="scope.row.status">启用</el-tag>
|
||||
<el-tag type="info"
|
||||
v-else>禁用</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.status">启用</el-tag>
|
||||
<el-tag type="info" v-else>禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="describe"
|
||||
label="角色描述"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="createTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作"
|
||||
width="100">
|
||||
<el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="scope">
|
||||
<el-button :disabled="scope.row.roleName === '超级管理员'"
|
||||
size="small"
|
||||
text
|
||||
type="primary"
|
||||
@click="onOpenEditRole('edit', scope.row)">修改</el-button>
|
||||
<el-button :disabled="scope.row.roleName === '超级管理员'"
|
||||
size="small"
|
||||
text
|
||||
type="primary"
|
||||
@click="onRowDel(scope.row)">删除</el-button>
|
||||
<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" text type="primary"
|
||||
@click="onOpenEditRole('edit', scope.row)">修改</el-button>
|
||||
<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" text type="primary"
|
||||
@click="onRowDel(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange"
|
||||
@current-change="onHandleCurrentChange"
|
||||
class="mt15"
|
||||
:pager-count="3"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.tableData.param.pageNum"
|
||||
background
|
||||
v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<RoleDialog ref="roleDialogRef"
|
||||
@refresh="getTableData()" />
|
||||
<RoleDialog ref="roleDialogRef" @refresh="getTableData()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -168,15 +129,17 @@ onMounted(() => {
|
|||
|
||||
<style scoped lang="scss">
|
||||
.system-role-container {
|
||||
.system-role-padding {
|
||||
padding: 15px;
|
||||
.el-table {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.system-role-padding {
|
||||
padding: 15px;
|
||||
|
||||
.el-table {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -149,7 +149,7 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,83 +2,63 @@
|
|||
<div class="system-role-container layout-padding">
|
||||
<div class="system-role-padding layout-padding-auto layout-padding-view">
|
||||
<el-config-provider :locale="en">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-input size="default" placeholder="please enter manager name" style="max-width: 200px" v-model="state.searchName"
|
||||
clearable></el-input>
|
||||
<el-button size="default" type="primary" class="ml10" @click="getTableData">
|
||||
<el-icon>
|
||||
<ele-Search/>
|
||||
</el-icon>
|
||||
search
|
||||
</el-button>
|
||||
<el-button size="default" type="primary" class="ml10" @click="batchAudit">
|
||||
<el-icon>
|
||||
<ele-EditPen/>
|
||||
</el-icon>
|
||||
batch audit
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data"
|
||||
v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange"
|
||||
style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index"
|
||||
label="ID"
|
||||
width="50" />
|
||||
<el-table-column prop="disasterType"
|
||||
label="DisasterType"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry"
|
||||
label="DisasterCountry"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterKeyword"
|
||||
label="DisasterKeyword"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="managerName"
|
||||
label="ManagerName"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sponsorOrganization"
|
||||
label="SponsorOrganization"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="researchField"
|
||||
label="ResearchField"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="occupation"
|
||||
label="occupation"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- <el-button link type="primary" size="small" @click="handleClick">Detail</el-button>-->
|
||||
<el-button link type="primary" size="small" @click="auditManager(scope.row)">Audit</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange"
|
||||
@current-change="onHandleCurrentChange"
|
||||
class="mt15"
|
||||
:pager-count="3"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.tableData.param.pageNum"
|
||||
background
|
||||
v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-input size="default" placeholder="please enter manager name" style="max-width: 200px"
|
||||
v-model="state.searchName" clearable></el-input>
|
||||
<el-select v-model="state.status" placeholder="please select data type" style="max-width: 200px"
|
||||
size="default" clearable>
|
||||
<el-option value= "0" label="Unclaimed"></el-option>
|
||||
<el-option value= "1" label="Claimed"></el-option>
|
||||
</el-select>
|
||||
<el-button size="default" type="primary" class="ml10" @click="getTableData">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
search
|
||||
</el-button>
|
||||
<el-button size="default" type="primary" class="ml10" @click="batchAudit">
|
||||
<el-icon>
|
||||
<ele-EditPen />
|
||||
</el-icon>
|
||||
batch audit
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="ID" width="50" />
|
||||
<el-table-column prop="disasterType" label="DisasterType" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="DisasterCountry" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="disasterKeyword" label="DisasterKeyword" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="managerName" label="ManagerName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sponsorOrganization" label="SponsorOrganization" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="researchField" label="ResearchField" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="occupation" label="occupation" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="applyTime" label="applyTime" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column v-if="state.status == '1'" prop="reviewTime" label="reviewTime" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column v-if="state.status == '0'" prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<!-- <el-button link type="primary" size="small" @click="handleClick">Detail</el-button>-->
|
||||
<el-button link type="primary" size="small" @click="auditManager(scope.row)">Audit</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
<RoleDialog ref="roleDialogRef"
|
||||
@refresh="getTableData()" />
|
||||
<Audit ref="auditRef" @callback="getTableData"/>
|
||||
<RoleDialog ref="roleDialogRef" @refresh="getTableData()" />
|
||||
<Audit ref="auditRef" @callback="getTableData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="systemRole">
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
import {getAdminManagerPage,auditData} from '/@/api/response/adminManager.js';
|
||||
import { getAdminManagerPage, auditData } from '/@/api/response/adminManager.js';
|
||||
import Audit from './component/audit.vue';
|
||||
const activeName = ref('first');
|
||||
const auditRef = ref();
|
||||
|
@ -95,8 +75,9 @@ const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialo
|
|||
// 定义变量内容
|
||||
const roleDialogRef = ref();
|
||||
const state = reactive({
|
||||
multipleSelection:[],
|
||||
searchName:'',
|
||||
status:"0",
|
||||
multipleSelection: [],
|
||||
searchName: '',
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
|
@ -113,7 +94,7 @@ const handleSelectionChange = (val) => {
|
|||
}
|
||||
//审核管理者可以管理这个灾害
|
||||
const auditManager = (row) => {
|
||||
auditRef.value.openDialog([{...row}]);
|
||||
auditRef.value.openDialog([{ ...row }]);
|
||||
/*ElMessageBox.confirm(`This operation will audit the disaster data:“${row.disasterType}”,Whether to continue?`, 'tip', {
|
||||
confirmButtonText: 'confirm',
|
||||
cancelButtonText: 'cancel',
|
||||
|
@ -130,7 +111,7 @@ const auditManager = (row) => {
|
|||
// 初始化表格数据
|
||||
const getTableData = () => {
|
||||
state.tableData.loading = true;
|
||||
getAdminManagerPage(state.tableData.param.pageNum,state.tableData.param.pageSize,{"managerName":state.searchName}).then(res=>{
|
||||
getAdminManagerPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "managerName": state.searchName,"status": state.status}).then(res => {
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
|
@ -149,7 +130,7 @@ const onOpenEditRole = (type, row) => {
|
|||
};
|
||||
//批量审核普通管理员数据
|
||||
const batchAudit = () => {
|
||||
if(state.multipleSelection.length == 0){
|
||||
if (state.multipleSelection.length == 0) {
|
||||
ElMessage.warning("Select the data to be operated first");
|
||||
return false;
|
||||
}
|
||||
|
@ -162,13 +143,13 @@ const deleteUser = (row) => {
|
|||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
/* remove(row.id).then(res=>{
|
||||
getTableData();
|
||||
ElMessage.success('Deleted successfully');
|
||||
})*/
|
||||
})
|
||||
.catch(() => {});
|
||||
.then(() => {
|
||||
/* remove(row.id).then(res=>{
|
||||
getTableData();
|
||||
ElMessage.success('Deleted successfully');
|
||||
})*/
|
||||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
// 分页改变
|
||||
const onHandleSizeChange = (val) => {
|
||||
|
@ -185,8 +166,13 @@ onMounted(() => {
|
|||
getTableData();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.demo-tabs > .el-tabs__content {
|
||||
<style scoped lang="scss">
|
||||
.mt15 {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.demo-tabs>.el-tabs__content {
|
||||
padding: 32px;
|
||||
color: #6b778c;
|
||||
font-size: 32px;
|
||||
|
@ -194,15 +180,12 @@ onMounted(() => {
|
|||
}
|
||||
|
||||
.system-role-container {
|
||||
.system-role-padding {
|
||||
padding: 15px;
|
||||
.el-table {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
.system-role-padding {
|
||||
padding: 15px;
|
||||
|
||||
.el-table {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -126,7 +126,7 @@ defineExpose({
|
|||
|
||||
<style scoped>
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
|
@ -1,75 +1,62 @@
|
|||
<template>
|
||||
<el-config-provider :locale="en">
|
||||
<el-drawer
|
||||
v-model="state.table"
|
||||
title="Management Disaster"
|
||||
direction="rtl"
|
||||
size="50%"
|
||||
>
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-input size="default" placeholder="please enter disaster type" style="max-width: 190px" v-model="state.searchName"
|
||||
clearable></el-input>
|
||||
<el-button size="default" type="primary" class="ml10" @click="getTableData">
|
||||
<el-icon>
|
||||
<ele-Search/>
|
||||
</el-icon>
|
||||
search
|
||||
</el-button>
|
||||
<el-button size="default" type="success" class="ml10" @click="addDisaster">
|
||||
<el-icon>
|
||||
<ele-FolderAdd/>
|
||||
</el-icon>
|
||||
add
|
||||
</el-button>
|
||||
<el-button size="default" type="danger" class="ml10" @click="batchDelete">
|
||||
<el-icon>
|
||||
<ele-Delete/>
|
||||
</el-icon>
|
||||
batch delete
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column property="dictValue" label="DisasterType" width="150" />
|
||||
<el-table-column property="disasterCountry" label="DisasterCountry" width="200" />
|
||||
<el-table-column property="disasterTime" label="DisasterTime" />
|
||||
<el-table-column prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" size="small" @click="deleteDisaster(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange"
|
||||
@current-change="onHandleCurrentChange"
|
||||
class="mt15"
|
||||
:pager-count="3"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
v-model:current-page="state.tableData.param.pageNum"
|
||||
background
|
||||
v-model:page-size="state.tableData.param.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
<DisasterInfo ref="disasterInfoRef" @callback="getTableData"/>
|
||||
</el-drawer>
|
||||
<el-drawer v-model="state.table" title="Management Disaster" direction="rtl" size="50%">
|
||||
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
|
||||
<el-input size="default" placeholder="please enter disaster type" style="max-width: 190px"
|
||||
v-model="state.searchName" clearable></el-input>
|
||||
<el-button size="default" type="primary" class="ml10" @click="getTableData">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
search
|
||||
</el-button>
|
||||
<el-button size="default" type="success" class="ml10" @click="addDisaster">
|
||||
<el-icon>
|
||||
<ele-FolderAdd />
|
||||
</el-icon>
|
||||
add
|
||||
</el-button>
|
||||
<el-button size="default" type="danger" class="ml10" @click="batchDelete">
|
||||
<el-icon>
|
||||
<ele-Delete />
|
||||
</el-icon>
|
||||
batch delete
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="state.tableData.data" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column property="dictValue" label="DisasterType" width="150" />
|
||||
<el-table-column property="disasterCountry" label="DisasterCountry" width="200" />
|
||||
<el-table-column property="disasterTime" label="DisasterTime" />
|
||||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" size="small" @click="deleteDisaster(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background
|
||||
v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
||||
:total="state.tableData.total">
|
||||
</el-pagination>
|
||||
<DisasterInfo ref="disasterInfoRef" @callback="getTableData" />
|
||||
</el-drawer>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import {reactive, ref} from "vue";
|
||||
import { reactive, ref } from "vue";
|
||||
import DisasterInfo from './disasterInfo.vue';
|
||||
import {getPage,removeManage} from '/@/api/disasterInfo/index.js';
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import { getPage, removeManage } from '/@/api/disasterInfo/index.js';
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
const disasterInfoRef = ref();
|
||||
const state = reactive({
|
||||
table:false,
|
||||
loading:false,
|
||||
userId:null,
|
||||
multipleSelection:[],
|
||||
searchName:'',
|
||||
table: false,
|
||||
loading: false,
|
||||
userId: null,
|
||||
multipleSelection: [],
|
||||
searchName: '',
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
|
@ -89,7 +76,7 @@ const addDisaster = () => {
|
|||
}
|
||||
//批量删除chief管理员管理灾害数据
|
||||
const batchDelete = () => {
|
||||
if(state.multipleSelection.length == 0){
|
||||
if (state.multipleSelection.length == 0) {
|
||||
ElMessage.warning("Select the data to be operated first");
|
||||
return false;
|
||||
}
|
||||
|
@ -98,14 +85,14 @@ const batchDelete = () => {
|
|||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
let id = state.multipleSelection.map(item=>({id:item.id,chiefId:null}))
|
||||
removeManage(id).then(res=>{
|
||||
getTableData();
|
||||
ElMessage.success('delete successfully');
|
||||
})
|
||||
.then(() => {
|
||||
let id = state.multipleSelection.map(item => ({ id: item.id, chiefId: null }))
|
||||
removeManage(id).then(res => {
|
||||
getTableData();
|
||||
ElMessage.success('delete successfully');
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
const deleteDisaster = (row) => {
|
||||
ElMessageBox.confirm(`This operation will delete the disaster:“${row.dictValue}”,Whether to continue?`, 'tip', {
|
||||
|
@ -113,14 +100,14 @@ const deleteDisaster = (row) => {
|
|||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
let delData = [{"id":row.id,"cheif":null}]
|
||||
removeManage(delData).then(res=>{
|
||||
getTableData();
|
||||
ElMessage.success('Deleted successfully');
|
||||
})
|
||||
.then(() => {
|
||||
let delData = [{ "id": row.id, "cheif": null }]
|
||||
removeManage(delData).then(res => {
|
||||
getTableData();
|
||||
ElMessage.success('Deleted successfully');
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
// 打开弹窗
|
||||
const openDialog = (userId) => {
|
||||
|
@ -130,7 +117,7 @@ const openDialog = (userId) => {
|
|||
};
|
||||
//分页查询已经管理的灾害数据
|
||||
const getTableData = () => {
|
||||
getPage(state.tableData.param.pageNum,state.tableData.param.pageSize,{"chiefIdEquals":state.userId,"disasterType":state.searchName}).then(res=>{
|
||||
getPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "chiefIdEquals": state.userId, "disasterType": state.searchName }).then(res => {
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
|
@ -155,7 +142,7 @@ defineExpose({
|
|||
|
||||
<style scoped>
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
|
@ -235,7 +235,7 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
.mt15 {
|
||||
float: right;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue