Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-07-18 14:18:04 +08:00
commit dff001a8c4
54 changed files with 3685 additions and 2652 deletions

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-11 10:11:40
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-11 18:56:36
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 18:41:00
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>
@ -44,7 +44,7 @@
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://10.16.5.35:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
// WebSocket地址

View File

@ -1,15 +1,15 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-11 16:30:04
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-06 13:14:02
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-16 15:07:44
* @Description: 告诉大家这是什么
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<!-- 流程图 -->
<h4>{{ $t('process.flowImage') }}</h4>
<img :src="getResourceURL()" class="image">
<!-- <h4>{{ $t('process.flowImage') }}</h4>
<img :src="getResourceURL()" class="image"> -->
<!-- 流转详情 -->
<h4>{{ $t('process.circulation') }}</h4>
<div class="mod-sys__dict">

View File

@ -109,6 +109,11 @@ export default {
}
console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL)
if (this.dataList[0].type === '组件服务') {
this.dataList.map(val => {
val.infoList = val.infoList.filter(item => item.attrType === '部署位置' || item.attrType === '组件类型' || item.attrType === '应用领域')
})
}
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data)
}

View File

@ -69,6 +69,14 @@
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="shareCondition"
label="共享条件"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="300"
@ -273,6 +281,7 @@ export default {
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list
: res.data
console.log('this.dataList', this.dataList)
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0

View File

@ -72,16 +72,17 @@ export default {
})
},
getInfo (id) {
this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
this.$http.get('/demandComment/' + id).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = res.data.resourceDTO
if (this.dataForm.type != '应用资源') {
this.shifoushizujian = false
} else {
this.shifoushizujian = true
}
this.dataForm = res.data
// this.dataForm = res.data.resourceDTO
// if (this.dataForm.type != '') {
// this.shifoushizujian = false
// } else {
// this.shifoushizujian = true
// }
console.log('this.dataForm', this.dataForm)
})
}

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-27 19:34:30
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-23 21:08:01
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-16 11:40:26
* @Description: 告诉大家这是什么
-->
<template>
@ -40,6 +40,17 @@
align="center"
width="50"
></el-table-column>
<!-- <el-table-column label="申请标题" header-align="center" align="center">
<template slot-scope="scope">
<span>{{
(scope.row.params && scope.row.params.tAbilityApplicationDTOList && scope.row.params.tAbilityApplicationDTOList[0].title) ||
(scope.row.params && scope.row.params.comment) ||
(scope.row.params && scope.row.params.userName) ||
(scope.row.params && scope.row.params.undercarriageUserName)||
(scope.row.params && scope.row.params.name)
}}</span>
</template>
</el-table-column> -->
<el-table-column label="申请人" header-align="center" align="center">
<template slot-scope="scope">
<span>{{

View File

@ -1,22 +0,0 @@
<template>
<div class="wrapper"></div>
</template>
<script>
export default {
components: {},
props: {},
data () {
return {}
},
watch: {},
computed: {},
methods: {},
created () {},
mounted () {}
}
</script>
<style lang="scss" scoped>
.wrapper {
}
</style>

View File

@ -168,20 +168,6 @@ export default {
this.dataView = val.filter(
(item) => item.name === this.dataForm.type + '一'
)[0]
console.log(this.dataView)
console.log(this.dataForm)
//
// this.dataView.children[0].children[0].children[4].note1 =
// this.dataForm.description
//
// this.dataView.children[0].children[0].children[0].note1 =
// this.dataForm.name
//
this.dataView.children[2].children[1].children[0].note1 =
this.dataForm.shareCondition
//
this.dataView.children[2].children[1].children[1].note1 =
this.dataForm.shareType
this.dataForm.infoList.map((item, index) => {
this.dataView.children.map((itemView, indexView) => {
// console.log('itemView', itemView)
@ -236,6 +222,7 @@ export default {
})
})
})
if (item.attrType === '功能介绍') {
this.dataForm.infoList[index].attrValue = JSON.parse(
item.attrValue
@ -318,7 +305,11 @@ export default {
})
})
})
if (item.attrType === '算法优势' || item.attrType === '应用场景') {
if (
item.attrType === '算法优势' ||
item.attrType === '应用场景' ||
item.attrType === '功能介绍'
) {
this.dataForm.infoList[index].attrValue = JSON.parse(
item.attrValue
)

View File

@ -7,9 +7,6 @@
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'"
>
<div v-if="shifoushizujian">
<Applicationresources></Applicationresources>
</div>
<div v-if="flagShow">
<ResourcesAndServices
:dataForm="dataForm"
@ -39,21 +36,31 @@
<div class="agreeOr">
<h3>审批</h3>
<div>
<el-radio-group v-model="agreeOrList" style="width:230px;">
<el-radio-group v-model="agreeOrList" style="width: 230px">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button>
</el-radio-group>
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input>
<el-button class="inputBule" @click="agreeOrNot">提交</el-button>
<el-input
v-if="agreeOrList === '同意'"
v-model="inputAgree"
placeholder="请输入同意意见"
></el-input>
<el-input
v-if="agreeOrList === '退回'"
v-model="inputNo"
placeholder="请输入退回意见"
></el-input>
<el-button
class="inputBule"
@click.native="agreeOrNot($store.state.contentTabsActiveName)"
>提交</el-button
>
</div>
</div>
</div>
</template>
<script>
import processModule from '@/mixins/process-module'
import Applicationresources from './Application-resources.vue'
import ResourcesAndServices from './ResourcesAndServices.vue'
import debounce from 'lodash/debounce'
import qs from 'qs'
@ -62,7 +69,6 @@ export default {
//
// mixins: [processModule],
components: {
Applicationresources,
ResourcesAndServices
},
props: {
@ -146,64 +152,100 @@ export default {
// }
})
},
agreeOrNot: debounce(function () {
if (this.agreeOrList === '同意') {
console.log('this.dataForm.taskId', this.taskId)
const params = qs.stringify({
taskId: this.taskId,
comment: this.inputAgree
})
console.log(params)
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
agreeOrNot: debounce(
function (data) {
console.log(data)
if (this.agreeOrList === '同意') {
console.log('this.dataForm.taskId', this.taskId)
const params = qs.stringify({
taskId: this.taskId,
comment: this.inputAgree
})
}).catch(() => {})
} else if (this.agreeOrList === '退回') {
console.log('this.dataForm.taskId', this.taskId)
const params = qs.stringify({
taskId: this.taskId,
comment: this.inputNo
})
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
console.log(params)
this.$http
.post('/act/task/complete?' + params)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
.catch(() => {})
} else if (this.agreeOrList === '退回') {
console.log('this.dataForm.taskId', this.taskId)
const params = qs.stringify({
taskId: this.taskId,
comment: this.inputNo
})
this.$http
.post('/act/task/backToFirst?', params)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
}
this.tabRemoveHandle(data)
},
1000,
{ leading: true, trailing: false }
),
tabRemoveHandle (tabName) {
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
if (tabName === 'home') {
return false
}
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name !== tabName
)
if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName =
this.$store.state.contentTabsActiveName = 'home'
return false
}
// tab
if (tabName === this.$store.state.contentTabsActiveName) {
const tab =
this.$store.state.contentTabs[
this.$store.state.contentTabs.length - 1
]
this.$router.push({
name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name,
params: { ...tab.params },
query: { ...tab.query }
})
}
}, 1000, { leading: true, trailing: false })
}
}
}
</script>
<style scoped lang="scss">

View File

@ -19,7 +19,7 @@ js:
<a-input v-if="type == 'input'" v-model:value="data.note1" :placeholder="'请输入' + name" />
<!-- 下拉框 -->
<el-select
v-else-if="(type === 'select' && name !== '归属部门') || type == 'radio'"
v-else-if="(type === 'select' && name !== '归属部门' && name !== '使用方式') || type == 'radio'"
style="width: 240px"
v-model:value="data.note1"
:placeholder="'请选择' + name">
@ -45,6 +45,20 @@ js:
{{ itemSelect.name }}
</el-option>
</el-select>
<el-select
v-else-if="(type === 'select' && name === '使用方式')"
style="width: 240px"
v-model:value="data.note1"
:placeholder="'请选择' + name"
@change="showTypeClick"
>
<el-option
:value="itemSelect.dictLabel"
v-for="(itemSelect, indexSelect) in options"
:key="indexSelect">
{{ itemSelect.dictLabel }}
</el-option>
</el-select>
<!-- 多选 -->
<div
v-else-if="type === 'checkBox'"
@ -89,7 +103,8 @@ export default {
valueCheckBox: [],
//
regionSelect: '',
showKey: 0
showKey: 0,
showType: ''
}
},
methods: {
@ -157,6 +172,11 @@ export default {
}
})
this.data.note1 = str
},
showTypeClick (e) {
this.showType = e
console.log(e)
this.$emit('show-type', this.showType)
}
},
created () {
@ -172,6 +192,7 @@ export default {
},
mounted () {
this.selectOptions()
this.showTypeClick('调用接口')
}
}
</script>

View File

@ -11,7 +11,16 @@
<div v-for='child in parent.children' :key='child.id'>
<template v-if='judgmentType.filter(item => item.name==child.name).length === 0'>
<div class="top">{{child.name}}</div>
<div v-for="item in child.children" :key="item.id" class='item' v-show="item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档'">
<div v-for="item in child.children" :key="item.id" class='item' v-show="(item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档') && !(
(showTypeName == '调用接口' && item.name == '平台地址') ||
(showTypeName == '调用接口' && item.name == 'SDK安装包') ||
(showTypeName == '平台对接' && item.name == 'SDK安装包') ||
(showTypeName == '平台对接' && item.name == '接口请求方式') ||
(showTypeName == '平台对接' && item.name == '服务接口') ||
(showTypeName == 'SDK' && item.name == '平台地址') ||
(showTypeName == 'SDK' && item.name == '接口请求方式') ||
(showTypeName == 'SDK' && item.name == '服务接口')
)">
<span >{{ item.name }}</span>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
tip="支持图片类型大小不超过100M"></upload> -->
@ -23,10 +32,12 @@
tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.mp4' :list="item" v-else-if="item.type == 'video'" type="视频" btnName="上传视频" :maxCount="1" :dataList="item"
tip="支持视频类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.zip' :list="item" v-else-if="item.type == 'package'" type="安装包" btnName="上传安装包" :maxCount="1" :dataList="item"
tip="支持.zip类型大小不超过100M"></upload>
<input-select-checkbox :list="[]" v-else-if="item.type == 'AbilityType'" type="disabled" :data="item" :name="item.name" :value="typeInput"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'ComponentType'" type="disabled" :data="item" :name="item.name" :value="type"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'input'" type="input" :data="item" :name="item.name"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'select'" type="select" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'select'" type="select" :data="item" :name="item.name" :options="item.options" @show-type="showType"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'checkBox'" type="checkBox" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'radio'" type="radio" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'textArea'" type="textArea" :data="item" :name="item.name"></input-select-checkbox>
@ -163,15 +174,39 @@ export default {
}
]
}
]
],
showTypeName: ''
}
},
mounted () {
this.defaultContent()
},
methods: {
changeInfoList (obj) {
this.$emit('changeInfoList', obj)
},
goToRichText () {
},
// --
defaultContent () {
this.putOnTheShelfList.forEach((item) => {
if (item.name === '部署与使用') {
item.children.forEach((itemChild) => {
if (itemChild.name === '使用方式') {
itemChild.children.forEach((itemChilds) => {
if (itemChilds.name === '使用方式') {
itemChilds.note1 = '调用接口'
}
})
}
})
}
})
},
showType (data) {
this.showTypeName = data
console.log(data, this.showTypeName, '传过来的showType')
}
}
}

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 10:58:46
* @LastEditTime: 2022-07-16 16:01:48
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>
@ -46,7 +46,7 @@
// 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://15.2.21.238:9797';
window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
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.238:8888/renren-admin';

View File

@ -2,12 +2,12 @@
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-14 10:01:08
* @LastEditTime: 2022-07-18 11:34:38
* @Description: 数据资源参数配置
*/
const newLocation = 'qingdao'
//const newLocation = 'qingdao'
// const newLocation = 'baotou'
// const newLocation = 'xihaian'
const newLocation = 'xihaian'
//
const whoShow = {}

View File

