西海岸:我的申请,增加设备申请
This commit is contained in:
parent
10fdc587a2
commit
4a28789464
|
@ -284,3 +284,20 @@ export function endProcess(params) {
|
||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 西海岸:我的申请--设备申请列表
|
||||||
|
export function deviceApplylist(params) {
|
||||||
|
return request({
|
||||||
|
url: '/deviceApply/page',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 西海岸:我的申请--设备申请--查询详情
|
||||||
|
export function getDeviceDetail(deviceId) {
|
||||||
|
return request({
|
||||||
|
url: `/device/${deviceId}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
|
@ -1,24 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="form-container">
|
<DeviceApplyDetail v-if="showType === '设备申请'" :refObj="refObj"></DeviceApplyDetail>
|
||||||
<AbilityApplication
|
<div class="form-container" v-else>
|
||||||
:refObj="refObj"
|
<AbilityApplication :refObj="refObj" v-if="showType === '能力申请'"></AbilityApplication>
|
||||||
v-if="showType === '能力申请'"
|
<PutOnTheShelf :refObj="refObj" v-else-if="showType === '能力上架'"></PutOnTheShelf>
|
||||||
></AbilityApplication>
|
<OffTheShelf :refObj="refObj" v-else-if="showType === '能力下架'"></OffTheShelf>
|
||||||
<PutOnTheShelf
|
|
||||||
:refObj="refObj"
|
|
||||||
v-else-if="showType === '能力上架'"
|
|
||||||
></PutOnTheShelf>
|
|
||||||
<OffTheShelf
|
|
||||||
:refObj="refObj"
|
|
||||||
v-else-if="showType === '能力下架'"
|
|
||||||
></OffTheShelf>
|
|
||||||
<Demand :refObj="refObj" v-else-if="showType === '能力需求'"></Demand>
|
<Demand :refObj="refObj" v-else-if="showType === '能力需求'"></Demand>
|
||||||
<Comment :refObj="refObj" v-else-if="showType === '需求评论'"></Comment>
|
<Comment :refObj="refObj" v-else-if="showType === '需求评论'"></Comment>
|
||||||
<OtherApplications :refObj="refObj" v-else></OtherApplications>
|
<OtherApplications :refObj="refObj" v-else></OtherApplications>
|
||||||
<!-- <div class="title">流程图</div>
|
|
||||||
<div>
|
|
||||||
<img :src="getResourceURL()" alt="" />
|
|
||||||
</div> -->
|
|
||||||
<div>
|
<div>
|
||||||
<div class="title">审批详情</div>
|
<div class="title">审批详情</div>
|
||||||
<template v-for="item in dataSource.data" :key="item">
|
<template v-for="item in dataSource.data" :key="item">
|
||||||
|
@ -40,6 +28,7 @@
|
||||||
import OffTheShelf from './OffTheShelf.vue'
|
import OffTheShelf from './OffTheShelf.vue'
|
||||||
import Demand from './Demand.vue'
|
import Demand from './Demand.vue'
|
||||||
import Comment from './Comment.vue'
|
import Comment from './Comment.vue'
|
||||||
|
import DeviceApplyDetail from './DeviceApplyDetail.vue'
|
||||||
import OtherApplications from '@/views/personalCenter/components/OtherApplications '
|
import OtherApplications from '@/views/personalCenter/components/OtherApplications '
|
||||||
import { onMounted, reactive, defineProps, ref } from 'vue'
|
import { onMounted, reactive, defineProps, ref } from 'vue'
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
|
@ -69,6 +58,8 @@
|
||||||
showType.value = props.showType
|
showType.value = props.showType
|
||||||
//流转详情
|
//流转详情
|
||||||
const dataSource = reactive({ data: [] })
|
const dataSource = reactive({ data: [] })
|
||||||
|
console.log('refObj------------>', refObj);
|
||||||
|
|
||||||
// console.log(props.refObj, '---------------------------------------')
|
// console.log(props.refObj, '---------------------------------------')
|
||||||
|
|
||||||
const downloadFile = (path, name) => {
|
const downloadFile = (path, name) => {
|
||||||
|
@ -255,6 +246,7 @@
|
||||||
height: 6rem;
|
height: 6rem;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
padding: 20px 20px 30px 20px;
|
padding: 20px 20px 30px 20px;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
@ -265,6 +257,7 @@
|
||||||
border-left: 6px #0058e1 solid;
|
border-left: 6px #0058e1 solid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.ant-table-thead)>tr>.ant-table-cell {
|
:deep(.ant-table-thead)>tr>.ant-table-cell {
|
||||||
background: #0087ff;
|
background: #0087ff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -272,6 +265,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.ant-table-tbody)>tr>.ant-table-cell:nth-child(5) {
|
:deep(.ant-table-tbody)>tr>.ant-table-cell:nth-child(5) {
|
||||||
// width: 110px;
|
// width: 110px;
|
||||||
// display: inline-block;
|
// display: inline-block;
|
||||||
|
@ -279,6 +273,7 @@
|
||||||
// overflow: hidden;
|
// overflow: hidden;
|
||||||
// text-overflow: ellipsis;
|
// text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oddNumbers {
|
.oddNumbers {
|
||||||
margin-bottom: 0.05rem;
|
margin-bottom: 0.05rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
<!--
|
||||||
|
* @Description: 我的申请 设备申请 查看详情
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="device-detail-box">
|
||||||
|
<div v-for="(db, key) in wrjData" :key="key">
|
||||||
|
<template v-if="typeof db == 'object'">
|
||||||
|
<div style="
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 10px 0;
|
||||||
|
text-align: center;
|
||||||
|
">
|
||||||
|
{{ db.attrType || '--' }}
|
||||||
|
</div>
|
||||||
|
<template v-if="db.attrValue">
|
||||||
|
<div style="padding: 0 30px" v-for="(value, key2) in JSON.parse(db.attrValue)" :key="value">
|
||||||
|
{{ key2 + ':' + value }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, defineProps, watch } from 'vue'
|
||||||
|
const props = defineProps({
|
||||||
|
refObj: { type: Object, default: null },
|
||||||
|
})
|
||||||
|
const wrjData = ref([])
|
||||||
|
wrjData.value = props.refObj.deviceAttrDTOList || []
|
||||||
|
|
||||||
|
watch(() => props.refObj, (val) => {
|
||||||
|
wrjData.value = val.deviceAttrDTOList || []
|
||||||
|
}, { immediate: true, deep: true })
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.device-detail-box {
|
||||||
|
height: 6rem;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -39,15 +39,20 @@
|
||||||
</div>
|
</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<div class="content-body-content">
|
<div class="content-body-content">
|
||||||
<p class="content-body-content-son">
|
<p class="content-body-content-son" v-if="typeName !=='设备申请'">
|
||||||
审核结果:{{ item.ended ? '审核完成' : '审核中' }}
|
审核结果:{{ item.ended ? '审核完成' : '审核中' }}
|
||||||
</p>
|
</p>
|
||||||
|
<p class="content-body-content-son" v-else>
|
||||||
|
审核结果:{{ item.state === 0 ? '审核中' : '审核完成' }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-body-bottom">
|
<div class="content-body-bottom">
|
||||||
<div>申请日期:{{ item.createDate || item.startTime }}</div>
|
<div>申请日期:{{ item.createDate || item.startTime }}</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
|
<div class="button" v-if="typeName =='设备申请' && phoneSate.includes(item.state)"
|
||||||
|
@click="showPhoneModal(item)">联系方式</div>
|
||||||
<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">
|
||||||
修改
|
修改
|
||||||
|
@ -98,10 +103,16 @@
|
||||||
</a-table>
|
</a-table>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 联系方式弹框 -->
|
||||||
|
<a-modal v-model:visible="phoneVisible" title="提示" @ok="phoneVisible = false">
|
||||||
|
<!-- 工业信息化局那个号,电话配这个号:199 6399 0996 -->
|
||||||
|
<p>请联系工业信息化局,电话:199 6399 0996</p>
|
||||||
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, reactive, ref, onBeforeUnmount } from 'vue'
|
import { onMounted, reactive, ref, onBeforeUnmount, h } from 'vue'
|
||||||
import {
|
import {
|
||||||
getMyProcessInstancePage,
|
getMyProcessInstancePage,
|
||||||
getTabilityapplication,
|
getTabilityapplication,
|
||||||
|
@ -109,6 +120,8 @@ import {
|
||||||
nengliziyuanshangjiaapply,
|
nengliziyuanshangjiaapply,
|
||||||
getDemandForm,
|
getDemandForm,
|
||||||
demandComment,
|
demandComment,
|
||||||
|
deviceApplylist,
|
||||||
|
getDeviceDetail,
|
||||||
} from '@/api/personalCenter'
|
} from '@/api/personalCenter'
|
||||||
import {
|
import {
|
||||||
updateRes,
|
updateRes,
|
||||||
|
@ -132,6 +145,7 @@ let typeList = ref([
|
||||||
])
|
])
|
||||||
// 西海岸-设备申请
|
// 西海岸-设备申请
|
||||||
let isXiHaiAn = whoShow.itShowXiHaiAn;
|
let isXiHaiAn = whoShow.itShowXiHaiAn;
|
||||||
|
const phoneSate = ref([2, 3])
|
||||||
if (isXiHaiAn) {
|
if (isXiHaiAn) {
|
||||||
typeList.value.push('设备申请')
|
typeList.value.push('设备申请')
|
||||||
}
|
}
|
||||||
|
@ -146,7 +160,6 @@ const contentList = reactive({ data: [] })
|
||||||
let tabIndex = ref(0)
|
let tabIndex = ref(0)
|
||||||
let typeIndex = ref(0)
|
let typeIndex = ref(0)
|
||||||
let typeName = ref(typeList.value[0])
|
let typeName = ref(typeList.value[0])
|
||||||
console.log('typeName------------>', typeName);
|
|
||||||
|
|
||||||
const videoVisible = ref(false)
|
const videoVisible = ref(false)
|
||||||
const numFlag = ref(true)
|
const numFlag = ref(true)
|
||||||
|
@ -206,9 +219,8 @@ const taskId = ref('')
|
||||||
const backUrl = ref(window.SITE_CONFIG.apiURL + '/')
|
const backUrl = ref(window.SITE_CONFIG.apiURL + '/')
|
||||||
const refObj = ref({})
|
const refObj = ref({})
|
||||||
const showDetail = (item) => {
|
const showDetail = (item) => {
|
||||||
console.log('showDetail', item)
|
|
||||||
// getProcDefBizRoute(item.processDefinitionId)
|
// getProcDefBizRoute(item.processDefinitionId)
|
||||||
if (typeIndex.value == 0 && item.applyFlag) {
|
if (typeName.value == '能力申请' && item.applyFlag) {
|
||||||
getByApplyFlag(item.applyFlag).then((res) => {
|
getByApplyFlag(item.applyFlag).then((res) => {
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
refObj.value = res.data.data
|
refObj.value = res.data.data
|
||||||
|
@ -221,7 +233,19 @@ const showDetail = (item) => {
|
||||||
message.error('数据请求失败!')
|
message.error('数据请求失败!')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (typeIndex.value !== 1) {
|
} else if (typeName.value == '设备申请') {
|
||||||
|
getDeviceDetailInfo(item.deviceId).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
refObj.value = res.data.data
|
||||||
|
detailsVisible.value = true
|
||||||
|
processDefinitionName.value = item.processDefinitionName
|
||||||
|
// businessKey.value = item.businessKey
|
||||||
|
// processInstanceId.value = item.processInstanceId
|
||||||
|
// resourceId.value = item.resourceId
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
})
|
||||||
|
} else if (Object.keys(typeStrObj).includes(typeName.value) || typeName.value == '能力评价') {
|
||||||
refObj.value = item
|
refObj.value = item
|
||||||
detailsVisible.value = true
|
detailsVisible.value = true
|
||||||
processDefinitionName.value = item.processDefinitionName
|
processDefinitionName.value = item.processDefinitionName
|
||||||
|
@ -401,9 +425,18 @@ const getApplyList = () => {
|
||||||
num.value = []
|
num.value = []
|
||||||
showType.value = ''
|
showType.value = ''
|
||||||
} else if (typeName.value == '设备申请') {
|
} else if (typeName.value == '设备申请') {
|
||||||
|
let _state = ended.value === '' ? '全部' : ended.value === true ? '审核完成' : '审核中';
|
||||||
|
getDeviceApply(_state).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
contentList.data = []
|
contentList.data = []
|
||||||
num.value = []
|
contentList.data = res.data.data.list || []
|
||||||
showType.value = ''
|
total.value = res.data.data.total
|
||||||
|
showType.value = '设备申请';
|
||||||
|
// 获取审核中,审核完成 数量
|
||||||
|
getDeviceNum()
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
})
|
||||||
} else if (Object.keys(typeStrObj).includes(typeName.value)) {
|
} else if (Object.keys(typeStrObj).includes(typeName.value)) {
|
||||||
processDefinitionKey.value = typeStrObj[typeName.value]
|
processDefinitionKey.value = typeStrObj[typeName.value]
|
||||||
params.processDefinitionKey = processDefinitionKey.value;
|
params.processDefinitionKey = processDefinitionKey.value;
|
||||||
|
@ -528,6 +561,61 @@ const del = () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 西海岸:设备申请列表 todo
|
||||||
|
const getDeviceApply = (state) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let _data = {
|
||||||
|
page: page.value,
|
||||||
|
limit: 4,
|
||||||
|
state
|
||||||
|
}
|
||||||
|
deviceApplylist(_data).then(res => {
|
||||||
|
resolve(res)
|
||||||
|
console.log('res----设备申请-------->', res);
|
||||||
|
}).catch(err => {
|
||||||
|
reject(err)
|
||||||
|
console.log('err------------>', err);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 西海岸:设备申请--查询详情
|
||||||
|
const getDeviceDetailInfo = (deviceId) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
getDeviceDetail(deviceId).then(res => {
|
||||||
|
resolve(res)
|
||||||
|
console.log('res----查询详情-------->', res);
|
||||||
|
}).catch(err => {
|
||||||
|
reject(err)
|
||||||
|
console.log('err------------>', err);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 西海岸:设备申请-审核中, 审核完成数量
|
||||||
|
const getDeviceNum = () => {
|
||||||
|
if (!numFlag.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
num.value = []
|
||||||
|
Promise.all([getDeviceApply('审核中'), getDeviceApply('审核完成')]).then(res => {
|
||||||
|
console.log('res-----数量------->', res);
|
||||||
|
let unfinished = res[0] && res[0].data && res[0].data.data;
|
||||||
|
let finished = res[1] && res[1].data && res[1].data.data;
|
||||||
|
num.value.unfinished = unfinished.total || '';
|
||||||
|
num.value.finished = finished.total || '';
|
||||||
|
numFlag.value = false
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('err------------>', err);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const phoneVisible = ref(false)
|
||||||
|
const showPhoneModal = () => {
|
||||||
|
phoneVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
mybus.on('closeModal', (obj) => {
|
mybus.on('closeModal', (obj) => {
|
||||||
detailsVisible.value = false
|
detailsVisible.value = false
|
||||||
changeType(obj.type, obj.index)
|
changeType(obj.type, obj.index)
|
||||||
|
|
Loading…
Reference in New Issue