Compare commits

...

18 Commits

Author SHA1 Message Date
wuhongjian c9a5bf9f69 合并版本v0.8.3.2 2022-07-28 16:58:01 +08:00
wuhongjian e47d7cf470 Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev 2022-07-28 14:43:04 +08:00
wuhongjian b766bcf8fa bug修复 2022-07-28 14:42:44 +08:00
a0049873 bd839fd335 隐藏高级搜索 2022-07-28 14:21:20 +08:00
a0049873 5d3388465f BUG修改 视频展示多个/ 2022-07-28 14:13:49 +08:00
guoyue 78f836dd92 赋能场景:数据资源接口联调 2022-07-28 10:31:42 +08:00
guoyue 20de75e0dd 合并 2022-07-28 10:19:01 +08:00
guoyue 480d887b6d 融合服务 赋能场景 后台管理增删改查 2022-07-28 10:15:49 +08:00
a0049873 fd3a7ef353 基础设施输入框 去除X 2022-07-28 09:40:05 +08:00
a0049873 a11d9eb221 能力申请 摄像头修改 2022-07-27 16:58:31 +08:00
gaoyuanwei 531aa7aafb 前台上架-预览bug修复 2022-07-27 16:19:34 +08:00
851673013@qq.com ef980d77c3 基础设施视频接口调换 2022-07-27 14:19:51 +08:00
lizhicheng2 291b65d03f 前台融合服务页面修改 2022-07-27 13:53:59 +08:00
851673013@qq.com bb9856e5c1 前台富文本样式修改 2022-07-27 11:07:34 +08:00
851673013@qq.com 42020cd1be 富文本前台样式修改 2022-07-27 11:02:32 +08:00
wuhongjian 806a45ccf7 后台开发文档 2022-07-27 10:54:34 +08:00
guoyue a5e5c35da8 Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev 2022-07-25 19:15:08 +08:00
guoyue f161ca967a add:赋能场景基础设施弹框 2022-07-25 19:07:07 +08:00
30 changed files with 1536 additions and 204 deletions

View File

@ -34,6 +34,7 @@
"lodash": "^4.17.19",
"monaco-editor": "^0.20.0",
"monaco-editor-webpack-plugin": "^1.9.0",
"pinyin-pro": "^3.11.0",
"qs": "^6.9.4",
"quill": "^1.3.7",
"sass": "^1.51.0",

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-11 10:11:40
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-21 15:03:51
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-26 20:23:13
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>
@ -27,7 +27,8 @@
'isTab': true, // 是否通过tab展示内容?
'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配)
};
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.243:9796/#/vueTemplateDemo';
window.SITE_CONFIG['frontUrl'] = 'http://localhost:8080/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.243:9796/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9797/#/vueTemplateDemo';
@ -45,7 +46,7 @@
// 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.236:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.236:9796/';
window.SITE_CONFIG['previewUrl'] = 'http://localhost:8080/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
// WebSocket地址
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';

View File

@ -2,12 +2,7 @@
<div>
<el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalTypeText[modalType]" @close="closeModal"
:close-on-click-modal="false" :close-on-press-escape="false">
<div style="
text-align: center;
font-weight: 600;
font-size: 18px;
margin-bottom: 10px;
">
<div class="first-title">
填写字段
</div>
<el-checkbox-group v-model="checkList" @change="changeBtn" style="margin-bottom: 20px">
@ -36,12 +31,21 @@
<el-input type="textarea" :rows="3" class="input-box" v-model="dataForm.description"
placeholder="请输入融合服务描述"></el-input>
</el-form-item>
<el-form-item label="支撑场景" prop="applicationArea">
<el-select v-model="dataForm.applicationArea" placeholder="请选择支撑场景" filterable>
<el-form-item label="应用领域" prop="applicationArea">
<el-select v-model="dataForm.applicationArea" placeholder="请选择应用领域" filterable>
<el-option v-for="item in areaList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="图片">
<el-upload ref="editUpload" class="upload-demo" :action="fileUploadUrl"
:on-success="eidtHandleAvatarSuccess" :before-upload="editBeforeAvatarUpload" :limit="1" :file-list="[]"
:on-remove="editUploadRemoveFile" :on-exceed="handleExceed" list-type="picture">
<el-button size="small" type="primary" class="button-new">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传图片文件</div>
<img v-if="imageUrl" :src="imageUrl" class="avatar" />
</el-upload>
</el-form-item>
</div>
<!-- 组合能力 -->
@ -49,8 +53,10 @@
<div class="title">
组合能力
</div>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施" ref="jcssDom"
:getDataParams="getListParams['基础设施']"></combine-ability>
<!-- <combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施" ref="jcssDom"
:getDataParams="getListParams['基础设施']"></combine-ability> -->
<InfrastructureModal v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施"
ref="jcssDom"></InfrastructureModal>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="数据资源" ref="sjzyDom"
:getDataParams="getListParams['数据资源']"></combine-ability>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="组件服务" ref="zjfwDom"
@ -79,21 +85,28 @@ import CombineAbility from './components/combine-ability.vue';
import Cookies from 'js-cookie'
import { tableColumns } from './IntegratedServices.vue';
import { getFuseResourceList, getListParams, modalTypeText } from "./assignedScene/add-update-scene.vue";
import InfrastructureModal from './assignedScene/components/infrastructure-modal.vue'
export default {
components: {
CommonQuestion,
IntegratedCombineAbility,
CombineAbility,
InfrastructureModal,
},
data() {
return {
fileUploadUrl: `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('ucsToken')}`,
fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload',
dataForm: {
"name": "",
"applicationArea": "",
"description": "",
"fuseAttrList": [],
"fuseAttrList": [
{
"attrType": "服务图片",
"attrValue": "",
},
],
//
"fuseResourceList": [
{
@ -101,7 +114,7 @@ export default {
"sequence": ""
}
],
type: '融合服务'
type: '打包模式'
},
rules: {
name: [
@ -131,7 +144,12 @@ export default {
'jcssDom': '基础设施',
},
modalTypeText: modalTypeText,
abilityListObj: {}
abilityListObj: {},
//
handleExceed() {
this.$message({ type: 'error', message: '最多支持一张图片上传' })
},
imageUrl: ''
};
},
props: {
@ -222,6 +240,11 @@ export default {
'update': 'put'
}
this.dataForm.fuseResourceList = this.getFuseResourceList()
if (this.imageUrl == '') {
this.$message.error("请上传图片!");
return;
}
this.dataForm.fuseAttrList.find(v => v.attrType == '服务图片').attrValue = this.imageUrl || '';
this.$http
[methodsObj[this.modalType]]("/fuse", this.dataForm)
.then(({ data: res }) => {
@ -254,8 +277,55 @@ export default {
for (const key in this.refsParseArray) {
this.$refs[key] && this.$refs[key].getDataInfo && this.$refs[key].getDataInfo(data)
}
let _imgObj = data.fuseAttrList.find(v => v.attrType == '服务图片') || {};
this.imageUrl = _imgObj.attrValue;
console.log('this.dataForm----详情-------->', this.dataForm);
})
},
beforeAvatarUpload(file) {
const isImage =
file.type === 'image/jpeg' ||
file.type === 'image/jpg' ||
file.type === 'image/png'
// const isLt2M = file.size / 1024 / 1024 < 2
if (!isImage) {
this.$message.error('上传头像图片只能是 jpg/png 格式!')
}
// if (!isLt2M) {
// this.$message.error(' 2MB!')
// }
return isImage
},
addUploadRemoveFile(file, fileList) {
this.$refs.addUpload.clearFiles()
this.imageUrl = ''
},
editBeforeAvatarUpload(file) {
const isImage =
file.type === 'image/jpeg' ||
file.type === 'image/jpg' ||
file.type === 'image/png'
// const isLt2M = file.size / 1024 / 1024 < 2
if (!isImage) {
this.$message.error('上传头像图片只能是 jpg/png 格式!')
}
// if (!isLt2M) {
// this.$message.error(' 2MB!')
// }
return isImage
},
editUploadRemoveFile(file, fileList) {
this.$refs.editUpload.clearFiles()
this.imageUrl = ''
},
eidtHandleAvatarSuccess(res, file) {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.imageUrl = res.data
},
},
beforeDestroy() {
this.clearForm()
@ -369,4 +439,25 @@ export default {
.input-box {
width: 90%;
}
.first-title {
text-align: center;
font-weight: 600;
font-size: 18px;
margin-bottom: 10px;
}
.title {
text-align: center;
font-weight: 600;
font-size: 18px;
margin-bottom: 10px;
}
.avatar {
height: 100px;
width: 100px;
display: block;
}
</style>

View File

@ -57,7 +57,7 @@ import { type } from "os";
export const tableColumns = {
'name': '融合服务名称',
'description': '融合服务描述',
'applicationArea': '支撑场景',
'applicationArea': '应用领域',
}
export default {
@ -78,7 +78,7 @@ export default {
name: "",
order: 'desc',
orderField: 'create_date',
type: '融合服务'
type: '打包模式'
},
qp: false,
modalType: 'add',

View File

@ -2,12 +2,7 @@
<div>
<el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalTypeText[modalType]" @close="closeModal"
:close-on-click-modal="false" :close-on-press-escape="false">
<div style="
text-align: center;
font-weight: 600;
font-size: 18px;
margin-bottom: 10px;
">
<div class="first-title">
填写字段
</div>
<el-checkbox-group v-model="checkList" @change="changeBtn" style="margin-bottom: 20px">
@ -36,6 +31,17 @@
<el-input type="textarea" :rows="3" v-model="dataForm.description" placeholder="请输入描述" style="width:90%">
</el-input>
</el-form-item>
<el-form-item label="图片">
<el-upload ref="editUpload" class="upload-demo" :action="fileUploadUrl"
:on-success="eidtHandleAvatarSuccess" :before-upload="editBeforeAvatarUpload" :limit="1" :file-list="[]"
:on-remove="editUploadRemoveFile" :on-exceed="handleExceed" list-type="picture">
<el-button size="small" type="primary" class="button-new">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传图片文件</div>
<img v-if="imageUrl" :src="imageUrl" class="avatar" />
</el-upload>
</el-form-item>
</div>
<!-- 场景痛点 -->
@ -55,8 +61,8 @@
<div class="title">
组合能力
</div>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施" ref="jcssDom"
:getDataParams="getListParams['基础设施']"></combine-ability>
<InfrastructureModal v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施"
ref="jcssDom"></InfrastructureModal>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="数据资源" ref="sjzyDom"
:getDataParams="getListParams['数据资源']"></combine-ability>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="组件服务" ref="zjfwDom"
@ -93,12 +99,13 @@ import qs from "qs";
import SceneUseStep from './components/scene-use-step.vue';
import SceneOneInput from './components/scene-one-input.vue';
import CombineAbility from '../components/combine-ability.vue';
import IntegratedCombineAbility from '../components/integrated-combine-ability.vue';
import Cookies from 'js-cookie'
import CommonQuestion from '../components/common-question.vue';
import InfrastructureModal from './components/infrastructure-modal.vue'
import Cookies from 'js-cookie'
import upload from '@/views/modules/components/upload'
let btnArray = ['基本信息', '场景痛点', '解决方案', '组合能力', '更多能力', '使用步骤']
// \
export const getJson = (type) => {
return {
methods: 'get',
@ -116,19 +123,13 @@ export const getDescJson = (text) => {
},
}
}
//
export const getListParams = {
'基础设施': {
methods: 'get',
url: '',
postData: {
}
},
'数据资源': getJson('数据资源'),
'组件服务': getJson('组件服务'),
'基础设施': ''
}
//
export const modalTypeText = {
add: '挂接',
update: '修改'
@ -157,14 +158,15 @@ export const getFuseResourceList = (abilityListObj) => {
export default {
components: {
SceneUseStep,
IntegratedCombineAbility,
CommonQuestion,
CombineAbility,
SceneOneInput,
upload,
CommonQuestion,
InfrastructureModal,
},
data() {
return {
fileUploadUrl: `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('ucsToken')}`,
fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload',
moreKeyTextObj: {
nameObj: {
text: '能力名称',
@ -175,6 +177,7 @@ export default {
painKeyTextObj: getDescJson('痛点'),
solutionKeyTextObj: getDescJson('方案'),
dataForm: {
"name": "",
"applicationArea": "",
"description": "",
"fuseAttrList": [
@ -194,19 +197,12 @@ export default {
"attrType": "解决方案",
"attrValue": [{ description: "" }],
},
],
"fuseResourceList": [
{
"resourceId": '',
"sequence": ""
}
"attrType": "服务图片",
"attrValue": "",
},
],
"mobile": "",
"name": "",
"provider": "",
"providerMobile": "",
"providerUser": "",
"deptUser": "",
"fuseResourceList": [],
},
rules: {
name: [
@ -242,7 +238,13 @@ export default {
'jcssDom': '基础设施',
},
getListParams: getListParams,
abilityListObj: {}
abilityListObj: {},
imgData: [],
//
handleExceed() {
this.$message({ type: 'error', message: '最多支持一张图片上传' })
},
imageUrl: '',
};
},
props: {
@ -323,10 +325,14 @@ export default {
'update': 'put'
}
this.dataForm.fuseResourceList = this.getFuseResourceList()
if (this.imageUrl == '') {
this.$message.error("请上传图片!");
return;
}
this.dataForm.fuseAttrList.find(v => v.attrType == '服务图片').attrValue = this.imageUrl || '';
let _obj = Object.assign({}, this.dataForm, {
type: '赋能场景'
})
this.$http
[methodsObj[this.modalType]]("/fuse", _obj)
.then(({ data: res }) => {
@ -359,9 +365,62 @@ export default {
for (const key in this.refsParseArray) {
this.$refs[key] && this.$refs[key].getDataInfo && this.$refs[key].getDataInfo(data)
}
let _imgObj = data.fuseAttrList.find(v => v.attrType == '服务图片') || {};
this.imageUrl = _imgObj.attrValue
console.log('this.dataForm----详情-------->', this.dataForm);
})
},
handleAvatarSuccess(res, file) {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.imageUrl = res.data
},
beforeAvatarUpload(file) {
const isImage =
file.type === 'image/jpeg' ||
file.type === 'image/jpg' ||
file.type === 'image/png'
// const isLt2M = file.size / 1024 / 1024 < 2
if (!isImage) {
this.$message.error('上传头像图片只能是 jpg/png 格式!')
}
// if (!isLt2M) {
// this.$message.error(' 2MB!')
// }
return isImage
},
addUploadRemoveFile(file, fileList) {
this.$refs.addUpload.clearFiles()
this.imageUrl = ''
},
editBeforeAvatarUpload(file) {
const isImage =
file.type === 'image/jpeg' ||
file.type === 'image/jpg' ||
file.type === 'image/png'
// const isLt2M = file.size / 1024 / 1024 < 2
if (!isImage) {
this.$message.error('上传头像图片只能是 jpg/png 格式!')
}
// if (!isLt2M) {
// this.$message.error(' 2MB!')
// }
return isImage
},
editUploadRemoveFile(file, fileList) {
this.$refs.editUpload.clearFiles()
this.imageUrl = ''
},
eidtHandleAvatarSuccess(res, file) {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.imageUrl = res.data
// this.imageUrl = URL.createObjectURL(file.raw);
},
},
beforeDestroy() {
this.clearForm()
@ -403,7 +462,7 @@ export default {
}
</style>
<style lang="scss">
<style lang="scss" scoped>
.mod-sys__menu {
.menu-list,
@ -478,4 +537,17 @@ export default {
font-size: 18px;
margin-bottom: 10px;
}
.first-title {
text-align: center;
font-weight: 600;
font-size: 18px;
margin-bottom: 10px;
}
.avatar {
height: 100px;
width: 100px;
display: block;
}
</style>

View File

@ -0,0 +1,81 @@
<template>
<div class="show-box" v-if="displayList.length > 0">
<div class="list-box">
<div v-for="(item, i) in displayList" :key="i">
<el-tooltip popper-class="testTooltip" effect="dark" :content="item[showKey] || '--'" placement="top">
<div class="list-item">
{{ item[showKey] || '--' }}
</div>
</el-tooltip>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
displayList: {
type: Array,
default: () => []
},
showKey: {
type: String,
default: 'name'
},
},
watch: {
displayList: {
handler(newVal) {
this.displayList = newVal;
},
deep: true,
immediate: true,
}
}
}
</script>
<style lang="scss" scoped>
.show-box {
display: flex;
justify-content: flex-start;
align-items: flex-start;
}
.top {
display: flex;
align-items: center;
justify-content: flex-start;
}
.type {
padding-right: 12px;
font-size: 14px;
color: #606266;
width: 100px;
box-sizing: border-box;
text-align: right;
line-height: 40px;
height: 40px;
}
.list-box {
display: flex;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
margin-left: 100px;
}
.list-item {
font-size: 14px;
color: #606266;
width: 380px;
text-align: left;
margin-right: 10px;
line-height: 40px;
height: 40px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>

View File

@ -0,0 +1,494 @@
<template>
<div>
<div class="top flex-row-start">
<div class="type">{{ type }}</div>
<el-button type="primary" size="small" @click="showModal = true">添加</el-button>
</div>
<el-dialog class="modal-box" :visible.sync="showModal" title="请选择" @close="close" :close-on-click-modal="false"
:close-on-press-escape="false" :key="showKey" append-to-body>
<div class="infrastructure-box">
<div class="search-box">
<div class="flex-row-start" style="margin-bottom:10px">
<div class="left-text">设施类型</div>
<div class="flex-row-start btn-list">
<div class="btn-text" v-for="(item) in btnList" :key="item"
:class="{ 'active-btn': item === activeBtn }" @click="changeBtn(item)">
{{ item }}
</div>
</div>
</div>
<div class="flex-row-start" style="margin-bottom:10px;align-items: flex-start;">
<div class="left-text" style="margin-top: 8px;">{{ showText[activeBtn] }}</div>
<div style="flex:1;">
<el-button v-if="activeBtn == '视频资源'" type="primary"
style="margin-left:10px;margin-bottom:10px" size="small" @click="clearVideo">清空
</el-button>
<div class="flex-row-start btn-list video-btn-list">
<div class="btn-text" v-for="(item) in currentList" :key="item.labelCode"
:class="{ 'active-btn': checkList.includes(item.labelCode) }"
@click="changeVideoBtn(item)">
{{ item.labelName }}
</div>
</div>
</div>
</div>
<div class="flex-row-start" style="margin-bottom:10px;align-items: flex-start;">
<div class="left-text" style="margin-top: 10px;">关键词</div>
<el-input style="margin-left:10px;width: 200px;" v-model="cameraName" placeholder="名称"
clearable>
</el-input>
<el-button type="primary" style="margin-left:10px;margin-top:4px" size="small" @click="getData">
搜索
</el-button>
</div>
</div>
<div class="tree-table-box">
<InfrastructureTree @changeParentId="changeParentId"></InfrastructureTree>
<div class="table-box">
<el-table v-loading="dataListLoading" :data="dataList" border ref="dataTable"
@selection-change="dataListSelectionChangeHandle"
style="width: 95%;margin: 0 auto 10px auto" size="mini">
<el-table-column type="selection" header-align="center" align="center" width="50">
</el-table-column>
<el-table-column prop="channelName" label="名称" header-align="center" align="center">
</el-table-column>
<el-table-column prop="nodeName" label="归属" header-align="center" align="center">
</el-table-column>
</el-table>
<el-pagination style="justify-content: center;display: flex;" :current-page="pageData.page"
:page-sizes="[10, 20, 50, 100]" :page-size="pageData.limit" :total="pageData.total"
layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</div>
</div>
<template slot="footer">
<el-button @click="showModal = false">{{ $t("cancel") }}</el-button>
<el-button type="primary" @click="confirmSubmitHandle()">{{
$t("confirm")
}}</el-button>
</template>
</el-dialog>
<DisplayList :displayList="displayList"></DisplayList>
</div>
</template>
<script>
import InfrastructureTree from './infrastructure-tree.vue'
import DisplayList from './display-list.vue';
export default {
components: {
InfrastructureTree,
DisplayList
},
props: {
//
maxNum: {
type: Number,
default: 10
},
type: {
type: String,
default: "基础设施"
},
},
data() {
const getYunList = () => {
let yunList = ['云主机', '算力主机', '对象存储', '堡垒机', '防火墙', '网闸', '负载均衡', '公网IP'];
let arr = []
yunList.map(v => arr.push({ labelCode: v, labelName: v }))
return arr
}
return {
showKey: 0,
showModal: false,
transferData: [], // 穿
selectedArray: [], // id
allData: [],
displayList: [], // list
btnList: ['视频资源', '云资源', '感知资源'],
showText: {
'视频资源': '视频标签',
'云资源': '云资源分类',
'感知资源': '感知资源分类',
},
tabData: [
{
tabName: '视频资源',
list: []
},
{
tabName: '云资源',
list: getYunList()
},
{
tabName: '感知资源',
list: []
},
],
activeBtn: '视频资源',
checkList: [],
currentList: [],
dataListLoading: false,
dataList: [],
pageData: {
limit: 10,
page: 1,
total: 0,
},
cameraName: '',
}
},
watch: {
async showModal(newVal) {
if (newVal) {
await this.getData();
//
this.$nextTick(() => {
this.selectCheckbox()
})
}
}
},
mounted() {
//
this.getVideoBtn()
//
this.getData()
},
methods: {
selectCheckbox() {
if (this.selectedArray.length > 0) {
let list = []
this.dataList.forEach((item) => {
this.selectedArray.forEach(val => {
if (val === item.idtCameraChannel) {
list.push(item)
}
})
})
if (list.length) {
list.forEach((row) => {
this.$refs.dataTable.toggleRowSelection(row, true)
})
}
}
},
async getDataInfo(dataForm) {
await this.getVideoBtn();
await this.getData();
let arr = [];
let attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type);
if (attrValue.length > 0) {
attrValue.map(val => {
let item = this.dataList.find(v => v.idtCameraChannel == val.resourceId) || {};
let _obj = {
type: val.type,
idtCameraChannel: val.resourceId,
name: item.channelName
};
arr.push(_obj);
});
}
//
this.displayList = JSON.parse(JSON.stringify(arr));
//
this.selectedArray = arr.map(v => v.idtCameraChannel);
},
handleShowModal() {
this.showModal = true;
},
//
dataListSelectionChangeHandle(data) {
this.selectedArray = data;
},
pageCurrentChangeHandle(page) {
this.pageData.page = page;
this.getData()
},
pageSizeChangeHandle(limit) {
this.pageData.limit = limit;
this.getData()
},
changeBtn(btn) {
this.activeBtn = btn;
this.checkList = [];
this.cameraName = '';
this.getData()
this.currentList = this.tabData.find(v => v.tabName == btn).list || []
},
//
getVideoBtn() {
return new Promise((resolve, reject) => {
this.$http.get('/api/project/selectAllLabel', {}).then(res => {
resolve(res)
if (res.data.code !== 1) {
return this.$message.error(res.msg);
}
this.tabData[0].list = res.data.data || [];
this.changeBtn(this.activeBtn)
}).catch(err => {
reject(err)
this.$message.error(err);
})
})
},
// -
clearVideo() {
this.checkList = []
this.getData()
},
//
changeVideoBtn(item) {
let _index = this.checkList.findIndex(v => item.labelCode == v)
if (_index > -1) {
this.checkList.splice(_index, 1)
} else {
this.checkList.push(item.labelCode)
}
},
//
getData(parentId = '') {
this.allData = [];
let postData = {
parentId: parentId,
cameraName: this.cameraName,
checkStatus: 1,
pageNum: this.pageData.page,
pageSize: this.pageData.limit,
gpsX: '',
gpsY: '',
radius: '',
labelCodes: '',
}
return new Promise((resolve, reject) => {
this.$http.get('/api/project/selectByParentIdNew', { params: postData }).then(res => {
resolve(res)
if (res.data.code !== 1) {
return this.$message.error(res.msg);
}
this.dataList = res.data.data || []
this.pageData.total = res.data.count || 0;
}).catch(err => {
reject(err)
this.$message.error(err);
})
})
},
changeParentId(parentId) {
this.getData(parentId)
},
confirmSubmitHandle() {
if (this.selectedArray.length > this.maxNum) {
return this.$message.error('最多选择十条数据!');
}
this.showModal = false;
this.displayList = []
let idtCameraChannelArray = this.selectedArray.map(v => v.idtCameraChannel)
this.dataList.map(v => {
if (idtCameraChannelArray.includes(v.idtCameraChannel)) {
this.displayList.push({
name: v.channelName
})
}
})
this.$emit('update', {
title: this.type,
list: this.selectedArray.map(v => v.idtCameraChannel)
})
},
close() {
this.showModal = false;
this.cameraName = ''
this.selectedArray = [];
this.allData = [];
this.transferData = [];
this.$emit('closeModal');
},
}
}
</script>
<style lang="scss" scoped>
.ability-box {
margin-bottom: 10px;
.show-box {
display: flex;
justify-content: flex-start;
align-items: flex-start;
}
.top {
display: flex;
align-items: center;
justify-content: flex-start;
}
.type {
padding-right: 12px;
font-size: 14px;
color: #606266;
width: 100px;
box-sizing: border-box;
text-align: right;
line-height: 40px;
height: 40px;
}
.list-box {
display: flex;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
margin-left: 100px;
}
.list-item {
font-size: 14px;
color: #606266;
width: 380px;
text-align: left;
margin-right: 10px;
line-height: 40px;
height: 40px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.flex-row-start {
display: flex;
align-items: center;
justify-content: flex-start;
}
::v-deep .el-dialog {
width: 70%;
}
.modal-box {
.btn-list {
margin-left: 10px;
flex: 1;
}
.left-text {
width: 90px;
text-align: right;
}
.btn-text {
height: 30px;
line-height: 30px;
// width: 80px;
padding: 0 10px;
text-align: center;
border-radius: 15px;
border: 1px solid #ccc;
margin-right: 15px;
cursor: pointer;
box-sizing: border-box;
margin-bottom: 10px;
font-size: 12px;
&:hover {
color: #0058e1;
}
}
.active-btn {
background: #0058e1;
color: #fff;
border: none;
border: 1px solid #0058e1;
&:hover {
color: #FFF;
}
}
.video-btn-list {
flex-wrap: wrap;
}
}
.top {
margin-bottom: 10px;
.type {
padding-right: 12px;
font-size: 14px;
color: #606266;
width: 100px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
text-align: right;
line-height: 40px;
height: 40px;
}
}
.tree-table-box {
display: flex;
align-items: flex-start;
justify-content: center;
}
.table-box {
width: calc(100% - 400px);
}
</style>
<style lang="scss" scoped>
::v-deep .el-input {
width: 200px;
}
.icon-input ::v-deep .el-input__inner {
cursor: pointer;
}
::v-deep .el-dialog__body {
height: 580px;
overflow: auto;
}
::v-deep .el-checkbox-button__inner {
width: 130px;
margin: 0 10px 5px;
border-left: unset !important;
border-radius: unset !important;
border: 1px solid #dcdfe6 !important;
}
.relate-application-content {
height: 100%;
::v-deep .el-transfer {
height: 100%;
}
::v-deep .el-transfer-panel {
width: 39.5%;
height: 100%;
}
::v-deep .el-transfer-panel__body {
height: 100%;
}
::v-deep .el-transfer-panel__list.is-filterable {
height: calc(100% - 102px);
}
}
</style>

View File

@ -0,0 +1,314 @@
<template>
<div class="wrapper">
<div class="wrapper-title-left-tree" :key="showKey">
<div v-for="item in treeData" :key="item.id" class="primaryNode">
<div class="top" @click="showBottom(item)" :class="item.show ? 'topSelect' : ''">
{{ item.name }}
({{ item.channelCount }})
<i class="el-icon-arrow-down" v-show="!item.show"></i>
<i class="el-icon-arrow-top" v-show="item.show"></i>
</div>
<div class="bottom" v-show="item.show">
<div v-for="val in item.children" :key="val.id" class="item">
<div class="up" :class="selectId == val.id ? 'select' : ''"
@click="showDown(item, val), onSelect(item, val)">
<div>
<svg t="1654068878091" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="2156" width="25px" height="25px"
v-show="selectId == val.id">
<path d="M512 624a112 112 0 1 0 0-224 112 112 0 0 0 0 224z" p-id="2157"
fill="#0058e1"></path>
</svg>
<span class="name">{{ val.name }}({{ val.channelCount }})</span>
</div>
<span v-if="item.children.length < 0">{{ val.total }}</span>
<span v-else>
<i class="el-icon-arrow-down" v-show="!val.show"></i>
<i class="el-icon-arrow-top" v-show="val.show"></i>
</span>
</div>
<div class="down" v-show="val.show">
<div v-for="child in val.children" :key="child.id" class="child"
:class="selectId == child.id ? 'select2' : ''" @click="onSelect(item, child, child)">
<div>
<svg t="1654068878091" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="2156" width="25px" height="25px"
v-show="selectId == child.id">
<path d="M512 624a112 112 0 1 0 0-224 112 112 0 0 0 0 224z" p-id="2157"
fill="#0058e1"></path>
</svg>
<span class="name">
{{ child.name }}
</span>
</div>
<span>{{ child.channelCount }}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
selectedKeys: [],
checkedKeys: [],
showKey: 0,
treeData: [],
selectId: '',
value: '',
}
},
watch: {
checkedKeys(val) {
if (val.checked.length > 1) {
val.checked.halfChecked = val.checked.shift()
}
},
},
mounted() {
this.init()
},
methods: {
getCameraAllOrgan(params) {
return new Promise((resolve, reject) => {
this.$http.get('/api/project/selectSubOrganNew', { params }).then(res => {
resolve(res)
}).catch(err => {
reject(err)
})
})
},
init() {
this.treeData = []
this.getCameraAllOrgan({ parentId: 'S4NbecfYB1DBH8HNULGS34' }).then(
(res) => {
if (res.data.code !== 1) {
return this.$message.error(res.msg);
}
this.treeData = res.data.data
}).catch(err => {
this.$message.error(err);
})
},
onSelect(item, val, child) {
// mybus.emit('getListByParentId', val.id)
this.getCameraAllOrgan({ parentId: val.id }).then((res) => {
if (res.data.code !== 1) {
return this.$message.error(res.msg);
}
this.treeData.map((treeDataItem, index) => {
if (item.id == treeDataItem.id) {
this.treeData[index].children.map((childItem, childIndex) => {
if (childItem.id == val.id) {
this.treeData[index].children[childIndex].children =
res.data.data;
this.$nextTick(() => {
this.treeData = this.treeData.splice(0)
})
}
})
}
})
}).catch(err => {
this.$message.error(err);
})
if (child) {
this.selectId = child.id
}
},
showBottom(item) {
item.show = !item.show;
this.getCameraAllOrgan({ parentId: item.id }).then((res) => {
if (res.data.code !== 1) {
return this.$message.error(res.msg);
}
this.treeData.map((treeDataItem, index) => {
if (item.id == treeDataItem.id) {
this.treeData[index].children = res.data.data || []
this.$nextTick(() => {
this.treeData = this.treeData.splice(0)
console.log('this.treeData.[index]', this.treeData[index])
})
}
})
}).catch(err => {
this.$message.error(err);
})
},
showDown(item, val) {
console.log('showDown', val)
if (item.children) {
val.show = !val.show
}
}
},
}
</script>
<style lang="scss" scoped>
.wrapper {
height: 500px;
overflow-y: scroll;
margin-right: 20px;
width: 300px;
.primaryNode {
.top {
width: 100%;
height: 40px;
background: rgba(0, 135, 225, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10px;
margin-top: 8px;
}
.top:hover {
cursor: pointer;
// 0058e1 0.5
background: rgba(0, 88, 225, 0.8);
color: white;
:deep(.anticon) {
color: white;
}
}
.topSelect {
background: #0058e1;
color: white;
:deep(.anticon) {
color: white;
}
}
.bottom {
width: 100%;
background: rgba(244, 245, 248, 0.8);
padding: 0 10px;
.up {
width: 100%;
cursor: pointer;
height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #ccc;
padding: 0 10px;
&>div {
display: flex;
justify-content: flex-start;
}
.name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
}
.up:hover {
.name {
color: #0058e1;
font-weight: 600;
}
span {
color: #0058e1;
font-weight: 600;
}
}
.select {
padding: 0 0.1rem 0 0;
.name {
width: 190px;
color: #0058e1;
font-weight: 600;
text-align: left;
}
span {
color: #0058e1;
font-weight: 600;
}
}
.item:nth-of-type(1) .up {
border-top: none;
}
.down {
width: 100%;
.child {
cursor: pointer;
height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10px;
&>div {
display: flex;
justify-content: flex-start;
align-items: center;
}
.name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
}
.child:hover {
.name {
color: #0058e1;
font-weight: 600;
}
span {
color: #0058e1;
font-weight: 600;
}
}
.select2 {
.name {
width: 190px;
color: #0058e1;
font-weight: 600;
text-align: left;
}
span {
color: #0058e1;
font-weight: 600;
}
padding: 0 10px 0 0;
}
}
}
}
}
</style>

View File

@ -21,12 +21,9 @@
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle"
style="width: 100%" :height="qp ? '810px' : '650px'">
<el-table-column prop="name" label="名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="description" label="描述" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="300" right="0">
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="240" right="0">
<template slot-scope="scope">
<el-button v-if="$hasPermission('ability:bsabilityai:update')" type="text" size="small"
@click="handleUpdate(scope.row)">{{ $t("update") }}</el-button>

View File

@ -241,6 +241,7 @@ import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './bsabilityai-add-or-update'
import dictionaries from '@/utils/dictionaries'
import qs from 'qs'
import { pinyin } from 'pinyin-pro'
import RelateApplication from './bsabilityai-relate-application.vue'
import putOnTheShelf from '@/views/modules/putOnTheShelf'
export default {
@ -292,7 +293,10 @@ export default {
responseData: {},
linkType: ''
},
typeInput: '组件服务'
typeInput: '组件服务',
uuidOne: '',
uuidTwo: '',
uuidSnum: ''
}
},
watch: {},
@ -384,11 +388,89 @@ export default {
// })
// this.disabled = true
},
// uuid
uuid (len, radix) {
var chars =
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
var uuid = []
var i
radix = radix || chars.length
if (len) {
// Compact form
for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)]
} else {
// rfc4122, version 4 form
var r
// rfc4122 requires these characters
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'
uuid[14] = '4'
// Fill in random data. At i==19 set the high bits of clock sequence as
// per rfc4122, sec. 4.1.5
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | (Math.random() * 16)
uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]
}
}
}
return uuid.join('')
},
uuidSplice () {
this.uuidOne = this.uuid(13, 16)
this.uuidTwo = this.uuid(13, 16)
this.uuidSnum = this.uuidOne + this.uuidTwo
this.uuidSnum = this.uuidSnum.replace(/\s+/g, '')
console.log('this.uuidOne', this.uuidSnum)
},
showDocument (val) {
//
//
this.uuidSplice()
const uuidParam = val.infoList.filter((item) => {
if (item.attrType === '技术文档') {
return item
}
})
if (uuidParam.length > 0) {
this.uuidSnum = uuidParam[0].attrValue.split('/')[1].split('.')[0]
} else {
const type = pinyin(val.type, {
pattern: 'initial'
}).replace(/\s*/g, '')
const obj = {
attrType: '技术文档',
attrValue: type + '/' + this.uuidSnum + '.md',
delFlag: 0
}
val.infoList.push(obj)
}
//
this.$http
.put('/resource/update', val)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
//
window.open(
window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type,
window.SITE_CONFIG.frontUrl + '?id=' + this.uuidSnum + '&&type=' + val.type,
'_blank'
)
}
})
})
.catch(() => {})
// update
},
getDataList2 (names) {
if (names != null) {

View File

@ -5,14 +5,15 @@
<el-button type="primary" size="small" @click="showModal = true">添加</el-button>
</div>
<el-dialog :visible.sync="showModal" title="关联应用" @close="close" :close-on-click-modal="false"
<el-dialog :visible.sync="showModal" title="请选择" @close="close" :close-on-click-modal="false"
:close-on-press-escape="false" :key="showKey" append-to-body>
<div class="relate-application-content">
<el-transfer v-model="selectedArray" filterable :filter-method="filterMethod" filter-placeholder="请输入名称"
:titles="nameArray" :props="{
key: 'id',
label: 'name',
}" :data="transferData"></el-transfer>
}" :data="transferData">
</el-transfer>
</div>
<template slot="footer">
<el-button @click="showModal = false">{{ $t("cancel") }}</el-button>
@ -22,6 +23,8 @@
</template>
</el-dialog>
<DisplayList></DisplayList>
<div class="show-box" v-if="displayList.length > 0">
<div class="list-box">
<div v-for="(item, i) in displayList" :key="i">
@ -38,6 +41,9 @@
</template>
<script>
import InfrastructureModal from '../assignedScene/components/infrastructure-modal.vue'
import DisplayList from '../assignedScene/components/display-list.vue'
let sjzyArray = [
{
@ -146,17 +152,13 @@ let keyObj = {
idKey: 'zycode',
nameKey: 'zyname'
},
'基础设施': {
idKey: 'zycode',
nameKey: 'zyname'
},
}
export default {
props: {
type: {
type: String,
default: ''
default: ""
},
nameArray: {
type: Array,
@ -171,10 +173,10 @@ export default {
type: Object,
default: () => {
return {
methods: 'get',
url: '',
methods: "get",
url: "",
postData: {}
}
};
}
}
},
@ -182,24 +184,24 @@ export default {
return {
showKey: 0,
showModal: false,
transferData: [], // 穿
selectedArray: [], // id
transferData: [],
selectedArray: [],
allData: [],
displayList: [], // list
}
};
},
watch: {
showModal(newVal) {
if (newVal) {
this.getData()
this.getData();
}
}
},
methods: {
async getDataInfo(dataForm) {
await this.getData()
let arr = []
let attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type)
await this.getData();
let arr = [];
let attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type);
if (attrValue.length > 0) {
attrValue.map(val => {
let item = this.allData.find(v => v.id == val.resourceId) || {};
@ -207,76 +209,85 @@ export default {
type: val.type,
id: val.resourceId,
name: item.name
}
arr.push(_obj)
})
};
arr.push(_obj);
});
}
//
this.displayList = JSON.parse(JSON.stringify(arr));
//
this.selectedArray = arr.map(v => v.id);
this.$nextTick(() => {
console.log(999, this.displayList)
})
console.log(999, this.displayList);
});
},
//
getData() {
// if (this.getDataParams.url === '') {
// this.allData = [];
// this.transferData = [];
// let arr = JSON.parse(JSON.stringify(sjzyArray));
// arr.map(v => {
// this.transferData.push({
// type: this.type,
// id: v[keyObj[this.type].idKey],
// name: v[keyObj[this.type].nameKey] || "--"
// });
// });
// this.allData = JSON.parse(JSON.stringify(this.transferData));
// return;
// }
// this.$http[this.getDataParams.methods](this.getDataParams.url, this.getDataParams.postData).then(res => {
// console.log('res.data------------>', res.data);
// if (res.data.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.transferData = res.data.data || [] // allData
// this.allData = res.data.data || []
// }).catch(err => {
// this.$message.error(err);
// })
this.allData = []
this.transferData = []
let arr = JSON.parse(JSON.stringify(sjzyArray));
arr.map(v => {
if (this.getDataParams.url === '') {
return;
}
this.$http[this.getDataParams.methods](this.getDataParams.url, this.getDataParams.postData).then(res => {
console.log('res.data----获取列表-------->', res.data);
if (res.data.code !== 0) {
return this.$message.error(res.msg);
}
this.transferData = []; // allData
this.allData = [];
(res.data.data || []).map(v => {
this.transferData.push({
type: this.type,
id: v[keyObj[this.type].idKey],
name: v[keyObj[this.type].nameKey] || '--'
})
})
name: v[keyObj[this.type].nameKey] || "--"
});
});
this.allData = JSON.parse(JSON.stringify(this.transferData));
}).catch(err => {
this.$message.error(err);
})
},
filterMethod(query, item) {
return item.name && item.name.indexOf(query) > -1;
},
confirmSubmitHandle() {
if (this.selectedArray.length > this.maxNum) {
return this.$message.error('最多选择十条数据!');
return this.$message.error("最多选择十条数据!");
}
this.showModal = false;
this.displayList = []
this.displayList = [];
this.allData.map(v => {
if (this.selectedArray.includes(v.id)) {
this.displayList.push(v)
this.displayList.push(v);
}
})
this.displayList = this.displayList.concat(this.displayList)
this.$emit('update', {
});
this.$emit("update", {
title: this.type,
list: this.selectedArray
})
});
},
getDisplay(displayList) {
this.displayList = []
this.displayList = displayList
},
close() {
// this.$emit("isShowRelatePopup", false);
this.showModal = false;
this.selectedArray = []
this.allData = []
this.transferData = []
this.selectedArray = [];
this.allData = [];
this.transferData = [];
},
}
},
components: { InfrastructureModal, DisplayList }
}
</script>
<style lang="scss" scoped>

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-26 16:34:20
* @LastEditTime: 2022-07-28 16:55:56
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>
@ -33,7 +33,7 @@
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.72.178.129:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// window.SITE_CONFIG['POI_URL'] = 'http://15.72.178.129:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 包头
// window.SITE_CONFIG['backUrl'] = 'http://10.110.205.1:8001';
// window.SITE_CONFIG['previewUrl'] = 'http://10.110.205.1:8002/';
@ -46,7 +46,7 @@
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.243:9796/document/#/devModelFile/';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.243:8888/renren-admin';
window.SITE_CONFIG['websocketURL'] = '15.2.21.243:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.243:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.243:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 西海岸版本
// window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/';
@ -63,7 +63,7 @@
// window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
// window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';

