项目书-附件&正文 功能添加 10.22

master
zhc077 1 month ago
parent b8fae45ebe
commit 5f98337c3d
  1. 78
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue
  2. 11
      jeecgboot-vue3/src/views/projectFile/ProjectFileList.vue
  3. 2
      jeecgboot-vue3/src/views/projectFile/zhengwen/ProjectFile4ZhengWen.api.ts

@ -1,18 +1,10 @@
<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 }">
@ -36,8 +28,8 @@
</template> </template>
<script lang="ts" name="projectFile-projectFile" setup> <script lang="ts" name="projectFile-projectFile" setup>
import {ref, reactive, computed, unref, onMounted} from 'vue'; import {ref, reactive, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction, FormSchema} from '/@/components/Table'; import {BasicTable, useTable, TableAction} 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'
@ -45,19 +37,21 @@ 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} from "vue-router"; import {useRouter,useRoute} from "vue-router";
import {useForm,BasicForm} from "@/components/Form"; import {router} from "@/router";
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();
//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: list, api: listByProjectId,
columns, columns,
canResize:false, canResize:false,
formConfig: { formConfig: {
@ -87,52 +81,25 @@ 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() { function goBack() {
back(); router.back();
}; };
// onMounted(() => { async function listByProjectId() {
// // alert("") let params = {
// setValues(); projectId: route.query.id,
// }); fileFlag: 'zhengwen',
};
console.log(JSON.stringify(params));
await list(params);
}
/** /**
* 高级查询事件 * 高级查询事件
@ -221,11 +188,12 @@ function getDropDownAction(record){
} }
] ]
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-picker), :deep(.ant-picker),:deep(.ant-input-number){
:deep(.ant-input-number){
width: 100%; width: 100%;
} }
.button-container { .button-container {

@ -60,7 +60,7 @@
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{ tableProps:{
title: '项目书附件', title: '项目书附件',
api: list, api: listByProjectId,
columns, columns,
canResize:false, canResize:false,
formConfig: { formConfig: {
@ -106,6 +106,15 @@
}); });
reload(); reload();
} }
async function listByProjectId() {
let params = {
projectId: router.qu,
fileFlag: 'zhengwen',
};
console.log(JSON.stringify(params));
await list(params);
}
/** /**
* 新增事件 * 新增事件
*/ */

@ -4,7 +4,7 @@ import {useMessage} from "/@/hooks/web/useMessage";
const {createConfirm} = useMessage(); const {createConfirm} = useMessage();
enum Api { enum Api {
list = '/projectFile/projectFile/list4zhengWen', list = '/projectFile/projectFile/list',
save = '/projectFile/projectFile/add', save = '/projectFile/projectFile/add',
edit = '/projectFile/projectFile/edit', edit = '/projectFile/projectFile/edit',
deleteOne = '/projectFile/projectFile/delete', deleteOne = '/projectFile/projectFile/delete',

Loading…
Cancel
Save