<template>
	<div class="text-left p-4 toolbarStyle">
		<div class="formStyle">
			<el-form inline>
				<el-form-item>
					<el-text class="mx-1">目标名称:</el-text>
				</el-form-item>
				<el-form-item>
					<div>
						<el-input placeholder="请输入" style="width: 220px" />
					</div>
				</el-form-item>
				<el-form-item>
					<el-text class="mx-1">获取时间:</el-text>
				</el-form-item>
				<el-form-item>
					<el-date-picker v-model="timeValue" type="datetimerange" format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始时间"
						end-placeholder="结束时间" date-format="YYYY/MM/DD ddd" time-format="A hh:mm:ss" />
				</el-form-item>
				<el-form-item>
					<el-text class="mx-1">站点名称:</el-text>
				</el-form-item>
				<el-form-item>
					<el-input placeholder="请输入" style="width: 220px" />
				</el-form-item>
				<br></br>
				<el-form-item>
					<el-text class="mx-1">SNS Notice ID:</el-text>
				</el-form-item>
				<el-form-item>
					<el-input placeholder="请输入" style="width: 188.5px" />
				</el-form-item>
				<el-form-item>
					<el-space>
						<el-button type="primary" @click="handleExport">导出最近</el-button>
					</el-space>
				</el-form-item>
				<el-form-item>
					<el-space>
						<el-button type="primary" @click="handleExport">导出选中</el-button>
					</el-space>
				</el-form-item>
				<el-form-item>
					<el-space>
						<el-button type="primary">查询</el-button>
					</el-space>
				</el-form-item>
			</el-form>
		</div>
	</div>

	<div class="m-t-5" />
	<div>
		<el-table :data="tableData" style="width: 100%" border :row-style="{ height: '42.5px' }"
			:header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
			<el-table-column type="selection" width="40" />
			<el-table-column property="number" label="序号" width="55" />
			<el-table-column property="SNSNoticeID" label="SNS Notice ID" show-overflow-tooltip />
			<el-table-column property="department" label="主管部门" show-overflow-tooltip />
			<el-table-column property="targetName" label="目标名称" show-overflow-tooltip />
			<el-table-column property="planType" label="计划/非计划类型" show-overflow-tooltip />
			<el-table-column property="syncType" label="是否为同步" show-overflow-tooltip />
			<el-table-column property="syncPosition" label="同步位置" show-overflow-tooltip />
			<el-table-column property="perigee" label="近地点" show-overflow-tooltip />
			<el-table-column property="apogee" label="远地点" show-overflow-tooltip />
			<el-table-column property="lowestAltitude" label="最低海拔" show-overflow-tooltip />
			<el-table-column property="referenceSubject" label="参考主体" show-overflow-tooltip />
			<el-table-column property="highestFrequency" label="最高频率" show-overflow-tooltip />
			<el-table-column property="lowestFrequency" label="最低频率" show-overflow-tooltip />
			<el-table-column property="status" label="状态" show-overflow-tooltip />
			<el-table-column property="validityPeriod" label="有效期" show-overflow-tooltip />
			<el-table-column property="earliestUsageDate" label="最早使用日期" show-overflow-tooltip />
			<el-table-column property="isUsed" label="是否确认使用" show-overflow-tooltip />
			<el-table-column property="isPauseUsed" label="是否暂停使用" show-overflow-tooltip />
			<el-table-column label="操作" width="60">
				<template #default="scope">
					<el-button type="primary" plain link @click="handleDetails(scope.row)">
						详情
					</el-button>
				</template>
			</el-table-column>
		</el-table>
		<div class="pagination w-full flex flex-row-reverse pr-4 m-t-4">
			<Pagination :total="pageObj.total" v-model:page="pageObj.pageNo" v-model:limit="pageObj.pageSize"
				@pagination="getData" />
		</div>
	</div>

	<div class="detailForm">
		<el-dialog v-model="detailVisibleValue" center width="765px" align-center @close="handleClose" draggable>
			<template #header>
				<div class="text-center font-size-8">
					详情
				</div>
			</template>
			<el-form label-width="135px" size="small" class="px-4">
				<div>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="SNS Notice ID:" label-position="left">
								<el-input v-model="snsId" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="主管部门:" label-position="left">
								<el-input v-model="department" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="目标名称:" label-position="left">
								<el-input v-model="targetName" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="计划/非计划类型:" label-position="left">
								<el-input v-model="planType" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="是否为同步:" label-position="left">
								<el-input v-model="syncType" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="同步位置:" label-position="left">
								<el-input v-model="syncPosition" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="近地点:" label-position="left">
								<el-input v-model="perigee" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="远地点:" label-position="left">
								<el-input v-model="apogee" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="最低海拔:" label-position="left">
								<el-input v-model="lowestAltitude" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="参考主体:" label-position="left">
								<el-input v-model="referenceSubject" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="最低频率:" label-position="left">
								<el-input v-model="lowestFrequency" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="最高频率:" label-position="left">
								<el-input v-model="highestFrequency" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="状态:" label-position="left">
								<el-input v-model="status" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="有效期:" label-position="left">
								<el-input v-model="validityPeriod" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="最早使用日期:" label-position="left">
								<el-input v-model="earliestUsageDate" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="是否确认使用:" label-position="left">
								<el-input v-model="isUsed" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="是否暂停使用:" label-position="left">
								<el-input v-model="isPauseUsed" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="记录时间:" label-position="left">
								<el-input v-model="recordTime" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="是否纳入国际频率总表:" label-position="left">
								<el-input v-model="IsInTheInternationalFrequencyList" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="最早监管日期:" label-position="left">
								<el-input v-model="earliestRegulatoryDate" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="是否恢复使用:" label-position="left">
								<el-input v-model="isRestoreUsed" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="有效期卫星网络旧名称:" label-position="left">
								<el-input v-model="validityPeriodSatelliteNetworkOldName" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="24">
							<el-form-item label="最新相关 BR IFIC 发布日期:" label-position="top">
								<el-input v-model="BFIFICdate" />
							</el-form-item>
						</el-col>
					</el-row>
				</div>
			</el-form>
		</el-dialog>
	</div>
	<exportDialog v-model:dialogVisible="showDeleteDialog" @confirm="handleExportConfirm" />
