Blame view

src/components/community/RoomToExamine.vue 2.45 KB
e4e31451   wuxw   完成物业首页功能
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>
    <el-dialog 
      :title="$t('roomRenovationManage.review')" 
      :visible.sync="visible"
      width="40%"
      @close="resetForm"
    >
      <el-form :model="form" ref="form" label-width="120px">
        <el-form-item :label="$t('roomRenovationManage.room')" prop="roomName">
          <el-input 
            v-model.trim="form.roomName" 
            disabled
          />
        </el-form-item>
        
        <el-form-item :label="$t('roomRenovationManage.status')" prop="state" required>
          <el-select v-model="form.state">
            <el-option 
              :label="$t('roomRenovationManage.reviewPass')" 
              value="3000" 
            />
            <el-option 
              :label="$t('roomRenovationManage.reviewReject')" 
              value="2000" 
            />
          </el-select>
        </el-form-item>
        
        <el-form-item :label="$t('roomRenovationManage.reviewOpinion')" prop="examineRemark" required>
          <el-input 
            v-model.trim="form.examineRemark" 
            type="textarea"
          />
        </el-form-item>
      </el-form>
      
      <div slot="footer" class="dialog-footer">
        <el-button @click="visible = false">
          {{ $t('roomRenovationManage.cancel') }}
        </el-button>
        <el-button type="primary" @click="saveRoomToExamine">
          {{ $t('roomRenovationManage.save') }}
        </el-button>
      </div>
    </el-dialog>
  </template>
  
  <script>
  import { updateRoomToExamine } from '@/api/community/roomRenovationManageApi'
  
  export default {
    name: 'RoomToExamine',
    data() {
      return {
        visible: false,
        form: {
          rId: '',
          roomName: '',
          state: '',
          examineRemark: '',
          communityId: ''
        }
      }
    },
    methods: {
      open(row) {
        this.form = {
          rId: row.rId,
          roomName: row.roomName,
          state: '',
          examineRemark: '',
81955f61   wuxw   优化房屋页面
72
          communityId: this.getCommunityId()
e4e31451   wuxw   完成物业首页功能
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
        }
        this.visible = true
      },
      
      resetForm() {
        this.form = {
          rId: '',
          roomName: '',
          state: '',
          examineRemark: '',
          communityId: ''
        }
      },
      
      async saveRoomToExamine() {
        try {
          await updateRoomToExamine(this.form)
          this.$message.success(this.$t('common.operationSuccess'))
          this.visible = false
          this.$emit('success')
        } catch (error) {
          console.error('保存审核信息失败:', error)
          this.$message.error(error.message || this.$t('common.operationFailed'))
        }
      }
    }
  }
  </script>