西海岸购物车等功能

This commit is contained in:
guoyue 2022-10-09 13:52:28 +08:00
parent d6c971ab23
commit c4ae6d603a
5 changed files with 895 additions and 958 deletions

View File

@ -89,11 +89,15 @@
</span>
<span>{{ val.type }}</span>
</div>
<!-- (item.note1 && JSON.parse(item.note1) &&
JSON.parse(item.note1)[0] &&
JSON.parse(item.note1)[0].channelName -->
<div class="description">
{{
val.description ||
((val.note1 || '') &&
(JSON.parse(val.note1)[0].channelName || '--') +
(JSON.parse(val.note1) && JSON.parse(val.note1)[0] && JSON.parse(val.note1)[0].channelName || '--') +
'等' +
JSON.parse(val.note1).length +
'个摄像头') ||

File diff suppressed because it is too large Load Diff

View File

@ -453,14 +453,14 @@
批量预览
</a-button>
<!-- 添加至申购车 -->
<a-button
<!-- <a-button
v-if="isXiHaiAn"
type="primary"
@click="addShoppingCart"
class="buttonAdd"
>
添加至申购车
</a-button>
</a-button> -->
<!-- 一键申请 -->
<a-button
v-if="isXiHaiAn"
@ -1412,6 +1412,8 @@
tabList.value[1].title = '视频标签'
}
selectType.value = '视频资源'
console.log('444------------>', 444);
} else if (name == '政务云资源') {
room.value = true
tableHeight.value = 600
@ -1479,7 +1481,12 @@
mapSearchParam.value.labelCodes.push(item.labelCode)
})
}
console.log('选中的标签code', mapSearchParam.value)
// todo
mapSearchParam.value.gpsX = ''
mapSearchParam.value.gpsY = ''
mapSearchParam.value.radius = ''
mapSearchParam.value.type = ''
console.log('mapSearchParam----->查询条件', mapSearchParam.value)
mapSearchParam.value.labelCodes = mapSearchParam.value.labelCodes + ''
emits('add', 1)
getCamera()
@ -1863,7 +1870,6 @@
mapSearchParam.value.parentId || '70be8c5b664f4bcf869d82f2e8335051',
pageNum: mapSearchParam.value.pageNum,
pageSize: mapSearchParam.value.pageSize,
name: mapSearchParam.value.cameraName || '',
longitude: mapSearchParam.value.gpsX || '',
latitude: mapSearchParam.value.gpsY || '',
radius: mapSearchParam.value.radius || '',

View File

