feat: code temporary storage
|
@ -11,7 +11,7 @@ module.exports = {
|
||||||
assetsPublicPath: '/',
|
assetsPublicPath: '/',
|
||||||
proxyTable: {
|
proxyTable: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://192.168.0.29:8091/',
|
target: 'http://192.168.0.35:8089/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/api': ''
|
'^/api': ''
|
||||||
|
@ -29,7 +29,7 @@ module.exports = {
|
||||||
// Various Dev Server settings
|
// Various Dev Server settings
|
||||||
host: 'localhost', // can be overwritten by process.env.HOST
|
host: 'localhost', // can be overwritten by process.env.HOST
|
||||||
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||||
autoOpenBrowser: false,
|
autoOpenBrowser: false, // 是否自动开启浏览器预览能力
|
||||||
errorOverlay: true,
|
errorOverlay: true,
|
||||||
notifyOnErrors: true,
|
notifyOnErrors: true,
|
||||||
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.0.29",
|
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --open",
|
||||||
"start": "npm run dev",
|
"start": "npm run dev",
|
||||||
"unit": "jest --config test/unit/jest.conf.js --coverage",
|
"unit": "jest --config test/unit/jest.conf.js --coverage",
|
||||||
"e2e": "node test/e2e/runner.js",
|
"e2e": "node test/e2e/runner.js",
|
||||||
|
|
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
|
@ -4,6 +4,7 @@ import request from '@/utils/request'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import 'nprogress/nprogress.css' // progress bar style
|
import 'nprogress/nprogress.css' // progress bar style
|
||||||
import Layout from '@/layout'
|
import Layout from '@/layout'
|
||||||
|
|
||||||
var routers
|
var routers
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
if (to.path == `/login`) {
|
if (to.path == `/login`) {
|
||||||
|
|
|
@ -34,6 +34,7 @@ service.interceptors.request.use(
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
config.headers['Authorization'] = JSON.parse(sessionStorage.getItem('user')).sessionId || ''
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
|
|
@ -0,0 +1,131 @@
|
||||||
|
import axios from 'axios'
|
||||||
|
import { Message, MessageBox, Loading } from 'element-ui'
|
||||||
|
|
||||||
|
// create an axios instance
|
||||||
|
axios.defaults.withCredentials = true
|
||||||
|
let loadingService = null
|
||||||
|
|
||||||
|
const service = axios.create({
|
||||||
|
// baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
baseURL: config.httpurl,
|
||||||
|
// withCredentials: true, // send cookies when cross-domain requests
|
||||||
|
timeout: 300000, // request timeout
|
||||||
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
|
||||||
|
})
|
||||||
|
|
||||||
|
// request interceptor
|
||||||
|
service.interceptors.request.use(
|
||||||
|
config => {
|
||||||
|
// do something before request is sent
|
||||||
|
if (
|
||||||
|
(
|
||||||
|
!config.url.includes('getLevels') &&
|
||||||
|
!config.url.includes('hasMenu') &&
|
||||||
|
!config.url.includes('hasButton') &&
|
||||||
|
!config.url.includes('getInfo')
|
||||||
|
) &&
|
||||||
|
!loadingService
|
||||||
|
) {
|
||||||
|
loadingService = Loading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '加载中......',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (config.url === '/admin/check') {
|
||||||
|
delete config.headers.Authorization
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
// do something with request error
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// response interceptor
|
||||||
|
service.interceptors.response.use(
|
||||||
|
/**
|
||||||
|
* If you want to get http information such as headers or status
|
||||||
|
* Please return response => response
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine the request status by custom code
|
||||||
|
* Here is just an example
|
||||||
|
* You can also judge the status by HTTP Status Code
|
||||||
|
*/
|
||||||
|
response => {
|
||||||
|
// console.info('response:' + response)
|
||||||
|
loadingService && loadingService.close()
|
||||||
|
loadingService = null
|
||||||
|
const res = response.data
|
||||||
|
// if the custom code is not 20000, it is judged as an error.
|
||||||
|
if (res.result !== 'success' && res.result !== 'fail') {
|
||||||
|
if (res.response == '302') {
|
||||||
|
MessageBox.alert('登录失效,请重新登录', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
callback: action => {
|
||||||
|
sessionStorage.clear()
|
||||||
|
location.reload()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (res.result !== 'exception') {
|
||||||
|
Message({
|
||||||
|
message: res.msg || '没有此页面的访问权限,请联系管理员',
|
||||||
|
type: 'error',
|
||||||
|
duration: 5 * 1000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
Message({
|
||||||
|
message: res.msg || '系统开小差了,请联系管理员',
|
||||||
|
type: 'error',
|
||||||
|
duration: 5 * 1000
|
||||||
|
})
|
||||||
|
return Promise.reject(new Error(res.message || '系统开小差了,请联系管理员'))
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
if (!error.response || error.response.status == '404' || error.response.status == '302') {
|
||||||
|
MessageBox.alert('登录失效,请重新登录', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
callback: action => {
|
||||||
|
sessionStorage.clear()
|
||||||
|
location.reload()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
MessageBox.alert('登录失效,请重新登录', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
callback: action => {
|
||||||
|
sessionStorage.clear()
|
||||||
|
location.reload()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
export function requestFN2(url, data) {
|
||||||
|
// 基础请求方法
|
||||||
|
const Qs = require('qs')
|
||||||
|
const method = 'post'
|
||||||
|
const obj = {
|
||||||
|
method, // 请求的类型
|
||||||
|
url // 请求地址
|
||||||
|
}
|
||||||
|
obj.data = Qs.stringify(data) // data 带参数
|
||||||
|
// 返回axios的基础方法
|
||||||
|
return service(obj).then(r => {
|
||||||
|
return r // 方法请求的数据
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export default service
|
||||||
|
|
|
@ -1,57 +1,277 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="mapAssembly-container">
|
||||||
<div id="map"/>
|
<div id="map" />
|
||||||
|
<!-- 展示左侧的盒子元素 -->
|
||||||
|
<div class="left-display-box">
|
||||||
|
<!-- 应急机构 -->
|
||||||
|
<div class="emergency-department">
|
||||||
|
<el-descriptions :column="2" :colon="true" title="应急机构" class="department-list" content-style="huc">
|
||||||
|
<template>
|
||||||
|
<el-descriptions-item label="专家组名称">看板</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系电话">18100000000</el-descriptions-item>
|
||||||
|
</template>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<!-- 联系人方式 -->
|
||||||
|
<div class="contact-information">
|
||||||
|
联系人方式
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 展示中间的盒子元素 -->
|
||||||
|
<div class="center-display-box">
|
||||||
|
<div v-for="(item, index) in pointsList" :key="index" class="point" @click="handlePoint(item, index)">
|
||||||
|
<div class="rescue-box">
|
||||||
|
<img :src="item.check ? item.check_img : item.img" class="rescue-img" alt="">
|
||||||
|
<p class="rescue-text"> {{ item.label }} </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 展示右侧的盒子元素 -->
|
||||||
|
<div class="right-display-box">
|
||||||
|
展示右侧的盒子元素
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { requestFN } from '@/utils/request'
|
import { requestFN } from '@/utils/request'
|
||||||
|
|
||||||
let mapInstance
|
let mapInstance
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pointsList: [
|
||||||
|
{
|
||||||
|
img: require('@/assets/map/emergency_rescue/ico1.png'),
|
||||||
|
check_img: require('@/assets/map/emergency_rescue/ico1_on.png'),
|
||||||
|
label: '物资',
|
||||||
|
check: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img: require('@/assets/map/emergency_rescue/ico2.png'),
|
||||||
|
check_img: require('@/assets/map/emergency_rescue/ico2_on.png'),
|
||||||
|
label: '消防',
|
||||||
|
check: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img: require('@/assets/map/emergency_rescue/ico3.png'),
|
||||||
|
check_img: require('@/assets/map/emergency_rescue/ico3_on.png'),
|
||||||
|
label: '更多',
|
||||||
|
check: false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 列表查询参数
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
},
|
||||||
|
KEYWORDS: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.mapInit()
|
this.mapInit() // 调用地图初始化方法
|
||||||
|
this.initPoints() // 调用初始化点位绘制方法
|
||||||
|
this.getYjExpertGroupInfo()
|
||||||
},
|
},
|
||||||
|
// 实例销毁之前调用
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
mapInstance = null
|
mapInstance = null
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 地图初始化
|
/** 地图初始化 */
|
||||||
mapInit() {
|
mapInit() {
|
||||||
mapInstance = new window.BMapGL.Map('map')
|
mapInstance = new window.BMapGL.Map('map') // 创建地图实例
|
||||||
mapInstance.centerAndZoom(new window.BMapGL.Point('119.645516', '39.934547'), 15)
|
mapInstance.centerAndZoom(new window.BMapGL.Point('119.645516', '39.934547'), 15) // 创建点坐标
|
||||||
mapInstance.enableScrollWheelZoom(true)
|
mapInstance.enableScrollWheelZoom(true) // 开启鼠标滚轮缩放能力
|
||||||
},
|
},
|
||||||
// 扎点
|
// 扎点
|
||||||
addPoint(anchor) {
|
// addPoint(anchor) {
|
||||||
if (!anchor.iconImg) throw new Error('请传入图标')
|
// if (!anchor.iconImg) throw new Error('请传入图标')
|
||||||
if (!anchor.imageSize) throw new Error('请传入图片大小')
|
// if (!anchor.imageSize) throw new Error('请传入图片大小')
|
||||||
if (!anchor.lng) throw new Error('请传入经度')
|
// if (!anchor.lng) throw new Error('请传入经度')
|
||||||
if (!anchor.lat) throw new Error('请传入纬度')
|
// if (!anchor.lat) throw new Error('请传入纬度')
|
||||||
const imageSize = new window.BMapGL.Size(23, 30)
|
// const imageSize = new window.BMapGL.Size(23, 30)
|
||||||
const icon = new window.BMapGL.Icon(anchor.iconImg, imageSize, { imageSize })
|
// const icon = new window.BMapGL.Icon(anchor.iconImg, imageSize, { imageSize })
|
||||||
const point = new window.BMapGL.Point(anchor.lng, anchor.lat)
|
// const point = new window.BMapGL.Point(anchor.lng, anchor.lat)
|
||||||
const marker = new window.BMapGL.Marker(point, { icon })
|
// const marker = new window.BMapGL.Marker(point, { icon }) // 创建标注
|
||||||
|
// mapInstance.addOverlay(marker) // 将标注添加到地图中
|
||||||
|
// },
|
||||||
|
// 给地图扎点标记事件事故
|
||||||
|
addPointCallback(anchor) {
|
||||||
|
// if (!anchor.iconImg) throw new Error('请传入图标')
|
||||||
|
// if (!anchor.imageSize) throw new Error('请传入图片大小')
|
||||||
|
if (!anchor.LONGITUDE) throw new Error('请传入经度')
|
||||||
|
if (!anchor.LATITUDE) throw new Error('请传入纬度')
|
||||||
|
const { LONGITUDE, LATITUDE } = anchor
|
||||||
|
var point = new window.BMapGL.Point(LONGITUDE, LATITUDE)
|
||||||
|
var marker = new window.BMapGL.Marker(point) // 创建标注
|
||||||
|
mapInstance.addOverlay(marker) // 将标注添加到地图中
|
||||||
|
// 处理标注事件点击行为
|
||||||
|
marker.addEventListener('click', function() {
|
||||||
|
// 获取指定点位所对应的范围等详细信息
|
||||||
|
requestFN('major/comprehensive/scope', {
|
||||||
|
accidentId: anchor.id
|
||||||
|
})
|
||||||
|
.then((data) => {
|
||||||
|
const { LONGITUDE, LATITUDE } = anchor
|
||||||
|
var point = new window.BMapGL.Point(LONGITUDE, LATITUDE)
|
||||||
|
var marker = new window.BMapGL.Marker(point) // 创建标注
|
||||||
mapInstance.addOverlay(marker)
|
mapInstance.addOverlay(marker)
|
||||||
|
}).catch((e) => { })
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 初始话定位点
|
// 初始化定位点
|
||||||
getInfo(id) {
|
getInfo(id) {
|
||||||
requestFN('/dictionaries/listTree').then((data) => {
|
requestFN('/dictionaries/listTree').then((data) => {
|
||||||
this.treeData = JSON.parse(data.zTreeNodes)
|
this.treeData = JSON.parse(data.zTreeNodes)
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
console.error('获取树形数据失败', e)
|
console.error('获取树形数据失败', e)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
async initPoints() {
|
||||||
|
const result = await this.getAccidentList()
|
||||||
|
result.data.forEach((item) => {
|
||||||
|
this.addPointCallback(item)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 获取事故列表的所有点位信息 */
|
||||||
|
getAccidentList() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
requestFN('/major/comprehensive/accidentList')
|
||||||
|
.then((data) => {
|
||||||
|
resolve(data)
|
||||||
|
}).catch((e) => { })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 初始化获取应急救援专家组 */
|
||||||
|
getYjExpertGroupInfo() {
|
||||||
|
requestFN(
|
||||||
|
'/yjExpertGroup/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||||
|
{
|
||||||
|
name: this.KEYWORDS
|
||||||
|
}
|
||||||
|
).then((data) => {
|
||||||
|
console.log('data HHHHHHHh红红火火恍恍惚惚 :>> ', data)
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.listISLOADing = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 处理点坐标 */
|
||||||
|
handlePoint(item, index) {
|
||||||
|
console.log('当前点击的点坐标信息 :>> ', item)
|
||||||
|
console.log('当前点击的点坐标索引值 :>>', index)
|
||||||
|
this.pointsList[index].check = !this.pointsList[index].check
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
#map {
|
.mapAssembly-container {
|
||||||
width: calc(100vw - 210px);
|
position: relative;
|
||||||
|
|
||||||
|
#map {
|
||||||
|
width: calc(100vw - 44px);
|
||||||
height: calc(100vh - 84px);
|
height: calc(100vh - 84px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-descriptions {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-descriptions__body {
|
||||||
|
background-color: red !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-display-box {
|
||||||
|
z-index: 99;
|
||||||
|
position: absolute;
|
||||||
|
left: 20px;
|
||||||
|
top: 20px;
|
||||||
|
width: 26vw;
|
||||||
|
height: 83vh;
|
||||||
|
background: rgba(20, 31, 168, .7);
|
||||||
|
border: 1px solid #0060d7;
|
||||||
|
border-top: none;
|
||||||
|
padding: 8px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
// 应急部门样式
|
||||||
|
.emergency-department {
|
||||||
|
border-radius: 8px;
|
||||||
|
width: 100%;
|
||||||
|
height: 50%;
|
||||||
|
|
||||||
|
.department-list {
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 联系人方式样式
|
||||||
|
.contact-information {
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid greenyellow;
|
||||||
|
width: 100%;
|
||||||
|
height: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 展示中间的盒子元素
|
||||||
|
.center-display-box {
|
||||||
|
z-index: 99;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
top: 72vh;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-20vw);
|
||||||
|
width: 40vw;
|
||||||
|
height: 13vh;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.rescue-box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 4vw;
|
||||||
|
height: 4vw;
|
||||||
|
.rescue-img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.rescue-text {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 展示右侧的盒子元素
|
||||||
|
.right-display-box {
|
||||||
|
z-index: 99;
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
width: 25vw;
|
||||||
|
height: 83vh;
|
||||||
|
background: rgba(20, 31, 168, .7);
|
||||||
|
border: 1px solid #0060d7;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -189,11 +189,11 @@ import { requestFN } from '@/utils/request'
|
||||||
import { Treeselect } from '@riophae/vue-treeselect'
|
import { Treeselect } from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import { upload } from '@/utils/upload'
|
import { upload } from '@/utils/upload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Treeselect, Pagination },
|
components: { Treeselect, Pagination },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10
|
limit: 10
|
||||||
|
|
|
@ -100,6 +100,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { requestFN } from '@/utils/request'
|
import { requestFN } from '@/utils/request'
|
||||||
|
import { requestFN2 } from '@/utils/request2'
|
||||||
import SIdentify from './components/sidentify'
|
import SIdentify from './components/sidentify'
|
||||||
import JSEncrypt from '../../../static/js/jsencrypt.min.js'
|
import JSEncrypt from '../../../static/js/jsencrypt.min.js'
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
@ -222,7 +223,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
const loginCount = this.validStr(sessionStorage.getItem('loginCount')) ? sessionStorage.getItem('loginCount') : 0
|
const loginCount = this.validStr(sessionStorage.getItem('loginCount')) ? sessionStorage.getItem('loginCount') : 0
|
||||||
if (this.loginCount >= 3) { // 登录次数超过3次,需要填写验证码
|
if (this.loginCount >= 3) { // 登录次数超过 3 次,需要填写验证码
|
||||||
if (this.code === '') {
|
if (this.code === '') {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请输入验证码',
|
message: '请输入验证码',
|
||||||
|
@ -232,7 +233,7 @@ export default {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (loginCount >= 5) { // 登录次数超过3次,需要填写验证码
|
if (loginCount >= 5) { // 登录次数超过 5 次,发现异常登录,系统拒绝访问
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '发现异常登录,系统拒绝访问',
|
message: '发现异常登录,系统拒绝访问',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
|
@ -245,7 +246,7 @@ export default {
|
||||||
if (this.$refs.validation.rangeStatus) {
|
if (this.$refs.validation.rangeStatus) {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.flag = true
|
this.flag = true
|
||||||
if (this.loginCount >= 3) { // 登录次数超过3次,需要填写验证码
|
if (this.loginCount >= 3) { // 登录次数超过 3 次,需要填写验证码
|
||||||
if (this.code === '') {
|
if (this.code === '') {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请输入验证码',
|
message: '请输入验证码',
|
||||||
|
@ -269,10 +270,15 @@ export default {
|
||||||
jsencrypt.setPublicKey(config.publicKey)
|
jsencrypt.setPublicKey(config.publicKey)
|
||||||
const loginData = jsencrypt.encrypt('qdkjchina' + this.loginForm.username + ',qd,' + this.loginForm.password)
|
const loginData = jsencrypt.encrypt('qdkjchina' + this.loginForm.username + ',qd,' + this.loginForm.password)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
requestFN(
|
requestFN2(
|
||||||
'/admin/check',
|
'/admin/check',
|
||||||
{
|
{
|
||||||
KEYDATA: loginData
|
KEYDATA: loginData
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
noAuth: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
if (data.result === 'success') {
|
if (data.result === 'success') {
|
||||||
|
@ -320,8 +326,6 @@ export default {
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
if (data.list && data.list.length > 0) {
|
if (data.list && data.list.length > 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log(data)
|
|
||||||
console.log('???????--sparrow')
|
|
||||||
this.$notify.info({
|
this.$notify.info({
|
||||||
title: '消息',
|
title: '消息',
|
||||||
message: '您有【' + data.list.length + '】条相关方人员数据待审核'
|
message: '您有【' + data.list.length + '】条相关方人员数据待审核'
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const config = {
|
const config = {
|
||||||
weburl: 'http://192.168.0.29:8080/', // 前台地址
|
weburl: 'http://192.168.0.37:8080/', // 前台地址
|
||||||
// httpurl: 'http://192.168.0.29:8091/', // 后台地址
|
// httpurl: 'http://192.168.0.29:8091/', // 后台地址
|
||||||
httpurl: 'http://192.168.0.29:8085/', // 后台地址
|
httpurl: 'http://192.168.0.35:8089/', // 后台地址
|
||||||
qyurl: 'https://qgqy.qhdsafety.com/', // 企业前台
|
qyurl: 'https://qgqy.qhdsafety.com/', // 企业前台
|
||||||
adminurl: 'https://www.qdkjchina.com/qa-prevention-admin/',
|
adminurl: 'https://www.qdkjchina.com/qa-prevention-admin/',
|
||||||
// 正式
|
// 正式
|
||||||
fileUrl: 'https://qgqy.qhdsafety.com/file/', // 附件服务器地址
|
fileUrl: 'https://wwag.qhdsafety.com/file/', // 附件服务器地址
|
||||||
weburlWaiwang: 'https://qgqy.qhdsafety.com/', // 服务器外网地址
|
weburlWaiwang: 'https://qgqy.qhdsafety.com/', // 服务器外网地址
|
||||||
httpurlWaiwang: 'https://qgqy.qhdsafety.com/qa-prevention-gwj/', // ,
|
httpurlWaiwang: 'https://qgqy.qhdsafety.com/qa-prevention-gwj/', // ,
|
||||||
fileUrlWaiwang: 'https://qgqy.qhdsafety.com/file/', // 服务器外网 附件地址,
|
fileUrlWaiwang: 'https://qgqy.qhdsafety.com/file/', // 服务器外网 附件地址,
|
||||||
|
|