@ -23,11 +23,15 @@ export async function socialLogin(data) {
})
}
export function getUserInfo() {
export function getUserInfo(redict) {
//mock.js使dataaccessToken使mockheaders
// debugger
return request({
url: '/sys/user/info',
method: 'get',
headers: {
REQUESTURI:redict
}
})
}
export function getDeptAll() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -23,24 +23,10 @@ let loadingInstance
* @param {*} msg
*/
const handleCode = (code, msg, res) => {
debugger
// debugger
switch (code) {
case 401:
// message.error(msg || '')
store.dispatch('user/resetAll').catch(() => {})
debugger
// if (res.token) {
// console.log('token', res.token)
// setAccessToken(res.token)
// const token = getAccessToken()
// console.log('token', token)
// }
// // location.reload()
// if (redirect) {
// window.location.href = res.redirect
// }
break
case 403:
router.push({ path: '/401' }).catch(() => {})
@ -72,10 +58,9 @@ const instance = axios.create({
*/
instance.interceptors.request.use(
(config) => {
debugger
// debugger
const token = getAccessToken()
if (token)
config.headers[tokenName] = token
if (token) config.headers[tokenName] = token
if (
config.data &&
config.headers['Content-Type'] ===
@ -85,7 +70,10 @@ instance.interceptors.request.use(
if (debounce.some((item) => config.url.includes(item))) {
//
}
config.headers.REQUESTURI = window.location.href
if (!config.headers.REQUESTURI){
config.headers.REQUESTURI = window.location.href
}
return config
},
(error) => {
@ -104,17 +92,13 @@ instance.interceptors.response.use(
console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data
debugger
if (code=='0' && response.headers.token) {
if (response.headers.token) {
setAccessToken(response.headers.token)
} else {
const token = getAccessToken()
if (response.headers.redirect && !token) {
// window.location.href = response.headers.redirect
window.location.replace(response.headers.redirect)
}
if (response.headers.redirect) {
window.location.replace(response.headers.redirect)
return
// location.reload()
}
}
if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
@ -159,7 +143,7 @@ instance.interceptors.response.use(
// }
},
(error) => {
debugger
// debugger
console.log('接口error', error)
if (loadingInstance) loadingInstance.close()
@ -168,12 +152,12 @@ instance.interceptors.response.use(
console.log('接口返回', response)
console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect)
// if (response.headers.token) {
// setAccessToken(response.headers.token)
// }
if (response.headers.token) {
setAccessToken(response.headers.token)
}
if (response.headers.redirect) {
window.location.replace(response.headers.redirect)
// return Promise.resolve()
return Promise.resolve()
}
const { status, data } = response

View File

@ -2,65 +2,59 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-11 16:39:36
* @LastEditTime: 2022-07-18 11:25:28
* @Description: 告诉大家这是什么
*/
/**
* @author chuzhixin 1204505056@qq.com
* @description 路由守卫目前两种模式all模式与intelligence模式
*/
import router from '@/router'
import store from '@/store'
import getPageTitle from '@/utils/pageTitle'
import { getUserInfo } from '@/api/user'
import {
// authentication,
loginInterception,
// recordRoute,
routesWhiteList,
} from '@/config'
import { setAccessToken, getAccessToken } from '@/utils/accessToken'
router.beforeEach(async (to, from, next) => {
// debugger
// const SSOTOKEN = to.query.SSOToken
// if (SSOTOKEN) {
// setAccessToken(SSOTOKEN)
// }
const token = getAccessToken()
console.log('token', token)
let hasToken = token || store.getters['user/accessToken']
// debugger
if (!loginInterception) hasToken = true
console.log('hasToken存在巨大问题', hasToken)
if (hasToken) {
import router from '@/router'
import store from '@/store'
import getPageTitle from '@/utils/pageTitle'
import { getUserInfo } from '@/api/user'
import {
// authentication,
loginInterception,
// recordRoute,
routesWhiteList,
} from '@/config'
import { setAccessToken, getAccessToken } from '@/utils/accessToken'
router.beforeEach(async (to, from, next) => {
// debugger
// const SSOTOKEN = to.query.SSOToken
// if (SSOTOKEN) {
// setAccessToken(SSOTOKEN)
// }
const token = getAccessToken()
console.log('token', token)
let hasToken = token
// debugger
if (!loginInterception) hasToken = true
console.log('hasToken存在巨大问题', hasToken)
if (hasToken) {
// setAccessToken(hasToken)
await store.dispatch('user/getUserInfo')
debugger
next()
} else {
let accessRoutes = []
accessRoutes = await store.dispatch('routes/setRoutes')
accessRoutes.forEach((item) => {
router.addRoute(item)
})
if (routesWhiteList.indexOf(to.path) !== -1) {
next()
} else {
await store.dispatch('user/getUserInfo')
// debugger
next()
} else {
let accessRoutes = []
accessRoutes = await store.dispatch('routes/setRoutes')
accessRoutes.forEach((item) => {
router.addRoute(item)
})
if (routesWhiteList.indexOf(to.path) !== -1) {
next()
} else {
//
getUserInfo().then(res=>{
console.log(res)
router.replace('/home')
})
// await store.dispatch('user/getUserInfo')
// next()
// if (recordRoute)
// next({ path: '/login', query: { redirect: to.path }, replace: true })
// else next({ path: '/login', replace: true })
// next()
// window.open('http://www.baidu.com', '_self')
}
}
})
router.afterEach((to) => {
document.title = getPageTitle(to.meta.title)
})
if (to.query.redict) getUserInfo(to.query.redict)
else {
getUserInfo()
}
}
}
})
router.afterEach((to) => {
document.title = getPageTitle(to.meta.title)
})

View File

@ -110,9 +110,24 @@
:pagination="false"
>
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex !== 'name'">
<template
v-if="
column.dataIndex !== 'name' &&
(column.title === '组件服务' || column.title === '应用资源')
"
>
{{ text || 0 }}
</template>
<template
v-else-if="
column.dataIndex !== 'name' &&
(column.title === '知识库' ||
column.title === '基础设施' ||
column.title === '数据资源')
"
>
--
</template>
</template>
</a-table>
</div>

View File

@ -182,15 +182,15 @@
})
}
let photoBg = ref([
require('../../../assets/abilityStatistics/zhishiku-bg.png'),
require('../../../assets/abilityStatistics/yingyongziyuan-bg.png'),
require('../../../assets/abilityStatistics/zhishiku-bg.png'),
require('../../../assets/abilityStatistics/zujianfuwu-bg.png'),
require('../../../assets/abilityStatistics/shujuziyuan-bg.png'),
require('../../../assets/abilityStatistics/jichujianshe-bg.png'),
])
let photo = ref([
require('../../../assets/abilityStatistics/zhishiku.png'),
require('../../../assets/abilityStatistics/yingyongziyuan.png'),
require('../../../assets/abilityStatistics/zhishiku.png'),
require('../../../assets/abilityStatistics/zujianfuwu.png'),
require('../../../assets/abilityStatistics/shujuziyuan.png'),
require('../../../assets/abilityStatistics/jichujianshe.png'),
@ -202,19 +202,19 @@
// dataLists.value = res.data.data
res.data.data.map((item) => {
switch (item.type) {
case '知识库':
dataLists.value[0] = item
break
case '应用资源':
dataLists.value[1] = item
break
case '组件服务':
case '业务组件':
dataLists.value[0] = item
break
case '图层服务':
dataLists.value[2] = item
break
case '数据资源':
case '开发组件':
dataLists.value[3] = item
break
case '基础设施':
case '智能算法':
dataLists.value[4] = item
break
default:

View File

@ -13,7 +13,7 @@
<div class="assign-case-detail-page-header-son">
<div
class="assign-case-detail-page-header-son-left"
:style="`background:url(${dataFrom.note1})`"
:style="`background-image:url(${dataFrom.note1})`"
></div>
<div class="assign-case-detail-page-header-son-right">
<div class="assign-case-detail-page-header-son-right-title">

View File

@ -32,7 +32,7 @@
import { useRouter } from 'vue-router'
const router = useRouter()
const goHome = () => {
router.push('/home')
router.push({path: '/home', query:{redict: window.location.origin + '/#/home'}})
}
</script>
<style lang="less">

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 16:28:56
* @LastEditTime: 2022-07-16 14:27:31
* @Description: 算法上架
-->
<template>
@ -397,61 +397,107 @@
})
</script>
<style lang="less" scoped>
.box {
position: relative;
top: 64px;
margin: 15px 400px;
padding: 10px;
background: #fff;
.header {
font-size: 28px;
font-weight: 600;
}
.vue-box {
padding: 0 100px;
}
.top {
margin: 10px 20px 0;
padding: 15px 30px;
background: #edf4fc;
display: flex;
justify-content: space-between;
div {
font-size: 18px;
color: #999;
.box {
position: relative;
top: 64px;
margin: 15px 400px;
padding: 10px;
background: #fff;
.header {
font-size: 28px;
font-weight: 600;
}
.vue-box {
padding: 0 100px;
}
.top {
margin: 10px 20px 0;
padding: 15px 30px;
background: #edf4fc;
display: flex;
justify-content: center;
align-items: center;
.bg-box {
justify-content: space-between;
div {
font-size: 18px;
color: #999;
display: flex;
justify-content: center;
align-items: center;
width: 45px;
height: 45px;
border-radius: 50%;
border: 1px solid rgb(214, 214, 214);
margin-right: 10px;
transition: all 0.3s ease;
span {
.bg-box {
display: flex;
justify-content: center;
align-items: center;
width: 30px;
height: 30px;
width: 45px;
height: 45px;
border-radius: 50%;
border: 1px solid #999;
border: 1px solid rgb(214, 214, 214);
margin-right: 10px;
transition: all 0.3s ease;
span {
display: flex;
justify-content: center;
align-items: center;
width: 30px;
height: 30px;
border-radius: 50%;
border: 1px solid #999;
}
}
.line {
margin-left: 10px;
width: 130px;
height: 1px;
background: #999;
}
}
.line {
margin-left: 10px;
width: 130px;
height: 1px;
background: #999;
.finish {
color: #0087ff;
.bg-box {
background: #9ccefa;
color: #fff;
border: 1px solid #9ccefa;
span {
background: #0087ff;
border: 1px solid #0087ff;
}
}
.line {
background: #0087ff;
}
}
.btn {
display: flex;
justify-content: space-around;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
height: 35px;
text-align: center;
color: #fff;
border: 1px solid #9ccefa;
span {
background: #0087ff;
border: 1px solid #0087ff;
}
}
.line {
background: #0087ff;
}
button:nth-of-type(1) {
color: #0087ff;
background: #e1edfa;
}
button:nth-of-type(2) {
background: #01c5dc;
}
}
.first {
justify-content: space-around;
}
}
.btn {
display: flex;
justify-content: space-around;
justify-content: space-between;
padding: 10px 350px 0;
button {
cursor: pointer;
@ -459,13 +505,8 @@
height: 35px;
text-align: center;
color: #fff;
border: 1px solid #9ccefa;
span {
background: #0087ff;
border: 1px solid #0087ff;
}
}
.line {
border: none;
border-radius: 6px;
background: #0087ff;
}
button:nth-of-type(1) {
@ -480,30 +521,4 @@
justify-content: space-around;
}
}
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
button {
cursor: pointer;
width: 80px;
height: 35px;
text-align: center;
color: #fff;
border: none;
border-radius: 6px;
background: #0087ff;
}
button:nth-of-type(1) {
color: #0087ff;
background: #e1edfa;
}
button:nth-of-type(2) {
background: #01c5dc;
}
}
.first {
justify-content: center;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 09:44:49
* @LastEditTime: 2022-07-15 17:39:25
* @Description: 应用上架
-->
<template>
@ -75,6 +75,7 @@
></application-deployment-use> -->
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与应用'" @click="preview()">
预览
@ -347,6 +348,10 @@
}
// console.log('dataFrom.value', dataFrom.value)
})
const close = () => {
window.close()
}
onBeforeUnmount(() => {
mybus.off('chageDataFrom')
mybus.off('chageFileList')
@ -426,7 +431,7 @@
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -446,7 +451,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:51
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 09:44:58
* @LastEditTime: 2022-07-15 17:39:35
* @Description: 业务组件
-->
<template>
@ -59,6 +59,7 @@
></put-on-the-shelf>
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与使用'" @click="preview()">
预览
@ -195,6 +196,10 @@
type: '组件服务',
deptId: '',
})
const close = () => {
window.close()
}
getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId
})
@ -439,7 +444,7 @@
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -459,7 +464,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 09:45:07
* @LastEditTime: 2022-07-15 17:39:42
* @Description: 开发组件
-->
<template>
@ -27,6 +27,7 @@
:refData="refData"
:dataFrom="dataFrom"
:videoList="videoList"
:imgList="imgList"
:externalField="[
'组件名称',
'组件描述',
@ -54,11 +55,11 @@
:dataFrom="dataFrom"
:fileList="fileList"
:fileList2="fileList2"
:imgList="imgList"
:configure="bs"
></put-on-the-shelf>
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与使用'" @click="preview()">
预览
@ -195,6 +196,10 @@
type: '组件服务',
deptId: '',
})
const close = () => {
window.close()
}
getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId
})
@ -439,7 +444,7 @@
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -459,7 +464,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 09:45:18
* @LastEditTime: 2022-07-15 17:39:47
* @Description: 图层服务
-->
<template>
@ -57,6 +57,7 @@
></put-on-the-shelf>
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与使用'" @click="preview()">
预览
@ -157,6 +158,10 @@
}
})
}
const close = () => {
window.close()
}
const next = () => {
let i = -1
navList.value.forEach((val, index) => {
@ -387,7 +392,7 @@
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -407,7 +412,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 16:56:49
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-18 11:23:39
* @Description: 上架
-->
<template>
@ -111,7 +111,9 @@
></upload>
</div>
<div class="submit">
<a-button type="primary" @click="add(title.name)">添加</a-button>
<a-button type="primary" @click="add(title.name)">
添加更多
</a-button>
</div>
</div>
</template>
@ -252,7 +254,7 @@
</a-select-option>
</a-select>
<a-select
v-else-if="item.type == 'select'"
v-else-if="item.type == 'select' && item.name !== '归属部门'"
style="width: 240px"
v-model:value="item.note1"
:placeholder="'请选择' + item.name"
@ -598,56 +600,106 @@
const mockData = ref([])
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
const titleName = ref('关联应用')
const targetKeys = ref([])
//
const targetKeysBack = ref([])
const sourceClick = () => {
mockData.value = []
visibleAssociatedApplication.value = true
queryApplicationRelByResourceId({
referenceId: 0,
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
// console.log(val, index)
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
props.dataFrom.infoList.forEach((val) => {
if (val.attrType === '来源应用' && val.attrValue != '') {
queryApplicationRelByResourceId({
referenceId: 0,
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
})
targetKeys.value = []
val.attrValue.split(',').forEach((item) => {
targetKeys.value.push(item)
})
console.log(targetKeys.value)
// console.log('wowowo')
} else if (val.attrType === '来源应用' && val.attrValue == '') {
queryApplicationRelByResourceId({
referenceId: 0,
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
}
})
}
//
const componentsClick = () => {
titles.value = ['未关联的组件名称', '已关联的组件名称']
titleName.value = '关联组件'
mockData.value = []
visibleAssociatedApplication.value = true
queryResourceRelByKeyId({
keyId: 0,
type: '组件服务',
referenceName: '',
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
// console.log(val, index)
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
props.dataFrom.infoList.forEach((val) => {
if (val.attrType === '关联组件信息' && val.attrValue != '') {
queryResourceRelByKeyId({
keyId: 0,
type: '组件服务',
referenceName: '',
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
})
targetKeys.value = []
val.attrValue.split(',').forEach((item) => {
targetKeys.value.push(item)
})
console.log(targetKeys.value)
// console.log('wowowo')
} else if (val.attrType === '关联组件信息' && val.attrValue == '') {
queryResourceRelByKeyId({
keyId: 0,
type: '组件服务',
referenceName: '',
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
}
})
}
const targetKeys = ref([])
const selectedKeys = ref([])
const handleChange = (nextTargetKeys, direction, moveKeys) => {
console.log('targetKeys: ', nextTargetKeys)
console.log('direction: ', direction)
console.log('moveKeys: ', moveKeys)
targetKeys.value = moveKeys.filter((item, index) => index === 0)
}
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
console.log('targetSelectedKeys: ', targetSelectedKeys)
console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
}
const handleOk = (e) => {
@ -723,253 +775,259 @@
</script>
<style></style>
<style lang="less" scoped>
.put-on-the-shelf {
height: 680px;
overflow: scroll;
display: flex;
flex-direction: column;
align-items: center;
padding: 50px 100px 25px;
.Technical-text {
height: 30px;
width: 100px;
border: 1px solid #bbd3ef;
border-radius: 6px;
background: #edf4fc;
color: #0087ff;
font-size: 14px;
text-align: center;
line-height: 30px;
}
.Technical-text:hover {
cursor: pointer;
}
& > div {
width: 100%;
margin-top: 60px;
.top {
color: #333333;
font-size: 22px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 25px;
div:first-child,
div:last-child {
width: 245px;
height: 1px;
background: #f0f0f0;
}
div:nth-child(2) {
margin: 0 30px;
}
.put-on-the-shelf {
height: 680px;
overflow: scroll;
display: flex;
flex-direction: column;
align-items: center;
padding: 50px 100px 25px;
.Technical-text {
height: 30px;
width: 100px;
border: 1px solid #bbd3ef;
border-radius: 6px;
background: #edf4fc;
color: #0087ff;
font-size: 14px;
text-align: center;
line-height: 30px;
}
.Technical-text:hover {
cursor: pointer;
}
.bottom {
margin-top: 25px;
& > div {
width: 100%;
margin-top: 60px;
.items {
background: #fafafa;
padding: 10px;
.top {
color: #333333;
font-size: 22px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 25px;
p {
div:first-child,
div:last-child {
width: 245px;
height: 1px;
background: #f0f0f0;
}
div:nth-child(2) {
margin: 0 30px;
}
}
.bottom {
margin-top: 25px;
.items {
background: #fafafa;
padding: 10px;
p {
display: flex;
justify-content: space-between;
span:nth-of-type(1) {
width: 200px;
}
span:nth-of-type(2) {
width: 100%;
font-weight: 600;
}
}
p:nth-of-type(1) > span:nth-of-type(1) {
font-size: 18px;
font-weight: 600;
}
.del {
display: flex;
justify-content: flex-end;
align-items: center;
.delImg {
cursor: pointer;
display: inline-block;
width: 16px;
height: 18px;
background: url(~@/assets/home/sf_del.png) no-repeat;
margin-right: 5px;
}
div {
cursor: pointer;
}
}
}
.add {
margin-top: 10px;
font-size: 16px;
color: #007efb;
}
.form {
margin-top: 20px;
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
span:nth-of-type(1) {
span:first-child {
width: 120px;
}
:deep(.ant-input-textarea) {
width: 520px;
}
:deep(.ant-radio-group) {
width: 520px;
}
:deep(.ant-input-number) {
width: 200px;
}
span:nth-of-type(2) {
width: 100%;
font-weight: 600;
:deep(.ant-input) {
resize: none;
width: 520px;
}
.ant-btn {
width: 160px;
height: 32px;
text-align: center;
background: #edf4fc;
color: #0087ff;
border: 1px solid #bbd3ef;
border-radius: 6px;
}
}
p:nth-of-type(1) > span:nth-of-type(1) {
font-size: 18px;
font-weight: 600;
}
.del {
.submit {
margin-top: 40px;
display: flex;
justify-content: flex-end;
align-items: center;
.delImg {
cursor: pointer;
display: inline-block;
width: 16px;
height: 18px;
background: url(~@/assets/home/sf_del.png) no-repeat;
margin-right: 5px;
.ant-btn {
width: 80px;
height: 28px;
text-align: center;
background: #d9ebff;
color: #0087ff;
border: 1px solid #0087ff;
border-radius: 6px;
}
div {
cursor: pointer;
}
}
}
.add {
margin-top: 10px;
font-size: 16px;
color: #007efb;
}
.form {
margin-top: 20px;
display: flex;
justify-content: flex-start;
align-items: center;
span:first-child {
width: 120px;
}
:deep(.ant-input-textarea) {
width: 520px;
}
:deep(.ant-radio-group) {
width: 520px;
}
:deep(.ant-input-number) {
width: 200px;
}
:deep(.ant-input) {
resize: none;
width: 520px;
}
.ant-btn {
width: 160px;
height: 32px;
text-align: center;
background: #edf4fc;
color: #0087ff;
border: 1px solid #bbd3ef;
border-radius: 6px;
}
}
.submit {
margin-top: 40px;
display: flex;
justify-content: flex-end;
.ant-btn {
width: 80px;
height: 28px;
text-align: center;
background: #d9ebff;
color: #0087ff;
border: 1px solid #0087ff;
border-radius: 6px;
}
}
}
& > div:nth-of-type(1) {
margin-top: 0;
}
}
& > div:nth-of-type(1) {
margin-top: 0;
.application-Area {
width: 520px;
display: grid;
margin-top: -5px;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
.application-Area-son {
cursor: pointer;
font-size: 14px;
width: 90px;
height: 26px;
border-radius: 13px;
color: #333333;
background: #f5f5f5;
border: 1px #cccccc solid;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
font-weight: 500;
}
.application-Area-down {
background: #0087ff;
color: #fff;
}
}
}
.application-Area {
width: 520px;
display: grid;
margin-top: -5px;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
.application-Area-son {
cursor: pointer;
font-size: 14px;
width: 90px;
height: 26px;
border-radius: 13px;
color: #333333;
background: #f5f5f5;
border: 1px #cccccc solid;
:deep(.ant-modal) {
width: 960px;
}
:deep(.ant-transfer-list) {
width: 39.5%;
height: 520px;
}
:deep(.ant-transfer-operation) {
flex-direction: row-reverse;
margin: 0 30px;
}
:deep(.ant-btn) {
width: 56px;
height: 40px;
border-radius: 4px;
}
:deep(.ant-btn:first-child) {
margin-left: 4px;
}
:deep(.ant-modal-footer) {
border: 0;
}
:deep(.ant-modal-header) {
border: 0;
}
:deep(.ant-modal-title) {
line-height: 24px;
font-size: 18px;
color: #303133;
}
:deep(.ant-transfer-list-header) {
background: #f5f7fa;
}
:deep(.ant-transfer-list-header-selected) {
display: flex;
justify-content: center;
width: 90%;
flex-direction: row-reverse;
justify-content: space-between;
align-items: center;
margin-top: 10px;
font-weight: 500;
}
.application-Area-down {
background: #0087ff;
color: #fff;
:deep(.ant-transfer-list-header-title) {
font-size: 16px;
color: #303133;
font-weight: 400;
text-align: left;
}
:deep(.ant-transfer-list-header .ant-checkbox-wrapper) {
display: none !important;
}
:deep(.ant-upload-list-item-name) {
width: 100px;
}
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
:deep(.ant-modal) {
width: 960px;
}
:deep(.ant-transfer-list) {
width: 39.5%;
height: 520px;
}
:deep(.ant-transfer-operation) {
flex-direction: row-reverse;
margin: 0 30px;
}
:deep(.ant-btn) {
width: 56px;
height: 40px;
border-radius: 4px;
}
:deep(.ant-btn:first-child) {
margin-left: 4px;
}
:deep(.ant-modal-footer) {
border: 0;
}
:deep(.ant-modal-header) {
border: 0;
}
:deep(.ant-modal-title) {
line-height: 24px;
font-size: 18px;
color: #303133;
}
:deep(.ant-transfer-list-header) {
background: #f5f7fa;
}
:deep(.ant-transfer-list-header-selected) {
display: flex;
width: 90%;
flex-direction: row-reverse;
justify-content: space-between;
align-items: center;
}
:deep(.ant-transfer-list-header-title) {
font-size: 16px;
color: #303133;
font-weight: 400;
text-align: left;
}
</style>

View File

@ -17,7 +17,7 @@
</a-layout-sider>
</div>
<div class="right">
<div class="title">数据需求</div>
<!-- <div class="title">数据需求</div> -->
<a-list
class="demo-loadmore-list"
:loading="initLoading"
@ -87,6 +87,7 @@
const pageSize = ref(8)
const total = ref()
const showKey = ref(0)
const whoShow1 = ref(whoShow)
const menuList = [
{
key: '1',

View File

@ -10,159 +10,195 @@
<!-- 头部基本信息 -->
<algorithm-top-details :dataList="dataList.data"></algorithm-top-details>
<!-- 导航 -->
<algorithm-navigation :dataList="dataList.data" :class="{ fixed: scrollTop >= 600 }" :selectNow="selectNow">
</algorithm-navigation>
<algorithm-navigation
:dataList="dataList.data"
:class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow"
></algorithm-navigation>
<!-- 关联能力 -->
<algorithm-associated-ability v-if="!loading" :associatedComponents="associatedComponents"
id="algorithm-associated-ability" class="scrollBox"></algorithm-associated-ability>
<algorithm-associated-ability
v-if="!loading"
:associatedComponents="associatedComponents"
id="algorithm-associated-ability"
class="scrollBox"
></algorithm-associated-ability>
<!-- 算法展示 视频 -->
<algorithm-display :dataList="dataList.data" id="algorithm-display" class="scrollBox"></algorithm-display>
<algorithm-display
:dataList="dataList.data"
id="algorithm-display"
class="scrollBox"
></algorithm-display>
<!-- 算法优势 -->
<algorithm-advantage :dataList="dataList.data" id="algorithm-advantage" class="scrollBox"></algorithm-advantage>
<algorithm-advantage
:dataList="dataList.data"
id="algorithm-advantage"
class="scrollBox"
></algorithm-advantage>
<!-- 应用场景和应用案例 -->
<!-- <application-scenarios-and-case
id="application-scenarios-and-case"
class="scrollBox"
></application-scenarios-and-case> -->
<algorithm-application-scenarios :dataList="dataList.data" id="application-scenarios" class="scrollBox">
</algorithm-application-scenarios>
<algorithm-application-case :dataList="dataList.data" id="application-case" class="scrollBox">
</algorithm-application-case>
<algorithm-application-scenarios
:dataList="dataList.data"
id="application-scenarios"
class="scrollBox"
></algorithm-application-scenarios>
<algorithm-application-case
:dataList="dataList.data"
id="application-case"
class="scrollBox"
></algorithm-application-case>
<!-- 算法试用 -->
<algorithm-on-trial :dataList="dataList.data" id="algorithm-on-trial" class="scrollBox"></algorithm-on-trial>
<algorithm-on-trial
:dataList="dataList.data"
id="algorithm-on-trial"
class="scrollBox"
></algorithm-on-trial>
<!-- 计费标准 -->
<algorithm-charging-standard :dataList="dataList.data" id="charging-standard" class="scrollBox">
</algorithm-charging-standard>
<algorithm-charging-standard
:dataList="dataList.data"
id="charging-standard"
class="scrollBox"
></algorithm-charging-standard>
<!-- 使用方式 -->
<algorithm-usage-mode :dataList="dataList.data" id="usage-mode" class="scrollBox"></algorithm-usage-mode>
<algorithm-usage-mode
:dataList="dataList.data"
id="usage-mode"
class="scrollBox"
></algorithm-usage-mode>
<!-- 常见问题-->
<algorithm-common-problem :dataList="dataList.data" id="common-problem" class="scrollBox">
</algorithm-common-problem>
<algorithm-common-problem
:dataList="dataList.data"
id="common-problem"
class="scrollBox"
></algorithm-common-problem>
</div>
</template>
<script setup>
import AlgorithmTopDetails from '@/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue'
import AlgorithmAssociatedAbility from '@/views/detailsAll/components/Algorithm/AlgorithmAssociatedAbility.vue'
import AlgorithmNavigation from '@/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue'
import AlgorithmDisplay from '@/views/detailsAll/components/Algorithm/AlgorithmDisplay.vue'
import AlgorithmAdvantage from '@/views/detailsAll/components/Algorithm/AlgorithmAdvantage.vue'
import AlgorithmOnTrial from '@/views/detailsAll/components/Algorithm/AlgorithmOnTrial.vue'
import AlgorithmApplicationScenarios from '@/views/detailsAll/components/Algorithm/AlgorithmApplicationScenarios'
import AlgorithmApplicationCase from '@/views/detailsAll/components/Algorithm/AlgorithmApplicationCase'
import AlgorithmUsageMode from '@/views/detailsAll/components/Algorithm/AlgorithmUsageMode' //使
import AlgorithmChargingStandard from '@/views/detailsAll/components/Algorithm/AlgorithmChargingStandard' //
import AlgorithmCommonProblem from '@/views/detailsAll/components/Algorithm/AlgorithmCommonProblem' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId2,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const loading = ref(true)
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
import AlgorithmTopDetails from '@/views/detailsAll/components/Algorithm/AlgorithmTopDetails.vue'
import AlgorithmAssociatedAbility from '@/views/detailsAll/components/Algorithm/AlgorithmAssociatedAbility.vue'
import AlgorithmNavigation from '@/views/detailsAll/components/Algorithm/AlgorithmNavigation.vue'
import AlgorithmDisplay from '@/views/detailsAll/components/Algorithm/AlgorithmDisplay.vue'
import AlgorithmAdvantage from '@/views/detailsAll/components/Algorithm/AlgorithmAdvantage.vue'
import AlgorithmOnTrial from '@/views/detailsAll/components/Algorithm/AlgorithmOnTrial.vue'
import AlgorithmApplicationScenarios from '@/views/detailsAll/components/Algorithm/AlgorithmApplicationScenarios'
import AlgorithmApplicationCase from '@/views/detailsAll/components/Algorithm/AlgorithmApplicationCase'
import AlgorithmUsageMode from '@/views/detailsAll/components/Algorithm/AlgorithmUsageMode' //使
import AlgorithmChargingStandard from '@/views/detailsAll/components/Algorithm/AlgorithmChargingStandard' //
import AlgorithmCommonProblem from '@/views/detailsAll/components/Algorithm/AlgorithmCommonProblem' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId2,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const loading = ref(true)
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
})
})
})
const init = (id) => {
console.log(id, '-------------------------------------------------')
if (id) {
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
console.log('初始化详情页=========================>', dataList.data)
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
const init = (id) => {
console.log(id, '-------------------------------------------------')
if (id) {
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
console.log('初始化详情页=========================>', dataList.data)
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
console.log('浏览记录+1')
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
console.log('浏览记录+1')
})
})
associatedComponents.value.map((item, index) => {
let queryPartAppByKeyIdParams = {
keyId: id,
}
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[index].dataList = res.data.data
loading.value = false
associatedComponents.value.map((item, index) => {
let queryPartAppByKeyIdParams = {
keyId: id,
}
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[index].dataList = res.data.data
loading.value = false
})
})
})
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
}
}
}
init(id)
onBeforeUnmount(() => {
mybus.off('flyToView')
})
init(id)
onBeforeUnmount(() => {
mybus.off('flyToView')
})
</script>
<style lang="less" scoped>
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 0;
}
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 50%;
margin-left: -9.56rem;
}
.fixed2>div:nth-of-type(3) {
margin-top: 0.84rem;
}
.fixed2 > div:nth-of-type(3) {
margin-top: 0.84rem;
}
</style>

View File

@ -1,179 +1,219 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-30 10:22:31
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-18 13:55:03
* @Description: 应用详情页
-->
<template>
<div class="application-details" :class="{ fixed2: scrollTop >= 600 }">
<!-- 头部基本信息 -->
<application-top-details :dataList="dataList.data"></application-top-details>
<application-top-details
:dataList="dataList.data"
></application-top-details>
<!-- 导航 -->
<application-navigation :dataList="dataList.data" :associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }" :selectNow="selectNow"></application-navigation>
<application-navigation
:dataList="dataList.data"
:associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow"
></application-navigation>
<!-- 关联能力 -->
<application-associated-ability v-if="!loading" :associatedComponents="associatedComponents"
id="application-associated-ability" class="scrollBox"></application-associated-ability>
<application-associated-ability
v-if="!loading"
:associatedComponents="associatedComponents"
id="application-associated-ability"
class="scrollBox"
></application-associated-ability>
<!-- 应用展示 视频 -->
<application-presentation :dataList="dataList.data" id="application-presentation" class="scrollBox">
</application-presentation>
<application-presentation
:dataList="dataList.data"
id="application-presentation"
class="scrollBox"
></application-presentation>
<!-- 关联组件 -->
<application-associated-components :dataList="dataList.data" id="application-associated-components"
class="scrollBox" v-if="false"></application-associated-components>
<application-associated-components
:dataList="dataList.data"
id="application-associated-components"
class="scrollBox"
v-if="false"
></application-associated-components>
<!-- 功能介绍-->
<application-function-intorduction :dataList="dataList.data" id="function-introduction" class="scrollBox">
</application-function-intorduction>
<application-function-intorduction
:dataList="dataList.data"
id="function-introduction"
class="scrollBox"
></application-function-intorduction>
<!--应用详情-->
<application-ability-trial
:dataList="dataList.data"
id="application-ability-trial"
class="scrollBox"
></application-ability-trial>
<!-- 使用能力 -->
<application-ability-toise :dataList="dataList.data" id="ability-to-use" class="scrollBox">
</application-ability-toise>
<application-ability-toise
:dataList="dataList.data"
id="ability-to-use"
class="scrollBox"
></application-ability-toise>
<!-- 部署与安全-->
<application-deployment-and-security :dataList="dataList.data" id="deployment-and-security" class="scrollBox">
</application-deployment-and-security>
<application-deployment-and-security
:dataList="dataList.data"
id="deployment-and-security"
class="scrollBox"
></application-deployment-and-security>
<!-- 归属部门与服务商-->
<application-owning-department-and-service-provider :dataList="dataList.data" id="department-and-service-provider"
class="scrollBox"></application-owning-department-and-service-provider>
<application-owning-department-and-service-provider
:dataList="dataList.data"
id="department-and-service-provider"
class="scrollBox"
></application-owning-department-and-service-provider>
<!-- 常见问题-->
<application-common-problem :dataList="dataList.data" id="common-problem" class="scrollBox">
</application-common-problem>
<application-common-problem
:dataList="dataList.data"
id="common-problem"
class="scrollBox"
></application-common-problem>
</div>
</template>
<script setup>
import ApplicationAbilityToise from '@/views/detailsAll/components/Application/ApplicationAbilityToise.vue'
import ApplicationAssociatedComponents from '@/views/detailsAll/components/Application/ApplicationAssociatedComponents.vue'
import ApplicationAssociatedAbility from '@/views/detailsAll/components/Application/ApplicationAssociatedAbility.vue'
import ApplicationOwningDepartmentAndServiceProvider from '@/views/detailsAll/components/Application/ApplicationOwningDepartmentAndServiceProvider.vue'
import ApplicationFunctionIntorduction from '@/views/detailsAll/components/Application/ApplicationFunctionIntorduction.vue'
import ApplicationDeploymentAndSecurity from '@/views/detailsAll/components/Application/ApplicationDeploymentAndSecurity.vue'
import ApplicationTopDetails from '@/views/detailsAll/components/Application/ApplicationTopDetails.vue'
import ApplicationNavigation from '@/views/detailsAll/components/Application/ApplicationNavigation.vue'
import ApplicationPresentation from '@/views/detailsAll/components/Application/ApplicationPresentation.vue'
import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const associatedComponents = ref([{ type: '组件服务', dataList: [] }])
let loading = ref(true)
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop-50)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
import ApplicationAbilityToise from '@/views/detailsAll/components/Application/ApplicationAbilityToise.vue'
import ApplicationAssociatedComponents from '@/views/detailsAll/components/Application/ApplicationAssociatedComponents.vue'
import ApplicationAssociatedAbility from '@/views/detailsAll/components/Application/ApplicationAssociatedAbility.vue'
import ApplicationOwningDepartmentAndServiceProvider from '@/views/detailsAll/components/Application/ApplicationOwningDepartmentAndServiceProvider.vue'
import ApplicationFunctionIntorduction from '@/views/detailsAll/components/Application/ApplicationFunctionIntorduction.vue'
import ApplicationDeploymentAndSecurity from '@/views/detailsAll/components/Application/ApplicationDeploymentAndSecurity.vue'
import ApplicationTopDetails from '@/views/detailsAll/components/Application/ApplicationTopDetails.vue'
import ApplicationNavigation from '@/views/detailsAll/components/Application/ApplicationNavigation.vue'
import ApplicationPresentation from '@/views/detailsAll/components/Application/ApplicationPresentation.vue'
import ApplicationAbilityTrial from '@/views/detailsAll/components/Application/ApplicationAbilityTrial.vue'
import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const associatedComponents = ref([{ type: '组件服务', dataList: [] }])
let loading = ref(true)
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop-50)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
})
})
})
const init = (id) => {
if (id) {
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
console.log(
'初始化详情页=========================>',
dataList.data,
arrList.value
)
if (arrList.value && arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
const init = (id) => {
if (id) {
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
console.log(
'初始化详情页=========================>',
dataList.data,
arrList.value
)
if (arrList.value && arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
console.log('浏览记录+1')
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
console.log('浏览记录+1')
})
})
associatedComponents.value.map((item, index) => {
let queryPartAppByKeyIdParams = {
keyId: id,
type: item.type,
}
queryPartAppByKeyId(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[0].dataList = res.data.data
loading.value = false
associatedComponents.value.map((item, index) => {
let queryPartAppByKeyIdParams = {
keyId: id,
type: item.type,
}
queryPartAppByKeyId(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[0].dataList = res.data.data
loading.value = false
})
})
})
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
}
}
}
const associatedComponentsFunction = () => {
if (
associatedComponents.value[0].dataList.length > 0 ||
associatedComponents.value[1].dataList.length > 0 ||
associatedComponents.value[2].dataList.length > 0
) {
return associatedComponents.value
const associatedComponentsFunction = () => {
if (
associatedComponents.value[0].dataList.length > 0 ||
associatedComponents.value[1].dataList.length > 0 ||
associatedComponents.value[2].dataList.length > 0
) {
return associatedComponents.value
}
}
}
init(id)
onBeforeUnmount(() => {
mybus.off('flyToView')
})
init(id)
onBeforeUnmount(() => {
mybus.off('flyToView')
})
</script>
<style lang="less" scoped>
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 0;
}
.fixed {
position: sticky;
z-index: 2000;
top: 0;
left: 50%;
margin-left: -9.56rem;
}
.fixed2>div:nth-of-type(3) {
margin-top: 0.84rem;
}
.fixed2 > div:nth-of-type(3) {
margin-top: 0.84rem;
}
</style>

View File

@ -10,149 +10,178 @@
<!-- 头部基本信息 -->
<business-top-details :dataList="dataList.data"></business-top-details>
<!-- 导航 -->
<business-navigation :dataList="dataList.data" :associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }" :selectNow="selectNow"></business-navigation>
<business-navigation
:dataList="dataList.data"
:associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow"
></business-navigation>
<!-- 关联能力 -->
<business-associated-ability v-if="!loading" :associatedComponents="associatedComponents"
id="business-associated-ability" class="scrollBox"></business-associated-ability>
<business-associated-ability
v-if="!loading"
:associatedComponents="associatedComponents"
id="business-associated-ability"
class="scrollBox"
></business-associated-ability>
<!-- 组件展示 -->
<business-presentation :dataList="dataList.data" id="business-presentation" class="scrollBox">
</business-presentation>
<business-presentation
:dataList="dataList.data"
id="business-presentation"
class="scrollBox"
></business-presentation>
<!-- 功能介绍-->
<business-function-intorduction :dataList="dataList.data" id="function-introduction" class="scrollBox">
</business-function-intorduction>
<business-function-intorduction
:dataList="dataList.data"
id="function-introduction"
class="scrollBox"
></business-function-intorduction>
<!-- 应用场景 -->
<business-application-scenarios :dataList="dataList.data" id="application-scenarios" class="scrollBox">
</business-application-scenarios>
<business-application-scenarios
:dataList="dataList.data"
id="application-scenarios"
class="scrollBox"
></business-application-scenarios>
<!-- 应用案例 -->
<business-application-case :dataList="dataList.data" id="application-case" class="scrollBox">
</business-application-case>
<business-application-case
:dataList="dataList.data"
id="application-case"
class="scrollBox"
></business-application-case>
<!-- 使用方式 -->
<business-usage-mode :dataList="dataList.data" id="business-usage-mode" class="scrollBox"></business-usage-mode>
<business-usage-mode
:dataList="dataList.data"
id="business-usage-mode"
class="scrollBox"
></business-usage-mode>
<!-- 常见问题-->
<business-common-problem :dataList="dataList.data" id="common-problem" class="scrollBox"></business-common-problem>
<business-common-problem
:dataList="dataList.data"
id="common-problem"
class="scrollBox"
></business-common-problem>
</div>
</template>
<script setup>
import BusinessApplicationCase from '@/views/detailsAll/components/Business/BusinessApplicationCase.vue' //
import BusinessAssociatedAbility from '@/views/detailsAll/components/Business/BusinessAssociatedAbility.vue'
import BusinessApplicationScenarios from '@/views/detailsAll/components/Business/BusinessApplicationScenarios.vue' //
import BusinessFunctionIntorduction from '@/views/detailsAll/components/Business/BusinessFunctionIntorduction.vue' //
import BusinessTopDetails from '@/views/detailsAll/components/Business/BusinessTopDetails.vue' //
import BusinessNavigation from '@/views/detailsAll/components/Business/BusinessNavigation.vue' //
import BusinessPresentation from '@/views/detailsAll/components/Business/BusinessPresentation.vue' //
import BusinessUsageMode from '@/views/detailsAll/components/Business/BusinessUsageMode.vue' //使
import BusinessCommonProblem from '@/views/detailsAll/components/Business/BusinessCommonProblem' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId2,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
let loading = ref(true)
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
import BusinessApplicationCase from '@/views/detailsAll/components/Business/BusinessApplicationCase.vue' //
import BusinessAssociatedAbility from '@/views/detailsAll/components/Business/BusinessAssociatedAbility.vue'
import BusinessApplicationScenarios from '@/views/detailsAll/components/Business/BusinessApplicationScenarios.vue' //
import BusinessFunctionIntorduction from '@/views/detailsAll/components/Business/BusinessFunctionIntorduction.vue' //
import BusinessTopDetails from '@/views/detailsAll/components/Business/BusinessTopDetails.vue' //
import BusinessNavigation from '@/views/detailsAll/components/Business/BusinessNavigation.vue' //
import BusinessPresentation from '@/views/detailsAll/components/Business/BusinessPresentation.vue' //
import BusinessUsageMode from '@/views/detailsAll/components/Business/BusinessUsageMode.vue' //使
import BusinessCommonProblem from '@/views/detailsAll/components/Business/BusinessCommonProblem' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId2,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
let loading = ref(true)
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
})
})
})
const init = (id) => {
if (id) {
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
console.log('初始化详情页=========================>', dataList.data)
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value && arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
const init = (id) => {
if (id) {
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
console.log('初始化详情页=========================>', dataList.data)
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value && arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
console.log('浏览记录+1')
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
console.log('浏览记录+1')
})
})
associatedComponents.value.map((item, index) => {
let queryPartAppByKeyIdParams = {
keyId: id,
}
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[index].dataList = res.data.data
loading.value = false
associatedComponents.value.map((item, index) => {
let queryPartAppByKeyIdParams = {
keyId: id,
}
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[index].dataList = res.data.data
loading.value = false
})
})
})
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
}
}
}
init(id)
onBeforeUnmount(() => {
mybus.off('flyToView')
})
init(id)
onBeforeUnmount(() => {
mybus.off('flyToView')
})
</script>
<style lang="less" scoped>
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 0;
}
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 50%;
margin-left: -9.56rem;
}
.fixed2>div:nth-of-type(3) {
margin-top: 0.84rem;
}
.fixed2 > div:nth-of-type(3) {
margin-top: 0.84rem;
}
</style>

View File

@ -10,157 +10,188 @@
<!-- 头部基本信息 -->
<developer-top-details :dataList="dataList.data"></developer-top-details>
<!-- 导航 -->
<developer-navigation :dataList="dataList.data" :associatedComponents="associatedComponentsFunction()"
:class="{ fixed: scrollTop >= 600 }" :selectNow="selectNow"></developer-navigation>
<developer-navigation
:dataList="dataList.data"
:associatedComponents="associatedComponentsFunction()"
:class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow"
></developer-navigation>
<!-- 关联能力 -->
<developer-associated-ability v-if="!loading" :associatedComponents="associatedComponents"
id="developer-associated-ability" class="scrollBox"></developer-associated-ability>
<developer-associated-ability
v-if="!loading"
:associatedComponents="associatedComponents"
id="developer-associated-ability"
class="scrollBox"
></developer-associated-ability>
<!-- 组件展示 视频 -->
<Developer-presentation :dataList="dataList.data" id="eveloper-presentation" class="scrollBox">
</Developer-presentation>
<Developer-presentation
:dataList="dataList.data"
id="eveloper-presentation"
class="scrollBox"
></Developer-presentation>
<!-- 功能介绍-->
<developer-function-intorduction :dataList="dataList.data" id="function-introduction" class="scrollBox">
</developer-function-intorduction>
<developer-function-intorduction
:dataList="dataList.data"
id="function-introduction"
class="scrollBox"
></developer-function-intorduction>
<!-- 应用场景 -->
<developer-application-scenarios :dataList="dataList.data" id="application-scenarios" class="scrollBox">
</developer-application-scenarios>
<developer-application-scenarios
:dataList="dataList.data"
id="application-scenarios"
class="scrollBox"
></developer-application-scenarios>
<!-- 应用案例 -->
<developer-application-case :dataList="dataList.data" id="application-case" class="scrollBox">
</developer-application-case>
<developer-application-case
:dataList="dataList.data"
id="application-case"
class="scrollBox"
></developer-application-case>
<!-- 组件试用 -->
<developer-trial :dataList="dataList.data" id="developer-trial" class="scrollBox"></developer-trial>
<developer-trial
:dataList="dataList.data"
id="developer-trial"
class="scrollBox"
></developer-trial>
<!-- 归属部门与服务商-->
<developer-owning-department-and-service-provider :dataList="dataList.data" id="department-and-service-provider"
class="scrollBox"></developer-owning-department-and-service-provider>
<developer-owning-department-and-service-provider
:dataList="dataList.data"
id="department-and-service-provider"
class="scrollBox"
></developer-owning-department-and-service-provider>
<!-- 常见问题-->
<developer-common-problem :dataList="dataList.data" id="common-problem" class="scrollBox">
</developer-common-problem>
<developer-common-problem
:dataList="dataList.data"
id="common-problem"
class="scrollBox"
></developer-common-problem>
</div>
</template>
<script setup>
import DeveloperApplicationScenarios from '@/views/detailsAll/components/Developer/DeveloperApplicationScenarios.vue' //
import DeveloperAssociatedAbility from '@/views/detailsAll/components/Developer/DeveloperAssociatedAbility.vue'
import DeveloperOwningDepartmentAndServiceProvider from '@/views/detailsAll/components/Developer/DeveloperOwningDepartmentAndServiceProvider.vue' //使
import DeveloperFunctionIntorduction from '@/views/detailsAll/components/Developer/DeveloperFunctionIntorduction.vue' //
import DeveloperApplicationCase from '@/views/detailsAll/components/Developer/DeveloperApplicationCase' //
import DeveloperTopDetails from '@/views/detailsAll/components/Developer/DeveloperTopDetails.vue' //
import DeveloperNavigation from '@/views/detailsAll/components/Developer/DeveloperNavigation.vue'
import DeveloperPresentation from '@/views/detailsAll/components/Developer/DeveloperPresentation.vue' //
import DeveloperCommonProblem from '@/views/detailsAll/components/Developer/DeveloperCommonProblem' //
import DeveloperTrial from '@/views/detailsAll/components/Developer/DeveloperTrial' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId2,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
let loading = ref(true)
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
import DeveloperApplicationScenarios from '@/views/detailsAll/components/Developer/DeveloperApplicationScenarios.vue' //
import DeveloperAssociatedAbility from '@/views/detailsAll/components/Developer/DeveloperAssociatedAbility.vue'
import DeveloperOwningDepartmentAndServiceProvider from '@/views/detailsAll/components/Developer/DeveloperOwningDepartmentAndServiceProvider.vue' //使
import DeveloperFunctionIntorduction from '@/views/detailsAll/components/Developer/DeveloperFunctionIntorduction.vue' //
import DeveloperApplicationCase from '@/views/detailsAll/components/Developer/DeveloperApplicationCase' //
import DeveloperTopDetails from '@/views/detailsAll/components/Developer/DeveloperTopDetails.vue' //
import DeveloperNavigation from '@/views/detailsAll/components/Developer/DeveloperNavigation.vue'
import DeveloperPresentation from '@/views/detailsAll/components/Developer/DeveloperPresentation.vue' //
import DeveloperCommonProblem from '@/views/detailsAll/components/Developer/DeveloperCommonProblem' //
import DeveloperTrial from '@/views/detailsAll/components/Developer/DeveloperTrial' //
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId2,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
let loading = ref(true)
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
})
const init = (id) => {
if (id) {
let queryPartAppByKeyIdParams = {
keyId: id,
}
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[0].dataList = res.data.data
loading.value = false
})
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
console.log('初始化详情页=========================>', dataList.data)
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value && arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
console.log('浏览记录+1')
})
})
associatedComponents.value.map((item, index) => { })
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
})
const init = (id) => {
if (id) {
let queryPartAppByKeyIdParams = {
keyId: id,
}
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[0].dataList = res.data.data
loading.value = false
})
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
console.log('初始化详情页=========================>', dataList.data)
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value && arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
console.log('浏览记录+1')
})
})
associatedComponents.value.map((item, index) => {})
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
}
}
}
init(id)
const associatedComponentsFunction = () => {
if (associatedComponents.value[0].dataList.length > 0) {
return associatedComponents.value
init(id)
const associatedComponentsFunction = () => {
if (associatedComponents.value[0].dataList.length > 0) {
return associatedComponents.value
}
}
}
onBeforeUnmount(() => {
mybus.off('flyToView')
})
onBeforeUnmount(() => {
mybus.off('flyToView')
})
</script>
<style lang="less" scoped>
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 0;
}
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 50%;
margin-left: -9.56rem;
}
.fixed2>div:nth-of-type(3) {
margin-top: 0.84rem;
}
.fixed2 > div:nth-of-type(3) {
margin-top: 0.84rem;
}
</style>

View File

@ -8,156 +8,189 @@
<template>
<div class="application-details" :class="{ fixed2: scrollTop >= 600 }">
<!-- 头部基本信息 -->
<layer-service-top-details :dataList="dataList.data"></layer-service-top-details>
<layer-service-top-details
:dataList="dataList.data"
></layer-service-top-details>
<!-- 导航 -->
<layer-service-navigation :dataList="dataList.data" :associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }" :selectNow="selectNow"></layer-service-navigation>
<layer-service-navigation
:dataList="dataList.data"
:associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow"
></layer-service-navigation>
<!-- 关联能力 -->
<layer-service-associated-ability :associatedComponents="associatedComponents" id="layer-service-associated-ability"
class="scrollBox" v-if="!loading"></layer-service-associated-ability>
<layer-service-associated-ability
:associatedComponents="associatedComponents"
id="layer-service-associated-ability"
class="scrollBox"
v-if="!loading"
></layer-service-associated-ability>
<!-- 图层展示 视频 -->
<layer-service-presentation :dataList="dataList.data" id="service-presentation" class="scrollBox">
</layer-service-presentation>
<layer-service-presentation
:dataList="dataList.data"
id="service-presentation"
class="scrollBox"
></layer-service-presentation>
<!-- 图层信息-->
<layer-service-information :dataList="dataList.data" id="service-information" class="scrollBox">
</layer-service-information>
<layer-service-information
:dataList="dataList.data"
id="service-information"
class="scrollBox"
></layer-service-information>
<!-- 应用场景 -->
<layer-service-application-scenarios :dataList="dataList.data" id="service-application-scenarios" class="scrollBox">
</layer-service-application-scenarios>
<layer-service-application-scenarios
:dataList="dataList.data"
id="service-application-scenarios"
class="scrollBox"
></layer-service-application-scenarios>
<!-- 应用案例 -->
<layer-service-application-case :dataList="dataList.data" id="service-application-case" class="scrollBox">
</layer-service-application-case>
<layer-service-application-case
:dataList="dataList.data"
id="service-application-case"
class="scrollBox"
></layer-service-application-case>
<!-- 图层预览 -->
<layer-service-preview :dataList="dataList.data" id="service-preview" class="scrollBox"></layer-service-preview>
<layer-service-preview
:dataList="dataList.data"
id="service-preview"
class="scrollBox"
></layer-service-preview>
<!-- 使用方式-->
<layer-service-usage-mode :dataList="dataList.data" id="service-usage-mode" class="scrollBox">
</layer-service-usage-mode>
<layer-service-usage-mode
:dataList="dataList.data"
id="service-usage-mode"
class="scrollBox"
></layer-service-usage-mode>
<!-- 常见问题-->
<layer-service-common-problem :dataList="dataList.data" id="service-common-problem" class="scrollBox">
</layer-service-common-problem>
<layer-service-common-problem
:dataList="dataList.data"
id="service-common-problem"
class="scrollBox"
></layer-service-common-problem>
</div>
</template>
<script setup>
import LayerServiceApplicationCase from '@/views/detailsAll/components/LayerService/LayerServiceApplicationCase' //
import LayerServiceAssociatedAbility from '@/views/detailsAll/components/LayerService/LayerServiceAssociatedAbility.vue'
import LayerServiceApplicationScenarios from '@/views/detailsAll/components/LayerService/LayerServiceApplicationScenarios.vue' //
import LayerServiceCommonProblem from '@/views/detailsAll/components/LayerService/LayerServiceCommonProblem' //
import LayerServiceInformation from '@/views/detailsAll/components/LayerService/LayerServiceInformation.vue' //
import LayerServiceNavigation from '@/views/detailsAll/components/LayerService/LayerServiceNavigation.vue' //
import LayerServicePresentation from '@/views/detailsAll/components/LayerService/LayerServicePresentation.vue' //
import LayerServicePreview from '@/views/detailsAll/components/LayerService/LayerServicePreview.vue' //
import LayerServiceTopDetails from '@/views/detailsAll/components/LayerService/LayerServiceTopDetails.vue' //
import LayerServiceUsageMode from '@/views/detailsAll/components/LayerService/LayerServiceUsageMode.vue' //使
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId2,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
let loading = ref(true)
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
import LayerServiceApplicationCase from '@/views/detailsAll/components/LayerService/LayerServiceApplicationCase' //
import LayerServiceAssociatedAbility from '@/views/detailsAll/components/LayerService/LayerServiceAssociatedAbility.vue'
import LayerServiceApplicationScenarios from '@/views/detailsAll/components/LayerService/LayerServiceApplicationScenarios.vue' //
import LayerServiceCommonProblem from '@/views/detailsAll/components/LayerService/LayerServiceCommonProblem' //
import LayerServiceInformation from '@/views/detailsAll/components/LayerService/LayerServiceInformation.vue' //
import LayerServiceNavigation from '@/views/detailsAll/components/LayerService/LayerServiceNavigation.vue' //
import LayerServicePresentation from '@/views/detailsAll/components/LayerService/LayerServicePresentation.vue' //
import LayerServicePreview from '@/views/detailsAll/components/LayerService/LayerServicePreview.vue' //
import LayerServiceTopDetails from '@/views/detailsAll/components/LayerService/LayerServiceTopDetails.vue' //
import LayerServiceUsageMode from '@/views/detailsAll/components/LayerService/LayerServiceUsageMode.vue' //使
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { useRouter } from 'vue-router'
import {
updateVisits,
selectOne,
queryPartAppByKeyId2,
browsingInsert,
} from '@/api/home'
import mybus from '@/myplugins/mybus'
const router = useRouter()
const scrollTop = ref(0)
const domArr = ref([])
const selectNow = ref('')
const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
let loading = ref(true)
document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0
mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop)
document.documentElement.scrollTop = top
document.body.scrollTop = top
})
onMounted(() => {
// console.clear()
window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox')
scrollTop.value =
document.documentElement.scrollTop || document.body.scrollTop
for (let i = 0; i < domArr.value.length; i++) {
if (i === 0) {
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else if (i == domArr.value.length - 1) {
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
selectNow.value = domArr.value[i].id
}
} else {
if (
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
) {
selectNow.value = domArr.value[i].id
}
}
}
})
})
})
const init = (id) => {
if (id) {
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
console.log('初始化详情页=========================>', dataList.data)
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value && arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
const init = (id) => {
if (id) {
selectOne(id).then((res) => {
// console.clear()
dataList.data = res.data.data
console.log('初始化详情页=========================>', dataList.data)
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value && arrList.value.indexOf(id) === -1) {
arrList.value.push(id)
updateVisits({
id: res.data.data.id,
visits: res.data.data.visits || '0',
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
window.sessionStorage.setItem(
'visits',
JSON.stringify(arrList.value)
)
console.log('浏览记录+1')
})
}
//
browsingInsert({
resourceId: res.data.data.id,
}).then(() => {
console.log('浏览记录+1')
})
})
associatedComponents.value.map((item, index) => {
let queryPartAppByKeyIdParams = {
keyId: id,
}
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[index].dataList = res.data.data
loading.value = false
associatedComponents.value.map((item, index) => {
let queryPartAppByKeyIdParams = {
keyId: id,
}
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[index].dataList = res.data.data
loading.value = false
})
})
})
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
} else if (obj) {
dataList.data = obj
console.log('预览==============', obj)
}
}
}
init(id)
onBeforeUnmount(() => {
mybus.off('flyToView')
})
init(id)
onBeforeUnmount(() => {
mybus.off('flyToView')
})
</script>
<style lang="less" scoped>
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 0;
}
.fixed {
position: fixed;
z-index: 2000;
top: 0;
left: 50%;
margin-left: -9.56rem;
}
.fixed2>div:nth-of-type(3) {
margin-top: 0.84rem;
}
.fixed2 > div:nth-of-type(3) {
margin-top: 0.84rem;
}
</style>

View File

@ -126,10 +126,12 @@
'props.dataList.infoList==============>',
navList.value.filter((item) => item.name === list.value[0])
)
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
}
console.log('11111111111111111111111111', list.value, navList.value)
}

View File

@ -0,0 +1,179 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-09 09:29:29
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-13 15:21:26
* @Description: 应用详情
-->
<template>
<div class="algorithm-on-trial" v-if="flag">
<detals-title title="应用详情" type="PROBATION"></detals-title>
<div class="main">
<div class="main-left">
<p>{{ dataFrom.linkName }}</p>
<p style="cursor: pointer" @click="clickLink(dataFrom.link)">
{{ dataFrom.link }}
</p>
</div>
<div class="main-center">
<p>{{ dataFrom.numberName }}</p>
<p>{{ dataFrom.number }}</p>
<div @click="copyFunction(dataFrom.number, '复制账号')">复制账号</div>
</div>
<div class="main-right">
<p>{{ dataFrom.passwordName }}</p>
<p>{{ dataFrom.password }}</p>
<div @click="copyFunction(dataFrom.password2, '复制密码')">
复制密码
</div>
</div>
</div>
</div>
</template>
<script setup>
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue'
import { ref, defineProps, watch } from 'vue'
import { message } from 'ant-design-vue'
let flag = ref(true)
const props = defineProps({
dataList: { type: Object, default: null },
})
const dataFrom = ref({
linkName: '访问地址',
link: 'http://localhost:8080/#/detailsfdddffffffffffffffdfgdfgdfdgdfgdfg',
numberName: '试用账号',
number: 'zhangfeihu',
passwordName: '试用密码',
password: '**************************',
password2: '',
})
if (props.dataList.infoList) {
let obj = props.dataList.applyState
if (obj !== '已申请') {
flag.value = false
} else {
props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
}
}
const clickLink = (link) => {
window.open(link)
}
//
const copyFunction = (data, name) => {
let url = data
let oInput = document.createElement('input')
oInput.value = url
document.body.appendChild(oInput)
oInput.select() // ;
console.log(oInput.value)
document.execCommand('Copy') //
oInput.remove() //
message.success(name + '成功')
}
message.config({
top: '100px', //
})
// const success = () => {
// message.success({
// // content: 'This is a prompt message with custom className and style',
// className: 'custom-class',
// style: {},
// })
// }
watch(
() => props.dataList,
(val) => {
if (val) {
let obj = props.dataList.applyState
if (obj !== '已申请') {
flag.value = false
} else {
props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
}
}
}
)
</script>
<style lang="less" scoped>
.algorithm-on-trial {
padding: 0.8rem 0px 0.8rem;
display: flex;
flex-direction: column;
align-items: center;
.main {
margin-top: 0.3rem;
width: 13rem;
height: 2.5rem;
background: url('~@/assets/detailsAll/kfzj_sybg.png') no-repeat;
display: grid;
grid-template-columns: 33.33% 33.33% 33.33%;
align-items: center;
.main-left {
border-right: 0.01rem #ffffff solid;
padding-left: 0.7rem;
padding-right: 1rem;
& > p {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
.main-center {
padding-left: 1rem;
padding-right: 1rem;
}
.main-right {
padding-right: 0.7rem;
}
& > div > p:first-child {
font-size: 0.26rem;
color: #ffffff;
font-weight: bold;
}
& > div > p:nth-child(2) {
font-size: 0.22rem;
color: #ffffff;
line-height: 0.34rem;
}
& > div:first-child > p:last-child {
text-decoration: underline;
word-wrap: break-word;
word-break: normal;
}
& > div > div:last-child {
height: 0.34rem;
width: 1.1rem;
border: 0.01rem solid #ffffff;
border-radius: 0.06rem;
font-size: 0.18rem;
color: #ffffff;
cursor: pointer;
text-align: center;
line-height: 0.34rem;
}
}
}
</style>
<style>
.custom-class {
/* top: 100px; */
}
</style>

View File

@ -75,13 +75,14 @@
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
attrValue: item.attrValue || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
// } else if (item.attrType === '访') {
// let obj = {
// attrType: '访',
// attrValue: item.attrValue || '------',
// }
// dataFrom.value.content[0].childrenContent.push(obj)
// }
})
if (dataFrom.value.content[1].childrenContent.length <= 0) {
let data = [
@ -99,12 +100,12 @@
})
}
}
//访
const addressFunction = (name, itemValue) => {
if (name == '访问地址') {
window.open(itemValue)
}
}
// //访
// const addressFunction = (name, itemValue) => {
// if (name == '访') {
// window.open(itemValue)
// }
// }
watch(
() => props.dataList,
(val) => {
@ -125,13 +126,14 @@
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
attrValue: item.attrValue || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
// } else if (item.attrType === '访') {
// let obj = {
// attrType: '访',
// attrValue: item.attrValue || '------',
// }
// dataFrom.value.content[0].childrenContent.push(obj)
// }
})
if (dataFrom.value.content[1].childrenContent.length <= 0) {
debugger
@ -149,11 +151,6 @@
dataFrom.value.content[1].childrenContent.push(itemContent)
})
}
let obj = {
attrType: '访问地址',
attrValue: props.dataList.link || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
}
)

View File

@ -41,6 +41,10 @@
name: '使用能力',
key: 'ability-to-use',
},
{
name: '应用详情',
key: 'application-ability-trial',
},
{
name: '部署与安全',
key: 'deployment-and-security',
@ -96,6 +100,11 @@
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
list.value.push('应用展示')
} else if (
item.attrType === '访问地址' &&
props.dataList.applyState === '已申请'
) {
list.value.push('应用详情')
}
})
list.value.unshift('关联组件')
@ -137,6 +146,11 @@
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
list.value.push('应用展示')
} else if (
item.attrType === '访问地址' &&
props.dataList.applyState === '已申请'
) {
list.value.push('应用详情')
}
})
list.value.unshift('关联组件')

View File

@ -2,16 +2,41 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 15:25:33
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:30:52
* @LastEditTime: 2022-07-16 16:58:16
* @Description: 应用展示 视频播放
-->
<template>
<div class="application-presentation" v-if="flag">
<detals-title title="应用展示" type="IMAGE&VIDEO"></detals-title>
<div class="main" :style="`${img}background-position:center;background-size:cover;`">
<div class="play" @click="showModal"></div>
<div class="box">
<div class="left" @click="chagneShow()"></div>
<div
class="main"
:style="`${img}background-position:center;background-size:cover;`"
v-if="
showArr.length > 0 && showArr[showFlag].attrType == '应用展示视频'
"
>
<div class="play" @click="showModal"></div>
</div>
<div
class="main2"
v-if="showArr.length > 0 && showArr[showFlag].attrType == '应用图片'"
>
<a-image
:width="700"
:height="340"
:src="showArr[showFlag].attrValue"
/>
</div>
<div class="right" @click="chagneShow()"></div>
</div>
<a-modal v-model:visible="visible" title="视频预览" :width="750" destroyOnClose>
<a-modal
v-model:visible="visible"
title="视频预览"
:width="750"
destroyOnClose
>
<template #footer></template>
<div style="width: 100%; display: flex; justify-content: center">
<div style="width: 100%; height: 100%">
@ -22,106 +47,154 @@
</div>
</template>
<script setup>
import { ref, reactive, defineProps, watch } from 'vue'
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue'
const visible = ref(false)
const options = reactive({
width: '7.00rem', //
height: '4.00rem', //
color: '#409eff', //
title: '', //
src: '', //
muted: false, //
webFullScreen: false,
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //
autoPlay: true, //
loop: false, //
mirror: false, //
ligthOff: false, //
volume: 0.3, //
control: true, //
controlBtns: [
'audioTrack',
'quality',
'speedRate',
'volume',
'setting',
'pip',
'pageFullScreen',
'fullScreen',
], //,
})
const showModal = () => {
visible.value = true
}
const props = defineProps({
dataList: { type: Object, default: null },
})
const flag = ref(true)
const img = ref({})
console.log('111111111111111111111,', props.dataList)
if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频'
)[0]
console.log('视频==============>', obj)
if (!obj) {
flag.value = false
} else {
let imgindex = props.dataList.infoList.filter(
(item) => item.attrType === '应用图片'
)[0]
options.src = obj.attrValue
if (imgindex) {
img.value = 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
import { ref, reactive, defineProps, watch } from 'vue'
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue'
const visible = ref(false)
const options = reactive({
width: '7.00rem', //
height: '4.00rem', //
color: '#409eff', //
title: '', //
src: '', //
muted: false, //
webFullScreen: false,
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //
autoPlay: true, //
loop: false, //
mirror: false, //
ligthOff: false, //
volume: 0.3, //
control: true, //
controlBtns: [
'audioTrack',
'quality',
'speedRate',
'volume',
'setting',
'pip',
'pageFullScreen',
'fullScreen',
], //,
})
const showFlag = ref(0)
const showArr = ref([])
const chagneShow = () => {
if (showArr.value.length > 1) {
showFlag.value = showFlag.value == 0 ? 1 : 0
}
}
}
watch(
() => props.dataList,
(val) => {
if (val) {
let obj = val.infoList.filter(
(item) => item.attrType === '应用展示视频'
)[0]
console.log('视频==============>', obj)
if (!obj) {
flag.value = false
} else {
let imgindex = props.dataList.infoList.filter(
(item) => item.attrType === '应用图片'
)[0]
const showModal = () => {
visible.value = true
}
const props = defineProps({
dataList: { type: Object, default: null },
})
const flag = ref(true)
const img = ref({})
console.log('111111111111111111111,', props.dataList)
if (props.dataList.infoList) {
showArr.value = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频' || item.attrType === '应用图片'
)
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频'
)[0]
console.log('视频==============>', showArr.value)
if (showArr.value.length == 0) {
flag.value = false
} else {
if (obj) {
options.src = obj.attrValue
if (imgindex) {
img.value =
'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
}
}
}
}
)
watch(
() => props.dataList,
(val) => {
if (val) {
showArr.value = props.dataList.infoList.filter(
(item) =>
item.attrType === '应用展示视频' || item.attrType === '应用图片'
)
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频'
)[0]
console.log('视频==============>', showArr.value)
if (showArr.value.length == 0) {
flag.value = false
} else {
if (obj) {
options.src = obj.attrValue
}
}
}
}
)
</script>
<style lang="less" scoped>
.application-presentation {
padding: 0.8rem 3rem 0;
.application-presentation {
padding: 0.8rem 3rem 0;
.main {
height: 3.4rem;
border-radius: 0.1rem;
background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat;
background-size: 100%;
margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
.play {
width: 0.96rem;
height: 0.96rem;
background: url('~@/assets/detailsAll/sf_video_play.png') no-repeat;
.main {
width: 13.14rem;
height: 3.4rem;
border-radius: 0.1rem;
background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat;
background-size: 100%;
cursor: pointer;
margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
.play {
width: 0.96rem;
height: 0.96rem;
background: url('~@/assets/detailsAll/sf_video_play.png') no-repeat;
background-size: 100%;
cursor: pointer;
}
}
.main2 {
width: 13.14rem;
height: 3.4rem;
border-radius: 0.1rem;
background-size: 100%;
margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
}
}
}
.box {
display: flex;
justify-content: space-around;
align-items: center;
margin-bottom: 0.8rem;
.left {
width: 0.37rem;
height: 0.6rem;
cursor: pointer;
margin-right: 0.2rem;
background: url('~@/assets/detailsAll/business/business_previous.png')
no-repeat;
background-size: 100%;
background-position: center;
}
.right {
width: 0.37rem;
height: 0.6rem;
cursor: pointer;
margin-left: 0.2rem;
background: url('~@/assets/detailsAll/business/business_next.png')
no-repeat;
background-size: 100%;
background-position: center;
}
}
:deep(.ant-image-img) {
width: 100%;
height: 100%;
object-fit: contain;
}
</style>

View File

@ -8,7 +8,12 @@
<template>
<div class="business-navigation" v-if="navList.length > 0">
<template v-for="nav in navList" :key="nav.key">
<div class="nav" :class="{ select: nav.key == select }" v-if="nav.show" @click="selectNav(nav.key)">
<div
class="nav"
:class="{ select: nav.key == select }"
v-if="nav.show"
@click="selectNav(nav.key)"
>
{{ nav.name }}
<span class="line"></span>
</div>
@ -16,217 +21,216 @@
</div>
</template>
<script setup>
import { ref, defineProps, watch, getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus'
import { queryPartAppByKeyId2 } from '@/api/home'
//
const router = useRouter()
const keyId = router.currentRoute.value.query.id
const navList = ref([
{
name: '组件展示',
key: 'business-presentation',
},
{
name: '功能介绍',
key: 'function-introduction',
},
import { ref, defineProps, watch, getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus'
import { queryPartAppByKeyId2 } from '@/api/home'
//
const router = useRouter()
const keyId = router.currentRoute.value.query.id
const navList = ref([
{
name: '组件展示',
key: 'business-presentation',
},
{
name: '功能介绍',
key: 'function-introduction',
},
{
name: '应用场景',
key: 'application-scenarios',
},
{
name: '应用案例',
key: 'application-case',
},
{
name: '使用方式',
key: 'business-usage-mode',
},
{
name: '常见问题',
key: 'common-problem',
},
])
const props = defineProps({
associatedComponents: { type: Array, default: null },
selectNow: { type: String, default: '' },
dataList: { type: Object, default: null },
})
const select = ref('business-associated-ability')
const list = ref([])
// id
if (keyId) {
queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length > 0) {
//
navList.value.unshift({
name: '关联应用',
key: 'business-associated-ability',
show: true,
})
// list.value.push('')
console.log('navList', navList)
}
{
name: '应用场景',
key: 'application-scenarios',
},
{
name: '应用案例',
key: 'application-case',
},
{
name: '使用方式',
key: 'business-usage-mode',
},
{
name: '常见问题',
key: 'common-problem',
},
])
const props = defineProps({
associatedComponents: { type: Array, default: null },
selectNow: { type: String, default: '' },
dataList: { type: Object, default: null },
})
}
const selectNav = (key) => {
select.value = key
console.log(key, select.value)
mybus.emit('flyToView', select.value)
}
if (props.dataList.infoList) {
list.value = []
let arr = [
'关联应用',
'组件视频介绍',
'功能介绍',
'应用场景',
'应用案例',
'使用方式',
'常见问题',
]
//
// eslint-disable-next-line vue/no-mutating-props
props.dataList.infoList.sort((a, b) => {
return arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
})
props.dataList.infoList.map((item) => {
if (
item.attrType === '常见问题' ||
item.attrType === '功能介绍' ||
item.attrType === '应用场景' ||
item.attrType === '应用案例'
) {
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
}
})
list.value.unshift('关联应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
const select = ref('business-associated-ability')
const list = ref([])
// id
if (keyId) {
queryPartAppByKeyId2({ keyId: keyId }).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length > 0) {
//
navList.value.unshift({
name: '关联应用',
key: 'business-associated-ability',
show: true,
})
// list.value.push('')
console.log('navList', navList)
}
}
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
})
}
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(
() => props.selectNow,
(newValue) => {
select.value = newValue
const selectNav = (key) => {
select.value = key
mybus.emit('flyToView', select.value)
}
)
watch(
() => props.dataList,
(val) => {
if (val) {
list.value = []
let arr = [
'关联应用',
'组件视频介绍',
'功能介绍',
'应用场景',
'应用案例',
'使用方式',
'常见问题',
]
//
// eslint-disable-next-line vue/no-mutating-props
props.dataList.infoList.sort((a, b) => {
// console.log('==============>', a, b)
return arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
})
val.infoList.map((item) => {
if (
item.attrType === '常见问题' ||
item.attrType === '功能介绍' ||
item.attrType === '应用场景' ||
item.attrType === '应用案例'
) {
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
}
})
list.value.unshift('关联应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
if (props.dataList.infoList) {
list.value = []
let arr = [
'关联应用',
'组件视频介绍',
'功能介绍',
'应用场景',
'应用案例',
'使用方式',
'常见问题',
]
//
// eslint-disable-next-line vue/no-mutating-props
props.dataList.infoList.sort((a, b) => {
return arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
})
props.dataList.infoList.map((item) => {
if (
item.attrType === '常见问题' ||
item.attrType === '功能介绍' ||
item.attrType === '应用场景' ||
item.attrType === '应用案例'
) {
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
}
})
list.value.unshift('关联应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
}
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) =>
(item.name === '关联应用') | (item.name === list.value[0])
)[0].key
} else {
item.show = true
}
}
console.log('11111111111111111111111111', list.value, navList.value)
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
}
console.log('11111111111111111111111111', list.value, navList.value)
}
)
watch(
() => props.selectNow,
(newValue) => {
select.value = newValue
}
)
watch(
() => props.dataList,
(val) => {
if (val) {
list.value = []
let arr = [
'关联应用',
'组件视频介绍',
'功能介绍',
'应用场景',
'应用案例',
'使用方式',
'常见问题',
]
//
// eslint-disable-next-line vue/no-mutating-props
props.dataList.infoList.sort((a, b) => {
// console.log('==============>', a, b)
return arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
})
val.infoList.map((item) => {
if (
item.attrType === '常见问题' ||
item.attrType === '功能介绍' ||
item.attrType === '应用场景' ||
item.attrType === '应用案例'
) {
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
}
})
list.value.unshift('关联应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
if (item.name == '关联应用') {
if (props.associatedComponents[0].dataList.length != 0) {
item.show = true
}
} else {
item.show = true
}
}
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) =>
(item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
}
console.log('11111111111111111111111111', list.value, navList.value)
}
}
)
</script>
<style lang="less" scoped>
.business-navigation {
width: 19.12rem;
height: 0.84rem;
line-height: 0.8rem;
display: flex;
justify-content: space-around;
font-size: 0.24rem;
color: #666;
background: #fff;
padding: 0 3rem;
box-shadow: 0rem 0.05rem 0.1rem #f2f3fb;
position: relative;
.nav {
cursor: pointer;
.business-navigation {
width: 19.12rem;
height: 0.84rem;
line-height: 0.8rem;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
justify-content: space-around;
font-size: 0.24rem;
color: #666;
background: #fff;
padding: 0 3rem;
box-shadow: 0rem 0.05rem 0.1rem #f2f3fb;
position: relative;
.line {
width: 0.4rem;
height: 0.04rem;
.nav {
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.line {
width: 0.4rem;
height: 0.04rem;
}
}
.select {
color: #526aff;
.line {
background: #526aff;
}
}
}
.select {
color: #526aff;
.line {
background: #526aff;
}
}
}
</style>

View File

@ -164,6 +164,9 @@
businessArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
) {

View File

@ -89,6 +89,7 @@
list.value = []
props.dataList.infoList.map((item) => {
if (
item.attrType === '功能介绍' ||
item.attrType === '常见问题' ||
item.attrType === '应用案例' ||
item.attrType === '应用场景'
@ -96,9 +97,12 @@
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
} else if (item.attrType === '是否支持试用' && item.attrValue === '是') {
list.value.push('组件试用')
}
})
list.value.unshift('关联应用')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
@ -111,9 +115,12 @@
// }
}
})
select.value = navList.value.filter(
(item) => item.name === list.value[0]
)[0].key
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
// (item) => item.name === list.value[0]
)[0].key
}
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(
@ -137,10 +144,15 @@
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
} else if (
item.attrType === '是否支持试用' &&
item.attrValue === '是'
) {
list.value.push('组件试用')
}
})
list.value.unshift('关联应用')
list.value.push('组件试用')
// list.value.push('')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)

View File

@ -49,7 +49,7 @@
})
if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '试用地址'
(item) => item.attrType === '是否支持试用' && item.attrValue === '是'
)[0]
if (!obj) {
flag.value = false
@ -94,7 +94,9 @@
() => props.dataList,
(val) => {
if (val) {
let obj = val.infoList.filter((item) => item.attrType === '试用地址')[0]
let obj = val.infoList.filter(
(item) => item.attrType === '是否支持试用' && item.attrValue === '是'
)[0]
if (!obj) {
flag.value = false
} else {

View File

@ -90,7 +90,7 @@
values: '',
},
{
type: '最大级别',
type: '最大级别名称',
values: '',
},
],

View File

@ -82,7 +82,6 @@
const select = ref('layer-service-associated-ability')
const selectNav = (key) => {
select.value = key
console.log(key, select.value)
mybus.emit('flyToView', select.value)
}
if (props.dataList.infoList) {
@ -145,9 +144,12 @@
item.show = true
}
})
select.value = navList.value.filter(
(item) => item.name === list.value[0]
)[0].key
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
// (item) => item.name === list.value[0]
)[0].key
}
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(

File diff suppressed because it is too large Load Diff

View File

@ -220,7 +220,7 @@
<div>
<img src="../../assets/home/success.png" alt="" />
</div>
<p>您已成功申请能力,请耐心等待审批结果结果会第一时间通知您</p>
<p>您已成功申请能力请耐心等待审批结果结果会第一时间通知您</p>
</div>
</div>
</article>
@ -290,7 +290,7 @@
? list.value[0].children
.filter((val) => val.id == list.value[0].checkedList[0])[0]
.resourceName.concat(
list.value[0].checkedList.length > 0
list.value[0].checkedList.length > 1
? '等能力申请' + num.value + '个'
: '能力申请'
)
@ -452,8 +452,22 @@
sgcDel({ ids: ids }).then((res) => {
if (res.data.msg === 'success') {
mybus.emit('getSgcNum')
router.push({
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
}
})
} else {
router.push({
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
}
})
}

View File

@ -51,7 +51,7 @@
<script setup>
import { ref, reactive, defineProps } from 'vue'
import mybus from '@/myplugins/mybus'
import { updateVisits } from '@/api/home'
import { updateVisits, browsingInsert } from '@/api/home'
const props = defineProps({
resourceList: { type: Array, default: null },
resourceTotal: { type: String, default: '' },
@ -66,6 +66,9 @@
const openHref = (item) => {
console.log(item.id, 'wowowo')
console.log(item.visits, 'wowowo')
browsingInsert({ resourceId: item.id }).then((res) => {
// console.log(res)
})
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(item.id) === -1) {

View File

@ -7,7 +7,8 @@
]"
>
<div class="name">
<div class="name-bg"></div>
<div class="name-bg" v-if="!whoShow1.itShowXiHaiAn"></div>
<div class="name-bg-xihaian" v-else></div>
城市云脑通用能力服务平台
</div>
<div
@ -137,6 +138,7 @@
// // { name: '', key: 'houtaiguanli' },
// { name: '', key: 'assignCase' },
// ])
const whoShow1 = whoShow
const user = ref({
username: store.getters['user/username'],
})
@ -353,6 +355,14 @@
background-size: 100%;
margin-right: 0.15rem;
}
.name-bg-xihaian {
height: 0.6rem;
width: 0.6rem;
background: url('~@/assets/newHome/newHome-title-bg-xihaian.png')
no-repeat;
background-size: 100%;
margin-right: 0.15rem;
}
}
.nav {
width: 1.2rem;

View File

@ -50,6 +50,24 @@
:key="item.index"
>
<div class="item" :key="showKey">
<div
class="left"
style="display: flex; align-items: center"
v-if="
item.type === '应用资源' &&
item.infoList &&
item.infoList.filter((val) => val.attrType == '应用图片')[0]
"
>
<a-image
:width="106"
:preview="false"
:src="
item.infoList.filter((val) => val.attrType == '应用图片')[0]
.attrValue
"
/>
</div>
<div
class="left"
:class="
@ -78,7 +96,7 @@
? 'ywzj'
: ''
"
v-if="
v-else-if="
selectCardsname !== '基础设施' && selectCardsname !== '融合服务'
"
></div>

View File

@ -415,13 +415,13 @@
const getCamera = () => {
console.log('初始化调用')
console.log('不选左侧树的时候不调用接口', mapSearchParam.value)
if (mapSearchParam.value.parentId) {
getCameraByParentId(mapSearchParam.value).then((res) => {
console.log('RRRRRRRRRR', res.data.data)
dataSource.value = res.data.data
pagination.value.total = res.data.count
})
}
// if (mapSearchParam.value.parentId) {
getCameraByParentId(mapSearchParam.value).then((res) => {
console.log('RRRRRRRRRR', res.data.data)
dataSource.value = res.data.data
pagination.value.total = res.data.count
})
// }
}
//
const addShoppingCart = () => {

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-19 17:18:48
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-05-06 19:11:32
* @LastEditTime: 2022-07-16 15:01:48
* @Description: markdown编辑器
-->
<template>
@ -44,7 +44,7 @@
}
},
created() {
this.uuidSplice()
// this.uuidSplice()
this.getDevelopmentFile()
},
methods: {
@ -92,12 +92,15 @@
const blob = new Blob([file], {
type: 'md',
})
let myfile = new File([blob], this.uuidSnum + '.md')
if (this.uuidSnum === '') {
this.uuidSplice()
}
let myfile = new File([blob], this.uuidSnum)
var formData = new FormData()
const type = pinyin(this.dataFrom.type, {
pattern: 'initial',
}).replace(/\s*/g, '')
formData.append('fileName', this.uuidSnum + '.md')
formData.append('fileName', this.uuidSnum)
formData.append('type', type)
formData.append('file', myfile) // 'file' HTTP Post, file File
// formData.append('name', this.route.currentRoute.query.id + '.md')
@ -118,22 +121,33 @@
}
},
async getDevelopmentFile() {
debugger
const uuidParam = this.dataFrom.infoList.filter((item) => {
if (item.attrType === '技术文档') {
return item
}
})
let uuid = ''
if (uuidParam[0].attrValue) {
uuid = uuidParam[0].attrValue.split('/')[1].split('.')[0]
}
this.uuidSnum = uuid
const type = pinyin(this.dataFrom.type, {
pattern: 'initial',
}).replace(/\s*/g, '')
console.log(type)
const param = {
type: type,
resourceId: this.uuidSnum,
resourceId: uuid,
}
const res = await getDevelopmentFile(param)
this.text = res.data
let infoList = {
attrType: '技术文档',
attrValue: this.text.data,
delFlag: 0,
}
mybus.emit('chageDataFrom', infoList)
// let infoList = {
// attrType: '',
// attrValue: this.text.data,
// delFlag: 0,
// }
// mybus.emit('chageDataFrom', infoList)
console.log('res', res)
},
},

