<!-- 自动考核及输出 -->
<template>
	<div class="pricemoitorrecord">
		<a-card :bordered="false">
			<a-space class="search">
				<div class="silt-title">
					<span style="width: 70px; margin-right: 8px; text-align: right; display: block; line-height: 30px">{{
						'企业名称'
					}}</span>
					<a-input style="width: 220px" v-model:value="SearchFormDel.unitName" placeholder="请输入" />
				</div>
				<div class="silt-title">
					<span style="width: 70px; margin-right: 8px; text-align: right; display: block; line-height: 30px">
						信用等级
					</span>
					<!-- <a-input style="width: 220px" v-model:value="SearchFormDel.creditLevel" placeholder="请输入" /> -->
					<a-select style="width: 220px" v-model:value="SearchFormDel.creditLevel">
						<a-select-option :value="1">一级</a-select-option>
						<a-select-option :value="2">二级</a-select-option>
						<a-select-option :value="3">三级</a-select-option>
					</a-select>
				</div>
				<div class="btnBox">
					<a-button type="primary" class="primarySele" @click="Search"> 查询 </a-button>
					<a-button class="primarySele snowy-buttom-left" @click="onReset"> 重置 </a-button>
				</div>
			</a-space>
		</a-card>

		<div class="list" style="margin-top: 10px">
			<a-table :dataSource="tableData" :pagination="pagination" :columns="tableColumns">
				<template #bodyCell="{ column, record }">
					<template v-if="column.dataIndex == 'creditLevel'">
						<div v-if="record.creditLevel == '1'">一级</div>
						<div v-if="record.creditLevel == '2'">二级</div>
						<div v-if="record.creditLevel == '3'">三级</div>
					</template>
					<template v-if="column.key === '操作'">
						<!-- <a-button type="link" @click="onView('view', record)">查看</a-button> -->
						<!-- <a-button type="link" @click="onView('edit', record)">编辑</a-button>
						<a-popconfirm title="确定要删除吗？" @confirm="onView('del', record)">
							<a-button type="link">删除</a-button>
						</a-popconfirm> -->
					</template>
				</template>
			</a-table>
		</div>
	</div>
</template>
<script setup name="sharing">
	import business from '@/api/basic.info/verifyQuery.js'
	import { listPagination } from '@/hook/listlistPagination.js'
	import { reactive, ref } from 'vue'
	import { useRouter } from 'vue-router'
	import { defineComponent } from 'vue'
	const formRef = ref(null)
	const router = useRouter()

	const tableColumns = [
		{
			title: '序号',
			dataIndex: 'Index',
			align: 'center',
			customRender: ({ text, record, index }) => {
				return `${index + 1}`
			}
		},
		{ title: '企业名称', align: 'center', dataIndex: 'unitName' },
		{ title: '社会信用代码', align: 'center', dataIndex: 'dwdm' },
		{ title: '法定代表人', align: 'center', dataIndex: 'fddbr' },
		{ title: '信用等级', align: 'center', dataIndex: 'creditLevel' },
		{ title: '分析结果', align: 'center', dataIndex: 'assessResultDepict' },
		{ title: '日期', align: 'center', dataIndex: 'createTime' }
	]

	const { DEl, change, tableData, onSearch, handlePageChange, pagination, Search, onReset, SearchFormDel } =
		listPagination({ unitName: '', creditLevel: '' }, business.XYDAlist, {}, { sortOrder: 'ASCEND' })
</script>
<style lang="less" scoped>
	.search {
		padding-top: 20px;
		padding-left: 50px;
		margin-bottom: 32px;
		.btnBox {
			width: 100%;
			display: inline-block;
			display: flex;
			justify-content: space-around;
			align-items: center;
			.primarySele {
				margin-left: 20px;
				margin-right: 20px;
			}
		}
	}
	.silt-title {
		display: flex;
	}
</style>
