feat(forecast): 增强详情弹窗底部便捷编辑与删除入口
这个提交包含在:
@@ -37,7 +37,15 @@
|
||||
</el-dialog>
|
||||
<el-dialog title="预测与真实监测值对比" :visible.sync="viewing" width="1180px" :close-on-click-modal="false" :before-close="closeDetail" :show-close="!saving">
|
||||
<forecast-detail v-if="viewing && selected" ref="detail" :record="selected" :busy="saving" @save="saveActual" @retry="retry"></forecast-detail>
|
||||
<div class="forecast-foot"><el-button @click="closeDetail" :disabled="saving">关闭</el-button></div>
|
||||
<div class="forecast-foot" style="display:flex; justify-content:space-between; align-items:center;">
|
||||
<div>
|
||||
<el-button type="danger" plain size="small" @click="deleteFromDetail" :disabled="saving">删除此记录</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button size="small" type="primary" plain @click="editFromDetail" :disabled="saving">编辑温湿度</el-button>
|
||||
<el-button size="small" @click="closeDetail" :disabled="saving">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -81,6 +81,20 @@ define(['jquery', 'bootstrap', 'backend', 'backend/forecast/components'], functi
|
||||
});
|
||||
}).catch(function () {});
|
||||
},
|
||||
deleteFromDetail: function () {
|
||||
if (this.selected) {
|
||||
this.deleteRecord(this.selected);
|
||||
}
|
||||
},
|
||||
editFromDetail: function () {
|
||||
var self = this;
|
||||
if (this.selected) {
|
||||
var rec = this.selected;
|
||||
this.closeDetail(function () {
|
||||
self.editRecord(rec);
|
||||
});
|
||||
}
|
||||
},
|
||||
write: function (action, data, callback) {
|
||||
if (this.saving) return;
|
||||
var self = this;
|
||||
|
||||
在新工单中引用
屏蔽一个用户