View File

@ -2,12 +2,12 @@
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-26 15:16:46
* @LastEditTime: 2022-07-28 16:57:28
* @Description: 数据资源参数配置
*/
//const newLocation = 'qingdao'
const newLocation = 'qingdao'
// const newLocation = 'baotou'
const newLocation = 'xihaian'
// const newLocation = 'xihaian'
//
const whoShow = {}

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-26 14:34:24
* @LastEditTime: 2022-07-28 16:57:43
* @Description: 地图静态参数配置
*/
var _mapConfig = {}
@ -12,7 +12,7 @@ var _mapConfig = {}
// //
// **********************************************
var CONFIGKEY = 'qingdao'
var CONFIGKEY = 'qingdao_highgo'
// var CONFIGKEY = 'dev';
// ***********************************************
var BASECONFIGITEM = {

View File

@ -68,7 +68,7 @@ export function selectByChannelCode(params) {
}
export function getStreamByChannelCode(params) {
return request({
url: `/api/project/file`,
url: `/resource/hls/getHls`,
method: 'get',
params,
})

View File

@ -474,6 +474,30 @@
}
//
const preview = () => {
notFilled.value = []
console.log(dataFrom.value, 'dataFrom.value.name')
if (
dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0] &&
dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0]
.attrValue == '调用接口'
) {
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '服务接口'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '服务接口')[0]
.attrValue
) {
notFilled.value.push('服务接口')
}
if (!dataFrom.value.apiMethodType) {
notFilled.value.push('接口请求方式')
}
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
@ -484,6 +508,7 @@
})
window.open(newpage.href, '_blank')
}
}
const submit = () => {
notFilled.value = []
console.log(dataFrom.value, 'dataFrom.value.name')

View File

@ -435,6 +435,21 @@
}
//
const preview = () => {
notFilled.value = []
console.log(dataFrom.value, 'dataFrom.value.name')
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '组件地址'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
.attrValue
) {
notFilled.value.push('组件地址')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
@ -445,6 +460,7 @@
})
window.open(newpage.href, '_blank')
}
}
const submit = () => {
notFilled.value = []
console.log(dataFrom.value, 'dataFrom.value.name')

View File

@ -434,6 +434,21 @@
}
//
const preview = () => {
notFilled.value = []
console.log(dataFrom.value, 'dataFrom.value.name')
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '组件地址'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
.attrValue
) {
notFilled.value.push('组件地址')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
@ -444,6 +459,7 @@
})
window.open(newpage.href, '_blank')
}
}
//
const refPutOnTheShelf = ref(null)
const changeGnjs = (type) => {

View File

@ -334,6 +334,21 @@
}
//
const preview = () => {
notFilled.value = []
console.log(dataFrom.value, 'dataFrom.value.name')
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '服务地址'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '服务地址')[0]
.attrValue
) {
notFilled.value.push('服务地址')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
@ -344,6 +359,7 @@
})
window.open(newpage.href, '_blank')
}
}
//
const refPutOnTheShelf = ref(null)
const changeYycj = (type) => {

View File

@ -111,7 +111,8 @@
item.attrType === '技术文档' ||
item.attrType === '服务商' ||
item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话'
item.attrType === '服务商联系电话' ||
item.attrType === '服务接口'
) {
list.value.push('使用方式')
}
@ -164,7 +165,8 @@
item.attrType === '技术文档' ||
item.attrType === '服务商' ||
item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话'
item.attrType === '服务商联系电话' ||
item.attrType === '服务接口'
) {
list.value.push('使用方式')
}

