<script setup lang="ts">
import { ref, getCurrentInstance, reactive } from "vue";
import { useRouter } from "vue-router";
import request, { download } from '~/utils/request';
import { pick } from 'lodash-es';
import { ElMessage } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
import type { AxiosRequestConfig } from 'axios'

// #region (constant)
const TABLE_KEY = 'xhzz_id'
const URL_CUT = '/xdhq/hqgl_zyyyzy'
const URL_CUT_REF = ref(URL_CUT)
const URL_SUBMIT_KEY = URL_CUT.split('/').join('_').slice(1)
const instance = getCurrentInstance()
const router = useRouter()
// #endregion

// #region (variable)
const loading_table = ref(true)
let whichDialogSubmit: 'add' | 'edit'
// #endregion

// #region (type)
type TYPE_TABLE_FIELD = {
  [TABLE_KEY]: string;
  'xhzz_cdbh': string; // 场地编号
  'xhzz_cdmc': string; // 场地名称
  'xhzl_flbm': string; // 场地类别编号
  'xhzl_flmc': string; // 场地类别名称
  'xhzz_ssxq': string; // 所属校区
  'xhzz_zdmj': string; // 占地面积
  'xhzz_dz': string; // 地址
  'xhzz_tp': string; // 图片
  'xhzz_sfkjy': string; // 是否可借用
  'xhzz_fzr': string; // 负责人
  'xhzz_fzr_uid': string; // 负责人ID
  'xhzz_bz': string; // 备注
}
// #endregion

// #region (props)
// #endregion

// #region (query row)
const queryForm_Data = ref<Partial<TYPE_TABLE_FIELD> & { keyword?: string }>({})

const handleQueryFormBtn_search = () => {
  queryApi()
}
const handleQueryFormBtn_clear = () => {
  queryForm_Data.value = {}
}
// #endregion

// #region (table selection)
const multipleSelection = ref<TYPE_TABLE_FIELD[]>([])
const handleSelectionChange = (val: TYPE_TABLE_FIELD[]) => {
  multipleSelection.value = val
}
// #endregion

// #region (table row)
const handleTableRowBtn_import = async ({ file }: { file: File }) => {
  const res = await API_MAP['import']({ file })
  if (res.code === '1') {
    queryApi()
    ElMessage.success(res.msg)
  }
}
const handleTableRowBtn_export = () => {
  if (multipleSelection.value.length === 0) return ElMessage.info('请先勾选导出文件'); exportApi({ [TABLE_KEY]: multipleSelection.value.map((item: TYPE_TABLE_FIELD) => item[TABLE_KEY])?.join() })
}
const handleTableRowBtn_add = () => {
  whichDialogSubmit = 'add'
  dialogForm_Data.value = {}
  dialogVisible_addOrEdit.value = true
}
const handleTableRowBtn_delete = async () => {
  if (multipleSelection.value.length === 0) return ElMessage.info('请先勾选文件'); const resp = await deleteApi(multipleSelection.value.map((item: TYPE_TABLE_FIELD) => item[TABLE_KEY])); if (resp.code !== '1') return; ElMessage.success('删除成功');
  queryApi()
}
// #endregion

// #region (table body)
const tableData = ref<TYPE_TABLE_FIELD[]>([])
const DetailName = '-ZYYY-CDGL'
const DetailParam = 'aid'

const handleTableColBtn_edit = async (scope: { row: TYPE_TABLE_FIELD }) => {
  whichDialogSubmit = 'edit'
  const res = await detailApi(scope.row[TABLE_KEY])
  dialogForm_Data.value = (res.data.one_info)
  dialogVisible_addOrEdit.value = true
}
const handleTableColBtn_audit = (scope: { row: TYPE_TABLE_FIELD }) => {
  whichDialogSubmit = 'edit'
  dialogForm_Data.value = pick(scope.row, [`${TABLE_KEY}`, ...Object.keys(dialogForm_Rules_audit)])
  dialogVisible_audit.value = true
}
const handleTableColBtn_detail = (scope: { row: TYPE_TABLE_FIELD }) => {
  router.push({ name: DetailName, params: { [DetailParam]: scope.row[TABLE_KEY] } })
}
const handleTableColBtn_delete = async (scope: { row: TYPE_TABLE_FIELD }) => {
  const resp = await deleteApi(scope.row[TABLE_KEY]); if (resp.code !== '1') return; ElMessage.success('删除成功');
  queryApi()
}

// #endregion

// #region (pagination)
const total = ref(0)
const limit = ref(10)

const currentPage = ref(1)
function handleCurrentChange() {
  queryApi()
}
// #endregion

// #region (dialog base)
const dialogForm_Data = ref<Partial<TYPE_TABLE_FIELD> & { keyword?: string }>({})

const handleDialogFormBtn_submit = async (formRefKey: string, extendData?: Partial<TYPE_TABLE_FIELD>) => {
  const isValid = await (instance?.refs[formRefKey] as FormInstance).validate((valid: boolean) => valid)
  if (isValid) {
    const resp = await API_MAP[whichDialogSubmit](<TYPE_TABLE_FIELD>({ ...dialogForm_Data.value, ...extendData }))
    if (resp.code !== '1') return; ElMessage.success('操作成功'); handleDialogFormBtn_cancel()
    queryApi()
  }
}
const handleDialogFormBtn_cancel = (formRefKey?: string) => {
  dialogVisible_addOrEdit.value = false
  dialogVisible_audit.value = false
  dialogVisible_booking.value = false
}
// #endregion

// #region (dialog booking)
type TYPE_TABLE_FIELD_BOOKING = {
  [TABLE_KEY]: string;
  'xhzz_cdbh': string; // 场地编号
  'xhz_cdmc': string; // 场地名称
  'xhz_ssbm': string; // 所属部门
  'xhz_jyr': string; // 借用人
  'xhz_yt': string; // 用途
  'xhz_pzr': string; // 批准人
  'xhz_jysj_ks': string; // 借用时间_开始
  'xhz_jysj_js': string; // 借用时间_结束
  // 'xhz_zt': string; // 状态
  'xhz_yy': string; // 原因
}

const handleTableColBtn_booking = async (scope: { row: TYPE_TABLE_FIELD }) => {
  dialogForm_Data_booking.value = {
    xhzz_cdbh: scope.row.xhzz_cdbh,
    xhz_cdmc: scope.row.xhzz_cdmc,
  }
  dialogVisible_booking.value = true
}

const dialogVisible_booking = ref<boolean>(false)

const dialogForm_Ref_booking = ref<FormInstance>()
const dialogForm_Rules_booking = reactive({
  'xhz_cdmc': { required: true, message: '场地名称不能为空', trigger: 'submit' },
  'xhz_ssbm': { required: true, message: '所属部门不能为空', trigger: 'submit' },
  'xhz_jyr': { required: true, message: '借用人不能为空', trigger: 'submit' },
  'xhz_yt': { required: true, message: '用途不能为空', trigger: 'submit' },
  'xhz_pzr': { required: true, message: '批准人不能为空', trigger: 'submit' },
  'xhz_jysj_ks': { required: true, message: '借用时间_开始不能为空', trigger: 'submit' },
  'xhz_jysj_js': { required: true, message: '借用时间_结束不能为空', trigger: 'submit' },
  'xhz_zt': { required: true, message: '状态不能为空', trigger: 'submit' },
  'xhz_yy': { required: true, message: '原因不能为空', trigger: 'submit' },
})

const dialogForm_Data_booking = ref<Partial<TYPE_TABLE_FIELD_BOOKING>>({})


const handleDialogFormBtn_submit_booking = async (formRefKey: string, extendData?: Partial<TYPE_TABLE_FIELD>) => {
  const isValid = await (instance?.refs[formRefKey] as FormInstance).validate((valid: boolean) => valid)
  if (isValid) {
    const resp = await request({
      url: '/xdhq/hqgl_zyyy/add',
      data: {
        'xdhq_hqgl_zyyy': {
          ...dialogForm_Data_booking.value,
          ...extendData
        }
      }
    })
    if (resp.code !== '1') return; ElMessage.success('预约成功等待审核'); handleDialogFormBtn_cancel(); init();
  }
}
// #endregion

// #region (dialog add/edit)
const dialogVisible_addOrEdit = ref<boolean>(false)

