Compare commits

...

2 Commits

Author SHA1 Message Date
851673013@qq.com 32997c5f73 Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
# Conflicts:
#	front/src/views/home/DetailsPageconetent.vue
2022-07-25 19:33:44 +08:00
851673013@qq.com 44e2d6a9b9 基础设施 2022-07-25 19:21:41 +08:00
6 changed files with 783 additions and 543 deletions

View File

@ -61,11 +61,11 @@ export function count() {
export function getVideoList(params) { export function getVideoList(params) {
return axios.get( return axios.get(
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=' + 'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=' +
params.name + params.name +
'&pageNo=' + '&pageNo=' +
params.pageNo + params.pageNo +
'&pageSize=' + '&pageSize=' +
params.pageSize, params.pageSize,
config2 config2
) )
} }
@ -73,17 +73,17 @@ export function getVideoList(params) {
export function getRecord(params) { export function getRecord(params) {
return axios.get( return axios.get(
'http://10.134.135.24:30090/api/share-portal/platform/catalogue/query?serviceName=' + 'http://10.134.135.24:30090/api/share-portal/platform/catalogue/query?serviceName=' +
params.serviceName + params.serviceName +
'&orderField=' + '&orderField=' +
params.orderField + params.orderField +
'&orderType=' + '&orderType=' +
params.orderType + params.orderType +
'&pageNum=' + '&pageNum=' +
params.pageNum + params.pageNum +
'&pageSize=' + '&pageSize=' +
params.pageSize + params.pageSize +
'&serviceType=' + '&serviceType=' +
params.serviceType, params.serviceType,
config2 config2
) )
} }
@ -91,9 +91,24 @@ export function getRecord(params) {
export function getHls(params) { export function getHls(params) {
return axios.get( return axios.get(
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStreamByCode?cameraCode=' + 'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStreamByCode?cameraCode=' +
params.cameraId + params.cameraId +
'&protocol=' + '&protocol=' +
params.protocol, params.protocol,
config2
)
}
//-
export function getCameraInfoByAreaId(params) {
return axios.get(
'http://10.134.135.92:9537/data_service/getCamera/getCameraInfoByAreaId?areaId=' +
params.areaId,
config2
)
}
//-
export function getCameraByCondition(params) {
return axios.get(
'http://10.134.135.92:9537/data_service/getCamera/getCameraByCondition?' + params,
config2 config2
) )
} }

View File

@ -14,8 +14,9 @@
<div></div> <div></div>
</div> </div>
<template v-if="title.isConfigure"> <template v-if="title.isConfigure">
<div class="bottom"> <a-form ref="formRef" :model="data" name="basic">
<!-- <div class="items" v-if="data[title.name].length > 0"> <div class="bottom">
<!-- <div class="items" v-if="data[title.name].length > 0">
<div <div
class="item" class="item"
v-for="(val, index) in data[title.name]" v-for="(val, index) in data[title.name]"
@ -43,74 +44,75 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<div
v-for="(val, index) in data[title.name]"
:key="'key1' + val.name + index"
>
<div <div
style=" v-for="(val, index) in data[title.name]"
font-size: 0.18rem; :key="'key1' + val.name + index"
font-weight: 600;
display: flex;
justify-content: flex-start;
"
> >
<span>{{ title.name }}-{{ index + 1 }}</span> <div
<a-popconfirm style="
:title="'是否删除该条' + title.name + '?'" font-size: 0.18rem;
ok-text="是" font-weight: 600;
cancel-text="否" display: flex;
@confirm="del(title.name, index)" justify-content: flex-start;
"
> >
<div class="del"> <span>{{ title.name }}-{{ index + 1 }}</span>
<i class="delImg"></i> <a-popconfirm
<div>删除</div> :title="'是否删除该条' + title.name + '?'"
</div> ok-text="是"
</a-popconfirm> cancel-text="否"
</div> @confirm="del(title.name, index)"
<div >
class="form" <div class="del">
v-for="attr in props.configure.filter( <i class="delImg"></i>
(item, index2) => item.name === title.name <div>删除</div>
)[0].list" </div>
:key="'key2' + attr.name + index2" </a-popconfirm>
> </div>
<span>{{ attr.name }}</span> <div
<a-input class="form"
disabled v-for="attr in props.configure.filter(
v-model:value="val[attr.field]" (item, index2) => item.name === title.name
:maxlength="24" )[0].list"
:placeholder="'请填写' + attr.name + ',不超过24个字符'" :key="'key2' + attr.name + index2"
v-if="attr.type == 'input'" >
/> <span>{{ attr.name }}</span>
<template v-if="attr.type == 'input2'">
<a-input <a-input
disabled disabled
v-model:value="val[attr.field]" v-model:value="val[attr.field]"
:placeholder="'请填写' + attr.name" :maxlength="24"
:placeholder="'请填写' + attr.name + ',不超过24个字符'"
v-if="attr.type == 'input'"
/> />
</template> <template v-if="attr.type == 'input2'">
<a-textarea <a-input
disabled disabled
v-model:value="val[attr.field]" v-model:value="val[attr.field]"
:showCount="true" :placeholder="'请填写' + attr.name"
:maxlength="200" />
:placeholder="'请填写' + attr.name" </template>
v-else-if="attr.type == 'textArea'" <a-textarea
/> disabled
<!-- <a-radio-group v-model:value="val[attr.field]"
:showCount="true"
:maxlength="200"
:placeholder="'请填写' + attr.name"
v-else-if="attr.type == 'textArea'"
/>
<!-- <a-radio-group
v-model:value="val[attr.field]" v-model:value="val[attr.field]"
:options="val.options" :options="val.options"
@change="radioChange" @change="radioChange"
v-else-if="attr.type == 'radio'" v-else-if="attr.type == 'radio'"
/> --> /> -->
<div v-else-if="attr.type == 'radio'"> <div v-else-if="attr.type == 'radio'">
{{ val[attr.field] + (attr.company || '') }} {{ val[attr.field] + (attr.company || '') }}
</div> </div>
<span v-else-if="attr.type === 'image'"> <span v-else-if="attr.type === 'image'">
<a-image :width="85" :height="60" :src="val.img" /> <a-image :width="85" :height="60" :src="val.img" />
</span> </span>
<!-- <upload <!-- <upload
:key="showKey" :key="showKey"
type="图片" type="图片"
btnName="上传图片" btnName="上传图片"
@ -120,335 +122,346 @@
tip="支持图片类型大小不超过100M" tip="支持图片类型大小不超过100M"
v-else-if="val.type == 'image'" v-else-if="val.type == 'image'"
></upload> --> ></upload> -->
</div>
</div>
<!-- <div class="add" @click="add(title.name)">
添加更多{{ title.name }}
</div> -->
<div style="font-size: 0.18rem; font-weight: 600">
<span>{{ title.name }}-{{ data[title.name].length + 1 }}</span>
</div>
<div
class="form"
v-for="(val, index) in props.configure.filter(
(item) => item.name === title.name
)[0].list"
:key="'key3' + val.name + index"
>
<span>{{ val.name }}</span>
<a-input
v-model:value="val.note1"
:maxlength="24"
:placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"
/>
<template v-if="val.type == 'input2'">
<a-input
v-model:value="val.note1"
:placeholder="'请填写' + val.name"
/>
<span style="width: 0.5rem; padding-left: 0.1rem">
{{
numType == '一次性买断'
? '元'
: numType == '按调用次数'
? '元/次'
: numType == '按并发路数'
? '元/路'
: numType == '按年计费'
? '元/年'
: ''
}}
</span>
</template>
<a-textarea
v-model:value="val.note1"
:showCount="true"
:maxlength="200"
:placeholder="'请填写' + val.name"
v-else-if="val.type == 'textArea'"
/>
<a-input-number
v-model:value="val.note1"
:min="0"
:max="9999"
:step="0.01"
string-mode
:placeholder="'请填写' + val.name"
v-else-if="val.type == 'number'"
/>
<a-radio-group
v-model:value="val.note1"
:options="val.options"
@change="radioChange"
v-else-if="val.type == 'radio'"
/>
<upload
:key="showKey"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="val"
:list="[]"
tip="支持图片类型大小不超过100M"
v-else-if="val.type == 'image'"
></upload>
</div>
<div class="submit">
<a-button type="primary" @click="add(title.name)">
添加更多{{ title.name }}
</a-button>
</div>
</div>
</template>
<template v-else>
<div class="bottom">
<div
class="form"
v-for="item in title.children"
:key="item.id"
v-show="
!(
(showType == '调用接口' && item.name == '平台地址') ||
(showType == '调用接口' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == '接口请求方式') ||
(showType == '平台对接' && item.name == '服务接口') ||
(showType == 'SDK' && item.name == '平台地址') ||
(showType == 'SDK' && item.name == '接口请求方式') ||
(showType == 'SDK' && item.name == '服务接口')
)
"
>
<span>{{ item.name }}</span>
<a-input
v-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
/>
<a-input
v-else-if="
item.type == 'input' && item.name.indexOf('名称') != -1
"
:maxLength="50"
v-model:value="item.note1"
:placeholder="'请输入' + item.name + '不超过50个字符'"
/>
<a-radio-group
v-else-if="item.type == 'radio'"
v-model:value="item.note1"
:options="item.options"
/>
<a-input
v-else-if="item.type == 'AbilityType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-input
v-else-if="item.type == 'ComponentType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-textarea
v-else-if="item.type == 'textArea'"
v-model:value="item.note1"
:showCount="true"
:maxlength="200"
:placeholder="'请输入' + item.name"
/>
<upload
v-else-if="item.type == 'image'"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="item"
:list="props.imgList"
tip="支持图片类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'file' && item.name !== '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:list="props.fileList"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.name == '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:busType="2"
:list="props.fileList2"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div
class="Technical-text"
v-else-if="item.type == 'richText'"
@click="showTextFunction()"
>
编辑富文本
<div
v-if="showText"
class="fuwenbenbianjiqi"
style="position: absolute; z-index: 10000"
>
<VueTemplateDemo :dataFrom="props.dataFrom"></VueTemplateDemo>
</div> </div>
</div> </div>
<upload <!-- <div class="add" @click="add(title.name)">
v-else-if="item.type == 'video'" 添加更多{{ title.name }}
type="视频" </div> -->
btnName="上传视频" <div style="font-size: 0.18rem; font-weight: 600">
:maxCount="1" <span>{{ title.name }}-{{ data[title.name].length + 1 }}</span>
:data="item" </div>
:list="props.videoList" <div
tip="支持视频类型大小不超过100M" class="form"
></upload> v-for="(val, index) in props.configure.filter(
<!-- <a-button (item) => item.name === title.name
)[0].list"
:key="'key3' + val.name + index"
>
<span>{{ val.name }}</span>
<a-input
v-model:value="val.note1"
:maxlength="24"
:placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"
/>
<template v-if="val.type == 'input2'">
<a-input
v-model:value="val.note1"
:placeholder="'请填写' + val.name"
/>
<span style="width: 0.5rem; padding-left: 0.1rem">
{{
numType == '一次性买断'
? '元'
: numType == '按调用次数'
? '元/次'
: numType == '按并发路数'
? '元/路'
: numType == '按年计费'
? '元/年'
: ''
}}
</span>
</template>
<a-textarea
v-model:value="val.note1"
:showCount="true"
:maxlength="200"
:placeholder="'请填写' + val.name"
v-else-if="val.type == 'textArea'"
/>
<a-input-number
v-model:value="val.note1"
:min="0"
:max="9999"
:step="0.01"
string-mode
:placeholder="'请填写' + val.name"
v-else-if="val.type == 'number'"
/>
<a-radio-group
v-model:value="val.note1"
:options="val.options"
@change="radioChange"
v-else-if="val.type == 'radio'"
/>
<upload
:key="showKey"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="val"
:list="[]"
tip="支持图片类型大小不超过100M"
v-else-if="val.type == 'image'"
></upload>
</div>
<div class="submit">
<a-button type="primary" @click="add(title.name)">
添加更多{{ title.name }}
</a-button>
</div>
</div>
</a-form>
</template>
<template v-else>
<a-form>
<div class="bottom">
<div
class="form"
v-for="item in title.children"
:key="item.id"
v-show="
!(
(showType == '调用接口' && item.name == '平台地址') ||
(showType == '调用接口' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == '接口请求方式') ||
(showType == '平台对接' && item.name == '服务接口') ||
(showType == 'SDK' && item.name == '平台地址') ||
(showType == 'SDK' && item.name == '接口请求方式') ||
(showType == 'SDK' && item.name == '服务接口')
)
"
>
<span v-if="item.name.indexOf('名称') == -1">
{{ item.name }}
</span>
<a-input
v-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
/>
<a-form-item
v-else-if="
item.type == 'input' && item.name.indexOf('名称') != -1
"
:label="item.name"
name="username"
:rules="[{ required: true, message: '请输入名称' }]"
>
<a-input
:maxLength="50"
v-model:value="item.note1"
:placeholder="'请输入' + item.name + '不超过50个字符'"
/>
</a-form-item>
<a-radio-group
v-else-if="item.type == 'radio'"
v-model:value="item.note1"
:options="item.options"
/>
<a-input
v-else-if="item.type == 'AbilityType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-input
v-else-if="item.type == 'ComponentType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-textarea
v-else-if="item.type == 'textArea'"
v-model:value="item.note1"
:showCount="true"
:maxlength="200"
:placeholder="'请输入' + item.name"
/>
<upload
v-else-if="item.type == 'image'"
type="图片"
btnName="上传图片"
:maxCount="1"
:data="item"
:list="props.imgList"
tip="支持图片类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'file' && item.name !== '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:list="props.fileList"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.name == '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:busType="2"
:list="props.fileList2"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div
class="Technical-text"
v-else-if="item.type == 'richText'"
@click="showTextFunction()"
>
编辑富文本
<div
v-if="showText"
class="fuwenbenbianjiqi"
style="position: absolute; z-index: 10000"
>
<VueTemplateDemo :dataFrom="props.dataFrom"></VueTemplateDemo>
</div>
</div>
<upload
v-else-if="item.type == 'video'"
type="视频"
btnName="上传视频"
:maxCount="1"
:data="item"
:list="props.videoList"
tip="支持视频类型大小不超过100M"
></upload>
<!-- <a-button
v-else-if="item.type == 'AssociatedApplication'" v-else-if="item.type == 'AssociatedApplication'"
@click="sourceClick" @click="sourceClick"
> >
请选择来源应用 请选择来源应用
</a-button> --> </a-button> -->
<a-select <a-select
v-else-if="item.type == 'select' && item.name == '来源应用'" v-else-if="item.type == 'select' && item.name == '来源应用'"
style="width: 2.4rem" style="width: 2.4rem"
v-model:value="item.note1" v-model:value="item.note1"
show-search show-search
placeholder="请输入关键字" placeholder="请输入关键字"
:options="item.options" :options="item.options"
:filter-option="applicationsOption" :filter-option="applicationsOption"
@focus="applicationsFocus" @focus="applicationsFocus"
@blur="applicationsBlur" @blur="applicationsBlur"
@change="applicationsChange" @change="applicationsChange"
></a-select> ></a-select>
<a-button <a-button
v-else-if="item.type == 'AssociatedComponents'" v-else-if="item.type == 'AssociatedComponents'"
@click="componentsClick" @click="componentsClick"
>
请选择关联组件
</a-button>
<a-select
v-else-if="item.type == 'select' && item.name == '使用方式'"
style="width: 2.4rem"
v-model:value="item.note1"
:placeholder="'请选择' + item.name"
@change="showTypeClick"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
:key="indexSelect"
:value="itemSelect.dictLabel"
> >
{{ itemSelect.dictLabel }} 请选择关联组件
</a-select-option> </a-button>
</a-select> <a-select
<a-select v-else-if="item.type == 'select' && item.name == '使用方式'"
v-else-if="item.type == 'select' && item.name !== '归属部门'" style="width: 2.4rem"
style="width: 2.4rem" v-model:value="item.note1"
v-model:value="item.note1" :placeholder="'请选择' + item.name"
:placeholder="'请选择' + item.name" @change="showTypeClick"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
:key="indexSelect"
:value="itemSelect.dictLabel"
> >
{{ itemSelect.dictLabel }} <a-select-option
</a-select-option> v-for="(itemSelect, indexSelect) in item.options"
</a-select> :key="indexSelect"
<a-select :value="itemSelect.dictLabel"
v-else-if="item.name === '归属部门'" >
style="width: 2.4rem" {{ itemSelect.dictLabel }}
v-model:value="item.note1" </a-select-option>
show-search </a-select>
placeholder="请输入关键字" <a-select
:options="item.options" v-else-if="item.type == 'select' && item.name !== '归属部门'"
:filter-option="filterOption" style="width: 2.4rem"
@focus="handleFocus" v-model:value="item.note1"
@blur="handleBlur" :placeholder="'请选择' + item.name"
@change="handleChange2" >
></a-select> <a-select-option
<div v-for="(itemSelect, indexSelect) in item.options"
v-else-if="item.type == 'checkBox'" :key="indexSelect"
class="application-Area" :value="itemSelect.dictLabel"
id="application-Area" >
:key="showKey" {{ itemSelect.dictLabel }}
> </a-select-option>
</a-select>
<a-select
v-else-if="item.name === '归属部门'"
style="width: 2.4rem"
v-model:value="item.note1"
show-search
placeholder="请输入关键字"
:options="item.options"
:filter-option="filterOption"
@focus="handleFocus"
@blur="handleBlur"
@change="handleChange2"
></a-select>
<div <div
v-for="(itemson, indexson) in item.options" v-else-if="item.type == 'checkBox'"
:key="indexson" class="application-Area"
class="application-Area-son" id="application-Area"
@click="ApplicationArea(item, itemson)" :key="showKey"
:class="
item.note2.indexOf(itemson.dictLabel) != -1
? 'application-Area-down'
: ''
"
> >
{{ itemson.dictLabel }} <div
v-for="(itemson, indexson) in item.options"
:key="indexson"
class="application-Area-son"
@click="ApplicationArea(item, itemson)"
:class="
item.note2.indexOf(itemson.dictLabel) != -1
? 'application-Area-down'
: ''
"
>
{{ itemson.dictLabel }}
</div>
</div> </div>
</div> </div>
<!-- 来源应用 -->
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplication"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 9.6rem"
>
<div>
<a-transfer
v-model:target-keys="targetKeys"
v-model:selected-keys="selectedKeys"
:data-source="mockData"
:titles="titles"
:render="(item) => item.title"
@change="handleChange"
@selectChange="handleSelectChange"
/>
</div>
</a-modal>
</div>
<!-- 关联组件 -->
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplicationOther"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 960px"
>
<div>
<a-transfer
v-model:target-keys="targetKeysOther"
v-model:selected-keys="selectedKeysOther"
:data-source="mockDataOther"
:titles="titles"
:render="(item) => item.title"
@change="handleChangeOther"
@selectChange="handleSelectChangeOther"
/>
</div>
</a-modal>
</div>
</div> </div>
<!-- 来源应用 --> </a-form>
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplication"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 9.6rem"
>
<div>
<a-transfer
v-model:target-keys="targetKeys"
v-model:selected-keys="selectedKeys"
:data-source="mockData"
:titles="titles"
:render="(item) => item.title"
@change="handleChange"
@selectChange="handleSelectChange"
/>
</div>
</a-modal>
</div>
<!-- 关联组件 -->
<div class="AssociatedApplication">
<a-modal
v-model:visible="visibleAssociatedApplicationOther"
:title="titleName"
@ok="handleOk"
@cancel="handleCancel"
style="width: 960px"
>
<div>
<a-transfer
v-model:target-keys="targetKeysOther"
v-model:selected-keys="selectedKeysOther"
:data-source="mockDataOther"
:titles="titles"
:render="(item) => item.title"
@change="handleChangeOther"
@selectChange="handleSelectChangeOther"
/>
</div>
</a-modal>
</div>
</div>
</template> </template>
</div> </div>
</div> </div>

