| | |
| | | <!--时间线--> |
| | | <div> |
| | | <div class="current-select" @click="listFlag = !listFlag"> |
| | | <div class="title">2019-2M第一季度</div> |
| | | <div class="title">{{ currentTitle }}</div> |
| | | <i class="el-icon-caret-bottom"></i> |
| | | </div> |
| | | |
| | |
| | | |
| | | methods: { |
| | | init () { |
| | | this.currentTitle = this.selectList[0].title |
| | | this.currentIndex = 0 |
| | | |
| | | if (this.leftOrRight == 'left') { |
| | | this.leftAddLayer() |
| | | this.currentTitle = this.selectList[0].title |
| | | this.currentIndex = 0 |
| | | this.leftAddLayer(this.selectList[0]) |
| | | } else { |
| | | this.rightAddLayer() |
| | | this.currentTitle = this.selectList[1].title |
| | | this.currentIndex = 1 |
| | | this.rightAddLayer(this.selectList[1]) |
| | | } |
| | | }, |
| | | |
| | |
| | | } |
| | | }, |
| | | |
| | | leftAddLayer () { |
| | | leftAddLayer (params) { |
| | | leftCurrentLayer = global.viewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({ |
| | | url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengyjjddom/MapServer/WMTS', |
| | | // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS', |
| | | layer: 'nanchengyjjddom', |
| | | style: 'default', |
| | | tileMatrixSetID: 'default028mm', |
| | | format: 'image/png', |
| | | tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(), |
| | | maximumLevel: 19, |
| | | tileMatrixLabels: [ |
| | | '0', |
| | | '1', |
| | | '2', |
| | | '3', |
| | | '4', |
| | | '5', |
| | | '6', |
| | | '7', |
| | | '8', |
| | | '9', |
| | | '10', |
| | | '11', |
| | | '12', |
| | | '13', |
| | | '14', |
| | | '15', |
| | | '16', |
| | | '17', |
| | | '18', |
| | | '19' |
| | | ] |
| | | url: params.url, |
| | | layer: params.layer, |
| | | style: params.style, |
| | | tileMatrixSetID: params.tileMatrixSetID, |
| | | format: params.format, |
| | | tilingScheme: params.tilingScheme, |
| | | maximumLevel: params.maximumLevel, |
| | | tileMatrixLabels: params.tileMatrixLabels |
| | | }), 10 |
| | | ) |
| | | }, |
| | | |
| | | rightAddLayer () { |
| | | rightAddLayer (params) { |
| | | rightCurrentLayer = global.viewer.mapSplit.addBaseLayer( |
| | | new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({ |
| | | url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS', |
| | | // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS', |
| | | layer: 'nanchengdom', |
| | | style: 'default', |
| | | tileMatrixSetID: 'default028mm', |
| | | format: 'image/png', |
| | | tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(), |
| | | maximumLevel: 19, |
| | | tileMatrixLabels: [ |
| | | '0', |
| | | '1', |
| | | '2', |
| | | '3', |
| | | '4', |
| | | '5', |
| | | '6', |
| | | '7', |
| | | '8', |
| | | '9', |
| | | '10', |
| | | '11', |
| | | '12', |
| | | '13', |
| | | '14', |
| | | '15', |
| | | '16', |
| | | '17', |
| | | '18', |
| | | '19' |
| | | ] |
| | | url: params.url, |
| | | layer: params.layer, |
| | | style: params.style, |
| | | tileMatrixSetID: params.tileMatrixSetID, |
| | | format: params.format, |
| | | tilingScheme: params.tilingScheme, |
| | | maximumLevel: params.maximumLevel, |
| | | tileMatrixLabels: params.tileMatrixLabels |
| | | }), 21 |
| | | ) |
| | | }, |
| | |
| | | } |
| | | |
| | | if (this.leftOrRight) { |
| | | this.currentTitle = item.title |
| | | this.currentIndex = index |
| | | |
| | | if (this.leftOrRight == 'left') { |
| | | this.removeLeftAddLayer() |
| | | this.leftAddLayer() |
| | | this.leftAddLayer(item) |
| | | } else { |
| | | this.removeRightAddLayer() |
| | | this.rightAddLayer() |
| | | this.rightAddLayer(item) |
| | | } |
| | | |
| | | this.listFlag = false |
| | |
| | | |
| | | li { |
| | | line-height: 30px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-07-29 15:19:13 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-08-05 10:38:40 |
| | | * @LastEditTime: 2022-08-05 10:51:10 |
| | | * @FilePath: \zhny-dsj\src\router\axios.js |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | */ |
| | |
| | | |
| | | console.log(code, 555) |
| | | |
| | | if (code === -1) { |
| | | if (code == 403 && res.data.data == 'token 验证失败!') { |
| | | sessionStorage.removeItem('token') |
| | | router.push('/login') |
| | | } else { |
| | |
| | | import * as auth from '@/utils/auth' |
| | | /* |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-07-29 15:11:35 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-08-05 11:47:57 |
| | | * @FilePath: \zhny-dsj\src\store\modules\user.js |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | */ |
| | | |
| | | const user = { |
| | | state: { |
| | |
| | | mutations: { |
| | | setUser (state, user) { |
| | | state.user = user |
| | | auth.setToken(user.access_token) |
| | | } |
| | | }, |
| | | actions: { |
| | |
| | | /* |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-07-28 17:50:14 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-08-05 11:45:20 |
| | | * @FilePath: \zhny-dsj\src\utils\auth.js |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | */ |
| | | export const getToken = () => { |
| | | return window.sessionStorage.getItem('token') |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import nprogress from "nprogress" |
| | | import md5 from "js-md5" |
| | | import axios from "axios" |
| | | import { EventBus } from "../../eventBus/event-bus" |
| | | import nprogress from 'nprogress' |
| | | import md5 from 'js-md5' |
| | | import axios from 'axios' |
| | | import * as auth from '@/utils/auth' |
| | | import { EventBus } from '../../eventBus/event-bus' |
| | | |
| | | export default { |
| | | name: "AppRegister", |
| | | name: 'AppRegister', |
| | | data () { |
| | | return { |
| | | user: { |
| | | username: "", |
| | | password: "", |
| | | username: '', |
| | | password: '' |
| | | }, |
| | | rules: { |
| | | username: [ |
| | | { required: true, message: "用户名不能为空", trigger: "blur" }, |
| | | { required: true, message: '用户名不能为空', trigger: 'blur' }, |
| | | { |
| | | min: 3, |
| | | max: 10, |
| | | message: "用户账号长度在3~10个字符之间", |
| | | trigger: "blur", |
| | | }, |
| | | message: '用户账号长度在3~10个字符之间', |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | password: [ |
| | | { required: true, message: "密码不能为空", trigger: "blur" }, |
| | | { required: true, message: '密码不能为空', trigger: 'blur' }, |
| | | { |
| | | min: 3, |
| | | max: 10, |
| | | message: "用户密码长度在3~10个字符之间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | message: '用户密码长度在3~10个字符之间', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | errors: null, |
| | | newAxios: null, |
| | | newAxios: null |
| | | } |
| | | }, |
| | | created () { |
| | | var that = this |
| | | |
| | | this.newAxios = axios.create({ |
| | | baseURL: "http://182.106.212.58:8013/api", |
| | | baseURL: 'http://182.106.212.58:8013/api', |
| | | timeout: 600000, |
| | | headers: { |
| | | Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0", |
| | | "Tenant-Id": "000000", |
| | | }, |
| | | Authorization: 'Basic c2FiZXI6c2FiZXJfc2VjcmV0', |
| | | 'Tenant-Id': '000000' |
| | | } |
| | | }) |
| | | |
| | | document.onkeydown = (e) => { |
| | |
| | | nprogress.start() |
| | | |
| | | this.newAxios({ |
| | | method: "POST", |
| | | url: "/blade-auth/oauth/token", |
| | | method: 'POST', |
| | | url: '/blade-auth/oauth/token', |
| | | params: { |
| | | username: username, |
| | | password: md5(password), |
| | | tenantId: "000000", |
| | | }, |
| | | tenantId: '000000' |
| | | } |
| | | }).then((res) => { |
| | | if (res.data.access_token) { |
| | | this.$store.commit("setUser", res.data) |
| | | this.$router.push({ path: "/" }) |
| | | this.$store.commit('setUser', res.data) |
| | | auth.setToken(res.data.access_token) |
| | | this.$router.push({ path: '/' }) |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "用户名或密码不正确,请重新输入", |
| | | type: 'warning', |
| | | message: '用户名或密码不正确,请重新输入' |
| | | }) |
| | | } |
| | | nprogress.done() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |