预算书-项目主要内容 功能添加 10.28

master
zhc077 4 weeks ago
parent a4efa910eb
commit 41b60eb622
  1. 3
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/dto/BasicInfoDto.java
  2. 4
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java
  3. 81
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectBaseInfoDemo.vue

@ -22,4 +22,7 @@ public class BasicInfoDto {
private String email;
private String title;;
// @ApiModelProperty(value = "项目主要内容")
private String projectContent;
}

@ -273,4 +273,8 @@ public class Project implements Serializable {
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
@ApiModelProperty(value = "负责人")
private String projectCharger;
@ApiModelProperty(value = "项目主要内容")
private String projectContent;
}

@ -9,19 +9,24 @@
:schema="schema"
/>
</PageWrapper>
<BasicTable @register="registerTimeTable"/>
<BasicTable @register="registerTimeTable" />
</div>
<div>
<!--引用表格-->
<BasicTable @register="registerTable"></BasicTable>
</div>
<div>
<!--引用表格-->
<BasicForm @register="registerForm" @submit="handleSubmit" />
</div>
<div class="button-container">
<a-button type="primary" @click="router.back();">返回</a-button>
<a-button type="primary" @click="router.back()">返回</a-button>
<a-button type="primary" @click="handleSubmit">保存</a-button>
</div>
</template>
<script lang="ts" setup>
import {ref} from 'vue';
import {onMounted, ref} from 'vue';
import {Description} from '/@/components/Description/index';
import {PageWrapper} from '/@/components/Page';
import {BasicTable, useTable} from '/@/components/Table';
@ -31,8 +36,12 @@ import {useModal} from "@/components/Modal";
import {useListPage} from "@/hooks/system/useListPage";
import {columns} from "@/views/projectObjective/ProjectObjective.data";
import {getBaseInfo, list} from '@/views/projectObjective/ProjectObjective.api';
import {saveOrUpdate} from '@/views/projectApplication/project/Project.api';
import {columns2} from "@/views/cooperationDepart/CooperationDepart.data";
import {list2} from "@/views/cooperationDepart/CooperationDepart.api";
import {FormSchema, useForm, BasicForm} from "@/components/Form";
import {useMessage} from "@/hooks/web/useMessage";
const { createMessage, createSuccessModal } = useMessage();
const route = useRoute();
const router = useRouter();
@ -65,6 +74,61 @@ async function listProjectObjectiveByProjectId() {
return await list(params);
};
const schemas: FormSchema[] = [
/*{
field: 'describe',
label: '不满意原因说明',
component: 'InputTextArea',
//ifShowshowvaluesjs dom
// ifShow: ({ values }) => {
// return values.evaluate == '1';
// },
},*/
{
field: 'projectContent',
component: 'JEditor',
label: '项目主要内容',
defaultValue: '',
required: false,
},
/*{
field: 'markdown',
component: 'JMarkdownEditor',
label: 'Markdown',
defaultValue: '# 张三',
required: true,
componentProps: {
height: 300,
},
},*/
];
const [registerForm, { validate, setFieldsValue }] = useForm({
labelWidth: 120,
schemas: schemas,
actionColOptions: {
span: 24,
},
schemas: schemas,
actionColOptions: {
span: 40,
},
compact: true,
showResetButton: false,
showSubmitButton: false,
showAdvancedButton: false,
disabled: false,
});
async function handleSubmit() {
let val = await validate();
console.log('val----------',JSON.stringify(val))
// let data = getFieldsValue();
// let params = Object.assign({}, formData, data);
val.id = route.query.id;
console.log('表单数据', val)
await saveOrUpdate(val, true)
}
const [registerTimeTable] = useTable({
title: '主要合作单位:',
@ -133,12 +197,23 @@ async function getData() {
projectBaseInfoData.realName = obj.realName;
projectBaseInfoData.projectTime = obj.projectTime;
projectBaseInfoData.title = obj.title;
projectBaseInfoData.projectContent = obj.projectContent;
console.log('projectBaseInfoData', JSON.stringify(projectBaseInfoData))
setValues(obj.projectContent)
falg.value = true
}
getData();
function setValues(val) {
// alert("setValuse------"+val)
setFieldsValue({
projectContent: val,
});
}
</script>
<style>

Loading…
Cancel
Save