View File

@ -104,7 +104,7 @@
/> />
</div> </div>
</div> </div>
<div <!-- <div
class="top-content" class="top-content"
v-if="Cardsname == '组件服务' || Cardsname == '应用资源'" v-if="Cardsname == '组件服务' || Cardsname == '应用资源'"
> >
@ -127,7 +127,7 @@
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
</div> </div>
@ -232,10 +232,13 @@
v-else-if="whoShow1 && whoShow1.itShowXiHaiAn" v-else-if="whoShow1 && whoShow1.itShowXiHaiAn"
> >
<home-header></home-header> <home-header></home-header>
<div class="details-pageconetent-left"> <div class="details-pageconetent-left" v-if="Cardsname != '基础设施'">
<detailsPageconetentTree /> <detailsPageconetentTree />
</div> </div>
<div class="top" v-if="Cardsname != '知识库'"> <div class="details-pageconetent-left" v-else>
<detailsPageInfrastructureTree />
</div>
<div class="top" v-if="Cardsname != '知识库' && Cardsname != '基础设施'">
<div class="top-title"> <div class="top-title">
<div <div
v-for="item in titleName" v-for="item in titleName"
@ -247,12 +250,12 @@
class="photo" class="photo"
:style="{ :style="{
backgroundImage: `url(${item.photo}) `, backgroundImage: `url(${item.photo}) `,
backgroundSize: 'cover',
}" }"
></span> ></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
</div> </div>
<!-- 搜索框 -->
<div class="resultListSearchInput-father"> <div class="resultListSearchInput-father">
<div class="resultListSearchInput-son"> <div class="resultListSearchInput-son">
模糊搜索 模糊搜索
@ -266,10 +269,17 @@
class="resultListSearchInput" class="resultListSearchInput"
/> />
<button class="button-reset" @click="chongzhi()">重置</button> <button class="button-reset" @click="chongzhi()">重置</button>
<button
v-if="Cardsname == '应用资源'"
class="button-reset"
@click="applyAll()"
style="margin-left: 0.1rem"
>
全部申请
</button>
<div class="hengxian"></div> <div class="hengxian"></div>
</div> </div>
</div> </div>
<!-- 分类 -->
<div class="top-content-father" :key="listKey"> <div class="top-content-father" :key="listKey">
<template <template
v-if=" v-if="
@ -324,7 +334,10 @@
/> />
</div> </div>
</div> </div>
<div class="top-content" v-if="Cardsname == '组件服务'"> <!-- <div
class="top-content"
v-if="Cardsname == '组件服务' || Cardsname == '应用资源'"
>
<span class="top-content-title">共享条件</span> <span class="top-content-title">共享条件</span>
<div class="leixingsumfather"> <div class="leixingsumfather">
<div class="leixingsum"> <div class="leixingsum">
@ -340,15 +353,14 @@
:checked="tagFlag == '免批申请'" :checked="tagFlag == '免批申请'"
@change="() => chagneTag('免批申请')" @change="() => chagneTag('免批申请')"
> >
免批申请 免批
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
</div> </div>
<!-- 中心内容 -->
<searchResultList <searchResultList
v-show="resourceList.data && resourceList.data.length > 0" v-show="resourceList.data && resourceList.data.length > 0"
:key="listKey2" :key="listKey2"
@ -356,7 +368,6 @@
:resourceTotal="resourceTotal" :resourceTotal="resourceTotal"
:select-cardsname="Cardsname" :select-cardsname="Cardsname"
/> />
<!-- 分页 -->
<div class="pagination"> <div class="pagination">
<a-pagination <a-pagination
v-if="resourceList.data && resourceList.data.length > 0" v-if="resourceList.data && resourceList.data.length > 0"
@ -373,11 +384,33 @@
</div> </div>
<div <div
v-if="resourceList.data && resourceList.data.length <= 0" v-if="resourceList.data && resourceList.data.length <= 0"
style="margin-top: 200px" style="margin-top: 2rem"
> >
<a-empty /> <a-empty />
</div> </div>
</div> </div>
<div class="top" v-else-if="Cardsname === '基础设施'">
<div class="top-title">
<div
v-for="item in titleName"
:key="item.name"
:class="item.name === Cardsname ? 'sel' : ''"
@click="changeCards(item.name)"
>
<span
class="photo"
:style="{
backgroundImage: `url(${item.photo}) `,
backgroundSize: 'cover',
}"
></span>
<span>{{ item.name }}</span>
</div>
</div>
<div class="top-content-father">
<infrastructurePage />
</div>
</div>
<div class="top" v-else> <div class="top" v-else>
<div class="top-title"> <div class="top-title">
<div <div
@ -390,6 +423,7 @@
class="photo" class="photo"
:style="{ :style="{
backgroundImage: `url(${item.photo}) `, backgroundImage: `url(${item.photo}) `,
backgroundSize: 'cover',
}" }"
></span> ></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
@ -741,7 +775,13 @@
orderField: 'total', // total visits 访 applyCount score collectCount orderField: 'total', // total visits 访 applyCount score collectCount
orderType: 'DESC', // ASC DESC orderType: 'DESC', // ASC DESC
} }
//西
let paramsGetResources2 = ref({
regionId: '70be8c5b664f4bcf869d82f2e8335051',
pageNum: 1,
pageSize: currentPageSize.value,
name: '',
})
// //
const onSearch = () => { const onSearch = () => {
loading.value = true loading.value = true
@ -820,6 +860,12 @@
currentPage.value = 1 currentPage.value = 1
currentPageSize.value = 5 currentPageSize.value = 5
// //
paramsGetResources2.value = {
regionId: '70be8c5b664f4bcf869d82f2e8335051',
pageNum: 1,
pageSize: currentPageSize.value,
name: '',
}
paramsGetResources.districtId = '' paramsGetResources.districtId = ''
paramsGetResources.deptIds = [] paramsGetResources.deptIds = []
paramsGetResources.pageNum = 1 paramsGetResources.pageNum = 1
@ -955,12 +1001,18 @@
searchValue.value, searchValue.value,
searchValue.value.length searchValue.value.length
) )
if (searchValue.value.length >= 2) { if (
searchValue.value.length >= 2 &&
paramsGetResources.type !== '基础设施'
) {
str = searchValue.value.substring(0, 2) str = searchValue.value.substring(0, 2)
console.log('str================>', str) console.log('str================>', str)
r = re.test(str) r = re.test(str)
} }
if (searchValue.value.length > 1 && r) { if (
(searchValue.value.length > 1 && r) ||
paramsGetResources.type === '基础设施'
) {
//switchIndex //switchIndex
paramsGetResources.name = searchValue.value paramsGetResources.name = searchValue.value
paramsGetResources.type = Cardsname.value paramsGetResources.type = Cardsname.value
@ -1016,7 +1068,11 @@
loading.value = false loading.value = false
} }
}) })
} else if (paramsGetResources.type !== '数据资源') { } else if (
paramsGetResources.type !== '数据资源' &&
(paramsGetResources.type !== '基础设施' ||
!whoShow1.value.itShowXiHaiAn)
) {
if (switchIndex != '分页查询') { if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1 paramsGetResources.pageNum = 1
} }
@ -1038,6 +1094,16 @@
// getShoppingCartList(res.data.data.records) // getShoppingCartList(res.data.data.records)
} }
}) })
} else if (
paramsGetResources.type === '基础设施' &&
whoShow1.value.itShowXiHaiAn
) {
if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1
}
paramsGetResources2.value.pageNum = paramsGetResources.pageNum
paramsGetResources2.value.pageSize = paramsGetResources.pageSize
paramsGetResources2.value.name = paramsGetResources.name
} }
} else { } else {
message.error('请以两位以上汉字或数字开头') message.error('请以两位以上汉字或数字开头')
@ -1098,7 +1164,11 @@
loading.value = false loading.value = false
} }
}) })
} else if (paramsGetResources.type !== '数据资源') { } else if (
paramsGetResources.type !== '数据资源' &&
(paramsGetResources.type !== '基础设施' ||
!whoShow1.value.itShowXiHaiAn)
) {
if (switchIndex != '分页查询') { if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1 paramsGetResources.pageNum = 1
} }
@ -1116,6 +1186,15 @@
// getShoppingCartList(res.data.data.records) // getShoppingCartList(res.data.data.records)
} }
}) })
} else if (
paramsGetResources.type === '基础设施' ||
whoShow1.value.itShowXiHaiAn
) {
if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1
}
paramsGetResources2.value.pageNum = paramsGetResources.pageNum
paramsGetResources2.value.pageSize = paramsGetResources.pageSize
} }
} }
} }
@ -1141,6 +1220,10 @@
resourceList.data = list resourceList.data = list
}) })
} }
mybus.on('getCameraByParentId', (ids) => {
paramsGetResources2.value.regionId = ids
getAppResources()
})
mybus.on('paramsGetResources', (ids) => { mybus.on('paramsGetResources', (ids) => {
if (ids && ids.length > 0) { if (ids && ids.length > 0) {
paramsGetResources.deptIds = ids paramsGetResources.deptIds = ids
@ -1333,6 +1416,7 @@
detailsPageInfrastructureTree, detailsPageInfrastructureTree,
}, },
beforeUnmount() { beforeUnmount() {
mybus.off('getCameraByParentId')
mybus.off('selectCardsitem') mybus.off('selectCardsitem')
mybus.off('paramsGetResources') mybus.off('paramsGetResources')
mybus.off('changeCondition') mybus.off('changeCondition')

View File

@ -97,6 +97,7 @@
<script> <script>
import { defineComponent, ref, watch } from 'vue' import { defineComponent, ref, watch } from 'vue'
import { getCameraAllOrgan } from '@/api/videoSurveillance' import { getCameraAllOrgan } from '@/api/videoSurveillance'
import { getCameraInfoByAreaId } from '@/api/file'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { UpOutlined, DownOutlined } from '@ant-design/icons-vue' import { UpOutlined, DownOutlined } from '@ant-design/icons-vue'
@ -109,6 +110,7 @@
children: 'children', children: 'children',
title: 'name', title: 'name',
} }
const whoShow1 = ref(whoShow)
const showKey = ref(0) const showKey = ref(0)
const treeData = ref([]) const treeData = ref([])
const init = () => { const init = () => {
@ -126,11 +128,19 @@
router.currentRoute.value.query.select router.currentRoute.value.query.select
) )
if (select == '基础设施') { if (select == '基础设施') {
getCameraAllOrgan({ parentId: 'S4NbecfYB1DBH8HNULGS34' }).then( if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) {
(res) => { getCameraAllOrgan({ parentId: 'S4NbecfYB1DBH8HNULGS34' }).then(
(res) => {
treeData.value = res.data.data
}
)
} else {
getCameraInfoByAreaId({
areaId: '70be8c5b664f4bcf869d82f2e8335051',
}).then((res) => {
treeData.value = res.data.data treeData.value = res.data.data
} })
) }
// selectDeptList({ type: select }).then((res) => { // selectDeptList({ type: select }).then((res) => {
// // console.log('=========================>', res.data.data) // // console.log('=========================>', res.data.data)
// res.data.data.forEach((val) => { // res.data.data.forEach((val) => {
@ -240,23 +250,41 @@
// } // }
const selectId = ref('') const selectId = ref('')
const onSelect = (item, val, child) => { const onSelect = (item, val, child) => {
debugger
console.log('item, val, child', child) console.log('item, val, child', child)
mybus.emit('getCameraByParentId', val.id) mybus.emit('getCameraByParentId', val.id)
mybus.emit('getListByParentId', val.id) mybus.emit('getListByParentId', val.id)
getCameraAllOrgan({ parentId: val.id }).then((res) => { if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) {
treeData.value.map((treeDataItem, index) => { getCameraAllOrgan({ parentId: val.id }).then((res) => {
if (item.id == treeDataItem.id) { treeData.value.map((treeDataItem, index) => {
treeData.value[index].children.map((childItem, childIndex) => { if (item.id == treeDataItem.id) {
if (childItem.id == val.id) { treeData.value[index].children.map((childItem, childIndex) => {
treeData.value[index].children[childIndex].children = if (childItem.id == val.id) {
res.data.data treeData.value[index].children[childIndex].children =
} res.data.data
}) }
console.log('treeData.value.[index]', treeData.value[index]) })
} console.log('treeData.value.[index]', treeData.value[index])
}
})
}) })
}) } else {
getCameraInfoByAreaId({
areaId: val.id,
}).then((res) => {
treeData.value.map((treeDataItem, index) => {
if (item.id == treeDataItem.id) {
treeData.value[index].children.map((childItem, childIndex) => {
if (childItem.id == val.id) {
treeData.value[index].children[childIndex].children =
res.data.data
}
})
console.log('treeData.value.[index]', treeData.value[index])
}
})
})
}
if (child) { if (child) {
selectId.value = child.id selectId.value = child.id
} }
@ -305,14 +333,27 @@
} }
const showBottom = (item) => { const showBottom = (item) => {
item.show = !item.show item.show = !item.show
getCameraAllOrgan({ parentId: item.id }).then((res) => { if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) {
treeData.value.map((treeDataItem, index) => { getCameraAllOrgan({ parentId: item.id }).then((res) => {
if (item.id == treeDataItem.id) { treeData.value.map((treeDataItem, index) => {
treeData.value[index].children = res.data.data if (item.id == treeDataItem.id) {
console.log('treeData.value.[index]', treeData.value[index]) treeData.value[index].children = res.data.data
} console.log('treeData.value.[index]', treeData.value[index])
}
})
}) })
}) } else {
getCameraInfoByAreaId({
areaId: item.id,
}).then((res) => {
treeData.value.map((treeDataItem, index) => {
if (item.id == treeDataItem.id) {
treeData.value[index].children = res.data.data
console.log('treeData.value.[index]', treeData.value[index])
}
})
})
}
} }
const showDown = (item, val) => { const showDown = (item, val) => {
console.log('showDown', val) console.log('showDown', val)

View File

@ -93,7 +93,13 @@
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'operation'"> <template v-if="column.dataIndex === 'operation'">
<a @click="openVideo(record.channelCode)">预览</a> <a
@click="
openVideo(record.channelCode || record.channelCode.channelId)
"
>
预览
</a>
</template> </template>
</template> </template>
</a-table> </a-table>
@ -125,9 +131,11 @@
getStreamByChannelCode, getStreamByChannelCode,
getCameraAllLabel, getCameraAllLabel,
} from '@/api/videoSurveillance' } from '@/api/videoSurveillance'
import { getCameraByCondition } from '@/api/file'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
const whoShow1 = ref(whoShow)
const options = reactive({ const options = reactive({
width: '700px', // width: '700px', //
height: '400px', // height: '400px', //
@ -415,13 +423,44 @@
const getCamera = () => { const getCamera = () => {
console.log('初始化调用') console.log('初始化调用')
console.log('不选左侧树的时候不调用接口', mapSearchParam.value) console.log('不选左侧树的时候不调用接口', mapSearchParam.value)
// if (mapSearchParam.value.parentId) { if (!whoShow1.value.itShowXiHaiAn) {
getCameraByParentId(mapSearchParam.value).then((res) => { getCameraByParentId(mapSearchParam.value).then((res) => {
console.log('RRRRRRRRRR', res.data.data) console.log('RRRRRRRRRR', res.data.data)
dataSource.value = res.data.data dataSource.value = res.data.data
pagination.value.total = res.data.count pagination.value.total = res.data.count
}) })
// } } else {
let params = {
regionId:
mapSearchParam.value.parentId || '70be8c5b664f4bcf869d82f2e8335051',
pageNum: mapSearchParam.value.pageNum,
pageSize: mapSearchParam.value.pageSize,
name: mapSearchParam.value.cameraName || '',
longitude: mapSearchParam.value.gpsX || '',
atitude: mapSearchParam.value.gpsY || '',
radius: mapSearchParam.value.radius || '',
}
let paramsFather = ''
let i = 1
for (var key in params) {
if (params[key] === '') {
delete params[key]
} else {
if (i != 1) {
paramsFather += `&${key}=` + params[key]
i += 1
} else if (i == 1) {
paramsFather += `${key}=` + params[key]
i += 1
}
}
}
getCameraByCondition(paramsFather).then((res) => {
dataSource.value = res.data.data
pagination.value.total = res.data.count
console.log('根据parent查询摄像头', res.data.data)
})
}
} }
// //
const addShoppingCart = () => { const addShoppingCart = () => {
@ -469,14 +508,14 @@
message.warning('最多只能添加10个摄像头') message.warning('最多只能添加10个摄像头')
} else { } else {
selectedList.value.push(record) selectedList.value.push(record)
selectedRowKeys.value.push(record.channelCode) selectedRowKeys.value.push(record.channelCode || record.channelId)
} }
} else { } else {
selectedList.value = selectedList.value.filter( selectedList.value = selectedList.value.filter(
(item) => item.idtCameraChannel !== record.idtCameraChannel (item) => item.idtCameraChannel !== record.idtCameraChannel
) )
selectedRowKeys.value.splice( selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(record.channelCode), selectedRowKeys.value.indexOf(record.channelCode || record.channelId),
1 1
) )
} }
@ -488,7 +527,7 @@
if (selected) { if (selected) {
changeRows.map((val) => { changeRows.map((val) => {
selectedList.value.push(val) selectedList.value.push(val)
selectedRowKeys.value.push(val.channelCode) selectedRowKeys.value.push(val.channelCode || val.channelId)
}) })
if (selectedRowKeys.value.length > 10) { if (selectedRowKeys.value.length > 10) {
message.warning('最多只能添加10个摄像头') message.warning('最多只能添加10个摄像头')
@ -497,7 +536,7 @@
(item) => item.idtCameraChannel !== val.idtCameraChannel (item) => item.idtCameraChannel !== val.idtCameraChannel
) )
selectedRowKeys.value.splice( selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(val.channelCode), selectedRowKeys.value.indexOf(val.channelCode || val.channelId),
1 1
) )
}) })
@ -508,7 +547,7 @@
(item) => item.idtCameraChannel !== val.idtCameraChannel (item) => item.idtCameraChannel !== val.idtCameraChannel
) )
selectedRowKeys.value.splice( selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(val.channelCode), selectedRowKeys.value.indexOf(val.channelCode || val.channelId),
1 1
) )
}) })

View File

@ -8,16 +8,24 @@
</div> </div>
<div class="searchPoint"> <div class="searchPoint">
<el-autocomplete <el-autocomplete
v-model="address" v-model="address"
placeholder="请输入地址" placeholder="请输入地址"
clearable clearable
:fetch-suggestions="((queryString,cb) =>{searchAddressByKeyWord(queryString,cb,i)})" :fetch-suggestions="
:trigger-on-focus="false" (queryString, cb) => {
:popper-append-to-body="false" searchAddressByKeyWord(queryString, cb, i)
class="address-auto-complete-input" }
@select="((addressItem) =>{selectedAddress(addressItem,i)})" "
/> :trigger-on-focus="false"
:popper-append-to-body="false"
class="address-auto-complete-input"
@select="
(addressItem) => {
selectedAddress(addressItem, i)
}
"
/>
<!-- <el-autocomplete <!-- <el-autocomplete
class="inline-input" class="inline-input"
prefix-icon="Search" prefix-icon="Search"
@ -68,7 +76,7 @@
</template> </template>
<script> <script>
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue'
import { HieimpMap } from '@/supermap/map-init' import { HieimpMap } from '@/supermap/map-init'
import TiledMap from './components/tiledMap' import TiledMap from './components/tiledMap'
import { createCameraDetailsPop } from '@/supermap/createMarkerPopup' import { createCameraDetailsPop } from '@/supermap/createMarkerPopup'
@ -83,6 +91,7 @@
selectByLabelName, selectByLabelName,
selectByChannelName, selectByChannelName,
} from '@/api/videoSurveillance' } from '@/api/videoSurveillance'
import { getCameraByCondition } from '@/api/file'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
export default { export default {
@ -106,6 +115,7 @@
circleModeFlag: false, circleModeFlag: false,
addressMatchUrl: '', addressMatchUrl: '',
address: '', address: '',
whoShow1: whoShow,
mapSearchParam: { mapSearchParam: {
// //
parentId: '', parentId: '',
@ -114,8 +124,8 @@
pageSize: '20000', pageSize: '20000',
gpsX: '', gpsX: '',
gpsY: '', gpsY: '',
radius: '' radius: '',
} },
} }
}, },
components: { components: {
@ -136,7 +146,7 @@
this.hiMapFun this.hiMapFun
) )
this.hiMap.mapObj.map.flyTo({ lat: 36.06, lng: 120.3899 }, 16) this.hiMap.mapObj.map.flyTo({ lat: 36.06, lng: 120.3899 }, 16)
this.addressMatchUrl = window.SITE_CONFIG.POI_URL; this.addressMatchUrl = window.SITE_CONFIG.POI_URL
// //
this.initAddressMatchService() this.initAddressMatchService()
this.getCameraAllLabel() this.getCameraAllLabel()
@ -146,72 +156,113 @@
// parentId // parentId
mybus.off('getCameraByParentId') mybus.off('getCameraByParentId')
mybus.on('getCameraByParentId', (parentId) => { mybus.on('getCameraByParentId', (parentId) => {
this.mapSearchParam.parentId = parentId this.mapSearchParam.parentId = parentId
this.getCameraByParentId() this.getCameraByParentId()
}) })
}, },
methods: { methods: {
selectedAddress(item,index) { selectedAddress(item, index) {
// //
console.log('跳转', item) console.log('跳转', item)
const latLng = { const latLng = {
lat: item.location.y, lat: item.location.y,
lng: item.location.x lng: item.location.x,
} }
this.hiMapFun.mapFlyTo(latLng) this.hiMapFun.mapFlyTo(latLng)
}, },
// //
circleSelectResource() { circleSelectResource() {
L.drawLocal.draw.handlers.circle.tooltip.start = '请圈选区域'; L.drawLocal.draw.handlers.circle.tooltip.start = '请圈选区域'
L.drawLocal.draw.handlers.circle.radius = '半径'; L.drawLocal.draw.handlers.circle.radius = '半径'
L.drawLocal.draw.handlers.circle.tooltip.end = '松开绘制完成'; L.drawLocal.draw.handlers.circle.tooltip.end = '松开绘制完成'
this.hiMap.mapObj.map.off('draw:created'); this.hiMap.mapObj.map.off('draw:created')
this.hiMap.mapObj.drawCircle.enable(); this.hiMap.mapObj.drawCircle.enable()
this.hiMap.mapObj.map.once('draw:created', (e) => { this.hiMap.mapObj.map.once('draw:created', (e) => {
const type = e.layerType; const type = e.layerType
const circleLayer = e.layer; const circleLayer = e.layer
if (type === 'circle') { if (type === 'circle') {
const radius = (e.layer._mRadius) const radius = e.layer._mRadius
if (radius > 5000) { if (radius > 5000) {
message.info('最大支持5km范围的圈选') message.info('最大支持5km范围的圈选')
} else { } else {
const circlePloygonLayer = this.multiScreenFun.createCircleLayer(circleLayer); const circlePloygonLayer =
this.hiMap.mapObj.featureGroup.addLayer(circlePloygonLayer); this.multiScreenFun.createCircleLayer(circleLayer)
this.hiMap.mapObj.layerGroup.set('circlePloygonLayer', circlePloygonLayer); this.hiMap.mapObj.featureGroup.addLayer(circlePloygonLayer)
console.log('查询图层为何发生了改变', e.layer); this.hiMap.mapObj.layerGroup.set(
this.mapSearchParam.gpsX = e.layer._latlng.lng 'circlePloygonLayer',
this.mapSearchParam.gpsY = e.layer._latlng.lat circlePloygonLayer
this.mapSearchParam.radius = radius )
const params = { console.log('查询图层为何发生了改变', e.layer)
gpsX: this.mapSearchParam.gpsX, this.mapSearchParam.gpsX = e.layer._latlng.lng
gpsY: this.mapSearchParam.gpsY, this.mapSearchParam.gpsY = e.layer._latlng.lat
radius: radius this.mapSearchParam.radius = radius
const params = {
gpsX: this.mapSearchParam.gpsX,
gpsY: this.mapSearchParam.gpsY,
radius: radius,
}
mybus.emit('getListByMap', params)
this.getCameraByParentId()
} }
mybus.emit('getListByMap', params)
this.getCameraByParentId()
} }
} })
}); },
}, getCameraByParentId() {
getCameraByParentId() { if (!this.whoShow1.itShowXiHaiAn) {
debugger
getCameraByParentId(this.mapSearchParam).then((res) => { getCameraByParentId(this.mapSearchParam).then((res) => {
debugger
console.log('根据parent查询摄像头', res.data.data) console.log('根据parent查询摄像头', res.data.data)
this.addResourceTomap('videoMap', res.data.data) this.addResourceTomap('videoMap', res.data.data)
}) })
} else {
let params = {
regionId:
this.mapSearchParam.parentId ||
'70be8c5b664f4bcf869d82f2e8335051',
pageNum: this.mapSearchParam.pageNum,
pageSize: this.mapSearchParam.pageSize,
name: this.mapSearchParam.cameraName || '',
longitude: this.mapSearchParam.gpsX || '',
atitude: this.mapSearchParam.gpsY || '',
radius: this.mapSearchParam.radius || '',
}
let paramsFather = ''
let i = 1
for (var key in params) {
if (params[key] === '') {
delete params[key]
} else {
if (i != 1) {
paramsFather += `&${key}=` + params[key]
i += 1
} else if (i == 1) {
paramsFather += `${key}=` + params[key]
i += 1
}
}
}
getCameraByCondition(paramsFather).then((res) => {
console.log('根据parent查询摄像头', res.data.data)
this.addResourceTomap('videoMap', res.data.data)
})
}
}, },
// //
initAddressMatchService() { initAddressMatchService() {
this.L = window.L || {}; this.L = window.L || {}
this.addressMatchService = L.supermap.addressMatchService(this.addressMatchUrl); this.addressMatchService = L.supermap.addressMatchService(
this.addressMatchUrl
)
}, },
circleMode() { circleMode() {
// //
this.circleModeFlag = !this.circleModeFlag this.circleModeFlag = !this.circleModeFlag
if(this.circleModeFlag){ if (this.circleModeFlag) {
// //
this.circleSelectResource() this.circleSelectResource()
}else { } else {
// //
this.hiMapFun.removeLayerByLayerName('circlePloygonLayer') this.hiMapFun.removeLayerByLayerName('circlePloygonLayer')
// //
@ -220,38 +271,37 @@
this.mapSearchParam.radius = '' this.mapSearchParam.radius = ''
this.getCameraByParentId() this.getCameraByParentId()
const params = { const params = {
gpsX: this.mapSearchParam.gpsX, gpsX: this.mapSearchParam.gpsX,
gpsY: this.mapSearchParam.gpsY, gpsY: this.mapSearchParam.gpsY,
radius: this.mapSearchParam.radius radius: this.mapSearchParam.radius,
} }
mybus.emit('getListByMap', params) mybus.emit('getListByMap', params)
} }
}, },
// //
async searchAddressByKeyWord(queryString, cb, indexX) { async searchAddressByKeyWord(queryString, cb, indexX) {
this.disasterPointIndex = indexX; this.disasterPointIndex = indexX
/* const res = await bdPlaceSearch({ searchKey: queryString }); /* const res = await bdPlaceSearch({ searchKey: queryString });
if (res.data) { if (res.data) {
for(var i=0;i<res.data.length;i++){ for(var i=0;i<res.data.length;i++){
res.data[i].value = res.data[i].name; res.data[i].value = res.data[i].name;
} }
cb(res.data); cb(res.data);
}*/ }*/
const match = function(obj) { const match = function (obj) {
//console.log('ooooo',obj); //console.log('ooooo',obj);
obj.result.map(item => { obj.result.map((item) => {
item.value = item.address; item.value = item.address
}); })
cb(obj.result); cb(obj.result)
}; }
if (!queryString) { if (!queryString) {
cb([]); cb([])
} else { } else {
var geoCodeParam = new SuperMap.GeoCodingParameter({ var geoCodeParam = new SuperMap.GeoCodingParameter({
'address': queryString, address: queryString,
}); })
this.addressMatchService.code(geoCodeParam, match); this.addressMatchService.code(geoCodeParam, match)
} }
}, },
getCameraAllPage(page) { getCameraAllPage(page) {
@ -268,9 +318,7 @@
// console.log("#############" + (t2 - t1)); // console.log("#############" + (t2 - t1));
}) })
}, },
getCameraAllLabel() { getCameraAllLabel() {},
},
tabChange(item) { tabChange(item) {
if (this.checkboxGroup.indexOf(item.labelName) !== -1) { if (this.checkboxGroup.indexOf(item.labelName) !== -1) {
if (item.labelName == '全部') { if (item.labelName == '全部') {
@ -488,26 +536,26 @@
} }
</style> </style>
<style lang="less"> <style lang="less">
.ucs-leaflet-map { .ucs-leaflet-map {
.iclient-leaflet-logo { .iclient-leaflet-logo {
display: none; display: none;
}
.leaflet-control-attribution {
display: none;
}
svg {
position: absolute;
bottom: 0.1rem;
right: 0.1rem;
z-index: 1001;
cursor: pointer;
}
.address-auto-complete-input {
width: 2.4rem;
}
::v-deep.el-autocomplete .el-popper {
width: auto !important;
max-width: 2.4rem;
}
} }
.leaflet-control-attribution {
display: none;
}
svg {
position: absolute;
bottom: 0.1rem;
right: 0.1rem;
z-index: 1001;
cursor: pointer;
}
.address-auto-complete-input {
width: 2.4rem;
}
::v-deep.el-autocomplete .el-popper{
width: auto !important;
max-width: 2.4rem;
}
}
</style> </style>