View File

@ -459,7 +459,17 @@
obj.system.push({
resourceId: sxt.idtCameraChannel + '',
resourceName: sxt.channelName,
cameraId: sxt.channelId,
cameraId: sxt.channelId, //
channelCode: sxt.channelCode,
channelId: sxt.channelId,
channelName: sxt.channelName,
checkStatus: sxt.checkStatus + '',
gpsX: sxt.gpsX,
gpsY: sxt.gpsY,
idtCameraChannel: sxt.idtCameraChannel + '',
nodeName: sxt.nodeName,
parentId: sxt.parentId,
status: sxt.status + '',
})
})
submitApply(obj).then((res) => {

View File

@ -67,6 +67,16 @@
"
/>
</div>
<div class="left"
style="display: flex;
align-items: center"
v-else-if="selectCardsname === '融合服务' && item.fuseAttrList && item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0]">
<a-image
:width="106"
:preview="false"
:src="item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0].attrValue"
/>
</div>
<div
class="left"
:class="
@ -135,7 +145,18 @@
</svg>
</span>
<div class="header-right">
<div>
<div v-if="selectCardsname === '融合服务'"
class="label-content">
<template v-if="item.fuseAttrList && item.fuseAttrList.filter((val)=>val.attrType=='应用领域')[0]">
<span class="label"
v-for="(data, index) in item.fuseAttrList.filter((val)=>val.attrType=='应用领域')[0].attrValue.split(';')"
:key="index"
>
{{data}}
</span>
</template>
</div>
<div v-else>
发布时间
<template v-if="item.createDate">
<span>
@ -936,6 +957,17 @@
div {
margin-right: 24px;
}
.label-content {
flex: 1;
display: flex;
justify-content: flex-end;
.label {
padding: 0.01rem 0.1rem;
margin-right: 0.1rem;
border-radius: 0.13rem;
background: #0087ff;
}
}
}
.header-right:last-child {
div {

View File

@ -93,7 +93,6 @@
</div>
</div>
</template>
<script>
import { defineComponent, ref, watch } from 'vue'
import { getCameraAllOrgan } from '@/api/videoSurveillance'
@ -284,7 +283,6 @@
})
})
}
if (child) {
selectId.value = child.id
}