const dialogForm_Ref_addOrEdit = ref<FormInstance>()
const dialogForm_Rules_addOrEdit = reactive({
  'xhzz_cdbh': { required: true, message: '场地编号不能为空', trigger: 'submit' },
  'xhzz_cdmc': { required: true, message: '场地名称不能为空', trigger: 'submit' },
  'xhzl_flbm': { required: true, message: '场地类别不能为空', trigger: 'submit' },
  'xhzl_flmc': { required: true, message: '场地类别不能为空', trigger: 'submit' },

  'xhzz_ssxq': { required: false, message: '所属校区不能为空', trigger: 'submit' },
  'xhzz_zdmj': { required: false, message: '占地面积不能为空', trigger: 'submit' },
  'xhzz_dz': { required: false, message: '地址不能为空', trigger: 'submit' },
  'xhzz_tp': { required: true, message: '图片不能为空', trigger: 'submit' },
  'xhzz_sfkjy': { required: true, message: '是否可借用不能为空', trigger: 'submit' },
  'xhzz_fzr': { required: true, message: '负责人不能为空', trigger: 'submit' },
  'xhzz_fzr_uid': { required: true, message: '负责人ID不能为空', trigger: 'submit' },
  'xhzz_bz': { required: false, message: '备注不能为空', trigger: 'submit' },
})
// #endregion

// #region (dialog audit)
const dialogVisible_audit = ref<boolean>(false)

const dialogForm_Field_audit = reactive<{
  FLAG: keyof TYPE_TABLE_FIELD,
  REASON?: keyof TYPE_TABLE_FIELD
}>({
  FLAG: 'xhzz_id',
  // REASON:'xhzz_id'
})

const dialogForm_Ref_audit = ref<FormInstance>()
const dialogForm_Rules_audit = reactive<FormRules>({
  'xhzz_cdbh': { required: true, message: '场地编号不能为空', trigger: 'submit' },
  'xhzz_cdmc': { required: true, message: '场地名称不能为空', trigger: 'submit' },
  'xhzl_flbm': { required: true, message: '场地类别不能为空', trigger: 'submit' },
  'xhzz_ssxq': { required: true, message: '所属校区不能为空', trigger: 'submit' },
  'xhzz_zdmj': { required: true, message: '占地面积不能为空', trigger: 'submit' },
  'xhzz_dz': { required: true, message: '地址不能为空', trigger: 'submit' },
  'xhzz_tp': { required: true, message: '图片不能为空', trigger: 'submit' },
  'xhzz_sfkjy': { required: true, message: '是否可借用不能为空', trigger: 'submit' },
  'xhzz_fzr': { required: true, message: '负责人不能为空', trigger: 'submit' },
  'xhzz_fzr_uid': { required: true, message: '负责人ID不能为空', trigger: 'submit' },
  'xhzz_bz': { required: true, message: '备注不能为空', trigger: 'submit' },
})


// #endregion

// #region (request api):
function queryApi() {
  loading_table.value = true
  return request({
    url: URL_CUT + '/index',
    data: {
      ...queryForm_Data.value,
      limit: limit.value,
      page: currentPage.value
    }
  }).then((response: { data: { total_rows: string, page_data: TYPE_TABLE_FIELD[] } }) => {
    const { data } = response
    total.value = parseInt(data.total_rows)
    tableData.value = data.page_data
    return response
  }).then(() => {
    loading_table.value = false
  })
}

function addApi(data: TYPE_TABLE_FIELD) {
  return request({
    url: URL_CUT + '/add',
    data: {
      [URL_SUBMIT_KEY]: data,
    }
  })
}

function editApi(data: Partial<TYPE_TABLE_FIELD>) {
  return request({
    url: URL_CUT + '/edit',
    data: {
      [TABLE_KEY]: data[TABLE_KEY],
      [URL_SUBMIT_KEY]: pick(data, ['xhzz_cdbh', 'xhzz_cdmc', 'xhzl_flbm', 'xhzl_flmc', 'xhzz_ssxq', 'xhzz_zdmj', 'xhzz_dz', 'xhzz_tp', 'xhzz_sfkjy', 'xhzz_fzr', 'xhzz_fzr_uid', 'xhzz_bz',]),
    }
  })
}

function deleteApi(id: string | string[]) {
  return request({
    url: URL_CUT + '/delete',
    data: {
      [TABLE_KEY]: id,
    }
  })
}

function detailApi(id: string) {
  return request({
    url: URL_CUT + '/detail',
    data: {
      [TABLE_KEY]: id,
    }
  })
}

function importApi(data: { file: File }) {
  return request({
    $type: 'import',
    url: URL_CUT + '/import',
    data
  } as AxiosRequestConfig)
}

