|
|
@ -1,10 +1,18 @@ |
|
|
|
<template> |
|
|
|
<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"> |
|
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection"> |
|
|
|
<!--插槽:table标题--> |
|
|
|
<!--插槽:table标题--> |
|
|
|
<template #tableTitle> |
|
|
|
<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> |
|
|
|
<!--操作栏--> |
|
|
|
<!--操作栏--> |
|
|
|
<template #action="{ record }"> |
|
|
|
<template #action="{ record }"> |
|
|
@ -28,8 +36,8 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" name="projectFile-projectFile" setup> |
|
|
|
<script lang="ts" name="projectFile-projectFile" setup> |
|
|
|
import {ref, reactive, computed, unref} from 'vue'; |
|
|
|
import {ref, reactive, computed, unref, onMounted} from 'vue'; |
|
|
|
import {BasicTable, useTable, TableAction} from '/@/components/Table'; |
|
|
|
import {BasicTable, useTable, TableAction, FormSchema} from '/@/components/Table'; |
|
|
|
import {useModal} from '/@/components/Modal'; |
|
|
|
import {useModal} from '/@/components/Modal'; |
|
|
|
import { useListPage } from '/@/hooks/system/useListPage' |
|
|
|
import { useListPage } from '/@/hooks/system/useListPage' |
|
|
|
import ProjectFileModal from '/@/views/projectFile/zhengwen/components/ProjectFileModal.vue' |
|
|
|
import ProjectFileModal from '/@/views/projectFile/zhengwen/components/ProjectFileModal.vue' |
|
|
@ -37,20 +45,20 @@ import {columns, searchFormSchema, superQuerySchema} from '/@/views/projectFile/ |
|
|
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from '/@/views/projectFile/zhengwen/ProjectFile4ZhengWen.api'; |
|
|
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from '/@/views/projectFile/zhengwen/ProjectFile4ZhengWen.api'; |
|
|
|
import { downloadFile } from '/@/utils/common/renderUtils'; |
|
|
|
import { downloadFile } from '/@/utils/common/renderUtils'; |
|
|
|
import { useUserStore } from '/@/store/modules/user'; |
|
|
|
import { useUserStore } from '/@/store/modules/user'; |
|
|
|
import {useRouter,useRoute} from "vue-router"; |
|
|
|
import {useRoute, useRouter} from "vue-router"; |
|
|
|
import {router} from "@/router"; |
|
|
|
import {useForm,BasicForm} from "@/components/Form"; |
|
|
|
const queryParam = reactive<any>({}); |
|
|
|
const queryParam = reactive<any>({}); |
|
|
|
const checkedKeys = ref<Array<string | number>>([]); |
|
|
|
const checkedKeys = ref<Array<string | number>>([]); |
|
|
|
const userStore = useUserStore(); |
|
|
|
const userStore = useUserStore(); |
|
|
|
// const {back} = useRouter(); |
|
|
|
const {back} = useRouter(); |
|
|
|
const router = useRouter(); |
|
|
|
|
|
|
|
const route = useRoute(); |
|
|
|
const route = useRoute(); |
|
|
|
|
|
|
|
|
|
|
|
//注册model |
|
|
|
//注册model |
|
|
|
const [registerModal, {openModal}] = useModal(); |
|
|
|
const [registerModal, {openModal}] = useModal(); |
|
|
|
//注册table数据 |
|
|
|
//注册table数据 |
|
|
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ |
|
|
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ |
|
|
|
tableProps:{ |
|
|
|
tableProps:{ |
|
|
|
title: '项目书附件', |
|
|
|
title: '正文部分', |
|
|
|
api: listByProjectId, |
|
|
|
api: listByProjectId, |
|
|
|
columns, |
|
|
|
columns, |
|
|
|
canResize:false, |
|
|
|
canResize:false, |
|
|
@ -81,26 +89,53 @@ const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ |
|
|
|
url: getImportUrl, |
|
|
|
url: getImportUrl, |
|
|
|
success: handleSuccess |
|
|
|
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 [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext |
|
|
|
|
|
|
|
|
|
|
|
// 高级查询配置 |
|
|
|
// 高级查询配置 |
|
|
|
const superQueryConfig = reactive(superQuerySchema); |
|
|
|
const superQueryConfig = reactive(superQuerySchema); |
|
|
|
|
|
|
|
|
|
|
|
function goBack() { |
|
|
|
|
|
|
|
router.back(); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function listByProjectId() { |
|
|
|
function goBack(){ |
|
|
|
let params = { |
|
|
|
back(); |
|
|
|
projectId: route.query.id, |
|
|
|
|
|
|
|
fileFlag: 'zhengwen', |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
console.log(JSON.stringify(params)); |
|
|
|
|
|
|
|
return await list(params); |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// onMounted(() => { |
|
|
|
|
|
|
|
// // alert("项目合作开发情况") |
|
|
|
|
|
|
|
// setValues(); |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 高级查询事件 |
|
|
|
* 高级查询事件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -139,6 +174,15 @@ function handleDetail(record: Recordable) { |
|
|
|
showFooter: false, |
|
|
|
showFooter: false, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function listByProjectId() { |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
projectId: route.query.id, |
|
|
|
|
|
|
|
fileFlag: 'zhengwen', |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
console.log(JSON.stringify(params)); |
|
|
|
|
|
|
|
return await list(params); |
|
|
|
|
|
|
|
}; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 删除事件 |
|
|
|
* 删除事件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -188,15 +232,14 @@ function getDropDownAction(record){ |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
|
:deep(.ant-picker),:deep(.ant-input-number){ |
|
|
|
:deep(.ant-picker), |
|
|
|
width: 100%; |
|
|
|
:deep(.ant-input-number){ |
|
|
|
} |
|
|
|
width: 100%; |
|
|
|
.button-container { |
|
|
|
} |
|
|
|
text-align: center; |
|
|
|
.button-container { |
|
|
|
} |
|
|
|
text-align: center; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|