|
@@ -18,11 +18,19 @@
|
|
|
: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">
|
|
|
- <button class="btn green" @click="importExecl">数据导入</button>
|
|
|
+ <button class="btn green" @click="importExecl">mis日报导入</button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
<div class="query-actions">
|
|
|
- <button class="btn green" @click="openDialog">功率故障次数导入</button>
|
|
|
+ <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">
|
|
|
+ <button class="btn green" @click="importExecl">故障数据导入</button>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ <div class="query-actions">
|
|
|
+ <button class="btn green" @click="openDialog">功率故障次数录入</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -164,7 +172,7 @@ export default {
|
|
|
this.glycDate = new Date().formatDate("yyyy-MM-dd")
|
|
|
this.dateChange();
|
|
|
},
|
|
|
-
|
|
|
+ //数据录入弹窗改变日期请求数据
|
|
|
dateChange(){
|
|
|
let that = this;
|
|
|
that.API.requestData({
|
|
@@ -183,6 +191,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //数据录入弹窗 --- 保存
|
|
|
submit(){
|
|
|
let that = this;
|
|
|
that.misdata.dqglyczql = that.dqglyx;
|
|
@@ -208,6 +217,7 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ //获取表格数据
|
|
|
getTableData() {
|
|
|
let that = this;
|
|
|
that.API.requestData({
|
|
@@ -246,6 +256,7 @@ export default {
|
|
|
beforeAvatarUpload() {
|
|
|
this.BASE.showLoading();
|
|
|
},
|
|
|
+ //mis日报上传成功回调
|
|
|
onSuccess(res) {
|
|
|
if(res.code != 200){
|
|
|
this.$message({
|
|
@@ -264,6 +275,7 @@ export default {
|
|
|
importExecl() {
|
|
|
|
|
|
},
|
|
|
+ //mis日报上传错误回调
|
|
|
onError() {
|
|
|
this.$message.error('上传失败');
|
|
|
this.BASE.closeLoading();
|