renkang
2025-01-24 d492850f1cc64ddcfaf43798af9c76c2505414fd
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
112
113
114
115
116
117
118
119
<template>
    <TableLayout :permissions="['business:ywworkorder:query']">
        <!-- 搜索表单 -->
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
            <el-form-item label="描述" prop="content">
                <el-input v-model="searchForm.content" placeholder="请输入描述" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <el-form-item prop="dealStatus" label="处理状态">
                <el-select v-model="searchForm.dealStatus">
                    <el-option label="未处理" :value="0"></el-option>
                    <el-option label="已转工单" :value="1"></el-option>
                    <el-option label="已关闭" :value="2"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="上报时间">
                <el-date-picker
                    v-model="searchForm.selDate"
                    @change="changeSelDate"
                    format="yyyy-MM-dd"
                    value-format="yyyy-MM-dd"
                    type="daterange" />
            </el-form-item>
            <section>
                <el-button type="primary" @click="search">搜索</el-button>
                <el-button @click="reset">重置</el-button>
            </section>
        </el-form>
        <!-- 表格和分页 -->
        <template v-slot:table-wrap>
            <el-table v-loading="isWorking.search" :data="tableData.list" stripe>
                <el-table-column prop="remark" label="描述" min-width="70px"></el-table-column>
                <el-table-column prop="position" label="位置" min-width="100px"></el-table-column>
                <el-table-column label="现场图片" min-width="100px">
                    <template slot-scope="{row}">
                        {{row.fileList ? row.fileList.length : 0}}张
                    </template>`
                </el-table-column>
                <el-table-column prop="name" label="上报人" min-width="80px"></el-table-column>
                <el-table-column prop="phone" label="上报人电话" min-width="100px"></el-table-column>
                <el-table-column prop="submitDate" label="上报时间" min-width="80px"></el-table-column>
                <el-table-column label="处理状态" min-width="70px">
                    <template slot-scope="{row}">
                        <span v-if="row.dealStatus === 0">待处理</span>
                        <span v-if="row.dealStatus === 1">已转工单</span>
                        <span v-if="row.dealStatus === 2">已关闭</span>
                    </template>`
                </el-table-column>
                <el-table-column prop="dealUserName" label="处理人" min-width="80px"></el-table-column>
                <el-table-column
                    v-if="containPermissions(['business:ywworkorder:update'])"
                    label="操作"
                    width="130"
                    fixed="right">
                    <template slot-scope="{row}">
                        <el-button type="text" v-if="row.dealStatus === 0" @click="$refs.handleProblem.open('问题上报', row)">处理</el-button>
                        <el-button type="text" @click="$refs.problemReportingDetails.open('问题上报详情', row)">查看详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination">
            </pagination>
        </template>
        <!--    详情    -->
        <problemReportingDetails ref="problemReportingDetails" />
        <!--    处理    -->
        <handleProblem ref="handleProblem" @success="handlePageChange" />
    </TableLayout>
</template>
 
<script>
  import BaseTable from '@/components/base/BaseTable'
  import TableLayout from '@/layouts/TableLayout'
  import Pagination from '@/components/common/Pagination'
  import problemReportingDetails from './components/problemReportingDetails'
  import handleProblem from './components/handleProblem'
  export default {
    name: 'problemReporting',
    extends: BaseTable,
    components: { TableLayout, Pagination, problemReportingDetails, handleProblem },
    data() {
      return {
        // 搜索
        showDetail: false,
        searchForm: {
          selDate: [],
          dealDateStart: '',
          dealDateEnd: '',
          content: '',
          dealStatus: ''
        },
        projectList: [],
        buildList: [],
        cateList: [],
      }
    },
    created() {
      this.config({
        module: '问题上报信息表',
        api: '/ywProblem',
        'field.id': 'id',
        'field.main': 'id'
      })
      this.search()
    },
    methods: {
      // 搜索框重置
      reset () {
        this.$refs.searchForm.resetFields()
        this.searchForm.dealDateStart = ''
        this.searchForm.dealDateEnd = ''
        this.search()
      },
      changeSelDate(e) {
        this.searchForm.dealDateStart = e[0]
        this.searchForm.dealDateEnd = e[1]
      }
    }
  }
</script>