明树Git Lab

Commit 0dcbdc2c authored by zhanghan's avatar zhanghan

需求处理完毕

parent bf1aa83c
Pipeline #111393 passed with stage
in 23 seconds
...@@ -127,6 +127,12 @@ const simpleLevelMap = { ...@@ -127,6 +127,12 @@ const simpleLevelMap = {
3: 3, 3: 3,
4: 3, 4: 3,
5: 4, 5: 4,
7: 2,
8: 3,
9: 4,
13: 4,
14: 4,
15: 4,
}; };
const activeNodes = computed(() => { const activeNodes = computed(() => {
...@@ -150,7 +156,6 @@ const highlightLevel = computed(() => { ...@@ -150,7 +156,6 @@ const highlightLevel = computed(() => {
}); });
const flowTitle = computed(() => { const flowTitle = computed(() => {
if (props.flowType === "simple") return "立项审批流程";
return props.currentState >= 7 ? "决策审批流程" : "立项审批流程"; return props.currentState >= 7 ? "决策审批流程" : "立项审批流程";
}); });
......
...@@ -53,36 +53,56 @@ ...@@ -53,36 +53,56 @@
<div class="process-project-name" v-if="processInfo.projectName"> <div class="process-project-name" v-if="processInfo.projectName">
项目名称:<span class="name">{{ processInfo.projectName }}</span> 项目名称:<span class="name">{{ processInfo.projectName }}</span>
</div> </div>
<el-table <div class="process-section" v-if="lxProcessData.length">
:data="processData" <div class="process-section-title">立项审批</div>
border <el-table
style="width: 100%" :data="lxProcessData"
class="process-table" border
:header-cell-style="{ style="width: 100%"
background: '#f5f7fa', class="process-table"
color: '#333', :header-cell-style="{
textAlign: 'center', background: '#f5f7fa',
fontWeight: 600, color: '#333',
}" textAlign: 'center',
:cell-style="{ textAlign: 'center' }" fontWeight: 600,
> }"
<el-table-column type="index" label="序号" width="60" /> :cell-style="{ textAlign: 'center' }"
<el-table-column prop="actionName" label="操作" min-width="120" /> >
<el-table-column label="操作人" min-width="100"> <el-table-column type="index" label="序号" width="60" />
<template #default="{ row }">{{ row.creator?.name }}</template> <el-table-column prop="actionName" label="操作" min-width="120" />
</el-table-column> <el-table-column label="操作人" min-width="100">
<el-table-column <template #default="{ row }">{{ row.creator?.name }}</template>
prop="actionName" </el-table-column>
label="项目步骤" <el-table-column prop="actionName" label="项目步骤" min-width="120" />
min-width="120" <el-table-column prop="approvalMessage" label="审核意见" min-width="120" />
/> <el-table-column prop="createdAt" label="时间" min-width="160" />
<el-table-column </el-table>
prop="approvalMessage" </div>
label="审核意见" <div class="process-section" v-if="jcProcessData.length">
min-width="120" <div class="process-section-title">决策审批</div>
/> <el-table
<el-table-column prop="createdAt" label="时间" min-width="160" /> :data="jcProcessData"
</el-table> border
style="width: 100%"
class="process-table"
:header-cell-style="{
background: '#f5f7fa',
color: '#333',
textAlign: 'center',
fontWeight: 600,
}"
:cell-style="{ textAlign: 'center' }"
>
<el-table-column type="index" label="序号" width="60" />
<el-table-column prop="actionName" label="操作" min-width="120" />
<el-table-column label="操作人" min-width="100">
<template #default="{ row }">{{ row.creator?.name }}</template>
</el-table-column>
<el-table-column prop="actionName" label="项目步骤" min-width="120" />
<el-table-column prop="approvalMessage" label="审核意见" min-width="120" />
<el-table-column prop="createdAt" label="时间" min-width="160" />
</el-table>
</div>
</div> </div>
<div class="process-right"> <div class="process-right">
<ProcessFlowChart <ProcessFlowChart
...@@ -135,7 +155,11 @@ const props = defineProps({ ...@@ -135,7 +155,11 @@ const props = defineProps({
type: Object, type: Object,
default: () => ({}), default: () => ({}),
}, },
processData: { lxProcessData: {
type: Array,
default: () => [],
},
jcProcessData: {
type: Array, type: Array,
default: () => [], default: () => [],
}, },
...@@ -154,7 +178,7 @@ const emit = defineEmits(["save", "back", "export", "process"]); ...@@ -154,7 +178,7 @@ const emit = defineEmits(["save", "back", "export", "process"]);
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const effectiveFlowType = computed(() => { const effectiveFlowType = computed(() => {
const firstRecord = props.processData[0]; const firstRecord = props.lxProcessData[0];
console.log('[FlowType] 发起人记录:', firstRecord ? JSON.stringify({ console.log('[FlowType] 发起人记录:', firstRecord ? JSON.stringify({
actionName: firstRecord.actionName, actionName: firstRecord.actionName,
creator: firstRecord.creator?.name, creator: firstRecord.creator?.name,
...@@ -250,4 +274,17 @@ const handleProcess = () => { ...@@ -250,4 +274,17 @@ const handleProcess = () => {
font-weight: 700; font-weight: 700;
} }
} }
.process-section {
margin-bottom: 20px;
}
.process-section-title {
font-size: 15px;
font-weight: 600;
color: #333;
margin-bottom: 10px;
padding-left: 8px;
border-left: 3px solid #409eff;
}
</style> </style>
...@@ -2,16 +2,12 @@ ...@@ -2,16 +2,12 @@
<div class="add-project-container"> <div class="add-project-container">
<div class="add-project-content" v-loading="loading"> <div class="add-project-content" v-loading="loading">
<routerBack <routerBack
:show-save=" :show-save="!loading && showSave"
!loading &&
!isPreview &&
(!formData.projectLzType ||
['1', '5', '7'].includes(formData.projectLzType.toString()))
"
:loading="loading" :loading="loading"
:show-process="!!projectId" :show-process="!!projectId"
:process-info="processInfo" :process-info="processInfo"
:process-data="processTableData" :lx-process-data="lxProcessData"
:jc-process-data="jcProcessData"
:flow-type="flowType" :flow-type="flowType"
:current-state="currentFlowState" :current-state="currentFlowState"
@save="() => saveClick('save')" @save="() => saveClick('save')"
...@@ -35,9 +31,7 @@ ...@@ -35,9 +31,7 @@
<el-tab-pane <el-tab-pane
label="决策信息填报" label="决策信息填报"
name="决策信息填报" name="决策信息填报"
v-if=" v-if="Number(lxType) >= 5"
formData.projectLzType == '5' || formData.projectLzType == '7'
"
:lazy="true" :lazy="true"
> >
<el-tabs v-model="jcTabActiveName"> <el-tabs v-model="jcTabActiveName">
...@@ -63,52 +57,41 @@ ...@@ -63,52 +57,41 @@
<template v-if="!loading && !isPreview"> <template v-if="!loading && !isPreview">
<el-button <el-button
type="primary" type="primary"
v-if=" v-if="showSubmitLixiang"
formData.projectLzType == '1' &&
formData.projectCreator == userInfo?.id
"
@click="saveClick('submit')" @click="saveClick('submit')"
>发起立项填报</el-button >发起立项填报</el-button
> >
<el-button <el-button
type="primary" type="primary"
v-if="jcFormData.projectLzType == '7'" v-if="showSubmitJuece"
@click="saveClick('submit')" @click="saveClick('submit')"
>发起决策信息填报</el-button >发起决策信息填报</el-button
> >
</template> </template>
<el-button type="primary" @click="saveClick('save')" <el-button type="primary" v-if="showSave" @click="saveClick('save')"
>保存</el-button >保存</el-button
> >
<el-button <el-button
v-if="formData.projectLzType == '3'"
type="primary" type="primary"
v-if="showFirstAudit"
@click="auditDialogVisible = true" @click="auditDialogVisible = true"
>初审</el-button >初审</el-button
> >
<el-button <el-button
v-if="
formData?.daibanUsers?.includes(userInfo?.id) &&
hasApproveRole &&
formData.projectLzType == '4'
"
type="primary" type="primary"
v-if="showAuditLixiang"
@click="auditDialogVisible = true" @click="auditDialogVisible = true"
>审核</el-button >审核</el-button
> >
<el-button <el-button
v-if="isPreview && jcFormData.projectLzType == '8'"
type="primary" type="primary"
v-if="showAuditJuece"
@click="auditDialogVisible = true" @click="auditDialogVisible = true"
>审核</el-button >审核</el-button
> >
<el-button <el-button
v-if="
formData?.daibanUsers?.includes(userInfo?.id) &&
hasApproveRole &&
formData?.projectLzType == '2'
"
type="primary" type="primary"
v-if="showApprove"
@click="approveDialogVisible = true" @click="approveDialogVisible = true"
>核准</el-button >核准</el-button
> >
...@@ -302,6 +285,49 @@ let loading = ref(false); ...@@ -302,6 +285,49 @@ let loading = ref(false);
let isPreview = !!(route.query.isPreview || route.query.isProjectView); let isPreview = !!(route.query.isPreview || route.query.isProjectView);
let projectId = route.query.projectId; let projectId = route.query.projectId;
const lxType = computed(() => formData.projectLzType?.toString());
const jcType = computed(() => jcFormData.projectLzType?.toString());
const isDaibanUser = computed(() =>
formData?.daibanUsers?.includes(userInfo?.id),
);
// 表单禁用状态:基于流程节点 + 待办人判断
const lxFormDisabled = computed(() => {
if (isPreview) return true;
if (!lxType.value) return false;
if (lxType.value === "1") return formData.projectCreator !== userInfo?.id;
if (["2", "3", "4", "5"].includes(lxType.value)) return !isDaibanUser.value;
return true;
});
const jcFormDisabled = computed(() => {
if (isPreview) return true;
if (["5", "7", "8"].includes(jcType.value)) return !isDaibanUser.value;
return true;
});
const showSave = computed(
() => !isPreview && (!formData.id || formData.projectCreator === userInfo?.id),
);
const showSubmitLixiang = computed(
() => lxType.value === "1" && formData.projectCreator === userInfo?.id,
);
const showSubmitJuece = computed(
() =>
jcType.value === "7" && formData.projectCreator === userInfo?.id,
);
const showFirstAudit = computed(
() => isDaibanUser.value && lxType.value === "3",
);
const showAuditLixiang = computed(
() => isDaibanUser.value && hasApproveRole && lxType.value === "4",
);
const showAuditJuece = computed(
() => isDaibanUser.value && jcType.value === "8",
);
const showApprove = computed(
() => isDaibanUser.value && hasApproveRole && lxType.value === "2",
);
// 下载文件 // 下载文件
const downloadFile = (data) => { const downloadFile = (data) => {
let a = document.createElement("a"); let a = document.createElement("a");
...@@ -367,6 +393,7 @@ const getObjSums = (obj, objkey) => { ...@@ -367,6 +393,7 @@ const getObjSums = (obj, objkey) => {
provide("lxShared", { provide("lxShared", {
formData, formData,
isPreview, isPreview,
formDisabled: lxFormDisabled,
activeCollapse, activeCollapse,
...lixiang, ...lixiang,
downloadFile, downloadFile,
...@@ -381,6 +408,7 @@ provide("jcShared", { ...@@ -381,6 +408,7 @@ provide("jcShared", {
jcFormData, jcFormData,
formData, formData,
isPreview, isPreview,
formDisabled: jcFormDisabled,
activeCollapse, activeCollapse,
...juece, ...juece,
...finance, ...finance,
...@@ -448,7 +476,7 @@ const getProjectInfo = () => { ...@@ -448,7 +476,7 @@ const getProjectInfo = () => {
} }
// 决策 // 决策
let jcData = res.juece || res.lixiang || {}; let jcData = res.juece || {};
Object.assign(jcFormData, jcData); Object.assign(jcFormData, jcData);
if (res.juece) { if (res.juece) {
Object.assign(juece.jcSwlzbData, jcData.projectJsgms); Object.assign(juece.jcSwlzbData, jcData.projectJsgms);
...@@ -518,7 +546,7 @@ const backClick = () => { ...@@ -518,7 +546,7 @@ const backClick = () => {
// 保存数据 // 保存数据
const saveClick = (type) => { const saveClick = (type) => {
if (!formData.projectLzType || formData.projectLzType.toString() === "1") { if (!formData.projectLzType || Number(formData.projectLzType) <= 4) {
let url = formData.id let url = formData.id
? type === "submit" ? type === "submit"
? "startLixiang" ? "startLixiang"
...@@ -606,6 +634,12 @@ const processInfo = computed(() => ({ ...@@ -606,6 +634,12 @@ const processInfo = computed(() => ({
projectName: formData.projectName, projectName: formData.projectName,
})); }));
const processTableData = ref([]); const processTableData = ref([]);
const lxProcessData = computed(() =>
processTableData.value.filter((r) => !r.actionName?.includes("决策"))
);
const jcProcessData = computed(() =>
processTableData.value.filter((r) => r.actionName?.includes("决策"))
);
const getProcessData = () => { const getProcessData = () => {
proxy.$post({ proxy.$post({
url: "/api/project/getProFlowRecord", url: "/api/project/getProFlowRecord",
......
...@@ -4,11 +4,7 @@ ...@@ -4,11 +4,7 @@
<el-form <el-form
:model="formData" :model="formData"
:label-width="150" :label-width="150"
:disabled=" :disabled="isPreview || Number(formData.projectLzType) >= 5"
isPreview ||
(Number(formData.projectLzType) <= 5 &&
Number(formData.projectLzType) != 1)
"
> >
<el-collapse v-model="activeCollapse"> <el-collapse v-model="activeCollapse">
<el-collapse-item <el-collapse-item
...@@ -262,6 +258,7 @@ import FileUploader from "@/components/FileUploader/index.vue"; ...@@ -262,6 +258,7 @@ import FileUploader from "@/components/FileUploader/index.vue";
const { const {
formData, formData,
isPreview, isPreview,
formDisabled,
activeCollapse, activeCollapse,
tzzeqkjData, tzzeqkjData,
cwpjzbData, cwpjzbData,
......
...@@ -4,11 +4,7 @@ ...@@ -4,11 +4,7 @@
<el-form <el-form
:model="formData" :model="formData"
label-width="200px" label-width="200px"
:disabled=" :disabled="isPreview || Number(formData.projectLzType) >= 5"
isPreview ||
(Number(formData.projectLzType) <= 5 &&
Number(formData.projectLzType) != 1)
"
> >
<el-collapse v-model="activeCollapse"> <el-collapse v-model="activeCollapse">
<el-collapse-item title="项目基本信息" name="项目基本信息"> <el-collapse-item title="项目基本信息" name="项目基本信息">
...@@ -637,6 +633,7 @@ import FileUploader from "@/components/FileUploader/index.vue"; ...@@ -637,6 +633,7 @@ import FileUploader from "@/components/FileUploader/index.vue";
const { const {
formData, formData,
isPreview, isPreview,
formDisabled,
activeCollapse, activeCollapse,
swlzbData, swlzbData,
gdxxData, gdxxData,
......
...@@ -24,6 +24,13 @@ ...@@ -24,6 +24,13 @@
@current-page-change="handleCurrentPageChange" @current-page-change="handleCurrentPageChange"
> >
<template #operations="{ row, index }"> <template #operations="{ row, index }">
<el-button
link
type="primary"
size="small"
@click="fillDecision(row)"
>编辑</el-button
>
<!-- 已立项 --> <!-- 已立项 -->
<el-button <el-button
link link
...@@ -33,6 +40,7 @@ ...@@ -33,6 +40,7 @@
@click="fillDecision(row)" @click="fillDecision(row)"
>决策填报</el-button >决策填报</el-button
> >
<!-- 立项审批中 --> <!-- 立项审批中 -->
<el-button <el-button
link link
...@@ -43,13 +51,6 @@ ...@@ -43,13 +51,6 @@
@click="viewDecision(row)" @click="viewDecision(row)"
>{{ canAudit ? "审批" : "查看" }}</el-button >{{ canAudit ? "审批" : "查看" }}</el-button
> >
<el-button
link
type="primary"
size="small"
@click="editProject(row)"
>编辑</el-button
>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -64,14 +65,7 @@ import { ElMessage, ElMessageBox } from "element-plus"; ...@@ -64,14 +65,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
import { useUserStore } from "@/stores/user.js"; import { useUserStore } from "@/stores/user.js";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue"; import SearchForm from "@/components/common/SearchForm.vue";
const editProject = (item) => {
router.push({
name: "addProject",
query: {
projectId: item.id,
},
});
};
const handleSearch = (formData) => { const handleSearch = (formData) => {
currentPage.value = 1; currentPage.value = 1;
getProjectData(formData); getProjectData(formData);
...@@ -123,7 +117,7 @@ let tableColumns = ref([ ...@@ -123,7 +117,7 @@ let tableColumns = ref([
{ {
prop: "operations", prop: "operations",
label: "操作", label: "操作",
width: 120, width: 160,
slot: "operations", slot: "operations",
fixed: "right", fixed: "right",
align: "center", align: "center",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment