|
@@ -1165,6 +1165,32 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!-- Runing Rate -->
|
|
|
+ <div class="editDiv">
|
|
|
+ <el-button
|
|
|
+ :disabled="runingRateUpdating"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ @click="handleRuningRateUpdate"
|
|
|
+ v-hasPermi="['production:monthly:edit']"
|
|
|
+ >{{ $t('编辑Runing Rate') }}</el-button>
|
|
|
+ <el-button
|
|
|
+ :disabled="!runingRateUpdating"
|
|
|
+ type="success"
|
|
|
+ icon="el-icon-check"
|
|
|
+ size="mini"
|
|
|
+ @click="handleConfirmRuningRateUpdate"
|
|
|
+ v-hasPermi="['production:monthly:edit']"
|
|
|
+ >{{ $t('保存') }}</el-button>
|
|
|
+ <el-button
|
|
|
+ :disabled="!runingRateUpdating"
|
|
|
+ type="info"
|
|
|
+ icon="el-icon-close"
|
|
|
+ size="mini"
|
|
|
+ @click="handleCancelRuningRateUpdate"
|
|
|
+ v-hasPermi="['production:monthly:edit']"
|
|
|
+ >{{ $t('取消') }}</el-button>
|
|
|
+ </div>
|
|
|
<el-table border :data="tableRuningRate" style="width: 100%;">
|
|
|
<el-table-column label="Runing Rate">
|
|
|
<el-table-column width="150" prop="title" label="">
|
|
@@ -1174,18 +1200,138 @@
|
|
|
</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="!runingRateUpdating">{{row.jan}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.jan" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.jan}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="feb" :label="this.monthList[1]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.feb}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.feb" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.feb}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="mar" :label="this.monthList[2]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.mar}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.mar" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.mar}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="apr" :label="this.monthList[3]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.apr}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.apr" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.apr}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="may" :label="this.monthList[4]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.may}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.may" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.may}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jun" :label="this.monthList[5]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.jun}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.jun" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.jun}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jul" :label="this.monthList[6]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.jul}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.jul" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.jul}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="aug" :label="this.monthList[7]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.aug}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.aug" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.aug}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="sep" :label="this.monthList[8]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.sep}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.sep" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.sep}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="oct" :label="this.monthList[9]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.oct}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.oct" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.oct}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="nov" :label="this.monthList[10]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.nov}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.nov" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.nov}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="dec" :label="this.monthList[11]">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <div v-if="!runingRateUpdating">{{row.dec}}</div>
|
|
|
+ <div v-if="runingRateUpdating && row.title == 'run day'">
|
|
|
+ <el-input v-model="row.dec" clearable="true"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-if="runingRateUpdating && row.title != 'run day'">
|
|
|
+ {{row.dec}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="total" label="total"></el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -1577,20 +1723,19 @@ import {
|
|
|
updateEligibleProductRate,
|
|
|
updateCrackerUtilityConsumption,
|
|
|
updateAromaticsUtilityConsumption,
|
|
|
- updateShoudownHour
|
|
|
+ updateShoudownHour,
|
|
|
+ updateRuningRate
|
|
|
} from "@/api/production/monthly";
|
|
|
|
|
|
export default {
|
|
|
name: "Monthly",
|
|
|
data() {
|
|
|
return {
|
|
|
- // Shoudown Hour修改中
|
|
|
+ // 修改中
|
|
|
+ runingRateUpdating: false,
|
|
|
shoudownHourUpdating: false,
|
|
|
- // Aromatics Utility Consumption修改中
|
|
|
aromaticsUtilityConsumptionUpdating: false,
|
|
|
- // Cracker Utility Consumption修改中
|
|
|
crackerUtilityConsumptionUpdating: false,
|
|
|
- // Eligible Product Rate修改中
|
|
|
eligibleProductRateUpdating: false,
|
|
|
// 趋势图y轴数值
|
|
|
valueList: [],
|
|
@@ -1654,11 +1799,7 @@ export default {
|
|
|
tableCostFrEthylene: [
|
|
|
{title: "the cost"},
|
|
|
],
|
|
|
- tableRuningRate: [
|
|
|
- {title: "run hour"},
|
|
|
- {title: "run rate"},
|
|
|
- {title: "calendar hour"},
|
|
|
- ],
|
|
|
+ tableRuningRate: [],
|
|
|
tableShoudownHour: [],
|
|
|
tableOtherside: [],
|
|
|
tableChemicalConsume: [
|
|
@@ -1805,9 +1946,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
/** 编辑按钮操作 */
|
|
|
- handleShoudownHourUpdate(row) {
|
|
|
- this.shoudownHourUpdating = true;
|
|
|
+ handleRuningRateUpdate(row) {
|
|
|
+ this.runingRateUpdating = true;
|
|
|
},
|
|
|
+ handleShoudownHourUpdate(row) {
|
|
|
+ this.shoudownHourUpdating = true;
|
|
|
+},
|
|
|
handleAromaticsUtilityConsumptionUpdate(row) {
|
|
|
this.aromaticsUtilityConsumptionUpdating = true;
|
|
|
},
|
|
@@ -1818,20 +1962,11 @@ export default {
|
|
|
this.eligibleProductRateUpdating = true;
|
|
|
},
|
|
|
/** 确定修改按钮操作 */
|
|
|
- handleConfirmShoudownHourUpdate(row) {
|
|
|
- this.shoudownHourUpdating = false;
|
|
|
- updateShoudownHour({
|
|
|
+ handleConfirmRuningRateUpdate(row) {
|
|
|
+ this.runingRateUpdating = false;
|
|
|
+ updateRuningRate({
|
|
|
tableData: [
|
|
|
- this.tableShoudownHour[0],
|
|
|
- this.tableShoudownHour[1],
|
|
|
- this.tableShoudownHour[2],
|
|
|
- this.tableShoudownHour[3],
|
|
|
- this.tableShoudownHour[4],
|
|
|
- this.tableShoudownHour[5],
|
|
|
- this.tableShoudownHour[6],
|
|
|
- this.tableShoudownHour[7],
|
|
|
- this.tableShoudownHour[8],
|
|
|
- this.tableShoudownHour[9],
|
|
|
+ this.tableRuningRate[3]
|
|
|
],
|
|
|
year: this.year.getFullYear()
|
|
|
}).then(response => {
|
|
@@ -1840,11 +1975,47 @@ export default {
|
|
|
} else {
|
|
|
this.$message.error("未知错误,请联系管理员。");
|
|
|
}
|
|
|
- getShoudownHour(year).then(response => {
|
|
|
- this.tableShoudownHour = response.data;
|
|
|
+ getRuningRate(year).then(response => {
|
|
|
+ this.tableRuningRate = response.data;
|
|
|
+ });
|
|
|
+ getPlantLoad(year).then(response => {
|
|
|
+ this.tablePlantLoad = response.data;
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ handleConfirmShoudownHourUpdate(row) {
|
|
|
+ this.shoudownHourUpdating = false;
|
|
|
+ updateShoudownHour({
|
|
|
+ tableData: [
|
|
|
+ this.tableShoudownHour[0],
|
|
|
+ this.tableShoudownHour[1],
|
|
|
+ this.tableShoudownHour[2],
|
|
|
+ this.tableShoudownHour[3],
|
|
|
+ this.tableShoudownHour[4],
|
|
|
+ this.tableShoudownHour[5],
|
|
|
+ this.tableShoudownHour[6],
|
|
|
+ this.tableShoudownHour[7],
|
|
|
+ this.tableShoudownHour[8],
|
|
|
+ this.tableShoudownHour[9],
|
|
|
+ ],
|
|
|
+ year: this.year.getFullYear()
|
|
|
+ }).then(response => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ } else {
|
|
|
+ this.$message.error("未知错误,请联系管理员。");
|
|
|
+ }
|
|
|
+ getShoudownHour(year).then(response => {
|
|
|
+ this.tableShoudownHour = response.data;
|
|
|
+ });
|
|
|
+ getRuningRate(year).then(response => {
|
|
|
+ this.tableRuningRate = response.data;
|
|
|
+ });
|
|
|
+ getPlantLoad(year).then(response => {
|
|
|
+ this.tablePlantLoad = response.data;
|
|
|
+ });
|
|
|
+ });
|
|
|
+},
|
|
|
handleConfirmAromaticsUtilityConsumptionUpdate(row) {
|
|
|
this.aromaticsUtilityConsumptionUpdating = false;
|
|
|
updateAromaticsUtilityConsumption({
|
|
@@ -1911,6 +2082,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
/** 取消修改按钮操作 */
|
|
|
+ handleCancelRuningRateUpdate(row) {
|
|
|
+ this.runingRateUpdating = false;
|
|
|
+ getRuningRate(year).then(response => {
|
|
|
+ this.runingRateUpdating = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
handleCancelShoudownHourUpdate(row) {
|
|
|
this.shoudownHourUpdating = false;
|
|
|
getShoudownHour(year).then(response => {
|
|
@@ -2108,9 +2285,9 @@ export default {
|
|
|
// getCostFrEthylene(year).then(response => {
|
|
|
// this.tableCostFrEthylene = response.data;
|
|
|
// });
|
|
|
- // getRuningRate(year).then(response => {
|
|
|
- // this.tableRuningRate = response.data;
|
|
|
- // });
|
|
|
+ getRuningRate(year).then(response => {
|
|
|
+ this.tableRuningRate = response.data;
|
|
|
+ });
|
|
|
getShoudownHour(year).then(response => {
|
|
|
this.tableShoudownHour = response.data;
|
|
|
});
|