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, 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 //TokenName
TOKEN_NAME: "Authorization", TOKEN_NAME: "Authorization",

View File

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

View File

@ -56,8 +56,10 @@ export default {
}; };
}, },
mounted() { mounted() {
this.$nextTick(() => { let that =this;
this.loadMap(); that.$nextTick(() => {
that.coordinates.railName = that.areaName;
that.loadMap();
}) })
}, },
methods: { methods: {
@ -107,6 +109,7 @@ export default {
// this.coordinates.floorId = feature.properties.floorId; // this.coordinates.floorId = feature.properties.floorId;
that.points = feature.geometry.coordinates[0]; that.points = feature.geometry.coordinates[0];
}, },
// //
removeCallback: (feature) => { removeCallback: (feature) => {
// console.log('remove', feature); // console.log('remove', feature);
@ -121,6 +124,14 @@ export default {
} }
}); });
window.map.addControl(drawTool2); 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) { if (that.areaPoints.length > 2) {
that.areaMarkerLayers(); that.areaMarkerLayers();
} }

View File

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

View File

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

View File

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