diff --git a/back/package.json b/back/package.json
index e9ac8253..ced391e7 100644
--- a/back/package.json
+++ b/back/package.json
@@ -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",
diff --git a/back/public/index.html b/back/public/index.html
index 3e830a61..c8f9e70b 100644
--- a/back/public/index.html
+++ b/back/public/index.html
@@ -1,8 +1,8 @@
@@ -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';
diff --git a/back/src/views/modules/ability/IntegratedServices-add.vue b/back/src/views/modules/ability/IntegratedServices-add.vue
index da6482f6..5e713d2b 100644
--- a/back/src/views/modules/ability/IntegratedServices-add.vue
+++ b/back/src/views/modules/ability/IntegratedServices-add.vue
@@ -2,12 +2,7 @@
-
+
填写字段
@@ -36,12 +31,21 @@
-
-
+
+
+
+
+ 点击上传
+ 只能上传图片文件
+
+
+
@@ -49,8 +53,10 @@
组合能力
-
+
+
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;
+}
diff --git a/back/src/views/modules/ability/IntegratedServices.vue b/back/src/views/modules/ability/IntegratedServices.vue
index 78628527..093f4156 100644
--- a/back/src/views/modules/ability/IntegratedServices.vue
+++ b/back/src/views/modules/ability/IntegratedServices.vue
@@ -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',
diff --git a/back/src/views/modules/ability/assignedScene/add-update-scene.vue b/back/src/views/modules/ability/assignedScene/add-update-scene.vue
index ece53975..d093a402 100644
--- a/back/src/views/modules/ability/assignedScene/add-update-scene.vue
+++ b/back/src/views/modules/ability/assignedScene/add-update-scene.vue
@@ -2,12 +2,7 @@
-
+
填写字段
@@ -36,6 +31,17 @@
+
+
+
+ 点击上传
+ 只能上传图片文件
+
+
+
+
@@ -55,8 +61,8 @@
组合能力
-
+
{
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 {
}
-
diff --git a/back/src/views/modules/ability/assignedScene/components/display-list.vue b/back/src/views/modules/ability/assignedScene/components/display-list.vue
new file mode 100644
index 00000000..34e4a90b
--- /dev/null
+++ b/back/src/views/modules/ability/assignedScene/components/display-list.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+ {{ item[showKey] || '--' }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/back/src/views/modules/ability/assignedScene/components/infrastructure-modal.vue b/back/src/views/modules/ability/assignedScene/components/infrastructure-modal.vue
new file mode 100644
index 00000000..0d05d598
--- /dev/null
+++ b/back/src/views/modules/ability/assignedScene/components/infrastructure-modal.vue
@@ -0,0 +1,494 @@
+
+
+
+
+
+
+
+
+
{{ showText[activeBtn] }}
+
+
清空
+
+
+
+ {{ item.labelName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t("cancel") }}
+ {{
+ $t("confirm")
+ }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/back/src/views/modules/ability/assignedScene/components/infrastructure-tree.vue b/back/src/views/modules/ability/assignedScene/components/infrastructure-tree.vue
new file mode 100644
index 00000000..8b977a47
--- /dev/null
+++ b/back/src/views/modules/ability/assignedScene/components/infrastructure-tree.vue
@@ -0,0 +1,314 @@
+
+
+
+
+
+ {{ item.name }}
+ ({{ item.channelCount }})
+
+
+
+
+
+
+
+
+
+
+
{{ val.name }}({{ val.channelCount }})
+
+
{{ val.total }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ child.name }}
+
+
+
{{ child.channelCount }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/back/src/views/modules/ability/assignedScene/index.vue b/back/src/views/modules/ability/assignedScene/index.vue
index 8ad45a6d..ba8ad18c 100644
--- a/back/src/views/modules/ability/assignedScene/index.vue
+++ b/back/src/views/modules/ability/assignedScene/index.vue
@@ -21,12 +21,9 @@
-
-
-
-
+
{{ $t("update") }}
diff --git a/back/src/views/modules/ability/bsabilityai.vue b/back/src/views/modules/ability/bsabilityai.vue
index 810dcd2b..3ad53de6 100644
--- a/back/src/views/modules/ability/bsabilityai.vue
+++ b/back/src/views/modules/ability/bsabilityai.vue
@@ -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) {
- 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) {
if (names != null) {
diff --git a/back/src/views/modules/ability/components/combine-ability.vue b/back/src/views/modules/ability/components/combine-ability.vue
index 4d0693d7..5da84a14 100644
--- a/back/src/views/modules/ability/components/combine-ability.vue
+++ b/back/src/views/modules/ability/components/combine-ability.vue
@@ -5,14 +5,15 @@
添加
-
+ }" :data="transferData">
+
{{ $t("cancel") }}
@@ -22,6 +23,8 @@
+
+
@@ -38,6 +41,9 @@
diff --git a/front/src/views/personalCenter/components/AbilityApplication.vue b/front/src/views/personalCenter/components/AbilityApplication.vue
index c24845cb..045d22b3 100644
--- a/front/src/views/personalCenter/components/AbilityApplication.vue
+++ b/front/src/views/personalCenter/components/AbilityApplication.vue
@@ -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:我的申请 能力申请 查看详情
-->
@@ -142,7 +142,7 @@
';' +
'视频流地址:' +
backUrl +
- '/resource/hls/getHls/?channelId=' +
+ 'resource/hls/getHls/?channelId=' +
val.channelId
}}