|
|
@ -37,6 +37,7 @@ |
|
|
|
<Dialog ref="basicFormViewRef" v-model="showView" :key="viewKey" :closeOnClickModal="true" :title="viewTitle"> |
|
|
|
<el-image v-for="url in urls" :key="url" :src="url" lazy /> |
|
|
|
</Dialog> |
|
|
|
<SYMonthImportForm ref="importFormRef" url="/eam/item/import" :importTemplateData="importTemplateData"/> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -55,7 +56,7 @@ |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
import { SearchTable } from '@/components/SearchTable' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
import {LocationArea} from "@/views/eam/basic/locationArea/locationArea.data"; |
|
|
|
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue"; |
|
|
|
|
|
|
|
defineOptions({ name: 'Item' }) |
|
|
|
|
|
|
@ -68,6 +69,13 @@ |
|
|
|
const itemNumber = ref() |
|
|
|
const tableColumns = ref(Item.allSchemas.tableColumns) |
|
|
|
const importFormRef = ref() |
|
|
|
const handleImport = () => { |
|
|
|
importFormRef.value.open() |
|
|
|
} |
|
|
|
const importTemplateData = reactive({ |
|
|
|
templateUrl: '', |
|
|
|
templateTitle: '备件导入模板.xlsx' |
|
|
|
}) |
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/950552010397122560?token=' + getAccessToken()) |
|
|
|
|
|
|
@ -100,6 +108,7 @@ |
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({ hasPermi: 'basic:item:create' }), // 新增 |
|
|
|
defaultButtons.defaultImportBtn(null), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'basic:item:export' }), // 导出 |
|
|
|
defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
@ -112,6 +121,8 @@ |
|
|
|
if (val == 'add') { |
|
|
|
// 新增 |
|
|
|
openForm('create') |
|
|
|
} else if (val == 'import') { // 导入 |
|
|
|
handleImport() |
|
|
|
} else if (val == 'export') { |
|
|
|
// 导出 |
|
|
|
handleExport() |
|
|
@ -333,5 +344,6 @@ |
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
|
importTemplateData.templateUrl = await ItemApi.importTemplate() |
|
|
|
}) |
|
|
|
</script> |
|
|
|