|
@@ -160,24 +160,108 @@
|
|
|
<el-table border :data="tableEligibleProductRate" style="width: 100%;">
|
|
|
<el-table-column label="Eligible Product rate">
|
|
|
<el-table-column width="150" prop="title" label="">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div @click="columnOnclick(scope.row)">{{scope.row.title}}</div>
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div @click="columnOnclick(row)">{{row.title}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="unit" label="unit"></el-table-column>
|
|
|
<el-table-column prop="currently" label="currently"></el-table-column>
|
|
|
- <el-table-column prop="jan" :label="this.monthList[0]"></el-table-column>
|
|
|
- <el-table-column prop="feb" :label="this.monthList[1]"></el-table-column>
|
|
|
- <el-table-column prop="mar" :label="this.monthList[2]"></el-table-column>
|
|
|
- <el-table-column prop="apr" :label="this.monthList[3]"></el-table-column>
|
|
|
- <el-table-column prop="may" :label="this.monthList[4]"></el-table-column>
|
|
|
- <el-table-column prop="jun" :label="this.monthList[5]"></el-table-column>
|
|
|
- <el-table-column prop="jul" :label="this.monthList[6]"></el-table-column>
|
|
|
- <el-table-column prop="aug" :label="this.monthList[7]"></el-table-column>
|
|
|
- <el-table-column prop="sep" :label="this.monthList[8]"></el-table-column>
|
|
|
- <el-table-column prop="oct" :label="this.monthList[9]"></el-table-column>
|
|
|
- <el-table-column prop="nov" :label="this.monthList[10]"></el-table-column>
|
|
|
- <el-table-column prop="dec" :label="this.monthList[11]"></el-table-column>
|
|
|
+ <el-table-column prop="jan" :label="this.monthList[0]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.jan}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.jan" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="feb" :label="this.monthList[1]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.feb}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.feb" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="mar" :label="this.monthList[2]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.mar}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.mar" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="apr" :label="this.monthList[3]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.apr}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.apr" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="may" :label="this.monthList[4]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.may}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.may" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jun" :label="this.monthList[5]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.jun}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.jun" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jul" :label="this.monthList[6]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.jul}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.jul" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="aug" :label="this.monthList[7]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.aug}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.aug" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="sep" :label="this.monthList[8]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.sep}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.sep" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="oct" :label="this.monthList[9]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.oct}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.oct" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="nov" :label="this.monthList[10]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.nov}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.nov" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="dec" :label="this.monthList[11]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!eligibleProductRateUpdating">{{row.dec}}</div>
|
|
|
+ <div v-if="eligibleProductRateUpdating">
|
|
|
+ <el-input v-model="row.dec" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="avg" label="avg"></el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -617,7 +701,8 @@ import {
|
|
|
getSUBUtilityConsumption,
|
|
|
getSCTFUtilityConsumption,
|
|
|
getKbi,
|
|
|
- getSummary
|
|
|
+ getSummary,
|
|
|
+ updateEligibleProductRate
|
|
|
} from "@/api/production/monthly";
|
|
|
|
|
|
export default {
|
|
@@ -671,11 +756,7 @@ export default {
|
|
|
tableCrackerOutputProduct: [],
|
|
|
tableAromaticsRawMaterial: [],
|
|
|
tableAromaticsOutputProduct: [],
|
|
|
- tableEligibleProductRate: [
|
|
|
- {title: "C2="},
|
|
|
- {title: "C3="},
|
|
|
- {title: "C4's"},
|
|
|
- ],
|
|
|
+ tableEligibleProductRate: [],
|
|
|
tableProductYield: [],
|
|
|
tableCrackerUtilityConsumption: [
|
|
|
{title: "FG(include NG+Offage)"},
|
|
@@ -911,19 +992,26 @@ export default {
|
|
|
/** 确定修改按钮操作 */
|
|
|
handleConfirmEligibleProductRateUpdate(row) {
|
|
|
this.eligibleProductRateUpdating = false;
|
|
|
- // updateReport(this.reportData).then(response => {
|
|
|
- // if (response.code == 200) {
|
|
|
- // this.$message.success("修改成功");
|
|
|
- // } else {
|
|
|
- // this.$message.error("未知错误,请联系管理员");
|
|
|
- // }
|
|
|
- // this.getReport();
|
|
|
- // });
|
|
|
+ updateEligibleProductRate({
|
|
|
+ tableData: this.tableEligibleProductRate,
|
|
|
+ year: this.year.getFullYear()
|
|
|
+ }).then(response => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ } else {
|
|
|
+ this.$message.error("未知错误,请联系管理员");
|
|
|
+ }
|
|
|
+ getEligibleProductRate(year).then(response => {
|
|
|
+ this.tableEligibleProductRate = response.data;
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
/** 取消修改按钮操作 */
|
|
|
handleCancelEligibleProductRateUpdate(row) {
|
|
|
this.eligibleProductRateUpdating = false;
|
|
|
- // this.getReport();
|
|
|
+ getEligibleProductRate(year).then(response => {
|
|
|
+ this.tableEligibleProductRate = response.data;
|
|
|
+ });
|
|
|
},
|
|
|
/** 销毁趋势图 */
|
|
|
disposeChart() {
|