Blame view

src/components/community/RoomToExamine.vue 2.76 KB
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
1
  <template>
8fc7c791   wuxw   测试完成房屋装修模块
2
    <el-dialog :title="$t('roomRenovationManage.review')" :visible.sync="visible" width="40%" @close="resetForm">
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
3
      <el-form :model="form" :rules="rules" ref="form" label-width="120px">
e4e31451   wuxw   完成物业首页功能
4
        <el-form-item :label="$t('roomRenovationManage.room')" prop="roomName">
8fc7c791   wuxw   测试完成房屋装修模块
5
          <el-input v-model.trim="form.roomName" disabled />
e4e31451   wuxw   完成物业首页功能
6
        </el-form-item>
8fc7c791   wuxw   测试完成房屋装修模块
7
  
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
8
        <el-form-item :label="$t('roomRenovationManage.status')" prop="state">
e4e31451   wuxw   完成物业首页功能
9
          <el-select v-model="form.state">
8fc7c791   wuxw   测试完成房屋装修模块
10
11
            <el-option :label="$t('roomRenovationManage.reviewPass')" value="3000" />
            <el-option :label="$t('roomRenovationManage.reviewReject')" value="2000" />
e4e31451   wuxw   完成物业首页功能
12
13
          </el-select>
        </el-form-item>
8fc7c791   wuxw   测试完成房屋装修模块
14
  
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
15
        <el-form-item :label="$t('roomRenovationManage.reviewOpinion')" prop="examineRemark">
8fc7c791   wuxw   测试完成房屋装修模块
16
          <el-input v-model.trim="form.examineRemark" type="textarea" />
e4e31451   wuxw   完成物业首页功能
17
18
        </el-form-item>
      </el-form>
8fc7c791   wuxw   测试完成房屋装修模块
19
  
e4e31451   wuxw   完成物业首页功能
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
      <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: ''
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
45
46
47
48
49
50
51
52
        },
        rules: {
          state: [
            { required: true, message: this.$t('common.pleaseSelect'), trigger: 'change' }
          ],
          examineRemark: [
            { required: true, message: this.$t('common.pleaseInput'), trigger: 'blur' }
          ]
e4e31451   wuxw   完成物业首页功能
53
54
55
56
57
58
59
        }
      }
    },
    methods: {
      open(row) {
        this.form = {
          rId: row.rId,
7aa2ca34   wuxw   v1.9 修复装修状态不对bug
60
          roomId: row.roomId,
e4e31451   wuxw   完成物业首页功能
61
62
63
          roomName: row.roomName,
          state: '',
          examineRemark: '',
81955f61   wuxw   优化房屋页面
64
          communityId: this.getCommunityId()
e4e31451   wuxw   完成物业首页功能
65
66
67
        }
        this.visible = true
      },
8fc7c791   wuxw   测试完成房屋装修模块
68
  
e4e31451   wuxw   完成物业首页功能
69
70
71
      resetForm() {
        this.form = {
          rId: '',
7aa2ca34   wuxw   v1.9 修复装修状态不对bug
72
          roomId: '',
e4e31451   wuxw   完成物业首页功能
73
74
75
76
77
          roomName: '',
          state: '',
          examineRemark: '',
          communityId: ''
        }
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
78
        this.$refs.form && this.$refs.form.resetFields()
e4e31451   wuxw   完成物业首页功能
79
      },
8fc7c791   wuxw   测试完成房屋装修模块
80
  
e4e31451   wuxw   完成物业首页功能
81
      async saveRoomToExamine() {
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
82
83
84
85
86
87
88
89
90
91
92
93
94
95
        this.$refs.form.validate(async (valid) => {
          if (!valid) {
            return false
          }
          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'))
          }
        })
e4e31451   wuxw   完成物业首页功能
96
97
98
99
      }
    }
  }
  </script>