Commit 5cfbf6d1 by 夏新然

修改bug

1 parent fad2f3bd
NODE_ENV = 'development' NODE_ENV = 'development'
VUE_APP_URL = 'http://192.168.9.133:20080'
\ No newline at end of file \ No newline at end of file
VUE_APP_URL = 'http://vion-panda.51vip.biz:52510'
\ No newline at end of file \ No newline at end of file
import axios from 'axios' import axios from 'axios'
import store from '../store/index.js' import store from '../store/index.js'
import {Message,Loading} from 'element-ui'
let loading;
//内存中正在请求的数量
let loadingNum=0;
function startLoading() {
if(loadingNum==0){
loading = Loading.service({
lock: true,
text: '拼命加载中...',
background:'rgba(255,255,255,0.5)',
})
}
//请求数量加1
loadingNum++;
}
function endLoading() {
//请求数量减1
loadingNum--
if(loadingNum<=0){
loading.close()
}
}
// 创建 axios 实例 // 创建 axios 实例
let service = axios.create({ let service = axios.create({
// headers: {'Content-Type': 'application/json'}, // headers: {'Content-Type': 'application/json'},
...@@ -21,23 +43,31 @@ service.interceptors.request.use( ...@@ -21,23 +43,31 @@ service.interceptors.request.use(
...config.params ...config.params
} }
} }
startLoading();
return config return config
}, },
(error) => { (err) => {
// 请求错误处理 // 请求错误处理
return Promise.reject(error) return Promise.reject(err)
} }
) )
// 添加响应拦截器 // 添加响应拦截器
service.interceptors.response.use( service.interceptors.response.use(
(response) => { (response) => {
endLoading();
let { data } = response let { data } = response
return data return data
}, },
(error) => { (err) => {
console.log(error) endLoading();
return Promise.reject(error) if (err && err.response) {
Message.error({message: err.response.data.enote});
}else{
Message.error({message: '连接服务器失败!'});
}
return Promise.reject(err)
} }
) )
......
...@@ -3,7 +3,7 @@ import axios from "axios"; ...@@ -3,7 +3,7 @@ import axios from "axios";
console.log(process.env.NODE_ENV); console.log(process.env.NODE_ENV);
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": case "development":
baseUrl = "http://vion-panda.51vip.biz:52510"; // 测试环境url baseUrl = "/api"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086"; // baseUrl = "http://192.168.9.61:8086";
break; break;
case "pre": case "pre":
......
...@@ -22,6 +22,9 @@ export default { ...@@ -22,6 +22,9 @@ export default {
addRole(params){ addRole(params){
return api.post(`${baseUrl}/api/v1/auth/roles`, params) return api.post(`${baseUrl}/api/v1/auth/roles`, params)
}, },
unbindRole(params,id,id2){
return api.delete(`${baseUrl}/api/v1/auth/users/${id}/roles/${id2}`, params)
},
logList(params){ logList(params){
return api.get(`${baseUrl}/api/v1/devconf_fx/logs`, params) return api.get(`${baseUrl}/api/v1/devconf_fx/logs`, params)
}, },
......
...@@ -42,6 +42,9 @@ export default { ...@@ -42,6 +42,9 @@ export default {
editVideo(params,id,id2){ editVideo(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params) return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
}, },
addCamera(params,id){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans`, params)
},
editCamera(params,id,id2){ editCamera(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params) return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
}, },
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
border-radius: 5px; border-radius: 5px;
font-size: 16px; font-size: 16px;
} }
#login .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item{ #login .el-form-item--mini.el-form-item,#login .el-form-item--small.el-form-item{
margin-bottom: 28px!important; margin-bottom: 28px!important;
} }
.el-main{ .el-main{
......
...@@ -173,4 +173,13 @@ a:active{ ...@@ -173,4 +173,13 @@ a:active{
margin-left: 0px!important; margin-left: 0px!important;
margin-top: 6px!important; margin-top: 6px!important;
} }
// .treeWidth{
// display: inline-block;
// width: 50px;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
// word-break: break-all;
//
// }
} }
\ No newline at end of file \ No newline at end of file
...@@ -231,6 +231,13 @@ import types from '../store/types.js' ...@@ -231,6 +231,13 @@ import types from '../store/types.js'
}, },
created() { created() {
this.initHeight(); this.initHeight();
let _this=this;
document.onkeydown = function(e){
let _key = window.event.keyCode;
if(_key === 13){
_this.submitForm('ruleForm');
}
}
} }
} }
</script> </script>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
@current-change="treeChange" @current-change="treeChange"
show-checkbox show-checkbox
ref="addTree" ref="addTree"
node-key="unid" node-key="perm_unid"
:props="defaultProps"> :props="defaultProps">
</el-tree> </el-tree>
</el-form-item> </el-form-item>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
@current-change="treeChange" @current-change="treeChange"
show-checkbox show-checkbox
ref="editTree" ref="editTree"
node-key="unid" node-key="perm_unid"
:props="defaultProps"> :props="defaultProps">
</el-tree> </el-tree>
</el-form-item> </el-form-item>
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$api.ops.delUser({},row.unid).then(res=>{ this.$api.ops.delUser({},row.role_unid).then(res=>{
if(res.ecode==200){ if(res.ecode==200){
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -250,14 +250,15 @@ ...@@ -250,14 +250,15 @@
}); });
}, },
editUser(index,row){ editUser(index,row){
this.editVisible=true;
this.$refs.editTree.setCheckedKeys([]);
this.$api.ops.getPerms({ this.$api.ops.getPerms({
},row.role_unid).then(res=>{ },row.role_unid).then(res=>{
this.editForm.role_name=row.name; this.editForm.role_name=row.name;
res.list_data.forEach(item=>{ res.list_data.forEach(item=>{
this.editForm.menu_unids.push(item.perm_unid) this.$refs.editTree.setCheckedKeys([item.perm_unid]);
}) })
this.editUnid=row.role_unid; this.editUnid=row.role_unid;
this.editVisible=true;
}) })
}, },
openAddDialog(){ openAddDialog(){
...@@ -267,6 +268,7 @@ ...@@ -267,6 +268,7 @@
this.addVisible=true; this.addVisible=true;
}, },
addFun(formName){ addFun(formName){
this.addForm.menu_unids=[];
this.addForm.menu_unids=this.$refs.addTree.getCheckedKeys().sort((a, b) => { return a - b; }); this.addForm.menu_unids=this.$refs.addTree.getCheckedKeys().sort((a, b) => { return a - b; });
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
...@@ -302,6 +304,7 @@ ...@@ -302,6 +304,7 @@
}, },
editFun(formName){ editFun(formName){
this.editForm.menu_unids=[];
this.editForm.menu_unids=this.$refs.editTree.getCheckedKeys().sort((a, b) => { return a - b; }); this.editForm.menu_unids=this.$refs.editTree.getCheckedKeys().sort((a, b) => { return a - b; });
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
...@@ -313,7 +316,7 @@ ...@@ -313,7 +316,7 @@
type: 'success', type: 'success',
message: '修改成功!' message: '修改成功!'
}); });
this.addVisible=false; this.editVisible=false;
this.getTableList(); this.getTableList();
}else{ }else{
this.$message({ this.$message({
......
...@@ -183,6 +183,7 @@ ...@@ -183,6 +183,7 @@
editForm:{ editForm:{
role_unid:'', role_unid:'',
}, },
editRoleUnid:'',
editUnid:'', editUnid:'',
tableData: [], tableData: [],
addVisible:false, addVisible:false,
...@@ -317,6 +318,7 @@ ...@@ -317,6 +318,7 @@
}); });
}, },
editUser(index,row){ editUser(index,row){
this.editRoleUnid=row.roles[0].role_unid;
this.editForm.role_unid=row.roles[0].role_unid; this.editForm.role_unid=row.roles[0].role_unid;
this.editUnid=row.user_unid; this.editUnid=row.user_unid;
this.editVisible=true; this.editVisible=true;
...@@ -369,6 +371,7 @@ ...@@ -369,6 +371,7 @@
editFun(formName){ editFun(formName){
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.$api.ops.unbindRole({},this.editUnid,this.editRoleUnid).then(res=>{
this.$api.ops.bindRole({ this.$api.ops.bindRole({
role_unid:this.editForm.role_unid role_unid:this.editForm.role_unid
},this.editUnid).then(res=>{ },this.editUnid).then(res=>{
...@@ -386,6 +389,7 @@ ...@@ -386,6 +389,7 @@
}); });
} }
}) })
})
} else { } else {
return false; return false;
} }
......
...@@ -180,7 +180,8 @@ ...@@ -180,7 +180,8 @@
org_type:"address", org_type:"address",
unid:this.addVideoParam.addr_unid unid:this.addVideoParam.addr_unid
} }
this.$parent.submitLaterGet(data) this.$emit('getAllData',data)
// this.$parent.$parent.$parent.submitLaterGet(data)
this.cameraAddVisible=false; this.cameraAddVisible=false;
}else{ }else{
this.$message.error(res.enote); this.$message.error(res.enote);
...@@ -206,7 +207,7 @@ ...@@ -206,7 +207,7 @@
org_type:"address", org_type:"address",
unid:this.addVideoParam.addr_unid unid:this.addVideoParam.addr_unid
} }
this.$parent.submitLaterGet(data) this.$emit('getData',data)
this.cameraAddVisible=false; this.cameraAddVisible=false;
}else{ }else{
this.$message.error(res.enote); this.$message.error(res.enote);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
:visible.sync="addVisible" :visible.sync="addVisible"
width="450px"> width="450px">
<div> <div>
<el-form label-position="left" label-width="120px" :model="formData"> <el-form label-position="left" label-width="120px" :model="formData" :rules="rules" ref="addForm" hide-required-asterisk >
<el-form-item label="添加目标类型"> <el-form-item label="添加目标类型">
<el-select v-model="formData.targetType" placeholder="请选择" :popper-append-to-body=false> <el-select v-model="formData.targetType" placeholder="请选择" :popper-append-to-body=false>
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in targetOpt"> </el-option> <el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in targetOpt"> </el-option>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-form-item label="组织编号"> <el-form-item label="组织编号">
<el-input v-model="formData.code"></el-input> <el-input v-model="formData.code"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="组织名称"> <el-form-item label="组织名称" prop="name">
<el-input v-model="formData.name"></el-input> <el-input v-model="formData.name"></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<el-form-item label="地点编号"> <el-form-item label="地点编号">
<el-input v-model="formData.code"></el-input> <el-input v-model="formData.code"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="地点名称"> <el-form-item label="地点名称" prop="name">
<el-input v-model="formData.name"></el-input> <el-input v-model="formData.name"></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -61,20 +61,20 @@ ...@@ -61,20 +61,20 @@
:visible.sync="editVisible" :visible.sync="editVisible"
width="450px"> width="450px">
<div> <div>
<el-form label-position="left" label-width="120px" :model="editForm"> <el-form label-position="left" label-width="120px" :model="editForm" :rules="rules" hide-required-asterisk ref="editForm" >
<div v-if="editForm.targetType=='org'"> <div v-if="editForm.targetType=='org'">
<el-form-item label="组织编号"> <el-form-item label="组织编号">
<el-input v-model="editForm.code" disabled></el-input> <el-input v-model="editForm.code" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item label="组织名称"> <el-form-item label="组织名称" prop="name">
<el-input v-model="editForm.name"></el-input> <el-input v-model="editForm.name" ></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div v-else-if="editForm.targetType=='address'"> <div v-else-if="editForm.targetType=='address'">
<el-form-item label="地点编号"> <el-form-item label="地点编号">
<el-input v-model="editForm.code" disabled></el-input> <el-input v-model="editForm.code" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item label="地点名称"> <el-form-item label="地点名称" prop="name">
<el-input v-model="editForm.name"></el-input> <el-input v-model="editForm.name"></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<el-button type="primary" @click="editFinish">确 定</el-button> <el-button type="primary" @click="editFinish">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<addCamera ref="addCamera"></addCamera> <addCamera ref="addCamera" @getAllData="addCamareAfterGet"></addCamera>
</div> </div>
</template> </template>
...@@ -123,6 +123,13 @@ ...@@ -123,6 +123,13 @@
addVisible:false, addVisible:false,
editVisible:false, editVisible:false,
targetOpt:[], targetOpt:[],
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' },
{ min: 2, max: 9, message: '长度在 2 到 9 个字符', trigger: 'blur' }
],
},
dev_unid: sessionStorage.getItem('dev_unid'),
} }
}, },
components:{ components:{
...@@ -147,6 +154,9 @@ ...@@ -147,6 +154,9 @@
} }
}, },
methods:{ methods:{
addCamareAfterGet(data){
this.$emit('getData',data)
},
handleNodeClick(data){ handleNodeClick(data){
this.$emit('clickHandle',data,'camera'); this.$emit('clickHandle',data,'camera');
}, },
...@@ -171,7 +181,7 @@ ...@@ -171,7 +181,7 @@
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
}); });
this.$parent.$parent.getCameraTree(); this.$emit('getTree');
} }
}) })
}) })
...@@ -190,6 +200,8 @@ ...@@ -190,6 +200,8 @@
this.editVisible=true; this.editVisible=true;
}, },
editFinish(){ editFinish(){
this.$refs['editForm'].validate((valid) => {
if (valid) {
let cate_unid = this.getCustomCate('组织', 'residence'); let cate_unid = this.getCustomCate('组织', 'residence');
this.$api.resource.getCode({ this.$api.resource.getCode({
limit:9999 limit:9999
...@@ -207,15 +219,20 @@ ...@@ -207,15 +219,20 @@
}) })
} else { } else {
this.editVisible=false; this.editVisible=false;
this.$parent.$parent.getCameraTree(); this.$emit('getTree')
} }
}) })
}) })
} else {
return false;
}
});
}, },
nodeAddClick(node,data){ nodeAddClick(node,data){
if(data.org_type == 'address'){ if(data.org_type == 'address'){
//添加视频 //添加视频
this.$refs.addCamera.initDialog(node,'add',this.devsId) this.$refs.addCamera.initDialog(node,'add',this.dev_unid)
}else{ }else{
//添加组织关系 //添加组织关系
this.currentNodeId=data.unid; this.currentNodeId=data.unid;
...@@ -252,6 +269,8 @@ ...@@ -252,6 +269,8 @@
return window.localStorage.getItem(localKey); return window.localStorage.getItem(localKey);
}, },
save(){ save(){
this.$refs['addForm'].validate((valid) => {
if (valid) {
let cate_unid = this.getCustomCate('组织', 'residence'); let cate_unid = this.getCustomCate('组织', 'residence');
// console.log('添加节点分类unid:', cate_unid); // console.log('添加节点分类unid:', cate_unid);
if(cate_unid) { if(cate_unid) {
...@@ -269,6 +288,10 @@ ...@@ -269,6 +288,10 @@
} }
}) })
} }
} else {
return false;
}
});
}, },
orgServ() { orgServ() {
this.$api.resource.addNode({ this.$api.resource.addNode({
...@@ -288,7 +311,7 @@ ...@@ -288,7 +311,7 @@
message: '添加成功!' message: '添加成功!'
}) })
this.addVisible = false; this.addVisible = false;
this.$parent.$parent.getCameraTree(); this.$emit('getTree')
} }
}) })
......
<template> <template>
<div class="innnerBox"> <div class="innnerBox">
<el-row :gutter="12"> <el-row :gutter="12">
<el-col :span="4" class="treeBox minHeight"> <el-col :span="6" class="treeBox minHeight">
<el-input class="search-input" prefix-icon="el-icon-search" placeholder="请输入内容" v-model="searchText"> <el-input class="search-input" prefix-icon="el-icon-search" placeholder="请输入内容" v-model="searchText">
</el-input> </el-input>
<cameraTree :filterText="searchText" :treeDatas="cameraTree" @clickHandle="getTable"></cameraTree> <cameraTree :filterText="searchText" :treeDatas="cameraTree" @clickHandle="getTable" @getTree="getCameraTree" @getData="submitLaterGet"></cameraTree>
<videoTree :filterText="searchText" :treeDatas="videoTree" :devsId="dev_unid" @clickHandle="getTable"></videoTree> <videoTree :filterText="searchText" :treeDatas="videoTree" :devsId="dev_unid" @clickHandle="getTable" @getTree="getVideoTree"></videoTree>
</el-col> </el-col>
<el-col :span="20" > <el-col :span="18" >
<el-table :data="formattterData" stripe border v-if="tableType=='camera'" :height="tableHeight"> <el-table :data="formattterData" stripe border v-if="tableType=='camera'" :height="tableHeight">
<el-table-column prop="label" align="center" label="名称"> <el-table-column prop="label" align="center" label="名称">
</el-table-column> </el-table-column>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-col>
<cameraDialog ref="editCamera"></cameraDialog> <cameraDialog ref="editCamera" @getData="submitLaterGet"></cameraDialog>
<el-dialog <el-dialog
title="修改视频" title="修改视频"
:visible.sync="videoEditVisible" :visible.sync="videoEditVisible"
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<span class="selectBox"> <span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.plate_type" > <el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.plate_type" >
<el-option value="" label='全部'></el-option> <el-option value="" label='全部'></el-option>
<!-- <el-option v-for='item in vehicleTypeList' :value="item.code" :key="item.code" :label='item.name'></el-option> --> <el-option v-for='item in plateTypeList' :value="item.code" :key="item.code" :label='item.name'></el-option>
</el-select> </el-select>
</span> </span>
</el-form-item> </el-form-item>
...@@ -268,6 +268,7 @@ ...@@ -268,6 +268,7 @@
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'), vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
vehicleColorList:this.$buildCode.getCodeList('车身颜色'), vehicleColorList:this.$buildCode.getCodeList('车身颜色'),
illegalList:this.$buildCode.getCodeList('违法类型'), illegalList:this.$buildCode.getCodeList('违法类型'),
plateTypeList:this.$buildCode.getCodeList('号牌类型'),
tableData:[], tableData:[],
formattterData:[], formattterData:[],
total:0, total:0,
......
...@@ -50,12 +50,17 @@ ...@@ -50,12 +50,17 @@
</el-select> </el-select>
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="运营公司"> <el-form-item label="运营公司" v-show="conditions.event_type=='xcycle'">
<span class="inputBox"> <span class="inputBox">
<el-input placeholder="请输入公司名称" v-model="conditions.company"></el-input> <el-input placeholder="请输入公司名称" v-model="conditions.company"></el-input>
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="是否带盔"> <el-form-item label="车牌号码" v-show="conditions.event_type=='xcycle'">
<span class="inputBox">
<el-input placeholder="请输入车牌号码" v-model="conditions.plate"></el-input>
</span>
</el-form-item>
<el-form-item label="是否带盔" v-show="conditions.event_type=='xcycle'">
<span class="selectBox"> <span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.with_hats"> <el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.with_hats">
<el-option value="" label='全部'></el-option> <el-option value="" label='全部'></el-option>
...@@ -65,7 +70,27 @@ ...@@ -65,7 +70,27 @@
</el-select> </el-select>
</span> </span>
</el-form-item> </el-form-item>
<!-- <el-form-item label="上身颜色"> <el-form-item label="是否带帽" v-show="conditions.event_type=='pedestrian'">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.with_hats">
<el-option value="" label='全部'></el-option>
<el-option :value="0" :key="0" label='不确定'></el-option>
<el-option :value="1" :key="1" label='带帽'></el-option>
<el-option :value="2" :key="2" label='不带帽'></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="带口罩" v-show="conditions.event_type=='pedestrian'">
<span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.with_hats">
<el-option value="" label='全部'></el-option>
<el-option :value="0" :key="0" label='不确定'></el-option>
<el-option :value="1" :key="1" label='带口罩'></el-option>
<el-option :value="2" :key="2" label='不带口罩'></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item label="上身颜色" v-show="conditions.event_type=='pedestrian'">
<span class="selectBox"> <span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.upbodyColor"> <el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.upbodyColor">
<el-option value="" label='全部'></el-option> <el-option value="" label='全部'></el-option>
...@@ -73,19 +98,15 @@ ...@@ -73,19 +98,15 @@
</el-select> </el-select>
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="下身颜色"> <el-form-item label="下身颜色" v-show="conditions.event_type=='pedestrian'">
<span class="selectBox"> <span class="selectBox">
<el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.lobodyColor"> <el-select placeholder="请选择" :popper-append-to-body=false v-model="conditions.lobodyColor">
<el-option value="" label='全部'></el-option> <el-option value="" label='全部'></el-option>
<el-option v-for='item in bodyColorList' :value="item.value" :key="item.value" :label='item.label'></el-option> <el-option v-for='item in bodyColorList' :value="item.value" :key="item.value" :label='item.label'></el-option>
</el-select> </el-select>
</span> </span>
</el-form-item> -->
<el-form-item label="车牌号码" >
<span class="inputBox">
<el-input placeholder="请输入车牌号码" v-model="conditions.plate"></el-input>
</span>
</el-form-item> </el-form-item>
<el-form-item label="起始时间"> <el-form-item label="起始时间">
<span class="dateBox"> <span class="dateBox">
<el-date-picker <el-date-picker
...@@ -133,16 +154,38 @@ ...@@ -133,16 +154,38 @@
label="性别"> label="性别">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="conditions.event_type=='xcycle'"
prop="driver_face_with_hats" prop="driver_face_with_hats"
align="center" align="center"
label="是否带盔"> label="是否带盔">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="conditions.event_type=='pedestrian'"
prop="driver_face_with_hats"
align="center"
label="是否带帽">
</el-table-column>
<el-table-column
v-if="conditions.event_type=='pedestrian'"
prop="driver_face_upbody_text"
align="center"
label="上身颜色">
</el-table-column>
<el-table-column
v-if="conditions.event_type=='pedestrian'"
prop="driver_face_lobody_text"
align="center"
label="下身颜色">
</el-table-column>
<el-table-column
v-if="conditions.event_type=='xcycle'"
prop="xcycle_plate_text" prop="xcycle_plate_text"
align="center" align="center"
label="车牌号码"> label="车牌号码">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="conditions.event_type=='xcycle'"
prop="company" prop="company"
align="center" align="center"
label="运营公司"> label="运营公司">
...@@ -286,7 +329,9 @@ ...@@ -286,7 +329,9 @@
sex:'', sex:'',
company:'', company:'',
with_hats:'', with_hats:'',
plate:'' plate:'',
upbodyColor:'',
lobodyColor:''
}, },
brandList:this.$buildCode.getCodeList('车辆品牌'), brandList:this.$buildCode.getCodeList('车辆品牌'),
vehicleTypeList:this.$buildCode.getCodeList('车辆类型'), vehicleTypeList:this.$buildCode.getCodeList('车辆类型'),
...@@ -347,7 +392,7 @@ ...@@ -347,7 +392,7 @@
Math.random() + Math.random() +
"&event_type=" + "&event_type=" +
this.conditions.event_type + this.conditions.event_type +
"event_dt__gte=" + "&event_dt__gte=" +
this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss') + this.$moment(this.conditions.start_dt).utc().format('YYYY-MM-DD HH:mm:ss') +
"&event_dt__lt=" + "&event_dt__lt=" +
this.$moment(this.conditions.end_dt).utc().format('YYYY-MM-DD HH:mm:ss') + this.$moment(this.conditions.end_dt).utc().format('YYYY-MM-DD HH:mm:ss') +
...@@ -381,12 +426,10 @@ ...@@ -381,12 +426,10 @@
this.conditions.task_id + this.conditions.task_id +
"&subtask_id=" + "&subtask_id=" +
this.conditions.subtask_id + this.conditions.subtask_id +
"&company_like=" +
this.conditions.company +
"&with_hats=" + "&with_hats=" +
this.conditions.with_hats + this.conditions.with_hats +
"&plate_number__like=" + '&upbodyColor='+this.conditions.upbodyColor+
this.conditions.plate '&lobodyColor='+this.conditions.lobodyColor
} }
window.open( window.open(
encodeURI(url) encodeURI(url)
...@@ -476,12 +519,16 @@ ...@@ -476,12 +519,16 @@
subtask_id: this.conditions.subtask_id, subtask_id: this.conditions.subtask_id,
event_type: this.conditions.event_type, event_type: this.conditions.event_type,
sex: this.conditions.sex, sex: this.conditions.sex,
company_like:this.conditions.company, with_hats: this.conditions.with_hats
with_hats: this.conditions.with_hats,
plate_number__like: this.conditions.plate
} }
if( this.conditions.event_type=='xcycle'){ if( this.conditions.event_type=='xcycle'){
search_params.xcycle_type=this.conditions.xcycle_type; search_params.xcycle_type=this.conditions.xcycle_type;
search_params.company_like=this.conditions.company;
search_params.plate_number__like=this.conditions.plate;
}else{
search_params.upbodyColor=this.conditions.upbodyColor;
search_params.lobodyColor=this.conditions.lobodyColor;
} }
this.$api.search.tableList(search_params this.$api.search.tableList(search_params
).then((res)=>{ ).then((res)=>{
......
...@@ -8,5 +8,18 @@ module.exports = { ...@@ -8,5 +8,18 @@ module.exports = {
prependData: '@import "@/assets/scss/common.scss";' prependData: '@import "@/assets/scss/common.scss";'
} }
} }
},
devServer:{
proxy: {
"/api": {
target: "http://vion-panda.51vip.biz:52510", // 要访问的接口域名
ws: true, // 是否启用websockets
changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
pathRewrite: {
"^/api": "" //这里理解成用'/api'代替target里面的地址,比如我要调用'http://40.00.100.100:3002/user/add',直接写'/api/user/add'即可
} }
}
}
}
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!