预算书-专项经费预算 功能添加 10.29

master
zhc077 3 weeks ago
parent 6b31ff9d95
commit 9adef74056
  1. 8
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java
  2. 6
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java
  3. 97
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue
  4. 2
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue
  5. 10
      jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts
  6. 14
      jeecgboot-vue3/src/views/projectFile/zhengwen/ProjectFile4ZhengWen.data.ts
  7. 2
      jeecgboot-vue3/src/views/projectFile/zhengwen/components/ProjectFileModal.vue

@ -88,6 +88,14 @@ public class ProjectFileController extends JeecgController<ProjectFile, IProject
// @RequiresPermissions("projectFile:project_file:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ProjectFile projectFile) {
String fileUrl = projectFile.getFileUrl();
String[] fileArr = fileUrl.split("/");
String fileTemp = fileArr[1];
projectFile.setFileName(fileTemp);
String[] fileArr2 = fileTemp.split("\\.");
String fileName = fileArr2[0];
String fileType = fileArr2[1];
projectFile.setFileType(fileType);
projectFileService.save(projectFile);
return Result.OK("添加成功!");
}

@ -74,4 +74,10 @@ public class ProjectFile implements Serializable {
// @Excel(name = "附件地址", width = 255)
@ApiModelProperty(value = "附件标识 fujian:附件tab页显示,zhengwen:正文件tab页显示")
private java.lang.String fileFlag;
@ApiModelProperty(value = "附件名称")
private java.lang.String fileName;
@ApiModelProperty(value = "附件类型")
private java.lang.String fileType;
}

@ -1,10 +1,18 @@
<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>
<!--引用表格-->
<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 }">
@ -28,8 +36,8 @@
</template>
<script lang="ts" name="projectFile-projectFile" setup>
import {ref, reactive, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {ref, reactive, computed, unref, onMounted} from 'vue';
import {BasicTable, useTable, TableAction, FormSchema} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
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 { downloadFile } from '/@/utils/common/renderUtils';
import { useUserStore } from '/@/store/modules/user';
import {useRouter,useRoute} from "vue-router";
import {router} from "@/router";
import {useRoute, useRouter} from "vue-router";
import {useForm,BasicForm} from "@/components/Form";
const queryParam = reactive<any>({});
const checkedKeys = ref<Array<string | number>>([]);
const userStore = useUserStore();
// const {back} = useRouter();
const router = useRouter();
const {back} = useRouter();
const route = useRoute();
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '项目书附件',
title: '正文部分',
api: listByProjectId,
columns,
canResize:false,
@ -81,26 +89,53 @@ 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() {
router.back();
};
async function listByProjectId() {
let params = {
projectId: route.query.id,
fileFlag: 'zhengwen',
};
console.log(JSON.stringify(params));
return await list(params);
function goBack(){
back();
};
// onMounted(() => {
// // alert("")
// setValues();
// });
/**
* 高级查询事件
*/
@ -139,6 +174,15 @@ function handleDetail(record: Recordable) {
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>
<style lang="less" scoped>
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
.button-container {
text-align: center;
}
:deep(.ant-picker),
:deep(.ant-input-number){
width: 100%;
}
.button-container {
text-align: center;
}
</style>

@ -4,7 +4,7 @@
<a-tabs v-model:activeKey="activeKey" @change="tabChange">
<a-tab-pane key="TianBaoShuMingDemo" tab="填报说明" force-render></a-tab-pane>
<a-tab-pane key="JiBenXinXiDemo" tab="基本信息"></a-tab-pane>
<a-tab-pane key="ZhengWenDemo" tab="正文"></a-tab-pane>
<a-tab-pane key="ZhengWenDemo" tab="正文部分"></a-tab-pane>
<a-tab-pane key="XiangMuHeZuoKaiFaDemo" tab="项目合作开发情况"></a-tab-pane>
<a-tab-pane key="HeZuoDanWeiDemo" tab="合作单位"></a-tab-pane>
<a-tab-pane key="ZhuYaoRenYuanDemo" tab="项目主要参加人员"></a-tab-pane>

@ -12,10 +12,20 @@ export const columns: BasicColumn[] = [
dataIndex: 'projectId'
},*/
{
title: '附件名称',
align:"center",
dataIndex: 'fileName',
},
{
title: '附件',
align:"center",
dataIndex: 'fileUrl',
},
{
title: '类型',
align:"center",
dataIndex: 'fileType',
},
];
//
export const searchFormSchema: FormSchema[] = [

@ -11,11 +11,21 @@ export const columns: BasicColumn[] = [
align:"center",
dataIndex: 'projectId'
},*/
{
{
title: '附件名称',
align:"center",
dataIndex: 'fileName',
},
{
title: '附件',
align:"center",
dataIndex: 'fileUrl',
},
},
{
title: '类型',
align:"center",
dataIndex: 'fileType',
},
];
//
export const searchFormSchema: FormSchema[] = [

@ -46,7 +46,7 @@
try {
let values = await validate();
//id
values.porjectId = route.query.id
values.projectId = route.query.id
values.fileFlag = 'zhengwen'
setModalProps({confirmLoading: true});
//

Loading…
Cancel
Save