| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="gaveParent(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="gaveParent(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <el-button @click="gaveParent(row,'edit')" link type="primary" size="small">{{ $t('basicData.edit') }}</el-button> |
| | | <el-button @click="gaveParent(row,'delete')" link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import router from "@/router"; |
| | | import {useI18n} from "vue-i18n"; |
| | | //prop接收父组件函数 |
| | | |
| | | |
| | | const { t } = useI18n() |
| | | |
| | | let props = defineProps({ |
| | | tableProp:{ |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (props.tableProp.footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | |
| | | switch (code) { |
| | | case 'checkList': { |
| | | if($grid.getCheckboxRecords().length==0){ |
| | | VXETable.modal.message( '请选择一条数据!') |
| | | VXETable.modal.message( t('searchOrder.msg')) |
| | | return |
| | | } |
| | | emit('getCheckList',$grid.getCheckboxRecords()) |
| | |
| | | } |
| | | case 'mySave': { |
| | | const { insertRecords, removeRecords, updateRecords } = $grid.getRecordset() |
| | | VXETable.modal.message({ content: `新增 ${insertRecords.length} 条,删除 ${removeRecords.length} 条,更新 ${updateRecords.length} 条`, status: 'success' }) |
| | | VXETable.modal.message({ content: `${t('basicData.insert')} ${insertRecords.length} ${t('components.strip')},${t('basicData.delete')} ${removeRecords.length} ${t('components.strip')},${t('basicData.update')} ${updateRecords.length} ${t('components.strip')}`, status: 'success' }) |
| | | break |
| | | } |
| | | case 'myExport': { |