Merge branch 'refs/heads/hyx_2024-9-29_tongbu' into pet
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,168 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form ref="form" v-model="form">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="相关方单位名称:">
|
||||
<el-input v-model="form.RELEVANT_UNIT_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">搜索</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="app-statistical">
|
||||
<span>
|
||||
培训合格总人数:<i>{{ personCount }}</i>
|
||||
</span>
|
||||
<span>
|
||||
培训合格人员证件即将过期人数:<i>{{ expireSoonPersonCount }}</i>
|
||||
</span>
|
||||
<span>
|
||||
培训合格人员证件已经过期人数:<i>{{ expiredPersonCount }}</i>
|
||||
</span>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="corpTypeName" label="集团单位" />
|
||||
<el-table-column prop="RELEVANT_UNIT_NAME" label="相关方单位名称" />
|
||||
<el-table-column label="属地">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.COMPANY_AREA">
|
||||
{{ row.COMPANY_AREA.replaceAll(',',' ') }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="MAIN_DEPARTMENT_NAME" label="股份主管部门" width="200" />
|
||||
<el-table-column prop="SUPERVISE_CORPINFO_NAME" label="基层单位主管公司" width="200" />
|
||||
<el-table-column prop="SUPERVISE_DEPARTMENT_NAME" label="基层单位主管部门" width="200" />
|
||||
<el-table-column prop="userCount" label="人员数"/>
|
||||
<el-table-column prop="trainingQualifiedCount" label="参与培训合格人员数"/>
|
||||
<el-table-column prop="expireSoonCount" label="证件即将过期人员数"/>
|
||||
<el-table-column prop="expiredCount" label="证件已过期人员数"/>
|
||||
|
||||
<el-table-column label="操作" align="left" width="110">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="success" icon="el-icon-view" size="mini" @click="handleEdit(row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { requestFN } from '@/utils/request'
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
export default{
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return{
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
areaList: [], // 省市县列表
|
||||
placeList: [],
|
||||
listLoading: true,
|
||||
varList: [],
|
||||
total: 0,
|
||||
title: '',
|
||||
isShow: false,
|
||||
form: {
|
||||
RELEVANT_UNIT_NAME: '',
|
||||
CREATE_TIME: '', // 数据创建时间
|
||||
CREATOR: '', // 数据创建人
|
||||
OPERAT_TIME: '', // 数据更新时间
|
||||
OPERATOR: '', // 数据更新人
|
||||
ISDELETE: '', // 删除标志位
|
||||
CORPINFO_ID: '', // 企业id
|
||||
CLASS_NAME: '', // 班级名称
|
||||
OPENING_TIME: '', // 开班时间
|
||||
PLACE: '', // 培训地点
|
||||
TRAINING_TYPE: '', // 培训类型
|
||||
CLASS_SIZE: '', // 班级容量
|
||||
TRAINEES_NUM: '', // 培训人员数量
|
||||
CLASS_STATUS: ''// 班级状态(0-待开班、1-已开班、2-完成)
|
||||
},
|
||||
personCount: '',
|
||||
expireSoonPersonCount: '',
|
||||
expiredPersonCount: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
CLASS_NAME: '', // 班级名称
|
||||
OPENING_TIME: '', // 开班时间
|
||||
PLACE: '', // 培训地点
|
||||
TRAINING_TYPE: '', // 培训类型
|
||||
CLASS_SIZE: '', // 班级容量
|
||||
TRAINEES_NUM: '', // 培训人员数量
|
||||
CLASS_STATUS: ''// 班级状态(0-待开班、1-已开班、2-完成)
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 详情
|
||||
handleEdit(row) {
|
||||
this.$parent.activeName = 'corpUserList'
|
||||
this.$parent.CORPINFO_ID = row.CORPINFO_ID
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/classMessage/cardOverdueList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, this.form
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.personCount = data.personCount
|
||||
this.expireSoonPersonCount = data.expireSoonPersonCount
|
||||
this.expiredPersonCount = data.expiredPersonCount
|
||||
this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,542 @@
|
|||
<template>
|
||||
<div class="icons-container">
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-form label-width="180px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用户名" prop="USERNAME">
|
||||
<el-input v-model="searchForm.USERNAME" placeholder="用户名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="NAME">
|
||||
<el-input v-model="searchForm.NAME" placeholder="姓名"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="证件状态" prop="CARD_STATUS">
|
||||
<el-select v-model="searchForm.CARD_STATUS" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="未过期" value="0" />
|
||||
<el-option label="即将过期" value="2" />
|
||||
<el-option label="已过期" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item>
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="USERNAME" label="用户名" />
|
||||
<el-table-column prop="NAME" label="姓名" />
|
||||
<el-table-column prop="BELONG_TO_CORP_NAME" label="相关方名称" />
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="部门"/>
|
||||
<el-table-column prop="CLASS_NO" label="人员编号"/>
|
||||
<el-table-column prop="VALIDITY_PERIOD_END" label="证件到期日"/>
|
||||
|
||||
<el-table-column prop="VALIDITY_PERIOD_END" label="证件状态">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="getCardStatus(row.VALIDITY_PERIOD_END) == 0" :style="{color: 'green'}">未过期</span>
|
||||
<span v-if="getCardStatus(row.VALIDITY_PERIOD_END) == 2" :style="{color: 'orange'}">即将过期</span>
|
||||
<span v-if="getCardStatus(row.VALIDITY_PERIOD_END) == 1" :style="{color: 'red'}">已过期</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="left" width="150">
|
||||
<template slot-scope="{row}">
|
||||
<el-button v-if="row.ACCOUNT_TYPE != 0" type="success" icon="el-icon-view" size="mini" @click="toUserDetail(row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<div class="heightt"/>
|
||||
<div class="subdy-foot">
|
||||
<el-row style="text-align: center">
|
||||
<el-button @click="goBack">返回</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<UserBaseInfoView ref="userbaseinfoview" :base_info_url="baseInfourl"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import UserBaseInfoView from '@/components/UserBaseInfo/UserBaseInfoView'
|
||||
|
||||
export default {
|
||||
components: { Pagination, SelectTree, UserBaseInfoView },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
userId: this.$parent.USER_ID_T,
|
||||
baseInfourl: '/unitPersonManagement/getCorpUserDetail',
|
||||
treeLoading: false,
|
||||
listLoading: false,
|
||||
add: true,
|
||||
del: true,
|
||||
edit: true,
|
||||
readonly: true,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
searchForm: {
|
||||
CARD_STATUS:'',
|
||||
DEPARTMENT_ID: '',
|
||||
USERNAME: '',
|
||||
NAME: '',
|
||||
DEPTNAME: '',
|
||||
AUDIT_STATE: '',
|
||||
ISFLOW: '',
|
||||
DEPART_STATE: '',
|
||||
AGE: '',
|
||||
IS_SIGN_LABOR: '',
|
||||
IS_INJURIES_PAY: '',
|
||||
ISPAY: '',
|
||||
IS_LEVEL_THREE: '',
|
||||
IS_SAFETY_TELL: '',
|
||||
IS_SPECIAL_JOB: ''
|
||||
},
|
||||
userForm: {
|
||||
PARENT_ID: '',
|
||||
USER_ID: '',
|
||||
DEPARTMENT_ID: '',
|
||||
DEPTNAME: '',
|
||||
USERNAME: '',
|
||||
NAME: ''
|
||||
},
|
||||
DEPARTMENT_ID: '',
|
||||
total: 0,
|
||||
PARENT_ID: '0', // 上级ID
|
||||
varList: [],
|
||||
qyztList: [],
|
||||
options: [{
|
||||
value: '0',
|
||||
label: '启用'
|
||||
}, {
|
||||
value: '1',
|
||||
label: '禁用'
|
||||
}],
|
||||
STATE: [],
|
||||
industryList: [],
|
||||
countryList: [],
|
||||
villageList: [],
|
||||
treeData: [],
|
||||
CITY_CODE: '',
|
||||
COUNTRY: '',
|
||||
VILLAGE: '',
|
||||
config: config,
|
||||
dialogFormEdit: false,
|
||||
rules: {
|
||||
DEPTNAME: [{ required: true, message: '分公司名称不能为空', trigger: 'blur' }],
|
||||
USERNAME: [{ required: true, message: '用户名不能为空', trigger: 'blur' }],
|
||||
NAME: [{ required: true, message: '姓名不能为空', trigger: 'blur' }]
|
||||
},
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
},
|
||||
workTypeList: [] // 工种
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
this.getList()
|
||||
this.getTreeList()
|
||||
},
|
||||
methods: {
|
||||
getCardStatus(VALIDITY_PERIOD_END){
|
||||
const nowDate = new Date()
|
||||
const nextDate = new Date((new Date).getFullYear() + '-' + ((new Date).getMonth() + 3) + '-' + (new Date).getDate())
|
||||
console.log('当前时间 ==>'+nowDate)
|
||||
console.log('两个月后的时间 ==>'+nextDate)
|
||||
console.log('证件到期日 ==>'+new Date(VALIDITY_PERIOD_END))
|
||||
if (nowDate > new Date(VALIDITY_PERIOD_END)){
|
||||
return 1
|
||||
}else if (new Date(VALIDITY_PERIOD_END) > nowDate && new Date(VALIDITY_PERIOD_END) < nextDate){
|
||||
return 2
|
||||
}else {
|
||||
return 0
|
||||
}
|
||||
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
handleNodeClick(node, data, value) {
|
||||
this.searchForm.DEPARTMENT_ID = node.id
|
||||
this.getList(node.id)
|
||||
},
|
||||
// 获取数据字典数据
|
||||
getDict() {
|
||||
requestFN(
|
||||
'dictionaries/getLevels',
|
||||
{ DICTIONARIES_ID: '55484e491a5e442d839c4595380713ec' }
|
||||
).then((data) => {
|
||||
this.workTypeList = data.list
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/classMessage/personList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
CORPINFO_ID: this.$parent.CORPINFO_ID,
|
||||
NAME: this.searchForm.NAME,
|
||||
USERNAME: this.searchForm.USERNAME,
|
||||
CARD_STATUS: this.searchForm.CARD_STATUS
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
getDeptList(DEPARTMENT_ID) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
this.DEPARTMENT_ID = DEPARTMENT_ID
|
||||
requestFN(
|
||||
'/department/findByDeptId?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
DEPARTMENT_ID: this.searchForm.DEPARTMENT_ID,
|
||||
KEYWORDS: this.searchForm.KEYWORDS
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.form.PARENT_ID = data.PARENT_ID
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
getRowKey(row) {
|
||||
return row.USER_ID
|
||||
},
|
||||
goReturn() {
|
||||
this.$parent.activeName = 'CorpInfoList'
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.getList()
|
||||
},
|
||||
getTreeList() {
|
||||
this.treeLoading = true
|
||||
requestFN(
|
||||
'/xgf/department/listzTree',
|
||||
{
|
||||
CORPINFO_ID: this.$parent.CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.treeLoading = false
|
||||
this.treeData = JSON.parse(data.zTreeNodes)
|
||||
}).catch((e) => {
|
||||
this.treeLoading = false
|
||||
})
|
||||
},
|
||||
getCountryList() {
|
||||
requestFN(
|
||||
'/dictionaries/getLevels',
|
||||
{
|
||||
DICTIONARIES_ID: this.CITY_CODE
|
||||
}
|
||||
).then((data) => {
|
||||
this.countryList = data.list
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
getVillageList(value, id) {
|
||||
this.COUNTRY = value
|
||||
requestFN(
|
||||
'/dictionaries/getLevels',
|
||||
{
|
||||
DICTIONARIES_ID: id
|
||||
}
|
||||
).then((data) => {
|
||||
this.villageList = data.list
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
changeVillage(village) {
|
||||
this.VILLAGE = village
|
||||
},
|
||||
// 查看
|
||||
toUserDetail(ROW) {
|
||||
this.$refs.userbaseinfoview.openWindow(ROW.USER_ID, ROW.CORPINFO_ID)
|
||||
},
|
||||
userEdit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/user/editCorpUser',
|
||||
{
|
||||
...this.userForm
|
||||
}
|
||||
).then((data) => {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogFormEdit = false
|
||||
this.getList()
|
||||
}).catch((e) => { this.listLoading = false })
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(id, name) {
|
||||
this.$confirm('确定要删除[' + name + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/user/deleteCorpUser',
|
||||
{
|
||||
USER_ID: id
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result == 'success') {
|
||||
this.listLoading = false
|
||||
this.getList()
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'CardOverdueList'
|
||||
},
|
||||
enableORDisable(ISUSE, CORPINFO_ID) {
|
||||
this.$confirm(ISUSE === '0' ? '确定要启用该账户吗?' : '确定要禁用该账户吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/corpinfo/editisuse',
|
||||
{
|
||||
CORPINFO_ID,
|
||||
ISUSE
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: ISUSE === '0' ? '启用成功' : '禁用成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
var keys = 'corpinfo:add,corpinfo:del,corpinfo:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.corpinfofhadminadd // 新增权限
|
||||
this.del = data.corpinfofhadmindel // 删除权限
|
||||
this.edit = data.corpinfofhadminedit // 权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.searchForm = {
|
||||
DEPARTMENT_ID: '',
|
||||
USERNAME: '',
|
||||
NAME: '',
|
||||
DEPTNAME: '',
|
||||
AUDIT_STATE: '',
|
||||
ISFLOW: '',
|
||||
DEPART_STATE: '',
|
||||
AGE: '',
|
||||
IS_SIGN_LABOR: '',
|
||||
IS_INJURIES_PAY: '',
|
||||
ISPAY: '',
|
||||
IS_LEVEL_THREE: '',
|
||||
IS_SAFETY_TELL: '',
|
||||
IS_SPECIAL_JOB: ''
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
resetPwd(id) {
|
||||
this.$confirm('确定要重置选中的密码吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/corpinfo/resetPwd',
|
||||
{
|
||||
CORPINFO_ID: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '重置成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 获取数据字典
|
||||
getDicList(list, DICTIONARIES_ID) {
|
||||
requestFN(
|
||||
'/dictionaries/getLevels',
|
||||
{
|
||||
DICTIONARIES_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this[list] = data.list
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
translate(list, id) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].BIANMA === id || list[i].DICTIONARIES_ID === id) {
|
||||
return list[i].NAME
|
||||
}
|
||||
}
|
||||
},
|
||||
showBranchName(CORPINFO_ID, CORP_NAME) {
|
||||
this.$refs.form && this.$refs.form.resetFields()
|
||||
this.dialogFormEdit = true
|
||||
this.updateBranchNameForm.CORPINFO_ID = CORPINFO_ID
|
||||
this.updateBranchNameForm.CORP_NAME = CORP_NAME
|
||||
},
|
||||
updateBranchName(ID) {
|
||||
requestFN(
|
||||
'/department/listTreeCorpInfo',
|
||||
{
|
||||
CORPINFO_ID: ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.treeData = JSON.parse(data.zTreeNodes)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
// 转换企业状态
|
||||
formatLabel(row, type) {
|
||||
if (type === '0') {
|
||||
const special = row.IS_SPECIAL_JOB
|
||||
if (special === '1') {
|
||||
return '特殊工种'
|
||||
} else if (special === '0') {
|
||||
return '非特殊工种'
|
||||
} else {
|
||||
return special
|
||||
}
|
||||
} else if (type === '1') {
|
||||
const flow = row.ISFLOW
|
||||
if (flow === '1') {
|
||||
return '流动人员'
|
||||
} else if (flow === '0') {
|
||||
return '非流动人员'
|
||||
} else {
|
||||
return flow
|
||||
}
|
||||
} else if (type === '2') {
|
||||
const depart = row.DEPART_STATE
|
||||
if (depart === '1') {
|
||||
return '离职'
|
||||
} else if (depart === '0') {
|
||||
return '在职'
|
||||
} else {
|
||||
return depart
|
||||
}
|
||||
} else if (type === '3') {
|
||||
const audit = row.AUDIT_STATE
|
||||
if (audit === '0') {
|
||||
return '已打回'
|
||||
} else if (audit === '1') {
|
||||
return '待审核'
|
||||
} else if (audit === '2') {
|
||||
return '审核通过'
|
||||
} else {
|
||||
return audit
|
||||
}
|
||||
} else if (type === '5') {
|
||||
const train_status = row.STATUS
|
||||
if (train_status == 0) {
|
||||
return '未培训'
|
||||
} else if (train_status === 1) {
|
||||
return '培训中'
|
||||
} else if (train_status === 2) {
|
||||
return '培训通过'
|
||||
} else if (train_status === -1) {
|
||||
return '培训未通过'
|
||||
} else {
|
||||
return '未培训'
|
||||
}
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||
<template>
|
||||
<component :is="activeName" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CardOverdueList from './components/cardOverdueList'
|
||||
import CorpUserList from './components/corpUserList'
|
||||
export default {
|
||||
components: {
|
||||
CardOverdueList: CardOverdueList,
|
||||
CorpUserList: CorpUserList,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'CardOverdueList',
|
||||
CORPINFO_ID: '',
|
||||
USER_ID: '',
|
||||
USER_ID_T: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -407,6 +407,22 @@ export default {
|
|||
},
|
||||
getShowPicture(row) {
|
||||
return row.PHOTO && row.PHOTO !== ''
|
||||
},
|
||||
// 查看详情
|
||||
cardOverduePerson(e) {
|
||||
this.loading = true
|
||||
this.visible = true
|
||||
requestFN(
|
||||
'/classMessage/cardOverduePerson',
|
||||
{
|
||||
CORPINFO_ID : e.CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.peopleList = data.varList
|
||||
this.loading = false
|
||||
}).catch((e) => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ export default {
|
|||
})
|
||||
},
|
||||
getShowPicture(row) {
|
||||
if (row.PHOTO && row.PHOTO !== '' && (row.PHOTO.indexOf('.jpg') >= 0 || row.PHOTO.indexOf('.png') >= 0 || row.PHOTO.indexOf('.jpeg') >= 0)) {
|
||||
if (row.PHOTO && row.PHOTO != '' ) {
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,528 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="关键字搜索">
|
||||
<el-input v-model="KEYWORDS" placeholder="搜索摄像头名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="name" label="视频名称" />
|
||||
<el-table-column prop="regionName" label="公司" />
|
||||
<el-table-column prop="regionPathName" label="区域" />
|
||||
<el-table-column prop="POSITION" label="状态" width="100">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.LATITUDE && row.LONGITUDE">已定位</span>
|
||||
<span v-else>未定位</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="500px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button v-show="!row.PLATFORMDOORVIDEO_ID" type="success" icon="el-icon-edit" size="mini" @click="handleIn(row)">加入</el-button>
|
||||
<el-button v-show="row.PLATFORMDOORVIDEO_ID" type="warning" size="mini" style="margin: 0;" @click="getRelevanceDoor(row)">查询绑定</el-button>
|
||||
<el-button type="success" icon="el-icon-caret-right" size="mini" @click="showVideo(row)">播放</el-button>
|
||||
<el-button type="warning" size="mini" @click="getRTSP(row)">获取rtsp地址</el-button>
|
||||
<el-button type="info" icon="el-icon-location-information" size="mini" @click="handleMap(row)">定位</el-button>
|
||||
<el-button v-show="row.LATITUDE && row.LONGITUDE" type="danger" icon="el-icon-delete" size="mini" @click="handleDel(row)">删除定位</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
<el-dialog v-if="dialogVideoHLS" :visible.sync="dialogVideoHLS" :before-close="handleBack" title="视频" width="600px">
|
||||
<div id="aLiVideoPlayer" class="prism-player"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormMap" title="定位" width="1050px" class="dy-dialog">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-form-item label="所属企业" prop="CORPINFO_ID">
|
||||
<el-select v-model="form.CORPINFO_ID" placeholder="请选择申请状态" clearable >
|
||||
<el-option v-for="item in corpList" :key="item.CORPINFO_ID" :label="item.CORP_NAME" :value="item.CORPINFO_ID" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div id="map" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<span>经度:</span>
|
||||
<el-input v-model="form.LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled />
|
||||
<span>纬度:</span>
|
||||
<el-input v-model="form.LATITUDE" style="width: 200px" placeholder="请输入内容" disabled />
|
||||
<el-button @click="dialogFormMap = false">取 消</el-button>
|
||||
<el-button type="primary" @click="setPosition">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 反查重点工程 -->
|
||||
<el-dialog
|
||||
:visible.sync="doorListVisible"
|
||||
:title="'绑定列表'"
|
||||
width="80%">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="doorList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="DOOR_NAME" label="门口门禁名称" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="STATUS" label="状态" width="100" >
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.STATUS == 0">正常</span>
|
||||
<span v-if="row.STATUS == 1">停用</span>
|
||||
<span v-if="row.STATUS == 2">临时关闭</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="400">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="untie(row.DOOR_VIDEO_ID)">解绑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="doorListVisible = false">返 回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 反查重点工程END -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import TiandiMap from '../../../components/TianMap/TiandiMap'
|
||||
export default {
|
||||
components: { Pagination, TiandiMap },
|
||||
directives: { waves },
|
||||
data() {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
return {
|
||||
map: null,
|
||||
marker: null,
|
||||
BMap: '',
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
doorListVisible: false, // 重点工程
|
||||
controlRowTemp: null, // 正在操作的row,用于删除后刷新
|
||||
doorList: [], // 重点工程
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
tempList: [],
|
||||
varList: [],
|
||||
dialogVideoHLS: false,
|
||||
player: {},
|
||||
dialogFormMap: false,
|
||||
corpList: [],
|
||||
form: {},
|
||||
rules: {
|
||||
CORPINFO_ID: [
|
||||
{ required: true, message: '请选择企业', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.getCorpList()
|
||||
await this.getAllList()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.PERSONNELMANAGEMENT_ID
|
||||
},
|
||||
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
},
|
||||
goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getQuery()
|
||||
},
|
||||
|
||||
getCorpList() {
|
||||
requestFN(
|
||||
'/corpinfo/listAll',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.corpList = data.varList
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
|
||||
getAllList() {
|
||||
return new Promise(resolve => {
|
||||
requestFN(
|
||||
'/platform/door/video/listAll',
|
||||
{ }
|
||||
).then((data) => {
|
||||
this.tempList = data.varList
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/platform/door/video/platformList',
|
||||
{
|
||||
'pageNo': this.listQuery.page,
|
||||
'pageSize': this.listQuery.limit,
|
||||
'name': this.KEYWORDS
|
||||
}
|
||||
).then((res) => {
|
||||
this.listLoading = false
|
||||
const tempList = res.data.list
|
||||
tempList.forEach(item => {
|
||||
for (let i = 0; i < this.tempList.length; i++) {
|
||||
if (item.indexCode === this.tempList[i].INDEXCODE) {
|
||||
item.PLATFORMDOORVIDEO_ID = this.tempList[i].PLATFORMDOORVIDEO_ID
|
||||
item.LONGITUDE = this.tempList[i].LONGITUDE
|
||||
item.LATITUDE = this.tempList[i].LATITUDE
|
||||
item.CORPINFO_ID = this.tempList[i].CORPINFO_ID
|
||||
}
|
||||
}
|
||||
})
|
||||
this.varList = tempList
|
||||
this.total = res.data.total
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
handleIn(row) {
|
||||
this.$confirm('确认将[' + row.name + ']加入系统吗', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/platform/door/video/add',
|
||||
{
|
||||
INDEXCODE: row.indexCode,
|
||||
REGIONINDEXCODE: row.regionIndexCode,
|
||||
EXTERNALINDEXCODE: row.externalIndexCode,
|
||||
NAME: row.name,
|
||||
CAMERATYPE: row.cameraType,
|
||||
CASCADECODE: row.cascadeCode,
|
||||
DECODETAG: row.decodeTag,
|
||||
RESOURCETYPE: row.resourceType,
|
||||
CREATETIME: row.createTime,
|
||||
UPDATETIME: row.updateTime,
|
||||
SORT: row.sort,
|
||||
DISORDER: row.disOrder,
|
||||
RECORDLOCATION: row.recordLocation,
|
||||
CASCADETYPE: row.cascadeType,
|
||||
REGIONNAME: row.regionName,
|
||||
REGIONPATH: row.regionPath,
|
||||
REGIONPATHNAM: row.regionPathName
|
||||
}
|
||||
).then(async() => {
|
||||
this.$message({
|
||||
message: '加入成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
await this.getAllList()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
setPosition() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
this.dialogFormMap = false
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/platform/door/video/savePosition',
|
||||
this.form
|
||||
).then(async(data) => {
|
||||
await this.getAllList()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 播放
|
||||
showVideo(row) {
|
||||
requestFN(
|
||||
'/platform/door/video/getHlsPath',
|
||||
{
|
||||
INDEXCODE: row.indexCode
|
||||
}
|
||||
).then((res) => {
|
||||
this.dialogVideoHLS = true
|
||||
this.$nextTick(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
this.player = new Aliplayer({
|
||||
'id': 'aLiVideoPlayer',
|
||||
'source': res.data.url,
|
||||
'width': '100%',
|
||||
'height': '500px',
|
||||
'autoplay': true,
|
||||
'isLive': true,
|
||||
'rePlay': false,
|
||||
'playsinline': true,
|
||||
'preload': true,
|
||||
'controlBarVisibility': 'hover',
|
||||
'useH5Prism': true
|
||||
}, function(player) {
|
||||
console.log('The player is created')
|
||||
})
|
||||
})
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
getRTSP(row) {
|
||||
requestFN(
|
||||
'/platform/door/video/getRtspPath',
|
||||
{
|
||||
INDEXCODE: row.indexCode
|
||||
}
|
||||
).then((res) => {
|
||||
this.notify(res.data.url)
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(row) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/platform/door/video/delLocation',
|
||||
{
|
||||
PLATFORMDOORVIDEO_ID: row.PLATFORMDOORVIDEO_ID
|
||||
}
|
||||
).then(async(res) => {
|
||||
// this.dialogVideoHLS = true
|
||||
await this.getAllList()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
handleMap(row) {
|
||||
this.dialogFormMap = true
|
||||
this.form = {
|
||||
PLATFORMDOORVIDEO_ID: row.PLATFORMDOORVIDEO_ID,
|
||||
CORPINFO_ID: row.CORPINFO_ID,
|
||||
INDEXCODE: row.indexCode,
|
||||
REGIONINDEXCODE: row.regionIndexCode,
|
||||
EXTERNALINDEXCODE: row.externalIndexCode,
|
||||
NAME: row.name,
|
||||
LONGITUDE: row.LONGITUDE,
|
||||
LATITUDE: row.LATITUDE,
|
||||
CAMERATYPE: row.cameraType,
|
||||
CASCADECODE: row.cascadeCode,
|
||||
DECODETAG: row.decodeTag,
|
||||
RESOURCETYPE: row.resourceType,
|
||||
CREATETIME: row.createTime,
|
||||
UPDATETIME: row.updateTime,
|
||||
SORT: row.sort,
|
||||
DISORDER: row.disOrder,
|
||||
RECORDLOCATION: row.recordLocation,
|
||||
CASCADETYPE: row.cascadeType,
|
||||
REGIONNAME: row.regionName,
|
||||
REGIONPATH: row.regionPath,
|
||||
REGIONPATHNAM: row.regionPathName
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化天地图对象
|
||||
*/
|
||||
initTDT() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.T) {
|
||||
console.log('天地图初始化成功...')
|
||||
resolve(window.T)
|
||||
reject('error')
|
||||
}
|
||||
}).then(T => {
|
||||
window.T = T
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 初始化地图
|
||||
* @param {*} lng 经度
|
||||
* @param {*} lat 纬度
|
||||
* @param {*} zoom 缩放比例(1~18)
|
||||
*/
|
||||
initMap(lng, lat, zoom) {
|
||||
this.initTDT().then((T) => {
|
||||
const imageURL = 'http://t0.tianditu.gov.cn/img_w/wmts?' + 'SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles' + '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce'
|
||||
// 创建自定义图层对象
|
||||
this.lay = new window.T.TileLayer(imageURL, { minZoom: 1, maxZoom: 18 })
|
||||
// 初始化地图对象
|
||||
this.map = new window.T.Map('map')
|
||||
this.initCenter(lng, lat, zoom)
|
||||
})
|
||||
},
|
||||
initCenter(lng, lat, zoom) {
|
||||
// 设置显示地图的中心点和级别
|
||||
if (!this.form.LONGITUDE && !this.form.LATITUDE) {
|
||||
this.map.centerAndZoom(new window.T.LngLat(119.58, 39.94), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
} else {
|
||||
this.map.centerAndZoom(new window.T.LngLat(lng, lat), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.form.LONGITUDE = lng
|
||||
this.form.LATITUDE = lat
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(lng, lat))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
}
|
||||
// 创建卫星和路网的混合视图
|
||||
this.map.setMapType(window.TMAP_HYBRID_MAP)
|
||||
// 允许鼠标滚轮缩放地图
|
||||
this.map.enableScrollWheelZoom()
|
||||
// 允许鼠标移动地图
|
||||
this.map.enableInertia()
|
||||
// 向地图上添加标注
|
||||
this.map.addEventListener('click', this.MapClick)
|
||||
},
|
||||
MapClick(event) {
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.form.LONGITUDE = event.lnglat.getLng()
|
||||
this.form.LATITUDE = event.lnglat.getLat()
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
},
|
||||
|
||||
back() {
|
||||
this.dialogVideoHLS = false
|
||||
this.player.dispose()
|
||||
},
|
||||
|
||||
handleBack() {
|
||||
this.player.dispose()
|
||||
this.dialogVideoHLS = false
|
||||
},
|
||||
async getRelevanceDoor(row) {
|
||||
this.listLoading = true
|
||||
this.doorListVisible = true
|
||||
this.controlRowTemp = row
|
||||
this.doorList = []
|
||||
requestFN(
|
||||
'/mkmjDoorVideo/getRelevanceDoor',
|
||||
{
|
||||
VIDEO_ID: row.PLATFORMDOORVIDEO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.doorList = data.varList
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
async untie(id) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDoorVideo/delete',
|
||||
{
|
||||
DOOR_VIDEO_ID: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getRelevanceDoor(this.controlRowTemp)
|
||||
this.listLoading = false
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#map{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,278 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="level-title">
|
||||
<h1>{{ this.$parent.DEVICE_ID == '' ? "新增" : "修改" }}</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-form v-loading="dialogFormVisible" ref="form" :model="form" :rules="rules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="绑定设备:" prop="DEVICE_ID">
|
||||
<el-select v-model="form.DEVICE_ID" filterable clearable style="width: 100%;" @change="getDockDeviceInfo">
|
||||
<el-option v-for="item in deviceList" :key="item.DEVICE_ID" :value="item.DEVICE_ID" :label="item.DEVICE_NAME"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button v-if="!form.DEVICE_ID" style="position: relative; left: 10%" type="danger" icon="el-icon-price-tag" size="mini">请进行设备绑定</el-button>
|
||||
<el-button v-else-if="form.DEVICE_ID" style="position: relative; left: 10%" type="success" icon="el-icon-price-tag" size="mini" @click="handleOpen()">查看绑定数据信息</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="进出类型:" prop="TYPE">
|
||||
<el-select v-model="form.TYPE" filterable clearable style="width: 100%;">
|
||||
<el-option v-for="item in typeList" :key="item.NAME" :value="item.VALUE" :label="item.NAME"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button type="success" @click="confirm">保 存</el-button>
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
<!-- 设备 -->
|
||||
<el-dialog v-if="dialogDoor" :visible.sync="dialogDoor" title="设备信息" width="600px">
|
||||
<el-form v-loading="dialogFormVisible" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="设备名称:" prop="DEVICE_NAME">
|
||||
<el-input v-model="deviceForm.DEVICE_NAME" disabled placeholder="设备名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="对接设备名称:" prop="DEVICE_NAME">
|
||||
<el-input v-model="deviceForm.DOCK_DEVICE_NAME" disabled placeholder="设备名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="所属口门名称:" prop="DOOR_NAME">
|
||||
<el-input v-model="deviceForm.DOCK_DOOR_NAME" disabled placeholder="所属口门名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="所属通道名称:" prop="PATH_NAME">
|
||||
<el-input v-model="deviceForm.DOCK_PATH_NAME" disabled placeholder="所属通道名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="position: relative; top: 10px">
|
||||
<el-button @click="dialogDoor = false">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
DEVICE_NAMES: '',
|
||||
deviceListQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
DOOR_TYPE: '',
|
||||
doorTotal: 0,
|
||||
deviceList: [],
|
||||
doorFilterText: '',
|
||||
dialogDoor: false,
|
||||
dialogFormVisible: false,
|
||||
dialogTableVisible: false,
|
||||
PERSON_CHARGE: '',
|
||||
DEPARTMENT_ID_OLD: '',
|
||||
DEVICE_ID: '',
|
||||
form: {
|
||||
DEVICE_ID: '',
|
||||
AREA_ID: '',
|
||||
TYPE: ''
|
||||
},
|
||||
deviceForm: {
|
||||
DEVICE_ID: '',
|
||||
DEVICE_NAME: '',
|
||||
DOCK_DEVICE_NAME: '',
|
||||
DOCK_DOOR_NAME: '',
|
||||
DOCK_PATH_NAME: '',
|
||||
DEVICE_TYPE: ''
|
||||
},
|
||||
typeList: [
|
||||
{ NAME: '入口', VALUE: '0' },
|
||||
{ NAME: '出口', VALUE: '1' }
|
||||
],
|
||||
statusList: [
|
||||
{ NAME: '正常', VALUE: 0 },
|
||||
{ NAME: '停用', VALUE: 1 },
|
||||
{ NAME: '暂时关闭', VALUE: 2 }
|
||||
],
|
||||
riskForm: {},
|
||||
KEYWORDS: '',
|
||||
rules: {
|
||||
DEVICE_ID: [{ required: true, message: '请选择设备', trigger: 'blur' }],
|
||||
TYPE: [{ required: true, message: '请选择进出类型', trigger: 'blur' }]
|
||||
},
|
||||
RELATION_ID: '',
|
||||
formLabelWidth: '120px',
|
||||
fullscreenLoading: false,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
multipleSelection: [],
|
||||
accidentList: [],
|
||||
categoryList: [
|
||||
{ ID: '1', NAME: '人员' },
|
||||
{ ID: '2', NAME: '车辆' }
|
||||
],
|
||||
leaveList: [
|
||||
{ ID: '1', NAME: '入' },
|
||||
{ ID: '2', NAME: '出' }
|
||||
],
|
||||
IsAdjacentList: [
|
||||
{ ID: '0', NAME: '否' },
|
||||
{ ID: '1', NAME: '是' }
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
async created() {
|
||||
this.form.AREA_ID = this.$parent.AREA_ID
|
||||
this.RELATION_ID = this.$parent.RELATION_ID
|
||||
console.log(this.RELATION_ID)
|
||||
if (this.RELATION_ID) {
|
||||
this.getDataByID()
|
||||
}
|
||||
this.DOOR_TYPE = this.$parent.DOOR_TYPE
|
||||
this.getDeviceList()
|
||||
},
|
||||
methods: {
|
||||
async handleOpen() {
|
||||
requestFN(
|
||||
'/mkmjDevice/findById',
|
||||
{
|
||||
DEVICE_ID: this.form.DEVICE_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.deviceForm = data.pd
|
||||
this.dialogDoor = true
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
getDockDeviceInfo() {
|
||||
const deviceList = this.deviceList
|
||||
for (let i = 0; i < deviceList.length; i++) {
|
||||
if (deviceList[i].DEVICE_ID == this.form.DEVICE_ID) {
|
||||
this.deviceForm.DEVICE_ID = deviceList[i].DEVICE_ID
|
||||
this.deviceForm.DEVICE_NAME = deviceList[i].DEVICE_NAME
|
||||
this.deviceForm.DOCK_DEVICE_NAME = deviceList[i].DOCK_DEVICE_NAME
|
||||
this.deviceForm.DOCK_DOOR_NAME = deviceList[i].DOCK_DOOR_NAME
|
||||
this.deviceForm.DOCK_PATH_NAME = deviceList[i].DOCK_PATH_NAME
|
||||
this.deviceForm.DEVICE_TYPE = deviceList[i].DEVICE_TYPE == '0' ? '人行闸机' : '车行闸机'
|
||||
}
|
||||
}
|
||||
console.log(this.deviceForm)
|
||||
},
|
||||
getDeviceList() {
|
||||
this.listLoading = true
|
||||
return new Promise(resolve => {
|
||||
requestFN(
|
||||
'/mkmjDevice/listAllForArea',
|
||||
{
|
||||
CORPINFO_ID: this.$parent.CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.deviceList = data.varList
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
console.log(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.RELATION_ID) {
|
||||
this.handleAdd()
|
||||
} else {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjRelation/edit',
|
||||
this.form
|
||||
).then((data) => {
|
||||
this.$message.success(data.msg)
|
||||
this.listLoading = false
|
||||
this.dialogFormEdit = false
|
||||
this.$parent.activeName = 'DeviceList'
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
requestFN(
|
||||
'/mkmjRelation/add',
|
||||
this.form
|
||||
).then((data) => {
|
||||
if (data.msg === '保存成功') {
|
||||
this.$message.success(data.msg)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
getDataByID() {
|
||||
this.listLoading = true
|
||||
this.dialogFormVisible = true
|
||||
requestFN(
|
||||
'/mkmjRelation/goEdit',
|
||||
{
|
||||
RELATION_ID: this.RELATION_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.form = data.pd
|
||||
this.dialogFormVisible = false
|
||||
}).catch((e) => {
|
||||
this.dialogFormVisible = false
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'DeviceList'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,302 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="level-title">
|
||||
<h1>{{ this.$parent.AREA_ID == '' ? "新增" : "修改" }}</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-form v-loading="dialogFormVisible" ref="form" :model="form" :rules="rules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属分公司:" prop="CORPINFO_ID">
|
||||
<el-select v-model="form.CORPINFO_ID" filterable placeholder="请选择" style="width: 205px">
|
||||
<el-option
|
||||
v-for="item in corpList"
|
||||
:key="item.CORPINFO_ID"
|
||||
:label="item.CORP_NAME"
|
||||
:value="item.CORPINFO_ID"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="区域名称:" prop="AREA_NAME">
|
||||
<el-input v-model="form.AREA_NAME" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="10">-->
|
||||
<!-- <el-form-item label="绑定设备:" prop="DEVICE_IDS">-->
|
||||
<!-- <el-input v-model="DEVICE_NAMES" disabled placeholder="请选择口门进行绑定"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="2">-->
|
||||
<!-- <el-button style="position: relative; left: 10%" type="success" icon="el-icon-price-tag" size="mini" @click="handleOpen()">绑定设备</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button type="success" @click="confirm">保 存</el-button>
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
<!-- 选择设备-->
|
||||
<el-dialog v-if="dialogDevice" :visible.sync="dialogDevice" title="设备" width="1500px">
|
||||
<div class="icons-container">
|
||||
<el-input
|
||||
v-model="deviceFilterText"
|
||||
placeholder="输入设备名称"
|
||||
style="margin:10px 0;left: 10px;width: 25%"/>
|
||||
<el-button type="primary" style="position: relative;left: 10px" @click="getdeviceList">查询</el-button>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-table
|
||||
ref="deviceMultipleTable"
|
||||
:data="deviceList"
|
||||
:row-key="getDeviceRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="DEVICE_NAME" label="设备名称" align="center" />
|
||||
<el-table-column prop="DEVICE_TYPE" label="设备类型" align="center" >
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.DEVICE_TYPE == '0' ? '闸机' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="position: relative">
|
||||
<pagination :total="deviceTotal" :page.sync="deviceListQuery.page" :limit.sync="deviceListQuery.limit" @pagination="getdeviceList"/>
|
||||
</div>
|
||||
<div style="position: relative; top: 10px">
|
||||
<el-button @click="dialogDevice = false">取 消</el-button>
|
||||
<el-button type="primary" @click="saveDeviceData">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
dialogDevice: false,
|
||||
dialogFormVisible: false,
|
||||
dialogTableVisible: false,
|
||||
deviceListQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
deviceFilterText: '',
|
||||
deviceTotal: 0,
|
||||
deviceList: [],
|
||||
PERSON_CHARGE: '',
|
||||
DEPARTMENT_ID_OLD: '',
|
||||
DEVICE_NAMES: '',
|
||||
form: {
|
||||
CORPINFO_ID: '',
|
||||
AREA_NAME: '',
|
||||
AREA_ID: '',
|
||||
DEVICE_IDS: ''
|
||||
},
|
||||
corpList: [],
|
||||
riskForm: {},
|
||||
KEYWORDS: '',
|
||||
rules: {
|
||||
CORPINFO_ID: [{ required: true, message: '所属分公司不能为空', trigger: 'blur' }],
|
||||
AREA_NAME: [{ required: true, message: '区域名称不为空', trigger: 'blur' }]
|
||||
},
|
||||
formLabelWidth: '120px',
|
||||
fullscreenLoading: false,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
multipleSelection: [],
|
||||
accidentList: [],
|
||||
leaveList: [
|
||||
{ ID: '1', NAME: '一级' },
|
||||
{ ID: '2', NAME: '二级' },
|
||||
{ ID: '3', NAME: '三级' }
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
async created() {
|
||||
await this.getdeviceList()
|
||||
this.form.AREA_ID = this.$parent.AREA_ID || ''
|
||||
this.form.DEVICE_IDS = this.$parent.DEVICE_IDS || ''
|
||||
this.getCorpList()
|
||||
if (this.form.AREA_ID) {
|
||||
this.getDataByID()
|
||||
}
|
||||
if (this.form.DEVICE_IDS && this.form.DEVICE_IDS !== '') {
|
||||
this.initDeviceNames()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initDeviceNames() {
|
||||
console.log(666)
|
||||
const deviceIdList = this.form.DEVICE_IDS.split(',')
|
||||
let devicenames = ''
|
||||
this.deviceList.forEach(item => {
|
||||
deviceIdList.forEach(i => {
|
||||
if (item.DEVICE_ID === i) {
|
||||
console.log(777)
|
||||
devicenames = devicenames + item.DEVICE_NAME + ','
|
||||
}
|
||||
})
|
||||
})
|
||||
this.DEVICE_NAMES = devicenames.replace(/,$/, '')
|
||||
this.$forceUpdate()
|
||||
},
|
||||
saveDeviceData() {
|
||||
console.log('修改2')
|
||||
const selection = this.$refs.deviceMultipleTable.selection
|
||||
let deviceIds = ''
|
||||
let devicenames = ''
|
||||
for (let i = 0; i < selection.length; i++) {
|
||||
deviceIds = deviceIds + selection[i].DEVICE_ID + ','
|
||||
devicenames = devicenames + selection[i].DEVICE_NAME + ','
|
||||
}
|
||||
deviceIds = deviceIds.replace(/,$/, '')
|
||||
devicenames = devicenames.replace(/,$/, '')
|
||||
this.form.DEVICE_IDS = deviceIds
|
||||
this.DEVICE_NAMES = devicenames
|
||||
this.dialogDevice = false
|
||||
},
|
||||
getDeviceRowKey(row) {
|
||||
return row.DEVICE_ID
|
||||
},
|
||||
getdeviceList() {
|
||||
this.listLoading = true
|
||||
return new Promise(resolve => {
|
||||
requestFN(
|
||||
'/mkmjDevice/list?showCount=' + this.deviceListQuery.limit + '¤tPage=' + this.deviceListQuery.page,
|
||||
{ KEYWORDS: this.deviceFilterText }
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.deviceList = data.varList
|
||||
this.deviceTotal = data.page.totalResult
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
console.log(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
async handleOpen() {
|
||||
console.log('修改1')
|
||||
this.dialogDevice = true
|
||||
if (this.form.DEVICE_IDS && this.form.DEVICE_IDS !== '') {
|
||||
const selectList = this.form.DEVICE_IDS.split(',')
|
||||
this.$nextTick(() => {
|
||||
selectList.forEach(data => {
|
||||
this.$refs.deviceMultipleTable.toggleRowSelection(this.deviceList.find(item => {
|
||||
return data === item.DEVICE_ID
|
||||
}), true)
|
||||
})
|
||||
})
|
||||
this.saveDeviceData()
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.$parent.AREA_ID == '') {
|
||||
this.handleAdd()
|
||||
} else {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/doorArea/edit',
|
||||
this.form
|
||||
).then((data) => {
|
||||
if (data.code != 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.listLoading = false
|
||||
this.dialogFormEdit = false
|
||||
this.goBack()
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
requestFN(
|
||||
'/doorArea/add',
|
||||
this.form
|
||||
).then((data) => {
|
||||
if (data.msg === '保存成功') {
|
||||
this.$message.success(data.msg)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
getDataByID() {
|
||||
this.listLoading = true
|
||||
this.dialogFormVisible = true
|
||||
requestFN(
|
||||
'/doorArea/goEdit',
|
||||
{ AREA_ID: this.form.AREA_ID }
|
||||
).then((data) => {
|
||||
this.form = data.pd
|
||||
this.dialogFormVisible = false
|
||||
}).catch((e) => {
|
||||
this.dialogFormVisible = false
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
getCorpList() {
|
||||
requestFN(
|
||||
'/corpinfo/getSelectByCorpInfo',
|
||||
{
|
||||
}
|
||||
).then((data) => {
|
||||
this.corpList = JSON.parse(data.corpInfoJson)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,205 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="人名/车牌号" label-width="110px">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4"/>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column :selectable="selectable" type="selection" reserve-selection width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="NAME" label="人员名称/车牌号"/>
|
||||
<el-table-column prop="STATUS" label="进出类型"/>
|
||||
<el-table-column prop="TIME" label="进出时间"/>
|
||||
<el-table-column prop="BAYNAME" label="进出位置"/>
|
||||
<el-table-column prop="DOORNAME" label="口门名称"/>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
marker: null,
|
||||
BMap: '',
|
||||
clientHeight: 500,
|
||||
inputLocation: '',
|
||||
msg: 'add',
|
||||
config: config,
|
||||
dialogFormMap: false,
|
||||
AREA_ID: '',
|
||||
AREA_LEAVE: '',
|
||||
addBtnType: true,
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
form: {
|
||||
PATH_ID: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDE: ''
|
||||
},
|
||||
ls: [],
|
||||
dates: [],
|
||||
DOOR_TYPE: '',
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
// 树形菜单
|
||||
filterText: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.AREA_ID = this.$parent.AREA_ID
|
||||
this.getList()
|
||||
this.hasButton()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.PATH_ID
|
||||
},
|
||||
selectable(row, index) {
|
||||
return row.ITEMCOUNT == 0
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$parent.activeName = 'EditPath'
|
||||
this.$parent.AREA_ID = this.AREA_ID
|
||||
this.$parent.PATH_ID = ''
|
||||
},
|
||||
handleDevice(row) {
|
||||
this.$parent.activeName = 'ListDevice'
|
||||
this.$parent.PATH_ID = row.PATH_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(pid) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
requestFN(
|
||||
'/mkmjRelation/getInfoList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
AREA_ID: this.AREA_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}, goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
hasButton: function() {
|
||||
var keys = 'mkmjDoor:add,mkmjDoor:del,mkmjDoor:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.mkmjDoorfhadminadd // 新增权限
|
||||
this.del = data.mkmjDoorfhadmindel // 删除权限
|
||||
this.edit = data.mkmjDoorfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,357 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="区域名称/编码" label-width="110px">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入关键字"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4"/>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column :selectable="selectable" type="selection" reserve-selection width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="AREA_NAME" label="区域名称"/>
|
||||
<el-table-column prop="DEVICE_COUNT" label="设备数量"/>
|
||||
<el-table-column label="操作" width="480">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleInfoView(row)">查看记录
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="edit"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleEdit(row)">编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="edit"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDelete(row)">删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-price-tag"
|
||||
size="mini"
|
||||
@click="handleOpen(row)">绑定设备
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 选择口门 -->
|
||||
<el-dialog v-if="dialogDoor" :visible.sync="dialogDoor" title="口门" width="1500px">
|
||||
<div class="icons-container">
|
||||
<el-input
|
||||
v-model="doorFilterText"
|
||||
placeholder="输入口门名称"
|
||||
style="margin:10px 0;left: 10px;width: 25%"/>
|
||||
<el-button type="primary" style="position: relative;left: 10px" @click="getDeviceList">查询</el-button>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-table
|
||||
ref="doorMultipleTable"
|
||||
:data="deviceList"
|
||||
:row-key="getDoorRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="DEVICE_NAME" label="设备名称" align="center" />
|
||||
<el-table-column prop="DEVICE_TYPE" label="设备类型" align="center" >
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.DEVICE_TYPE == '0' ? '闸机' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="position: relative">
|
||||
<pagination :total="doorTotal" :page.sync="deviceListQuery.page" :limit.sync="deviceListQuery.limit" @pagination="getDeviceList"/>
|
||||
</div>
|
||||
<div style="position: relative; top: 10px">
|
||||
<el-button @click="dialogDoor = false">取 消</el-button>
|
||||
<el-button type="primary" @click="saveDoorData">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
deviceList: [],
|
||||
dialogDoor: false,
|
||||
AREA_ID: '',
|
||||
DEVICE_IDS: '',
|
||||
addBtnType: true,
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
deviceListQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
ls: [],
|
||||
dates: [],
|
||||
total: 0,
|
||||
doorTotal: 0,
|
||||
KEYWORDS: '',
|
||||
doorFilterText: '',
|
||||
// 树形菜单
|
||||
filterText: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.hasButton()
|
||||
},
|
||||
methods: {
|
||||
saveDoorData() {
|
||||
const selection = this.$refs.doorMultipleTable.selection
|
||||
let doorIds = ''
|
||||
for (let i = 0; i < selection.length; i++) {
|
||||
doorIds = doorIds + selection[i].DOOR_ID + ','
|
||||
}
|
||||
doorIds = doorIds.replace(/,$/, '')
|
||||
this.DEVICE_IDS = doorIds
|
||||
requestFN(
|
||||
'/doorArea/edit',
|
||||
{
|
||||
AREA_ID: this.AREA_ID,
|
||||
DEVICE_IDS: doorIds
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.code != 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.listLoading = false
|
||||
this.dialogDoor = false
|
||||
}
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
this.dialogDoor = false
|
||||
})
|
||||
},
|
||||
getDeviceList() {
|
||||
this.listLoading = true
|
||||
return new Promise(resolve => {
|
||||
requestFN(
|
||||
'/mkmjDevice/list?showCount=' + this.deviceListQuery.limit + '¤tPage=' + this.deviceListQuery.page,
|
||||
{
|
||||
KEYWORDS: this.doorFilterText
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.deviceList = data.varList
|
||||
this.doorTotal = data.page.totalResult
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
console.log(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
getRowKey(row) {
|
||||
return row.AREA_ID
|
||||
},
|
||||
getDoorRowKey(row) {
|
||||
return row.DOOR_ID
|
||||
},
|
||||
selectable(row, index) {
|
||||
return row.ITEMCOUNT == 0
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$parent.AREA_ID = ''
|
||||
this.$parent.DEVICE_IDS = ''
|
||||
this.$parent.activeName = 'Edit'
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(pid) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
this.HIDDENREGION_ID = pid
|
||||
requestFN(
|
||||
'/doorArea/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}, goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
handleInfoView(row) {
|
||||
this.$parent.AREA_ID = row.AREA_ID
|
||||
this.$parent.activeName = 'infoList'
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.$parent.AREA_ID = row.AREA_ID
|
||||
this.$parent.DEVICE_IDS = row.DEVICE_IDS
|
||||
this.$parent.activeName = 'Edit'
|
||||
},
|
||||
handleOpen(row) {
|
||||
this.$parent.AREA_ID = row.AREA_ID
|
||||
this.$parent.CORPINFO_ID = row.CORPINFO_ID
|
||||
this.$parent.activeName = 'DeviceList'
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定要删除[' + row.AREA_NAME + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/doorArea/delete',
|
||||
{
|
||||
AREA_ID: row.AREA_ID
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
hasButton: function() {
|
||||
var keys = 'mkmjArea:add,mkmjArea:del,mkmjArea:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.mkmjAreafhadminadd // 新增权限
|
||||
this.del = data.mkmjAreafhadmindel // 删除权限
|
||||
this.edit = data.mkmjAreafhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,297 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="设备名称" label-width="110px">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入设备名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4"/>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column :selectable="selectable" type="selection" reserve-selection width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="DEVICE_NAME" label="设备名称"/>
|
||||
<el-table-column prop="DOCK_DEVICE_NAME" label="对接设备名称"/>
|
||||
<el-table-column prop="DOCK_DOOR_NAME" label="对接所属口门"/>
|
||||
<el-table-column prop="DOCK_PATH_NAME" label="对接所属通道"/>
|
||||
<el-table-column label="进出类型">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.TYPE === '0'" >入口</span>
|
||||
<span v-else-if="row.TYPE === '1'" >出口</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="400">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
v-show="edit"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleEdit(row.RELATION_ID)">修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDelete(row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
marker: null,
|
||||
BMap: '',
|
||||
clientHeight: 500,
|
||||
inputLocation: '',
|
||||
msg: 'add',
|
||||
config: config,
|
||||
dialogFormMap: false,
|
||||
CORPINFO_ID: '',
|
||||
PATH_ID: '',
|
||||
AREA_ID: '',
|
||||
AREA_LEAVE: '',
|
||||
DOOR_TYPE: '',
|
||||
addBtnType: true,
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
form: {
|
||||
PATH_ID: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDE: ''
|
||||
},
|
||||
ls: [],
|
||||
dates: [],
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
// 树形菜单
|
||||
filterText: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.PATH_ID = this.$parent.PATH_ID
|
||||
this.AREA_ID = this.$parent.AREA_ID
|
||||
this.AREA_LEAVE = this.$parent.AREA_LEAVE
|
||||
this.DOOR_TYPE = this.$parent.DOOR_TYPE
|
||||
this.CORPINFO_ID = this.$parent.CORPINFO_ID
|
||||
this.getList()
|
||||
this.hasButton()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.PATH_ID
|
||||
},
|
||||
selectable(row, index) {
|
||||
return row.ITEMCOUNT == 0
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$parent.activeName = 'EditDevice'
|
||||
this.$parent.AREA_ID = this.AREA_ID
|
||||
this.$parent.RELATION_ID = ''
|
||||
},
|
||||
handleDevice() {
|
||||
this.$parent.activeName = 'ListDevice'
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(pid) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
this.HIDDENREGION_ID = pid
|
||||
requestFN(
|
||||
'/doorArea/listForDevice?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
AREA_ID: this.AREA_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}, goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
handleEdit(RELATION_ID) {
|
||||
this.$parent.RELATION_ID = RELATION_ID
|
||||
this.$parent.activeName = 'EditDevice'
|
||||
},
|
||||
handleMap(row) {
|
||||
this.dialogFormMap = true
|
||||
this.form = {
|
||||
PATH_ID: row.PATH_ID,
|
||||
LATITUDE: row.LATITUDE,
|
||||
LONGITUDE: row.LONGITUDE
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定要删除[' + row.DEVICE_NAME + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjRelation/delete',
|
||||
{
|
||||
RELATION_ID: row.RELATION_ID
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
setPosition() {
|
||||
this.dialogFormMap = false
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDevice/savePosition',
|
||||
{
|
||||
LATITUDE: this.form.LATITUDE,
|
||||
LONGITUDE: this.form.LONGITUDE,
|
||||
PATH_ID: this.form.PATH_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
hasButton: function() {
|
||||
var keys = 'mkmjDoor:add,mkmjDoor:del,mkmjDoor:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.mkmjDoorfhadminadd // 新增权限
|
||||
this.del = data.mkmjDoorfhadmindel // 删除权限
|
||||
this.edit = data.mkmjDoorfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-if="activeName=='List'" ref="list" />
|
||||
<Edit v-if="activeName=='Edit'" />
|
||||
<Device-list v-if="activeName=='DeviceList'" />
|
||||
<Edit-device v-if="activeName=='EditDevice'" />
|
||||
<info-list v-if="activeName=='infoList'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
import Edit from './components/edit'
|
||||
import DeviceList from './components/listDevice'
|
||||
import EditDevice from './components/EditDevice'
|
||||
import infoList from './components/infoList'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
List: List,
|
||||
Edit: Edit,
|
||||
DeviceList: DeviceList,
|
||||
EditDevice: EditDevice,
|
||||
infoList: infoList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List'
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,298 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="level-title">
|
||||
<h1>{{ this.$parent.DEVICE_ID == '' ? "新增" : "修改" }}</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-form v-loading="dialogFormVisible" ref="form" :model="form" :rules="rules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称:" prop="DEVICE_NAME">
|
||||
<el-input v-model="form.DEVICE_NAME" placeholder="闸机名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备类型:" prop="DEVICE_TYPE">
|
||||
<el-select v-model="form.DEVICE_TYPE" style="width: 100%;">
|
||||
<el-option v-for="item in typeList" :key="item.VALUE" :label="item.NAME" :value="item.VALUE" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="绑定设备:" prop="DOCK_DEVICE_ID">
|
||||
<el-select v-model="form.DOCK_DEVICE_ID" filterable clearable style="width: 100%;" @change="getDockDeviceInfo">
|
||||
<el-option v-for="item in deviceList" :key="item.DOCK_DEVICE_ID" :value="item.DOCK_DEVICE_ID" :label="item.DEVICE_NAME"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button v-if="!form.DOCK_DEVICE_ID" style="position: relative; left: 10%" type="danger" icon="el-icon-price-tag" size="mini">请进行设备绑定</el-button>
|
||||
<el-button v-else-if="form.DOCK_DEVICE_ID" style="position: relative; left: 10%" type="success" icon="el-icon-price-tag" size="mini" @click="handleOpen()">查看绑定数据信息</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态:" prop="STATUS">
|
||||
<el-select v-model="form.STATUS" style="width: 100%;">
|
||||
<el-option v-for="item in statusList" :key="item.VALUE" :label="item.NAME" :value="item.VALUE" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button type="success" @click="confirm">保 存</el-button>
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
<!-- 设备 -->
|
||||
<el-dialog v-if="dialogDoor" :visible.sync="dialogDoor" title="设备信息" width="600px">
|
||||
<el-form v-loading="dialogFormVisible" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="设备名称:" prop="DEVICE_NAME">
|
||||
<el-input v-model="dockDeviceForm.DEVICE_NAME" disabled placeholder="设备名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="所属口门名称:" prop="DOOR_NAME">
|
||||
<el-input v-model="dockDeviceForm.DOOR_NAME" disabled placeholder="所属口门名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="所属通道名称:" prop="PATH_NAME">
|
||||
<el-input v-model="dockDeviceForm.PATH_NAME" disabled placeholder="所属通道名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="设备类型:" prop="DEVICE_TYPE">
|
||||
<el-input v-model="dockDeviceForm.DEVICE_TYPE" disabled placeholder="设备类型"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="position: relative; top: 10px">
|
||||
<el-button @click="dialogDoor = false">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
DEVICE_NAMES: '',
|
||||
deviceListQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
DOOR_TYPE: '',
|
||||
doorTotal: 0,
|
||||
deviceList: [],
|
||||
doorFilterText: '',
|
||||
dialogDoor: false,
|
||||
dialogFormVisible: false,
|
||||
dialogTableVisible: false,
|
||||
PERSON_CHARGE: '',
|
||||
DEPARTMENT_ID_OLD: '',
|
||||
DEVICE_ID: '',
|
||||
form: {
|
||||
DOCK_DEVICE_ID: '',
|
||||
DEVICE_NAME: '',
|
||||
DEVICE_TYPE: '',
|
||||
PATH_ID: '',
|
||||
DOOR_ID: '',
|
||||
STATUS: ''
|
||||
},
|
||||
dockDeviceForm: {
|
||||
DOCK_DEVICE_ID: '',
|
||||
DEVICE_NAME: '',
|
||||
DOOR_NAME: '',
|
||||
PATH_NAME: '',
|
||||
DEVICE_TYPE: ''
|
||||
},
|
||||
typeList: [
|
||||
{ NAME: '闸机', VALUE: 0 }
|
||||
],
|
||||
statusList: [
|
||||
{ NAME: '正常', VALUE: 0 },
|
||||
{ NAME: '停用', VALUE: 1 },
|
||||
{ NAME: '暂时关闭', VALUE: 2 }
|
||||
],
|
||||
riskForm: {},
|
||||
KEYWORDS: '',
|
||||
rules: {
|
||||
DOCK_DEVICE_ID: [{ required: true, message: '请选择绑定设备', trigger: 'blur' }],
|
||||
DEVICE_NAME: [{ required: true, message: '闸机名称不为空', trigger: 'blur' }],
|
||||
DEVICE_TYPE: [{ required: true, message: '闸机类型不为空', trigger: 'blur' }],
|
||||
STATUS: [{ required: true, message: '闸机类别不为空', trigger: 'blur' }]
|
||||
},
|
||||
formLabelWidth: '120px',
|
||||
fullscreenLoading: false,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
multipleSelection: [],
|
||||
accidentList: [],
|
||||
categoryList: [
|
||||
{ ID: '1', NAME: '人员' },
|
||||
{ ID: '2', NAME: '车辆' }
|
||||
],
|
||||
leaveList: [
|
||||
{ ID: '1', NAME: '入' },
|
||||
{ ID: '2', NAME: '出' }
|
||||
],
|
||||
IsAdjacentList: [
|
||||
{ ID: '0', NAME: '否' },
|
||||
{ ID: '1', NAME: '是' }
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
async created() {
|
||||
this.form.PATH_ID = this.$parent.PATH_ID
|
||||
this.form.DOOR_ID = this.$parent.DOOR_ID
|
||||
this.DEVICE_ID = this.$parent.DEVICE_ID
|
||||
if (this.DEVICE_ID) {
|
||||
this.getDataByID()
|
||||
}
|
||||
this.DOOR_TYPE = this.$parent.DOOR_TYPE
|
||||
this.getDeviceList()
|
||||
},
|
||||
methods: {
|
||||
async handleOpen() {
|
||||
requestFN(
|
||||
'/mkmjDockDevice/findById',
|
||||
{
|
||||
DOCK_DEVICE_ID: this.form.DOCK_DEVICE_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dockDeviceForm = data.pd
|
||||
this.dialogDoor = true
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
getDockDeviceInfo() {
|
||||
const deviceList = this.deviceList
|
||||
for (let i = 0; i < deviceList.length; i++) {
|
||||
if (deviceList[i].DOCK_DEVICE_ID == this.form.DOCK_DEVICE_ID) {
|
||||
this.dockDeviceForm.DOCK_DEVICE_ID = deviceList[i].DOCK_DEVICE_ID
|
||||
this.dockDeviceForm.DEVICE_NAME = deviceList[i].DEVICE_NAME
|
||||
this.dockDeviceForm.DOOR_NAME = deviceList[i].DOOR_NAME
|
||||
this.dockDeviceForm.PATH_NAME = deviceList[i].PATH_NAME
|
||||
this.dockDeviceForm.DEVICE_TYPE = deviceList[i].DEVICE_TYPE == '0' ? '人行闸机' : '车行闸机'
|
||||
}
|
||||
}
|
||||
console.log(this.dockDeviceForm)
|
||||
},
|
||||
getDeviceList() {
|
||||
this.listLoading = true
|
||||
return new Promise(resolve => {
|
||||
requestFN(
|
||||
'/mkmjDockDevice/listAll',
|
||||
{
|
||||
KEYWORDS: this.doorFilterText,
|
||||
DOOR_TYPE: this.DOOR_TYPE
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.deviceList = data.varList
|
||||
this.doorTotal = data.page.totalResult
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
console.log(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.DEVICE_ID) {
|
||||
this.handleAdd()
|
||||
} else {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDevice/edit',
|
||||
this.form
|
||||
).then((data) => {
|
||||
this.$message.success(data.msg)
|
||||
this.listLoading = false
|
||||
this.dialogFormEdit = false
|
||||
this.$parent.activeName = 'ListDevice'
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
requestFN(
|
||||
'/mkmjDevice/add',
|
||||
{
|
||||
...this.form,
|
||||
CORPINFO_ID: this.$parent.CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.msg === '保存成功') {
|
||||
this.$message.success(data.msg)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
getDataByID() {
|
||||
this.listLoading = true
|
||||
this.dialogFormVisible = true
|
||||
requestFN(
|
||||
'/mkmjDevice/goEdit',
|
||||
{ DEVICE_ID: this.DEVICE_ID }
|
||||
).then((data) => {
|
||||
this.form = data.pd
|
||||
this.dialogFormVisible = false
|
||||
}).catch((e) => {
|
||||
this.dialogFormVisible = false
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'ListDevice'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,204 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="level-title">
|
||||
<h1>{{ this.$parent.PATH_ID == '' ? "新增" : "修改" }}</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-form v-loading="dialogFormVisible" ref="form" :model="form" :rules="rules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="通道名称:" prop="PATH_NAME">
|
||||
<el-input v-model="form.PATH_NAME" placeholder="闸机名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="通道类型:" prop="PATH_TYPE">
|
||||
<el-select v-model="form.PATH_TYPE" style="width: 100%;">
|
||||
<el-option v-for="item in typeList" :key="item.VALUE" :label="item.NAME" :value="item.VALUE" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态:" prop="STATUS">
|
||||
<el-select v-model="form.STATUS" style="width: 100%;">
|
||||
<el-option v-for="item in statusList" :key="item.VALUE" :label="item.NAME" :value="item.VALUE" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button type="success" @click="confirm">保 存</el-button>
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
dialogFormVisible: false,
|
||||
dialogTableVisible: false,
|
||||
PERSON_CHARGE: '',
|
||||
DEPARTMENT_ID_OLD: '',
|
||||
PATH_ID: '',
|
||||
form: {
|
||||
PATH_NAME: '',
|
||||
PATH_TYPE: '',
|
||||
STATUS: ''
|
||||
},
|
||||
typeList: [
|
||||
{ NAME: '人行通道', VALUE: 0 },
|
||||
{ NAME: '车行通道', VALUE: 1 }
|
||||
],
|
||||
statusList: [
|
||||
{ NAME: '正常', VALUE: 0 },
|
||||
{ NAME: '停用', VALUE: 1 },
|
||||
{ NAME: '暂时关闭', VALUE: 2 }
|
||||
],
|
||||
riskForm: {},
|
||||
KEYWORDS: '',
|
||||
rules: {
|
||||
PATH_NAME: [{ required: true, message: '闸机名称不为空', trigger: 'blur' }],
|
||||
PATH_TYPE: [{ required: true, message: '闸机类型不为空', trigger: 'blur' }],
|
||||
STATUS: [{ required: true, message: '闸机类别不为空', trigger: 'blur' }]
|
||||
},
|
||||
formLabelWidth: '120px',
|
||||
fullscreenLoading: false,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
AreaList: [],
|
||||
multipleSelection: [],
|
||||
accidentList: [],
|
||||
categoryList: [
|
||||
{ ID: '1', NAME: '人员' },
|
||||
{ ID: '2', NAME: '车辆' }
|
||||
],
|
||||
leaveList: [
|
||||
{ ID: '1', NAME: '入' },
|
||||
{ ID: '2', NAME: '出' }
|
||||
],
|
||||
IsAdjacentList: [
|
||||
{ ID: '0', NAME: '否' },
|
||||
{ ID: '1', NAME: '是' }
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
async created() {
|
||||
this.form.DOOR_ID = this.$parent.DOOR_ID
|
||||
this.PATH_ID = this.$parent.PATH_ID
|
||||
if (this.PATH_ID) {
|
||||
this.getDataByID()
|
||||
}
|
||||
if (this.$parent.DOOR_TYPE == '0') {
|
||||
this.typeList = [{ NAME: '人行通道', VALUE: 0 }]
|
||||
} else {
|
||||
this.typeList = [{ NAME: '车行通道', VALUE: 1 }]
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.AreaList = []
|
||||
requestFN(
|
||||
'/mkmjPath/list?showCount=100¤tPage=1',
|
||||
{
|
||||
AREA_PARENT_ID: this.form.AREA_PARENT_ID
|
||||
}
|
||||
).then((data) => {
|
||||
for (var i = 0; i < data.varList.length; i++) {
|
||||
var item = data.varList[i]
|
||||
if (item.AREA_ID != this.form.AREA_ID) {
|
||||
this.AreaList.push(item)
|
||||
}
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.PATH_ID) {
|
||||
this.handleAdd()
|
||||
} else {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjPath/edit',
|
||||
{
|
||||
...this.form,
|
||||
CORPINFO_ID: this.$parent.CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.$message.success(data.msg)
|
||||
this.listLoading = false
|
||||
this.dialogFormEdit = false
|
||||
this.$parent.activeName = 'ListPath'
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
requestFN(
|
||||
'/mkmjPath/add',
|
||||
{
|
||||
...this.form,
|
||||
CORPINFO_ID: this.$parent.CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.msg === '保存成功') {
|
||||
this.$message.success(data.msg)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
getDataByID() {
|
||||
this.listLoading = true
|
||||
this.dialogFormVisible = true
|
||||
requestFN(
|
||||
'/mkmjPath/goEdit',
|
||||
{ PATH_ID: this.PATH_ID }
|
||||
).then((data) => {
|
||||
this.form = data.pd
|
||||
this.dialogFormVisible = false
|
||||
}).catch((e) => {
|
||||
this.dialogFormVisible = false
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'ListPath'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,307 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="设备名称" label-width="110px">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入设备名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4"/>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column :selectable="selectable" type="selection" reserve-selection width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="DEVICE_NAME" label="设备名称"/>
|
||||
<el-table-column prop="DOCK_DEVICE_NAME" label="对接设备名称"/>
|
||||
<el-table-column prop="DOCK_DOOR_NAME" label="对接所属口门"/>
|
||||
<el-table-column prop="DOCK_PATH_NAME" label="对接所属通道"/>
|
||||
<el-table-column label="对接设备类型">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.DOCK_DEVICE_TYPE == '0'" >人行闸机</span>
|
||||
<span v-else-if="row.DOCK_DEVICE_TYPE == '1'" >车行闸机</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备类型">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.DEVICE_TYPE === 0" >闸机</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="STATUS" label="状态">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.STATUS == '0' ? '正常' : row.STATUS == '1' ? '停用' : '暂时关闭' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="400">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
v-show="edit"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleEdit(row.DEVICE_ID)">修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDelete(row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
marker: null,
|
||||
BMap: '',
|
||||
clientHeight: 500,
|
||||
inputLocation: '',
|
||||
msg: 'add',
|
||||
config: config,
|
||||
dialogFormMap: false,
|
||||
PATH_ID: '',
|
||||
DOOR_ID: '',
|
||||
AREA_LEAVE: '',
|
||||
DOOR_TYPE: '',
|
||||
addBtnType: true,
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
form: {
|
||||
PATH_ID: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDE: ''
|
||||
},
|
||||
ls: [],
|
||||
dates: [],
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
// 树形菜单
|
||||
filterText: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.PATH_ID = this.$parent.PATH_ID
|
||||
this.DOOR_ID = this.$parent.DOOR_ID
|
||||
this.AREA_LEAVE = this.$parent.AREA_LEAVE
|
||||
this.DOOR_TYPE = this.$parent.DOOR_TYPE
|
||||
this.getList()
|
||||
this.hasButton()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.PATH_ID
|
||||
},
|
||||
selectable(row, index) {
|
||||
return row.ITEMCOUNT == 0
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$parent.activeName = 'EditDevice'
|
||||
this.$parent.PATH_ID = this.PATH_ID
|
||||
this.$parent.DOOR_ID = this.DOOR_ID
|
||||
this.$parent.DOOR_TYPE = this.DOOR_TYPE
|
||||
this.$parent.DEVICE_ID = ''
|
||||
},
|
||||
handleDevice() {
|
||||
this.$parent.activeName = 'ListDevice'
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(pid) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
this.HIDDENREGION_ID = pid
|
||||
requestFN(
|
||||
'/mkmjDevice/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
PATH_ID: this.PATH_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}, goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
handleEdit(DEVICE_ID) {
|
||||
this.$parent.DEVICE_ID = DEVICE_ID
|
||||
this.$parent.activeName = 'EditDevice'
|
||||
},
|
||||
handleMap(row) {
|
||||
this.dialogFormMap = true
|
||||
this.form = {
|
||||
PATH_ID: row.PATH_ID,
|
||||
LATITUDE: row.LATITUDE,
|
||||
LONGITUDE: row.LONGITUDE
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定要删除[' + row.DEVICE_NAME + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDevice/delete',
|
||||
{
|
||||
DEVICE_ID: row.DEVICE_ID
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
setPosition() {
|
||||
this.dialogFormMap = false
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDevice/savePosition',
|
||||
{
|
||||
LATITUDE: this.form.LATITUDE,
|
||||
LONGITUDE: this.form.LONGITUDE,
|
||||
PATH_ID: this.form.PATH_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
hasButton: function() {
|
||||
var keys = 'mkmjDoor:add,mkmjDoor:del,mkmjDoor:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.mkmjDoorfhadminadd // 新增权限
|
||||
this.del = data.mkmjDoorfhadmindel // 删除权限
|
||||
this.edit = data.mkmjDoorfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'ListPath'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,340 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="level-title">
|
||||
<h1>{{ this.$parent.DOOR_ID == '' ? "新增" : "修改" }}</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-form v-loading="dialogFormVisible" ref="form" :model="form" :rules="rules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属分公司:" prop="CORPINFO_ID">
|
||||
<el-select v-model="form.CORPINFO_ID" filterable placeholder="请选择" style="width: 205px">
|
||||
<el-option
|
||||
v-for="item in corpList"
|
||||
:key="item.CORPINFO_ID"
|
||||
:label="item.CORP_NAME"
|
||||
:value="item.CORPINFO_ID"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="口门名称:" prop="DOOR_NAME">
|
||||
<el-input v-model="form.DOOR_NAME" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="口门类型:" prop="DOOR_TYPE">
|
||||
<el-select v-model="form.DOOR_TYPE" style="width: 100%;">
|
||||
<el-option v-for="item in typeList" :key="item.VALUE" :label="item.NAME" :value="item.VALUE" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态:" prop="STATUS">
|
||||
<el-select v-model="form.STATUS" style="width: 100%;">
|
||||
<el-option v-for="item in statusList" :key="item.VALUE" :label="item.NAME" :value="item.VALUE" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="经纬度:" class="is-required">
|
||||
<el-input v-model="form.LONGITUDEANDLATITUDE" style="width:206px" placeholder="请选择" disabled/>
|
||||
<el-button style="margin-left: 10px" type="primary" @click="handleMap">点击定位</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button type="success" @click="confirm">保 存</el-button>
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormMap" title="定位" width="1050px" class="dy-dialog">
|
||||
<div id="cesiumContainer" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<span>经度:</span>
|
||||
<el-input v-model="form.LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled />
|
||||
<span>纬度:</span>
|
||||
<el-input v-model="form.LATITUDE" style="width: 200px" placeholder="请输入内容" disabled />
|
||||
<el-button @click="dialogFormMap = false">取 消</el-button>
|
||||
<el-button type="primary" @click="setPosition">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
import waves from '@/directive/waves'
|
||||
import TiandiMap from '../../../../components/TianMap/TiandiMap'
|
||||
|
||||
let viewer = null
|
||||
const Cesium = window.Cesium
|
||||
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkOWQ0MGYwMy0yODUwLTQ1YzktOGM4OC02MTMwY2UyZjNlMzQiLCJpZCI6MTY0NTUwLCJpYXQiOjE2OTM4OTU1Mjd9.1cC0sSzyj79LZv0ILNCcl0Mabw6hl8TNngFNFr7H8f4'
|
||||
var subdomains = ['0', '1', '2', '3', '4', '5', '6', '7']
|
||||
var tiandituTk = 'e8a16137fd226a62a23cc7ba5c9c78ce'
|
||||
const img_h = require('../../../../assets/images/map/h.png')
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree, TiandiMap },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
dialogFormMap: false,
|
||||
dialogFormVisible: false,
|
||||
dialogTableVisible: false,
|
||||
PERSON_CHARGE: '',
|
||||
DEPARTMENT_ID_OLD: '',
|
||||
form: {
|
||||
CORPINFO_ID: '',
|
||||
DOOR_NAME: '',
|
||||
DOOR_TYPE: '',
|
||||
STATUS: '',
|
||||
LONGITUDE: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDEANDLATITUDE: ''
|
||||
},
|
||||
corpList: [],
|
||||
riskForm: {},
|
||||
KEYWORDS: '',
|
||||
rules: {
|
||||
CORPINFO_ID: [{ required: true, message: '所属分公司不能为空', trigger: 'blur' }],
|
||||
DOOR_NAME: [{ required: true, message: '口门名称不能为空', trigger: 'blur' }],
|
||||
DOOR_TYPE: [{ required: true, message: '口门类型不能为空', trigger: 'blur' }],
|
||||
STATUS: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||
},
|
||||
formLabelWidth: '120px',
|
||||
fullscreenLoading: false,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
multipleSelection: [],
|
||||
accidentList: [],
|
||||
typeList: [
|
||||
{ NAME: '人行口门', VALUE: 0 },
|
||||
{ NAME: '车行口门', VALUE: 1 }
|
||||
],
|
||||
statusList: [
|
||||
{ NAME: '正常', VALUE: 0 },
|
||||
{ NAME: '停用', VALUE: 1 },
|
||||
{ NAME: '暂时关闭', VALUE: 2 }
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
async created() {
|
||||
viewer = null
|
||||
this.DOOR_ID = this.$parent.DOOR_ID
|
||||
this.form.DOOR_NAME = this.$parent.DOOR_NAME
|
||||
this.form.DOOR_TYPE = this.$parent.DOOR_TYPE
|
||||
this.form.STATUS = this.$parent.STATUS
|
||||
this.getCorpList()
|
||||
if (this.DOOR_ID) {
|
||||
this.getDataByID()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setPosition() {
|
||||
this.form.LONGITUDEANDLATITUDE = this.form.LATITUDE + '--' + this.form.LONGITUDE
|
||||
this.dialogFormMap = false
|
||||
},
|
||||
/**
|
||||
* 初始化天地图对象
|
||||
*/
|
||||
/* initTDT() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.T) {
|
||||
console.log('天地图初始化成功...')
|
||||
resolve(window.T)
|
||||
reject('error')
|
||||
}
|
||||
}).then(T => {
|
||||
window.T = T
|
||||
})
|
||||
},*/
|
||||
/**
|
||||
* 初始化地图
|
||||
* @param {*} lng 经度
|
||||
* @param {*} lat 纬度
|
||||
* @param {*} zoom 缩放比例(1~18)
|
||||
*/
|
||||
initMap(lng, lat, zoom) {
|
||||
viewer = new Cesium.Viewer('cesiumContainer', {
|
||||
// terrainProvider: Cesium.createWorldTerrain()
|
||||
animation: false, // 动画
|
||||
homeButton: true, // home键
|
||||
geocoder: true, // 地址编码
|
||||
baseLayerPicker: false, // 图层选择控件
|
||||
timeline: false, // 时间轴
|
||||
fullscreenButton: true, // 全屏显示
|
||||
infoBox: true, // 点击要素之后浮窗
|
||||
sceneModePicker: true, // 投影方式 三维/二维
|
||||
navigationInstructionsInitiallyVisible: false, // 导航指令
|
||||
navigationHelpButton: false, // 帮助信息
|
||||
selectionIndicator: false, // 选择
|
||||
imageryProvider: new Cesium.WebMapTileServiceImageryProvider({
|
||||
// 影像底图
|
||||
url: 'http://t{s}.tianditu.com/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=' + tiandituTk,
|
||||
subdomains: subdomains,
|
||||
layer: 'tdtImgLayer',
|
||||
style: 'default',
|
||||
format: 'image/jpeg',
|
||||
tileMatrixSetID: 'GoogleMapsCompatible', // 使用谷歌的瓦片切片方式
|
||||
show: true
|
||||
})
|
||||
})
|
||||
viewer._cesiumWidget._creditContainer.style.display = 'none' // 隐藏cesium ion
|
||||
Cesium.ExperimentalFeatures.enableModelExperimental = true
|
||||
var tile3d = new Cesium.Cesium3DTileset({
|
||||
url: config.mapJsonUrl
|
||||
})
|
||||
viewer.scene.primitives.add(tile3d)
|
||||
|
||||
this.toCenter(lng, lat, zoom)
|
||||
this.leftDownAction()
|
||||
},
|
||||
toCenter(LONGITUDE, LATITUDE, height) {
|
||||
if (!LONGITUDE && !LATITUDE) {
|
||||
viewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(119.58, 39.94, height)
|
||||
})
|
||||
viewer.entities.removeAll()
|
||||
} else {
|
||||
viewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(LONGITUDE, LATITUDE, height)
|
||||
})
|
||||
viewer.entities.removeAll()
|
||||
this.form.LONGITUDE = LONGITUDE
|
||||
this.form.LATITUDE = LATITUDE
|
||||
this.addPoint([LONGITUDE, LATITUDE], 'init')
|
||||
}
|
||||
},
|
||||
leftDownAction() {
|
||||
// 去掉entity的点击事件 start
|
||||
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)
|
||||
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK)
|
||||
// 去掉entity的点击事件 end
|
||||
|
||||
const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas)
|
||||
handler.setInputAction(event => {
|
||||
viewer.entities.removeAll()
|
||||
const clickPosition = viewer.scene.camera.pickEllipsoid(event.position) // 转经纬度(弧度)坐标
|
||||
const radiansPos = Cesium.Cartographic.fromCartesian(clickPosition) // 转角度
|
||||
this.form.LONGITUDE = Cesium.Math.toDegrees(radiansPos.longitude)
|
||||
this.form.LATITUDE = Cesium.Math.toDegrees(radiansPos.latitude)
|
||||
this.addPoint(clickPosition, 'click')
|
||||
}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
|
||||
},
|
||||
addPoint(position, type) {
|
||||
viewer.entities.add({ position: type === 'init' ? Cesium.Cartesian3.fromDegrees(...position) : position, billboard: {
|
||||
image: img_h,
|
||||
height: 25,
|
||||
width: 23,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}})
|
||||
},
|
||||
handleMap() {
|
||||
this.dialogFormMap = true
|
||||
this.$nextTick(() => {
|
||||
if (!viewer) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 5000)
|
||||
else this.toCenter(this.form.LONGITUDE, this.form.LATITUDE, 5000)
|
||||
/* else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)*/
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.$parent.DOOR_ID == '') {
|
||||
this.handleAdd()
|
||||
} else {
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDoor/edit',
|
||||
this.form
|
||||
).then((data) => {
|
||||
this.goBack()
|
||||
this.listLoading = false
|
||||
this.dialogFormEdit = false
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
requestFN(
|
||||
'/mkmjDoor/add',
|
||||
this.form
|
||||
).then((data) => {
|
||||
if (data.msg === '保存成功') {
|
||||
this.$message.success(data.msg)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
getDataByID() {
|
||||
this.listLoading = true
|
||||
this.dialogFormVisible = true
|
||||
requestFN(
|
||||
'/mkmjDoor/goEdit',
|
||||
{ DOOR_ID: this.DOOR_ID }
|
||||
).then((data) => {
|
||||
this.form = data.pd
|
||||
this.form.LONGITUDEANDLATITUDE = this.form.LATITUDE + '--' + this.form.LONGITUDE
|
||||
this.dialogFormVisible = false
|
||||
}).catch((e) => {
|
||||
this.dialogFormVisible = false
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
getCorpList() {
|
||||
requestFN(
|
||||
'/corpinfo/getSelectByCorpInfo',
|
||||
{
|
||||
}
|
||||
).then((data) => {
|
||||
this.corpList = JSON.parse(data.corpInfoJson)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#cesiumContainer{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
margin: auto;
|
||||
}
|
||||
.cesium-viewer-toolbar, .cesium-viewer-fullscreenContainer, .cesium-infoBox-visible {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,208 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="人名/车牌号" label-width="110px">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4"/>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column :selectable="selectable" type="selection" reserve-selection width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="NAME" label="人员名称/车牌号"/>
|
||||
<el-table-column prop="STATUS" label="进出类型"/>
|
||||
<el-table-column prop="TIME" label="进出时间"/>
|
||||
<el-table-column prop="BAYNAME" label="进出位置"/>
|
||||
<el-table-column prop="DOORNAME" label="口门名称"/>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
marker: null,
|
||||
BMap: '',
|
||||
clientHeight: 500,
|
||||
inputLocation: '',
|
||||
msg: 'add',
|
||||
config: config,
|
||||
dialogFormMap: false,
|
||||
DOOR_ID: '',
|
||||
AREA_LEAVE: '',
|
||||
addBtnType: true,
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
form: {
|
||||
PATH_ID: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDE: ''
|
||||
},
|
||||
ls: [],
|
||||
dates: [],
|
||||
DOOR_TYPE: '',
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
// 树形菜单
|
||||
filterText: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.DOOR_ID = this.$parent.DOOR_ID
|
||||
this.DOOR_TYPE = this.$parent.DOOR_TYPE
|
||||
this.getList()
|
||||
this.hasButton()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.PATH_ID
|
||||
},
|
||||
selectable(row, index) {
|
||||
return row.ITEMCOUNT == 0
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$parent.activeName = 'EditPath'
|
||||
this.$parent.DOOR_ID = this.DOOR_ID
|
||||
this.$parent.PATH_ID = ''
|
||||
},
|
||||
handleDevice(row) {
|
||||
this.$parent.activeName = 'ListDevice'
|
||||
this.$parent.PATH_ID = row.PATH_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(pid) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
this.HIDDENREGION_ID = pid
|
||||
requestFN(
|
||||
'/mkmjPath/getInfoList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
DOOR_ID: this.DOOR_ID,
|
||||
DOOR_TYPE: this.DOOR_TYPE
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}, goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
hasButton: function() {
|
||||
var keys = 'mkmjDoor:add,mkmjDoor:del,mkmjDoor:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.mkmjDoorfhadminadd // 新增权限
|
||||
this.del = data.mkmjDoorfhadmindel // 删除权限
|
||||
this.edit = data.mkmjDoorfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,284 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="口门名称" label-width="110px">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入关键字"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4"/>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column :selectable="selectable" type="selection" reserve-selection width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="DOOR_NAME" label="口门名称"/>
|
||||
<el-table-column prop="DOOR_TYPE" label="口门类型">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.DOOR_TYPE == '0' ? '人行口门' : row.DOOR_TYPE == '1' ? '车行口门' : '综合口门' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="STATUS" label="状态">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.STATUS == '0' ? '正常' : row.STATUS == '1' ? '停用' : '暂时关闭' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="LONGITUDE" label="地理位置">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.LONGITUDE }} -- {{ row.LATITUDE }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="VIDEOCOUNT" label="视频个数"/>
|
||||
<el-table-column prop="PATHCOUNT" label="通道个数"/>
|
||||
<el-table-column label="操作" width="550">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleInfoView(row)">查看记录
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleEdit(row.DOOR_ID)">修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="edit"
|
||||
type="success"
|
||||
icon="el-icon-setting"
|
||||
size="mini"
|
||||
@click="handleOpen(row)">添加通道
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="edit"
|
||||
type="success"
|
||||
icon="el-icon-setting"
|
||||
size="mini"
|
||||
@click="handleVideo(row)">添加视频
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="del"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDelete(row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
DOOR_ID: '',
|
||||
AREA_LEAVE: '1',
|
||||
AREA_PARENT_ID: '0',
|
||||
addBtnType: true,
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
ls: [],
|
||||
dates: [],
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
// 树形菜单
|
||||
filterText: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
console.log(val)
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.hasButton()
|
||||
},
|
||||
methods: {
|
||||
handleVideo(row) {
|
||||
this.$parent.activeName = 'VideoList'
|
||||
this.$parent.DOOR_ID = row.DOOR_ID
|
||||
this.$parent.CORPINFO_ID = row.CORPINFO_ID
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
getRowKey(row) {
|
||||
return row.DOOR_ID
|
||||
},
|
||||
selectable(row, index) {
|
||||
return row.ITEMCOUNT == 0
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$parent.activeName = 'Edit'
|
||||
this.$parent.AREA_LEAVE = this.AREA_LEAVE
|
||||
this.$parent.AREA_PARENT_ID = this.AREA_PARENT_ID
|
||||
this.$parent.DOOR_ID = this.DOOR_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(pid) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
this.HIDDENREGION_ID = pid
|
||||
requestFN(
|
||||
'/mkmjDoor/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}, goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
handleInfoView(row) {
|
||||
this.$parent.DOOR_ID = row.DOOR_ID
|
||||
this.$parent.DOOR_TYPE = row.DOOR_TYPE
|
||||
this.$parent.activeName = 'InfoList'
|
||||
},
|
||||
handleEdit(DOOR_ID) {
|
||||
this.$parent.DOOR_ID = DOOR_ID
|
||||
this.$parent.activeName = 'Edit'
|
||||
},
|
||||
handleOpen(row) {
|
||||
this.$parent.DOOR_ID = row.DOOR_ID
|
||||
this.$parent.DOOR_TYPE = row.DOOR_TYPE
|
||||
this.$parent.CORPINFO_ID = row.CORPINFO_ID
|
||||
this.$parent.activeName = 'ListPath'
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定要删除[' + row.AREA_NAME + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDoor/delete',
|
||||
{
|
||||
DOOR_ID: row.DOOR_ID
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
hasButton: function() {
|
||||
var keys = 'mkmjDoor:add,mkmjDoor:del,mkmjDoor:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.mkmjDoorfhadminadd // 新增权限
|
||||
this.del = data.mkmjDoorfhadmindel // 删除权限
|
||||
this.edit = data.mkmjDoorfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,297 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="rightCont">
|
||||
<el-form label-width="50px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="通道名称" label-width="110px">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入通道名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4"/>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%">
|
||||
<el-table-column :selectable="selectable" type="selection" reserve-selection width="55" align="center"/>
|
||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||
<el-table-column prop="PATH_NAME" label="通道名称"/>
|
||||
<el-table-column label="通道类型">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.PATH_TYPE === 0" >人行通道</span>
|
||||
<span v-else-if="row.PATH_TYPE === 1" >车行通道</span>
|
||||
<span v-else-if="row.PATH_TYPE === 2" >综合通道</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEVICECOUNT" label="设备数"/>
|
||||
<el-table-column label="操作" width="400">
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
v-show="edit"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleEdit(row.PATH_ID)">修改
|
||||
</el-button>
|
||||
<el-button type="success" icon="el-icon-location-information" size="mini" @click="handleDevice(row)">添加设备</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleDelete(row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
|
||||
export default {
|
||||
|
||||
components: { Pagination, SelectTree },
|
||||
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
marker: null,
|
||||
BMap: '',
|
||||
clientHeight: 500,
|
||||
inputLocation: '',
|
||||
msg: 'add',
|
||||
config: config,
|
||||
dialogFormMap: false,
|
||||
DOOR_ID: '',
|
||||
AREA_LEAVE: '',
|
||||
addBtnType: true,
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
form: {
|
||||
PATH_ID: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDE: ''
|
||||
},
|
||||
DOOR_TYPE: '',
|
||||
ls: [],
|
||||
dates: [],
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
// 树形菜单
|
||||
filterText: '',
|
||||
varList: [],
|
||||
pd: [],
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.AREA_LEAVE = this.$parent.AREA_LEAVE
|
||||
this.DOOR_TYPE = this.$parent.DOOR_TYPE
|
||||
this.DOOR_ID = this.$parent.DOOR_ID
|
||||
this.getList()
|
||||
this.hasButton()
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.PATH_ID
|
||||
},
|
||||
selectable(row, index) {
|
||||
return row.ITEMCOUNT == 0
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$parent.activeName = 'EditPath'
|
||||
this.$parent.DOOR_ID = this.DOOR_ID
|
||||
this.$parent.DOOR_TYPE = this.DOOR_TYPE
|
||||
this.$parent.PATH_ID = ''
|
||||
},
|
||||
handleDevice(row) {
|
||||
this.$parent.PATH_ID = row.PATH_ID
|
||||
this.$parent.DOOR_TYPE = this.DOOR_TYPE
|
||||
this.$parent.DOOR_ID = this.DOOR_ID
|
||||
this.$parent.activeName = 'ListDevice'
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList(pid) {
|
||||
this.listLoading = true
|
||||
this.varList = []
|
||||
this.HIDDENREGION_ID = pid
|
||||
requestFN(
|
||||
'/mkmjPath/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
DOOR_ID: this.DOOR_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}, goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
handleEdit(PATH_ID) {
|
||||
this.$parent.PATH_ID = PATH_ID
|
||||
this.$parent.activeName = 'EditPath'
|
||||
},
|
||||
handleMap(row) {
|
||||
this.dialogFormMap = true
|
||||
this.form = {
|
||||
PATH_ID: row.PATH_ID,
|
||||
LATITUDE: row.LATITUDE,
|
||||
LONGITUDE: row.LONGITUDE
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定要删除[' + row.GATE_NAME + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjPath/delete',
|
||||
{
|
||||
PATH_ID: row.PATH_ID
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
setPosition() {
|
||||
this.dialogFormMap = false
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjPath/savePosition',
|
||||
{
|
||||
LATITUDE: this.form.LATITUDE,
|
||||
LONGITUDE: this.form.LONGITUDE,
|
||||
PATH_ID: this.form.PATH_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
hasButton: function() {
|
||||
var keys = 'mkmjDoor:add,mkmjDoor:del,mkmjDoor:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.mkmjDoorfhadminadd // 新增权限
|
||||
this.del = data.mkmjDoorfhadmindel // 删除权限
|
||||
this.edit = data.mkmjDoorfhadminedit // 修改权限
|
||||
this.toExcel = data.toExcel // 导出到excel权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 返回列表
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
.returnBtn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
display: flex; /**/
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rightCont {
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,178 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-if="visible"
|
||||
:visible.sync="visible"
|
||||
:before-close="handleClose"
|
||||
:append-to-body="true"
|
||||
title="固定摄像头"
|
||||
width="60%">
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6"> <el-form-item label="视频名称">
|
||||
<el-input v-model="KEYWORDS" placeholder="请输入关键字" class="filter-item" style="width: 150px;"/>
|
||||
</el-form-item></el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item >
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="NAME" label="视频名称" />
|
||||
<el-table-column prop="REGIONNAME" label="区域" />
|
||||
<el-table-column label="操作" align="left" width="500">
|
||||
<template slot-scope="{row}">
|
||||
<el-button v-show="row.in !== 1" type="success" icon="el-icon-caret-right" size="mini" @click="selectVideo(row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeWindow">关 闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves'
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
visible: false,
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
varList: [],
|
||||
allCodes: []
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async init() {
|
||||
this.visible = true
|
||||
this.varList = []
|
||||
this.KEYWORDS = ''
|
||||
await this.getAllList()
|
||||
this.getList()
|
||||
},
|
||||
getRowKey(row) {
|
||||
return row.PLATFORMDOORVIDEO_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
|
||||
getAllList() {
|
||||
return new Promise(resolve => {
|
||||
requestFN(
|
||||
'/mkmjDoorVideo/list?showCount=1000¤tPage=1',
|
||||
{
|
||||
DOOR_ID: this.$parent.DOOR_ID
|
||||
}
|
||||
).then((data) => {
|
||||
const tempList = data.varList
|
||||
const allCodes = []
|
||||
tempList.forEach(item => {
|
||||
allCodes.push(item.INDEXCODE)
|
||||
})
|
||||
this.allCodes = allCodes
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/platform/door/video/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
// bug 12403 线上 有的没有操作按钮
|
||||
const tempList = data.varList.filter(item => {
|
||||
return this.allCodes.indexOf(item.INDEXCODE) == -1
|
||||
})
|
||||
// tempList.forEach(item => {
|
||||
// if (this.allCodes.indexOf(item.INDEXCODE) !== -1) {
|
||||
// item.in = 1
|
||||
// }
|
||||
// })
|
||||
this.varList = tempList
|
||||
this.total = data.page.totalResult
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
selectVideo(row) {
|
||||
this.$emit('handleSelected', row)
|
||||
this.closeWindow()
|
||||
},
|
||||
|
||||
goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.visible = false
|
||||
},
|
||||
closeWindow() {
|
||||
this.handleClose()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.hide .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,569 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="关键字搜索">
|
||||
<el-input v-model="KEYWORDS" placeholder="搜索关键字" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="NAME" label="视频名称" />
|
||||
<el-table-column prop="POSITION" label="状态" width="100">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.LATITUDE && row.LONGITUDE">已定位</span>
|
||||
<span v-else>未定位</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="500">
|
||||
<template slot-scope="{row}">
|
||||
<el-button :disabled="STATE == 2" type="success" icon="el-icon-caret-right" size="mini" @click="showVideo(row)">播放</el-button>
|
||||
<el-button type="info" icon="el-icon-location-information" size="mini" @click="handleMap(row)">定位</el-button>
|
||||
<el-button v-show="del" :disabled="STATE == 2" type="danger" icon="el-icon-delete" plain @click="handleDelete(row.DOOR_VIDEO_ID)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group" style="margin-bottom: 50px;">
|
||||
<div>
|
||||
<el-button v-show="add" :disabled="STATE == 2" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<div class="ui-foot">
|
||||
<el-button plain type="info" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormMap" title="定位" width="1050px" class="dy-dialog">
|
||||
<div id="map" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<span>经度:</span>
|
||||
<el-input v-model="form.LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled />
|
||||
<span>纬度:</span>
|
||||
<el-input v-model="form.LATITUDE" style="width: 200px" placeholder="请输入内容" disabled />
|
||||
<el-button @click="dialogFormMap = false">取 消</el-button>
|
||||
<el-button type="primary" @click="setPosition">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogForm" :title="msg==='add'?'新增':'编辑'" width="600px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="视频类型">
|
||||
<el-radio-group v-model="form.VIDEO_TYPE" @change="changeType($event)">
|
||||
<el-radio :label="1">固定摄像头</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.VIDEO_TYPE===0" label="视频监控信息" prop="VIDEO_RESOURCES_ID">
|
||||
<el-button type="success" icon="el-icon-caret-right" size="mini" @click="selectBobileVideo()">选择</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.VIDEO_TYPE===1" label="视频选择">
|
||||
<el-button type="success" icon="el-icon-caret-right" size="mini" @click="selectVideo()">选择</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="视频名称" prop="VIDEONAME">
|
||||
<el-input :disabled="true" v-model="form.VIDEONAME" placeholder="这里输入视频名称..." />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.VIDEO_TYPE===0" label="播放地址" prop="VIDEOURL">
|
||||
<el-input :disabled="true" v-model="form.VIDEOURL" placeholder="这里输入播放地址..." />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="摄像头编号" prop="CODE">
|
||||
<el-input :disabled="true" v-model="form.CODE" placeholder="这里输入摄像头编号..." />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
<el-button type="primary" @click="upload">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="dialogVideo" :visible.sync="dialogVideo" title="视频" width="600px">
|
||||
<iframe :src="VIDEOURL" width="100%" height="380" allowfullscreen allow="autoplay; fullscreen;microphone" style="position: relative;border:none"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="dialogVideoHLS" :visible.sync="dialogVideoHLS" :before-close="handleBack" title="视频" width="600px">
|
||||
<div id="aLiVideoPlayer" class="prism-player"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="dialogVideoAll" :visible.sync="dialogVideoAll" :before-close="handleBack" title="视频" width="1200px">
|
||||
<!-- <iframe src="http://192.168.192.121:10800/?menu=no/#/screen" width="100%" height="500px" allowfullscreen allow="autoplay; fullscreen" style="position: relative;border:none"/>-->
|
||||
<div style="display: flex;flex-wrap: wrap;justify-content: space-between">
|
||||
<div v-for="(video,index) in videoList" :key="index" style="margin-bottom: 10px;width: 45%">
|
||||
<iframe v-if="video.GBSVIDEOURL" :src="video.GBSVIDEOURL" width="100%" height="380" allowfullscreen allow="autoplay; fullscreen;microphone" style="position: relative;border:none"/>
|
||||
<div v-if="video.HLSVIDEOURL" :id="'aLiVideoPlayer'+index" class="prism-player"/>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="back">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<platformvideo ref="platformvideo" @handleSelected="handleSelected"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves'
|
||||
import Platformvideo from './platformvideo'
|
||||
import TiandiMap from '../../../../components/TianMap/TiandiMap'
|
||||
|
||||
export default {
|
||||
components: { Platformvideo, Pagination, TiandiMap },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
marker: null,
|
||||
BMap: '',
|
||||
clientHeight: 500,
|
||||
inputLocation: '',
|
||||
msg: 'add',
|
||||
config: config,
|
||||
listLoading: true,
|
||||
dialogForm: false,
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
dialogSelect: false,
|
||||
add: true,
|
||||
del: true,
|
||||
edit: true,
|
||||
dialogFormMap: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
STATE: this.$parent.STATE,
|
||||
dates: [],
|
||||
videoList: [],
|
||||
videoResourcesList: [],
|
||||
varList: [],
|
||||
LATITUDE: '',
|
||||
LONGITUDE: '',
|
||||
disabledForm: true,
|
||||
form: {
|
||||
CORPINFO_ID: '',
|
||||
DOOR_ID: '',
|
||||
VIDEO_RESOURCES_ID: '',
|
||||
PLATFORMVIDEOMANAGEMENT_ID: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDE: ''
|
||||
},
|
||||
zoom: 10,
|
||||
rules: {
|
||||
VIDEONAME: [{ required: true, message: '视频名称不能为空', trigger: 'blur' }],
|
||||
VIDEOURL: [{ required: true, message: '播放地址不能为空', trigger: 'blur' }],
|
||||
VIDEO_RESOURCES_ID: [{ required: true, message: '不能为空', trigger: 'change' }],
|
||||
CODE: [{ required: true, message: '摄像头编号不能为空', trigger: 'blur' }]
|
||||
},
|
||||
dialogVideo: false,
|
||||
timer: '',
|
||||
dialogVideoHLS: false,
|
||||
dialogVideoAll: false,
|
||||
VIDEOURL: '',
|
||||
player: {},
|
||||
playerList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.DOOR_ID = this.$parent.DOOR_ID
|
||||
this.form.CORPINFO_ID = this.$parent.CORPINFO_ID
|
||||
this.getList()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.map && this.map.removeEventListener('click', this.MapClick)
|
||||
console.log('定时器关闭')
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 初始化天地图对象
|
||||
*/
|
||||
initTDT() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.T) {
|
||||
console.log('天地图初始化成功...')
|
||||
resolve(window.T)
|
||||
reject('error')
|
||||
}
|
||||
}).then(T => {
|
||||
window.T = T
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 初始化地图
|
||||
* @param {*} lng 经度
|
||||
* @param {*} lat 纬度
|
||||
* @param {*} zoom 缩放比例(1~18)
|
||||
*/
|
||||
initMap(lng, lat, zoom) {
|
||||
this.initTDT().then((T) => {
|
||||
const imageURL = 'http://t0.tianditu.gov.cn/img_w/wmts?' + 'SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles' + '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce'
|
||||
// 创建自定义图层对象
|
||||
this.lay = new window.T.TileLayer(imageURL, { minZoom: 1, maxZoom: 18 })
|
||||
// 初始化地图对象
|
||||
this.map = new window.T.Map('map')
|
||||
this.initCenter(lng, lat, zoom)
|
||||
})
|
||||
},
|
||||
initCenter(lng, lat, zoom) {
|
||||
// 设置显示地图的中心点和级别
|
||||
if (!this.form.LONGITUDE && !this.form.LATITUDE) {
|
||||
this.map.centerAndZoom(new window.T.LngLat(119.58, 39.94), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
} else {
|
||||
this.map.centerAndZoom(new window.T.LngLat(lng, lat), zoom)
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.form.LONGITUDE = lng
|
||||
this.form.LATITUDE = lat
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(lng, lat))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
}
|
||||
// 创建卫星和路网的混合视图
|
||||
this.map.setMapType(window.TMAP_HYBRID_MAP)
|
||||
// 允许鼠标滚轮缩放地图
|
||||
this.map.enableScrollWheelZoom()
|
||||
// 允许鼠标移动地图
|
||||
this.map.enableInertia()
|
||||
// 向地图上添加标注
|
||||
this.map.addEventListener('click', this.MapClick)
|
||||
},
|
||||
MapClick(event) {
|
||||
this.marker && this.map.removeOverLay(this.marker)
|
||||
this.form.LONGITUDE = event.lnglat.getLng()
|
||||
this.form.LATITUDE = event.lnglat.getLat()
|
||||
this.marker = new window.T.Marker(new window.T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()))
|
||||
// 向地图上添加标注
|
||||
this.map.addOverLay(this.marker)
|
||||
},
|
||||
handleMap(row) {
|
||||
this.dialogFormMap = true
|
||||
var DOOR_ID = this.form.DOOR_ID
|
||||
this.form = {
|
||||
CORPINFO_ID: this.$parent.CORPINFO_ID,
|
||||
DOOR_ID: DOOR_ID,
|
||||
DOOR_VIDEO_ID: row.DOOR_VIDEO_ID,
|
||||
LATITUDE: row.LATITUDE,
|
||||
LONGITUDE: row.LONGITUDE
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (!this.map) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)
|
||||
})
|
||||
},
|
||||
getRowKey(row) {
|
||||
return row.VIDEOMANAGER_ID
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 五分钟关闭视频播放页面定时任务
|
||||
start() {
|
||||
console.log('定时器开启')
|
||||
this.timer = setInterval(this.closeVideoStart, (5 * 60 * 1000)) // 5分钟;
|
||||
},
|
||||
over() {
|
||||
// 定时器手动关闭
|
||||
console.log('定时器手动关闭')
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
closeVideoStart() {
|
||||
this.dialogVideo = false
|
||||
this.dialogVideoHLS = false
|
||||
this.dialogVideoAll = false
|
||||
this.over()
|
||||
},
|
||||
// 播放
|
||||
showVideo(row) {
|
||||
this.$message.warning('单次播放最多五分钟')
|
||||
this.start()
|
||||
requestFN(
|
||||
'/platform/door/video/getHlsPath',
|
||||
{
|
||||
INDEXCODE: row.INDEXCODE
|
||||
}
|
||||
).then((res) => {
|
||||
this.dialogVideoHLS = true
|
||||
this.$nextTick(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
this.player = new Aliplayer({
|
||||
'id': 'aLiVideoPlayer',
|
||||
'source': res.data.url,
|
||||
'width': '100%',
|
||||
'height': '500px',
|
||||
'autoplay': true,
|
||||
'isLive': true,
|
||||
'rePlay': false,
|
||||
'playsinline': true,
|
||||
'preload': true,
|
||||
'controlBarVisibility': 'hover',
|
||||
'useH5Prism': true
|
||||
}, function(player) {
|
||||
console.log('The player is created')
|
||||
})
|
||||
})
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
setPosition() {
|
||||
this.dialogFormMap = false
|
||||
this.listLoading = true
|
||||
console.log(132)
|
||||
requestFN(
|
||||
'/mkmjDoorVideo/savePosition',
|
||||
{
|
||||
LATITUDE: this.form.LATITUDE,
|
||||
LONGITUDE: this.form.LONGITUDE,
|
||||
DOOR_VIDEO_ID: this.form.DOOR_VIDEO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDoorVideo/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
KEYWORDS: this.KEYWORDS,
|
||||
DOOR_ID: this.form.DOOR_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.msg = 'add'
|
||||
this.resetForm()
|
||||
this.dialogForm = true
|
||||
},
|
||||
selectBobileVideo() {
|
||||
this.$refs.bobileCamer.init(this.$parent.UNITS_ID)
|
||||
},
|
||||
selectVideo(row) {
|
||||
this.$refs.platformvideo.init()
|
||||
},
|
||||
handleSelected(row) {
|
||||
this.$set(this.form, 'VIDEONAME', row.NAME)
|
||||
this.$set(this.form, 'CODE', row.INDEXCODE)
|
||||
this.$set(this.form, 'LATITUDE', row.LATITUDE)
|
||||
this.$set(this.form, 'LONGITUDE', row.LONGITUDE)
|
||||
this.$set(this.form, 'PLATFORMVIDEOMANAGEMENT_ID', row.PLATFORMDOORVIDEO_ID)
|
||||
},
|
||||
// 保存
|
||||
upload() {
|
||||
this.$refs.form.validate(valid => {
|
||||
console.log(this.form)
|
||||
if (valid) {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmjDoorVideo/add',
|
||||
{
|
||||
PLATFORMVIDEOMANAGEMENT_ID: this.form.PLATFORMVIDEOMANAGEMENT_ID,
|
||||
LONGITUDE: this.form.LONGITUDE,
|
||||
LATITUDE: this.form.LATITUDE,
|
||||
DOOR_ID: this.form.DOOR_ID,
|
||||
CORPINFO_ID: this.form.CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dialogForm = false
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleDelete(id) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
console.log(this.VIDEOMANAGER_ID)
|
||||
requestFN(
|
||||
'/mkmjDoorVideo/delete',
|
||||
{
|
||||
DOOR_VIDEO_ID: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
var keys = 'videomanager:add,videomanager:del,videomanager:edit,toExcel'
|
||||
requestFN(
|
||||
'/head/hasButton',
|
||||
{
|
||||
keys: keys
|
||||
}
|
||||
).then((data) => {
|
||||
this.add = data.videomanagerfhadminadd // 新增权限
|
||||
this.del = data.videomanagerfhadmindel // 删除权限
|
||||
this.edit = data.videomanagerfhadminedit // 修改权限
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
goKeyReset() {
|
||||
this.KEYWORDS = ''
|
||||
this.getList()
|
||||
},
|
||||
changeType(e) {
|
||||
if (e === 1) {
|
||||
this.form.VIDEO_TYPE = 1
|
||||
} else {
|
||||
this.form.VIDEO_TYPE = 0
|
||||
}
|
||||
this.form.VIDEO_RESOURCES_ID = ''
|
||||
this.form.VIDEONAME = ''
|
||||
this.form.VIDEOURL = ''
|
||||
this.form.CODE = ''
|
||||
},
|
||||
changeRid(e) {
|
||||
console.log(e)
|
||||
this.disabledForm = true
|
||||
requestFN(
|
||||
'/videoResources/findById',
|
||||
{
|
||||
VIDEO_RESOURCES_ID: e
|
||||
}
|
||||
).then((data) => {
|
||||
this.form.VIDEOURL = data.pd.VIDEOURL
|
||||
this.form.VIDEONAME = data.pd.VIDEONAME
|
||||
this.form.CODE = data.pd.CODE
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
if (this.dialogVideo) this.dialogVideo = false
|
||||
if (this.dialogVideoAll) {
|
||||
this.dialogVideoAll = false
|
||||
for (let i = 0; i < this.playerList.length; i++) {
|
||||
this.playerList[i].dispose()
|
||||
}
|
||||
}
|
||||
if (this.dialogForm) this.dialogForm = false
|
||||
if (this.dialogVideoHLS) {
|
||||
this.dialogVideoHLS = false
|
||||
this.player.dispose()
|
||||
}
|
||||
},
|
||||
|
||||
handleBack() {
|
||||
if (this.dialogVideoAll) {
|
||||
for (let i = 0; i < this.playerList.length; i++) {
|
||||
this.playerList[i].dispose()
|
||||
}
|
||||
this.dialogVideoAll = false
|
||||
}
|
||||
if (this.dialogVideoHLS) {
|
||||
this.player.dispose()
|
||||
this.dialogVideoHLS = false
|
||||
}
|
||||
},
|
||||
|
||||
resetForm() {
|
||||
var DOOR_ID = this.form.DOOR_ID
|
||||
this.form = {
|
||||
CORPINFO_ID: this.$parent.CORPINFO_ID,
|
||||
VIDEO_TYPE: 1,
|
||||
CODE: '',
|
||||
DOOR_ID: DOOR_ID,
|
||||
VIDEO_RESOURCES_ID: '',
|
||||
PLATFORMVIDEOMANAGEMENT_ID: '',
|
||||
LATITUDE: '',
|
||||
LONGITUDE: ''
|
||||
}
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.hide .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
#map{
|
||||
width: 1000px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,47 @@
|
|||
<template>
|
||||
<!-- <component :is="activeName" />-->
|
||||
<div>
|
||||
<List v-if="activeName=='List'" ref="list" />
|
||||
<ListPath v-if="activeName=='ListPath'" />
|
||||
<Edit v-if="activeName=='Edit'" />
|
||||
<EditPath v-if="activeName=='EditPath'" />
|
||||
<ListDevice v-if="activeName=='ListDevice'" />
|
||||
<EditDevice v-if="activeName=='EditDevice'" />
|
||||
<VideoList v-if="activeName=='VideoList'" />
|
||||
<InfoList v-if="activeName=='InfoList'"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
import ListPath from './components/listPath'
|
||||
import Edit from './components/edit'
|
||||
import EditPath from './components/EditPath'
|
||||
import ListDevice from './components/ListDevice'
|
||||
import EditDevice from './components/EditDevice'
|
||||
import VideoList from './components/videoList'
|
||||
import InfoList from './components/infoList'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
VideoList: VideoList,
|
||||
ListDevice: ListDevice,
|
||||
List: List,
|
||||
Edit: Edit,
|
||||
ListPath: ListPath,
|
||||
EditPath: EditPath,
|
||||
EditDevice: EditDevice,
|
||||
InfoList: InfoList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List'
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
|
@ -101,6 +101,18 @@
|
|||
style="width: 100%;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="隐患整改部门">
|
||||
<SelectTree
|
||||
ref="deptTree_Select"
|
||||
:clearable="false"
|
||||
:options="departmentTreeData"
|
||||
:props="defaultProps"
|
||||
v-model="form.RECTIFICATION_DEPT"
|
||||
placeholder="请选择部门"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
|
@ -223,6 +235,7 @@ export default {
|
|||
total: 0,
|
||||
varList: [],
|
||||
treeData: [],
|
||||
departmentTreeData:[],
|
||||
hiddenPartList: [],
|
||||
hiddenTypeList: [], // 隐患类型
|
||||
hiddenlevelList: [
|
||||
|
@ -266,7 +279,8 @@ export default {
|
|||
HIDDENFIND_NAME: '',
|
||||
CORPINFO_ID: '',
|
||||
HIDDEN_TYPE: '',
|
||||
HIDDEN_STATUS: undefined
|
||||
HIDDEN_STATUS: undefined,
|
||||
RECTIFICATION_DEPT:''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -275,6 +289,7 @@ export default {
|
|||
this.getList()
|
||||
this.getDict()
|
||||
this.getHiddenReginTreeList()
|
||||
this.getTreeData()
|
||||
},
|
||||
methods: {
|
||||
getQuery() {
|
||||
|
@ -294,7 +309,8 @@ export default {
|
|||
CONFIRM_USER: '',
|
||||
CORPINFO_ID: '',
|
||||
HIDDENFIND_NAME: '',
|
||||
HIDDEN_STATUS: undefined
|
||||
HIDDEN_STATUS: undefined,
|
||||
RECTIFICATION_DEPT:''
|
||||
}
|
||||
this.$refs.deptTree_Select.clearHandle()
|
||||
this.getQuery()
|
||||
|
@ -331,6 +347,16 @@ export default {
|
|||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
// 获得部门树
|
||||
getTreeData() {
|
||||
requestFN(
|
||||
'/department/listTreeCorpInfo',
|
||||
{CORPINFO_ID:this.$parent.CORPINFO_ID}
|
||||
).then((data) => {
|
||||
this.departmentTreeData = JSON.parse(data.zTreeNodes)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
getDict() {
|
||||
// requestFN(
|
||||
// '/dictionaries/listSelectTree',
|
||||
|
|
|
@ -352,17 +352,17 @@ export default {
|
|||
})
|
||||
},
|
||||
getPersonPositioningCount() {
|
||||
requestFN(
|
||||
'/map/getPersonPositioningCount',
|
||||
{
|
||||
CORPINFO_ID: this.corpInfoId,
|
||||
GANGKOU: this.gangkou
|
||||
}
|
||||
).then((data) => {
|
||||
this.block3OptionsList[2].count = data.perCount
|
||||
this.block4OptionsList[0].list[0].count = data.perCount + 3
|
||||
this.block4OptionsList[0].list[1].count = 3
|
||||
})
|
||||
// requestFN(
|
||||
// '/map/getPersonPositioningCount',
|
||||
// {
|
||||
// CORPINFO_ID: this.corpInfoId,
|
||||
// GANGKOU: this.gangkou
|
||||
// }
|
||||
// ).then((data) => {
|
||||
// this.block3OptionsList[2].count = data.perCount
|
||||
// this.block4OptionsList[0].list[0].count = data.perCount + 3
|
||||
// this.block4OptionsList[0].list[1].count = 3
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -327,16 +327,16 @@ export default {
|
|||
})
|
||||
},
|
||||
getPersonPositioningCount() {
|
||||
requestFN(
|
||||
'/map/getPersonPositioningCount',
|
||||
{
|
||||
CORPINFO_ID: this.corpInfoId,
|
||||
GANGKOU: this.gangkou
|
||||
}
|
||||
).then((data) => {
|
||||
this.block3OptionsList[0].count = data.personPositioningCount[0]
|
||||
this.block3OptionsList[1].count = data.personPositioningCount[1]
|
||||
})
|
||||
// requestFN(
|
||||
// '/map/getPersonPositioningCount',
|
||||
// {
|
||||
// CORPINFO_ID: this.corpInfoId,
|
||||
// GANGKOU: this.gangkou
|
||||
// }
|
||||
// ).then((data) => {
|
||||
// this.block3OptionsList[0].count = data.personPositioningCount[0]
|
||||
// this.block3OptionsList[1].count = data.personPositioningCount[1]
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -341,17 +341,17 @@ export default {
|
|||
})
|
||||
},
|
||||
getPersonPositioningCount() {
|
||||
requestFN(
|
||||
'/map/getPersonPositioningCount',
|
||||
{
|
||||
CORPINFO_ID: this.corpInfoId,
|
||||
GANGKOU: this.gangkou
|
||||
}
|
||||
).then((data) => {
|
||||
this.block3OptionsList[0].count = data.userCount
|
||||
this.block3OptionsList[1].count = data.departCount
|
||||
this.block3OptionsList[2].count = data.total
|
||||
})
|
||||
// requestFN(
|
||||
// '/map/getPersonPositioningCount',
|
||||
// {
|
||||
// CORPINFO_ID: this.corpInfoId,
|
||||
// GANGKOU: this.gangkou
|
||||
// }
|
||||
// ).then((data) => {
|
||||
// this.block3OptionsList[0].count = data.userCount
|
||||
// this.block3OptionsList[1].count = data.departCount
|
||||
// this.block3OptionsList[2].count = data.total
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -346,15 +346,15 @@ export default {
|
|||
})
|
||||
},
|
||||
getPersonPositioningCount() {
|
||||
requestFN(
|
||||
'/map/getPersonPositioningCount',
|
||||
{
|
||||
CORPINFO_ID: this.corpInfoId,
|
||||
GANGKOU: this.gangkou
|
||||
}
|
||||
).then((data) => {
|
||||
this.personPositioningCount = data.personPositioningCount
|
||||
})
|
||||
// requestFN(
|
||||
// '/map/getPersonPositioningCount',
|
||||
// {
|
||||
// CORPINFO_ID: this.corpInfoId,
|
||||
// GANGKOU: this.gangkou
|
||||
// }
|
||||
// ).then((data) => {
|
||||
// this.personPositioningCount = data.personPositioningCount
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,6 +135,9 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
console.info('corpInfoId', this.corpInfoId)
|
||||
console.info('area', this.area)
|
||||
console.info('gangkou', this.gangkou)
|
||||
this.getDoorWayRecords(0)
|
||||
this.getOnlineGateMachine()
|
||||
this.getMkmjGateStatistics()
|
||||
|
@ -148,7 +151,7 @@ export default {
|
|||
this.initEcharts1()
|
||||
},
|
||||
beforeDestroy() {
|
||||
Echarts1 = null
|
||||
if (Echarts1) { Echarts1 = null }
|
||||
},
|
||||
methods: {
|
||||
initEcharts1(data) {
|
||||
|
@ -160,7 +163,7 @@ export default {
|
|||
XaxisData.push(e.AREA_NAME)
|
||||
seriesData1.push(e.CAR_IN + 0 + e.PEOPLE_IN)
|
||||
seriesData2.push(e.CAR_OUT + 0 + e.PEOPLE_OUT)
|
||||
});
|
||||
})
|
||||
|
||||
Echarts1 = echarts.init(document.querySelector('#main1'))
|
||||
const option = {
|
||||
|
@ -301,24 +304,22 @@ export default {
|
|||
'/map/getOnlineGateMachine', {
|
||||
AREA: this.area,
|
||||
CORPINFO_ID: this.corpInfoId,
|
||||
GANGKOU: this.gangkou,
|
||||
GANGKOU: this.gangkou
|
||||
}
|
||||
).then((data) => {
|
||||
data.varList.forEach(e => {
|
||||
if (e.AREA_PARENT_ID == '393705'){
|
||||
if (e.AREA_PARENT_ID == '393705') {
|
||||
// 东港区
|
||||
this.block1OptionsList[0].count1 = e.AREA_COUNT
|
||||
this.block1OptionsList[0].count2 = e.CAR
|
||||
this.block1OptionsList[0].count3 = e.PEOPLE
|
||||
}else if (e.AREA_PARENT_ID == '371709'){
|
||||
} else if (e.AREA_PARENT_ID == '371709') {
|
||||
// 西港区
|
||||
this.block1OptionsList[1].count1 = e.AREA_COUNT
|
||||
this.block1OptionsList[1].count2 = e.CAR
|
||||
this.block1OptionsList[1].count3 = e.PEOPLE
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
getDoorManagement() {
|
||||
|
|
|
@ -0,0 +1,470 @@
|
|||
<template>
|
||||
<div class="menjin">
|
||||
<div class="block1">
|
||||
<layout-title title="设备在线情况"/>
|
||||
<div class="options">
|
||||
<div v-for="(item,index) in block1OptionsList" :key="index" class="option">
|
||||
<div class="title active">{{ item.title }}</div>
|
||||
<div class="circular">
|
||||
<img :src="item.img" alt="">
|
||||
</div>
|
||||
<div class="label">
|
||||
{{ item.label1 }}:<count-to :start-val="0" :end-val="item.count1" :duration="3600"/>
|
||||
</div>
|
||||
<div v-if="item.label2" class="label">
|
||||
{{ item.label2 }}:<count-to :start-val="0" :end-val="item.count2" :duration="3600"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block4">
|
||||
<layout-title title="区域进出记录"/>
|
||||
<div class="content">
|
||||
<div class="options">
|
||||
<div
|
||||
v-for="(item,index) in block4OptionsTabs"
|
||||
:key="index"
|
||||
:class="['title', {active:index === block4OptionsIndex}]"
|
||||
@click="block4OptionsClick(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
<div id="main1"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block3">
|
||||
<layout-title title="口门进出记录"/>
|
||||
<div class="content">
|
||||
<div class="options">
|
||||
<div
|
||||
v-for="(item,index) in block3OptionsList"
|
||||
:key="index"
|
||||
:class="['title', {active:index === block3OptionsIndex}]"
|
||||
@click="block3OptionsClick(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<div class="tr">
|
||||
<div class="td">卡口名称</div>
|
||||
<div class="td">{{ block3OptionsIndex===0 ? '人员':'车牌' }}</div>
|
||||
<div class="td">时间</div>
|
||||
<div class="td">状态</div>
|
||||
</div>
|
||||
<div v-for="(item,index) in block3List" :key="index" class="tr">
|
||||
<div class="td line1">{{ item.DOORNAME }}</div>
|
||||
<div class="td">{{ item.NAME }}</div>
|
||||
<div class="td line1">{{ item.TIME.substring(11) }}</div>
|
||||
<div class="td">{{ item.STATUS }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import layoutTitle from './title.vue'
|
||||
import CountTo from 'vue-count-to'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
let myChart1
|
||||
export default {
|
||||
components: {
|
||||
layoutTitle,
|
||||
CountTo
|
||||
},
|
||||
props: {
|
||||
corpInfoId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
area: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
gangkou: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
block1OptionsList: [
|
||||
{
|
||||
title: '人员闸机数',
|
||||
img: require('../../../assets/map/menjin/ico1.png'),
|
||||
label1: '在线数',
|
||||
count1: 0
|
||||
// label2: '离线数',
|
||||
// count2: 0
|
||||
},
|
||||
{
|
||||
title: '车辆闸机数',
|
||||
img: require('../../../assets/map/menjin/ico2.png'),
|
||||
label1: '在线数',
|
||||
count1: 0
|
||||
// label2: '离线数',
|
||||
// count2: 0
|
||||
},
|
||||
{
|
||||
title: '摄像头数',
|
||||
img: require('../../../assets/map/menjin/ico3.png'),
|
||||
label1: '摄像头数',
|
||||
count1: 0
|
||||
}
|
||||
],
|
||||
block3OptionsList: ['人员闸机', '车辆闸机'],
|
||||
block3OptionsIndex: 1,
|
||||
block2List: [],
|
||||
block3List: [],
|
||||
block4OptionsTabs: ['人员', '车辆'],
|
||||
block4OptionsIndex: 0,
|
||||
block4OptionsList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getMachineCount() // 设备数
|
||||
this.getEntryAndExitCount()// echar
|
||||
this.listPerpleCarGateMachine('1') // 进出记录
|
||||
window.onresize = function() {
|
||||
myChart1 && myChart1.resize()
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
myChart1 = null
|
||||
},
|
||||
methods: {
|
||||
getEntryAndExitCount() {
|
||||
requestFN(
|
||||
'/mkmjRelation/getAllCarAndPeopleInfoCountByArea',
|
||||
{ CORPINFO_ID: this.corpInfoId }
|
||||
).then((data) => {
|
||||
this.block4OptionsList = data.varList
|
||||
this.initEcharts1(this.block4OptionsList)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
initEcharts1(data) {
|
||||
const xAxisData = []
|
||||
const entryData = []
|
||||
const exitData = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (this.block4OptionsIndex === 0) {
|
||||
if (data[i].TYPE === 'person') {
|
||||
xAxisData.push(data[i].AREA_NAME)
|
||||
console.log(data[i])
|
||||
entryData.push(data[i].INPERSONCOUNT)
|
||||
exitData.push(data[i].OUTPERSONCOUNT)
|
||||
}
|
||||
}
|
||||
if (this.block4OptionsIndex === 1) {
|
||||
if (data[i].TYPE === 'car') {
|
||||
xAxisData.push(data[i].AREA_NAME)
|
||||
console.log(data[i])
|
||||
entryData.push(data[i].INCARCOUNT)
|
||||
exitData.push(data[i].OUTCARCOUNT)
|
||||
}
|
||||
}
|
||||
}
|
||||
myChart1 && myChart1.dispose()
|
||||
myChart1 = echarts.init(document.querySelector('#main1'))
|
||||
const option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '2%',
|
||||
right: '4%',
|
||||
bottom: '8%',
|
||||
top: '16%',
|
||||
containLabel: true
|
||||
},
|
||||
legend: {
|
||||
data: ['进', '出'],
|
||||
right: 10,
|
||||
top: 12,
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
},
|
||||
itemWidth: 12,
|
||||
itemHeight: 10
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xAxisData,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
fontFamily: 'Microsoft YaHei'
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: 'rgba(255,255,255,0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {}
|
||||
},
|
||||
series: [{
|
||||
name: '进',
|
||||
type: 'bar',
|
||||
barWidth: '15%',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: '#8bd46e'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: '#09bcb7'
|
||||
}]),
|
||||
barBorderRadius: 12
|
||||
}
|
||||
},
|
||||
data: entryData
|
||||
},
|
||||
{
|
||||
name: '出',
|
||||
type: 'bar',
|
||||
barWidth: '15%',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: '#fccb05'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: '#f5804d'
|
||||
}]),
|
||||
barBorderRadius: 11
|
||||
}
|
||||
|
||||
},
|
||||
data: exitData
|
||||
}
|
||||
]
|
||||
}
|
||||
myChart1.setOption(option)
|
||||
},
|
||||
block4OptionsClick(index) {
|
||||
console.log(index)
|
||||
this.block4OptionsIndex = index
|
||||
this.initEcharts1(this.block4OptionsList)
|
||||
},
|
||||
getMachineCount() {
|
||||
requestFN(
|
||||
'/map/getDoorCount',
|
||||
{
|
||||
CORPINFO_ID: this.corpInfoId
|
||||
}
|
||||
).then((data) => {
|
||||
this.block1OptionsList[0].count1 = data.data.personMachineCount
|
||||
this.block1OptionsList[1].count1 = data.data.carMachineCount
|
||||
this.block1OptionsList[2].count1 = data.data.cameraCount
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
|
||||
listPerpleCarGateMachine(type) {
|
||||
requestFN(
|
||||
'/map/getDoorRecord',
|
||||
{
|
||||
TYPE: type,
|
||||
CORPINFO_ID: this.corpInfoId
|
||||
}
|
||||
).then((data) => {
|
||||
this.block3List = data.varList.slice(0, 8)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
block3OptionsClick(index) {
|
||||
this.block3OptionsIndex = index
|
||||
this.listPerpleCarGateMachine(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.menjin {
|
||||
.title {
|
||||
background-image: url("../../../assets/map/menjin/title_on.png");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
width: 113px;
|
||||
height: 26px;
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
|
||||
&.active {
|
||||
background-image: url("../../../assets/map/menjin/title.png");
|
||||
}
|
||||
}
|
||||
|
||||
.block1 {
|
||||
width: 410px;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10px 15px;
|
||||
border: 1px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
|
||||
border-top: none;
|
||||
|
||||
.option {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.circular {
|
||||
margin-top: 5px;
|
||||
background-image: url("../../../assets/map/menjin/img1.png");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
padding-top: 13px;
|
||||
|
||||
img {
|
||||
width: 30px;
|
||||
height: 26px;
|
||||
animation: scale 2s infinite;
|
||||
}
|
||||
}
|
||||
|
||||
.label {
|
||||
margin-top: 5px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.block4 {
|
||||
margin-top: 10px;
|
||||
width: 410px;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
||||
|
||||
.content {
|
||||
border: 1px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
|
||||
border-top: none;
|
||||
padding: 10px;
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.title {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
#main1{
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.block3 {
|
||||
margin-top: 10px;
|
||||
width: 410px;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
||||
|
||||
.content {
|
||||
border: 1px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
|
||||
border-top: none;
|
||||
padding: 10px;
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.title {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 5px;
|
||||
|
||||
.tr {
|
||||
display: flex;
|
||||
|
||||
&:nth-child(odd) {
|
||||
background-color: rgba(42, 86, 158, 0.53);
|
||||
}
|
||||
|
||||
.td {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
padding: 5px;
|
||||
|
||||
&:nth-child(2) {
|
||||
flex-basis: 20%;
|
||||
}
|
||||
|
||||
&.green {
|
||||
color: #7ccf41;
|
||||
}
|
||||
|
||||
&.yellow {
|
||||
color: #ffcb05;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes scale {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(0.8);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.line1 {
|
||||
width: 150px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,207 @@
|
|||
<template>
|
||||
<div>
|
||||
{{ corpInfoId }}
|
||||
{{ area }}
|
||||
{{ gangkou }}
|
||||
<menjin2 v-if="corpInfoId" :corp-info-id="corpInfoId" :area="area" :gangkou="gangkou"/>
|
||||
<menjin v-else :corp-info-id="corpInfoId" :area="area" :gangkou="gangkou"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import menjin from './menjin'
|
||||
import menjin2 from './menjin2'
|
||||
export default {
|
||||
components: {
|
||||
menjin,
|
||||
menjin2
|
||||
},
|
||||
props: {
|
||||
corpInfoId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
area: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
gangkou: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.menjin {
|
||||
.title {
|
||||
background-image: url("../../../assets/map/menjin/title_on.png");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
width: 113px;
|
||||
height: 26px;
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
|
||||
&.active {
|
||||
background-image: url("../../../assets/map/menjin/title.png");
|
||||
}
|
||||
}
|
||||
|
||||
.block1 {
|
||||
width: 410px;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10px 15px;
|
||||
border: 1px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
|
||||
border-top: none;
|
||||
|
||||
.option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.img{
|
||||
width: 81px;
|
||||
height: 93px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
margin-left: 10px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
div{
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.block2 {
|
||||
width: 410px;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
||||
margin-top: 10px;
|
||||
|
||||
.options {
|
||||
padding: 10px 15px;
|
||||
border: 1px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
|
||||
border-top: none;
|
||||
#main1{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.block3 {
|
||||
margin-top: 10px;
|
||||
width: 410px;
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
||||
|
||||
.content {
|
||||
border: 1px solid;
|
||||
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
|
||||
border-top: none;
|
||||
padding: 10px;
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.title {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 5px;
|
||||
.scroll {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
background: rgba(2, 30, 81, 0.851);
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
border-radius: 5px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.tr {
|
||||
&:nth-child(odd) {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tr {
|
||||
display: flex;
|
||||
|
||||
&:nth-child(odd) {
|
||||
background-color: rgba(42, 86, 158, 0.53);
|
||||
}
|
||||
|
||||
.td {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
padding: 5px;
|
||||
|
||||
&:nth-child(2) {
|
||||
flex-basis: 20%;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
flex: none;
|
||||
flex-basis: 50px;
|
||||
}
|
||||
|
||||
&.green {
|
||||
color: #7ccf41;
|
||||
}
|
||||
|
||||
&.yellow {
|
||||
color: #ffcb05;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes scale {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(0.8);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.line1 {
|
||||
width: 150px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
|
@ -55,7 +55,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block4">
|
||||
<div v-if="!(corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId === '033549ed3bd648e49c8a65eb4993ec2f')" class="block4">
|
||||
<layout-title title="报警列表"/>
|
||||
<div class="content">
|
||||
<div class="table">
|
||||
|
@ -72,6 +72,25 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId === '033549ed3bd648e49c8a65eb4993ec2f'" class="block4">
|
||||
<layout-title title="报警列表"/>
|
||||
<div class="content">
|
||||
<div class="table">
|
||||
<div class="tr">
|
||||
<div class="td">报警类型</div>
|
||||
<div class="td">报警时间</div>
|
||||
<div class="td">触发人</div>
|
||||
<div class="td">报警地点</div>
|
||||
</div>
|
||||
<div v-for="(item,index) in block4List" :key="index" class="tr">
|
||||
<div class="td">{{ item.alarmName }}</div>
|
||||
<div class="td">{{ item.alarmTime }}</div>
|
||||
<div class="td">{{ item.foulUserName }}</div>
|
||||
<div class="td">{{ item.place }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -173,37 +192,59 @@ export default {
|
|||
},
|
||||
getData() {
|
||||
requestFN(
|
||||
'/map/getAllDwMessage',
|
||||
{ corpId: this.corpInfoId }
|
||||
'/map/getAllDwMessage', { corpId: this.corpInfoId }
|
||||
).then((data) => {
|
||||
this.block4List = data.alarmList.list
|
||||
this.block1OptionsList = [
|
||||
{
|
||||
title: '在线设备数',
|
||||
img: require('../../../assets/map/renyuan/ico1.png'),
|
||||
count: data.orthermessage.onlineDeviceNum
|
||||
},
|
||||
{
|
||||
title: '在线人员',
|
||||
img: require('../../../assets/map/renyuan/img1ico1.png'),
|
||||
count: data.orthermessage.infoList.UwbBQ.num
|
||||
},
|
||||
{
|
||||
title: '在线基站数',
|
||||
img: require('../../../assets/map/renyuan/ico3.png'),
|
||||
count: data.orthermessage.infoList.UwbJiZhan.num
|
||||
},
|
||||
{
|
||||
title: '在线摄像头数',
|
||||
img: require('../../../assets/map/renyuan/ico4.png'),
|
||||
count: data.orthermessage.infoList.HKcamera.num
|
||||
},
|
||||
{
|
||||
title: '在线报警设备数',
|
||||
img: require('../../../assets/map/renyuan/ico5.png'),
|
||||
count: data.orthermessage.infoList.tklyr.num
|
||||
}
|
||||
]
|
||||
// 一公司人员定位系统(我知道这里写的拉但是没办法,一天要把功能改完,后续有缘人在重构吧)
|
||||
if (this.corpInfoId === '035958e685cf4850bc40151c5e0617a6') {
|
||||
this.block4List = data.alarmList.list
|
||||
this.block1OptionsList = [
|
||||
{
|
||||
title: '在线设备数',
|
||||
img: require('../../../assets/map/renyuan/ico1.png'),
|
||||
count: data.orthermessage.onlineDeviceNum
|
||||
},
|
||||
{
|
||||
title: '在线人员',
|
||||
img: require('../../../assets/map/renyuan/img1ico1.png'),
|
||||
count: data.orthermessage.infoList.UwbBQ.num
|
||||
},
|
||||
{
|
||||
title: '在线基站数',
|
||||
img: require('../../../assets/map/renyuan/ico3.png'),
|
||||
count: data.orthermessage.infoList.UwbJiZhan.num
|
||||
},
|
||||
{
|
||||
title: '在线摄像头数',
|
||||
img: require('../../../assets/map/renyuan/ico4.png'),
|
||||
count: data.orthermessage.infoList.HKcamera.num
|
||||
},
|
||||
{
|
||||
title: '在线报警设备数',
|
||||
img: require('../../../assets/map/renyuan/ico5.png'),
|
||||
count: data.orthermessage.infoList.tklyr.num
|
||||
}
|
||||
]
|
||||
}
|
||||
if (this.corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || this.corpInfoId === '033549ed3bd648e49c8a65eb4993ec2f' ) {
|
||||
this.block1OptionsList = [
|
||||
{
|
||||
title: '总设备数',
|
||||
img: require('../../../assets/map/renyuan/img1ico1.png'),
|
||||
count: data.orthermessage.onlineDeviceNum
|
||||
},
|
||||
{
|
||||
title: '在线人员数',
|
||||
img: require('../../../assets/map/renyuan/img1ico1.png'),
|
||||
count: data.orthermessage.lockNum
|
||||
},
|
||||
{
|
||||
title: '离线人数',
|
||||
img: require('../../../assets/map/renyuan/img1ico1.png'),
|
||||
count: data.orthermessage.unLockNum
|
||||
}
|
||||
]
|
||||
this.block4List = data.orthermessage.alarmList
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
|
|
|
@ -179,22 +179,22 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getCmtWorkCardLocationCount() {
|
||||
requestFN(
|
||||
'/map/findWorkCardLocation',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.block1OptionsList[0].count = data.onlineCount
|
||||
}).catch((e) => {
|
||||
})
|
||||
// requestFN(
|
||||
// '/map/findWorkCardLocation',
|
||||
// {}
|
||||
// ).then((data) => {
|
||||
// this.block1OptionsList[0].count = data.onlineCount
|
||||
// }).catch((e) => {
|
||||
// })
|
||||
},
|
||||
getCmtWorkCardLocation() {
|
||||
requestFN(
|
||||
'/map/findWorkCardLocation',
|
||||
{}
|
||||
).then((data) => {
|
||||
this.block3List = this.block3List.concat(data.list)
|
||||
}).catch((e) => {
|
||||
})
|
||||
// requestFN(
|
||||
// '/map/findWorkCardLocation',
|
||||
// {}
|
||||
// ).then((data) => {
|
||||
// this.block3List = this.block3List.concat(data.list)
|
||||
// }).catch((e) => {
|
||||
// })
|
||||
},
|
||||
block3OptionsClick(index) {
|
||||
this.currentPage = 1
|
||||
|
|
|
@ -11,7 +11,16 @@
|
|||
<xf-point v-if="type === 'point'" :id="id" :type="type" :gangkou="gangkou"/>
|
||||
<xf-control v-if="type === 'xfbf01' || type ==='xfkzs01' || type ==='xfjyd01' || type ==='xfsy01'" :id="id" :type="type" :gangkou="gangkou"/>
|
||||
<alarm-device v-if="type === 'alarm'" :id="id" :type="type" :gangkou="gangkou"/>
|
||||
<mk-gate-machine v-if="type === 'CAR'||type ==='PERSON' || type ==='CAMERA'" :id="id" :type="type" :gangkou="gangkou" :corp-id="corpInfoId" :GATE_VIDEO_ID="GATE_VIDEO_ID"/>
|
||||
<mk-gate-machine
|
||||
v-if="type === 'CAR'||type ==='PERSON' || type ==='CAMERA'|| type ==='PERSON_MACHINE'|| type ==='CAR_MACHINE' "
|
||||
:id="id"
|
||||
:type="type"
|
||||
:gangkou="gangkou"
|
||||
:corp-id="corpInfoId"
|
||||
:gate-video-id="GATE_VIDEO_ID"
|
||||
:code = "code"
|
||||
:video-type="videoType"
|
||||
:name = "name"/>
|
||||
<mk-gate-machine-cfd v-if="type === 'CAR00004'||type ==='PERSON00004' " :id="id" :type="type" :gangkou="gangkou" :infoname="infoname"/>
|
||||
<mk-gate-machine-cmt v-if="type === 'CAR00005'||type ==='PERSON00005' " :id="id" :type="type" :gangkou="gangkou" :infoname="infoname"/>
|
||||
<zhong_da_info v-if="type === 'majordangersource'" :id="id" :type="type" :gangkou="gangkou"/>
|
||||
|
@ -53,8 +62,8 @@
|
|||
<carPositionCfdD v-if="type === 'carPosition'" :id="id" :type="type" :infoname="infoname"/>
|
||||
<!--曹妃甸东 八项作业 曹实业详细页面 end-->
|
||||
<peoplePositionNine v-if="type === 'peoplePositionNine'" :id="id" :type="type" :infoname="infoname"/>
|
||||
<peoplePositionOne v-if="type === 'peoplePositionOne' && !(corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26')" :id="id" :type="type" />
|
||||
<peoplePositionYGS v-if="type === 'peoplePositionOne' && (corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26')" :id="id" :type="type" :corp-id="corpInfoId" />
|
||||
<peoplePositionOne v-if="type === 'peoplePositionOne' && !(corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId ==='033549ed3bd648e49c8a65eb4993ec2f')" :id="id" :type="type" />
|
||||
<peoplePositionYGS v-if="type === 'peoplePositionOne' && (corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26' || corpInfoId ==='033549ed3bd648e49c8a65eb4993ec2f')" :id="id" :type="type" :corp-id="corpInfoId" />
|
||||
<!-- 重点工程 start -->
|
||||
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
|
||||
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />
|
||||
|
@ -218,6 +227,14 @@ export default {
|
|||
type: String,
|
||||
default: ''
|
||||
},
|
||||
videoType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeDialog() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="app-container print-work" v-if="corpId == '035958e685cf4850bc40151c5e0617a6' ">
|
||||
<div v-if="corpId == '035958e685cf4850bc40151c5e0617a6' " class="app-container print-work">
|
||||
<div v-if= "type !== 'CAMERA'" class="level-title">
|
||||
<h1>区域名称:{{ info.GATE_AREA_NAME }}</h1>
|
||||
</div>
|
||||
|
@ -55,26 +55,26 @@
|
|||
<video-play v-if="type === 'CAMERA' && info.GATEVIDEO_ID" :id="info.GATEVIDEO_ID" :type="type" :gangkou="gangkou"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-container print-work" v-else>
|
||||
<div v-else class="app-container print-work">
|
||||
<div v-if= "type !== 'CAMERA'" class="level-title">
|
||||
<h1>区域名称:{{ info.GATE_AREA_NAME }}</h1>
|
||||
</div>
|
||||
<table v-for="(item,index) in varList" :key="index" v-if= "type !== 'CAMERA'" class="table-ui">
|
||||
<table v-for="(item,index) in varList" v-if= "type !== 'CAMERA'" :key="index" class="table-ui">
|
||||
<tr>
|
||||
<td class="bbg-transparent">闸机名称</td>
|
||||
<td colspan="5">{{ item.GATE_NAME }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg-transparent">今日进</td>
|
||||
<td width="80px">{{ item.CAR_IN}}</td>
|
||||
<td width="80px">{{ item.CAR_IN }}</td>
|
||||
<td class="bbg-transparent">今日出</td>
|
||||
<td width="80px">{{ item.CAR_OUT}}</td>
|
||||
<td width="80px">{{ item.CAR_OUT }}</td>
|
||||
<td class="bbg-transparent">当前滞留</td>
|
||||
<td width="80px">{{ item.CAR_IN - item.CAR_OUT}}</td>
|
||||
<td width="80px">{{ item.CAR_IN - item.CAR_OUT }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table-ui" v-if= "type != 'CAMERA'">
|
||||
<tr v-if="carRecordAllList != null && carRecordAllList.length > 0">
|
||||
<table v-if= "type != 'CAMERA'" class="table-ui">
|
||||
<tr v-if="carRecordAllList != null && carRecordAllList.length > 0">
|
||||
<td colspan="6">
|
||||
<table class="table-ui">
|
||||
<tr>
|
||||
|
@ -117,16 +117,16 @@
|
|||
</tr>
|
||||
</table>
|
||||
<div v-if= "type == 'CAMERA'" class="level-title">
|
||||
<h1>摄像头名称:{{ info.VIDEONAME }}</h1>
|
||||
<h1>摄像头名称:{{ name }}</h1>
|
||||
</div>
|
||||
<table v-if= "type == 'CAMERA'" class="table-ui">
|
||||
<tr>
|
||||
<td class="bbg-transparent">编码</td>
|
||||
<td >{{ info.CODE }}</td>
|
||||
<td >{{ code }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="video">
|
||||
<video-play-gate v-if="type === 'CAMERA' && GATE_VIDEO_ID" :id="GATE_VIDEO_ID" :type="type" :gangkou="gangkou"/>
|
||||
<video-play-gate v-if="type === 'CAMERA' && code" :id="code" :type="videoType" :gangkou="gangkou"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -166,6 +166,24 @@ export default {
|
|||
default() {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default() {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
videoType: {
|
||||
type: String,
|
||||
default() {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default() {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -173,14 +191,18 @@ export default {
|
|||
config: config,
|
||||
info: {},
|
||||
recordAllList: [],
|
||||
varList:[],
|
||||
carRecordAllList:[]
|
||||
varList: [],
|
||||
carRecordAllList: []
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getData()
|
||||
this.getListData()
|
||||
if (this.type !== 'CAMERA') {
|
||||
this.getData()
|
||||
this.getListData()
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate(date, format) {
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
<td>{{ otherInfo?otherInfo.postName:'' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table-ui">
|
||||
<!-- 一公司人员定位页面 -->
|
||||
<table v-if="corpId === '035958e685cf4850bc40151c5e0617a6'" class="table-ui">
|
||||
<tr>
|
||||
<td class="bbg-transparent">姓名</td>
|
||||
<td >{{ info?info.userName:'' }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="bbg-transparent">定位卡号:</td>
|
||||
<td >{{ info?info.id:'' }}</td>
|
||||
|
@ -48,6 +48,25 @@
|
|||
<td>{{ info?info.departmentName:'' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- 九公司人员定位页面 -->
|
||||
<table v-if="corpId === '21590a00ea5e462e9ee44dd332dddc26' || corpId === '033549ed3bd648e49c8a65eb4993ec2f'" class="table-ui">
|
||||
<tr>
|
||||
<td class="bbg-transparent">姓名</td>
|
||||
<td >{{ (info && info.name) ? info.name : '未绑定人员' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg-transparent">定位卡号:</td>
|
||||
<td >{{ info?info.id:'' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg-transparent">定位卡电量</td>
|
||||
<td >{{ info?info.battery:'' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg-transparent">公司</td>
|
||||
<td>{{ info?info.corpName:'' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -94,8 +113,12 @@ export default {
|
|||
corpId: this.corpId
|
||||
}
|
||||
).then((data) => {
|
||||
this.info = data.userInfo
|
||||
this.otherInfo = data.statusInfo
|
||||
if (data.code === 9999) {
|
||||
this.$message.success(data.msg)
|
||||
} else {
|
||||
this.info = data.userInfo
|
||||
this.otherInfo = data.statusInfo
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
|
|
|
@ -46,11 +46,11 @@ export default {
|
|||
methods: {
|
||||
showVideo() {
|
||||
requestFN(
|
||||
this.requestUrl,
|
||||
'/platform/door/video/getHlsPath',
|
||||
{
|
||||
GATE_VIDEO_ID: this.id
|
||||
INDEXCODE: this.id
|
||||
}
|
||||
).then((data) => {
|
||||
).then((res) => {
|
||||
// for (let i = 0; i < data.videoList.length; i++) {
|
||||
// if (data.videoList[0].HLSVIDEOURL) {
|
||||
// this.url = data.videoList[0].GBSVIDEOURL
|
||||
|
@ -61,7 +61,7 @@ export default {
|
|||
// eslint-disable-next-line no-undef
|
||||
this.player = new Aliplayer({
|
||||
'id': 'aLiVideoPlayer',
|
||||
'source': data.video.HLSVIDEOURL.data.url,
|
||||
'source': res.data.url,
|
||||
'width': '100%',
|
||||
'height': '500px',
|
||||
'autoplay': true,
|
||||
|
|
|
@ -147,7 +147,6 @@
|
|||
:class="['option','option'+index,{active:centerOptionsIndex === index}]"
|
||||
@click="centerOptionsClick(index,item.AREA)"
|
||||
>
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
|
@ -262,6 +261,8 @@
|
|||
:ry-post-name="dialog.RyPostName"
|
||||
:ry-real-name="dialog.RyRealName"
|
||||
:person-type-name="dialog.personTypeName"
|
||||
:code="dialog.code"
|
||||
:video-type="dialog.video_type"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -280,7 +281,7 @@ import cmtIndex from './components/cmt_index.vue'
|
|||
import menjinCzks from './components/menjinCzks.vue'
|
||||
import renyuanCzks from './components/renyuanCzks.vue'
|
||||
import renyuanCmt from './components/renyuanCmt.vue'
|
||||
import menjin from './components/menjin.vue'
|
||||
import menjin from './components/menjin_index.vue'
|
||||
import menjinOld from './components/menjin_old.vue'
|
||||
import menjinCfd from './components/menjinCfd.vue'
|
||||
import menjinCmt from './components/menjinCmt.vue'
|
||||
|
@ -504,7 +505,7 @@ export default {
|
|||
checkImg: require('../../assets/map/gangkou_index/buttom/ico1_on.png'),
|
||||
type: 'CAR',
|
||||
containAuthorization: [],
|
||||
eliminateAuthorization: ['035958e685cf4850bc40151c5e0617a6']
|
||||
eliminateAuthorization: ['all']
|
||||
},
|
||||
{
|
||||
label: '人员',
|
||||
|
@ -526,6 +527,26 @@ export default {
|
|||
containAuthorization: ['035958e685cf4850bc40151c5e0617a6'],
|
||||
eliminateAuthorization: []
|
||||
},
|
||||
{
|
||||
label: '人员闸机', // 杂货公司的人员
|
||||
dialog_width: '800px',
|
||||
check: false,
|
||||
img: require('../../assets/map/gangkou_index/buttom/ico1.png'),
|
||||
checkImg: require('../../assets/map/gangkou_index/buttom/ico1_on.png'),
|
||||
type: 'PERSON_MACHINE',
|
||||
containAuthorization: ['allCorp'],
|
||||
eliminateAuthorization: ['035958e685cf4850bc40151c5e0617a6']
|
||||
},
|
||||
{
|
||||
label: '车辆闸机', // 杂货公司的车辆
|
||||
dialog_width: '600px',
|
||||
check: false,
|
||||
img: require('../../assets/map/gangkou_index/buttom/ico2.png'),
|
||||
checkImg: require('../../assets/map/gangkou_index/buttom/ico2_on.png'),
|
||||
type: 'CAR_MACHINE',
|
||||
containAuthorization: ['allCorp'],
|
||||
eliminateAuthorization: ['035958e685cf4850bc40151c5e0617a6']
|
||||
},
|
||||
{
|
||||
label: '摄像头',
|
||||
dialog_width: '600px',
|
||||
|
@ -1512,12 +1533,15 @@ export default {
|
|||
return
|
||||
}
|
||||
if (point_type.indexOf('标记点') !== -1) {
|
||||
const { label, point_type, data_id, corpInfoId, dialog_width, infoname } = pick.id._monitoItems.data
|
||||
const { label, point_type, data_id, corpInfoId, dialog_width, infoname, code, video_type, name } = pick.id._monitoItems.data
|
||||
this.dialog.visible = true
|
||||
this.dialog.title = label
|
||||
this.dialog.name = name
|
||||
this.dialog.type = point_type.substring(3)
|
||||
this.dialog.id = data_id
|
||||
this.dialog.corpInfoId = corpInfoId
|
||||
this.dialog.code = code
|
||||
this.dialog.video_type = video_type
|
||||
this.dialog.infoname = infoname
|
||||
this.dialog.width = dialog_width || '50%'
|
||||
}
|
||||
|
@ -2171,7 +2195,7 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') {
|
||||
if (this.gangkouActive === '00003' && (this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' || this.CORP_INFO_ID === '033549ed3bd648e49c8a65eb4993ec2f') && urlType === 'peoplePosition') {
|
||||
this.clearRYDWPoint('+/UwbBQ/')
|
||||
this.removeTrajectory()
|
||||
}
|
||||
|
@ -2220,9 +2244,9 @@ export default {
|
|||
}
|
||||
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
|
||||
!this.connecting ? this.createConnection(this.CORP_INFO_ID) : this.doSubscribe()
|
||||
} else if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') {
|
||||
} else if (this.gangkouActive === '00003' && (this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' || this.CORP_INFO_ID === '033549ed3bd648e49c8a65eb4993ec2f') && urlType === 'peoplePosition') {
|
||||
// websocket实时获取人员定位
|
||||
this.initRYDWWebsocket('21590a00ea5e462e9ee44dd332dddc26')
|
||||
this.initRYDWWebsocket(this.CORP_INFO_ID)
|
||||
} else {
|
||||
requestFN(
|
||||
pointUrl,
|
||||
|
@ -2257,6 +2281,7 @@ export default {
|
|||
point.gate_machine_name = varList[i].GATE_MACHINE_NAME
|
||||
// 摄像头编号
|
||||
point.code = varList[i].INDEXCODE || '' // 摄像头编号
|
||||
point.video_type = varList[i].VIDEO_TYPE || '' // 摄像头编号
|
||||
// 人员定位
|
||||
if (urlType === 'peoplePosition') {
|
||||
point.data_id = varList[i].empNo || ''
|
||||
|
@ -2686,7 +2711,6 @@ export default {
|
|||
data_id: item.cardId + '',
|
||||
point_type: 'peoplePositionCzks',
|
||||
label: item.realName
|
||||
|
||||
}
|
||||
czksPerLoc.push(perLoc)
|
||||
ry_drag.addEntity(perLoc)
|
||||
|
|
|
@ -162,6 +162,26 @@ export default class DragEntity {
|
|||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
} else if (value.label == '人员闸机') {
|
||||
billboard = {
|
||||
image: imgMap['img0_0' ],
|
||||
height: 36,
|
||||
width: 30,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
} else if (value.label == '车辆闸机') {
|
||||
billboard = {
|
||||
image: imgMap['img0_1' ],
|
||||
height: 36,
|
||||
width: 30,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
} else {
|
||||
billboard = {
|
||||
image: imgMap['img' + value.icon_type],
|
||||
|
|
|
@ -31,7 +31,7 @@ export default class DragEntity {
|
|||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
},
|
||||
label: {
|
||||
text: point.id,
|
||||
text: point.name ? point.name : point.id,
|
||||
font: '13px sans-serif',
|
||||
pixelOffset: new Cesium.Cartesian2(0, -55),
|
||||
showBackground: true,
|
||||
|
|
|
@ -68,6 +68,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查情况">
|
||||
<el-input v-model="search.INSPECTION_CASE" placeholder="检查情况" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
|
||||
|
@ -252,7 +257,8 @@ export default {
|
|||
INSPECTION_TYPE: '', // 检查类型
|
||||
INSPECTION_TIME: ['', ''], // 检查时间
|
||||
INSPECTION_STATUS: '', // 检查状态
|
||||
INSPECTION_SUBJECT: '' // 检查题目
|
||||
INSPECTION_SUBJECT: '', // 检查题目
|
||||
INSPECTION_CASE:'' // 检查情况
|
||||
},
|
||||
statusList: [
|
||||
{ ID: '', NAME: '请选择' },
|
||||
|
|
|
@ -259,19 +259,20 @@ export default {
|
|||
keyDeptType: '',
|
||||
keyDepeName: '',
|
||||
keyJobLeven: '',
|
||||
// 9.11修改 原ISCHECK = false
|
||||
ISCHECK: false,
|
||||
dialogFormEdit: false,
|
||||
editloading: false,
|
||||
dialogType: 'add',
|
||||
rules: {
|
||||
EMAIL: [
|
||||
{ required: true, message: '请输入邮箱', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
|
||||
message: '请输入正确的邮箱'
|
||||
},
|
||||
{ validator: hasEmail, trigger: 'blur' }
|
||||
],
|
||||
// EMAIL: [
|
||||
// { required: true, message: '请输入邮箱', trigger: 'blur' },
|
||||
// {
|
||||
// pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
|
||||
// message: '请输入正确的邮箱'
|
||||
// },
|
||||
// { validator: hasEmail, trigger: 'blur' }
|
||||
// ],
|
||||
ROLE_ID: [
|
||||
{ required: true, message: '角色不能为空', trigger: 'blur' }
|
||||
],
|
||||
|
@ -283,9 +284,9 @@ export default {
|
|||
SEX: [
|
||||
{ required: true, message: '请选择性别', trigger: 'blur' }
|
||||
],
|
||||
NATION: [
|
||||
{ required: true, message: '请选择民族', trigger: 'blur' }
|
||||
],
|
||||
// NATION: [
|
||||
// { required: true, message: '请选择民族', trigger: 'blur' }
|
||||
// ],
|
||||
PHONE: [
|
||||
{ required: true, message: '手机号不能为空', trigger: 'blur' },
|
||||
{ min: 11, max: 11, message: '请输入11位手机号码', trigger: 'blur' },
|
||||
|
@ -309,12 +310,12 @@ export default {
|
|||
ISASSESS: [
|
||||
{ required: true, message: '请选择是否审核人员', trigger: 'blur' }
|
||||
],
|
||||
USER_ID_CARD: [{ required: true, message: '身份证号不能为空', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/,
|
||||
message: '请输入正确的身份证号'
|
||||
}
|
||||
]
|
||||
// USER_ID_CARD: [{ required: true, message: '身份证号不能为空', trigger: 'blur' },
|
||||
// {
|
||||
// pattern: /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/,
|
||||
// message: '请输入正确的身份证号'
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
uesrInfoDic: {
|
||||
minzuList: [], // 民族 0a0e406f27f74ee698fe9979d25f62dd
|
||||
|
@ -459,7 +460,7 @@ export default {
|
|||
CARD_TYPE_NAME: '身份证',
|
||||
NATION: row.NATION_NAME || '',
|
||||
SEX: row.SEX === '0' ? '男' : '女',
|
||||
USER_TYPE: '1',
|
||||
USER_TYPE: '0',
|
||||
ISDELETE: row.ISDELETE
|
||||
}
|
||||
).then((data) => {
|
||||
|
@ -475,26 +476,28 @@ export default {
|
|||
})
|
||||
},
|
||||
goCheck() {
|
||||
if (this.pd.USER_ID_CARD && this.pd.PHONE) {
|
||||
const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/
|
||||
const phoneResult = phoneJudge.test(this.pd.PHONE)
|
||||
const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||
const cardResult = cardJudge.test(this.pd.USER_ID_CARD)
|
||||
if (phoneResult && cardResult) {
|
||||
// if (this.pd.USER_ID_CARD && this.pd.PHONE) {
|
||||
// const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/
|
||||
// const phoneResult = phoneJudge.test(this.pd.PHONE)
|
||||
// const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||
// const cardResult = cardJudge.test(this.pd.USER_ID_CARD)
|
||||
// if (phoneResult && cardResult) {
|
||||
if (true) {
|
||||
console.log('格式校验通过')
|
||||
requestFN(
|
||||
'user/goCheck',
|
||||
{
|
||||
CARD_NO: this.pd.USER_ID_CARD,
|
||||
USERNAME: this.pd.PHONE,
|
||||
USER_ID: this.pd.USER_ID || ''
|
||||
USERNAME: this.pd.USERNAME,
|
||||
USER_ID: this.pd.USER_ID || '',
|
||||
PHONE: this.pd.PHONE
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$message.success('验证通过')
|
||||
this.ISCHECK = true
|
||||
} else {
|
||||
this.$message.error('验证失败,请确认身份证号与手机号是否正确')
|
||||
this.$message.error('验证失败,请确认用户名不重复')
|
||||
this.ISCHECK = false
|
||||
}
|
||||
}).catch((e) => {
|
||||
|
@ -504,9 +507,9 @@ export default {
|
|||
} else {
|
||||
this.ISCHECK = false
|
||||
}
|
||||
} else {
|
||||
this.ISCHECK = false
|
||||
}
|
||||
// } else {
|
||||
// this.ISCHECK = false
|
||||
// }
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
|
@ -598,6 +601,7 @@ export default {
|
|||
},
|
||||
handleAdd() {
|
||||
this.dialogFormEdit = true
|
||||
// 9.11 修改 原:ISCHECK = false
|
||||
this.ISCHECK = false
|
||||
this.pd = {}
|
||||
this.dialogType = 'saveUser'
|
||||
|
@ -624,6 +628,7 @@ export default {
|
|||
'/user/' + this.dialogType,
|
||||
this.pd
|
||||
).then((data) => {
|
||||
console.log(data.result)
|
||||
this.listLoading = false
|
||||
this.dialogFormEdit = false
|
||||
this.varList = []
|
||||
|
@ -631,6 +636,10 @@ export default {
|
|||
this.listQuery.page = 1
|
||||
this.goPush(data.pd)
|
||||
}).catch((e) => {
|
||||
this.$message({
|
||||
message: '用户名重复',
|
||||
type: 'error'
|
||||
})
|
||||
this.listLoading = false
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<el-button v-show="edit && row.STATUS === '99'" type="warning" icon="el-icon-unlock" size="mini" @click="unLockUser(row.USER_ID, row.NAME)">帐号解锁</el-button>
|
||||
<el-button v-show="row.STATUS== 0" type="primary" icon="el-icon-edit" size="mini" @click="handleEditStatus(row,'1', row.USER_ID)">禁用</el-button>
|
||||
<el-button v-show="row.STATUS== 1" type="primary" icon="el-icon-edit" size="mini" @click="handleEditStatus(row,'0', row.USER_ID)">启用</el-button>
|
||||
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)">删除</el-button>
|
||||
<!-- <el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)">删除</el-button> -->
|
||||
<el-button v-if="row.ISPUSH != '1'" type="primary" icon="el-icon-position" size="mini" @click="goPush(row)">推送</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -326,7 +326,7 @@ export default {
|
|||
SPECIFICATION_TYPES: [''],
|
||||
CATEGORY_LIST: [''],
|
||||
STATUS: '',
|
||||
ASSOCIATION: '0',
|
||||
ASSOCIATION: '4',
|
||||
types: [],
|
||||
specification_types: [],
|
||||
category_list: [],
|
||||
|
|
|
@ -288,7 +288,7 @@ export default {
|
|||
STATUS: this.form.STATUS,
|
||||
TYPE: this.form.TYPE_NAME,
|
||||
DATE: this.form.DATE,
|
||||
TEXT_NAME: this.TEXT_NAME,
|
||||
TEXT_NAME: this.form.TEXT_NAME,
|
||||
ASSOCIATION: '4',
|
||||
CORPINFO_ID: '0',
|
||||
MIGRATION_FLAG: '1'
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="企业名称">
|
||||
<el-input v-model="searchParmas.enterpriseName" placeholder="请输入企业名称" />
|
||||
<el-input v-model="searchParmas.KEYWORDS" placeholder="请输入企业名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="6" v-if="false">
|
||||
<el-form-item label="集团单位">
|
||||
<el-input v-model="searchParmas.groupUnit" placeholder="请输入集团单位" />
|
||||
<el-input v-model="searchParmas.CORP_TYPE_NAME" placeholder="请输入集团单位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="6" v-if="false">
|
||||
<el-form-item label="股份主管部门" style="margin-right: 20px">
|
||||
<el-input v-model="searchParmas.shareSuperdepart" placeholder="请输入股份主管部门" />
|
||||
<el-input v-model="searchParmas.MAIN_DEP" placeholder="请输入股份主管部门" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
@ -162,9 +162,9 @@ export default {
|
|||
return {
|
||||
config: config,
|
||||
searchParmas: {
|
||||
enterpriseName: '',
|
||||
groupUnit: '',
|
||||
shareSuperdepart: ''
|
||||
KEYWORDS: '',
|
||||
CORP_TYPE_NAME: '',
|
||||
MAIN_DEP: ''
|
||||
},
|
||||
varList: [],
|
||||
// el-table表格的动态高度值
|
||||
|
@ -559,9 +559,9 @@ export default {
|
|||
},
|
||||
goKeyReset() {
|
||||
this.searchParmas = {
|
||||
enterpriseName: '',
|
||||
groupUnit: '',
|
||||
shareSuperdepart: ''
|
||||
KEYWORDS: '',
|
||||
CORP_TYPE_NAME: '',
|
||||
MAIN_DEP: ''
|
||||
}
|
||||
this.getQuery()
|
||||
},
|
||||
|
@ -573,7 +573,7 @@ export default {
|
|||
this.listQuery.limit +
|
||||
'¤tPage=' +
|
||||
this.listQuery.page,
|
||||
{ KEYWORDS: this.KEYWORDS, ISSMALL: '2' }
|
||||
{ ...this.searchParmas, ISSMALL: '2', ...this.listQuery}
|
||||
)
|
||||
.then(data => {
|
||||
this.loading = false
|
||||
|
|