import services from "./service";
import { reportCmPV_YL } from "../../utils/cloudMonitorHelper";
Component({
	props: {
		componentData: {},
	},
	data: {
		typeOptions: [
			{
				value: "检查报告",
				label: "检查报告",
			},
			{
				value: "检验报告",
				label: "检验报告",
			},
		],
	},

	didMount() {
		/* 服务预警，检查检验报告查询 */
		reportCmPV_YL({
			title: "检查检验报告查询",
		});
	},

	methods: {
		onFilterHandel(filters) {
			this.filters = filters;
			this.flatRef.refresh();
		},

		saveRef(ref) {
			this.flatRef = ref;
		},

		/* 分页逻辑 */
		async onService(params) {
			return services.getReportList({ ...this.filters, ...params });
		},
	},
});
