| | |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | tools: 'toolbar_buttons', |
| | | buttons:'buttons' |
| | | }, |
| | | // import: false, |
| | | // export: true, |
| | |
| | | gridOptions.columns = props.childrenData.columns |
| | | getReportData() |
| | | addListener(xGrid.value,gridOptions) |
| | | |
| | | |
| | | }) |
| | | function filterChanged(column){ |
| | | //gridOptions.loading=true |
| | |
| | | } |
| | | |
| | | const getReportData = () => { |
| | | if(props.childrenData.model!=null){ |
| | | request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${orderInfo.reportFormDate}/${props.childrenData.model}/${props.childrenData.scope}`,filterData.value).then(res => { |
| | | if(res.code === '200'){ |
| | | props.childrenData.data = res.data.data |
| | | basicProp.value.pageTotal = res.data.total.pageTotal |
| | | basicProp.value.dataTotal = res.data.total.total |
| | | orderInfo.reportFormDate = res.data.selectDate |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${orderInfo.reportFormDate}`,filterData.value).then(res => { |
| | | if(res.code === '200'){ |
| | | props.childrenData.data = res.data.data |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | const exportEvent = () => { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | $table.exportData({ |
| | | filename: 'order_export', |
| | | sheetName: 'Sheet1', |
| | | type: 'xlsx' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | |
| | | </template> |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel(props.childrenData.exportUrl, |
| | | <vxe-button icon="vxe-icon-download" circle |
| | | style="margin-right: 0.5rem" |
| | | @click="exportEvent" /> |
| | | |
| | | <vxe-button icon="vxe-icon-cloud-download" style="margin-right: 0.5rem" |
| | | circle |
| | | @click="exportExcel(props.childrenData.exportUrl, |
| | | props.childrenData.exportName, |
| | | orderInfo.reportFormDate)"> |
| | | {{$t('basicData.export')}}</vxe-button> |
| | | orderInfo.reportFormDate)" /> |
| | | |
| | | </template> |
| | | <template #buttons> |
| | | <slot name="buttons"></slot> |
| | | </template> |
| | | |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |