Merge branch 'hi-ucs-dev' of http://124.222.94.39:3000/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
a7ac2e8a1e
|
@ -318,7 +318,7 @@
|
||||||
//来源部门漏斗图
|
//来源部门漏斗图
|
||||||
const funnelPlot = (dataList) => {
|
const funnelPlot = (dataList) => {
|
||||||
// 排序
|
// 排序
|
||||||
let arrCopy = ['0-5', '5-10', '10-15', '15-20', '20以上']
|
let arrCopy = ['1-5', '5-10', '10-15', '15-20', '20以上']
|
||||||
// 真实数据
|
// 真实数据
|
||||||
dataList.sort((a, b) => {
|
dataList.sort((a, b) => {
|
||||||
return Number(a.value) - Number(b.value)
|
return Number(a.value) - Number(b.value)
|
||||||
|
|
|
@ -126,11 +126,17 @@
|
||||||
title="已申请摄像头列表"
|
title="已申请摄像头列表"
|
||||||
@ok="videoVisible = false"
|
@ok="videoVisible = false"
|
||||||
>
|
>
|
||||||
|
<a-select placeholder="请选择归属部门" v-model:value="deptName" :getPopupContainer="(triggerNode) => triggerNode.parentNode" show-search option-filter-prop="children" :filterOption="filterOption" @change="deptIdChangeFunction">
|
||||||
|
<a-select-option v-for="(item, index) in deptNameAll" :key="`${index}-${item}`" :value="item.name">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
<a-table
|
<a-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="xVideoList"
|
:data-source="xVideoList"
|
||||||
bordered
|
bordered
|
||||||
:pagination="{ defaultPageSize: 6 }"
|
:pagination="{ defaultPageSize: 6 }"
|
||||||
|
style="margin-top:10px"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, text }">
|
<template #bodyCell="{ column, text }">
|
||||||
<!-- <template>
|
<!-- <template>
|
||||||
|
@ -146,6 +152,7 @@
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import { ref, defineProps } from 'vue'
|
import { ref, defineProps } from 'vue'
|
||||||
import mybus from '@/myplugins/mybus'
|
import mybus from '@/myplugins/mybus'
|
||||||
|
import { getDeptAll } from '@/api/user'
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dataList: { type: Array, default: null },
|
dataList: { type: Array, default: null },
|
||||||
|
@ -154,12 +161,19 @@
|
||||||
let dataForm = ref([])
|
let dataForm = ref([])
|
||||||
const videoVisible = ref(false)
|
const videoVisible = ref(false)
|
||||||
const xVideoList = ref([])
|
const xVideoList = ref([])
|
||||||
|
const xVideoListAll = ref([])
|
||||||
|
const deptNameAll = ref([]) //所有部门名称
|
||||||
|
const deptFlage = ref(true) //判断是否存在默认部门名称
|
||||||
|
const deptName = ref(null)
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
title: '摄像头名称',
|
title: '摄像头名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '归属部门',
|
||||||
|
dataIndex: 'managementUnitName',
|
||||||
|
}
|
||||||
])
|
])
|
||||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||||
dataForm.value = props.dataList
|
dataForm.value = props.dataList
|
||||||
|
@ -189,14 +203,16 @@
|
||||||
// 详情
|
// 详情
|
||||||
const showItem = (id, type, delFlag, note1) => {
|
const showItem = (id, type, delFlag, note1) => {
|
||||||
if (type == '基础设施') {
|
if (type == '基础设施') {
|
||||||
let arr = JSON.parse(note1)
|
let arr = JSON.parse(note1);
|
||||||
xVideoList.value = []
|
xVideoList.value = []
|
||||||
arr.map((val) => {
|
arr.map((val) => {
|
||||||
xVideoList.value.push({
|
xVideoList.value.push({
|
||||||
name: val.channelName || '',
|
name: val.channelName || '',
|
||||||
key: val.channelId,
|
key: val.channelId,
|
||||||
|
managementUnitName:val.managementUnitName || '',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
xVideoListAll.value = xVideoList.value;
|
||||||
videoVisible.value = true
|
videoVisible.value = true
|
||||||
} else {
|
} else {
|
||||||
if (delFlag == 0) {
|
if (delFlag == 0) {
|
||||||
|
@ -211,6 +227,27 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//归属部门选中改变事件
|
||||||
|
const deptIdChangeFunction = (name) => {
|
||||||
|
//console.log('nnnndddd',name);
|
||||||
|
//console.log('过滤前xVideoList',xVideoList);
|
||||||
|
//通过name过滤xVideoList
|
||||||
|
xVideoList.value = xVideoListAll.value.filter((item) => {
|
||||||
|
if (name && item.managementUnitName.indexOf(name) < 0) return false
|
||||||
|
return true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//获取所有的归属部门列表
|
||||||
|
const getDeptAllData = () =>{
|
||||||
|
getDeptAll().then((res) => {
|
||||||
|
deptNameAll.value = res.data.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getDeptAllData();
|
||||||
|
//select搜索过滤
|
||||||
|
const filterOption = (input, option) => {
|
||||||
|
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
@ -351,4 +388,11 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
::v-deep .ant-table-thead > tr > th {
|
||||||
|
//padding-left: px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color:#000000 ;
|
||||||
|
//background: # !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue