|
|
|
@ -47,10 +47,10 @@
|
|
|
|
|
<span v-else>{{ scope.row.cumulativeArea }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="progressDetails" label='项目进展详情' align="center">
|
|
|
|
|
<el-table-column prop="xmjzxq" label='项目进展详情' align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-if="scope.row.isEditing" v-model="scope.row.progressDetails" style="width: 100%;"></el-input>
|
|
|
|
|
<span v-else>{{ scope.row.progressDetails }}</span>
|
|
|
|
|
<el-input v-if="scope.row.isEditing" v-model="scope.row.xmjzxq" style="width: 100%;"></el-input>
|
|
|
|
|
<span v-else>{{ scope.row.xmjzxq }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center">
|
|
|
|
@ -76,7 +76,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
// 查看详情信息
|
|
|
|
|
// import { getMonthInformationPage } from "@/api/ManageApi/index";
|
|
|
|
|
import { getMonthInformationPage } from "@/api/ManageApi/index";
|
|
|
|
|
//在Apitwo里
|
|
|
|
|
import { updateProjectProgress, deletemonth } from "@/api/manageApitwo/index";
|
|
|
|
|
import { checkPermi, checkRole } from "@/utils/permission";
|
|
|
|
@ -87,7 +87,7 @@ export default {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
zwId: {
|
|
|
|
|
xmId: {
|
|
|
|
|
type: Number,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
@ -108,7 +108,7 @@ export default {
|
|
|
|
|
this.download(
|
|
|
|
|
"/gysl/projectProgress/export",
|
|
|
|
|
{
|
|
|
|
|
zwId: this.zwId
|
|
|
|
|
xmId: this.xmId
|
|
|
|
|
},
|
|
|
|
|
`月度信息${new Date().getTime()}.xlsx`
|
|
|
|
|
);
|
|
|
|
@ -134,7 +134,7 @@ export default {
|
|
|
|
|
monthDoneAmount: row.monthDoneAmount,
|
|
|
|
|
totalDoneAmount: row.totalDoneAmount,
|
|
|
|
|
cumulativeArea: row.cumulativeArea,
|
|
|
|
|
progressDetails: row.progressDetails,
|
|
|
|
|
xmjzxq: row.xmjzxq,
|
|
|
|
|
};
|
|
|
|
|
const response = await updateProjectProgress(updateData);
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
@ -145,7 +145,7 @@ export default {
|
|
|
|
|
row.isEditing = false;
|
|
|
|
|
row.status = "已更新";
|
|
|
|
|
|
|
|
|
|
// this.getMonthInformationPage();
|
|
|
|
|
this.getMonthInformationPage();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.msg || "更新失败");
|
|
|
|
|
Object.assign(row, row.originalData);
|
|
|
|
@ -187,7 +187,7 @@ export default {
|
|
|
|
|
// 如果当前页没有数据且不是第一页,则返回上一页
|
|
|
|
|
if (this.tableData.length === 0 && this.current > 1) {
|
|
|
|
|
this.current -= 1;
|
|
|
|
|
// this.getMonthInformationPage();
|
|
|
|
|
this.getMonthInformationPage();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.msg || "删除失败");
|
|
|
|
@ -204,26 +204,26 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// async getMonthInformationPage() {
|
|
|
|
|
// try {
|
|
|
|
|
// const response = await getMonthInformationPage({ zwId: this.zwId });
|
|
|
|
|
async getMonthInformationPage() {
|
|
|
|
|
try {
|
|
|
|
|
const response = await getMonthInformationPage({ xmId: this.xmId });
|
|
|
|
|
|
|
|
|
|
// if (Array.isArray(response.data.records) && response.data.records.length > 0) {
|
|
|
|
|
// this.tableData = response.data.records;
|
|
|
|
|
// this.total = response.data.total || 0;
|
|
|
|
|
// } else {
|
|
|
|
|
// // 空数组保留为空数组
|
|
|
|
|
// this.tableData = [];
|
|
|
|
|
// this.total = 0;
|
|
|
|
|
// }
|
|
|
|
|
// } catch (error) {
|
|
|
|
|
// console.error("获取月度进展信息失败:", error);
|
|
|
|
|
// this.$message.error("获取月度进展信息失败");
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
if (Array.isArray(response.data.records) && response.data.records.length > 0) {
|
|
|
|
|
this.tableData = response.data.records;
|
|
|
|
|
this.total = response.data.total || 0;
|
|
|
|
|
} else {
|
|
|
|
|
// 空数组保留为空数组
|
|
|
|
|
this.tableData = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error("获取月度进展信息失败:", error);
|
|
|
|
|
this.$message.error("获取月度进展信息失败");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
// this.getMonthInformationPage();
|
|
|
|
|
this.getMonthInformationPage();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|