<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">
      <FormMessage :formList="formData" labelWidth="180px"></FormMessage>
    </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 { proxy } = getCurrentInstance();
const dialogForm = ref(false); //弹窗
const formData = ref([
  { label: "爆破作业项目业务流水号", prop: "ywlsh",  type: "input",width: "30%"  },
  { label: "行政区划", prop: "xzqh", type: "input",width: "30%" },
  { label: "项目名称", prop: "xmmc",  type: "input",width: "30%"},
  { label: "项目级别", prop: "xmjb",  type: "input",width: "30%"},
  { label: "委托单位名称", prop: "wtdwmc",  type: "input",width: "30%"},
  { label: "作业开始时间", prop: "zyksrq",  type: "datetime",width: "30%"},
  { label: "作业结束时间", prop: "zyjsrq",  type: "datetime",width: "30%"},
  { label: "设计施工单位", prop: "sjsgdw",  type: "input",width: "30%" },
  { label: "安全评估单位", prop: "aqpgdw",  type: "input",width: "30%" },
  { label: "安全监理单位", prop: "aqjldw",  type: "input",width: "30%" },
]);
const listQuery = ref({}); //表单
const elform = ref();

const editpeo = ref();
onMounted(() => {});
// 初始化数据
const init = (type, row,) => {
  dialogForm.value = true;
  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;
  loading.value = false;
};
defineExpose({ init });
</script>

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