|
|
|
@ -1,9 +1,18 @@ |
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<a-card :current="null" title="流程进度" :bordered="false"> |
|
|
|
|
<a-steps size="small"> |
|
|
|
|
<a-step title="申请人提交"/> |
|
|
|
|
<a-step title="申请单位提交"/> |
|
|
|
|
<a-step title="科技主管提交"/> |
|
|
|
|
<a-step title="市科技局提交"/> |
|
|
|
|
<a-step title="财政主管处理"/> |
|
|
|
|
</a-steps> |
|
|
|
|
</a-card> |
|
|
|
|
<!--引用表格--> |
|
|
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection"> |
|
|
|
|
<!--插槽:table标题--> |
|
|
|
|
<!-- <template #tableTitle> |
|
|
|
|
<!-- <template #tableTitle> |
|
|
|
|
<a-button type="primary" v-auth="'projectLog:project_log:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> |
|
|
|
|
<a-button type="primary" v-auth="'projectLog:project_log:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> |
|
|
|
|
<j-upload-button type="primary" v-auth="'projectLog:project_log:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> |
|
|
|
@ -34,59 +43,61 @@ |
|
|
|
|
<!-- 表单区域 --> |
|
|
|
|
<ProjectLogModal @register="registerModal" @success="handleSuccess"></ProjectLogModal> |
|
|
|
|
</div> |
|
|
|
|
<div class="button-container"> |
|
|
|
|
<a-button type="primary" @click="router.back()">返回</a-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts" name="projectLog-projectLog" setup> |
|
|
|
|
import {ref, reactive, computed, unref} from 'vue'; |
|
|
|
|
import {BasicTable, useTable, TableAction} from '/@/components/Table'; |
|
|
|
|
import {useModal} from '/@/components/Modal'; |
|
|
|
|
import { useListPage } from '/@/hooks/system/useListPage' |
|
|
|
|
import ProjectLogModal from './components/ProjectLogModal.vue' |
|
|
|
|
import {columns, searchFormSchema, superQuerySchema} from './ProjectLog.data'; |
|
|
|
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './ProjectLog.api'; |
|
|
|
|
import { downloadFile } from '/@/utils/common/renderUtils'; |
|
|
|
|
import { useUserStore } from '/@/store/modules/user'; |
|
|
|
|
import {useRoute} from "vue-router"; |
|
|
|
|
import {defHttp} from "@/utils/http/axios"; |
|
|
|
|
const queryParam = reactive<any>({}); |
|
|
|
|
const checkedKeys = ref<Array<string | number>>([]); |
|
|
|
|
const userStore = useUserStore(); |
|
|
|
|
//注册model |
|
|
|
|
const [registerModal, {openModal}] = useModal(); |
|
|
|
|
|
|
|
|
|
const route = useRoute(); |
|
|
|
|
const listByProjectId = () =>{ |
|
|
|
|
// console.log("projectId",props.projectId) |
|
|
|
|
|
|
|
|
|
import {reactive, ref} from 'vue'; |
|
|
|
|
import {BasicTable} from '/@/components/Table'; |
|
|
|
|
import {useModal} from '/@/components/Modal'; |
|
|
|
|
import {useListPage} from '/@/hooks/system/useListPage' |
|
|
|
|
import ProjectLogModal from './components/ProjectLogModal.vue' |
|
|
|
|
import {columns, searchFormSchema, superQuerySchema} from './ProjectLog.data'; |
|
|
|
|
import {batchDelete, deleteOne, getExportUrl, getImportUrl} from './ProjectLog.api'; |
|
|
|
|
import {useUserStore} from '/@/store/modules/user'; |
|
|
|
|
import {useRoute, useRouter} from "vue-router"; |
|
|
|
|
import {defHttp} from "@/utils/http/axios"; |
|
|
|
|
|
|
|
|
|
const queryParam = reactive<any>({}); |
|
|
|
|
const checkedKeys = ref<Array<string | number>>([]); |
|
|
|
|
const userStore = useUserStore(); |
|
|
|
|
const router = useRouter(); |
|
|
|
|
//注册model |
|
|
|
|
const [registerModal, {openModal}] = useModal(); |
|
|
|
|
|
|
|
|
|
const route = useRoute(); |
|
|
|
|
const listByProjectId = () => { |
|
|
|
|
let params = {projectId: route.query.id} |
|
|
|
|
return defHttp.get({url: '/projectLog/projectLog/list', params}); |
|
|
|
|
} |
|
|
|
|
//注册table数据 |
|
|
|
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ |
|
|
|
|
tableProps:{ |
|
|
|
|
title: '项目操作日志', |
|
|
|
|
} |
|
|
|
|
//注册table数据 |
|
|
|
|
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ |
|
|
|
|
tableProps: { |
|
|
|
|
title: '', |
|
|
|
|
api: listByProjectId, |
|
|
|
|
columns, |
|
|
|
|
canResize:false, |
|
|
|
|
canResize: false, |
|
|
|
|
formConfig: { |
|
|
|
|
//labelWidth: 120, |
|
|
|
|
schemas: searchFormSchema, |
|
|
|
|
autoSubmitOnEnter:true, |
|
|
|
|
showAdvancedButton:true, |
|
|
|
|
fieldMapToNumber: [ |
|
|
|
|
], |
|
|
|
|
fieldMapToTime: [ |
|
|
|
|
], |
|
|
|
|
autoSubmitOnEnter: true, |
|
|
|
|
showAdvancedButton: true, |
|
|
|
|
fieldMapToNumber: [], |
|
|
|
|
fieldMapToTime: [], |
|
|
|
|
}, |
|
|
|
|
actionColumn: { |
|
|
|
|
width: 120, |
|
|
|
|
fixed:'right' |
|
|
|
|
fixed: 'right' |
|
|
|
|
}, |
|
|
|
|
beforeFetch: (params) => { |
|
|
|
|
return Object.assign(params, queryParam); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
exportConfig: { |
|
|
|
|
name:"项目操作日志", |
|
|
|
|
name: "项目操作日志", |
|
|
|
|
url: getExportUrl, |
|
|
|
|
params: queryParam, |
|
|
|
|
}, |
|
|
|
@ -94,73 +105,80 @@ |
|
|
|
|
url: getImportUrl, |
|
|
|
|
success: handleSuccess |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext |
|
|
|
|
const [registerTable, {reload}, {rowSelection, selectedRowKeys}] = tableContext |
|
|
|
|
|
|
|
|
|
// 高级查询配置 |
|
|
|
|
const superQueryConfig = reactive(superQuerySchema); |
|
|
|
|
// 高级查询配置 |
|
|
|
|
const superQueryConfig = reactive(superQuerySchema); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* 高级查询事件 |
|
|
|
|
*/ |
|
|
|
|
function handleSuperQuery(params) { |
|
|
|
|
function handleSuperQuery(params) { |
|
|
|
|
Object.keys(params).map((k) => { |
|
|
|
|
queryParam[k] = params[k]; |
|
|
|
|
}); |
|
|
|
|
reload(); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 新增事件 |
|
|
|
|
*/ |
|
|
|
|
function handleAdd() { |
|
|
|
|
function handleAdd() { |
|
|
|
|
openModal(true, { |
|
|
|
|
isUpdate: false, |
|
|
|
|
showFooter: true, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 编辑事件 |
|
|
|
|
*/ |
|
|
|
|
function handleEdit(record: Recordable) { |
|
|
|
|
function handleEdit(record: Recordable) { |
|
|
|
|
openModal(true, { |
|
|
|
|
record, |
|
|
|
|
isUpdate: true, |
|
|
|
|
showFooter: true, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 详情 |
|
|
|
|
*/ |
|
|
|
|
function handleDetail(record: Recordable) { |
|
|
|
|
function handleDetail(record: Recordable) { |
|
|
|
|
openModal(true, { |
|
|
|
|
record, |
|
|
|
|
isUpdate: true, |
|
|
|
|
showFooter: false, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 删除事件 |
|
|
|
|
*/ |
|
|
|
|
async function handleDelete(record) { |
|
|
|
|
async function handleDelete(record) { |
|
|
|
|
await deleteOne({id: record.id}, handleSuccess); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 批量删除事件 |
|
|
|
|
*/ |
|
|
|
|
async function batchHandleDelete() { |
|
|
|
|
async function batchHandleDelete() { |
|
|
|
|
await batchDelete({ids: selectedRowKeys.value}, handleSuccess); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 成功回调 |
|
|
|
|
*/ |
|
|
|
|
function handleSuccess() { |
|
|
|
|
function handleSuccess() { |
|
|
|
|
(selectedRowKeys.value = []) && reload(); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 操作栏 |
|
|
|
|
*/ |
|
|
|
|
function getTableAction(record){ |
|
|
|
|
function getTableAction(record) { |
|
|
|
|
return [ |
|
|
|
|
{ |
|
|
|
|
label: '编辑', |
|
|
|
@ -168,11 +186,12 @@ |
|
|
|
|
auth: 'projectLog:project_log:edit' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 下拉操作栏 |
|
|
|
|
*/ |
|
|
|
|
function getDropDownAction(record){ |
|
|
|
|
function getDropDownAction(record) { |
|
|
|
|
return [ |
|
|
|
|
{ |
|
|
|
|
label: '详情', |
|
|
|
@ -187,13 +206,16 @@ |
|
|
|
|
auth: 'projectLog:project_log:delete' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
|
:deep(.ant-picker),:deep(.ant-input-number){ |
|
|
|
|
:deep(.ant-picker), :deep(.ant-input-number) { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
.button-container { |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|