From ee9ec454504bb971cb759d27925b2e641e5320bf Mon Sep 17 00:00:00 2001
From: a0049873 <79py69t9wb@privaterelay.appleid.com>
Date: Tue, 2 Aug 2022 11:59:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=8F=B0=E4=B8=8A=E6=9E=B6=20?=
=?UTF-8?q?=E9=A9=B3=E5=9B=9E=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../myAgent/demo/ability-resource-shelf.vue | 9 +-
front/public/index.html | 28 +--
.../views/capacityOnTheShelf/Algorithm.vue | 190 +++++++++++++---
.../views/capacityOnTheShelf/Application.vue | 211 +++++++++++++++--
.../capacityOnTheShelf/BusinessComponent.vue | 213 ++++++++++++++++--
.../DevelopmentComponents.vue | 211 +++++++++++++++--
.../capacityOnTheShelf/LayerServices.vue | 184 +++++++++++++--
.../components/PutOnTheShelf.vue | 32 ++-
front/src/views/components/upload/index.vue | 49 ++--
.../personalCenter/components/MyApply.vue | 21 +-
10 files changed, 975 insertions(+), 173 deletions(-)
diff --git a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue
index 42319aaf..1f3ec8b6 100644
--- a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue
+++ b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue
@@ -37,8 +37,8 @@
审批
同意
- 拒绝驳回
@@ -48,22 +48,18 @@
// window.SITE_CONFIG['websocketURL'] = '15.2.21.243:8888/renren-admin';
// window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 西海岸版本
- window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797';
- window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/';
- window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
- window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
+ // window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797';
+ // window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/';
+ // window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
+ // window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
// 开发
- // window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
- // window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.236:9796/';
- // window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.236:9796/document/#/devModelFile/';
- // window.SITE_CONFIG['apiURL'] = 'http://15.2.21.236:8888/renren-admin';
- // window.SITE_CONFIG['websocketURL'] = '15.2.21.236:8888/renren-admin';
- window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
- // window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
- // window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
- // window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
- // window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
+ window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
+ window.SITE_CONFIG['previewUrl'] = 'http://192.168.124.236:9796/';
+ window.SITE_CONFIG['frontUrl'] = 'http://192.168.124.236:9796/document/#/devModelFile/';
+ window.SITE_CONFIG['apiURL'] = 'http://192.168.124.236:8888/renren-admin';
+ window.SITE_CONFIG['websocketURL'] = '192.168.124.236:8888/renren-admin';
+ window.SITE_CONFIG['POI_URL'] = 'http://192.168.124.236:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';
diff --git a/front/src/views/capacityOnTheShelf/Algorithm.vue b/front/src/views/capacityOnTheShelf/Algorithm.vue
index baba1447..789854a8 100644
--- a/front/src/views/capacityOnTheShelf/Algorithm.vue
+++ b/front/src/views/capacityOnTheShelf/Algorithm.vue
@@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua
- * @LastEditTime: 2022-07-26 14:35:45
+ * @LastEditTime: 2022-08-02 11:28:00
* @Description: 算法上架
-->
@@ -266,7 +266,13 @@
import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter'
import { shangjiainsert, shangjiaapply } from '@/api/personalCenter'
- import { getUser, getUserInfo } from '@/api/home'
+ import {
+ getUser,
+ getUserInfo,
+ selectOne,
+ updateRes,
+ relaunch,
+ } from '@/api/home'
import { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus'
const router = useRouter()
@@ -454,6 +460,7 @@
!dataFrom.value.infoList.filter((val) => val.attrType === '应用领域')[0]
.attrValue
) {
+ console.log('应用领域==========>', dataFrom.value.infoList)
notFilled.value.push('应用领域')
}
if (notFilled.value.length > 0) {
@@ -543,34 +550,63 @@
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
- shangjiainsert(dataFrom.value).then((res) => {
- const instanceId = res.data.data
- dataFrom.value.id = res.data.data
- getUser().then((res6) => {
- getUserInfo(res6.data.data.id).then((res2) => {
- const deptId = dataFrom.value.deptId
- const userId = res2.data.data.id
- const userName = res2.data.data.realName
- const params = {
- instanceId: instanceId,
- deptId: deptId,
- userId: userId,
- userName: userName,
- resourceDTO: [dataFrom.value],
- }
- shangjiaapply(params).then((res3) => {
- console.log('res3', res3)
- if (res3.data.code == 0) {
- message.success('上架申请提交成功,请注意查看消息通知!')
+ if (resourceId) {
+ delete dataFrom.value.createDate
+ delete dataFrom.value.updateDate
+ dataFrom.value.infoList.map((del) => {
+ delete del.createDate
+ delete del.updateDate
+ })
+ updateRes(dataFrom.value).then((upres) => {
+ if (upres.data.code == 0) {
+ relaunch({ data: dataFrom.value, taskId: taskId }).then((res) => {
+ console.log('驳回================>', res)
+ if (res.data.code == 0) {
+ message.success('重新发起流程成功!')
+ submitFlag.value = true
window.setTimeout(() => {
window.close()
- submitFlag.value = true
}, 1000)
+ } else {
+ message.error('重新发起流程失败!')
+ submitFlag.value = true
}
})
+ } else {
+ message.error('数据更新失败!')
+ submitFlag.value = true
+ }
+ })
+ } else {
+ shangjiainsert(dataFrom.value).then((res) => {
+ const instanceId = res.data.data
+ dataFrom.value.id = res.data.data
+ getUser().then((res6) => {
+ getUserInfo(res6.data.data.id).then((res2) => {
+ const deptId = dataFrom.value.deptId
+ const userId = res2.data.data.id
+ const userName = res2.data.data.realName
+ const params = {
+ instanceId: instanceId,
+ deptId: deptId,
+ userId: userId,
+ userName: userName,
+ resourceDTO: [dataFrom.value],
+ }
+ shangjiaapply(params).then((res3) => {
+ console.log('res3', res3)
+ if (res3.data.code == 0) {
+ message.success('上架申请提交成功,请注意查看消息通知!')
+ window.setTimeout(() => {
+ window.close()
+ submitFlag.value = true
+ }, 1000)
+ }
+ })
+ })
})
})
- })
+ }
}
}
}
@@ -583,7 +619,7 @@
navList.value = []
navList2.value = []
res.data.data.children.forEach((val) => {
- console.log(val)
+ // console.log('val================>', val, echoData.value)
navList.value.push({
name: val.name,
key: val.name,
@@ -601,14 +637,115 @@
}
})
}
+ // 回填数据
+ if (resourceId) {
+ val.children.map((item) => {
+ if (item.children.length > 0) {
+ item.children.map((child) => {
+ switch (child.name) {
+ case '算法名称':
+ child.note1 = echoData.value.name
+ break
+ case '算法描述':
+ child.note1 = echoData.value.description
+ break
+ case '共享条件':
+ child.note1 = echoData.value.shareCondition
+ break
+ case '归属部门':
+ child.note1 = echoData.value.deptId
+ break
+ case '部门联系人':
+ child.note1 = echoData.value.deptContacts
+ break
+ case '部门联系人电话':
+ child.note1 = echoData.value.deptPhone
+ break
+ case '接口请求方式':
+ child.note1 = echoData.value.apiMethodType
+ break
+ case '应用领域':
+ if (
+ echoData.value.infoList &&
+ echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0]
+ ) {
+ child.note1 = echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0].attrValue
+ child.note2 = echoData.value.infoList
+ .filter((fil) => fil.attrType == child.name)[0]
+ .attrValue.split(';')
+ }
+ break
+ case '算法介绍视频':
+ if (
+ echoData.value.infoList &&
+ echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0]
+ ) {
+ videoList.value = [
+ {
+ uid: echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0].id,
+ name:
+ echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0].note3 || '--',
+ status: 'done',
+ url: echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0].attrValue,
+ thumbUrl: echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0].attrValue,
+ },
+ ]
+ }
+ break
+ default:
+ if (
+ echoData.value.infoList &&
+ echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0]
+ ) {
+ child.note1 = echoData.value.infoList.filter(
+ (fil) => fil.attrType == child.name
+ )[0].attrValue
+ }
+ break
+ }
+ })
+ }
+ console.log('item================>', item, echoData.value)
+ })
+ }
})
data.value = res.data.data.children
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
- console.log('所有编目结构==============>', res.data.data)
+ console.log('所有编目结构==============>', data.value)
})
}
+ const resourceId = router.currentRoute.value.query.id
+ const taskId = router.currentRoute.value.query.taskId
+ const echoData = ref({})
+ if (resourceId) {
+ // 回显数据
+ selectOne(resourceId).then((res) => {
+ echoData.value = res.data.data
+ dataFrom.value = echoData.value
+ init()
+ // console.log('驳回修改===================>', echoData.value)
+ })
+ } else {
+ init()
+ }
// 特殊字段处理
const refPutOnTheShelf = ref(null)
const changeSfys = (type) => {
@@ -624,7 +761,6 @@
refPutOnTheShelf.value.add('计费标准信息', true)
refPutOnTheShelf.value.add('常见问题', true, type)
}
- init()
mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
@@ -698,6 +834,8 @@
mybus.off('chageFileList')
mybus.off('chageImgList')
mybus.off('chageDataFromDwon')
+ mybus.off('chageVideoList')
+ mybus.off('chagePackageList')
})
diff --git a/front/src/views/personalCenter/components/MyApply.vue b/front/src/views/personalCenter/components/MyApply.vue
index 07c9d90a..1f57700a 100644
--- a/front/src/views/personalCenter/components/MyApply.vue
+++ b/front/src/views/personalCenter/components/MyApply.vue
@@ -159,9 +159,9 @@