Files
hb_pqs_web/src/views/Process-supervision/Supervisionmanage2/Workplan.vue

3279 lines
143 KiB
Vue
Raw Normal View History

2025-01-09 19:02:44 +08:00
<template>
<div class="pd10" element-loading-text="数据加载中">
<el-form ref="form" inline :model="formData" style="overflow-y: auto;height: 46px ">
<el-form-item class="box">
<Area @click="handleNodeClick" ref="area" @send="takeover"></Area>
</el-form-item>
<el-form-item>
<Timeinterval :interval="3" ref="Timeinterval"></Timeinterval>
</el-form-item>
<el-form-item label="监督类型筛选:" class="box">
<el-select v-model="formData.supvType" clearable placeholder="请选择监督类型">
<el-option v-for="item in supervisionType" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-button size="small" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-circle-plus" @click="addFn">新增
</el-button>
<el-button size="small" type="primary" icon="el-icon-delete" @click="deleteFn">删除</el-button>
<el-button size="small" type="primary" v-if="biaoCode === 'jsjdpush'" @click="planPush">
上送网公司
</el-button>
<el-button size="small" type="primary" v-if="biaoCode1 === 'jsjdjhdelete'" @click="cancelPlanPush">
取消上送
</el-button>
<el-button size="small" type="primary" v-if="biaoCode4 === 'tsfjwtpush'" @click="planAnnexPush">
附件上送
</el-button>
<el-button size="small" type="primary" icon="el-icon-download" @click="exportEvent">导出计划</el-button>
<el-button size="small" type="primary" icon="el-icon-download" @click="exportProblems">
导出问题
</el-button>
<!-- <el-form-item style="float: right">
</el-form-item> -->
<!-- <el-form-item>
<el-button type="text" @click="closeHandle">
条件筛选
<i :class="!view ? 'el-icon-arrow-down' : 'el-icon-arrow-right'"></i>
</el-button>
</el-form-item>-->
</el-form>
<div class="container" id="container">
<i @click="closeHandle" class="el-icon-circle-close coles"></i>
<el-form :inline="true" style="margin-top: 10px" label-width="110px" class="">
</el-form>
</div>
<div class="boxS">
<div class="boxTableS">
<vxe-table stripe size="mini" :row-config="{ isCurrent: true, isHover: true }" :data="tableData"
ref="plan" v-loading="loading" highlight-current-row border :height="vh"
header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent"
@checkbox-change="handleSelectionChange">
<vxe-table-column type="checkbox" align="center" width="55"></vxe-table-column>
<vxe-table-column field="province" show-overflow align="center" title="所属省份"
min-width="150px"></vxe-table-column>
<vxe-table-column field="city" show-overflow align="center" title="所属地市" min-width="150px">
<template slot-scope="scope">
{{ scope.row.city == null ? '/' : scope.row.city }}
</template>
</vxe-table-column>
<vxe-table-column field="county" show-overflow align="center" title="所属县区" min-width="150px">
<template slot-scope="scope">
{{ scope.row.county == null ? '/' : scope.row.county }}
</template>
</vxe-table-column>
<vxe-table-column field="supvOrgName" show-overflow align="center" title="监督单位"
min-width="150px"></vxe-table-column>
<vxe-table-column field="planOrgName" show-overflow align="center" title="计划编制单位"
min-width="150px"></vxe-table-column>
<vxe-table-column field="workPlanName" show-overflow align="center" title="计划名称"
min-width="250px"></vxe-table-column>
<!-- <vxe-table-column field="effectUserId" show-overflow align="center" title="实施人员" min-width="100px"></vxe-table-column> -->
<vxe-table-column field="planSupvDate" :sortable="true" show-overflow align="center" title="计划监督时间"
min-width="130px">
<template slot-scope="scope">
{{ scope.row.planSupvDate.substring(0, 7) }}
</template>
</vxe-table-column>
<vxe-table-column field="supvType" show-overflow align="center" title="监督类型" min-width="150px"
:formatter="formFilter"></vxe-table-column>
<vxe-table-column field="supvStage" show-overflow align="center" title="监督阶段" min-width="100px"
:formatter="formFilter"></vxe-table-column>
<vxe-table-column field="supvObjType" show-overflow align="center" title="监督对象类型" min-width="150px"
:formatter="formFilter"></vxe-table-column>
<vxe-table-column field="supvObjName" show-overflow align="center" title="监督对象名称"
min-width="150px"></vxe-table-column>
<!-- <vxe-table-column
field="objTypeName"
show-overflow
align="center"
title="监督对象属性名称"
min-width="140px"
></vxe-table-column> -->
<vxe-table-column field="objType" show-overflow align="center" title="监督对象属性" min-width="150px"
:formatter="formFilter"></vxe-table-column>
<vxe-table-column field="objVoltageLevel" show-overflow align="center" title="监督对象电压等级"
min-width="140px" :formatter="formFilter"></vxe-table-column>
<vxe-table-column field="substationName" show-overflow align="center" title="监督关联电站名称"
min-width="140px"></vxe-table-column>
<vxe-table-column field="substationVoltageLevel" show-overflow align="center" title="监督关联电站电压等级"
min-width="170px" :formatter="formFilter"></vxe-table-column>
<vxe-table-column field="objCapacity" show-overflow align="center" title="监督对象协议容量(MVA)"
min-width="180px"></vxe-table-column>
<vxe-table-column field="effectStartTime" :sortable="true" show-overflow align="center"
title="实施开始时间" min-width="150px"></vxe-table-column>
<vxe-table-column field="effectEndTime" :sortable="true" show-overflow align="center" title="实施结束时间"
min-width="150px"></vxe-table-column>
<vxe-table-column field="effectStatus" show-overflow align="center" title="实施状态" min-width="100px">
<template slot-scope="scope">
<span v-if="scope.row.effectStatus == '01'">未开展</span>
<span v-if="scope.row.effectStatus == '02'">开展中</span>
<span v-if="scope.row.effectStatus == '03'">待审核</span>
<span v-if="scope.row.effectStatus == '04'">已完成</span>
</template>
</vxe-table-column>
<vxe-table-column field="planUserName" show-overflow align="center" title="计划编制人"
min-width="150px"></vxe-table-column>
<vxe-table-column field="createTime" :sortable="true" show-overflow align="center" title="创建时间"
min-width="150px"></vxe-table-column>
<vxe-table-column field="problemOcTime" show-overflow align="center" title="电能质量问题发生时间"
min-width="170px"></vxe-table-column>
<vxe-table-column field="reportIssueTime" show-overflow align="center" title="报告出具时间"
min-width="170px"></vxe-table-column>
<vxe-table-column field="planStatus" show-overflow align="center" title="计划状态" min-width="100px"
:formatter="formFilter"></vxe-table-column>
<vxe-table-column field="otherRemark" show-overflow align="center" title="其他要求"
min-width="170px"></vxe-table-column>
<vxe-table-column field="isUploadHead" show-overflow align="center" title="上送网公司" min-width="100px"
fixed="right">
<template slot-scope="scope">
<el-tag type="primary" size="mini" style="color: #409eff; background: #ecf5ff"
v-if="scope.row.isUploadHead == 0">
未上送
</el-tag>
<el-tag type="primary" size="mini" style="color: #67c23a; background: #f0f9eb"
v-if="scope.row.isUploadHead == 1">
已上送
</el-tag>
<el-tag type="primary" size="mini" style="color: #909399; background: #f4f4f5"
v-if="scope.row.isUploadHead == 2">
取消上送
</el-tag>
<el-tag type="primary" size="mini" style="color: orange; background: #f4f4f5"
v-if="scope.row.isUploadHead == 3">
待重新上送
</el-tag>
</template>
</vxe-table-column>
<vxe-table-column field="" show-overflow align="center" title="操作" min-width="350px" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="problems(scope.row)">实施问题</el-button>
<el-button type="primary" size="mini" @click="viewsXquery(scope.row)">详情</el-button>
<el-button type="primary" size="mini" @click="modifyFn(scope.row)">修改</el-button>
<!-- <el-button type="primary" size="mini" :disabled="scope.row.isUploadHead == 1? true : false" @click="modifyFn(scope.row)">修改</el-button> -->
<el-dropdown size="mini" style="margin-left: 10px;">
<el-button type="primary" size="mini">
更多<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
<el-button style="" size="mini" type="primary"
@click="planUploadFn(scope.row)">上传附件
</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button style="margin-top: 10px" size="mini" type="primary"
@click="lookFn(scope.row)">查看附件
</el-button>
</el-dropdown-item>
<el-dropdown-item v-if="scope.row.supvType == '994f2bf76d8e7423a5cad97a1d878738'">
<el-button style="margin-top: 10px" size="mini" type="primary"
@click="capacitorFlagDialog(scope.row)">关联对象
</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</vxe-table-column>
</vxe-table>
<el-pagination background align="right" @size-change="handleSizeChange"
@current-change="handleCurrentChange" :current-page="formData.pageNum"
:page-sizes="[20, 30, 40, 50, 100]" :page-size="formData.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="total" class="mt10"></el-pagination>
</div>
</div>
<!-- 新增/修改 -->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="addinformation"
:before-close="handleClose" width="60%" height="80%">
<div class="border">
<div class="border-title">
<span>基本内容</span>
</div>
<el-form :inline="true" :model="form" :disabled="planDisabled" class="form" style="margin-right: 10px"
ref="form" :rules="rules" label-width="200px">
<el-form-item label="计划名称:" prop="workPlanName" class="mt10">
<el-input v-model="form.workPlanName" disabled></el-input>
</el-form-item>
<el-form-item label="监督单位:" class="mt10" prop="supvOrgName">
<Organization @click="supvOrgNameChange" ref="Organization" :valueTitle="valueTitle"
:editCheckCode="editCheckCode"></Organization>
</el-form-item>
<el-form-item label="计划编制单位:" class="mt10" prop="planOrgName">
<Operation @click="handleNodeClick2" ref="Operation" :valueTitle="valueTitle1"
:editCheckCode="editCheckCode1"></Operation>
</el-form-item>
<el-form-item label="计划编制人员:" class="mt10">
<el-select v-model="form.planUserId" placeholder="计划编制人员" @change="$forceUpdate()">
<el-option v-for="item in planUserList" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="监督类型:" prop="supvType" class="mt10">
<el-select v-model="form.supvType" clearable placeholder="请选择监督类型" @change="changeSupv">
<el-option v-for="item in supervisionType" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="监督阶段:" prop="supvStage" class="mt10">
<el-select v-model="form.supvStage" clearable placeholder="请选择监督阶段">
<el-option v-for="item in phase" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="计划监督时间:" prop="planSupvDate" class="mt10">
<el-date-picker v-model="form.planSupvDate" value-format="yyyy-MM-dd" type="month"
placeholder="选择日期" @change="changeFn"></el-date-picker>
</el-form-item>
<el-form-item label="监督对象类型:" prop="supvObjType" class="mt10">
<el-select v-model="form.supvObjType" clearable placeholder="请选择监督对象类型">
<el-option v-for="item in supervisionObjType" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="supvTypeFlag" label="监督对象名称:" prop="supvObjName" class="mt10">
<el-input v-model="form.supvObjName" clearable placeholder="请输入监督对象名称"
@change="changeFn1"></el-input>
</el-form-item>
<el-form-item v-if="!supvTypeFlag" label="监督对象名称:" prop="supvObjId" class="mt10">
<el-select v-model="form.supvObjId" @change="changeSupvObjName" clearable
placeholder="请选择监督对象名称">
<el-option v-for="item in supvObjNameList" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="监督对象电压等级:" prop="objVoltageLevel" class="mt10">
<el-select v-model="form.objVoltageLevel" clearable placeholder="请选择监督对象电压等级">
<el-option v-for="item in voltageLevel" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="监督对象属性:" prop="objType" class="mt10">
<el-select v-model="form.objType" clearable :disabled="!rules.objType[0].required"
placeholder="请选择监监督对象属性" @change="changeObjType" @clear="clear('objType', 'objTypeName')">
<el-option v-for="item in superviseProperties" :key="item.gvalue" :label="item.name"
:value="item.gvalue"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="监督对象属性名称:" prop="objTypeName" class="mt10">
<el-input v-model="form.objTypeName" clearable placeholder="请输入监督对象属性名称"></el-input>
</el-form-item> -->
<el-form-item label="监督对象协议容量(MVA):" prop="objCapacity" class="mt10">
<el-input v-model="form.objCapacity" clearable placeholder="请输入监督对象协议容量"></el-input>
</el-form-item>
<el-form-item label="监督对象关联电站:" prop="substationName" class="mt10">
<el-input v-model="form.substationName" clearable placeholder="请输入监督对象关联电站"></el-input>
</el-form-item>
<el-form-item label="监督对象关联电站电压等级:" prop="substationVoltageLevel" class="mt10">
<el-select v-model="form.substationVoltageLevel" clearable placeholder="请选择监督对象关联电站电压等级">
<el-option v-for="item in voltageLevel" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="实施状态:" prop="effectStatus" class="mt10">
<el-select v-model="form.effectStatus" clearable placeholder="请选择实施状态" @change="changeStatus">
<el-option v-for="item in status" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="开始实施时间:" prop="effectStartTime" class="mt10">
<el-date-picker v-model="form.effectStartTime" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="结束实施时间:" prop="effectEndTime" class="mt10">
<el-date-picker v-model="form.effectEndTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="报告出具时间:" prop="reportIssueTime" class="mt10">
<el-date-picker v-model="form.reportIssueTime" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" placeholder="选择日期时间"></el-date-picker>
</el-form-item>
<el-form-item label="电能质量问题发生时间:" prop="problemOcTime" class="mt10">
<el-date-picker v-model="form.problemOcTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
placeholder="选择日期时间"></el-date-picker>
</el-form-item>
<el-form-item label="实施人员:" class="mt10">
<el-select v-model="form.effectUserId" clearable placeholder="请选择实施人员">
<el-option v-for="item in ImplementationPeople" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="计划状态:" prop="planStatus" class="mt10">
<el-select v-model="form.planStatus" clearable placeholder="请选择计划状态">
<el-option v-for="item in planStatusHis" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="其他要求:" prop="planName" class="mt10">
<el-input v-model="form.otherRemark" type="textarea" autosize clearable></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer" v-if="isok">
<el-button type="primary" @click="handleClose"> </el-button>
<el-button v-if="add" type="primary" @click="addinformationFn"> </el-button>
<el-button v-if="modify" type="primary" @click="modifyinformationFn"> </el-button>
</span>
</el-dialog>
<!-- 问题新增/修改 -->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="problemAddinformation"
:before-close="problemHandleClose" width="60%" height="80%">
<div class="border1">
<div class="border-title1">
<span>技术监督实施问题</span>
</div>
<el-form :inline="true" :model="ruleform" class="form" label-width="140px" style="margin-right: 10px"
ref="ruleform" :rules="rules1">
<el-form-item label="责任单位:" class="mt10" prop="dutyOrgName">
<Company @click="handleNodeClick3" ref="Organization" :valueTitle="valueTitle"
:disabled="problemDisabled" :editCheckCode="editCheckCode"></Company>
</el-form-item>
<el-form-item label="监测点类型:" prop="monitorType" class="mt10">
<el-select v-model="ruleform.monitorType" clearable placeholder="请选择监测点类型"
:disabled="problemDisabled">
<el-option v-for="item in monitoring" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否发布预告警:" prop="ifReleaseWarning" class="mt10">
<el-select v-model="ruleform.ifReleaseWarning" clearable placeholder="请选择是否发不预告警"
:disabled="problemDisabled">
<el-option v-for="item in ReleaseWarning" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="计划整改时间:" prop="planRectificationTime" class="mt10">
<el-date-picker v-model="ruleform.planRectificationTime" value-format="yyyy-MM-dd" type="date"
placeholder="选择日期" :disabled="problemDisabled"></el-date-picker>
</el-form-item>
<el-form-item label="整改情况:" prop="rectificationStatus" class="mt10">
<el-select v-model="ruleform.rectificationStatus" clearable placeholder="请选择整改情况"
:disabled="problemDisabled1">
<el-option v-for="item in rectification" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="整改时间:" prop="rectificationTime" class="mt10">
<el-date-picker v-model="ruleform.rectificationTime" value-format="yyyy-MM-dd" type="date"
placeholder="选择日期" :disabled="problemDisabled1"></el-date-picker>
</el-form-item>
<el-form-item label="监督标准:" prop="supvStandard" class="mt10">
<el-input v-model="ruleform.supvStandard" placeholder="请输入监督标准"
:disabled="problemDisabled"></el-input>
</el-form-item>
<el-form-item label="监督标准序号:" prop="supvStandardSort" class="mt10">
<el-input v-model="ruleform.supvStandardSort" placeholder="请输入监督标准序号"
:disabled="problemDisabled"></el-input>
</el-form-item>
<el-form-item label="标准出处:" prop="supvResouce" class="mt10">
<el-input v-model="ruleform.supvResouce" placeholder="请输入标准出处"
:disabled="problemDisabled"></el-input>
</el-form-item>
<el-form-item label="问题等级:" prop="problemLevel" class="mt10">
<el-select v-model="ruleform.problemLevel" clearable placeholder="请选择问题等级"
:disabled="problemDisabled">
<el-option v-for="item in questionLevel" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="问题类型:" prop="problemType" class="mt10">
<el-select v-model="ruleform.problemType" clearable placeholder="请选择问题类型"
:disabled="problemDisabled">
<el-option v-for="item in questionType" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="问题出处:" prop="problemsource" class="mt10" >
<el-input v-model="ruleform.problemsource"></el-input>
</el-form-item> -->
<el-form-item label="问题简要描述:" prop="simpleProblemDesc" class="mt10">
<el-input v-model="ruleform.simpleProblemDesc" placeholder="请输入问题简要描述"
:disabled="problemDisabled"></el-input>
</el-form-item>
<el-form-item label="问题描述:" prop="problemDesc" class="mt10">
<el-input v-model="ruleform.problemDesc" placeholder="请输入问题描述"
:disabled="problemDisabled"></el-input>
</el-form-item>
<el-form-item label="问题发现时间:" prop="discoveryTime" class="mt10">
<el-date-picker v-model="ruleform.discoveryTime" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" placeholder="选择日期时间" :disabled="problemDisabled"></el-date-picker>
</el-form-item>
<el-form-item label="定级依据:" prop="problemLevelReason" class="mt10">
<el-input v-model="ruleform.problemLevelReason" placeholder="请输入定级依据"
:disabled="problemDisabled"></el-input>
</el-form-item>
<!-- <el-form-item label="问题依据:" prop="problembasis" class="mt10" >
<el-select
v-model="ruleform.problembasis"
clearable
placeholder="请选择问题依据"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="整改方案:" prop="rectificationProgramme" class="mt10">
<el-input v-model="ruleform.rectificationProgramme" placeholder="请输入整改方案"
:disabled="problemDisabled"></el-input>
<!-- <el-select
v-model="ruleform.rectificationProgramme"
clearable
placeholder="请选择整改方案"
:disabled="problemDisabled"
>
<el-option
v-for="item in programme"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> -->
</el-form-item>
<!-- <el-form-item label="问题简要描述:" prop="problemdescription " class="mt10" >
<el-input v-model="ruleform.problemdescription" type="textarea" autosize></el-input>
</el-form-item> -->
<el-form-item label="整改措施:" prop="rectificationMeasure" class="mt10">
<el-input v-model="ruleform.rectificationMeasure" type="textarea" autosize placeholder="请输入整改措施"
:disabled="problemDisabled1"></el-input>
</el-form-item>
<el-form-item label="备注:" prop="measures " class="mt10">
<el-input v-model="ruleform.remark" type="textarea" autosize placeholder="请输入备注"
:disabled="problemDisabled"></el-input>
</el-form-item>
<el-form-item label="关联告预警单:" prop="workAlarmId" class="mt10">
<el-select v-model="ruleform.workAlarmId" clearable filterable placeholder="请选择关联告预警单">
<el-option v-for="item in workAlarmList" :key="item.alarmId"
:label="item.billNo + '_' + item.billName" :value="item.alarmId">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer" v-if="isok1">
<el-button type="primary" @click="problemHandleClose"> </el-button>
<el-button v-if="add" type="primary" @click="problemAddinformationFn"> </el-button>
<el-button v-if="modify" type="primary" @click="problemModifyinformationFn"> </el-button>
</span>
</el-dialog>
<!-- 上传文件 -->
<el-dialog :close-on-click-modal="false" title="附件上传" :visible.sync="uploadInformation"
:before-close="uploadClose" width="20%" class="dialog" height="280px">
<el-form label-width="100px" :model="formLine" ref="form" :rules="rules">
<el-form-item label="附件分类:" class="mt10" prop="classification">
<el-select v-model="formLine.classification" clearable placeholder="请选择附件分类">
<el-option v-for="item in classificationData" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="报告时间:" class="mt20 timeBox" prop="uploadTime">
<el-date-picker v-model="formLine.uploadTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
placeholder="选择日期时间"></el-date-picker>
</el-form-item>
<el-form-item label="上送人:" class="mt20" prop="uploaderName">
<el-select v-model="formLine.uploaderId" clearable placeholder="请选择上送人" @change="changeUploaderName"
@clear="clear1('uploaderId', 'uploaderName')">
<el-option v-for="item in ImplementationPeople" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="附件:" class="mt20">
<el-upload ref="upload" action="#" class="upload-files" accept="" :headers="headers" name="file"
multiple :auto-upload="false" :file-list="fileList" :on-change="handleChange" :limit="1"
:on-exceed="handleExceed" :before-remove="beforeRemove">
<el-button slot="trigger" size="mini" type="primary">选取文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="uploadClose"> </el-button>
<el-button type="primary" @click="uploadFn"> </el-button>
</span>
</el-dialog>
<!-- 技术监督实施问题 -->
<el-dialog :close-on-click-modal="false" title="技术监督实施问题" :visible.sync="Implementation"
:before-close="implementationClose" width="90%" height="90%">
<div v-loading="isLoading1" element-loading-text="数据加载中">
<el-form ref="form" :inline="true">
<!-- <el-form-item>
<Timeinterval :interval="3" ref="Timeinterval"></Timeinterval>
</el-form-item> -->
<el-form-item>
<!-- <el-button size="small" type="primary" icon="el-icon-search" @click="problemOnSubmit">查询</el-button> -->
<el-button size="small" type="primary" icon="el-icon-circle-plus" @click="problemAddFn">
新增
</el-button>
<el-button size="small" type="primary" icon="el-icon-delete" @click="problemDeleteFn">
删除
</el-button>
<el-button size="small" type="primary" icon="el-icon-download" @click="exportEvent1">
导出
</el-button>
<el-button size="small" type="primary" v-if="biaoCode2 === 'ssjsjdpushQuestion'"
@click="problemPush">
上送问题
</el-button>
<!-- <el-button size="small" type="primary" v-if="biaoCode3 === 'zgcspushQuestion'"
@click="problemQuestionPush">
上送问题整改措施
</el-button>-->
<el-button size="small" type="primary" v-if="biaoCode4 === 'tsfjwtpush'" @click="annexPush">
附件上送
</el-button>
</el-form-item>
</el-form>
<div class="boxS">
<div class="boxTableS">
<vxe-table stripe size="mini" :row-config="{ isCurrent: true, isHover: true }"
:data="problemData" ref="problems" highlight-current-row border :height="vh1"
header-cell-class-name="table_header" @checkbox-all="selectAllChangeEvent1"
@checkbox-change="handleSelectionChange1">
<vxe-table-column type="checkbox" align="center" width="55"></vxe-table-column>
<!-- <vxe-table-column field="province" show-overflow align="center" title="所属省份" min-width="100px"></vxe-table-column> -->
<!-- <vxe-table-column field="city" show-overflow align="center" title="所属地市" min-width="100px"></vxe-table-column> -->
<!-- <vxe-table-column field="county" show-overflow align="center" title="所属县区" min-width="100px"></vxe-table-column> -->
<vxe-table-column field="dutyOrgName" show-overflow align="center" title="责任单位"
min-width="150px"></vxe-table-column>
<vxe-table-column field="monitorType" show-overflow align="center" title="监测点类型"
min-width="100px" :formatter="formFilter1"></vxe-table-column>
<vxe-table-column field="ifReleaseWarning" show-overflow align="center" title="是否发布预告警"
min-width="150px">
<template slot-scope="scope">
<span v-if="scope.row.ifReleaseWarning == 0"></span>
<span v-if="scope.row.ifReleaseWarning == 1"></span>
</template>
</vxe-table-column>
<vxe-table-column field="planRectificationTime" show-overflow align="center" title="计划整改时间"
min-width="150px"></vxe-table-column>
<!-- <vxe-table-column field="effectUserId" show-overflow align="center" title="实施人员" min-width="100px"></vxe-table-column> -->
<vxe-table-column field="rectificationStatus" show-overflow align="center" title="整改情况"
min-width="100px">
<template slot-scope="scope">
<span v-if="scope.row.rectificationStatus == '01'">未整改</span>
<span v-if="scope.row.rectificationStatus == '02'">已整改</span>
</template>
</vxe-table-column>
<vxe-table-column field="rectificationTime" show-overflow align="center" title="整改时间"
min-width="100px"></vxe-table-column>
<vxe-table-column field="supvStandard" show-overflow align="center" title="监督标准"
min-width="100px"></vxe-table-column>
<vxe-table-column field="supvStandardSort" show-overflow align="center" title="监督标准序号"
min-width="100px"></vxe-table-column>
<vxe-table-column field="supvResouce" show-overflow align="center" title="标准出处"
min-width="100px"></vxe-table-column>
<vxe-table-column field="problemLevel" show-overflow align="center" title="问题等级"
min-width="100px">
<template slot-scope="scope">
<span v-if="scope.row.problemLevel == '01'">一般</span>
<span v-if="scope.row.problemLevel == '02'">较大</span>
</template>
</vxe-table-column>
<vxe-table-column field="problemType" show-overflow align="center" title="问题类型"
min-width="100px" :formatter="formFilter1"></vxe-table-column>
<!-- <vxe-table-column field="createBy" show-overflow align="center" title="问题出处" min-width="100px"></vxe-table-column> -->
<vxe-table-column field="simpleProblemDesc" show-overflow align="center" title="问题简要描述"
min-width="100px"></vxe-table-column>
<vxe-table-column field="problemDesc" show-overflow align="center" title="问题描述"
min-width="100px"></vxe-table-column>
<vxe-table-column field="discoveryTime" show-overflow align="center" title="问题发现时间"
min-width="100px"></vxe-table-column>
<vxe-table-column field="problemLevelReason" show-overflow align="center" title="定级依据"
min-width="100px"></vxe-table-column>
<!-- <vxe-table-column field="createBy" show-overflow align="center" title="问题依据" min-width="100px"></vxe-table-column> -->
<vxe-table-column field="rectificationProgramme" show-overflow align="center" title="整改方案"
min-width="100px"></vxe-table-column>
<!-- <vxe-table-column field="createBy" show-overflow align="center" title="问题简要描述" min-width="150px"></vxe-table-column> -->
<vxe-table-column field="rectificationMeasure" show-overflow align="center" title="整改措施"
min-width="100px"></vxe-table-column>
<vxe-table-column field="remark" show-overflow align="center" title="备注"
min-width="100px"></vxe-table-column>
<vxe-table-column field="isUploadHead" show-overflow align="center" title="上送问题"
min-width="100px">
<template slot-scope="scope">
<el-tag type="primary" size="small" style="color: #409eff; background: #ecf5ff"
v-if="scope.row.isUploadHead == 0">
未上送
</el-tag>
<el-tag type="primary" size="small" style="color: #67c23a; background: #f0f9eb"
v-if="scope.row.isUploadHead == 1">
已上送
</el-tag>
<el-tag type="primary" size="small" style="color: #909399; background: #f4f4f5"
v-if="scope.row.isUploadHead == 2">
取消上送
</el-tag>
<el-tag type="primary" size="small" style="color: orange; background: #f4f4f5"
v-if="scope.row.isUploadHead == 3">
待重新上送
</el-tag>
</template>
</vxe-table-column>
<!-- <vxe-table-column field="createBy" show-overflow align="center" title="电能质量问题发生详情" min-width="170px">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="problemDetails(scope.row)">详情</el-button>
</template>
</vxe-table-column> -->
<!-- <vxe-table-column field="attachmentName" show-overflow align="center" title="盖章报告" min-width="150px">
<template slot-scope="scope">
<span v-if="scope.row.attachmentName == null" >/</span>
<span v-else style="color: blue; text-decoration: underline; cursor: pointer;" @click="downLoad(scope.row,'01')"> {{ scope.row.attachmentName}}</span>
</template>
</vxe-table-column>
<vxe-table-column field="attachmentNameTwo" show-overflow align="center" title=" 佐证材料" min-width="150px">
<template slot-scope="scope">
<span v-if="scope.row.attachmentNameTwo == null" >/</span>
<span v-else style="color: blue; text-decoration: underline; cursor: pointer;" @click="downLoad(scope.row,'02')"> {{ scope.row.attachmentNameTwo}}</span>
</template>
</vxe-table-column> -->
<vxe-table-column field="" show-overflow align="center" title="操作" min-width="350px"
fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="problemView(scope.row)">
详情
</el-button>
<!-- <el-button type="primary" size="mini" :disabled="scope.row.isUploadHead == 1? true : false" @click="problemModifyFn(scope.row)">修改</el-button> -->
<el-button type="primary" size="mini" @click="problemModifyFn(scope.row)">
修改
</el-button>
<el-button size="mini" type="primary" @click="upload(scope.row)">
上传附件
</el-button>
<el-button size="mini" type="primary" @click="problemUpload(scope.row)">
查看附件
</el-button>
</template>
</vxe-table-column>
</vxe-table>
<el-pagination background align="right" @size-change="handleSizeChange1"
@current-change="handleCurrentChange1" :current-page="formData1.pageNum"
:page-sizes="[20, 30, 40, 50, 100]" :page-size="formData1.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="problemTotal"
class="mt10"></el-pagination>
</div>
</div>
</div>
</el-dialog>
<!-- 已上送修改 -->
<el-dialog :close-on-click-modal="false" title="修改原因" :visible.sync="modifyReason" width="40%" class="eduity">
<el-form label-width="90px" :model="form" ref="form1" :rules="rules">
<el-form-item label="调整原因:" class="mt20 eduitybox" prop="applyCommentHis">
<el-input v-model="form.applyCommentHis" type="textarea" placeholder="请输入调整原因"></el-input>
</el-form-item>
<el-form-item label="其他要求:" style="margin-top: 150px" class="eduitybox" prop="otherRemarkHis">
<el-input v-model="form.otherRemarkHis" type="textarea" placeholder="请输入其他要求"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="modifyReason = false"> </el-button>
<el-button type="primary" @click="modifyReasonFn"> </el-button>
</span>
</el-dialog>
<!-- 查看附件/附件上送 -->
<el-dialog :close-on-click-modal="false" :title="uploadTitle" :visible.sync="lookUpload"
:before-close="lookUploadClose" width="80%">
<el-form ref="form" inline :model="formLine">
<el-form-item label="附件分类:" class="mt10" prop="classification">
<el-select v-model="formLine.classification" clearable placeholder="请选择附件分类">
<el-option v-for="item in classificationData" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item class="mt10">
<el-button size="small" type="primary" icon="el-icon-search" @click="lookOnsubmit">查询</el-button>
</el-form-item>
<el-form-item class="mt10">
<el-button size="small" type="primary" icon="el-icon-search" @click="delFile">删除附件</el-button>
</el-form-item>
</el-form>
<vxe-table stripe size="mini" :row-config="{ isCurrent: true, isHover: true }" :data="uploadData"
highlight-current-row border :height="vh1" header-cell-class-name="table_header"
@checkbox-all="selectAllChangeEvent2" @checkbox-change="handleSelectionChange2">
<vxe-table-column type="checkbox" align="center" width="55"></vxe-table-column>
<vxe-table-column field="uploadTime" show-overflow align="center" title="上传时间"
min-width="120"></vxe-table-column>
<vxe-table-column field="busiName" show-overflow align="center" :title="fjtitle"
min-width="180"></vxe-table-column>
<vxe-table-column field="attachmentName" show-overflow align="center" title="附件名称" min-width="400">
<template slot-scope="scope">
<span style="color: blue; text-decoration: underline; cursor: pointer"
@click="downLoadFn(scope.row)">
{{ scope.row.attachmentName }}
</span>
</template>
</vxe-table-column>
<vxe-table-column field="attachmentType" show-overflow align="center" title="附件类型" min-width="100"
:formatter="formFilter2"></vxe-table-column>
<vxe-table-column field="uploaderName" show-overflow align="center" title="上送人"
min-width="100"></vxe-table-column>
<vxe-table-column field="isUploadHead" show-overflow align="center" title="是否上送网公司" min-width="100px">
<template slot-scope="scope">
<el-tag type="primary" size="small" style="color: #409eff; background: #ecf5ff"
v-if="scope.row.isUploadHead == 0">
未上送
</el-tag>
<el-tag type="primary" size="small" style="color: #67c23a; background: #f0f9eb"
v-if="scope.row.isUploadHead == 1">
已上送
</el-tag>
<el-tag type="primary" size="small" style="color: #909399; background: #f4f4f5"
v-if="scope.row.isUploadHead == 2">
取消上送
</el-tag>
<el-tag type="primary" size="small" style="color: orange; background: #f4f4f5"
v-if="scope.row.isUploadHead == 3">
待重新上送
</el-tag>
</template>
</vxe-table-column>
</vxe-table>
<span slot="footer" class="dialog-footer" v-if="this.uploadTitle == '附件上送' ? true : false">
<el-button type="primary" @click="lookUploadClose"> </el-button>
<el-button type="primary" @click="isUploadFn"> </el-button>
</span>
</el-dialog>
<!--电容器组关联-->
<el-dialog :close-on-click-modal="false" title="关联对象" :visible.sync="capacitorFlag"
:before-close="capacitorClose" width="20%">
<el-form label-width="120px" ref="formCapacitor" :model="formCapacitor">
<el-form-item label="关联对象类型" class="mt10" prop="relObjType">
<el-select v-model="formCapacitor.relObjType" placeholder="关联对象类型">
<el-option v-for="item in [{ id: '01', name: '电容器' }]" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="关联对象名称:" class="mt10" prop="relObjName" :rules="[
{ required: true, message: '关联对象名称不能为空' },
]">
<el-input v-model="formCapacitor.relObjName" clearable placeholder="关联对象名称">
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="capacitorSubmit"> </el-button>
</span>
</el-dialog>
<!--电容器组关联列表-->
<el-dialog :close-on-click-modal="false" title="电容器组关联对象列表" :visible.sync="capacitorTableFlag"
:before-close="capacitorTableClose" width="80%">
<el-button style="margin-top: 10px;margin-bottom: 10px" size="small" type="primary"
@click="capacitorDia">新增关联对象</el-button>
<vxe-table stripe size="mini" :row-config="{ isCurrent: true, isHover: true }" :data="capacitorTableData"
highlight-current-row border :height="vh1" header-cell-class-name="table_header">
<vxe-table-column type="checkbox" align="center" width="55"></vxe-table-column>
<vxe-table-column field="relObjType" show-overflow align="center" title="关联对象类型"
min-width="120"></vxe-table-column>
<vxe-table-column field="relObjName" show-overflow align="center" title="关联对象名称"
min-width="180"></vxe-table-column>
<vxe-table-column field="updateTimes" show-overflow align="center" title="更新时间"
min-width="180"></vxe-table-column>
<vxe-table-column field="" show-overflow align="center" title="操作" width="300px" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="updateCapacitor(scope.row)">修改</el-button>
<el-button type="primary" size="mini" @click="capacitorDel(scope.row)">删除</el-button>
</template>
</vxe-table-column>
</vxe-table>
</el-dialog>
</div>
</template>
<script>
import Area from '@/views/components/Area/Area.vue'
import Organization from './Area/Organization.vue'
import Operation from './Area/Operation.vue'
import Company from './Area/Company.vue'
import { dicData } from '@/assets/commjs/dictypeData'
import { listRoleMenu, updateRoleMenu } from '@/api/admin/role'
import {
pagePlan,
addPlan,
updatePlan,
delPlan,
pageProblem,
addProblem,
updateProblem,
delProblem,
planUpload,
detail,
pushPlan,
pushQuestion,
delPushPlan,
pushFile,
getUserListByDeptId,
pushQuestionUpdate,
addPlanHis,
problemList,
list,
getDeptByCode,
delFile, saveOrUpdatePlanRel, delPlanRel, planRelList, getAlarmList
} from '@/api/Supervisionmanage2/Workplan'
import Timeinterval from '@/views/components/TimePicker/index6'
// import Timeinterval from '@/views/components/Timeinterval.vue'
export default {
name: 'jsplan',
components: { Area, Timeinterval, Organization, Operation, Company },
props: {},
data() {
return {
capacitorFlag: false,
capacitorTableFlag: false,
capacitorTableData: [],
formCapacitor: {
objId: '',
relObjName: '',
relObjType: '01',
planId: ''
},
biaoCode: '',
biaoCode1: '',
biaoCode2: '',
biaoCode3: '',
biaoCode4: '',
formData: {
planOrgId: '',
supvType: '',
pageSize: 20,
pageNum: 1,
searchBeginTime: '',
searchEndTime: ''
},
tag: '',
id: JSON.parse(window.sessionStorage.getItem('Info')).roleList[0],
formData1: {
pageSize: 20,
pageNum: 1
// searchBeginTime: "",
// searchEndTime: "",
},
isLoading: false,
isLoading1: false,
planDisabled: false,
problemDisabled: false,
problemDisabled1: false,
add: false,
modify: false,
modifyReason: false,
isok: true,
isok1: true,
area: false,
total: undefined,
problemTotal: undefined,
headers: {
Authorization: window.sessionStorage.getItem('cntoken')
},
fileList: [],
multipleSelection: [],
multipleSelection1: [],
multipleSelection2: [],
loading: false,
addinformation: false,
uploadInformation: false,
lookUpload: false,
Implementation: false,
problemAddinformation: false,
vh: undefined,
vh1: undefined,
zoom: '', //图表焦点校验
ids: [],
title: '',
uploadTitle: '',
fjtitle: '',
formLine: {
classification: '',
uploadTime: '',
uploaderName: '',
uploaderId: ''
},
planId: '',
uploadType: '',
editCheckCode: '',
valueTitle: '',
editCheckCode1: '',
valueTitle1: '',
applyComment: '',
otherRemark: '',
isUploadHead: '',
tableData: [],
problemData: [],
uploadData: [],
dataName: '',
powerTime: '',
supvTypeFlag: true,//区分是供电电压还是其他
supvObjNameList: [],//用来存供电电压相关名称
workAlarmList: [],//告预警单集合
form: {
supvOrgId: '',
supvOrgName: '',
planOrgId: '',
planOrgName: '',
planUserId: '', //计划编制人员
workPlanName: '',
effectUserId: '',
supvStage: '',
supvType: '',
planSupvDate: '',
supvObjId: '',
supvObjName: '',
supvObjType: '',
objVoltageLevel: '',
objType: '',
planstatus: '',
objCapacity: '',
substationName: '',
objTypeName: '',
planStatus: '',
effectStatus: '',
substationVoltageLevel: '',
effectStartTime: '',
effectEndTime: '',
otherRemark: '',
otherRemarkHis: '',
reportIssueTime: '',
problemOcTime: '',
applyCommentHis: '',
},
ruleform: {
planId: '',
dutyOrgId: '',
dutyOrgName: '',
monitorType: '',
ifReleaseWarning: '',
planRectificationTime: '',
rectificationStatus: '',
rectificationTime: '',
supvStandard: '',
supvStandardSort: '',
supvResouce: '',
problemLevel: '',
problemType: '',
discoveryTime: '',
simpleProblemDesc: '',
problemDesc: '',
problemLevelReason: '',
rectificationProgramme: '',
rectificationMeasure: '',
remark: '',
workAlarmId: ''
},
rules: {
supvOrgName: [{ required: true, message: '请输入监督单位', trigger: 'change' }],
planOrgName: [{ required: true, message: '请输入计划编制单位', trigger: 'change' }],
workPlanName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
supvStage: [{ required: true, message: '请选择监督阶段', trigger: 'change' }],
supvType: [{ required: true, message: '请选择监督类型', trigger: 'change' }],
planSupvDate: [{ required: true, message: '请选择日期', trigger: 'change' }],
supvObjName: [{ required: true, message: '请输入监督对象名称', trigger: 'blur' }],
objTypeName: [{ required: false, message: '请输入监督对象属性名称', trigger: 'blur' }],
supvObjType: [{ required: true, message: '请选择监督对象类型', trigger: 'change' }],
objVoltageLevel: [{ required: true, message: '请选择监督对象电压等级', trigger: 'change' }],
objType: [{ required: true, message: '请选择监监督对象属性', trigger: 'change' }],
objCapacity: [{ required: true, message: '请输入监督对象协议容量', trigger: 'blur' }],
substationName: [{ required: true, message: '请选择监督对象关联电站', trigger: 'blur' }],
substationVoltageLevel: [
{ required: true, message: '请选择监督对象关联电站电压等级', trigger: 'change' }
],
effectStatus: [{ required: true, message: '请选择实施状态', trigger: 'change' }],
effectStartTime: [{ required: false, message: '请选择日期', trigger: 'change' }],
effectEndTime: [{ required: false, message: '请选择日期', trigger: 'change' }],
reportIssueTime: [{ required: false, message: '请选择日期', trigger: 'change' }],
planStatus: [{ required: false, message: '请选择计划状态', trigger: 'change' }],
applyCommentHis: [{ required: true, message: '请输入调整原因', trigger: 'blur' }],
otherRemarkHis: [{ required: true, message: '请输入其他要求', trigger: 'blur' }],
classification: [{ required: true, message: '请选择附件分类', trigger: 'change' }],
uploadTime: [{ required: true, message: '请选择日期与时间', trigger: 'change' }],
uploaderName: [{ required: true, message: '请选择上送人', trigger: 'change' }]
},
rules1: {
dutyOrgName: [{ required: true, message: '请输入责任单位', trigger: 'change' }],
monitorType: [{ required: false, message: '请选择监测点类型', trigger: 'change' }],
ifReleaseWarning: [{ required: true, message: '请选择是否发不预告警', trigger: 'change' }],
planRectificationTime: [{ required: true, message: '请选择日期', trigger: 'change' }],
rectificationStatus: [{ required: true, message: '请选择整改情况', trigger: 'change' }],
// rectificationTime: [
// { required: true, message: "请选择日期", trigger: "change" },
// ],
supvStandard: [{ required: true, message: '请输入监督标准', trigger: 'blur' }],
supvStandardSort: [{ required: true, message: '请输入监督标准序号', trigger: 'blur' }],
supvResouce: [{ required: true, message: '请输入标准出处', trigger: 'blur' }],
problemLevel: [{ required: true, message: '请选择问题等级', trigger: 'change' }],
problemType: [{ required: true, message: '请选择问题类型', trigger: 'change' }],
simpleProblemDesc: [{ required: true, message: '请输入问题简要描述', trigger: 'blur' }],
problemDesc: [{ required: true, message: '请输入问题描述', trigger: 'blur' }],
discoveryTime: [{ required: true, message: '请选择问题发现时间', trigger: 'change' }],
problemLevelReason: [{ required: true, message: '请输入定级依据', trigger: 'blur' }],
// problembasis: [
// { required: true, message: "请选择问题依据", trigger: "change" },
// ],
rectificationProgramme: [{ required: true, message: '请选择整改方案', trigger: 'change' }]
// rectificationMeasure: [
// { required: true, message: "请输入整改措施", trigger: "blur" },
// ],
},
statationName: [],
phase: [], //监督阶段
supervisionType: [], //监督类型
supervisionObjType: dicData('supv_obj_type', []), //监督对象类型
voltageLevel: [], //电压等级
monitoring: [], //监测点类型
programme: [], //整改方案
questionType: [], //问题类型
ImplementationPeople: [], //实施人员
planStatusHis: [], //计划状态
pageFileterObjType: [],
pageObjType: [],
superviseProperties: [
{
id: '01',
name: '在运站',
gvalue: '01'
},
{
id: '02',
name: '新(改、扩)建站',
gvalue: '02'
}
],
rectification: [
{
id: '01',
name: '未整改'
},
{
id: '02',
name: '已整改'
}
],
status: [
{
id: '01',
name: '未开展'
},
{
id: '02',
name: '开展中'
},
{
id: '03',
name: '待审核'
},
{
id: '04',
name: '已完成'
}
],
questionLevel: [
{
id: '01',
name: '一般'
},
{
id: '02',
name: '较大'
}
],
classificationData: [],
ReleaseWarning: [
{
id: 0,
name: '否'
},
{
id: 1,
name: '是'
}
],
view: false,
newPowerTem: [],
newPowerTemShu: [],
userTem: [],
reportTem: [],
planUserList: []
}
},
created() {
this.getclassificationData()
this.listmenuRoleList()
this.getUserId()
let level = JSON.parse(window.sessionStorage.getItem('Info')).deptLevel
if (level == 1 || level == 2) {
this.area = true
}
this.getAlarmList()
},
mounted() {
this.setHeight()
window.addEventListener('resize', this.setHeight)
},
beforeDestroy() {
window.removeEventListener('resize', this.setHeight)
},
methods: {
setHeight() {
this.vh = window.sessionStorage.getItem('appheight') - 140
this.vh = window.sessionStorage.getItem('appheight') - 95
this.vh1 = window.sessionStorage.getItem('appheight') - 480
},
clear(key, key1) {
// this.form[key] = ''
// this.form[key1] = ''
},
closeHandle() {
if (this.view) {
this.view = false
} else {
this.view = true
}
//console.log('关闭和展开');
const dom = document.getElementById('container')
const closeDom = document.getElementsByClassName('close')[0]
if (!dom.className.match(/(?:^|\s)expend(?!\S)/)) {
dom.className = 'container expend'
} else {
dom.className = 'container close-container'
}
},
clear1(key, key1) {
// this.formLine[key] = ''
// this.formLine[key1] = ''
},
//获取权限
listmenuRoleList() {
let p = { id: this.id }
listRoleMenu(p).then(response => {
let ids = []
//console.log("权限资源",response.data)
response.data.forEach(item => {
//上送网公司权限
if (item.code === 'jsjdpush') {
this.biaoCode = item.code
}
//取消上送送国网权限
if (item.code === 'jsjdjhdelete') {
this.biaoCode1 = item.code
}
//上送问题权限
if (item.code === 'ssjsjdpushQuestion') {
this.biaoCode2 = item.code
}
//上送问题实施整改权限
if (item.code === 'zgcspushQuestion') {
this.biaoCode3 = item.code
}
//附件上送权限
if (item.code === 'tsfjwtpush') {
this.biaoCode4 = item.code
}
})
})
},
takeover(val) {
this.formData.supvOrgId = val[0].code
this.onSubmit()
},
getUserId() {
let form = {
deptId: JSON.parse(window.sessionStorage.getItem('Info')).deptId
}
getUserListByDeptId(form).then(res => {
this.ImplementationPeople = res.data
})
},
getAlarmList() {
getAlarmList().then(res => {
this.workAlarmList = res.data
})
},
//通过下拉选择决定是否必填
changeSupv(val) {
this.guolv(val)
this.form.supvObjName = ''
this.form.supvObjId = ''
},
changeSupvObjName(val) {
let obj = this.supvObjNameList.find(item => item.id == val)
this.form.supvObjName = obj.name
this.form.workPlanName =
this.form.supvOrgName +
this.form.planSupvDate.substring(0, 7).replace('-', '') +
this.form.supvObjName +
'监督计划'
},
changeStatus(val) {
if (val != '01') {
this.rules.effectStartTime[0].required = true
} else {
this.rules.effectStartTime[0].required = false
}
if (val == '04') {
this.rules.effectEndTime[0].required = true
this.rules.reportIssueTime[0].required = true
} else {
this.rules.effectEndTime[0].required = false
this.rules.reportIssueTime[0].required = false
}
},
changeObjType(val) {
let name = ''
this.superviseProperties.forEach(item => {
if (val == item.gvalue) {
name = item.name
}
})
this.form.objTypeName = name
},
changeUploaderName(val) {
// console.log(val);
this.ImplementationPeople.forEach(item => {
if (val == item.id) {
this.formLine.uploaderName = item.name
}
})
},
//判断是否必填
guolv(val) {
let type = ''
this.supervisionType.forEach(item => {
if (val.supvType) {
if (item.id == val.supvType) {
type = item.code
}
} else {
if (item.id == val) {
type = item.code
}
}
})
if (type == 'UHV_Converter') {
//特高压
this.supvTypeFlag = true
this.rules.substationName[0].required = false
this.rules.substationVoltageLevel[0].required = false
this.rules.supvObjType[0].required = false
this.rules.supvObjName[0].required = false
this.rules.objVoltageLevel[0].required = true
this.rules.objType[0].required = false
this.rules.objTypeName[0].required = false
this.rules.objCapacity[0].required = false
this.rules.effectStatus[0].required = true
this.form.supvObjType = ''
this.form.supvObjType = ''
this.supervisionObjType = []
} else if (type == 'New_Energy') {
this.supvTypeFlag = true
this.rules.substationName[0].required = true
this.rules.substationVoltageLevel[0].required = true
this.rules.supvObjType[0].required = true
this.rules.supvObjName[0].required = true
this.rules.objVoltageLevel[0].required = true
this.rules.objType[0].required = true
this.rules.objTypeName[0].required = true
this.rules.objCapacity[0].required = true
this.rules.effectStatus[0].required = true
//
this.supervisionObjType = dicData('supv_obj_type', [])
this.superviseProperties = [
{
id: '01',
name: '在运站',
gvalue: '01'
},
{
id: '02',
name: '新(改、扩)建站',
gvalue: '02'
}
]
} else if (type == 'Power_Quality') {
this.supvTypeFlag = true
this.rules.substationName[0].required = true
this.rules.substationVoltageLevel[0].required = true
this.rules.supvObjType[0].required = false
this.rules.supvObjName[0].required = true
this.rules.objVoltageLevel[0].required = true
this.rules.objCapacity[0].required = false
this.rules.objType[0].required = true
this.rules.objTypeName[0].required = true
// this.supervisionObjType = dicData('user_class', [])
this.superviseProperties = dicData('user_class', [])
this.rules.effectStatus[0].required = true
this.form.supvObjType = ''
this.supervisionObjType = []
} else if (type == 'Technical_Super') {
this.supvTypeFlag = false
//供电电压 supvObjName
this.rules.substationName[0].required = false
this.rules.substationVoltageLevel[0].required = false
this.rules.supvObjType[0].required = false
this.rules.supvObjName[0].required = false
this.rules.objVoltageLevel[0].required = false
this.rules.objType[0].required = false
this.rules.objTypeName[0].required = false
this.rules.objCapacity[0].required = false
this.rules.effectStatus[0].required = true
this.form.supvObjType = ''
this.supervisionObjType = []
} else if (type == 'capacitor_bank') {
this.supvTypeFlag = true
//电容器组
this.rules.supvObjType[0].required = false
this.rules.objType[0].required = false
this.rules.supvObjName[0].required = false
this.rules.objCapacity[0].required = false
this.rules.substationVoltageLevel[0].required = false
this.rules.substationName[0].required = false
this.rules.objVoltageLevel[0].required = true
this.rules.effectStatus[0].required = true
this.form.supvObjType = ''
this.supervisionObjType = []
} else if (type == 'report_supervision') {
this.supvTypeFlag = true
//评估报告 supvObjName
this.rules.supvObjType[0].required = false
this.rules.supvObjName[0].required = false
this.rules.objVoltageLevel[0].required = false
this.rules.objCapacity[0].required = false
this.rules.substationVoltageLevel[0].required = false
this.rules.objType[0].required = true
this.rules.objTypeName[0].required = true
this.rules.substationName[0].required = false
this.rules.effectStatus[0].required = false
// this.supervisionObjType = dicData('evaluation_report', [])
this.superviseProperties = dicData('evaluation_report', [])
this.form.supvObjType = ''
this.supervisionObjType = []
}
},
//获取类型
getclassificationData() {
//监督阶段
this.phase = dicData('supv_stage', [])
//监督类型
this.supervisionType = dicData('supv_type', [])
//监督对象类型
//电压等级
this.voltageLevel = dicData('Dev_Voltage', [])
//监测点类型
this.monitoring = dicData('monitor_type', [])
//整改方案
this.programme = dicData('RectificationMeasure', [])
//问题类型
this.questionType = dicData('problem_type', [])
//计划状态
this.planStatusHis = dicData('plan_status', [])
//附件分类
this.classificationData = dicData('file_type', [])
//供电电压对象名称
this.supvObjNameList = dicData('Technical_Super_Name', [])
/* console.log(this.supvObjNameList)*/
this.newPowerTem = dicData('supv_obj_type', [])
; (this.newPowerTemShu = [
{
id: '01',
name: '在运站',
gvalue: '01'
},
{
id: '02',
name: '新(改、扩)建站',
gvalue: '02'
}
]),
(this.userTem = dicData('user_class', [])),
(this.reportTem = dicData('evaluation_report', []))
},
//查询
onSubmit() {
this.isLoading = true
this.formData.pageNum = 1
this.formData.searchBeginTime = this.$refs.Timeinterval.timeValue[0]
this.formData.searchEndTime = this.$refs.Timeinterval.timeValue[1]
// console.log(this.formData.supvOrgId);
pagePlan(this.formData).then(res => {
this.tableData = res.data.records
this.total = res.data.total
this.isLoading = false
})
},
onSubmit1() {
this.isLoading = true
// this.$refs.Timeinterval.timeOptions = [
// // { label: "年份", value: 1 },
// // { label: "季度", value: 2 },
// { label: "月份", value: 3 },
// // { label: "周", value: 4 },
// // // { label: "自定义", value: 5 },
// ]
this.formData.searchBeginTime = this.$refs.Timeinterval.timeValue[0]
this.formData.searchEndTime = this.$refs.Timeinterval.timeValue[1]
// console.log(this.formData.supvOrgId);
pagePlan(this.formData).then(res => {
this.tableData = res.data.records
this.total = res.data.total
this.isLoading = false
})
},
//导出
exportEvent() {
pagePlan({
searchBeginTime: this.formData.searchBeginTime,
searchEndTime: this.formData.searchEndTime,
planOrgId: this.formData.planOrgId,
supvType: this.formData.supvType,
pageNum: 1,
pageSize: this.total
}).then(res => {
res.data.records.forEach(item => {
if (item.effectStatus == '01') {
item.effectStatus = '未开展'
} else if (item.effectStatus == '02') {
item.effectStatus = '开展中'
} else if (item.effectStatus == '03') {
item.effectStatus = '待审核'
} else if (item.effectStatus == '04') {
item.effectStatus = '已完成'
}
if (item.isUploadHead == 0) {
item.isUploadHead = '未上送'
} else if (item.isUploadHead == 1) {
item.isUploadHead = '已上送'
} else if (item.isUploadHead == 2) {
item.isUploadHead = '取消上送'
}
})
let json = JSON.stringify(res.data.records)
json = JSON.parse(json)
json.forEach(item => {
let p = item.planSupvDate.split('-')
item.planSupvDate = p[0] + '-' + p[1]
// console.log(p[0]+'-'+p[1])
})
// console.log(json)
this.$refs.plan.exportData({
filename: this.formData.searchBeginTime + '至' + this.formData.searchEndTime + '技术监督工作计划', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: json, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column, $columnIndex) {
return !(column.$columnIndex === 0)
}
})
})
},
//问题查询
problemOnSubmit() {
this.isLoading1 = true
this.formData1.pageNum = 1
// this.formData1.searchBeginTime = this.$refs.Timeinterval.timeValue[0];
// this.formData1.searchEndTime = this.$refs.Timeinterval.timeValue[1];
pageProblem(this.formData1).then(res => {
this.problemData = res.data.records
this.problemTotal = res.data.total
this.isLoading1 = false
})
},
problemOnSubmit1() {
this.isLoading1 = true
// this.formData1.searchBeginTime = this.$refs.Timeinterval.timeValue[0];
// this.formData1.searchEndTime = this.$refs.Timeinterval.timeValue[1];
pageProblem(this.formData1).then(res => {
this.problemData = res.data.records
this.problemTotal = res.data.total
this.isLoading1 = false
})
},
//导出
exportEvent1() {
pageProblem({
pageNum: 1,
pageSize: this.problemTotal,
planId: this.formData1.planId
}).then(res => {
res.data.records.forEach(item => {
if (item.ifReleaseWarning == 0) {
item.ifReleaseWarning = '否'
} else if (item.ifReleaseWarning == 1) {
item.ifReleaseWarning = '是'
}
if (item.rectificationStatus == '01') {
item.rectificationStatus = '未整改'
} else if (item.rectificationStatus == '02') {
item.rectificationStatus = '已整改'
}
if (item.problemLevel == '01') {
item.problemLevel = '一般'
} else if (item.problemLevel == '02') {
item.problemLevel = '较大'
}
if (item.isUploadHead == 0) {
item.isUploadHead = '未上送'
} else if (item.isUploadHead == 1) {
item.isUploadHead = '已上送'
} else if (item.isUploadHead == 2) {
item.isUploadHead = '取消上送'
}
})
this.$refs.problems.exportData({
filename: '技术监督实施问题', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column, $columnIndex) {
return !(column.$columnIndex === 0)
}
})
})
},
//导出问题
exportProblems() {
this.formData.searchBeginTime = this.$refs.Timeinterval.timeValue[0]
this.formData.searchEndTime = this.$refs.Timeinterval.timeValue[1]
problemList(this.formData).then(res => {
let blob = new Blob([res], {
type: 'application/vnd.ms-excel'
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url // link.download = "电压暂降事件分析报告"; // 设置下载的文件名
link.download = this.formData.searchBeginTime + '_' + this.formData.searchEndTime + '计划问题.xls' // 设置下载的文件名
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link)
})
},
//数据过滤
formFilter(row, column) {
if (row.column.property == 'supvType') {
console.log(row.row.supvType)
let title = ''
this.supervisionType.forEach(item => {
if (item.id == row.row.supvType) {
title = item.name
}
})
return title
} else if (row.column.property == 'supvStage') {
let title = ''
this.phase.forEach(item => {
if (item.id == row.row.supvStage) {
title = item.name
}
})
return title
} else if (row.column.property == 'supvObjType') {
return this.reRowTitle(row)
} else if (row.column.property == 'objVoltageLevel') {
let title = ''
this.voltageLevel.forEach(item => {
if (item.id == row.row.objVoltageLevel) {
title = item.name
}
})
return title
} else if (row.column.property == 'substationVoltageLevel') {
let title = ''
this.voltageLevel.forEach(item => {
if (item.id == row.row.substationVoltageLevel) {
title = item.name
}
})
return title
} else if (row.column.property == 'planStatus') {
let title = ''
this.planStatusHis.forEach(item => {
if (item.id == row.row.planStatus) {
title = item.name
}
})
return title
} else if (row.column.property == 'objType') {
return this.objTypeRowTitle(row)
} else {
return row.row[row.column.property]
}
},
formFilter1(row, column) {
if (row.column.property == 'monitorType') {
let title = ''
this.monitoring.forEach(item => {
if (item.id == row.row.monitorType) {
title = item.name
}
})
return title
} else if (row.column.property == 'problemType') {
let title = ''
this.questionType.forEach(item => {
if (item.id == row.row.problemType) {
title = item.name
}
})
return title
}
// else if(row.column.property == "rectificationProgramme"){
// let title = ''
// this.programme.forEach(item=>{
// if( item.id == row.row.rectificationProgramme ){
// title =item.name
// }
// })
// return title
// }
else {
return row.row[row.column.property]
}
},
formFilter2(row, column) {
if (row.column.property == 'attachmentType') {
let title = ''
this.classificationData.forEach(item => {
if (item.id == row.row.attachmentType) {
title = item.name
}
})
return title
} else {
return row.row[row.column.property]
}
},
reRowTitle(row) {
let title = ''
let type = ''
this.supervisionType.forEach(item => {
if (row.row.supvType) {
if (item.id == row.row.supvType) {
type = item.code
}
} else {
if (item.id == row.row.supvType) {
type = item.code
}
}
})
if (type == 'UHV_Converter') {
title = row.row.supvObjType
} else if (type == 'New_Energy') {
this.newPowerTem.forEach(item => {
if (item.id == row.row.supvObjType) {
title = item.name
}
})
} else if (type == 'Power_Quality') {
this.userTem.forEach(item => {
if (item.id == row.row.supvObjType) {
title = item.name
}
})
} else if (type == 'Technical_Super') {
title = row.row.supvObjType
} else if (type == 'capacitor_bank') {
//电容器组
title = row.row.supvObjType
} else if (type == 'report_supervision') {
this.reportTem.forEach(item => {
if (item.id == row.row.supvObjType) {
title = item.name
}
})
}
return title
},
objTypeRowTitle(row) {
let title = ''
let type = ''
this.supervisionType.forEach(item => {
if (row.row.supvType) {
if (item.id == row.row.supvType) {
type = item.code
}
} else {
if (item.id == row.row.supvType) {
type = item.code
}
}
})
if (type == 'UHV_Converter') {
this.newPowerTemShu.forEach(item => {
if (item.gvalue == row.row.objType) {
title = item.name
}
})
} else if (type == 'New_Energy') {
this.newPowerTemShu.forEach(item => {
if (item.gvalue == row.row.objType) {
title = item.name
}
})
} else if (type == 'Power_Quality') {
this.userTem.forEach(item => {
if (item.gvalue == row.row.objType) {
title = item.name
}
})
} else if (type == 'Technical_Super') {
title = row.row.objType
} else if (type == 'capacitor_bank') {
this.newPowerTemShu.forEach(item => {
if (item.gvalue == row.row.objType) {
title = item.name
}
})
} else if (type == 'report_supervision') {
this.reportTem.forEach(item => {
if (item.gvalue == row.row.objType) {
title = item.name
}
})
}
return title
},
//计划复选框
handleSelectionChange(val) {
// console.log(val.records);
this.multipleSelection = val.records
},
selectAllChangeEvent(val) {
// console.log(val.records);
this.multipleSelection = val.records
},
//问题复选框
handleSelectionChange1(val) {
this.multipleSelection1 = val.records
},
selectAllChangeEvent1(val) {
// console.log(val.records);
this.multipleSelection1 = val.records
},
//f附件复选框
handleSelectionChange2(val) {
this.multipleSelection2 = val.records
},
selectAllChangeEvent2(val) {
// console.log(val.records);
this.multipleSelection2 = val.records
},
handleNodeClick(data) {
this.formData.planOrgId = data.code
},
/* handleNodeClick1(data) {
// console.log(data);
this.form.planOrgId = data.code
this.form.planOrgName = data.name
// this.ruleform.dutyOrgId = data.code
this.form.workPlanName =
this.form.planOrgName +
this.form.planSupvDate.substring(0, 7).replace('-', '') +
this.form.supvObjName +
'监督计划'
},*/
changeFn(val) {
// console.log(val);
this.form.planSupvDate = val
this.form.workPlanName =
this.form.supvOrgName +
this.form.planSupvDate.substring(0, 7).replace('-', '') +
this.form.supvObjName +
'监督计划'
},
changeFn1(val) {
this.form.supvObjName = val
this.form.workPlanName =
this.form.supvOrgName +
this.form.planSupvDate.substring(0, 7).replace('-', '') +
this.form.supvObjName +
'监督计划'
},
handleNodeClick2(data) {
this.form.planOrgId = data.code
this.form.planOrgName = data.name
//触发单位人员查询
let param = { deptId: data.id }
getUserListByDeptId(param).then(res => {
this.planUserList = res.data
this.form.planUserId = ''
})
},
supvOrgNameChange(data) {
this.form.supvOrgId = data.code
this.form.supvOrgName = data.name
this.form.workPlanName =
this.form.supvOrgName +
this.form.planSupvDate.substring(0, 7).replace('-', '') +
this.form.supvObjName +
'监督计划'
},
handleNodeClick3(data) {
this.ruleform.dutyOrgId = data.code
this.ruleform.dutyOrgName = data.name
},
//每页条数改变时触发 选择一页显示多少行
handleSizeChange(val) {
this.formData.pageSize = val
this.onSubmit1()
},
//当前页改变时触发 跳转其他页
handleCurrentChange(val) {
this.formData.pageNum = val
this.onSubmit1()
},
//每页条数改变时触发 选择一页显示多少行
handleSizeChange1(val) {
this.formData1.pageSize = val
this.problemOnSubmit1()
},
//当前页改变时触发 跳转其他页
handleCurrentChange1(val) {
this.formData1.pageNum = val
this.problemOnSubmit1()
},
//新增
addFn() {
this.title = '技术监督计划新增'
this.rules.planStatus[0].required = false
this.modify = false
this.planDisabled = false
this.add = true
this.isok = true
this.valueTitle = ''
this.editCheckCode = ''
this.valueTitle1 = ''
this.editCheckCode1 = ''
this.form = {
supvOrgId: '',
supvOrgName: '',
planOrgId: '',
planOrgName: '',
workPlanName: '',
supvStage: '',
supvType: '',
planSupvDate: '',
supvObjId: '',
supvObjName: '',
supvObjType: '',
objVoltageLevel: '',
objType: '',
objCapacity: '',
substationName: '',
objTypeName: '',
effectStatus: '',
substationVoltageLevel: '',
effectStartTime: '',
effectEndTime: '',
otherRemark: '',
reportIssueTime: '',
problemOcTime: ''
}
this.form.planUserId = this.$store.state.user.userInfo.id
let param = { deptId: this.$store.state.user.userInfo.deptId }
getUserListByDeptId(param).then(res => {
this.planUserList = res.data
})
this.$nextTick(() => {
this.$refs['form'].clearValidate()
})
this.addinformation = true
},
//新增确认关闭
addinformationFn() {
this.$refs.form.validate(value => {
// console.log(value);
if (value == true) {
this.$confirm('是否确认新增?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
addPlan(this.form).then(res => {
if (res.code == 'A0000') {
this.$message({
type: 'success',
message: res.message
})
}
this.onSubmit()
this.addinformation = false
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消新增'
})
})
}
})
},
//问题新增
problemAddFn() {
this.title = '技术监督实施问题新增'
this.modify = false
this.problemDisabled = false
this.add = true
this.isok1 = true
this.valueTitle = ''
this.editCheckCode = ''
this.ruleform = {
planId: this.ruleform.planId,
dutyOrgId: '',
dutyOrgName: '',
monitorType: '',
ifReleaseWarning: '',
planRectificationTime: '',
rectificationStatus: '',
rectificationTime: '',
supvStandard: '',
supvStandardSort: '',
supvResouce: '',
problemLevel: '',
problemType: '',
discoveryTime: this.powerTime,
simpleProblemDesc: '',
problemDesc: '',
problemLevelReason: '',
rectificationProgramme: '',
rectificationMeasure: '',
remark: ''
}
this.$nextTick(() => {
this.$refs['ruleform'].clearValidate()
})
this.problemAddinformation = true
},
//问题新增确认关闭
problemAddinformationFn() {
this.$refs.ruleform.validate(value => {
// console.log(value);
if (value == true) {
this.$confirm('是否确认新增?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
addProblem(this.ruleform).then(res => {
if (res.code == 'A0000') {
this.$message({
type: 'success',
message: res.message
})
}
this.problemOnSubmit()
this.problemAddinformation = false
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消新增'
})
})
}
})
},
//修改
modifyFn(val) {
// console.log(val);
this.modify = true
this.add = false
this.planDisabled = false
this.isok = true
this.title = '技术监督计划修改'
this.addinformation = true
this.form = JSON.parse(JSON.stringify(val))
this.isUploadHead = val.isUploadHead
this.planId = val.planId
this.guolv(val)
this.valueTitle = val.supvOrgName
this.editCheckCode = val.supvOrgId
this.valueTitle1 = val.planOrgName
this.editCheckCode1 = val.planOrgId
if (this.isUploadHead == 1) {
this.rules.planStatus[0].required = true
} else {
this.rules.planStatus[0].required = false
}
if (val.effectStatus != '01') {
this.rules.effectStartTime[0].required = true
} else {
this.rules.effectStartTime[0].required = false
}
if (val.effectStatus == '04') {
this.rules.effectEndTime[0].required = true
this.rules.reportIssueTime[0].required = true
} else {
this.rules.effectEndTime[0].required = false
this.rules.reportIssueTime[0].required = false
}
// this.planStatusHis.forEach(item=>{
// if( item.gvalue == this.form.planStatus ){
// this.form.planStatus =item.name
// }
// })
this.form.planUserId = val.planUserId
this.getDeptByCode(val.planOrgId)
},
getDeptByCode(deptCode) {
let param = { deptCode: deptCode }
getDeptByCode(param).then(res => {
let param = { deptId: res.data.id }
getUserListByDeptId(param).then(res => {
this.planUserList = res.data
})
})
},
//修改确定关闭
modifyinformationFn() {
// debugger
this.form.workPlanName =
this.form.supvOrgName +
this.form.planSupvDate.substring(0, 7).replace('-', '') +
this.form.supvObjName +
'监督计划'
this.$refs.form.validate(value => {
// console.log(value);
if (value == true) {
if (this.isUploadHead == 1) {
this.modifyReason = true
} else {
this.$confirm('是否确认修改?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
updatePlan(this.form).then(res => {
if (res.code == 'A0000') {
this.$message({
type: 'success',
message: res.message
})
}
this.onSubmit()
this.addinformation = false
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消修改'
})
})
}
}
})
},
//修改原因确认
modifyReasonFn() {
// this.planStatusHis.forEach(item=>{
// console.log(item);
// if(this.form.planStatus == item.id){
// this.form.planStatus = item.gvalue
// }
// })
this.$refs.form1.validate(value => {
if (value == true) {
updatePlan(this.form).then(res => {
if (res.code == 'A0000') {
this.$message({
type: 'success',
message: res.message
})
}
this.addinformation = false
this.modifyReason = false
this.onSubmit()
})
}
})
},
//问题修改
problemModifyFn(val) {
// console.log(val);
this.modify = true
this.add = false
this.problemDisabled = false
this.problemDisabled1 = false
if (val.isUploadHead == 1) {
this.problemDisabled = true
this.problemDisabled1 = false
}
this.isok1 = true
this.title = '技术监督实施问题修改'
this.ruleform = JSON.parse(JSON.stringify(val))
this.valueTitle = val.dutyOrgName
this.editCheckCode = val.dutyOrgId
this.problemAddinformation = true
},
//修改确定关闭
problemModifyinformationFn() {
this.$refs.ruleform.validate(value => {
// console.log(value);
if (value == true) {
this.$confirm('是否确认修改?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
updateProblem(this.ruleform).then(res => {
if (res.code == 'A0000') {
this.$message({
type: 'success',
message: res.message
})
this.problemOnSubmit()
this.problemAddinformation = false
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消修改'
})
})
}
})
},
// 删除
deleteFn() {
if (this.multipleSelection.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据删除!!!',
type: 'warning'
})
return
}
let isUpload = []
this.multipleSelection.forEach(item => {
isUpload.push(item.isUploadHead)
})
if (isUpload.includes(1) == true) {
this.$message({
type: 'warning',
message: '含有已上送计划,无法删除'
})
return
} else {
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let planIds = []
this.multipleSelection.forEach(item => {
planIds.push(item.planId)
})
delPlan(planIds).then(res => {
if ((res.code == 'A0000')) {
this.$message({
type: 'success',
message: res.message
})
this.onSubmit()
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
},
// 删除
problemDeleteFn() {
if (this.multipleSelection1.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据删除!!!',
type: 'warning'
})
return
}
let isUpload = []
this.multipleSelection1.forEach(item => {
isUpload.push(item.isUploadHead)
})
if (isUpload.includes(1) == true) {
this.$message({
type: 'warning',
message: '含有已上送计划,无法删除'
})
return
} else {
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let problemIds = []
this.multipleSelection1.forEach(item => {
problemIds.push(item.problemId)
})
delProblem(problemIds).then(res => {
if ((res.code == 'A0000')) {
this.$message({
type: 'success',
message: res.message
})
}
this.problemOnSubmit()
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
},
// 实施问题
problems(val) {
// console.log(val);
this.Implementation = true
let type = ''
this.supervisionType.forEach(item => {
if (item.id == val.supvType) {
type = item.code
}
})
if (type == 'Technical_Super') {
this.rules1.monitorType[0].required = true
} else {
this.rules1.monitorType[0].required = false
}
this.powerTime = val.problemOcTime
this.formData1.planId = val.planId
this.ruleform.planId = val.planId
this.problemOnSubmit()
},
//查看详情
viewsXquery(val) {
this.title = '技术监督工作计划查看'
this.guolv(val)
this.addinformation = true
this.planDisabled = true
this.isok = false
this.form = val
this.valueTitle = val.supvOrgName
this.editCheckCode = val.supvOrgId
this.valueTitle1 = val.planOrgName
this.editCheckCode1 = val.planOrgId
},
//问题查看详情
problemView(val) {
this.title = '技术监督实施问题查看'
this.ruleform = val
this.valueTitle = val.dutyOrgName
this.editCheckCode = val.dutyOrgId
this.problemAddinformation = true
this.isok1 = false
this.problemDisabled = true
this.problemDisabled1 = true
},
//问题查看
details(val) {
// this.title = '技术监督实施问题查看'
// this.addinformation = true;
},
problemDetails(val) {
// this.title = '技术监督实施问题查看'
// this.addinformation = true;
},
//上传附件
upload(val) {
// console.log(val);
this.tag = 2
this.uploadType = 1
; (this.formLine = {
classification: '',
uploadTime: '',
uploaderName: '',
uploaderId: ''
}),
(this.planId = val.problemId)
this.uploadInformation = true
this.$nextTick(() => {
this.$refs['form'].clearValidate()
})
},
planUploadFn(val) {
// console.log(val);
this.tag = 1
this.uploadType = 0
; (this.formLine = {
classification: '',
uploadTime: '',
uploaderName: '',
uploaderId: ''
}),
(this.planId = val.planId)
this.uploadInformation = true
this.$nextTick(() => {
this.$refs['form'].clearValidate()
})
},
//上传附件确认
uploadFn() {
let fileName = this.fileList[0].name
let pos = fileName.lastIndexOf('.')
let includes = fileName.substring(pos, fileName.length)
/* console.log(includes)*/
let fileLastArr = ['.doc', '.docx', '.xls', '.xlsx', '.pdf', '.txt', '.zip', '.rar']
if (!fileLastArr.includes(includes)) {
this.$message.error('当前不支持该格式文件')
return false
}
this.$refs.form.validate(value => {
if (value == true) {
this.$confirm('是否确认上传附件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
//console.log(this.fileList);
if (this.fileList.length == 0) {
this.$message({
type: 'warning',
message: '请选择一个文件上传!!!'
})
} else {
const formData = new FormData()
this.fileList.forEach(item => {
// console.log(item);
if (item.raw == '') {
} else {
formData.append('files', item.raw)
}
})
formData.append('planId', this.planId)
formData.append('type', this.uploadType)
formData.append('attachmentType', this.formLine.classification)
formData.append('uploadTime', this.formLine.uploadTime)
formData.append('uploaderName', this.formLine.uploaderName)
formData.append('uploaderId', this.formLine.uploaderId)
planUpload(formData).then(res => {
if (res.code == 'A0000') {
this.$message({
message: res.message,
type: 'success'
})
this.uploadInformation = false
this.$refs.upload.clearFiles()
this.fileList = []
if (this.tag == 1) {
this.onSubmit()
} else if (this.yag == 2) {
this.problemOnSubmit()
}
}
})
}
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消上传'
})
})
}
})
},
//查看附件
lookFn(val) {
this.ids = []
this.uploadTitle = '查看附件'
this.fjtitle = '所属计划'
this.lookUpload = true
this.formLine.classification = ''
this.ids.push(val.planId)
this.uploadType = 0
this.lookOnsubmit()
},
//问题查看附件
problemUpload(val) {
this.ids = []
this.uploadTitle = '查看附件'
this.fjtitle = '问题简要描述'
this.lookUpload = true
this.formLine.classification = ''
this.ids.push(val.problemId)
this.uploadType = 1
this.lookOnsubmit()
},
lookOnsubmit() {
let form = {
attachmentType: this.formLine.classification,
ids: this.ids,
type: this.uploadType
}
list(form).then(res => {
this.uploadData = res.data
})
},
delFile() {
if (this.multipleSelection2.length == 0) {
this.$message({
type: 'warning',
message: '请选择一个文件删除!!!'
})
} else {
let uuid = this.multipleSelection2.map(item => item.uuid)
this.$confirm('是否确认删除附件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delFile(uuid).then(res => {
this.$message({
type: 'success',
message: '删除成功'
})
this.lookOnsubmit()
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
},
//附件下载
downLoadFn(val, type) {
this.$confirm('是否确认附件下载?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let data = {
busId: val.busiId,
type: this.uploadType,
attachmentType: val.attachmentType
}
detail(data).then(res => {
let blob = new Blob([res], {
type: 'application/vnd.ms-excel'
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url // link.download = "电压暂降事件分析报告"; // 设置下载的文件名
link.download = val.attachmentName // 设置下载的文件名
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link)
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消下载'
})
})
},
downLoad(val, type) {
this.$confirm('是否确认附件下载?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let data = {
busId: val.problemId,
type: 1,
attachmentType: val.attachmentType
}
detail(data).then(res => {
let blob = new Blob([res], {
type: 'application/vnd.ms-excel'
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url // link.download = "电压暂降事件分析报告"; // 设置下载的文件名
if (type == '01') {
link.download = val.attachmentName // 设置下载的文件名
} else if (type == '02') {
link.download = val.attachmentNameTwo // 设置下载的文件名
}
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link)
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消下载'
})
})
},
handleChange(file, fileList) {
// console.log(file, fileList);
this.fileList = fileList
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
} 个文件`
)
},
beforeRemove(file, fileList) {
// console.log(file,fileList);
this.fileList = []
},
//计划上送网公司
planPush() {
if (this.multipleSelection.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据上送网公司!!!',
type: 'warning'
})
return
}
let isUpload = []
this.multipleSelection.forEach(item => {
isUpload.push(item.isUploadHead)
})
// if(isUpload.includes(1) == true){
// this.$message({
// type: "warning",
// message: '已上送,无需重复上送',
// });
// return
// }else{
this.$confirm('是否确认上送网公司?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let planIds = []
this.multipleSelection.forEach(item => {
planIds.push(item.planId)
})
pushPlan(planIds).then(res => {
if ((res.code == 'A0000')) {
this.$message({
type: 'success',
message: res.data
})
}
this.onSubmit()
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消上送'
})
})
// }
},
//取消计划上送网公司
cancelPlanPush() {
if (this.multipleSelection.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据取消上送网公司!!!',
type: 'warning'
})
return
}
let isUpload = []
this.multipleSelection.forEach(item => {
isUpload.push(item.isUploadHead)
})
// if(isUpload.includes(0) == true){
// this.$message({
// type: "warning",
// message: '未上送,无法取消上送',
// });
// return
// }else if(isUpload.includes(2) == true){
// this.$message({
// type: "warning",
// message: '已取消上送,无需重复取消上送',
// });
// return
// }else{
this.$confirm('是否确认取消上送网公司?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let planIds = []
this.multipleSelection.forEach(item => {
planIds.push(item.planId)
})
delPushPlan(planIds).then(res => {
if ((res.code == 'A0000')) {
this.$message({
type: 'success',
message: res.data
})
}
this.onSubmit()
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消上送'
})
})
// }
},
//问题上送网公司
problemPush() {
if (this.multipleSelection1.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据上送问题!!!',
type: 'warning'
})
return
}
let isUpload = []
this.multipleSelection1.forEach(item => {
isUpload.push(item.isUploadHead)
})
// if(isUpload.includes(1) == true){
// this.$message({
// type: "warning",
// message: '已上送,无需重复上送',
// });
// return
// }else{
this.$confirm('是否确认上送网公司?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let planIds = []
this.multipleSelection1.forEach(item => {
planIds.push(item.problemId)
})
pushQuestion(planIds).then(res => {
if ((res.code == 'A0000')) {
this.$message({
type: 'success',
message: res.data
})
}
this.onSubmit()
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消上送'
})
})
// }
},
problemQuestionPush() {
if (this.multipleSelection1.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据上送问题整改措施!!!',
type: 'warning'
})
return
}
let isUpload = []
let time = []
let measure = []
this.multipleSelection1.forEach(item => {
isUpload.push(item.isUploadHead)
time.push(item.rectificationTime)
measure.push(item.rectificationMeasure)
})
// console.log(isUpload.includes(0));
// if(isUpload.includes(0) == true){
// this.$message({
// type: "warning",
// message: '问题未上送,无法上送问题整改措施',
// });
// return
// }else{
// if(time.includes('') == true || measure.includes('') == true){
// this.$message({
// type: "warning",
// message: '整改时间和整改措施不可为空',
// });
// return
// }else{
this.$confirm('是否确认上送问题整改措施?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let planIds = []
this.multipleSelection1.forEach(item => {
planIds.push(item.problemId)
})
pushQuestionUpdate(planIds).then(res => {
if ((res.code == 'A0000')) {
this.$message({
type: 'success',
message: res.message
})
}
this.onSubmit()
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消上送'
})
})
// }
// }
},
//计划附件上送
planAnnexPush() {
this.ids = []
if (this.multipleSelection.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据上送!!!',
type: 'warning'
})
return
}
this.uploadTitle = '附件上送'
this.fjtitle = '所属计划'
this.lookUpload = true
this.formLine.classification = ''
this.multipleSelection.forEach(item => {
this.ids.push(item.planId)
})
this.uploadType = 0
this.lookOnsubmit()
},
//问题附件上送
annexPush() {
this.ids = []
if (this.multipleSelection1.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据上送!!!',
type: 'warning'
})
return
}
this.uploadTitle = '附件上送'
this.fjtitle = '问题简要描述·'
this.lookUpload = true
this.formLine.classification = ''
this.multipleSelection1.forEach(item => {
this.ids.push(item.problemId)
})
this.uploadType = 1
this.lookOnsubmit()
},
//计划附件上送确认
isUploadFn() {
if (this.multipleSelection2.length == 0) {
this.$message({
showClose: true,
message: '请选择一条数据上送!!!',
type: 'warning'
})
return
}
this.$confirm('是否确认上送?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let busIds = []
this.multipleSelection2.forEach(item => {
busIds.push(item.uuid)
})
pushFile(busIds).then(res => {
if ((res.code == 'A0000')) {
this.$message({
dangerouslyUseHTMLString: true,
type: 'success',
message: res.data
})
}
// this.lookUpload = false
this.lookOnsubmit()
this.multipleSelection2 = []
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消上送'
})
})
},
//附件上送
// annexPush(){
// if (this.multipleSelection1.length == 0) {
// this.$message({
// showClose: true,
// message: "请选择一条数据上送!!!",
// type: "warning",
// });
// return;
// }
// this.multipleSelection1.forEach(item=>{
// if(item.attachmentName != null){
// this.$confirm("是否确认上送?", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// })
// .then(() => {
// let busIds = [];
// this.multipleSelection1.forEach((item) => {
// busIds.push(item.planId);
// });
// pushFile(busIds).then((res) => {
// if ((res.code = "A0000")) {
// this.$message({
// type: "success",
// message: res.message,
// });
// }
// this.onSubmit();
// });
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "已取消上送",
// });
// });
// }else{
// this.$message({
// type: "warning",
// message: '无附件上送',
// });
// }
// })
// },
//关闭弹窗
handleClose() {
this.addinformation = false
},
//关闭弹窗
capacitorClose() {
this.capacitorFlag = false
},
capacitorTableClose() {
this.capacitorTableFlag = false
},
capacitorDia() {
this.capacitorFlag = true
this.formCapacitor.relObjName = ''
this.formCapacitor.objId = ''
},
capacitorFlagDialog(row) {
this.formCapacitor = {
relObjName: '',
relObjType: '01',
planId: ''
}
this.capacitorTableFlag = true
this.formCapacitor.planId = row.planId
this.initCapacitorList(row.planId)
},
initCapacitorList(planId) {
let data = { planId: planId }
planRelList(data).then(res => {
if (res.code == 'A0000') {
this.capacitorTableData = res.data
}
})
},
lookUploadClose() {
this.lookUpload = false
if (this.uploadType == 0) {
this.onSubmit()
} else if (this.uploadType == 1) {
this.problemOnSubmit()
}
},
uploadClose() {
this.uploadInformation = false
this.$refs.upload.clearFiles()
this.fileList = []
if (this.uploadType == 0) {
this.onSubmit()
} else if (this.uploadType == 1) {
this.problemOnSubmit()
}
},
implementationClose() {
this.Implementation = false
this.onSubmit()
},
problemHandleClose() {
this.problemAddinformation = false
},
capacitorSubmit() {
this.$refs.formCapacitor.validate(value => {
// console.log(value);
if (value) {
this.$confirm('是否确认新增?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
saveOrUpdatePlanRel(this.formCapacitor).then(res => {
if (res.code == 'A0000') {
this.$message({
type: 'success',
message: res.message
})
this.capacitorFlag = false;
this.initCapacitorList(this.formCapacitor.planId)
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消新增'
})
})
}
})
},
capacitorDel(row) {
let ids = [row.objId]
delPlanRel(ids).then(res => {
if (res.code == 'A0000') {
this.$message({
type: 'success',
message: '删除成功'
})
this.initCapacitorList(this.formCapacitor.planId)
}
})
},
updateCapacitor(row) {
this.capacitorFlag = true
this.formCapacitor.objId = row.objId
this.formCapacitor.planId = row.planId
this.formCapacitor.relObjName = row.relObjName
this.formCapacitor.relObjType = row.relObjType
}
},
computed: {},
watch: {}
}
</script>
<style lang="less" scoped>
@import url('../../../styles/comStyle.less');
</style>
<style lang="scss" scoped>
.boxS {
width: 100%;
// display: flex !important;
// justify-content: space-between;
}
::v-deep .el-dialog .el-dialog__body {
max-height: 100vh;
min-height: 270px;
padding: 20px;
overflow-y: auto;
}
::v-deep .eduity {
.el-dialog {
height: 500px;
}
}
::v-deep .timeBox {
.el-date-editor.el-input {
width: 100%;
}
}
::v-deep .eduitybox {
.el-textarea__inner {
height: 160px;
}
}
::v-deep .form {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.el-form-item {
display: flex;
width: 48%;
.el-form-item__content {
flex: 1 !important;
.el-select {
width: 100%;
}
.el-input__inner {
width: 100% !important;
}
.el-date-editor {
width: 100%;
}
}
}
}
::v-deep .box {
.el-input {
width: 150px;
}
}
.border {
// width: 97%;
// height: 200px;
padding: 10px;
margin: 10px;
border: 1px solid black;
}
.border1 {
// width: 97%;
// height: 200px;
padding: 10px;
margin: 30px 10px 10px 10px;
border: 1px solid black;
}
.border-title1 {
width: 150px;
height: 20px;
margin-top: -20px;
margin-left: 10px;
text-align: center;
background: white;
}
.border-title {
width: 100px;
height: 20px;
margin-top: -20px;
margin-left: 10px;
text-align: center;
background: white;
}
.container {
/* margin: auto; */
top: 0px;
right: 0;
width: 40%;
height: 0px;
z-index: 2000;
position: absolute;
background-color: #e4e7ebb9;
overflow: auto;
scroll-behavior: smooth;
-radius: 20px;
}
/* 隐藏滚动条 */
::-webkit-scrollbar {
display: block;
}
.expend {
animation: expend ease 5s forwards;
}
.close-container {
animation: no-expend ease 1s forwards;
}
@keyframes expend {
from {
top: 0px;
height: auto;
}
to {
height: auto;
top: 0px;
}
}
@keyframes no-expend {
from {
height: 20%;
top: 0px;
}
to {
top: 0px;
height: 0px;
}
}
.coles {
position: absolute;
right: 0;
font-size: 20px;
cursor: pointer;
}
::v-deep.el-dropdown-menu {
padding: 10px 0;
}
</style>