Files
admin-sjzx/src/views/pqs/supervise/harmonicSurvey/index.vue

73 lines
2.2 KiB
Vue
Raw Normal View History

2024-03-06 16:14:09 +08:00
<template>
2025-12-12 09:26:56 +08:00
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
2025-12-14 12:47:53 +08:00
<el-tab-pane :label="VITE_FLAG ? '工作计划制定' : '技术监督计划管理'" name="1" v-if="tabList.includes('1')">
2025-12-12 09:26:56 +08:00
<plan-manage :id="id" v-if="activeName == '1'" />
</el-tab-pane>
2025-12-12 09:26:56 +08:00
<el-tab-pane :label="VITE_FLAG ? '工作计划实施' : '技术监督测试管理'" name="2" v-if="tabList.includes('2')">
<test-manage :id="id" :businessKey="key" v-if="activeName == '2'" />
</el-tab-pane>
</el-tabs>
</div>
2024-03-06 16:14:09 +08:00
</template>
2025-12-12 09:26:56 +08:00
<script setup lang="ts">
import { ref, onMounted } from 'vue'
2024-03-06 16:14:09 +08:00
import planManage from './components/planManage.vue'
2024-05-31 08:44:45 +08:00
import testManage from './components/testManage.vue'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
import { useRoute } from 'vue-router'
2025-12-12 09:26:56 +08:00
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const route = useRoute()
2024-06-05 14:34:23 +08:00
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
const id = ref('')
const key = ref('')
2024-03-06 16:14:09 +08:00
defineOptions({
name: 'supervision/harmonicmanagement'
2024-03-06 16:14:09 +08:00
})
2025-12-12 09:26:56 +08:00
const tabList = ref(['1', '2', '3', '4'])
2024-03-06 16:14:09 +08:00
const activeName = ref('1')
2025-12-12 09:26:56 +08:00
onMounted(() => {
let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key)
if (isNumber) {
tabList.value = [key]
activeName.value = key
}
})
2024-03-06 16:14:09 +08:00
const layout = mainHeight(63) as any
2025-12-12 09:26:56 +08:00
watch(
() => route.query.t,
async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/harmonicmanagement')) {
let type = (route.query.type as string) || 'null'
if (type == 'null') {
} else if (type == '1') {
activeName.value = '1'
} else {
activeName.value = '2'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
key.value = (route.query.key as string) || 'null'
}
2025-12-12 09:26:56 +08:00
},
{ deep: true, immediate: true }
)
2024-03-06 16:14:09 +08:00
</script>
2025-12-12 09:26:56 +08:00
<style lang="scss" scoped>
2024-03-06 16:14:09 +08:00
.bars_w {
width: 100%;
height: 500px;
2024-03-06 16:14:09 +08:00
}
2024-05-31 08:44:45 +08:00
2024-03-18 19:43:55 +08:00
:deep(.el-tabs__content) {
height: v-bind('layout.height');
overflow-y: auto;
2024-03-06 16:14:09 +08:00
}
</style>