Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin into zqq
This commit is contained in:
commit
de4185d394
|
@ -3007,6 +3007,14 @@
|
|||
"resolved": "https://registry.npmmirror.com/leaflet/-/leaflet-1.9.3.tgz",
|
||||
"integrity": "sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ=="
|
||||
},
|
||||
"leaflet-control-geocoder": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/leaflet-control-geocoder/-/leaflet-control-geocoder-2.4.0.tgz",
|
||||
"integrity": "sha512-b2QlxuFd40uIDbnoUI3U9fzfnB4yKUYlmsXjquJ2d2YjoJqnyVYcIJeErAVv3kPvX3nI0gzvBq1XHMgSVFrGkQ==",
|
||||
"requires": {
|
||||
"open-location-code": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"leaflet-draw": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/leaflet-draw/-/leaflet-draw-1.0.4.tgz",
|
||||
|
@ -3020,6 +3028,14 @@
|
|||
"leaflet": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"leaflet-search": {
|
||||
"version": "2.9.6",
|
||||
"resolved": "https://registry.npmjs.org/leaflet-search/-/leaflet-search-2.9.6.tgz",
|
||||
"integrity": "sha512-ZzZEnjcYmVEXfYq5r2adt47voAtycJlZ3YDjWJXjJuUCWW99sj6IqB5qjNrBC5JALBmSnkOlfSHCaj3jbO1CGg==",
|
||||
"requires": {
|
||||
"leaflet": "*"
|
||||
}
|
||||
},
|
||||
"levn": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
|
||||
|
@ -3199,6 +3215,12 @@
|
|||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"open-location-code": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/open-location-code/-/open-location-code-1.0.3.tgz",
|
||||
"integrity": "sha512-DBm14BSn40Ee241n80zIFXIT6+y8Tb0I+jTdosLJ8Sidvr2qONvymwqymVbHV2nS+1gkDZ5eTNpnOIVV0Kn2fw==",
|
||||
"optional": true
|
||||
},
|
||||
"optimist": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
||||
|
|
|
@ -24,12 +24,12 @@ export const news = (disaster_id, keywords, page, isBaidu, id) => {
|
|||
},
|
||||
});
|
||||
};
|
||||
export const twitter = (disaster_id, keys,stime,etime) => {
|
||||
export const twitter = (disaster_id, keywords,stime,etime,id) => {
|
||||
return request({
|
||||
url: '/api/' + twitterModule + 'socialmedia/twitter',
|
||||
url: '/api/' + twitterModule + '/socialmedia/twitter',
|
||||
method: 'post',
|
||||
data: {
|
||||
disaster_id, keys,stime,etime
|
||||
disaster_id, keywords,stime,etime,id
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
|
@ -88,3 +88,10 @@ export function responseEndedDisasterInfo(id) {
|
|||
}
|
||||
});
|
||||
}
|
||||
export function deleteByIds(ids) {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/disasterInfo/deleteByIds',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
});
|
||||
}
|
||||
|
|
|
@ -32,3 +32,10 @@ export const importTemplate = (data) => {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
export const remove = (ids,type) => {
|
||||
return request({
|
||||
url: '/api/'+moduleName+'/ui/'+(type?'news':'socialMedia')+'/deleteByIds',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
|
|
@ -45,4 +45,20 @@ export const importTemplate = (data) => {
|
|||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
};
|
||||
export const removeList = (ids) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/remoteSensing/remove',
|
||||
method: 'delte',
|
||||
data: ids,
|
||||
});
|
||||
}
|
||||
|
||||
export const importTemplateImgList = (data) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/remoteSensing/importTemplateImgList',
|
||||
headers:{'Content-Type': 'multipart/form-data'},
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
|
|
@ -50,4 +50,11 @@ export const auditData = (data) => {
|
|||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
};
|
||||
export const remove = (data) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/dataUpload/remove',
|
||||
method: 'delete',
|
||||
data: data
|
||||
});
|
||||
}
|
|
@ -105,17 +105,14 @@ const mapOperations = {
|
|||
variableStore.layerGroupPoly = res;
|
||||
let polygons = [];
|
||||
for (let i = 0; i < attr[0].feature.geometry.coordinates.length; i++) {
|
||||
console.log(attr[0].feature.geometry.coordinates[i])
|
||||
polygons.push(turf.polygon([attr[0].feature.geometry.coordinates[i]]));
|
||||
}
|
||||
let centers = polygons.map(polygon => turf.centroid(polygon));
|
||||
// console.log(centers)
|
||||
let features = []
|
||||
for (let i = 0; i < centers.length; i++) {
|
||||
features.push(turf.point(centers[i].geometry.coordinates))
|
||||
}
|
||||
let final_center = turf.center(turf.featureCollection(features))
|
||||
// console.log(final_center)
|
||||
homeMap.flyTo([final_center.geometry.coordinates[1], final_center.geometry.coordinates[0]], 3)
|
||||
return { 'layer': layer, 'location': null }
|
||||
}
|
||||
|
@ -152,7 +149,6 @@ const mapOperations = {
|
|||
featureLayerG_point
|
||||
)
|
||||
let features = featureLayerG_point.toGeoJSON().features
|
||||
// console.log(features)
|
||||
variableStore.layerGroupPoint = features.map(function (feature) {
|
||||
return WKT.convert(feature.geometry)
|
||||
})
|
||||
|
@ -276,7 +272,6 @@ const mapOperations = {
|
|||
*/
|
||||
goPosition: (param) => {
|
||||
homeMap.setView(L.latLng(Number(param.y), Number(param.x)), param.zoom)
|
||||
// console.log(homeMap);
|
||||
},
|
||||
/** 监听事件
|
||||
* Object param 参数集合
|
||||
|
@ -286,7 +281,6 @@ const mapOperations = {
|
|||
* }
|
||||
*/
|
||||
on: (event, func) => {
|
||||
// console.log("1-1")
|
||||
homeMap.on(event, func)
|
||||
},
|
||||
/** 事件注销
|
||||
|
@ -297,7 +291,6 @@ const mapOperations = {
|
|||
* }
|
||||
*/
|
||||
off: (event, func) => {
|
||||
// console.log('2-1')
|
||||
homeMap.off(event, func)
|
||||
},
|
||||
/** 清除所有图层
|
||||
|
@ -335,7 +328,6 @@ const mapOperations = {
|
|||
* }
|
||||
*/
|
||||
drawPolygon: () => {
|
||||
// console.log('2-2')
|
||||
variableStore.layerGroupPoint = null
|
||||
featureLayerG_point.clearLayers()
|
||||
homeMap.pm.enableDraw('Polygon', { snappable: false });
|
||||
|
@ -359,7 +351,6 @@ const mapOperations = {
|
|||
return polygon
|
||||
},
|
||||
clearPolygon: () => {
|
||||
// console.log('1-2')
|
||||
|
||||
featureLayerG_area.clearLayers()
|
||||
variableStore.layerGroupPoly = null
|
||||
|
@ -378,7 +369,6 @@ const mapOperations = {
|
|||
// })
|
||||
// featureLayerG_area.addLayer(elll.layer)
|
||||
// let features = featureLayerG_area.toGeoJSON().features
|
||||
// // console.log(features)
|
||||
// variableStore.layerGroupPoly = features.map(function (feature) {
|
||||
// return WKT.convert(feature.geometry)
|
||||
// })
|
||||
|
@ -414,7 +404,6 @@ const mapOperations = {
|
|||
});
|
||||
}
|
||||
else {
|
||||
console.log('error')
|
||||
}
|
||||
},
|
||||
drawRectangle: () => {
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
</div>
|
||||
<el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
|
||||
highlight-current-row @row-click="tableClick">
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="128" sortable/>
|
||||
<el-table-column prop="dictValue" label="Disaster type" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column prop="vordmId" label="VoRDM ID" width="124" sortable/>
|
||||
<el-table-column prop="dictValue" label="Disaster type" show-overflow-tooltip sortable width="148"></el-table-column>
|
||||
<el-table-column prop="disasterCountry" label="Disaster country" show-overflow-tooltip sortable width="167"></el-table-column>
|
||||
<el-table-column prop="disasterTime" label="Disaster time" show-overflow-tooltip sortable width="145"></el-table-column>
|
||||
<slot></slot>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange" class="mt15"
|
||||
|
@ -86,7 +86,6 @@ const getDictBizData = () => {
|
|||
const getDisasterTable = () => {
|
||||
convert();
|
||||
let userData = Session.get('userInfo');
|
||||
console.log(userData,"userDatauserData");
|
||||
state.search.chiefIdEquals = userData.id;
|
||||
state.search.roleName = userData.roles[0];
|
||||
getPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, state.search).then(res => {
|
||||
|
|
|
@ -15,6 +15,12 @@ export function authDirective(app) {
|
|||
if (!stores.userInfos.authBtnList.some((v) => v === binding.value)) el.parentNode.removeChild(el);
|
||||
},
|
||||
});
|
||||
app.directive('auth-role', {
|
||||
mounted(el, binding) {
|
||||
const stores = useUserInfo();
|
||||
if (!stores.userInfos.roles.some((v) => v === binding.value)) el.parentNode.removeChild(el);
|
||||
},
|
||||
});
|
||||
// 多个权限验证,满足一个则显示(v-auths="[xxx,xxx]")
|
||||
app.directive('auths', {
|
||||
mounted(el, binding) {
|
||||
|
|
|
@ -235,7 +235,7 @@ onMounted(() => {
|
|||
if ((now - dateTime) / 1000 > website.value.tokenTime) {
|
||||
// 刷新token
|
||||
refreshToken(rt, website.value.tenantId).then(res => {
|
||||
Session.set('token', res.access_token);
|
||||
Session.setEx('token', res.access_token);
|
||||
Session.set('token-time', new Date().getTime());
|
||||
Session.set('refresh-token', res.refresh_token);
|
||||
})
|
||||
|
|
|
@ -36,7 +36,7 @@ export async function initBackEndControlRoutes() {
|
|||
// 界面 loading 动画开始执行
|
||||
if (window.nextLoading === undefined) NextLoading.start();
|
||||
// 无 token 停止执行下一步
|
||||
if (!Session.get('token')) return false;
|
||||
if (!Session.getEx('token')) return false;
|
||||
// 触发初始化用户信息 pinia
|
||||
// https://gitee.com/lyt-top/vue-next-admin/issues/I5F1HP
|
||||
await useUserInfo().setUserInfos();
|
||||
|
|
|
@ -21,7 +21,7 @@ export async function initFrontEndControlRoutes() {
|
|||
// 界面 loading 动画开始执行
|
||||
if (window.nextLoading === undefined) NextLoading.start();
|
||||
// 无 token 停止执行下一步
|
||||
if (!Session.get('token')) return false;
|
||||
if (!Session.getEx('token')) return false;
|
||||
// 触发初始化用户信息 pinia
|
||||
// https://gitee.com/lyt-top/vue-next-admin/issues/I5F1HP
|
||||
await useUserInfo(pinia).setUserInfos();
|
||||
|
|
|
@ -94,7 +94,7 @@ export function formatTwoStageRoutes(arr) {
|
|||
router.beforeEach(async (to, from, next) => {
|
||||
NProgress.configure({ showSpinner: false });
|
||||
if (to.meta.title) NProgress.start();
|
||||
const token = Session.get('token');
|
||||
const token = Session.getEx('token');
|
||||
if (to.path === '/login' && !token) {
|
||||
next();
|
||||
NProgress.done();
|
||||
|
|
|
@ -28,7 +28,6 @@ export const useUserInfo = defineStore('userInfo', {
|
|||
async Buttons() {
|
||||
return new Promise((resolve) => {
|
||||
getButtons().then(data => {
|
||||
console.log(data)
|
||||
resolve(this.formatBtns(data));
|
||||
})
|
||||
})
|
||||
|
|
|
@ -22,8 +22,8 @@ service.interceptors.request.use(
|
|||
(config) => {
|
||||
config.headers['Authorization'] = 'Basic Vm9SRE1BZG1pbjp2b3JkbV9hZG1pbl9zZWNyZXQ=';
|
||||
// 在发送请求之前做些什么 token
|
||||
if (Session.get('token')) {
|
||||
config.headers['Blade-Auth'] = `Bearer ${Session.get('token')}`;
|
||||
if (Session.getEx('token')) {
|
||||
config.headers['Blade-Auth'] = `Bearer ${Session.getEx('token')}`;
|
||||
}
|
||||
return config;
|
||||
},
|
||||
|
|
|
@ -42,18 +42,38 @@ export const Local = {
|
|||
export const Session = {
|
||||
// 设置临时缓存
|
||||
set(key, val) {
|
||||
if (key === 'token') return Cookies.set(key, val);
|
||||
// if (key === 'token') return Cookies.set(key, val);
|
||||
window.sessionStorage.setItem(Local.setKey(key), JSON.stringify(val));
|
||||
},
|
||||
// 获取临时缓存
|
||||
get(key) {
|
||||
if (key === 'token') return Cookies.get(key);
|
||||
// if (key === 'token') return Cookies.get(key);
|
||||
let json = window.sessionStorage.getItem(Local.setKey(key));
|
||||
return JSON.parse(json);
|
||||
},
|
||||
// 设置临时缓存
|
||||
setEx(key,val) {
|
||||
let curTime = new Date().getTime();
|
||||
window.sessionStorage.setItem(Local.setKey(key), JSON.stringify({data:val,time:curTime}));
|
||||
},
|
||||
//如果缓存过期则返回null
|
||||
getEx(key,time = 6*60*1000) {
|
||||
let data = window.sessionStorage.getItem(Local.setKey(key));
|
||||
let dataObj = JSON.parse(data);
|
||||
//如果dataObj为null,表示该数据从未设置过期时间
|
||||
if (dataObj == null) {
|
||||
return null;
|
||||
}
|
||||
if (new Date().getTime() - dataObj.time > time) {
|
||||
window.sessionStorage.removeItem(Local.setKey(key));
|
||||
return null;
|
||||
} else {
|
||||
return dataObj.data;
|
||||
}
|
||||
},
|
||||
// 移除临时缓存
|
||||
remove(key) {
|
||||
if (key === 'token') return Cookies.remove(key);
|
||||
// if (key === 'token') return Cookies.remove(key);
|
||||
window.sessionStorage.removeItem(Local.setKey(key));
|
||||
},
|
||||
// 移除全部临时缓存
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
<script setup >
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { reactive, defineExpose } from 'vue';
|
||||
import { news, submit, getList } from '/@/api/crawl/index';
|
||||
import { news, submit, getList ,twitter} from '/@/api/crawl/index';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
const userInfo = useUserInfo();
|
||||
const state = reactive({
|
||||
|
@ -178,7 +178,7 @@ const state = reactive({
|
|||
disaster_id: undefined
|
||||
},
|
||||
twitter:{
|
||||
keywords: "",
|
||||
date:undefined,
|
||||
page: 10,
|
||||
disaster_id: undefined
|
||||
},
|
||||
|
@ -236,10 +236,11 @@ const openDialog = (row) => {
|
|||
state.isShowDialog = true;
|
||||
}
|
||||
const getDate = () => {
|
||||
getList(1, 10, { disasterId: state.data.disasterId }).then(res => {
|
||||
getList(1, 9999, { disasterId: state.data.disasterId }).then(res => {
|
||||
let data = res.records;
|
||||
for (let index = 0; index < data.length; index++) {
|
||||
const element = data[index];
|
||||
|
||||
if (element.type == 2) {
|
||||
state.baidu = element;
|
||||
}
|
||||
|
@ -286,7 +287,6 @@ const start = (text) => {
|
|||
state.twitterOption.buttonIs = true;
|
||||
}
|
||||
clearInterval(countdown);
|
||||
console.log('倒计时结束');
|
||||
}
|
||||
}, 1000);
|
||||
let keywords = (text == 'baidu' ? state.baidu.keywords :text == 'bing' ?state.bing.keywords:state.twitter.keywords);
|
||||
|
@ -308,15 +308,14 @@ const start = (text) => {
|
|||
ElMessage.error("error")
|
||||
} else {
|
||||
if(text =='baidu' || text == 'bing'){
|
||||
news(ret.disasterId, keywords, page, (text == "baidu"), ret.id).then(res => {
|
||||
news(ret[0].disasterId, keywords, page, (text == "baidu"), ret[0].id).then(res => {
|
||||
ElMessage.success("Data is being acquired!")
|
||||
getData();
|
||||
getDate();
|
||||
})
|
||||
}else if(text == 'twitter'){
|
||||
console.log(state.twitter.date)
|
||||
twitter(disasterId,keywords,state.twitter.date[0],state.twitter.date[1]).then(res=>{
|
||||
twitter(ret[0].disasterId,keywords,state.twitter.date[0],state.twitter.date[1],ret[0].id).then(res=>{
|
||||
ElMessage.success("Data is being acquired!")
|
||||
getData();
|
||||
getDate();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ const state = reactive({
|
|||
//通过onchanne触发方法获得文件列表
|
||||
const handleChange = (file, fileList) => {
|
||||
state.fileList = fileList;
|
||||
console.log(state.fileList)
|
||||
};
|
||||
|
||||
//上传处理
|
||||
|
|
|
@ -57,6 +57,12 @@
|
|||
</el-icon>
|
||||
Upload
|
||||
</el-button>
|
||||
<el-button size="default" type="danger" v-auth-role="'admin'" class="ml10" @click="removeThis">
|
||||
<el-icon>
|
||||
<ele-Delete />
|
||||
</el-icon>
|
||||
Delete
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-table :data="state.tableData.data" v-loading="state.tableData.loading"
|
||||
|
@ -120,15 +126,14 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="dataMultimediaData">
|
||||
<script setup name="dataMultimediaData">
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
import { getList } from '/@/api/disasterInfo/index';
|
||||
import { getList as getNewsList, review } from '/@/api/news/index';
|
||||
import { getList as getNewsList, review , remove as removeList} from '/@/api/news/index';
|
||||
import { getDictionary } from '/@/api/system/dictbiz';
|
||||
//复制内容
|
||||
import { reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { ElMessage ,ElMessageBox} from 'element-plus';
|
||||
|
||||
import boot from "./component/boot.vue";
|
||||
import uploadData from "./component/uploadData.vue";
|
||||
|
@ -136,7 +141,27 @@ import disasterTable from "/@/components/table/DisasterTable.vue";
|
|||
// 引入组件
|
||||
const bootRef = ref();
|
||||
const uploadDataRef = ref();
|
||||
|
||||
const removeThis = (row) =>{
|
||||
let ids = state.multipleSelection.map((item) => item.id);
|
||||
//如何ids为空使用英语提示并返回
|
||||
if(ids.length == 0){
|
||||
ElMessage.info("Please select the data to be deleted");
|
||||
return;
|
||||
}
|
||||
//使用英语提示是否删除
|
||||
ElMessageBox.confirm('Are you sure you want to delete it?', 'Prompt', {
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'No',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
//删除数据
|
||||
removeList(ids,(state.searchName=='1'?"News":null)).then((res) => {
|
||||
ElMessage.success("Delete successfully");
|
||||
getTableData();
|
||||
});
|
||||
}).catch(() => { ElMessage.error("Delete failed");});
|
||||
|
||||
}
|
||||
|
||||
const state = reactive({
|
||||
dialogVisible: false,
|
||||
|
@ -213,11 +238,7 @@ const getDisasterData = () => {
|
|||
}
|
||||
getList(param).then(res => {
|
||||
state.disasterData.data = res.records;
|
||||
console.log(state.disasterData.data[0], "state.disasterData.data[0]");
|
||||
|
||||
state.disasterId = state.disasterData.data[0].disasterId;
|
||||
console.log(state.disasterId, "state.disasterId ");
|
||||
|
||||
getTableData()
|
||||
state.disasterData.data.forEach(item => {
|
||||
let date = item.disasterTime.slice(0, 10);
|
||||
|
@ -254,7 +275,7 @@ const getTableData = () => {
|
|||
};
|
||||
|
||||
// 打开上传弹窗
|
||||
const startBot = (row: any) => {
|
||||
const startBot = (row) => {
|
||||
bootRef.value.openDialog(row);
|
||||
|
||||
};
|
||||
|
|
|
@ -121,7 +121,6 @@ const uploadPic = (data) => {
|
|||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item => item.uid === data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
|
|
|
@ -181,8 +181,6 @@ const getDisasterData = () => {
|
|||
const getTableData = () => {
|
||||
state.tableData.loading = true;
|
||||
getOtherDataPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "disasterId": state.disasterId, "type": state.searchName, "isDeleted": 0 }).then(res => {
|
||||
console.log(res);
|
||||
|
||||
state.tableData.data = res.records;
|
||||
state.tableData.total = res.total;
|
||||
})
|
||||
|
@ -222,7 +220,7 @@ const batchDel = () => {
|
|||
ElMessage.success('delete successfully');
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
}
|
||||
// 删除其他数据
|
||||
const del = (row) => {
|
||||
|
@ -244,7 +242,6 @@ const del = (row) => {
|
|||
|
||||
// 删除其他数据
|
||||
const pub = (row) => {
|
||||
console.log(row, "发布信息");
|
||||
let da = {
|
||||
vordm_id:state.vordmId,
|
||||
link:row.link,
|
||||
|
@ -252,7 +249,6 @@ const pub = (row) => {
|
|||
name:row.title
|
||||
}
|
||||
pushing(da).then(data => {
|
||||
console.log(data,"datadatadatadata");
|
||||
if(data.code == 1500){
|
||||
ElMessage.error(data.msg);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,6 @@ const uploadPic = (data) => {
|
|||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item => item.uid === data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
|
@ -151,13 +150,10 @@ const onCancel = () => {
|
|||
const onSubmit = () => {
|
||||
adminAddFormRef.value.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
console.log(state.fileList);
|
||||
state.isLoading = true;
|
||||
|
||||
state.fileList.forEach(item => {
|
||||
console.log(item.raw,"item.raw");
|
||||
if (item.raw) {
|
||||
console.log(1111111111111);
|
||||
state.dataForm.append('file', item.raw);
|
||||
}
|
||||
})
|
||||
|
|
|
@ -94,7 +94,6 @@ const uploadPic = (data) => {
|
|||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item => item.uid === data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
|
|
|
@ -48,16 +48,45 @@
|
|||
<el-upload ref="upFileRef" class="upload-demo" :accept="'.xls,.xlsx'" :auto-upload="false"
|
||||
:on-change="addRemoteSensingData" :show-file-list="false" style="margin-top:15px">
|
||||
<template #trigger>
|
||||
<el-button type="success">Upload</el-button>
|
||||
<el-button type="success">
|
||||
<el-icon>
|
||||
<ele-Upload />
|
||||
</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" 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>
|
||||
<ele-Delete />
|
||||
</el-icon>
|
||||
Delete
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
<!-- id,卫星类型,生产日期,产品谱段,产品分辨率,云覆盖量,景中心经纬度,元数据下载链接,缩略图 支撑单位 -->
|
||||
<el-table :data="state.requestData" style="width: 1000Px;">
|
||||
<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="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">
|
||||
<el-popover trigger="hover" placement="right" popper-class="max-h-300px overflow-auto" :width="330">
|
||||
<!-- table中原本显示的图片 -->
|
||||
<template #reference>
|
||||
<img :src="scope.row.thumbnailLink" :alt="scope.row.thumbnailLink" style="max-height: 130px;max-width: 130px">
|
||||
</template>
|
||||
<!-- 鼠标移入时弹出的图片 -->
|
||||
<img :src="scope.row.thumbnailLink" alt="" style="height: 150px;width: 300px">
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="satelliteCode" label="Satellite code" width="170" align="center" show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="productTime" label="Product time" width="170" align="center" show-overflow-tooltip
|
||||
|
@ -91,23 +120,49 @@
|
|||
</el-row>
|
||||
<approvalData ref="approvalDataRef" @callback="getData()" />
|
||||
<addAddress ref="addAddressRef" @callback="getData()" />
|
||||
<uploadData ref="uploadDataRef" @callback="getData()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData, importTemplate } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
import { getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData, importTemplate ,removeList } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
import { getDisasterPage } from '/@/api/data/otherData.js'
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
import approvalData from "./approvalData.vue";
|
||||
import addAddress from "./addAddress.vue";
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
|
||||
import uploadData from "./uploadData.vue";
|
||||
//选择事件
|
||||
const handleSelectionChange = (val) => {
|
||||
state.multipleSelection = val;
|
||||
};
|
||||
const removeThis = ()=>{
|
||||
let ids = state.multipleSelection.map((item) => item.id);
|
||||
//如何ids为空使用英语提示并返回
|
||||
if(ids.length == 0){
|
||||
ElMessage.info("Please select the data to be deleted");
|
||||
return;
|
||||
}
|
||||
//使用英语提示是否删除
|
||||
ElMessageBox.confirm('Are you sure you want to delete it?', 'Prompt', {
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'No',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
//删除数据
|
||||
removeList(ids,(state.searchName=='1'?"News":null)).then((res) => {
|
||||
ElMessage.success("Delete successfully");
|
||||
getTableData();
|
||||
});
|
||||
}).catch(() => { ElMessage.error("Delete failed");});
|
||||
}
|
||||
|
||||
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
|
||||
const approvalDataRef = ref();
|
||||
const addAddressRef = ref();
|
||||
const upFileRef = ref();
|
||||
const uploadDataRef = ref();
|
||||
const state = reactive({
|
||||
disasterData: {
|
||||
data: [],
|
||||
|
@ -180,18 +235,22 @@ const state = reactive({
|
|||
label: '>50m',
|
||||
value: '>50m'
|
||||
}],
|
||||
////'1-Optical satellite, 2-Night light satellite, 3-Video satellite, 4-Hyperspectral satellite, 5-Radar satellite'
|
||||
options_satelliteType: [{
|
||||
label: 'Optical satellite',
|
||||
value: 'Optical satellite'
|
||||
value: 1
|
||||
}, {
|
||||
label: 'Hyperspectral satellite',
|
||||
value: 'Hyperspectral satellite'
|
||||
value: 4
|
||||
}, {
|
||||
label: 'Radar satellite',
|
||||
value: 'Radar satellite'
|
||||
value: 5
|
||||
}, {
|
||||
label: 'Night light satellite',
|
||||
value: 'Night light satellite'
|
||||
value: 2
|
||||
}, {
|
||||
label: 'Video satellite',
|
||||
value: 3
|
||||
}],
|
||||
value_satelliteType: '',
|
||||
value_resolution: [],
|
||||
|
@ -229,6 +288,15 @@ const addAddressOpen = (row) => {
|
|||
addAddressRef.value.openDialog(row);
|
||||
};
|
||||
|
||||
// 打开上传弹窗
|
||||
const OpenuploadDataRef = () => {
|
||||
if (state.disasterId == null) {
|
||||
ElMessage.warning('Please select the disaster first');
|
||||
return false;
|
||||
}
|
||||
uploadDataRef.value.openDialog(state.disasterId);
|
||||
};
|
||||
|
||||
// 获取遥感影像元数据
|
||||
const getData = () => {
|
||||
let data = {
|
||||
|
@ -242,8 +310,6 @@ const getData = () => {
|
|||
}
|
||||
|
||||
const addRemoteSensingData = (data, fileList) => {
|
||||
console.log(data, "data");
|
||||
console.log(fileList, "fileListfileList");
|
||||
if (state.disasterId == null) {
|
||||
ElMessage.warning('Please select the disaster first');
|
||||
return false;
|
||||
|
@ -261,19 +327,6 @@ const addRemoteSensingData = (data, fileList) => {
|
|||
|
||||
// 查询遥感元数据
|
||||
const searchRemoteSensingSourceData = () => {
|
||||
// 获取选择的卫星类型
|
||||
for (var i = 0; i < state.value_satelliteType.length; i++) {
|
||||
if (state.value_satelliteType[i] == state.options_satelliteType[0].value) {
|
||||
state.satelliteCodeList.push('Landset8_OLI_TIRS');
|
||||
}
|
||||
else if (state.value_satelliteType[i] == state.options_satelliteType[1].value) {
|
||||
let arrData = ['Sentinel -2_Sentinel - 2A', 'Sentinel -2_Sentinel - 2B', 'GF1', 'GF1B', 'GF1C', 'GF1D', 'GF2', 'GF4', 'GF6'];
|
||||
arrData.forEach(item => {
|
||||
state.satelliteCodeList.push(item);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 获取选择的分辨率
|
||||
var productResolutionMin = 0
|
||||
var productResolutionMax = null
|
||||
|
@ -323,10 +376,10 @@ const searchRemoteSensingSourceData = () => {
|
|||
}
|
||||
|
||||
let dataNew = {};
|
||||
if (state.satelliteCodeList.length != 0) {
|
||||
if (state.value_satelliteType.length != 0) {
|
||||
dataNew = {
|
||||
disasterId: state.disasterId,
|
||||
satelliteCodeList: state.satelliteCodeList.join(","),
|
||||
satelliteCodeList: state.value_satelliteType.join(","),
|
||||
productResolutionVos: state.listData,
|
||||
status: state.status
|
||||
}
|
||||
|
@ -341,15 +394,9 @@ const searchRemoteSensingSourceData = () => {
|
|||
getDataByCondition(state.tableData.param.pageNum, state.tableData.param.pageSize, dataNew)
|
||||
}
|
||||
|
||||
const reviseDownload = (row) => {
|
||||
console.log(row, "rowrowrow");
|
||||
}
|
||||
|
||||
|
||||
// 根据检索条件检索遥感元数据
|
||||
const getDataByCondition = (current, size, dataNew) => {
|
||||
console.log('传过来的数据:', state.tableData.param.pageNum);
|
||||
|
||||
getRemoteSensingSourceDataByCondition(current, size, JSON.stringify(dataNew)).then(
|
||||
(res) => {
|
||||
state.requestData = res.records;
|
||||
|
@ -482,7 +529,6 @@ const onHandleSizeChange = (val) => {
|
|||
const onHandleCurrentChange = (val) => {
|
||||
state.tableData.param.pageSize = state.tableData.param.pageSize;
|
||||
state.tableData.param.pageNum = val;
|
||||
console.log('当前页:', state.tableData.param.pageNum);
|
||||
let dataNew = {};
|
||||
if (state.satelliteCodeList.length != 0) {
|
||||
dataNew = {
|
||||
|
|
|
@ -35,7 +35,12 @@
|
|||
</el-card>
|
||||
|
||||
<el-card class="box-card" style="margin-top: 3%;">
|
||||
<span>Select a region</span>
|
||||
<span>Select a region <el-switch
|
||||
v-model="state.switch"
|
||||
size="large"
|
||||
active-text="Area"
|
||||
inactive-text="Polygon"
|
||||
/></span>
|
||||
<el-scrollbar wrap-class="list" view-class="view-box" :native="false">
|
||||
<div v-for="(coordinate, i) in state.coordinateList ">
|
||||
<el-row class="coordinateContainer">
|
||||
|
@ -125,6 +130,7 @@ const disabledDate = (time) => {
|
|||
// 初始化数据
|
||||
const map = ref()
|
||||
const state = reactive({
|
||||
switch:true,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
addCoord: false,
|
||||
|
@ -264,19 +270,32 @@ const changeLatLon = (e) => {
|
|||
// 添加坐标点
|
||||
const addCoordinate = () => {
|
||||
state.addCoord = !state.addCoord;
|
||||
if (state.addCoord && state.coordinateList.length <= 2) {
|
||||
map.value.mapOperations.drawRectangle()
|
||||
map.value.mapOperations.on("click", onMapClick)
|
||||
document.getElementsByClassName('coordinateBtn')[0].innerText = 'Stop';
|
||||
}
|
||||
else {
|
||||
map.value.mapOperations.off("click", onMapClick)
|
||||
document.getElementsByClassName('coordinateBtn')[0].innerText = 'Add coordinates';
|
||||
if(state.switch){
|
||||
if (state.addCoord && state.coordinateList.length <= 2) {
|
||||
map.value.mapOperations.drawRectangle()
|
||||
map.value.mapOperations.on("click", onMapClick)
|
||||
document.getElementsByClassName('coordinateBtn')[0].innerText = 'Stop';
|
||||
}
|
||||
else {
|
||||
map.value.mapOperations.off("click", onMapClick)
|
||||
document.getElementsByClassName('coordinateBtn')[0].innerText = 'Add coordinates';
|
||||
}
|
||||
}else{
|
||||
map.value.mapOperations.off("click", onMapClick)
|
||||
map.value.mapOperations.drawPolygon()
|
||||
map.value.mapOperations.drawCreated()
|
||||
}
|
||||
|
||||
}
|
||||
const mapClick = (res) => {
|
||||
map.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3), res.latlng.lng.toFixed(3))
|
||||
}
|
||||
// 清空坐标点
|
||||
const clearCoordinate = () => {
|
||||
if(!state.switch){
|
||||
map.value.mapOperations.clearPolygon()
|
||||
return;
|
||||
}
|
||||
state.coordinateList = [];
|
||||
state.startTime = '';
|
||||
state.endTime = '';
|
||||
|
@ -339,9 +358,16 @@ const startCrawl = () => {
|
|||
})
|
||||
//调用爬虫服务
|
||||
rs2(state.data.disasterId,arrParams,state.startTime,state.endTime).then(res => {
|
||||
//获取arrParams中的type 使用,分割
|
||||
var typeArr=[];
|
||||
arrParams.forEach(item=>{
|
||||
typeArr.push(item.type)
|
||||
})
|
||||
var typeStr=typeArr.join('、')
|
||||
|
||||
// getData();
|
||||
ElMessage({
|
||||
message: 'Success, Start crawling. sentinel',
|
||||
message: 'Successfully launched '+typeStr+' crawler',
|
||||
type: 'success',
|
||||
})
|
||||
})
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
<template>
|
||||
<el-dialog title="upload" v-model="state.isShowDialog" width="550px">
|
||||
<el-form :model="state.ruleForm" size="default" label-width="110px" ref="adminAddFormRef">
|
||||
<el-form-item label="file:" style="margin-top: 30px;">
|
||||
<el-upload ref="upFileRef" class="upload-demo" :file-list="state.fileList" style="width: 460px;"
|
||||
:auto-upload="false" :on-change="handleChange" multiple = "true">
|
||||
<template #trigger>
|
||||
<el-button type="primary">select file</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="onCancel" size="default">cancel</el-button>
|
||||
<el-button type="primary" @click="uploadHandler()" size="default"
|
||||
:loading="state.isLoading">upload</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { importTemplateImgList } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||
const upFileRef = ref();
|
||||
const emit = defineEmits(['callback']);
|
||||
const adminAddFormRef = ref();
|
||||
const state = reactive({
|
||||
fileList: [],
|
||||
dataList: [],
|
||||
isShowDialog: false,
|
||||
isLoading: false,
|
||||
ruleForm: {
|
||||
},
|
||||
})
|
||||
//通过onchanne触发方法获得文件列表
|
||||
const handleChange = (file, fileList) => {
|
||||
state.fileList = fileList;
|
||||
};
|
||||
|
||||
//上传处理
|
||||
const uploadHandler = () => {
|
||||
const form = new FormData();
|
||||
state.fileList.forEach(item=>{
|
||||
state.dataList.push(item.raw);
|
||||
form.append("fileList", item.raw);
|
||||
})
|
||||
form.append("disasterId", state.ruleForm.disasterId);
|
||||
state.isLoading = true;
|
||||
importTemplateImgList(form).then(da => {
|
||||
ElMessage.success("success");
|
||||
emit('callback');
|
||||
}).finally(() => {
|
||||
state.isLoading = false;
|
||||
})
|
||||
closeDialog();
|
||||
};
|
||||
|
||||
//重置表单
|
||||
const resetField = () => {
|
||||
adminAddFormRef.value.resetFields();
|
||||
state.fileArray = [];
|
||||
upFileRef.value.clearFiles();
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
state.isShowDialog = true;
|
||||
state.ruleForm.disasterId = row;
|
||||
};
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
state.isShowDialog = false;
|
||||
resetField();
|
||||
};
|
||||
// 取消
|
||||
const onCancel = () => {
|
||||
closeDialog();
|
||||
};
|
||||
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -62,7 +62,6 @@ const uploadPic = (data) => {
|
|||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item=>item.uid===data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
|
|
|
@ -68,7 +68,6 @@ const uploadPic = (data) => {
|
|||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item=>item.uid===data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<el-input v-model="state.ruleForm.areaEn" placeholder="please enter area en" style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="frequency" label="frequency">
|
||||
<el-input v-model="state.ruleForm.frequency" placeholder="please enter frequency" style="width: 300px"/>
|
||||
<el-input v-model="state.ruleForm.frequency" placeholder="please enter frequency" style="width: 300px" type="number"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
@ -62,7 +62,6 @@ const uploadPic = (data) => {
|
|||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item=>item.uid===data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
|
|
|
@ -68,7 +68,6 @@ const uploadPic = (data) => {
|
|||
//移除时
|
||||
const removePic = (data) => {
|
||||
state.fileArray.splice(state.fileArray.findIndex(item=>item.uid===data.raw.uid), 1)
|
||||
console.log(state.fileArray)
|
||||
}
|
||||
//校验规则
|
||||
const rules = reactive({
|
||||
|
|
|
@ -208,8 +208,6 @@ const formatSizeUnits = (size) => {
|
|||
}
|
||||
//灾害表格点击事件
|
||||
const tableClick = (i) => {
|
||||
console.log(i);
|
||||
|
||||
state.disasterId = i.disasterId;
|
||||
getTableData();
|
||||
}
|
||||
|
@ -261,18 +259,18 @@ const generateData = () => {
|
|||
}
|
||||
//记录爬虫信息
|
||||
submit(
|
||||
{
|
||||
[{
|
||||
type: 8,
|
||||
manageId: userInfo.userInfos.id,
|
||||
status: 0,
|
||||
disasterId: state.disasterId,
|
||||
keywords: 'word clouds',
|
||||
}
|
||||
}]
|
||||
).then(ret => {
|
||||
if (ret == 1042) {
|
||||
ElMessage.error("error")
|
||||
} else {
|
||||
landsat(ret.disasterId, 30, ret.id).then(res => {
|
||||
landsat(ret[0].disasterId, 30, ret[0].id).then(res => {
|
||||
getTableData;
|
||||
ElMessage.success("success")
|
||||
})
|
||||
|
|
|
@ -712,7 +712,6 @@ const setDisasterType = (data) => {
|
|||
const getDashBoradData = () => {
|
||||
state.param.year = state.year.getFullYear()
|
||||
statistics(state.param.year).then(res=>{
|
||||
console.log(res);
|
||||
//第一栏
|
||||
setHeadData(res.header);
|
||||
//第二栏
|
||||
|
|
|
@ -125,7 +125,7 @@ const onSignIn = () => {
|
|||
code: state.ruleForm.code,
|
||||
grantType: state.captchaMode ? "captcha" : "password"
|
||||
}).then((res) => {
|
||||
Session.set('token', res.access_token);
|
||||
Session.setEx('token', res.access_token);
|
||||
Session.set('token-time', new Date().getTime());
|
||||
Session.set('refresh-token', res.refresh_token);
|
||||
if (themeConfig.value.isRequestRoutes) {
|
||||
|
|
|
@ -146,7 +146,6 @@ const state = reactive({
|
|||
});
|
||||
const setValue = () => {
|
||||
const text = toRaw(myQuillEditor.value).getHTML()
|
||||
console.log(text)
|
||||
}
|
||||
// 初始化表格数据
|
||||
const initTableData = () => {
|
||||
|
|
|
@ -51,7 +51,6 @@ const resetField = () => {
|
|||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
console.log(row);
|
||||
state.isShowDialog = true;
|
||||
state.data = row;
|
||||
};
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="auditData(scope.row)">Audit</el-button>
|
||||
<el-button size="small" v-auth-role="'admin'" text type="danger" @click="removeThis(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -54,18 +55,34 @@
|
|||
<script lang="ts" setup name="systemRole">
|
||||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import type { TabsPaneContext } from 'element-plus';
|
||||
import { getDataUploadPage, getDisasterPage } from '/@/api/response/dataUpload.js'
|
||||
import { getDataUploadPage, getDisasterPage, remove } from '/@/api/response/dataUpload.js'
|
||||
const activeName = ref('first');
|
||||
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
const removeThis =(row) =>{
|
||||
let arr = [];
|
||||
arr.push(row.id);
|
||||
//使用英语提示是否删除
|
||||
ElMessageBox.confirm('Are you sure you want to delete this data?', 'Warning', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
remove(arr).then((res) => {
|
||||
ElMessage.success("Delete successfully");
|
||||
getTableData();
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage.info("Cancel deletion");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import Audit from './component/audit.vue';
|
||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||
|
||||
// 引入组件
|
||||
const RoleDialog = defineAsyncComponent(() => import('/@/views/system/role/dialog.vue'));
|
||||
const auditRef = ref();
|
||||
|
|
|
@ -113,6 +113,19 @@
|
|||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="200"
|
||||
prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
v-auth-role="'admin'">
|
||||
<template #default="scope">
|
||||
<el-button size="small"
|
||||
text
|
||||
type="danger"
|
||||
@click="remove(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange"
|
||||
@current-change="onHandleCurrentChange"
|
||||
|
@ -136,11 +149,13 @@
|
|||
<el-table-column prop="username"
|
||||
label="User name"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
sortable
|
||||
width="150"></el-table-column>
|
||||
<el-table-column prop="organization"
|
||||
label="Organization"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
sortable
|
||||
width="160"></el-table-column>
|
||||
<el-table-column prop="email"
|
||||
label="Email"
|
||||
show-overflow-tooltip
|
||||
|
@ -148,7 +163,8 @@
|
|||
<el-table-column prop="disasterType"
|
||||
label="Disaster type"
|
||||
show-overflow-tooltip
|
||||
sortable>
|
||||
sortable
|
||||
width="160">
|
||||
<!-- 在disasterType中获取dictKey 对应的dictValue -->
|
||||
<template #default="scope">
|
||||
<el-tag type="info">{{ getValue(scope.row.disasterType) }}</el-tag>
|
||||
|
@ -156,12 +172,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="disasterKeyword"
|
||||
label="Disaster keyword"
|
||||
width="190"
|
||||
show-overflow-tooltip
|
||||
sortable></el-table-column>
|
||||
<el-table-column prop="disasterTime"
|
||||
label="Disaster time"
|
||||
show-overflow-tooltip
|
||||
sortable>
|
||||
sortable
|
||||
width="150">
|
||||
<template #default="scope">
|
||||
<!-- 格式化去除时分秒 -->
|
||||
{{ dateFormat(scope.row.disasterTime) }}
|
||||
|
@ -174,7 +192,8 @@
|
|||
<el-table-column prop="reviewTime"
|
||||
label="reviewTime"
|
||||
show-overflow-tooltip
|
||||
sortable />
|
||||
sortable
|
||||
width="140" />
|
||||
<el-table-column width="170"
|
||||
prop="respondStatus"
|
||||
label="Response status"
|
||||
|
@ -189,7 +208,7 @@
|
|||
v-if="scope.row.respondStatus === 3">Complete response</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="200"
|
||||
<el-table-column width="240"
|
||||
prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip
|
||||
|
@ -203,6 +222,11 @@
|
|||
text
|
||||
type="danger"
|
||||
@click="responseEnded(scope.row)">Response ended</el-button>
|
||||
<el-button size="small"
|
||||
text
|
||||
type="danger"
|
||||
@click="remove(scope.row)"
|
||||
v-auth-role="'admin'">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -263,6 +287,19 @@
|
|||
{{ dateFormat(scope.row.respondedTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="200"
|
||||
prop="Operate"
|
||||
label="Operate"
|
||||
show-overflow-tooltip
|
||||
sortable>
|
||||
<template #default="scope"
|
||||
v-auth-role="'admin'">
|
||||
<el-button size="small"
|
||||
text
|
||||
type="danger"
|
||||
@click="remove(scope.row)">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="onHandleSizeChange"
|
||||
@current-change="onHandleCurrentChange"
|
||||
|
@ -403,7 +440,7 @@
|
|||
import en from 'element-plus/dist/locale/en.mjs'
|
||||
import { reactive, onMounted, ref, nextTick, watchEffect, defineAsyncComponent, h } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { getList, review, responseEndedDisasterInfo } from '/@/api/disasterInfo/index';
|
||||
import { getList, review, responseEndedDisasterInfo, deleteByIds } from '/@/api/disasterInfo/index';
|
||||
import { getDictionary, getList as getListNew } from '/@/api/system/dictbiz';
|
||||
import { useVariableStore } from '/@/stores/index.ts'
|
||||
//引入地图
|
||||
|
@ -422,7 +459,24 @@ const variableStore = useVariableStore();
|
|||
const mapRef = ref();
|
||||
const activeName = ref('first');
|
||||
const select = ref();
|
||||
const remove = (row) => {
|
||||
let arr = [];
|
||||
arr.push(row.disasterId);
|
||||
//使用英语提示确认删除
|
||||
ElMessageBox.confirm('Are you sure you want to delete it?', 'Prompt', {
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'No',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
deleteByIds(arr).then((da) => {
|
||||
getTableData();
|
||||
ElMessage.success('success');
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
|
||||
}
|
||||
const handleClick = (tab, event) => {
|
||||
state.selectName = tab.props.name;
|
||||
getTableData();
|
||||
|
@ -662,7 +716,6 @@ const ClearSubmit = () => {
|
|||
const mapClick = (res) => {
|
||||
// // mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly )
|
||||
// mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3), res.latlng.lng.toFixed(3))
|
||||
// // console.log(state.wktPoint_Poly)
|
||||
state.dislat = res.latlng.lat.toFixed(3)
|
||||
state.dislon = res.latlng.lng.toFixed(3)
|
||||
mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3), res.latlng.lng.toFixed(3))
|
||||
|
|
|
@ -25,14 +25,14 @@
|
|||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-row :gutter="35" v-for="(v, k) in state.ruleForm.children" :key="k">
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item :prop="`list[${k}].label`" label-width="180">
|
||||
<el-form-item :prop="`list[${k}].label`" label-width="240">
|
||||
<template #label>
|
||||
<el-button type="primary" circle size="small" @click="onAddRow" v-if="k === 0">
|
||||
<el-button type="primary" circle size="small" @click="onAddRow" v-if="k === state.ruleForm.children.length-1">
|
||||
<el-icon>
|
||||
<ele-Plus />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<el-button type="danger" circle size="small" @click="onDelRow(k)" v-else>
|
||||
<el-button type="danger" circle size="small" @click="onDelRow(k)">
|
||||
<el-icon>
|
||||
<ele-Delete />
|
||||
</el-icon>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<div class="system-dic-container layout-padding">
|
||||
<el-card shadow="hover" class="layout-padding-auto">
|
||||
<div class="system-user-search mb15">
|
||||
<el-input size="default" placeholder="Please enter a dictionary name" style="max-width: 180px" v-model="state.query.dictValue"> </el-input>
|
||||
<el-button size="default" type="primary" class="ml10">
|
||||
<el-input size="default" placeholder="Please enter a dictionary name" style="max-width: 180px" v-model="state.query.dictValue"> </el-input>
|
||||
<el-button size="default" type="primary" class="ml10" @click="getTableData()">
|
||||
<el-icon>
|
||||
<ele-Search />
|
||||
</el-icon>
|
||||
|
@ -79,7 +79,7 @@ const state = reactive({
|
|||
// 初始化表格数据
|
||||
const getTableData = () => {
|
||||
state.tableData.loading = true;
|
||||
getList().then((res) => {
|
||||
getList({dictValue_equal:state.query.dictValue}).then((res) => {
|
||||
state.tableData.data = res;
|
||||
state.tableData.loading = false;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,6 @@ const resetField = () => {
|
|||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
console.log(row);
|
||||
state.isShowDialog = true;
|
||||
state.data = row;
|
||||
};
|
||||
|
|
|
@ -58,11 +58,7 @@ import en from 'element-plus/dist/locale/en.mjs'
|
|||
import type { TabsPaneContext } from 'element-plus';
|
||||
import { getAdminManagerPage, auditData } from '/@/api/response/adminManager.js';
|
||||
import Audit from './component/audit.vue';
|
||||
const activeName = ref('first');
|
||||
const auditRef = ref();
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
|
|
|
@ -107,14 +107,9 @@ const gridData = [
|
|||
address: 'Queens, New York City',
|
||||
},
|
||||
]
|
||||
const activeName = ref('first');
|
||||
const administratorRef = ref();
|
||||
const editAdministratorRef = ref();
|
||||
const manageRef = ref();
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
|
||||
//复制内容
|
||||
import { defineAsyncComponent, reactive, onMounted, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
|
|
Loading…
Reference in New Issue