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

master
zhc077 1 month ago
parent 9dd5716ce8
commit 29d8bd899f
  1. BIN
      jeecgboot-vue3/src/assets/doc/shenqingshu.doc
  2. 24
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/FuJianDemo.vue
  3. 64
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue
  4. 29
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue
  5. 15
      jeecgboot-vue3/src/views/projectApplication/project/ProjectList.vue

@ -4,25 +4,8 @@
<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>
<!-- <a-button type="primary" v-auth="'projectFile:project_file:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> </template>
<j-upload-button type="primary" v-auth="'projectFile:project_file:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button v-auth="'projectFile:project_file:deleteBatch'">批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
&lt;!&ndash; 高级查询 &ndash;&gt;
<super-query :config="superQueryConfig" @search="handleSuperQuery" />-->
</template>
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
@ -198,7 +181,8 @@ function getDropDownAction(record){
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-picker),:deep(.ant-input-number){ :deep(.ant-picker),
:deep(.ant-input-number){
width: 100%; width: 100%;
} }
.button-container { .button-container {

@ -1,10 +1,18 @@
<template> <template>
<div> <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"> <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'
@ -38,6 +46,7 @@ import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from '/@/views/
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} from "vue-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();
@ -47,7 +56,7 @@ 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: list,
columns, columns,
canResize:false, canResize:false,
@ -78,17 +87,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() {
function goBack(){
back(); back();
}; };
// onMounted(() => {
// // alert("")
// setValues();
// });
/** /**
* 高级查询事件 * 高级查询事件
*/ */
@ -176,12 +221,11 @@ function getDropDownAction(record){
} }
] ]
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-picker),:deep(.ant-input-number){ :deep(.ant-picker),
:deep(.ant-input-number){
width: 100%; width: 100%;
} }
.button-container { .button-container {

@ -7,10 +7,6 @@
<a-tab-pane key="XiangMuHeZuoKaiFaDemo" 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="HeZuoDanWeiDemo" tab="合作单位"></a-tab-pane>
<a-tab-pane key="ZhuYaoRenYuanDemo" tab="项目主要参加人员"></a-tab-pane> <a-tab-pane key="ZhuYaoRenYuanDemo" tab="项目主要参加人员"></a-tab-pane>
<!-- <a-tab-pane key="JeecgComponents" tab="下拉选择组件"></a-tab-pane>-->
<!-- <a-tab-pane key="JEditorDemo" tab="富文本&MakeDown"></a-tab-pane>-->
<!-- <a-tab-pane key="ImgDragSort" tab="图片拖拽"></a-tab-pane>-->
<!-- <a-tab-pane key="ImgTurnPage" tab="图片翻页"></a-tab-pane>-->
<a-tab-pane key="JeecgPdfView" tab="PDF预览"></a-tab-pane> <a-tab-pane key="JeecgPdfView" tab="PDF预览"></a-tab-pane>
<a-tab-pane key="XiangMuJiXiaoMuBiaoDemo" tab="项目绩效目标"></a-tab-pane> <a-tab-pane key="XiangMuJiXiaoMuBiaoDemo" tab="项目绩效目标"></a-tab-pane>
<a-tab-pane key="YiJianDemo" tab="意见"></a-tab-pane> <a-tab-pane key="YiJianDemo" tab="意见"></a-tab-pane>
@ -19,9 +15,9 @@
<component :is="currentComponent"></component> <component :is="currentComponent"></component>
</a-card> </a-card>
</div> </div>
<!-- <div type="primary" class="button-container">--> <!-- <div type="primary" class="button-container">
<!-- <a-button type="primary" @click="goBack"> 返回 </a-button>--> <a-button type="primary" @click="goBack"> 获取路由 </a-button>
<!-- </div>--> </div>-->
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, computed } from 'vue'; import { defineComponent, ref, computed } from 'vue';
@ -34,8 +30,6 @@
import ZhuYaoRenYuanDemo from './ZhuYaoRenYuanDemo.vue'; import ZhuYaoRenYuanDemo from './ZhuYaoRenYuanDemo.vue';
import ZhengWenDemo from './ZhengWenDemo.vue'; import ZhengWenDemo from './ZhengWenDemo.vue';
import XiangMuHeZuoKaiFaDemo from './XiangMuHeZuoKaiFaDemo.vue'; import XiangMuHeZuoKaiFaDemo from './XiangMuHeZuoKaiFaDemo.vue';
import ImgDragSort from './ImgDragSort.vue';
import ImgTurnPage from './ImgTurnPage.vue';
import JeecgPdfView from './JeecgPdfView.vue'; import JeecgPdfView from './JeecgPdfView.vue';
import FuJianDemo from './FuJianDemo.vue'; import FuJianDemo from './FuJianDemo.vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
@ -43,7 +37,8 @@
export default defineComponent({ export default defineComponent({
name: 'comp-jeecg-basic', name: 'comp-jeecg-basic',
setup() { setup() {
const { back } = useRouter(); const route = useRouter();
const projectId = ref(route.currentRoute.value.query);
const activeKey = ref('TianBaoShuMingDemo'); const activeKey = ref('TianBaoShuMingDemo');
const currentComponent = computed(() => { const currentComponent = computed(() => {
const componentType = { const componentType = {
@ -54,10 +49,6 @@
YiJianDemo: YiJianDemo, YiJianDemo: YiJianDemo,
HeZuoDanWeiDemo: HeZuoDanWeiDemo, HeZuoDanWeiDemo: HeZuoDanWeiDemo,
ZhuYaoRenYuanDemo: ZhuYaoRenYuanDemo, ZhuYaoRenYuanDemo: ZhuYaoRenYuanDemo,
// JeecgComponents: JeecgComponents,
// JEditorDemo: JEditorDemo,
// ImgDragSort: ImgDragSort,
// ImgTurnPage: ImgTurnPage,
JeecgPdfView: JeecgPdfView, JeecgPdfView: JeecgPdfView,
FuJianDemo: FuJianDemo, FuJianDemo: FuJianDemo,
}; };
@ -67,11 +58,15 @@
//使componenttab //使componenttab
function tabChange(key) { function tabChange(key) {
activeKey.value = key; activeKey.value = key;
alert("activeKey.value-"+activeKey.value)
} }
/*function goBack(){ /*function goBack() {
back(); // back();
};*/ alert("获取路由:"+JSON.stringify(projectId));
// console.log(":"+JSON.stringify(route.currentRoute.value.query));
// route.back();
}*/
return { return {
activeKey, activeKey,
currentComponent, currentComponent,

@ -124,15 +124,22 @@ function handleAdd() {
// //
function go_xinjianshenbao() { function go_xinjianshenbao() {
// go('/comp/jeecg/basic'); // go('/comp/jeecg/basic');
go('/projectApplication/index?id=' +'666'); go('/projectApplication/index');
} }
// //
function go_xiangmushu() { function go_xiangmushu(record) {
// go('/comp/jeecg/basic?id=' +'666'); // go('/comp/jeecg/basic?id=' +'666');
go('/projectApplication/kejigongguan/xiangmushu'); go('/projectApplication/kejigongguan/xiangmushu?id='+record.id);
} }
//
function go_yusuanshu(record) {
// go('/comp/jeecg/basic?id=' +'666');
go('/projectApplication/kejigongguan/xiangmushu?id='+record.id);
}
/** /**
* 编辑事件 * 编辑事件
*/ */
@ -183,7 +190,7 @@ function getTableAction(record){
}, },
{ {
label: '预算书', label: '预算书',
onClick: handleEdit.bind(null, record), onClick: go_yusuanshu.bind(null, record),
// auth: 'projecttype:project_type:edit' // auth: 'projecttype:project_type:edit'
}, },
{ {

Loading…
Cancel
Save