</template>

<script setup lang="ts">
import { ref } from 'vue'
import Pagination from '@/components/pagination/index.vue'
import exportDialog from '@/components/Export/index.vue'

const showDeleteDialog = ref(false)
const timeValue = ref('')
const detailVisibleValue = ref(false)
// SNS Notice ID
const snsId = ref('')
// 主管部门
const department = ref('')
// 目标名称
const targetName = ref('')
// 计划/非计划类型
const planType = ref('')
// 是否为同步
const syncType = ref('')
// 同步位置
const syncPosition = ref('')
// 近地点
const perigee = ref('')
// 远地点
const apogee = ref('')
// 最低海拔
const lowestAltitude = ref('')
// 参考主体
const referenceSubject = ref('')
// 最低频率
const lowestFrequency = ref('')
// 最高频率
const highestFrequency = ref('')
// 状态
const status = ref('')
// 有效期
const validityPeriod = ref('')
// 最早使用日期
const earliestUsageDate = ref('')
// 是否确认使用
const isUsed = ref('')
// 是否暂停使用
const isPauseUsed = ref('')
// 记录时间
const recordTime = ref('')
// 是否纳入国际频率总表
const IsInTheInternationalFrequencyList = ref('')
// 最早监管日期
const earliestRegulatoryDate = ref('')
// 是否恢复使用
const isRestoreUsed = ref('')
// 有效期卫星网络旧名称
const validityPeriodSatelliteNetworkOldName = ref('')
// 最新相关 BR IFIC 发布日期
const BFIFICdate = ref('')
const tableData = ref([
	{
		number: '1',
		SNSNoticeID: '86550007',
		department: 'ARG',
		targetName: 'ARGOS',
		planType: '计划',
		syncType: '否',
		syncPosition: '-',
		perigee: '2000',
		apogee: '2500',
		lowestAltitude: '165',
		referenceSubject: '地球',
		lowestFrequency: 'None',
		highestFrequency: 'None',
		status: 'None',
		validityPeriod: '-',
		earliestUsageDate: 'None',
		isUsed: 'No',
		isPauseUsed: 'No',
	},
	{
		name: '1',
	},
	{
		name: '1',
	},
	{
		name: '1',
	},
	{
		name: '1',
	},
	{
		name: '1',
	},
	{
		name: '1',
	},
	{
		name: '1',
	},
	{
		name: '1',
	},
	{
		name: '1',
	},
])
const pageObj = ref({
	total: 10,
	pageSize: 10,
	pageNo: 1
})
const handleDetails = (row: any) => {
	console.log(row);
	detailVisibleValue.value = true
}
const getData = () => {
	console.log('getData');
}
const handleClose = () => {
	detailVisibleValue.value = false
}
const handleExportConfirm = () => {

}
const handleExport = () => {
	showDeleteDialog.value = true
}
</script>

<style scoped lang="scss">
// 调整表单项间距
.detailForm {
	.el-dialog-title {
		font-size: 180px;
	}

	.el-form-item {
		margin-bottom: 20px !important;
	}
}

/* 工具栏样式 */
.toolbarStyle {
	background-image: url("@/assets/picture/box3.png");
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

/* 表格样式 */
.formStyle {
	display: flex;
	justify-content: space-around;
	padding: 3px;
	margin-top: 1%;
}

/* 文字样式 */
.el-text {
	color: #FFFFFF;
}
</style>

<style>
.el-input {
	--el-input-text-color: #FFFFFF;
}

/* 修改el选择器的样式 */
.el-select__wrapper {
	background-color: #1d5484;
	box-shadow: none;
}

/* 删除el选择器选中时的边框 */
.is-hovering {
	box-shadow: none !important;
}

/* 修改el输入框的样式 */
.el-input__wrapper {
	background-color: #1d5484;
	box-shadow: none;
}

/* 修改el下拉框的背景颜色 */
.el-select-dropdown {
	background-color: #1d5484;
}

/* 修改el下拉框选项的字体颜色 */
.el-select-dropdown__item {
	color: #FFFFFF;
}

/* 修改el下拉框选项选中时的文字颜色 */
.el-select-dropdown__item:hover {
	color: #409eff;
}

/* 修改el日期选择器的边框为none */
.el-date-editor {
	--el-input-border-color: none
}

.el-button:focus {
	outline: none;
}
</style>