Compare commits

..

6 Commits

7 changed files with 39 additions and 17 deletions

View File

@ -460,3 +460,10 @@ export function soldierApply(data) {
data,
})
}
// 西--
export function getMaxApplyNum(number) {
return request({
url: '/processForm/tabilityapplication/canApply/' + number,
method: 'get',
})
}

View File

@ -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 ? '基础设施' : '应用资源'

View File

@ -85,7 +85,7 @@ export const constantRoutes = [
{
path: '/',
component: Layout,
redirect: '/home',
redirect: whoShow.itShowXiHaiAn ? '/DetailsPageconetent' : '/home',
meta: {
title: '能力管理平台编目',
icon: 'apps-line',

View File

@ -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

View File

@ -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)

View File

@ -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 = ''
}

View File

@ -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 = () => {
if (selectedRowKeys.value.length != 0) {
// 西--
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) {
//
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: '状态',