|
@@ -108,7 +108,12 @@
|
|
|
<img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
|
|
|
查询</el-button
|
|
|
>
|
|
|
- <el-button type="primary">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ style="background: #3485ff"
|
|
|
+ @click="handleExport"
|
|
|
+ :loading="exportLoading"
|
|
|
+ >
|
|
|
<img src="@/assets/imgs/OA/open.png" class="mr-8px" alt="" />
|
|
|
导出</el-button
|
|
|
>
|
|
@@ -307,6 +312,7 @@ import * as DeptApi from '@/api/system/dept'
|
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
|
import { arrFlatten } from '../../attendanceCenter/attendAuth'
|
|
|
import { openFlow } from '@/utils/flow'
|
|
|
+import download from '@/utils/download'
|
|
|
import UserForm from './UserForm.vue'
|
|
|
import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
|
|
|
|
|
@@ -330,6 +336,7 @@ const qrs: any = ref({
|
|
|
custodian: '',
|
|
|
assetModel: ''
|
|
|
})
|
|
|
+const message = useMessage() // 消息弹窗
|
|
|
const deptList = ref<Tree[]>([]) // 树形结构
|
|
|
const deptSort: any = ref([])
|
|
|
const initTreeDeps = async () => {
|
|
@@ -439,6 +446,28 @@ const keydonwHandle = (evt) => {
|
|
|
console.log(evt)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+/** 导出按钮操作 */
|
|
|
+const exportLoading = ref(false)
|
|
|
+const handleExport = async () => {
|
|
|
+ try {
|
|
|
+ // 导出的二次确认
|
|
|
+ await message.exportConfirm()
|
|
|
+ // 发起导出
|
|
|
+ exportLoading.value = true
|
|
|
+ const urlApi = `/assetProcure/list/excel`
|
|
|
+ const sendData = {
|
|
|
+ ...qrs,
|
|
|
+ pageSize: 10
|
|
|
+ }
|
|
|
+ const data = await request.download({ url: urlApi, params: sendData._rawValue }, '/business')
|
|
|
+ download.excel(data, '固定资产.xls')
|
|
|
+ } catch {
|
|
|
+ } finally {
|
|
|
+ exportLoading.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 固定资产投资新增、编辑
|
|
|
*/
|
|
@@ -482,7 +511,6 @@ const queryAssetProcure = async () => {
|
|
|
openFlow(router, result, '固定资产录入')
|
|
|
}
|
|
|
|
|
|
-const message = useMessage() // 消息弹窗
|
|
|
const onSaveHandle = async () => {
|
|
|
try {
|
|
|
const urlApi = `/AssetProcure/updateDetail`
|