<template>
	<div class="demo-adv-search">
		<cl-adv-btn>筛选</cl-adv-btn>
		<cl-adv-search :items="items" :op-list="opList" />
	</div>
</template>

<script lang="ts">
import { AdvSearchItem } from "cl-admin-crud-vue3/types";
import { defineComponent, ref } from "vue";

export default defineComponent({
	setup() {
		const items = ref<AdvSearchItem[]>([
			{
				label: "任务ID",
				prop: "id",
				span: 24,
				component: {
					name: "el-input",
					attrs: {
						placeholder: "请填写任务ID"
					}
				}
			},
			{
				label: "任务名称",
				prop: "task_name",
				span: 24,
				component: {
					name: "el-input",
					attrs: {
						placeholder: "请填写任务名称"
					}
				}
			},
			{
				prop: "directorId",
				label: "负责人",
				span: 12,
				component: {
					name: "shuyouGameDirectorselect",
					props: {
						placeholder: "请选择负责人"
					}
				}
			},
			{
				prop: "game_agentId",
				label: "游戏端口",
				span: 12,
				component: {
					name: "shuyouGameAgentselect",
					props: {
						placeholder: "请选择游戏端口"
					}
				}
			},
			{
				prop: "account_typeId",
				label: "账号类型",
				span: 12,
				component: {
					name: "shuyouAccountTypeselect",
					props: {
						placeholder: "请选择账号类型"
					}
				}
			},
			{
				prop: "login_modeId",
				label: "登录方式",
				span: 12,
				component: {
					name: "shuyouLoModeselect",
					props: {
						placeholder: "请选择登录方式"
					}
				}
			},
			{
				label: "运行状态",
				prop: "is_run",
				value: -1,
				component: {
					name: "el-radio-group",
					options: [
						{
							label: "运行",
							value: 1
						},
						{
							label: "停止",
							value: 0
						},
						{
							label: "所有",
							value: -1
						}
					]
				}
			}
		]);

		const opList = ref<string[]>(["search", "reset", "clear", "close"]);

		return {
			items,
			opList
		};
	}
});
</script>

<style lang="scss" scoped>
</style>
