# Conflicts:
#	frontend/src/views/machine/device/index.vue
This commit is contained in:
sjl
2024-11-07 15:14:50 +08:00

View File

@@ -25,6 +25,7 @@
</ProTable> </ProTable>
</div> </div>
<DevicePopup :refresh-table='proTable?.getTableList' ref='devicePopup' /> <DevicePopup :refresh-table='proTable?.getTableList' ref='devicePopup' />
<ImportExcel ref='deviceImportExcel' />
</template> </template>
<script setup lang='tsx' name='useRole'> <script setup lang='tsx' name='useRole'>
@@ -40,7 +41,7 @@ import DevicePopup from '@/views/machine/device/components/devicePopup.vue'
import { CirclePlus, Delete, EditPen, Share, Download, Upload, View, Refresh } from '@element-plus/icons-vue' import { CirclePlus, Delete, EditPen, Share, Download, Upload, View, Refresh } from '@element-plus/icons-vue'
import deviceDataList from '@/api/device/deviceData' import deviceDataList from '@/api/device/deviceData'
import { useDictStore } from '@/stores/modules/dict' import { useDictStore } from '@/stores/modules/dict'
import { getPqDevList, deletePqDev, exportPqDev, importPqDev } from '@/api/device/device.ts' import {getPqDevList, deletePqDev, exportPqDev, importPqDev} from '@/api/device/device.ts'
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
@@ -149,6 +150,7 @@ const handleDelete = async (params: Device.ResPqDev) => {
} }
<<<<<<< HEAD
// 导出设备 // 导出设备
const downloadFile = async () => { const downloadFile = async () => {
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() => ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>
@@ -162,6 +164,18 @@ const importFile = () => {
ElMessageBox.confirm('确认批量导入被检设备?', '温馨提示', { type: 'warning' }).then(() => ElMessageBox.confirm('确认批量导入被检设备?', '温馨提示', { type: 'warning' }).then(() =>
) )
=======
const deviceImportExcel = ref<InstanceType<typeof ImportExcel> | null>("deviceExcel")
const importFile=async ()=>{
const params = {
title: '设备',
tempApi: exportPqDev,
importApi: importPqDev,
getTableList: proTable.value?.getTableList,
}
deviceImportExcel.value?.acceptParams(params)
>>>>>>> f08f45fb9ca7088c9b959b5952cef55fd7f4eeb6
} }
</script> </script>