西海岸购物车等功能

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>
<span>{{ val.type }}</span> <span>{{ val.type }}</span>
</div> </div>
<!-- (item.note1 && JSON.parse(item.note1) &&
JSON.parse(item.note1)[0] &&
JSON.parse(item.note1)[0].channelName -->
<div class="description"> <div class="description">
{{ {{
val.description || val.description ||
((val.note1 || '') && ((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 + 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 <!-- <a-button
v-if="isXiHaiAn" v-if="isXiHaiAn"
type="primary" type="primary"
@click="addShoppingCart" @click="addShoppingCart"
class="buttonAdd" class="buttonAdd"
> >
添加至申购车 添加至申购车
</a-button> </a-button> -->
<!-- 一键申请 --> <!-- 一键申请 -->
<a-button <a-button
v-if="isXiHaiAn" v-if="isXiHaiAn"
@ -1412,6 +1412,8 @@
tabList.value[1].title = '视频标签' tabList.value[1].title = '视频标签'
} }
selectType.value = '视频资源' selectType.value = '视频资源'
console.log('444------------>', 444);
} else if (name == '政务云资源') { } else if (name == '政务云资源') {
room.value = true room.value = true
tableHeight.value = 600 tableHeight.value = 600
@ -1479,7 +1481,12 @@
mapSearchParam.value.labelCodes.push(item.labelCode) 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 + '' mapSearchParam.value.labelCodes = mapSearchParam.value.labelCodes + ''
emits('add', 1) emits('add', 1)
getCamera() getCamera()
@ -1863,7 +1870,6 @@
mapSearchParam.value.parentId || '70be8c5b664f4bcf869d82f2e8335051', mapSearchParam.value.parentId || '70be8c5b664f4bcf869d82f2e8335051',
pageNum: mapSearchParam.value.pageNum, pageNum: mapSearchParam.value.pageNum,
pageSize: mapSearchParam.value.pageSize, pageSize: mapSearchParam.value.pageSize,
name: mapSearchParam.value.cameraName || '',
longitude: mapSearchParam.value.gpsX || '', longitude: mapSearchParam.value.gpsX || '',
latitude: mapSearchParam.value.gpsY || '', latitude: mapSearchParam.value.gpsY || '',
radius: mapSearchParam.value.radius || '', radius: mapSearchParam.value.radius || '',

View File

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

View File

@ -1,136 +1,137 @@
<template> <template>
<div id="aside-menu-container"> <div id="aside-menu-container">
<a-menu <a-menu id="aside-menu" v-model:openKeys="openKeys" v-model:selectedKeys="selectedKeys" mode="inline">
id="aside-menu" <a-menu-item class="aside-menu-item" v-for="item in menuList" :key="item.key" @click="handleClick(item)">
v-model:openKeys="openKeys" <i class="icon" :style="{
v-model:selectedKeys="selectedKeys" backgroundImage:
mode="inline" selectedKeys == item.key
> ? 'url(' + item.imgActive + ')'
<a-menu-item : 'url(' + item.img + ')',
class="aside-menu-item" }"></i>
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> <span>{{ item.title }}</span>
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</div> </div>
</template> </template>
<script> <script>
import { defineComponent, ref } from 'vue' import { defineComponent, ref, onMounted } from 'vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
export default defineComponent({ export default defineComponent({
components: {}, 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 = [ const selectedKeys = ref(['apply'])
{
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)
}
return { const type = JSON.parse(window.sessionStorage.getItem('type'))
menuList, if (type) {
selectedKeys, selectedKeys.value = [type]
handleClick, }
} const handleClick = (item) => {
}, console.log('click', item)
}) mybus.emit('tabsChange', item)
}
onMounted(() => {
handleClick(menuList[1])
})
return {
menuList,
selectedKeys,
handleClick,
}
},
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
#aside-menu-container { #aside-menu-container {
margin-top: 20px; margin-top: 20px;
height: 790px; height: 790px;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
:deep(.ant-menu-item) { :deep(.ant-menu-item) {
height: 60px; height: 60px;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
&:hover {
color: #0087ff; &:hover {
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;
color: #0087ff; color: #0087ff;
&::after { background-color: #edf4fc;
display: none;
}
} }
} }
#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> </style>