<template>
  <div class="dialog" v-if="dialogForm">
    <div class="head_box">
      <span class="title">涉爆从业单位管理详情</span>
      <div>
        <el-button size="small" @click="close">关闭</el-button>
      </div>
    </div>
    <div class="form_cnt">
      <el-tabs v-model="activeName">
        <el-tab-pane label="图片基本信息" name="first">
          <FormMessage :formList="formData" ref="elform"></FormMessage>
        </el-tab-pane>
        <el-tab-pane label="图片处理记录" name="second">图片处理记录</el-tab-pane>
        <el-tab-pane label="使用历史" name="third">使用历史</el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script setup>
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import * as rule from "@/utils/rules.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
  dic: Object
});
const activeName = ref('first');
const { proxy } = getCurrentInstance();
const dialogForm = ref(false); //弹窗
const formData = ref([
  { label: "图片名称", prop: "imageName",  type: "input" },
  { label: "图片类型", prop: "imageType",  type: "input" },
  { label: "上传时间", prop: "uploadTime", type: "date",},
  { label: "文件大小", prop: "fileSize",  type: "input" },
  { label: "图片分辨率", prop: "resolution",  type: "input" },
  { label: "图片格式", prop: "format",  type: "input" },
  { label: "拍摄设备", prop: "device",  type: "input" },
  { label: "拍摄时间", prop: "shootTime",  type: "date" },
  { label: "拍摄地点", prop: "location",  type: "input" },
  { label: "图片标签", prop: "tags",  type: "input" },
]);
const listQuery = ref({
  sfbqdj: []
}); //表单
const elform = ref();
const title = ref("");

const editpeo = ref();
onMounted(() => {});
// 初始化数据
const init = (type, row,) => {
  dialogForm.value = true;
  title.value = type == 'add' ? "新增" : "编辑";
  if (row) getDataById(row.id);
};
// 根据id查询详情
const getDataById = (id) => {
  // qcckGet({}, '/mosty-gsxt/tbGsxtBqgl/'+id).then((res) => {
  //   listQuery.value = res;
  // });
};


// 关闭
const close = () => {
  listQuery.value = {};
  dialogForm.value = false;
};
defineExpose({ init });
</script>

<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
</style>
