Merge branch 'hi-ucs-dev' of http://192.168.124.50:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
a0049873 2022-08-01 17:53:05 +08:00
commit b5a94cd6a7
7 changed files with 253 additions and 94 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-08-01 11:15:53 * @LastEditTime: 2022-07-28 14:42:55
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -48,22 +48,22 @@
// window.SITE_CONFIG['websocketURL'] = '15.2.21.243:8888/renren-admin'; // window.SITE_CONFIG['websocketURL'] = '15.2.21.243:8888/renren-admin';
// window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; // window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 西海岸版本 // 西海岸版本
// window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797'; window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/'; window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/';
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/'; window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
// 开发 // 开发
// window.SITE_CONFIG['backUrl'] = 'http://localhost:8001'; // window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
// window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.236:9796/'; // window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.236:9796/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.236:9796/document/#/devModelFile/'; // window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.236:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.236:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.2.21.236:8888/renren-admin';
// window.SITE_CONFIG['websocketURL'] = '15.2.21.236:8888/renren-admin'; // window.SITE_CONFIG['websocketURL'] = '15.2.21.236:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
// window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; // window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
window.SITE_CONFIG['backUrl'] = 'http://192.168.124.236:9797';
window.SITE_CONFIG['previewUrl'] = 'http://192.168.124.236:9796/';
window.SITE_CONFIG['frontUrl'] = 'http://192.168.124.236:9796/document/#/devModelFile/';
window.SITE_CONFIG['apiURL'] = 'http://192.168.124.236:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://192.168.124.236:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本 // 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797'; // window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/'; // window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';

View File

