Blame view

src/components/complaint/aComplaintDetailType.vue 2.02 KB
e4877374   wuxw   开发完成admin 小区投诉功能
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
  <template>
    <div class="type-container">
      <el-table :data="complaintTypes" border style="width: 100%">
        <el-table-column prop="typeName" :label="$t('complaintDetailType.name')" align="center"></el-table-column>
        <el-table-column prop="notifyWay" :label="$t('complaintDetailType.notifyWay')" align="center">
          <template slot-scope="scope">
            {{ scope.row.notifyWay === 'SMS' ? $t('complaintDetailType.sms') : $t('complaintDetailType.wechat') }}
          </template>
        </el-table-column>
        <el-table-column prop="appraiseReply" :label="$t('complaintDetailType.replyType')" align="center">
          <template slot-scope="scope">
            {{ scope.row.appraiseReply === 'Y' ? $t('complaintDetailType.autoReply') : $t('complaintDetailType.manualReply') }}
          </template>
        </el-table-column>
        <el-table-column :label="$t('complaintDetailType.handler')" align="center">
          <template slot-scope="scope">
            <div v-for="(staff, index) in scope.row.staffs" :key="index">
              {{ staff.staffName }}
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="createTime" :label="$t('complaintDetailType.createTime')" align="center"></el-table-column>
      </el-table>
    </div>
  </template>
  
  <script>
  import { listComplaintTypes } from '@/api/complaint/adminComplaintDetailApi'
  
  export default {
    name: 'AComplaintDetailType',
    props: {
      complaintId: {
        type: String,
        default: ''
      },
      typeCd: {
        type: String,
        default: ''
      }
    },
    data() {
      return {
        complaintTypes: []
      }
    },
    methods: {
      async loadData() {
        try {
          const params = {
            typeCd: this.typeCd,
            page: 1,
            row: 100
          }
          const { data } = await listComplaintTypes( params )
          this.complaintTypes = data || []
        } catch (error) {
          this.$message.error(this.$t('complaintDetailType.fetchError'))
        }
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .type-container {
    padding: 20px 0;
  }
  </style>