function exportApi(d) {
  return download(URL_CUT + '/index', { ...queryForm_Data.value, ...d })
}

const API_MAP = {
  query: queryApi,
  add: addApi,
  edit: editApi,
  delete: deleteApi,
  detail: detailApi,
  import: importApi,
  export: exportApi,
}
// #endregion

// #region (page init)
function init() {
  queryApi()
}
init()
// #endregion

</script>

<template>
  <div class="card flex-grow flex flex-col">
    <div class="flex justify-between">
      <div></div>
      <el-form inline :model="queryForm_Data">
        <!-- <el-form-item label="关键字"><el-input v-model="queryForm_Data.keyword" ></el-input></el-form-item> -->
        <el-form-item>
          <el-input placeholder="场地编号" v-model="queryForm_Data.xhzz_cdbh" clearable />
        </el-form-item>
        <el-form-item>
          <el-input placeholder="场地名称" v-model="queryForm_Data.xhzz_cdmc" clearable />
        </el-form-item>
        <el-form-item>
          <!-- <el-input v-model="queryForm_Data.xhzl_flbm" clearable /> -->
          <remote-select placeholder="场地类别" url="/xdhq/hqgl_zyyylb/index" :fields="['xhzl_flbm', 'xhzl_flmc']"
            v-model="queryForm_Data.xhzl_flbm" v-model:modelName="queryForm_Data.xhzl_flmc"></remote-select>
        </el-form-item>
        <!-- <el-form-item label="所属校区">
        <el-input v-model="queryForm_Data.xhzz_ssxq" clearable />
      </el-form-item>
      <el-form-item label="占地面积">
        <el-input v-model="queryForm_Data.xhzz_zdmj" clearable />
      </el-form-item>
      <el-form-item label="地址">
        <el-input v-model="queryForm_Data.xhzz_dz" clearable />
      </el-form-item>
      <el-form-item label="图片">
        <el-input v-model="queryForm_Data.xhzz_tp" clearable />
      </el-form-item>
      <el-form-item label="是否可借用">
        <el-select v-model="queryForm_Data.xhzz_sfkjy" clearable filterable>
          <el-option label="是" value="1" />
          <el-option label="否" value="2" />
        </el-select>
      </el-form-item> -->
        <el-form-item>
          <el-input placeholder="负责人" v-model="queryForm_Data.xhzz_fzr" clearable />
        </el-form-item>
        <!-- <el-form-item label="负责人ID">
        <el-input v-model="queryForm_Data.xhzz_fzr_uid" clearable />
      </el-form-item>
      <el-form-item label="备注">
        <el-input v-model="queryForm_Data.xhzz_bz" clearable />
      </el-form-item> -->
        <el-form-item>
          <el-button @click="handleQueryFormBtn_search" type="primary">搜索</el-button>
          <!-- <el-button @click="handleQueryFormBtn_clear" type="warning">清空</el-button> -->
        </el-form-item>
      </el-form>
    </div>

    <!-- <div class="divider"></div>
    <div>
      <import-button @success="queryApi" :url="URL_CUT_REF"></import-button>
      <el-button @click="handleTableRowBtn_export" type="success">导出</el-button>
      <el-button @click="handleTableRowBtn_add" type="primary">新增</el-button>
      <el-button @click="handleTableRowBtn_delete" type="danger">删除</el-button>
    </div> -->

    <div class="divider"></div>
    <div class="flex-auto">
      <el-table :data="tableData" @selection-change="handleSelectionChange" v-loading="loading_table"
        element-loading-background="#ffffff70">
        <el-table-column type="selection"></el-table-column>
        <el-table-column prop="xhzz_cdbh" label="场地编号" width="auto" show-overflow-tooltip></el-table-column>
        <el-table-column prop="xhzz_cdmc" label="场地名称" width="auto" show-overflow-tooltip></el-table-column>
        <!-- <el-table-column prop="xhzl_flbm" label="场地类别" width="auto" show-overflow-tooltip></el-table-column> -->
        <el-table-column prop="xhzl_flmc" label="场地类别" width="auto" show-overflow-tooltip></el-table-column>
        <el-table-column prop="xhzz_ssxq" label="所属校区" width="auto" show-overflow-tooltip></el-table-column>
        <el-table-column prop="xhzz_zdmj" label="占地面积" width="auto" show-overflow-tooltip></el-table-column>
        <el-table-column prop="xhzz_dz" label="地址" width="auto" show-overflow-tooltip></el-table-column>
        <el-table-column prop="xhzz_tp" label="图片" width="auto" show-overflow-tooltip>
          <template #default="scope">
            <table-item-image :src="scope.row.xhzz_tp" class="h-23px"></table-item-image>
          </template>
        </el-table-column>
        <!-- <el-table-column prop="xhzz_sfkjy" label="是否可借用" width="auto" show-overflow-tooltip></el-table-column> -->
        <el-table-column prop="xhzz_fzr" label="负责人" width="auto" show-overflow-tooltip></el-table-column>
        <!-- <el-table-column prop="xhzz_fzr_uid" label="负责人ID" width="auto" show-overflow-tooltip></el-table-column> -->
        <!-- <el-table-column prop="xhzz_bz" label="备注" width="auto" show-overflow-tooltip></el-table-column> -->
        <el-table-column label="操作" fixed="right">
          <template #default="scope">
            <!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_edit(scope)" type="primary">编辑
            </el-button> -->
            <!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_audit(scope)" type="primary">审核
            </el-button>
            <el-button link :auto-insert-space="false" @click="handleTableColBtn_detail(scope)" type="primary">详情
            </el-button> -->
            <!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_delete(scope)" type="primary">删除
            </el-button> -->
            <el-button link :auto-insert-space="false" @click="handleTableColBtn_booking(scope)" type="primary">预约
            </el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <div class="flex justify-end mt-10 py-4">
      <el-pagination :page-size="limit" v-model:current-page="currentPage" @current-change="handleCurrentChange"
        background layout="total, prev, pager, next" :total="total" />
    </div>
  </div>

  <el-dialog v-model="dialogVisible_booking" append-to-body destroy-on-close>
    <el-form :model="dialogForm_Data_booking" ref="dialogForm_Ref_booking" :rules="dialogForm_Rules_booking"
      label-width="120px">
      <el-form-item label="场地编号" prop="xhz_cdmc">
        <el-input v-model="dialogForm_Data_booking.xhzz_cdbh" disabled />
      </el-form-item>
      <el-form-item label="场地名称" prop="xhz_cdmc">
        <el-input v-model="dialogForm_Data_booking.xhz_cdmc" disabled />
      </el-form-item>
      <el-form-item label="所属部门" prop="xhz_ssbm">
        <el-input v-model="dialogForm_Data_booking.xhz_ssbm" clearable />
      </el-form-item>
      <el-form-item label="借用人" prop="xhz_jyr">
        <el-input v-model="dialogForm_Data_booking.xhz_jyr" clearable />
      </el-form-item>
      <el-form-item label="批准人" prop="xhz_pzr">
        <el-input v-model="dialogForm_Data_booking.xhz_pzr" clearable />
      </el-form-item>
      <el-form-item label="借用时间_开始" prop="xhz_jysj_ks">
        <el-date-picker type="datetime" v-model="dialogForm_Data_booking.xhz_jysj_ks" value-format="YYYY-MM-DD HH:mm:ss"
          clearable />
      </el-form-item>
      <el-form-item label="借用时间_结束" prop="xhz_jysj_js">
        <el-date-picker type="datetime" v-model="dialogForm_Data_booking.xhz_jysj_js" value-format="YYYY-MM-DD HH:mm:ss"
          clearable />
      </el-form-item>

      <el-form-item label="用途" prop="xhz_yt">
        <el-input v-model="dialogForm_Data_booking.xhz_yt" type="textarea" :row="5" clearable />
      </el-form-item>
      <!-- <el-form-item label="状态" prop="xhz_zt">
        <el-radio-group v-model="dialogForm_Data_booking.xhz_zt">
          <el-radio label="1">未通过</el-radio>
          <el-radio label="2">通过</el-radio>
        </el-radio-group>
      </el-form-item> -->
      <!-- <el-form-item label="原因" prop="xhz_yy">
        <el-input v-model="dialogForm_Data_booking.xhz_yy" type="textarea" :row="5" clearable />
      </el-form-item> -->
      <div class="flex justify-center">
        <el-button @click="handleDialogFormBtn_submit_booking('dialogForm_Ref_booking')" type="primary">提交</el-button>
        <el-button @click="handleDialogFormBtn_cancel('dialogForm_Ref_booking')" type="default">取消</el-button>
      </div>
    </el-form>
  </el-dialog>

  <el-dialog v-model="dialogVisible_addOrEdit" append-to-body destroy-on-close>
    <el-form :model="dialogForm_Data" ref="dialogForm_Ref_addOrEdit" :rules="dialogForm_Rules_addOrEdit"
      label-width="120px">
      <el-form-item label="场地编号" prop="xhzz_cdbh">
        <el-input v-model="dialogForm_Data.xhzz_cdbh" clearable />
      </el-form-item>
      <el-form-item label="场地名称" prop="xhzz_cdmc">
        <el-input v-model="dialogForm_Data.xhzz_cdmc" clearable />
      </el-form-item>
      <el-form-item label="场地类别" prop="xhzl_flbm">
        <!-- <el-input v-model="dialogForm_Data.xhzl_flbm" clearable /> -->
        <remote-select url="/xdhq/hqgl_zyyylb/index" :fields="['xhzl_flbm', 'xhzl_flmc']"
          v-model="dialogForm_Data.xhzl_flbm" v-model:modelName="dialogForm_Data.xhzl_flmc"></remote-select>
      </el-form-item>
      <el-form-item label="所属校区" prop="xhzz_ssxq">
        <el-input v-model="dialogForm_Data.xhzz_ssxq" clearable />
      </el-form-item>
      <el-form-item label="占地面积" prop="xhzz_zdmj">
        <el-input v-model="dialogForm_Data.xhzz_zdmj" clearable><template #append>平方米</template></el-input>
      </el-form-item>
      <el-form-item label="地址" prop="xhzz_dz">
        <el-input v-model="dialogForm_Data.xhzz_dz" clearable />
      </el-form-item>
      <el-form-item label="图片" prop="xhzz_tp">
        <!-- <el-input v-model="dialogForm_Data.xhzz_tp" clearable /> -->
        <file-upload v-model:part="dialogForm_Data.xhzz_tp" clearable />
      </el-form-item>
      <!-- <el-form-item label="是否可借用" prop="xhzz_sfkjy">
        <el-radio-group v-model="dialogForm_Data.xhzz_sfkjy">
          <el-radio label="1">是</el-radio>
          <el-radio label="2">否</el-radio>
        </el-radio-group>
      </el-form-item> -->
      <el-form-item label="负责人" prop="xhzz_fzr">
        <el-input v-model="dialogForm_Data.xhzz_fzr" clearable />
      </el-form-item>
      <!-- <el-form-item label="负责人ID" prop="xhzz_fzr_uid">
        <el-input v-model="dialogForm_Data.xhzz_fzr_uid" clearable />
      </el-form-item> -->
      <el-form-item label="备注" prop="xhzz_bz">
        <el-input v-model="dialogForm_Data.xhzz_bz" clearable />
      </el-form-item>
      <div class="flex justify-center">
        <el-button @click="handleDialogFormBtn_submit('dialogForm_Ref_addOrEdit')" type="primary">提交</el-button>
        <el-button @click="handleDialogFormBtn_cancel('dialogForm_Ref_addOrEdit')" type="default">取消</el-button>
      </div>
    </el-form>
  </el-dialog>

  <el-dialog v-model="dialogVisible_audit" append-to-body destroy-on-close>
    <el-form :model="dialogForm_Data" ref="dialogForm_Ref_audit" :rules="dialogForm_Rules_audit" label-width="120px">
      <el-form-item label="状态">
        <el-radio-group v-model="dialogForm_Data[dialogForm_Field_audit.FLAG]">
          <el-radio label="1">通过</el-radio>
          <el-radio label="2">未通过</el-radio>
        </el-radio-group>
      </el-form-item>
      <!-- <el-form-item label="原因" v-show="dialogForm_Data[dialogForm_Field_audit.FLAG] === '1'">
        <el-input type="textarea" v-model="dialogForm_Data[dialogForm_Field_audit.REASON]" :rows="5" />
      </el-form-item> -->
      <div class="flex justify-center">
        <el-button @click="handleDialogFormBtn_submit('dialogForm_Ref_audit')" type="primary">提交</el-button>
        <el-button @click="handleDialogFormBtn_cancel('dialogForm_Ref_audit')" type="default">取消</el-button>
      </div>
    </el-form>
  </el-dialog>
</template>
