Commit a5b80ac0 authored by tianhongyang's avatar tianhongyang

merge

parent 61c79e19
...@@ -173,13 +173,12 @@ export function projectVolume(data) { ...@@ -173,13 +173,12 @@ export function projectVolume(data) {
} }
//措施费-获取实际成本月份列表 //措施费-获取实际成本月份列表
export function actualMonths(params) { export const getActualMonthsApi = (params = {}) => request({
return request({ url: '/cb/cost/measures/actual/months',
url: '/cb/cost/measures/actual/months', method: 'get',
method: 'GET', params
params });
});
}
// 工料汇总 // 工料汇总
......
...@@ -69,17 +69,15 @@ export default { ...@@ -69,17 +69,15 @@ export default {
watch: { watch: {
projectDetailInfo: { projectDetailInfo: {
handler(newValue) { handler(newValue) {
this.comProjectDetailInfo = newValue ? newValue : {}; this.comProjectDetailInfo = newValue ? cloneDeep(newValue) : {};
this.init(this.comProjectDetailInfo); this.init(this.comProjectDetailInfo);
}, },
deep: true, deep: true,
immediate: true
}, },
projectId: { projectId: {
handler(newValue) { handler(newValue) {
this.comProjectId = newValue; this.comProjectId = newValue;
}, }
immediate: true
} }
}, },
components: { components: {
...@@ -94,8 +92,8 @@ export default { ...@@ -94,8 +92,8 @@ export default {
nodeName: "name", nodeName: "name",
nodeValue: "name", nodeValue: "name",
}, },
comProjectDetailInfo: {}, comProjectDetailInfo: this.projectDetailInfo ? cloneDeep(this.projectDetailInfo) : {},
comProjectId: "", comProjectId: this.projectId,
menuTreeList: [], menuTreeList: [],
// 加载数据列表 // 加载数据列表
tableLoading: false, tableLoading: false,
...@@ -122,7 +120,7 @@ export default { ...@@ -122,7 +120,7 @@ export default {
}, },
//可访问data属性 //可访问data属性
created() { created() {
this.init(this.comProjectDetailInfo);
}, },
//计算集 //计算集
computed: { computed: {
......
...@@ -15,16 +15,16 @@ ...@@ -15,16 +15,16 @@
<direct-cost v-if="current == 'directCost'"></direct-cost> <direct-cost v-if="current == 'directCost'"></direct-cost>
<!-- 工料汇总 --> <!-- 工料汇总 -->
<feed-summary v-if="current == 'feedSummary'" :project-id="projectID" :project-detail-info="detailInfo"></feed-summary> <feed-summary v-if="current == 'feedSummary'" :project-id="projectId" :project-detail-info="detailInfo"></feed-summary>
<!--措施项目--> <!--措施项目-->
<measure-items v-if="current == 'measureItem'" :project-id="projectID" :project-detail-info="detailInfo"></measure-items> <measure-items v-if="current == 'measureItem'" :project-id="projectId" :project-detail-info="detailInfo"></measure-items>
<!-- 其他项目 --> <!-- 其他项目 -->
<other-projects v-if="current == 'otherItems'"></other-projects> <other-projects v-if="current == 'otherItems'"></other-projects>
<!-- 盈亏分析对比 --> <!-- 盈亏分析对比 -->
<profit-Loss v-if="current == 'profitAndLoss'" :project-id="projectID" :project-detail-info="detailInfo"></profit-Loss> <profit-Loss v-if="current == 'profitAndLoss'" :project-id="projectId" :project-detail-info="detailInfo"></profit-Loss>
</div> </div>
</div> </div>
...@@ -62,13 +62,13 @@ export default { ...@@ -62,13 +62,13 @@ export default {
}, },
data() { data() {
return { return {
projectID: "", projectId: "",
current: "", current: "",
// 详情信息变量 // 详情信息变量
detailInfo: { detailInfo: {
projectId: "1754425038355890177", projectId: "1754425038355890177",
cbStage: 0, cbStage: 0,
cbType:1 cbType: 1
}, },
toggleTabs: [ toggleTabs: [
{ {
...@@ -162,20 +162,21 @@ export default { ...@@ -162,20 +162,21 @@ export default {
async getProjectQuery() { async getProjectQuery() {
try { try {
const { query } = this.$route; const { query } = this.$route;
// if (!query.projectID) return this.$message.error("缺少项目id"); // if (!query.projectId) return this.$message.error("缺少项目id");
this.projectID = query.projectID; this.projectId = query.projectId;
// 获取详情 保证详情获取完毕 再执行tab命中 进行生命周期
await this.getProjectDetail(query.projectId);
if (query.current) { if (query.current) {
this.current = query.current; this.current = query.current;
} else { } else {
// 默认命中工程项目信息 // 默认命中工程项目信息
this.current = "basicEngineeringInformation"; this.current = "basicEngineeringInformation";
}; };
await this.getProjectDetail(query.projectID);
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
}, },
async getProjectDetail(projectID) { async getProjectDetail(projectId) {
try { try {
} catch (error) { } catch (error) {
......
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