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

This commit is contained in:
gaoyuanwei 2022-07-16 15:27:49 +08:00
commit 123b64bc70
17 changed files with 243 additions and 127 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

@ -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

@ -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,8 +1,8 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 10:58:46
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-16 13:01:41
* @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

@ -74,8 +74,7 @@ instance.interceptors.request.use(
(config) => {
debugger
const token = getAccessToken()
if (token)
config.headers[tokenName] = token
if (token) config.headers[tokenName] = token
if (
config.data &&
config.headers['Content-Type'] ===
@ -105,7 +104,7 @@ instance.interceptors.response.use(
response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data
debugger
if (code=='0' && response.headers.token) {
if (code == '0' && response.headers.token) {
setAccessToken(response.headers.token)
} else {
const token = getAccessToken()

View File

@ -2,25 +2,25 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-11 16:39:36
* @LastEditTime: 2022-07-16 10:57:59
* @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 {
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) => {
} from '@/config'
import { setAccessToken, getAccessToken } from '@/utils/accessToken'
router.beforeEach(async (to, from, next) => {
// debugger
// const SSOTOKEN = to.query.SSOToken
// if (SSOTOKEN) {
@ -47,7 +47,7 @@
next()
} else {
//
getUserInfo().then(res=>{
getUserInfo().then((res) => {
console.log(res)
router.replace('/home')
})
@ -60,7 +60,7 @@
// window.open('http://www.baidu.com', '_self')
}
}
})
router.afterEach((to) => {
})
router.afterEach((to) => {
document.title = getPageTitle(to.meta.title)
})
})

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

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 17:38:56
* @LastEditTime: 2022-07-16 14:27:31
* @Description: 算法上架
-->
<template>
@ -449,6 +449,21 @@
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;

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 17:34:47
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-16 15:05:16
* @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>
@ -693,6 +695,7 @@
console.log('targetKeys: ', nextTargetKeys)
console.log('direction: ', direction)
console.log('moveKeys: ', moveKeys)
targetKeys.value = moveKeys
}
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
@ -1021,4 +1024,7 @@
font-weight: 400;
text-align: left;
}
:deep(.ant-transfer-list-header .ant-checkbox-wrapper) {
display: none !important;
}
</style>

View File

@ -149,11 +149,6 @@
dataFrom.value.content[1].childrenContent.push(itemContent)
})
}
let obj = {
attrType: '访问地址',
attrValue: props.dataList.link || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
}
)

View File

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

View File

@ -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 + '个'
: '能力申请'
)

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

@ -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

@ -43,16 +43,15 @@
style="position: relative"
>
<template #title>
<a-tooltip placement="top">
<template #title>{{ item.name }}</template>
<span
@click="showItem(item.resourceId, item.type, item.delFlag)"
@click="
showItem(item.resourceId, item.type, item.delFlag, item)
"
style="cursor: pointer"
class="name"
>
{{ item.name }}
</span>
</a-tooltip>
<span class="time">浏览时间{{ item.createDate }}</span>
<svg
t="1652233950228"
@ -145,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()
@ -174,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)
}
})
@ -237,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,
@ -270,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([])
@ -337,9 +365,12 @@
console.log(e)
}
//
const showItem = (id, type, delFlag) => {
const showItem = (id, type, delFlag, item) => {
if (delFlag == 0) {
console.log('进入详情')
console.log('进入详情', item)
if (item.type === '知识库') {
openHref(item)
} else {
mybus.emit('tabsChange', { flag: id })
router.push({
path: '/details',
@ -349,6 +380,7 @@
})
}
}
}
</script>
<style lang="less" scoped>
.ant-list {

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
}
})
}