glj-代码提交

This commit is contained in:
glj 2023-12-16 21:01:17 +08:00
parent 2b8e2cf703
commit 7f505ecaa6
13 changed files with 184 additions and 35 deletions

View File

@ -95,3 +95,12 @@ export function deleteByIds(ids) {
data: ids
});
}
export function examineDisasterInfoEnd(row) {
return request({
url: '/api/' + moduleName + '/ui/disasterInfo/examineDisasterInfoEnd',
method: 'post',
data: row,
})
}

View File

@ -38,6 +38,14 @@ export const approval = (data) => {
});
};
export const approvalMultiple = (data) => {
return request({
url: '/api/' + moduleName + '/ui/remoteSensing/approvalMultiple',
method: 'post',
data: data
});
};
export const importTemplate = (data) => {
return request({
url: '/api/' + moduleName + '/ui/remoteSensing/importTemplate',

View File

@ -37,7 +37,7 @@
<script setup name="disasterTable">
import { onMounted, reactive, computed, defineProps, defineEmits } from "vue";
import { getList } from "/@/api/system/dictbiz.js";
import { getDictionary } from "/@/api/system/dictbiz.js";
import { getPage } from "/@/api/disasterInfo/index.js";
import { Session } from '/@/utils/storage';
//
@ -78,8 +78,8 @@ const tableClick = (row, column, event) => {
//
const getDictBizData = () => {
getList({ code: 'disaster' }).then(res => {
state.dictList = res[0].children
getDictionary({ code: 'disaster' }).then(res => {
state.dictList = res;
})
}
//

View File

@ -264,7 +264,7 @@ export const dynamicRoutes = [
name: 'chief-administrator-management',
component: () => import('/@/views/systemManagement/chiefAdministrator/index.vue'),
meta: {
title: 'Chief Administrator',
title: 'Administrator',
isLink: '',
isHide: false,
isKeepAlive: true,
@ -280,7 +280,7 @@ export const dynamicRoutes = [
name: 'administratorManagement',
component: () => import('/@/views/systemManagement/administrator/index.vue'),
meta: {
title: 'Administrator',
title: 'User',
isLink: '',
isHide: false,
isKeepAlive: true,

View File

@ -3,10 +3,12 @@
<el-form :model="state.ruleForm" size="default" label-width="150px" :rules="rules" ref="adminAddFormRef">
<el-form-item prop="title" label="name">
<el-select v-model="state.ruleForm.title" class="m-2" placeholder="please enter name">
<el-option label="GDACS" value="GDACS"></el-option>
<el-option label="Charter" value="Charter"></el-option>
<el-option v-for="(item,index) in state.disasterReductionPartnersList" :key="index" :label="item.dictKey" :value="item.dictKey"></el-option>
<!-- <el-option label="Charter" value="Charter"></el-option>
<el-option label="USGS" value="USGS"></el-option>
<el-option label="INGV" value="INGV"></el-option>
<el-option label="UNITAR" value="UNITAR"></el-option>
<el-option label="Copernicus" value="Copernicus"></el-option> -->
</el-select>
</el-form-item>
<el-form-item prop="link" label="link">
@ -31,6 +33,8 @@
import { reactive, ref } from "vue";
import { getWebsitesById, updateWebsites } from '/@/api/websites/websites.js';
import { ElMessage } from "element-plus";
import { getDictionary } from '/@/api/system/dictbiz';
const emit = defineEmits(['callback']);
const adminAddFormRef = ref();
const state = reactive({
@ -59,6 +63,12 @@ const resetField = () => {
adminAddFormRef.value.resetFields();
}
const initDic = ()=>{
getDictionary({ code: 'DisasterReductionPartners' }).then((res) => {
state.disasterReductionPartnersList = res;
});
}
//
const openDialog = (row) => {
state.isShowDialog = true;
@ -67,7 +77,8 @@ const openDialog = (row) => {
state.ruleForm.title = da.title;
state.ruleForm.link = da.link;
state.ruleForm.websiteId = da.websiteId;
})
});
initDic();
};
//
const closeDialog = () => {

View File

@ -101,7 +101,6 @@ const onSubmit = () => {
const initDic = ()=>{
getDictionary({ code: 'DisasterReductionPartners' }).then((res) => {
state.disasterReductionPartnersList = res;
console.log(state.disasterReductionPartnersList)
});
}

View File

@ -213,21 +213,19 @@ const state = reactive({
});
const openDialog = async (row, bool) => {
// if (row || state.multipleSelection) {
// if (state.disasterId == null) {
// ElMessage.warning('Please select the disaster first');
// return false;
// }
// }
state.selectListId = row.id;
state.dialogVisible = true;
};
const reviews = async (status) => {
if (!state.selectListId && state.multipleSelection.length < 1) {
ElMessage.warning('Please select the data');
return;
}
let ids = state.multipleSelection.map((item) => item.id);
//ids 使
ids = ids.join(',');
if (state.multipleSelection) {
if (state.selectListId) {
ids = state.selectListId;
}
let res = await review(ids, status, state.searchName == '1' ? true : false);
@ -244,6 +242,7 @@ const handleSelectionChange = (val) => {
//
const tableClick = (i) => {
console.log(1111111111111111111);
state.disasterId = i.disasterId;
getTableData();
};

View File

@ -20,7 +20,7 @@
<script setup>
import { reactive, ref } from "vue";
import { ElMessage } from "element-plus";
import { approval } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
import { approvalMultiple } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
const emit = defineEmits(['callback']);
const adminAddFormRef = ref();
@ -44,9 +44,10 @@ const resetField = () => {
}
//
const openDialog = (row) => {
const openDialog = (id) => {
state.isShowDialog = true;
state.ruleForm.id = row.id;
console.log(id,"row.id");
state.ruleForm.idsList = id;
};
//
const closeDialog = () => {
@ -57,9 +58,9 @@ const closeDialog = () => {
const onCancel = () => {
closeDialog();
};
//
//
const onSubmit = () => {
approval(state.ruleForm).then(da=>{
approvalMultiple(state.ruleForm).then(da=>{
ElMessage.success('success!');
closeDialog();
emit("callback");

View File

@ -54,12 +54,15 @@
</el-icon>Upload</el-button>
</template>
</el-upload>
</el-col>
<el-col :span="3">
<el-button class="ml10" type="success" style="margin-top:15px" @click="OpenuploadDataRef()">
Upload Img</el-button>
</el-col>
<el-col :span="3">
<el-button class="ml10" type="success" style="margin-top:15px" @click="approvalDataOpenList()">
Batch operation</el-button>
</el-col>
<el-col :span="3" v-auth-role="'admin'" style="margin-left:25px">
<el-button size="default" type="danger" v-auth-role="'admin'" class="upload-demo" style="margin-top: 15px; height: 40px;" @click="removeThis">
<el-icon>
@ -73,7 +76,7 @@
</div>
<!-- id卫星类型生产日期产品谱段产品分辨率云覆盖量景中心经纬度元数据下载链接缩略图 支撑单位 -->
<el-table :data="state.requestData" style="width: 1000Px;" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" v-auth-role="'admin'" />
<el-table-column type="selection" width="55"/>
<el-table-column type="index" label="Index" align="center" width="80"></el-table-column>
<el-table-column prop="thumbnailLink" label="thumbnail" width="180" show-overflow-tooltip>
<template #default="scope">
@ -103,7 +106,7 @@
</el-table-column>
<el-table-column prop="Operate" label="Operate" align="center" width="200" show-overflow-tooltip>
<template #default="scope">
<el-button v-if="scope.row.status === 1" size="small" text type="primary"
<el-button v-if="scope.row.status === 1 || scope.row.status === 0" size="small" text type="primary"
@click="approvalDataOpen(scope.row)">start</el-button>
<el-button v-if="scope.row.status === 2 || scope.row.status === 3" size="small" text type="primary"
@click="addAddressOpen(scope.row)">add_address</el-button>
@ -164,6 +167,7 @@ const addAddressRef = ref();
const upFileRef = ref();
const uploadDataRef = ref();
const state = reactive({
multipleSelection:[],
disasterData: {
data: [],
total: 0,
@ -280,7 +284,14 @@ const tableClick = (i) => {
//
const approvalDataOpen = (row) => {
approvalDataRef.value.openDialog(row);
approvalDataRef.value.openDialog(row.id);
};
const approvalDataOpenList = (row) => {
if (state.multipleSelection) {
let id = state.multipleSelection.map((item) => item.id);
approvalDataRef.value.openDialog(id.join());
}
};
//

View File

@ -193,7 +193,7 @@ import { useUserInfo } from '/@/stores/userInfo';
import { ElMessage, ElMessageBox } from "element-plus";
import { Search } from '@element-plus/icons-vue'
import { useVariableStore } from '/@/stores/index.ts';
import { getList as BizDict } from "/@/api/system/dictbiz.js";
import { getDictionary as BizDict } from "/@/api/system/dictbiz.js";
const variableStore = useVariableStore();
const userInfo = useUserInfo();
const emit = defineEmits(['response']);

View File

@ -294,6 +294,8 @@ const initLineChart = (xData,data1, data2) => {
state.global.homeChartOne.setOption(option);
state.myCharts.push(state.global.homeChartOne);
};
// 访
const initLineVandDChart = (xData,data1, data2) => {
if (!state.global.dispose.some((b) => b === state.global.homeVandD)) state.global.homeVandD.dispose();

View File

@ -313,6 +313,75 @@
:total="state.tableData.total">
</el-pagination>
</el-tab-pane>
<el-tab-pane label="EndExamine"
name="firstEndExamine">
<el-table :data="state.tableData.data"
v-loading="state.tableData.loading"
style="width: 100%">
<el-table-column prop="username"
label="User Name"
show-overflow-tooltip
sortable></el-table-column>
<el-table-column prop="organization"
label="Organization"
show-overflow-tooltip
sortable></el-table-column>
<el-table-column prop="disasterType"
label="Disaster Type"
show-overflow-tooltip
sortable>
<!-- 在disasterType中获取dictKey 对应的dictValue -->
<template #default="scope">
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="disasterKeyword"
label="Disaster Keyword"
show-overflow-tooltip
sortable></el-table-column>
<el-table-column prop="disasterTime"
label="Disaster Time"
show-overflow-tooltip
sortable>
<template #default="scope">
<!-- 格式化去除时分秒 -->
{{ dateFormat(scope.row.disasterTime) }}
</template>
</el-table-column>
<el-table-column prop="respondStatus"
label="Response Status"
show-overflow-tooltip
sortable>
<template #default="scope">
<el-tag type="info"
v-if="scope.row.respondStatus === 2">Approved</el-tag>
</template>
</el-table-column>
<el-table-column prop="Operate"
label="Operate"
show-overflow-tooltip
sortable>
<template #default="scope">
<el-button size="small"
text
type="primary"
@click="ApproveUserEnd(scope.row)">Approve</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="onHandleSizeChange"
@current-change="onHandleCurrentChange"
class="mt15"
:pager-count="5"
:page-sizes="[10, 20, 30]"
v-model:current-page="state.tableData.param.current"
background
v-model:page-size="state.tableData.param.size"
layout="total, sizes, prev, pager, next, jumper"
:total="state.tableData.total">
</el-pagination>
</el-tab-pane>
</el-tabs>
</div>
<el-dialog v-model="state.dialogVisible"
@ -418,7 +487,7 @@
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">Cancel</el-button>
<el-button @click="state.dialogVisible = false">Cancel</el-button>
<el-button type="danger"
@click="reviewRefuse">
Reject
@ -456,6 +525,23 @@
</span>
</template>
</el-dialog>
<el-dialog v-model="state.emailDialogVisibleNew" title="Examine" width="40%">
<div style="font-size:20px">
Has the response ended and been approved !
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="state.emailDialogVisibleNew = false;state.edit.refuseReason=''">Cancel</el-button>
<el-button type="primary" @click="ApproveUserEndData(2);">
Pass
</el-button>
<el-button type="primary" @click="ApproveUserEndData(3);">
Refuse
</el-button>
</span>
</template>
</el-dialog>
</el-config-provider>
</div>
</template>
@ -464,8 +550,8 @@
import en from 'element-plus/dist/locale/en.mjs'
import { reactive, onMounted, ref, nextTick, watchEffect, defineAsyncComponent, h ,toRaw} from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import { getList, review, responseEndedDisasterInfo, deleteByIds } from '/@/api/disasterInfo/index';
import { getDictionary, getList as getListNew } from '/@/api/system/dictbiz';
import { getList, review, responseEndedDisasterInfo, deleteByIds,examineDisasterInfoEnd } from '/@/api/disasterInfo/index';
import { getDictionary} from '/@/api/system/dictbiz';
import { useVariableStore } from '/@/stores/index.ts'
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'
@ -541,10 +627,12 @@ const dateFormat = (date) => {
//
const roleDialogRef = ref();
const state = reactive({
disasterData:{},
//
dictList: [],
dialogVisible: false,
emailDialogVisible: false,
emailDialogVisibleNew: false,
tableData: {
data: [],
total: 0,
@ -592,12 +680,19 @@ const getTableData = () => {
//activeNametab
if (state.selectName === 'first') {
state.tableData.param.respondStatus = 0;
state.tableData.param.isEndApply = 0;
} else if (state.selectName === 'second') {
state.tableData.param.respondStatus = 2;
state.tableData.param.isEndApply = 0;
} else if (state.selectName === 'firstNew') {
state.tableData.param.respondStatus = 1;
} else {
state.tableData.param.isEndApply = 0;
} else if (state.selectName === 'firstNewOne') {
state.tableData.param.respondStatus = 3;
state.tableData.param.isEndApply = 0;
} else{
state.tableData.param.respondStatus = 2;
state.tableData.param.isEndApply = 1;
}
getList(state.tableData.param).then((res) => {
state.tableData.data = res.records;
@ -653,6 +748,23 @@ const cancelApporval = () => {
}
}
const ApproveUserEnd = (row) =>{
state.disasterData = row;
state.emailDialogVisibleNew = true;
}
const ApproveUserEndData = (row) =>{
let data = {};
data.id =state.disasterData.disasterId;
data.email = state.disasterData.email
// data.email = "13935964706@163.com"
data.isEndApply = row;
examineDisasterInfoEnd(data).then(da=>{
ElMessage.success('success');
})
state.emailDialogVisibleNew = false;
}
//
const manualLat = () => {
const latReg = /^(\-|\+)?([0-8]?\d{1}\.\d{0,6}|90\.0{0,6}|[0-8]?\d{1}|90)$/;
@ -853,9 +965,6 @@ onMounted(() => {
getDictionary({ code: 'disaster' }).then((res) => {
state.disasterTypeList = res;
});
getListNew({ code: 'disaster' }).then(res => {
state.dictList = res[0].children
})
});
const getValue = (key) => {
//state.disasterTypeLis value

View File

@ -55,7 +55,7 @@
<script setup name="systemDic">
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import { getList,remove } from '/@/api/system/dictbiz';
import { getDictionary,remove } from '/@/api/system/dictbiz';
//
const DicDialog = defineAsyncComponent(() => import('/@/views/system/dic/dialog.vue'));
@ -79,7 +79,7 @@ const state = reactive({
//
const getTableData = () => {
state.tableData.loading = true;
getList({dictValue_equal:state.query.dictValue}).then((res) => {
getDictionary({dictValue_equal:state.query.dictValue}).then((res) => {
state.tableData.data = res;
state.tableData.loading = false;
});