Merge branch 'test' of http://139.196.74.78:10010/r/drone/drone-web-manage into test
9 files modified
1 files added
| New file |
| | |
| | | NODE_ENV = 'test' |
| | | |
| | | #开发环境配置 |
| | | VITE_APP_ENV = 'test' |
| | | |
| | | #接口地址 |
| | | VITE_APP_API=/api |
| | | |
| | | #页面基础路径 |
| | | VITE_APP_BASE=/manage |
| | | |
| | | # 服务地址 |
| | | VITE_APP_URL = https://wrj.shuixiongit.com/api |
| | | #VITE_APP_URL= http://192.168.1.168 rjg |
| | | #VITE_APP_URL= http://192.168.1.33 |
| | | #新大屏地址 |
| | | VITE_APP_DASHBOARD_URL = 'https://wrj.shuixiongit.com/command-center-dashboard/' |
| | | |
| | | # 域名 |
| | | VITE_APP_AREA_NAME = https://wrj.shuixiongit.com |
| | | |
| | | # ws地址 |
| | | VITE_APP_WS_API_URL = wss://wrj.shuixiongit.com |
| | | |
| | | # 航线文件地址 |
| | | VITE_APP_AIRLINE_URL = https://wrj.shuixiongit.com/minio/cloud-bucket |
| | | |
| | | # 图片存放地址 |
| | | VITE_APP_TERRAIN_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_terrain/all_terrain |
| | | |
| | | # 算法仓库图片地址 |
| | | VITE_APP_PICTURE_URL = https://wrj.shuixiongit.com/aiskyminio/cloud-bucket |
| | | |
| | | # 是否在打包时开启压缩,支持 gzip 和 brotli |
| | | VITE_BUILD_COMPRESS = gzip |
| | | |
| | | #页面基础路径 |
| | | # VITE_APP_BASE_COMMAND = /drone-web-manage/ |
| | | #天地图token 浏览器端口 |
| | | VITE_APP_TDT_TOKEN = e110584a27d506da2740edca951683f4 |
| | | VITE_APP_CESIUM_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkYTZlNGNlYS01NTU1LTQ1MGEtYmNlZS0yNTE2NDk5YWM2MjEiLCJpZCI6MTc5Njk2LCJpYXQiOjE3MDA1NDcwMjV9.qcl4AH2731cfFd0-I1ZLUINPXqvglLkDFD-UGR2zU5M |
| | | |
| | |
| | | "dev": "vite --host", |
| | | "base": "vite --host --mode localhost", |
| | | "prod": "vite --mode production", |
| | | "build:test": "vite build --mode development", |
| | | "build:test": "vite build --mode test", |
| | | "build:prod": "vite build --mode production", |
| | | "build:jiangwu": "vite build --mode jiangwu", |
| | | "serve": "vite preview --host" |
| | |
| | | import axios from 'axios'; |
| | | import store from '@/store/'; |
| | | import router from '@/router/'; |
| | | import { |
| | | serialize |
| | | } from '@/utils/util'; |
| | | import { |
| | | getToken, |
| | | removeToken, |
| | | removeRefreshToken |
| | | } from '@/utils/auth'; |
| | | import { |
| | | isURL, |
| | | validatenull |
| | | } from '@/utils/validate'; |
| | | import { |
| | | ElMessage |
| | | } from 'element-plus'; |
| | | import { serialize } from '@/utils/util'; |
| | | import { getToken, removeToken, removeRefreshToken } from '@/utils/auth'; |
| | | import { isURL, validatenull } from '@/utils/validate'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import website from '@/config/website'; |
| | | import NProgress from 'nprogress'; // progress bar |
| | | import 'nprogress/nprogress.css'; // progress bar style |
| | | import { |
| | | Base64 |
| | | } from 'js-base64'; |
| | | import { |
| | | baseUrl |
| | | } from '@/config/env'; |
| | | import { Base64 } from 'js-base64'; |
| | | import { baseUrl } from '@/config/env'; |
| | | import crypto from '@/utils/crypto'; |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL; |
| | | // 全局未授权错误提示状态,只提示一次 |
| | | let isErrorShown = false; |
| | | |
| | |
| | | config.url = baseUrl + config.url; |
| | | } |
| | | //安全请求header |
| | | config.headers['areaCode'] = store?.state?.user?.userInfo?.detail?.areaCode |
| | | config.headers['areaCode'] = store?.state?.user?.userInfo?.detail?.areaCode; |
| | | config.headers['Blade-Requested-With'] = 'BladeHttpRequest'; |
| | | //headers判断是否需要 |
| | | const authorization = config.authorization === false; |
| | |
| | | const cryptoData = config.cryptoData === true; |
| | | const token = getToken(); |
| | | if (token && !isToken) { |
| | | config.headers[website.tokenHeader] = cryptoToken ? |
| | | 'crypto ' + crypto.encryptAES(token, crypto.cryptoKey) : |
| | | 'bearer ' + token; |
| | | config.headers[website.tokenHeader] = cryptoToken |
| | | ? 'crypto ' + crypto.encryptAES(token, crypto.cryptoKey) |
| | | : 'bearer ' + token; |
| | | } |
| | | // 开启报文加密 |
| | | // if (cryptoData) { |
| | |
| | | const currentRouteName = router.currentRoute.value.name; |
| | | // 如果当前路由不是登录页,则跳转到登录页 |
| | | if (currentRouteName !== '登录页') { |
| | | store.dispatch('FedLogOut').then(() => router.push({ |
| | | path: '/login' |
| | | })); |
| | | store.dispatch('FedLogOut').then(() => |
| | | router.push({ |
| | | path: '/login', |
| | | }) |
| | | ); |
| | | } |
| | | return Promise.reject(new Error(message)); |
| | | } |
| | |
| | | // 获取刷新后的token |
| | | const token = getToken(); |
| | | if (token && !isToken) { |
| | | config.headers[website.tokenHeader] = cryptoToken ? |
| | | 'crypto ' + crypto.encryptAES(token, crypto.cryptoKey) : |
| | | 'bearer ' + token; |
| | | config.headers[website.tokenHeader] = cryptoToken |
| | | ? 'crypto ' + crypto.encryptAES(token, crypto.cryptoKey) |
| | | : 'bearer ' + token; |
| | | } |
| | | // 重新发送原来的请求 |
| | | return axios(config); |
| | |
| | | // 清除token信息 |
| | | removeToken(); |
| | | removeRefreshToken(); |
| | | const env = import.meta.env.VITE_APP_ENV; |
| | | // 重定向到登录页 |
| | | // store.dispatch('FedLogOut').then(() => router.push({ |
| | | // path: '/login' |
| | | // })); |
| | | store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)); |
| | | env === 'development' |
| | | ? store.dispatch('FedLogOut').then(() => |
| | | router.push({ |
| | | path: '/login', |
| | | }) |
| | | ) |
| | | : store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)); |
| | | return Promise.reject(new Error(message)); |
| | | }); |
| | | } |
| | |
| | | // store.dispatch('FedLogOut').then(() => router.push({ |
| | | // path: '/login' |
| | | // })); |
| | | store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)); |
| | | const env = import.meta.env.VITE_APP_ENV; |
| | | env === 'development' |
| | | ? store.dispatch('FedLogOut').then(() => |
| | | router.push({ |
| | | path: '/login', |
| | | }) |
| | | ) |
| | | : store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)); |
| | | return Promise.reject(new Error(message)); |
| | | } |
| | | // 如果请求为oauth2错误码则首次报错时提示 |
| | |
| | | }, |
| | | |
| | | loginTitle: '大吉山钨业无人机安防监测平台', |
| | | |
| | | |
| | | |
| | | hideMenuTopLogo: true, // 是否隐藏菜单顶部logo |
| | | } |
| | | } |
| | |
| | | <transition name="fade"> |
| | | <span v-if="getScreen(isCollapse)" class="avue-logo_subtitle" key="0"> |
| | | <!-- {{ website.logo }}--> |
| | | <img class="logoImg" src="/img/bg/mainLogo.png" alt=""/> |
| | | <img v-if="!hideMenuTopLogo" class="logoImg" src="/img/bg/mainLogo.png" alt=""/> |
| | | </span> |
| | | </transition> |
| | | <transition-group name="fade"> |
| | | <template v-if="getScreen(!isCollapse)"> |
| | | <div class="fadeStyle"> |
| | | <img class="logoImg" src="/img/bg/mainLogo.png" alt=""/> |
| | | <img v-if="!hideMenuTopLogo" class="logoImg" src="/img/bg/mainLogo.png" alt=""/> |
| | | <div class="titleName">综合管理平台</div> |
| | | <!-- <span style="font-size: 20px;" key="1"> |
| | | {{ this.parentDeptInfo.sysName }} |
| | |
| | | |
| | | <script> |
| | | import { mapGetters } from 'vuex'; |
| | | |
| | | import getBaseConfig from '@/buildConfig/config'; |
| | | const { hideMenuTopLogo } = getBaseConfig() |
| | | export default { |
| | | name: 'logo', |
| | | data() { |
| | | return {}; |
| | | return { |
| | | hideMenuTopLogo |
| | | }; |
| | | }, |
| | | created() {}, |
| | | computed: { |
| | |
| | | type: 'warning', |
| | | }).then(() => { |
| | | this.$store.dispatch('LogOut').then(() => { |
| | | // this.$router.push({ path: '/login' }) |
| | | const env = import.meta.env.VITE_APP_ENV |
| | | console.log(env); |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | window.location.replace(`${adminUrl}#/login`) |
| | | env === 'development' ? this.$router.push({ path: '/login' }):window.location.replace(`${adminUrl}#/login`) |
| | | |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | const lockPage = '/lock' //锁屏页 |
| | | const urlParams = getUrlParams(window.location.href) |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | const env = import.meta.env.VITE_APP_ENV |
| | | |
| | | function findRouteByPath (routes, targetPath) { |
| | | // 遍历数组中的每个路由对象 |
| | | for (const route of routes) { |
| | |
| | | // 遍历完所有路由都没找到,返回null |
| | | return null |
| | | } |
| | | |
| | | router.beforeEach((to, from, next) => { |
| | | const meta = to.meta || {} |
| | | const isMenu = meta.menu === undefined ? to.query.menu : meta.menu |
| | |
| | | } else { |
| | | const systemToken = store.getters.token || urlParams?.token |
| | | if (systemToken === 0) { |
| | | // store.dispatch('FedLogOut').then(() => { |
| | | // next({ path: '/login' }) |
| | | // }) |
| | | store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)); |
| | | store.dispatch('FedLogOut').then(() => { |
| | | next({ path: '/login' }) |
| | | }) |
| | | // store.dispatch('FedLogOut').then(() => window.location.replace(`${adminUrl}#/login`)); |
| | | } else { |
| | | const meta = to.meta || {} |
| | | const query = to.query || {} |
| | |
| | | if (meta.isAuth === false) { |
| | | next() |
| | | } else { |
| | | // next('/login') |
| | | window.location.replace(`${adminUrl}#/login`) |
| | | env === 'development' ? next('/login') : window.location.replace(`${adminUrl}#/login`) |
| | | } |
| | | } |
| | | }) |
| | |
| | | let checked = ref('today'); |
| | | |
| | | let timeClick = (item, index) => { |
| | | checked.value = item; |
| | | // dateRange.value = dateRanges[item]; |
| | | dateRange.value = []; |
| | | // emit('change', dateRanges[item],timeListEnum[index]); |
| | | searchForm.date_enum = timeListEnum[index]; |
| | | handleSearch(); |
| | | if (checked.value === item){ |
| | | checked.value = null |
| | | searchForm.date_enum = undefined |
| | | }else{ |
| | | checked.value = item |
| | | searchForm.date_enum = timeListEnum[index] |
| | | } |
| | | dateRange.value = [] |
| | | handleSearch() |
| | | }; |
| | | // 搜索 |
| | | const handleSearch = () => { |
| | |
| | | emit('search', params); |
| | | }; |
| | | const handleDateChange = val => { |
| | | if (val && val.length === 2) { |
| | | const start = dayjs(val[0]); |
| | | const end = dayjs(val[1]); |
| | | const diff = end.diff(start, 'day'); |
| | | |
| | | if (diff > 31) { |
| | | ElMessage.warning('日期范围不能超过31天'); |
| | | dateRange.value = []; |
| | | return; |
| | | } |
| | | } |
| | | handleSearch(); |
| | | checked.value = null |
| | | searchForm.date_enum = undefined |
| | | }; |
| | | |
| | | // 重置 |
| | |
| | | totalJobNum().then(res => { |
| | | if (res.data.code !== 0) returen |
| | | total.value = res.data.data.job_total_num |
| | | numTotal.value = res.data.data.deal_job_num |
| | | }) |
| | | } |
| | | // 获取其他任务统计 |
| | | const getJobStatistics = value => { |
| | | jobStatistics(value).then(res => { |
| | | if (res.data.code !== 0) returen |
| | | const {executed = 0,failed_executions = 0,go_home_executions = 0} = res.data?.data || {} |
| | | numTotal.value = executed + failed_executions + go_home_executions |
| | | list.value[0].value = res.data.data.planned_executions || 0 |
| | | list.value[1].value = res.data.data.executed || 0 |
| | | list.value[2].value = res.data.data.running_num || 0 |
| | |
| | | { immediate: true,deep: true } |
| | | ) |
| | | |
| | | onMounted(() => { |
| | | getTotalJobNum() |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="附件图片" prop="photos" required class="upload-wrapper"> |
| | | <el-upload ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card" |
| | | <el-upload v-if="createoredit === 1" ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card" |
| | | :on-change="handleFileChange" :on-remove="handleUploadRemove" :before-upload="beforeUpload" |
| | | :file-list="popupShowImage(form.photos)" :limit="1" accept="image/*" class="create-upload"> |
| | | :file-list="form.photos" :limit="1" accept="image/*" class="create-upload"> |
| | | <template v-if="form.photos.length < 1"> |
| | | <!-- <i class="el-icon-plus">+</i> --> |
| | | <div class="el-icon-plus"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <el-upload v-else ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card" |
| | | :on-change="handleFileChange" :on-remove="handleUploadRemove" :before-upload="beforeUpload" |
| | | :file-list="popupShowImage(form.photos)" :limit="1" accept="image/*" class="create-upload"> |
| | | <template v-if="form.photos.length < 1"> |
| | | |
| | | <div class="el-icon-plus"> |
| | | <span>+</span> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <div class="upload-tip">需上传含有地址信息的照片(jpg、jpeg、png),且不超过5M</div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | import { ElMessageBox, ElLoading } from 'element-plus' |
| | | import { calculateDefaultRange } from '@/utils/util' |
| | | import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation' |
| | | import _ from 'lodash' |
| | | import { |
| | | getList, |
| | | createTicket, |
| | |
| | | dispatchLoading: false, |
| | | completeLoading: false, |
| | | finalizeLoading: false, |
| | | createoredit:'', |
| | | activeTab: 'all', |
| | | // tabs 只保留静态结构,不做权限判断 |
| | | tabs: [ |
| | |
| | | { label: '关联任务', value: this.currentDetail.job_name || '/' }, |
| | | { label: '任务发起人', value: this.currentDetail.creator }, |
| | | { label: '当前状态', value: this.mapStatus(this.currentDetail.status) }, |
| | | { label: '事件地址', value: this.currentDetail.address }, // 包含经纬度信息 |
| | | { label: '事件地址', value: this.currentDetail.address || this.currentDetail.latAndLon }, // 包含经纬度信息 |
| | | { label: '关联算法', value: this.currentDetail.aiType }, |
| | | { label: '发起单位', value: this.currentDetail.department }, |
| | | { label: '发起任务时间', value: this.currentDetail.startTime }, |
| | |
| | | }, |
| | | |
| | | handleAdd () { |
| | | |
| | | this.createoredit =1 |
| | | this.dialogVisible = true |
| | | this.mapParams.center = null |
| | | this.form.location = [] |
| | |
| | | this.stepInfos = [] |
| | | } |
| | | } |
| | | console.log(detailData,'detailDatadetailDatadetailData'); |
| | | this.currentDetail = { |
| | | ...detailData, |
| | | address:null, |
| | | latAndLon: _.round(detailData.location[0],6) + ',' + _.round(detailData.location[1],6) |
| | | } |
| | | |
| | | this.currentDetail = detailData |
| | | console.log('this.currentDetail',this.currentDetail); |
| | | this.detailVisible = true |
| | | this.$nextTick(() => { |
| | |
| | | |
| | | // 添加编辑方法 |
| | | handleEdit (row) { |
| | | this.createoredit = 2 |
| | | console.log('编辑原始数据:', row) |
| | | |
| | | // 尝试从row.dept_id或通过部门名称查找对应的部门ID |