<template>
  <div class="admin-authorize-editInfo">
    <el-dialog title="修改信息" v-model="state.isShowDialog" width="769px">
      <el-form :model="state.editData" size="default" label-width="80px">
        <el-row :gutter="35">
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="日期">
              <el-input v-model="state.editData.date" placeholder="格式：message.router.xxx" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="油站名称">
              <el-input v-model="state.editData.serviceStationName" placeholder="格式：message.router.xxx" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="项目名称">
              <el-input v-model="state.editData.entryName" placeholder="格式：message.router.xxx" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="设备SN">
              <el-input v-model="state.editData.SN" placeholder="格式：message.router.xxx" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="有效时间">
              <el-input v-model="state.editData.effectiveTime" placeholder="格式：message.router.xxx" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="授权码">
              <el-input v-model="state.editData.authorization" placeholder="格式：message.router.xxx" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="备注">
              <el-input v-model="state.editData.remark" placeholder="格式：message.router.xxx" clearable type="textarea"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="onCancel" size="default">取 消</el-button>
          <el-button type="primary" @click="onSubmit" size="default">修 改</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>

<script setup lang="ts">
import {reactive} from "vue";
import {oilSdkTableModel} from "/@/api/admin/deviceAuthorization/oilSdkAuthorDto";

/**数据对象 */
const state = reactive({
  isShowDialog: false,
  editData:{} as oilSdkTableModel
})

const openDialog = (val) => {
  state.editData = JSON.parse(JSON.stringify(val))
  state.isShowDialog = true
}

const onCancel = () => {
  state.editData = {} as oilSdkTableModel
  state.isShowDialog = false
}

const onSubmit = () => {
  console.log(state.editData)
}

defineExpose({
  openDialog,
})
</script>
<style scoped lang="scss">

</style>