@ -477,6 +477,8 @@
:render="(item) => item.title" :render="(item) => item.title"
@change="handleChangeOther" @change="handleChangeOther"
@selectChange="handleSelectChangeOther" @selectChange="handleSelectChangeOther"
show-search
:filter-option="filterOptionTransfer"
/> />
</div> </div>
</a-modal> </a-modal>
@ -927,7 +929,7 @@
mockDataOther.value.push({ mockDataOther.value.push({
key: val.id, key: val.id,
title: val.name, title: val.name,
description: val.id, description: val.name,
}) })
}) })
}) })
@ -948,7 +950,7 @@
mockDataOther.value.push({ mockDataOther.value.push({
key: val.id, key: val.id,
title: val.name, title: val.name,
description: val.id, description: val.name,
}) })
}) })
}) })
@ -978,6 +980,11 @@
console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys) console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
} }
const filterOptionTransfer = (inputValue, option) => {
console.log(option, 'option')
return option.description.indexOf(inputValue) > -1
}
const handleOk = (e) => { const handleOk = (e) => {
console.log(e) console.log(e)
visibleAssociatedApplicationOther.value = false visibleAssociatedApplicationOther.value = false

View File

@ -49,8 +49,8 @@
<div class="description"> <div class="description">
{{ {{
val.description || val.description ||
(val.note1 && ((val.note1 || '') &&
JSON.parse(val.note1)[0].channelName + ( JSON.parse(val.note1)[0].channelName || '--') +
'等' + '等' +
JSON.parse(val.note1).length + JSON.parse(val.note1).length +
'个摄像头') || '个摄像头') ||

View File

@ -44,7 +44,6 @@
disabled disabled
/> />
</a-form-item> </a-form-item>
<a-form-item <a-form-item
style="margin: 0 22px" style="margin: 0 22px"
label="电话" label="电话"
@ -62,7 +61,6 @@
v-model:value="formName.phone" v-model:value="formName.phone"
/> />
</a-form-item> </a-form-item>
<a-form-item <a-form-item
label="单位" label="单位"
name="unit" name="unit"
@ -138,7 +136,6 @@
/> />
</a-form-item> </a-form-item>
</div> </div>
<a-form-item <a-form-item
style="color: #666; font-size: 16px" style="color: #666; font-size: 16px"
label="申请单附件" label="申请单附件"
@ -179,7 +176,6 @@
</div> </div>
</a-upload> </a-upload>
</a-form-item> </a-form-item>
<div class="bottom-btn"> <div class="bottom-btn">
<a-button <a-button
style=" style="
@ -232,7 +228,6 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import AbilityToApplyFor from './AbilityToApplyFor.vue' import AbilityToApplyFor from './AbilityToApplyFor.vue'
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
@ -260,7 +255,6 @@
import { pageWithAttrs } from '@/api/home' import { pageWithAttrs } from '@/api/home'
// import { baseURL } from '@/config' // import { baseURL } from '@/config'
// import AsideMenu from './components/asideMenu.vue' // import AsideMenu from './components/asideMenu.vue'
export default { export default {
name: '', name: '',
props: {}, props: {},
@ -626,7 +620,6 @@
}) })
.catch(() => {}) .catch(() => {})
} }
const options = ref([ const options = ref([
{ {
value: '政法委', value: '政法委',
@ -655,12 +648,10 @@
]) ])
const systemOptions = ref([]) const systemOptions = ref([])
const systemOptions2 = ref([]) const systemOptions2 = ref([])
const handleChange = (info) => { const handleChange = (info) => {
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
// console.log(info.file, info.fileList) // console.log(info.file, info.fileList)
} }
if (info.file.status === 'done') { if (info.file.status === 'done') {
message.success(`${info.file.name} 上传成功`) message.success(`${info.file.name} 上传成功`)
formName.enclosure = info.file.response.data formName.enclosure = info.file.response.data
@ -680,11 +671,9 @@
'image/pdf' || 'image/pdf' ||
'image/xlxs' || 'image/xlxs' ||
'image/ppt' 'image/ppt'
if (!isPNG) { if (!isPNG) {
message.error(`上传失败`) message.error(`上传失败`)
} }
return isPNG || Upload.LIST_IGNORE return isPNG || Upload.LIST_IGNORE
} }
const fileList = ref([]) const fileList = ref([])
@ -725,7 +714,6 @@
const handleBlur = () => { const handleBlur = () => {
console.log('blur') console.log('blur')
} }
const handleFocus = () => { const handleFocus = () => {
console.log('focus') console.log('focus')
// console.log(formName.applicationSystem) // console.log(formName.applicationSystem)
@ -733,11 +721,9 @@
systemOptions.value = systemOptions2.value systemOptions.value = systemOptions2.value
// systemOptions.value = [] // systemOptions.value = []
} }
// const filterOption = (input, option) => { // const filterOption = (input, option) => {
// return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 // return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
// } // }
onBeforeUnmount(() => { onBeforeUnmount(() => {
mybus.off('reomveOldData') mybus.off('reomveOldData')
}) })
@ -773,7 +759,6 @@
}, },
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
#apply-container { #apply-container {
// background-color: #f5f8fc; // background-color: #f5f8fc;
@ -824,7 +809,6 @@
margin-right: 10px; margin-right: 10px;
} }
} }
:deep(.ant-input) { :deep(.ant-input) {
border: 1px solid #e0e0e0; border: 1px solid #e0e0e0;
border-radius: 6px; border-radius: 6px;

View File

@ -10,7 +10,7 @@
}} }}
</div> </div>
<div class="condition" :key="showKey"> <div class="condition" :key="showKey">
<ul v-if="selectCardsname === '融合服务'"> <ul v-if="selectCardsname === '融合服务' || selectCardsname === '赋能场景'">
<li v-for="(item, i) in orderList" :key="item.value" @click="changeOrder(i, item.value, item.orderType)"> <li v-for="(item, i) in orderList" :key="item.value" @click="changeOrder(i, item.value, item.orderType)">
{{ item.name }} {{ item.name }}
<span class="arrow" :class="item.orderType == 'ASC' ? 'down' : ''"></span> <span class="arrow" :class="item.orderType == 'ASC' ? 'down' : ''"></span>
@ -42,7 +42,7 @@
</div> </div>
<div class="left" style="display: flex; <div class="left" style="display: flex;
align-items: center" align-items: center"
v-else-if="selectCardsname === '融合服务' && item.fuseAttrList && item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0]"> v-else-if="(selectCardsname === '融合服务' || selectCardsname === '赋能场景') && item.fuseAttrList && item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0]">
<a-image :width="106" :preview="false" <a-image :width="106" :preview="false"
:src="item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0].attrValue" /> :src="item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0].attrValue" />
</div> </div>
@ -72,10 +72,10 @@
? 'ywzj' ? 'ywzj'
: '' : ''
" v-else-if=" " v-else-if="
selectCardsname !== '基础设施' && selectCardsname !== '融合服务' selectCardsname !== '基础设施' && selectCardsname !== '融合服务' && selectCardsname !== '赋能场景'
"></div> "></div>
<div class="left jcss" v-else-if="selectCardsname === '基础设施'"></div> <div class="left jcss" v-else-if="selectCardsname === '基础设施'"></div>
<div class="left rhfw" v-else-if="selectCardsname === '融合服务'"></div> <div class="left rhfw" v-else-if="selectCardsname === '融合服务' || selectCardsname === '赋能场景'"></div>
<div class="right"> <div class="right">
<div class="header"> <div class="header">
<span style="display: flex; align-items: center; width: 680px"> <span style="display: flex; align-items: center; width: 680px">
@ -95,7 +95,7 @@
</svg> </svg>
</span> </span>
<div class="header-right"> <div class="header-right">
<div v-if="selectCardsname === '融合服务'" class="label-content"> <div v-if="selectCardsname === '融合服务' || selectCardsname === '赋能场景'" class="label-content">
<template v-if="item.fuseAttrList && item.fuseAttrList.filter((val) => val.attrType == '应用领域')[0]"> <template v-if="item.fuseAttrList && item.fuseAttrList.filter((val) => val.attrType == '应用领域')[0]">
<span class="label" <span class="label"
v-for="(data, index) in item.fuseAttrList.filter((val) => val.attrType == '应用领域')[0].attrValue.split(';')" v-for="(data, index) in item.fuseAttrList.filter((val) => val.attrType == '应用领域')[0].attrValue.split(';')"
@ -132,7 +132,7 @@
<span>{{ item.shareType || '--' }}</span> <span>{{ item.shareType || '--' }}</span>
</div> --> </div> -->
<div v-if=" <div v-if="
selectCardsname !== '融合服务' && selectCardsname !== '基础设施' selectCardsname !== '融合服务' && selectCardsname !== '赋能场景' && selectCardsname !== '基础设施'
"> ">
<span>{{ item.deptName || '--' }}</span> <span>{{ item.deptName || '--' }}</span>
</div> </div>
@ -148,20 +148,23 @@
<div> <div>
<div v-if=" <div v-if="
selectCardsname !== '数据资源' && selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务' selectCardsname !== '融合服务' &&
selectCardsname !== '赋能场景'
"> ">
浏览量{{ item.visits || 0 }} 浏览量{{ item.visits || 0 }}
</div> </div>
<div v-if=" <div v-if="
selectCardsname !== '数据资源' && selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务' && selectCardsname !== '融合服务' &&
selectCardsname !== '赋能场景' &&
(selectCardsname !== '应用资源' || whoShow1.itShowQingDao) (selectCardsname !== '应用资源' || whoShow1.itShowQingDao)
"> ">
申请量{{ item.applyCount || 0 }} 申请量{{ item.applyCount || 0 }}
</div> </div>
<div v-if=" <div v-if="
selectCardsname === '数据资源' && selectCardsname === '数据资源' &&
selectCardsname !== '融合服务' selectCardsname !== '融合服务' &&
selectCardsname !== '赋能场景'
"> ">
数据量{{ item.sjlCount || 0 }} 数据量{{ item.sjlCount || 0 }}
</div> </div>
@ -201,7 +204,7 @@
<a-button type="primary" @click="toView('details', item)" v-if="!whoShow1.itShowBaoTou"> <a-button type="primary" @click="toView('details', item)" v-if="!whoShow1.itShowBaoTou">
查看详情 查看详情
</a-button> </a-button>
<a-button style="margin-left: 10px" v-show="selectCardsname === '融合服务'" <a-button style="margin-left: 10px" v-show="selectCardsname === '融合服务' || selectCardsname === '赋能场景'"
@click="handleAKeyApplication(item)"> @click="handleAKeyApplication(item)">
一键申请 一键申请
</a-button> </a-button>
@ -588,10 +591,38 @@ export default {
} }
// -- // --
const handleAKeyApplication = (item) => { //
let _applyList = [] const handleAKeyApplication = (item ) => {
; (item.fuseResourceList || []).map((v) => { let _applyList = [];
let fuseResourceList = item.fuseResourceList || []
let jcssArray = fuseResourceList.filter(v => v.type === '基础设施')
let otherArray = fuseResourceList.filter(v => v.type !== '基础设施')
jcssArray = jcssArray.map(v => {
v = Object.assign(v, v.resource)
return v
})
let jcss = [
{
arr: [
{
description: '',
note1: JSON.stringify(jcssArray),
resourceId: '1522550195055828996',
resourceName: '摄像头列表',
type: '基础设施',
},
],
deptId: '',
deptName: '',
},
]
if (infrastructure) {
jcss[0].deptId = infrastructure.deptId
jcss[0].deptName = infrastructure.deptName
}
otherArray.map((v) => {
let resource = v.resource || {} let resource = v.resource || {}
console.log('resource------------>', resource);
let obj = { let obj = {
arr: [ arr: [
{ {
@ -608,19 +639,46 @@ export default {
} }
_applyList.push(obj) _applyList.push(obj)
}) })
_applyList = jcss.concat(_applyList)
localStorage.setItem('applyList', JSON.stringify(_applyList)) localStorage.setItem('applyList', JSON.stringify(_applyList))
router.push({ router.push({
path: '/apply', path: '/apply',
}) })
} }
// const handleAKeyApplication = (item) => {
// let _applyList = []
// ; (item.fuseResourceList || []).map((v) => {
// let resource = v.resource || {}
// let obj = {
// arr: [
// {
// delFlag: resource.delFlag,
// description: resource.description,
// resourceId: resource.id,
// resourceName: resource.name,
// time: resource.createDate,
// type: resource.type,
// },
// ],
// deptId: resource.deptId,
// deptName: resource.deptName,
// }
// _applyList.push(obj)
// })
// localStorage.setItem('applyList', JSON.stringify(_applyList))
// router.push({
// path: '/apply',
// })
// }
mybus.on('chongzhi', (typeObj) => { mybus.on('chongzhi', (typeObj) => {
console.log('typeObj------------>', typeObj) console.log('typeObj------------>', typeObj)
if (!typeObj) { if (!typeObj) {
selData.value = 'total' selData.value = 'total'
} }
if (typeObj && typeObj.type === '融合服务') { if (typeObj && (typeObj.type === '融合服务' || typeObj.type === '赋能场景')) {
orderList.value = [ orderList.value = [
{ {
value: 'collectCount', value: 'collectCount',

View File

@ -63,37 +63,38 @@
<div class="title-1"> <div class="title-1">
<DetalsTitle title="使用能力" type="ABILITY"></DetalsTitle> <DetalsTitle title="使用能力" type="ABILITY"></DetalsTitle>
</div> </div>
<template v-for="(item, i) in combineList" :key="i"> <div class="flex-row-center combine-content" v-for="(item, i) in combineList" :key="i">
<div class="flex-row-center combine-content" v-if="item.list.length>0"> <div class="title"></div>
<div class="title">{{item.title}}</div>
<div> <div>
<el-table <el-table
class="table"
:data="item.list" :data="item.list"
stripe stripe
style="width: 100%" :header-cell-style="{'text-align': 'center'}">
:header-cell-style="{'text-align': 'center'}"
@row-click="openResourceDetail">
<el-table-column <el-table-column
prop="name" prop="name"
label="数据" label="数据"
align="center" align="center"
width="100"> width="200"
show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="dept" prop="dept"
label="能力来源" label="能力来源"
align="center" align="center"
width="180"> width="300"
show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="platform" prop="platform"
label="申请平台" label="申请平台"
align="center"> align="center"
width="100"
show-overflow-tooltip="true">
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
</template>
</div> </div>
<!-- 构建步骤 --> <!-- 构建步骤 -->
@ -105,14 +106,11 @@
<DetalsTitle title="构建步骤" type="STEP"></DetalsTitle> <DetalsTitle title="构建步骤" type="STEP"></DetalsTitle>
</div> </div>
<div class="flex-row-center step-content"> <div class="flex-row-center step-content">
<div style="height: 300px;"> <el-steps direction="vertical" :space="150" :active="step.length">
<el-steps direction="vertical" :active="step.length">
<el-step v-for="(item, i) in step" :key="i" :title="item.question" :description="item.answer"></el-step> <el-step v-for="(item, i) in step" :key="i" :title="item.question" :description="item.answer"></el-step>
</el-steps> </el-steps>
</div> </div>
</div> </div>
</div>
<home-footer></home-footer> <home-footer></home-footer>
</div> </div>
</template> </template>
@ -271,7 +269,7 @@
})) }))
}else if(item.title==='数据资源'){ }else if(item.title==='数据资源'){
arr=resource.map(res=>({ arr=resource.map(res=>({
id: res.resource.zycode, name: res.resource.zyname, dept: res.resource.TGBM, platform: 'UCS' id: res.resource.zycode, name: res.resource.zyname, dept: res.resource.TGBM, platform: '共享交换平台'
})) }))
} }
} }
@ -288,10 +286,6 @@
} }
getIntegrationServicesDeatil(id) getIntegrationServicesDeatil(id)
function openResourceDetail(row, column, event){
console.log(row)
}
function handleOpenUrl(type) { function handleOpenUrl(type) {
let obj = let obj =
(detailInfoObj.value.fuseAttrList || []).find( (detailInfoObj.value.fuseAttrList || []).find(
@ -467,17 +461,20 @@
padding: 0.8rem 0; padding: 0.8rem 0;
background: rgb(247, 248, 250); background: rgb(247, 248, 250);
.bg { .bg {
height: 2rem; height: 3rem;
width: 2rem; width: 3rem;
background: url('~@/assets/home/rhfw_square.png') no-repeat; background: url('~@/assets/home/rhfw_square.png') no-repeat;
background-size: 100%; background-size: 100%;
margin-top: 0.3rem; margin-top: 0.3rem;
} }
.content { .content {
height: 2rem; overflow: auto;
height: 3rem;
width: 6rem; width: 6rem;
margin-top: 0.3rem;
.content-item { .content-item {
margin: 0.1rem; font-size: 16px;
margin: 0rem 0rem 0.1rem 0.1rem;
} }
} }
} }
@ -486,9 +483,9 @@
padding: 0.8rem 0; padding: 0.8rem 0;
background: rgb(247, 248, 250); background: rgb(247, 248, 250);
.content { .content {
height: 2rem; width: 9rem;
width: 8rem;
.content-item { .content-item {
font-size: 16px;
margin: 0.3rem; margin: 0.3rem;
} }
} }
@ -499,6 +496,12 @@
background: rgb(247, 248, 250); background: rgb(247, 248, 250);
.step-content { .step-content {
margin-top: 0.3rem; margin-top: 0.3rem;
/deep/ .el-step__title {
font-size: 16px;
}
/deep/ .el-step__description {
font-size: 14px;
}
} }
} }
@ -514,12 +517,16 @@
margin-top: 0.3rem; margin-top: 0.3rem;
align-items: flex-start; align-items: flex-start;
.title { .title {
height: 2rem; height: 3rem;
width: 2rem; width: 3rem;
margin-right: 0.5rem; margin-right: 0.5rem;
background: url('~@/assets/home/rhfw_square.png') no-repeat; background: url('~@/assets/home/rhfw_square.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.table {
width: 100%;
font-size: 16px
}
} }
.name-box { .name-box {

View File

@ -23,13 +23,14 @@
<div class="desc">描述{{ detailInfoObj.description || '--' }}</div> <div class="desc">描述{{ detailInfoObj.description || '--' }}</div>
</div> </div>
<div class="btn-box"> <div class="btn-box">
<a-button size="big" class="btn-text" type="primary" @click="toView()"> <a-button size="big" class="btn-text" type="primary" @click="handleAKeyApplication()">
<template #icon> <template #icon>
<form-outlined /> <form-outlined />
</template> </template>
申请使用 申请使用
</a-button> </a-button>
<a-button size="big" class="btn-text" type="primary" @click="toView()"> <a-button size="big" class="btn-text" :type="detailInfoObj.isCollect == 'true' ? 'primary' : ''"
@click="addCollect()">
<template #icon> <template #icon>
<form-outlined /> <form-outlined />
</template> </template>
@ -67,6 +68,7 @@ import packageAbilityList from '@/views/home/components/packageAbilityList.vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { getIntegrationDetail } from '@/api/home' import { getIntegrationDetail } from '@/api/home'
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
import { scInsert, scDel } from '@/api/personalCenter'
const router = useRouter() const router = useRouter()
const id = router.currentRoute.value.query.id const id = router.currentRoute.value.query.id
@ -102,6 +104,8 @@ const getIntegrationServicesDeatil = (id) => {
return message.error(res.data.msg) return message.error(res.data.msg)
} }
detailInfoObj.value = res.data.data || {} detailInfoObj.value = res.data.data || {}
console.log('detailInfoObj------------>', detailInfoObj);
let fuseResourceList = detailInfoObj.value.fuseResourceList || [] let fuseResourceList = detailInfoObj.value.fuseResourceList || []
abilityList.value.map(v => { abilityList.value.map(v => {
let list = fuseResourceList.filter(x => x.type == v.name) || []; let list = fuseResourceList.filter(x => x.type == v.name) || [];
@ -116,6 +120,104 @@ const getIntegrationServicesDeatil = (id) => {
} }
) )
} }
//
const handleAKeyApplication = () => {
let _applyList = [];
let fuseResourceList = detailInfoObj.value.fuseResourceList || []
let jcssArray = fuseResourceList.filter(v => v.type === '基础设施')
let otherArray = fuseResourceList.filter(v => v.type !== '基础设施')
jcssArray = jcssArray.map(v => {
v = Object.assign(v, v.resource)
return v
})
let jcss = [
{
arr: [
{
description: '',
note1: JSON.stringify(jcssArray),
resourceId: '1522550195055828996',
resourceName: '摄像头列表',
type: '基础设施',
},
],
deptId: '',
deptName: '',
},
]
if (infrastructure) {
jcss[0].deptId = infrastructure.deptId
jcss[0].deptName = infrastructure.deptName
}
otherArray.map((v) => {
let resource = v.resource || {}
console.log('resource------------>', resource);
let obj = {
arr: [
{
delFlag: resource.delFlag,
description: resource.description,
resourceId: resource.id,
resourceName: resource.name,
time: resource.createDate,
type: resource.type,
},
],
deptId: resource.deptId,
deptName: resource.deptName,
}
_applyList.push(obj)
})
_applyList = jcss.concat(_applyList)
localStorage.setItem('applyList', JSON.stringify(_applyList))
router.push({
path: '/apply',
})
}
const dataPosting = ref(true)
const addCollect = () => {
if (dataPosting.value && detailInfoObj.value.id) {
dataPosting.value = false
if (detailInfoObj.value.isCollect == 'true') {
scDel([detailInfoObj.value.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
detailInfoObj.value.isCollect = 'false'
detailInfoObj.value.collectCount--
dataPosting.value = true
console.log('收藏2===============>', res.data, dataPosting.value)
getIntegrationServicesDeatil(id)
}
})
.catch(err => {
console.log('err------------>', err);
message.success(err)
})
} else {
scInsert([
{
resourceId: detailInfoObj.value.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
detailInfoObj.value.isCollect = 'true'
detailInfoObj.value.collectCount++
dataPosting.value = true
console.log('收藏2===============>', res.data, dataPosting.value)
getIntegrationServicesDeatil(id)
}
})
.catch(err => {
console.log('err------------>', err);
message.success(err)
})
}
}
}
getIntegrationServicesDeatil(id) getIntegrationServicesDeatil(id)
@ -239,4 +341,5 @@ getIntegrationServicesDeatil(id)
.list-box { .list-box {
padding: 0.4rem; padding: 0.4rem;
} }
</style> </style>