YNUtdPlatform/pages/workPlan/workbench/index.vue

73 lines
1.6 KiB
Vue
Raw Normal View History

2024-10-15 17:01:47 +08:00
<template>
<view class="workbench">
<u-navbar
class="u-navbar"
title="工作台"
placeholder
@leftClick="leftClick"
leftIconColor="#fff"
bgColor="#00337A"
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
/>
<!-- 现场监护 -->
<CustodyModel />
<!-- 基建-计划审核 -->
<InfrastructureModel />
<!-- 生产-计划审核 -->
<ProductionModel />
<m-tabbar fixed fill :current="1" :tabbar="tabbar"></m-tabbar>
</view>
</template>
<script>
import TabbarConfig from '../util/tabbar'
import CustodyModel from './components/custody-model'
import InfrastructureModel from './components/infrastructure-model'
import ProductionModel from './components/production-model'
2024-10-25 18:21:10 +08:00
import { getProjectListApi } from '../../../api/workPlan/monthPlan'
2024-10-15 17:01:47 +08:00
export default {
components: {
CustodyModel,
ProductionModel,
InfrastructureModel
},
data() {
return {
2024-10-25 18:21:10 +08:00
tabbar: TabbarConfig,
projectQueryParams: {
planTime: this.$moment().format('YYYY-MM-DD'),
type: 3,
state: ''
}
2024-10-15 17:01:47 +08:00
}
},
2024-10-25 18:21:10 +08:00
onLoad() {
this.getProjectListData()
},
2024-10-15 17:01:47 +08:00
methods: {
leftClick() {
uni.navigateTo({ url: '/pages/workPlan/index/index' })
2024-10-25 18:21:10 +08:00
},
/* 获取工程数据 */
async getProjectListData() {
const list = this.$store.state.workPlan.projectList
console.log(list, '999')
if (list.length > 0) return
const res = await getProjectListApi(this.projectQueryParams)
this.$store.commit('SET_PROJECT', res.obj)
2024-10-15 17:01:47 +08:00
}
}
}
</script>
<style lang="scss" scoped>
.workbench {
padding: 20rpx 30rpx;
}
</style>