diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java index 204dfcb..fd028a9 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/entity/Project.java @@ -230,8 +230,9 @@ public class Project implements Serializable { /** * 项目类别表id */ - @Excel(name = "项目类别表id", width = 15) + @Excel(name = "项目类别表id", width = 15,dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") @ApiModelProperty(value = "项目类别表id") + @Dict(dictTable = "project_type",dicCode = "id",dicText = "type_name") private String projectTypeid; /** * 批次 diff --git a/jeecgboot-vue3/src/views/projectApplication/project/Project.data.ts b/jeecgboot-vue3/src/views/projectApplication/project/Project.data.ts index 6b16e59..3e7f21b 100644 --- a/jeecgboot-vue3/src/views/projectApplication/project/Project.data.ts +++ b/jeecgboot-vue3/src/views/projectApplication/project/Project.data.ts @@ -1,5 +1,14 @@ import {BasicColumn, FormSchema} from '/@/components/Table'; import {render} from '/@/utils/common/renderUtils'; +import { useUserStore } from '/@/store/modules/user'; +import {computed, unref, onMounted, nextTick, ref, onBeforeMount} from 'vue'; +import {useTimeoutFn} from "@/hooks/core/useTimeout"; +import step from "@/views/demo/page/form/step/index.vue"; +import {getMenus} from "@/router/menus"; +import {cloneDeep} from "lodash-es"; +import {forEach} from "@/utils/helper/treeHelper"; + + //列表数据 export const columns: BasicColumn[] = [ { @@ -20,7 +29,8 @@ export const columns: BasicColumn[] = [ { title: '项目类别', align: "center", - dataIndex: 'projectTypeid' + // dataIndex: 'projectTypeid_dictText' + dataIndex: 'projectTypeid_dictText' }, { title: '项目书状态', @@ -99,17 +109,21 @@ export const formSchema: FormSchema[] = [ field: 'sysOrgCode', component: 'JSelectDept', componentProps: {}, + defaultValue: useUserStore().getUserInfo?.orgCode, + }, { label: '负责人', field: 'projectCharger', component: 'JSelectUser', componentProps: {}, + defaultValue: useUserStore().getUserInfo?.username, }, { label: '项目类别', field: 'projectTypeid', component: 'Input', + dynamicDisabled: true }, { label: '批次', @@ -391,6 +405,11 @@ export const superQuerySchema = { projectCharger: {title: '负责人', order: 30, view: 'sel_user', type: 'string',}, }; +// (function (){ +// alert('1111111'); +// +// })(); + /** * 流程表单调用这个方法获取formSchema * @param param @@ -399,3 +418,4 @@ export function getBpmFormSchema(_formData): FormSchema[] { // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; } + diff --git a/jeecgboot-vue3/src/views/projectApplication/project/ProjectList.vue b/jeecgboot-vue3/src/views/projectApplication/project/ProjectList.vue index 1d0f485..07f29c3 100644 --- a/jeecgboot-vue3/src/views/projectApplication/project/ProjectList.vue +++ b/jeecgboot-vue3/src/views/projectApplication/project/ProjectList.vue @@ -154,14 +154,20 @@ function handleSuccess() { function getTableAction(record){ const actions = [ { - label: '编辑', + label: '项目书', + onClick: handleEdit.bind(null, record), + // auth: 'projecttype:project_type:edit' + }, + { + label: '预算书', onClick: handleEdit.bind(null, record), // auth: 'projecttype:project_type:edit' }, { label: '详情', onClick: handleDetail.bind(null, record), - }, { + }, + { label: '删除', popConfirm: { title: '是否确认删除', @@ -169,20 +175,14 @@ function getTableAction(record){ placement: 'topLeft', }, // auth: 'projecttype:project_type:delete' - } - ]; - /*if (record.status == 0) { + }]; + //申请人待提交时,可以修改 + if (record.projectStatus == 5) { actions.unshift({ - label: '启动', - onClick: handleStart.bind(null,record), + label: '编辑', + onClick: handleEdit.bind(null, record), }); } - if (record.status == 1) { - actions.unshift({ - label: '暂停', - onClick: handleStop.bind(null,record), - }); - }*/ return actions; } /**