glj-代码提交
This commit is contained in:
parent
40581c81d9
commit
a3ba1550bd
|
@ -146,4 +146,16 @@ export function getTenDisasterInfo() {
|
||||||
url: '/api/' + moduleName + '/ui/disasterInfo/getTenDisasterInfo',
|
url: '/api/' + moduleName + '/ui/disasterInfo/getTenDisasterInfo',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const detailByDisasterInfoId = (id, current, size) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/' + moduleName + '/ui/guestApply/detailByDisasterInfoId',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id,
|
||||||
|
current,
|
||||||
|
size
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
|
@ -47,12 +47,6 @@
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="state.dialogVisible" title="Approval" width="45%">
|
<el-dialog v-model="state.dialogVisible" title="Approval" width="45%">
|
||||||
<el-container style="margin-top: -2%; margin-bottom: 2%">
|
|
||||||
<el-radio v-model="state.radio" label="1" @click="mapEvents('1')">Point</el-radio>
|
|
||||||
<el-radio v-model="state.radio" label="2" @click="mapEvents('2')">Area</el-radio>
|
|
||||||
<el-radio v-model="state.radio" label="3" @click="mapEvents('3')">Edit</el-radio>
|
|
||||||
<el-button type="primary" style="margin-left: 5%" @click="ClearSubmit">Clear</el-button>
|
|
||||||
</el-container>
|
|
||||||
<el-container style="margin-top: 2%; margin-bottom: 2%" v-if="state.radio === '1' ? true : false">
|
<el-container style="margin-top: 2%; margin-bottom: 2%" v-if="state.radio === '1' ? true : false">
|
||||||
<span style="line-height: 35px"> Latitude:</span>
|
<span style="line-height: 35px"> Latitude:</span>
|
||||||
<el-input placeholder="wait……" style="height: 35px; margin-right: 1%" v-model="state.dislat"> </el-input>
|
<el-input placeholder="wait……" style="height: 35px; margin-right: 1%" v-model="state.dislat"> </el-input>
|
||||||
|
|
|
@ -1,10 +1,36 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="system-add-dept-container">
|
<div class="system-add-dept-container">
|
||||||
<el-dialog :title="state.title" v-model="state.isShowDialog" width="769px">
|
<el-dialog :title="state.title" v-model="state.isShowDialog" width="769px">
|
||||||
|
<el-card shadow="hover" class="layout-padding-auto">
|
||||||
|
<el-table :data="state.tableDataNew.data" v-loading="state.tableDataNew.loading" style="width: 100%" @selection-change="selectionChange">
|
||||||
|
<el-table-column type="selection" width="60" @select="selectRow" />
|
||||||
|
<el-table-column prop="userName" label="Name" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="userEmail" label="E-mail" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column prop="userStatus" label="role" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag type="info" v-if="scope.row.userStatus == 0">B1</el-tag>
|
||||||
|
<el-tag type="info" v-if="scope.row.userStatus == 1">B2</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="onHandleSizeChangeNew"
|
||||||
|
@current-change="onHandleCurrentChangeNew"
|
||||||
|
class="mt15"
|
||||||
|
:pager-count="3"
|
||||||
|
:page-sizes="[10, 20, 30]"
|
||||||
|
v-model:current-page="state.tableDataNew.param.pageNum"
|
||||||
|
background
|
||||||
|
v-model:page-size="state.tableDataNew.param.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next"
|
||||||
|
:total="state.tableDataNew.total"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
<el-card shadow="hover" class="layout-padding-auto">
|
<el-card shadow="hover" class="layout-padding-auto">
|
||||||
<div class="system-user-search mb15">
|
<div class="system-user-search mb15">
|
||||||
<el-input size="default" placeholder="Name" style="max-width: 180px"
|
<el-input size="default" placeholder="Name" style="max-width: 180px" v-model="state.tableData.query.name"> </el-input>
|
||||||
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>
|
<el-icon>
|
||||||
<ele-Search />
|
<ele-Search />
|
||||||
|
@ -12,24 +38,29 @@
|
||||||
search
|
search
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%"
|
<el-table :data="state.tableData.data" v-loading="state.tableData.loading" style="width: 100%" @selection-change="selectionChange">
|
||||||
@selection-change="selectionChange">
|
|
||||||
<el-table-column type="selection" width="60" @select="selectRow" />
|
<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="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-column prop="email" label="E-mail" show-overflow-tooltip></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
|
<el-pagination
|
||||||
:pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum"
|
@size-change="onHandleSizeChange"
|
||||||
background v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next"
|
@current-change="onHandleCurrentChange"
|
||||||
:total="state.tableData.total">
|
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-pagination>
|
||||||
</el-card>
|
</el-card>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-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()">
|
<el-button type="success" @click="save()"> Send </el-button>
|
||||||
Send
|
|
||||||
</el-button>
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -38,15 +69,14 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { getUserList, submitNew } from '/@/api/disasterInfo/index';
|
import { detailByDisasterInfoId, getUserList, submitNew } from '/@/api/disasterInfo/index';
|
||||||
import { getAdminPage } from '/@/api/response/administrator.js';
|
import { getAdminPage } from '/@/api/response/administrator.js';
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
|
||||||
|
|
||||||
const storesThemeConfig = useThemeConfig();
|
const storesThemeConfig = useThemeConfig();
|
||||||
const { website } = storeToRefs(storesThemeConfig);
|
const { website } = storeToRefs(storesThemeConfig);
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
|
@ -54,7 +84,19 @@ const state = reactive({
|
||||||
rowData: {},
|
rowData: {},
|
||||||
tableData: {
|
tableData: {
|
||||||
query: {
|
query: {
|
||||||
name: ""
|
name: '',
|
||||||
|
},
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
loading: false,
|
||||||
|
param: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tableDataNew: {
|
||||||
|
query: {
|
||||||
|
name: '',
|
||||||
},
|
},
|
||||||
data: [],
|
data: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
|
@ -74,7 +116,7 @@ const openDialog = (row) => {
|
||||||
state.title = 'Review application';
|
state.title = 'Review application';
|
||||||
state.rowData = row;
|
state.rowData = row;
|
||||||
state.isShowDialog = true;
|
state.isShowDialog = true;
|
||||||
|
getTableDataNew();
|
||||||
};
|
};
|
||||||
const save = async () => {
|
const save = async () => {
|
||||||
//选中小于1条 提示
|
//选中小于1条 提示
|
||||||
|
@ -89,11 +131,12 @@ const save = async () => {
|
||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
id: state.rowData.disasterId,
|
id: state.rowData.disasterId,
|
||||||
adminId: state.selectData[0].id,
|
adminId: state.selectData[0].userId,
|
||||||
adminName: state.selectData[0].name,
|
adminName: state.selectData[0].userName,
|
||||||
allocation:"YES"
|
allocation: 'YES',
|
||||||
};
|
};
|
||||||
let res = await submitNew(params).then(da=>{
|
console.log(params,"paramsparamsparamsparams");
|
||||||
|
let res = await submitNew(params).then((da) => {
|
||||||
ElMessage.success('success');
|
ElMessage.success('success');
|
||||||
});
|
});
|
||||||
emit('callback');
|
emit('callback');
|
||||||
|
@ -105,12 +148,33 @@ const closeDialog = () => {
|
||||||
};
|
};
|
||||||
const getTableData = async () => {
|
const getTableData = async () => {
|
||||||
state.tableData.loading = true;
|
state.tableData.loading = true;
|
||||||
let res = await getAdminPage(state.tableData.param.pageNum, state.tableData.param.pageSize,
|
let res = await getAdminPage(
|
||||||
{ name_like: state.tableData.query.name ,roleId: "1123598816738675203" },website.value.tenantId);
|
state.tableData.param.pageNum,
|
||||||
|
state.tableData.param.pageSize,
|
||||||
|
{ name_like: state.tableData.query.name, roleId: '1123598816738675203' },
|
||||||
|
website.value.tenantId
|
||||||
|
);
|
||||||
state.tableData.data = res.records;
|
state.tableData.data = res.records;
|
||||||
|
state.tableData.data.forEach((item) => {
|
||||||
|
item.userId = item.id;
|
||||||
|
item.userName = item.name;
|
||||||
|
});
|
||||||
state.tableData.total = res.total;
|
state.tableData.total = res.total;
|
||||||
state.tableData.loading = false;
|
state.tableData.loading = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getTableDataNew = () => {
|
||||||
|
state.tableDataNew.loading = true;
|
||||||
|
detailByDisasterInfoId(state.rowData.disasterId, state.tableDataNew.param.pageNum, state.tableDataNew.param.pageSize).then((da) => {
|
||||||
|
state.tableDataNew.data = da.records;
|
||||||
|
state.tableDataNew.data.forEach((item) => {
|
||||||
|
item.userId = item.adminId;
|
||||||
|
});
|
||||||
|
state.tableDataNew.total = da.total;
|
||||||
|
state.tableDataNew.loading = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 取消
|
// 取消
|
||||||
const onCancel = () => {
|
const onCancel = () => {
|
||||||
closeDialog();
|
closeDialog();
|
||||||
|
@ -126,6 +190,15 @@ const onHandleSizeChange = (val) => {
|
||||||
state.tableData.param.pageSize = val;
|
state.tableData.param.pageSize = val;
|
||||||
getTableData();
|
getTableData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onHandleCurrentChangeNew = (val) => {
|
||||||
|
state.tableData.param.pageNum = val;
|
||||||
|
getTableDataNew();
|
||||||
|
};
|
||||||
|
const onHandleSizeChangeNew = (val) => {
|
||||||
|
state.tableData.param.pageSize = val;
|
||||||
|
getTableDataNew();
|
||||||
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getTableData();
|
getTableData();
|
||||||
});
|
});
|
||||||
|
@ -140,4 +213,4 @@ defineExpose({
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue