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

This commit is contained in:
gongjiale 2022-11-10 15:44:48 +08:00
commit 99d821ab7e
9 changed files with 446 additions and 226 deletions

View File

@ -52,6 +52,7 @@ export default {
// 获取数据列表
query () {
this.dataListLoading = true
if (this.mixinViewModuleOptions.getDataListURL !== '/resource/pageWithAttrs') {
this.$http.get(
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
// order: this.order,
@ -124,6 +125,38 @@ export default {
}).catch(() => {
this.dataListLoading = false
})
} else {
this.$http.post(
this.mixinViewModuleOptions.getDataListURL, {
pageNum: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,
pageSize: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,
...this.dataForm
}
).then(({ data: res }) => {
if (res.code !== 0) {
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.records : res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
if (this.dataList[0].type === '组件服务') {
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域' || item.attrType === '组件类型')
})
} else if (this.dataList[0].type === '应用资源') {
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域')
})
}
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data)
}
this.dataListLoading = false
}).catch(() => {
this.dataListLoading = false
})
}
},
// 多选
dataListSelectionChangeHandle (val) {
@ -381,7 +414,7 @@ export default {
this.$message({
type: 'success',
message: '删除成功!'
});
})
this.getDataList()
})
}).catch(() => {
@ -389,7 +422,7 @@ export default {
// type: 'info',
// message: '已取消删除'
// });
});
})
}
},
// 导出

View File

@ -130,7 +130,14 @@
>
<template slot-scope="scope">
<el-button
v-if="scope.row.infoList.filter(val=>val.attrType=='组件类型')[0].attrValue == '智能算法'"
v-if="scope.row.infoList.filter(val=>val.attrType=='组件类型')[0].attrValue == '智能算法' && scope.row.pinTop == 1"
type="text"
size="small"
@click="noToppingCapacity(scope.row)"
>取消置顶</el-button
>
<el-button
v-if="scope.row.infoList.filter(val=>val.attrType=='组件类型')[0].attrValue == '智能算法' &&scope.row.pinTop != 1"
type="text"
size="small"
@click="toppingCapacity(scope.row)"
@ -244,6 +251,7 @@ import qs from 'qs'
import { pinyin } from 'pinyin-pro'
import RelateApplication from './bsabilityai-relate-application.vue'
import putOnTheShelf from '@/views/modules/putOnTheShelf'
import Cookies from 'js-cookie'
export default {
mixins: [mixinViewModule],
data () {
@ -268,7 +276,7 @@ export default {
]
},
mixinViewModuleOptions: {
getDataListURL: '/resource/page',
getDataListURL: '/resource/pageWithAttrs',
getDataListIsPage: true,
exportURL: '/ability/bsabilityai/export',
deleteURL: '/resource/delete',
@ -279,11 +287,12 @@ export default {
fieldArr: dictionaries.fieldArr,
shareFormArr: dictionaries.shareFormArr,
dataForm: {
name: '',
creator: '',
orderField: 'pin_top',
orderType: 'DESC',
infoList: [],
delFlag: 0,
selectType: 0,
type: '组件服务'
type: '组件服务',
name: ''
},
// qp: false,
//
@ -323,31 +332,55 @@ export default {
message: '置顶成功',
type: 'success'
})
this.reset()
} else {
this.$message({
message: '置顶失败',
type: 'warning'
})
this.reset()
}
})
},
exportHandle () {
window.open(window.SITE_CONFIG.apiURL + '/resource/export?token=' + Cookies.get('ucsToken') + '&' + qs.stringify({
name: this.dataForm.name,
type: '组件服务',
orderField: 'pin_top',
orderType: 'DESC',
delFlag: 0
}))
},
noToppingCapacity (item) {
this.$http.put('/resource/cancel_pin_top/' + item.id).then(res => {
if (res.data.code == 0) {
this.$message({
message: '取消置顶成功',
type: 'success'
})
this.reset()
} else {
this.$message({
message: '取消置顶失败',
type: 'warning'
})
this.reset()
}
})
},
reset () {
this.$http
.get(
this.mixinViewModuleOptions.getDataListURL +
'?' +
qs.stringify({
// order: this.order,
// orderField: this.orderField,
// type: '',
page: 1,
limit: 10,
creator: '',
selectType: 0,
.post(
this.mixinViewModuleOptions.getDataListURL, {
pageNum: 1,
pageSize: 10,
orderType: 'DESC',
orderField: 'pin_top',
infoList: [],
delFlag: 0,
type: '组件服务',
name: ''
})
}
)
.then(({ data: res }) => {
this.dataForm.name = ''
@ -357,7 +390,7 @@ export default {
return this.$message.error(res.msg)
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list
? res.data.records
: res.data
this.dataList.map((item, index) => {
const dataListSinforList = []
@ -492,21 +525,17 @@ export default {
getDataList2 (names) {
if (names != null) {
this.$http
.get(
this.mixinViewModuleOptions.getDataListURL +
'?' +
qs.stringify({
// order: this.order,
// orderField: this.orderField,
// type: '',
.post(
this.mixinViewModuleOptions.getDataListURL, {
pageNum: 1,
pageSize: this.limit,
type: '组件服务',
creator: '',
selectType: 0,
pageSize: 10,
orderType: 'DESC',
orderField: 'pin_top',
infoList: [],
delFlag: 0,
type: '组件服务',
name: names
})
}
)
.then(({ data: res }) => {
if (res.code !== 0) {
@ -514,8 +543,8 @@ export default {
this.total = 0
return this.$message.error(res.msg)
}
if (res.data.list.length >= 0) {
this.dataList = res.data.list
if (res.data.records.length >= 0) {
this.dataList = res.data.records
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0

View File

@ -227,6 +227,7 @@ import dictionaries from '@/utils/dictionaries'
import RelateApplication from './bsabilityai-relate-application.vue'
import qs from 'qs'
import { type } from 'os'
import Cookies from 'js-cookie'
import putOnTheShelf from '@/views/modules/putOnTheShelf'
export default {
@ -359,6 +360,15 @@ export default {
'_blank'
)
},
exportHandle () {
window.open(window.SITE_CONFIG.apiURL + '/resource/export?token=' + Cookies.get('ucsToken') + '&' + qs.stringify({
name: this.dataForm.name,
type: '应用资源',
orderField: 'pin_top',
orderType: 'DESC',
delFlag: 0
}))
},
findValue (list, type) {
const found = list.find((item) => item.attrType === type)
if (found) {

View File

@ -0,0 +1,136 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-20 10:38:17
* @LastEditors: Light
* @LastEditTime: 2022-11-09 16:32:57
* @Description: 告诉大家这是什么
-->
<template>
<div class="systemUpdate">
<!-- <div class="item" @click="downloadTemplate()">
<svg t="1655692930310" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1593" width="200" height="200"><path d="M599.13 0.476L33.55 109.306a20.778 20.778 0 0 0-16.492 20.42v764.308a20.778 20.778 0 0 0 16.372 20.48l565.58 108.83a20.837 20.837 0 0 0 3.81 0.654 19.29 19.29 0 0 0 12.622-4.465 21.313 21.313 0 0 0 7.56-16.015V20.361a21.313 21.313 0 0 0-7.56-16.074 19.23 19.23 0 0 0-16.313-3.81z m-206.11 696.08l-46.14-83.348c-10.597-18.575-20.241-37.864-32.148-59.951h-2.203c-10.538 21.67-20.004 40.305-29.767 58.344l-43.937 76.323-87.278-5 115.557-175.985L158.454 342.8l91.147-5.953 41.317 70.608c9.466 16.55 18.337 33.697 30.541 55.784h2.798c9.824-22.683 18.159-40.543 27.03-58.404l38.935-77.395 86.683-5.953-108.592 188.249L483.93 701.915zM966.519 122.76H663.487v143.36h40.364v40.96h-40.364v102.4h40.364v40.96h-40.364V552.9h40.364v40.96h-40.364v122.939h40.364v40.96h-40.364v143.419h302.972a40.781 40.781 0 0 0 40.424-40.96V163.72a40.781 40.781 0 0 0-40.364-40.96zM905.912 757.7H744.275v-40.96h161.637z m0-163.9H744.275v-40.9h161.637z m0-143.418H744.275v-40.9h161.637z m0-143.42H744.275v-40.84h161.637z" fill="#1296db" p-id="1594"></path></svg>
<span>下载模板</span>
</div> -->
<el-upload
ref="addUpload"
class="item"
:action="fileUploadUrl"
:on-success="onSuccess"
:on-remove="onRemove"
:show-file-list='false'
:on-error="onErrorFile"
:on-exceed='onExceed'
:limit='1'
:on-preview="onPreview"
list-type="text"
>
<svg t="1655692986683" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2083" width="200" height="200"><path d="M192 256v29h9.9c-6.5-9.3-9.9-19-9.9-29z m384 128c-41.9 0-82.3-2.2-120-6.4L590.2 512 467.5 634.8c34.4 3.4 70.8 5.2 108.5 5.2 212.1 0 384-57.3 384-128V256c0 70.7-171.9 128-384 128z m-263.9-99h51.3l17.2 17.2c57.2 11.3 124 17.8 195.4 17.8 212.1 0 384-57.3 384-128S788.1 64 576 64s-384 57.3-384 128c0 36.6 46.2 69.7 120.1 93zM576 704c-59.1 0-115.2-4.5-165.2-12.4L363.4 739H192v93c0 70.7 171.9 128 384 128s384-57.3 384-128V576c0 70.7-171.9 128-384 128z" fill="#E6C27C" p-id="2084"></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#497CAD" p-id="2085"></path></svg>
<div>导入更新包</div>
</el-upload>
</div>
</template>
<script>
import Cookies from 'js-cookie'
export default {
name: '',
components: {
},
props: {
},
data () {
return {
fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload?token=' + Cookies.get('ucsToken')
}
},
methods: {
downloadTemplate () {
window.open(window.SITE_CONFIG.apiURL + '/%E8%83%BD%E5%8A%9B%E8%B5%84%E6%BA%90%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx?token=' + Cookies.get('ucsToken'))
},
onSuccess (res, file) {
if (res.code == 0) {
this.$http.post('/admin/update?token=' + Cookies.get('ucsToken'), { updateFile: res.data }).then(up => {
console.log(up, '11111111111111111111111')
this.$message({
message: '导入成功',
type: 'success'
})
this.$refs.addUpload.clearFiles()
})
} else {
this.$message('导入失败!')
this.$refs.addUpload.clearFiles() //
}
},
onErrorFile () {
this.$message('导入失败!')
this.$refs.addUpload.clearFiles() //
},
onRemove (file, fileList) {
console.log(file, fileList)
},
onPreview (file) {
console.log('点击预览===============>', file)
window.open(file.response.data)
},
onExceed (files, fileList) {
this.$message.warning('当前附件数量已达上限,请先删除部分附件!')
}
}
}
</script>
<style lang='scss' scoped>
.systemUpdate {
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
padding: 250px 300px;
.item {
padding: 20px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 1px solid rgba(0, 0, 0, 0);
span {
font-size: 20px;
font-weight: 600;
margin-top: 20px;
}
div {
font-size: 20px;
font-weight: 600;
margin-top: 20px;
}
}
.item:hover {
cursor: pointer;
border: 1px solid #1296db;
border-radius: 10px;
svg {
animation: turn 2s linear infinite;
animation-iteration-count: 1;
}
}
}
@keyframes turn {
0% {
-webkit-transform: rotateY(0deg);
}
25% {
-webkit-transform: rotateY(90deg);
}
50% {
-webkit-transform: rotateY(180deg);
}
75% {
-webkit-transform: rotateY(270deg);
}
100% {
-webkit-transform: rotateY(360deg);
}
}
</style>

View File

@ -2,6 +2,12 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__dept">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.deptName" :placeholder="$t('dept.name')" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:dept:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}
</el-button>
@ -42,77 +48,22 @@
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './dept-add-or-update'
import qs from 'qs'
export default {
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/dept/list',
getDataListURL: '/sys/dept/page',
getDataListIsPage: true,
deleteURL: '/sys/dept'
},
total: 0,
limit: 10,
page: 1,
dataList: []
dataForm: {
deptName: ''
}
}
},
components: {
AddOrUpdate
},
watch: {
dataList: {
handler: function () {
this.getData()
}
}
},
methods: {
// ,
pageSizeChangeHandle (val) {
this.page = 1
this.limit = val
this.getData()
},
// ,
pageCurrentChangeHandle (val) {
this.page = val
this.getData()
},
getData() {
// debugger
let _data = {
limt: this.limit,
page: this.page,
}
this.$http.get('sys/dept/page', {
params: _data
}).then((res) => {
this.total = res.data.data.total;
res.data.data.list.map((item, index) => {
console.log('item, index------------>', item, index);
if (item.district != null || item.children.length >= 0) {
this.$http.get('/sys/region/' + item.district).then((data) => {
this.dataList[index].district = data.data.data.name
console.log('datafrom', this.dataList)
})
if (item.children.length > 0) {
item.children.map((item2, index2) => {
if (item2.district != null) {
this.$http.get('/sys/region/' + item2.district).then((data) => {
this.dataList[index].children[index2].district = data.data.data.name
console.log('datafrom', this.dataList)
})
}
})
}
}
})
})
},
},
created() {
this.getData()
}
}
</script>

Binary file not shown.

View File

@ -1169,28 +1169,38 @@
str = searchValue.value.substring(0, 2)
r = re.test(str)
}
if (
(searchValue.value.length > 1 && r) ||
paramsGetResources.type === '基础设施'
) {
if (searchValue.value.length > 1 && r) {
flag = false
} else {
flag = true
}
getCountByFuzzyQuery(searchValue.value || '', flag).then((res) => {
console.log('全局搜索==========》', res.data.data)
const arr = []
const sortArr = [
'应用资源',
'组件服务',
'基础设施',
'数据资源',
'知识库',
]
globalData.data = res.data.data
let mapFlag = true
res.data.data.map((val) => {
if (mapFlag && val.count != 0) {
if (val.count != 0) {
mapFlag = false
if (Cardsname.value === val.type) {
getAppResources2()
} else {
changeCards(val.type)
}
arr.push(val.type)
}
})
arr.sort((a, b) => {
return sortArr.indexOf(a) - sortArr.indexOf(b)
})
console.log('arr', arr)
if (Cardsname.value === arr[0]) {
getAppResources2()
} else {
changeCards(arr[0])
}
if (!mapFlag) {
return
}
@ -1287,10 +1297,7 @@
str = searchValue.value.substring(0, 2)
r = re.test(str)
}
if (
(searchValue.value.length > 1 && r) ||
paramsGetResources.type === '基础设施'
) {
if (searchValue.value.length > 1 && r) {
paramsGetResources.nonChinese = false
paramsGetResources.name = searchValue.value
paramsGetResources.type = Cardsname.value

View File

@ -1178,6 +1178,7 @@
console.log(res)
visible.value = true
options.src = res.data.data
//options.src ="wss://10.134.135.45:6014/proxy/10.10.20.15:559/openUrl/0kIF7La"
})
// // --
// visible.value = true

View File

@ -225,14 +225,51 @@
style="cursor: pointer"
@click="
openView(
backUrl + 'resource/hls/getHls/?key=' + val.channelId
'http://10.134.135.92:9537/data_service/getCamera/getCameraLiveStream?cameraIndexCode=' + val.channelCode+'&protocol=wss&transmode=1&streamType=1'
)
"
>
{{ backUrl + 'resource/hls/getHls/?key=' + val.channelId }}
{{ 'http://10.134.135.92:9537/data_service/getCamera/getCameraLiveStream?cameraIndexCode=' + val.channelCode+'&protocol=wss&transmode=1&streamType=1' }}
</span>
</div>
</div>
<div class="button-bottom" v-if="item.approveStatus == '通过'">
<a
style="
display: inline-block;
width: 88px;
height: 32px;
line-height: 32px;
text-align: center;
background: #40a9ff;
border-radius: 5px;
font-size: 14px;
color: #fff;
cursor:pointer;
"
href="/static/download/InstallRootCert.exe"
>
证书下载
</a>
<span
style="
display: inline-block;
width: 88px;
height: 32px;
line-height: 32px;
text-align: center;
background: #40a9ff;
border-radius: 5px;
font-size: 14px;
color: #fff;
margin-left:40px;
cursor:pointer;
"
@click="downLoadClient()"
>
客户端下载
</span>
</div>
</div>
</div>
</div>
@ -319,12 +356,18 @@
dept.deptName = infrastructure.deptName
}
const showThis = () => {
console.log('props.refObj.enclosure',props.refObj);
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(props.refObj.enclosure))
btoa(encodeURI(props.refObj))
)
}
//
const downLoadClient = () => {
let url = "https://open.hikvision.com/download/5c67f1e2f05948198c909700?type=10";
window.open( url, '_blank')
}
const showArr = ref([])
console.log(props.refObj, '=====================================')
const endThis = (instanceId) => {
@ -518,6 +561,8 @@
})
}
const openView = (url) => {
console.log('valval',url);
//http://10.134.135.92:9537/data_service/getCamera/getCameraLiveStream?cameraIndexCode=37021100421318000090&protocol=wss&transmode=1&streamType=1
window.open(url, '_blank')
}
</script>
@ -566,6 +611,10 @@
width: 2.5rem;
}
}
.downButton{
display: flex;
justify-content: normal;
}
}
}
.bottom {
@ -592,7 +641,7 @@
.box {
margin-left: 0.1rem;
.ability {
height: 1.6rem;
height: 2.0rem;
display: flex;
border-bottom: 1px #eee solid;
padding: 0.1rem 0;
@ -700,6 +749,10 @@
position: relative;
}
}
.button-bottom{
margin-top: 0;
margin-bottom: 10px;
}
}
.DownloadAttachment {
position: absolute;