
<template>
    <el-dialog v-model="dialogVisible" title="程序激活"  v-bind="dialogSmall">
        <el-form :model="formContent">
        <el-form-item label="程序版本号" prop="id" :label-width="100">
            <el-input v-model='formContent.id' disabled/>
        </el-form-item>
        <el-form-item label="模拟式模块" prop="type" :label-width="100">
            <el-checkbox v-model="formContent.type"  label="已激活"/>
        </el-form-item>
        <el-form-item label="数字式模块" prop="type" :label-width="100">
            <el-checkbox v-model="formContent.type"  label="未激活"/>
        </el-form-item>
        <el-form-item label="比对式模块" prop="type" :label-width="100">
            <el-checkbox v-model="formContent.type"  label="未激活"/>
        </el-form-item>
        <el-form-item label="序列号" prop="code" :label-width="100">
            <el-input v-model='formContent.code' placeholder="请输入序列号" :rows="2" type="textarea"/>
        </el-form-item>
        <el-form-item label="注册码" prop="licenseKey" :label-width="100">
            <el-input v-model='formContent.licenseKey' placeholder="请输入注册码" :rows="2" type="textarea"/>
        </el-form-item>
        </el-form>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="dialogVisible = false">取消</el-button>
          <el-button type="primary" @click="dialogVisible = false">激活</el-button>
        </span>
      </template>
    </el-dialog>
  </template>
  
  <script setup lang="ts">
  import { type VersionRegister } from "@/api/system/versionRegister/interface";
  import { ref } from "vue";
  import { dialogSmall } from '@/utils/elementBind'
  const formContent = ref<VersionRegister.ResSys_Reg_Res>({
        id: '',     //版本注册表Id
        type: '', //版本类型（模拟式、数字式、比对式）
        code: '', //注册码
        licenseKey: '', //密钥
        expireDate: '', //到期时间
        waveRecord: 0,
        realTime: 20,
        statistics: 5,
        flicker: 1,
        state: 1, //状态
    })
  const dialogVisible = ref(false);
  const openDialog = () => {
    dialogVisible.value = true;
  };
  
  defineExpose({ openDialog });
  </script>