@ -93,8 +93,11 @@
:checked="val.checked"
@click.stop="checkedDept(val)"
></a-checkbox>
<span style="margin-left: 0.2rem">
{{ val.deptName + '(' + val.count + ')' }}
<span style="margin-left: 0.2rem" v-if="itShowXiHaiAn">
{{ val.deptName}}
</span>
<span style="margin-left: 0.2rem" v-else>
{{ val.deptName + '(' + val.count + ')' }}
</span>
</div>
<DownOutlined v-show="!val.show" />
@ -113,13 +116,13 @@
<a-list-item-meta
:description="
item.description ||
(JSON.parse(item.note1) &&
(item.note1 && JSON.parse(item.note1) &&
JSON.parse(item.note1)[0] &&
JSON.parse(item.note1)[0].channelName +
'等' +
JSON.parse(item.note1).length +
'个摄像头') ||
'--'
''
"
style="position: relative"
>
@ -144,8 +147,9 @@
</a-tooltip>
<span class="type">{{ item.type }}</span>
</div>
<!-- // todo -->
<span class="time">
加购时间:{{ item.time }}
<span v-if="!itShowXiHaiAn">加购时间:{{ item.time }}</span>
<a-popconfirm
title="是否删除该记录?"
ok-text="是"
@ -318,6 +322,7 @@
const name = ref('')
const type = ref('')
const list = ref([])
const itShowXiHaiAn = whoShow.itShowXiHaiAn;
//
onMounted(() => {
getList('init')
@ -498,7 +503,8 @@
pageSize: pageSize.value,
name: name.value,
}).then((res) => {
console.log('res-----selectResourceCarGroupByDept------->', res);
console.log('res---获取信息--------->', res);
let statistics = 0
res.data.data.list.map((val) => {
val.initLoading = true
@ -541,13 +547,19 @@
// deptid
const getListByDeptId = (item) => {
console.log(item, 'item')
if (item.children && item.children.length == 0) {
selectResourceListByDept({
if (item.children.length == 0) {
let _obj = {
pageNum: item.pageNum,
pageSize: item.pageSize,
deptId: item.deptId,
deptId: item.deptId || '',
name: name.value,
}).then((res) => {
}
// 西 todo
if(whoShow.itShowXiHaiAn) {
_obj.key = item.deptName
}
selectResourceListByDept(_obj).then((res) => {
console.log('res----根据部门查询-------->', res);
// console.log(
// '=============>',
// item,
@ -625,16 +637,17 @@
}
//
const checkedDept = (item) => {
// console.log(
// '==================>',
// item,
// checkedList.value,
// checkAll.value
// )
console.log(
'点击部门多选框==================>',
item,
checkedList.value,
checkAll.value
)
item.checked = !item.checked
if (item.checked) {
if (item.children.length > 0) {
item.children.map((val) => {
console.log('val.id------------>', val.id);
if (checkedListAbility.value.indexOf(val.id) == -1) {
checkedListAbility.value.push(val.id)
item.checkedList.push(val.id)
@ -822,8 +835,15 @@
} else {
let arr = []
let delArr = []
console.log('list.value------------>', list.value);
list.value.map((val) => {
val.arr = val.children.filter((item) => {
if(whoShow.itShowXiHaiAn) {
item.type = '基础设施';
item.resourceName = '摄像头列表';
item.resourceId = '1522550195055828996';
}
console.log('选择的数据=============>', item)
if (checkedListAbility.value.indexOf(item.id) > -1) {
if (item.delFlag == 0) {
@ -841,6 +861,7 @@
if (arr.length > 0) {
console.log('一键申请===================>', arr)
localStorage.setItem('applyList', JSON.stringify(arr))
return;
router.push({
path: '/apply',
})

View File

@ -1,136 +1,137 @@
<template>
<div id="aside-menu-container">
<a-menu
id="aside-menu"
v-model:openKeys="openKeys"
v-model:selectedKeys="selectedKeys"
mode="inline"
>
<a-menu-item
class="aside-menu-item"
v-for="item in menuList"
:key="item.key"
@click="handleClick(item)"
>
<i
class="icon"
:style="{
backgroundImage:
selectedKeys == item.key
? 'url(' + item.imgActive + ')'
: 'url(' + item.img + ')',
}"
></i>
<a-menu id="aside-menu" v-model:openKeys="openKeys" v-model:selectedKeys="selectedKeys" mode="inline">
<a-menu-item class="aside-menu-item" v-for="item in menuList" :key="item.key" @click="handleClick(item)">
<i class="icon" :style="{
backgroundImage:
selectedKeys == item.key
? 'url(' + item.imgActive + ')'
: 'url(' + item.img + ')',
}"></i>
<span>{{ item.title }}</span>
</a-menu-item>
</a-menu>
</div>
</template>
<script>
import { defineComponent, ref } from 'vue'
import mybus from '@/myplugins/mybus'
export default defineComponent({
components: {},
import { defineComponent, ref, onMounted } from 'vue'
import mybus from '@/myplugins/mybus'
export default defineComponent({
components: {},
setup() {
const menuList = [
// {
// title: '',
// img: require('@/assets/personalCenter/demand.png'),
// imgActive: require('@/assets/personalCenter/demandactive.png'),
// key: 'PurchaseVehicle',
// },
{
title: '我的发布',
img: require('@/assets/personalCenter/push.png'),
imgActive: require('@/assets/personalCenter/pushactive.png'),
key: 'push',
},
{
title: '我的申请',
img: require('@/assets/personalCenter/apply.png'),
imgActive: require('@/assets/personalCenter/applyactive.png'),
key: 'apply',
},
// {
// title: '',
// img: require('@/assets/personalCenter/collect.png'),
// imgActive: require('@/assets/personalCenter/collectactive.png'),
// key: 'collect',
// },
{
title: '我的浏览',
img: require('@/assets/personalCenter/recent.png'),
imgActive: require('@/assets/personalCenter/recentactive.png'),
key: 'recent',
},
{
title: '我的需求',
img: require('@/assets/personalCenter/demand.png'),
imgActive: require('@/assets/personalCenter/demandactive.png'),
key: 'demand',
},
{
title: '我的评论',
img: require('@/assets/personalCenter/remark.png'),
imgActive: require('@/assets/personalCenter/remarkactive.png'),
key: 'remark',
},
]
// 西
// if() {
setup() {
const menuList = [
{
title: '申购车',
img: require('@/assets/personalCenter/demand.png'),
imgActive: require('@/assets/personalCenter/demandactive.png'),
key: 'PurchaseVehicle',
},
// {
// title: '',
// img: require('@/assets/personalCenter/push.png'),
// imgActive: require('@/assets/personalCenter/pushactive.png'),
// key: 'push',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/apply.png'),
// imgActive: require('@/assets/personalCenter/applyactive.png'),
// key: 'apply',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/collect.png'),
// imgActive: require('@/assets/personalCenter/collectactive.png'),
// key: 'collect',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/recent.png'),
// imgActive: require('@/assets/personalCenter/recentactive.png'),
// key: 'recent',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/demand.png'),
// imgActive: require('@/assets/personalCenter/demandactive.png'),
// key: 'demand',
// },
// {
// title: '',
// img: require('@/assets/personalCenter/remark.png'),
// imgActive: require('@/assets/personalCenter/remarkactive.png'),
// key: 'remark',
// },
]
const selectedKeys = ref(['PurchaseVehicle'])
const type = JSON.parse(window.sessionStorage.getItem('type'))
if (type) {
selectedKeys.value = [type]
}
const handleClick = (item) => {
console.log('click', item)
mybus.emit('tabsChange', item)
}
// }
const selectedKeys = ref(['apply'])
return {
menuList,
selectedKeys,
handleClick,
}
},
})
const type = JSON.parse(window.sessionStorage.getItem('type'))
if (type) {
selectedKeys.value = [type]
}
const handleClick = (item) => {
console.log('click', item)
mybus.emit('tabsChange', item)
}
onMounted(() => {
handleClick(menuList[1])
})
return {
menuList,
selectedKeys,
handleClick,
}
},
})
</script>
<style lang="less" scoped>
#aside-menu-container {
margin-top: 20px;
height: 790px;
overflow-y: scroll;
overflow-x: hidden;
#aside-menu-container {
margin-top: 20px;
height: 790px;
overflow-y: scroll;
overflow-x: hidden;
:deep(.ant-menu-item) {
height: 60px;
font-size: 16px;
color: #333;
&:hover {
color: #0087ff;
background-color: #edf4fc;
}
}
:deep(.ant-menu-title-content) {
display: flex;
align-items: center;
.icon {
display: block;
width: 24px;
height: 24px;
background: no-repeat center;
margin-right: 30px;
}
}
:deep(.ant-menu-item-selected) {
background-color: #edf4fc;
:deep(.ant-menu-item) {
height: 60px;
font-size: 16px;
color: #333;
&:hover {
color: #0087ff;
&::after {
display: none;
}
background-color: #edf4fc;
}
}
#aside-menu-container::-webkit-scrollbar {
width: 0 !important;
:deep(.ant-menu-title-content) {
display: flex;
align-items: center;
.icon {
display: block;
width: 24px;
height: 24px;
background: no-repeat center;
margin-right: 30px;
}
}
:deep(.ant-menu-item-selected) {
background-color: #edf4fc;
color: #0087ff;
&::after {
display: none;
}
}
}
#aside-menu-container::-webkit-scrollbar {
width: 0 !important;
}
</style>