|
|
|
@ -1,18 +1,10 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="p-1"> |
|
|
|
|
<div class="p-1 bg-white"> |
|
|
|
|
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" |
|
|
|
|
@click="downloadFile('temp/shenqingshu.doc')">下载模板 |
|
|
|
|
</a-button> |
|
|
|
|
<BasicForm @register="register2" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div> |
|
|
|
|
<!--引用表格--> |
|
|
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection"> |
|
|
|
|
<!--插槽:table标题--> |
|
|
|
|
<template #tableTitle> |
|
|
|
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 上传附件</a-button> |
|
|
|
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> |
|
|
|
|
</template> |
|
|
|
|
<!--操作栏--> |
|
|
|
|
<template #action="{ record }"> |
|
|
|
@ -36,8 +28,8 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts" name="projectFile-projectFile" setup> |
|
|
|
|
import {ref, reactive, computed, unref, onMounted} from 'vue'; |
|
|
|
|
import {BasicTable, useTable, TableAction, FormSchema} from '/@/components/Table'; |
|
|
|
|
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 ProjectFileModal from '/@/views/projectFile/zhengwen/components/ProjectFileModal.vue' |
|
|
|
@ -45,19 +37,21 @@ import {columns, searchFormSchema, superQuerySchema} from '/@/views/projectFile/ |
|
|
|
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from '/@/views/projectFile/zhengwen/ProjectFile4ZhengWen.api'; |
|
|
|
|
import { downloadFile } from '/@/utils/common/renderUtils'; |
|
|
|
|
import { useUserStore } from '/@/store/modules/user'; |
|
|
|
|
import {useRouter} from "vue-router"; |
|
|
|
|
import {useForm,BasicForm} from "@/components/Form"; |
|
|
|
|
import {useRouter,useRoute} from "vue-router"; |
|
|
|
|
import {router} from "@/router"; |
|
|
|
|
const queryParam = reactive<any>({}); |
|
|
|
|
const checkedKeys = ref<Array<string | number>>([]); |
|
|
|
|
const userStore = useUserStore(); |
|
|
|
|
const {back} = useRouter(); |
|
|
|
|
// const {back} = useRouter(); |
|
|
|
|
const router = useRouter(); |
|
|
|
|
const route = useRoute(); |
|
|
|
|
//注册model |
|
|
|
|
const [registerModal, {openModal}] = useModal(); |
|
|
|
|
//注册table数据 |
|
|
|
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ |
|
|
|
|
tableProps:{ |
|
|
|
|
title: '正文', |
|
|
|
|
api: list, |
|
|
|
|
title: '项目书附件', |
|
|
|
|
api: listByProjectId, |
|
|
|
|
columns, |
|
|
|
|
canResize:false, |
|
|
|
|
formConfig: { |
|
|
|
@ -87,52 +81,25 @@ const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ |
|
|
|
|
url: getImportUrl, |
|
|
|
|
success: handleSuccess |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const schemas2: FormSchema[] = [ |
|
|
|
|
{ |
|
|
|
|
field: 'desc', |
|
|
|
|
component: 'InputTextArea', |
|
|
|
|
componentProps: { |
|
|
|
|
// placeholder: '请输入公司地址', |
|
|
|
|
rows: 5, |
|
|
|
|
}, |
|
|
|
|
// label: '富文本', |
|
|
|
|
defaultValue: '上传主表信息\n' + |
|
|
|
|
'第一步:下载项目申请书word模板(shenqingshu.doc)。\n' + |
|
|
|
|
'第二步:打开项目申请书模板,在word中填写项目申请书。\n' + |
|
|
|
|
'第三步:将填写完整无误,不再修改的项目申请书(word)上传。', |
|
|
|
|
dynamicDisabled: true, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
const [register2, { setProps, validate, setFieldsValue }] = useForm({ |
|
|
|
|
labelWidth: 120, |
|
|
|
|
schemas: schemas2, |
|
|
|
|
actionColOptions: { |
|
|
|
|
span: 24, |
|
|
|
|
}, |
|
|
|
|
compact: true, |
|
|
|
|
showResetButton: false, |
|
|
|
|
showSubmitButton: false, |
|
|
|
|
showAdvancedButton: false, |
|
|
|
|
disabled: false, |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext |
|
|
|
|
|
|
|
|
|
// 高级查询配置 |
|
|
|
|
const superQueryConfig = reactive(superQuerySchema); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function goBack(){ |
|
|
|
|
back(); |
|
|
|
|
function goBack() { |
|
|
|
|
router.back(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// onMounted(() => { |
|
|
|
|
// // alert("项目合作开发情况") |
|
|
|
|
// setValues(); |
|
|
|
|
// }); |
|
|
|
|
async function listByProjectId() { |
|
|
|
|
let params = { |
|
|
|
|
projectId: route.query.id, |
|
|
|
|
fileFlag: 'zhengwen', |
|
|
|
|
}; |
|
|
|
|
console.log(JSON.stringify(params)); |
|
|
|
|
await list(params); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 高级查询事件 |
|
|
|
@ -221,11 +188,12 @@ function getDropDownAction(record){ |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
|
:deep(.ant-picker), |
|
|
|
|
:deep(.ant-input-number){ |
|
|
|
|
:deep(.ant-picker),:deep(.ant-input-number){ |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
.button-container { |
|
|
|
|