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

master
zhc077 1 month ago
parent b8fae45ebe
commit 5f98337c3d
  1. 80
      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>
<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 }">
@ -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 {

@ -60,7 +60,7 @@
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '项目书附件',
api: list,
api: listByProjectId,
columns,
canResize:false,
formConfig: {
@ -106,6 +106,15 @@
});
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();
enum Api {
list = '/projectFile/projectFile/list4zhengWen',
list = '/projectFile/projectFile/list',
save = '/projectFile/projectFile/add',
edit = '/projectFile/projectFile/edit',
deleteOne = '/projectFile/projectFile/delete',

Loading…
Cancel
Save