Merge branch 'hi-ucs-dev' of http://192.168.124.50:3000/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
b5a94cd6a7
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-03-29 16:45:25
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-08-01 11:15:53
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-07-28 14:42:55
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
@ -48,22 +48,22 @@
|
|||
// 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['backUrl'] = 'http://10.134.135.9:9797';
|
||||
// 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['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
|
||||
window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797';
|
||||
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['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
|
||||
// 开发
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
|
||||
// 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['apiURL'] = 'http://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['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['previewUrl'] = 'http://124.222.94.39:9796/';
|
||||
|
|
|
@ -477,6 +477,8 @@
|
|||
:render="(item) => item.title"
|
||||
@change="handleChangeOther"
|
||||
@selectChange="handleSelectChangeOther"
|
||||
show-search
|
||||
:filter-option="filterOptionTransfer"
|
||||
/>
|
||||
</div>
|
||||
</a-modal>
|
||||
|
@ -927,7 +929,7 @@
|
|||
mockDataOther.value.push({
|
||||
key: val.id,
|
||||
title: val.name,
|
||||
description: val.id,
|
||||
description: val.name,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -948,7 +950,7 @@
|
|||
mockDataOther.value.push({
|
||||
key: val.id,
|
||||
title: val.name,
|
||||
description: val.id,
|
||||
description: val.name,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -978,6 +980,11 @@
|
|||
console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
|
||||
}
|
||||
|
||||
const filterOptionTransfer = (inputValue, option) => {
|
||||
console.log(option, 'option')
|
||||
return option.description.indexOf(inputValue) > -1
|
||||
}
|
||||
|
||||
const handleOk = (e) => {
|
||||
console.log(e)
|
||||
visibleAssociatedApplicationOther.value = false
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
<div class="description">
|
||||
{{
|
||||
val.description ||
|
||||
(val.note1 &&
|
||||
JSON.parse(val.note1)[0].channelName +
|
||||
((val.note1 || '') &&
|
||||
( JSON.parse(val.note1)[0].channelName || '--') +
|
||||
'等' +
|
||||
JSON.parse(val.note1).length +
|
||||
'个摄像头') ||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
disabled
|
||||
/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
style="margin: 0 22px"
|
||||
label="电话"
|
||||
|
@ -62,7 +61,6 @@
|
|||
v-model:value="formName.phone"
|
||||
/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
label="单位"
|
||||
name="unit"
|
||||
|
@ -138,7 +136,6 @@
|
|||
/>
|
||||
</a-form-item>
|
||||
</div>
|
||||
|
||||
<a-form-item
|
||||
style="color: #666; font-size: 16px"
|
||||
label="申请单附件"
|
||||
|
@ -179,7 +176,6 @@
|
|||
</div>
|
||||
</a-upload>
|
||||
</a-form-item>
|
||||
|
||||
<div class="bottom-btn">
|
||||
<a-button
|
||||
style="
|
||||
|
@ -232,7 +228,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AbilityToApplyFor from './AbilityToApplyFor.vue'
|
||||
import HomeHeader from '@/views/home/components/header'
|
||||
|
@ -260,7 +255,6 @@
|
|||
import { pageWithAttrs } from '@/api/home'
|
||||
// import { baseURL } from '@/config'
|
||||
// import AsideMenu from './components/asideMenu.vue'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
props: {},
|
||||
|
@ -626,7 +620,6 @@
|
|||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const options = ref([
|
||||
{
|
||||
value: '政法委',
|
||||
|
@ -655,12 +648,10 @@
|
|||
])
|
||||
const systemOptions = ref([])
|
||||
const systemOptions2 = ref([])
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status !== 'uploading') {
|
||||
// console.log(info.file, info.fileList)
|
||||
}
|
||||
|
||||
if (info.file.status === 'done') {
|
||||
message.success(`${info.file.name} 上传成功`)
|
||||
formName.enclosure = info.file.response.data
|
||||
|
@ -680,11 +671,9 @@
|
|||
'image/pdf' ||
|
||||
'image/xlxs' ||
|
||||
'image/ppt'
|
||||
|
||||
if (!isPNG) {
|
||||
message.error(`上传失败`)
|
||||
}
|
||||
|
||||
return isPNG || Upload.LIST_IGNORE
|
||||
}
|
||||
const fileList = ref([])
|
||||
|
@ -725,7 +714,6 @@
|
|||
const handleBlur = () => {
|
||||
console.log('blur')
|
||||
}
|
||||
|
||||
const handleFocus = () => {
|
||||
console.log('focus')
|
||||
// console.log(formName.applicationSystem)
|
||||
|
@ -733,11 +721,9 @@
|
|||
systemOptions.value = systemOptions2.value
|
||||
// systemOptions.value = []
|
||||
}
|
||||
|
||||
// const filterOption = (input, option) => {
|
||||
// return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
// }
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
mybus.off('reomveOldData')
|
||||
})
|
||||
|
@ -773,7 +759,6 @@
|
|||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
#apply-container {
|
||||
// background-color: #f5f8fc;
|
||||
|
@ -824,7 +809,6 @@
|
|||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-input) {
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 6px;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
}}
|
||||
</div>
|
||||
<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)">
|
||||
{{ item.name }}
|
||||
<span class="arrow" :class="item.orderType == 'ASC' ? 'down' : ''"></span>
|
||||
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
<div class="left" style="display: flex;
|
||||
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"
|
||||
:src="item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0].attrValue" />
|
||||
</div>
|
||||
|
@ -72,10 +72,10 @@
|
|||
? 'ywzj'
|
||||
: ''
|
||||
" v-else-if="
|
||||
selectCardsname !== '基础设施' && selectCardsname !== '融合服务'
|
||||
selectCardsname !== '基础设施' && selectCardsname !== '融合服务' && 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="header">
|
||||
<span style="display: flex; align-items: center; width: 680px">
|
||||
|
@ -95,7 +95,7 @@
|
|||
</svg>
|
||||
</span>
|
||||
<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]">
|
||||
<span class="label"
|
||||
v-for="(data, index) in item.fuseAttrList.filter((val) => val.attrType == '应用领域')[0].attrValue.split(';')"
|
||||
|
@ -132,7 +132,7 @@
|
|||
<span>{{ item.shareType || '--' }}</span>
|
||||
</div> -->
|
||||
<div v-if="
|
||||
selectCardsname !== '融合服务' && selectCardsname !== '基础设施'
|
||||
selectCardsname !== '融合服务' && selectCardsname !== '赋能场景' && selectCardsname !== '基础设施'
|
||||
">
|
||||
<span>{{ item.deptName || '--' }}</span>
|
||||
</div>
|
||||
|
@ -148,20 +148,23 @@
|
|||
<div>
|
||||
<div v-if="
|
||||
selectCardsname !== '数据资源' &&
|
||||
selectCardsname !== '融合服务'
|
||||
selectCardsname !== '融合服务' &&
|
||||
selectCardsname !== '赋能场景'
|
||||
">
|
||||
浏览量:{{ item.visits || 0 }}次
|
||||
</div>
|
||||
<div v-if="
|
||||
selectCardsname !== '数据资源' &&
|
||||
selectCardsname !== '融合服务' &&
|
||||
selectCardsname !== '赋能场景' &&
|
||||
(selectCardsname !== '应用资源' || whoShow1.itShowQingDao)
|
||||
">
|
||||
申请量:{{ item.applyCount || 0 }}次
|
||||
</div>
|
||||
<div v-if="
|
||||
selectCardsname === '数据资源' &&
|
||||
selectCardsname !== '融合服务'
|
||||
selectCardsname !== '融合服务' &&
|
||||
selectCardsname !== '赋能场景'
|
||||
">
|
||||
数据量:{{ item.sjlCount || 0 }}
|
||||
</div>
|
||||
|
@ -201,7 +204,7 @@
|
|||
<a-button type="primary" @click="toView('details', item)" v-if="!whoShow1.itShowBaoTou">
|
||||
查看详情
|
||||
</a-button>
|
||||
<a-button style="margin-left: 10px" v-show="selectCardsname === '融合服务'"
|
||||
<a-button style="margin-left: 10px" v-show="selectCardsname === '融合服务' || selectCardsname === '赋能场景'"
|
||||
@click="handleAKeyApplication(item)">
|
||||
一键申请
|
||||
</a-button>
|
||||
|
@ -588,10 +591,38 @@ export default {
|
|||
}
|
||||
|
||||
// 融合服务--一键申请
|
||||
const handleAKeyApplication = (item) => {
|
||||
let _applyList = []
|
||||
; (item.fuseResourceList || []).map((v) => {
|
||||
// 一键申请
|
||||
const handleAKeyApplication = (item ) => {
|
||||
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 || {}
|
||||
console.log('resource------------>', resource);
|
||||
let obj = {
|
||||
arr: [
|
||||
{
|
||||
|
@ -608,19 +639,46 @@ export default {
|
|||
}
|
||||
_applyList.push(obj)
|
||||
})
|
||||
|
||||
_applyList = jcss.concat(_applyList)
|
||||
localStorage.setItem('applyList', JSON.stringify(_applyList))
|
||||
router.push({
|
||||
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) => {
|
||||
console.log('typeObj------------>', typeObj)
|
||||
if (!typeObj) {
|
||||
selData.value = 'total'
|
||||
}
|
||||
if (typeObj && typeObj.type === '融合服务') {
|
||||
if (typeObj && (typeObj.type === '融合服务' || typeObj.type === '赋能场景')) {
|
||||
orderList.value = [
|
||||
{
|
||||
value: 'collectCount',
|
||||
|
|
|
@ -63,37 +63,38 @@
|
|||
<div class="title-1">
|
||||
<DetalsTitle title="使用能力" type="ABILITY"></DetalsTitle>
|
||||
</div>
|
||||
<template v-for="(item, i) in combineList" :key="i">
|
||||
<div class="flex-row-center combine-content" v-if="item.list.length>0">
|
||||
<div class="title">{{item.title}}</div>
|
||||
<div class="flex-row-center combine-content" v-for="(item, i) in combineList" :key="i">
|
||||
<div class="title"></div>
|
||||
<div>
|
||||
<el-table
|
||||
class="table"
|
||||
:data="item.list"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
:header-cell-style="{'text-align': 'center'}"
|
||||
@row-click="openResourceDetail">
|
||||
:header-cell-style="{'text-align': 'center'}">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="数据"
|
||||
align="center"
|
||||
width="100">
|
||||
width="200"
|
||||
show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="dept"
|
||||
label="能力来源"
|
||||
align="center"
|
||||
width="180">
|
||||
width="300"
|
||||
show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="platform"
|
||||
label="申请平台"
|
||||
align="center">
|
||||
align="center"
|
||||
width="100"
|
||||
show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- 构建步骤 -->
|
||||
|
@ -105,14 +106,11 @@
|
|||
<DetalsTitle title="构建步骤" type="STEP"></DetalsTitle>
|
||||
</div>
|
||||
<div class="flex-row-center step-content">
|
||||
<div style="height: 300px;">
|
||||
<el-steps direction="vertical" :active="step.length">
|
||||
<el-steps direction="vertical" :space="150" :active="step.length">
|
||||
<el-step v-for="(item, i) in step" :key="i" :title="item.question" :description="item.answer"></el-step>
|
||||
</el-steps>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<home-footer></home-footer>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -271,7 +269,7 @@
|
|||
}))
|
||||
}else if(item.title==='数据资源'){
|
||||
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)
|
||||
|
||||
function openResourceDetail(row, column, event){
|
||||
console.log(row)
|
||||
}
|
||||
|
||||
function handleOpenUrl(type) {
|
||||
let obj =
|
||||
(detailInfoObj.value.fuseAttrList || []).find(
|
||||
|
@ -467,17 +461,20 @@
|
|||
padding: 0.8rem 0;
|
||||
background: rgb(247, 248, 250);
|
||||
.bg {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
background: url('~@/assets/home/rhfw_square.png') no-repeat;
|
||||
background-size: 100%;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
.content {
|
||||
height: 2rem;
|
||||
overflow: auto;
|
||||
height: 3rem;
|
||||
width: 6rem;
|
||||
margin-top: 0.3rem;
|
||||
.content-item {
|
||||
margin: 0.1rem;
|
||||
font-size: 16px;
|
||||
margin: 0rem 0rem 0.1rem 0.1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -486,9 +483,9 @@
|
|||
padding: 0.8rem 0;
|
||||
background: rgb(247, 248, 250);
|
||||
.content {
|
||||
height: 2rem;
|
||||
width: 8rem;
|
||||
width: 9rem;
|
||||
.content-item {
|
||||
font-size: 16px;
|
||||
margin: 0.3rem;
|
||||
}
|
||||
}
|
||||
|
@ -499,6 +496,12 @@
|
|||
background: rgb(247, 248, 250);
|
||||
.step-content {
|
||||
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;
|
||||
align-items: flex-start;
|
||||
.title {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
margin-right: 0.5rem;
|
||||
background: url('~@/assets/home/rhfw_square.png') no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
font-size: 16px
|
||||
}
|
||||
}
|
||||
|
||||
.name-box {
|
||||
|
|
|
@ -23,13 +23,14 @@
|
|||
<div class="desc">描述:{{ detailInfoObj.description || '--' }}</div>
|
||||
</div>
|
||||
<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>
|
||||
<form-outlined />
|
||||
</template>
|
||||
申请使用
|
||||
</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>
|
||||
<form-outlined />
|
||||
</template>
|
||||
|
@ -67,6 +68,7 @@ import packageAbilityList from '@/views/home/components/packageAbilityList.vue'
|
|||
import { message } from 'ant-design-vue'
|
||||
import { getIntegrationDetail } from '@/api/home'
|
||||
import HomeHeader from '@/views/home/components/header'
|
||||
import { scInsert, scDel } from '@/api/personalCenter'
|
||||
|
||||
const router = useRouter()
|
||||
const id = router.currentRoute.value.query.id
|
||||
|
@ -102,6 +104,8 @@ const getIntegrationServicesDeatil = (id) => {
|
|||
return message.error(res.data.msg)
|
||||
}
|
||||
detailInfoObj.value = res.data.data || {}
|
||||
console.log('detailInfoObj------------>', detailInfoObj);
|
||||
|
||||
let fuseResourceList = detailInfoObj.value.fuseResourceList || []
|
||||
abilityList.value.map(v => {
|
||||
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)
|
||||
|
||||
|
||||
|
@ -239,4 +341,5 @@ getIntegrationServicesDeatil(id)
|
|||
.list-box {
|
||||
padding: 0.4rem;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue