修改event

This commit is contained in:
曹前明 2022-09-12 21:17:19 +08:00
parent cd07f46cb9
commit 1e76b8ee46
6 changed files with 27 additions and 56 deletions

View File

@ -7,8 +7,8 @@ VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
# 接口地址 # 接口地址
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api #VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
#VUE_APP_WS_API = 'ws://localhost:8000' #VUE_APP_WS_API = 'ws://localhost:8000'
#VUE_APP_API_BASEURL = http://10.99.5.79:20309/api VUE_APP_API_BASEURL = http://10.99.5.79:20309/api
VUE_APP_API_BASEURL = http://127.0.0.1:8000/api #VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
VUE_APP_BASEURL = http://127.0.0.1:8000 VUE_APP_BASEURL = http://127.0.0.1:8000
# 本地端口 # 本地端口

View File

@ -15,7 +15,7 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.keyword" v-model="query.search"
placeholder="编号/名称" placeholder="编号/名称"
clearable clearable
></el-input> ></el-input>
@ -162,21 +162,6 @@
@click="handleFormaccess('add')" @click="handleFormaccess('add')"
></el-button> ></el-button>
</div> </div>
<!-- <div class="right-panel">
<div class="right-panel-search">
<el-input
v-model="search.keyword"
placeholder="姓名/手机号"
clearable
@click="handleQuery"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</div> -->
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable <scTable
@ -306,9 +291,6 @@ export default {
apiObj: this.$API.am.area.list, apiObj: this.$API.am.area.list,
query: {}, query: {},
selection: [], selection: [],
search: {
keyword: null,
},
levels: { levels: {
10: "低风险", 10: "低风险",
20: "一般风险", 20: "一般风险",
@ -438,7 +420,7 @@ export default {
// //
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.search) this.$refs.table.queryData(this.query)
}, },
//ID //ID

View File

@ -64,39 +64,16 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发生区域" prop="area_.name"></el-table-column> <el-table-column label="发生区域" prop="area_.name"></el-table-column>
<el-table-column label="当事人" prop="employee_.name"> <el-table-column label="事件类型" prop="obj_cate">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.employee && scope.row.obj_cate == 'people'">{{ {{objCateOptions[scope.row.obj_cate]}}
scope.row.employee_.name
}}</span>
<span v-else>未知人员</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="事件对象">
<el-table-column label="人员类型" prop="employee_.type">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.employee && scope.row.obj_cate == 'people'"> <span v-if="scope.opl"></span>
<span <span v-else-if="scope.employee">
v-if=" {{eTypeOptions[scope.row.employee_.type]}}-{{scope.row.employee_.name}}
scope.row.employee_.type != '' &&
scope.row.employee_.type == 'employee'
"
>正式员工</span
>
<span
v-if="
scope.row.employee_.type != '' &&
scope.row.employee_.type == 'remployee'
"
>相关方</span
>
<span
v-if="
scope.row.employee_.type != '' &&
scope.row.employee_.type == 'visitor'
"
>访客</span
>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -166,6 +143,17 @@ export default {
return { return {
defaultTime: ['00:00:00', '23:59:59'], defaultTime: ['00:00:00', '23:59:59'],
timeRange: [], timeRange: [],
objCateOptions: {
'people':'人员',
'opl': '作业',
'other': '其他'
},
eTypeOptions:{
'employee': '正式员工',
'remployee': '相关方',
'visitor': '访客',
'driver': '司机'
},
cateOptions: [], cateOptions: [],
areaOptions: [], areaOptions: [],
dialog: { dialog: {

View File

@ -40,7 +40,7 @@
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="自主算法" prop="self_algo"> <el-form-item label="需布设" prop="self_algo">
<el-switch v-model="form.self_algo"></el-switch> <el-switch v-model="form.self_algo"></el-switch>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -55,7 +55,7 @@
</el-col> </el-col>
<el-col :md="12" :sm="24" :xs="24"> <el-col :md="12" :sm="24" :xs="24">
<el-form-item label="作业区域" prop="area"> <el-form-item label="作业区域" prop="area">
<el-select v-model="form.area" placeholder="选择作业区域" @change="areaChange"> <el-select v-model="form.area" placeholder="选择作业区域">
<el-option <el-option
v-for="item in areaoptions" v-for="item in areaoptions"
:key="item.id" :key="item.id"
@ -194,6 +194,7 @@ export default {
mounted() { mounted() {
this.getDept(); this.getDept();
this.getArea(); this.getArea();
this.getVchannels();
}, },
methods: { methods: {
//, //,
@ -218,8 +219,8 @@ export default {
this.coordinatoroptions = res; this.coordinatoroptions = res;
}); });
}, },
areaChange(val) { getVchannels(){
this.$API.third.tdevice.list.req({ type: 60, page: 0, area: val }).then((res) => { this.$API.third.tdevice.list.req({ type: 60, page: 0 }).then((res) => {
this.vchannelOptions = res; this.vchannelOptions = res;
}); });
}, },

View File

@ -296,7 +296,7 @@ export default {
'employee': '正式员工', 'employee': '正式员工',
'remployee': '相关方', 'remployee': '相关方',
'visitor': '访客', 'visitor': '访客',
'driver':'司机' 'driver':'货车司机'
}, },
userTypeOptions2: [ userTypeOptions2: [
{label:"正式员工", value:"employee"}, {label:"正式员工", value:"employee"},