Blame view

src/components/oa/ComplaintDetailType.vue 2.29 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
e5d43009   wuxw   测试投诉待办
2
    <div class="complaint-detail-type">
7eba6f1a   wuxw   v1.9 admin 投訴工單詳情...
3
4
5
      <el-table :data="complaintTypes" border style="width: 100%" v-loading="loading">
        <el-table-column prop="typeName" :label="$t('complaintDetailType.typeName')" align="center" />
        <el-table-column prop="notifyWay" :label="$t('complaintDetailType.notifyWay')" align="center">
e5d43009   wuxw   测试投诉待办
6
          <template slot-scope="scope">
7eba6f1a   wuxw   v1.9 admin 投訴工單詳情...
7
8
            <span>{{ scope.row.notifyWay === 'SMS' ? $t('complaintDetailType.sms') : $t('complaintDetailType.wechat')
              }}</span>
e5d43009   wuxw   测试投诉待办
9
10
          </template>
        </el-table-column>
7eba6f1a   wuxw   v1.9 admin 投訴工單詳情...
11
        <el-table-column prop="appraiseReply" :label="$t('complaintDetailType.appraiseReply')" align="center">
e5d43009   wuxw   测试投诉待办
12
          <template slot-scope="scope">
7eba6f1a   wuxw   v1.9 admin 投訴工單詳情...
13
14
            <span>{{ scope.row.appraiseReply === 'Y' ? $t('complaintDetailType.autoReply') :
              $t('complaintDetailType.manualReply') }}</span>
e5d43009   wuxw   测试投诉待办
15
16
          </template>
        </el-table-column>
7eba6f1a   wuxw   v1.9 admin 投訴工單詳情...
17
        <el-table-column :label="$t('complaintDetailType.handler')" align="center">
e5d43009   wuxw   测试投诉待办
18
19
20
21
22
23
          <template slot-scope="scope">
            <div v-for="(item, index) in scope.row.staffs" :key="index">
              {{ item.staffName }}
            </div>
          </template>
        </el-table-column>
7eba6f1a   wuxw   v1.9 admin 投訴工單詳情...
24
        <el-table-column prop="createTime" :label="$t('complaintDetailType.createTime')" align="center" />
e5d43009   wuxw   测试投诉待办
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
      </el-table>
    </div>
  </template>
  
  <script>
  import { getCommunityId } from '@/api/community/communityApi'
  import { listComplaintType } from '@/api/oa/complaintDetailApi'
  
  export default {
    name: 'ComplaintDetailType',
    data() {
      return {
        complaintTypes: [],
        loading: false,
        typeCd: '',
        communityId: ''
      }
    },
    methods: {
      async initData(params) {
        this.communityId = getCommunityId()
        this.typeCd = params.typeCd
        await this.loadData()
      },
      async loadData() {
        try {
          this.loading = true
          const params = {
            communityId: this.communityId,
            typeCd: this.typeCd,
            page: 1,
            row: 100
          }
          const { data } = await listComplaintType(params)
          this.complaintTypes = data || []
        } catch (error) {
          console.error('获取工单类型数据失败:', error)
        } finally {
          this.loading = false
        }
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .complaint-detail-type {
    margin-top: 20px;
  }
  </style>