| | |
| | | import {useI18n} from 'vue-i18n' |
| | | import exportExcel from "@/hook/exportExcel"; |
| | | import footSum from "@/hook/footSum" |
| | | import {changeFilterEvent} from "@/hook" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | selectPageList() |
| | | } |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | |
| | | function filterChanged(column){ |
| | | //gridOptions.loading=true |
| | |
| | | {field: 'breakageQuantity', width: 120, title: t('reportingWorks.quantityBroken')}, |
| | | {field: 'area', width: 120, title: t('reportingWorks.wornArea')}, |
| | | {field: 'personnel', width: 120, title: t('reportingWorks.responsiblePersonnel')}, |
| | | {field: 'glassChild', width: 120, title: t('reportingWorks.glassChild')}, |
| | | {field: 'glassChild', width: 120, title: t('reportingWorks.glassChild'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |