wente
2024-10-28 3b3521961c246eda35cde1fde685e3931f8af529
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<template>
  <div class="fa-card-a">
    <el-form v-if="$store.state.user.isAssistant===true || $store.state.user.isCzRole===true"
             :inline="true" style="position:absolute;right:120px; margin-top:3px;z-index:9;overflow: hidden;white-space: nowrap">
      <zt-button type="primary" @click.native="oneKeyDoneCy()">一键办理查阅</zt-button>
    </el-form>
    <el-tabs class="home-tabs-line" v-model="activeName" @tab-click="tabClick">
      <el-tab-pane label="待办业务" name="1">
        <stayTask :system="system" ref="stayTask" @fatherMethod="getDiagram1"></stayTask>
      </el-tab-pane>
      <el-tab-pane label="已办业务" name="2">
        <alreadyTask :system="system" ref="alreadyTask" @alreadyTask="getDiagram1"></alreadyTask>
      </el-tab-pane>
    </el-tabs>
    <el-dialog v-dialogDrag title="项目进度图" top="10vh" width='85%' :visible.sync="dialogVisible">
      <processTimeline ref="processTimeline"></processTimeline>
    </el-dialog>
  </div>
</template>
 
<script>
  import stayTask from './stay-task'
  import alreadyTask from './already-task'
  import processTimeline from '../../flowChart/processTimeline'
 
  export default {
    data() {
      return {
        activeName: '1',
        dialogVisible: false
      }
    },
    props:{
      system:String
    },
    components: {
      stayTask,
      alreadyTask,
      processTimeline
    },
    mounted() {
    },
    methods: {
      getDiagram1(row) {
        console.log(row, 'getDiagram processTimeline')
        this.dialogVisible = true
        this.$nextTick(() => {
          this.$refs.processTimeline.init(row)
        })
      },
      async tabClick(tab, event) {
        if (tab.index === '1') {
          let res = await this.$http.get('/task/taskCenter/pageDone')
          this.$refs.alreadyTask.getQuery()
        }
        if (tab.index === '0') {
          let res = await this.$http.get('/task/taskCenter/page')
          this.$refs.stayTask.getStayTask()
        }
      },
      async oneKeyDoneCy() {
        let res = await this.$http['put'](`/task/taskCenter/oneKeyDoneCy`)
        if (res.success) {
          await this.$tip.success()
          this.$refs.stayTask.getStayTask()
        }
 
      },
    }
  }
</script>