zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<template>
  <div>
    <el-container>
      <el-main>
        <el-row>
          <p class="title">维护记录</p>
          <el-table :data="tableData" stripe style="width: 100%">
            <el-table-column type="index" label="序号"> </el-table-column>
            <el-table-column prop="objectNo" label="申请单号"> </el-table-column>
            <el-table-column prop="objectTypeDesc" label="申请类型"> </el-table-column>
            <el-table-column prop="phaseName" label="当前阶段"> </el-table-column>
            <el-table-column prop="applyUserid" label="申请人"> </el-table-column>
            <el-table-column prop="applyDate" label="申请日期"> </el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                <el-button type="text" size="small" @click="handleMaintain(scope.row)">维护记录</el-button>
              </template>
            </el-table-column>
          </el-table>
          <pagination
            v-show="total > 1"
            :total="total"
            :page.sync="listQuery.currentPage"
            :limit.sync="listQuery.pageSize"
            @pagination="getList"
          />
        </el-row>
      </el-main>
    </el-container>
  </div>
</template>
 
<script>
import Pagination from '@/components/Pagination'
import { projectChangeInfos, projectApprovalDetail } from '@/api/area'
import { mapState } from 'vuex'
export default {
  components: { Pagination },
  data: function() {
    return {
      tableData: [],
      // 分页
      total: 0,
      listQuery: {
        currentPage: 1,
        pageSize: 10
      },
      listLoading: false
    }
  },
  computed: {
    ...mapState({
      detailsParams: state => state.risk.detailsParams
    })
  },
  created() {
    this.getList()
  },
  methods: {
    tableLoad() {
      let params = {
        objectNo: this.detailsParams.objectNo
      }
      projectChangeInfos(params).then(res => {
        this.tableData = res.result.records
      })
    },
    // 更新表格
    getList() {
      this.listLoading = true
      let objectNo = {
        objectNo: this.detailsParams.objectNo
      }
      let params = Object.assign(this.listQuery, objectNo)
      projectChangeInfos(params).then(res => {
        this.tableData = res.result.records
        this.total = res.result.total
        this.listLoading = false
      })
    },
    handleMaintain(row) {
      let params = { serialno: row.objectNo, objectType: row.objectType }
      projectApprovalDetail(params).then(res => {
        if (res.code === '00') {
          const { dataType, objectNo, objectType, projectFlag, projectType } = res.result
          let detailsParams = {
            dataType,
            objectNo,
            objectType,
            projectFlag,
            projectType
          }
          this.$store.commit('SET_detailsParams', detailsParams)
          let params = `dataType=${dataType}&objectNo=${objectNo}&objectType=${objectType}&projectFlag=${projectFlag}&projectType=${projectType}&projectJump=0&type=details`
          // this.$router.push({ path: '/area/partner/refresh/' })
          const routeStr = location.href.includes('#') ? '#/' : ''
          window.open(
            `${location.origin}${process.env.VUE_APP_HOST_PATH}${routeStr}area/projectManagement/details/projectBasicInformation?${params}`,
            'newwindow',
            'height=700px, width=1280px, top=100px,left=400px, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no'
          )
                    // this.$emit('removeMainTain')
          // this.$router.push({ path: '/area/projectManagement/details' })
        }
      })
    }
  }
}
</script>
 
<style scoped></style>