Commit 03d1a603 by weix

站点功能

parent f7dfd171
...@@ -616,6 +616,11 @@ export default { ...@@ -616,6 +616,11 @@ export default {
return '优惠券' return '优惠券'
default: default:
} }
},
specialSymbol(str) {
// 验证是否包含特殊字符,包含则返回true
let p = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/im;
return p.test(str);
} }
} }
} }
import {get, post, put, deletes} from '@/request/http'
export function addSite(data) {
const url = process.env.VUE_APP_BASE_API8+'/site/info';
return post(url, data)
}
export function editSite(data) {
const url = process.env.VUE_APP_BASE_API8+'/site/info';
return put(url, data)
}
export function delSite(data) {
const url = process.env.VUE_APP_BASE_API8+'/site/info';
return deletes(url, data)
}
...@@ -16,6 +16,24 @@ export const currencyRoutes = [{ ...@@ -16,6 +16,24 @@ export const currencyRoutes = [{
import ( /* webpackChunkName: "login" */ '@/views/login/index.vue'), import ( /* webpackChunkName: "login" */ '@/views/login/index.vue'),
hidden: true hidden: true
}, },
{
path: '/Real',
component: () =>
import('@/views/components/newReal.vue'),
meta: {
title: '实名认证'
},
hidden: true
},
{
path: '/JoiningEnterprise',
component: () =>
import('@/views/components/newJoiningEnterprise.vue'),
meta: {
title: '加入企业'
},
hidden: true
},
{ {
path: '/401', path: '/401',
name: '401', name: '401',
......
import Vue from 'vue';
// 使用 Event Bus
const bus = new Vue();
export default bus;
\ No newline at end of file
<template xmlns="http://www.w3.org/1999/html"> <template xmlns="http://www.w3.org/1999/html">
<el-card class="enclosureItemBox"> <el-card class="enclosureItemBox">
<el-row>
<div class="title-left" style="padding-left: 10px;font-weight: 800;">
围栏管理
</div>
</el-row>
<div class="mapBox"> <div class="mapBox">
<div <div
:style="{ :style="{
...@@ -549,9 +554,9 @@ export default { ...@@ -549,9 +554,9 @@ export default {
rows: this.size, rows: this.size,
}, },
polygonName: this.searchStr, polygonName: this.searchStr,
// platformId: this.$store.getters.platformId "61fdff1d455c4ab8a2efc564c245b90d", platformId: this.$store.getters.platformId,
//TODO 临时使用 //TODO 临时使用
platformId: "61fdff1d455c4ab8a2efc564c245b90d", // platformId: "61fdff1d455c4ab8a2efc564c245b90d",
}; };
if (!!cityCode) { if (!!cityCode) {
json.cityCode = cityCode; json.cityCode = cityCode;
...@@ -571,9 +576,9 @@ export default { ...@@ -571,9 +576,9 @@ export default {
rows: 999, rows: 999,
}, },
polygonName: this.searchStr, polygonName: this.searchStr,
// platformId: this.$store.getters.platformId, platformId: this.$store.getters.platformId,
//TODO 临时使用 //TODO 临时使用
platformId: "61fdff1d455c4ab8a2efc564c245b90d", // platformId: "61fdff1d455c4ab8a2efc564c245b90d",
cityCode: cityCode, cityCode: cityCode,
}; };
getAllFenceList(json).then((res) => { getAllFenceList(json).then((res) => {
...@@ -841,7 +846,8 @@ export default { ...@@ -841,7 +846,8 @@ export default {
polygonType: this.EnclosureForm.type, polygonType: this.EnclosureForm.type,
// platformId: this.$store.getters.platformId, // platformId: this.$store.getters.platformId,
//TODO 临时使用 //TODO 临时使用
platformId: "61fdff1d455c4ab8a2efc564c245b90d", // platformId: "61fdff1d455c4ab8a2efc564c245b90d",
platformId: this.$store.getters.platformId,
polygonAttribute: "1", polygonAttribute: "1",
traceId: this.EnclosureForm.traceId, traceId: this.EnclosureForm.traceId,
polygonTypeValue: this.EnclosureForm.fenceTypeName, polygonTypeValue: this.EnclosureForm.fenceTypeName,
...@@ -1047,4 +1053,13 @@ export default { ...@@ -1047,4 +1053,13 @@ export default {
.amap-box { .amap-box {
position: relative; position: relative;
} }
.title-left::before {
content: '';
position: absolute;
left: 0;
top: 10%;
width: 5px;
height: 80%;
background-color: #0099ff;
}
</style> </style>
<template> <template>
<el-card type="flex" justify="end"> <el-card type="flex" justify="end">
<el-row>
<div class="title-left" style="padding-left: 10px;font-weight: 800;">
站点管理
</div>
</el-row>
<el-form class="form-row"> <el-form class="form-row">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
...@@ -69,11 +74,11 @@ ...@@ -69,11 +74,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="120"> <el-table-column label="操作" align="center" fixed="right" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" type="text"> <el-button size="small" type="text" @click="() => $refs.addDialog.showDialog(scope.row)">
管理 编辑
</el-button> </el-button>
<el-button size="small" type="text" style="color: red;"> <el-button size="small" type="text" style="color: red;" @click="delSite(scope.row.id)">
关闭 删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -89,7 +94,7 @@ ...@@ -89,7 +94,7 @@
</el-pagination> </el-pagination>
</div> </div>
<addDialog ref="addDialog"></addDialog> <addDialog ref="addDialog" @backInitTable="backInitTable"></addDialog>
</el-card> </el-card>
</template> </template>
...@@ -98,6 +103,7 @@ import { ...@@ -98,6 +103,7 @@ import {
selectHotAreaList, selectHotAreaList,
getAllprovinceAndCity getAllprovinceAndCity
} from "@/port/set-request"; } from "@/port/set-request";
import {delSite} from "@/port/site/site";
import Selects from '@/components/Selects' import Selects from '@/components/Selects'
import dataSource from "@/libs/screen"; import dataSource from "@/libs/screen";
import JudgeType from "@/mixins/judgeType"; import JudgeType from "@/mixins/judgeType";
...@@ -155,6 +161,34 @@ export default { ...@@ -155,6 +161,34 @@ export default {
this.initTable(); this.initTable();
}, },
methods: { methods: {
delSite(id) {
this.$confirm('是否确认删除', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
delSite({sId: id})
.then((res) => {
if(res.status === 200) {
this.$message.success('删除成功');
this.initTable();
}else {
this.$message.error(res.msg);
}
})
.catch(() => {
})
})
.catch(() => {
})
},
backInitTable() {
this.initTable();
},
handlechangeList(val) { handlechangeList(val) {
let source = JSON.parse(JSON.stringify(val)); let source = JSON.parse(JSON.stringify(val));
this.form.siteTypeList = this.filftersFun(source.data); this.form.siteTypeList = this.filftersFun(source.data);
...@@ -226,4 +260,14 @@ export default { ...@@ -226,4 +260,14 @@ export default {
margin-top: 16px; margin-top: 16px;
text-align: right; text-align: right;
} }
.title-left::before {
content: '';
position: absolute;
left: 0;
top: 10%;
width: 5px;
height: 80%;
background-color: #0099ff;
}
</style> </style>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</div> </div>
</el-row> </el-row>
<el-row style="padding-top: 10px;"> <el-row style="padding-top: 10px;">
{{ platformForm ? platformForm.org.orgInfo.info : ''}} {{ platformForm ? platformForm.org.orgInfo ? platformForm.org.orgInfo.info : platformForm.org.scode : ''}}
</el-row> </el-row>
</el-card> </el-card>
...@@ -317,7 +317,7 @@ export default { ...@@ -317,7 +317,7 @@ export default {
imageUrl: j.org.logoUrl, imageUrl: j.org.logoUrl,
enterpriseDescribe: j.org.orgForShort, enterpriseDescribe: j.org.orgForShort,
address: j.org.address, address: j.org.address,
companyDescribe: j.org.orgInfo.info, companyDescribe: j.org.orgInfo ? j.org.orgInfo.info : j.org.scode,
opername: j.org.opername, opername: j.org.opername,
operIdcard: j.org.operIdcard, operIdcard: j.org.operIdcard,
} }
......
...@@ -470,9 +470,17 @@ export default { ...@@ -470,9 +470,17 @@ export default {
// 运营组织商 // 运营组织商
async operatorPrivilegesLogin(userId) { async operatorPrivilegesLogin(userId) {
// 运营组织商信息接口 // 运营组织商信息接口
let {data} = await operatorPrivileges(userId) let {data, status} = await operatorPrivileges(userId)
console.log(data,"看看") console.log(data,"看看")
if(data) { if(data) {
if(status === 205) {
this.$router.push({
path: '/JoiningEnterprise',
query: {
type: 1
}
})
}
if (data.roleType == 1) { if (data.roleType == 1) {
// 品牌方路由 // 品牌方路由
this.$store.commit('user/ROLE_TYPE', data.roleType) this.$store.commit('user/ROLE_TYPE', data.roleType)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment