| | |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| | | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
| | | <link rel="stylesheet" href="./CimSDK/CimSDK.min.css"> |
| | | <script src="./js/config.js"></script> |
| | | <script src="./js/city.js"></script> |
| | | <script src="./js/turf.min.js"></script> |
| | | <!-- <script src="./js/peer-stream.js"></script> --> |
| | | <script src="./CimSDK/Workers/jquery-3.5.0.min.js"></script> |
| | | <script src="./CimSDK/CimSDK.min.js"></script> |
| | | <script src="./js/proj4.js"></script> |
| | | <script src="./js/config.js"></script> |
| | | <title>地质灾害孪生平台</title> |
| | | </head> |
| | | |
| | |
| | | |
| | | |
| | | |
| | | const mapDataUrl = "http://localhost:18055/北京地质灾害研究所项目"; |
| | | // 像素流配置 |
| | | const defaultStreamUrl = "ws://localhost:88" |
| | | |
| | | |
| | | window.ps = { |
| | | emitMessage: function (message) { |
| | | // console.log("emitMessage", message) |
| | | } |
| | | } |
| | | const BASE_URL = "http://192.168.56.107:8077" |
| | | console.log('config.js 被加载', new Date().toISOString()); |
| | |
| | | import axios from "axios"; |
| | | |
| | | // 判断当前是否是开发环境 |
| | | let API_URL; |
| | | |
| | | if (process.env.NODE_ENV === 'development') { |
| | | // 开发环境使用 '/api' |
| | | API_URL = '/api'; |
| | | } else { |
| | | // 生产环境使用实际的配置地址 |
| | | API_URL = `${BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL}/api`; |
| | | } |
| | | |
| | | // 创建 Axios 实例 |
| | | const instance = axios.create({ |
| | | baseURL: "/api", // 使用你配置的 /auth 代理 |
| | | baseURL: API_URL, |
| | | timeout: 1000 * 60, // 请求超时时间(单位:毫秒) |
| | | headers: { |
| | | "Content-Type": "application/x-www-form-urlencoded", // 默认请求头application/json |
| | | "Content-Type": "application/x-www-form-urlencoded", // 默认请求头 |
| | | }, |
| | | }); |
| | | |
| | | console.log('当前 BaseUrl:', API_URL); |
| | | // 请求拦截器 |
| | | // instance.interceptors.request.use( |
| | | // (config) => { |
| | |
| | | |
| | | try { |
| | | const params = { |
| | | geom: forms.geom, |
| | | geom: forms.geom.value, |
| | | areaType: getAreaType(selectTab.value), |
| | | createTime: Date.now(), |
| | | name: forms.name, |
| | |
| | | v-if="simStore.selectTab == '行政区划仿真'" |
| | | > |
| | | <el-select |
| | | @change="changeGeom" |
| | | v-model="forms.geom" |
| | | placeholder="Select" |
| | | style="max-width: 600px" |
| | |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | :value="item" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | :value="item" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | hours: null, |
| | | }); |
| | | |
| | | const changeGeom = (val) => { |
| | | console.log(val,'aaaaaaaaaaaaaaa') |
| | | } |
| | | |
| | | const { calculateHoursDifference } = inject("calculateHours"); |
| | | |
| | | const change = (val) => { |
| | |
| | | hot: true, |
| | | proxy: { |
| | | '/api': { |
| | | // target: 'http://192.168.56.107:8077', |
| | | target: 'http://192.168.1.104:8078', |
| | | target: 'http://192.168.56.107:8077', |
| | | // target: 'http://192.168.1.104:8078', |
| | | changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/api': '' |