| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <template>
- <div class='flex flex-justify-start full-height'>
- <div class="full-height">
- <left-bar :data="data" :stage="stage" @change="change" @typeChange="typeChange"/>
- </div>
- <div class="full-height full-width white-bg padding-left padding-top" style="margin-left: 300px">
- <proinfo v-if="type === 0" :data="data" :issue="list" @refInfo="proInfo" @refresh="issueList"/>
- <folder_info v-else :id="id" :projectStageId="projectStageId"/>
- </div>
- </div>
- </template>
- <route>
- {
- name:'项目详情',
- }
- </route>
- <script>
- import leftBar from './component/left_bar.vue'
- import proinfo from './component/proinfo.vue'
- import folder_info from './component/folder_info.vue'
- export default {
- name: 'test',
- components: {leftBar, proinfo, folder_info},
- data() {
- return {
- type: 0,
- id: '',
- data: {},
- list: [],
- stage: [],
- projectStageId: ''
- }
- },
- created() {
- this.id = this.$route.query.id
- this.proInfo()
- this.issueList()
- this.getStage()
- },
- methods: {
- typeChange() {
- this.type = 0
- },
- proInfo() {
- this.$api.project.projectInfo(this.id).then(res => {
- if (res.code === 200) {
- this.data = res.data
- }
- })
- },
- issueList() {
- this.$api.project.issuanceDetail({projectId: this.id}).then(res => {
- if (res.code === 200) {
- this.list = res.data.records
- }
- })
- },
- getStage() {
- this.$api.project.includeStage({projectId: this.id}).then(res => {
- console.log(res)
- if (res.code === 200) {
- this.stage = res.data.map(e => {
- let newItem = {}
- newItem.title = e.stageName
- newItem.count = e.fileNumber
- newItem.id = e.id
- return newItem
- })
- }
- })
- },
- change(res) {
- this.type = 1
- this.projectStageId = this.stage[res].id
- },
- }
- }
- </script>
- <style scoped>
- </style>
|