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 @@ + + + \ 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 @@ + + + + + + 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 @@ + + + + + + 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 @@ - - - - + 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:我的申请 能力申请 查看详情 -->