西海岸购物车等功能

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 +
'个摄像头') ||

View File

@ -8,159 +8,69 @@
</div>
<div class="form-container">
<div v-if="applySuccess">
<a-form
ref="formRef"
:model="formName"
name="basic"
:label-col="{ style: { width: '106px' } }"
:wrapper-col="{ style: { width: '230px' } }"
labelAlign="left"
autocomplete="off"
>
<a-form ref="formRef" :model="formName" name="basic" :label-col="{ style: { width: '106px' } }"
:wrapper-col="{ style: { width: '230px' } }" labelAlign="left" autocomplete="off">
<div class="base-info flex-row-start">
<a-form-item
label="申请标题"
name="title"
:rules="[{ required: true, message: '请输入申请标题' }]"
>
<a-input
placeholder="请输入能力申请标题"
v-model:value="formName.title"
/>
<a-form-item label="申请标题" name="title" :rules="[{ required: true, message: '请输入申请标题' }]">
<a-input placeholder="请输入能力申请标题" v-model:value="formName.title" />
</a-form-item>
<!-- 西海岸-摄像头-增加过期时间 -->
<a-form-item
v-if="isCamera && isXiHaiAn"
label="过期时间"
name="expireDate"
:rules="[{ required: true, message: '请选择过期时间' }]"
style="margin-left: 22px"
>
<a-select
v-model:value="formName.expireDate"
placeholder="请选择过期时间"
style="width: 200px"
:options="expireDateOptions"
></a-select>
<a-form-item v-if="isCamera && isXiHaiAn" label="过期时间" name="expireDate"
:rules="[{ required: true, message: '请选择过期时间' }]" style="margin-left: 22px">
<a-select v-model:value="formName.expireDate" placeholder="请选择过期时间" style="width: 200px"
:options="expireDateOptions"></a-select>
</a-form-item>
</div>
<div class="base-info">
<a-form-item
label="申请人信息"
name="user"
:rules="[{ required: true, message: '请输入申请人' }]"
>
<a-input
placeholder="请输入申请人"
v-model:value="formName.user"
disabled
/>
<a-form-item label="申请人信息" name="user" :rules="[{ required: true, message: '请输入申请人' }]">
<a-input placeholder="请输入申请人" v-model:value="formName.user" disabled />
</a-form-item>
<a-form-item
style="margin: 0 22px"
label="电话"
name="phone"
:rules="[
<a-form-item style="margin: 0 22px" label="电话" name="phone" :rules="[
{
required: true,
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的电话号码',
},
]"
>
<a-input
placeholder="请输入申请人电话"
v-model:value="formName.phone"
/>
]">
<a-input placeholder="请输入申请人电话" v-model:value="formName.phone" />
</a-form-item>
<a-form-item
label="单位"
name="unit"
:rules="[{ required: true, message: '请输入单位' }]"
>
<a-input
placeholder="请输入单位"
v-model:value="formName.unit"
disabled
v-if="deptFlage"
/>
<a-select
v-else
placeholder="请选择归属部门"
v-model:value="formName.unit"
@change="deptIdChangeFunction"
>
<a-select-option
v-for="(item, index) in deptNameAll"
:key="`${index}-${item}`"
:value="item.name"
>
<a-form-item label="单位" name="unit" :rules="[{ required: true, message: '请输入单位' }]">
<a-input placeholder="请输入单位" v-model:value="formName.unit" disabled v-if="deptFlage" />
<a-select v-else placeholder="请选择归属部门" v-model:value="formName.unit" @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-form-item>
</div>
<div class="base-info" v-if="flag">
<a-form-item
label="应用系统"
name="applicationSystem"
:rules="[{ required: true, message: '请选择应用系统' }]"
>
<a-form-item label="应用系统" name="applicationSystem" :rules="[{ required: true, message: '请选择应用系统' }]">
<a-tooltip>
<template #title>
请输入关键字如选项没有系统请新增
</template>
<a-select
v-model:value="formName.applicationSystem"
show-search
placeholder="请输入关键字(如选项没有系统请新增)"
style="width: 230px"
:options="systemOptions"
@focus="handleFocus"
@blur="handleBlur"
@change="systemHandleChange"
@search="systemHandleSearch"
></a-select>
<a-select v-model:value="formName.applicationSystem" show-search placeholder="请输入关键字(如选项没有系统请新增)"
style="width: 230px" :options="systemOptions" @focus="handleFocus" @blur="handleBlur"
@change="systemHandleChange" @search="systemHandleSearch"></a-select>
</a-tooltip>
</a-form-item>
<a-form-item
class="applicationScene"
label="应用领域"
name="applicationScene"
:rules="[{ required: true, message: '请选择应用领域' }]"
style="width: 6.93rem"
>
<a-select
v-model:value="formName.applicationScene"
:options="applicationSceneOpthion"
mode="tags"
:size="size"
placeholder="请选择应用领域"
:filterOption="false"
:searchValue="false"
style="width: 5.87rem"
></a-select>
<a-form-item class="applicationScene" label="应用领域" name="applicationScene"
:rules="[{ required: true, message: '请选择应用领域' }]" style="width: 6.93rem">
<a-select v-model:value="formName.applicationScene" :options="applicationSceneOpthion" mode="tags"
:size="size" placeholder="请选择应用领域" :filterOption="false" :searchValue="false"
style="width: 5.87rem"></a-select>
</a-form-item>
</div>
<div>
<a-form-item
label="需求依据"
name="applicationBackground"
:rules="[
<a-form-item label="需求依据" name="applicationBackground" :rules="[
{ required: true, message: '请输入需求依据' },
{ min: 50, message: '需求依据最少为50个字' },
]"
>
<a-textarea
placeholder="请输入需求依据"
v-model:value="formName.applicationBackground"
:rows="4"
/>
]">
<a-textarea placeholder="请输入需求依据" v-model:value="formName.applicationBackground" :rows="4" />
</a-form-item>
</div>
<div class="bottom-btn">
<a-button
style="
<a-button style="
width: 80px;
height: 38px;
margin-right: 20px;
@ -171,15 +81,10 @@
border: none;
padding: 0;
text-align: center;
"
type="primary"
html-type="cancle"
@click="resetFields()"
>
" type="primary" html-type="cancle" @click="resetFields()">
退出申请
</a-button>
<a-button
style="
<a-button style="
width: 80px;
height: 38px;
background: #0087ff;
@ -189,11 +94,7 @@
border: none;
padding: 0;
text-align: center;
"
type="primary"
html-type="submit"
@click="processStartHandle()"
>
" type="primary" html-type="submit" @click="processStartHandle()">
提交申请
</a-button>
</div>
@ -601,26 +502,29 @@
if (item.note1 && typeof item.note1 == 'string') {
item.note1 = JSON.parse(item.note1)
}
item.note1.map((sxt) => {
item.note1 && item.note1.map((jcss) => {
if (!jcss) {
return;
}
let _itemData = {
resourceId: sxt.idtCameraChannel + '',
resourceName: sxt.channelName,
cameraId: sxt.channelId, //
channelCode: sxt.channelCode,
channelId: sxt.channelId,
channelName: sxt.channelName,
checkStatus: sxt.checkStatus + '',
gpsX: sxt.gpsX,
gpsY: sxt.gpsY,
idtCameraChannel: sxt.idtCameraChannel + '',
nodeName: sxt.nodeName,
parentId: sxt.parentId,
status: sxt.status + '',
resourceId: (jcss.idtCameraChannel || '') + '',
resourceName: jcss.channelName,
cameraId: jcss.channelId, //
channelCode: jcss.channelCode,
channelId: jcss.channelId,
channelName: jcss.channelName,
checkStatus: jcss.checkStatus + '',
gpsX: jcss.gpsX,
gpsY: jcss.gpsY,
idtCameraChannel: (jcss.idtCameraChannel || '') + '',
nodeName: jcss.nodeName,
parentId: jcss.parentId,
status: jcss.status + '',
}
// 西
if (isXiHaiAn.value) {
_itemData.managementUnitName = sxt.managementUnitName
_itemData.cameraPointTypeName = sxt.cameraPointTypeName
if (isXiHaiAn) {
_itemData.managementUnitName = jcss.managementUnitName;
_itemData.cameraPointTypeName = jcss.cameraPointTypeName;
}
obj.system.push(_itemData)
})
@ -683,6 +587,7 @@
})
.catch(() => { })
}
const options = ref([
{
value: '政法委',

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,7 +93,10 @@
:checked="val.checked"
@click.stop="checkedDept(val)"
></a-checkbox>
<span style="margin-left: 0.2rem">
<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>
@ -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,83 +1,74 @@
<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="{
<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>
}"></i>
<span>{{ item.title }}</span>
</a-menu-item>
</a-menu>
</div>
</template>
<script>
import { defineComponent, ref } from 'vue'
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/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/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',
// },
{
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'])
// 西
// if() {
// }
const selectedKeys = ref(['apply'])
const type = JSON.parse(window.sessionStorage.getItem('type'))
if (type) {
selectedKeys.value = [type]
@ -87,6 +78,10 @@
mybus.emit('tabsChange', item)
}
onMounted(() => {
handleClick(menuList[1])
})
return {
menuList,
selectedKeys,
@ -106,14 +101,17 @@
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;
@ -122,14 +120,17 @@
margin-right: 30px;
}
}
:deep(.ant-menu-item-selected) {
background-color: #edf4fc;
color: #0087ff;
&::after {
display: none;
}
}
}
#aside-menu-container::-webkit-scrollbar {
width: 0 !important;
}