巡检报告导出接口联调
This commit is contained in:
@@ -5,7 +5,7 @@ VITE_WS_BASE_URL ='ws://220.185.188.222:8055/api/gisWs'
|
|||||||
|
|
||||||
# VITE_APP_BASE_URL = 'http://125.124.131.105:6811/api'
|
# VITE_APP_BASE_URL = 'http://125.124.131.105:6811/api'
|
||||||
# 成彬本地
|
# 成彬本地
|
||||||
VITE_APP_BASE_URL = 'http://100.95.157.241:6061/api'
|
VITE_APP_BASE_URL = 'http://100.95.100.2:6061/api'
|
||||||
# VITE_APP_BASE_URL = 'http://100.95.236.218:6061/api'
|
# VITE_APP_BASE_URL = 'http://100.95.236.218:6061/api'
|
||||||
# VITE_APP_BASE_URL = 'http://119.167.138.11:6061/video-service'
|
# VITE_APP_BASE_URL = 'http://119.167.138.11:6061/video-service'
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ export const cctvExport = (data) => {
|
|||||||
return request({
|
return request({
|
||||||
url: '/pollExport/cctvExport',
|
url: '/pollExport/cctvExport',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -158,8 +158,10 @@ defineExpose({
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.el-form{
|
.el-form{
|
||||||
width: 1060px;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
.buttons{
|
||||||
|
min-width: 140px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
462
src/components/Filter/index2.vue
Normal file
462
src/components/Filter/index2.vue
Normal file
@@ -0,0 +1,462 @@
|
|||||||
|
<template>
|
||||||
|
<el-form :class="theme" :inline="true" :model="model">
|
||||||
|
<el-form-item
|
||||||
|
v-for="(item, index) in filterItems"
|
||||||
|
:key="index"
|
||||||
|
:label="item.label">
|
||||||
|
|
||||||
|
<el-input
|
||||||
|
v-if="item.type === 'input'"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
:placeholder="item.placeholder ? item.placeholder : ''"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
style="width: 200px">
|
||||||
|
</el-input>
|
||||||
|
<template v-if="item.type === 'inputrange'">
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
v-model="model[item.prop1]"
|
||||||
|
:placeholder="item.placeholder ? item.placeholder[0] : ''"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
style="width: 80px">
|
||||||
|
</el-input>
|
||||||
|
<span class="range">至</span>
|
||||||
|
<el-input
|
||||||
|
v-model="model[item.prop2]"
|
||||||
|
:placeholder="item.placeholder ? item.placeholder[1] : ''"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
style="width: 80px">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-select
|
||||||
|
v-if="item.type === 'select'"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
:filterable="item.filterable || false"
|
||||||
|
:placeholder="item.placeholder ? item.placeholder : ''"
|
||||||
|
:multiple="item.multiple || false"
|
||||||
|
:collapse-tags="item.collapseTags || false"
|
||||||
|
:collapse-tags-tooltip="item.collapseTagsTooltip || false"
|
||||||
|
@change="(val) => handle(item.event,val)"
|
||||||
|
style="width: 200px">
|
||||||
|
<el-checkbox v-if="item.checkbox || false" v-model="checked" @change='(val)=>selectAll(val,item)'>全选</el-checkbox>
|
||||||
|
<el-option
|
||||||
|
v-for="(opt, index) in item.options"
|
||||||
|
:key="index"
|
||||||
|
:label="opt.label"
|
||||||
|
:value="opt.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-if="item.type === 'selectRemote'"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
reserve-keyword
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
:placeholder="item.placeholder ? item.placeholder : ''"
|
||||||
|
:remote-method="(val) => emit('remote', val,item.prop)"
|
||||||
|
:loading="false"
|
||||||
|
style="width: 200px">
|
||||||
|
<el-option v-for="(opt, index) in item.options" :key="index" :label="opt.label" :value="opt.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-tree-select
|
||||||
|
v-if="item.type === 'treeselect'"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
:data="item.options"
|
||||||
|
:props="{ value: 'areaCode', label: 'areaName', children: 'childArea' }"
|
||||||
|
value-key="areaCode"
|
||||||
|
:render-after-expand="false"
|
||||||
|
check-strictly
|
||||||
|
style="width: 200px"
|
||||||
|
:load="load"
|
||||||
|
lazy
|
||||||
|
/>
|
||||||
|
<el-date-picker
|
||||||
|
v-if="item.type === 'year'"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
type="year"
|
||||||
|
:placeholder="item.placeholder ? item.placeholder : '请选择年份'"
|
||||||
|
value-format="YYYY"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
style="width: 200px">
|
||||||
|
</el-date-picker>
|
||||||
|
<el-date-picker
|
||||||
|
v-if="item.type === 'date'"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
type="date"
|
||||||
|
:placeholder="item.placeholder ? item.placeholder : '请选择日期'"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
style="width: 200px">
|
||||||
|
</el-date-picker>
|
||||||
|
|
||||||
|
<el-date-picker
|
||||||
|
v-if="item.type === 'datetime'"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
type="datetime"
|
||||||
|
:placeholder="item.placeholder ? item.placeholder : '请选择时间'"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
style="width: 200px">
|
||||||
|
</el-date-picker>
|
||||||
|
|
||||||
|
<el-date-picker
|
||||||
|
v-if="item.type === 'daterange'"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
style="width: 280px"
|
||||||
|
@change="changeDate">
|
||||||
|
</el-date-picker>
|
||||||
|
|
||||||
|
<el-date-picker
|
||||||
|
v-if="item.type === 'datetimerange'"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
:clearable="item.clearable !== false"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
|
@calendar-change="calendarChange"
|
||||||
|
style="width: 360px">
|
||||||
|
</el-date-picker>
|
||||||
|
<el-time-picker
|
||||||
|
is-range
|
||||||
|
v-if="item.type === 'timePicker'"
|
||||||
|
value-format="HH:mm:ss"
|
||||||
|
format="HH:mm:ss"
|
||||||
|
v-model="model[item.prop]"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
placeholder="选择时间范围">
|
||||||
|
</el-time-picker>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-if="item.type === 'button'"
|
||||||
|
:type="item.theme"
|
||||||
|
v-hasPermi="item.permission"
|
||||||
|
@click="handle(item.prop)">{{ item.name }}
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
|
||||||
|
const emit = defineEmits([ 'handle', 'change', 'remote', 'changeDate' ])
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
'filter-items': {
|
||||||
|
type: Array,
|
||||||
|
required: false,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'filter-model': {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
theme: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: 'dark'
|
||||||
|
},
|
||||||
|
disabledDate: {
|
||||||
|
type: Function,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
calendarChange: {
|
||||||
|
type: Function,
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const model = ref({})
|
||||||
|
const checked = ref(false)
|
||||||
|
|
||||||
|
// 多选下拉框 全选操作
|
||||||
|
const selectAll = (val, item) => {
|
||||||
|
model.value[item.prop] = []
|
||||||
|
if (checked.value) {
|
||||||
|
model.value[item.prop] = item.options.map(i => i.value)
|
||||||
|
} else {
|
||||||
|
model.value[item.prop] = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 修改多选下拉框全选选中状态
|
||||||
|
const changeChecked = (flag) => {
|
||||||
|
checked.value = flag
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击操作按钮
|
||||||
|
* @param type 操作类型
|
||||||
|
*/
|
||||||
|
const handle = (type) => {
|
||||||
|
emit('handle', type, model.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置表单数据
|
||||||
|
*/
|
||||||
|
const reset = () => {
|
||||||
|
model.value = { ...props.filterModel }
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
model.value = { ...props.filterModel }
|
||||||
|
})
|
||||||
|
|
||||||
|
const initModel = () => {
|
||||||
|
model.value = { ...props.filterModel }
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeDate = (e) => {
|
||||||
|
emit('changeDate', e)
|
||||||
|
}
|
||||||
|
const load = async(node, resolve) => {
|
||||||
|
if (node.data && node.data.childArea) {
|
||||||
|
resolve(node.data.childArea)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
reset,
|
||||||
|
initModel,
|
||||||
|
changeChecked
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.dark {
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
margin-right: 20px;
|
||||||
|
|
||||||
|
.el-form-item__label,.range {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.range{
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input__wrapper {
|
||||||
|
background-color: #00889b00;
|
||||||
|
box-shadow: 0 0 0 1px #296dff99;
|
||||||
|
|
||||||
|
&:has(.el-input__inner:focus){
|
||||||
|
box-shadow: 0 0 0 1px #296dff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input__inner {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-select {
|
||||||
|
|
||||||
|
.el-select__wrapper {
|
||||||
|
background-color: #00889b1f;
|
||||||
|
box-shadow: 0 0 0 1px #296dff99;
|
||||||
|
|
||||||
|
.el-select__selected-item,
|
||||||
|
.el-select__icon {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-date-editor {
|
||||||
|
.el-icon {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-range-input {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-range-separator {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-picker__popper {
|
||||||
|
border-color: #005e5eb2;
|
||||||
|
.el-picker-panel {
|
||||||
|
background-color: #0f1E31;
|
||||||
|
|
||||||
|
.el-picker-panel__body-wrapper {
|
||||||
|
.el-date-range-picker__time-header{
|
||||||
|
border-bottom: 1px solid #0acccc1a;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-date-range-picker__content.is-left{
|
||||||
|
border-right: 1px solid #0acccc1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-date-range-picker__header {
|
||||||
|
color: #fff;
|
||||||
|
border-bottom: 1px solid #0acccc1a;
|
||||||
|
|
||||||
|
.el-picker-panel__icon-btn {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
color: #fff;
|
||||||
|
border-bottom: 1px solid #0acccc1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
&.in-range .el-date-table-cell {
|
||||||
|
background-color: #0c424E;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.start-date .el-date-table-cell {
|
||||||
|
border-radius: unset;
|
||||||
|
|
||||||
|
.el-date-table-cell__text {
|
||||||
|
border-radius: unset;
|
||||||
|
background-color: #0acccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.end-date .el-date-table-cell {
|
||||||
|
border-radius: unset;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.el-date-table-cell__text {
|
||||||
|
border-radius: unset;
|
||||||
|
background-color: #0acccc;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.available:hover{
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.today{
|
||||||
|
.el-date-table-cell__text{
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-picker-panel__footer {
|
||||||
|
background-color: #0f1E31;
|
||||||
|
border-top: 1px solid #0acccc1a;
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
background-color: transparent;
|
||||||
|
color: #0acccc;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #0acccc1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-plain {
|
||||||
|
background-color: #0d646E;
|
||||||
|
border: 1px solid #0acccc;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #0acccc71;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-popper__arrow::before{
|
||||||
|
border-color: #0acccc;
|
||||||
|
background-color: #07224c;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// .el-button {
|
||||||
|
|
||||||
|
// &.el-button--primary {
|
||||||
|
// background-color: #409eff33;
|
||||||
|
// border: 1px solid #409eff;
|
||||||
|
// color: #409eff;
|
||||||
|
|
||||||
|
// &:hover {
|
||||||
|
// background-color: #409eff71;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &.el-button--success {
|
||||||
|
// background-color: #67c23a33;
|
||||||
|
// border: 1px solid #67c23a;
|
||||||
|
// color: #67c23a;
|
||||||
|
|
||||||
|
// &:hover {
|
||||||
|
// background-color: #67c23a71;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &.el-button--info {
|
||||||
|
// background-color: #f4f4f533;
|
||||||
|
// border: 1px solid #f4f4f5;
|
||||||
|
// color: #f4f4f5;
|
||||||
|
|
||||||
|
// &:hover {
|
||||||
|
// background-color: #f4f4f571;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &.el-button--warning {
|
||||||
|
// background-color: #e6a23c33;
|
||||||
|
// border: 1px solid #e6a23c;
|
||||||
|
// color: #e6a23c;
|
||||||
|
|
||||||
|
// &:hover {
|
||||||
|
// background-color: #e6a23c71;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &.el-button--danger {
|
||||||
|
// background-color: #f56c6c33;
|
||||||
|
// border: 1px solid #f56c6c;
|
||||||
|
// color: #f56c6c;
|
||||||
|
|
||||||
|
// &:hover {
|
||||||
|
// background-color: #f56c6c71;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// &:active {
|
||||||
|
// opacity: .8;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -27,7 +27,6 @@ import { dsVideoList, findUavPage, getVideoInfo } from '@/api/device.js'
|
|||||||
const mapStore = useMapStore()
|
const mapStore = useMapStore()
|
||||||
const UAV = computed(() => mapStore.legend.UAV)
|
const UAV = computed(() => mapStore.legend.UAV)
|
||||||
const monitor = computed(() => mapStore.legend.monitor)
|
const monitor = computed(() => mapStore.legend.monitor)
|
||||||
const origin_monitor = computed(() => mapStore.legend.origin_monitor)
|
|
||||||
const ais_station = computed(() => mapStore.legend.ais_station)
|
const ais_station = computed(() => mapStore.legend.ais_station)
|
||||||
const environmental = computed(() => mapStore.legend.environmental)
|
const environmental = computed(() => mapStore.legend.environmental)
|
||||||
const fence = computed(() => mapStore.legend.fence)
|
const fence = computed(() => mapStore.legend.fence)
|
||||||
@@ -37,13 +36,11 @@ let globalMap = null
|
|||||||
let vector = {}
|
let vector = {}
|
||||||
const geography = {
|
const geography = {
|
||||||
monitor: [], // 监控数据
|
monitor: [], // 监控数据
|
||||||
origin_monitor: [], // 原始监控数据
|
|
||||||
UAV: [], // 无人机
|
UAV: [], // 无人机
|
||||||
ais_station: [], // ais基站
|
ais_station: [], // ais基站
|
||||||
environmental: [], // 环境监测
|
environmental: [], // 环境监测
|
||||||
fence: [] // 电子围栏
|
fence: [] // 电子围栏
|
||||||
}
|
}
|
||||||
let sectorLayer = null
|
|
||||||
const initMap = () => {
|
const initMap = () => {
|
||||||
const mapDom = document.getElementById('map')
|
const mapDom = document.getElementById('map')
|
||||||
globalMap = new GlobalMap(mapDom)//, { seamlessZoom: false })
|
globalMap = new GlobalMap(mapDom)//, { seamlessZoom: false })
|
||||||
@@ -377,9 +374,9 @@ const initUAV = () => {
|
|||||||
const initMonitor = () => {
|
const initMonitor = () => {
|
||||||
const params = {}
|
const params = {}
|
||||||
dsVideoList(params).then(res => {
|
dsVideoList(params).then(res => {
|
||||||
geography.monitor = res.data
|
geography.monitor = res.data
|
||||||
addMonitorToMap()
|
addMonitorToMap()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const initAisStation = () => {
|
const initAisStation = () => {
|
||||||
geography.ais_station = stations
|
geography.ais_station = stations
|
||||||
|
|||||||
@@ -31,9 +31,11 @@ import CockpitCom from '@/views/business/drone/cockpit.vue'
|
|||||||
import { getVideoStream, doStartOrStopUavAlgorithm } from '@/api/uav'
|
import { getVideoStream, doStartOrStopUavAlgorithm } from '@/api/uav'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
|
// sourceType1 的是接道通的视频流
|
||||||
|
// sourceType2 的是擎天云的识别的视频流
|
||||||
const mapStore = useMapStore()
|
const mapStore = useMapStore()
|
||||||
const data = computed(() => mapStore.windowInfo.data)
|
const data = computed(() => mapStore.windowInfo.data)
|
||||||
const url = 'http://198.16.74.210:3456/embed?projectId=2&authInfoId=3&deviceSn=7601839813836800&deviceType=drone&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3NjcxNzA1NTIsImlhdCI6MTc2NjU2NTc1Mn0._YhukLexaErvTc3QDIAV5MuOa6cqglYUfsixNCit3us'
|
const url = 'http://198.16.74.210:3456/embed?projectId=2&authInfoId=3&deviceSn=7601839813836800&deviceType=drone&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3NjgxODQ5NDUsImlhdCI6MTc2NzU4MDE0NX0.AuUfl9Cbi_KZsIHrwRzwpLcpiMYB70NcXb0IYlha_5s'
|
||||||
// const url = computed(() => `http://198.16.74.210:3456/embed?projectId=4bd996b8-5201-4e5d-82b1-6879be360c20&authInfoId=eyJhbGciOiJIUzUxMiIsImNyaXQiOlsidHlwIiwiYWxnIiwia2lkIl0sImtpZCI6IjU3YmQyNmEwLTYyMDktNGE5My1hNjg4LWY4NzUyYmU1ZDE5MSIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiIiwiZXhwIjoyMDc1OTQ3NzIyLCJuYmYiOjE3NjA0MTQ5MjIsIm9yZ2FuaXphdGlvbl91dWlkIjoiOWRmMjlmYTgtNGI5OS00MThlLWJhMmQtMGY5ZWY5ZWVlMzkyIiwicHJvamVjdF91dWlkIjoiIiwic3ViIjoiZmgyIiwidXNlcl9pZCI6IjE3NjA0MTQxMDkzNTcwMDI0MjkifQ.DC_aS37W2fkqOjCtfvysDfhTn-4XVn3_IrXBnPD9rICGyrIBKBG3oPldeW_pqele5H_gCn1EgM0KXcbDgvq-dw&
|
// const url = computed(() => `http://198.16.74.210:3456/embed?projectId=4bd996b8-5201-4e5d-82b1-6879be360c20&authInfoId=eyJhbGciOiJIUzUxMiIsImNyaXQiOlsidHlwIiwiYWxnIiwia2lkIl0sImtpZCI6IjU3YmQyNmEwLTYyMDktNGE5My1hNjg4LWY4NzUyYmU1ZDE5MSIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiIiwiZXhwIjoyMDc1OTQ3NzIyLCJuYmYiOjE3NjA0MTQ5MjIsIm9yZ2FuaXphdGlvbl91dWlkIjoiOWRmMjlmYTgtNGI5OS00MThlLWJhMmQtMGY5ZWY5ZWVlMzkyIiwicHJvamVjdF91dWlkIjoiIiwic3ViIjoiZmgyIiwidXNlcl9pZCI6IjE3NjA0MTQxMDkzNTcwMDI0MjkifQ.DC_aS37W2fkqOjCtfvysDfhTn-4XVn3_IrXBnPD9rICGyrIBKBG3oPldeW_pqele5H_gCn1EgM0KXcbDgvq-dw&
|
||||||
// deviceSn=${data.value.droneSn}&deviceType=drone&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3NjcxNzA1NTIsImlhdCI6MTc2NjU2NTc1Mn0._YhukLexaErvTc3QDIAV5MuOa6cqglYUfsixNCit3us`)
|
// deviceSn=${data.value.droneSn}&deviceType=drone&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3NjcxNzA1NTIsImlhdCI6MTc2NjU2NTc1Mn0._YhukLexaErvTc3QDIAV5MuOa6cqglYUfsixNCit3us`)
|
||||||
// 算法开启关闭状态
|
// 算法开启关闭状态
|
||||||
|
|||||||
@@ -39,43 +39,43 @@ const router = createRouter({
|
|||||||
})
|
})
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
const token = cache.local.get('token')
|
// const token = cache.local.get('token')
|
||||||
if (token) {
|
// if (token) {
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
// if (whiteList.indexOf(to.path) !== -1) {
|
||||||
next()
|
// next()
|
||||||
} else {
|
// } else {
|
||||||
if (useUserStore().roles.length === 0) {
|
// if (useUserStore().roles.length === 0) {
|
||||||
// 判断当前用户是否已拉取完user_info信息
|
// // 判断当前用户是否已拉取完user_info信息
|
||||||
useUserStore().getInfo().then(() => {
|
// useUserStore().getInfo().then(() => {
|
||||||
usePermissionStore().generateRoutes().then(accessRoutes => {
|
// usePermissionStore().generateRoutes().then(accessRoutes => {
|
||||||
accessRoutes.forEach(route => {
|
// accessRoutes.forEach(route => {
|
||||||
router.addRoute(route) // 动态添加可访问路由表
|
// router.addRoute(route) // 动态添加可访问路由表
|
||||||
})
|
// })
|
||||||
|
|
||||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
// next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||||
})
|
// })
|
||||||
}).catch(err => {
|
// }).catch(err => {
|
||||||
// 登出接口防抖操作
|
// // 登出接口防抖操作
|
||||||
debounce(() => {
|
// debounce(() => {
|
||||||
useUserStore().logout().then(() => {
|
// useUserStore().logout().then(() => {
|
||||||
ElMessage.error(err)
|
// ElMessage.error(err)
|
||||||
next({ path: '/login' })
|
// next({ path: '/login' })
|
||||||
})
|
// })
|
||||||
}, 1000)()
|
// }, 1000)()
|
||||||
})
|
// })
|
||||||
} else {
|
// } else {
|
||||||
next()
|
// next()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
// 没有token
|
// // 没有token
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
// if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 在免登录白名单,直接进入
|
// // 在免登录白名单,直接进入
|
||||||
next()
|
next()
|
||||||
} else {
|
// } else {
|
||||||
// next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
// // next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||||
next('/login') // 否则全部重定向到登录页
|
// next('/login') // 否则全部重定向到登录页
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
export default router
|
export default router
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ const useMapStore = defineStore(
|
|||||||
legend: {
|
legend: {
|
||||||
UAV: true,
|
UAV: true,
|
||||||
monitor: true,
|
monitor: true,
|
||||||
origin_monitor: false,
|
|
||||||
ais_station: true,
|
ais_station: true,
|
||||||
environmental: true,
|
environmental: true,
|
||||||
fence: true
|
fence: true
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="tab">
|
<div class="tab">
|
||||||
<div v-for="(item,index) in tabs"
|
<div v-for="(item,index) in tabs"
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="['tab-item',active === index ? 'active' : '']"
|
:class="['tab-item']"
|
||||||
@click="handle(index)">{{item}}</div>
|
@click="handle(index)">{{item}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="resize" :style="{ resize: 'both', overflow: 'auto' }"></div>
|
<div class="resize" :style="{ resize: 'both', overflow: 'auto' }"></div>
|
||||||
@@ -23,20 +23,13 @@ const videoData = computed(() => mapStore.locate.data)
|
|||||||
const tabs = [
|
const tabs = [
|
||||||
'锁定轮询', '重新轮询', '巡检报告'
|
'锁定轮询', '重新轮询', '巡检报告'
|
||||||
]
|
]
|
||||||
const active = ref(null)
|
|
||||||
|
|
||||||
const data = ref([])
|
const data = ref([])
|
||||||
const lock = ref(false)
|
const lock = ref(false)
|
||||||
let timer = null
|
let timer = null
|
||||||
let monitorIndex = 0
|
let monitorIndex = 0
|
||||||
const videoUrl = ref('')
|
const videoUrl = ref('')
|
||||||
const arr = [ 'https://sl-shandong-stud-166141.chinatowercom.cn:10263/live/37021200001327000138_1_0_be18783a8d444023becb4e96c1c37ffc.flv',
|
|
||||||
'https://sl-shandong-stud-166141.chinatowercom.cn:10343/live/37021100001327000007_0_0_9626ad56bd3340cc9554c30454a66f2d.flv',
|
|
||||||
'https://sl-shandong-stud-022093.chinatowercom.cn:10073/live/37100200001327000003_0_0_e83bd475262b448b9d06c2d8085a7a9c.flv',
|
|
||||||
'http://198.16.74.214:80/Channels0001/Channels0001.live.flv?originTypeStr=pull&audioCodec=G711A&videoCodec=H264' ]
|
|
||||||
|
|
||||||
const handle = (index) => {
|
const handle = (index) => {
|
||||||
active.value = index
|
|
||||||
if(index === 0) {
|
if(index === 0) {
|
||||||
lock.value = true
|
lock.value = true
|
||||||
ElMessage.success('锁定成功')
|
ElMessage.success('锁定成功')
|
||||||
@@ -44,10 +37,10 @@ const handle = (index) => {
|
|||||||
lock.value = false
|
lock.value = false
|
||||||
ElMessage.success('成功轮询')
|
ElMessage.success('成功轮询')
|
||||||
}else if(index === 2) { // 巡检报告下载
|
}else if(index === 2) { // 巡检报告下载
|
||||||
console.log(videoData.value, 'value')
|
|
||||||
// window.open(item.url, '_blank')
|
|
||||||
cctvExport({}).then(res => {
|
cctvExport({}).then(res => {
|
||||||
console.log(res, 'resssss')
|
const blob = new Blob([ res ], { type: 'application/pdf' })
|
||||||
|
const pdfUrl = URL.createObjectURL(blob)
|
||||||
|
window.open(pdfUrl, '_blank')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -555,7 +555,7 @@ defineExpose({
|
|||||||
gap: 20px;
|
gap: 20px;
|
||||||
height: 812px;
|
height: 812px;
|
||||||
.identificate-index{
|
.identificate-index{
|
||||||
width: 1200px;
|
width: 67.95%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
@@ -642,7 +642,7 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.identificate-detail{
|
.identificate-detail{
|
||||||
width: 545px;
|
width: 30.8%;
|
||||||
height: 802px;
|
height: 802px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
// 单个设备抓拍详情
|
// 单个设备抓拍详情
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const model = reactive({
|
|||||||
leader: '',
|
leader: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
email: '',
|
email: '',
|
||||||
areaCodes: '',
|
// areaCodes: '',
|
||||||
orderNum: ''
|
orderNum: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -92,11 +92,11 @@ const items = [
|
|||||||
return model.parentId !== 0
|
return model.parentId !== 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '数据来源',
|
// label: '数据来源',
|
||||||
prop: 'areaCodes',
|
// prop: 'areaCodes',
|
||||||
type: 'tree'
|
// type: 'tree'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '负责人',
|
label: '负责人',
|
||||||
prop: 'leader',
|
prop: 'leader',
|
||||||
@@ -140,16 +140,16 @@ const getAllCheckedKeys = () => {
|
|||||||
* 初始化赋值
|
* 初始化赋值
|
||||||
*/
|
*/
|
||||||
const initData = () => {
|
const initData = () => {
|
||||||
getAreaTree({ id: 331000 }).then(res => {
|
// getAreaTree({ id: 331000 }).then(res => {
|
||||||
areaOptions.value = res.data
|
// areaOptions.value = res.data
|
||||||
if (props.data.areaCodes && props.type !== 'add') {
|
// if (props.data.areaCodes && props.type !== 'add') {
|
||||||
props.data.areaCodes.split(',').forEach(item => {
|
// props.data.areaCodes.split(',').forEach(item => {
|
||||||
nextTick(() => {
|
// nextTick(() => {
|
||||||
areaRef.value[0].setChecked(item, true, false)
|
// areaRef.value[0].setChecked(item, true, false)
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
if (props.type !== 'add') {
|
if (props.type !== 'add') {
|
||||||
Object.keys(model).forEach((key) => {
|
Object.keys(model).forEach((key) => {
|
||||||
model[key] = props.data[key]
|
model[key] = props.data[key]
|
||||||
@@ -161,7 +161,7 @@ const initData = () => {
|
|||||||
* 表单校验
|
* 表单校验
|
||||||
*/
|
*/
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
model.areaCodes = getAllCheckedKeys()
|
// model.areaCodes = getAllCheckedKeys()
|
||||||
form.value.validate().then((valid) => {
|
form.value.validate().then((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
submit()
|
submit()
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { ref, reactive } from 'vue'
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { getDept, delDept, listDeptExcludeChild } from '@/api/system'
|
import { getDept, delDept, listDeptExcludeChild } from '@/api/system'
|
||||||
import { handleTree } from '@/utils/common'
|
import { handleTree } from '@/utils/common'
|
||||||
import FilterComponent from '@/components/Filter/index.vue'
|
import FilterComponent from '@/components/Filter/index2.vue'
|
||||||
import TableComponent from '@/components/Table/index.vue'
|
import TableComponent from '@/components/Table/index.vue'
|
||||||
import DialogComponent from '@/components/Dialog/index.vue'
|
import DialogComponent from '@/components/Dialog/index.vue'
|
||||||
import DetailComponent from './detail.vue'
|
import DetailComponent from './detail.vue'
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ const goBusiness = () => {
|
|||||||
window.open('/', 'business_window')
|
window.open('/', 'business_window')
|
||||||
}
|
}
|
||||||
const goHome = () => {
|
const goHome = () => {
|
||||||
window.open('/data-center', 'business_window')
|
window.open('/', 'business_window')
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
route,
|
route,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { ref, reactive } from 'vue'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { loginLogPage, exportLoginLog } from '@/api/system'
|
import { loginLogPage, exportLoginLog } from '@/api/system'
|
||||||
import { addDateRange, downloadFile } from '@/utils/common'
|
import { addDateRange, downloadFile } from '@/utils/common'
|
||||||
import FilterComponent from '@/components/Filter/index.vue'
|
import FilterComponent from '@/components/Filter/index2.vue'
|
||||||
import TableComponent from '@/components/Table/index.vue'
|
import TableComponent from '@/components/Table/index.vue'
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
@@ -158,7 +158,7 @@ const initData = () => {
|
|||||||
loginLogPage(params).then(res => {
|
loginLogPage(params).then(res => {
|
||||||
if(res.code === 200) {
|
if(res.code === 200) {
|
||||||
const statusArr = [ '成功', '失败' ]
|
const statusArr = [ '成功', '失败' ]
|
||||||
data.value = res.data.map(item => {
|
data.value = res.rows.map(item => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
statusStr: statusArr[item.status]
|
statusStr: statusArr[item.status]
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { ref, reactive } from 'vue'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { operateLogPage, exportOperateLog } from '@/api/system'
|
import { operateLogPage, exportOperateLog } from '@/api/system'
|
||||||
import { addDateRange, downloadFile } from '@/utils/common'
|
import { addDateRange, downloadFile } from '@/utils/common'
|
||||||
import FilterComponent from '@/components/Filter/index.vue'
|
import FilterComponent from '@/components/Filter/index2.vue'
|
||||||
import TableComponent from '@/components/Table/index.vue'
|
import TableComponent from '@/components/Table/index.vue'
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
@@ -144,7 +144,7 @@ const initData = () => {
|
|||||||
operateLogPage(params).then(res => {
|
operateLogPage(params).then(res => {
|
||||||
if(res.code === 200) {
|
if(res.code === 200) {
|
||||||
const statusArr = [ '成功', '失败' ]
|
const statusArr = [ '成功', '失败' ]
|
||||||
data.value = res.data.map(item => {
|
data.value = res.rows.map(item => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
statusStr: statusArr[item.status],
|
statusStr: statusArr[item.status],
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { ref, reactive } from 'vue'
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { getMenu, delMenu } from '@/api/system'
|
import { getMenu, delMenu } from '@/api/system'
|
||||||
import { handleTree } from '@/utils/common'
|
import { handleTree } from '@/utils/common'
|
||||||
import FilterComponent from '@/components/Filter/index.vue'
|
import FilterComponent from '@/components/Filter/index2.vue'
|
||||||
import TableComponent from '@/components/Table/index.vue'
|
import TableComponent from '@/components/Table/index.vue'
|
||||||
import DialogComponent from '@/components/Dialog/index.vue'
|
import DialogComponent from '@/components/Dialog/index.vue'
|
||||||
import DetailComponent from './detail.vue'
|
import DetailComponent from './detail.vue'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { getRolePage, delRole } from '@/api/system'
|
import { getRolePage, delRole } from '@/api/system'
|
||||||
import FilterComponent from '@/components/Filter/index.vue'
|
import FilterComponent from '@/components/Filter/index2.vue'
|
||||||
import TableComponent from '@/components/Table/index.vue'
|
import TableComponent from '@/components/Table/index.vue'
|
||||||
import DialogComponent from '@/components/Dialog/index.vue'
|
import DialogComponent from '@/components/Dialog/index.vue'
|
||||||
import DetailComponent from './detail.vue'
|
import DetailComponent from './detail.vue'
|
||||||
@@ -117,7 +117,7 @@ const detail = reactive({
|
|||||||
}
|
}
|
||||||
getRolePage(params).then(res => {
|
getRolePage(params).then(res => {
|
||||||
if(res.code === 200) {
|
if(res.code === 200) {
|
||||||
data.value = res.data
|
data.value = res.rows
|
||||||
pagination.total = res.total
|
pagination.total = res.total
|
||||||
}else{
|
}else{
|
||||||
ElMessage.error(res.msg || '查询失败!')
|
ElMessage.error(res.msg || '查询失败!')
|
||||||
|
|||||||
@@ -32,20 +32,6 @@
|
|||||||
check-strictly
|
check-strictly
|
||||||
:render-after-expand="false"
|
:render-after-expand="false"
|
||||||
/>
|
/>
|
||||||
<el-tree-select
|
|
||||||
v-if="item.type === 'treeselect' && item.prop === 'areaCode'"
|
|
||||||
:disabled="type==='check'"
|
|
||||||
@change="(val)=>changeArea(val,item.prop)"
|
|
||||||
v-model="model[item.prop]"
|
|
||||||
:data="item.options"
|
|
||||||
:props="item.props"
|
|
||||||
:value-key="item.key"
|
|
||||||
:render-after-expand="false"
|
|
||||||
check-strictly
|
|
||||||
:load="load"
|
|
||||||
lazy
|
|
||||||
/>
|
|
||||||
|
|
||||||
<el-radio-group v-if="item.type === 'radio'" v-model="model[item.prop]">
|
<el-radio-group v-if="item.type === 'radio'" v-model="model[item.prop]">
|
||||||
<el-radio v-for="(opt, index) in item.options" :key="index" :value="opt.value">{{opt.label}}</el-radio>
|
<el-radio v-for="(opt, index) in item.options" :key="index" :value="opt.value">{{opt.label}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@@ -89,8 +75,6 @@ const props = defineProps({
|
|||||||
const form = ref(null)
|
const form = ref(null)
|
||||||
|
|
||||||
const model = reactive({
|
const model = reactive({
|
||||||
areaCode: '',
|
|
||||||
areaName: '',
|
|
||||||
userName: '',
|
userName: '',
|
||||||
password: '',
|
password: '',
|
||||||
confirmPassword: '',
|
confirmPassword: '',
|
||||||
@@ -104,14 +88,6 @@ const model = reactive({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const items = ref([
|
const items = ref([
|
||||||
{
|
|
||||||
label: '行政区域',
|
|
||||||
prop: 'areaCode',
|
|
||||||
type: 'treeselect',
|
|
||||||
options: [],
|
|
||||||
key: 'areaCode',
|
|
||||||
props: { value: 'areaCode', label: 'areaName', children: 'childArea' }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '用户账号',
|
label: '用户账号',
|
||||||
prop: 'userName',
|
prop: 'userName',
|
||||||
@@ -180,7 +156,6 @@ const items = ref([
|
|||||||
])
|
])
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
areaCode: [ { required: true, message: '行政区域 未填写', type: 'error' } ],
|
|
||||||
userName: [ { required: true, message: '用户账号 未填写', type: 'error' } ],
|
userName: [ { required: true, message: '用户账号 未填写', type: 'error' } ],
|
||||||
nickName: [ { required: true, message: '用户名称 未填写', type: 'error' } ],
|
nickName: [ { required: true, message: '用户名称 未填写', type: 'error' } ],
|
||||||
password: [
|
password: [
|
||||||
@@ -218,23 +193,6 @@ const rules = {
|
|||||||
// idCard: [ { required: true, message: '身份证 未填写', type: 'error' } ]
|
// idCard: [ { required: true, message: '身份证 未填写', type: 'error' } ]
|
||||||
}
|
}
|
||||||
|
|
||||||
const load = async (node, resolve) => {
|
|
||||||
if(node.data && node.data.childArea) {
|
|
||||||
resolve(node.data.childArea)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const initArea = () => {
|
|
||||||
let index = items.value.findIndex(i => i.prop === 'areaCode')
|
|
||||||
getAreaTree({ id: 0 }).then(res => {
|
|
||||||
items.value[index].options = res.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const changeArea = (val, prop) => {
|
|
||||||
if(prop === 'areaCode') {
|
|
||||||
let index = items.value.findIndex(i => i.prop === 'areaCode')
|
|
||||||
findName(val, items.value[index].options)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const findName = (val, list) => {
|
const findName = (val, list) => {
|
||||||
for (const i of list) {
|
for (const i of list) {
|
||||||
if (i.areaCode === val) {
|
if (i.areaCode === val) {
|
||||||
@@ -300,7 +258,6 @@ const submit = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initData()
|
initData()
|
||||||
initArea()
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -14,10 +14,11 @@
|
|||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { getUserPage, delUser, deptTreeSelect, resetUserPwd } from '@/api/system'
|
import { getUserPage, delUser, deptTreeSelect, resetUserPwd } from '@/api/system'
|
||||||
import FilterComponent from '@/components/Filter/index.vue'
|
import FilterComponent from '@/components/Filter/index2.vue'
|
||||||
import TableComponent from '@/components/Table/index.vue'
|
import TableComponent from '@/components/Table/index.vue'
|
||||||
import DialogComponent from '@/components/Dialog/index.vue'
|
import DialogComponent from '@/components/Dialog/index.vue'
|
||||||
import DetailComponent from './detail.vue'
|
import DetailComponent from './detail.vue'
|
||||||
|
import { it } from 'element-plus/es/locale/index.mjs'
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
@@ -127,7 +128,12 @@ const initData = () => {
|
|||||||
}
|
}
|
||||||
getUserPage(params).then(res => {
|
getUserPage(params).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
data.value = res.data
|
data.value = res.rows.map(item => {
|
||||||
|
return{
|
||||||
|
...item,
|
||||||
|
deptName: item.dept ? item.dept.deptName : ''
|
||||||
|
}
|
||||||
|
})
|
||||||
pagination.total = res.total
|
pagination.total = res.total
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.msg || '查询失败!')
|
ElMessage.error(res.msg || '查询失败!')
|
||||||
|
|||||||
Reference in New Issue
Block a user