我的申请 新增数据资源申请功能

This commit is contained in:
a0049873 2022-11-11 15:05:39 +08:00
parent 79357c6e9a
commit 8f95bf12cb
5 changed files with 346 additions and 19 deletions

View File

@ -7,6 +7,20 @@ export function getMyProcessInstancePage(params) {
params,
})
}
export function yaweiApproveStatus(params) {
return request({
url: 'resource/ZywMessage/yaweiApproveStatus',
method: 'get',
params,
})
}
export function yaweiApproveDetails(params) {
return request({
url: 'resource/ZywMessage/yaweiApproveDetails',
method: 'get',
params,
})
}
export function getTabilityapplication(params) {
return request({
url: '/processForm/tabilityapplication/my_page',

View File

@ -53,6 +53,9 @@
let dataList = ref([])
const getList = () => {
selectRecommend().then((res) => {
if (res.data.data.records.length > 9) {
res.data.data.records.length = 9
}
dataList.value = res.data.data.records
dataList.value.map((item, index) => {
// debugger
@ -95,7 +98,7 @@
router.push({
path: '/DetailsPageconetent',
query: {
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
},
})
}

View File

@ -18,12 +18,21 @@
></OffTheShelf>
<Demand :refObj="refObj" v-else-if="showType === '能力需求'"></Demand>
<Comment :refObj="refObj" v-else-if="showType === '需求评论'"></Comment>
<dataResourceApplication
:refObj="refObj"
v-else-if="showType === '数据资源申请'"
></dataResourceApplication>
<OtherApplications :refObj="refObj" v-else></OtherApplications>
<div>
<div class="title">审批详情</div>
<template v-for="item in dataSource.data" :key="item">
<div class="oddNumbers">子单号:{{ item[0] }}</div>
<a-table :dataSource="item[1]" :columns="columns">
<a-table
:dataSource="item[1]"
:columns="dataSourceColumns"
v-if="showType === '数据资源申请'"
></a-table>
<a-table :dataSource="item[1]" :columns="columns" v-else>
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'">
<a>{{ text }}</a>
@ -40,6 +49,7 @@
import OffTheShelf from './OffTheShelf.vue'
import Demand from './Demand.vue'
import Comment from './Comment.vue'
import dataResourceApplication from './dataResourceApplication.vue'
import DeviceApplyDetail from './DeviceApplyDetail.vue'
import OtherApplications from '@/views/personalCenter/components/OtherApplications '
import { onMounted, reactive, defineProps, ref } from 'vue'
@ -159,8 +169,33 @@
width: '180px',
},
]
const dataSourceColumns = [
{
title: '操作',
dataIndex: 'cz',
key: 'cz',
width: '180px',
},
{
title: '处理用户',
dataIndex: 'czyh',
key: 'czyh',
width: '180px',
},
{
title: '处理时间',
dataIndex: 'clsj',
key: 'clsj',
width: '180px',
},
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
width: '180px',
},
]
const getInfo = () => {
console.log(props.processInstanceId, '============================')
if (props.processDefinitionName == '能力申请') {
// getTaskVariables({ taskId: props.processInstanceId }).then((res) => {
// console.log('====================>', res.data.data)
@ -205,7 +240,6 @@
shifoushizujian.value = false
console.log(res.data.data.resourceDTO)
res.data.data.resourceDTO.infoList.forEach((val) => {
console.log(val, '111111111111111111111111')
if (val.attrValue === '智能算法') {
nameNotShow.value = true
algorithmShow.value = false
@ -213,7 +247,6 @@
}
})
}
console.log('222222222222', dataForm.data)
})
}
if (props.processDefinitionName == '能力资源下架') {
@ -255,7 +288,6 @@
})
const getResourceURL = () => {
console.log('111111111111111111111111111111', Cookies.get('token'))
const params = qs.stringify({
token: Cookies.get('token'),
// processInstanceId: this.dataForm.processInstanceId

View File

@ -12,7 +12,7 @@
{{ item }}
</div>
</div>
<div class="tab">
<div class="tab" v-show="typeIndex != 5">
<span>申请状态</span>
<div
:class="tabIndex == index ? 'tabclass' : ' '"
@ -39,32 +39,49 @@
:key="item.index"
>
<div class="content-body-title">
<span>申请单号{{ item.applyNumber || '--' }}</span>
<span>申请单号{{ item.applyNumber || item.GUID || '--' }}</span>
<div></div>
</div>
<a-tooltip>
<template #title>
{{ item.cameraList ? item.system : (item.title|| item.name) }}
{{
item.cameraList
? item.system
: item.title || item.name || item.title
}}
</template>
<div class="content-body-title">
<span>
名称{{
item.cameraList ? item.system : (item.title || item.name)
item.cameraList
? item.system
: item.title || item.name || item.title
}}
</span>
<div></div>
</div>
</a-tooltip>
<div class="content-body-content">
<p class="content-body-content-son" v-if="typeName !== '设备申请'">
<p
class="content-body-content-son"
v-if="typeName !== '设备申请' && typeName !== '数据资源申请'"
>
审核结果{{ item.ended ? '审核完成' : '审核中' }}
</p>
<p class="content-body-content-son" v-else>
<p
class="content-body-content-son"
v-else-if="typeName == '设备申请'"
>
审核结果{{ item.state === 0 ? '审核中' : '审核完成' }}
</p>
<p class="content-body-content-son" v-else>
审核结果{{ item.bmyijian ? '审核完成' : '审核中' }}
</p>
</div>
<div class="content-body-bottom">
<div>申请日期{{ item.createDate || item.startTime }}</div>
<div>
申请日期{{ item.createDate || item.startTime || item.tbsj }}
</div>
<!-- 西海岸--增加过期时间显示 -->
<div v-if="isXiHaiAn">过期时间{{ item.expireDate || '' }}</div>
</div>
@ -219,6 +236,8 @@
demandComment,
deviceApplylist,
getDeviceDetail,
yaweiApproveStatus,
yaweiApproveDetails,
} from '@/api/personalCenter'
import {
updateRes,
@ -243,6 +262,7 @@
'能力下架',
'能力需求',
'需求评论',
'数据资源申请',
// '',
])
// 西-
@ -253,17 +273,17 @@
typeList.value.push('设备申请')
}
const typeStrObj = {
'能力上架': 'resourcemountapply',
'能力下架': 'resourcundercarriageapply',
'能力需求': 'abilitydemandapply',
'需求评论': 'comment_review',
能力上架: 'resourcemountapply',
能力下架: 'resourcundercarriageapply',
能力需求: 'abilitydemandapply',
需求评论: 'comment_review',
}
let tabList = ref(['全部', '审核中', '审核完成'])
const contentList = reactive({ data: [] })
let tabIndex = ref(0)
let typeIndex = ref(0)
let typeName = ref(typeList.value[0])
if(router.currentRoute.value.query.tabTypeName) {
if (router.currentRoute.value.query.tabTypeName) {
typeName.value = router.currentRoute.value.query.tabTypeName
}
const videoVisible = ref(false)
@ -302,6 +322,7 @@
//
const changeType = (item, index) => {
contentList.data = []
console.log('item, index-----选择类型------->', item, index)
numFlag.value = true
num.value = []
@ -310,7 +331,7 @@
ended.value = ''
page.value = 1
typeIndex.value = index
typeName.value = item;
typeName.value = item
getApplyList()
}
@ -361,6 +382,33 @@
message.error('数据请求失败!')
}
})
} else if (typeName.value == '数据资源申请') {
yaweiApproveDetails({ applyGuid: item.GUID })
.then((res) => {
console.log('详情===========>', res.data.data)
res.data.data.map((val) => {
val.clsj = moment(val.clsj).format('YYYY-MM-DD HH:mm:ss')
})
refObj.value.description = '数据资源'
refObj.value.sqbm = item.sqbm //
refObj.value.title = item.title //
refObj.value.ywlxr = item.ywlxr //
refObj.value.ywlxrdh = item.ywlxrdh //
refObj.value.jslxr = item.jslxr //
refObj.value.jslxrdh = item.jslxrdh //
refObj.value.miaoshu = item.miaoshu //
refObj.value.zt = item.zt //
refObj.value.resourceApplication = {
dataSource: [
{
instanceId: item.GUID,
taskHandleDetailInfo: res.data.data,
},
],
} //
detailsVisible.value = true
})
.catch((err) => {})
} else if (typeName.value == '设备申请') {
getDeviceDetailInfo(item.deviceId)
.then((res) => {
@ -541,6 +589,16 @@
showType.value = '能力申请'
initNum2()
})
} else if (typeName.value == '数据资源申请') {
yaweiApproveStatus({ page: page.value, size: 4, title: '' }).then(
(res) => {
console.log('数据资源申请===============>', res.data.data)
contentList.data = res.data.data.data
num.value = []
total.value = res.data.data.cos
showType.value = '数据资源申请'
}
)
} else if (typeName.value == '能力评价') {
contentList.data = []
num.value = []

View File

@ -0,0 +1,220 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-07-12 09:42:44
* @LastEditors: Light
* @LastEditTime: 2022-11-11 14:38:06
* @Description:我的申请 能力申请 查看详情
-->
<template>
<div class="top">
<div class="title">基本信息</div>
<div class="main" v-if="props.refObj">
<div>
<p class="item">
<span>申请部门{{ props.refObj.sqbm || '--' }}</span>
<span>需求标题{{ props.refObj.title }}</span>
</p>
<p class="item">
<span>业务联系人{{ props.refObj.ywlxr }}</span>
<span>业务联系人电话{{ props.refObj.ywlxrdh }}</span>
</p>
<p class="item">
<span>技术联系人{{ props.refObj.jslxr }}</span>
<span>技术联系人电话{{ props.refObj.jslxrdh }}</span>
</p>
<p>
<span>共享数据必要性法分析{{ props.refObj.miaoshu }}</span>
</p>
<p class="item">
<span>办结结果{{ props.refObj.zt }}</span>
</p>
</div>
</div>
</div>
</template>
<script setup>
import { ref, defineProps } from 'vue'
const props = defineProps({
refObj: { type: Object, default: null },
})
console.log(props.refObj, '=====================================')
// if (props.refObj.resourceApplication) {
// showArr.value = []
// for (const key in props.refObj.resourceApplication) {
// if (props.refObj.resourceApplication[key].length > 0) {
// let obj = { name: '', instanceId: '', list: [], list2: [] }
// obj.name = key
// props.refObj.resourceApplication[key].map((item) => {
// obj.instanceId = item.instanceId
// if (item.resources.length > 0) {
// item.resources.map((val) => {
// obj.list.push(val)
// })
// } else {
// item.camera.map((val) => {
// obj.list2.push(val)
// })
// }
// })
// showArr.value.push(obj)
// }
// }
// }
</script>
<style lang="less" scoped>
.title {
font-size: 0.18rem;
color: #000;
font-weight: bold;
margin-bottom: 0.2rem;
padding-left: 0.1rem;
border-left: 0.06rem #0058e1 solid;
}
.top {
margin-bottom: 0.1rem;
.main {
background: #eee;
padding: 0.2rem 0.2rem 0.1rem;
p {
display: flex;
justify-content: space-between;
& > span {
width: 100%;
}
.enclosure {
width: 95%;
padding: 0.05rem 0.1rem;
background: #ddd;
display: flex;
justify-content: space-between;
margin-top: 0.05rem;
}
.btn:hover {
color: #0058e1;
cursor: pointer;
}
}
.item {
span {
width: 4.5rem;
}
}
}
}
.bottom {
.main {
.item {
border-top: 1px #eee solid;
.deptName {
color: #0058e1;
font-size: 0.16rem;
margin-top: 0.1rem;
display: flex;
align-items: center;
.img {
width: 0.05rem;
height: 0.05rem;
border-radius: 0.05rem;
background: #0058e1;
margin-right: 0.1rem;
}
}
.oddNumbers {
margin: 0.1rem 0 0 0.15rem;
}
.box {
margin-left: 0.1rem;
.ability {
height: 1.3rem;
display: flex;
border-bottom: 1px #eee solid;
padding: 0.1rem 0;
.left {
display: inline-block;
width: 1.1rem;
height: 1.1rem;
margin-left: 0.1rem;
background: url('~@/assets/home/sxt_square.png') no-repeat;
background-size: 100%;
}
.sxt {
background: url('~@/assets/home/sxt_square.png') no-repeat;
background-size: 100%;
}
.yyzy {
background: url('~@/assets/home/yyzy_square.png') no-repeat;
background-size: 100%;
}
.znsf {
background: url('~@/assets/home/znsf_square.png') no-repeat;
background-size: 100%;
}
.tcfw {
background: url('~@/assets/home/tcfw_square.png') no-repeat;
background-size: 100%;
}
.kfzj {
background: url('~@/assets/home/kfzj_square.png') no-repeat;
background-size: 100%;
}
.ywzj {
background: url('~@/assets/home/ywzj_square.png') no-repeat;
background-size: 100%;
}
.btn {
cursor: pointer;
color: #0087ff;
align-self: flex-end;
padding: 5px 10px;
border: 1px #0087ff solid;
border-radius: 0.2rem;
}
.right {
flex: 1;
margin-left: 0.15rem;
.ability-top {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.name {
.type {
background: #0087ff;
color: #fff;
padding: 2px 10px;
border-radius: 10px;
margin-left: 0.1rem;
}
}
}
.ability-bottom {
margin-top: 0.15rem;
// display: flex;
// justify-content: space-between;
.dec {
width: 7rem;
height: 0.44rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.result:hover {
color: #0058e1;
cursor: pointer;
}
}
}
}
}
}
}
}
</style>