|
@@ -2,107 +2,68 @@
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<!-- 筛选start -->
|
|
<!-- 筛选start -->
|
|
<div class="filter-container mb-10">
|
|
<div class="filter-container mb-10">
|
|
- <div class="left">
|
|
|
|
- <div>
|
|
|
|
- <a class="" style="margin-right: 30px">计划停电列表</a>
|
|
|
|
- <el-button icon="el-icon-plus" type="success" @click="addItem()" :disabled="store.state.authorities.indexOf('新增')==-1">
|
|
|
|
- 新增
|
|
|
|
- </el-button>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div style="margin-top: 20px">
|
|
|
|
- <div class="filter-item planOutage">
|
|
|
|
- 选择时间范围:
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="dateTime"
|
|
|
|
- type="datetimerange"
|
|
|
|
- range-separator="至"
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
- style="width: auto"
|
|
|
|
- :disabled="store.state.authorities.indexOf('查询')==-1"
|
|
|
|
- ></el-date-picker>
|
|
|
|
- </div>
|
|
|
|
- <div class="filter-item">
|
|
|
|
- 状态:
|
|
|
|
- <el-select
|
|
|
|
- v-model="region"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- style="width: 200px"
|
|
|
|
- clearable
|
|
|
|
- :disabled="store.state.authorities.indexOf('查询')==-1"
|
|
|
|
- >
|
|
|
|
- <el-option label="未执行" :value="1"></el-option>
|
|
|
|
- <el-option label="执行中" :value="2"></el-option>
|
|
|
|
- <el-option label="已执行" :value="3"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </div>
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- icon="el-icon-search"
|
|
|
|
- @click="Select()"
|
|
|
|
- class="search-button"
|
|
|
|
- :disabled="store.state.authorities.indexOf('查询')==-1"
|
|
|
|
- >
|
|
|
|
- 搜索
|
|
|
|
- </el-button>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="filter-item">
|
|
|
|
+ <span class="title" style="margin-right: 30px">计划停电列表</span>
|
|
|
|
+ <el-button icon="Plus" type="success" @click="addItem()" :disabled="store.state.authorities.indexOf('新增') == -1">
|
|
|
|
+ 新增
|
|
|
|
+ </el-button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="right">
|
|
<div class="right">
|
|
- <el-button type="primary" @click="DataReportExport()" :disabled="store.state.authorities.indexOf('导出')==-1">导出</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="DataReportExport()"
|
|
|
|
+ :disabled="store.state.authorities.indexOf('导出') == -1">导出</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="filter-container mb-10" style="justify-content: left; white-space: nowrap;">
|
|
|
|
+ <div class="filter-item">
|
|
|
|
+ <span class="title">选择时间范围:</span>
|
|
|
|
+ <el-date-picker v-model="dateTime" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
|
|
|
+ end-placeholder="结束日期" style="width: auto"
|
|
|
|
+ :disabled="store.state.authorities.indexOf('查询') == -1"></el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="filter-item">
|
|
|
|
+ <span class="title">状态:</span>
|
|
|
|
+ <el-select v-model="region" placeholder="请选择" style="width: 200px" clearable
|
|
|
|
+ :disabled="store.state.authorities.indexOf('查询') == -1">
|
|
|
|
+ <el-option label="未执行" :value="1"></el-option>
|
|
|
|
+ <el-option label="执行中" :value="2"></el-option>
|
|
|
|
+ <el-option label="已执行" :value="3"></el-option>
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <el-button type="primary" icon="Search" @click="Select()" class="search-button"
|
|
|
|
+ :disabled="store.state.authorities.indexOf('查询') == -1">
|
|
|
|
+ 搜索
|
|
|
|
+ </el-button>
|
|
</div>
|
|
</div>
|
|
<!-- 筛选end -->
|
|
<!-- 筛选end -->
|
|
|
|
|
|
<!-- 表格start -->
|
|
<!-- 表格start -->
|
|
- <el-table
|
|
|
|
- :data="tableData"
|
|
|
|
- border
|
|
|
|
- stripe
|
|
|
|
- :header-cell-style="headClass"
|
|
|
|
- :cell-style="cellStyle"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table :data="tableData" border stripe>
|
|
<el-table-column type="index" label="序号" width="50px"></el-table-column>
|
|
<el-table-column type="index" label="序号" width="50px"></el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="siteName"
|
|
|
|
- label="站点名称"
|
|
|
|
- min-width="160px"
|
|
|
|
- ></el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="startTime"
|
|
|
|
- label="开始停电时间"
|
|
|
|
- min-width="155px"
|
|
|
|
- ></el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="endTime"
|
|
|
|
- label="结束停电时间"
|
|
|
|
- min-width="155px"
|
|
|
|
- ></el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="createTime"
|
|
|
|
- label="提交时间"
|
|
|
|
- min-width="155px"
|
|
|
|
- ></el-table-column>
|
|
|
|
- <el-table-column prop="creator" label="提交人" min-width="110px"></el-table-column>
|
|
|
|
- <el-table-column prop="contacts" label="联系人" min-width="110px"></el-table-column>
|
|
|
|
- <el-table-column prop="phone" label="联系方式" min-width="110px"></el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="siteName" label="站点名称" min-width="160px"></el-table-column>
|
|
|
|
+ <el-table-column prop="startTime" label="开始停电时间" min-width="155px"></el-table-column>
|
|
|
|
+ <el-table-column prop="endTime" label="结束停电时间" min-width="155px"></el-table-column>
|
|
|
|
+ <el-table-column prop="createTime" label="提交时间" min-width="155px"></el-table-column>
|
|
|
|
+ <el-table-column prop="creator" label="提交人" min-width="110px"></el-table-column>
|
|
|
|
+ <el-table-column prop="contacts" label="联系人" min-width="110px"></el-table-column>
|
|
|
|
+ <el-table-column prop="phone" label="联系方式" min-width="110px"></el-table-column>
|
|
<el-table-column prop="type" label="状态" width="">
|
|
<el-table-column prop="type" label="状态" width="">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <span
|
|
|
|
- :style="{
|
|
|
|
- color:
|
|
|
|
- scope.row.type == 3
|
|
|
|
- ? '#8DCF6E'
|
|
|
|
- : scope.row.type === 1
|
|
|
|
|
|
+ <span :style="{
|
|
|
|
+ color:
|
|
|
|
+ scope.row.type == 3
|
|
|
|
+ ? '#8DCF6E'
|
|
|
|
+ : scope.row.type === 1
|
|
? '#FF747B'
|
|
? '#FF747B'
|
|
: '#5c88fa',
|
|
: '#5c88fa',
|
|
- }"
|
|
|
|
- >
|
|
|
|
|
|
+ }">
|
|
{{
|
|
{{
|
|
scope.row.type === 1
|
|
scope.row.type === 1
|
|
- ? '未执行'
|
|
|
|
- : scope.row.type === 2
|
|
|
|
|
|
+ ? '未执行'
|
|
|
|
+ : scope.row.type === 2
|
|
? '执行中'
|
|
? '执行中'
|
|
: '已执行'
|
|
: '已执行'
|
|
}}
|
|
}}
|
|
@@ -111,25 +72,14 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column fixed="right" label="操作" width="180">
|
|
<el-table-column fixed="right" label="操作" width="180">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- @click.prevent="editRow(scope.row)"
|
|
|
|
- :disabled="store.state.authorities.indexOf('修改')==-1"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click.prevent="editRow(scope.row)"
|
|
|
|
+ :disabled="store.state.authorities.indexOf('修改') == -1" link>
|
|
编辑
|
|
编辑
|
|
</el-button>
|
|
</el-button>
|
|
- <el-popconfirm
|
|
|
|
- confirm-button-text="是"
|
|
|
|
- cancel-button-text="否"
|
|
|
|
- icon="el-icon-info"
|
|
|
|
- icon-color="red"
|
|
|
|
- title="确定删除?"
|
|
|
|
- @confirm="handleDelete(scope.row)"
|
|
|
|
- @cancel="cancelEvent"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-popconfirm confirm-button-text="是" cancel-button-text="否" icon="info" icon-color="red" title="确定删除?"
|
|
|
|
+ @confirm="handleDelete(scope.row)" @cancel="cancelEvent">
|
|
<template #reference>
|
|
<template #reference>
|
|
- <el-button type="text" size="small" class="delete-text" :disabled="store.state.authorities.indexOf('删除')==-1">
|
|
|
|
|
|
+ <el-button type="danger" size="small" :disabled="store.state.authorities.indexOf('删除') == -1" link>
|
|
删除
|
|
删除
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -141,254 +91,167 @@
|
|
|
|
|
|
<!-- 分页start -->
|
|
<!-- 分页start -->
|
|
<div class="paginationBlock">
|
|
<div class="paginationBlock">
|
|
- <el-pagination
|
|
|
|
- v-model:currentPage="currentPage"
|
|
|
|
- :page-sizes="[15, 20, 25, 30]"
|
|
|
|
- :page-size="pageSize"
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
- :total="total"
|
|
|
|
- @size-change="handleSizeChange"
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- background
|
|
|
|
- ></el-pagination>
|
|
|
|
|
|
+ <el-pagination v-model:currentPage="currentPage" :page-sizes="[15, 20, 25, 30]" :page-size="pageSize"
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
|
|
|
|
+ @current-change="handleCurrentChange" background></el-pagination>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 分页end -->
|
|
<!-- 分页end -->
|
|
|
|
|
|
<!--弹框组件开始-----------------------start-->
|
|
<!--弹框组件开始-----------------------start-->
|
|
- <dialog-component
|
|
|
|
- :dialog-title="dialogTitle"
|
|
|
|
- :item-info="tableItem"
|
|
|
|
- @closeDialog="closeDialog"
|
|
|
|
- :show_Dialog="showDialog"
|
|
|
|
- ></dialog-component>
|
|
|
|
|
|
+ <dialog-component ref="dialogComponentRef" @handleSelect="Select()"></dialog-component>
|
|
<!--弹框组件开始-----------------------end-->
|
|
<!--弹框组件开始-----------------------end-->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
|
|
|
+<script setup>
|
|
|
|
+/*----------------------------------依赖引入-----------------------------------*/
|
|
import { useStore } from 'vuex'
|
|
import { useStore } from 'vuex'
|
|
-import { defineComponent, onMounted, ref } from 'vue'
|
|
|
|
-import DialogComponent from './dialogComponent'
|
|
|
|
|
|
+import { ElMessage, ElNotification } from 'element-plus'
|
|
|
|
+import { ref, onMounted, watch, getCurrentInstance, reactive, toRefs } from 'vue'
|
|
|
|
+/*----------------------------------接口引入-----------------------------------*/
|
|
import * as api from '@/api/planOutage/index'
|
|
import * as api from '@/api/planOutage/index'
|
|
-import { ElMessage } from 'element-plus'
|
|
|
|
-
|
|
|
|
-export default defineComponent({
|
|
|
|
- name: 'VariableList',
|
|
|
|
-
|
|
|
|
- components: { DialogComponent },
|
|
|
|
- setup() {
|
|
|
|
- const store = useStore()
|
|
|
|
-
|
|
|
|
- const tableItem = ref()
|
|
|
|
- const dialogTitle = ref('')
|
|
|
|
- const showDialog = ref(false)
|
|
|
|
-
|
|
|
|
- const tableData = ref()
|
|
|
|
- const currentPage = ref(1)
|
|
|
|
- const pageSize = ref(15)
|
|
|
|
- const total = ref(0)
|
|
|
|
-
|
|
|
|
- // const dateTime = ref([
|
|
|
|
- // new Date(2021, 8, 10, 10, 10),
|
|
|
|
- // new Date(2021, 10, 11, 10, 10),
|
|
|
|
- // ])
|
|
|
|
- const dateTime = ref('')
|
|
|
|
- const select = ref(1)
|
|
|
|
-
|
|
|
|
- const tabPosition = ref('one')
|
|
|
|
- const input = ref('')
|
|
|
|
- const region = ref()
|
|
|
|
|
|
+/*----------------------------------组件引入-----------------------------------*/
|
|
|
|
+import DialogComponent from './dialogComponent'
|
|
|
|
+/*----------------------------------store引入-----------------------------------*/
|
|
|
|
+/*----------------------------------公共方法引入-----------------------------------*/
|
|
|
|
+/*----------------------------------公共变量-----------------------------------*/
|
|
|
|
+const store = useStore()
|
|
|
|
+const props = defineProps({}) //数据双向绑定
|
|
|
|
+const emit = defineEmits([]);
|
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
|
+/*----------------------------------变量声明-----------------------------------*/
|
|
|
|
+const state = reactive({
|
|
|
|
+ tableData: [],
|
|
|
|
+ total: 0,
|
|
|
|
+ pageSize: 15,
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ dateTime: [],
|
|
|
|
+ region: "",
|
|
|
|
+})
|
|
|
|
+const { tableData, total, pageSize, currentPage, dateTime, region } = toRefs(state)
|
|
|
|
|
|
- // 添加操作
|
|
|
|
- const addItem = () => {
|
|
|
|
- tableItem.value = {
|
|
|
|
- siteId: '',
|
|
|
|
- time: ['', ''],
|
|
|
|
- startTime: '',
|
|
|
|
- endTime: '',
|
|
|
|
- phone: '',
|
|
|
|
- contacts: '',
|
|
|
|
- planType: '',
|
|
|
|
- type: '',
|
|
|
|
- }
|
|
|
|
- dialogTitle.value = '新增'
|
|
|
|
- showDialog.value = true
|
|
|
|
- }
|
|
|
|
- // 编辑操作
|
|
|
|
- const editRow = (row) => {
|
|
|
|
- console.log(row)
|
|
|
|
- tableItem.value = {
|
|
|
|
- id: row.id,
|
|
|
|
- siteId: row.siteId,
|
|
|
|
- time: [row.startTime, row.endTime],
|
|
|
|
- startTime: row.startTime,
|
|
|
|
- endTime: row.endTime,
|
|
|
|
- phone: row.phone,
|
|
|
|
- contacts: row.contacts,
|
|
|
|
- planType: row.planType,
|
|
|
|
- type: row.type,
|
|
|
|
- }
|
|
|
|
- dialogTitle.value = '编辑'
|
|
|
|
- showDialog.value = true
|
|
|
|
|
|
+// 添加操作
|
|
|
|
+function addItem() {
|
|
|
|
+ proxy.$refs['dialogComponentRef'].openDialog({
|
|
|
|
+ dialogTitle: '新增',
|
|
|
|
+ tableItem: {
|
|
|
|
+ siteId: '',
|
|
|
|
+ time: ['', ''],
|
|
|
|
+ startTime: '',
|
|
|
|
+ endTime: '',
|
|
|
|
+ phone: '',
|
|
|
|
+ contacts: '',
|
|
|
|
+ planType: '',
|
|
|
|
+ type: '',
|
|
}
|
|
}
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
- // 关闭操作
|
|
|
|
- const closeDialog = (flag) => {
|
|
|
|
- if (flag) {
|
|
|
|
- // 重新刷新表格内容
|
|
|
|
- this.fetchData()
|
|
|
|
- }
|
|
|
|
- showDialog.value = false
|
|
|
|
- Select()
|
|
|
|
|
|
+// 编辑操作
|
|
|
|
+function editRow(row) {
|
|
|
|
+ proxy.$refs['dialogComponentRef'].openDialog({
|
|
|
|
+ dialogTitle: '编辑',
|
|
|
|
+ tableItem: {
|
|
|
|
+ id: row.id,
|
|
|
|
+ siteId: row.siteId,
|
|
|
|
+ time: [row.startTime, row.endTime],
|
|
|
|
+ startTime: row.startTime,
|
|
|
|
+ endTime: row.endTime,
|
|
|
|
+ phone: row.phone,
|
|
|
|
+ contacts: row.contacts,
|
|
|
|
+ planType: row.planType,
|
|
|
|
+ type: row.type,
|
|
}
|
|
}
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
- //删除 是否删除 ---- 是
|
|
|
|
- const handleDelete = (row) => {
|
|
|
|
- api.plannedOutageDel({ id: row.id }).then((requset) => {
|
|
|
|
- if (requset.status === 'SUCCESS') {
|
|
|
|
- ElMessage.success({
|
|
|
|
- message: '删除成功',
|
|
|
|
- type: 'success',
|
|
|
|
- })
|
|
|
|
- Select()
|
|
|
|
- } else {
|
|
|
|
- ElMessage.error(requset.msg)
|
|
|
|
- }
|
|
|
|
|
|
+//删除 是否删除 ---- 是
|
|
|
|
+function handleDelete(row) {
|
|
|
|
+ api.plannedOutageDel({ id: row.id }).then((requset) => {
|
|
|
|
+ if (requset.status === 'SUCCESS') {
|
|
|
|
+ ElMessage.success({
|
|
|
|
+ message: '删除成功',
|
|
|
|
+ type: 'success',
|
|
})
|
|
})
|
|
|
|
+ Select()
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage.error(requset.msg)
|
|
}
|
|
}
|
|
- //是否删除 ---- 否
|
|
|
|
- const cancelEvent = () => {
|
|
|
|
- console.log('cancel!')
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
- //查询设备列表
|
|
|
|
- function Select() {
|
|
|
|
- store.commit('TimeAll_function', dateTime.value)
|
|
|
|
- const time = store.state.Time_Data
|
|
|
|
- api
|
|
|
|
- .plannedOutageList({
|
|
|
|
- size: pageSize.value,
|
|
|
|
- current: currentPage.value,
|
|
|
|
- type: region.value,
|
|
|
|
- startTime: time[0]?time[0]:'',
|
|
|
|
- endTime: time[1]?time[1]:'',
|
|
|
|
- })
|
|
|
|
- .then((requset) => {
|
|
|
|
- if (requset.status === 'SUCCESS') {
|
|
|
|
- tableData.value = requset.data.records.map((val) => {
|
|
|
|
- store.commit('getTimestampAll', val.startTime)
|
|
|
|
- val.startTime = store.state.timeProcessing
|
|
|
|
- store.commit('getTimestampAll', val.endTime)
|
|
|
|
- val.endTime = store.state.timeProcessing
|
|
|
|
- store.commit('getTimestampAll', val.createTime)
|
|
|
|
- val.createTime = store.state.timeProcessing
|
|
|
|
- })
|
|
|
|
- tableData.value = requset.data.records
|
|
|
|
- total.value = requset.data.total
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- ElMessage.error(requset.msg)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+//是否删除 ---- 否
|
|
|
|
+function cancelEvent() {
|
|
|
|
+ console.log('cancel!')
|
|
|
|
+}
|
|
|
|
|
|
- onMounted(() => {
|
|
|
|
- Select()
|
|
|
|
|
|
+//查询设备列表
|
|
|
|
+function Select() {
|
|
|
|
+ store.commit('TimeAll_function', dateTime.value)
|
|
|
|
+ const time = store.state.Time_Data
|
|
|
|
+ api
|
|
|
|
+ .plannedOutageList({
|
|
|
|
+ size: pageSize.value,
|
|
|
|
+ current: currentPage.value,
|
|
|
|
+ type: region.value,
|
|
|
|
+ startTime: time[0] ? time[0] : '',
|
|
|
|
+ endTime: time[1] ? time[1] : '',
|
|
})
|
|
})
|
|
|
|
+ .then((requset) => {
|
|
|
|
+ if (requset.status === 'SUCCESS') {
|
|
|
|
+ tableData.value = requset.data.records.map((val) => {
|
|
|
|
+ store.commit('getTimestampAll', val.startTime)
|
|
|
|
+ val.startTime = store.state.timeProcessing
|
|
|
|
+ store.commit('getTimestampAll', val.endTime)
|
|
|
|
+ val.endTime = store.state.timeProcessing
|
|
|
|
+ store.commit('getTimestampAll', val.createTime)
|
|
|
|
+ val.createTime = store.state.timeProcessing
|
|
|
|
+ })
|
|
|
|
+ tableData.value = requset.data.records
|
|
|
|
+ total.value = requset.data.total
|
|
|
|
|
|
- const handleSizeChange = (val) => {
|
|
|
|
- pageSize.value = val
|
|
|
|
- Select()
|
|
|
|
- }
|
|
|
|
- const handleCurrentChange = (val) => {
|
|
|
|
- currentPage.value = val
|
|
|
|
- Select()
|
|
|
|
- }
|
|
|
|
- // 表头样式设置
|
|
|
|
- const goVariableList = () => {
|
|
|
|
- // 跳转至订单列表页面传参
|
|
|
|
- this.$router.push({
|
|
|
|
- path: '../siteManage/variableList/index.vue',
|
|
|
|
- })
|
|
|
|
- // this.$router.push({ name:'variableList'})
|
|
|
|
- }
|
|
|
|
- const headClass = () => {
|
|
|
|
- return 'background:#FAFAFA;'
|
|
|
|
- }
|
|
|
|
- //处理状态状态值变色
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- const cellStyle = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
|
- row, column, rowIndex
|
|
|
|
- // console.log(row, column, rowIndex)
|
|
|
|
-
|
|
|
|
- if (columnIndex) {
|
|
|
|
- // return `text-align:left;cursor:pointer;`
|
|
|
|
} else {
|
|
} else {
|
|
- return ''
|
|
|
|
|
|
+ ElMessage.error(requset.msg)
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
- //导出
|
|
|
|
- const DataReportExport = () => {
|
|
|
|
- store.commit('TimeAll_function', dateTime.value)
|
|
|
|
- const time = store.state.Time_Data
|
|
|
|
- api
|
|
|
|
- .outagePlanListExport({
|
|
|
|
- type: region.value,
|
|
|
|
- startTime: time[0]?time[0]:'',
|
|
|
|
- endTime: time[1]?time[1]:'',
|
|
|
|
- })
|
|
|
|
- .then((requset) => {
|
|
|
|
- if (requset.status === 'SUCCESS') {
|
|
|
|
- window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
|
|
|
|
- ElMessage.success({
|
|
|
|
- message: '导出成功',
|
|
|
|
- type: 'success',
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- ElMessage.error(requset.msg)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- return {
|
|
|
|
- cellStyle,
|
|
|
|
- headClass,
|
|
|
|
- goVariableList,
|
|
|
|
-
|
|
|
|
- handleDelete,
|
|
|
|
- cancelEvent,
|
|
|
|
- closeDialog,
|
|
|
|
- editRow,
|
|
|
|
- addItem,
|
|
|
|
- Select,
|
|
|
|
-
|
|
|
|
- store,
|
|
|
|
-
|
|
|
|
- total,
|
|
|
|
- pageSize,
|
|
|
|
- currentPage,
|
|
|
|
- handleSizeChange,
|
|
|
|
- handleCurrentChange,
|
|
|
|
-
|
|
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
- tableData,
|
|
|
|
|
|
+onMounted(() => {
|
|
|
|
+ Select()
|
|
|
|
+})
|
|
|
|
|
|
- showDialog,
|
|
|
|
- tabPosition,
|
|
|
|
- select,
|
|
|
|
- dateTime,
|
|
|
|
- tableItem,
|
|
|
|
- dialogTitle,
|
|
|
|
- input,
|
|
|
|
- region,
|
|
|
|
|
|
+const handleSizeChange = (val) => {
|
|
|
|
+ pageSize.value = val
|
|
|
|
+ Select()
|
|
|
|
+}
|
|
|
|
+const handleCurrentChange = (val) => {
|
|
|
|
+ currentPage.value = val
|
|
|
|
+ Select()
|
|
|
|
+}
|
|
|
|
|
|
- DataReportExport
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-})
|
|
|
|
|
|
+//导出
|
|
|
|
+const DataReportExport = () => {
|
|
|
|
+ store.commit('TimeAll_function', dateTime.value)
|
|
|
|
+ const time = store.state.Time_Data
|
|
|
|
+ api
|
|
|
|
+ .outagePlanListExport({
|
|
|
|
+ type: region.value,
|
|
|
|
+ startTime: time[0] ? time[0] : '',
|
|
|
|
+ endTime: time[1] ? time[1] : '',
|
|
|
|
+ })
|
|
|
|
+ .then((requset) => {
|
|
|
|
+ if (requset.status === 'SUCCESS') {
|
|
|
|
+ window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
|
|
|
|
+ ElMessage.success({
|
|
|
|
+ message: '导出成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage.error(requset.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
-</style>
|
|
|
|
|
|
+<style lang="scss" scoped></style>
|