|
@@ -39,16 +39,28 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- size="mini"
|
|
|
- :disabled="!selectedRows.length"
|
|
|
- @click="handleInput(selectedRows[0], '录入原因')"
|
|
|
- >录入原因</el-button
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ ref="upload"
|
|
|
+ accept=".xls,.xlsx"
|
|
|
+ :limit="1"
|
|
|
+ :multiple="false"
|
|
|
+ action="#"
|
|
|
+ :on-change="handleChange"
|
|
|
+ :auto-upload="false"
|
|
|
+ :show-file-list="false"
|
|
|
>
|
|
|
- </el-col> -->
|
|
|
+ <el-button
|
|
|
+ slot="trigger"
|
|
|
+ icon="el-icon-upload2"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ type="primary"
|
|
|
+ >人工目标</el-button
|
|
|
+ >
|
|
|
+ </el-upload>
|
|
|
+ </el-col>
|
|
|
<right-toolbar
|
|
|
:showSearch.sync="showSearch"
|
|
|
@queryTable="getList"
|
|
@@ -56,7 +68,6 @@
|
|
|
</el-row>
|
|
|
<div class="table">
|
|
|
<el-table ref="renewalTable" v-loading="loading" :data="dataList">
|
|
|
- <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
<el-table-column
|
|
|
label="事件序号"
|
|
|
align="center"
|
|
@@ -205,14 +216,12 @@
|
|
|
</div>
|
|
|
<!-- 详情 -->
|
|
|
<DetailsDrawer ref="detailRef" />
|
|
|
- <!-- 录入原因 -->
|
|
|
- <!-- <InputReasonModel ref="inputReasonRef" @refresh="getList" /> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import DetailsDrawer from "./DetailsDrawer.vue";
|
|
|
-// import InputReasonModel from "./components/InputReasonModel.vue";
|
|
|
+import { importF } from "@/api/powerdistribution/power-outage-control";
|
|
|
import { listMaintenanceStatistics } from "@/api/powerdistribution/maintenance";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -301,6 +310,18 @@ export default {
|
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
+ handleChange(file) {
|
|
|
+ let data = new FormData();
|
|
|
+ data.append("file", file.raw);
|
|
|
+ importF(data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("导入成功");
|
|
|
+ this.$emit("refresh");
|
|
|
+ } else {
|
|
|
+ this.$message.error("导入失败" || res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|