|
@@ -1,233 +1,16 @@
|
|
|
<template>
|
|
|
- <a-card :bordered="false">
|
|
|
- <a-form ref="searchref_detail" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="姓名">
|
|
|
- <a-input v-model:value="searchFormState.name" placeholder="请输入姓名" allow-clear/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="性别">
|
|
|
- <a-select v-model:value="searchFormState.accountType" placeholder="请选择性别"
|
|
|
- :options="sexOptions" show-search allow-clear optionFilterProp="label"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="身份证号">
|
|
|
- <a-input v-model:value="searchFormState.name" placeholder="请输入身份证号" allow-clear/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="国籍">
|
|
|
- <a-select v-model:value="searchFormState.accountType" placeholder="请选择国籍"
|
|
|
- :options="cityOptions" show-search allow-clear optionFilterProp="label"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="居住地">
|
|
|
- <a-input v-model:value="searchFormState.name" placeholder="请输入居住地" allow-clear/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="车次/航班号">
|
|
|
- <a-input v-model:value="searchFormState.name" placeholder="请输入车次/航班号" allow-clear/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="航/车次(班)日期">
|
|
|
- <a-range-picker v-model:value="searchFormState.warehouseTime" show-time allow-clear/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="是否携带行李物品">
|
|
|
- <a-select v-model:value="searchFormState.accountType" placeholder="请选择是否携带行李物品"
|
|
|
- :options="isNoOptions" show-search allow-clear optionFilterProp="label"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="出发港口">
|
|
|
- <a-select v-model:value="searchFormState.accountType" placeholder="请选择出发港口"
|
|
|
- :options="departurePortOptions" show-search allow-clear optionFilterProp="label"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-item label="到达港口">
|
|
|
- <a-select v-model:value="searchFormState.accountType" placeholder="请选择到达港口"
|
|
|
- :options="arrivingPortOptions" show-search allow-clear optionFilterProp="label"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-button type="primary" @click="onSearch()">查询</a-button>
|
|
|
- <a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- <s-table
|
|
|
- ref="tableRef"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- bordered
|
|
|
- :row-key="(record) => record.id"
|
|
|
- :tool-config="toolConfig"
|
|
|
- v-model:filterParam="filterParam"
|
|
|
- :scroll="{ x: 2000 }"
|
|
|
- >
|
|
|
- <template #bodyCell="{ column, record }">
|
|
|
- <template v-if="column.dataIndex === 'sex'">
|
|
|
- {{ $TOOL.dictTypeData('lvke_sex', record.sex) }}
|
|
|
- </template>
|
|
|
- <template v-if="column.dataIndex === 'action'">
|
|
|
- <a-space>
|
|
|
- <a @click="ref_detail.onOpen(record)">查看</a>
|
|
|
- </a-space>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </a-card>
|
|
|
- <Detail ref="ref_detail" @successful="onSearch()"/>
|
|
|
+ 统计
|
|
|
</template>
|
|
|
|
|
|
<script setup name="demo2">
|
|
|
-import tool from '@/utils/tool'
|
|
|
-import {cloneDeep} from 'lodash-es'
|
|
|
-import Detail from './detail.vue'
|
|
|
-import demo2Api from '@/api/biz/demo2Api'
|
|
|
-import downloadUtil from "@/utils/downloadUtil";
|
|
|
+import basicApi from '@/api/gsc/basic'
|
|
|
|
|
|
const {proxy} = getCurrentInstance()
|
|
|
-const searchFormState = ref({})
|
|
|
-const searchFormStateReal = ref({}) // 点击搜索后备份的查询参数
|
|
|
-const searchref_detail = ref()
|
|
|
-const tableRef = ref()
|
|
|
-const filterParam = ref({})
|
|
|
-const ref_detail = ref()
|
|
|
-const toolConfig = {refresh: true, height: true, columnSetting: true, striped: false}
|
|
|
-const columns = [
|
|
|
- {
|
|
|
- title: '姓名',
|
|
|
- dataIndex: 'name',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '性别',
|
|
|
- dataIndex: 'age',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '身份证号',
|
|
|
- dataIndex: 'sex',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '国籍',
|
|
|
- dataIndex: 'remark',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '居住地',
|
|
|
- dataIndex: 'p1',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '车次/航班号',
|
|
|
- dataIndex: 'p2',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '航/车次(班)日期',
|
|
|
- dataIndex: 'p3',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '是否携带行李物品',
|
|
|
- dataIndex: 'p4',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '出发港口',
|
|
|
- dataIndex: 'p5',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '到达港口',
|
|
|
- dataIndex: 'p6',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '座位号',
|
|
|
- dataIndex: 'p7',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'action',
|
|
|
- align: 'center',
|
|
|
- width: 100,
|
|
|
- fixed: 'right',
|
|
|
- }
|
|
|
-]
|
|
|
-const selectedRowKeys = ref([])
|
|
|
-// 列表选择配置
|
|
|
-const options = {
|
|
|
- // columns数字类型字段加入 needTotal: true 可以勾选自动算账
|
|
|
- alert: {
|
|
|
- show: true,
|
|
|
- clear: () => {
|
|
|
- selectedRowKeys.value = ref([])
|
|
|
- }
|
|
|
- },
|
|
|
- rowSelection: {
|
|
|
- onChange: (selectedRowKey, selectedRows) => {
|
|
|
- selectedRowKeys.value = selectedRowKey
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-const loadData = (parameter) => {
|
|
|
- return demo2Api.demo2Page(Object.assign(parameter, searchFormStateReal.value)).then((data) => {
|
|
|
- return data
|
|
|
- })
|
|
|
-}
|
|
|
-// 搜索同时备份参数
|
|
|
-const onSearch = (parameter) => {
|
|
|
- searchFormStateReal.value = cloneDeep(searchFormState.value)
|
|
|
- tableRef.value.refresh(parameter)
|
|
|
-}
|
|
|
-// 重置
|
|
|
-const reset = () => {
|
|
|
- searchref_detail.value.resetFields()
|
|
|
- onSearch(true)
|
|
|
-}
|
|
|
-// 删除
|
|
|
-const deleteDemo2 = (record) => {
|
|
|
- let params = [
|
|
|
- {
|
|
|
- id: record.id
|
|
|
- }
|
|
|
- ]
|
|
|
- demo2Api.demo2Delete(params).then(() => {
|
|
|
- tableRef.value.refresh(true)
|
|
|
- })
|
|
|
-}
|
|
|
-// 批量删除
|
|
|
-const deleteBatchDemo2 = (params) => {
|
|
|
- demo2Api.demo2Delete(params).then(() => {
|
|
|
- tableRef.value.clearRefreshSelected()
|
|
|
- })
|
|
|
-}
|
|
|
-// 批量导出
|
|
|
-const onExport = () => {
|
|
|
- const params = {
|
|
|
- ...filterParam.value
|
|
|
- }
|
|
|
- if (selectedRowKeys.value.length > 0) {
|
|
|
- params.ids = selectedRowKeys.value
|
|
|
- } else {
|
|
|
- Object.entries(searchFormStateReal.value).forEach(([key, value]) => {
|
|
|
- console.log(key)
|
|
|
- if (proxy.$util.isValue(value)) {
|
|
|
- params[key] = value
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- demo2Api.demo2Export(params).then((res) => {
|
|
|
- downloadUtil.resultDownload(res)
|
|
|
- tableRef.value.clearSelected()
|
|
|
- })
|
|
|
+
|
|
|
+const initData = () => {
|
|
|
+ basicApi.passengerChart({type: 1})
|
|
|
}
|
|
|
-const sexOptions = tool.dictList('lvke_sex')
|
|
|
-// const cityOptions = tool.dictList('lvke_city')
|
|
|
-const cityOptions = []
|
|
|
-const isNoOptions = tool.dictList('lvke_isNo')
|
|
|
-const departurePortOptions = tool.dictList('lvke_departurePort')
|
|
|
-const arrivingPortOptions = tool.dictList('lvke_arrivingPort')
|
|
|
+onMounted(() => {
|
|
|
+ initData()
|
|
|
+})
|
|
|
</script>
|