|
@@ -16,13 +16,15 @@
|
|
|
<div class="query-actions">
|
|
|
<el-upload class="upload-demo" ref="upload" action="http://10.155.32.4:8082/misreport/import/data"
|
|
|
:on-preview="handlePreview" :on-success="onSuccess" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
- :on-exceed="handleExceed" :auto-upload="true" :limit="1" :before-upload="beforeAvatarUpload" @on-error="onError"
|
|
|
- accept=".xls,.xlsx" :file-list="fileList" :show-file-list="false">
|
|
|
+ :on-exceed="handleExceed" :auto-upload="true" :limit="1" :before-upload="beforeAvatarUpload"
|
|
|
+ @on-error="onError" accept=".xls,.xlsx" :file-list="fileList" :show-file-list="false">
|
|
|
<button class="btn green" @click="importExecl">数据导入</button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
+ <div class="query-actions">
|
|
|
+ <button class="btn green" @click="openDialog">功率故障次数导入</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-table height="80vh" ref="multipleTable" empty-text="暂无数据" :data="tableList" :header-cell-style="{
|
|
@@ -73,7 +75,7 @@
|
|
|
<el-table-column label="综合厂用电量" align="center">
|
|
|
<el-table-column prop="zhcydl1" label="本期" width="120" align="center">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="zhcydl2" label="同期" width="120" align="center">
|
|
|
+ <el-table-column prop="zhcydl1" label="同期" width="120" align="center">
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -86,6 +88,50 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <el-dialog title="新增数据" v-model="isvisiable" width="600px" top="20vh" custom-class="modal" :close-on-click-modal="false"
|
|
|
+ :before-close="onClickDialogClose">
|
|
|
+ <div class="query mg-b-8">
|
|
|
+ <div class="query-items">
|
|
|
+ <div class="query-item">
|
|
|
+ <div class="lable">日期:</div>
|
|
|
+ <el-date-picker v-model="glycDate" @change="dateChange(glycDate)" type="date" value-format="YYYY-MM-DD"
|
|
|
+ placeholder="选择日期" popper-class="date-select">
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="margin-top:80px">
|
|
|
+ <div class="query mg-b-8">
|
|
|
+ <div class="query-items" style="flex-direction: column;">
|
|
|
+ <div class="query-item">
|
|
|
+ <div class="lable" style="width: 180px">短期功率预测准确率:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="dqglyx"
|
|
|
+ clearable
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-item" style="margin-top: 30px">
|
|
|
+ <div class="lable" style="width: 180px">百台风机故障次数:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="gzcs"
|
|
|
+ clearable
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="submit">
|
|
|
+ <button class="btn green" @click="submit">提交</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -96,6 +142,12 @@ export default {
|
|
|
fileList: [],
|
|
|
timeValue: [],
|
|
|
tableList: [],
|
|
|
+ isvisiable: false,
|
|
|
+ exportDate:'',
|
|
|
+ glycDate: '',
|
|
|
+ misdata: {},
|
|
|
+ dqglyx: '', //短期功率预测准确率
|
|
|
+ gzcs: '', //故障次数
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -107,6 +159,55 @@ export default {
|
|
|
this.getTableData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ openDialog() {
|
|
|
+ this.isvisiable = true
|
|
|
+ this.glycDate = new Date().formatDate("yyyy-MM-dd")
|
|
|
+ this.dateChange();
|
|
|
+ },
|
|
|
+
|
|
|
+ dateChange(){
|
|
|
+ let that = this;
|
|
|
+ that.API.requestData({
|
|
|
+ method: "GET",
|
|
|
+ subUrl: "misreport/glyc/data",
|
|
|
+ timeout: 60000,
|
|
|
+ data: {
|
|
|
+ time: that.glycDate,
|
|
|
+ },
|
|
|
+ success(res) {
|
|
|
+ if (res) {
|
|
|
+ that.dqglyx = res.data.dqglyczql
|
|
|
+ that.gzcs = res.data.gzcs
|
|
|
+ that.misdata = res.data
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submit(){
|
|
|
+ let that = this;
|
|
|
+ that.misdata.dqglyczql = that.dqglyx;
|
|
|
+ that.misdata.gzcs = that.gzcs;
|
|
|
+ that.misdata.importdate = that.glycDate;
|
|
|
+ let data = that.misdata;
|
|
|
+ that.API.requestPost({
|
|
|
+ method: "POST",
|
|
|
+ subUrl: "misreport/save/glyc",
|
|
|
+ data,
|
|
|
+ success(res) {
|
|
|
+ if (res.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: '保存成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message: '保存失败',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
getTableData() {
|
|
|
let that = this;
|
|
|
that.API.requestData({
|
|
@@ -146,19 +247,19 @@ export default {
|
|
|
this.BASE.showLoading();
|
|
|
},
|
|
|
onSuccess(res) {
|
|
|
- if(res.code != 200){
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: 'error'
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.$message({
|
|
|
- message: '上传成功',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- }
|
|
|
- this.BASE.closeLoading();
|
|
|
- this.$refs.upload.clearFiles();
|
|
|
+ if(res.code != 200){
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: '上传成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.BASE.closeLoading();
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
},
|
|
|
importExecl() {
|
|
|
|
|
@@ -185,4 +286,26 @@ export default {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
}
|
|
|
+.timeDate{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.moudles{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+.title {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #666666;
|
|
|
+ margin-right: 30px;
|
|
|
+ width: 150px;
|
|
|
+}
|
|
|
+.submit{
|
|
|
+ margin-top: 100px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row-reverse;
|
|
|
+}
|
|
|
</style>
|