合并版本v0.8.3.2

This commit is contained in:
wuhongjian 2022-07-28 16:58:01 +08:00
commit c9a5bf9f69
30 changed files with 1536 additions and 204 deletions

View File

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

View File

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

View File

@ -2,12 +2,7 @@
<div> <div>
<el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalTypeText[modalType]" @close="closeModal" <el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalTypeText[modalType]" @close="closeModal"
:close-on-click-modal="false" :close-on-press-escape="false"> :close-on-click-modal="false" :close-on-press-escape="false">
<div style=" <div class="first-title">
text-align: center;
font-weight: 600;
font-size: 18px;
margin-bottom: 10px;
">
填写字段 填写字段
</div> </div>
<el-checkbox-group v-model="checkList" @change="changeBtn" style="margin-bottom: 20px"> <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" <el-input type="textarea" :rows="3" class="input-box" v-model="dataForm.description"
placeholder="请输入融合服务描述"></el-input> placeholder="请输入融合服务描述"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支撑场景" prop="applicationArea"> <el-form-item label="应用领域" prop="applicationArea">
<el-select v-model="dataForm.applicationArea" placeholder="请选择支撑场景" filterable> <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 v-for="item in areaList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </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> </div>
<!-- 组合能力 --> <!-- 组合能力 -->
@ -49,8 +53,10 @@
<div class="title"> <div class="title">
组合能力 组合能力
</div> </div>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施" ref="jcssDom" <!-- <combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施" ref="jcssDom"
:getDataParams="getListParams['基础设施']"></combine-ability> :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" <combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="数据资源" ref="sjzyDom"
:getDataParams="getListParams['数据资源']"></combine-ability> :getDataParams="getListParams['数据资源']"></combine-ability>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="组件服务" ref="zjfwDom" <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 Cookies from 'js-cookie'
import { tableColumns } from './IntegratedServices.vue'; import { tableColumns } from './IntegratedServices.vue';
import { getFuseResourceList, getListParams, modalTypeText } from "./assignedScene/add-update-scene.vue"; import { getFuseResourceList, getListParams, modalTypeText } from "./assignedScene/add-update-scene.vue";
import InfrastructureModal from './assignedScene/components/infrastructure-modal.vue'
export default { export default {
components: { components: {
CommonQuestion, CommonQuestion,
IntegratedCombineAbility, IntegratedCombineAbility,
CombineAbility, CombineAbility,
InfrastructureModal,
}, },
data() { data() {
return { return {
fileUploadUrl: `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('ucsToken')}`, fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload',
dataForm: { dataForm: {
"name": "", "name": "",
"applicationArea": "", "applicationArea": "",
"description": "", "description": "",
"fuseAttrList": [], "fuseAttrList": [
{
"attrType": "服务图片",
"attrValue": "",
},
],
// //
"fuseResourceList": [ "fuseResourceList": [
{ {
@ -101,7 +114,7 @@ export default {
"sequence": "" "sequence": ""
} }
], ],
type: '融合服务' type: '打包模式'
}, },
rules: { rules: {
name: [ name: [
@ -131,7 +144,12 @@ export default {
'jcssDom': '基础设施', 'jcssDom': '基础设施',
}, },
modalTypeText: modalTypeText, modalTypeText: modalTypeText,
abilityListObj: {} abilityListObj: {},
//
handleExceed() {
this.$message({ type: 'error', message: '最多支持一张图片上传' })
},
imageUrl: ''
}; };
}, },
props: { props: {
@ -222,6 +240,11 @@ export default {
'update': 'put' 'update': 'put'
} }
this.dataForm.fuseResourceList = this.getFuseResourceList() this.dataForm.fuseResourceList = this.getFuseResourceList()
if (this.imageUrl == '') {
this.$message.error("请上传图片!");
return;
}
this.dataForm.fuseAttrList.find(v => v.attrType == '服务图片').attrValue = this.imageUrl || '';
this.$http this.$http
[methodsObj[this.modalType]]("/fuse", this.dataForm) [methodsObj[this.modalType]]("/fuse", this.dataForm)
.then(({ data: res }) => { .then(({ data: res }) => {
@ -254,8 +277,55 @@ export default {
for (const key in this.refsParseArray) { for (const key in this.refsParseArray) {
this.$refs[key] && this.$refs[key].getDataInfo && this.$refs[key].getDataInfo(data) 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() { beforeDestroy() {
this.clearForm() this.clearForm()
@ -369,4 +439,25 @@ export default {
.input-box { .input-box {
width: 90%; 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> </style>

View File

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

View File

@ -2,12 +2,7 @@
<div> <div>
<el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalTypeText[modalType]" @close="closeModal" <el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalTypeText[modalType]" @close="closeModal"
:close-on-click-modal="false" :close-on-press-escape="false"> :close-on-click-modal="false" :close-on-press-escape="false">
<div style=" <div class="first-title">
text-align: center;
font-weight: 600;
font-size: 18px;
margin-bottom: 10px;
">
填写字段 填写字段
</div> </div>
<el-checkbox-group v-model="checkList" @change="changeBtn" style="margin-bottom: 20px"> <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 type="textarea" :rows="3" v-model="dataForm.description" placeholder="请输入描述" style="width:90%">
</el-input> </el-input>
</el-form-item> </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> </div>
<!-- 场景痛点 --> <!-- 场景痛点 -->
@ -55,8 +61,8 @@
<div class="title"> <div class="title">
组合能力 组合能力
</div> </div>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施" ref="jcssDom" <InfrastructureModal v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施"
:getDataParams="getListParams['基础设施']"></combine-ability> ref="jcssDom"></InfrastructureModal>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="数据资源" ref="sjzyDom" <combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="数据资源" ref="sjzyDom"
:getDataParams="getListParams['数据资源']"></combine-ability> :getDataParams="getListParams['数据资源']"></combine-ability>
<combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="组件服务" ref="zjfwDom" <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 SceneUseStep from './components/scene-use-step.vue';
import SceneOneInput from './components/scene-one-input.vue'; import SceneOneInput from './components/scene-one-input.vue';
import CombineAbility from '../components/combine-ability.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 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 = ['基本信息', '场景痛点', '解决方案', '组合能力', '更多能力', '使用步骤'] let btnArray = ['基本信息', '场景痛点', '解决方案', '组合能力', '更多能力', '使用步骤']
// \
export const getJson = (type) => { export const getJson = (type) => {
return { return {
methods: 'get', methods: 'get',
@ -116,19 +123,13 @@ export const getDescJson = (text) => {
}, },
} }
} }
//
export const getListParams = { export const getListParams = {
'基础设施': {
methods: 'get',
url: '',
postData: {
}
},
'数据资源': getJson('数据资源'), '数据资源': getJson('数据资源'),
'组件服务': getJson('组件服务'), '组件服务': getJson('组件服务'),
'基础设施': ''
} }
//
export const modalTypeText = { export const modalTypeText = {
add: '挂接', add: '挂接',
update: '修改' update: '修改'
@ -157,14 +158,15 @@ export const getFuseResourceList = (abilityListObj) => {
export default { export default {
components: { components: {
SceneUseStep, SceneUseStep,
IntegratedCombineAbility,
CommonQuestion,
CombineAbility, CombineAbility,
SceneOneInput, SceneOneInput,
upload,
CommonQuestion,
InfrastructureModal,
}, },
data() { data() {
return { return {
fileUploadUrl: `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('ucsToken')}`, fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload',
moreKeyTextObj: { moreKeyTextObj: {
nameObj: { nameObj: {
text: '能力名称', text: '能力名称',
@ -175,6 +177,7 @@ export default {
painKeyTextObj: getDescJson('痛点'), painKeyTextObj: getDescJson('痛点'),
solutionKeyTextObj: getDescJson('方案'), solutionKeyTextObj: getDescJson('方案'),
dataForm: { dataForm: {
"name": "",
"applicationArea": "", "applicationArea": "",
"description": "", "description": "",
"fuseAttrList": [ "fuseAttrList": [
@ -194,19 +197,12 @@ export default {
"attrType": "解决方案", "attrType": "解决方案",
"attrValue": [{ description: "" }], "attrValue": [{ description: "" }],
}, },
],
"fuseResourceList": [
{ {
"resourceId": '', "attrType": "服务图片",
"sequence": "" "attrValue": "",
} },
], ],
"mobile": "", "fuseResourceList": [],
"name": "",
"provider": "",
"providerMobile": "",
"providerUser": "",
"deptUser": "",
}, },
rules: { rules: {
name: [ name: [
@ -242,7 +238,13 @@ export default {
'jcssDom': '基础设施', 'jcssDom': '基础设施',
}, },
getListParams: getListParams, getListParams: getListParams,
abilityListObj: {} abilityListObj: {},
imgData: [],
//
handleExceed() {
this.$message({ type: 'error', message: '最多支持一张图片上传' })
},
imageUrl: '',
}; };
}, },
props: { props: {
@ -323,10 +325,14 @@ export default {
'update': 'put' 'update': 'put'
} }
this.dataForm.fuseResourceList = this.getFuseResourceList() 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, { let _obj = Object.assign({}, this.dataForm, {
type: '赋能场景' type: '赋能场景'
}) })
this.$http this.$http
[methodsObj[this.modalType]]("/fuse", _obj) [methodsObj[this.modalType]]("/fuse", _obj)
.then(({ data: res }) => { .then(({ data: res }) => {
@ -359,9 +365,62 @@ export default {
for (const key in this.refsParseArray) { for (const key in this.refsParseArray) {
this.$refs[key] && this.$refs[key].getDataInfo && this.$refs[key].getDataInfo(data) 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); 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() { beforeDestroy() {
this.clearForm() this.clearForm()
@ -403,7 +462,7 @@ export default {
} }
</style> </style>
<style lang="scss"> <style lang="scss" scoped>
.mod-sys__menu { .mod-sys__menu {
.menu-list, .menu-list,
@ -478,4 +537,17 @@ export default {
font-size: 18px; font-size: 18px;
margin-bottom: 10px; 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> </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-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle"
style="width: 100%" :height="qp ? '810px' : '650px'"> 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="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 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="240" right="0">
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="300" right="0">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="$hasPermission('ability:bsabilityai:update')" type="text" size="small" <el-button v-if="$hasPermission('ability:bsabilityai:update')" type="text" size="small"
@click="handleUpdate(scope.row)">{{ $t("update") }}</el-button> @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 AddOrUpdate from './bsabilityai-add-or-update'
import dictionaries from '@/utils/dictionaries' import dictionaries from '@/utils/dictionaries'
import qs from 'qs' import qs from 'qs'
import { pinyin } from 'pinyin-pro'
import RelateApplication from './bsabilityai-relate-application.vue' import RelateApplication from './bsabilityai-relate-application.vue'
import putOnTheShelf from '@/views/modules/putOnTheShelf' import putOnTheShelf from '@/views/modules/putOnTheShelf'
export default { export default {
@ -292,7 +293,10 @@ export default {
responseData: {}, responseData: {},
linkType: '' linkType: ''
}, },
typeInput: '组件服务' typeInput: '组件服务',
uuidOne: '',
uuidTwo: '',
uuidSnum: ''
} }
}, },
watch: {}, watch: {},
@ -384,11 +388,89 @@ export default {
// }) // })
// this.disabled = true // 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) { showDocument (val) {
window.open( //
window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type, //
'_blank' 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=' + this.uuidSnum + '&&type=' + val.type,
'_blank'
)
}
})
})
.catch(() => {})
// update
}, },
getDataList2 (names) { getDataList2 (names) {
if (names != null) { if (names != null) {

View File

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

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-26 16:34:20 * @LastEditTime: 2022-07-28 16:55:56
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -33,7 +33,7 @@
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/'; // 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['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin'; // 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['backUrl'] = 'http://10.110.205.1:8001';
// window.SITE_CONFIG['previewUrl'] = 'http://10.110.205.1:8002/'; // 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['frontUrl'] = 'http://15.2.21.243:9796/document/#/devModelFile/';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.243:8888/renren-admin'; 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['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['backUrl'] = 'http://10.134.135.9:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/'; // 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['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/'; // 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['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['backUrl'] = 'http://124.222.94.39:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/'; // window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';

View File

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

View File

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

View File

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

View File

@ -474,15 +474,40 @@
} }
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( notFilled.value = []
(item) => item.attrValue !== '' console.log(dataFrom.value, 'dataFrom.value.name')
) if (
console.log('预览==============>', dataFrom.value) dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0] &&
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value)) dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0]
const newpage = router.resolve({ .attrValue == '调用接口'
path: '/details', ) {
}) if (
window.open(newpage.href, '_blank') !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 !== ''
)
console.log('预览==============>', dataFrom.value)
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
const newpage = router.resolve({
path: '/details',
})
window.open(newpage.href, '_blank')
}
} }
const submit = () => { const submit = () => {
notFilled.value = [] notFilled.value = []

View File

@ -435,15 +435,31 @@
} }
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( notFilled.value = []
(item) => item.attrValue !== '' console.log(dataFrom.value, 'dataFrom.value.name')
) if (
console.log('预览==============>', dataFrom.value) !dataFrom.value.infoList.filter(
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value)) (val) => val.attrType === '组件地址'
const newpage = router.resolve({ )[0] ||
path: '/details', !dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
}) .attrValue
window.open(newpage.href, '_blank') ) {
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 !== ''
)
console.log('预览==============>', dataFrom.value)
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
const newpage = router.resolve({
path: '/details',
})
window.open(newpage.href, '_blank')
}
} }
const submit = () => { const submit = () => {
notFilled.value = [] notFilled.value = []

View File

@ -434,15 +434,31 @@
} }
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( notFilled.value = []
(item) => item.attrValue !== '' console.log(dataFrom.value, 'dataFrom.value.name')
) if (
console.log('预览==============>', dataFrom.value) !dataFrom.value.infoList.filter(
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value)) (val) => val.attrType === '组件地址'
const newpage = router.resolve({ )[0] ||
path: '/details', !dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
}) .attrValue
window.open(newpage.href, '_blank') ) {
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 !== ''
)
console.log('预览==============>', dataFrom.value)
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
const newpage = router.resolve({
path: '/details',
})
window.open(newpage.href, '_blank')
}
} }
// //
const refPutOnTheShelf = ref(null) const refPutOnTheShelf = ref(null)

View File

@ -334,15 +334,31 @@
} }
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( notFilled.value = []
(item) => item.attrValue !== '' console.log(dataFrom.value, 'dataFrom.value.name')
) if (
console.log('预览==============>', dataFrom.value) !dataFrom.value.infoList.filter(
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value)) (val) => val.attrType === '服务地址'
const newpage = router.resolve({ )[0] ||
path: '/details', !dataFrom.value.infoList.filter((val) => val.attrType === '服务地址')[0]
}) .attrValue
window.open(newpage.href, '_blank') ) {
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 !== ''
)
console.log('预览==============>', dataFrom.value)
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
const newpage = router.resolve({
path: '/details',
})
window.open(newpage.href, '_blank')
}
} }
// //
const refPutOnTheShelf = ref(null) const refPutOnTheShelf = ref(null)

View File

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

View File

@ -459,7 +459,17 @@
obj.system.push({ obj.system.push({
resourceId: sxt.idtCameraChannel + '', resourceId: sxt.idtCameraChannel + '',
resourceName: sxt.channelName, 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) => { submitApply(obj).then((res) => {

View File

@ -67,6 +67,16 @@
" "
/> />
</div> </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 <div
class="left" class="left"
:class=" :class="
@ -135,7 +145,18 @@
</svg> </svg>
</span> </span>
<div class="header-right"> <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"> <template v-if="item.createDate">
<span> <span>
@ -936,6 +957,17 @@
div { div {
margin-right: 24px; 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 { .header-right:last-child {
div { div {

View File

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

View File

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

View File

@ -3,6 +3,17 @@
<div class="details-pageconetent"> <div class="details-pageconetent">
<home-header></home-header> <home-header></home-header>
<div class="top"> <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-father">
<div class="resultListSearchInput-son"> <div class="resultListSearchInput-son">
模糊搜索 模糊搜索
@ -75,6 +86,17 @@
const resourceList = reactive({ data: [] }) const resourceList = reactive({ data: [] })
const resourceTotal = ref(0) const resourceTotal = ref(0)
const current = ref(1) const current = ref(1)
//
const titleName = ref([
{
name: '打包模式',
},
{
name: '赋能场景',
},
])
const number = ref(0)
// //
let listKey = ref(0) let listKey = ref(0)
// //
@ -84,12 +106,18 @@
const paramsGetResources = { const paramsGetResources = {
pageNum: 1, pageNum: 1,
pageSize: currentPageSize.value, pageSize: currentPageSize.value,
type: Cardsname.value, type: titleName.value[number.value].name,
name: '', name: '',
orderField: 'create_date', // total visits 访 applyCount score collectCount orderField: 'create_date', // total visits 访 applyCount score collectCount
orderType: 'DESC', // ASC DESC orderType: 'DESC', // ASC DESC
} }
const changeCards = (val) => {
console.log(val)
number.value = val
chongzhi()
}
// //
const onSearch = () => { const onSearch = () => {
loading.value = true loading.value = true
@ -109,7 +137,7 @@
paramsGetResources.orderField = 'create_date' paramsGetResources.orderField = 'create_date'
paramsGetResources.orderType = 'DESC' paramsGetResources.orderType = 'DESC'
mybus.emit('chongzhi', { mybus.emit('chongzhi', {
type: '融合服务', type: titleName.value[number.value].name,
}) })
getAppResources() getAppResources()
} }
@ -126,6 +154,7 @@
orderField: paramsGetResources.orderField, orderField: paramsGetResources.orderField,
orderType: paramsGetResources.orderType, orderType: paramsGetResources.orderType,
name: searchValue.value, name: searchValue.value,
type: titleName.value[number.value].name,
} }
getIntegrationServicesList(postData).then( getIntegrationServicesList(postData).then(
(res) => { (res) => {
@ -211,6 +240,9 @@
pageSizeOptions, pageSizeOptions,
current, current,
loading, loading,
titleName,
changeCards,
number,
} }
}, },
components: { components: {
@ -323,6 +355,26 @@
background: #f3f5f9; background: #f3f5f9;
padding-bottom: 0.6rem; 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 <el-autocomplete
v-model="address" v-model="address"
placeholder="请输入地址" placeholder="请输入地址"
clearable
:fetch-suggestions=" :fetch-suggestions="
(queryString, cb) => { (queryString, cb) => {
searchAddressByKeyWord(queryString, cb, i) searchAddressByKeyWord(queryString, cb, i)

View File

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

View File

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

View File

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

View File

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