View File

@ -234,12 +234,12 @@
const openVideo = (id) => {
console.log('打开视频', id)
const param = {
channelCode: id,
key: id,
}
getStreamByChannelCode(param).then((res) => {
console.log(res)
visible.value = true
options.value.src = res.data.data
options.src = res.data.data
})
}
// const dataTypeList = () => {

View File

@ -3,6 +3,17 @@
<div class="details-pageconetent">
<home-header></home-header>
<div class="top">
<div class="top-title">
全部
<div
v-for="(item, index) in titleName"
:key="index"
class="tabAll"
@click="changeCards(index)"
:class="{ sel: index == number }">
<span>{{ item.name }}</span>
</div>
</div>
<div class="resultListSearchInput-father">
<div class="resultListSearchInput-son">
模糊搜索
@ -75,6 +86,17 @@
const resourceList = reactive({ data: [] })
const resourceTotal = ref(0)
const current = ref(1)
//
const titleName = ref([
{
name: '打包模式',
},
{
name: '赋能场景',
},
])
const number = ref(0)
//
let listKey = ref(0)
//
@ -84,12 +106,18 @@
const paramsGetResources = {
pageNum: 1,
pageSize: currentPageSize.value,
type: Cardsname.value,
type: titleName.value[number.value].name,
name: '',
orderField: 'create_date', // total visits 访 applyCount score collectCount
orderType: 'DESC', // ASC DESC
}
const changeCards = (val) => {
console.log(val)
number.value = val
chongzhi()
}
//
const onSearch = () => {
loading.value = true
@ -109,7 +137,7 @@
paramsGetResources.orderField = 'create_date'
paramsGetResources.orderType = 'DESC'
mybus.emit('chongzhi', {
type: '融合服务',
type: titleName.value[number.value].name,
})
getAppResources()
}
@ -126,6 +154,7 @@
orderField: paramsGetResources.orderField,
orderType: paramsGetResources.orderType,
name: searchValue.value,
type: titleName.value[number.value].name,
}
getIntegrationServicesList(postData).then(
(res) => {
@ -211,6 +240,9 @@
pageSizeOptions,
current,
loading,
titleName,
changeCards,
number,
}
},
components: {
@ -323,6 +355,26 @@
background: #f3f5f9;
padding-bottom: 0.6rem;
}
.top-title {
padding: 0.2rem;
display: flex;
font-size: 22px;
.tabAll {
font-size: 22px;
color: #000000;
margin-right: 35px;
cursor: pointer;
}
.tabAll:nth-child(1) {
margin-left: 20px;
}
.sel {
font-weight: 600;
color: #0087ff;
border-bottom: 0.02rem solid #0087ff;
}
}
}
}

