提交
This commit is contained in:
400
src/views/gwPush/commPoint/index.vue
Normal file
400
src/views/gwPush/commPoint/index.vue
Normal file
@@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="日期">
|
||||
<div style="display: flex">
|
||||
<el-select v-model="statisticalType" style="width: 180px; margin-right: 5px"
|
||||
@change="timeChange">
|
||||
<el-option label="年" value="01"></el-option>
|
||||
<el-option label="月" value="02"></el-option>
|
||||
<el-option label="日" value="03"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker style="width: 180px" v-model="searchBeginTime"
|
||||
v-if="statisticalType == '01'" type="year" value-format="yyyy-MM-dd"
|
||||
@change="yearChange" placeholder="选择年"></el-date-picker>
|
||||
<el-date-picker style="width:180px" v-if="statisticalType == '02'" value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime" @change="monthChange" type="month"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
<el-date-picker style="width:180px" v-if="statisticalType == '03'" value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime" @change="dateChange" type="date"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-button size="small" type="primary" icon="el-icon-search" @click="
|
||||
pageNum = 1;
|
||||
pageListInit()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button type="primary" class="ml10" icon="el-icon-search" @click="uploadGw()">上送网公司
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="exportEvent">导出</el-button>
|
||||
<el-button type="primary" icon="" @click="relCal">重新计算</el-button>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<vxe-table :data="pageData" :height="height" border size="mini" ref="workOrderTable" style="width: 100%"
|
||||
v-loading="isLoading" header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent"
|
||||
@checkbox-change="handleSelectionChange">
|
||||
<!-- <vxe-table-column key="checkboxs" type="checkbox" align="center" width="55"></vxe-table-column>-->
|
||||
|
||||
<template v-for="(item, index) in tableData">
|
||||
<vxe-table-column align="center" :field="item.prop" :title="item.label" :key="index"
|
||||
:min-width="item.width" :formatter="tableDateFilter">
|
||||
</vxe-table-column>
|
||||
</template>
|
||||
|
||||
<vxe-table-column key="uploadStatus" field="uploadStatus" title="状态" fixed="right" align="center"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" size="small" style="color: rgba(6,45,241,0.98); background: #ecf5ff"
|
||||
v-if="scope.row.uploadStatus == 0">
|
||||
未上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #34fc3e; background: #f0f9eb"
|
||||
v-if="scope.row.uploadStatus == 1">
|
||||
已上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #991717; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 2">
|
||||
取消上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small"
|
||||
style="color: rgba(236,143,21,0.92); background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 3">
|
||||
待重新上送
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
|
||||
</vxe-table>
|
||||
<el-pagination background align="right" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 30, 40, 50, 100]"
|
||||
:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
|
||||
class="mt10"></el-pagination>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { dicData } from '@/assets/commjs/dictypeData'
|
||||
import { getCommPointBusPage, uploadGw, relcal } from '@/api/pmsUpload/commPoint'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
vh: '',
|
||||
height: null,
|
||||
isLoading: false,
|
||||
form: {},
|
||||
dialogVisible: false,
|
||||
diaTitle: '',
|
||||
statisticalType: '03',
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
|
||||
multipleSelection: [],
|
||||
|
||||
|
||||
tableData: [
|
||||
{ prop: 'provinceOrgName', label: '所属省份', width: 180 },
|
||||
{ prop: 'cityOrgName', label: '所属地市', width: 180 },
|
||||
{ prop: 'maintOrgName', label: '运维单位', width: 180 },
|
||||
{ prop: 'stationType', label: '站房类型', width: 180 },
|
||||
{ prop: 'stationName', label: '所属电站', width: 180 },
|
||||
{ prop: 'stationVoltageLevel', label: '电站电压等级', width: 180 },
|
||||
{ prop: 'busName', label: '母线名称', width: 180 },
|
||||
|
||||
{ prop: 'busVoltageLevel', label: '母线电压等级', width: 180 },
|
||||
{ prop: 'statisticalType', label: '统计数据类型', width: 180 },
|
||||
{ prop: 'statisticalDate', label: '统计日期', width: 180 },
|
||||
{ prop: 'ovDays', label: '总超标天数', width: 180 },
|
||||
{ prop: 'avgVrms', label: '电压有效值-平均值', width: 180 },
|
||||
{ prop: 'gVrms', label: '电压有效值-95%概率大值', width: 180 },
|
||||
{ prop: 'harmVOvDays', label: '谐波电压-超标天数', width: 180 },
|
||||
{ prop: 'harmVOvDuration', label: '谐波电压-超标时长(分钟)', width: 180 },
|
||||
|
||||
{ prop: 'vunbanOvDays', label: '三相不平衡-超标天数', width: 180 },
|
||||
{ prop: 'vunbanOvDuration', label: '三相不平衡-超标时长(分钟)', width: 180 },
|
||||
{ prop: 'pltOvDays', label: '长时闪变-超标天数', width: 180 },
|
||||
{
|
||||
prop: 'pltOvDuration',
|
||||
label: '长时闪变-超标时长(分钟)',
|
||||
width: 180
|
||||
},
|
||||
{ prop: 'monitorId', label: '最优监测点编号', width: 180 },
|
||||
{ prop: 'dataSource', label: '数据来源', width: 180 }
|
||||
],
|
||||
pageData: [],
|
||||
|
||||
objId: '',
|
||||
|
||||
operateType: 0, //0.新增 1.修改
|
||||
rules: {},
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
total: 0
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
this.statisticalType = '03'
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
},
|
||||
mounted() {
|
||||
this.pageListInit()
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.height = window.sessionStorage.getItem('appheight') - 110
|
||||
},
|
||||
//获取主网运行指标统计数据
|
||||
pageListInit() {
|
||||
this.isLoading = true
|
||||
let param = {
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
orgId: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
|
||||
dataType: this.statisticalType,
|
||||
searchBeginTime: this.searchBeginTime
|
||||
}
|
||||
getCommPointBusPage(param).then(res => {
|
||||
this.total = res.data.total
|
||||
this.pageData = res.data.records
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
addReport() {
|
||||
this.diaTitle = '新增电能质量报表'
|
||||
this.operateType = 0
|
||||
this.dialogVisible = true
|
||||
},
|
||||
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNum = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//重置
|
||||
Reset() {
|
||||
this.$refs.area.form.valueTitle = '全国'
|
||||
this.$refs.interval.intervald = 1
|
||||
},
|
||||
//导出
|
||||
exportEvent() {
|
||||
this.$refs.workOrderTable.exportData({
|
||||
filename: 'export', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: this.pageData
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
getLastDayOfMonth(date) {
|
||||
// 创建一个新的日期对象,避免修改原始日期对象
|
||||
let lastDay = new Date(date)
|
||||
|
||||
// 将日期设置为下个月的第一天,然后减去1毫秒(或1天)以获取当月的最后一天
|
||||
lastDay.setMonth(lastDay.getMonth() + 1, 0)
|
||||
|
||||
// 返回最后一天的日期对象(或者只返回日期部分)
|
||||
return lastDay
|
||||
},
|
||||
|
||||
getLastDayOfYear(date) {
|
||||
// 创建一个新的日期对象,设置为当年的12月31日
|
||||
let lastDay = new Date(date.getFullYear(), 11, 31)
|
||||
|
||||
// 检查是否是闰年,如果是闰年且日期是2月29日之后的日期(理论上不可能,但为严谨性检查)
|
||||
if (lastDay.getMonth() !== 11) {
|
||||
// 这种情况理论上不会发生,但为了保险起见,重新设置为12月31日
|
||||
lastDay = new Date(date.getFullYear(), 11, 31)
|
||||
}
|
||||
|
||||
// 返回最后一天的日期对象(或者只返回日期部分)
|
||||
return lastDay
|
||||
},
|
||||
|
||||
relCal() {
|
||||
const queryDate = this.$tools.parseDate(this.searchBeginTime)
|
||||
let temData = []
|
||||
let date
|
||||
if (this.statisticalType == '01') {
|
||||
temData = ['r_upload_comm_point_y']
|
||||
date = this.$tools.formatDate(this.getLastDayOfYear(queryDate), "yyyy-MM-dd")
|
||||
} else if (this.statisticalType == '02') {
|
||||
temData = ['r_upload_comm_point_m']
|
||||
date = this.$tools.formatDate(this.getLastDayOfMonth(queryDate), "yyyy-MM-dd")
|
||||
} else if (this.statisticalType == '03') {
|
||||
temData = ['r_upload_comm_point_d']
|
||||
date = this.searchBeginTime
|
||||
}
|
||||
this.$confirm('确认重算?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
let data = {
|
||||
'fullChain': false,
|
||||
'repair': false,
|
||||
'beginTime': '',
|
||||
'endTime': '',
|
||||
'dataDate': date,
|
||||
'tagNames': temData,
|
||||
'idList': []
|
||||
}
|
||||
relcal(data).then(res => {
|
||||
|
||||
|
||||
})
|
||||
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '算法执行,请大约20s后刷新页面确认算法是否执行成功;'
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleClose() {
|
||||
this.resetForm('ruleForm')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
|
||||
|
||||
//上报网公司按钮触发
|
||||
uploadGw() {
|
||||
|
||||
|
||||
let type
|
||||
if (this.statisticalType == '03') {
|
||||
type = '日'
|
||||
} else if (this.statisticalType == '02') {
|
||||
type = '月'
|
||||
} else {
|
||||
type = '年'
|
||||
}
|
||||
|
||||
this.$confirm('是否确认上送' + type + '公共测点数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let data = {
|
||||
dataType: this.statisticalType,
|
||||
searchBeginTime: this.searchBeginTime
|
||||
}
|
||||
uploadGw(data).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.pageListInit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
selectAllChangeEvent(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
|
||||
tableDateFilter(row, column) {
|
||||
if (row.column.property == 'stationType') {
|
||||
if ('zf01' == row.row.stationType) {
|
||||
return '变电站'
|
||||
}
|
||||
} else if (row.column.property == 'dataSource') {
|
||||
if ('01' == row.row.dataSource) {
|
||||
return '监测数据'
|
||||
}
|
||||
} else {
|
||||
return row.row[row.column.property]
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
timeChange() {
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
if (this.statisticalType == '01') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 5) + '01-01'
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
} else if (this.statisticalType == '02') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) + '01'
|
||||
this.searchEndTime =
|
||||
this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) +
|
||||
this.getDaysInMonth(
|
||||
this.searchBeginTime.substring(5, 7) - 0,
|
||||
this.searchBeginTime.substring(0, 4) - 0
|
||||
)
|
||||
} else {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
}
|
||||
},
|
||||
|
||||
dateChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
},
|
||||
monthChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 8) + this.getDaysInMonth(e.substring(5, 7), e.substring(0, 4))
|
||||
},
|
||||
yearChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
},
|
||||
getDaysInMonth(month, year) {
|
||||
return new Date(year, month, 0).getDate()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
||||
406
src/views/gwPush/mainMonitor/index.vue
Normal file
406
src/views/gwPush/mainMonitor/index.vue
Normal file
@@ -0,0 +1,406 @@
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="日期">
|
||||
<div style="display: flex">
|
||||
<el-select v-model="statisticalType" style="width: 180px; margin-right: 5px"
|
||||
@change="timeChange">
|
||||
<el-option label="年" value="01"></el-option>
|
||||
<el-option label="月" value="02"></el-option>
|
||||
<el-option label="日" value="03"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker style="width: 180px" v-model="searchBeginTime"
|
||||
v-if="statisticalType == '01'" type="year" value-format="yyyy-MM-dd"
|
||||
@change="yearChange" placeholder="选择年"></el-date-picker>
|
||||
<el-date-picker style="width:180px" v-if="statisticalType == '02'" value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime" @change="monthChange" type="month"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
<el-date-picker style="width:180px" v-if="statisticalType == '03'" value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime" @change="dateChange" type="date"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-button size="small" type="primary" icon="el-icon-search" @click="
|
||||
pageNum = 1;
|
||||
pageListInit()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button type="primary" class="ml10" icon="el-icon-search" @click="uploadGw()">上送网公司
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="exportEvent">导出</el-button>
|
||||
|
||||
<el-button type="primary" icon="" @click="relCal">重新计算</el-button>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<vxe-table :data="pageData" :height="height" border size="mini" ref="workOrderTable" style="width: 100%"
|
||||
v-loading="isLoading" header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent"
|
||||
@checkbox-change="handleSelectionChange">
|
||||
<!-- <vxe-table-column key="checkboxs" type="checkbox" align="center" width="55"></vxe-table-column>-->
|
||||
|
||||
<template v-for="(item, index) in tableData">
|
||||
<vxe-table-column align="center" :field="item.prop" :title="item.label" :key="index"
|
||||
:min-width="item.width" :formatter="tableDateFilter">
|
||||
</vxe-table-column>
|
||||
</template>
|
||||
|
||||
<vxe-table-column key="uploadStatus" field="uploadStatus" title="状态" fixed="right" align="center"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" size="small" style="color: rgba(6,45,241,0.98); background: #ecf5ff"
|
||||
v-if="scope.row.uploadStatus == 0">
|
||||
未上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #34fc3e; background: #f0f9eb"
|
||||
v-if="scope.row.uploadStatus == 1">
|
||||
已上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #991717; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 2">
|
||||
取消上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small"
|
||||
style="color: rgba(236,143,21,0.92); background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 3">
|
||||
待重新上送
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
|
||||
</vxe-table>
|
||||
<el-pagination background align="right" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 30, 40, 50, 100]"
|
||||
:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
|
||||
class="mt10"></el-pagination>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { dicData } from '@/assets/commjs/dictypeData'
|
||||
import { getMainMonitorPage, uploadMainGw } from '@/api/pmsUpload/mainMonitor'
|
||||
import { relcal } from '@/api/pmsUpload/commPoint'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
vh: '',
|
||||
height: null,
|
||||
isLoading: false,
|
||||
form: {},
|
||||
dialogVisible: false,
|
||||
diaTitle: '',
|
||||
statisticalType: '03',
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
|
||||
multipleSelection: [],
|
||||
|
||||
|
||||
tableData: [
|
||||
{ prop: 'provinceOrgName', label: '所属省份', width: 180 },
|
||||
{ prop: 'cityOrgName', label: '所属地市', width: 180 },
|
||||
{ prop: 'maintOrgName', label: '运维单位', width: 180 },
|
||||
|
||||
|
||||
{ prop: 'statisticalDate', label: '统计日期', width: 180 },
|
||||
{ prop: 'statisticalType', label: '统计数据类型', width: 180 },
|
||||
|
||||
{ prop: 'monitorName', label: '监测点名称', width: 180 },
|
||||
{ prop: 'monitorVoltageLevel', label: '监测点电压等级', width: 180 },
|
||||
{ prop: 'monitorId', label: '监测点编码', width: 180 },
|
||||
{ prop: 'monitorStatus', label: '监测点状态', width: 180 },
|
||||
|
||||
|
||||
{ prop: 'substationName', label: '所属电站名称', width: 180 },
|
||||
{ prop: 'busName', label: '监测母线名称', width: 180 },
|
||||
{ prop: 'monitorObjTypeBig', label: '监测对象大类', width: 180 },
|
||||
{ prop: 'monitorObjTypeSmall', label: '监测对象小类', width: 180 },
|
||||
{ prop: 'monitorTag', label: '监测点标签', width: 180 },
|
||||
{ prop: 'monitorObjName', label: '监测对象名称', width: 180 },
|
||||
|
||||
{ prop: 'minShortCapacity', label: '最小短路容量MVA', width: 180 },
|
||||
{ prop: 'supplyEquipCapacity', label: '供电设备容量MVA', width: 180 },
|
||||
{ prop: 'userProtocolCapacity', label: '用户协议容量MVA', width: 180 },
|
||||
{
|
||||
prop: 'isMonitorOnline',
|
||||
label: '监测点是否在线',
|
||||
width: 100
|
||||
},
|
||||
{ prop: 'isTerminalOnline', label: '监测终端是否在线', width: 180 },
|
||||
{ prop: 'onlineMonitorNum', label: '在线监测点数量', width: 180 },
|
||||
|
||||
{ prop: 'runMonitorNum', label: '在运监测点数量', width: 180 },
|
||||
{ prop: 'onlineMonitorRate', label: '监测点在线率', width: 180 },
|
||||
{ prop: 'expectCollectNum', label: '应收采集数', width: 180 },
|
||||
{ prop: 'actualCollectNum', label: '实收采集数', width: 180 },
|
||||
{ prop: 'dataFullRate', label: '监测数据完整率', width: 180 },
|
||||
{ prop: 'monitorOperateDate', label: '监测点投运日期', width: 180 },
|
||||
{ prop: 'monitorStopDate', label: '监测点停运日期', width: 180 }
|
||||
],
|
||||
pageData: [],
|
||||
|
||||
objId: '',
|
||||
|
||||
operateType: 0, //0.新增 1.修改
|
||||
rules: {},
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
total: 0
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
this.statisticalType = '03'
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
},
|
||||
mounted() {
|
||||
this.pageListInit()
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.height = window.sessionStorage.getItem('appheight') - 110
|
||||
},
|
||||
//获取主网运行指标统计数据
|
||||
pageListInit() {
|
||||
this.isLoading = true
|
||||
let param = {
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
orgId: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
|
||||
dataType: this.statisticalType,
|
||||
searchBeginTime: this.searchBeginTime
|
||||
}
|
||||
getMainMonitorPage(param).then(res => {
|
||||
this.total = res.data.total
|
||||
this.pageData = res.data.records
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
getLastDayOfMonth(date) {
|
||||
// 创建一个新的日期对象,避免修改原始日期对象
|
||||
let lastDay = new Date(date)
|
||||
|
||||
// 将日期设置为下个月的第一天,然后减去1毫秒(或1天)以获取当月的最后一天
|
||||
lastDay.setMonth(lastDay.getMonth() + 1, 0)
|
||||
|
||||
// 返回最后一天的日期对象(或者只返回日期部分)
|
||||
return lastDay
|
||||
},
|
||||
|
||||
getLastDayOfYear(date) {
|
||||
// 创建一个新的日期对象,设置为当年的12月31日
|
||||
let lastDay = new Date(date.getFullYear(), 11, 31)
|
||||
|
||||
// 检查是否是闰年,如果是闰年且日期是2月29日之后的日期(理论上不可能,但为严谨性检查)
|
||||
if (lastDay.getMonth() !== 11) {
|
||||
// 这种情况理论上不会发生,但为了保险起见,重新设置为12月31日
|
||||
lastDay = new Date(date.getFullYear(), 11, 31)
|
||||
}
|
||||
|
||||
// 返回最后一天的日期对象(或者只返回日期部分)
|
||||
return lastDay
|
||||
},
|
||||
|
||||
relCal() {
|
||||
const queryDate = this.$tools.parseDate(this.searchBeginTime)
|
||||
let temData = []
|
||||
let date
|
||||
if (this.statisticalType == '01') {
|
||||
temData = ['r_upload_main_monitor_data_y']
|
||||
date = this.$tools.formatDate(this.getLastDayOfYear(queryDate), "yyyy-MM-dd")
|
||||
} else if (this.statisticalType == '02') {
|
||||
temData = ['r_upload_main_monitor_data_m']
|
||||
date = this.$tools.formatDate(this.getLastDayOfMonth(queryDate), "yyyy-MM-dd")
|
||||
} else if (this.statisticalType == '03') {
|
||||
temData = ['r_upload_main_monitor_data_d']
|
||||
date = this.searchBeginTime
|
||||
}
|
||||
this.$confirm('确认重算?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
let data = {
|
||||
'fullChain': false,
|
||||
'repair': false,
|
||||
'beginTime': '',
|
||||
'endTime': '',
|
||||
'dataDate': date,
|
||||
'tagNames': temData,
|
||||
'idList': []
|
||||
}
|
||||
relcal(data).then(res => {
|
||||
|
||||
|
||||
})
|
||||
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '算法执行,请大约20s后刷新页面确认算法是否执行成功;'
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNum = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//重置
|
||||
Reset() {
|
||||
this.$refs.area.form.valueTitle = '全国'
|
||||
this.$refs.interval.intervald = 1
|
||||
},
|
||||
//导出
|
||||
exportEvent() {
|
||||
this.$refs.workOrderTable.exportData({
|
||||
filename: 'export', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: this.pageData
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleClose() {
|
||||
this.resetForm('ruleForm')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
|
||||
|
||||
//上报网公司按钮触发
|
||||
uploadGw() {
|
||||
let type
|
||||
if (this.statisticalType == '03') {
|
||||
type = '日'
|
||||
} else if (this.statisticalType == '02') {
|
||||
type = '月'
|
||||
} else {
|
||||
type = '年'
|
||||
}
|
||||
|
||||
this.$confirm('是否确认上送' + type + '主网测点数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let data = {
|
||||
dataType: this.statisticalType,
|
||||
searchBeginTime: this.searchBeginTime
|
||||
}
|
||||
uploadMainGw(data).then(res => {
|
||||
console.log(res)
|
||||
if ((res.code == 'A0000')) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.pageListInit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
selectAllChangeEvent(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
|
||||
tableDateFilter(row, column) {
|
||||
if (row.column.property == 'stationType') {
|
||||
if ('zf01' == row.row.stationType) {
|
||||
return '变电站'
|
||||
}
|
||||
} else if (row.column.property == 'dataSource') {
|
||||
if ('01' == row.row.dataSource) {
|
||||
return '监测数据'
|
||||
}
|
||||
} else {
|
||||
return row.row[row.column.property]
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
timeChange() {
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
if (this.statisticalType == '01') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 5) + '01-01'
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
} else if (this.statisticalType == '02') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) + '01'
|
||||
this.searchEndTime =
|
||||
this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) +
|
||||
this.getDaysInMonth(
|
||||
this.searchBeginTime.substring(5, 7) - 0,
|
||||
this.searchBeginTime.substring(0, 4) - 0
|
||||
)
|
||||
} else {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
}
|
||||
},
|
||||
|
||||
dateChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
},
|
||||
monthChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 8) + this.getDaysInMonth(e.substring(5, 7), e.substring(0, 4))
|
||||
},
|
||||
yearChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
},
|
||||
getDaysInMonth(month, year) {
|
||||
return new Date(year, month, 0).getDate()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
||||
1698
src/views/gwPush/processFollow/index.vue
Normal file
1698
src/views/gwPush/processFollow/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
630
src/views/gwPush/processFollow/track/pilotRun.vue
Normal file
630
src/views/gwPush/processFollow/track/pilotRun.vue
Normal file
@@ -0,0 +1,630 @@
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="日期">
|
||||
<div style="display: flex">
|
||||
<el-select
|
||||
v-model="statisticalType"
|
||||
style="width: 180px; margin-right: 5px"
|
||||
@change="timeChange"
|
||||
>
|
||||
<el-option label="年" value="01"></el-option>
|
||||
<el-option label="月" value="02"></el-option>
|
||||
<el-option label="日" value="03"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
style="width: 180px"
|
||||
v-model="searchBeginTime"
|
||||
v-if="statisticalType == '01'"
|
||||
type="year"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="yearChange"
|
||||
placeholder="选择年"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
style="width:180px"
|
||||
v-if="statisticalType == '02'"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime"
|
||||
@change="monthChange"
|
||||
type="month"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
style="width:180px"
|
||||
v-if="statisticalType == '03'"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime"
|
||||
@change="dateChange"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="运维单位:">
|
||||
<Organization @click="queryNodeClick" ref="area" :valueTitle="editCheckName"
|
||||
:editCheckCode="editCheckCode"></Organization>
|
||||
</el-form-item>
|
||||
|
||||
<el-button size="small" type="primary" icon="el-icon-search" @click="
|
||||
pageNum = 1;
|
||||
pageListInit()">
|
||||
查询
|
||||
</el-button>
|
||||
|
||||
<el-button type="primary" style="float: right" icon="el-icon-download"
|
||||
@click="exportEvent">导出</el-button>
|
||||
|
||||
|
||||
<el-button type="primary" style="float: right" class="ml10" icon="el-icon-s-promotion"
|
||||
@click="uploadGw()">上送网公司
|
||||
</el-button>
|
||||
|
||||
<el-button style="float: right" size="small" type="primary" icon="el-icon-del" @click="delTem">删除
|
||||
</el-button>
|
||||
|
||||
<el-button style="float: right" size="small" type="primary" icon="el-icon-plus" @click="addTem">新增
|
||||
</el-button>
|
||||
|
||||
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<vxe-table :data="pageData" :height="height" border size="mini" ref="workOrderTable" style="width: 100%"
|
||||
v-loading="isLoading" header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent"
|
||||
@checkbox-change="handleSelectionChange">
|
||||
<vxe-table-column key="checkboxs" type="checkbox" align="center" width="55"></vxe-table-column>
|
||||
|
||||
<template v-for="(item, index) in tableData">
|
||||
<vxe-table-column align="center" show-overflow :field="item.prop" :title="item.label" :sortable="item.sortable"
|
||||
:key="index" :min-width="item.width" :formatter="tableDateFilter">
|
||||
</vxe-table-column>
|
||||
</template>
|
||||
|
||||
<vxe-table-column key="uploadStatus" field="uploadStatus" title="状态" fixed="right" align="center"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" size="small" style="color: #409eff; background: #ecf5ff"
|
||||
v-if="scope.row.uploadStatus == 0">
|
||||
未上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #67c23a; background: #f0f9eb"
|
||||
v-if="scope.row.uploadStatus == 1">
|
||||
已上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #909399; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 2">
|
||||
取消上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: orange; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 3">
|
||||
待重新上送
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
<vxe-table-column key="operate" field="" show-overflow align="center" title="操作" min-width="170px"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="openUpdate(scope.row)">修改
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
</vxe-table>
|
||||
<el-pagination background align="right" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 30, 40, 50, 100]"
|
||||
:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
|
||||
class="mt10"></el-pagination>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%" :before-close="handleClose">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="190px" style="padding: 0px 20px 0px 0px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运维单位:" prop="maintOrg">
|
||||
<Organization @click="handleNodeClick" ref="Organization" :valueTitle="form.maintOrgName"
|
||||
:editCheckCode="form.maintOrg"></Organization>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="临时用户档案" prop="tempUserDossierId">
|
||||
<el-select v-model="form.tempUserDossierId" filterable placeholder="请选择临时用户档案"
|
||||
@change="tempUserDossierChange">
|
||||
<el-option v-for="item in tempUserDossierList" :key="item.objId" :label="item.consName"
|
||||
:value="item.objId"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="测试结论" prop="testResult">
|
||||
<el-select v-model="form.testResult" placeholder="测试结论">
|
||||
<el-option v-for="item in [{ name: '合格', id: '01' }, { name: '越限', id: '02' }]" :key="item.id"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="越限指标" prop="ovIndexsArr">
|
||||
<el-select v-model="form.ovIndexsArr" multiple @change="ovIndexsChange" collapse-tags
|
||||
placeholder="越限指标">
|
||||
<el-option v-for="item in ovIndexsList" :key="item.gvalue" :label="item.name"
|
||||
:value="item.gvalue"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出具单位名称:" prop="issueOrgName">
|
||||
<el-input v-model="form.issueOrgName" placeholder="出具单位名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="操作人名称:" prop="operateUserName">
|
||||
<el-input v-model="form.operateUserName" placeholder="操作人名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="监测日期:" prop="monitorDate">
|
||||
<el-date-picker clearable v-model.trim="form.monitorDate" type="date"
|
||||
value-format="yyyy-MM-dd" placeholder="监测日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改状态:" prop="rectificationStatus">
|
||||
<el-select v-model="form.rectificationStatus" placeholder="整改状态">
|
||||
<el-option v-for="item in [{ name: '是', id: '1' }, { name: '否', id: '0' }]" :key="item.id"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改时间:" prop="rectificationTime">
|
||||
<el-date-picker clearable v-model.trim="form.rectificationTime" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="整改时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改人名称:" prop="rectificationUserName">
|
||||
<el-input v-model="form.rectificationUserName" placeholder="整改人名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改措施:" prop="rectificationMeasure">
|
||||
<el-input v-model="form.rectificationMeasure" placeholder="整改措施"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm('form')">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { dicData } from '@/assets/commjs/dictypeData'
|
||||
import {
|
||||
runTestCreate, getAllUserList, selectList, getRunTestById,
|
||||
pageRunTestList,
|
||||
upRunTestGw, delRunTest, runTestUpdate
|
||||
} from '@/api/pmsUpload/processFollow'
|
||||
import Organization from '@/views/Process-supervision/Supervisionmanage2/Area/Organization.vue'
|
||||
|
||||
export default {
|
||||
components: { Organization },
|
||||
data() {
|
||||
return {
|
||||
vh: '',
|
||||
height: null,
|
||||
isLoading: false,
|
||||
form: {
|
||||
objId: '',
|
||||
maintOrg: '',
|
||||
maintOrgName: '',
|
||||
testResult: '',
|
||||
rectificationTime: '',
|
||||
ovIndexs: '',
|
||||
ovIndexsArr: [],
|
||||
tempUserDossierId: '',
|
||||
issueOrgName: '',
|
||||
operateUserName: '',
|
||||
monitorDate: '',
|
||||
rectificationStatus: '',
|
||||
rectificationUserName: '',
|
||||
rectificationMeasure: ''
|
||||
},
|
||||
ovIndexsList: [],
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
statisticalType: '03',
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
|
||||
userList: [],
|
||||
multipleSelection: [],
|
||||
rectificationStatusList: [{ gvalue: '1', name: '是' }, { gvalue: '0', name: '否' }],
|
||||
tempUserDossierList: [],
|
||||
|
||||
tableData: [
|
||||
{ prop: 'cityOrgName',sortable:true, label: '所属地市', width: 180 },
|
||||
{ prop: 'maintOrgName', sortable:true, label: '运维单位', width: 180 },
|
||||
{ prop: 'tempUserDossierName', label: '用户/项目名称', width: 350 },
|
||||
{ prop: 'testResult', label: '测试结论', width: 180 },
|
||||
{ prop: 'ovIndexs', label: '越限指标', width: 180 },
|
||||
{ prop: 'issueOrgName', label: '出具单位', width: 180 },
|
||||
{ prop: 'monitorDate',sortable:true, label: '监测日期', width: 180 },
|
||||
{ prop: 'rectificationStatus',sortable:true, label: '整改状态', width: 150 },
|
||||
{ prop: 'rectificationTime',sortable:true, label: '整改时间', width: 180 },
|
||||
|
||||
{ prop: 'rectificationUserName', label: '整改人名称', width: 180 },
|
||||
{ prop: 'rectificationMeasure', label: '整改措施', width: 180 },
|
||||
{ prop: 'createTime',sortable:true, label: '创建时间', width: 180 }
|
||||
|
||||
],
|
||||
pageData: [],
|
||||
|
||||
objId: '',
|
||||
|
||||
operateType: 0, //0.新增 1.修改
|
||||
rules: {},
|
||||
|
||||
editCheckCode: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
|
||||
editCheckName: '',
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
total: 0
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
this.statisticalType = '03'
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
|
||||
this.ovIndexsList = dicData('Steady_Statis', [])
|
||||
console.log(this.ovIndexsList)
|
||||
},
|
||||
mounted() {
|
||||
this.pageListInit()
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
getAllUserList().then(res => {
|
||||
this.userList = res.data
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
openUpdate(row) {
|
||||
this.dialogTitle = '修改全过程试运行扩展数据'
|
||||
this.dialogVisible = true
|
||||
|
||||
getRunTestById({ id: row.objId }).then(res => {
|
||||
this.form = res.data
|
||||
this.form.ovIndexsArr = this.form.ovIndexs.split(',')
|
||||
let da = { maintOrg: res.data.maintOrg }
|
||||
selectList(da).then(res => {
|
||||
this.tempUserDossierList = res.data
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
// 切换选项
|
||||
handleNodeClick(data) {
|
||||
// console.log(data);
|
||||
this.form.maintOrg = data.code
|
||||
this.form.maintOrgName = data.name
|
||||
this.form.tempUserDossierId = ''
|
||||
this.form.tempUserDossierName = ''
|
||||
|
||||
let da = { maintOrg: data.code }
|
||||
selectList(da).then(res => {
|
||||
this.tempUserDossierList = res.data
|
||||
})
|
||||
},
|
||||
tempUserDossierChange(val) {
|
||||
if (val && val != null && val != '') {
|
||||
let obj = this.tempUserDossierList.find(item => item.objId === val)
|
||||
this.form.tempUserDossierName = obj.consName
|
||||
} else {
|
||||
this.form.tempUserDossierName = ''
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
setHeight() {
|
||||
this.height = window.sessionStorage.getItem('appheight') - 170
|
||||
},
|
||||
//获取主网运行指标统计数据
|
||||
pageListInit() {
|
||||
this.isLoading = true
|
||||
let param = {
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
maintOrg: this.editCheckCode,
|
||||
dataType: this.statisticalType,
|
||||
searchBeginTime: this.searchBeginTime
|
||||
}
|
||||
pageRunTestList(param).then(res => {
|
||||
this.total = res.data.total
|
||||
this.pageData = res.data.records
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
queryNodeClick(data) {
|
||||
this.editCheckCode = data.id
|
||||
this.editCheckName = data.name
|
||||
},
|
||||
|
||||
addTem() {
|
||||
this.dialogTitle = '新增全过程试运行扩展数据'
|
||||
this.operateType = 0
|
||||
this.dialogVisible = true
|
||||
this.form = {
|
||||
objId: '',
|
||||
maintOrg: '',
|
||||
maintOrgName: '',
|
||||
testResult: '',
|
||||
rectificationTime: '',
|
||||
ovIndexs: '',
|
||||
ovIndexsArr: [],
|
||||
tempUserDossierId: '',
|
||||
issueOrgName: '',
|
||||
operateUserName: '',
|
||||
monitorDate: '',
|
||||
rectificationStatus: '',
|
||||
rectificationUserName: '',
|
||||
rectificationMeasure: ''
|
||||
}
|
||||
},
|
||||
|
||||
delTem() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请选择至少一条上送'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('是否确认删除数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let objIds = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
objIds.push(item.objId)
|
||||
})
|
||||
delRunTest(objIds).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.pageListInit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNum = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//重置
|
||||
Reset() {
|
||||
this.$refs.area.form.valueTitle = '全国'
|
||||
this.$refs.interval.intervald = 1
|
||||
},
|
||||
//导出
|
||||
exportEvent() {
|
||||
this.$refs.workOrderTable.exportData({
|
||||
filename: '评估问题整改数据' + new Date().getTime(), // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: this.pageData,
|
||||
columnFilterMethod: function (column, $columnIndex) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
ovIndexsChange(val) {
|
||||
if (val) {
|
||||
if (val.length > 0) {
|
||||
this.form.ovIndexs = val.join(',')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.resetForm('form')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
if (this.dialogTitle == '新增全过程试运行扩展数据') {
|
||||
runTestCreate(this.form).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
message: '新增成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.handleClose()
|
||||
this.pageListInit()
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
runTestUpdate(this.form).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
message: '修改成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.handleClose()
|
||||
this.pageListInit()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//上报网公司按钮触发
|
||||
uploadGw() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请选择至少一条上送'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('是否确认上送数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let objIds = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
objIds.push(item.objId)
|
||||
})
|
||||
upRunTestGw(objIds).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.pageListInit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
selectAllChangeEvent(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
|
||||
tableDateFilter(row, column) {
|
||||
if (row.column.property == 'rectificationStatus') {
|
||||
let tem = this.rectificationStatusList.find(item => item.gvalue === row.row.rectificationStatus)
|
||||
if (tem) {
|
||||
return tem.name
|
||||
}
|
||||
} else if (row.column.property == 'ovIndexs') {
|
||||
if (row.row.ovIndexs != '') {
|
||||
let arr = row.row.ovIndexs.split(',')
|
||||
let tem = this.ovIndexsList.filter(item => arr.includes(item.gvalue))
|
||||
return tem.map(item => {
|
||||
return item.name
|
||||
}).join(',')
|
||||
}
|
||||
} else {
|
||||
return row.row[row.column.property]
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
dateChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
},
|
||||
monthChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 8) + this.getDaysInMonth(e.substring(5, 7), e.substring(0, 4))
|
||||
},
|
||||
yearChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
},
|
||||
getDaysInMonth(month, year) {
|
||||
return new Date(year, month, 0).getDate()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
409
src/views/gwPush/processFollow/track/track.vue
Normal file
409
src/views/gwPush/processFollow/track/track.vue
Normal file
@@ -0,0 +1,409 @@
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="日期">
|
||||
<div style="display: flex">
|
||||
<el-select
|
||||
v-model="statisticalType"
|
||||
style="width: 180px; margin-right: 5px"
|
||||
@change="timeChange"
|
||||
>
|
||||
<el-option label="年" value="01"></el-option>
|
||||
<el-option label="月" value="02"></el-option>
|
||||
<el-option label="日" value="03"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
style="width: 180px"
|
||||
v-model="searchBeginTime"
|
||||
v-if="statisticalType == '01'"
|
||||
type="year"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="yearChange"
|
||||
placeholder="选择年"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
style="width:180px"
|
||||
v-if="statisticalType == '02'"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime"
|
||||
@change="monthChange"
|
||||
type="month"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
style="width:180px"
|
||||
v-if="statisticalType == '03'"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime"
|
||||
@change="dateChange"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="运维单位:">
|
||||
<Organization @click="queryNodeClick" ref="area" :valueTitle="editCheckName"
|
||||
:editCheckCode="editCheckCode"></Organization>
|
||||
</el-form-item>
|
||||
<el-button size="small" type="primary" icon="el-icon-search" @click="
|
||||
pageNum = 1;
|
||||
pageListInit()">
|
||||
查询
|
||||
</el-button>
|
||||
|
||||
<el-button style="float: right" type="primary" icon="el-icon-download"
|
||||
@click="exportEvent">导出</el-button>
|
||||
<el-button style="float: right" type="primary" class="ml10" icon="el-icon-s-promotion"
|
||||
@click="uploadGw()">上送网公司</el-button>
|
||||
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<vxe-table :data="pageData" :height="height" border size="mini" ref="workOrderTable" style="width: 100%"
|
||||
v-loading="isLoading" header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent"
|
||||
@checkbox-change="handleSelectionChange">
|
||||
<vxe-table-column key="checkboxs" type="checkbox" align="center" width="55"></vxe-table-column>
|
||||
|
||||
<template v-for="(item, index) in tableData">
|
||||
<vxe-table-column align="center" show-overflow :field="item.prop" :title="item.label" :sortable="item.sortable"
|
||||
:key="index" :min-width="item.width" :formatter="tableDateFilter">
|
||||
</vxe-table-column>
|
||||
</template>
|
||||
|
||||
<vxe-table-column key="uploadStatus" field="uploadStatus" title="状态" fixed="right" align="center"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" size="small" style="color: #409eff; background: #ecf5ff"
|
||||
v-if="scope.row.uploadStatus == 0">
|
||||
未上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #67c23a; background: #f0f9eb"
|
||||
v-if="scope.row.uploadStatus == 1">
|
||||
已上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #909399; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 2">
|
||||
取消上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: orange; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 3">
|
||||
待重新上送
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
|
||||
</vxe-table>
|
||||
<el-pagination background align="right" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 30, 40, 50, 100]"
|
||||
:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
|
||||
class="mt10"></el-pagination>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { dicData } from '@/assets/commjs/dictypeData'
|
||||
import { pageTrackList, upGw } from '@/api/pmsUpload/processFollow'
|
||||
import Organization from '@/views/Process-supervision/Supervisionmanage2/Area/Organization.vue'
|
||||
|
||||
export default {
|
||||
components: { Organization },
|
||||
data() {
|
||||
return {
|
||||
vh: '',
|
||||
height: null,
|
||||
isLoading: false,
|
||||
form: {},
|
||||
dialogVisible: false,
|
||||
diaTitle: '',
|
||||
statisticalType: '03',
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
|
||||
multipleSelection: [],
|
||||
auditStatusList: [],
|
||||
auditResultList: [],
|
||||
proStageList: [],
|
||||
approvalStatusList: [],
|
||||
approvalResultList: [],
|
||||
|
||||
tableData: [
|
||||
{ prop: 'cityOrgName',sortable:true, label: '所属地市', width: 180 },
|
||||
{ prop: 'maintOrgName', sortable:true, label: '运维单位', width: 180 },
|
||||
{ prop: 'tempUserDossierName', label: '用户/项目名称', width: 350 },
|
||||
{ prop: 'proStage',sortable:true, label: '项目阶段', width: 180 },
|
||||
{ prop: 'auditStatus',sortable:true, label: '规划可研-评估状态', width: 180 },
|
||||
{ prop: 'auditResult',sortable:true, label: '规划可研-评估结论', width: 180 },
|
||||
{ prop: 'auditUserName', label: '规划可研-审查人名称', width: 180 },
|
||||
{ prop: 'auditTime',sortable:true, label: '规划可研-审查时间', width: 180 },
|
||||
{ prop: 'approvalStatus',sortable:true, label: '竣工验收-验收状态', width: 180 },
|
||||
|
||||
{ prop: 'approvalResult',sortable:true, label: '竣工验收-验收结论', width: 180 },
|
||||
{ prop: 'approvalDutyUserName', label: '竣工验收-验收负责人名称', width: 180 },
|
||||
{ prop: 'approvalTime',sortable:true, label: '竣工验收-验收时间', width: 180 },
|
||||
{ prop: 'consNo', label: '营销用户编号', width: 180 },
|
||||
{ prop: 'testIsOv',sortable:true, label: '试运行-是否超标', width: 180 },
|
||||
{ prop: 'allOvCountDay', label: '总超标天数', width: 180 },
|
||||
{ prop: 'monitorDay', label: '监测天数', width: 180 },
|
||||
{ prop: 'startMonitorDate', label: '开始监测日期', width: 180 },
|
||||
|
||||
{ prop: 'monitorIds', label: '关联监测点', width: 180 },
|
||||
{ prop: 'operateDate', label: '投运日期', width: 180 },
|
||||
{ prop: 'testRunDay', label: '运行天数', width: 180 },
|
||||
{
|
||||
prop: 'auditFinalTime',
|
||||
label: '审查完成时间',
|
||||
width: 180,
|
||||
sortable:true
|
||||
},
|
||||
{ prop: 'auditIssueOrgName',sortable:true, label: '审查出具单位名称', width: 180 },
|
||||
{ prop: 'professionalAuditOpinion', label: '电能质量专业审查意见', width: 180 },
|
||||
|
||||
{ prop: 'auditOrgName',sortable:true, label: '审查单位名称', width: 180 },
|
||||
{ prop: 'approvalFinalTime',sortable:true, label: '验收完成时间', width: 180 },
|
||||
{ prop: 'legacyProblem', label: '遗留问题', width: 180 },
|
||||
{ prop: 'approvalAdvise', label: '验收建议', width: 180 },
|
||||
{ prop: 'approvalJoinUserName', label: '验收参与人名称', width: 180 },
|
||||
{ prop: 'relConsTime', label: '关联营销档案时间', width: 180 },
|
||||
|
||||
{ prop: 'testResult', label: '测试结论', width: 180 },
|
||||
{ prop: 'testRunIssueOrgName', label: '试运行出具单位名称', width: 180 },
|
||||
{ prop: 'monitorDate',sortable:true, label: '监测日期', width: 180 },
|
||||
|
||||
|
||||
],
|
||||
pageData: [],
|
||||
|
||||
objId: '',
|
||||
|
||||
operateType: 0, //0.新增 1.修改
|
||||
rules: {},
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
|
||||
editCheckCode: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
|
||||
editCheckName: '',
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
this.statisticalType = '03'
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
|
||||
|
||||
this.proStageList = dicData('project_phase', [])
|
||||
this.auditStatusList = dicData('pms_eval_status', [])
|
||||
this.auditResultList = dicData('pms_eval_review', [])
|
||||
|
||||
this.approvalStatusList = dicData('pms_acceptance_phase', [])
|
||||
this.approvalResultList = dicData('pms_conclusion', [])
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.pageListInit()
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.height = window.sessionStorage.getItem('appheight') - 170
|
||||
},
|
||||
//获取主网运行指标统计数据
|
||||
pageListInit() {
|
||||
this.isLoading = true
|
||||
let param = {
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
maintOrg: this.editCheckCode,
|
||||
dataType: this.statisticalType,
|
||||
searchBeginTime: this.searchBeginTime,
|
||||
}
|
||||
pageTrackList(param).then(res => {
|
||||
this.total = res.data.total
|
||||
this.pageData = res.data.records
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
queryNodeClick(data) {
|
||||
this.editCheckCode = data.id
|
||||
this.editCheckName = data.name
|
||||
},
|
||||
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNum = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//重置
|
||||
Reset() {
|
||||
this.$refs.area.form.valueTitle = '全国'
|
||||
this.$refs.interval.intervald = 1
|
||||
},
|
||||
//导出
|
||||
exportEvent() {
|
||||
this.$refs.workOrderTable.exportData({
|
||||
filename: '全过程跟踪数据' + new Date().getTime(), // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: this.pageData,
|
||||
columnFilterMethod: function (column, $columnIndex) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleClose() {
|
||||
this.resetForm('ruleForm')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
|
||||
|
||||
//上报网公司按钮触发
|
||||
uploadGw() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请选择至少一条上送'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('是否确认上送数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let objIds = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
objIds.push(item.objId)
|
||||
})
|
||||
upGw(objIds).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.pageListInit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
selectAllChangeEvent(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
|
||||
tableDateFilter(row, column) {
|
||||
if (row.column.property == 'auditStatus') {
|
||||
let tem = this.auditStatusList.find(item => item.gvalue === row.row.auditStatus)
|
||||
if (tem) {
|
||||
return tem.name
|
||||
}
|
||||
} else if (row.column.property == 'auditResult') {
|
||||
let tem = this.auditResultList.find(item => item.gvalue === row.row.auditResult)
|
||||
if (tem) {
|
||||
return tem.name
|
||||
}
|
||||
} else if (row.column.property == 'proStage') {
|
||||
let tem = this.proStageList.find(item => item.gvalue === row.row.proStage)
|
||||
if (tem) {
|
||||
return tem.name
|
||||
}
|
||||
} else if (row.column.property == 'approvalStatus') {
|
||||
let tem = this.approvalStatusList.find(item => item.gvalue === row.row.approvalStatus)
|
||||
if (tem) {
|
||||
return tem.name
|
||||
}
|
||||
} else if (row.column.property == 'approvalResult') {
|
||||
let tem = this.approvalResultList.find(item => item.gvalue === row.row.approvalResult)
|
||||
if (tem) {
|
||||
return tem.name
|
||||
}
|
||||
} else {
|
||||
return row.row[row.column.property]
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
timeChange() {
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
if (this.statisticalType == '01') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 5) + '01-01'
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
} else if (this.statisticalType == '02') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) + '01'
|
||||
this.searchEndTime =
|
||||
this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) +
|
||||
this.getDaysInMonth(
|
||||
this.searchBeginTime.substring(5, 7) - 0,
|
||||
this.searchBeginTime.substring(0, 4) - 0
|
||||
)
|
||||
} else {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
}
|
||||
},
|
||||
|
||||
dateChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
},
|
||||
monthChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 8) + this.getDaysInMonth(e.substring(5, 7), e.substring(0, 4))
|
||||
},
|
||||
yearChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
},
|
||||
getDaysInMonth(month, year) {
|
||||
return new Date(year, month, 0).getDate()
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
||||
603
src/views/gwPush/processFollow/track/trackApproval.vue
Normal file
603
src/views/gwPush/processFollow/track/trackApproval.vue
Normal file
@@ -0,0 +1,603 @@
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<!-- <el-form-item label="日期">
|
||||
<div style="display: flex">
|
||||
<el-select
|
||||
v-model="statisticalType"
|
||||
style="width: 180px; margin-right: 5px"
|
||||
@change="timeChange"
|
||||
>
|
||||
<el-option label="年" value="01"></el-option>
|
||||
<el-option label="月" value="02"></el-option>
|
||||
<el-option label="日" value="03"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
style="width: 180px"
|
||||
v-model="searchBeginTime"
|
||||
v-if="statisticalType == '01'"
|
||||
type="year"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="yearChange"
|
||||
placeholder="选择年"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
style="width:180px"
|
||||
v-if="statisticalType == '02'"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime"
|
||||
@change="monthChange"
|
||||
type="month"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
<el-date-picker
|
||||
style="width:180px"
|
||||
v-if="statisticalType == '03'"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime"
|
||||
@change="dateChange"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="运维单位:">
|
||||
<Organization @click="queryNodeClick" ref="area" :valueTitle="editCheckName"
|
||||
:editCheckCode="editCheckCode"></Organization>
|
||||
</el-form-item>
|
||||
|
||||
<el-button size="small" type="primary" icon="el-icon-search" @click="
|
||||
pageNum = 1;
|
||||
pageListInit()">
|
||||
查询
|
||||
</el-button>
|
||||
|
||||
<el-button type="primary" style="float: right" icon="el-icon-download"
|
||||
@click="exportEvent">导出</el-button>
|
||||
<el-button type="primary" style="float: right" class="ml10" icon="el-icon-s-promotion"
|
||||
@click="uploadGw()">上送网公司</el-button>
|
||||
|
||||
|
||||
<el-button style="float: right" size="small" type="primary" icon="el-icon-del" @click="delTem">删除
|
||||
</el-button>
|
||||
|
||||
<el-button style="float: right" size="small" type="primary" icon="el-icon-plus" @click="addTem">新增
|
||||
</el-button>
|
||||
|
||||
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<vxe-table :data="pageData" :height="height" border size="mini" ref="workOrderTable" style="width: 100%"
|
||||
v-loading="isLoading" header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent"
|
||||
@checkbox-change="handleSelectionChange">
|
||||
<vxe-table-column key="checkboxs" type="checkbox" align="center" width="55"></vxe-table-column>
|
||||
|
||||
<template v-for="(item, index) in tableData">
|
||||
<vxe-table-column align="center" show-overflow :field="item.prop" :title="item.label" :sortable="item.sortable"
|
||||
:key="index" :min-width="item.width" :formatter="tableDateFilter">
|
||||
</vxe-table-column>
|
||||
</template>
|
||||
|
||||
<vxe-table-column key="uploadStatus" field="uploadStatus" title="状态" fixed="right" align="center"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" size="small" style="color: #409eff; background: #ecf5ff"
|
||||
v-if="scope.row.uploadStatus == 0">
|
||||
未上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #67c23a; background: #f0f9eb"
|
||||
v-if="scope.row.uploadStatus == 1">
|
||||
已上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #909399; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 2">
|
||||
取消上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: orange; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 3">
|
||||
待重新上送
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
<vxe-table-column key="operate" field="" show-overflow align="center" title="操作" min-width="200px"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="openUpdate(scope.row)">修改
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
</vxe-table>
|
||||
<el-pagination background align="right" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 30, 40, 50, 100]"
|
||||
:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
|
||||
class="mt10"></el-pagination>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%" :before-close="handleClose">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="190px" style="padding: 0px 20px 0px 0px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运维单位:" prop="maintOrg">
|
||||
<Organization @click="handleNodeClick" ref="Organization" :valueTitle="form.maintOrgName"
|
||||
:editCheckCode="form.maintOrg"></Organization>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="临时用户档案" prop="tempUserDossierId">
|
||||
<el-select v-model="form.tempUserDossierId" filterable placeholder="请选择临时用户档案"
|
||||
@change="tempUserDossierChange">
|
||||
<el-option v-for="item in tempUserDossierList" :key="item.objId" :label="item.consName"
|
||||
:value="item.objId"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="验收参与人" prop="approvalJoinUserId">
|
||||
<el-select v-model="form.approvalJoinUserId" placeholder="请选择验收参与人" @change="userToForm">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="验收建议" prop="approvalAdvise">
|
||||
<el-input v-model="form.approvalAdvise" placeholder="验收建议"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="遗留问题:" prop="legacyProblem">
|
||||
<el-input v-model="form.legacyProblem" placeholder="请输入遗留问题"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改状态" prop="rectificationStatus">
|
||||
<el-select v-model="form.rectificationStatus" placeholder="请选择整改状态">
|
||||
<el-option v-for="item in rectificationStatusList" :key="item.gvalue" :label="item.name"
|
||||
:value="item.gvalue"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改时间:" prop="rectificationTime">
|
||||
<el-date-picker clearable v-model.trim="form.rectificationTime" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="整改时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改人:" prop="rectificationUserId">
|
||||
<el-select v-model="form.rectificationUserId" placeholder="请选择整改人" @change="userToForm2">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改措施:" prop="rectificationMeasure">
|
||||
<el-input v-model="form.rectificationMeasure" placeholder="整改措施"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm('form')">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { dicData } from '@/assets/commjs/dictypeData'
|
||||
import {
|
||||
approvalCreate, getAllUserList, selectList, getApprovalById,
|
||||
pageApprovalList,
|
||||
upApprovalGw, delApproval
|
||||
} from '@/api/pmsUpload/processFollow'
|
||||
import Organization from '@/views/Process-supervision/Supervisionmanage2/Area/Organization.vue'
|
||||
|
||||
export default {
|
||||
components: { Organization },
|
||||
data() {
|
||||
return {
|
||||
vh: '',
|
||||
height: null,
|
||||
isLoading: false,
|
||||
form: {
|
||||
maintOrg: '',
|
||||
maintOrgName: '',
|
||||
rectificationTime: '',
|
||||
approvalJoinUserId: '',
|
||||
tempUserDossierId: '',
|
||||
legacyProblem: '',
|
||||
rectificationUserId: ''
|
||||
},
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
statisticalType: '03',
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
|
||||
userList: [],
|
||||
multipleSelection: [],
|
||||
rectificationStatusList: [{ gvalue: '1', name: '是' }, { gvalue: '0', name: '否' }],
|
||||
tempUserDossierList: [],
|
||||
|
||||
tableData: [
|
||||
{ prop: 'cityOrgName',sortable:true, label: '所属地市', width: 180 },
|
||||
{ prop: 'maintOrgName', sortable:true, label: '运维单位', width: 180 },
|
||||
{ prop: 'tempUserDossierName', label: '用户/项目名称', width: 180 },
|
||||
{ prop: 'approvalJoinUserName', label: '验收参与人名称', width: 180 },
|
||||
{ prop: 'approvalAdvise', label: '验收建议', width: 180 },
|
||||
{ prop: 'legacyProblem', label: '遗留问题', width: 180 },
|
||||
{ prop: 'rectificationStatus', label: '整改状态', width: 180 },
|
||||
{ prop: 'rectificationTime', label: '整改时间', width: 180 },
|
||||
{ prop: 'rectificationUserName', label: '整改人名称', width: 180 },
|
||||
{ prop: 'rectificationMeasure', label: '整改措施', width: 180 },
|
||||
{ prop: 'createTime', label: '创建时间', width: 180 }
|
||||
],
|
||||
pageData: [],
|
||||
|
||||
objId: '',
|
||||
|
||||
operateType: 0, //0.新增 1.修改
|
||||
rules: {},
|
||||
|
||||
editCheckCode: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
|
||||
editCheckName: '',
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
this.statisticalType = '03'
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.pageListInit()
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
getAllUserList().then(res => {
|
||||
this.userList = res.data
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
openUpdate(row) {
|
||||
this.dialogTitle = '修改评估问题整改数据'
|
||||
this.dialogVisible = true
|
||||
|
||||
getApprovalById({ id: row.objId }).then(res => {
|
||||
this.form = res.data
|
||||
let da = { maintOrg: res.data.maintOrg }
|
||||
selectList(da).then(res => {
|
||||
this.tempUserDossierList = res.data
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
// 切换选项
|
||||
handleNodeClick(data) {
|
||||
// console.log(data);
|
||||
this.form.maintOrg = data.code
|
||||
this.form.maintOrgName = data.name
|
||||
this.form.tempUserDossierId = ''
|
||||
this.form.tempUserDossierName = ''
|
||||
|
||||
let da = { maintOrg: data.code }
|
||||
selectList(da).then(res => {
|
||||
this.tempUserDossierList = res.data
|
||||
})
|
||||
},
|
||||
tempUserDossierChange(val) {
|
||||
if (val && val != null && val != '') {
|
||||
let obj = this.tempUserDossierList.find(item => item.objId === val)
|
||||
this.form.tempUserDossierName = obj.consName
|
||||
} else {
|
||||
this.form.tempUserDossierName = ''
|
||||
}
|
||||
},
|
||||
userToForm(val) {
|
||||
if (val && val != null && val != '') {
|
||||
let obj = this.userList.find(item => item.id === val)
|
||||
this.form.approvalJoinUserName = obj.name
|
||||
} else {
|
||||
this.form.approvalJoinUserName = ''
|
||||
}
|
||||
},
|
||||
|
||||
userToForm2(val) {
|
||||
if (val && val != null && val != '') {
|
||||
let obj = this.userList.find(item => item.id === val)
|
||||
this.form.rectificationUserName = obj.name
|
||||
} else {
|
||||
this.form.rectificationUserName = ''
|
||||
}
|
||||
},
|
||||
|
||||
setHeight() {
|
||||
this.height = window.sessionStorage.getItem('appheight') - 170
|
||||
},
|
||||
//获取主网运行指标统计数据
|
||||
pageListInit() {
|
||||
this.isLoading = true
|
||||
let param = {
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
maintOrg: this.editCheckCode,
|
||||
dataType: this.statisticalType,
|
||||
searchBeginTime: this.searchBeginTime,
|
||||
}
|
||||
pageApprovalList(param).then(res => {
|
||||
this.total = res.data.total
|
||||
this.pageData = res.data.records
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
queryNodeClick(data) {
|
||||
this.editCheckCode = data.id
|
||||
this.editCheckName = data.name
|
||||
},
|
||||
|
||||
addTem() {
|
||||
this.dialogTitle = '新增评估问题整改数据'
|
||||
this.operateType = 0
|
||||
this.dialogVisible = true
|
||||
},
|
||||
|
||||
delTem() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请选择至少一条上送'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('是否确认删除数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let objIds = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
objIds.push(item.objId)
|
||||
})
|
||||
delApproval(objIds).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.pageListInit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNum = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//重置
|
||||
Reset() {
|
||||
this.$refs.area.form.valueTitle = '全国'
|
||||
this.$refs.interval.intervald = 1
|
||||
},
|
||||
//导出
|
||||
exportEvent() {
|
||||
this.$refs.workOrderTable.exportData({
|
||||
filename: '评估问题整改数据' + new Date().getTime(), // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: this.pageData,
|
||||
columnFilterMethod: function (column, $columnIndex) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleClose() {
|
||||
this.resetForm('form')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
if (this.dialogTitle == '新增评估问题整改数据') {
|
||||
approvalCreate(this.form).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
message: '新增成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.handleClose()
|
||||
this.pageListInit()
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
approvalCreate(this.form).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
message: '修改成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.handleClose()
|
||||
this.pageListInit()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//上报网公司按钮触发
|
||||
uploadGw() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请选择至少一条上送'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('是否确认上送数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let objIds = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
objIds.push(item.objId)
|
||||
})
|
||||
upApprovalGw(objIds).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.pageListInit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
selectAllChangeEvent(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
|
||||
tableDateFilter(row, column) {
|
||||
if (row.column.property == 'rectificationStatus') {
|
||||
let tem = this.rectificationStatusList.find(item => item.gvalue === row.row.rectificationStatus)
|
||||
if (tem) {
|
||||
return tem.name
|
||||
}
|
||||
} else {
|
||||
return row.row[row.column.property]
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
timeChange() {
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
if (this.statisticalType == '01') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 5) + '01-01'
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
} else if (this.statisticalType == '02') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) + '01'
|
||||
this.searchEndTime =
|
||||
this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) +
|
||||
this.getDaysInMonth(
|
||||
this.searchBeginTime.substring(5, 7) - 0,
|
||||
this.searchBeginTime.substring(0, 4) - 0
|
||||
)
|
||||
} else {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
}
|
||||
},
|
||||
|
||||
dateChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
},
|
||||
monthChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 8) + this.getDaysInMonth(e.substring(5, 7), e.substring(0, 4))
|
||||
},
|
||||
yearChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
},
|
||||
getDaysInMonth(month, year) {
|
||||
return new Date(year, month, 0).getDate()
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
398
src/views/gwPush/processFollow/track/trackReport.vue
Normal file
398
src/views/gwPush/processFollow/track/trackReport.vue
Normal file
@@ -0,0 +1,398 @@
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="日期">
|
||||
<div style="display: flex">
|
||||
<el-select disabled v-model="statisticalType" style="width: 180px; margin-right: 5px"
|
||||
@change="timeChange">
|
||||
<el-option label="年" value="01"></el-option>
|
||||
<el-option label="月" value="02"></el-option>
|
||||
<el-option label="日" value="03"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker style="width: 180px" v-model="searchBeginTime"
|
||||
v-if="statisticalType == '01'" type="year" value-format="yyyy-MM-dd"
|
||||
@change="yearChange" placeholder="选择年"></el-date-picker>
|
||||
<el-date-picker style="width:180px" v-if="statisticalType == '02'" value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime" @change="monthChange" type="month"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
<el-date-picker style="width:180px" v-if="statisticalType == '03'" value-format="yyyy-MM-dd"
|
||||
v-model="searchBeginTime" @change="dateChange" type="date"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-button size="small" type="primary" icon="el-icon-search" @click="
|
||||
pageNum = 1;
|
||||
pageListInit()">
|
||||
查询
|
||||
</el-button>
|
||||
|
||||
<el-button type="primary" style="float: right" icon="el-icon-download"
|
||||
@click="exportEvent">导出</el-button>
|
||||
<el-button type="primary" style="float: right" class="ml10" icon="el-icon-s-promotion"
|
||||
@click="uploadGw()">上送网公司</el-button>
|
||||
|
||||
<el-button type="primary" style="float: right" class="ml10"
|
||||
@click="reCalReportFlag = true">重新计算</el-button>
|
||||
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<vxe-table :data="pageData" :height="height" border size="mini" ref="workOrderTable" style="width: 100%"
|
||||
v-loading="isLoading" header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent"
|
||||
@checkbox-change="handleSelectionChange">
|
||||
<vxe-table-column key="checkboxs" type="checkbox" align="center" width="55"></vxe-table-column>
|
||||
|
||||
<template v-for="(item, index) in tableData">
|
||||
<vxe-table-column align="center" show-overflow :field="item.prop" :sortable="item.sortable"
|
||||
:title="item.label" :key="index" :min-width="item.width" :formatter="tableDateFilter">
|
||||
</vxe-table-column>
|
||||
</template>
|
||||
|
||||
<vxe-table-column key="uploadStatus" field="uploadStatus" title="状态" fixed="right" align="center"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" size="small" style="color: #409eff; background: #ecf5ff"
|
||||
v-if="scope.row.uploadStatus == 0">
|
||||
未上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #67c23a; background: #f0f9eb"
|
||||
v-if="scope.row.uploadStatus == 1">
|
||||
已上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #909399; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 2">
|
||||
取消上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: orange; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 3">
|
||||
待重新上送
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
|
||||
</vxe-table>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" title="统计时间" :visible.sync="reCalReportFlag" width="20%">
|
||||
<el-form label-width="90px">
|
||||
<el-form-item label="选择时间:" class="mt20">
|
||||
<el-date-picker v-model="reCalReportFlagValue" type="month" value-format="yyyy-MM"
|
||||
:picker-options="pickerOptions" @change="changeFn" placeholder="选择月"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="reCalReport">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { dicData } from '@/assets/commjs/dictypeData'
|
||||
import { dayCalReport, getReportList, upReportGw } from '@/api/pmsUpload/processFollow'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
vh: '',
|
||||
height: null,
|
||||
isLoading: false,
|
||||
form: {},
|
||||
dialogVisible: false,
|
||||
diaTitle: '',
|
||||
statisticalType: '02',
|
||||
searchBeginTime: '',
|
||||
timeData: '',
|
||||
searchEndTime: '',
|
||||
|
||||
multipleSelection: [],
|
||||
|
||||
|
||||
tableData: [
|
||||
{ prop: 'cityOrgName', label: '所属地市名称', width: 180 },
|
||||
{ prop: 'statisticalLevel', label: '统计单位层级', width: 180 },
|
||||
{ prop: 'statisticalDate', label: '统计日期', width: 180 },
|
||||
{ prop: 'newUserNum', label: '并/入网申请当月新增用户(项目)数量(个)', width: 260 },
|
||||
{ prop: 'newUserCount', label: '并/入网申请累计新增用户(项目)数量(个)', width: 260 },
|
||||
{ prop: 'reportAuditNum', label: '规划可研当月预测评估审查数量(个)', width: 260 },
|
||||
{ prop: 'reportAuditCount', label: '规划可研累计预测评估审查数量(个)', width: 260 },
|
||||
|
||||
{ prop: 'approvalAuditNum', label: '竣工验收当月竣工核查数量(个)', width: 260 },
|
||||
{ prop: 'approvalAuditCount', label: '竣工验收累计竣工核查数量(个)', width: 260 },
|
||||
{ prop: 'approvalProblemNum', label: '竣工验收当月发现问题数量(个)', width: 260 },
|
||||
{ prop: 'approvalProblemCount', label: '竣工验收累计发现问题数量(个)', width: 260 },
|
||||
{ prop: 'approvalRectificationProblemNum', label: '竣工验收当月整改验收问题数量(个)', width: 260 },
|
||||
{ prop: 'approvalRectificationProblemCount', label: '竣工验收累计整改验收问题数量(个)', width: 260 },
|
||||
{ prop: 'testRunUserCount', label: '试运行累计转试运行用户数量(户)', width: 260 },
|
||||
{ prop: 'testRunOvUserNum', label: '试运行超标用户数量(户)', width: 180 },
|
||||
|
||||
{ prop: 'testRunOvUserRate', label: '试运行用户超标占比(%)', width: 180 },
|
||||
{ prop: 'runUserCount', label: '累计转生产运行用户数量(户)', width: 180 },
|
||||
{ prop: 'runOvUserNum', label: '生产运行超标用户数量(户)', width: 180 },
|
||||
{
|
||||
prop: 'runOvUserRate',
|
||||
label: '生产运行超标用户占比(%)',
|
||||
width: 220,
|
||||
},
|
||||
],
|
||||
pageData: [],
|
||||
|
||||
reCalReportFlagValue: '',
|
||||
reCalReportFlag: false,
|
||||
pickerOptions: {
|
||||
disabledDate: time => {
|
||||
return this.checkTime(time)
|
||||
}
|
||||
},
|
||||
objId: '',
|
||||
|
||||
operateType: 0, //0.新增 1.修改
|
||||
rules: {},
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
let day = new Date()
|
||||
this.statisticalType = '02'
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) + '01'
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.pageListInit()
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.height = window.sessionStorage.getItem('appheight') - 150
|
||||
},
|
||||
checkTime(time) {
|
||||
let t = new Date().getDate()
|
||||
// 如果想包含本月本月 - 8.64e7 * t 就不需要了,
|
||||
// 如果想之前的不能选择把 > 换成 <
|
||||
return time.getTime() > Date.now()
|
||||
},
|
||||
|
||||
changeFn(val) {
|
||||
// console.log(val);
|
||||
let year = parseInt(val.substring(0, 4))
|
||||
let month = parseInt(val.substring(5, 7))
|
||||
// console.log(year, month);
|
||||
if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
|
||||
if (month < 10) {
|
||||
this.timeData = year + '-' + '0' + month + '-31'
|
||||
} else {
|
||||
this.timeData = year + '-' + month + '-31'
|
||||
}
|
||||
} else if (month == 4 || month == 6 || month == 9 || month == 11) {
|
||||
if (month < 10) {
|
||||
this.timeData = year + '-' + '0' + month + '-30'
|
||||
} else {
|
||||
this.timeData = year + '-' + month + '-30'
|
||||
}
|
||||
} else if (month == 2) {
|
||||
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
|
||||
this.timeData = year + '-' + '0' + month + '-29'
|
||||
} else {
|
||||
this.timeData = year + '-' + '0' + month + '-28'
|
||||
}
|
||||
}
|
||||
// console.log(this.timeData);
|
||||
},
|
||||
|
||||
//获取主网运行指标统计数据
|
||||
pageListInit() {
|
||||
this.isLoading = true
|
||||
let param = {
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
orgId: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
|
||||
dataType: this.statisticalType,
|
||||
searchBeginTime: this.searchBeginTime,
|
||||
}
|
||||
getReportList(param).then(res => {
|
||||
this.pageData = res.data
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNum = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//重置
|
||||
Reset() {
|
||||
this.$refs.area.form.valueTitle = '全国'
|
||||
this.$refs.interval.intervald = 1
|
||||
},
|
||||
//导出
|
||||
exportEvent() {
|
||||
this.$refs.workOrderTable.exportData({
|
||||
filename: '全过程月报数据' + new Date().getTime(), // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: this.pageData,
|
||||
columnFilterMethod: function (column, $columnIndex) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleClose() {
|
||||
this.resetForm('ruleForm')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
|
||||
reCalReport() {
|
||||
if (this.timeData == '') {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请选择时间'
|
||||
})
|
||||
return
|
||||
}
|
||||
let param = { date: this.timeData }
|
||||
dayCalReport(param).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '重新计算成功'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
//上报网公司按钮触发
|
||||
uploadGw() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请选择至少一条上送'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('是否确认上送数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let objIds = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
objIds.push(item.objId)
|
||||
})
|
||||
upReportGw(objIds).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.pageListInit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
selectAllChangeEvent(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
|
||||
tableDateFilter(row, column) {
|
||||
if (row.column.property == 'stationType') {
|
||||
if ('zf01' == row.row.stationType) {
|
||||
return '变电站'
|
||||
}
|
||||
} else if (row.column.property == 'dataSource') {
|
||||
if ('01' == row.row.dataSource) {
|
||||
return '监测数据'
|
||||
}
|
||||
} else {
|
||||
return row.row[row.column.property]
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
timeChange() {
|
||||
let day = new Date()
|
||||
day.setDate(day.getDate() - 1)
|
||||
if (this.statisticalType == '01') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 5) + '01-01'
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
} else if (this.statisticalType == '02') {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) + '01'
|
||||
this.searchEndTime =
|
||||
this.$tools.formatDate(day, 'yyyy-MM-dd').substring(0, 8) +
|
||||
this.getDaysInMonth(
|
||||
this.searchBeginTime.substring(5, 7) - 0,
|
||||
this.searchBeginTime.substring(0, 4) - 0
|
||||
)
|
||||
} else {
|
||||
this.searchBeginTime = this.$tools.formatDate(day, 'yyyy-MM-dd')
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
}
|
||||
},
|
||||
|
||||
dateChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime
|
||||
},
|
||||
monthChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 8) + this.getDaysInMonth(e.substring(5, 7), e.substring(0, 4))
|
||||
},
|
||||
yearChange(e) {
|
||||
this.searchEndTime = this.searchBeginTime.substring(0, 5) + '12-31'
|
||||
},
|
||||
getDaysInMonth(month, year) {
|
||||
return new Date(year, month, 0).getDate()
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
||||
542
src/views/gwPush/report/index.vue
Normal file
542
src/views/gwPush/report/index.vue
Normal file
@@ -0,0 +1,542 @@
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="ml10" icon="el-icon-search" @click="uploadGw()">上送网公司</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="exportEvent">导出</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="ml10" icon="el-icon-search" @click="addReport()">新增</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<vxe-table :data="pageData" :height="height" border size="mini" ref="workOrderTable" style="width: 100%"
|
||||
v-loading="isLoading" header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent"
|
||||
@checkbox-change="handleSelectionChange">
|
||||
<vxe-table-column key="checkboxs" type="checkbox" align="center" width="55"></vxe-table-column>
|
||||
|
||||
<template v-for="(item, index) in tableData">
|
||||
<vxe-table-column align="center" :field="item.prop" :title="item.label" :key="index"
|
||||
:min-width="item.width" :formatter="tableDateFilter">
|
||||
</vxe-table-column>
|
||||
</template>
|
||||
|
||||
<vxe-table-column key="uploadStatus" field="uploadStatus" title="状态" fixed="right" align="center"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" size="small" style="color: rgba(6,45,241,0.98); background: #ecf5ff"
|
||||
v-if="scope.row.uploadStatus == 0">
|
||||
未上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #34fc3e; background: #f0f9eb"
|
||||
v-if="scope.row.uploadStatus == 1">
|
||||
已上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small" style="color: #991717; background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 2">
|
||||
取消上送
|
||||
</el-tag>
|
||||
<el-tag type="primary" size="small"
|
||||
style="color: rgba(236,143,21,0.92); background: #f4f4f5"
|
||||
v-if="scope.row.uploadStatus == 3">
|
||||
待重新上送
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
|
||||
<vxe-table-column key="operate" field="" show-overflow align="center" title="操作" min-width="200px"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="open(scope.row)">详情</el-button>
|
||||
<el-button type="primary" size="mini" @click="update(scope.row)">修改</el-button>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
</vxe-table>
|
||||
<el-pagination background align="right" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 30, 40, 50, 100]"
|
||||
:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
|
||||
class="mt10"></el-pagination>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-dialog :title="diaTitle" :visible.sync="dialogVisible" width="80%" :before-close="handleClose">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="320px" class="demo-ruleForm pd10">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="共需增加监测终端总数量" prop="all_terminal_count">
|
||||
<el-input v-model="ruleForm.all_terminal_count"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="共需增加监测终端总投资(万元)" prop="all_terminal_investment">
|
||||
<el-input v-model="ruleForm.all_terminal_investment"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="每台终端需投资(万元)" prop="one_terminal_investment">
|
||||
<el-input v-model="ruleForm.one_terminal_investment"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="监测点合计-应设点数" prop="monitor_expect_num">
|
||||
<el-input v-model="ruleForm.monitor_expect_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="监测点合计-已设点数" prop="monitor_actual_num">
|
||||
<el-input v-model="ruleForm.monitor_actual_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="监测点合计-需增设点数" prop="monitor_add_num">
|
||||
<el-input v-model="ruleForm.monitor_add_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="换流站监测-应设点数" prop="converter_expect_num">
|
||||
<el-input v-model="ruleForm.converter_expect_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="换流站监测-需增设点数" prop="converter_actual_num">
|
||||
<el-input v-model="ruleForm.converter_actual_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="共需增加监测终端总数量" prop="converter_add_num">
|
||||
<el-input v-model="ruleForm.converter_add_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="新能源场站并网的110kV及以上变电站监测-应设点数" prop="source_expect_num">
|
||||
<el-input v-model="ruleForm.source_expect_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="新能源场站并网的110kV及以上变电站监测-已设点数" prop="source_actual_num">
|
||||
<el-input v-model="ruleForm.source_actual_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="新能源场站并网的110kV及以上变电站监测-需增设点数" prop="source_add_num">
|
||||
<el-input v-model="ruleForm.source_add_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="为干扰源和敏感用户密集区供电变电站监测-应设点数" prop="park_expect_num">
|
||||
<el-input v-model="ruleForm.park_expect_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="为干扰源和敏感用户密集区供电变电站监测-已设点数" prop="park_actual_num">
|
||||
<el-input v-model="ruleForm.park_actual_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="为干扰源和敏感用户密集区供电变电站监测-需增设点数" prop="park_add_num">
|
||||
<el-input v-model="ruleForm.park_add_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="为重要或特殊用户供电变电站监测-应设点数" prop="sensitive_expect_num">
|
||||
<el-input v-model="ruleForm.sensitive_expect_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="为重要或特殊用户供电变电站监测-已设点数" prop="sensitive_actual_num">
|
||||
<el-input v-model="ruleForm.sensitive_actual_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="为重要或特殊用户供电变电站监测-需增设点数" prop="sensitive_add_num">
|
||||
<el-input v-model="ruleForm.sensitive_add_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="其他监测-应设点数" prop="other_expect_num">
|
||||
<el-input v-model="ruleForm.other_expect_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="其他监测-已设点数" prop="other_actual_num">
|
||||
<el-input v-model="ruleForm.other_actual_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="其他监测-需增设点数" prop="other_add_num">
|
||||
<el-input v-model="ruleForm.other_add_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-if="operateType == 0 || operateType == 1" @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button v-if="operateType == 0 || operateType == 1" type="primary" @click="submitForm('ruleForm')">确
|
||||
定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import { pmsReportList, addPmsReport, updatePmsReport, uploadGw } from '@/api/pmsUpload/report'
|
||||
import { dicData } from '@/assets/commjs/dictypeData'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
vh: '',
|
||||
height: null,
|
||||
isLoading: false,
|
||||
form: {},
|
||||
dialogVisible: false,
|
||||
diaTitle: '',
|
||||
|
||||
|
||||
multipleSelection: [],
|
||||
|
||||
|
||||
tableData: [
|
||||
{ prop: 'provinceOrgName', label: '省公司', width: 180 },
|
||||
{ prop: 'all_terminal_count', label: '共需增加监测终端总数量', width: 180 },
|
||||
{ prop: 'all_terminal_investment', label: '共需增加监测终端总投资(万元)', width: 250 },
|
||||
{ prop: 'one_terminal_investment', label: '每台终端需投资(万元)', width: 250 },
|
||||
{ prop: 'monitor_expect_num', label: '监测点合计-应设点数', width: 180 },
|
||||
{ prop: 'monitor_actual_num', label: '监测点合计-已设点数', width: 180 },
|
||||
{ prop: 'monitor_add_num', label: '监测点合计-需增设点数', width: 180 },
|
||||
|
||||
{ prop: 'converter_expect_num', label: '换流站监测-应设点数', width: 180 },
|
||||
{ prop: 'converter_actual_num', label: '换流站监测-已设点数', width: 180 },
|
||||
{ prop: 'converter_add_num', label: '换流站监测-需增设点数', width: 180, showOverflow: true },
|
||||
{ prop: 'source_expect_num', label: '新能源场站并网的110kV及以上变电站监测-应设点数', width: 250 },
|
||||
{ prop: 'source_actual_num', label: '新能源场站并网的110kV及以上变电站监测-已设点数', width: 250 },
|
||||
{ prop: 'source_add_num', label: '新能源场站并网的110kV及以上变电站监测-需增设点数', width: 250 },
|
||||
{ prop: 'park_expect_num', label: '为干扰源和敏感用户密集区供电变电站监测-应设点数', width: 250 },
|
||||
{ prop: 'park_actual_num', label: '为干扰源和敏感用户密集区供电变电站监测-已设点数', width: 250 },
|
||||
|
||||
{ prop: 'park_add_num', label: '为干扰源和敏感用户密集区供电变电站监测-需增设点数', width: 250 },
|
||||
{ prop: 'sensitive_expect_num', label: '为重要或特殊用户供电变电站监测-应设点数', width: 250 },
|
||||
{ prop: 'sensitive_actual_num', label: '为重要或特殊用户供电变电站监测-已设点数', width: 250 },
|
||||
{
|
||||
prop: 'sensitive_add_num',
|
||||
label: '为重要或特殊用户供电变电站监测-需增设点数',
|
||||
width: 250,
|
||||
showOverflow: true
|
||||
},
|
||||
{ prop: 'other_expect_num', label: '其他监测-应设点数', width: 180 },
|
||||
{ prop: 'other_actual_num', label: '其他监测-已设点数', width: 180 },
|
||||
{ prop: 'other_add_num', label: '其他监测-需增设点数', width: 180 },
|
||||
|
||||
],
|
||||
pageData: [],
|
||||
|
||||
objId: '',
|
||||
|
||||
ruleForm: {
|
||||
|
||||
provinceOrg: '',
|
||||
all_terminal_count: null,
|
||||
all_terminal_investment: null,
|
||||
one_terminal_investment: null,
|
||||
monitor_expect_num: null,
|
||||
monitor_actual_num: null,
|
||||
monitor_add_num: null,
|
||||
converter_expect_num: null,
|
||||
converter_actual_num: null,
|
||||
converter_add_num: null,
|
||||
source_expect_num: null,
|
||||
source_actual_num: null,
|
||||
source_add_num: null,
|
||||
park_expect_num: null,
|
||||
park_actual_num: null,
|
||||
park_add_num: null,
|
||||
sensitive_expect_num: null,
|
||||
sensitive_actual_num: null,
|
||||
sensitive_add_num: null,
|
||||
other_expect_num: null,
|
||||
other_actual_num: null,
|
||||
other_add_num: null
|
||||
|
||||
},
|
||||
|
||||
operateType: 0, //0.新增 1.修改
|
||||
rules: {},
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.pageListInit()
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.height = window.sessionStorage.getItem('appheight') - 110
|
||||
},
|
||||
//获取主网运行指标统计数据
|
||||
pageListInit() {
|
||||
this.isLoading = true
|
||||
let param = {
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
pmsReportList(param).then(res => {
|
||||
let tam = []
|
||||
this.total = res.data.total
|
||||
let temArr = res.data.records
|
||||
temArr.forEach(item => {
|
||||
let obj = JSON.parse(item.reportData)
|
||||
obj.provinceOrgName = item.provinceOrgName
|
||||
obj.createTime = item.createTime
|
||||
obj.objId = item.objId
|
||||
obj.uploadStatus = item.uploadStatus
|
||||
tam.push(obj)
|
||||
})
|
||||
this.pageData = tam
|
||||
|
||||
console.log(this.pageData)
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
addReport() {
|
||||
this.diaTitle = '新增电能质量报表'
|
||||
this.operateType = 0
|
||||
this.dialogVisible = true
|
||||
},
|
||||
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNum = val
|
||||
this.pageListInit()
|
||||
},
|
||||
//重置
|
||||
Reset() {
|
||||
this.$refs.area.form.valueTitle = '全国'
|
||||
this.$refs.interval.intervald = 1
|
||||
},
|
||||
//导出
|
||||
exportEvent() {
|
||||
this.$refs.workOrderTable.exportData({
|
||||
filename: 'export', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: this.pageData
|
||||
})
|
||||
},
|
||||
|
||||
//工单
|
||||
open(row) {
|
||||
this.diaTitle = '查看电能质量报表'
|
||||
this.dialogVisible = true
|
||||
this.operateType = 3
|
||||
this.ruleForm = row
|
||||
},
|
||||
update(row) {
|
||||
this.diaTitle = '修改电能质量报表'
|
||||
this.objId = row.objId
|
||||
this.operateType = 1
|
||||
this.dialogVisible = true
|
||||
this.ruleForm = row
|
||||
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.resetForm('ruleForm')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
let data = {
|
||||
reportType: '01',
|
||||
reportData: JSON.stringify(this.ruleForm)
|
||||
}
|
||||
|
||||
if (this.operateType == 0) {
|
||||
addPmsReport(data).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
message: '新增成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.handleClose()
|
||||
this.pageListInit()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
data.objId = this.objId
|
||||
updatePmsReport(data).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
this.$message({
|
||||
message: '修改成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.handleClose()
|
||||
this.pageListInit()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
|
||||
|
||||
//上报网公司按钮触发
|
||||
uploadGw() {
|
||||
if (this.multipleSelection.length == 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '请选择一条报表!!!',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
this.$confirm('是否确认上送电能质量报表?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let planIds = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
planIds.push(item.objId)
|
||||
})
|
||||
|
||||
uploadGw(planIds).then(res => {
|
||||
if ((res.code == 'A0000')) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
}
|
||||
this.onSubmit()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消上送'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
selectAllChangeEvent(val) {
|
||||
this.multipleSelection = val.records
|
||||
},
|
||||
|
||||
tableDateFilter(row, column) {
|
||||
if (row.column.property == 'orgLevel') {
|
||||
if ('3' == row.row.orgLevel) {
|
||||
return '省'
|
||||
} else {
|
||||
return '市'
|
||||
}
|
||||
} else if (row.column.property == 'orderType') {
|
||||
let title = ''
|
||||
this.workOrderTypeList.forEach(item => {
|
||||
if (item.code == row.row.orderType) {
|
||||
title = item.name
|
||||
}
|
||||
})
|
||||
console.log(title)
|
||||
return title
|
||||
} else if (row.column.property == 'businessType') {
|
||||
let title = ''
|
||||
this.workBusinessSortList.forEach(item => {
|
||||
if (item.code == row.row.businessType) {
|
||||
title = item.name
|
||||
}
|
||||
})
|
||||
return title
|
||||
} else if (row.column.property == 'orderSource') {
|
||||
let title = ''
|
||||
this.workOrderSourceList.forEach(item => {
|
||||
if (item.code == row.row.orderSource) {
|
||||
title = item.name
|
||||
}
|
||||
})
|
||||
return title
|
||||
} else if (row.column.property == 'isFeedback') {
|
||||
if ('0' == row.row.isFeedback) {
|
||||
return '否'
|
||||
} else {
|
||||
return '是'
|
||||
}
|
||||
|
||||
} else if (row.column.property == 'uploadStatus') {
|
||||
if ('0' == row.row.uploadStatus) {
|
||||
return '否'
|
||||
} else {
|
||||
return '是'
|
||||
}
|
||||
|
||||
} else {
|
||||
return row.row[row.column.property]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
||||
Reference in New Issue
Block a user