前台上架 驳回功能

This commit is contained in:
a0049873 2022-08-02 11:59:01 +08:00
parent 1959ac68f9
commit ee9ec45450
10 changed files with 975 additions and 173 deletions

View File

@ -37,8 +37,8 @@
<h3>审批</h3> <h3>审批</h3>
<div> <div>
<el-button type="primary" @click="showDialog('同意')">同意</el-button> <el-button type="primary" @click="showDialog('同意')">同意</el-button>
<el-button type="danger" plain @click="showDialog('拒绝')" <el-button type="danger" plain @click="showDialog('驳回')"
>拒绝</el-button >驳回</el-button
> >
<!-- <el-radio-group v-model="agreeOrList" style="width: 230px"> <!-- <el-radio-group v-model="agreeOrList" style="width: 230px">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button> <el-radio-button label="同意" class="blueAll">同意</el-radio-button>
@ -232,13 +232,14 @@ export default {
}) })
}) })
.catch(() => {}) .catch(() => {})
} else if (this.dialogType === '拒绝') { } else if (this.dialogType === '驳回') {
const params = qs.stringify({ const params = qs.stringify({
taskId: this.taskId, taskId: this.taskId,
comment: this.input comment: this.input
}) })
this.$http this.$http
.post('/act/task/endProcess?', params) // .post('/act/task/endProcess?', params)
.post('/act/task/backToFirst?', params)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.$message.error(res.msg) this.$message.error(res.msg)

View File

@ -1,8 +1,8 @@
<!-- <!--
* @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.liangjunhua
* @LastEditTime: 2022-07-28 14:42:55 * @LastEditTime: 2022-08-02 09:17:32
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -48,22 +48,18 @@
// 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.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://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/';
window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/'; // 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['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['backUrl'] = 'http://15.2.21.238:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/'; window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/'; window.SITE_CONFIG['previewUrl'] = 'http://192.168.124.236:9796/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin'; window.SITE_CONFIG['frontUrl'] = 'http://192.168.124.236:9796/document/#/devModelFile/';
// window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; 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['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,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27 * @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-26 14:35:45 * @LastEditTime: 2022-08-02 11:28:00
* @Description: 算法上架 * @Description: 算法上架
--> -->
<template> <template>
@ -266,7 +266,13 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter' import { getCategoryTree } from '@/api/personalCenter'
import { shangjiainsert, shangjiaapply } 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 { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
@ -454,6 +460,7 @@
!dataFrom.value.infoList.filter((val) => val.attrType === '应用领域')[0] !dataFrom.value.infoList.filter((val) => val.attrType === '应用领域')[0]
.attrValue .attrValue
) { ) {
console.log('应用领域==========>', dataFrom.value.infoList)
notFilled.value.push('应用领域') notFilled.value.push('应用领域')
} }
if (notFilled.value.length > 0) { if (notFilled.value.length > 0) {
@ -543,6 +550,34 @@
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (item) => item.attrValue !== ''
) )
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()
}, 1000)
} else {
message.error('重新发起流程失败!')
submitFlag.value = true
}
})
} else {
message.error('数据更新失败!')
submitFlag.value = true
}
})
} else {
shangjiainsert(dataFrom.value).then((res) => { shangjiainsert(dataFrom.value).then((res) => {
const instanceId = res.data.data const instanceId = res.data.data
dataFrom.value.id = res.data.data dataFrom.value.id = res.data.data
@ -574,6 +609,7 @@
} }
} }
} }
}
const init = () => { const init = () => {
getCategoryTree().then((res) => { getCategoryTree().then((res) => {
// console.clear() // console.clear()
@ -583,7 +619,7 @@
navList.value = [] navList.value = []
navList2.value = [] navList2.value = []
res.data.data.children.forEach((val) => { res.data.data.children.forEach((val) => {
console.log(val) // console.log('val================>', val, echoData.value)
navList.value.push({ navList.value.push({
name: val.name, name: val.name,
key: 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 data.value = res.data.data.children
refData.value = data.value.filter( refData.value = data.value.filter(
(item) => item.name === showView.value (item) => item.name === showView.value
)[0] )[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 refPutOnTheShelf = ref(null)
const changeSfys = (type) => { const changeSfys = (type) => {
@ -624,7 +761,6 @@
refPutOnTheShelf.value.add('计费标准信息', true) refPutOnTheShelf.value.add('计费标准信息', true)
refPutOnTheShelf.value.add('常见问题', true, type) refPutOnTheShelf.value.add('常见问题', true, type)
} }
init()
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) { if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj shiyongshouce.value = obj
@ -698,6 +834,8 @@
mybus.off('chageFileList') mybus.off('chageFileList')
mybus.off('chageImgList') mybus.off('chageImgList')
mybus.off('chageDataFromDwon') mybus.off('chageDataFromDwon')
mybus.off('chageVideoList')
mybus.off('chagePackageList')
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27 * @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-26 14:41:26 * @LastEditTime: 2022-08-02 11:40:41
* @Description: 应用上架 * @Description: 应用上架
--> -->
<template> <template>
@ -196,7 +196,13 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter' import { getCategoryTree } from '@/api/personalCenter'
import { shangjiainsert, shangjiaapply } 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 { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const showView = ref('基本信息') const showView = ref('基本信息')
@ -394,6 +400,34 @@
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (item) => item.attrValue !== ''
) )
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()
}, 1000)
} else {
message.error('重新发起流程失败!')
submitFlag.value = true
}
})
} else {
message.error('数据更新失败!')
submitFlag.value = true
}
})
} else {
shangjiainsert(dataFrom.value).then((res) => { shangjiainsert(dataFrom.value).then((res) => {
const instanceId = res.data.data const instanceId = res.data.data
dataFrom.value.id = res.data.data dataFrom.value.id = res.data.data
@ -424,6 +458,7 @@
}) })
} }
} }
}
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
@ -451,6 +486,121 @@
key: val.name, key: val.name,
}) })
navList2.value.push(val.name) navList2.value.push(val.name)
//
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 '应用领域':
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
case '应用图片':
if (
echoData.value.infoList &&
echoData.value.infoList.filter(
(fil) => fil.attrType == child.name
)[0]
) {
imgList.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 data.value = res.data.data.children
refData.value = data.value.filter( refData.value = data.value.filter(
@ -459,6 +609,20 @@
console.log('所有编目结构==============>', res.data.data) console.log('所有编目结构==============>', res.data.data)
}) })
} }
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 refPutOnTheShelf = ref(null)
const changeGnjs = (type) => { const changeGnjs = (type) => {
@ -469,7 +633,6 @@
console.log(refPutOnTheShelf) console.log(refPutOnTheShelf)
refPutOnTheShelf.value.add('常见问题', true, type) refPutOnTheShelf.value.add('常见问题', true, type)
} }
init()
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) { if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj shiyongshouce.value = obj

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:51 * @Date: 2022-06-20 09:35:51
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-26 14:36:31 * @LastEditTime: 2022-08-02 11:47:32
* @Description: 业务组件 * @Description: 业务组件
--> -->
<template> <template>
@ -229,7 +229,13 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter' import { getCategoryTree } from '@/api/personalCenter'
import { shangjiainsert, shangjiaapply } 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 { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
@ -486,6 +492,35 @@
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (item) => item.attrValue !== ''
) )
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()
}, 1000)
} else {
message.error('重新发起流程失败!')
submitFlag.value = true
}
})
} else {
message.error('数据更新失败!')
submitFlag.value = true
}
})
} else {
shangjiainsert(dataFrom.value).then((res) => { shangjiainsert(dataFrom.value).then((res) => {
const instanceId = res.data.data const instanceId = res.data.data
dataFrom.value.id = res.data.data dataFrom.value.id = res.data.data
@ -517,6 +552,7 @@
} }
} }
} }
}
// //
const refPutOnTheShelf = ref(null) const refPutOnTheShelf = ref(null)
const changeGnjs = (type) => { const changeGnjs = (type) => {
@ -545,6 +581,121 @@
key: val.name, key: val.name,
}) })
navList2.value.push(val.name) navList2.value.push(val.name)
//
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
case '组件图片':
if (
echoData.value.infoList &&
echoData.value.infoList.filter(
(fil) => fil.attrType == child.name
)[0]
) {
imgList.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 data.value = res.data.data.children
refData.value = data.value.filter( refData.value = data.value.filter(
@ -553,7 +704,21 @@
console.log('所有编目结构==============>', res.data.data) console.log('所有编目结构==============>', res.data.data)
}) })
} }
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() init()
// console.log('===================>', echoData.value)
})
} else {
init()
}
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) { if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj shiyongshouce.value = obj

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17 * @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-26 14:37:17 * @LastEditTime: 2022-08-02 11:51:50
* @Description: 开发组件 * @Description: 开发组件
--> -->
<template> <template>
@ -228,7 +228,13 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter' import { getCategoryTree } from '@/api/personalCenter'
import { shangjiainsert, shangjiaapply } 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 { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
@ -498,6 +504,34 @@
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (item) => item.attrValue !== ''
) )
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()
}, 1000)
} else {
message.error('重新发起流程失败!')
submitFlag.value = true
}
})
} else {
message.error('数据更新失败!')
submitFlag.value = true
}
})
} else {
shangjiainsert(dataFrom.value).then((res) => { shangjiainsert(dataFrom.value).then((res) => {
const instanceId = res.data.data const instanceId = res.data.data
dataFrom.value.id = res.data.data dataFrom.value.id = res.data.data
@ -529,6 +563,7 @@
} }
} }
} }
}
const init = () => { const init = () => {
getCategoryTree().then((res) => { getCategoryTree().then((res) => {
// console.clear() // console.clear()
@ -544,6 +579,121 @@
key: val.name, key: val.name,
}) })
navList2.value.push(val.name) navList2.value.push(val.name)
//
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
case '组件图片':
if (
echoData.value.infoList &&
echoData.value.infoList.filter(
(fil) => fil.attrType == child.name
)[0]
) {
imgList.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 data.value = res.data.data.children
refData.value = data.value.filter( refData.value = data.value.filter(
@ -552,7 +702,20 @@
console.log('所有编目结构==============>', res.data.data) console.log('所有编目结构==============>', res.data.data)
}) })
} }
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() init()
// console.log('===================>', echoData.value)
})
} else {
init()
}
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) { if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj shiyongshouce.value = obj

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17 * @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-26 14:37:38 * @LastEditTime: 2022-08-02 11:58:16
* @Description: 图层服务 * @Description: 图层服务
--> -->
<template> <template>
@ -177,7 +177,13 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter' import { getCategoryTree } from '@/api/personalCenter'
import { shangjiainsert, shangjiaapply } 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 { message } from 'ant-design-vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
@ -395,6 +401,34 @@
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (item) => item.attrValue !== ''
) )
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()
}, 1000)
} else {
message.error('重新发起流程失败!')
submitFlag.value = true
}
})
} else {
message.error('数据更新失败!')
submitFlag.value = true
}
})
} else {
shangjiainsert(dataFrom.value).then((res) => { shangjiainsert(dataFrom.value).then((res) => {
const instanceId = res.data.data const instanceId = res.data.data
dataFrom.value.id = res.data.data dataFrom.value.id = res.data.data
@ -426,6 +460,7 @@
} }
} }
} }
}
const init = () => { const init = () => {
getCategoryTree().then((res) => { getCategoryTree().then((res) => {
// console.clear() // console.clear()
@ -441,6 +476,94 @@
key: val.name, key: val.name,
}) })
navList2.value.push(val.name) navList2.value.push(val.name)
//
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]
) {
imgList.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 data.value = res.data.data.children
refData.value = data.value.filter( refData.value = data.value.filter(
@ -449,7 +572,20 @@
console.log('所有编目结构==============>', res.data.data) console.log('所有编目结构==============>', res.data.data)
}) })
} }
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() init()
// console.log('===================>', echoData.value)
})
} else {
init()
}
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) { if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj shiyongshouce.value = obj

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08 * @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-26 16:29:25 * @LastEditTime: 2022-08-02 11:31:43
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -671,6 +671,8 @@
console.log('默认部门=========>', item, res1.data) console.log('默认部门=========>', item, res1.data)
data.value.list.push(item) data.value.list.push(item)
}) })
} else {
data.value.list.push(item)
} }
}) })
} else if (item.name === '部门联系人') { } else if (item.name === '部门联系人') {
@ -680,6 +682,8 @@
item.note1 = res1.data.realName || '' item.note1 = res1.data.realName || ''
}) })
data.value.list.push(item) data.value.list.push(item)
} else {
data.value.list.push(item)
} }
} else if (item.name === '部门联系人电话') { } else if (item.name === '部门联系人电话') {
if (!item.note1) { if (!item.note1) {
@ -688,6 +692,8 @@
item.note1 = res1.data.mobile || '' item.note1 = res1.data.mobile || ''
}) })
data.value.list.push(item) data.value.list.push(item)
} else {
data.value.list.push(item)
} }
} else if (item.name === '来源应用') { } else if (item.name === '来源应用') {
queryApplicationRelByResourceId({ queryApplicationRelByResourceId({
@ -707,6 +713,7 @@
data.value.list.push(item) data.value.list.push(item)
} }
}) })
console.log('props.dataFrom', data.value.list)
}) })
if (props.dataFrom) { if (props.dataFrom) {
// console.log(props.dataFrom, data.value.list) // console.log(props.dataFrom, data.value.list)
@ -1012,7 +1019,7 @@
showTypeClick('调用接口') showTypeClick('调用接口')
watch(data.value.list, (newProps, oldProps) => { watch(data.value.list, (newProps, oldProps) => {
// console.log(newProps, oldProps) console.log('数据发生改变==========>', newProps, oldProps)
newProps.forEach((val) => { newProps.forEach((val) => {
// console.log('==========>', val) // console.log('==========>', val)
if ( if (
@ -1032,6 +1039,7 @@
if (val.options) { if (val.options) {
note2 = val.options.filter((item) => item.value == val.note1)[0] note2 = val.options.filter((item) => item.value == val.note1)[0]
} }
console.log('chageDataFromDwon===================>', val)
mybus.emit('chageDataFromDwon', { mybus.emit('chageDataFromDwon', {
attrType: val.name, attrType: val.name,
attrValue: val.note1, attrValue: val.note1,
@ -1040,6 +1048,15 @@
}) })
} else { } else {
if (val.name !== '应用领域' && val.name !== '发布端') { if (val.name !== '应用领域' && val.name !== '发布端') {
if (val.name == '算法介绍视频') {
console.log('变更视频==================>', val)
mybus.emit('chageDataFrom', {
attrType: val.name,
attrValue: val.note1,
delFlag: 0,
note3: val.note3,
})
} else {
mybus.emit('chageDataFrom', { mybus.emit('chageDataFrom', {
attrType: val.name, attrType: val.name,
attrValue: val.note1, attrValue: val.note1,
@ -1047,6 +1064,7 @@
}) })
} }
} }
}
}) })
}) })
const applicationsChange = (value) => { const applicationsChange = (value) => {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-09 15:41:19 * @Date: 2022-06-09 15:41:19
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-20 16:38:35 * @LastEditTime: 2022-08-02 11:30:50
* @Description: 上传组件 * @Description: 上传组件
--> -->
<template> <template>
@ -89,12 +89,22 @@
return flag || Upload.LIST_IGNORE return flag || Upload.LIST_IGNORE
} }
const handlePreview = (file) => { const handlePreview = (file) => {
// console.log(file) console.log(file)
if (file.response && file.response.data) {
window.open( window.open(
window.SITE_CONFIG.previewUrl + window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' + 'hisense_office/onlinePreview?url=' +
btoa(encodeURI(file.response.data)) btoa(encodeURI(file.response.data))
) )
} else if (file.url) {
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(file.url))
)
} else {
message.warning('预览失败!')
}
} }
const handleChange = (info) => { const handleChange = (info) => {
if (info.file.status !== 'uploading') { if (info.file.status !== 'uploading') {
@ -104,6 +114,8 @@
message.success(`${info.file.name}上传成功`) message.success(`${info.file.name}上传成功`)
// eslint-disable-next-line vue/no-mutating-props // eslint-disable-next-line vue/no-mutating-props
props.data.note1 = info.file.response.data props.data.note1 = info.file.response.data
// eslint-disable-next-line vue/no-mutating-props
props.data.note3 = info.file.name
console.log(props.data, fileList.value) console.log(props.data, fileList.value)
if (props.type === '图片') { if (props.type === '图片') {
if (!props.emitFlag) { if (!props.emitFlag) {
@ -120,6 +132,7 @@
} else if (props.type === '压缩包') { } else if (props.type === '压缩包') {
mybus.emit('chagePackageList', fileList.value) mybus.emit('chagePackageList', fileList.value)
} else if (props.type === '视频') { } else if (props.type === '视频') {
console.log(fileList.value)
mybus.emit('chageVideoList', fileList.value) mybus.emit('chageVideoList', fileList.value)
} }
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {

View File

@ -159,9 +159,9 @@
</div> </div>
<div class="button-box"> <div class="button-box">
<div class="button" @click="showDetail(item)">查看详情</div> <div class="button" @click="showDetail(item)">查看详情</div>
<!-- <div class="button" @click="showAdd(item)" v-if="item.backToFirst"> <div class="button" @click="showAdd(item)" v-if="item.backToFirst">
修改 修改
</div> --> </div>
<!-- <div <!-- <div
v-if=" v-if="
!( !(
@ -450,12 +450,21 @@
// abilitydemandapply // abilitydemandapply
// abilityprocess // abilityprocess
if (item.processDefinitionKey == 'resourcemountapply') { if (item.processDefinitionKey == 'resourcemountapply') {
const newpage = router.resolve({ const data = {
path: '/nenglishangjia', //
query: {
id: item.resourceId, id: item.resourceId,
taskId: item.currentTaskList[0].taskId, taskId: item.currentTaskList[0].taskId,
}, }
if (item.dto.type == '组件服务') {
data.abilityToType = '组件服务'
data.componentTypeValue = item.dto.infoList.filter(
(val) => val.attrType == '组件类型'
)[0].attrValue
} else if (item.dto.type == '应用资源') {
data.abilityToType = '应用资源'
}
const newpage = router.resolve({
path: '/nenglishangjia', //
query: data,
}) })
console.log('上架申请修改=================》', item) console.log('上架申请修改=================》', item)
window.open(newpage.href, '_blank') window.open(newpage.href, '_blank')