<template>
    <div class="auto" style="overflow:auto;">
        <validator name='v'>
            <form novalidate class="form-horizontal">
                <div class="row auto" >

                </div>

                <div style="text-align:right;height:auto;">
                    <button class="button_search" type="button" @click="saveobj()"
                    >确认
                    </button>
                    <button class="button_clear" type="button" @click="clean()" >取消
                    </button>
                </div>
            </form>
        </validator>
    </div>
</template>
<script>
/**
 */
import { HttpResetClass } from 'vue-client'
export default {
  title: '再装表',
  data () {
    return {
    }
  },
  props: ['row'],
  ready () {

  },
  events: {

  },
  methods: {
        // 返回
    clean () {
      this.$dispatch('success', '再装表', this.row)
    },
    async saveobj () {
      let data = {
        f_userfiles_id: {
          f_userfiles_id: this.row.f_userfiles_id,
          f_table_state: '正常',
          version: this.row.version
        },
        f_meter_type: this.row.f_meter_type,
        f_userfile_id: this.row.f_userfiles_id,
        f_user_id: this.row.f_user_id,
        f_userinfo_id: this.row.f_userinfo_id,
        f_user_name: this.row.f_user_name,
        f_operat_type: '再装表',
        f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行再装表操作`,
        f_state: '有效',
        f_operator: this.$login.f.name,
        f_operatorid: this.$login.f.id,
        f_orgid: this.$login.f.orgid,
        f_orgname: this.$login.f.orgs,
        f_depid: this.$login.f.depids,
        f_depname: this.$login.f.deps,
        f_zoneid: this.$login.f.zoneid,
        f_zones: this.$login.f.zones
      }
      await this.$resetpost('rs/entity/t_enable', data, {resolveMsg: '再装表成功', rejectMsg: '再装表失败'})
      this.$dispatch('success')
    }

  },

  watch: {

  }
}
</script>
