Browse Source

修复bug

ZaiZai 1 year ago
parent
commit
89490c4237
2 changed files with 109 additions and 107 deletions
  1. 1 1
      src/config/index.json
  2. 108 106
      src/views/project/modules/project-list.vue

+ 1 - 1
src/config/index.json

@@ -1,6 +1,6 @@
 {
     "version": "20230607160059",
-    "target": "http://192.168.0.102:8014",
+    "target": "http://192.168.0.125",
     "vite": {
         "port": 5187,
         "host": "0.0.0.0"

+ 108 - 106
src/views/project/modules/project-list.vue

@@ -23,44 +23,34 @@
                 </template>
                 <HcInfoTable>
                     <tr>
-                        <hc-info-table-td is-title width="30px" center>项目阶段</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.projectStageName }}</hc-info-table-td>
-                        <hc-info-table-td is-title width="30px" center>项目类型</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.projectTypeName }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>项目阶段</hc-info-table-td>
+                        <hc-info-table-td center width="40%">{{ rowDetail?.projectStageName }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>项目类型</hc-info-table-td>
+                        <hc-info-table-td center width="40%">{{ rowDetail?.projectTypeName }}</hc-info-table-td>
                     </tr>
                     <tr>
-                        <hc-info-table-td is-title width="30px" center>项目名称</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.name }}</hc-info-table-td>
-                        <hc-info-table-td is-title width="30px" center>建设规模</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.buildScaleName }}</hc-info-table-td>
-                    </tr>
-                    <tr>
-                        <hc-info-table-td is-title width="30px" center>开 工 年</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.startYear }}</hc-info-table-td>
-                        <hc-info-table-td is-title width="30px" center>完 工 年</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.endYear }}</hc-info-table-td>
-                    </tr>
-                    <tr>
-                        <hc-info-table-td is-title width="30px" center>总投资</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.allInvestMoney }}</hc-info-table-td>
-                        <hc-info-table-td is-title width="30px" center>“十四五”计划投资</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.fourteenFiveInvest }}</hc-info-table-td>
-                    </tr>
-                    <tr>
-                        <hc-info-table-td is-title width="30px" center>市级重点项目</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail.isFocusProject === 1 ? '是' : '否' }}</hc-info-table-td>
-                        <hc-info-table-td is-title width="30px" center>交通强国建设试点任务</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.isPilotPlan === 1 ? '是' : '否' }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>项目名称</hc-info-table-td>
+                        <hc-info-table-td center width="40%">{{ rowDetail?.name }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>建设规模</hc-info-table-td>
+                        <hc-info-table-td center width="40%">{{ rowDetail?.buildScaleName }}</hc-info-table-td>
                     </tr>
+                </HcInfoTable>
+                <HcInfoTable class="mt-[-1px]">
                     <tr>
-                        <hc-info-table-td is-title width="30px" center>牵头单位</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.leaderUnit }}</hc-info-table-td>
-                        <hc-info-table-td is-title width="30px" center rowspan="2">配合单位</hc-info-table-td>
-                        <hc-info-table-td center rowspan="2">{{ rowDetail?.assistUnit }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>计划开工年</hc-info-table-td>
+                        <hc-info-table-td center width="15%">{{ rowDetail?.startYear }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>计划完工年</hc-info-table-td>
+                        <hc-info-table-td center width="15%">{{ rowDetail?.endYear }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>总投资</hc-info-table-td>
+                        <hc-info-table-td center width="40%">{{ rowDetail?.allInvestMoney }}</hc-info-table-td>
                     </tr>
+                </HcInfoTable>
+                <HcInfoTable class="mt-[-1px]">
                     <tr>
-                        <hc-info-table-td is-title width="30px" center>责任单位</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.dutyUnit }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>交通强国建设试点任务</hc-info-table-td>
+                        <hc-info-table-td center width="40%">{{ rowDetail?.isPilotPlan === 1 ? '是' : '否' }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="10%" center>责任单位</hc-info-table-td>
+                        <hc-info-table-td center width="40%">{{ rowDetail?.dutyUnit }}</hc-info-table-td>
                     </tr>
                 </HcInfoTable>
                 <div class="hc-project-list-drawer-year">
@@ -82,37 +72,34 @@
                                             </div>
                                         </template>
                                     </el-table-column>
-                                    <el-table-column prop="planInvestMoney" label="计划完成投资额(亿元)" width="100" align="center" />
-                                    <el-table-column prop="investMoney" label="投资完成额(亿元)" width="100" align="center" />
-                                    <el-table-column prop="investUnfinishedMoney" label="投资未完成额(亿元)" width="100" align="center" />
-                                    <el-table-column prop="yearlyTarget" label="全年目标" width="100" align="center" />
-                                    <el-table-column prop="workPlan" label="工作计划" width="100" align="center" />
-                                    <el-table-column prop="workProgressAll" label="累计进展计划" align="center" />
-
-                                    <el-table-column prop="workProgress" label="工作计划进展计划" align="center" />
-                                    <el-table-column prop="planRatio" label="形象进度百分比(%)" width="100" align="center" />
+                                    <el-table-column label="投资情况(亿元)" align="center">
+                                        <el-table-column prop="planInvestMoney" label="计划完成投资额" width="100" align="center" />
+                                        <el-table-column prop="investMoney" label="当月完成投资额" width="100" align="center" />
+                                        <el-table-column prop="investUnfinishedMoney" label="与计划投资的差距" width="100" align="center" />
+                                    </el-table-column>
+                                    <el-table-column label="建设情况" align="center">
+                                        <el-table-column prop="yearlyTarget" label="年度主要目标任务" width="100" align="center" />
+                                        <el-table-column prop="workPlan" label="工作计划" width="100" align="center" />
+                                        <el-table-column prop="workProgress" label="当月进展计划" align="center" />
+                                        <el-table-column prop="workProgressAll" label="累计进展计划" align="center" />
+                                        <el-table-column prop="planRatio" label="工作总体形象进度(%)" width="100" align="center" />
+                                    </el-table-column>
                                 </el-table>
                                 <HcInfoTable v-if="yearData.list && yearData.list.length > 0" class="mt-[-1px]">
                                     <tr>
-                                        <hc-info-table-td is-title width="130px" center>该年累计完成投资(亿元)</hc-info-table-td>
-                                        <hc-info-table-td center>{{ yearData.list[yearIndex].yearFinishInvest || "-" }}</hc-info-table-td>
-                                        <hc-info-table-td is-title width="130px" center>该年力争完成投资(亿元)</hc-info-table-td>
-                                        <hc-info-table-td center>{{ yearData.list[yearIndex]?.yearlyInvest || "-" }}</hc-info-table-td>
-                                        <hc-info-table-td is-title width="130px" center>该年累计未完成投资(亿元)</hc-info-table-td>
-                                        <hc-info-table-td center>{{ yearData.list[yearIndex]?.yearUnfinishedInvest || "-" }}</hc-info-table-td>
-                                    </tr>
-                                </HcInfoTable>
-                                <HcInfoTable v-if="yearData.list && yearData.list.length > 0" class="mt-[-1px]">
-                                    <tr>
-                                        <hc-info-table-td is-title width="30px" center>存在问题</hc-info-table-td>
+                                        <hc-info-table-td is-title width="128px" center>全年计划完成投资</hc-info-table-td>
+                                        <hc-info-table-td center width="100px">{{ yearData.list[yearIndex].yearFinishInvest || "-" }}</hc-info-table-td>
+                                        <hc-info-table-td is-title width="100px" center>存在问题</hc-info-table-td>
                                         <hc-info-table-td center>{{ yearData.list[yearIndex]?.questionable || '-' }}</hc-info-table-td>
-                                        <hc-info-table-td is-title width="30px" center>工作建议</hc-info-table-td>
+                                        <hc-info-table-td is-title width="100px" center>工作建议</hc-info-table-td>
                                         <hc-info-table-td center>{{ yearData.list[yearIndex]?.workAdvise || '-' }}</hc-info-table-td>
                                     </tr>
                                     <tr>
-                                        <hc-info-table-td is-title width="30px" center>填报单位</hc-info-table-td>
+                                        <hc-info-table-td is-title width="128px" center>开工累计完成投资</hc-info-table-td>
+                                        <hc-info-table-td center width="100px">{{ yearData.list[yearIndex].yearFinishInvest || "-" }}</hc-info-table-td>
+                                        <hc-info-table-td is-title width="100px" center>填报单位</hc-info-table-td>
                                         <hc-info-table-td center>{{ yearData.list[yearIndex]?.writeUnit || '-' }}</hc-info-table-td>
-                                        <hc-info-table-td is-title width="30px" center>联系人</hc-info-table-td>
+                                        <hc-info-table-td is-title width="100px" center>联系人</hc-info-table-td>
                                         <hc-info-table-td center>{{ yearData.list[yearIndex]?.linkman || '-' }}</hc-info-table-td>
                                     </tr>
                                 </HcInfoTable>
@@ -133,8 +120,8 @@
                     <tr>
                         <hc-info-table-td is-title width="30px" center>项目名称</hc-info-table-td>
                         <hc-info-table-td center>{{ rowDetail?.name }}</hc-info-table-td>
-                        <hc-info-table-td is-title width="30px" center>项目类型</hc-info-table-td>
-                        <hc-info-table-td center>{{ rowDetail?.projectTypeName }}</hc-info-table-td>
+                        <hc-info-table-td is-title width="30px" center>建设规模</hc-info-table-td>
+                        <hc-info-table-td center>{{ rowDetail?.buildScaleName }}</hc-info-table-td>
                     </tr>
                 </HcInfoTable>
                 <div class="hc-project-list-drawer-year detail">
@@ -156,56 +143,60 @@
                                             </div>
                                         </template>
                                     </el-table-column>
-                                    <el-table-column prop="planInvestMoney" label="计划完成投资额(亿元)" width="100" align="center">
-                                        <template #default="{ row }">
-                                            <hc-body>
-                                                <hc-table-input v-model="row.planInvestMoney" disabled />
-                                            </hc-body>
-                                        </template>
-                                    </el-table-column>
-                                    <el-table-column prop="investMoney" label="投资完成额(亿元)" width="100" align="center">
-                                        <template #default="{ row, $index }">
-                                            <hc-body>
-                                                <!-- <hc-table-input v-model="row.investMoney" /> -->
-                                                <el-input v-model="row.investMoney" clearable :formatter="formatInput" :disabled="(yearData.list[yearIndex].isCanFill === 1 ? false : true) || !row.planInvestMoney" @change="changeInvestMoney($event, row, $index)" />
-                                            </hc-body>
-                                        </template>
-                                    </el-table-column>
-                                    <el-table-column prop="investMoneyAll" label="累计投资完成额(亿元)" width="100" align="center">
-                                        <template #default="{ row }">
-                                            <hc-body>
-                                                <hc-table-input v-model="row.investMoneyAll" disabled />
-                                            </hc-body>
-                                        </template>
-                                    </el-table-column>
-                                    <el-table-column prop="workPlan" label="工作计划" width="100" align="center">
-                                        <template #default="{ row }">
-                                            <hc-body>
-                                                <hc-table-input v-model="row.workPlan" type="textarea" disabled resize="none" />
-                                            </hc-body>
-                                        </template>
-                                    </el-table-column>
-                                    <el-table-column prop="workProgress" label="工作计划进展情况" align="center">
-                                        <template #default="{ row }">
-                                            <hc-body>
-                                                <hc-table-input v-model="row.workProgress" type="textarea" resize="none" :disabled="(yearData.list[yearIndex].isCanFill === 1 ? false : true) || !row.workPlan" />
-                                            </hc-body>
-                                        </template>
+                                    <el-table-column label="投资情况(亿元)" align="center">
+                                        <el-table-column prop="planInvestMoney" label="计划完成投资额" width="100" align="center">
+                                            <template #default="{ row }">
+                                                <hc-body>
+                                                    <hc-table-input v-model="row.planInvestMoney" disabled />
+                                                </hc-body>
+                                            </template>
+                                        </el-table-column>
+                                        <el-table-column prop="investMoney" label="当月完成投资额" width="100" align="center">
+                                            <template #default="{ row, $index }">
+                                                <hc-body>
+                                                    <!-- <hc-table-input v-model="row.investMoney" /> -->
+                                                    <el-input v-model="row.investMoney" clearable :formatter="formatInput" :disabled="(yearData.list[yearIndex].isCanFill === 1 ? false : true) || !row.planInvestMoney" @change="changeInvestMoney($event, row, $index)" />
+                                                </hc-body>
+                                            </template>
+                                        </el-table-column>
+                                        <el-table-column prop="investMoneyAll" label="与计划投资的差距" width="100" align="center">
+                                            <template #default="{ row }">
+                                                <hc-body>
+                                                    <hc-table-input v-model="row.investMoneyAll" disabled />
+                                                </hc-body>
+                                            </template>
+                                        </el-table-column>
                                     </el-table-column>
-                                    <el-table-column prop="workProgressAll" label="累计进展情况" align="center">
-                                        <template #default="{ row }">
-                                            <hc-body>
-                                                <hc-table-input v-model="row.workProgressAll" type="textarea" resize="none" :disabled="(yearData.list[yearIndex].isCanFill === 1 ? false : true) || !row.workPlan" />
-                                            </hc-body>
-                                        </template>
-                                    </el-table-column>
-                                    <el-table-column prop="planRatio" label="形象进度百分比(%)" width="100" align="center">
-                                        <template #default="{ row, $index }">
-                                            <hc-body>
-                                                <!-- <hc-table-input v-model="row.planRatio" :disabled="yearData.list[yearIndex].isCanFill === 1 ? false : true" /> -->
-                                                <el-input v-model="row.planRatio" :disabled="(yearData.list[yearIndex].isCanFill === 1 ? false : true) || !row.workPlan" :formatter="formatInput" @change="changePlanRatio($enent, row, $index)" />
-                                            </hc-body>
-                                        </template>
+                                    <el-table-column label="建设情况" align="center">
+                                        <el-table-column prop="workPlan" label="工作计划" width="100" align="center">
+                                            <template #default="{ row }">
+                                                <hc-body>
+                                                    <hc-table-input v-model="row.workPlan" type="textarea" disabled resize="none" />
+                                                </hc-body>
+                                            </template>
+                                        </el-table-column>
+                                        <el-table-column prop="workProgress" label="当月进展情况" align="center">
+                                            <template #default="{ row }">
+                                                <hc-body>
+                                                    <hc-table-input v-model="row.workProgress" type="textarea" resize="none" :disabled="(yearData.list[yearIndex].isCanFill === 1 ? false : true) || !row.workPlan" />
+                                                </hc-body>
+                                            </template>
+                                        </el-table-column>
+                                        <el-table-column prop="workProgressAll" label="累计进展情况" align="center">
+                                            <template #default="{ row }">
+                                                <hc-body>
+                                                    <hc-table-input v-model="row.workProgressAll" type="textarea" resize="none" :disabled="(yearData.list[yearIndex].isCanFill === 1 ? false : true) || !row.workPlan" />
+                                                </hc-body>
+                                            </template>
+                                        </el-table-column>
+                                        <el-table-column prop="planRatio" label="工作总体形象进度(%)" width="100" align="center">
+                                            <template #default="{ row, $index }">
+                                                <hc-body>
+                                                    <!-- <hc-table-input v-model="row.planRatio" :disabled="yearData.list[yearIndex].isCanFill === 1 ? false : true" /> -->
+                                                    <el-input v-model="row.planRatio" :disabled="(yearData.list[yearIndex].isCanFill === 1 ? false : true) || !row.workPlan" :formatter="formatInput" @change="changePlanRatio($enent, row, $index)" />
+                                                </hc-body>
+                                            </template>
+                                        </el-table-column>
                                     </el-table-column>
                                 </el-table>
                                 <HcInfoTable v-if="yearData.list && yearData.list.length > 0" class="mt-[-1px]">
@@ -467,6 +458,17 @@ const setSpanMethod = (column, row, isAllYear = true) => {
         } else {
             return { rowspan: 1, colspan: 1 }
         }
+    } else if (column === 4) { //第五列
+        const rows = [0, 3, 6, 9], irows = [1, 2, 4, 5, 7, 8, 10, 11]
+        if (rows.indexOf(row) !== -1) {
+            //主要隐藏
+            return { rowspan: 3, colspan: 1 }
+        } else if (irows.indexOf(row) !== -1) {
+            //非主要的隐藏
+            return { rowspan: 0, colspan: 0 }
+        } else {
+            return { rowspan: 1, colspan: 1 }
+        }
     } else if (column === 5) { //第六列
         if (isAllYear) {
             if (row === 0) {