Compare commits
6 Commits
e477b3f90e
...
057b926183
Author | SHA1 | Date |
---|---|---|
guoyue | 057b926183 | |
guoyue | 39547f16e4 | |
guoyue | f0df682cc6 | |
guoyue | 98f0c360d4 | |
guoyue | bafe53bc67 | |
guoyue | 48bfe71c6f |
|
@ -460,3 +460,10 @@ export function soldierApply(data) {
|
|||
data,
|
||||
})
|
||||
}
|
||||
// 西海岸-基础设施-一键申请最大个数
|
||||
export function getMaxApplyNum(number) {
|
||||
return request({
|
||||
url: '/processForm/tabilityapplication/canApply/' + number,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
|
@ -507,4 +507,5 @@ export const RECOURCE_G_ICON = {
|
|||
}
|
||||
|
||||
// 能力集市-默认选中tab
|
||||
export const DETAIL_PAGE_CONTENT_DEFAULT_TAB = '应用资源'
|
||||
// 西海岸-默认基础设施
|
||||
export const DETAIL_PAGE_CONTENT_DEFAULT_TAB = whoShow.itShowXiHaiAn ? '基础设施' : '应用资源'
|
||||
|
|
|
@ -85,7 +85,7 @@ export const constantRoutes = [
|
|||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/home',
|
||||
redirect: whoShow.itShowXiHaiAn ? '/DetailsPageconetent' : '/home',
|
||||
meta: {
|
||||
title: '能力管理平台编目',
|
||||
icon: 'apps-line',
|
||||
|
|
|
@ -119,12 +119,6 @@ instance.interceptors.response.use(
|
|||
if (_old_href === _new_href) {
|
||||
location.reload()
|
||||
}
|
||||
|
||||
// location.reload()
|
||||
// 西海岸-不重新加载
|
||||
// if(!whoShow.itShowXiHaiAn) {
|
||||
// location.reload()
|
||||
// }
|
||||
return response
|
||||
}
|
||||
if (response.headers.redirect === '/#/login') {
|
||||
|
@ -150,7 +144,7 @@ instance.interceptors.response.use(
|
|||
location.reload()
|
||||
}, 1000)
|
||||
}
|
||||
handleCode(code, message, response.headers)
|
||||
handleCode(code, message || response.data.msg, response.headers)
|
||||
if (loadingInstance) loadingInstance.close()
|
||||
// const { data, config } = response
|
||||
// const { code, msg } = data
|
||||
|
|
|
@ -739,6 +739,7 @@
|
|||
// 基础设施引用
|
||||
import infrastructurePage from '@/views/home/infrastructurePage.vue'
|
||||
import detailsPageInfrastructureTree from '@/views/home/detailsPageInfrastructureTree.vue'
|
||||
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
|
||||
|
||||
import { message } from 'ant-design-vue'
|
||||
import {
|
||||
|
@ -781,7 +782,8 @@
|
|||
let currentPageSize = ref(5)
|
||||
const pageSizeOptions = ref(['5', '10', '20', '50'])
|
||||
const router = useRouter()
|
||||
let select = router.currentRoute.value.query.select || '应用资源'
|
||||
// let select = router.currentRoute.value.query.select || '应用资源'
|
||||
let select = router.currentRoute.value.query.select || DETAIL_PAGE_CONTENT_DEFAULT_TAB
|
||||
const select2 = router.currentRoute.value.query.select
|
||||
const str = router.currentRoute.value.query.str
|
||||
const searchValue = ref(str)
|
||||
|
|
|
@ -100,6 +100,8 @@
|
|||
import mybus from '@/myplugins/mybus'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { UpOutlined, DownOutlined } from '@ant-design/icons-vue'
|
||||
import { DETAIL_PAGE_CONTENT_DEFAULT_TAB } from '@/global/GlobalConfig.js'
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const selectedKeys = ref([])
|
||||
|
@ -118,7 +120,7 @@
|
|||
'router.currentRoute.value.query.select',
|
||||
router.currentRoute.value.query.select
|
||||
)
|
||||
let select = router.currentRoute.value.query.select
|
||||
let select = router.currentRoute.value.query.select || DETAIL_PAGE_CONTENT_DEFAULT_TAB
|
||||
if (select === '123') {
|
||||
select = ''
|
||||
}
|
||||
|
|
|
@ -752,6 +752,7 @@
|
|||
setSubmit,
|
||||
getYuyue,
|
||||
getSoldierList,
|
||||
getMaxApplyNum,
|
||||
} from '@/api/home'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
import dayjs from 'dayjs'
|
||||
|
@ -1776,16 +1777,31 @@
|
|||
const dept = reactive({})
|
||||
// eslint-disable-next-line no-undef
|
||||
if (infrastructure) {
|
||||
console.log('infrastructure------------>', infrastructure)
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
dept.deptId = infrastructure.deptId || ''
|
||||
// eslint-disable-next-line no-undef
|
||||
dept.deptName = infrastructure.deptName || ''
|
||||
}
|
||||
const apply = () => {
|
||||
|
||||
// 西海岸--判断设备最大数量个数
|
||||
const judegNumber = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
getMaxApplyNum(selectedRowKeys.value.length).then(res => {
|
||||
resolve(res)
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const apply = async () => {
|
||||
console.log('一键申请', selectedList.value)
|
||||
if (selectedRowKeys.value.length != 0) {
|
||||
console.log('一键申请', selectedList.value)
|
||||
// 判断最大数量
|
||||
let maxNumRes = await judegNumber();
|
||||
if (maxNumRes.data.code != 0) {
|
||||
return;
|
||||
}
|
||||
let arr = [
|
||||
{
|
||||
arr: [
|
||||
|
@ -1921,9 +1937,9 @@
|
|||
},
|
||||
{
|
||||
title: '归属',
|
||||
dataIndex: 'nodeName',
|
||||
dataIndex: 'managementUnitName',
|
||||
width: '60%',
|
||||
key: 'nodeName',
|
||||
key: 'managementUnitName',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
|
|
Loading…
Reference in New Issue