View File

@ -23,7 +23,13 @@
<div class="title">审批详情</div>
<template v-for="item in dataSource.data" :key="item">
<div class="oddNumbers">子单号:{{ item[0] }}</div>
<a-table :dataSource="item[1]" :columns="columns" />
<a-table :dataSource="item[1]" :columns="columns">
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'">
<a>{{ text }}</a>
</template>
</template>
</a-table>
</template>
</div>
</div>
@ -183,14 +189,12 @@
} else {
shifoushizujian.value = false
console.log(res.data.data.resourceDTO)
debugger
res.data.data.resourceDTO.infoList.forEach((val) => {
console.log(val, '111111111111111111111111')
if (val.attrValue === '智能算法') {
nameNotShow.value = true
algorithmShow.value = false
console.log(nameNotShow.value, algorithmShow.value, 'wowowo')
debugger
}
})
}
@ -268,6 +272,13 @@
text-align: center;
font-size: 16px;
}
:deep(.ant-table-tbody) > tr > .ant-table-cell:nth-child(5) {
width: 110px;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.oddNumbers {
margin-bottom: 0.05rem;
}

View File

@ -44,7 +44,9 @@
>
<template #title>
<span
@click="showItem(item.resourceId, item.type, item.delFlag)"
@click="
showItem(item.resourceId, item.type, item.delFlag, item)
"
style="cursor: pointer"
class="name"
>
@ -142,6 +144,7 @@
import { onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue'
import { updateVisits, browsingInsert } from '@/api/home'
import mybus from '@/myplugins/mybus'
import { getBsList, BsDel, getTopCategory } from '@/api/personalCenter'
const router = useRouter()
@ -171,7 +174,11 @@
console.log('编目一级=============>', res.data)
res.data.data.forEach((val) => {
// tabList.value.push(val.name)
if (val.name == '应用资源' || val.name == '组件服务') {
if (
val.name == '应用资源' ||
val.name == '组件服务' ||
val.name == '知识库'
) {
tabList.value.push(val.name)
}
})
@ -234,7 +241,9 @@
name: val.resourceDTO.name,
id: val.id,
checked: false,
visits: val.resourceDTO.visits,
type: val.resourceDTO.type,
link: val.resourceDTO.link,
resourceId: val.resourceId,
createDate: val.createDate,
description: val.resourceDTO.description,
@ -267,6 +276,28 @@
console.log('search======================>', name.value)
}
const openHref = (item) => {
browsingInsert({ resourceId: item.resourceId }).then((res) => {
// console.log(res)
})
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(item.resourceId) === -1) {
arrList.value.push(item.resourceId)
updateVisits({
id: item.resourceId,
visits: item.visits || '0',
}).then(() => {
window.sessionStorage.setItem('visits', JSON.stringify(arrList.value))
})
}
window.open(item.link)
// window.open(
// window.SITE_CONFIG.previewUrl +
// 'hisense_office/onlinePreview?url=' +
// btoa(encodeURI(item.fileHref))
// )
}
//id
const dataResourceId = ref([])
@ -334,16 +365,20 @@
console.log(e)
}
//
const showItem = (id, type, delFlag) => {
const showItem = (id, type, delFlag, item) => {
if (delFlag == 0) {
console.log('进入详情')
mybus.emit('tabsChange', { flag: id })
router.push({
path: '/details',
query: {
id: id,
},
})
console.log('进入详情', item)
if (item.type === '知识库') {
openHref(item)
} else {
mybus.emit('tabsChange', { flag: id })
router.push({
path: '/details',
query: {
id: id,
},
})
}
}
}
</script>
@ -374,6 +409,13 @@
span {
margin-right: 0.3rem;
}
.name {
max-width: 11rem;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.ant-list::-webkit-scrollbar {

View File

@ -68,8 +68,8 @@
</a-button>
</div>
</div>
<div class="items">
<div class="item" v-for="val in list" :key="val.id">
<div class="items" :key="showKey">
<div class="item" v-for="(val, valIndex) in list" :key="val.id">
<div class="item-top" @click="showBottom(val)">
<div>
<a-checkbox
@ -89,7 +89,6 @@
:loading="val.initLoading"
item-layout="horizontal"
:data-source="val.children"
:key="showKey"
>
<template #renderItem="{ item }">
<a-list-item>
@ -131,7 +130,7 @@
title="是否删除该记录?"
ok-text="是"
cancel-text="否"
@confirm="delOne(item)"
@confirm="delOne(item, valIndex)"
@cancel="cancel"
>
<a-button
@ -453,7 +452,7 @@
reverseSelectionFalg.value = !reverseSelectionFalg.value
}
//
const clean = () => {
const clean = (index) => {
name.value = ''
type.value = ''
pageNum.value = '1'
@ -463,10 +462,10 @@
checkedListAll.value = []
checkAll.value = false
showKey.value++
getList()
getList('', index)
}
//
const getList = (type) => {
const getList = (type, index) => {
if (type == 'init') {
pageNum.value = 1
pageSize.value = 99999
@ -491,7 +490,7 @@
val.pageNum = '1'
val.pageSize = '99999'
})
if (statistics == res.data.data.list.length) {
if (statistics != 0 && statistics == res.data.data.list.length) {
checkAll.value = true
}
if (list.value.length == 0) {
@ -501,8 +500,31 @@
load.value = Number(pageNum.value)
}
// console.log('===============>', load.value)
//
debugger
list.value = res.data.data.list
if (index || index === 0) {
debugger
list.value[index].show = true
// console.log('1111', list.value[index])
showNew(list.value[index])
// showBottom()
}
// list.value = res.data.data.list
console.log(
'重新请求值',
index,
// res.data.data.list[index].show,
list.value
)
total.value = res.data.data.deptCount
console.log(
'重新请求值2',
index,
// res.data.data.list[index].show,
list.value
)
showKey.value++
if (type == 'init' || type == 'changePage') {
getListByDeptId(list.value[0])
@ -573,11 +595,15 @@
}
//
const showBottom = (item) => {
debugger
item.show = !item.show
if (item.show) {
getListByDeptId(item)
}
}
const showNew = (item) => {
getListByDeptId(item)
}
//
const pageChange = (val) => {
checkAll.value = false
@ -642,13 +668,13 @@
}
//
const judgeAll = (item, val) => {
// console.log(
// '============>',
// item,
// val,
// list.value,
// checkedList.value
// )
console.log(
'判断是否全选============>',
item,
val,
list.value,
checkedList.value
)
if (!val) {
let all = true
list.value.map((val) => {
@ -734,7 +760,7 @@
}
}
const delOne = (item) => {
const delOne = (item, index) => {
// console.log(item)
sgcDel({
ids: [item.id],
@ -743,7 +769,8 @@
message.success('删除成功')
// console.log('================>', res)
mybus.emit('getSgcNum')
clean()
clean(index)
// val.show = true
}
})
}