View File

@ -11,7 +11,6 @@
<el-autocomplete
v-model="address"
placeholder="请输入地址"
clearable
:fetch-suggestions="
(queryString, cb) => {
searchAddressByKeyWord(queryString, cb, i)

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-21 11:55:07
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-21 17:05:11
* @LastEditTime: 2022-07-27 15:57:26
* @Description: 告诉大家这是什么
-->
<template>
@ -105,6 +105,7 @@
v-model:pageSize="pageSize"
:total="total"
show-less-items
:show-size-changer="false"
@change="changePageNum"
/>
</div>

View File

@ -19,10 +19,10 @@
size="large"
@search="onSearch"
/>
<div class="search" @click="gaojisousuo">
<!-- <div class="search" @click="gaojisousuo">
<span></span>
<span>高级搜索</span>
</div>
</div> -->
</div>
</div>
<div class="gaoji-main" v-if="!qeihuan">

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-19 17:18:48
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-18 16:40:21
* @LastEditTime: 2022-07-27 10:34:02
* @Description: markdown编辑器
-->
<template>
@ -44,10 +44,27 @@
}
},
created() {
console.log('2222', this.route.currentRoute.query)
// const keyId = this.route.currentRoute.value.query.id
// this.uuidSplice()
// 1. 2.
console.log('111111111', this.newDateForm)
this.getDevelopmentFile()
},
computed: {
newDateForm() {
if (this.dataFrom && this.dataFrom.type) {
return this.dataFrom
} else {
return {
id: this.route.currentRoute.query.id,
type: this.route.currentRoute.query.type,
}
}
},
},
methods: {
// uuid
uuid(len, radix) {
var chars =
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
@ -86,6 +103,7 @@
this.uuidSnum = this.uuidSnum.replace(/\s+/g, '')
console.log('this.uuidOne', this.uuidSnum)
},
//
async saveText(file) {
// console.log('', e)
// const jsonStr = JSON.stringify(e)
@ -97,7 +115,7 @@
}
let myfile = new File([blob], this.uuidSnum + '.md')
var formData = new FormData()
const type = pinyin(this.dataFrom.type, {
const type = pinyin(this.newDateForm.type, {
pattern: 'initial',
}).replace(/\s*/g, '')
formData.append('fileName', this.uuidSnum + '.md')
@ -120,19 +138,24 @@
message.error('保存失败')
}
},
//
async getDevelopmentFile() {
debugger
const uuidParam = this.dataFrom.infoList.filter((item) => {
let uuid = ''
if (this.newDateForm.id) {
uuid = this.newDateForm.id
} else {
const uuidParam = this.newDateForm.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, {
const type = pinyin(this.newDateForm.type, {
pattern: 'initial',
}).replace(/\s*/g, '')
console.log(type)
@ -142,12 +165,6 @@
}
const res = await getDevelopmentFile(param)
this.text = res.data
// let infoList = {
// attrType: '',
// attrValue: this.text.data,
// delFlag: 0,
// }
// mybus.emit('chageDataFrom', infoList)
console.log('res', res)
},
},
@ -156,5 +173,9 @@
<style scoped>
.md-fullscreen {
z-index: 10;
color: initial;
font-size: initial;
line-height: initial;
text-align: initial;
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-07-12 09:42:44
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-25 15:07:05
* @LastEditTime: 2022-07-28 14:13:22
* @Description:我的申请 能力申请 查看详情
-->
<template>
@ -142,7 +142,7 @@
';' +
'视频流地址:' +
backUrl +
'/resource/hls/getHls/?channelId=' +
'resource/hls/getHls/?channelId=' +
val.channelId
}}
</div>