src/api/pcr/pcrData/index.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/pcr/pcrData/types.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/scenery/sceneryOperationData/index.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/scenery/sceneryOperationData/types.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/pcr/pcrData/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/scenery/sceneryOperationData/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/ti/trafficIndex/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/pcr/pcrData/index.ts
New file @@ -0,0 +1,63 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { PcrDataVO, PcrDataForm, PcrDataQuery } from '@/api/pcr/pcrData/types'; /** * 查询人车路基础信息列表 * @param query * @returns {*} */ export const listPcrData = (query?: PcrDataQuery): AxiosPromise<PcrDataVO[]> => { return request({ url: '/rs/pcrData/list', method: 'get', params: query }); }; /** * 查询人车路基础信息详细 * @param id */ export const getPcrData = (id: string | number): AxiosPromise<PcrDataVO> => { return request({ url: '/rs/pcrData/' + id, method: 'get' }); }; /** * 新增人车路基础信息 * @param data */ export const addPcrData = (data: PcrDataForm) => { return request({ url: '/rs/pcrData', method: 'post', data: data }); }; /** * 修改人车路基础信息 * @param data */ export const updatePcrData = (data: PcrDataForm) => { return request({ url: '/rs/pcrData', method: 'put', data: data }); }; /** * 删除人车路基础信息 * @param id */ export const delPcrData = (id: string | number | Array<string | number>) => { return request({ url: '/rs/pcrData/' + id, method: 'delete' }); }; src/api/pcr/pcrData/types.ts
New file @@ -0,0 +1,221 @@ export interface PcrDataVO { /** * */ id: string | number; /** * 模块名称 */ modeName: string; /** * 周期 */ periodName: string; /** * 周期年 */ periodYear: string; /** * 周期月 */ periodMonth: number; /** * 指标1名称 */ indexOneName: string; /** * 指标1值 */ indexOneValue: number; /** * 指标2名称 */ indexTwoName: string; /** * 指标2值 */ indexTwoValue: number; /** * 指标3名称 */ indexThreeName: string; /** * 指标3值 */ indexThreeValue: number; /** * 指标4名称 */ indexFourName: string; /** * 指标4值 */ indexFourValue: number; /** * 状态 1启用 0未启用 */ status: number; } export interface PcrDataForm extends BaseEntity { /** * */ id?: string | number; /** * 模块名称 */ modeName?: string; /** * 周期 */ periodName?: string; /** * 周期年 */ periodYear?: string; /** * 周期月 */ periodMonth?: number; /** * 指标1名称 */ indexOneName?: string; /** * 指标1值 */ indexOneValue?: number; /** * 指标2名称 */ indexTwoName?: string; /** * 指标2值 */ indexTwoValue?: number; /** * 指标3名称 */ indexThreeName?: string; /** * 指标3值 */ indexThreeValue?: number; /** * 指标4名称 */ indexFourName?: string; /** * 指标4值 */ indexFourValue?: number; /** * 状态 1启用 0未启用 */ status?: number; } export interface PcrDataQuery extends PageQuery { /** * 模块名称 */ modeName?: string; /** * 周期 */ periodName?: string; /** * 周期年 */ periodYear?: string; /** * 周期月 */ periodMonth?: number; /** * 指标1名称 */ indexOneName?: string; /** * 指标1值 */ indexOneValue?: number; /** * 指标2名称 */ indexTwoName?: string; /** * 指标2值 */ indexTwoValue?: number; /** * 指标3名称 */ indexThreeName?: string; /** * 指标3值 */ indexThreeValue?: number; /** * 指标4名称 */ indexFourName?: string; /** * 指标4值 */ indexFourValue?: number; /** * 状态 1启用 0未启用 */ status?: number; /** * 日期范围参数 */ params?: any; } src/api/scenery/sceneryOperationData/index.ts
New file @@ -0,0 +1,63 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { SceneryOperationDataVO, SceneryOperationDataForm, SceneryOperationDataQuery } from '@/api/scenery/sceneryOperationData/types'; /** * 查询景区运行数据列表 * @param query * @returns {*} */ export const listSceneryOperationData = (query?: SceneryOperationDataQuery): AxiosPromise<SceneryOperationDataVO[]> => { return request({ url: '/sc/sceneryOperationData/list', method: 'get', params: query }); }; /** * 查询景区运行数据详细 * @param id */ export const getSceneryOperationData = (id: string | number): AxiosPromise<SceneryOperationDataVO> => { return request({ url: '/sc/sceneryOperationData/' + id, method: 'get' }); }; /** * 新增景区运行数据 * @param data */ export const addSceneryOperationData = (data: SceneryOperationDataForm) => { return request({ url: '/sc/sceneryOperationData', method: 'post', data: data }); }; /** * 修改景区运行数据 * @param data */ export const updateSceneryOperationData = (data: SceneryOperationDataForm) => { return request({ url: '/sc/sceneryOperationData', method: 'put', data: data }); }; /** * 删除景区运行数据 * @param id */ export const delSceneryOperationData = (id: string | number | Array<string | number>) => { return request({ url: '/sc/sceneryOperationData/' + id, method: 'delete' }); }; src/api/scenery/sceneryOperationData/types.ts
New file @@ -0,0 +1,191 @@ export interface SceneryOperationDataVO { /** * id */ id: string | number; /** * 周期年 */ periodYear: number; /** * 周期月 */ periodMonth: number; /** * 车流量 */ carFlowNum: number; /** * 人流量 */ personFlowNum: number; /** * 游客预约 */ visitorSubNum: number; /** * 入园人数 */ enterGardenNum: number; /** * 在岗警力 */ onPolice: number; /** * 在岗警车 */ onPaddyWagon: number; /** * 备勤警力 */ standbyPolice: number; /** * 状态 1启用 0未启用 */ status: number; /** * 景区id */ scId: string | number; } export interface SceneryOperationDataForm extends BaseEntity { /** * id */ id?: string | number; /** * 周期年 */ periodYear?: number; /** * 周期月 */ periodMonth?: number; /** * 车流量 */ carFlowNum?: number; /** * 人流量 */ personFlowNum?: number; /** * 游客预约 */ visitorSubNum?: number; /** * 入园人数 */ enterGardenNum?: number; /** * 在岗警力 */ onPolice?: number; /** * 在岗警车 */ onPaddyWagon?: number; /** * 备勤警力 */ standbyPolice?: number; /** * 状态 1启用 0未启用 */ status?: number; /** * 景区id */ scId?: string | number; } export interface SceneryOperationDataQuery extends PageQuery { /** * 周期年 */ periodYear?: number; /** * 周期月 */ periodMonth?: number; /** * 车流量 */ carFlowNum?: number; /** * 人流量 */ personFlowNum?: number; /** * 游客预约 */ visitorSubNum?: number; /** * 入园人数 */ enterGardenNum?: number; /** * 在岗警力 */ onPolice?: number; /** * 在岗警车 */ onPaddyWagon?: number; /** * 备勤警力 */ standbyPolice?: number; /** * 状态 1启用 0未启用 */ status?: number; /** * 景区id */ scId?: string | number; /** * 日期范围参数 */ params?: any; } src/views/pcr/pcrData/index.vue
New file @@ -0,0 +1,356 @@ <template> <div class="p-2"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <div class="search" v-show="showSearch"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px"> <el-form-item label="模块名称" prop="modeName"> <el-input v-model="queryParams.modeName" placeholder="请输入模块名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="周期" prop="periodName"> <el-input v-model="queryParams.periodName" placeholder="请输入周期" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="周期年" prop="periodYear"> <el-input v-model="queryParams.periodYear" placeholder="请输入周期年" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="周期月" prop="periodMonth"> <el-input v-model="queryParams.periodMonth" placeholder="请输入周期月" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标1名称" prop="indexOneName"> <el-input v-model="queryParams.indexOneName" placeholder="请输入指标1名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标1值" prop="indexOneValue"> <el-input v-model="queryParams.indexOneValue" placeholder="请输入指标1值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标2名称" prop="indexTwoName"> <el-input v-model="queryParams.indexTwoName" placeholder="请输入指标2名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标2值" prop="indexTwoValue"> <el-input v-model="queryParams.indexTwoValue" placeholder="请输入指标2值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标3名称" prop="indexThreeName"> <el-input v-model="queryParams.indexThreeName" placeholder="请输入指标3名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标3值" prop="indexThreeValue"> <el-input v-model="queryParams.indexThreeValue" placeholder="请输入指标3值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标4名称" prop="indexFourName"> <el-input v-model="queryParams.indexFourName" placeholder="请输入指标4名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标4值" prop="indexFourValue"> <el-input v-model="queryParams.indexFourValue" placeholder="请输入指标4值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button> </el-form-item> </el-form> </div> </transition> <el-card shadow="never"> <template #header> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['rs:pcrData:add']">新增</el-button> </el-col> <el-col :span="1.5"> <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['rs:pcrData:edit']">修改</el-button> </el-col> <el-col :span="1.5"> <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['rs:pcrData:remove']">删除</el-button> </el-col> <el-col :span="1.5"> <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['rs:pcrData:export']">导出</el-button> </el-col> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> </el-row> </template> <el-table v-loading="loading" :data="pcrDataList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="" align="center" prop="id" v-if="true" /> <el-table-column label="模块名称" align="center" prop="modeName" /> <el-table-column label="周期" align="center" prop="periodName" /> <el-table-column label="周期年" align="center" prop="periodYear" /> <el-table-column label="周期月" align="center" prop="periodMonth" /> <el-table-column label="指标1名称" align="center" prop="indexOneName" /> <el-table-column label="指标1值" align="center" prop="indexOneValue" /> <el-table-column label="指标2名称" align="center" prop="indexTwoName" /> <el-table-column label="指标2值" align="center" prop="indexTwoValue" /> <el-table-column label="指标3名称" align="center" prop="indexThreeName" /> <el-table-column label="指标3值" align="center" prop="indexThreeValue" /> <el-table-column label="指标4名称" align="center" prop="indexFourName" /> <el-table-column label="指标4值" align="center" prop="indexFourValue" /> <el-table-column label="状态 1启用 0未启用" align="center" prop="status" /> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template #default="scope"> <el-tooltip content="修改" placement="top"> <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['rs:pcrData:edit']"></el-button> </el-tooltip> <el-tooltip content="删除" placement="top"> <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['rs:pcrData:remove']"></el-button> </el-tooltip> </template> </el-table-column> </el-table> <pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> </el-card> <!-- 添加或修改人车路基础信息对话框 --> <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> <el-form ref="pcrDataFormRef" :model="form" :rules="rules" label-width="80px"> <el-form-item label="模块名称" prop="modeName"> <el-input v-model="form.modeName" placeholder="请输入模块名称" /> </el-form-item> <el-form-item label="周期" prop="periodName"> <el-input v-model="form.periodName" placeholder="请输入周期" /> </el-form-item> <el-form-item label="周期年" prop="periodYear"> <el-input v-model="form.periodYear" placeholder="请输入周期年" /> </el-form-item> <el-form-item label="周期月" prop="periodMonth"> <el-input v-model="form.periodMonth" placeholder="请输入周期月" /> </el-form-item> <el-form-item label="指标1名称" prop="indexOneName"> <el-input v-model="form.indexOneName" placeholder="请输入指标1名称" /> </el-form-item> <el-form-item label="指标1值" prop="indexOneValue"> <el-input v-model="form.indexOneValue" placeholder="请输入指标1值" /> </el-form-item> <el-form-item label="指标2名称" prop="indexTwoName"> <el-input v-model="form.indexTwoName" placeholder="请输入指标2名称" /> </el-form-item> <el-form-item label="指标2值" prop="indexTwoValue"> <el-input v-model="form.indexTwoValue" placeholder="请输入指标2值" /> </el-form-item> <el-form-item label="指标3名称" prop="indexThreeName"> <el-input v-model="form.indexThreeName" placeholder="请输入指标3名称" /> </el-form-item> <el-form-item label="指标3值" prop="indexThreeValue"> <el-input v-model="form.indexThreeValue" placeholder="请输入指标3值" /> </el-form-item> <el-form-item label="指标4名称" prop="indexFourName"> <el-input v-model="form.indexFourName" placeholder="请输入指标4名称" /> </el-form-item> <el-form-item label="指标4值" prop="indexFourValue"> <el-input v-model="form.indexFourValue" placeholder="请输入指标4值" /> </el-form-item> </el-form> <template #footer> <div class="dialog-footer"> <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> <el-button @click="cancel">取 消</el-button> </div> </template> </el-dialog> </div> </template> <script setup name="PcrData" lang="ts"> import { listPcrData, getPcrData, delPcrData, addPcrData, updatePcrData } from '@/api/pcr/pcrData'; import { PcrDataVO, PcrDataQuery, PcrDataForm } from '@/api/pcr/pcrData/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const pcrDataList = ref<PcrDataVO[]>([]); const buttonLoading = ref(false); const loading = ref(true); const showSearch = ref(true); const ids = ref<Array<string | number>>([]); const single = ref(true); const multiple = ref(true); const total = ref(0); const queryFormRef = ref<ElFormInstance>(); const pcrDataFormRef = ref<ElFormInstance>(); const dialog = reactive<DialogOption>({ visible: false, title: '' }); const initFormData: PcrDataForm = { id: undefined, modeName: undefined, periodName: undefined, periodYear: undefined, periodMonth: undefined, indexOneName: undefined, indexOneValue: undefined, indexTwoName: undefined, indexTwoValue: undefined, indexThreeName: undefined, indexThreeValue: undefined, indexFourName: undefined, indexFourValue: undefined, status: undefined, } const data = reactive<PageData<PcrDataForm, PcrDataQuery>>({ form: {...initFormData}, queryParams: { pageNum: 1, pageSize: 10, modeName: undefined, periodName: undefined, periodYear: undefined, periodMonth: undefined, indexOneName: undefined, indexOneValue: undefined, indexTwoName: undefined, indexTwoValue: undefined, indexThreeName: undefined, indexThreeValue: undefined, indexFourName: undefined, indexFourValue: undefined, status: undefined, params: { } }, rules: { id: [ { required: true, message: "不能为空", trigger: "blur" } ], modeName: [ { required: true, message: "模块名称不能为空", trigger: "blur" } ], periodName: [ { required: true, message: "周期不能为空", trigger: "blur" } ], periodYear: [ { required: true, message: "周期年不能为空", trigger: "blur" } ], periodMonth: [ { required: true, message: "周期月不能为空", trigger: "blur" } ], indexOneName: [ { required: true, message: "指标1名称不能为空", trigger: "blur" } ], indexOneValue: [ { required: true, message: "指标1值不能为空", trigger: "blur" } ], indexTwoName: [ { required: true, message: "指标2名称不能为空", trigger: "blur" } ], indexTwoValue: [ { required: true, message: "指标2值不能为空", trigger: "blur" } ], indexThreeName: [ { required: true, message: "指标3名称不能为空", trigger: "blur" } ], indexThreeValue: [ { required: true, message: "指标3值不能为空", trigger: "blur" } ], indexFourName: [ { required: true, message: "指标4名称不能为空", trigger: "blur" } ], indexFourValue: [ { required: true, message: "指标4值不能为空", trigger: "blur" } ], status: [ { required: true, message: "状态 1启用 0未启用不能为空", trigger: "change" } ], } }); const { queryParams, form, rules } = toRefs(data); /** 查询人车路基础信息列表 */ const getList = async () => { loading.value = true; const res = await listPcrData(queryParams.value); pcrDataList.value = res.rows; total.value = res.total; loading.value = false; } /** 取消按钮 */ const cancel = () => { reset(); dialog.visible = false; } /** 表单重置 */ const reset = () => { form.value = {...initFormData}; pcrDataFormRef.value?.resetFields(); } /** 搜索按钮操作 */ const handleQuery = () => { queryParams.value.pageNum = 1; getList(); } /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value?.resetFields(); handleQuery(); } /** 多选框选中数据 */ const handleSelectionChange = (selection: PcrDataVO[]) => { ids.value = selection.map(item => item.id); single.value = selection.length != 1; multiple.value = !selection.length; } /** 新增按钮操作 */ const handleAdd = () => { reset(); dialog.visible = true; dialog.title = "添加人车路基础信息"; } /** 修改按钮操作 */ const handleUpdate = async (row?: PcrDataVO) => { reset(); const _id = row?.id || ids.value[0] const res = await getPcrData(_id); Object.assign(form.value, res.data); dialog.visible = true; dialog.title = "修改人车路基础信息"; } /** 提交按钮 */ const submitForm = () => { pcrDataFormRef.value?.validate(async (valid: boolean) => { if (valid) { buttonLoading.value = true; if (form.value.id) { await updatePcrData(form.value).finally(() => buttonLoading.value = false); } else { await addPcrData(form.value).finally(() => buttonLoading.value = false); } proxy?.$modal.msgSuccess("修改成功"); dialog.visible = false; await getList(); } }); } /** 删除按钮操作 */ const handleDelete = async (row?: PcrDataVO) => { const _ids = row?.id || ids.value; await proxy?.$modal.confirm('是否确认删除人车路基础信息编号为"' + _ids + '"的数据项?').finally(() => loading.value = false); await delPcrData(_ids); proxy?.$modal.msgSuccess("删除成功"); await getList(); } /** 导出按钮操作 */ const handleExport = () => { proxy?.download('rs/pcrData/export', { ...queryParams.value }, `pcrData_${new Date().getTime()}.xlsx`) } onMounted(() => { getList(); }); </script> src/views/scenery/sceneryOperationData/index.vue
New file @@ -0,0 +1,332 @@ <template> <div class="p-2"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <div class="search" v-show="showSearch"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px"> <el-form-item label="周期年" prop="periodYear"> <el-input v-model="queryParams.periodYear" placeholder="请输入周期年" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="周期月" prop="periodMonth"> <el-input v-model="queryParams.periodMonth" placeholder="请输入周期月" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="车流量" prop="carFlowNum"> <el-input v-model="queryParams.carFlowNum" placeholder="请输入车流量" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="人流量" prop="personFlowNum"> <el-input v-model="queryParams.personFlowNum" placeholder="请输入人流量" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="游客预约" prop="visitorSubNum"> <el-input v-model="queryParams.visitorSubNum" placeholder="请输入游客预约" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="入园人数" prop="enterGardenNum"> <el-input v-model="queryParams.enterGardenNum" placeholder="请输入入园人数" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="在岗警力" prop="onPolice"> <el-input v-model="queryParams.onPolice" placeholder="请输入在岗警力" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="在岗警车" prop="onPaddyWagon"> <el-input v-model="queryParams.onPaddyWagon" placeholder="请输入在岗警车" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="备勤警力" prop="standbyPolice"> <el-input v-model="queryParams.standbyPolice" placeholder="请输入备勤警力" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="景区id" prop="scId"> <el-input v-model="queryParams.scId" placeholder="请输入景区id" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button> </el-form-item> </el-form> </div> </transition> <el-card shadow="never"> <template #header> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['rs:sceneryOperationData:add']">新增</el-button> </el-col> <el-col :span="1.5"> <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['rs:sceneryOperationData:edit']">修改</el-button> </el-col> <el-col :span="1.5"> <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['rs:sceneryOperationData:remove']">删除</el-button> </el-col> <el-col :span="1.5"> <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['rs:sceneryOperationData:export']">导出</el-button> </el-col> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> </el-row> </template> <el-table v-loading="loading" :data="sceneryOperationDataList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="id" align="center" prop="id" v-if="true" /> <el-table-column label="周期年" align="center" prop="periodYear" /> <el-table-column label="周期月" align="center" prop="periodMonth" /> <el-table-column label="车流量" align="center" prop="carFlowNum" /> <el-table-column label="人流量" align="center" prop="personFlowNum" /> <el-table-column label="游客预约" align="center" prop="visitorSubNum" /> <el-table-column label="入园人数" align="center" prop="enterGardenNum" /> <el-table-column label="在岗警力" align="center" prop="onPolice" /> <el-table-column label="在岗警车" align="center" prop="onPaddyWagon" /> <el-table-column label="备勤警力" align="center" prop="standbyPolice" /> <el-table-column label="状态 1启用 0未启用" align="center" prop="status" /> <el-table-column label="景区id" align="center" prop="scId" /> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template #default="scope"> <el-tooltip content="修改" placement="top"> <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['rs:sceneryOperationData:edit']"></el-button> </el-tooltip> <el-tooltip content="删除" placement="top"> <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['rs:sceneryOperationData:remove']"></el-button> </el-tooltip> </template> </el-table-column> </el-table> <pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> </el-card> <!-- 添加或修改景区运行数据对话框 --> <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> <el-form ref="sceneryOperationDataFormRef" :model="form" :rules="rules" label-width="80px"> <el-form-item label="周期年" prop="periodYear"> <el-input v-model="form.periodYear" placeholder="请输入周期年" /> </el-form-item> <el-form-item label="周期月" prop="periodMonth"> <el-input v-model="form.periodMonth" placeholder="请输入周期月" /> </el-form-item> <el-form-item label="车流量" prop="carFlowNum"> <el-input v-model="form.carFlowNum" placeholder="请输入车流量" /> </el-form-item> <el-form-item label="人流量" prop="personFlowNum"> <el-input v-model="form.personFlowNum" placeholder="请输入人流量" /> </el-form-item> <el-form-item label="游客预约" prop="visitorSubNum"> <el-input v-model="form.visitorSubNum" placeholder="请输入游客预约" /> </el-form-item> <el-form-item label="入园人数" prop="enterGardenNum"> <el-input v-model="form.enterGardenNum" placeholder="请输入入园人数" /> </el-form-item> <el-form-item label="在岗警力" prop="onPolice"> <el-input v-model="form.onPolice" placeholder="请输入在岗警力" /> </el-form-item> <el-form-item label="在岗警车" prop="onPaddyWagon"> <el-input v-model="form.onPaddyWagon" placeholder="请输入在岗警车" /> </el-form-item> <el-form-item label="备勤警力" prop="standbyPolice"> <el-input v-model="form.standbyPolice" placeholder="请输入备勤警力" /> </el-form-item> <el-form-item label="景区id" prop="scId"> <el-input v-model="form.scId" placeholder="请输入景区id" /> </el-form-item> </el-form> <template #footer> <div class="dialog-footer"> <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> <el-button @click="cancel">取 消</el-button> </div> </template> </el-dialog> </div> </template> <script setup name="SceneryOperationData" lang="ts"> import { listSceneryOperationData, getSceneryOperationData, delSceneryOperationData, addSceneryOperationData, updateSceneryOperationData } from '@/api/scenery/sceneryOperationData'; import { SceneryOperationDataVO, SceneryOperationDataQuery, SceneryOperationDataForm } from '@/api/scenery/sceneryOperationData/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const sceneryOperationDataList = ref<SceneryOperationDataVO[]>([]); const buttonLoading = ref(false); const loading = ref(true); const showSearch = ref(true); const ids = ref<Array<string | number>>([]); const single = ref(true); const multiple = ref(true); const total = ref(0); const queryFormRef = ref<ElFormInstance>(); const sceneryOperationDataFormRef = ref<ElFormInstance>(); const dialog = reactive<DialogOption>({ visible: false, title: '' }); const initFormData: SceneryOperationDataForm = { id: undefined, periodYear: undefined, periodMonth: undefined, carFlowNum: undefined, personFlowNum: undefined, visitorSubNum: undefined, enterGardenNum: undefined, onPolice: undefined, onPaddyWagon: undefined, standbyPolice: undefined, status: undefined, scId: undefined } const data = reactive<PageData<SceneryOperationDataForm, SceneryOperationDataQuery>>({ form: {...initFormData}, queryParams: { pageNum: 1, pageSize: 10, periodYear: undefined, periodMonth: undefined, carFlowNum: undefined, personFlowNum: undefined, visitorSubNum: undefined, enterGardenNum: undefined, onPolice: undefined, onPaddyWagon: undefined, standbyPolice: undefined, status: undefined, scId: undefined, params: { } }, rules: { id: [ { required: true, message: "id不能为空", trigger: "blur" } ], periodYear: [ { required: true, message: "周期年不能为空", trigger: "blur" } ], periodMonth: [ { required: true, message: "周期月不能为空", trigger: "blur" } ], carFlowNum: [ { required: true, message: "车流量不能为空", trigger: "blur" } ], personFlowNum: [ { required: true, message: "人流量不能为空", trigger: "blur" } ], visitorSubNum: [ { required: true, message: "游客预约不能为空", trigger: "blur" } ], enterGardenNum: [ { required: true, message: "入园人数不能为空", trigger: "blur" } ], onPolice: [ { required: true, message: "在岗警力不能为空", trigger: "blur" } ], onPaddyWagon: [ { required: true, message: "在岗警车不能为空", trigger: "blur" } ], standbyPolice: [ { required: true, message: "备勤警力不能为空", trigger: "blur" } ], status: [ { required: true, message: "状态 1启用 0未启用不能为空", trigger: "change" } ], scId: [ { required: true, message: "景区id不能为空", trigger: "blur" } ] } }); const { queryParams, form, rules } = toRefs(data); /** 查询景区运行数据列表 */ const getList = async () => { loading.value = true; const res = await listSceneryOperationData(queryParams.value); sceneryOperationDataList.value = res.rows; total.value = res.total; loading.value = false; } /** 取消按钮 */ const cancel = () => { reset(); dialog.visible = false; } /** 表单重置 */ const reset = () => { form.value = {...initFormData}; sceneryOperationDataFormRef.value?.resetFields(); } /** 搜索按钮操作 */ const handleQuery = () => { queryParams.value.pageNum = 1; getList(); } /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value?.resetFields(); handleQuery(); } /** 多选框选中数据 */ const handleSelectionChange = (selection: SceneryOperationDataVO[]) => { ids.value = selection.map(item => item.id); single.value = selection.length != 1; multiple.value = !selection.length; } /** 新增按钮操作 */ const handleAdd = () => { reset(); dialog.visible = true; dialog.title = "添加景区运行数据"; } /** 修改按钮操作 */ const handleUpdate = async (row?: SceneryOperationDataVO) => { reset(); const _id = row?.id || ids.value[0] const res = await getSceneryOperationData(_id); Object.assign(form.value, res.data); dialog.visible = true; dialog.title = "修改景区运行数据"; } /** 提交按钮 */ const submitForm = () => { sceneryOperationDataFormRef.value?.validate(async (valid: boolean) => { if (valid) { buttonLoading.value = true; if (form.value.id) { await updateSceneryOperationData(form.value).finally(() => buttonLoading.value = false); } else { await addSceneryOperationData(form.value).finally(() => buttonLoading.value = false); } proxy?.$modal.msgSuccess("修改成功"); dialog.visible = false; await getList(); } }); } /** 删除按钮操作 */ const handleDelete = async (row?: SceneryOperationDataVO) => { const _ids = row?.id || ids.value; await proxy?.$modal.confirm('是否确认删除景区运行数据编号为"' + _ids + '"的数据项?').finally(() => loading.value = false); await delSceneryOperationData(_ids); proxy?.$modal.msgSuccess("删除成功"); await getList(); } /** 导出按钮操作 */ const handleExport = () => { proxy?.download('sc/sceneryOperationData/export', { ...queryParams.value }, `sceneryOperationData_${new Date().getTime()}.xlsx`) } onMounted(() => { getList(); }); </script> src/views/ti/trafficIndex/index.vue
@@ -1,143 +1,149 @@ <template> <div class="p-2"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <div class="search" v-show="showSearch"> <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px"> <el-form-item label="模块名称" prop="modeName"> <el-input v-model="queryParams.modeName" placeholder="请输入模块名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标1名称" prop="targetOneName"> <el-input v-model="queryParams.targetOneName" placeholder="请输入指标1名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标1值" prop="targetOneValue"> <el-input v-model="queryParams.targetOneValue" placeholder="请输入指标1值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标1单位" prop="targetOneUnit"> <el-input v-model="queryParams.targetOneUnit" placeholder="请输入指标1单位" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标1上浮或下降值" prop="targetOneCompareValue"> <el-input v-model="queryParams.targetOneCompareValue" placeholder="请输入指标1上浮或下降值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标2名称" prop="targetTwoName"> <el-input v-model="queryParams.targetTwoName" placeholder="请输入指标2名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标2值" prop="targetTwoValue"> <el-input v-model="queryParams.targetTwoValue" placeholder="请输入指标2值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标2单位" prop="targetTwoUnit"> <el-input v-model="queryParams.targetTwoUnit" placeholder="请输入指标2单位" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标2上浮或下降值" prop="targetTwoCompareValue"> <el-input v-model="queryParams.targetTwoCompareValue" placeholder="请输入指标2上浮或下降值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标3名称" prop="targetThreeName"> <el-input v-model="queryParams.targetThreeName" placeholder="请输入指标3名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标3值" prop="targetThreeValue"> <el-input v-model="queryParams.targetThreeValue" placeholder="请输入指标3值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标3单位" prop="targetThreeUnit"> <el-input v-model="queryParams.targetThreeUnit" placeholder="请输入指标3单位" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标3上浮或下降值" prop="targetThreeCompareValue"> <el-input v-model="queryParams.targetThreeCompareValue" placeholder="请输入指标3上浮或下降值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标4名称" prop="targetFourName"> <el-input v-model="queryParams.targetFourName" placeholder="请输入指标4名称" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标4值" prop="targetFourValue"> <el-input v-model="queryParams.targetFourValue" placeholder="请输入指标4值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标4单位" prop="targetFourUnit"> <el-input v-model="queryParams.targetFourUnit" placeholder="请输入指标4单位" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="指标4上浮或下降值" prop="targetFourCompareValue"> <el-input v-model="queryParams.targetFourCompareValue" placeholder="请输入指标4上浮或下降值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="周期 1 月 2年" prop="periodName"> <el-input v-model="queryParams.periodName" placeholder="请输入周期 1 月 2年" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="周期值" prop="periodValue"> <el-input v-model="queryParams.periodValue" placeholder="请输入周期值" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="0未删除 1已删除" prop="del"> <el-input v-model="queryParams.del" placeholder="请输入0未删除 1已删除" clearable style="width: 240px" @keyup.enter="handleQuery" /> </el-form-item> <el-form-item> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button> </el-form-item> </el-form> </div> </transition> <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> <el-tab-pane label="交通指数" name="first"></el-tab-pane> <el-tab-pane label="配置" name="second"></el-tab-pane> </el-tabs> <div v-show="activeName=='first'"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <el-form ref="form" :model="form" label-width="80px"> 统计周期 <el-select v-model="form.year" placeholder="请选择年份"> <el-option label="2024年" value="2024" /> <el-option label="2023年" value="2023" /> <el-option label="2022年" value="2022" /> </el-select> <el-select v-model="form.month" placeholder="请选择月份"> <el-option label="12月" value="12" /> <el-option label="11月" value="11" /> <el-option label="10月" value="10" /> </el-select> 状态 <el-select v-model="form.status" placeholder="请选择状态"> <el-option label="全部" value="0" /> <el-option label="已启用" value="1" /> <el-option label="已禁用" value="2" /> </el-select> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button> </el-form> </transition> <el-card shadow="never"> <template #header> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['rs:trafficIndex:add']">新增</el-button> </el-col> <el-col :span="1.5"> <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['rs:trafficIndex:edit']">修改</el-button> </el-col> <el-col :span="1.5"> <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['rs:trafficIndex:remove']">删除</el-button> </el-col> <el-col :span="1.5"> <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['rs:trafficIndex:export']">导出</el-button> </el-col> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> </el-row> </template> <el-table v-loading="loading" :data="trafficIndexList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="主键id" align="center" prop="id" v-if="true" /> <el-table-column label="模块名称" align="center" prop="modeName" /> <el-table-column label="指标1名称" align="center" prop="targetOneName" /> <el-table-column label="指标1值" align="center" prop="targetOneValue" /> <el-table-column label="指标1单位" align="center" prop="targetOneUnit" /> <el-table-column label="指标1状态 1 上浮 2下降" align="center" prop="targetOneStatus" /> <el-table-column label="指标1上浮或下降值" align="center" prop="targetOneCompareValue" /> <el-table-column label="指标2名称" align="center" prop="targetTwoName" /> <el-table-column label="指标2值" align="center" prop="targetTwoValue" /> <el-table-column label="指标2单位" align="center" prop="targetTwoUnit" /> <el-table-column label="指标2状态 1 上浮 2下降" align="center" prop="targetTwoStatus" /> <el-table-column label="指标2上浮或下降值" align="center" prop="targetTwoCompareValue" /> <el-table-column label="指标3名称" align="center" prop="targetThreeName" /> <el-table-column label="指标3值" align="center" prop="targetThreeValue" /> <el-table-column label="指标3单位" align="center" prop="targetThreeUnit" /> <el-table-column label="指标3状态 1 上浮 2下降" align="center" prop="targetThreeStatus" /> <el-table-column label="指标3上浮或下降值" align="center" prop="targetThreeCompareValue" /> <el-table-column label="指标4名称" align="center" prop="targetFourName" /> <el-table-column label="指标4值" align="center" prop="targetFourValue" /> <el-table-column label="指标4单位" align="center" prop="targetFourUnit" /> <el-table-column label="指标4状态 1 上浮 2下降" align="center" prop="targetFourStatus" /> <el-table-column label="指标4上浮或下降值" align="center" prop="targetFourCompareValue" /> <el-table-column label="启用状态 1启用 2未启用" align="center" prop="status" /> <el-table-column label="周期 1 月 2年" align="center" prop="periodName" /> <el-table-column label="周期值" align="center" prop="periodValue" /> <el-table-column label="0未删除 1已删除" align="center" prop="del" /> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template #default="scope"> <el-tooltip content="修改" placement="top"> <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['rs:trafficIndex:edit']"></el-button> </el-tooltip> <el-tooltip content="删除" placement="top"> <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['rs:trafficIndex:remove']"></el-button> </el-tooltip> <el-card shadow="never"> <template #header> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['rs:trafficIndex:add']">新增</el-button> </el-col> <el-col :span="1.5"> <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['rs:trafficIndex:edit']">修改</el-button> </el-col> <el-col :span="1.5"> <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['rs:trafficIndex:remove']">删除</el-button> </el-col> <el-col :span="1.5"> <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['rs:trafficIndex:export']">导出</el-button> </el-col> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> </el-row> </template> </el-table-column> </el-table> <pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> </el-card> <el-table v-loading="loading" :data="trafficIndexList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="序号" type="index" width="50"/> <el-table-column label="模块名称" align="center" prop="modeName" /> <el-table-column label="指标1名称" align="center" prop="targetOneName" /> <el-table-column label="指标1值" align="center" prop="targetOneValue" /> <el-table-column label="指标1单位" align="center" prop="targetOneUnit" /> <el-table-column label="指标1状态 1 上浮 2下降" align="center" prop="targetOneStatus" /> <el-table-column label="指标1上浮或下降值" align="center" prop="targetOneCompareValue" /> <el-table-column label="指标2名称" align="center" prop="targetTwoName" /> <el-table-column label="指标2值" align="center" prop="targetTwoValue" /> <el-table-column label="指标2单位" align="center" prop="targetTwoUnit" /> <el-table-column label="指标2状态 1 上浮 2下降" align="center" prop="targetTwoStatus" /> <el-table-column label="指标2上浮或下降值" align="center" prop="targetTwoCompareValue" /> <el-table-column label="指标3名称" align="center" prop="targetThreeName" /> <el-table-column label="指标3值" align="center" prop="targetThreeValue" /> <el-table-column label="指标3单位" align="center" prop="targetThreeUnit" /> <el-table-column label="指标3状态 1 上浮 2下降" align="center" prop="targetThreeStatus" /> <el-table-column label="指标3上浮或下降值" align="center" prop="targetThreeCompareValue" /> <el-table-column label="指标4名称" align="center" prop="targetFourName" /> <el-table-column label="指标4值" align="center" prop="targetFourValue" /> <el-table-column label="指标4单位" align="center" prop="targetFourUnit" /> <el-table-column label="指标4状态 1 上浮 2下降" align="center" prop="targetFourStatus" /> <el-table-column label="指标4上浮或下降值" align="center" prop="targetFourCompareValue" /> <el-table-column label="启用状态 1启用 2未启用" align="center" prop="status" /> <el-table-column label="周期 1 月 2年" align="center" prop="periodName" /> <el-table-column label="周期值" align="center" prop="periodValue" /> <el-table-column label="0未删除 1已删除" align="center" prop="del" /> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template #default="scope"> <el-tooltip content="修改" placement="top"> <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['rs:trafficIndex:edit']"></el-button> </el-tooltip> <el-tooltip content="删除" placement="top"> <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['rs:trafficIndex:remove']"></el-button> </el-tooltip> </template> </el-table-column> </el-table> <pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> </el-card> </div> <div v-show="activeName=='second'"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <div class="search" v-show="showSearch"> <el-upload action="#" list-type="picture-card" :auto-upload="false"> <i slot="default" class="el-icon-plus"></i> <div slot="file" slot-scope="{file}"> <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" > <span class="el-upload-list__item-actions"> <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)" > <i class="el-icon-zoom-in"></i> </span> <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)" > <i class="el-icon-download"></i> </span> <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)" > <i class="el-icon-delete"></i> </span> </span> </div> </el-upload> <el-dialog :visible.sync="dialogVisible"> <img width="100%" :src="dialogImageUrl" alt=""> </el-dialog> </div> </transition> </div> <!-- 添加或修改交通指数对话框 --> <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> <el-form ref="trafficIndexFormRef" :model="form" :rules="rules" label-width="80px"> @@ -215,9 +221,9 @@ <script setup name="TrafficIndex" lang="ts"> import { listTrafficIndex, getTrafficIndex, delTrafficIndex, addTrafficIndex, updateTrafficIndex } from '@/api/ti/trafficIndex'; import { TrafficIndexVO, TrafficIndexQuery, TrafficIndexForm } from '@/api/ti/trafficIndex/types'; import type { TabsPaneContext, UploadProps, UploadUserFile } from "element-plus"; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const trafficIndexList = ref<TrafficIndexVO[]>([]); const buttonLoading = ref(false); const loading = ref(true); @@ -226,15 +232,20 @@ const single = ref(true); const multiple = ref(true); const total = ref(0); const activeName = ref('first'); const queryFormRef = ref<ElFormInstance>(); const trafficIndexFormRef = ref<ElFormInstance>(); const dialogImageUrl =ref(''); const dialogVisible= ref(false); const disabled= ref(false); const dialog = reactive<DialogOption>({ visible: false, title: '' }); const options = { label: false, value: '' }; const initFormData: TrafficIndexForm = { id: undefined, modeName: undefined, @@ -426,7 +437,9 @@ dialog.visible = true; dialog.title = "添加交通指数"; } const handleClick = (tab: TabsPaneContext, event: Event) => { console.log(tab.props.label, activeName) } /** 修改按钮操作 */ const handleUpdate = async (row?: TrafficIndexVO) => { reset(); @@ -473,4 +486,18 @@ onMounted(() => { getList(); }); function handleRemove(file:string) { console.log(file); }; type files = { //自定义类型 url: string; }; function handlePictureCardPreview(file:files) { dialogImageUrl.value = file.url; dialogVisible.value = true; }; function handleDownload(file:string) { console.log(file); }; </script>