Commit fad2f3bd by 夏新然

Merge branch 'fanxing' of http://git.keliuyun.com:55676/platform/fanxing_new into fanxing

2 parents b7de4728 fc2a6ee2
......@@ -18,8 +18,8 @@ export default {
eventCates(params) {
return api.get(urls.eventCates, params);
},
eventType(params, event_type_unid) {
return api.get(urls.eventType(event_type_unid), params);
eventType(params, event_cate_unid) {
return api.get(urls.eventType(event_cate_unid), params);
},
eventTypes(params, id) {
return api.get(urls.eventTypes, params);
......@@ -32,5 +32,14 @@ export default {
},
deleteEventType(params, event_unid) {
return api.delete(urls.editEventType(event_unid), params);
},
addTrafficCode(params, cate_unid) {
return api.post(urls.addTrafficCode(cate_unid), params);
},
editTrafficCode(params, cate_unid, code_unid) {
return api.post(urls.editTrafficCode(cate_unid, code_unid), params);
},
deleteTrafficCode(params, code_unid) {
return api.delete(urls.editTrafficCode(cate_unid, code_unid), params);
}
};
......@@ -6,8 +6,8 @@ export default {
menus: baseUrl + "/api/v1/auth/apps/0d88c025fafc5ad1189670655597c183/menus",
eventCates: baseUrl + "/api/v1/codes/event_cates",
eventTypes: baseUrl + "/api/v1/codes/event_types",
eventType(event_type_unid) {
return `${baseUrl}/api/v1/codes/event_types?event_cate=${event_type_unid}`;
eventType(event_cate_unid) {
return `${baseUrl}/api/v1/codes/event_types?event_cate=${event_cate_unid}`;
},
editEventType(event_unid) {
return `${baseUrl}/api/v1/codes/event_types/${event_unid}`;
......
......@@ -95,15 +95,15 @@ export const asyncRouterMap = [
},
component: resolve => require(["../views/search/xcycle.vue"], resolve)
},
// {
// path: "/search/pedestrian",
// name: "行人检索",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve =>
// require(["../views/search/pedestrian.vue"], resolve)
// },
// {
// path: "/search/pedestrian",
// name: "行人检索",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve =>
// require(["../views/search/pedestrian.vue"], resolve)
// },
{
path: "/search/event",
name: "事件检索",
......@@ -123,19 +123,20 @@ export const asyncRouterMap = [
{
path: "/search/traficflow",
name: "流量检索",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/search/traficflow.vue"], resolve),
},
// {
// path: "/search/flow",
// name: "公共客流",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve => require(["../views/search/publicFlow.vue"], resolve),
// }
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/search/traficflow.vue"], resolve)
}
// {
// path: "/search/flow",
// name: "公共客流",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve => require(["../views/search/publicFlow.vue"], resolve),
// }
]
},
{
......@@ -146,48 +147,63 @@ export const asyncRouterMap = [
icon: "el-icon-location"
},
children: [
{
path: "/resource/video",
name: "视频设备",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/videoEquipment.vue"], resolve),
},
{
path: "/resource/equipment",
name: "分析设备",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/analysis.vue"], resolve),
},
{
path: "/resource/store_confs",
name: "存储配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/store_confs.vue"], resolve),
},
{
path: "/resource/nationalStandard",
name: "国标配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/nationalStandard.vue"], resolve),
},
{
path: "/resource/codes",
name: "字典管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/resource/Codes/codes.vue"], resolve),
},
]
},{
{
path: "/resource/video",
name: "视频设备",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/videoEquipment.vue"], resolve)
},
{
path: "/resource/equipment",
name: "分析设备",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/analysis.vue"], resolve)
},
{
path: "/resource/store_confs",
name: "存储配置",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/store_confs.vue"], resolve)
},
{
path: "/resource/author",
name: "授权管理",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/Author/author.vue"], resolve)
},
{
path: "/resource/nationalStandard",
name: "国标配置",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/nationalStandard.vue"], resolve)
},
{
path: "/resource/codes",
name: "字典管理",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/Codes/codes.vue"], resolve)
}
]
},
{
path: "/ops",
name: "系统运维",
component: resolve => require(["../views/Layout/index.vue"], resolve),
......@@ -195,50 +211,56 @@ export const asyncRouterMap = [
icon: "el-icon-location"
},
children: [
{
path: "/ops/equipment_manage",
name: "设备管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/equipment_manage"], resolve),
},{
path: "/ops/system_manage",
name: "系统配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/system_manage"], resolve),
},{
path: "/ops/user_manage",
name: "用户管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/user_manage.vue"], resolve),
},{
path: "/ops/role_manage",
name: "角色管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/role_manage.vue"], resolve),
},{
path: "/ops/batch_upgrade",
name: "批量升级",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve),
},{
path: "/ops/log_manage",
name: "日志管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve),
}
]
{
path: "/ops/equipment_manage",
name: "设备管理",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/ops/equipment_manage"], resolve)
},
{
path: "/ops/system_manage",
name: "系统配置",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/system_manage"], resolve)
},
{
path: "/ops/user_manage",
name: "用户管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/user_manage.vue"], resolve)
},
{
path: "/ops/role_manage",
name: "角色管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/role_manage.vue"], resolve)
},
{
path: "/ops/batch_upgrade",
name: "批量升级",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve)
},
{
path: "/ops/log_manage",
name: "日志管理",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve)
}
]
}
];
const router = new VueRouter({
......
<template>
<div class="contentBox">
<div class="content">
<div>
<span class="selectBox">
<el-select
v-model="curCateUnid"
placeholder="请选择"
@change="cateChange"
:popper-append-to-body="false"
>
<el-option
v-for="item in catesData"
:key="item"
:value="item.cate_unid"
:label="item.name"
></el-option>
</el-select>
</span>
<span class="addbox">
<el-button type="primary" @click="addcode">添加code</el-button>
</span>
</div>
<div class="mt10">
<el-table
height="574"
:data="tableData"
stripe
border
style="width: 100%"
>
<el-table-column
type="index"
align="center"
label="#"
width="40"
></el-table-column>
<el-table-column align="center" prop="code_unid" label="code_unid">
</el-table-column>
<el-table-column prop="code" align="center" label="code">
</el-table-column>
<el-table-column align="center" prop="name" label="名称">
</el-table-column>
<el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope">
<el-tooltip
content="编辑"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="iconfont icon-xiugai editIcon"
@click="editCode(scope.$index, scope.row)"
></span>
</el-tooltip>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="iconfont icon-detail delIcon del-btn"
@click="deleteCode(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
</div>
</div>
</div>
<el-dialog title="设置CODE" :visible.sync="detailVisible" width="400px">
<el-form
ref="trfficform"
:model="codeData"
label-position="left"
label-width="80px"
>
<el-form-item
label="类型"
prop="catename"
:rules="[
{ required: true, message: '类型不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.catename" disabled></el-input>
</el-form-item>
<el-form-item
label="CODE"
prop="code"
:rules="[
{ required: true, message: 'code不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.code"></el-input>
</el-form-item>
<el-form-item
label="名称"
prop="name"
:rules="[
{ required: true, message: '名称不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.name"></el-input>
</el-form-item>
<el-form-item
label="备注"
prop="note"
:rules="[
{ required: true, message: '备注名称不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="detailVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="saveCode"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
detailData: [],
total: 0,
page: 1,
curCateUnid: "",
pageSize: 20,
tableData: [],
catesData: [],
selectDevs: "",
detailVisible: false,
codeStatus: 0,
codeData: {}
};
},
components: {},
created() {
this.getCates();
},
methods: {
cateChange(cateunid) {
let offset = (this.page - 1) * this.pageSize;
let obj = {
limit: this.pageSize,
offset: offset
};
this.$api.codes
.codes(obj, cateunid)
.then(res => {
this.tableData = res.list_data;
})
.catch(err => {});
},
addcode() {
this.codeStatus = 0;
this.detailVisible = true;
this.codeData.catename = this.getCateName(this.curCateUnid);
},
editCode(index, row) {
this.codeStatus = 1;
this.detailVisible = true;
this.codeData = row;
this.codeData.catename = this.getCateName(this.curCateUnid);
},
getCateName(cateunid) {
let name = "";
this.catesData.forEach(ele => {
if (ele.cate_unid === cateunid) {
name = ele.name;
}
});
return name;
},
getCates() {
this.$api.codes.cates().then(res => {
this.catesData = res.list_data;
});
},
saveCode() {
this.$refs["trfficform"].validate(valid => {
if (valid) {
if (this.editStatus === 0) {
this.saveAddCode();
}
if (this.editStatus === 1) {
this.saveEditCode();
}
} else {
console.log("error submit!!");
return false;
}
});
},
saveAddCode() {
this.$api.codes
.addTrafficCode(this.codeData, this.curCateUnid)
.then(res => {
console.log(res);
});
},
saveEditCode() {
this.$api.codes
.editTrafficCode(
this.codeData,
this.curCateUnid,
this.codeData.code_unid
)
.then(res => {
console.log(res);
});
},
deleteCode(index, row) {
this.$api.codes
.editTrafficCode(row, this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
});
},
handleSizeChange(val) {
this.pageSize = val;
},
handleCurrentChange(val) {
this.page = val;
}
}
};
</script>
<style lang="scss" scoped>
.addbox {
float: right;
margin-right: 10px;
}
.code-btn {
margin-bottom: 10px;
float: right;
margin-right: 10px;
}
.del-btn {
padding-left: 20px;
}
</style>
......@@ -4,7 +4,7 @@
<div>
<span class="selectBox">
<el-select
v-model="selectDevs"
v-model="curCateUnid"
placeholder="请选择"
@change="cateChange"
:popper-append-to-body="false"
......@@ -18,7 +18,7 @@
</el-select>
</span>
<span class="addbox">
<el-button type="primary">添加code</el-button>
<el-button type="primary" @click="addcode">添加code</el-button>
</span>
</div>
<div class="mt10">
......@@ -29,13 +29,44 @@
border
style="width: 100%"
>
<el-table-column type="index" align="center" label="#" width="40"></el-table-column>
<el-table-column
type="index"
align="center"
label="#"
width="40"
></el-table-column>
<el-table-column align="center" prop="code_unid" label="code_unid">
</el-table-column>
<el-table-column prop="code" align="center" label="code">
</el-table-column>
<el-table-column align="center" prop="name" label="名称">
</el-table-column>
<el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope">
<el-tooltip
content="编辑"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="iconfont icon-xiugai editIcon"
@click="editCode(scope.$index, scope.row)"
></span>
</el-tooltip>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="iconfont icon-detail delIcon del-btn"
@click="deleteCode(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<el-pagination
......@@ -55,7 +86,56 @@
</div>
</div>
</div>
<el-dialog title="详情" :visible.sync="detailVisible" width="20%">
<el-dialog title="设置CODE" :visible.sync="detailVisible" width="400px">
<el-form
ref="trfficform"
:model="codeData"
label-position="left"
label-width="80px"
>
<el-form-item
label="类型"
prop="catename"
:rules="[
{ required: true, message: '类型不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.catename" disabled></el-input>
</el-form-item>
<el-form-item
label="CODE"
prop="code"
:rules="[
{ required: true, message: 'code不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.code"></el-input>
</el-form-item>
<el-form-item
label="名称"
prop="name"
:rules="[
{ required: true, message: '名称不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.name"></el-input>
</el-form-item>
<el-form-item
label="备注"
prop="note"
:rules="[
{ required: true, message: '备注名称不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="detailVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="saveCode"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
......@@ -66,11 +146,14 @@ export default {
detailData: [],
total: 0,
page: 1,
curCateUnid: "",
pageSize: 20,
tableData: [],
catesData: [],
selectDevs: "",
detailVisible: false
detailVisible: false,
codeStatus: 0,
codeData: {}
};
},
components: {},
......@@ -83,7 +166,7 @@ export default {
let obj = {
limit: this.pageSize,
offset: offset
}
};
this.$api.codes
.codes(obj, cateunid)
.then(res => {
......@@ -91,11 +174,71 @@ export default {
})
.catch(err => {});
},
addcode() {
this.codeStatus = 0;
this.detailVisible = true;
this.codeData.catename = this.getCateName(this.curCateUnid);
},
editCode(index, row) {
this.codeStatus = 1;
this.detailVisible = true;
this.codeData = row;
this.codeData.catename = this.getCateName(this.curCateUnid);
},
getCateName(cateunid) {
let name = "";
this.catesData.forEach(ele => {
if (ele.cate_unid === cateunid) {
name = ele.name;
}
});
return name;
},
getCates() {
this.$api.codes.cates().then(res => {
this.catesData = res.list_data;
});
},
saveCode() {
this.$refs["trfficform"].validate(valid => {
if (valid) {
if (this.editStatus === 0) {
this.saveAddCode();
}
if (this.editStatus === 1) {
this.saveEditCode();
}
} else {
console.log("error submit!!");
return false;
}
});
},
saveAddCode() {
this.$api.codes
.addTrafficCode(this.codeData, this.curCateUnid)
.then(res => {
console.log(res);
});
},
saveEditCode() {
this.$api.codes
.editTrafficCode(
this.codeData,
this.curCateUnid,
this.codeData.code_unid
)
.then(res => {
console.log(res);
});
},
deleteCode(index, row) {
this.$api.codes
.editTrafficCode(row, this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
});
},
handleSizeChange(val) {
this.pageSize = val;
},
......@@ -106,8 +249,16 @@ export default {
};
</script>
<style lang="scss" scoped>
.addbox{
.addbox {
float: right;
margin-right: 10px;
}
.code-btn {
margin-bottom: 10px;
float: right;
margin-right: 10px;
}
.del-btn {
padding-left: 20px;
}
</style>
......@@ -532,7 +532,7 @@ export default {
img {
width: 40px;
height: 40px;
margin-left: 102px;
margin-left: 1vw;
}
.textCon {
margin-right: 101px;
......@@ -542,7 +542,7 @@ export default {
img {
width: 34px;
height: 35px;
margin-left: 104px;
margin-left: 1vw;
}
.textCon {
margin-right: 184px;
......@@ -588,7 +588,7 @@ export default {
display: inline-block;
}
.label {
width: 7vw;
width: 6vw;
text-align: center;
border-left: 1px solid $border-color;
background: #f0f0f0;
......@@ -608,7 +608,10 @@ export default {
width: 4.5vw;
}
.subtask-info:nth-child(8) {
width: 4.5vw;
width: 4vw;
}
.subtask-info:nth-child(10) {
width: 12vw;
}
line-height: 40px;
border-bottom: 1px solid #f0f0f0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!