This commit is contained in:
shijing 2022-09-01 11:21:32 +07:00
parent 4f05f6f460
commit 1de0ea6f83
6 changed files with 53 additions and 43 deletions

View File

@ -15,7 +15,7 @@ const DEFAULT_CONFIG = {
API_URL: process.env.NODE_ENV === 'development' && process.env.VUE_APP_PROXY === 'false' ? "/api" : process.env.VUE_APP_API_BASEURL,
//请求超时
TIMEOUT: 10000,
TIMEOUT: 20000,
//TokenName
TOKEN_NAME: "Authorization",

View File

@ -18,7 +18,6 @@
v-model="search.keyword"
placeholder="编号/名称"
clearable
@click="handleQuery"
></el-input>
<el-button
type="primary"
@ -36,7 +35,7 @@
stripe
@resetQuery="resetQuery"
@row-click="rowClick"
hidePagination
hideDo
>
<el-table-column
@ -437,7 +436,9 @@ export default {
},
//
handleQuery() {},
handleQuery() {
this.$refs.table.queryData(this.search)
},
//ID
filterTree(id) {

View File

@ -56,8 +56,10 @@ export default {
};
},
mounted() {
this.$nextTick(() => {
this.loadMap();
let that =this;
that.$nextTick(() => {
that.coordinates.railName = that.areaName;
that.loadMap();
})
},
methods: {
@ -107,6 +109,7 @@ export default {
// this.coordinates.floorId = feature.properties.floorId;
that.points = feature.geometry.coordinates[0];
},
//
removeCallback: (feature) => {
// console.log('remove', feature);
@ -121,6 +124,14 @@ export default {
}
});
window.map.addControl(drawTool2);
let compassControl = new jsmap.JSCompassControl({
position: jsmap.JSControlPosition.LEFT_TOP,
offset: {
x: 50,
y: 50
}
});
window.map.addControl(compassControl);
if (that.areaPoints.length > 2) {
that.areaMarkerLayers();
}

View File

@ -179,14 +179,7 @@ export default {
this.$emit('closed');
},
getArea() {
this.$API.am.area.list.req().then(res => {
debugger;
if (res.err_msg) {
this.message.error(res.err_msg)
} else {
this.areasList = res.results;
}
})
this.areasList = that.$TOOL.data.get('qyjyAreaList');
},
//
submit() {

View File

@ -2,7 +2,7 @@
<div class="screen-main">
<!--头部展示-->
<div class="screen-header">
<div class="header-left-bg">曲阳金隅智慧安全</div>
<div class="header-left-bg">曲阳金隅智能安全管控系统</div>
<div class="header-right-action">
<div class="right-action-clock">
<span class="action-time">{{ currentDay }}</span>
@ -926,6 +926,8 @@ export default {
let that = this;
let type = event.nodeType.toString();
console.log(type === 'Symbol(icontextmaker)');
debugger;
console.log(item)
if (item.markers.length > 0) {
if (type === 'Symbol(boxmarker)') {
this.screenJob = false;
@ -1148,13 +1150,8 @@ export default {
///
getAreas() {
let that = this;
that.$API.am.area.list.req().then(res => {
if (res.err_msg) {
} else {
that.areaList = res.results;
that.showRiskMarkers(res.results);
}
})
let areaList = that.$TOOL.data.get('qyjyAreaList');
that.showRiskMarkers(areaList);
},
//线
getAllMen() {
@ -1375,7 +1372,7 @@ export default {
},
//
showCameraMarkers(list) {
debugger;
// debugger;
let that = this;
if(list.length>0){
list.forEach(item => {
@ -1404,7 +1401,7 @@ export default {
callback: () => {
}
});
debugger;
// debugger;
console.log(that.cameraMaskerLayer)
that.cameraMaskerLayer.addMarker(cameraMarker);
}
@ -1709,7 +1706,7 @@ export default {
//
getVchannels() {
let that = this;
debugger;
// debugger;
that.$API.am.tdevice.vchannel.req({pageSize:999}).then(res => {
if (res.err_msg) {
that.$message.error(res.err_msg);

View File

@ -139,29 +139,34 @@ export default {
mounted() {},
methods: {
async login() {
var validate = await this.$refs.loginForm.validate().catch(() => {});
let that = this;
var validate = await that.$refs.loginForm.validate().catch(() => {});
if (!validate) {
return false;
}
this.islogin = true;
that.islogin = true;
var data = {
username: this.form.user,
// password: this.$TOOL.crypto.MD5(this.form.password)
password: this.form.password,
username: that.form.user,
// password: that.$TOOL.crypto.MD5(that.form.password)
password: that.form.password,
};
//token
try {
var res = await this.$API.auth.token.post(data);
this.$TOOL.cookie.set("TOKEN", res.access, {
expires: this.form.autologin ? 24 * 60 * 60 : 0,
var res = await that.$API.auth.token.post(data);
that.$TOOL.cookie.set("TOKEN", res.access, {
expires: that.form.autologin ? 24 * 60 * 60 : 0,
});
try {
var res1 = await this.$API.auth.info.get();
this.$TOOL.data.set("USER_INFO", res1);
this.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms));
var res1 = await that.$API.auth.info.get();
that.$TOOL.data.set("USER_INFO", res1);
that.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms));
that.$API.am.area.list.req({page_size:999}).then(res => {
if (res.err_msg) {
} else {
debugger;
console.log(res1.type)
let areaList = res.results;
that.$TOOL.data.set("qyjyAreaList", areaList);
if(res1.type==='employee'){
this.$router.replace({
path: "/",
@ -171,13 +176,16 @@ export default {
path: "/rpm/rpj",
});
}
this.$message.success("Login Success 登录成功");
this.islogin = false;
that.$message.success("Login Success 登录成功");
that.islogin = false;
}
})
} catch (err) {
this.islogin = false;
that.islogin = false;
console.log(err);}
} catch (err) {
this.islogin = false;
that.islogin = false;
console.log(err);
}
// var res = await this.$API.auth.token.post(data)