添加海南技术监督
This commit is contained in:
@@ -0,0 +1,533 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="add" title="问题新增" width="400px" :before-close="handleClose">
|
||||
<el-divider content-position="left">第一步 基本信息填报</el-divider>
|
||||
<el-form :inline="true" ref="ruleForm" :rules="rules" label-width="auto" class="form-one" :model="addData">
|
||||
<el-form-item label="所属单位">
|
||||
<Area ref="areaRef" v-model="addData.orgNo" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题来源" prop="problemSources">
|
||||
<el-select v-model="addData.problemSources" clearable placeholder="请选择问题来源">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题名称" prop="problemName">
|
||||
<el-input v-model="addData.problemName" clearable placeholder="请填写问题名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="nextStep">下一步</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 新增第二步(在线监测超标问题新增) -->
|
||||
<el-dialog draggable title="在线监测超标问题新增" v-model="onlineAdd" width="1500px" :before-close="handleClose">
|
||||
<el-divider content-position="left">第二步 选择问题测点</el-divider>
|
||||
<el-form :inline="true" class="form">
|
||||
<el-form-item label="告警时间">
|
||||
<DatePicker ref="DateRef" />
|
||||
</el-form-item>
|
||||
<el-form-item label="稳态指标">
|
||||
<el-select v-model="harmonicTypes" multiple collapse-tags placeholder="请选择稳态指标">
|
||||
<el-option v-for="item in harmonicTypesList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="越线天数占比(%)">
|
||||
<el-input-number v-model="rate" :min="0" :max="100" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-Search" @click="searchOnLine">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<vxe-table v-bind="defaultAttribute" v-loading="isLoading1" height="350" ref="xTable1Ref" :data="onlineAddData">
|
||||
<vxe-column type="radio" width="60"></vxe-column>
|
||||
<vxe-column field="sustationName" title="变电站"></vxe-column>
|
||||
<vxe-column field="barName" title="母线"></vxe-column>
|
||||
<vxe-column field="measurementPointName" title="监测点名称"></vxe-column>
|
||||
<vxe-column field=" " title="监测点编号"></vxe-column>
|
||||
<vxe-column field="loadType" title="监测对象类型"></vxe-column>
|
||||
<vxe-column field="objName" title="监测对象"></vxe-column>
|
||||
<vxe-column field="voltageLevel" title="电压等级"></vxe-column>
|
||||
<vxe-column field="harmonicType" title="告警类型" :formatter="formatter"></vxe-column>
|
||||
<vxe-column field="overLimitrate" title="越线天数占比">
|
||||
<template #default="{ row }">
|
||||
<el-dropdown>
|
||||
<span class="el-dropdown-link">
|
||||
{{ row.overLimitrate.toFixed(3) }}
|
||||
<el-icon class="el-icon--right">
|
||||
<arrow-down />
|
||||
</el-icon>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-for="item in row?.dateList">{{ item }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
<div style="display: flex; justify-content: center; margin-top: 10px">
|
||||
<el-button type="primary" class="ml20" @click="previouStep">上一步</el-button>
|
||||
<el-button type="primary" class="ml20" @click="OnlineMonitoring">生成问题</el-button>
|
||||
<el-button type="primary" class="ml20" @click="handleClose">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 新增第二步(普测超标问题新增) -->
|
||||
<el-dialog draggable title="普测超标问题新增" v-model="ordinaryAdd" width="1200px" :before-close="handleClose">
|
||||
<el-divider content-position="left">第二步 选择普测计划及问题类型</el-divider>
|
||||
<el-form :model="ordinaryA" :inline="true" class="form">
|
||||
<el-form-item>
|
||||
<Area v-model="ordinaryA.orgNo"></Area>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="普测结果上传时间">
|
||||
<el-date-picker
|
||||
v-model="ordinaryA.planStartTime"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择月"
|
||||
@change="queryPlanName"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="普测计划名称">
|
||||
<el-select v-model="ordinaryA.planName" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in planNameList"
|
||||
:key="item.planName"
|
||||
:label="item.planName"
|
||||
:value="item.planName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-Search" @click="searchFnExcessive">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<vxe-table
|
||||
v-bind="defaultAttribute"
|
||||
v-loading="isLoading2"
|
||||
height="350"
|
||||
ref="xTable2Ref"
|
||||
:data="ordinaryAddData"
|
||||
>
|
||||
<vxe-column type="radio" width="60"></vxe-column>
|
||||
<vxe-column field="subName" title="变电站名称"></vxe-column>
|
||||
<vxe-column field="voltageLevelName" title="变电站电压等级"></vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
<el-divider content-position="left">第三步 选择问题指标</el-divider>
|
||||
<el-form :model="ordinaryA" :rules="rules" ref="ordinaryARef" :inline="true" class="form">
|
||||
<el-form-item label="稳态指标" prop="steadyState">
|
||||
<el-checkbox-group v-model="ordinaryA.steadyState">
|
||||
<el-checkbox v-for="(item, ind) in steadyStateList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="暂态指标" prop="transientIndicators">
|
||||
<el-checkbox-group v-model="ordinaryA.transientIndicators">
|
||||
<el-checkbox v-for="(item, ind) in transientIndicatorsList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="display: flex; justify-content: center; margin-top: 10px">
|
||||
<el-button type="primary" class="ml20" @click="previouStep">上一步</el-button>
|
||||
<el-button type="primary" class="ml20" @click="GeneralSurvey">生成问题</el-button>
|
||||
<el-button type="primary" class="ml20" @click="handleClose">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 新增第二步(运维异常问题新增) -->
|
||||
<el-dialog draggable title="运维异常问题新增" v-model="operationAdd" width="1200px" :before-close="handleClose">
|
||||
<el-divider content-position="left">第二步 选择普测计划及问题类型</el-divider>
|
||||
<el-form :model="operationAdddata" ref="operationAddRef" :inline="true" :rules="rules">
|
||||
<el-form-item label="异常终端名称:" prop="abnormalDevName">
|
||||
<el-input
|
||||
v-model="operationAdddata.abnormalDevName"
|
||||
clearable
|
||||
placeholder="请填写异常终端名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="发现异常时间:" prop="abnormalDevTime">
|
||||
<el-date-picker
|
||||
v-model="operationAdddata.abnormalDevTime"
|
||||
type="date"
|
||||
placeholder="请选择发现异常时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="终端异常描述:" style="margin-top: 10px" prop="eventDescription">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请填写终端异常描述"
|
||||
v-model="operationAdddata.eventDescription"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">第三步 选择问题指标</el-divider>
|
||||
<el-form-item label="稳态指标:" prop="steadyState">
|
||||
<el-checkbox-group v-model="operationAdddata.steadyState">
|
||||
<el-checkbox v-for="(item, ind) in steadyStateList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="暂态指标:" prop="transientIndicators">
|
||||
<el-checkbox-group v-model="operationAdddata.transientIndicators">
|
||||
<el-checkbox v-for="(item, ind) in transientIndicatorsList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="display: flex; justify-content: center; margin-top: 10px">
|
||||
<el-button type="primary" class="ml20" @click="previouStep">上一步</el-button>
|
||||
<el-button type="primary" class="ml20" @click="generateAbnormal">生成问题</el-button>
|
||||
<el-button type="primary" class="ml20" @click="handleClose">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 新增第二步(用户投诉问题新增) -->
|
||||
<el-dialog draggable title="用户投诉问题新增" v-model="userAdd" width="1200px" :before-close="handleClose">
|
||||
<el-divider content-position="left">第二步 选择投诉用户</el-divider>
|
||||
<el-form :model="userAdddata" :inline="true" ref="userAddRef" :rules="rules">
|
||||
<el-form-item label="用户名称:" prop="userName">
|
||||
<el-input v-model="userAdddata.userName" clearable placeholder="请输入用户名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户编号:" prop="userNo">
|
||||
<el-input v-model="userAdddata.userNo" clearable placeholder="请输入用户编号"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">第三步 填写投诉详情</el-divider>
|
||||
|
||||
<el-form-item label="投诉内容:" style="margin-top: 10px" prop="complaintContent">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入内容"
|
||||
v-model="userAdddata.complaintContent"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="投诉时间:" style="margin-top: 10px" prop="complaintTime">
|
||||
<el-date-picker
|
||||
v-model="userAdddata.complaintTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">第四步 选择问题指标</el-divider>
|
||||
|
||||
<el-form-item label="稳态指标:" prop="steadyState">
|
||||
<el-checkbox-group v-model="userAdddata.steadyState">
|
||||
<el-checkbox v-for="(item, ind) in steadyStateList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="暂态指标:" prop="transientIndicators">
|
||||
<el-checkbox-group v-model="userAdddata.transientIndicators">
|
||||
<el-checkbox v-for="(item, ind) in transientIndicatorsList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="display: flex; justify-content: center; margin-top: 10px">
|
||||
<el-button type="primary" class="ml20" @click="previouStep">上一步</el-button>
|
||||
<el-button type="primary" class="ml20" @click="userAddProblem">生成问题</el-button>
|
||||
<el-button type="primary" class="ml20" @click="handleClose">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||
import { ArrowDown } from '@element-plus/icons-vue'
|
||||
const emit = defineEmits(['handleClose', 'onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const alarmList = dictData.getBasicData('alarm_Type')
|
||||
const Voltage = dictData.getBasicData('Dev_Voltage')
|
||||
const userTypeData = dictData.getBasicData('User_Category')
|
||||
import {
|
||||
getRMpPartHarmonicDetail,
|
||||
querySurveyPlanName,
|
||||
querySurveyPlanOnQuestion,
|
||||
addAbnormalIssues,
|
||||
addComplaintIssues,
|
||||
addGeneralSurveyIssues,
|
||||
addExcessiveIssues
|
||||
} from '@/api/process-boot/electricitymanagement'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const steadyStateList = dictData.getBasicData('Steady_Indicator')
|
||||
const transientIndicatorsList = dictData.getBasicData('Transient_Indicators')
|
||||
|
||||
const add = ref(true)
|
||||
const onlineAdd = ref(false)
|
||||
const isLoading1 = ref(false)
|
||||
const isLoading2 = ref(false)
|
||||
const ordinaryAdd = ref(false)
|
||||
const userAdd = ref(false)
|
||||
const operationAdd = ref(false)
|
||||
const ruleForm = ref()
|
||||
const DateRef = ref()
|
||||
const userAddRef = ref()
|
||||
const operationAddRef = ref()
|
||||
const ordinaryARef = ref()
|
||||
const xTable1Ref = ref()
|
||||
const xTable2Ref = ref()
|
||||
const harmonicTypes = ref([]) //稳态指标id集合
|
||||
const harmonicTypesList = dictData.getBasicData('Indicator_Type')
|
||||
const rate = ref(60) //越线天数占比(一个月)
|
||||
const addData = ref({
|
||||
orgName: '',
|
||||
problemSources: '',
|
||||
problemName: '',
|
||||
orgNo: dictData.state.area[0].id
|
||||
})
|
||||
const ordinaryA = ref({
|
||||
orgNo: '',
|
||||
orgName: '',
|
||||
planName: '',
|
||||
planStartTime: '',
|
||||
uploadTime: '',
|
||||
name: '',
|
||||
steadyState: [],
|
||||
transientIndicators: []
|
||||
})
|
||||
const operationAdddata = ref({
|
||||
abnormalDevName: '',
|
||||
eventDescription: '',
|
||||
abnormalDevTime: '',
|
||||
steadyState: [],
|
||||
transientIndicators: []
|
||||
})
|
||||
const userA = ref({
|
||||
userType: 'Elec_User',
|
||||
id: ''
|
||||
})
|
||||
const userAdddata = ref({
|
||||
complaintContent: '',
|
||||
complaintTime: '',
|
||||
steadyState: [],
|
||||
userName: '',
|
||||
userNo: '',
|
||||
transientIndicators: []
|
||||
})
|
||||
const planNameList: any = ref([])
|
||||
const onlineAddData = ref([])
|
||||
const ordinaryAddData = ref([])
|
||||
const rules = {
|
||||
problemName: [{ required: true, message: '请输入问题名称', trigger: 'blur' }],
|
||||
userName: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
|
||||
userNo: [{ required: true, message: '请输入用户编号', trigger: 'blur' }],
|
||||
complaintContent: [{ required: true, message: '请输入投诉内容', trigger: 'blur' }],
|
||||
complaintTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
||||
problemSources: [{ required: true, message: '情选择问题来源', trigger: 'change' }],
|
||||
abnormalDevTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
||||
transientIndicators: [{ required: true, message: '请选择暂态指标', trigger: 'change' }],
|
||||
steadyState: [{ required: true, message: '请选择稳态指标', trigger: 'change' }],
|
||||
eventDescription: [{ required: true, message: '请输入终端异常描述', trigger: 'blur' }],
|
||||
abnormalDevName: [{ required: true, message: '请输入问题名称', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
// 关闭
|
||||
const handleClose = () => {
|
||||
emit('handleClose')
|
||||
emit('onSubmit')
|
||||
}
|
||||
// 下一步
|
||||
const nextStep = () => {
|
||||
ruleForm.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
if (addData.value.problemSources == 'Online') {
|
||||
add.value = false
|
||||
|
||||
onlineAdd.value = true
|
||||
setTimeout(() => {
|
||||
DateRef.value.setTimeOptions([{ label: '月份', value: 3 }])
|
||||
searchOnLine()
|
||||
}, 0)
|
||||
} else if (addData.value.problemSources == 'General') {
|
||||
ordinaryA.value.orgNo = dictData.state.area[0].id
|
||||
ordinaryA.value.orgName = dictData.state.area[0].name
|
||||
|
||||
add.value = false
|
||||
ordinaryAdd.value = true
|
||||
ordinaryA.value.planStartTime = window.XEUtils.toDateString(new Date().getTime(), 'yyyy-MM') + '-01'
|
||||
|
||||
queryPlanName()
|
||||
setTimeout(() => {
|
||||
searchFnExcessive()
|
||||
}, 0)
|
||||
} else if (addData.value.problemSources == 'User_Complaints') {
|
||||
add.value = false
|
||||
userAdd.value = true
|
||||
} else if (addData.value.problemSources == 'Dev_Exception') {
|
||||
add.value = false
|
||||
operationAdd.value = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 上一步
|
||||
const previouStep = () => {
|
||||
onlineAdd.value = false
|
||||
ordinaryAdd.value = false
|
||||
userAdd.value = false
|
||||
operationAdd.value = false
|
||||
add.value = true
|
||||
}
|
||||
|
||||
// 在线监测超标问题新增
|
||||
const OnlineMonitoring = () => {
|
||||
if (xTable1Ref.value.getRadioRecord() == null) {
|
||||
return ElMessage.warning('请选择变电站')
|
||||
} else {
|
||||
addExcessiveIssues({
|
||||
warnTarget:xTable1Ref.value.getRadioRecord().harmonicType,
|
||||
...xTable1Ref.value.getRadioRecord(),
|
||||
...addData.value
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
emit('handleClose')
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
}
|
||||
// 在线监测告警查询
|
||||
const searchOnLine = () => {
|
||||
isLoading1.value = true
|
||||
getRMpPartHarmonicDetail({
|
||||
harmonicTypes: harmonicTypes.value,
|
||||
rate: rate.value * 0.01,
|
||||
startTime: DateRef.value.timeValue[0],
|
||||
endTime: DateRef.value.timeValue[1]
|
||||
}).then(res => {
|
||||
isLoading1.value = false
|
||||
onlineAddData.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
// 普通监测超标问题新增
|
||||
const queryPlanName = () => {
|
||||
querySurveyPlanName({
|
||||
orgNo: ordinaryA.value.orgNo,
|
||||
planStartTime: ordinaryA.value.planStartTime
|
||||
}).then(res => {
|
||||
planNameList.value = res.data
|
||||
})
|
||||
}
|
||||
const searchFnExcessive = () => {
|
||||
isLoading2.value = true
|
||||
querySurveyPlanOnQuestion(ordinaryA.value).then(res => {
|
||||
isLoading2.value = false
|
||||
ordinaryAddData.value = res.data
|
||||
})
|
||||
}
|
||||
// 普测超标生成问题
|
||||
const GeneralSurvey = () => {
|
||||
if (xTable2Ref.value.getRadioRecord() == null) {
|
||||
return ElMessage.warning('请选择变电站')
|
||||
} else {
|
||||
ordinaryARef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
addGeneralSurveyIssues({
|
||||
substationId: xTable2Ref.value.getRadioRecord().subId,
|
||||
...xTable2Ref.value.getRadioRecord(),
|
||||
...ordinaryA.value,
|
||||
...addData.value
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
emit('handleClose')
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const formatter = (row: any) => {
|
||||
if (row.column.field == 'harmonicType') {
|
||||
return harmonicTypesList.filter((item: any) => item.id == row.cellValue)[0]?.name
|
||||
} else if (row.column.field == 'voltageLevel') {
|
||||
return Voltage.filter((item: any) => item.id == row.cellValue)[0]?.name
|
||||
} else if (row.column.field == 'electricityType') {
|
||||
return dictData.getBasicData('Ele_Class').filter((item: any) => item.id == row.cellValue)[0]?.name
|
||||
} else {
|
||||
return row.cellValue
|
||||
}
|
||||
}
|
||||
// 运维异常问题新增
|
||||
const generateAbnormal = () => {
|
||||
operationAddRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
addAbnormalIssues({
|
||||
...operationAdddata.value,
|
||||
...addData.value
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
emit('handleClose')
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 用户投诉新增
|
||||
const userAddProblem = () => {
|
||||
userAddRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
addComplaintIssues({
|
||||
...userAdddata.value,
|
||||
...addData.value
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
emit('handleClose')
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
onMounted(() => {})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: var(--el-color-primary) !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
155
src/views/pqs/supervise_jb/electricalEnergy/components/audit.vue
Normal file
155
src/views/pqs/supervise_jb/electricalEnergy/components/audit.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="问题来源">
|
||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报进度">
|
||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||
<el-option
|
||||
v-for="item in fillingProgress"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.problemName"
|
||||
clearable
|
||||
placeholder="请输入问题名称"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<!-- 审核 -->
|
||||
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||
<Filling
|
||||
ref="FillingRef"
|
||||
v-if="dialogVisible"
|
||||
:isDisabled="true"
|
||||
:audit="true"
|
||||
:flag="true"
|
||||
@beforeClose="beforeClose"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 审核记录 -->
|
||||
<recording ref="recordingRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
import Filling from './filling.vue'
|
||||
import recording from './recording.vue'
|
||||
const dictData = useDictData()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||
const TableHeaderRef = ref()
|
||||
const FillingRef = ref()
|
||||
const ruleFormRef = ref()
|
||||
|
||||
const list: any = ref({})
|
||||
const recordingRef = ref(false)
|
||||
const dialogVisible = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/electricityQuality/getIssues',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'problemSources',
|
||||
title: '问题来源'
|
||||
},
|
||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||
{ field: 'problemName', title: '问题名称' },
|
||||
|
||||
{ field: 'dataDate', title: '提交时间' },
|
||||
{
|
||||
field: 'reportProcess',
|
||||
title: '填报节点',
|
||||
formatter: (row: any) => {
|
||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '150',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
dialogVisible.value = true
|
||||
setTimeout(() => {
|
||||
list.value = row
|
||||
FillingRef.value.open(row)
|
||||
}, 10)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核记录',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
recordingRef.value.open(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.problemSources = ''
|
||||
tableStore.table.params.reportProcess = ''
|
||||
tableStore.table.params.problemName = ''
|
||||
tableStore.table.params.reportProcessStatus = 'Auditt'
|
||||
|
||||
const beforeClose = () => {
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<el-dialog draggable title="详情" v-model="dialogVisible" width="1400px" :before-close="handleClose">
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="指标" name="1">
|
||||
<el-divider content-position="left" style="font-size: 18px">问题基本信息</el-divider>
|
||||
<el-form :model="addData" :inline="true" disabled label-width="100px">
|
||||
<el-form-item label="所属单位:">
|
||||
<el-input v-model="addData.orgName" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题名称:">
|
||||
<el-input v-model="addData.problemName" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题编号:">
|
||||
<el-input v-model="addData.powerQualityProblemNo" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题来源:">
|
||||
<el-select v-model="addData.problemSources">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 在线监测超标问题 -->
|
||||
<el-form :inline="true" label-width="100px" disabled v-if="problemSources == '在线监测告警'">
|
||||
<el-form-item label="变电站:">
|
||||
<el-input v-model="addData.sustationName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="母线:">
|
||||
<el-input v-model="addData.barName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测点名称:">
|
||||
<el-input v-model="addData.measurementPointName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测点编号:">
|
||||
<el-input v-model="addData.measurementPointId"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测对象类型:">
|
||||
<el-input v-model="addData.loadType"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测对象:">
|
||||
<el-input v-model="addData.objName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电压等级:">
|
||||
<el-input v-model="addData.voltageLevel"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 普测超标 -->
|
||||
<el-form :inline="true" label-width="100px" disabled v-if="problemSources == '普测超标'">
|
||||
<el-form-item label="普测计划名称:">
|
||||
<el-input v-model="addData.planName" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属变电站:">
|
||||
<el-input v-model="addData.substationName" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="母线名称:">
|
||||
<el-input v-model="addData.busBarName" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">
|
||||
问题指标
|
||||
</el-divider>
|
||||
|
||||
<el-form-item label="稳态指标:">
|
||||
<el-checkbox-group v-model="addData.steadyIndicator">
|
||||
<el-checkbox v-for="(item, ind) in steadyIndicatorList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="暂态指标:">
|
||||
<el-checkbox-group v-model="addData.transientIndicators">
|
||||
<el-checkbox v-for="(item, ind) in transientIndicatorsList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 用户投诉 -->
|
||||
<el-form :inline="true" label-width="100px" disabled v-if="problemSources == '用户投诉'">
|
||||
<el-form-item label="用户投诉名称:">
|
||||
<el-input v-model="addData.userName" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="投诉用户编号:">
|
||||
<el-input v-model="addData.userNo" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="投诉时间:">
|
||||
<el-input v-model="addData.complaintTime" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="投诉内容:">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
style="width: 400px"
|
||||
placeholder="请输入内容"
|
||||
v-model="addData.complaintContent"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">
|
||||
问题指标
|
||||
</el-divider>
|
||||
|
||||
<el-form-item label="稳态指标:">
|
||||
<el-checkbox-group v-model="addData.steadyIndicator">
|
||||
<el-checkbox v-for="(item, ind) in steadyIndicatorList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="暂态指标:">
|
||||
<el-checkbox-group v-model="addData.transientIndicators">
|
||||
<el-checkbox v-for="(item, ind) in transientIndicatorsList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 终端异常 -->
|
||||
<el-form :inline="true" label-width="auto" disabled v-if="problemSources == '终端异常'">
|
||||
<el-form-item label="异常终端名称:">
|
||||
<el-input v-model="addData.abnormalDevName" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="发现异常时间:">
|
||||
<el-input v-model="addData.abnormalDevTime" placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="终端异常描述:">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="addData.eventDescription"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">
|
||||
问题指标
|
||||
</el-divider>
|
||||
|
||||
<el-form-item label="稳态指标:">
|
||||
<el-checkbox-group v-model="addData.steadyIndicator">
|
||||
<el-checkbox v-for="(item, ind) in steadyIndicatorList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="暂态指标:">
|
||||
<el-checkbox-group v-model="addData.transientIndicators">
|
||||
<el-checkbox v-for="(item, ind) in transientIndicatorsList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="流程" name="2">
|
||||
<Filling v-if="dialogVisible" :isDisabled="true" :audit="true" ref="FillingRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import {
|
||||
getAbnormalDetail,
|
||||
getComplaintDetail,
|
||||
getGeneralSurveyDetail,
|
||||
getExcessiveDetail
|
||||
} from '@/api/process-boot/electricitymanagement'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Filling from './filling.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
const addData: any = ref({})
|
||||
const FillingRef = ref()
|
||||
const activeName = ref(`1`)
|
||||
const dialogVisible: any = ref(false)
|
||||
const problemSources = ref('')
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const steadyIndicatorList = dictData.getBasicData('Steady_Indicator')
|
||||
const transientIndicatorsList = dictData.getBasicData('Transient_Indicators')
|
||||
const open = async (row: any) => {
|
||||
dialogVisible.value = true
|
||||
let res: any = {}
|
||||
problemSources.value = row.problemSources
|
||||
if (row.problemSources == '终端异常') {
|
||||
res = await getAbnormalDetail(row.powerQualityProblemNo)
|
||||
} else if (row.problemSources == '在线监测告警') {
|
||||
res = await getExcessiveDetail(row.powerQualityProblemNo)
|
||||
} else if (row.problemSources == '用户投诉') {
|
||||
res = await getComplaintDetail(row.powerQualityProblemNo)
|
||||
} else if (row.problemSources == '普测超标') {
|
||||
res = await getGeneralSurveyDetail(row.powerQualityProblemNo)
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
addData.value = res.data
|
||||
FillingRef.value.open(row)
|
||||
}, 0)
|
||||
}
|
||||
|
||||
// 取消
|
||||
const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-tabs__content) {
|
||||
height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,294 @@
|
||||
<template>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">问题基本信息</el-divider>
|
||||
<el-form :inline="true" label-width="auto">
|
||||
<el-form-item label="所属单位:">
|
||||
<el-input v-model="addData.orgName" clearable placeholder="请填写" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题来源:">
|
||||
<el-select disabled v-model="addData.problemSources" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题名称:">
|
||||
<el-input v-model="addData.problemName" clearable placeholder="请填写" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题编号:">
|
||||
<el-input v-model="addData.powerQualityProblemNo" disabled clearable placeholder="请填写"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">填报流程</el-divider>
|
||||
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
<el-tab-pane label="原因分析" name="0">
|
||||
<process1
|
||||
:addData="addData"
|
||||
:List="List"
|
||||
:disabled="disabled"
|
||||
ref="process0Ref"
|
||||
@handleClose="handleClose"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="计划整改措施" name="1">
|
||||
<process2
|
||||
:addData="addData"
|
||||
:List="List"
|
||||
:disabled="disabled"
|
||||
ref="process1Ref"
|
||||
@handleClose="handleClose"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="实际采取措施" name="2">
|
||||
<process3
|
||||
:addData="addData"
|
||||
:List="List"
|
||||
:disabled="disabled"
|
||||
ref="process2Ref"
|
||||
@handleClose="handleClose"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="成效分析" name="3">
|
||||
<process4
|
||||
:addData="addData"
|
||||
:List="List"
|
||||
:disabled="disabled"
|
||||
ref="process3Ref"
|
||||
@handleClose="handleClose"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<!-- 原因分析 0 -->
|
||||
<!-- <process1
|
||||
v-if="control == 0"
|
||||
:addData="addData"
|
||||
:List="List"
|
||||
:disabled="disabled"
|
||||
ref="process0Ref"
|
||||
@handleClose="handleClose"
|
||||
/> -->
|
||||
<!-- 计划整改措施 1-->
|
||||
<!-- <process2
|
||||
v-if="control == 1"
|
||||
:addData="addData"
|
||||
:List="List"
|
||||
:disabled="disabled"
|
||||
ref="process1Ref"
|
||||
@handleClose="handleClose"
|
||||
/> -->
|
||||
<!-- 实际采取措施 2 -->
|
||||
<!-- <process3
|
||||
v-if="control == 2"
|
||||
:addData="addData"
|
||||
:List="List"
|
||||
:disabled="disabled"
|
||||
ref="process2Ref"
|
||||
@handleClose="handleClose"
|
||||
/> -->
|
||||
<!-- 成效分析 3 -->
|
||||
<!-- <process4
|
||||
v-if="control == 3"
|
||||
:addData="addData"
|
||||
:List="List"
|
||||
:disabled="disabled"
|
||||
ref="process3Ref"
|
||||
@handleClose="handleClose"
|
||||
/> -->
|
||||
|
||||
<!-- 填报 -->
|
||||
<div style="display: flex; justify-content: center; margin-top: 10px" v-show="!disabled">
|
||||
<el-button type="primary" @click="Submit">提交审核</el-button>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
</div>
|
||||
<!-- 审核 -->
|
||||
<el-form
|
||||
label-width="100px"
|
||||
:model="form"
|
||||
ref="ruleFormRef"
|
||||
:rules="rules"
|
||||
v-if="disabled && audit && flag && control == active"
|
||||
>
|
||||
<el-form-item prop="checkComment" label="审核意见:">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.checkComment"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div
|
||||
style="display: flex; justify-content: center; margin-top: 10px"
|
||||
v-if="disabled && audit && flag && control == active"
|
||||
>
|
||||
<el-button type="primary" @click="adopt(1)">通过</el-button>
|
||||
<el-button type="primary" @click="adopt(0)">不通过</el-button>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import process1 from './process1.vue'
|
||||
import process2 from './process2.vue'
|
||||
import process3 from './process3.vue'
|
||||
import process4 from './process4.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {
|
||||
getAbnormalDetail,
|
||||
getComplaintDetail,
|
||||
getGeneralSurveyDetail,
|
||||
getExcessiveDetail,
|
||||
checkPowerQuality
|
||||
} from '@/api/process-boot/electricitymanagement'
|
||||
const emit = defineEmits(['beforeClose'])
|
||||
const dictData = useDictData()
|
||||
const addData: any = ref({})
|
||||
const List: any = ref({})
|
||||
const active = ref(4)
|
||||
const control = ref()
|
||||
const ruleFormRef = ref()
|
||||
const activeName = ref('0')
|
||||
const process0Ref = ref()
|
||||
const process1Ref = ref()
|
||||
const process2Ref = ref()
|
||||
const process3Ref = ref()
|
||||
const form = ref({
|
||||
checkComment: ''
|
||||
})
|
||||
const disabled = ref(false)
|
||||
const prop = defineProps({
|
||||
isDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
audit: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
flag: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const open = async (row: any) => {
|
||||
addData.value = row
|
||||
let res: any = {}
|
||||
if (row.problemSources == '终端异常') {
|
||||
res = await getAbnormalDetail(row.powerQualityProblemNo)
|
||||
} else if (row.problemSources == '在线监测告警') {
|
||||
res = await getExcessiveDetail(row.powerQualityProblemNo)
|
||||
} else if (row.problemSources == '用户投诉') {
|
||||
res = await getComplaintDetail(row.powerQualityProblemNo)
|
||||
} else if (row.problemSources == '普测超标') {
|
||||
res = await getGeneralSurveyDetail(row.powerQualityProblemNo)
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
List.value = res.data
|
||||
if (res.data.filePathYyfx == null) {
|
||||
active.value = 0
|
||||
} else if (res.data.filePathJhzg == null) {
|
||||
active.value = 1
|
||||
if (row.reportProcessStatus == 'Fail') {
|
||||
active.value = 0
|
||||
}
|
||||
} else if (res.data.filePathSjcq == null) {
|
||||
active.value = 2
|
||||
if (row.reportProcessStatus == 'Fail') {
|
||||
active.value = 1
|
||||
}
|
||||
} else if (res.data.filePathZlxg == null) {
|
||||
active.value = 3
|
||||
if (row.reportProcessStatus == 'Fail') {
|
||||
active.value = 2
|
||||
}
|
||||
}
|
||||
|
||||
// 审核判断
|
||||
if (prop.audit) {
|
||||
active.value == 0 ? 0 : (active.value = active.value - 1)
|
||||
}
|
||||
|
||||
control.value = active.value == 4 ? 3 : active.value
|
||||
}, 0)
|
||||
}
|
||||
const rules = {
|
||||
checkComment: [{ required: true, message: '请输入审核意见', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const step = (e: number) => {
|
||||
if (active.value >= e) {
|
||||
control.value = e
|
||||
if (active.value == e && !prop.isDisabled) {
|
||||
disabled.value = false
|
||||
} else {
|
||||
disabled.value = true
|
||||
}
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
if (prop.isDisabled) {
|
||||
disabled.value = prop.isDisabled
|
||||
}
|
||||
})
|
||||
// 提交
|
||||
const Submit = () => {
|
||||
if (control.value == 0) {
|
||||
process0Ref.value.submit(0)
|
||||
} else if (control.value == 1) {
|
||||
process1Ref.value.submit(1)
|
||||
} else if (control.value == 2) {
|
||||
process2Ref.value.submit(2)
|
||||
} else if (control.value == 3) {
|
||||
process3Ref.value.submit(3)
|
||||
}
|
||||
}
|
||||
// 取消
|
||||
const handleClose = () => {
|
||||
form.value.checkComment = ''
|
||||
emit('beforeClose')
|
||||
}
|
||||
|
||||
// 审核
|
||||
const adopt = (type: number) => {
|
||||
ruleFormRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
const adminInfo = window.localStorage.getItem('adminInfo')
|
||||
const adminName = adminInfo ? JSON.parse(adminInfo).name : ''
|
||||
|
||||
checkPowerQuality({
|
||||
checkComment: form.value.checkComment,
|
||||
checkPerson: adminName,
|
||||
checkResult: type,
|
||||
powerQualityProblemNo: addData.value.powerQualityProblemNo,
|
||||
reportProcess: addData.value.reportProcess
|
||||
}).then((res: any) => {
|
||||
ElMessage.success(res.message)
|
||||
handleClose()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
:deep(.el-tabs__content) {
|
||||
height: auto !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,255 @@
|
||||
<template>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="问题来源">
|
||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报进度">
|
||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||
<el-option
|
||||
v-for="item in fillingProgress"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in auditStatus"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.problemName"
|
||||
clearable
|
||||
placeholder="请填写问题名称"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
||||
<!-- 填报 -->
|
||||
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 详情 -->
|
||||
<Detail ref="detailRef" />
|
||||
|
||||
<!-- 审核记录 -->
|
||||
<recording ref="recordingRef" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import NewlyAdd from './NewlyAdd.vue'
|
||||
import Filling from './filling.vue'
|
||||
import Detail from './detail.vue'
|
||||
import recording from './recording.vue'
|
||||
const dictData = useDictData()
|
||||
const FillingRef = ref()
|
||||
|
||||
const showNewlyAdded = ref(false)
|
||||
const dialogVisible = ref(false)
|
||||
const recordingRef = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const detailRef = ref()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/process-boot/electricityQuality/getIssues',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox' },
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'problemSources',
|
||||
title: '问题来源'
|
||||
},
|
||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||
{ field: 'problemName', title: '问题名称' },
|
||||
{ field: 'dataDate', title: '问题新建时间' },
|
||||
{
|
||||
field: 'reportProcess',
|
||||
title: '填报进度',
|
||||
formatter: (row: any) => {
|
||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'reportProcessStatus',
|
||||
title: '状态',
|
||||
formatter: (row: any) => {
|
||||
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.reportProcessStatus == 'Init'
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
detailRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '填报',
|
||||
disabled: row => {
|
||||
return (
|
||||
row.reportProcessStatus == 'Auditt' ||
|
||||
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
||||
row.reportProcess == 'Archived'
|
||||
)
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
setTimeout(() => {
|
||||
FillingRef.value.open(row)
|
||||
}, 10)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '归档',
|
||||
disabled: row => {
|
||||
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-SuccessFilled',
|
||||
render: 'basicButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定归档?'
|
||||
},
|
||||
click: row => {
|
||||
archive(row.powerQualityProblemNo).then(() => {
|
||||
ElMessage.success('归档成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核记录',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.reportProcessStatus == 'Init'
|
||||
},
|
||||
icon: 'el-icon-PieChart',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
recordingRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除?'
|
||||
},
|
||||
disabled: row => {
|
||||
return row.reportProcess == 'Archived'
|
||||
},
|
||||
click: row => {
|
||||
deleteIssues(row.powerQualityProblemNo).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.problemName = ''
|
||||
tableStore.table.params.problemSources = ''
|
||||
tableStore.table.params.reportProcess = ''
|
||||
tableStore.table.params.reportProcessStatus = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
TableHeaderRef.value.setDatePicker([
|
||||
{ label: '年', value: 1 },
|
||||
{ label: '季', value: 2 },
|
||||
{ label: '月', value: 3 }
|
||||
])
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
showNewlyAdded.value = true
|
||||
}
|
||||
|
||||
// 关闭弹框
|
||||
const handleClose = () => {
|
||||
showNewlyAdded.value = false
|
||||
}
|
||||
// 关闭 填报
|
||||
const beforeClose = () => {
|
||||
dialogVisible.value = false
|
||||
tableStore.index()
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<el-form :model="causeAnalysisData" :rules="rules" ref="form1Ref" label-width="auto">
|
||||
<el-form-item label="电网侧原因:" prop="reportProcessContentYyfx">
|
||||
<el-checkbox-group :disabled="prop.disabled" v-model="causeAnalysisData.reportProcessContentYyfx">
|
||||
<el-checkbox v-for="(item, ind) in CauseList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form-item label="用户侧原因:" prop="userReportProcessContentYyfx">
|
||||
<el-checkbox-group :disabled="prop.disabled" v-model="causeAnalysisData.userReportProcessContentYyfx">
|
||||
<el-checkbox v-for="(item, ind) in userCauseList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-row v-if="prop.addData.problemSources == '用户投诉' || prop.addData.problemSources == '终端异常'">
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form-item label="电网侧受影响终端:" prop="powerGridAffectDev">
|
||||
<el-checkbox-group :disabled="prop.disabled" v-model="causeAnalysisData.powerGridAffectDev">
|
||||
<el-checkbox v-for="(item, ind) in powerGridAffectDevList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form-item label="用户侧受影响终端:" prop="userAffectDev">
|
||||
<el-checkbox-group :disabled="prop.disabled" v-model="causeAnalysisData.userAffectDev">
|
||||
<el-checkbox v-for="(item, ind) in userAffectDevList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form-item label="事件描述:" prop="eventDescriptionYyfx">
|
||||
<el-input
|
||||
style="width: 400px"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
:disabled="prop.disabled"
|
||||
v-model="causeAnalysisData.eventDescriptionYyfx"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="item" label="原因分析报告:" style="margin-top: 10px" prop="fileList">
|
||||
<el-upload
|
||||
v-model:file-list="causeAnalysisData.fileList"
|
||||
ref="upload"
|
||||
v-if="!prop.disabled"
|
||||
action=""
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
|
||||
<el-button type="primary" link @click="download" v-else>
|
||||
{{ prop.List.fileNameYyfx }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import {
|
||||
uploadFile,
|
||||
reasonAnalysis,
|
||||
takeAction,
|
||||
effectAnalysis,
|
||||
correctiveAction
|
||||
} from '@/api/process-boot/electricitymanagement'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
const prop = defineProps({
|
||||
addData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
List: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['handleClose'])
|
||||
|
||||
const dictData = useDictData()
|
||||
const upload = ref()
|
||||
const form1Ref = ref()
|
||||
|
||||
const causeAnalysisData: any = ref({
|
||||
reportProcessContentYyfx: [],
|
||||
userReportProcessContentYyfx: [],
|
||||
eventDescriptionYyfx: '',
|
||||
fileNameYyfx: '', //原因分析报告文件名称
|
||||
filePathYyfx: '', //原因分析报告文件路径
|
||||
powerGridAffectDev: [],
|
||||
userAffectDev: [],
|
||||
fileList: []
|
||||
})
|
||||
const rules = {
|
||||
reportProcessContentYyfx: [{ required: true, message: '请选择电网侧原因', trigger: 'change' }],
|
||||
userReportProcessContentYyfx: [{ required: true, message: '请选择用户侧原因', trigger: 'change' }],
|
||||
eventDescriptionYyfx: [{ required: true, message: '请填写事件描述', trigger: 'blur' }],
|
||||
powerGridAffectDev: [{ required: true, message: '请选择电网侧受影响终端', trigger: 'change' }],
|
||||
userAffectDev: [{ required: true, message: '请选择用户侧受影响终端', trigger: 'change' }],
|
||||
fileList: [{ required: true, message: '请上传文件', trigger: 'change' }]
|
||||
}
|
||||
// 电网侧原因
|
||||
const CauseList = dictData.getBasicData('Grid-side_Reasons')
|
||||
// 用户侧原因
|
||||
const userCauseList = dictData.getBasicData('User_Reasons')
|
||||
// 电网侧受影响终端
|
||||
const powerGridAffectDevList = dictData.getBasicData('Grid_Unit')
|
||||
// 用户侧受影响终端
|
||||
const userAffectDevList = dictData.getBasicData('Customer_Unit')
|
||||
const OnlineList = dictData.getBasicData('Problem_Sources')
|
||||
|
||||
// 上传
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
upload.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload.value!.handleStart(file)
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(prop.List.filePathYyfx)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = prop.List.fileNameYyfx
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
onMounted(() => {
|
||||
if (prop.List.filePathYyfx != null) {
|
||||
causeAnalysisData.value = prop.List
|
||||
}
|
||||
})
|
||||
const submit = (num: number) => {
|
||||
console.log(prop.addData.problemSources)
|
||||
|
||||
form1Ref.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let form = new FormData()
|
||||
form.append('file', causeAnalysisData.value.fileList[0].raw)
|
||||
causeAnalysisData.value.powerQualityProblemNo = prop.addData.powerQualityProblemNo
|
||||
await uploadFile(form).then((res: any) => {
|
||||
causeAnalysisData.value.filePathYyfx = res.data.minFileUrl
|
||||
causeAnalysisData.value.fileNameYyfx = res.data.minFileName
|
||||
})
|
||||
|
||||
if (num == 0) {
|
||||
reasonAnalysis(causeAnalysisData.value).then((res: any) => {
|
||||
ElMessage.success('提交成功')
|
||||
emit('handleClose')
|
||||
})
|
||||
} else if (num == 1) {
|
||||
correctiveAction(causeAnalysisData.value).then((res: any) => {
|
||||
ElMessage.success('提交成功')
|
||||
emit('handleClose')
|
||||
})
|
||||
} else if (num == 2) {
|
||||
takeAction(causeAnalysisData.value).then((res: any) => {
|
||||
ElMessage.success('提交成功')
|
||||
emit('handleClose')
|
||||
})
|
||||
} else if (num == 3) {
|
||||
effectAnalysis(causeAnalysisData.value).then((res: any) => {
|
||||
ElMessage.success('提交成功')
|
||||
emit('handleClose')
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<el-form
|
||||
:model="rectificationMeasuresData"
|
||||
:rules="rules"
|
||||
ref="form2Ref"
|
||||
label-width="auto"
|
||||
|
||||
>
|
||||
<el-form-item label="电网侧整改治理措施:" prop="reportProcessContentJhzg" >
|
||||
<el-checkbox-group v-model="rectificationMeasuresData.reportProcessContentJhzg" :disabled="prop.disabled">
|
||||
<el-checkbox v-for="item in JhzgList" :label="item.code">{{ item.name }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form-item label="用户侧整改治理措施:" prop="userReportProcessContentJhzg" >
|
||||
<el-checkbox-group v-model="rectificationMeasuresData.userReportProcessContentJhzg" :disabled="prop.disabled">
|
||||
<el-checkbox v-for="item in JhzgList" :label="item.code">{{ item.name }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
|
||||
<el-form-item class="item" label="计划整改措施报告:" style="margin-top: 10px" prop="fileList" >
|
||||
<el-upload
|
||||
v-model:file-list="rectificationMeasuresData.fileList"
|
||||
ref="upload"
|
||||
action=""
|
||||
v-if="!prop.disabled"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button type="primary" link @click="download" v-else>
|
||||
{{ prop.List.fileNameJhzg }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { uploadFile, correctiveAction } from '@/api/process-boot/electricitymanagement'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { ref, onMounted } from 'vue'
|
||||
const prop = defineProps({
|
||||
addData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
List: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['handleClose'])
|
||||
|
||||
const dictData = useDictData()
|
||||
const upload = ref()
|
||||
const form2Ref = ref()
|
||||
const rectificationMeasuresData: any = ref({
|
||||
reportProcessContentJhzg: [],
|
||||
userReportProcessContentJhzg: [],
|
||||
fileNameJhzg: '', //计划整改文件名称
|
||||
filePathJhzg: '', // 计划整改文件路径
|
||||
fileList: []
|
||||
})
|
||||
const rules = {
|
||||
reportProcessContentJhzg: [{ required: true, message: '请选择电网侧整改治理措施', trigger: 'change' }],
|
||||
userReportProcessContentJhzg: [{ required: true, message: '请选择用户侧整改治理措施', trigger: 'change' }],
|
||||
fileList: [{ required: true, message: '请上传文件', trigger: 'change' }]
|
||||
}
|
||||
// 电网侧整改治理措施
|
||||
const JhzgList = dictData.getBasicData('Plan_Take')
|
||||
|
||||
// 上传
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
upload.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload.value!.handleStart(file)
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(prop.List.filePathJhzg)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = prop.List.fileNameJhzg
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (prop.List.filePathJhzg != null) {
|
||||
rectificationMeasuresData.value = prop.List
|
||||
}
|
||||
})
|
||||
|
||||
const submit = () => {
|
||||
form2Ref.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let form = new FormData()
|
||||
form.append('file', rectificationMeasuresData.value.fileList[0].raw)
|
||||
rectificationMeasuresData.value.powerQualityProblemNo = prop.addData.powerQualityProblemNo
|
||||
await uploadFile(form).then((res: any) => {
|
||||
rectificationMeasuresData.value.filePathJhzg = res.data.minFileUrl
|
||||
rectificationMeasuresData.value.fileNameJhzg = res.data.minFileName
|
||||
})
|
||||
|
||||
await correctiveAction(rectificationMeasuresData.value).then((res: any) => {
|
||||
ElMessage.success('提交成功')
|
||||
emit('handleClose')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<el-form :model="rectificationMeasuresData" :rules="rules" ref="form2Ref" label-width="auto">
|
||||
<el-form-item label="电网侧实际采取措施:" prop="reportProcessContentSjcq" >
|
||||
<el-checkbox-group v-model="rectificationMeasuresData.reportProcessContentSjcq" :disabled="prop.disabled">
|
||||
<el-checkbox v-for="(item, ind) in SjcqList" :key="ind" :label="item.code">{{ item.name }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form-item label="用户侧实际采取措施:" prop="userReportProcessContentSjcq" >
|
||||
<el-checkbox-group v-model="rectificationMeasuresData.userReportProcessContentSjcq" :disabled="prop.disabled">
|
||||
<el-checkbox v-for="(item, ind) in SjcqList" :key="ind" :label="item.code">{{ item.name }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form-item class="item" label="实际采取措施报告:" style="margin-top: 10px" prop="fileList">
|
||||
<el-upload
|
||||
v-model:file-list="rectificationMeasuresData.fileList"
|
||||
ref="upload"
|
||||
action=""
|
||||
v-if="!prop.disabled"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button type="primary" link @click="download" v-else>
|
||||
{{ prop.List.fileNameSjcq }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { uploadFile, takeAction } from '@/api/process-boot/electricitymanagement'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { ref, onMounted } from 'vue'
|
||||
const prop = defineProps({
|
||||
addData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
List: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['handleClose'])
|
||||
|
||||
const dictData = useDictData()
|
||||
const upload = ref()
|
||||
const form2Ref = ref()
|
||||
const rectificationMeasuresData: any = ref({
|
||||
reportProcessContentSjcq: [],
|
||||
userReportProcessContentSjcq: [],
|
||||
fileNameSjcq: '', //实际采取措施报告文件名称
|
||||
filePathSjcq: '', // 实际采取措施报告文件路径
|
||||
fileList: []
|
||||
})
|
||||
const rules = {
|
||||
reportProcessContentSjcq: [{ required: true, message: '请选择电网侧实际采取措施', trigger: 'change' }],
|
||||
userReportProcessContentSjcq: [{ required: true, message: '请选择用户侧实际采取措施', trigger: 'change' }],
|
||||
fileList: [{ required: true, message: '请上传文件', trigger: 'change' }]
|
||||
}
|
||||
// 电网侧整改治理措施
|
||||
const SjcqList = dictData.getBasicData('Plan_Take', ['Rectify_Orders'])
|
||||
|
||||
// 上传
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
upload.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload.value!.handleStart(file)
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(prop.List.filePathSjcq)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = prop.List.fileNameSjcq
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
onMounted(() => {
|
||||
if (prop.List.filePathSjcq != null) {
|
||||
rectificationMeasuresData.value = prop.List
|
||||
}
|
||||
})
|
||||
|
||||
const submit = () => {
|
||||
form2Ref.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let form = new FormData()
|
||||
form.append('file', rectificationMeasuresData.value.fileList[0].raw)
|
||||
rectificationMeasuresData.value.powerQualityProblemNo = prop.addData.powerQualityProblemNo
|
||||
await uploadFile(form).then((res: any) => {
|
||||
rectificationMeasuresData.value.filePathSjcq = res.data.minFileUrl
|
||||
rectificationMeasuresData.value.fileNameSjcq = res.data.minFileName
|
||||
})
|
||||
|
||||
await takeAction(rectificationMeasuresData.value).then((res: any) => {
|
||||
ElMessage.success('提交成功')
|
||||
emit('handleClose')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<el-form :model="effectivenessAnalysisData" :rules="rules" ref="form2Ref" label-width="auto">
|
||||
<el-form-item label="成效分析概述:" style="margin-top: 10px" prop="descriptionZlxg">
|
||||
<el-input
|
||||
:disabled="prop.disabled"
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入内容"
|
||||
v-model="effectivenessAnalysisData.descriptionZlxg"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form-item class="item" label="实际采取措施报告:" style="margin-top: 10px" prop="fileList">
|
||||
<el-upload
|
||||
v-model:file-list="effectivenessAnalysisData.fileList"
|
||||
ref="upload"
|
||||
action=""
|
||||
:limit="1"
|
||||
v-if="!prop.disabled"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button type="primary" link @click="download" v-else>
|
||||
{{ prop.List.fileNameZlxg }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { uploadFile, effectAnalysis } from '@/api/process-boot/electricitymanagement'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { ref, onMounted } from 'vue'
|
||||
const prop = defineProps({
|
||||
addData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
List: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['handleClose'])
|
||||
const dictData = useDictData()
|
||||
const upload = ref()
|
||||
const form2Ref = ref()
|
||||
const effectivenessAnalysisData: any = ref({
|
||||
descriptionZlxg: '',
|
||||
fileNameZlxg: '', //实际采取措施报告文件名称
|
||||
filePathZlxg: '', //实际采取措施报告文件路径
|
||||
fileList: []
|
||||
})
|
||||
const rules = {
|
||||
descriptionZlxg: [{ required: true, message: '请填写', trigger: 'blur' }],
|
||||
fileList: [{ required: true, message: '请上传文件', trigger: 'change' }]
|
||||
}
|
||||
|
||||
// 上传
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
upload.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload.value!.handleStart(file)
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(prop.List.filePathZlxg)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = prop.List.fileNameZlxg
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
onMounted(() => {
|
||||
if (prop.List.filePathZlxg != null) {
|
||||
effectivenessAnalysisData.value = prop.List
|
||||
}
|
||||
})
|
||||
|
||||
const submit = () => {
|
||||
form2Ref.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let form = new FormData()
|
||||
form.append('file', effectivenessAnalysisData.value.fileList[0].raw)
|
||||
effectivenessAnalysisData.value.powerQualityProblemNo = prop.addData.powerQualityProblemNo
|
||||
await uploadFile(form).then((res: any) => {
|
||||
effectivenessAnalysisData.value.filePathZlxg = res.data.minFileUrl
|
||||
effectivenessAnalysisData.value.fileNameZlxg = res.data.minFileName
|
||||
})
|
||||
|
||||
await effectAnalysis(effectivenessAnalysisData.value).then((res: any) => {
|
||||
ElMessage.success('提交成功')
|
||||
emit('handleClose')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" title="历史审核记录" width="1000px">
|
||||
<vxe-table v-bind="defaultAttribute" height="500" ref="xTable1Ref" :data="list">
|
||||
<vxe-column field="reportProcess" title="审核节点" :formatter="formatter"></vxe-column>
|
||||
<vxe-column field="type" title="审核结果" :formatter="formatter"></vxe-column>
|
||||
<vxe-column field="checker" title="审核人"></vxe-column>
|
||||
<vxe-column field="orgName" title="审核人单位"></vxe-column>
|
||||
<vxe-column field="dataDate" title="审核时间" min-width="100px"></vxe-column>
|
||||
<vxe-column field="description" title="审核意见" min-width="180px"></vxe-column>
|
||||
</vxe-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { queryCheckTrack } from '@/api/process-boot/electricitymanagement'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const problemData = dictData.getBasicData('Fill_Progress')
|
||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||
const list = ref([])
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
const formatter = (row: any) => {
|
||||
if (row.column.field == 'reportProcess') {
|
||||
return problemData.filter((item: any) => item.code == row.cellValue)[0]?.name
|
||||
} else if (row.column.field == 'type') {
|
||||
return auditStatus.filter((item: any) => item.code == row.cellValue)[0]?.name
|
||||
} else {
|
||||
return row.cellValue
|
||||
}
|
||||
}
|
||||
|
||||
const open = (row: any) => {
|
||||
dialogVisible.value = true
|
||||
queryCheckTrack(row.powerQualityProblemNo).then((res: any) => {
|
||||
list.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,228 @@
|
||||
<template>
|
||||
<!-- 用户投诉 -->
|
||||
<!-- 2 有新增 发起 预警单 -->
|
||||
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="是否解决">
|
||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
|
||||
<!-- 详情 -->
|
||||
<detail ref="detailRef"/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import complaintsForm from './form/complaintsForm.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
|
||||
import detail from './complaintsDetail.vue';
|
||||
// Steady_Statis
|
||||
const dictData = useDictData()
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
const tableRef = ref()
|
||||
const planAddRef = ref()
|
||||
const formRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const detailRef = ref()
|
||||
const router = useRouter() // 路由对象
|
||||
const dealStateList = ref([
|
||||
{
|
||||
label: '未解决',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '全部',
|
||||
value: '1'
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/SupervisionUserComplaint/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '用户名称' },
|
||||
{ field: 'userNumber', title: '用户编号' },
|
||||
{ field: 'dutyOrgName', title: '负责单位', minWidth: '80' },
|
||||
// { field: 'userCategory', title: '用户类别' },
|
||||
|
||||
{ field: 'complaintText', title: '投诉内容' },
|
||||
{ field: 'steadyIndicator', title: '稳态指标' },
|
||||
{ field: 'transientIndicators', title: '暂态指标' },
|
||||
{
|
||||
field: 'monitorName',
|
||||
title: '监测点名称',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'detectionFlag',
|
||||
title: '是否实现监测',
|
||||
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
|
||||
},
|
||||
replaceValue: {
|
||||
0: '否',
|
||||
1: '是',
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'dealState',
|
||||
title: '是否解决',
|
||||
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未解决',
|
||||
1: '已解决',
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 120,
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '发起告警单',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dealState != 0
|
||||
},
|
||||
// popconfirm: {
|
||||
// confirmButtonText: '确认',
|
||||
// cancelButtonText: '取消',
|
||||
// confirmButtonType: 'primary',
|
||||
// title: '请确认发起告警单!'
|
||||
// },
|
||||
click: async row => {
|
||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '请输入整改意见'
|
||||
})
|
||||
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
||||
ElMessage.success('发起告警单成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dealState == 0
|
||||
},
|
||||
|
||||
click: row => {
|
||||
detailRef.value.open({
|
||||
row: row,
|
||||
title: '详情',
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 0
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
query: {
|
||||
type: 1,
|
||||
t: Date.now()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
},
|
||||
loadCallback: () => {
|
||||
// tableStore.table.data = [
|
||||
// {
|
||||
// userName: '东润开阳堡光伏电站用户',
|
||||
// userId: '8115771123274',
|
||||
// complaintContent: '终端频繁重启',
|
||||
// complaintTime: '2024-05-16'
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.dealState = ''
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
formRef.value.open({ text: '新增投诉' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="dialogVisible" draggable :title="title" width="1000">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="用户名称">
|
||||
{{ list.userName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户编号">
|
||||
{{ list.userNumber }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责单位">
|
||||
{{ list.dutyOrgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="稳态指标">
|
||||
{{ list.steadyIndicator }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="暂态指标">
|
||||
{{ list.transientIndicators }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点名称">
|
||||
{{ list.monitorName || '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否实现监测">
|
||||
<el-tag :type='list.detectionFlag == 0 ? "warning" : "primary"'>{{ list.detectionFlag == 0 ? "否" :
|
||||
"是" }}</el-tag>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ dictData.state.userList.filter(item => item.id == list.createBy)[0]?.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="投诉内容">
|
||||
{{ list.complaintText }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改意见">
|
||||
{{ list.reformAdvice }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="采取的措施">
|
||||
{{ list.takeStep }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="1" label="处理成效报告">
|
||||
<el-icon class="elView " v-if="list?.reportName" >
|
||||
<View @click="openFile(list?.reportName)" />
|
||||
</el-icon>
|
||||
<a :href="list.reportPath" target="_blank">{{ list.reportName }}</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { View } from '@element-plus/icons-vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('')
|
||||
const dictData = useDictData()
|
||||
const list: any = ref({})
|
||||
const open = (row: any) => {
|
||||
list.value={}
|
||||
title.value = row.title
|
||||
dialogVisible.value = true
|
||||
list.value = JSON.parse(JSON.stringify(row.row))
|
||||
getFileNameAndFilePath({ filePath: row.row.reportPath }).then(res => {
|
||||
list.value.reportPath = res.data.url
|
||||
list.value.reportName = res.data.fileName
|
||||
})
|
||||
}
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}</style>
|
||||
@@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" width="80%" :before-close="handleClose">
|
||||
<div v-loading="loading">
|
||||
<div style="height: 45vh">
|
||||
<vxe-table height="auto" v-bind="defaultAttribute" :data="List">
|
||||
<vxe-column field="dept" title="负责单位"></vxe-column>
|
||||
<vxe-column field="substation" title="变电站名称"></vxe-column>
|
||||
<vxe-column field="deviceName" title="终端名称"></vxe-column>
|
||||
<vxe-column field="lineName" title="监测点名称"></vxe-column>
|
||||
<vxe-column
|
||||
field="businessType"
|
||||
title="监测对象类型"
|
||||
:formatter="row => industry.find((item: any) => item.id == row.cellValue)?.name || '/'"
|
||||
></vxe-column>
|
||||
<vxe-column field="objectName" title="监测对象名称"></vxe-column>
|
||||
<vxe-column
|
||||
field="targetType"
|
||||
title="指标类型"
|
||||
:formatter="row => exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'"
|
||||
></vxe-column>
|
||||
<vxe-column
|
||||
field="overLimitDay"
|
||||
title="累计超标天数"
|
||||
:formatter="row => (row.cellValue != null ? row.cellValue : '/')"
|
||||
></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<el-form :model="form" ref="formRef" class="form-two mt10 alarmForm" :rules="rules" label-width="auto">
|
||||
<el-form-item label="问题描述:" prop="issueDetail">
|
||||
<el-input
|
||||
v-model="form.issueDetail"
|
||||
:rows="2"
|
||||
type="textarea"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入问题描述"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="整改意见:" prop="reformAdvice">
|
||||
<el-input
|
||||
v-model="form.reformAdvice"
|
||||
:rows="2"
|
||||
type="textarea"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入整改意见"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="编号:" prop="year">
|
||||
<div style="width: 100%; display: flex; justify-content: space-between">
|
||||
<el-input style="width: 49%" v-model="form.year" placeholder="请输入年份">
|
||||
<template #append>年份</template>
|
||||
</el-input>
|
||||
<el-input style="width: 49%" v-model="form.number" placeholder="请输入编号">
|
||||
<template #append>编号</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="submit" :loading="loading">发起</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, defineEmits } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { report } from '@/api/process-boot/electricitymanagement'
|
||||
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogVisible = ref(false)
|
||||
const title: any = ref('')
|
||||
const industry = dictData.getBasicData('Business_Type')
|
||||
const form: any = ref({})
|
||||
const exceeded = dictData.getBasicData('Indicator_Type')
|
||||
const loading = ref(false)
|
||||
const resetForm = () => {
|
||||
form.value = {
|
||||
issueDetail: '',
|
||||
reformAdvice: '',
|
||||
year: new Date().getFullYear() + '',
|
||||
number: '0'
|
||||
}
|
||||
}
|
||||
const List = ref([])
|
||||
resetForm()
|
||||
const rules = {
|
||||
issueDetail: [{ required: true, message: '请输入问题描述', trigger: 'blur' }],
|
||||
reformAdvice: [{ required: true, message: '请输入整改意见', trigger: 'blur' }],
|
||||
year: [{ required: true, message: '请输入编号', trigger: 'blur' }],
|
||||
number: [{ required: true, message: '请输入编号', trigger: 'blur' }]
|
||||
}
|
||||
const formRef = ref()
|
||||
const submit = () => {
|
||||
console.log('🚀 ~ open ~ form.value:', form.value)
|
||||
formRef.value.validate(valid => {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
report({
|
||||
...form.value,
|
||||
type: title.value == '发起预警单' ? 1 : 2,
|
||||
idList: List.value.map(item => item.id)
|
||||
})
|
||||
.then(res => {
|
||||
loading.value = false
|
||||
ElMessage.success('发起成功')
|
||||
|
||||
dialogVisible.value = false
|
||||
emits('onSubmit')
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
} else {
|
||||
console.log('表单验证失败')
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const open = (row: any) => {
|
||||
dialogVisible.value = true
|
||||
List.value = row.row
|
||||
title.value = row.text
|
||||
|
||||
form.value = { ...form.value, ...row.form }
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
formRef.value && formRef.value.resetFields()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" style="width: 800px" :before-close="handleClose">
|
||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" :scroll-to-error="true">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="用户名称:" prop="userName">
|
||||
<el-input v-model="form.userName" clearable style="width: 100%"
|
||||
placeholder="请输入用户名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="用户编号:" prop="userNumber">
|
||||
<el-input v-model="form.userNumber" clearable style="width: 100%"
|
||||
placeholder="请输入用户编号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="是否实现监测:" prop="detectionFlag">
|
||||
<el-radio-group v-model="form.detectionFlag">
|
||||
<el-radio value="0">否</el-radio>
|
||||
<el-radio value="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="负责单位:" prop="dutyOrgId">
|
||||
<Area ref="areaRef" v-model="form.dutyOrgId" style="width: 100%" />
|
||||
<!-- <el-select v-model="form.dutyOrgId" clearable placeholder="请选择负责单位">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="form.detectionFlag == '1'" :span="12">
|
||||
<!-- <el-form-item for="-" label="监测点名称:" prop="monitorName">
|
||||
<el-input
|
||||
v-model="form.monitorName"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入监测点名称"
|
||||
></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item for="-" label="监测点:" prop="monitorNumber">
|
||||
<el-select v-model="form.monitorNumber" clearable style="width: 100%" placeholder="请选择监测点">
|
||||
<el-option v-for="item in minitorList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row v-if="form.detectionFlag == '1'">
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="监测点编号:" prop="monitorNumber">
|
||||
<el-input
|
||||
v-model="form.monitorNumber"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入监测点编号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
|
||||
<el-form-item for="-" label="投诉内容:" prop="complaintText">
|
||||
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入内容"
|
||||
v-model="form.complaintText"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="稳态指标:">
|
||||
<el-checkbox-group v-model="form.steadyIndicator">
|
||||
<div style="width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start">
|
||||
<el-checkbox style="flex: none; width: 120px" v-for="(item, ind) in steadyStateList" :key="ind"
|
||||
:label="item.name">
|
||||
<!-- @change="changeSteadyState" -->
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="暂态指标:">
|
||||
<el-checkbox-group v-model="form.transientIndicators">
|
||||
<div style="width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start">
|
||||
<el-checkbox style="flex: none; width: 120px" v-for="(item, ind) in transientIndicatorsList"
|
||||
:key="ind" :label="item.name">
|
||||
<!-- @change="changeTransientIndicators" -->
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="submit" :loading="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, defineEmits } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { addComplaintsData, getLineDetailByDeptId } from '@/api/process-boot/electricitymanagement'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogVisible = ref(false)
|
||||
const loading = ref(false)
|
||||
const title: any = ref('')
|
||||
const steadyStateList = dictData.getBasicData('Steady_Indicator')
|
||||
const transientIndicatorsList = dictData.getBasicData('Transient_Indicators')
|
||||
const form: any = ref({})
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
//获取监测点信息
|
||||
const minitorList = ref([])
|
||||
const getMinitorList = () => {
|
||||
getLineDetailByDeptId({ id: adminInfo.$state.deptId }).then(res => {
|
||||
minitorList.value = res.data
|
||||
})
|
||||
}
|
||||
getMinitorList()
|
||||
const resetForm = () => {
|
||||
form.value = {
|
||||
complaintText: '', //投诉内容
|
||||
detectionFlag: '0', //是否实现监测
|
||||
steadyIndicator: [], //稳态指标
|
||||
transientIndicators: [], //暂态指标
|
||||
userName: '', //用户名称
|
||||
userNumber: '', //用户编号
|
||||
userCategory: '', //用户类别
|
||||
monitorName: '', //监测点名称
|
||||
monitorNumber: '', //监测点编号
|
||||
dutyOrgId: ''
|
||||
}
|
||||
}
|
||||
//字典获取所在地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
|
||||
const rules = {
|
||||
userName: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
|
||||
userNumber: [{ required: true, message: '请输入用户编号', trigger: 'blur' }],
|
||||
userCategory: [{ required: true, message: '请选择用户类别', trigger: 'change' }],
|
||||
complaintText: [{ required: true, message: '请输入投诉内容', trigger: 'blur' }],
|
||||
detectionFlag: [{ required: true, message: '请选择是否实现监测', trigger: 'change' }],
|
||||
transientIndicators: [{ required: true, message: '请选择暂态指标', trigger: 'change' }],
|
||||
steadyIndicator: [{ required: true, message: '请选择稳态指标', trigger: 'change' }],
|
||||
monitorName: [{ required: true, message: '请输入监测点名称', trigger: 'blur' }],
|
||||
monitorNumber: [{ required: true, message: '请选择监测点', trigger: 'change' }],
|
||||
dutyOrgId: [{ required: true, message: '请选择负责单位', trigger: 'change' }]
|
||||
}
|
||||
const formRef = ref()
|
||||
const submit = async () => {
|
||||
loading.value = true
|
||||
formRef.value.validate(async (valid) => {
|
||||
if (valid) {
|
||||
form.value = {
|
||||
...form.value,
|
||||
steadyIndicator: form.value.steadyIndicator.join(','),
|
||||
transientIndicators: form.value.transientIndicators.join(','),
|
||||
monitorName: minitorList.value.find(item => {
|
||||
return item.id == form.value.monitorNumber
|
||||
})?.name
|
||||
}
|
||||
await addComplaintsData(form.value).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
})
|
||||
emits('onSubmit')
|
||||
formRef.value && formRef.value.resetFields()
|
||||
resetForm()
|
||||
handleClose()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('表单验证失败')
|
||||
return false
|
||||
}
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
const open = (row: any) => {
|
||||
resetForm()
|
||||
dialogVisible.value = true
|
||||
title.value = row.text
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
formRef.value && formRef.value.resetFields()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
const changeSteadyState = () => {
|
||||
form.value.transientIndicators = []
|
||||
}
|
||||
const changeTransientIndicators = () => {
|
||||
form.value.steadyIndicator = []
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-form {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
height: 400px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" v-loading="loading" :title="title" width="80%" :before-close="handleClose">
|
||||
<div style="height: 45vh">
|
||||
<vxe-table show-overflow v-bind="defaultAttribute" :data="List">
|
||||
<vxe-column field="time" title="日期" width="230px"></vxe-column>
|
||||
<vxe-column field="overLimitInfo" title="越限详情"></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, defineEmits } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { overLimitDetail } from '@/api/process-boot/electricitymanagement'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogVisible = ref(false)
|
||||
const title: any = ref('')
|
||||
const List: any = ref([])
|
||||
const loading = ref(false)
|
||||
const open = (row: any) => {
|
||||
dialogVisible.value = true
|
||||
title.value = row.text
|
||||
loading.value = true
|
||||
List.value = []
|
||||
overLimitDetail({
|
||||
lineId: row.row.lineId,
|
||||
targetId: row.row.targetType,
|
||||
searchBeginTime: row.list.searchBeginTime,
|
||||
searchEndTime: row.list.searchEndTime
|
||||
}).then(res => {
|
||||
List.value = res.data
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 提升 VxeTable tooltip 的层级 */
|
||||
</style>
|
||||
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" style="width: 1100px" :before-close="handleClose">
|
||||
<el-form :model="ordinaryA" :inline="true" class="form">
|
||||
<el-form-item>
|
||||
<Area v-model="ordinaryA.orgNo"></Area>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="普测结果上传时间">
|
||||
<el-date-picker
|
||||
v-model="ordinaryA.planStartTime"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择月"
|
||||
@change="queryPlanName"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="普测计划名称">
|
||||
<el-select v-model="ordinaryA.planName" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in planNameList"
|
||||
:key="item.planName"
|
||||
:label="item.planName"
|
||||
:value="item.planName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-Search" @click="searchFnExcessive">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<vxe-table v-bind="defaultAttribute" height="350" ref="xTable2Ref" :data="ordinaryAddData">
|
||||
<vxe-column type="radio" width="60"></vxe-column>
|
||||
<vxe-column field="subName" title="变电站名称"></vxe-column>
|
||||
<vxe-column field="voltageLevelName" title="变电站电压等级"></vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
<el-form :model="ordinaryA" :rules="rules" ref="ordinaryARef" label-width="auto" :inline="true" class="form">
|
||||
<el-form-item label="稳态指标" prop="steadyState">
|
||||
<el-checkbox-group v-model="ordinaryA.steadyState">
|
||||
<el-checkbox v-for="(item, ind) in steadyStateList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="暂态指标" prop="transientIndicators">
|
||||
<el-checkbox-group v-model="ordinaryA.transientIndicators">
|
||||
<el-checkbox v-for="(item, ind) in transientIndicatorsList" :key="ind" :label="item.code">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="上传附件">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
action=""
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:limit="1"
|
||||
:on-change="beforeUpload"
|
||||
>
|
||||
<el-button icon="el-icon-Upload" type="primary" class="mr10">上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const emit = defineEmits(['onsubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogVisible = ref(false)
|
||||
const title: any = ref('')
|
||||
const steadyStateList = dictData.getBasicData('Steady_Indicator')
|
||||
const transientIndicatorsList = dictData.getBasicData('Transient_Indicators')
|
||||
|
||||
const ordinaryA = ref({
|
||||
orgNo: '',
|
||||
orgName: '',
|
||||
planName: '',
|
||||
planStartTime: '',
|
||||
uploadTime: '',
|
||||
name: '',
|
||||
steadyState: [],
|
||||
transientIndicators: []
|
||||
})
|
||||
const defaultAttribute = ref([])
|
||||
const rules = {
|
||||
problemName: [{ required: true, message: '请输入问题名称', trigger: 'blur' }],
|
||||
userName: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
|
||||
userNo: [{ required: true, message: '请输入用户编号', trigger: 'blur' }],
|
||||
complaintContent: [{ required: true, message: '请输入投诉内容', trigger: 'blur' }],
|
||||
complaintTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
||||
problemSources: [{ required: true, message: '情选择问题来源', trigger: 'change' }],
|
||||
abnormalDevTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
||||
transientIndicators: [{ required: true, message: '请选择暂态指标', trigger: 'change' }],
|
||||
steadyState: [{ required: true, message: '请选择稳态指标', trigger: 'change' }],
|
||||
eventDescription: [{ required: true, message: '请输入终端异常描述', trigger: 'blur' }],
|
||||
abnormalDevName: [{ required: true, message: '请输入问题名称', trigger: 'blur' }]
|
||||
}
|
||||
const submit = () => {
|
||||
handleClose()
|
||||
}
|
||||
|
||||
const open = (row: any) => {
|
||||
dialogVisible.value = true
|
||||
title.value = row.text
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
const beforeUpload = () => {}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
||||
|
||||
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="区域">
|
||||
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测点性质">
|
||||
<el-select v-model="tableStore.table.params.lineType" clearable>
|
||||
<el-option label="电网侧" value="0"/>
|
||||
<el-option label="非电网侧" value="1"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="超标指标">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.targetList"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
placeholder="请选择超标指标"
|
||||
>
|
||||
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据类型">
|
||||
<el-switch
|
||||
v-model="tableStore.table.params.dataType"
|
||||
inline-prompt
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-text="超标数据"
|
||||
inactive-text="无数据"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预警阈值">
|
||||
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
|
||||
<el-input-number
|
||||
v-model="tableStore.table.params.alertThreshold"
|
||||
:min="0"
|
||||
:step="1"
|
||||
step-strictly
|
||||
@change="changeAlert"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="告警阈值">
|
||||
<el-input-number
|
||||
v-model="tableStore.table.params.alarmThreshold"
|
||||
:min="0"
|
||||
:step="1"
|
||||
step-strictly
|
||||
@change="changeAlarm"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="搜索">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="输入变电站、终端、监测点名称"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起预警单')">
|
||||
发起预警单
|
||||
</el-button>
|
||||
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起告警单')">
|
||||
发起告警单
|
||||
</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"/>
|
||||
<!-- /告警单 -->
|
||||
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()"/>
|
||||
<!-- 详情 -->
|
||||
<detail ref="detailRef"/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref, onMounted, provide, nextTick} from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {useDictData} from '@/stores/dictData'
|
||||
import alarmList from './form/alarmList.vue'
|
||||
import detail from './form/detail.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
import {useRouter} from 'vue-router'
|
||||
|
||||
const router = useRouter() // 路由对象
|
||||
//字典获取超标指标
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
const tableRef = ref()
|
||||
const industry = dictData.getBasicData('Business_Type')
|
||||
const TableHeaderRef = ref()
|
||||
const alarmListRef = ref()
|
||||
const flagTime = ref(false)
|
||||
const detailRef = ref()
|
||||
const list: any = ref({
|
||||
deptId: '',
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
alertThreshold: '',
|
||||
alarmThreshold: ''
|
||||
})
|
||||
const level: any = ref(dictData.state.area[0]?.level)
|
||||
const flag: any = ref('')
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/onlineMonitor/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
// isWebPaging:true,
|
||||
column: [
|
||||
{title: '', type: 'checkbox', width: 40},
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{field: 'dept', title: '负责单位'},
|
||||
{field: 'substation', title: '变电站名称'},
|
||||
{field: 'deviceName', title: '终端名称'},
|
||||
{field: 'lineName', title: '监测点名称'},
|
||||
|
||||
{
|
||||
field: 'businessType',
|
||||
title: '监测对象类型',
|
||||
|
||||
formatter: (row: any) => {
|
||||
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||
}
|
||||
},
|
||||
{field: 'objectName', title: '监测对象名称'},
|
||||
{
|
||||
field: 'targetType',
|
||||
title: '指标类型',
|
||||
formatter: (row: any) => {
|
||||
return exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'overLimitDay',
|
||||
title: '累计超标天数',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue != null ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
visible: flagTime,
|
||||
title: '最新数据时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.targetType == 0
|
||||
},
|
||||
click: row => {
|
||||
detailRef.value.open({
|
||||
text: '详情',
|
||||
row: row,
|
||||
list: list.value
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '查看预警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.step != 1
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
query: {
|
||||
type: 0,
|
||||
t: Date.now()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.step != 2
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
query: {
|
||||
type: 1,
|
||||
t: Date.now()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '发起告警单',
|
||||
// type: 'warning',
|
||||
// disabled: row => {
|
||||
// return row.overLimitDay < tableStore.table.params.alarmThreshold
|
||||
// },
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
|
||||
// click: async row => {
|
||||
// // handleWarningAlarmFlag(row).then(res => {
|
||||
// // console.log(res)
|
||||
// // ElMessage.success('发起告警单成功!')
|
||||
// // tableStore.index()
|
||||
// // })
|
||||
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
|
||||
// inputType: 'textarea',
|
||||
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
// inputErrorMessage: '请输入整改意见'
|
||||
// })
|
||||
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
||||
// ElMessage.success('发起告警单成功!')
|
||||
// tableStore.index()
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '发起预警单',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-Open',
|
||||
// disabled: row => {
|
||||
// return row.overLimitDay >= tableStore.table.params.alarmThreshold
|
||||
// },
|
||||
// render: 'basicButton',
|
||||
|
||||
// click: async row => {
|
||||
// // handleWarningAlarmFlag(row).then(res => {
|
||||
// // console.log(res)
|
||||
// // ElMessage.success('发起预警单成功!')
|
||||
// // tableStore.index()
|
||||
// // })
|
||||
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
|
||||
// inputType: 'textarea',
|
||||
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
// inputErrorMessage: '请输入整改意见'
|
||||
// })
|
||||
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
||||
// ElMessage.success('发起预警单成功!')
|
||||
// tableStore.index()
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
list.value.deptId = tableStore.table.params.deptId
|
||||
|
||||
list.value.searchBeginTime = tableStore.table.params.searchBeginTime
|
||||
list.value.searchEndTime = tableStore.table.params.searchEndTime
|
||||
if (tableStore.table.params.alertThreshold != '') {
|
||||
list.value.alertThreshold = tableStore.table.params.alertThreshold
|
||||
}
|
||||
list.value.lineType = tableStore.table.params.lineType
|
||||
list.value.alarmThreshold = tableStore.table.params.alarmThreshold
|
||||
flag.value = level.value
|
||||
flagTime.value = tableStore.table.params.dataType == 0 ? true : false
|
||||
},
|
||||
loadCallback: () => {
|
||||
// tableStore.table.data = [
|
||||
// {
|
||||
// orgName: '张家口',
|
||||
// subName: '110kV马头山风电场',
|
||||
// lineName: '111口头线',
|
||||
// voltageScale: '110kV',
|
||||
// overDay: '20',
|
||||
// overDays: '10'
|
||||
// },
|
||||
// {
|
||||
// orgName: '张家口',
|
||||
// subName: '110kV韩家庄风电场',
|
||||
// lineName: '111缘韩一线',
|
||||
// voltageScale: '110kV',
|
||||
// overDay: '20',
|
||||
// overDays: '16'
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
})
|
||||
tableStore.table.params.alertThreshold = 5
|
||||
tableStore.table.params.alarmThreshold = 5
|
||||
tableStore.table.params.targetList = exceeded.filter(item => item.code == 'Total_Indicator')[0].id
|
||||
? [exceeded.filter(item => item.code == 'Total_Indicator')[0].id]
|
||||
: []
|
||||
tableStore.table.params.lineType = ''
|
||||
tableStore.table.params.dataType = '1'
|
||||
tableStore.table.params.deptId = dictData.state.area[0].id
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
|
||||
|
||||
tableStore.index()
|
||||
setTimeout(() => {
|
||||
TableHeaderRef.value.showSelectChange()
|
||||
}, 10)
|
||||
})
|
||||
|
||||
const changeAlert = e => {
|
||||
if (e == null) {
|
||||
tableStore.table.params.alertThreshold = 5
|
||||
} else {
|
||||
if (e > tableStore.table.params.alarmThreshold) {
|
||||
ElMessage.warning('预警阈值不能大于报警阈值')
|
||||
tableStore.table.params.alertThreshold = 5
|
||||
}
|
||||
}
|
||||
}
|
||||
const changeAlarm = e => {
|
||||
if (e == null) {
|
||||
tableStore.table.params.alarmThreshold = 5
|
||||
} else {
|
||||
if (e < tableStore.table.params.alertThreshold) {
|
||||
ElMessage.warning('报警阈值不能小于预警阈值')
|
||||
tableStore.table.params.alarmThreshold = 5
|
||||
}
|
||||
}
|
||||
}
|
||||
// 发起预警单
|
||||
const launch = (title: string) => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage.warning('请选择一条数据')
|
||||
return
|
||||
}
|
||||
|
||||
alarmListRef.value.open({
|
||||
text: title,
|
||||
form: list.value,
|
||||
row: tableStore.table.selection
|
||||
})
|
||||
console.log('🚀 ~ launch ~ list.value:', list.value)
|
||||
}
|
||||
const changeArea = e => {
|
||||
level.value = e.data.level
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="计划名称">
|
||||
<el-input style="width: 200px" v-model="tableStore.table.params.searchValue" clearable
|
||||
placeholder="请输入计划名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否解决">
|
||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<testQuestionsForm ref="testQuestionsFormRef" />
|
||||
<!-- 详情 -->
|
||||
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
|
||||
<detail :id="detailId" :flag="flag" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import testQuestionsForm from './form/testQuestionsForm.vue'
|
||||
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
const { push } = useRouter()
|
||||
const router = useRouter() // 路由对象
|
||||
const tableRef = ref()
|
||||
const flag = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const dialogVisible = ref(false)
|
||||
const detailId = ref('')
|
||||
const testQuestionsFormRef = ref()
|
||||
const dealStateList = ref([
|
||||
{
|
||||
label: '未解决',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '全部',
|
||||
value: '1'
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/surveyTest/pageProblemSurvey',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'planName', title: '计划名称', minWidth: 120 },
|
||||
{ field: 'deptName', title: '负责单位', minWidth: 120 },
|
||||
{ field: 'substationName', title: '变电站', minWidth: 120 },
|
||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 100 },
|
||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 100 },
|
||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 100 },
|
||||
{ field: 'completeBy', title: '测试负责人', minWidth: 120 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'dealState',
|
||||
title: '是否解决',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未解决',
|
||||
1: '已解决',
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
|
||||
click: async row => {
|
||||
flag.value = row.dealState == 1 ? true : false
|
||||
dialogVisible.value = true
|
||||
detailId.value = row.id
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '发起告警单',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dealState != 0
|
||||
},
|
||||
|
||||
click: async row => {
|
||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '请输入整改意见'
|
||||
})
|
||||
initiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
||||
ElMessage.success('发起告警成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 0
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
query: {
|
||||
type: 1,
|
||||
t: Date.now()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
tableStore.table.params.dealState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
/**
|
||||
* 发起告警单
|
||||
*/
|
||||
const initiateAlarm = async (id: string) => {
|
||||
await initiateWarningLeaflet(id)
|
||||
ElMessage.success('发起告警成功!')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -0,0 +1,300 @@
|
||||
<!---试运行列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否解决">
|
||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!-- 详情 -->
|
||||
<detail ref="detailRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { addRunTest, initiateWarningLeaflet } from '@/api/supervision-boot/lineRunTest'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { VxeTablePropTypes } from 'vxe-table'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import detail from './testRunDetail.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const { push } = useRouter()
|
||||
const adminInfo = useAdminInfo()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const detailRef = ref()
|
||||
const dealStateList = ref([
|
||||
{
|
||||
label: '未解决',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '全部',
|
||||
value: '1'
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/lineRunTestProblem/pageProblem',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
||||
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
|
||||
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140, },
|
||||
{
|
||||
field: 'powerSubstationName', title: '变电站', minWidth: 160, formatter: row => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'reason', title: '调试原因', minWidth: 160 },
|
||||
|
||||
{
|
||||
field: 'testRunState',
|
||||
title: '试运行状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
1: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待试运行',
|
||||
1: '试运行中',
|
||||
2: '试运行成功',
|
||||
3: '试运行失败',
|
||||
null: '待试运行'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'testRunTime',
|
||||
title: '试运行时间范围',
|
||||
minWidth: 200,
|
||||
formatter: row => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'problemReason', title: '试运行评估问题', minWidth: 200 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'dealState',
|
||||
title: '是否解决',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未解决',
|
||||
1: '已解决',
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 230,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '流程详情',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// click: row => {
|
||||
// handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
// },
|
||||
// disabled: row => {
|
||||
// return row.testRunState != 2 || !row.processInstanceId
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '下载报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
downloadTheReport(row.testRunReport)
|
||||
},
|
||||
disabled: row => {
|
||||
return row.testRunReport == null || row.testRunReport.length == 0
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '发起告警单',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dealState != 0
|
||||
},
|
||||
|
||||
click: async row => {
|
||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '请输入整改意见'
|
||||
})
|
||||
initiateWarningLeaflet({
|
||||
id: row.id,
|
||||
problemId: row.problemId,
|
||||
reformAdvice: value,
|
||||
type: 2,
|
||||
issueDetail: row.problemReason
|
||||
}).then(res => {
|
||||
ElMessage.success('发起告警单成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dealState == 0
|
||||
},
|
||||
|
||||
click: row => {
|
||||
detailRef.value.open({
|
||||
row: row,
|
||||
title: '详情',
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.problemType == null
|
||||
},
|
||||
click: row => {
|
||||
push({
|
||||
name: 'supervision/supervision/manage',
|
||||
query: {
|
||||
type: 1,
|
||||
t: Date.now()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.statveList = [2]
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.dealState = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
||||
labelField: '',
|
||||
checkMethod: ({ row }) => {
|
||||
return !(row.testRunState == 1 || row.testRunState == 2)
|
||||
}
|
||||
})
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 下载报告
|
||||
const downloadTheReport = (url: string) => {
|
||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
||||
const link = document.createElement('a')
|
||||
link.href = res.data.url
|
||||
link.download = res.data.name
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
|
||||
const runTestSubmit = (type: number) => {
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: type
|
||||
}
|
||||
addRunTest(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="dialogVisible" draggable :title="title" width="1000">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="监测点名称">
|
||||
{{ list.lineName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接入母线">
|
||||
{{ list.connectedBus }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端名称">
|
||||
{{ list.monitoringTerminalName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变电站">
|
||||
{{ list.powerSubstationName ||'/'}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="调试原因">
|
||||
{{ list.reason }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="试运行状态">
|
||||
<el-tag
|
||||
:type='list.testRunState == 0 ? "primary" : list.testRunState == 1 ? "warning" : list.testRunState == 2 ? "success" : list.testRunState == 3 ? "danger" : "primary"'>{{
|
||||
list.testRunState == 0 ? "待试运行" : list.testRunState == 1 ? "试运行中" : list.testRunState == 2
|
||||
? "试运行成功" : list.testRunState == 3 ? "试运行失败" : "待试运行" }}</el-tag>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试运行时间范围">
|
||||
{{ list.testRunTime ||'/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试运行评估问题">
|
||||
{{ list.problemReason ||'/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ dictData.state.userList.filter(item => item.id == list.createBy)[0]?.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="整改意见">
|
||||
{{ list.reformAdvice }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="采取的措施">
|
||||
{{ list.takeStep }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="处理成效报告">
|
||||
<el-icon class="elView " v-if="list?.reportName">
|
||||
<View @click="openFile(list?.reportName)" />
|
||||
</el-icon>
|
||||
<a :href="list.reportPath" target="_blank">{{ list.reportName }}</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { View } from '@element-plus/icons-vue'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('')
|
||||
const list: any = ref({})
|
||||
const dictData = useDictData()
|
||||
const open = (row: any) => {
|
||||
list.value = {}
|
||||
title.value = row.title
|
||||
dialogVisible.value = true
|
||||
list.value = JSON.parse(JSON.stringify(row.row))
|
||||
getFileNameAndFilePath({ filePath: row.row.reportPath }).then(res => {
|
||||
list.value.reportPath = res.data.url
|
||||
list.value.reportName = res.data.fileName
|
||||
})
|
||||
}
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
53
src/views/pqs/supervise_jb/electricalEnergy/index.vue
Normal file
53
src/views/pqs/supervise_jb/electricalEnergy/index.vue
Normal file
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
<el-tab-pane label="在线监测" name="1">
|
||||
<online v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="用户投诉" name="2">
|
||||
<complaints v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="计划问题" name="3">
|
||||
<testQuestions v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="试运行评估问题" name="4">
|
||||
<testRun v-if="activeName == '4'" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tabs v-model="activeName" type="border-card">
|
||||
<el-tab-pane label="电能质量问题查询维护" name="1">
|
||||
<maintenance />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="电能质量问题审核" name="2">
|
||||
<audit />
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref, provide } from 'vue'
|
||||
import online from './components1/online.vue'
|
||||
import complaints from './components1/complaints.vue'
|
||||
import testQuestions from './components1/testQuestions.vue'
|
||||
import testRun from './components1/testRun.vue'
|
||||
// import maintenance from './components/maintenance.vue'
|
||||
// import audit from './components/audit.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
defineOptions({
|
||||
name: 'supervision/electricitymanagement'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button icon="el-icon-Check" type="primary" @click="preserve">保存</el-button>
|
||||
<el-button icon="el-icon-Grid" type="primary" @click="dialogVisible = true">配置保存年限</el-button>
|
||||
<div class="mt10" :style="`height: calc(${height} - 43px)`">
|
||||
<vxe-table
|
||||
v-bind="defaultAttribute"
|
||||
height="auto"
|
||||
ref="tableRef"
|
||||
:data="tableData"
|
||||
:tree-config="{ children: 'children' }"
|
||||
:edit-config="{ trigger: 'click', mode: 'cell' }"
|
||||
>
|
||||
<vxe-table-column field="name" align="left" title="部门" tree-node></vxe-table-column>
|
||||
|
||||
<vxe-table-column
|
||||
field="proportion"
|
||||
title="占比(%)"
|
||||
:edit-render="{
|
||||
name: '$input',
|
||||
props: { type: 'float', digits: 2, max: 100, min: 0 }
|
||||
}"
|
||||
></vxe-table-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<el-dialog draggable v-model="dialogVisible" title="年限设置" width="500" :before-close="handleClose">
|
||||
<el-input-number v-model="num" :min="0" :max="1000" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="define">保存</el-button>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getAreaList } from '@/api/common'
|
||||
import { addPlanConfig, addPlanCycle, queryPlanConfig } from '@/api/process-boot/generalTest'
|
||||
const dialogVisible = ref(false)
|
||||
const num = ref(0)
|
||||
const tableRef = ref()
|
||||
const height = mainHeight(80).height
|
||||
const tableData: any = ref([])
|
||||
const treeData = ref([])
|
||||
const treeList: any = ref([])
|
||||
const info = async () => {
|
||||
await queryPlanConfig().then(res => {
|
||||
treeData.value = res.data
|
||||
})
|
||||
await getAreaList().then((res: any) => {
|
||||
tableData.value = circulationTreeData(res.data)
|
||||
setTimeout(() => {
|
||||
tableRef.value.setAllTreeExpand(true)
|
||||
}, 0)
|
||||
})
|
||||
}
|
||||
const circulationTreeData = (rows: any) => {
|
||||
let children: any = []
|
||||
|
||||
rows.forEach((item: any) => {
|
||||
let proportion = 0
|
||||
treeData.value.forEach((val: any) => {
|
||||
if (val.orgId == item.id) {
|
||||
proportion = val.proportion
|
||||
return
|
||||
}
|
||||
})
|
||||
|
||||
if (item.children && item.children.length > 0) {
|
||||
children.push({
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
proportion: proportion,
|
||||
children: circulationTreeData(item.children)
|
||||
})
|
||||
} else {
|
||||
children.push({
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
proportion: proportion
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
return children
|
||||
}
|
||||
const preserve = () => {
|
||||
treeList.value = []
|
||||
circulation(tableData.value)
|
||||
setTimeout(() => {
|
||||
addPlanConfig(treeList.value).then(res => {
|
||||
ElMessage.success('保存成功!')
|
||||
info()
|
||||
})
|
||||
}, 0)
|
||||
}
|
||||
// 保存配置
|
||||
const define = () => {
|
||||
addPlanCycle({
|
||||
cycleNum: num.value
|
||||
}).then(res => {
|
||||
if (res.data.flag == true) {
|
||||
ElMessage.success('年限设置成功!')
|
||||
handleClose()
|
||||
} else {
|
||||
ElMessage.warning(`本次普测计划周期还未结束,请在 ${res.data.endYear} 后设置!`)
|
||||
}
|
||||
})
|
||||
}
|
||||
const circulation = (rows: any) => {
|
||||
let children: any = []
|
||||
|
||||
rows.forEach((item: any) => {
|
||||
treeList.value.push({
|
||||
orgName: item.name,
|
||||
orgId: item.id,
|
||||
proportion: item.proportion
|
||||
})
|
||||
if (item.children && item.children.length > 0) {
|
||||
circulation(item.children)
|
||||
}
|
||||
})
|
||||
|
||||
return children
|
||||
}
|
||||
const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
num.value = 0
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
info()
|
||||
})
|
||||
</script>
|
||||
186
src/views/pqs/supervise_jb/harmonicSurvey/components/outcome.vue
Normal file
186
src/views/pqs/supervise_jb/harmonicSurvey/components/outcome.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="是否上传">
|
||||
<el-select v-model="tableStore.table.params.isFileUpload" placeholder="请选择是否上传">
|
||||
<el-option label="未上传" value="0" />
|
||||
<el-option label="已上传" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 上传弹窗 -->
|
||||
<el-dialog draggable title="上传" v-model="addUpload" width="500px">
|
||||
<el-upload
|
||||
multiple
|
||||
action=""
|
||||
:auto-upload="false"
|
||||
:limit="999"
|
||||
:file-list="fileList"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="chooseBatch"
|
||||
ref="upload"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="BatchUpload">保存</el-button>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 文件查看 -->
|
||||
<el-dialog draggable title="文件查看" v-model="dataShow" width="600px">
|
||||
<vxe-table height="400" auto-resize :data="uploadList" v-bind="defaultAttribute">
|
||||
<vxe-column field="minFileName" title="文件名称"></vxe-column>
|
||||
|
||||
<vxe-column title="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" link @click="downLownFn(row)">下载</el-button>
|
||||
<!-- <el-popconfirm title="是否确认删除策略!" @confirm="details(row)">
|
||||
<template #reference>
|
||||
<el-button type="danger" link>删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm> -->
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { MultipartFile, surveyResultDownload } from '@/api/process-boot/generalTest'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const addUpload = ref(false)
|
||||
const dataShow = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const fileList: any = ref([])
|
||||
const uploadList: any = ref([])
|
||||
|
||||
const planId = ref('')
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/rGeneralSurveyPlan/queryPlanResult',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox' },
|
||||
{ field: 'orgName', title: '责任单位' },
|
||||
{ field: 'planNo', title: '普测计划编号' },
|
||||
{ field: 'planName', title: '普测计划名称' },
|
||||
{ field: 'planStartTime', title: '开始时间' },
|
||||
{ field: 'planEndTime', title: '结束时间' },
|
||||
{ field: 'subCount', title: '普测变电站数量' },
|
||||
{
|
||||
field: 'isFileUpload',
|
||||
title: '是否上传',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '否',
|
||||
1: '是'
|
||||
}
|
||||
},
|
||||
{ field: 'fileCount', title: '上传文件数量' },
|
||||
{ field: 'uploadTime', title: '上传时间' },
|
||||
{
|
||||
title: '操作文件',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
title: '上传',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
planId.value = row.planNo
|
||||
addUpload.value = true
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
disabled: row => {
|
||||
return row.isFileUpload !== 1
|
||||
},
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
surveyResultDownload({ planNo: row.planNo }).then(res => {
|
||||
uploadList.value = res.data
|
||||
dataShow.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.isFileUpload = ''
|
||||
|
||||
const handleRemove = (e: any) => {
|
||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||
}
|
||||
const chooseBatch = (e: any) => {
|
||||
fileList.value.push(e)
|
||||
}
|
||||
|
||||
// 上传
|
||||
const BatchUpload = () => {
|
||||
let form = new FormData()
|
||||
form.append('planId', planId.value)
|
||||
fileList.value.forEach((item: any) => {
|
||||
form.append('file', item.raw)
|
||||
})
|
||||
MultipartFile(form).then((res: any) => {
|
||||
ElMessage.success('上传成功!')
|
||||
handleClose()
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
const handleClose = () => {
|
||||
fileList.value = []
|
||||
addUpload.value = false
|
||||
}
|
||||
// 下载
|
||||
const downLownFn = async (row: any) => {
|
||||
let response = await fetch(row.minFileUrl)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = row.minFileName
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
335
src/views/pqs/supervise_jb/harmonicSurvey/components/planAdd.vue
Normal file
335
src/views/pqs/supervise_jb/harmonicSurvey/components/planAdd.vue
Normal file
@@ -0,0 +1,335 @@
|
||||
<template>
|
||||
<el-dialog draggable :title="title" v-model="planAddition" width="500px" :before-close="cancelFn">
|
||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" scroll-to-error
|
||||
:validate-on-rule-change="false" class="form-one">
|
||||
<el-form-item for="-" label="计划负责单位:">
|
||||
<Area v-model="form.deptId" @change="changeArea" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划名称:" prop="planName">
|
||||
<el-input v-model="form.planName" placeholder="请输入计划名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="监督类型:" prop="supvType">
|
||||
<el-select v-model="form.supvType" placeholder="请选择监督类型" style="width: 100%" @change="++key">
|
||||
<el-option v-for="item in supvTypeOptionList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象名称:" prop="supvObjectName">
|
||||
<el-input v-model="form.supvObjectName" placeholder="请输入监督对象名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划开始时间:" prop="planStartTime">
|
||||
<el-date-picker v-model="form.planStartTime" type="date" placeholder="选择计划开始时间"
|
||||
value-format="YYYY-MM-DD" :disabled-date="disableStartDate"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划结束时间:" prop="planEndTime">
|
||||
<el-date-picker v-model="form.planEndTime" type="date" placeholder="选择计划结束时间"
|
||||
:disabled-date="disableEndDate" value-format="YYYY-MM-DD"></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item for="-" label="实际完成时间:" prop="planComplateTime">
|
||||
<el-date-picker
|
||||
v-model="form.planComplateTime"
|
||||
type="date"
|
||||
placeholder="选择实际完成时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item for="-" label="测试负责人:" prop="leader">
|
||||
<el-input v-model="form.leader" placeholder="请输入测试负责人"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item for="-" label="系统电站:" prop="customSubstationFlag">
|
||||
<!-- 默认值 开启 -->
|
||||
<el-radio-group v-model="form.customSubstationFlag" @change="changeSubstationFlag">
|
||||
<el-radio :value="0">是</el-radio>
|
||||
<el-radio :value="1">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :key="key" label="关联电站:" v-if="form.customSubstationFlag == 0" :prop="dynamicProp"
|
||||
style="display: flex; align-items: center">
|
||||
<el-cascader v-model="form.substation" :options="treeData" :props="defaultProps" clearable filterable
|
||||
collapse-tags collapse-tags-tooltip placeholder="请选择关联电站" />
|
||||
<!-- <el-tree-select
|
||||
accordion
|
||||
ref="treeRef"
|
||||
:default-expand-all="false"
|
||||
show-checkbox
|
||||
check-strictly
|
||||
:highlight-current="true"
|
||||
readonly
|
||||
node-key="id"
|
||||
:props="defaultProps"
|
||||
v-model="form.substation"
|
||||
:data="treeList"
|
||||
:render-after-expand="false"
|
||||
/> -->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item for="-" label="关联电站:" :key="key" v-if="form.customSubstationFlag == 1" :prop="dynamicProp">
|
||||
<el-input v-model="form.substation" placeholder="请输入关联电站"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form :model="form" label-width="auto"> -->
|
||||
<!-- <el-form-item for="-" class="uploadFile" label="普测报告:" prop="fileList">
|
||||
<el-upload
|
||||
v-model:file-list="form.fileList"
|
||||
ref="upload"
|
||||
action=""
|
||||
:limit="5"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item> -->
|
||||
<!-- </el-form> -->
|
||||
</el-form>
|
||||
<!-- <el-divider content-position="left" style="font-size: 18px; font-weight: bolder">添加电站</el-divider> -->
|
||||
<!-- <generalTestTree ref="treeRef" /> -->
|
||||
<!-- <div
|
||||
v-if="
|
||||
(title == '查看计划' || title == '计划审核') &&
|
||||
(title == '计划审核' || form.status == 1 || form.status == 3 || form.status == 4)
|
||||
"
|
||||
>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
||||
<el-input
|
||||
:disabled="title != '计划审核'"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="form.checkComment"
|
||||
></el-input>
|
||||
</div> -->
|
||||
<template #footer v-if="title != '查看计划'">
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancelFn">取消</el-button>
|
||||
|
||||
<el-button type="primary" @click="submitFn(true)" :loading="loading">保存</el-button>
|
||||
<el-button type="primary" @click="submitFn(false)" :loading="loading">提交审批</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, nextTick } from 'vue'
|
||||
import {
|
||||
addSurvey,
|
||||
auditSurvey,
|
||||
addSurveyPlan,
|
||||
getById,
|
||||
initDetpStataionTree,
|
||||
updateSurveyPlan
|
||||
} from '@/api/process-boot/generalTest'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { ElMessage, UploadProps } from 'element-plus'
|
||||
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const emit = defineEmits(['onsubmit'])
|
||||
const loading = ref(false)
|
||||
const dictData = useDictData()
|
||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||
const title = ref('')
|
||||
const planAddition = ref(false)
|
||||
const key: any = ref(0)
|
||||
const dynamicProp = computed(() => {
|
||||
// report_supervision
|
||||
let code = supvTypeOptionList.filter(item => item.id === form.value.supvType)[0]?.code
|
||||
return code == 'Technical_Super' ? '' : code == 'report_supervision' ? '' : 'substation'
|
||||
})
|
||||
|
||||
const defaultProps = ref({
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
checkStrictly: true,
|
||||
emitPath: false,
|
||||
expandTrigger: 'hover' as const,
|
||||
multiple: true
|
||||
})
|
||||
//开始时间不能大于结束时间
|
||||
const disableStartDate = (time: any) => {
|
||||
if (time && form.value.planEndTime) {
|
||||
return time.getTime() > new Date(form.value.planEndTime).getTime()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
//结束时间不能小于开始时间
|
||||
const disableEndDate = (time: any) => {
|
||||
if (time && form.value.planStartTime) {
|
||||
return time.getTime() <= new Date(form.value.planStartTime).getTime() - 8.64e7
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
const form: any = ref({
|
||||
// orgName: '',
|
||||
deptId: dictData.state.area[0].id,
|
||||
planStartTime: '',
|
||||
planEndTime: '',
|
||||
planName: '',
|
||||
// fileList: [],
|
||||
// checkComment: '',
|
||||
// filePath: '',
|
||||
substation: '', //关联电站
|
||||
customSubstationFlag: 0 //电站类型
|
||||
})
|
||||
const props = {
|
||||
expandTrigger: 'hover' as const
|
||||
}
|
||||
const formRef = ref()
|
||||
const treeRef = ref()
|
||||
const rules = ref({
|
||||
planStartTime: [{ required: true, message: '选择计划开始时间', trigger: 'change' }],
|
||||
planEndTime: [{ required: true, message: '选择计划结束时间', trigger: 'change' }],
|
||||
supvType: [{ required: true, message: '请选择监督类型', trigger: 'change' }],
|
||||
planComplateTime: [{ required: true, message: '选择实际完成时间 ', trigger: 'change' }],
|
||||
supvObjectName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
|
||||
planName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
|
||||
leader: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }],
|
||||
substation: [{ required: true, message: '请选择关联电站', trigger: 'blur' }]
|
||||
// fileList: [{ required: true, message: '请上传文件', trigger: 'change' }],
|
||||
})
|
||||
const changeSubstationFlag = () => {
|
||||
console.log(form.value.customSubstationFlag)
|
||||
//处理所属变电站手都输入1/下拉数据0
|
||||
key.value += 1
|
||||
if (form.value.customSubstationFlag == 0) {
|
||||
rules.value.substation[0].message = '请选择关联电站'
|
||||
form.value.substation = []
|
||||
} else {
|
||||
rules.value.substation[0].message = '请输入关联电站'
|
||||
form.value.substation = ''
|
||||
}
|
||||
}
|
||||
const cancelFn = () => {
|
||||
formRef.value?.resetFields()
|
||||
// treeRef.value.setKey([])
|
||||
planAddition.value = false
|
||||
}
|
||||
const treeList = ref()
|
||||
const treeListCgy = ref()
|
||||
const treeData = ref()
|
||||
const loadData = () => {
|
||||
initDetpStataionTree({ orgId: dictData.state.area[0].id }).then(res => {
|
||||
treeList.value = res.data
|
||||
initDetpStataionTree({ orgId: 'a3069759b0b6072c99cf9a7af6c162e9' }).then(res => {
|
||||
treeListCgy.value = res.data
|
||||
setTimeout(() => {
|
||||
changeArea()
|
||||
}, 10)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const detailById = (id: any) => {
|
||||
getById(id).then(res => {
|
||||
form.value = res.data
|
||||
|
||||
form.value.substation =
|
||||
res.data.customSubstationFlag == 0 ? res.data.substation.split(',') : res.data.substation
|
||||
key.value += 1
|
||||
})
|
||||
}
|
||||
// 提交
|
||||
const submitFn = async (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
const addForm = JSON.parse(JSON.stringify(form.value))
|
||||
|
||||
if (form.value.customSubstationFlag == 0) {
|
||||
addForm.substation = addForm.substation.length == 0 ? '' : addForm.substation.join(',')
|
||||
}
|
||||
addForm.saveOrCheckflag = '1'
|
||||
|
||||
await addSurveyPlan(addForm).then(res => {
|
||||
cancelFn()
|
||||
ElMessage.success('保存成功!')
|
||||
emit('onsubmit')
|
||||
})
|
||||
} else {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
//选择系统变电站
|
||||
const addForm = JSON.parse(JSON.stringify(form.value))
|
||||
if (form.value.customSubstationFlag == 0) {
|
||||
addForm.substation = addForm.substation.length == 0 ? '' : addForm.substation.join(',')
|
||||
}
|
||||
addForm.saveOrCheckflag = '2'
|
||||
if (title.value == '计划新增') {
|
||||
await addSurveyPlan(addForm).then(res => {
|
||||
cancelFn()
|
||||
ElMessage.success('计划新增成功!')
|
||||
emit('onsubmit')
|
||||
})
|
||||
} else {
|
||||
await updateSurveyPlan(addForm).then(res => {
|
||||
cancelFn()
|
||||
ElMessage.success('重新发起成功!')
|
||||
emit('onsubmit')
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
// 修改关联电站
|
||||
const changeArea = () => {
|
||||
let list: any = []
|
||||
|
||||
treeList.value.forEach((item: any) => {
|
||||
if (item.id == form.value.deptId) {
|
||||
list.push(item)
|
||||
if (item.id != treeListCgy.value[0].id && item.name != '冀北电力有限公司' && item.name != '超高压') {
|
||||
list.push(...treeListCgy.value)
|
||||
}
|
||||
} else {
|
||||
list.push(item.children.filter((v: any) => v.id == form.value.deptId)[0])
|
||||
if (form.value.deptId != treeListCgy.value[0].id) {
|
||||
list.push(...treeListCgy.value)
|
||||
}
|
||||
}
|
||||
})
|
||||
treeData.value = list
|
||||
}
|
||||
const audit = (filePath: any) => {
|
||||
return
|
||||
}
|
||||
// 上传文件
|
||||
// 文件数超出提示
|
||||
const handleExceed: UploadProps['onExceed'] = (): void => {
|
||||
ElMessage.error(`上传文件数量不能超过5个!`)
|
||||
}
|
||||
//移除文件上传
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
}
|
||||
const open = (text: string, id: any) => {
|
||||
loadData()
|
||||
form.value = Object.assign({
|
||||
// orgName: '',
|
||||
deptId: dictData.state.area[0].id,
|
||||
planStartTime: '',
|
||||
planEndTime: '',
|
||||
planName: '',
|
||||
substation: '', //关联电站
|
||||
customSubstationFlag: 0 //电站类型
|
||||
})
|
||||
title.value = text
|
||||
planAddition.value = true
|
||||
setTimeout(() => {
|
||||
key.value += 1
|
||||
}, 10)
|
||||
if (id) {
|
||||
detailById(id)
|
||||
}
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// :deep(.el-upload-list__item-info) {
|
||||
// width: 250px;
|
||||
// }</style>
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef" />
|
||||
<Table ref="tableRef" />
|
||||
<!-- 审核 -->
|
||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import planAdd from './planAdd.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const planAddRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{ field: 'planNo', title: '普测计划编号' },
|
||||
{ field: 'planName', title: '普测计划名称' },
|
||||
{ field: 'planStartTime', title: '开始时间' },
|
||||
{ field: 'planEndTime', title: '结束时间' },
|
||||
{ field: 'subCount', title: '普测变电站数量' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
planAddRef.value.open('计划审核', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="监督类型">
|
||||
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in supvTypeOptionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!-- 新增 -->
|
||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { cancel, getById } from '@/api/process-boot/generalTest'
|
||||
import planAdd from './planAdd.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { deleteSurveyPlan } from '@/api/supervision-boot/delete/index'
|
||||
import { getUserReportById } from "@/api/supervision-boot/interfere";
|
||||
|
||||
const dictData = useDictData()
|
||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const dialogVisible = ref(false)
|
||||
const tableRef = ref()
|
||||
const planAddRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const auditList: any = ref([])
|
||||
const auditUser = ref('')
|
||||
const flag = ref(false)
|
||||
const openType = ref('create')
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'planName',
|
||||
title: '计划名称',
|
||||
minWidth: 130
|
||||
},
|
||||
{
|
||||
field: 'supvType',
|
||||
title: '监督类型',
|
||||
minWidth: 130,
|
||||
formatter: (row: any) => {
|
||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supvObjectName',
|
||||
minWidth: 130,
|
||||
title: '监督对象名称'
|
||||
},
|
||||
{
|
||||
field: 'deptName',
|
||||
minWidth: 130,
|
||||
title: '负责单位'
|
||||
},
|
||||
{
|
||||
field: 'substation',
|
||||
title: '变电站',
|
||||
minWidth: 110,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
|
||||
{ field: 'planStartTime', minWidth: 130, title: '计划开始时间' },
|
||||
{ field: 'planEndTime', minWidth: 130, title: '计划结束时间' },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
render: 'tag',
|
||||
minWidth: 80,
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: '180',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
planAddRef.value.open('编辑', row.id, false)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
// deviceQuitPopup.value.open('重新发起退运', row)
|
||||
planAddRef.value.open('重新发起计划', row.id, false)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.supvType = ''
|
||||
provide('tableStore', tableStore)
|
||||
// 新增计划
|
||||
const add = () => {
|
||||
// title.value = '普测计划新增'
|
||||
planAddRef.value.open('计划新增')
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
const exportFn = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
queryPlan(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '计划', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancel(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
auditUser.value = ''
|
||||
}
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 取消
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
getUserByRoleType(3).then(res => {
|
||||
auditList.value = res.data
|
||||
})
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
nextTick(() => {
|
||||
planAddRef.value.open('重新发起计划', fullId, false)
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -0,0 +1,385 @@
|
||||
<template>
|
||||
<el-dialog draggable :title="title" width="900px" v-model="planAddition" :before-close="cancelFn">
|
||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" class="form-two" scroll-to-error>
|
||||
<el-form-item label="计划负责单位:">
|
||||
<el-input v-model="form.deptName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划名称:" prop="planName">
|
||||
<el-input v-model="form.planName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="监督类型:">
|
||||
<el-input v-model="form.supvType" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="监督对象名称:">
|
||||
<el-input v-model="form.supvObjectName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划开始时间:" prop="planStartTime">
|
||||
<el-input v-model="form.planStartTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划结束时间:" prop="planEndTime">
|
||||
<el-input v-model="form.planEndTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="测试变电站:" prop="subIds" style="display: flex; align-items: center">
|
||||
<el-input v-model="form.substationName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际完成时间:" prop="completeTime">
|
||||
<el-date-picker
|
||||
v-model="form.completeTime"
|
||||
type="date"
|
||||
placeholder="选择实际完成时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="测试负责人:" prop="completeBy">
|
||||
<el-input v-model="form.completeBy" placeholder="请输入测试负责人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="测试是否有问题:" prop="problemFlag">
|
||||
<!-- 默认值 否 -->
|
||||
<el-radio-group v-model="form.problemFlag">
|
||||
<el-radio :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" class="uploadFile" label="技术监督报告:" prop="supervisionReport">
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
v-model:file-list="form.supervisionReport"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="event => choose(event, 'supervisionReport')"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<!-- :on-progress="uploadFileName('supervisionReport')" -->
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" class="uploadFile" label="测试报告:" prop="testReport">
|
||||
<el-upload
|
||||
ref="upload1Ref"
|
||||
v-model:file-list="form.testReport"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed1"
|
||||
:on-change="event => choose(event, 'testReport')"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" class="uploadFile" label="其他报告:">
|
||||
<el-upload
|
||||
ref="upload2Ref"
|
||||
v-model:file-list="form.otherReport"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:on-exceed="handleExceed2"
|
||||
:on-change="event => choose(event, 'otherReport')"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
style="width: 100%"
|
||||
for="-"
|
||||
label="问题描述:"
|
||||
prop="problemDetail"
|
||||
v-if="form.problemFlag == '1'"
|
||||
>
|
||||
<el-input type="textarea" v-model="form.problemDetail" placeholder="请输入问题描述"></el-input>
|
||||
</el-form-item>
|
||||
<!-- </el-form> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancelFn">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="submitFn">确定</el-button> -->
|
||||
<el-button type="primary" @click="submitFn(true)" :loading="loading">保存</el-button>
|
||||
<el-button type="primary" @click="submitFn(false)" :loading="loading" >提交审批</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, inject, nextTick } from 'vue'
|
||||
import { addSurvey, auditSurvey } from '@/api/process-boot/generalTest'
|
||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||
import { ElMessage, genFileId, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
|
||||
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addSurveyTest, updateSurveyTest, getTestById } from '@/api/supervision-boot/survey/test'
|
||||
const loading = ref(false)
|
||||
const acceptType = ref('')
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
let uploadName = ref('')
|
||||
// 上传报告
|
||||
const uploadRef = ref()
|
||||
const upload1Ref = ref()
|
||||
const upload2Ref = ref()
|
||||
const fileList = ref<UploadUserFile[]>([])
|
||||
const emit = defineEmits(['onsubmit'])
|
||||
const dictData = useDictData()
|
||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||
const addFlagRef = ref(true)
|
||||
const title = ref('')
|
||||
const planAddition = ref(false)
|
||||
const form: any = ref({
|
||||
id: '',
|
||||
deptName: '',
|
||||
planStartTime: '',
|
||||
planEndTime: '',
|
||||
planName: '',
|
||||
substationName: '',
|
||||
completeTime: '',
|
||||
completeBy: '',
|
||||
testReport: [],
|
||||
otherReport: [],
|
||||
supervisionReport: [],
|
||||
problemDetail: '', //测试问题
|
||||
problemFlag: 0 //是否有问题
|
||||
})
|
||||
|
||||
/**
|
||||
* addFlag为true,则为填报测试数据,创建新流程
|
||||
* 为false,则为修改测试数据,重新发起流程
|
||||
*/
|
||||
const open = async (text: string, id: string, addFlag: boolean) => {
|
||||
title.value = text
|
||||
formRef.value?.resetFields()
|
||||
addFlagRef.value = addFlag
|
||||
//根据测试id获取数据
|
||||
await getTestById(id).then(res => {
|
||||
//如果是新增,则只需将计划的一些信息回显即可
|
||||
form.value.id = id
|
||||
form.value.deptName = res.data.deptName
|
||||
form.value.planStartTime = res.data.planStartTime
|
||||
form.value.planEndTime = res.data.planEndTime
|
||||
form.value.planName = res.data.planName
|
||||
form.value.supvType = supvTypeOptionList.find(item => {
|
||||
return item.id == res.data.supvType
|
||||
})?.name
|
||||
form.value.supvObjectName = res.data.supvObjectName
|
||||
form.value.substationName = res.data.substationName
|
||||
//部分清空
|
||||
// uploadRef.value?.clearFiles()
|
||||
form.value.completeTime = ''
|
||||
form.value.completeBy = ''
|
||||
form.value.testReport = []
|
||||
form.value.otherReport = []
|
||||
form.value.supervisionReport = []
|
||||
form.value.problemDetail = ''
|
||||
form.value.problemFlag = 0
|
||||
fileList.value = []
|
||||
|
||||
if (!addFlag) {
|
||||
//还需回显上次填报的测试数据 todo...,待重新发起的时候去做
|
||||
form.value = {
|
||||
...form.value,
|
||||
completeTime: res.data.completeTime,
|
||||
completeBy: res.data.completeBy,
|
||||
problemFlag: res.data.problemFlag,
|
||||
testReport:
|
||||
res.data.testReport == null
|
||||
? []
|
||||
: [
|
||||
{
|
||||
name: res.data.testReport.split('/')[2]
|
||||
}
|
||||
],
|
||||
supervisionReport:
|
||||
res.data.supervisionReport == null
|
||||
? []
|
||||
: [
|
||||
{
|
||||
name: res.data.supervisionReport.split('/')[2]
|
||||
}
|
||||
],
|
||||
|
||||
// otherReport:
|
||||
// res.data.otherReport == null
|
||||
// ? []
|
||||
// : [
|
||||
// {
|
||||
// name: res.data.otherReport.split('/')[2]
|
||||
// }
|
||||
// ],
|
||||
|
||||
problemDetail: res.data.problemDetail
|
||||
}
|
||||
form.value.otherReport = []
|
||||
if (res.data.otherReport != null) {
|
||||
for (let i = 0; i < res.data.otherReport.split(',').length - 1; i++) {
|
||||
form.value.otherReport.push({
|
||||
name: res.data.otherReport.split(',')[i]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
testReport.value = res.data.testReport
|
||||
otherReport.value = res.data.otherReport
|
||||
supervisionReport.value = res.data.supervisionReport
|
||||
}
|
||||
})
|
||||
|
||||
planAddition.value = true
|
||||
}
|
||||
|
||||
//处理成效报告
|
||||
const testReport = ref('')
|
||||
const otherReport = ref('')
|
||||
const supervisionReport = ref('')
|
||||
|
||||
const formRef = ref()
|
||||
const rules = {
|
||||
completeTime: [{ required: true, message: '选择实际完成时间 ', trigger: 'change' }],
|
||||
completeBy: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }],
|
||||
testReport: [{ required: true, message: '请上传文件', trigger: 'change' }],
|
||||
otherReport: [{ required: true, message: '请上传文件', trigger: 'change' }],
|
||||
supervisionReport: [{ required: true, message: '请上传文件', trigger: 'change' }],
|
||||
problemFlag: [{ required: true, message: '请选择测试是否有问题', trigger: 'change' }],
|
||||
problemDetail: [{ required: true, message: '请输入测试问题', trigger: 'blur' }]
|
||||
}
|
||||
const cancelFn = () => {
|
||||
formRef.value.resetFields()
|
||||
planAddition.value = false
|
||||
}
|
||||
// 提交
|
||||
const submitFn = async (flag: boolean) => {
|
||||
loading.value = true
|
||||
const subForm = JSON.parse(JSON.stringify(form.value))
|
||||
subForm.otherReport = ''
|
||||
|
||||
if (form.value.otherReport.length > 0) {
|
||||
form.value.otherReport.forEach((item: any) => {
|
||||
// + '/supervision/'
|
||||
subForm.otherReport = subForm.otherReport + item.name + ','
|
||||
})
|
||||
}
|
||||
if (flag) {
|
||||
subForm.testReport = testReport.value
|
||||
subForm.supervisionReport = supervisionReport.value
|
||||
subForm.saveOrCheckflag = '1'
|
||||
|
||||
//新增,则组装业务数据提交后台
|
||||
await addSurveyTest(subForm).then(res => {
|
||||
ElMessage.success('保存成功!')
|
||||
tableStore.index()
|
||||
planAddition.value = false
|
||||
})
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
} else {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (!testReport.value) {
|
||||
return ElMessage({
|
||||
message: '请上传处理成效报告!',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
|
||||
if (!supervisionReport.value) {
|
||||
return ElMessage({
|
||||
message: '请上传技术监督报告!',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
if (valid) {
|
||||
subForm.testReport = testReport.value
|
||||
// subForm.otherReport = otherReport.value
|
||||
subForm.supervisionReport = supervisionReport.value
|
||||
subForm.saveOrCheckflag = '2'
|
||||
if (addFlagRef.value) {
|
||||
//新增,则组装业务数据提交后台
|
||||
await addSurveyTest(subForm).then(res => {
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('申请成功')
|
||||
tableStore.index()
|
||||
planAddition.value = false
|
||||
})
|
||||
} else {
|
||||
await updateSurveyTest(subForm).then(res => {
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('重新申请成功')
|
||||
tableStore.index()
|
||||
planAddition.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
const audit = (filePath: any) => {
|
||||
if (title.value == '计划测试填报') {
|
||||
addSurvey({ ...form.value, filePath: filePath }).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
emit('onsubmit')
|
||||
cancelFn()
|
||||
})
|
||||
} else if (title.value == '重新发起计划') {
|
||||
auditSurvey({ ...form.value, filePath: filePath }).then((res: any) => {
|
||||
ElMessage.success('重新发起计划成功!')
|
||||
emit('onsubmit')
|
||||
cancelFn()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
|
||||
const choose = (e: any, text: string) => {
|
||||
if (text == 'testReport') {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
testReport.value = res.data.name
|
||||
})
|
||||
} else if (text == 'otherReport') {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
otherReport.value = res.data.name
|
||||
})
|
||||
} else {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
supervisionReport.value = res.data.name
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
const handleExceed1: UploadProps['onExceed'] = files => {
|
||||
upload1Ref.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload1Ref.value!.handleStart(file)
|
||||
}
|
||||
const handleExceed2: UploadProps['onExceed'] = files => {
|
||||
upload2Ref.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload2Ref.value!.handleStart(file)
|
||||
}
|
||||
|
||||
//上传报告改变
|
||||
const uploadFileName = val => {
|
||||
uploadName.value = val
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// :deep(.el-upload-list__item-info) {
|
||||
// width: 250px;
|
||||
// }
|
||||
</style>
|
||||
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='监督类型'>
|
||||
<el-select v-model='tableStore.table.params.supvType' clearable placeholder='请选择流程状态'>
|
||||
<el-option v-for='item in supvTypeOptionList' :key='item.id' :label='item.name'
|
||||
:value='item.id'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='流程状态'>
|
||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name'
|
||||
:value='item.id'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
||||
<!-- 新增 -->
|
||||
<planTest ref='planTestRef' @onsubmit='tableStore.index()' />
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { cancelTest } from '@/api/process-boot/generalTest'
|
||||
import planTest from './planTest.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||
|
||||
const { push } = useRouter()
|
||||
const tableRef = ref()
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
const planTestRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const auditList: any = ref([])
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/surveyTest/surveyTestPage',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
||||
{
|
||||
field: 'supvType',
|
||||
title: '监督类型',
|
||||
minWidth: 130,
|
||||
formatter: (row: any) => {
|
||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supvObjectName',
|
||||
minWidth: 130,
|
||||
title: '监督对象名称'
|
||||
},
|
||||
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
||||
{
|
||||
field: 'problemFlag',
|
||||
title: '是否存在问题',
|
||||
minWidth: 120,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'danger',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '合格',
|
||||
1: '存在问题',
|
||||
null: '待测试'
|
||||
}
|
||||
},
|
||||
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
||||
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
render: 'tag',
|
||||
minWidth: 140,
|
||||
custom: {
|
||||
0: 'warning',
|
||||
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 120,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 180,
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '测试填报',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status != 6
|
||||
},
|
||||
click: row => {
|
||||
add(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status == 6 || !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
// planTestRef.value.open('查看计划', row)
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
planTestRef.value.open('编辑', row.id, false)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.supvType = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
// 新增计划
|
||||
const add = (id: string) => {
|
||||
planTestRef.value.open('计划测试填报', id, true)
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
const exportFn = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
queryPlan(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '计划', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelTest(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 取消
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
getUserByRoleType(3).then(res => {
|
||||
auditList.value = res.data
|
||||
})
|
||||
})
|
||||
|
||||
const props = defineProps(['id', 'businessKey'])
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
nextTick(() => {
|
||||
if (props.businessKey == '3') {
|
||||
planTestRef.value.open('编辑', fullId, false)
|
||||
} else {
|
||||
planTestRef.value.open('重新发起计划测试', fullId, false)
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'></style>
|
||||
157
src/views/pqs/supervise_jb/harmonicSurvey/detail.vue
Normal file
157
src/views/pqs/supervise_jb/harmonicSurvey/detail.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- <h1>详细信息回显</h1>-->
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="普测计划名称">
|
||||
{{ detailData?.planName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划负责人">
|
||||
{{ detailData?.leader }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划开始时间">
|
||||
{{ detailData?.planStartTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划结束时间">
|
||||
{{ detailData?.planEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="流程状态">
|
||||
<el-tag :type="getDeviceStatusType(detailData?.status)">
|
||||
{{ getDeviceStatus(detailData?.status) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="文件">
|
||||
<div v-for="(item, index) in aList">
|
||||
<el-icon class="elView" v-if="item?.fileName">
|
||||
<View @click="openFile(item?.fileName)" />
|
||||
</el-icon>
|
||||
<a :href="item.url">
|
||||
{{ item.fileName }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="height: 300px">
|
||||
<vxe-table
|
||||
v-bind="defaultAttribute"
|
||||
ref="vxeRef"
|
||||
class="mt10"
|
||||
height="auto"
|
||||
:data="detailData?.supervisionGeneralSurveyPlanDetailPOS"
|
||||
>
|
||||
<vxe-column field="subName" title="变电站名称"></vxe-column>
|
||||
<vxe-column field="voltageLevel" title="变电站电压等级" :formatter="formatter"></vxe-column>
|
||||
<vxe-column field="measurementPointId" title="在线监测点ID">
|
||||
<template #default="{ row }">{{ row.measurementPointId ? row.measurementPointId : '/' }}</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="isSurvey" title="是否实现监测">
|
||||
<template #default="{ row }">{{ row.isSurvey === 1 ? '是' : '否' }}</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
defineOptions({ name: 'QuitRunningDeviceDetail' })
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { querySurveyDetail } from '@/api/process-boot/generalTest'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
const { query } = useRoute() // 查询参数
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData: any = ref({}) // 详情数据
|
||||
const levelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
const aList: any = ref([]) // 详情数据
|
||||
const queryId = query.id // 从 URL 传递过来的 id 编号
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await querySurveyDetail({ id: props.id || queryId }).then(res => {
|
||||
detailData.value = res.data
|
||||
aList.value = []
|
||||
let arr = res.data.filePath.split(',')
|
||||
|
||||
arr.slice(0, -1).forEach((item: any) => {
|
||||
getFileNameAndFilePath({ filePath: item }).then((res: any) => {
|
||||
aList.value.push(res.data)
|
||||
})
|
||||
})
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
// 下载文件
|
||||
const downloadFile = (url: string, fileName: string) => {
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = fileName
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
const getDeviceStatus = (status: number) => {
|
||||
if (status === 1) {
|
||||
return '审批中'
|
||||
}
|
||||
if (status === 2) {
|
||||
return '审批通过'
|
||||
}
|
||||
if (status === 3) {
|
||||
return '审批不通过'
|
||||
}
|
||||
if (status === 4) {
|
||||
return '已取消'
|
||||
}
|
||||
return '审批通过'
|
||||
}
|
||||
|
||||
const getDeviceStatusType = (status: number) => {
|
||||
if (status === 1) {
|
||||
return 'primary'
|
||||
}
|
||||
if (status === 2) {
|
||||
return 'success'
|
||||
}
|
||||
if (status === 3) {
|
||||
return 'danger'
|
||||
}
|
||||
if (status === 4) {
|
||||
return 'warning'
|
||||
}
|
||||
return 'success'
|
||||
}
|
||||
// 过滤数据
|
||||
const formatter = (row: any) => {
|
||||
if (row.column.field == 'voltageLevel') {
|
||||
return levelList.filter(item => item.id == row.cellValue)[0].name
|
||||
} else {
|
||||
return row.cellValue
|
||||
}
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
||||
60
src/views/pqs/supervise_jb/harmonicSurvey/index.vue
Normal file
60
src/views/pqs/supervise_jb/harmonicSurvey/index.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<el-tab-pane label='技术监督计划管理' name='1'>
|
||||
<plan-manage :id='id' v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='技术监督测试管理' name='2'>
|
||||
<test-manage :id='id' :businessKey='key' v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref } from 'vue'
|
||||
import planManage from './components/planManage.vue'
|
||||
import testManage from './components/testManage.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const id = ref('')
|
||||
const key = ref('')
|
||||
defineOptions({
|
||||
name: 'supervision/harmonicmanagement'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('supervision/harmonicmanagement')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '1') {
|
||||
activeName.value = '1'
|
||||
} else {
|
||||
activeName.value = '2'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
key.value = (route.query.key as string) || 'null'
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
133
src/views/pqs/supervise_jb/harmonicSurvey/plan/detail.vue
Normal file
133
src/views/pqs/supervise_jb/harmonicSurvey/plan/detail.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<el-descriptions :column='2' border>
|
||||
<el-descriptions-item label='技术监督计划名称'>
|
||||
{{ detailData?.planName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='普测负责单位'>
|
||||
{{ detailData?.deptName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='监督类型'>
|
||||
{{
|
||||
supvTypeList.find(item => {
|
||||
return item.id == detailData?.supvType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='监督对象名称'>
|
||||
{{ detailData?.supvObjectName }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label='计划开始时间'>
|
||||
{{ detailData?.planStartTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='计划结束时间'>
|
||||
{{ detailData?.planEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='流程状态'>
|
||||
<el-tag :type='getDeviceStatusType(detailData?.status)'>
|
||||
{{ getDeviceStatus(detailData?.status) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style='height: 300px'>
|
||||
<vxe-table
|
||||
v-bind='defaultAttribute'
|
||||
ref='vxeRef'
|
||||
class='mt10'
|
||||
height='auto'
|
||||
:data='detailData?.surveySubstationList'
|
||||
>
|
||||
<vxe-column field='substationName' title='变电站名称'></vxe-column>
|
||||
<vxe-column field='voltageLevel' title='变电站电压等级'></vxe-column>
|
||||
<vxe-column field='dataSource' title='变电站来源' :formatter='formatterSource'></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
defineOptions({ name: 'QuitRunningDeviceDetail' })
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getPlanById } from '@/api/supervision-boot/survey/plan'
|
||||
const openFile = (name:any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?'+name)
|
||||
}
|
||||
const { query } = useRoute() // 查询参数
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData: any = ref({}) // 详情数据
|
||||
const supvTypeList = dictData.getBasicData('supv_type')
|
||||
const queryId = query.id // 从 URL 传递过来的 id 编号
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getPlanById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const getDeviceStatus = (status: number) => {
|
||||
if (status === 1) {
|
||||
return '审批中'
|
||||
}
|
||||
if (status === 2) {
|
||||
return '审批通过'
|
||||
}
|
||||
if (status === 3) {
|
||||
return '审批不通过'
|
||||
}
|
||||
if (status === 4) {
|
||||
return '已取消'
|
||||
}
|
||||
return '审批通过'
|
||||
}
|
||||
|
||||
const getDeviceStatusType = (status: number) => {
|
||||
if (status === 1) {
|
||||
return 'primary'
|
||||
}
|
||||
if (status === 2) {
|
||||
return 'success'
|
||||
}
|
||||
if (status === 3) {
|
||||
return 'danger'
|
||||
}
|
||||
if (status === 4) {
|
||||
return 'warning'
|
||||
}
|
||||
return 'success'
|
||||
}
|
||||
|
||||
|
||||
const formatterSource = (row: any) => {
|
||||
if (row.column.field == 'dataSource') {
|
||||
if (row.cellValue == 0) {
|
||||
return '系统内台账变电站'
|
||||
} else {
|
||||
return '自定义变电站'
|
||||
}
|
||||
} else {
|
||||
return row.cellValue
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
227
src/views/pqs/supervise_jb/harmonicSurvey/test/detail.vue
Normal file
227
src/views/pqs/supervise_jb/harmonicSurvey/test/detail.vue
Normal file
@@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="技术监督计划名称">
|
||||
{{ detailData?.planName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划负责单位">
|
||||
{{ detailData?.deptName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督类型">
|
||||
{{
|
||||
supvTypeList.find(item => {
|
||||
return item.id == detailData?.supvType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象名称">
|
||||
{{ detailData?.supvObjectName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划开始时间">
|
||||
{{ detailData?.planStartTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划结束时间">
|
||||
{{ detailData?.planEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变电站">
|
||||
{{ detailData?.substationName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变电站电压等级">
|
||||
{{ detailData?.voltageLevel }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变电站来源">
|
||||
{{ detailData?.voltageLevel == '/' ? '自定义变电站' : '系统内台账变电站' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实际完成时间">
|
||||
{{ detailData?.completeTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责人">
|
||||
{{ detailData?.completeBy }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否有问题">
|
||||
<el-tag :type="getProblemFlag(detailData?.problemFlag)">
|
||||
{{ getProblemFlagDetail(detailData?.problemFlag) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="detailData?.problemFlag == 1" :span="2" label="问题描述">
|
||||
{{ detailData?.problemDetail }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="整改意见" v-if="props.flag">
|
||||
{{ detailData.reformAdvice }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="采取的措施" v-if="props.flag">
|
||||
{{ detailData.takeStep }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
|
||||
<el-descriptions-item :span="2" label="技术监督报告">
|
||||
<el-icon class="elView" v-if="detailData?.supervisionReportName">
|
||||
<View @click="openFile(detailData?.supervisionReportName)" />
|
||||
</el-icon>
|
||||
<a :href="detailData.supervisionReport" target="_blank">{{ detailData.supervisionReportName }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="测试报告">
|
||||
<el-icon class="elView" v-if="detailData?.testReportName">
|
||||
<View @click="openFile(detailData?.testReportName)" />
|
||||
</el-icon>
|
||||
<a :href="detailData.testReport" target="_blank">{{ detailData.testReportName }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="其他报告">
|
||||
<div v-for="item in detailData.otherReports">
|
||||
<el-icon class="elView">
|
||||
<View @click="openFile(item.fileName)" />
|
||||
</el-icon>
|
||||
<a :href="item.url" target="_blank">{{ item.fileName }}</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="处理成效报告" v-if="props.flag">
|
||||
<el-icon class="elView " v-if="detailData?.reportName">
|
||||
<View @click="openFile(detailData?.reportName)" />
|
||||
</el-icon>
|
||||
<a :href="detailData.reportPath" target="_blank">{{ detailData.reportName }}</a>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="流程状态" >
|
||||
<el-tag :type="getDeviceStatusType(detailData?.status)">
|
||||
{{ getDeviceStatus(detailData?.status) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const supvTypeList = dictData.getBasicData('supv_type')
|
||||
defineOptions({ name: 'QuitRunningDeviceDetail' })
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { getTestById } from '@/api/supervision-boot/survey/test'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const { query } = useRoute() // 查询参数
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined),
|
||||
flag: propTypes.bool.def(false)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData: any = ref({}) // 详情数据
|
||||
const queryId = query.id // 从 URL 传递过来的 id 编号
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getTestById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
getFileData()
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const getFileData = async () => {
|
||||
detailData.value.otherReports = []
|
||||
await getFileNameAndFilePath({ filePath: detailData.value.testReport }).then(res => {
|
||||
detailData.value.testReport = res.data.url
|
||||
detailData.value.testReportName = res.data.fileName
|
||||
})
|
||||
|
||||
if (detailData.value.otherReport != null) {
|
||||
for (let i = 0; i < detailData.value.otherReport.split(',').length - 1; i++) {
|
||||
await getFileNameAndFilePath({
|
||||
filePath: '/supervision/' + detailData.value.otherReport.split(',')[i]
|
||||
}).then(res => {
|
||||
detailData.value.otherReports.push(res.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
await getFileNameAndFilePath({ filePath: detailData.value.supervisionReport }).then(res => {
|
||||
detailData.value.supervisionReport = res.data.url
|
||||
detailData.value.supervisionReportName = res.data.fileName
|
||||
})
|
||||
if (props.flag) {
|
||||
getFileNameAndFilePath({ filePath: detailData.value.reportPath }).then(res => {
|
||||
detailData.value.reportPath = res.data.url
|
||||
detailData.value.reportName = res.data.fileName
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const getProblemFlagDetail = (status: number) => {
|
||||
if (status === 1) {
|
||||
return '存在问题'
|
||||
}
|
||||
return '合格'
|
||||
}
|
||||
|
||||
const getProblemFlag = (status: number) => {
|
||||
if (status === 1) {
|
||||
return 'danger'
|
||||
}
|
||||
return 'success'
|
||||
}
|
||||
|
||||
const getDeviceStatus = (status: number) => {
|
||||
if (status === 1) {
|
||||
return '审批中'
|
||||
}
|
||||
if (status === 2) {
|
||||
return '审批通过'
|
||||
}
|
||||
if (status === 3) {
|
||||
return '审批不通过'
|
||||
}
|
||||
if (status === 4) {
|
||||
return '已取消'
|
||||
}
|
||||
return '审批通过'
|
||||
}
|
||||
|
||||
const getDeviceStatusType = (status: number) => {
|
||||
if (status === 1) {
|
||||
return 'primary'
|
||||
}
|
||||
if (status === 2) {
|
||||
return 'success'
|
||||
}
|
||||
if (status === 3) {
|
||||
return 'danger'
|
||||
}
|
||||
if (status === 4) {
|
||||
return 'warning'
|
||||
}
|
||||
return 'success'
|
||||
}
|
||||
|
||||
const formatterSource = (row: any) => {
|
||||
if (row.column.field == 'dataSource') {
|
||||
if (row.cellValue == 0) {
|
||||
return '系统内台账变电站'
|
||||
} else {
|
||||
return '自定义变电站'
|
||||
}
|
||||
} else {
|
||||
return row.cellValue
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<!-- 上传 -->
|
||||
<el-dialog draggable :title="title" v-model="uploadConclusions" width="800px" :before-close="cancel">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="addForm"
|
||||
label-width="120px"
|
||||
:rules="rules"
|
||||
:disabled="title == '未建档干扰源用户详情'"
|
||||
>
|
||||
<el-form-item label="所属单位:">
|
||||
<Area v-model="addForm.orgNo" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称:" prop="userName">
|
||||
<el-input v-model="addForm.userName" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源类型:">
|
||||
<el-select v-model="addForm.loadType" clearable collapse-tags placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="建档时间:">
|
||||
<el-input v-model="addForm.recordTime" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">报告在线查看</el-divider>
|
||||
<el-form-item class="item" label="报告:">
|
||||
<el-button type="primary" link @click="download">
|
||||
{{ addForm.ifilePathName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">
|
||||
入网评估结论填报
|
||||
</el-divider>
|
||||
<el-form-item label="是否超标:" style="margin-top: 10px" prop="iIsOverLimit">
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="1" disabled>是</el-radio>
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="0" disabled>否</el-radio>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="超标指标:" style="margin-top: 10px" prop="IOverLimitTarget">
|
||||
<el-checkbox-group v-model="addForm.IOverLimitTarget" disabled>
|
||||
<el-checkbox v-for="(item, ind) in exceeded" :label="item.id">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="计划采取措施:" style="margin-top: 10px" prop="IPlanStep">
|
||||
<el-select v-model="addForm.IPlanStep" placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in takeMeasures"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="入网详情:" style="margin-top: 10px" prop="IDescription">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="addForm.IDescription"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入入网详情"
|
||||
type="textarea"
|
||||
style="width: 500px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
||||
<el-form-item prop="checkComment">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
placeholder="请输入审核意见"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="addForm.checkComment"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="display: flex; justify-content: center; margin-top: 30px" v-if="title != '未建档干扰源用户详情'">
|
||||
<el-button type="primary" class="ml20" @click="submit(1)">通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="submit(0)">不通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { checkLoadTypeUserI, getLoadTypeUserById } from '@/api/process-boot/interference'
|
||||
const dictData = useDictData()
|
||||
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
const takeMeasures = dictData.getBasicData('Plan_Take')
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const uploadConclusions = ref(false)
|
||||
|
||||
const addForm: any = ref({})
|
||||
|
||||
const title = ref('')
|
||||
const rules = {
|
||||
checkComment: [{ required: true, message: '请输入入网详情', trigger: 'blur' }]
|
||||
}
|
||||
const formRef = ref()
|
||||
|
||||
const submit = (flag: any) => {
|
||||
formRef.value?.validate((valid: any) => {
|
||||
if (valid) {
|
||||
checkLoadTypeUserI({
|
||||
checkComment: addForm.value.checkComment,
|
||||
checkPerson: dictData.state.area[0].id,
|
||||
checkResult: flag,
|
||||
id: addForm.value.id
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('操作成功')
|
||||
cancel()
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(addForm.value.ifile)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = addForm.value.ifilePathName
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const cancel = () => {
|
||||
addForm.value.checkComment = ''
|
||||
uploadConclusions.value = false
|
||||
}
|
||||
|
||||
const open = (text: string, row: any) => {
|
||||
title.value = text
|
||||
addForm.value = {}
|
||||
getLoadTypeUserById({ id: row.id }).then((res: any) => {
|
||||
addForm.value = {
|
||||
id: res.data.id,
|
||||
orgNo: res.data.orgNo,
|
||||
loadType: res.data.loadType,
|
||||
userName: res.data.userName,
|
||||
recordTime: res.data.recordTime,
|
||||
iIsOverLimit: res.data.iisOverLimit ? res.data.iisOverLimit : 0,
|
||||
IDescription: res.data.idescription ? res.data.idescription : '',
|
||||
IPlanStep: res.data.iplanStep ? res.data.iplanStep : '',
|
||||
IOverLimitTarget: res.data.ioverLimitTarget ? res.data.ioverLimitTarget.split(',') : [],
|
||||
ifilePathName: res.data.ifilePathName ? res.data.ifilePathName : '',
|
||||
ifile: res.data.ifile
|
||||
}
|
||||
})
|
||||
|
||||
uploadConclusions.value = true
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.userName"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<!-- <template #operation>
|
||||
<el-button icon="el-icon-Stamp" type="primary">审核</el-button>
|
||||
</template> -->
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 审核 -->
|
||||
<Audit ref="AuditRef" @onSubmit="tableStore.index()" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Audit from '../undocumented/audit.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const AuditRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/loadTypeUserManage/getLoadTypeUserList',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型',
|
||||
formatter: row => {
|
||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'recordTime', title: '建档时间' },
|
||||
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
AuditRef.value.open('入网评估报告审核', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
// tableStore.table.params.checkType = 1
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
129
src/views/pqs/supervise_jb/interfere/components/normal.vue
Normal file
129
src/views/pqs/supervise_jb/interfere/components/normal.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.userName"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联干扰源用户">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.relationUserName"
|
||||
clearable
|
||||
placeholder="请选择关联干扰源用户"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否已上传实测">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.aisFileUpload"
|
||||
clearable
|
||||
placeholder="请选择是否已上传实测"
|
||||
>
|
||||
<el-option label="否" value="0" />
|
||||
<el-option label="是" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const istatusList = dictData.getBasicData('On-network_Status')
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型',
|
||||
formatter: row => {
|
||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||
{
|
||||
field: 'istatus',
|
||||
title: '实测报告状态',
|
||||
formatter: row => {
|
||||
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,404 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
:title="titleButton"
|
||||
width="65%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
>
|
||||
<!-- 用户档案录入 新建1 -->
|
||||
<el-form
|
||||
:model="form"
|
||||
:validate-on-rule-change="false"
|
||||
:scroll-to-error="true"
|
||||
ref="ruleFormRef"
|
||||
:rules="rules"
|
||||
label-width="auto"
|
||||
class="form-two"
|
||||
>
|
||||
<el-divider content-position="left">干扰源用户基本信息</el-divider>
|
||||
<el-form-item label="用户性质:" prop="userType">
|
||||
<el-select v-model="form.userType" placeholder="请选择用户性质" :disabled="openType == 'detail'">
|
||||
<el-option
|
||||
v-for="(item, index) in userTypeList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市:" prop="city">
|
||||
<el-select v-model="form.city" clearable placeholder="请选择所在地市" :disabled="openType == 'detail'">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="归口管理部门:" prop="responsibleDepartment">
|
||||
<el-input
|
||||
v-model="form.responsibleDepartment"
|
||||
autocomplete="off"
|
||||
placeholder="请输入归口管理部门"
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称:" prop="projectName">
|
||||
<el-input
|
||||
v-model="form.projectName"
|
||||
autocomplete="off"
|
||||
placeholder="请输入项目名称"
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户状态:" prop="userStatus">
|
||||
<el-select v-model="form.userStatus" placeholder="请选择用户状态" :disabled="openType == 'detail'">
|
||||
<el-option
|
||||
v-for="(item, index) in userStateList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.label != '可研'"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂站名称:" prop="substation">
|
||||
<el-input
|
||||
v-model="form.substation"
|
||||
autocomplete="off"
|
||||
placeholder="请输入厂站名称"
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.userType == '0' || form.userType == '1'" label="电压等级:" prop="voltageLevel">
|
||||
<el-select
|
||||
v-model="form.voltageLevel"
|
||||
placeholder="请选择电压等级"
|
||||
node-key="id"
|
||||
:disabled="openType == 'detail'"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in voltageLevelList"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.userType == '0' || form.userType == '1'"
|
||||
label="预测评估单位:"
|
||||
prop="evaluationDept"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.evaluationDept"
|
||||
placeholder="请选择预测评估单位"
|
||||
:disabled="openType == 'detail'"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in evaluationDeptList"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.userReportSubstationPO" label="是否需要治理:" prop="needGovernance">
|
||||
<el-radio-group v-model="form.userReportSubstationPO.needGovernance" :disabled="openType == 'detail'">
|
||||
<el-radio :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.userReportSubstationPO" label="是否开展背景测试:" prop="backgroundTestPerformed">
|
||||
<el-radio-group
|
||||
v-model="form.userReportSubstationPO.backgroundTestPerformed"
|
||||
:disabled="openType == 'detail'"
|
||||
>
|
||||
<el-radio :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left">
|
||||
{{ bussType == 0 ? '入网设计方案审查报告' : '治理工程验收报告' }}
|
||||
</el-divider>
|
||||
<el-form-item label="填报人:" prop="reporter">
|
||||
<el-input v-model="form.reporter" autocomplete="off" :disabled="true" place-holder="请输入填报人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="填报日期:" prop="reportDate">
|
||||
<el-date-picker
|
||||
:disabled="true"
|
||||
style="width: 100%"
|
||||
v-model="form.reportDate"
|
||||
type="date"
|
||||
placeholder="请选择填报日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报部门:" prop="orgId">
|
||||
<el-input v-model="form.orgId" :disabled="true" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
class="uploadFile"
|
||||
:label="bussType == 0 ? '入网设计方案审查报告:' : '治理工程验收报告:'"
|
||||
prop="goToNetReport"
|
||||
>
|
||||
<el-upload
|
||||
v-model:file-list="form.goToNetReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="confirmForm()">确定</el-button> -->
|
||||
<el-button type="primary" @click="confirmForm(true)" :loading="loading" >保存</el-button>
|
||||
<el-button type="primary" @click="confirmForm(false)" :loading="loading" >提交审批</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, defineProps, defineEmits } from 'vue'
|
||||
import type { UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { submitGoNet } from '@/api/supervision-boot/interfere/index'
|
||||
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
|
||||
|
||||
const props = defineProps({
|
||||
openType: {
|
||||
type: String,
|
||||
default: 'create'
|
||||
},
|
||||
id: {
|
||||
type: String
|
||||
},
|
||||
bussType: {
|
||||
type: Number
|
||||
},
|
||||
titleButton: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
const rules = {
|
||||
goToNetReport: [{ required: true, message: '请上传报告', trigger: 'blur' }]
|
||||
}
|
||||
const loading = ref(false)
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
|
||||
const form: any = ref({})
|
||||
const ruleFormRef: any = ref(null)
|
||||
//字典获取所在地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典预测评估单位
|
||||
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
|
||||
|
||||
//用户性质数组
|
||||
const userTypeList = reactive([
|
||||
{
|
||||
label: '新建电网工程',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '扩建电网工程',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: '新建非线性负荷用户',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
label: '扩建非线性负荷用户',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
label: '新建新能源发电站',
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
label: '扩建新能源发电站',
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
label: '敏感及重要用户',
|
||||
value: 6
|
||||
}
|
||||
])
|
||||
//用户状态数组
|
||||
const userStateList = reactive([
|
||||
{
|
||||
label: '可研',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '建设',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
label: '退运',
|
||||
value: 3
|
||||
}
|
||||
])
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const resetForm = () => {
|
||||
form.value = {
|
||||
reporter: '', //填报人
|
||||
reportDate: new Date(), //填报日期
|
||||
orgId: '', //填报部门
|
||||
goToNetReport: [], //报告
|
||||
userType: 0, //用户性质
|
||||
city: areaOptionList[0].name, //所在地市
|
||||
responsibleDepartment: '', //归口管理部门
|
||||
projectName: '', //项目名称
|
||||
userStatus: userStateList[0].value, //用户状态
|
||||
substation: '', //变电站
|
||||
backgroundTestPerformed: 0, //是否开展背景测试
|
||||
antiInterferenceTest: 0, //是否开展抗扰度测试
|
||||
voltageLevel: voltageLevelList[0].id, //电压等级
|
||||
evaluationDept: evaluationDeptList[0].name //预测评估单位
|
||||
}
|
||||
form.value.reporter = adminInfo.$state.name
|
||||
form.value.orgId = adminInfo.$state.deptName
|
||||
}
|
||||
//初始化数据
|
||||
resetForm()
|
||||
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const getInfo = async (row?: any) => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getUserReportById(props.id).then(res => {
|
||||
form.value = res.data
|
||||
form.value.reporter = adminInfo.$state.name
|
||||
form.value.orgId = adminInfo.$state.deptName
|
||||
form.value.reportDate = new Date()
|
||||
if (row) {
|
||||
goToNetReport.value = row.otherReport
|
||||
form.value.id = row.id
|
||||
form.value.goToNetReport =
|
||||
row.otherReport == null || row.otherReport == ''
|
||||
? []
|
||||
: [
|
||||
{
|
||||
name: row.otherReport.split('/')[2]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const open = (row?: any) => {
|
||||
dialogFormVisible.value = true
|
||||
goToNetReport.value = ''
|
||||
resetForm()
|
||||
getInfo(row)
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
resetForm()
|
||||
dialogFormVisible.value = false
|
||||
}
|
||||
|
||||
// 上传报告
|
||||
const uploadRef = ref()
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
|
||||
//移除文件上传
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
}
|
||||
|
||||
// 治理工程验收报告数组
|
||||
const goToNetReport = ref('')
|
||||
|
||||
const choose = (e: any) => {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
//治理工程验收报告
|
||||
goToNetReport.value = res.data.name
|
||||
})
|
||||
}
|
||||
|
||||
//提交
|
||||
const confirmForm = (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
let data = {
|
||||
type: props.bussType,
|
||||
userReportId: props.id,
|
||||
reportUrl: goToNetReport.value,
|
||||
id: form.value.id || null,
|
||||
saveOrCheckflag: '1'
|
||||
}
|
||||
submitGoNet(data).then((res: any) => {
|
||||
ElMessage({
|
||||
message: '保存成功!',
|
||||
type: 'success'
|
||||
})
|
||||
emits('onSubmit')
|
||||
close()
|
||||
})
|
||||
} else {
|
||||
if (goToNetReport.value == null || goToNetReport.value == '') {
|
||||
return ElMessage({
|
||||
message: props.bussType == 0 ? '请上传入网设计方案审查报告' : '请上传治理工程验收报告',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
let data = {
|
||||
type: props.bussType,
|
||||
userReportId: props.id,
|
||||
reportUrl: goToNetReport.value,
|
||||
id: form.value.id || null,
|
||||
saveOrCheckflag: '2'
|
||||
}
|
||||
submitGoNet(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '新建流程成功',
|
||||
type: 'success'
|
||||
})
|
||||
emits('onSubmit')
|
||||
close()
|
||||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="details_item">
|
||||
<div class="left_title">
|
||||
<slot name="label"></slot>
|
||||
</div>
|
||||
<div class="right_content">
|
||||
<slot name="content"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
onMounted(() => {
|
||||
console.log()
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.details_item {
|
||||
width: 48%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
.left_title {
|
||||
width: 54%;
|
||||
height: 100%;
|
||||
background: #f5f7fa;
|
||||
line-height: 18px;
|
||||
text-align: left;
|
||||
padding: 8px 11px;
|
||||
font-weight: bold;
|
||||
border: 1px solid #eceef5;
|
||||
border-right: 0;
|
||||
color: #606266;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.right_content {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
line-height: 18px;
|
||||
padding: 8px 11px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #eceef5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,611 @@
|
||||
<template>
|
||||
<div class="details">
|
||||
<el-divider content-position="left">干扰源用户信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="工程预期投产日期">
|
||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户性质">
|
||||
{{
|
||||
userTypeList.find(item => {
|
||||
return item.value == detailData.userType
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在地市">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="归口管理部门">
|
||||
{{ detailData.responsibleDepartment }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户状态">
|
||||
{{
|
||||
userStateList.find(item => {
|
||||
return item.value == detailData.userStatus
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变电站">
|
||||
{{ detailData.substation }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称">
|
||||
{{ detailData.projectName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户协议容量" v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.agreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.voltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="非线性终端类型" v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.nonlinearDeviceType ? proviteData.nonlinearDeviceType : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估单位">
|
||||
{{ detailData.evaluationDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估结论">
|
||||
{{ detailData.evaluationConclusion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
:label="
|
||||
detailData.userType == '4' || detailData.userType == '5' ? '非线性设备类型: ' : '非线性负荷类型:'
|
||||
"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.nonlinearLoadType }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否需要治理">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">{{ proviteData.needGovernance == 0 ? '否' : '是' }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开展背景测试">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
||||
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="PCC点" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.pccPoint }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="PCC供电终端容量"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.pccEquipmentCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="基准短路容量"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.baseShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="评估类型" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{
|
||||
evaluationTypeList.find(item => {
|
||||
return item.id == proviteData?.evaluationType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审单位" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.evaluationChekDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="系统最小短路容量"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData?.minShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="用户用电协议容量"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData?.userAgreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="行业" v-if="detailData.userType == 6">
|
||||
{{
|
||||
industryList.find(item => {
|
||||
return item.id == proviteData.industry
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感终端名称" v-if="detailData.userType == 6">
|
||||
{{ proviteData.deviceName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="供电电源数量" v-if="detailData.userType == 6">
|
||||
{{ proviteData.powerSupplyCount }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
|
||||
{{
|
||||
energyQualityIndexList.find(item => {
|
||||
return item.id == proviteData.energyQualityIndex
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="可研报告">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
|
||||
<View @click="openFile(proviteData.feasibilityReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport.url">
|
||||
{{ proviteData.feasibilityReport.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
|
||||
<View @click="openFile(proviteData.feasibilityReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport.url">
|
||||
{{ proviteData.feasibilityReport.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
|
||||
<View @click="openFile(proviteData.feasibilityReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport.url">
|
||||
{{ proviteData.feasibilityReport.name }}
|
||||
</a>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目初步设计说明书">
|
||||
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription.name">
|
||||
<View @click="openFile(proviteData?.preliminaryDesignDescription.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.preliminaryDesignDescription.url">
|
||||
{{ proviteData?.preliminaryDesignDescription.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReport.url">
|
||||
{{ proviteData?.predictionEvaluationReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审意见报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReviewOpinions.url">
|
||||
{{ proviteData?.predictionEvaluationReviewOpinions.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="用户接入变电站主接线示意图"
|
||||
v-if="detailData.userType != 0 && detailData.userType != 1"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram.name">
|
||||
<View @click="openFile(proviteData?.substationMainWiringDiagram.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.substationMainWiringDiagram.url">
|
||||
{{ proviteData?.substationMainWiringDiagram.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.sensitiveDevices.name">
|
||||
<View @click="openFile(proviteData?.sensitiveDevices.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.sensitiveDevices.url">
|
||||
{{ proviteData?.sensitiveDevices.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport.name">
|
||||
<View @click="openFile(proviteData?.antiInterferenceReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.antiInterferenceReport.url">
|
||||
{{ proviteData?.antiInterferenceReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.powerQualityReport.name">
|
||||
<View @click="openFile(proviteData?.powerQualityReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.powerQualityReport.url">
|
||||
{{ proviteData?.powerQualityReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="入网评估报告" v-if="applyTitle == '干扰源用户治理工程验收'">
|
||||
<div v-for="item in netInReportList">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="其他附件" v-if="proviteData?.additionalAttachments.url">
|
||||
<el-icon class="elView" v-if="proviteData?.additionalAttachments.name">
|
||||
<View @click="openFile(proviteData?.additionalAttachments.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.additionalAttachments.url">
|
||||
{{ proviteData?.additionalAttachments.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="left">{{ applyTitle + '填报信息' }}</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ detailData.reporter }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报日期">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报部门">
|
||||
{{ detailData.orgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
:label="applyTitle + '报告'"
|
||||
v-if="proviteData?.otherReport && proviteData?.otherReport.url"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.otherReport.name">
|
||||
<View @click="openFile(proviteData?.otherReport.nam)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.otherReport.url">{{ proviteData?.otherReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive, nextTick } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
|
||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import { userReportGoNetById } from '@/api/supervision-boot/interfere'
|
||||
// import el-descriptions-item from './components/detailsItem.vue'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined),
|
||||
applyTitle: propTypes.string.def(undefined)
|
||||
})
|
||||
const netInReportList: any = ref([])
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
//用户性质数组
|
||||
const userTypeList = reactive([
|
||||
{
|
||||
label: '新建电网工程',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '扩建电网工程',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '新建非线性负荷用户',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '扩建非线性负荷用户',
|
||||
value: '3'
|
||||
},
|
||||
{
|
||||
label: '新建新能源发电站',
|
||||
value: '4'
|
||||
},
|
||||
{
|
||||
label: '扩建新能源发电站',
|
||||
value: '5'
|
||||
},
|
||||
{
|
||||
label: '敏感及重要用户',
|
||||
value: '6'
|
||||
}
|
||||
])
|
||||
//用户状态数组
|
||||
const userStateList = reactive([
|
||||
{
|
||||
label: '可研',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '建设',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '退运',
|
||||
value: '3'
|
||||
}
|
||||
])
|
||||
const dictData = useDictData()
|
||||
//字典获取敏感电能质量指标
|
||||
const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
||||
//字典获取行业类型
|
||||
const industryList = dictData.getBasicData('industry_type_jb')
|
||||
//字典电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典评估类型
|
||||
const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
|
||||
//字典预测评估单位
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
userReportGoNetById({ id: props.id }).then(r => {
|
||||
getUserReportById(r.data.userReportId).then(res => {
|
||||
detailData.value = res.data
|
||||
detailData.value.otherReport = r.data.otherReport
|
||||
getProviteData()
|
||||
})
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
const proviteData = ref()
|
||||
//判断userType选择取用的对象
|
||||
const getProviteData = async () => {
|
||||
if (detailData.value.userType == '0' || detailData.value.userType == '1') {
|
||||
proviteData.value = detailData.value.userReportProjectPO
|
||||
//查询非线性终端类型
|
||||
await getDictTreeById(proviteData.value.nonlinearDeviceType).then(res => {
|
||||
proviteData.value.nonlinearDeviceType = res.data?.name
|
||||
})
|
||||
} else if (
|
||||
detailData.value.userType == '2' ||
|
||||
detailData.value.userType == '3' ||
|
||||
detailData.value.userType == '4' ||
|
||||
detailData.value.userType == '5'
|
||||
) {
|
||||
proviteData.value = detailData.value.userReportSubstationPO
|
||||
//查询非线性负荷类型
|
||||
await getDictTreeById(proviteData.value.nonlinearLoadType).then(res => {
|
||||
proviteData.value.nonlinearLoadType = res.data?.name
|
||||
})
|
||||
} else {
|
||||
proviteData.value = detailData.value.userReportSensitivePO
|
||||
}
|
||||
proviteData.value.otherReport = detailData.value.otherReport
|
||||
//可研报告
|
||||
if (proviteData.value.feasibilityReport) {
|
||||
await getFileNamePath(proviteData.value.feasibilityReport, 'feasibilityReport')
|
||||
}
|
||||
//项目初步设计说明书
|
||||
if (proviteData.value.preliminaryDesignDescription) {
|
||||
await getFileNamePath(proviteData.value.preliminaryDesignDescription, 'preliminaryDesignDescription')
|
||||
}
|
||||
//预测评估报告
|
||||
if (proviteData.value.predictionEvaluationReport) {
|
||||
await getFileNamePath(proviteData.value.predictionEvaluationReport, 'predictionEvaluationReport')
|
||||
}
|
||||
|
||||
//预测评估评审意见报告
|
||||
if (proviteData.value.predictionEvaluationReviewOpinions) {
|
||||
await getFileNamePath(
|
||||
proviteData.value.predictionEvaluationReviewOpinions,
|
||||
'predictionEvaluationReviewOpinions'
|
||||
)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (proviteData.value.substationMainWiringDiagram) {
|
||||
await getFileNamePath(proviteData.value.substationMainWiringDiagram, 'substationMainWiringDiagram')
|
||||
}
|
||||
|
||||
//主要敏感终端清单
|
||||
if (proviteData.value.sensitiveDevices) {
|
||||
await getFileNamePath(proviteData.value.sensitiveDevices, 'sensitiveDevices')
|
||||
}
|
||||
|
||||
//抗扰度测试报告
|
||||
if (proviteData.value.antiInterferenceReport) {
|
||||
await getFileNamePath(proviteData.value.antiInterferenceReport, 'antiInterferenceReport')
|
||||
}
|
||||
|
||||
//背景电能质量测试报告
|
||||
if (proviteData.value.powerQualityReport) {
|
||||
await getFileNamePath(proviteData.value.powerQualityReport, 'powerQualityReport')
|
||||
}
|
||||
|
||||
//其他附件
|
||||
if (proviteData.value.additionalAttachments) {
|
||||
await getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
|
||||
}
|
||||
|
||||
if (proviteData.value.otherReport) {
|
||||
await getFileNamePath(proviteData.value.otherReport, 'otherReport')
|
||||
}
|
||||
|
||||
// 入网评估报告
|
||||
if (detailData.value.netInReport.length > 0 && detailData.value.netInReport[0] != null) {
|
||||
netInReportList.value = []
|
||||
detailData.value.netInReport.forEach((item: any) => {
|
||||
getFileNamePath(item, 'netInReport')
|
||||
})
|
||||
}
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data && res.data.name && res.data.url) {
|
||||
//可研报告
|
||||
if (pathName == 'feasibilityReport' && proviteData.value.feasibilityReport) {
|
||||
proviteData.value.feasibilityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//项目初步设计说明书
|
||||
else if (pathName == 'preliminaryDesignDescription' && proviteData.value.preliminaryDesignDescription) {
|
||||
proviteData.value.preliminaryDesignDescription = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'predictionEvaluationReport' && proviteData.value.predictionEvaluationReport) {
|
||||
proviteData.value.predictionEvaluationReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
else if (
|
||||
pathName == 'predictionEvaluationReviewOpinions' &&
|
||||
proviteData.value.predictionEvaluationReviewOpinions
|
||||
) {
|
||||
proviteData.value.predictionEvaluationReviewOpinions = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'substationMainWiringDiagram' && proviteData.value.substationMainWiringDiagram) {
|
||||
proviteData.value.substationMainWiringDiagram = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感终端清单
|
||||
else if (pathName == 'sensitiveDevices' && proviteData.value.sensitiveDevices) {
|
||||
proviteData.value.sensitiveDevices = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//抗扰度测试报告
|
||||
else if (pathName == 'antiInterferenceReport' && proviteData.value.antiInterferenceReport) {
|
||||
proviteData.value.antiInterferenceReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
else if (pathName == 'powerQualityReport' && proviteData.value.powerQualityReport) {
|
||||
proviteData.value.powerQualityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//其他附件
|
||||
else if (pathName == 'additionalAttachments' && proviteData.value.additionalAttachments) {
|
||||
proviteData.value.additionalAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
|
||||
//其他附件
|
||||
else if (pathName == 'otherReport' && proviteData.value.otherReport) {
|
||||
proviteData.value.otherReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
} else if (pathName == 'netInReport') {
|
||||
netInReportList.value.push({
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
}
|
||||
// .details {
|
||||
// width: 100%;
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
// }
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
:deep(.el-descriptions__label) {
|
||||
width: 20%;
|
||||
}
|
||||
:deep(.el-descriptions__content) {
|
||||
width: 30%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,495 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='项目名称'>
|
||||
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
<el-option
|
||||
v-for='item in areaOptionList'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.name'
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef'/>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
title='干扰源用户详细信息'
|
||||
v-if='dialogVisible'
|
||||
v-model='dialogVisible'
|
||||
width='65%'
|
||||
:append-to-body='true'
|
||||
:close-on-click-modal='false'
|
||||
draggable
|
||||
>
|
||||
<BpmUserReportDetail :id='interId' ref='detailsRef'></BpmUserReportDetail>
|
||||
</el-dialog>
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm
|
||||
ref='addForms'
|
||||
@onSubmit='tableStore.index()'
|
||||
:update='update'
|
||||
:normalizedControl='true'
|
||||
openType='create'
|
||||
></addForm>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
defineOptions({
|
||||
name: 'supervision/interferenceUserTable'
|
||||
})
|
||||
|
||||
import {ref, onMounted, provide, watch} from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import {useDictData} from '@/stores/dictData'
|
||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||
import {getUserReportById, getUserReportByFangAnId} from '@/api/supervision-boot/interfere'
|
||||
import BpmUserReportDetail from '../../components/undocumented/detail.vue'
|
||||
import {useAdminInfo} from '@/stores/adminInfo'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {userReportRenewalCancel} from '@/api/process-boot/generalTest'
|
||||
|
||||
const dictData = useDictData()
|
||||
const flag = ref(false)
|
||||
const areaOptionList = dictData
|
||||
.getBasicData('jibei_area')
|
||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||
const statusSelect = dictData.statusSelect()
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const jb_pl = ref(false)
|
||||
const jb_dky = ref(false)
|
||||
const update = ref(false)
|
||||
const addForms = ref()
|
||||
jb_pl.value =
|
||||
adminInfo.$state.roleCode.filter(item => {
|
||||
return item == 'jb_pl'
|
||||
}).length != 0
|
||||
? true
|
||||
: false
|
||||
jb_dky.value =
|
||||
adminInfo.$state.roleCode.filter(item => {
|
||||
return item == 'jb_dky'
|
||||
}).length != 0
|
||||
? true
|
||||
: false
|
||||
|
||||
const {push, options, currentRoute} = useRouter()
|
||||
const TableHeaderRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getNormalUserPage',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{title: '序号', type: 'seq', width: 80},
|
||||
{field: 'city', title: '所在地市', minWidth: 80},
|
||||
{
|
||||
field: 'substation',
|
||||
title: '厂站名称',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
{field: 'projectName', title: '项目名称', minWidth: 170},
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '可研',
|
||||
1: '建设',
|
||||
2: '运行',
|
||||
3: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '信息更新状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '详细信息',
|
||||
minWidth: 100,
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
update.value = row.status == null ? false : true
|
||||
setTimeout(() => {
|
||||
open(row)
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 300,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
},
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return (
|
||||
row.createBy != adminInfo.$state.id ||
|
||||
!(row.status == 0 || row.status == 2 || row.status == null)
|
||||
)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0 || row.status == 2 || row.status == null)
|
||||
},
|
||||
click: row => {
|
||||
update.value = row.status == null ? false : true
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({title: '重新发起', row: row})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '入网设计方案申请',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return jb_pl.value || jb_dky.value
|
||||
// },
|
||||
click: row => {
|
||||
toFangAn(row, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '治理工程验收申请',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.needGovernance == 0 //&& row.type == true
|
||||
},
|
||||
showDisabled: row => {
|
||||
return row.type == false
|
||||
},
|
||||
click: row => {
|
||||
toFangAn(row, 1)
|
||||
}
|
||||
}
|
||||
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '/',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return !jb_pl.value && !jb_dky.value
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.dataType = 0
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
const dialogVisible = ref(false)
|
||||
const interId = ref()
|
||||
provide('tableStore', tableStore)
|
||||
const detailsRef = ref(null)
|
||||
/** 打开弹窗 */
|
||||
const open = async val => {
|
||||
interId.value = val.id
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await userReportRenewalCancel(data).then(res => {
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
const needGovernance = ref()
|
||||
/** 方案审查 */
|
||||
const toFangAn = (row: any, typeNo: number) => {
|
||||
//查询详情拿到needGovernance
|
||||
/** 获得数据 */
|
||||
getUserReportById(row.id).then(res => {
|
||||
if (res.data.userType == '0' || res.data.userType == '1') {
|
||||
needGovernance.value = res.data.userReportProjectPO?.needGovernance
|
||||
} else if (
|
||||
res.data.userType == '2' ||
|
||||
res.data.userType == '3' ||
|
||||
res.data.userType == '4' ||
|
||||
res.data.userType == '5'
|
||||
) {
|
||||
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
|
||||
} else if (res.data.userType == '6') {
|
||||
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
|
||||
}
|
||||
push({
|
||||
name: 'ProgramReview',
|
||||
query: {
|
||||
id: row.id,
|
||||
type: typeNo,
|
||||
needGovernance: needGovernance.value
|
||||
}
|
||||
})
|
||||
flag.value = true
|
||||
})
|
||||
}
|
||||
|
||||
const toFangAnById = (id: string, typeNo: number) => {
|
||||
//查询详情拿到needGovernance
|
||||
/** 获得数据 */
|
||||
getUserReportByFangAnId(id).then(res => {
|
||||
let userId;
|
||||
if (res.data.userType == '0' || res.data.userType == '1') {
|
||||
userId = res.data.userReportProjectPO?.id
|
||||
needGovernance.value = res.data.userReportProjectPO?.needGovernance
|
||||
} else if (
|
||||
res.data.userType == '2' ||
|
||||
res.data.userType == '3' ||
|
||||
res.data.userType == '4' ||
|
||||
res.data.userType == '5'
|
||||
) {
|
||||
userId = res.data.userReportSubstationPO?.id
|
||||
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
|
||||
} else if (res.data.userType == '6') {
|
||||
userId = res.data.userReportSensitivePO?.id
|
||||
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
|
||||
}
|
||||
push({
|
||||
name: 'ProgramReview',
|
||||
query: {
|
||||
id: userId,
|
||||
fangAnId: id,
|
||||
type: typeNo,
|
||||
needGovernance: needGovernance.value
|
||||
}
|
||||
})
|
||||
flag.value = true
|
||||
})
|
||||
}
|
||||
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
//初始进来时如果有id就直接打开重新发起
|
||||
onMounted(async () => {
|
||||
tableStore.index()
|
||||
})
|
||||
/**
|
||||
* 监听 props.id变了,根据id查询详细数据用户重新发起
|
||||
*/
|
||||
const props = defineProps(['id', 'businessKey'])
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return; // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
// 此处较为复杂,需要判断是更新、入网检测、治理工程验收
|
||||
if (props.businessKey == 'user_go_net') {
|
||||
// 入网检测
|
||||
toFangAnById(fullId, 0)
|
||||
} else if (props.businessKey == 'user_treat_check') {
|
||||
// 治理工程验收
|
||||
toFangAnById(fullId, 1)
|
||||
} else {
|
||||
await getUserReportById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}, {immediate: true})
|
||||
|
||||
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,365 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- <TableHeader ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='用户名称'>
|
||||
<el-input v-model='tableStore.table.params.projectName' clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
<el-option
|
||||
v-for='item in areaOptionList'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.name'
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon='' type='primary' @click='toGoNet()'>{{ titleButton }}</el-button>
|
||||
|
||||
<el-button style='margin-left: 50px' :icon='Back' @click='go(-1)'>返回</el-button>
|
||||
</template>
|
||||
</TableHeader> -->
|
||||
<div class="header_btn">
|
||||
<el-button v-if="bussType == 0 && !(jb_pl || jb_dky)" icon="" type="primary" @click="toGoNet()">
|
||||
{{ titleButton }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="bussType == 1 && needGovernance != '0' && !(jb_pl || jb_dky)"
|
||||
icon=""
|
||||
type="primary"
|
||||
@click="toGoNet()"
|
||||
>
|
||||
{{ titleButton }}
|
||||
</el-button>
|
||||
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
|
||||
</div>
|
||||
<Table ref="tableRef"/>
|
||||
|
||||
<addForm
|
||||
v-if="dialogVisible"
|
||||
ref="addForms"
|
||||
:id="bussId"
|
||||
:bussType="bussType"
|
||||
:title="titleButton1"
|
||||
openType="detail"
|
||||
@onSubmit="tableStore.index()"
|
||||
></addForm>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: 'ProgramReview'
|
||||
})
|
||||
|
||||
import {ref, onMounted, provide, nextTick, onUnmounted} from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import {cancel, userReportGoNetById} from '@/api/supervision-boot/interfere/index'
|
||||
import {useDictData} from '@/stores/dictData'
|
||||
import addForm from './addForm.vue'
|
||||
import {useRouter, useRoute} from 'vue-router'
|
||||
import {Back} from '@element-plus/icons-vue'
|
||||
import {useAdminInfo} from '@/stores/adminInfo'
|
||||
|
||||
const {go, currentRoute, push} = useRouter()
|
||||
const {query} = useRoute() // 查询参数
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {ElMessageBox} from 'element-plus/es'
|
||||
|
||||
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
|
||||
const dictData = useDictData()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const adminInfo = useAdminInfo()
|
||||
const jb_pl = ref(false)
|
||||
const jb_dky = ref(false)
|
||||
jb_pl.value =
|
||||
adminInfo.$state.roleCode.filter(item => {
|
||||
return item == 'jb_pl'
|
||||
}).length != 0
|
||||
? true
|
||||
: false
|
||||
jb_dky.value =
|
||||
adminInfo.$state.roleCode.filter(item => {
|
||||
return item == 'jb_dky'
|
||||
}).length != 0
|
||||
? true
|
||||
: false
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
|
||||
|
||||
method: 'POST',
|
||||
column: [
|
||||
{title: '序号', type: 'seq', width: 80},
|
||||
{field: 'projectName', title: '用户名称', minWidth: 170},
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
{field: 'city', title: '所在地市', minWidth: 80},
|
||||
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '可研',
|
||||
1: '建设',
|
||||
2: '运行',
|
||||
3: '退运'
|
||||
}
|
||||
},
|
||||
{field: 'substation', title: '厂站名称', minWidth: 100},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{field: 'createTime', title: '创建时间', minWidth: 100},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 180,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return !(row.status == 0 || row.status == 3)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0 || row.status == 3)
|
||||
},
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
titleButton1.value = '编辑'
|
||||
setTimeout(() => {
|
||||
addForms.value.open(row)
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
titleButton1.value = '重新发起'
|
||||
setTimeout(() => {
|
||||
addForms.value.open(row)
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.userReportId = bussId.value
|
||||
tableStore.table.params.type = bussType.value
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.projectName = ''
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const bussId = ref()
|
||||
bussId.value = currentRoute.value.query.id
|
||||
|
||||
const bussType = ref()
|
||||
bussType.value = Number(currentRoute.value.query.type)
|
||||
|
||||
const titleButton = ref()
|
||||
const titleButton1 = ref()
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
const handleVisibilityChange = async () => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
// 在这里执行页面回到回到当前页签需要做的事情
|
||||
await tableStore.index()
|
||||
} else if (document.visibilityState === 'hidden') {
|
||||
// 在这里执行页面离开时需要做的事情
|
||||
}
|
||||
}
|
||||
onMounted(async () => {
|
||||
tableStore.index()
|
||||
document.addEventListener('visibilitychange', handleVisibilityChange)
|
||||
if (query.fangAnId) {
|
||||
//根据id查询待编辑的数据
|
||||
await userReportGoNetById({id: query.fangAnId}).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
dialogVisible.value = true
|
||||
titleButton1.value = '重新发起'
|
||||
setTimeout(() => {
|
||||
res.data.id = query.fangAnId
|
||||
addForms.value.open(res.data)
|
||||
}, 0)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('visibilitychange', handleVisibilityChange)
|
||||
})
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancel(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
if (bussType.value === 0) {
|
||||
titleButton.value = '入网设计方案申请'
|
||||
} else {
|
||||
titleButton.value = '治理工程申请'
|
||||
}
|
||||
const addForms = ref()
|
||||
const toGoNet = () => {
|
||||
dialogVisible.value = true
|
||||
if (bussType.value === 0) {
|
||||
titleButton1.value = '入网设计方案申请'
|
||||
} else {
|
||||
titleButton1.value = '治理工程申请'
|
||||
}
|
||||
setTimeout(() => {
|
||||
addForms.value.open()
|
||||
}, 0)
|
||||
}
|
||||
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.header_btn {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
padding: 13px 15px;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
border: 1px solid #dddfe6;
|
||||
}
|
||||
</style>
|
||||
92
src/views/pqs/supervise_jb/interfere/components/report.vue
Normal file
92
src/views/pqs/supervise_jb/interfere/components/report.vue
Normal file
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择干扰源类型"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联干扰源用户">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择关联干扰源用户"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Stamp" type="primary">审核</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const process = [
|
||||
{
|
||||
name: '是',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
name: '否',
|
||||
id: '0'
|
||||
}
|
||||
]
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型'
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||
{ field: 'auploadTime', title: '报告提交评估时间' }
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<!-- 新增 -->
|
||||
<el-dialog draggable title="未建档干扰用户新增" v-model="userAdd" width="500px" :before-close="cancel">
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">基本信息</el-divider>
|
||||
<el-form :inline="true" ref="formRef" :model="addData" label-width="auto" class="form-one" :rules="rules">
|
||||
<el-form-item label="区域:">
|
||||
<Area ref="areaRef" v-model="addData.orgNo" />
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源类型:" prop="loadType">
|
||||
<el-select v-model="addData.loadType" clearable collapse-tags placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="干扰源用户名称:" prop="userName">
|
||||
<el-input v-model="addData.userName" clearable placeholder="请输入关键字"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="建档时间:" prop="recordTime">
|
||||
<el-date-picker
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
v-model="addData.recordTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="display: flex; justify-content: center; margin-top: 30px">
|
||||
<el-button type="primary" class="ml20" @click="config">确定</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { addLoadTypeUser } from '@/api/process-boot/interference'
|
||||
const dictData = useDictData()
|
||||
const userAdd = ref(false)
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const rules = reactive({
|
||||
loadType: [{ required: true, message: '请选择干扰源类型', trigger: 'change' }],
|
||||
userName: [{ required: true, message: '请输入干扰源用户名称', trigger: 'blur' }],
|
||||
recordTime: [{ required: true, message: '请选择建档时间', trigger: 'change' }]
|
||||
})
|
||||
const addData = ref({
|
||||
orgNo: dictData.state.area[0].id,
|
||||
loadType: '',
|
||||
userName: '',
|
||||
recordTime: ''
|
||||
})
|
||||
const formRef = ref()
|
||||
// 新增
|
||||
const config = () => {
|
||||
formRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
addLoadTypeUser(addData.value).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
emit('onSubmit')
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const cancel = () => {
|
||||
formRef.value.resetFields()
|
||||
userAdd.value = false
|
||||
}
|
||||
const open = () => {
|
||||
userAdd.value = true
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<el-form-item label="信息安全检测报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.informationSecurityTestReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'informationSecurityTestReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('informationSecurityTestReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="入网设计方案审查报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.NetReport"
|
||||
ref="NetReportRef"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
@change="choose($event, 'NetReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('NetReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="治理工程验收报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.governReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
@change="choose($event, 'governReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('governReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="验收检验报告单:">
|
||||
<el-upload
|
||||
v-model:file-list="form.acceptanceInspectionReportSingle"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'acceptanceInspectionReportSingle')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('acceptanceInspectionReportSingle', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收检验报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.acceptanceInspectionReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'acceptanceInspectionReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('acceptanceInspectionReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="型式实验报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.typeExperimentReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'typeExperimentReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('typeExperimentReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂检验报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.factoryInspectionReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'factoryInspectionReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('factoryInspectionReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="性能检测报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.performanceTestReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'performanceTestReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('performanceTestReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="主接线图:">
|
||||
<el-upload
|
||||
v-model:file-list="form.mainWiringDiagram"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'mainWiringDiagram')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('mainWiringDiagram', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="试运行报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.runTheReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'runTheReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('runTheReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import type { UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
||||
|
||||
const form: any = ref({
|
||||
NetReport: [], //入网设计方案审查报告:
|
||||
governReport: [], //治理工程验收报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||
acceptanceInspectionReport: [], //验收检验报告:
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
factoryInspectionReport: [], //出厂检验报告:
|
||||
performanceTestReport: [], //性能检测报告
|
||||
mainWiringDiagram: [], //主接线图:
|
||||
runTheReport: [] //试运行报告
|
||||
})
|
||||
|
||||
const formName: any = ref({
|
||||
NetReport: '',
|
||||
governReport: '',
|
||||
informationSecurityTestReport: '',
|
||||
acceptanceInspectionReportSingle: '',
|
||||
acceptanceInspectionReport: '',
|
||||
typeExperimentReport: '',
|
||||
factoryInspectionReport: '',
|
||||
performanceTestReport: '',
|
||||
mainWiringDiagram: '',
|
||||
runTheReport: ''
|
||||
})
|
||||
|
||||
const beforeRemove = (name: any, flag?: string) => {
|
||||
// console.log('🚀 ~ beforeRemove ~ flag:', flag)
|
||||
if (flag == '1') {
|
||||
formName.value[name] = ''
|
||||
}
|
||||
}
|
||||
|
||||
const choose = (e: any, name: string) => {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
formName.value[name] = res.data.name
|
||||
})
|
||||
}
|
||||
|
||||
const submitForm = async (id: string) => {
|
||||
// console.log(form.value)
|
||||
|
||||
let data = []
|
||||
for (let i in form.value) {
|
||||
// form.value.map(item=>item.name)
|
||||
|
||||
if (form.value[i].map(item => item.name).join(',') != '')
|
||||
data.push({
|
||||
supervisionId: id,
|
||||
name: i,
|
||||
url: form.value[i].map(item => item.name).join(','), //formName.value[i],
|
||||
state: 1
|
||||
})
|
||||
}
|
||||
// for (let i in formName.value) {
|
||||
// data.push({
|
||||
// supervisionId: id,
|
||||
// name: i,
|
||||
// url: formName.value[i],
|
||||
// state: 1
|
||||
// })
|
||||
// }
|
||||
|
||||
await addOrUpdateFile(data)
|
||||
}
|
||||
const queryFiles = (id: string) => {
|
||||
reset()
|
||||
getFileById({ id: id }).then(res => {
|
||||
res.data.forEach((item: any) => {
|
||||
if (item.url.length > 0) getFileNamePath(item.url, item.name)
|
||||
})
|
||||
})
|
||||
}
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
let data = val.split(',')
|
||||
for (let i = 0; i < data.length ; i++) {
|
||||
// console.log('🚀 ~ getFileNamePath ~ data:', data[i])
|
||||
|
||||
await getFileNameAndFilePath({ filePath: '/supervision/' + data[i] }).then(res => {
|
||||
res.data.name = res.data.fileName
|
||||
form.value[pathName].push(res.data)
|
||||
// setTimeout(() => {
|
||||
// formName.value[pathName] = res.data.fileName
|
||||
// }, 100)
|
||||
})
|
||||
}
|
||||
}
|
||||
const reset = () => {
|
||||
form.value = {
|
||||
NetReport: [], //入网设计方案审查报告:
|
||||
governReport: [], //治理工程验收报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||
acceptanceInspectionReport: [], //验收检验报告:
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
factoryInspectionReport: [], //出厂检验报告:
|
||||
performanceTestReport: [], //性能检测报告
|
||||
mainWiringDiagram: [], //主接线图:
|
||||
runTheReport: [] //试运行报告
|
||||
}
|
||||
|
||||
formName.value = {
|
||||
NetReport: '',
|
||||
governReport: '',
|
||||
informationSecurityTestReport: '',
|
||||
acceptanceInspectionReportSingle: '',
|
||||
acceptanceInspectionReport: '',
|
||||
typeExperimentReport: '',
|
||||
factoryInspectionReport: '',
|
||||
performanceTestReport: '',
|
||||
mainWiringDiagram: '',
|
||||
runTheReport: ''
|
||||
}
|
||||
}
|
||||
defineExpose({ submitForm, queryFiles ,reset})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-form-item__content > div:first-child {
|
||||
display: flex;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
margin: 0;
|
||||
.el-upload-list__item {
|
||||
height: 25px;
|
||||
}
|
||||
.el-upload-list__item-file-name {
|
||||
width: 150px !important;
|
||||
height: 25px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,279 @@
|
||||
<template>
|
||||
|
||||
<!-- 上传 -->
|
||||
<el-dialog draggable :title="title" v-model="uploadConclusions" width="1500px" :before-close="cancel">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="addForm"
|
||||
label-width="auto"
|
||||
:rules="rules"
|
||||
:disabled="title == '未建档干扰源用户详情' || title == '入网评估报告审核'"
|
||||
>
|
||||
<el-form-item label="所属单位:">
|
||||
<Area v-model="addForm.orgNo" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源类型:">
|
||||
<el-select v-model="addForm.loadType" clearable collapse-tags placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="干扰源用户名称:" prop="userName">
|
||||
<el-input v-model="addForm.userName" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="建档时间:">
|
||||
<el-input v-model="addForm.recordTime" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">
|
||||
入网评估报告上传
|
||||
</el-divider>
|
||||
<el-form label-width="120px">
|
||||
<el-form-item class="item" label="上传文件:">
|
||||
<el-upload
|
||||
v-if="title == '未建档干扰源用户入网报告结论上传'"
|
||||
v-model:file-list="addForm.fileList"
|
||||
ref="upload"
|
||||
action=""
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button type="primary" link @click="download" v-else>
|
||||
{{ addForm.ifilePathName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">
|
||||
入网评估结论填报
|
||||
</el-divider>
|
||||
<el-form-item label="是否超标:" style="margin-top: 10px" prop="iIsOverLimit" @change="changeOverLimit">
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="1">是</el-radio>
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="0">否</el-radio>
|
||||
</el-form-item>
|
||||
<br v-if="show" />
|
||||
<el-form-item label="超标指标:" style="margin-top: 10px" prop="IOverLimitTarget" v-if="show">
|
||||
<el-checkbox-group v-model="addForm.IOverLimitTarget">
|
||||
<el-checkbox v-for="(item, ind) in exceeded" :label="item.id">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br v-if="show" />
|
||||
<el-form-item label="计划采取措施:" style="margin-top: 10px" prop="IPlanStep" v-if="show">
|
||||
<el-select v-model="addForm.IPlanStep" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in takeMeasures"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="入网详情:" style="margin-top: 10px" prop="IDescription">
|
||||
<el-input
|
||||
v-model="addForm.IDescription"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入入网详情"
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="addForm"
|
||||
label-width="auto"
|
||||
ref="form1Ref"
|
||||
style="margin-left: 32px;"
|
||||
:rules="rules"
|
||||
v-if="title == '入网评估报告审核'"
|
||||
>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
||||
<el-form-item label="审核意见:" prop="checkComment">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
placeholder="请输入审核意见"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="addForm.checkComment"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form>
|
||||
<div
|
||||
style="display: flex; justify-content: center; margin-top: 30px"
|
||||
v-if="title != '未建档干扰源用户详情' && title != '入网评估报告审核'"
|
||||
>
|
||||
<el-button type="primary" class="ml20" @click="submit(1)">审核</el-button>
|
||||
<el-button type="primary" class="ml20" @click="submit(2)">保存</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: center; margin-top: 30px" v-if="title == '入网评估报告审核'">
|
||||
<el-button type="primary" class="ml20" @click="audit(1)">通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="audit(0)">不通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { uploadLoadTypeUserI, getLoadTypeUserById, checkLoadTypeUserI } from '@/api/process-boot/interference'
|
||||
const dictData = useDictData()
|
||||
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
const takeMeasures = dictData.getBasicData('Plan_Take')
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const uploadConclusions = ref(false)
|
||||
const show = ref(false)
|
||||
const addForm: any = ref({
|
||||
id: '',
|
||||
orgNo: '',
|
||||
loadType: '',
|
||||
userName: '',
|
||||
recordTime: '',
|
||||
iIsOverLimit: '',
|
||||
IDescription: '',
|
||||
IPlanStep: '',
|
||||
IOverLimitTarget: [],
|
||||
fileList: []
|
||||
})
|
||||
const upload = ref()
|
||||
const title = ref('')
|
||||
const rules = {
|
||||
iIsOverLimit: [{ required: true, message: '请选择是否超标', trigger: 'change' }],
|
||||
IDescription: [{ required: true, message: '请输入入网详情', trigger: 'blur' }],
|
||||
IPlanStep: [{ required: true, message: '请选择计划采取措施', trigger: 'change' }],
|
||||
IOverLimitTarget: [{ required: true, message: '请选择超标指标', trigger: 'change' }],
|
||||
checkComment: [{ required: true, message: '请输入入网详情', trigger: 'blur' }]
|
||||
}
|
||||
const formRef = ref()
|
||||
const form1Ref = ref()
|
||||
|
||||
// 填报 审核
|
||||
const submit = (flag: any) => {
|
||||
formRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
const formData = new FormData()
|
||||
|
||||
addForm.value.fileList.forEach((item: any) => {
|
||||
if (item.raw == undefined) {
|
||||
} else {
|
||||
formData.append('file', item.raw)
|
||||
}
|
||||
})
|
||||
formData.append('id', addForm.value.id)
|
||||
formData.append('IDescription', addForm.value.IDescription)
|
||||
formData.append('iIsOverLimit', addForm.value.iIsOverLimit)
|
||||
formData.append('IPlanStep', addForm.value.IPlanStep)
|
||||
formData.append('IOverLimitTarget', addForm.value.IOverLimitTarget.toString())
|
||||
|
||||
formData.append('status', flag)
|
||||
// 提交
|
||||
uploadLoadTypeUserI(formData).then((res: any) => {
|
||||
ElMessage.success(flag == 1 ? '提交成功!' : '保存成功!')
|
||||
emit('onSubmit')
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 入网审核
|
||||
const audit = (flag: any) => {
|
||||
form1Ref.value?.validate((valid: any) => {
|
||||
if (valid) {
|
||||
checkLoadTypeUserI({
|
||||
checkComment: addForm.value.checkComment,
|
||||
checkPerson: dictData.state.area[0].id,
|
||||
checkResult: flag,
|
||||
id: addForm.value.id
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('操作成功')
|
||||
cancel()
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
upload.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload.value!.handleStart(file)
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(addForm.value.ifile)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = addForm.value.ifilePathName
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const cancel = () => {
|
||||
formRef.value?.resetFields()
|
||||
uploadConclusions.value = false
|
||||
}
|
||||
|
||||
const open = (text: string, row: any) => {
|
||||
title.value = text
|
||||
getLoadTypeUserById({ id: row.id }).then((res: any) => {
|
||||
uploadConclusions.value = true
|
||||
addForm.value = {
|
||||
id: res.data.id,
|
||||
orgNo: res.data.orgNo,
|
||||
loadType: res.data.loadType,
|
||||
userName: res.data.userName,
|
||||
recordTime: res.data.recordTime,
|
||||
iIsOverLimit: res.data.iisOverLimit ? res.data.iisOverLimit : 0,
|
||||
IDescription: res.data.idescription ? res.data.idescription : '',
|
||||
IPlanStep: res.data.iplanStep ? res.data.iplanStep : '',
|
||||
IOverLimitTarget: res.data.ioverLimitTarget ? res.data.ioverLimitTarget.split(',') : [],
|
||||
fileList: res.data.ifilePathName ? [{ name: res.data.ifilePathName, status: 'ready' }] : [],
|
||||
ifilePathName: res.data.ifilePathName ? res.data.ifilePathName : '',
|
||||
ifile: res.data.ifile
|
||||
}
|
||||
res.data.iisOverLimit == 0 ? (show.value = false) : (show.value = true)
|
||||
})
|
||||
}
|
||||
const changeOverLimit = (e: any) => {
|
||||
if (e.target.value == 0) {
|
||||
show.value = false
|
||||
} else {
|
||||
show.value = true
|
||||
}
|
||||
addForm.value.IOverLimitTarget = []
|
||||
addForm.value.IPlanStep = ''
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,861 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ detailData.reporter }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报日期">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报部门">
|
||||
{{ detailData.orgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工程预期投产日期">
|
||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户性质">
|
||||
{{
|
||||
userTypeList.find(item => {
|
||||
return item.value == detailData.userType
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在地市">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="归口管理部门">
|
||||
{{ detailData.responsibleDepartment }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户状态">
|
||||
{{
|
||||
userStateList.find(item => {
|
||||
return item.value == detailData.userStatus
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="厂站名称">
|
||||
{{ detailData.substation }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称">
|
||||
{{ detailData.projectName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.voltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="非线性终端类型" v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.nonlinearDeviceType ? proviteData.nonlinearDeviceType : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估单位">
|
||||
{{ detailData.evaluationDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估结论" :span="2">
|
||||
{{ detailData.evaluationConclusion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
:label="
|
||||
detailData.userType == '4' || detailData.userType == '5' ? '非线性设备类型: ' : '非线性负荷类型:'
|
||||
"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.nonlinearLoadType }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否需要治理">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">{{ proviteData.needGovernance == 0 ? '否' : '是' }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开展背景测试">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="关联终端" v-if="props.openType != 'create'">
|
||||
<span>
|
||||
{{ devIdList[0]?.devName }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联监测点" v-if="props.openType != 'create'">
|
||||
<span>
|
||||
<!-- {{ detailData?.lineId }} -->
|
||||
{{ devIdList[0]?.lineList.filter(item => item.lineId == detailData?.lineId)[0].lineName }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
||||
<span>
|
||||
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="用户协议容量(MVA)"
|
||||
v-if="detailData.userType == 0 || detailData.userType == 1"
|
||||
>
|
||||
{{ proviteData.agreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="PCC供电终端容量(MVA)"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.pccEquipmentCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="基准短路容量(MVA)"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.baseShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="系统最小短路容量(MVA)"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData?.minShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="用户用电协议容量(MVA)"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData?.userAgreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="PCC点" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.pccPoint }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="评估类型" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{
|
||||
evaluationTypeList.find(item => {
|
||||
return item.id == proviteData?.evaluationType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审单位" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.evaluationChekDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="行业" v-if="detailData.userType == 6">
|
||||
{{
|
||||
industryList.find(item => {
|
||||
return item.id == proviteData.industry
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感终端名称" v-if="detailData.userType == 6">
|
||||
{{ proviteData.deviceName }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="供电电源数量" v-if="detailData.userType == 6">-->
|
||||
<!-- {{ proviteData.powerSupplyCount }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="供电电源情况" v-if="detailData.userType == 6">
|
||||
{{
|
||||
powerSupplyInfoOptionList.find(item => {
|
||||
return item.id == proviteData.powerSupplyInfo
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="供电电源" :span="2" v-if="detailData.userType == 6">
|
||||
{{ proviteData.powerSupply }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负荷级别" v-if="detailData.userType == 6">
|
||||
{{
|
||||
loadLevelOptionList.find(item => {
|
||||
return item.id == proviteData.loadLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
|
||||
{{
|
||||
energyQualityIndexList.find(item => {
|
||||
return item.id == proviteData.energyQualityIndex
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="可研报告">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url" rel="nofollow">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目初步设计说明书">
|
||||
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription?.name">
|
||||
<View @click="openFile(proviteData?.preliminaryDesignDescription?.name)" />
|
||||
</el-icon>
|
||||
|
||||
<a target="_blank" :href="proviteData?.preliminaryDesignDescription?.url">
|
||||
{{ proviteData?.preliminaryDesignDescription?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport?.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReport?.url">
|
||||
{{ proviteData?.predictionEvaluationReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审意见报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions?.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReviewOpinions?.url">
|
||||
{{ proviteData?.predictionEvaluationReviewOpinions?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="用户接入变电站主接线示意图"
|
||||
v-if="detailData.userType != 0 && detailData.userType != 1"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram?.name">
|
||||
<View @click="openFile(proviteData?.substationMainWiringDiagram?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.substationMainWiringDiagram?.url">
|
||||
{{ proviteData?.substationMainWiringDiagram?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.sensitiveDevices?.name">
|
||||
<View @click="openFile(proviteData?.sensitiveDevices?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.sensitiveDevices?.url">
|
||||
{{ proviteData?.sensitiveDevices?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport?.name">
|
||||
<View @click="openFile(proviteData?.antiInterferenceReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.antiInterferenceReport?.url">
|
||||
{{ proviteData?.antiInterferenceReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.powerQualityReport?.name">
|
||||
<View @click="openFile(proviteData?.powerQualityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.powerQualityReport?.url">
|
||||
{{ proviteData?.powerQualityReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="其他附件"
|
||||
v-if="proviteData?.additionalAttachments && proviteData?.additionalAttachments?.url"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.additionalAttachments?.name">
|
||||
<View @click="openFile(proviteData?.additionalAttachments?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.additionalAttachments?.url">
|
||||
{{ proviteData?.additionalAttachments?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="入网评估报告">
|
||||
<div v-for="item in netInReportList">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理评估报告">
|
||||
<div v-for="item in governReportList">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="信息安全检测报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.informationSecurityTestReport[0]?.name">
|
||||
<View @click="openFile(form.informationSecurityTestReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.informationSecurityTestReport[0]?.url">
|
||||
{{ form.informationSecurityTestReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="入网设计方案审查报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<div v-for="item in form.NetReport">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理工程验收报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<div v-for="item in form.governReport">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="验收检验报告单" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.acceptanceInspectionReportSingle[0]?.name">
|
||||
<View @click="openFile(form.acceptanceInspectionReportSingle[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.acceptanceInspectionReportSingle[0]?.url">
|
||||
{{ form.acceptanceInspectionReportSingle[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="验收检验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.acceptanceInspectionReport[0]?.name">
|
||||
<View @click="openFile(form.acceptanceInspectionReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.acceptanceInspectionReport[0]?.url">
|
||||
{{ form.acceptanceInspectionReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="型式实验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.typeExperimentReport[0]?.name">
|
||||
<View @click="openFile(form.typeExperimentReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.typeExperimentReport[0]?.url">
|
||||
{{ form.typeExperimentReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出厂检验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.factoryInspectionReport[0]?.name">
|
||||
<View @click="openFile(form.factoryInspectionReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.factoryInspectionReport[0]?.url">
|
||||
{{ form.factoryInspectionReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性能检测报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.performanceTestReport[0]?.name">
|
||||
<View @click="openFile(form.performanceTestReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.performanceTestReport[0]?.url">
|
||||
{{ form.performanceTestReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主接线图" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.mainWiringDiagram[0]?.name">
|
||||
<View @click="openFile(form.mainWiringDiagram[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.mainWiringDiagram[0]?.url">
|
||||
{{ form.mainWiringDiagram[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试运行报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.runTheReport[0]?.name">
|
||||
<View @click="openFile(form.runTheReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.runTheReport[0]?.url">
|
||||
{{ form.runTheReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getUserReportById, getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import PreviewFile from '@/components/PreviewFile/index.vue'
|
||||
import { getByDeptDevLine } from '@/api/supervision-boot/interfere/index'
|
||||
import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined),
|
||||
update: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openType: {
|
||||
type: String,
|
||||
default: 'create'
|
||||
}
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const devIdList = ref([])
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const netInReportList: any = ref([])
|
||||
const governReportList: any = ref([])
|
||||
//用户性质数组
|
||||
const userTypeList = reactive([
|
||||
{
|
||||
label: '新建电网工程',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '扩建电网工程',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '新建非线性负荷用户',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '扩建非线性负荷用户',
|
||||
value: '3'
|
||||
},
|
||||
{
|
||||
label: '新建新能源发电站',
|
||||
value: '4'
|
||||
},
|
||||
{
|
||||
label: '扩建新能源发电站',
|
||||
value: '5'
|
||||
},
|
||||
{
|
||||
label: '敏感及重要用户',
|
||||
value: '6'
|
||||
}
|
||||
])
|
||||
//用户状态数组
|
||||
const userStateList = reactive([
|
||||
{
|
||||
label: '可研',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '建设',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '退运',
|
||||
value: '3'
|
||||
}
|
||||
])
|
||||
const form: any = ref({
|
||||
NetReport: [], //入网设计方案审查报告:
|
||||
governReport: [], //治理工程验收报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||
acceptanceInspectionReport: [], //验收检验报告:
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
factoryInspectionReport: [], //出厂检验报告:
|
||||
performanceTestReport: [], //性能检测报告
|
||||
mainWiringDiagram: [], //主接线图:
|
||||
runTheReport: [] //试运行报告
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//字典获取所在地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典获取敏感电能质量指标
|
||||
const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
||||
//字典获取行业类型
|
||||
const industryList = dictData.getBasicData('industry_type_jb')
|
||||
//字典电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典评估类型
|
||||
const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
|
||||
//字典预测评估单位
|
||||
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
|
||||
const loadLevelOptionList = dictData.getBasicData('load_level')
|
||||
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
if (props.update) {
|
||||
await getUserReportUpdateById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data.userReportMessageJson
|
||||
getProviteData()
|
||||
})
|
||||
} else {
|
||||
await getUserReportById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
getProviteData()
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
if (props.openType == 'sourcesOfInterference') {
|
||||
queryFiles()
|
||||
}
|
||||
}
|
||||
const proviteData = ref()
|
||||
//可研报告
|
||||
const feasibilityReportRef: any = ref(null)
|
||||
//项目初步设计说明书
|
||||
const preliminaryDesignDescriptionRef: any = ref(null)
|
||||
//预测评估报告
|
||||
const predictionEvaluationReportRef: any = ref(null)
|
||||
//预测评估评审意见报告
|
||||
const predictionEvaluationReviewOpinionsRef: any = ref(null)
|
||||
//用户接入变电站主接线示意图
|
||||
const substationMainWiringDiagramRef: any = ref(null)
|
||||
//主要敏感终端清单
|
||||
const sensitiveDevicesRef: any = ref(null)
|
||||
//抗扰度测试报告
|
||||
const antiInterferenceReportRef: any = ref(null)
|
||||
//背景电能质量测试报告
|
||||
const powerQualityReportRef: any = ref(null)
|
||||
//其他附件
|
||||
const additionalAttachmentsRef: any = ref(null)
|
||||
//预览
|
||||
const preview = (val: any, url: any) => {
|
||||
nextTick(() => {
|
||||
//可研报告
|
||||
if (val == 'feasibilityReport') {
|
||||
feasibilityReportRef?.value.open(url)
|
||||
}
|
||||
//项目初步设计说明书
|
||||
if (val == 'preliminaryDesignDescription') {
|
||||
preliminaryDesignDescriptionRef?.value.open(url)
|
||||
}
|
||||
//预测评估报告
|
||||
if (val == 'predictionEvaluationReport') {
|
||||
console.log(url, '9999999')
|
||||
predictionEvaluationReportRef?.value.open(url)
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
if (val == 'predictionEvaluationReviewOpinions') {
|
||||
predictionEvaluationReviewOpinionsRef?.value.open(url)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (val == 'substationMainWiringDiagram') {
|
||||
substationMainWiringDiagramRef?.value.open(url)
|
||||
}
|
||||
//主要敏感终端清单
|
||||
if (val == 'sensitiveDevices') {
|
||||
sensitiveDevicesRef?.value.open(url)
|
||||
}
|
||||
//抗扰度测试报告
|
||||
if (val == 'antiInterferenceReport') {
|
||||
antiInterferenceReportRef?.value.open(url)
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
if (val == 'powerQualityReport') {
|
||||
powerQualityReportRef?.value.open(url)
|
||||
}
|
||||
//其他附件
|
||||
if (val == 'additionalAttachments') {
|
||||
additionalAttachmentsRef?.value.open(url)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const queryFiles = () => {
|
||||
getFileById({ id: props.id }).then(res => {
|
||||
res.data.forEach((item: any) => {
|
||||
if (item.url.length > 0) getFileNamePaths(item.url, item.name)
|
||||
})
|
||||
})
|
||||
}
|
||||
//判断userType选择取用的对象
|
||||
const getProviteData = async () => {
|
||||
if (detailData.value.userType == '0' || detailData.value.userType == '1') {
|
||||
proviteData.value = detailData.value.userReportProjectPO
|
||||
//查询非线性终端类型
|
||||
await getDictTreeById(proviteData.value.nonlinearDeviceType).then(res => {
|
||||
proviteData.value.nonlinearDeviceType = res.data?.name
|
||||
})
|
||||
} else if (
|
||||
detailData.value.userType == '2' ||
|
||||
detailData.value.userType == '3' ||
|
||||
detailData.value.userType == '4' ||
|
||||
detailData.value.userType == '5'
|
||||
) {
|
||||
proviteData.value = detailData.value.userReportSubstationPO
|
||||
//查询非线性负荷类型
|
||||
await getDictTreeById(proviteData.value.nonlinearLoadType).then(res => {
|
||||
proviteData.value.nonlinearLoadType = res.data?.name
|
||||
})
|
||||
} else {
|
||||
proviteData.value = detailData.value.userReportSensitivePO
|
||||
}
|
||||
//可研报告
|
||||
if (proviteData.value.feasibilityReport) {
|
||||
await getFileNamePath(proviteData.value.feasibilityReport, 'feasibilityReport')
|
||||
}
|
||||
//项目初步设计说明书
|
||||
if (proviteData.value.preliminaryDesignDescription) {
|
||||
await getFileNamePath(proviteData.value.preliminaryDesignDescription, 'preliminaryDesignDescription')
|
||||
}
|
||||
//预测评估报告
|
||||
if (proviteData.value.predictionEvaluationReport) {
|
||||
await getFileNamePath(proviteData.value.predictionEvaluationReport, 'predictionEvaluationReport')
|
||||
}
|
||||
|
||||
//预测评估评审意见报告
|
||||
if (proviteData.value.predictionEvaluationReviewOpinions) {
|
||||
await getFileNamePath(
|
||||
proviteData.value.predictionEvaluationReviewOpinions,
|
||||
'predictionEvaluationReviewOpinions'
|
||||
)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (proviteData.value.substationMainWiringDiagram) {
|
||||
await getFileNamePath(proviteData.value.substationMainWiringDiagram, 'substationMainWiringDiagram')
|
||||
}
|
||||
|
||||
//主要敏感终端清单
|
||||
if (proviteData.value.sensitiveDevices) {
|
||||
await getFileNamePath(proviteData.value.sensitiveDevices, 'sensitiveDevices')
|
||||
}
|
||||
|
||||
//抗扰度测试报告
|
||||
if (proviteData.value.antiInterferenceReport) {
|
||||
await getFileNamePath(proviteData.value.antiInterferenceReport, 'antiInterferenceReport')
|
||||
}
|
||||
|
||||
//背景电能质量测试报告
|
||||
if (proviteData.value.powerQualityReport) {
|
||||
await getFileNamePath(proviteData.value.powerQualityReport, 'powerQualityReport')
|
||||
}
|
||||
|
||||
//其他附件
|
||||
if (proviteData.value.additionalAttachments) {
|
||||
getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
|
||||
}
|
||||
|
||||
// 入网评估报告
|
||||
if (detailData.value.netInReport.length > 0) {
|
||||
netInReportList.value = []
|
||||
detailData.value.netInReport.forEach((item: any) => {
|
||||
if (item != null) {
|
||||
getFileNamePath(item, 'netInReport')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 治理评估告"
|
||||
if (detailData.value.governReport.length > 0) {
|
||||
governReportList.value = []
|
||||
detailData.value.governReport.forEach((item: any) => {
|
||||
if (item != null) {
|
||||
getFileNamePath(item, 'governReport')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 调用关联终端接口
|
||||
getByDeptDevLine({ id: detailData.value.orgId }).then(res => {
|
||||
devIdList.value = res.data.filter((item: any) => item.devId == detailData.value.devId)
|
||||
})
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data && res.data.name && res.data.url) {
|
||||
//可研报告
|
||||
if (pathName == 'feasibilityReport' && proviteData.value.feasibilityReport) {
|
||||
proviteData.value.feasibilityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//项目初步设计说明书
|
||||
else if (pathName == 'preliminaryDesignDescription' && proviteData.value.preliminaryDesignDescription) {
|
||||
proviteData.value.preliminaryDesignDescription = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'predictionEvaluationReport' && proviteData.value.predictionEvaluationReport) {
|
||||
proviteData.value.predictionEvaluationReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
else if (
|
||||
pathName == 'predictionEvaluationReviewOpinions' &&
|
||||
proviteData.value.predictionEvaluationReviewOpinions
|
||||
) {
|
||||
proviteData.value.predictionEvaluationReviewOpinions = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'substationMainWiringDiagram' && proviteData.value.substationMainWiringDiagram) {
|
||||
proviteData.value.substationMainWiringDiagram = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感终端清单
|
||||
else if (pathName == 'sensitiveDevices' && proviteData.value.sensitiveDevices) {
|
||||
proviteData.value.sensitiveDevices = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//抗扰度测试报告
|
||||
else if (pathName == 'antiInterferenceReport' && proviteData.value.antiInterferenceReport) {
|
||||
proviteData.value.antiInterferenceReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
else if (pathName == 'powerQualityReport' && proviteData.value.powerQualityReport) {
|
||||
proviteData.value.powerQualityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//其他附件
|
||||
else if (pathName == 'additionalAttachments' && proviteData.value.additionalAttachments) {
|
||||
proviteData.value.additionalAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
|
||||
if (pathName == 'netInReport') {
|
||||
netInReportList.value.push({
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
})
|
||||
} else if (pathName == 'governReport') {
|
||||
governReportList.value.push({
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const getFileNamePaths = async (val: any, pathName: any) => {
|
||||
let data = val.split(',')
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
await getFileNameAndFilePath({ filePath: '/supervision/' + data[i] }).then(res => {
|
||||
res.data.name = res.data.fileName
|
||||
form.value[pathName].push(res.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
watch(
|
||||
() => props.id,
|
||||
(val, oldVal) => {
|
||||
val && getInfo()
|
||||
}
|
||||
)
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
// float: right;
|
||||
}
|
||||
// .el-icon {
|
||||
// float: left;
|
||||
// }
|
||||
// a {
|
||||
// display: block;
|
||||
// width: 200px;
|
||||
// float: right;
|
||||
// }
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,402 @@
|
||||
<template>
|
||||
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='项目名称'>
|
||||
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
<el-option v-for='item in areaOptionList' :key='item.id' :label='item.name' :value='item.name'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='流程状态'>
|
||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name' :value='item.id'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addList">新增</el-button> -->
|
||||
<el-button icon='el-icon-Plus' type='primary' @click='addFormModel'>新增</el-button>
|
||||
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
||||
<!-- 新增 -->
|
||||
<Add ref='addRef' @onSubmit='tableStore.index()' />
|
||||
<!-- 上传 -->
|
||||
<Audit ref='AuditRef' @onSubmit='tableStore.index()' />
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, onMounted, provide, watch, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Add from './add.vue'
|
||||
import Audit from './audit.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData
|
||||
.getBasicData('jibei_area')
|
||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const addRef = ref()
|
||||
const AuditRef = ref()
|
||||
const ruleFormRef = ref()
|
||||
const show: any = ref(false)
|
||||
const fileList = ref([])
|
||||
const flag = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getUserReport',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'city',
|
||||
title: '所在地市',
|
||||
minWidth: 80
|
||||
// formatter: (obj: any) => {
|
||||
// return areaOptionList.filter(item => item.id == obj.row.city)[0]?.name
|
||||
// }
|
||||
},
|
||||
{
|
||||
field: 'substation',
|
||||
title: '厂站名称',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '可研',
|
||||
1: '建设',
|
||||
2: '运行',
|
||||
3: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.fileUploadflag = ''
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.status = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
// 新增
|
||||
const addList = () => {
|
||||
addRef.value.open()
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
show.value = true
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '用户档案录入'
|
||||
})
|
||||
}, 0)
|
||||
}
|
||||
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getLoadTypeUserList(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '未建档非线性用户', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getUserReportById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'></style>
|
||||
62
src/views/pqs/supervise_jb/interfere/index.vue
Normal file
62
src/views/pqs/supervise_jb/interfere/index.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<el-tab-pane label='未建档用户档案录入管理' name='1'>
|
||||
<undocumented ref='Undocumented' :id='id' v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='常态化干扰源用户管理' name='3'>
|
||||
<interferenceUserTable ref='InterferenceUserTable' :id='id' :businessKey="key" v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { nextTick, ref, provide } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import undocumented from './components/undocumented/index.vue'
|
||||
import interferenceUserTable from './components/normalizationManager/interferenceUserTable.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
const Undocumented = ref()
|
||||
const InterferenceUserTable = ref()
|
||||
defineOptions({
|
||||
name: 'supervision/interferencemanagement'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
const id = ref('')
|
||||
const key = ref('')
|
||||
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('supervision/interferencemanagement')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '1') {
|
||||
activeName.value = '1'
|
||||
} else {
|
||||
activeName.value = '3'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
key.value = (route.query.key as string) || 'null'
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
699
src/views/pqs/supervise_jb/plan/components/addForm.vue
Normal file
699
src/views/pqs/supervise_jb/plan/components/addForm.vue
Normal file
@@ -0,0 +1,699 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
:title="title"
|
||||
width="65%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
:close-on-click-modal="false"
|
||||
:lazy="true"
|
||||
draggable
|
||||
custom-class="fixed-dialog"
|
||||
>
|
||||
<el-form
|
||||
:model="form"
|
||||
:validate-on-rule-change="false"
|
||||
:scroll-to-error="true"
|
||||
:rules="rules"
|
||||
ref="ruleFormRef"
|
||||
label-width="auto"
|
||||
class="form-two"
|
||||
>
|
||||
<el-form-item for="-" label="计划名称:" prop="workPlanName">
|
||||
<el-input v-model="form.workPlanName" autocomplete="off" placeholder="请输入计划名称" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督单位:" prop="supvOrgId">
|
||||
<Area ref="areaRef" v-model="form.supvOrgId" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划编制单位:" prop="planOrgId">
|
||||
<Area ref="areaRef" v-model="form.planOrgId" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督类型:" prop="supvType">
|
||||
<el-select v-model="form.supvType" clearable style="width: 100%" placeholder="请选择监督类型">
|
||||
<el-option
|
||||
v-for="item in supvTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督阶段:" prop="supvStage">
|
||||
<el-select v-model="form.supvStage" clearable style="width: 100%" placeholder="请选择监督阶段">
|
||||
<el-option
|
||||
v-for="item in supvStageList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划监督时间:" prop="planSupvDate">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.planSupvDate"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="请选择计划监督时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象类型:" prop="supvObjType">
|
||||
<el-select v-model="form.supvObjType" clearable style="width: 100%" placeholder="请选择监督对象类型">
|
||||
<el-option
|
||||
v-for="item in supvObjTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象名称:" prop="supvObjName">
|
||||
<el-input v-model="form.supvObjName" autocomplete="off" placeholder="请输入监督对象名称" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象电压等级:" prop="objVoltageLevel">
|
||||
<el-select
|
||||
v-model="form.objVoltageLevel"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择监督对象电压等级"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in voltageLevelList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象属性:" prop="objType">
|
||||
<el-select v-model="form.objType" clearable style="width: 100%" placeholder="请选择监督对象属性">
|
||||
<el-option
|
||||
v-for="item in objTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象属性名称:" prop="objTypeName">
|
||||
<el-input v-model="form.objTypeName" autocomplete="off" placeholder="请输入监督对象属性名称" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象协议容量:" prop="objCapacity">
|
||||
<el-input
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')"
|
||||
v-model="form.objCapacity"
|
||||
autocomplete="off"
|
||||
placeholder="请输入监督对象监督对象协议容量"
|
||||
>
|
||||
<template #append>MVA</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象关联电站:" prop="substationName">
|
||||
<el-input v-model="form.substationName" autocomplete="off" placeholder="请输入监督对象关联电站" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象关联电站电压等级:" prop="substationVoltageLevel">
|
||||
<el-select
|
||||
v-model="form.substationVoltageLevel"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择监督对象关联电站电压等级"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in voltageLevelList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="实施状态:" prop="effectStatus">
|
||||
<el-select v-model="form.effectStatus" clearable style="width: 100%" placeholder="请选择实施状态">
|
||||
<el-option
|
||||
v-for="item in effectStatusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="实施人员:">
|
||||
<el-select v-model="form.effectUserId" clearable style="width: 100%" placeholder="请选择实施人员">
|
||||
<el-option
|
||||
v-for="item in effectUserIdList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="开始实施时间:">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.effectStartTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="请选择开始实施时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="结束实施时间:">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.effectEndTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="请选择结束实施时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="报告出具时间:">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.reportIssueTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="请选择报告出具时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="电能质量问题发生时间:">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.problemOcTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="请选择电能质量问题发生时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划状态:">
|
||||
<el-select v-model="form.planStatus" clearable style="width: 100%" placeholder="请选择计划状态">
|
||||
<el-option
|
||||
v-for="item in planStatusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="其他要求:" style="width: 100%">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.otherRemark"
|
||||
autocomplete="off"
|
||||
placeholder="请输入其他要求"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="false"
|
||||
label="盖章报告:"
|
||||
class="uploadFile"
|
||||
prop="informationSecurityTestReport"
|
||||
>
|
||||
<el-upload
|
||||
v-model:file-list="form.informationSecurityTestReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-progress="uploadFileName('informationSecurityTestReport')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="false"
|
||||
label="佐证材料:"
|
||||
class="uploadFile"
|
||||
prop="acceptanceInspectionReportSingle"
|
||||
>
|
||||
<el-upload
|
||||
v-model:file-list="form.acceptanceInspectionReportSingle"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-progress="uploadFileName('acceptanceInspectionReportSingle')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="false"
|
||||
label="计划变更材料:"
|
||||
class="uploadFile"
|
||||
prop="acceptanceInspectionReport"
|
||||
>
|
||||
<el-upload
|
||||
v-model:file-list="form.acceptanceInspectionReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-progress="uploadFileName('acceptanceInspectionReport')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="false"
|
||||
label="告预警单材料:"
|
||||
class="uploadFile"
|
||||
prop="typeExperimentReport"
|
||||
:show-message="false"
|
||||
>
|
||||
<el-upload
|
||||
v-model:file-list="form.typeExperimentReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-progress="uploadFileName('typeExperimentReport')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="false"
|
||||
label="告预警单反馈材料:"
|
||||
class="uploadFile"
|
||||
prop="factoryInspectionReport"
|
||||
>
|
||||
<el-upload
|
||||
v-model:file-list="form.factoryInspectionReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-progress="uploadFileName('factoryInspectionReport')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="false"
|
||||
label="评估报告:"
|
||||
class="uploadFile"
|
||||
prop="performanceTestReport"
|
||||
:show-message="false"
|
||||
>
|
||||
<el-upload
|
||||
v-model:file-list="form.performanceTestReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-progress="uploadFileName('performanceTestReport')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
<el-button type="primary" @click="confirmForm()">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, defineExpose, defineEmits, watch } from 'vue'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import {
|
||||
addPlanFormData,
|
||||
getUserByDeptId,
|
||||
getPlanDetailsById,
|
||||
updatePlanFormData
|
||||
} from '@/api/supervision-boot/plan/index'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const form: any = ref({})
|
||||
const title = ref('')
|
||||
const ruleFormRef = ref(null)
|
||||
// .xls,.xlsx
|
||||
const acceptType = ''
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
//字典获取监督类型
|
||||
const supvTypeList = dictData.getBasicData('supv_type')
|
||||
//字典获取监督阶段
|
||||
const supvStageList = dictData.getBasicData('supv_stage')
|
||||
//字典获取监督对象类型
|
||||
const supvObjTypeList = dictData.getBasicData('supv_obj_type')
|
||||
//字典获取实施状态
|
||||
const effectStatusList = dictData.getBasicData('effect_status')
|
||||
//字典获取计划状态
|
||||
const planStatusList = dictData.getBasicData('plan_status')
|
||||
//字典获取电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//监督对象属性
|
||||
const objTypeList = [
|
||||
{
|
||||
id: '1',
|
||||
name: '在运站'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '新(改、扩)建站'
|
||||
}
|
||||
]
|
||||
const effectUserIdList: any = ref([])
|
||||
//根据当前登陆用户的部门id查询实施人员
|
||||
const getEffectUserList = () => {
|
||||
getUserByDeptId({ deptId: adminInfo.$state.deptId }).then(res => {
|
||||
effectUserIdList.value = res.data
|
||||
})
|
||||
}
|
||||
getEffectUserList()
|
||||
const resetForm = () => {
|
||||
form.value = {
|
||||
workPlanName: '', //计划名称
|
||||
supvOrgId: '', //监督单位
|
||||
planOrgId: '', //计划编制单位
|
||||
supvType: supvTypeList[0].id, //监督类型
|
||||
supvStage: supvStageList[0]?.id, //监督阶段
|
||||
planSupvDate: '', //计划监督时间
|
||||
supvObjType: supvObjTypeList[0]?.id, //监督对象类型
|
||||
supvObjName: '', //监督对象名称
|
||||
objVoltageLevel: voltageLevelList[0].id, // 监督对象电压等级
|
||||
objType: objTypeList[0].id, //监督对象属性
|
||||
objTypeName: '', //监督对象属性名称
|
||||
objCapacity: '0', //监督对象协议容量
|
||||
substationName: '', //监督对象关联电站
|
||||
substationVoltageLevel: voltageLevelList[0].id, // 监督对象关联电站电压等级
|
||||
effectStatus: effectStatusList[0].id, //实施状态
|
||||
effectStartTime: '', //开始实施时间
|
||||
effectEndTime: '', //结束实施时间
|
||||
reportIssueTime: '', //报告出具时间
|
||||
problemOcTime: '', //电能质量问题发生时间
|
||||
effectUserId: effectUserIdList.value[0]?.id, //实施人员
|
||||
planStatus: planStatusList[0].id, //计划状态
|
||||
otherRemark: '', //其他要求
|
||||
planUserId: '' //计划编制人,挡墙登陆用户
|
||||
// sealReport: '', //盖章报告
|
||||
// evidenceMaterials:'', //佐证材料
|
||||
// planChangeMaterials: '', //计划变更材料
|
||||
// alarmMaterials:'', //告预警单材料
|
||||
// alarmFeedbackMaterials: '', //告预警单反馈材料
|
||||
// assessReport:'' //评估报告
|
||||
}
|
||||
}
|
||||
//初始化数据
|
||||
resetForm()
|
||||
//定义校验规则
|
||||
const rules = ref({
|
||||
//基础信息
|
||||
workPlanName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入计划名称',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
supvOrgId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择监督单位',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
planOrgId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择计划编制单位',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
supvType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择监督类型',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
supvStage: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择监督阶段',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
planSupvDate: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择计划监督时间',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
supvObjType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择监督对象类型',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
supvObjName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入监督对象名称',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
objVoltageLevel: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择监督对象电压等级',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
objType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择监督对象属性',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
objTypeName: [
|
||||
{
|
||||
required: false,
|
||||
message: '请输入监督对象属性名称',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
objCapacity: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入监督对象监督对象协议容量',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
substationName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入监督对象关联电站',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
substationVoltageLevel: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择监督对象关联电站电压等级',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
effectStatus: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择实施状态',
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
})
|
||||
watch(
|
||||
() => form.value,
|
||||
(val, oldVal) => {},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
const resendId = ref('')
|
||||
const open = (row: any) => {
|
||||
title.value = row.title
|
||||
dialogFormVisible.value = true
|
||||
if (row.row) {
|
||||
resendId.value = row.row.planId
|
||||
getPlanDetailsById({ id: row.row.planId }).then(res => {
|
||||
form.value = res.data
|
||||
})
|
||||
} else {
|
||||
resendId.value = ''
|
||||
}
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
//取消表单校验状态
|
||||
ruleFormRef.value && ruleFormRef.value.resetFields()
|
||||
dialogFormVisible.value = false
|
||||
emits('onSubmit')
|
||||
resetForm()
|
||||
}
|
||||
onMounted(() => {
|
||||
console.log()
|
||||
})
|
||||
// 上传报告
|
||||
const uploadRef = ref()
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
let uploadName = ref('')
|
||||
//上传报告改变
|
||||
const uploadFileName = val => {
|
||||
uploadName.value = val
|
||||
}
|
||||
// 盖章报告
|
||||
const sealReport = ref('')
|
||||
// 佐证材料
|
||||
const evidenceMaterials = ref('')
|
||||
// 计划变更材料
|
||||
const planChangeMaterials = ref('')
|
||||
//告预警单材料
|
||||
const alarmMaterials = ref('')
|
||||
//告预警单反馈材料
|
||||
const alarmFeedbackMaterials = ref('')
|
||||
//评估报告
|
||||
const assessReport = ref('')
|
||||
const choose = (e: any) => {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
//盖章报告
|
||||
if (uploadName.value == 'sealReport') {
|
||||
sealReport.value = res.data.name
|
||||
}
|
||||
//佐证材料
|
||||
else if (uploadName.value == 'evidenceMaterials') {
|
||||
evidenceMaterials.value = res.data.name
|
||||
}
|
||||
//计划变更材料
|
||||
else if (uploadName.value == 'planChangeMaterials') {
|
||||
planChangeMaterials.value = res.data.name
|
||||
}
|
||||
//告预警单材料
|
||||
else if (uploadName.value == 'alarmMaterials') {
|
||||
alarmMaterials.value = res.data.name
|
||||
}
|
||||
//告预警单反馈材料
|
||||
else if (uploadName.value == 'alarmFeedbackMaterials') {
|
||||
alarmFeedbackMaterials.value = res.data.name
|
||||
}
|
||||
//评估报告
|
||||
else if (uploadName.value == 'assessReport') {
|
||||
assessReport.value = res.data.name
|
||||
}
|
||||
})
|
||||
}
|
||||
//设置监督类型时间选择范围不能<今天
|
||||
const disabledDate = time => {
|
||||
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||
}
|
||||
//提交
|
||||
const confirmForm = () => {
|
||||
// 提交终端信息
|
||||
ruleFormRef.value.validate(valid => {
|
||||
if (valid) {
|
||||
form.value.planUserId = adminInfo.$state.id
|
||||
let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
||||
//提交终端信息
|
||||
// confirmFormData = {
|
||||
// ...confirmFormData,
|
||||
// sealReport: sealReport?.value, //盖章报告
|
||||
// evidenceMaterials: evidenceMaterials.value, //佐证材料
|
||||
// planChangeMaterials: planChangeMaterials.value, //计划变更材料
|
||||
// alarmMaterials: alarmMaterials.value, //告预警单材料
|
||||
// alarmFeedbackMaterials: alarmFeedbackMaterials.value, //告预警单反馈材料
|
||||
// assessReport: assessReport.value //评估报告
|
||||
// }
|
||||
if (title.value == '技术监督计划') {
|
||||
addPlanFormData(confirmFormData).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
message: '新建技术监督计划成功',
|
||||
type: 'success'
|
||||
})
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
close()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log(confirmFormData)
|
||||
confirmFormData.id = resendId.value
|
||||
confirmFormData.planSupvDate = confirmFormData.planSupvDate.replace('T', ' ')
|
||||
updatePlanFormData(confirmFormData).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
message: '重新发起成功',
|
||||
type: 'success'
|
||||
})
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
close()
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log('表单验证失败')
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
314
src/views/pqs/supervise_jb/plan/components/detail.vue
Normal file
314
src/views/pqs/supervise_jb/plan/components/detail.vue
Normal file
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="计划名称">
|
||||
{{ detailData.workPlanName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督单位">
|
||||
{{ detailData.supvOrgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划编制单位">
|
||||
{{ detailData.planOrgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督类型">
|
||||
{{
|
||||
supvTypeList.find(item => {
|
||||
return item.id == detailData.supvType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督阶段">
|
||||
{{
|
||||
supvStageList.find(item => {
|
||||
return item.id == detailData.supvStage
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划监督时间">
|
||||
{{ formatDate(detailData.planSupvDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<!--文件地址-->
|
||||
<el-descriptions-item label="监督对象类型" v-if="detailData.lineFilePath">
|
||||
{{
|
||||
supvTypeList.find(item => {
|
||||
return item.id == detailData.supvObjType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象名称">
|
||||
{{ detailData.supvObjName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.objVoltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象属性">
|
||||
{{
|
||||
objTypeList.find(item => {
|
||||
return item.id == detailData.objType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象属性名称">
|
||||
{{ detailData.objTypeName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象协议容量(MVA)">
|
||||
{{ detailData.objCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象关联电站">
|
||||
{{ detailData.substationName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象关联电站电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.substationVoltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实施状态">
|
||||
{{
|
||||
effectStatusList.find(item => {
|
||||
return item.id == detailData.effectStatus
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开始实施时间">
|
||||
{{ detailData.effectStartTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="结束实施时间">
|
||||
{{ detailData.effectEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报告出具时间">
|
||||
{{ detailData.reportIssueTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电能质量问题发生时间">
|
||||
{{ detailData.problemOcTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实施人员">
|
||||
{{
|
||||
effectUserIdList.find(item => {
|
||||
return item.id == detailData.effectUserId
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划状态">
|
||||
{{
|
||||
planStatusList.find(item => {
|
||||
return item.id == detailData.planStatus
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其他要求">
|
||||
{{ detailData.otherRemark }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="盖章报告" v-if="detailData.factoryInspectionReport">
|
||||
<el-icon class="elView" v-if="detailData?.factoryInspectionReport.name">
|
||||
<View @click="openFile(detailData?.factoryInspectionReport.name)" />
|
||||
</el-icon>
|
||||
<a :href="detailData?.factoryInspectionReport.url">
|
||||
{{ detailData?.factoryInspectionReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="佐证材料" v-if="detailData?.informationSecurityTestReport">
|
||||
<el-icon class="elView" v-if="detailData?.informationSecurityTestReport.name">
|
||||
<View @click="openFile(detailData?.informationSecurityTestReport.name)" />
|
||||
</el-icon>
|
||||
<a :href="detailData?.informationSecurityTestReport.url">
|
||||
{{ detailData?.informationSecurityTestReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划变更材料" v-if="detailData?.otherAttachments">
|
||||
<el-icon class="elView" v-if="detailData?.otherAttachments.name">
|
||||
<View @click="openFile(detailData?.otherAttachments.name)" />
|
||||
</el-icon>
|
||||
<a :href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="告预警单材料" v-if="detailData?.performanceTestReport">
|
||||
<el-icon class="elView" v-if="detailData?.performanceTestReport.name">
|
||||
<View @click="openFile(detailData?.performanceTestReport.name)" />
|
||||
</el-icon>
|
||||
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="告预警单反馈材料" v-if="detailData?.typeExperimentReport">
|
||||
<el-icon class="elView" v-if="detailData?.typeExperimentReport.name">
|
||||
<View @click="openFile(detailData?.typeExperimentReport.name)" />
|
||||
</el-icon>
|
||||
<a :href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="评估报告" v-if="detailData?.performanceTestReport">
|
||||
<el-icon class="elView" v-if="detailData?.performanceTestReport.name">
|
||||
<View @click="openFile(detailData?.performanceTestReport.name)" />
|
||||
</el-icon>
|
||||
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { getUserByDeptId, getPlanDetailsById } from '@/api/supervision-boot/plan/index'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
const { query } = useRoute() // 查询参数
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
console.log(propTypes.string.def(undefined), '999999999999传参')
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
const dictData = useDictData()
|
||||
//字典获取监督类型
|
||||
const supvTypeList = dictData.getBasicData('supv_type')
|
||||
//字典获取监督阶段
|
||||
const supvStageList = dictData.getBasicData('supv_stage')
|
||||
//字典获取实施状态
|
||||
const effectStatusList = dictData.getBasicData('effect_status')
|
||||
//字典获取计划状态
|
||||
const planStatusList = dictData.getBasicData('plan_status')
|
||||
//监督对象类型
|
||||
const objTypeList = [
|
||||
{
|
||||
id: '1',
|
||||
name: '在运站'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '新(改、扩)建站'
|
||||
}
|
||||
]
|
||||
//字典获取监测点电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
//根据当前登陆用户的部门id查询实施人员
|
||||
const effectUserIdList = ref([])
|
||||
const getEffectUserList = () => {
|
||||
getUserByDeptId({ deptId: adminInfo.$state.deptId }).then(res => {
|
||||
effectUserIdList.value = res.data
|
||||
})
|
||||
}
|
||||
getEffectUserList()
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
console.log(props.id, queryId, '流程详情内部的id')
|
||||
try {
|
||||
await getPlanDetailsById({ id: props.id || queryId }).then(res => {
|
||||
detailData.value = res.data
|
||||
getFileName()
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
const getFileName = async () => {
|
||||
//验收检验报告
|
||||
if (detailData.value.acceptanceInspectionReport) {
|
||||
await getFileNamePath(detailData.value.acceptanceInspectionReport, 'acceptanceInspectionReport')
|
||||
}
|
||||
//验收检验报告单
|
||||
if (detailData.value.acceptanceInspectionReportSingle) {
|
||||
await getFileNamePath(detailData.value.acceptanceInspectionReportSingle, 'acceptanceInspectionReportSingle')
|
||||
}
|
||||
//出厂检验报告
|
||||
if (detailData.value.factoryInspectionReport) {
|
||||
await getFileNamePath(detailData.value.factoryInspectionReport, 'factoryInspectionReport')
|
||||
}
|
||||
//信息安全检测报告
|
||||
if (detailData.value.informationSecurityTestReport) {
|
||||
await getFileNamePath(detailData.value.informationSecurityTestReport, 'informationSecurityTestReport')
|
||||
}
|
||||
//监测点台账信息
|
||||
if (detailData.value.lineFilePath) {
|
||||
await getFileNamePath(detailData.value.lineFilePath, 'lineFilePath')
|
||||
}
|
||||
//其他附件
|
||||
if (detailData.value.otherAttachments) {
|
||||
await getFileNamePath(detailData.value.otherAttachments, 'otherAttachments')
|
||||
}
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data) {
|
||||
//可研报告
|
||||
if (pathName == 'acceptanceInspectionReport' && detailData.value.acceptanceInspectionReport) {
|
||||
detailData.value.acceptanceInspectionReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//终端台账信息
|
||||
else if (
|
||||
pathName == 'acceptanceInspectionReportSingle' &&
|
||||
detailData.value.acceptanceInspectionReportSingle
|
||||
) {
|
||||
detailData.value.acceptanceInspectionReportSingle = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'factoryInspectionReport' && detailData.value.factoryInspectionReport) {
|
||||
detailData.value.factoryInspectionReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
else if (pathName == 'informationSecurityTestReport' && detailData.value.informationSecurityTestReport) {
|
||||
detailData.value.informationSecurityTestReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'lineFilePath' && detailData.value.lineFilePath) {
|
||||
detailData.value.lineFilePath = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感终端清单
|
||||
else if (pathName == 'otherAttachments' && detailData.value.otherAttachments) {
|
||||
detailData.value.otherAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.default-main {
|
||||
// height: calc(100vh - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
}
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,415 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
:title="title"
|
||||
width="60%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
:close-on-click-modal="false"
|
||||
:lazy="true"
|
||||
draggable
|
||||
custom-class="fixed-dialog"
|
||||
>
|
||||
<el-form
|
||||
:model="form"
|
||||
:validate-on-rule-change="false"
|
||||
:scroll-to-error="true"
|
||||
:rules="rules"
|
||||
ref="ruleFormRef"
|
||||
:disabled="openType != 'add'"
|
||||
label-width="auto"
|
||||
class="form-two"
|
||||
>
|
||||
<el-form-item for="-" label="责任单位:" prop="dutyOrgId">
|
||||
<Area ref="areaRef" v-model="form.dutyOrgId" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监测点类型:" prop="monitorType">
|
||||
<el-select v-model="form.monitorType" clearable style="width: 100%" placeholder="请选择监测点类型">
|
||||
<el-option
|
||||
v-for="item in monitorTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="是否发布预警:" prop="ifReleaseWarning">
|
||||
<el-select
|
||||
v-model="form.ifReleaseWarning"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择是否发布预警"
|
||||
>
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划整改时间:" prop="planRectificationTime">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.planRectificationTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="请选择计划整改时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="整改情况:" prop="rectificationStatus">
|
||||
<el-select
|
||||
v-model="form.rectificationStatus"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择整改情况"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in rectificationStatusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="整改时间:" prop="rectificationTime">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.rectificationTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="请选择整改时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督标准:" prop="supvStandard">
|
||||
<el-input v-model="form.supvStandard" autocomplete="off" placeholder="请输入监督标准" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督标准序号:" prop="supvStandardSort">
|
||||
<el-input v-model="form.supvStandardSort" autocomplete="off" placeholder="请输入监督标准序号" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="标准出处:" prop="supvResouce">
|
||||
<el-input v-model="form.supvResouce" autocomplete="off" placeholder="请输入标准出处" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="问题等级:" prop="problemLevel">
|
||||
<el-select v-model="form.problemLevel" clearable style="width: 100%" placeholder="请选择问题等级">
|
||||
<el-option
|
||||
v-for="item in problemLevelList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="问题类型:" prop="problemType">
|
||||
<el-select v-model="form.problemType" clearable style="width: 100%" placeholder="请选择问题类型">
|
||||
<el-option
|
||||
v-for="item in problemTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="问题发现时间:" prop="discoveryTime">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="form.discoveryTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
placeholder="问题发现时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="定级依据:" prop="problemLevelReason" style="width:100%;">
|
||||
<el-input type="textarea" v-model="form.problemLevelReason" autocomplete="off" placeholder="请输入定级依据" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="问题简要描述:" prop="simpleProblemDesc" style="width:100%;">
|
||||
<el-input type="textarea" v-model="form.simpleProblemDesc" autocomplete="off" placeholder="请输入问题简要描述" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="问题描述:" prop="problemDesc" style="width:100%;">
|
||||
<el-input type="textarea" v-model="form.problemDesc" autocomplete="off" placeholder="请输入问题描述" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="整改方案:" prop="rectificationProgramme" style="width:100%;">
|
||||
<el-input type="textarea" v-model="form.rectificationProgramme" autocomplete="off" placeholder="请输入整改方案" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="整改措施:" prop="rectificationMeasure" style="width:100%;">
|
||||
<el-input type="textarea" v-model="form.rectificationMeasure" autocomplete="off" placeholder="请输入整改措施" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="备注:" style="width:100%;">
|
||||
<el-input type="textarea" v-model="form.remark" autocomplete="off" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer v-if="openType != 'detail'">
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
<el-button type="primary" @click="confirmForm()">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { addPlanFormData, getUserByDeptId, addPlanProblemFormData } from '@/api/supervision-boot/plan/index'
|
||||
import { getAreaList } from '@/api/common'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const props = defineProps({
|
||||
planId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const form: any = ref({})
|
||||
const title: any = ref('')
|
||||
const ruleFormRef = ref(null)
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
//字典获取监测点类型
|
||||
const monitorTypeList = dictData.getBasicData('monitor_type')
|
||||
//字典获取问题类型
|
||||
const problemTypeList = dictData.getBasicData('problem_type')
|
||||
//字典整改情况
|
||||
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
||||
//字典问题等级
|
||||
const problemLevelList = dictData.getBasicData('problem_level_type')
|
||||
const resetForm = () => {
|
||||
form.value = {
|
||||
discoveryTime: '', //问题发现时间
|
||||
dutyOrgId: '', // 责任单位id,取ISC平台上的组织id
|
||||
ifReleaseWarning: '0', // 是否发布预告警
|
||||
monitorType: '', //监测点类型 ,仅供电电压监督计划必填
|
||||
orderBy: '',
|
||||
pageNum: 0,
|
||||
pageSize: 0,
|
||||
planId: '', //关联计划表id
|
||||
planRectificationTime: '', //计划整改时间
|
||||
problemDesc: '', // 问题描述
|
||||
problemLevel: '', // 问题等级
|
||||
problemLevelReason: '', // 定级依据
|
||||
problemType: '', //问题类型
|
||||
rectificationMeasure: '', // 整改措施
|
||||
rectificationProgramme: '', // 整改方案
|
||||
rectificationStatus: '', // 整改情况
|
||||
rectificationTime: '', //整改时间
|
||||
remark: '', // 备注
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
searchState: 0,
|
||||
searchValue: '',
|
||||
simpleProblemDesc: '', // 问题简要描述
|
||||
sortBy: '',
|
||||
supvResouce: '', // 标准出处
|
||||
supvStandard: '', // 监督标准
|
||||
supvStandardSort: '' // 监督标准序号
|
||||
}
|
||||
}
|
||||
//初始化数据
|
||||
resetForm()
|
||||
//定义校验规则
|
||||
const rules = ref({
|
||||
discoveryTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择问题发现时间',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
dutyOrgId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择责任单位',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
ifReleaseWarning: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择是否发布预警',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
monitorType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择监测点类型',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
planRectificationTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择计划整改时间',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
problemDesc: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入问题描述',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
problemLevel: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择问题等级',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
problemLevelReason: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入定级依据',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
problemType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择问题类型',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
rectificationMeasure: [
|
||||
{
|
||||
required: false,
|
||||
message: '请输入整改措施',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
rectificationProgramme: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入整改方案',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
rectificationStatus: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择整改情况',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
rectificationTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择整改时间',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
remark: [
|
||||
{
|
||||
required: false,
|
||||
message: '请输入备注',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
simpleProblemDesc: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入问题简要描述',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
supvResouce: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入标准出处',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
supvStandard: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入监督标准',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
supvStandardSort: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入监督标准序号',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
})
|
||||
watch(
|
||||
() => form.value,
|
||||
(val, oldVal) => {},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
const openType: any = ref('')
|
||||
const open = (row: any, val: any) => {
|
||||
//详情(后面做编辑,再修改判断条件)
|
||||
if (val == 'detail') {
|
||||
for (let key in row) {
|
||||
if (form.value.hasOwnProperty(key)) {
|
||||
form.value[key] = row[key] // 对相同的key进行赋值
|
||||
}
|
||||
}
|
||||
title.value = '技术计划监督实施问题详情'
|
||||
openType.value = 'detail'
|
||||
}
|
||||
//新增
|
||||
else if (val == 'add') {
|
||||
title.value = '技术计划监督实施问题新增'
|
||||
openType.value = 'add'
|
||||
nextTick(() => {
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
})
|
||||
}
|
||||
dialogFormVisible.value = true
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
//取消表单校验状态
|
||||
ruleFormRef.value && ruleFormRef.value.resetFields()
|
||||
dialogFormVisible.value = false
|
||||
emits('onSubmit')
|
||||
resetForm()
|
||||
}
|
||||
onMounted(() => {
|
||||
console.log()
|
||||
})
|
||||
//设置监督类型时间选择范围不能<今天
|
||||
const disabledDate = time => {
|
||||
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||
}
|
||||
//提交
|
||||
const confirmForm = () => {
|
||||
// 提交实施问题
|
||||
ruleFormRef.value.validate(valid => {
|
||||
if (valid) {
|
||||
form.value.planId = props.planId
|
||||
let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
||||
addPlanProblemFormData(confirmFormData).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
message: '新增实施问题成功',
|
||||
type: 'success'
|
||||
})
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
close()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('表单验证失败')
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
@@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- <el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
title="技术监督计划实施问题"
|
||||
width="90%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
custom-class="fixed-dialog"
|
||||
@closed="close"
|
||||
> -->
|
||||
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
||||
<!-- <template #select>
|
||||
<el-form-item label="用户名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRefs" />
|
||||
<!-- </el-dialog> -->
|
||||
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
||||
import { getAreaList } from '@/api/common'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
defineOptions({
|
||||
name: 'PlanEffectProblem'
|
||||
})
|
||||
const emits = defineEmits([''])
|
||||
const props = defineProps({
|
||||
effectProblemForm: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const planId: any = ref('')
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const tableRefs = ref()
|
||||
//字典获取问题类型
|
||||
const problemTypeList = dictData.getBasicData('problem_type')
|
||||
//字典整改情况
|
||||
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
||||
//字典问题等级
|
||||
const problemLevelList = dictData.getBasicData('problem_level_type')
|
||||
const effectTableStore = new TableStore({
|
||||
url: '/supervision-boot/superProblem/pageProblem',
|
||||
// publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{
|
||||
field: 'problemDesc',
|
||||
title: '问题描述',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemLevel',
|
||||
title: '问题等级',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemLevelReason',
|
||||
title: '定级依据',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemType',
|
||||
title: '问题类型',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
||||
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
||||
{
|
||||
field: 'rectificationStatus',
|
||||
title: '整改情况',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'rectificationTime',
|
||||
title: '整改时间',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue.replace('T', ' ')
|
||||
}
|
||||
},
|
||||
{ field: 'remark', title: '备注', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleDetail(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '修改',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return true
|
||||
},
|
||||
click: row => {
|
||||
handleEdit(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
const { query } = useRoute() // 查询参数
|
||||
const { go } = useRouter() // 路由
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
planId.value = queryId
|
||||
watch(
|
||||
() => queryId,
|
||||
(val, oldVal) => {
|
||||
if (val) {
|
||||
effectTableStore.table.params.planId = val
|
||||
effectTableStore.index()
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
provide('tableStore', effectTableStore)
|
||||
const open = () => {
|
||||
dialogFormVisible.value = true
|
||||
}
|
||||
const close = () => {
|
||||
dialogFormVisible.value = false
|
||||
// emits('onSubmit')
|
||||
}
|
||||
//新增
|
||||
const addFormRef = ref()
|
||||
const addFormModel = () => {
|
||||
addFormRef.value.open({}, 'add')
|
||||
}
|
||||
//详情
|
||||
const handleDetail = (row: any) => {
|
||||
addFormRef.value.open(row, 'detail')
|
||||
}
|
||||
//修改
|
||||
const handleEdit = (row: any) => {
|
||||
console.log(row)
|
||||
}
|
||||
onMounted(() => {})
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
389
src/views/pqs/supervise_jb/plan/index.vue
Normal file
389
src/views/pqs/supervise_jb/plan/index.vue
Normal file
@@ -0,0 +1,389 @@
|
||||
<!---技术监督计划-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增弹框 -->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||
<!-- 实施问题弹框 -->
|
||||
<effectProblem
|
||||
ref="effectProblemList"
|
||||
@onSubmit="tableStore.index()"
|
||||
:effectProblemForm="effectProblemForm"
|
||||
></effectProblem>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
import addForm from './components/addForm.vue'
|
||||
import effectProblem from './components/effectProblem/index.vue'
|
||||
import { planDetailsAudit, sendAlarm } from '@/api/supervision-boot/plan/index'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { cancelPlanFormData } from '@/api/supervision-boot/plan/index'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'plan'
|
||||
})
|
||||
const flag = ref(false)
|
||||
// const layout = mainHeight(120) as any
|
||||
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const router = useRouter() // 路由对象
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
//字典获取监督类型
|
||||
const supvTypeList = dictData.getBasicData('supv_type')
|
||||
//字典获取监督阶段
|
||||
const supvStageList = dictData.getBasicData('supv_stage')
|
||||
//字典获取监督对象类型
|
||||
const supvObjTypeList = dictData.getBasicData('supv_obj_type')
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/superPlan/pagePlan',
|
||||
// publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{
|
||||
field: 'province',
|
||||
title: '所属省份',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'city',
|
||||
title: '所在地市',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'county',
|
||||
title: '所属县区',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supvOrgName',
|
||||
title: '监督单位',
|
||||
minWidth: 170
|
||||
},
|
||||
{ field: 'workPlanName', title: '计划名称', minWidth: 170 },
|
||||
{
|
||||
field: 'planSupvDate',
|
||||
title: '计划监督时间',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue.replace('T', ' ')
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supvType',
|
||||
title: '监督类型',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return supvTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supvStage',
|
||||
title: '监督阶段',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return supvStageList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supvObjType',
|
||||
title: '监督对象类型',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return supvObjTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'objType',
|
||||
title: '监督对象属性',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == '1' ? '在运站' : '新(改、扩)建站'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 300,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleDetails(row.processInstanceId, row.historyInstanceId)
|
||||
},
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '实施问题',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
||||
},
|
||||
click: row => {
|
||||
handleEffectProblem(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '提交审核',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
// return row.createBy != adminInfo.$state.id || row.status != 1 || !row.processInstanceId
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '发起告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.isUploadHead == 1
|
||||
},
|
||||
click: row => {
|
||||
handleAlarmForm(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.isUploadHead == 0
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
query: {
|
||||
type: 1
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
// tableStore.table.params.loadType = ''
|
||||
// tableStore.table.params.userName = ''
|
||||
// tableStore.table.params.fileUploadflag = ''
|
||||
provide('tableStore', tableStore)
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '技术监督计划'
|
||||
})
|
||||
}, 0)
|
||||
}
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getLoadTypeUserList(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '未建档非线性用户', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
//
|
||||
const handleDetails = (id: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: id,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
const handleAudit = (row: any) => {
|
||||
planDetailsAudit({ id: row.planId }).then(res => {
|
||||
ElMessage.success('提交审核成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
//发起告警单
|
||||
const handleAlarmForm = (row: any) => {
|
||||
sendAlarm({ id: row.planId }).then(res => {
|
||||
ElMessage.success('发起告警单成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.planId,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelPlanFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
// 实施问题按钮
|
||||
const effectProblemList = ref()
|
||||
const effectProblemForm: any = ref({})
|
||||
const handleEffectProblem = (row: any) => {
|
||||
// effectProblemForm.value = row
|
||||
// effectProblemList.value.open()
|
||||
push({
|
||||
name: 'PlanEffectProblem',
|
||||
query: {
|
||||
id: row.planId
|
||||
}
|
||||
})
|
||||
}
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
163
src/views/pqs/supervise_jb/retire/components/equipment.vue
Normal file
163
src/views/pqs/supervise_jb/retire/components/equipment.vue
Normal file
@@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<el-form :inline="true" ref="formRef" :model="addData" label-width="auto" class="form-one" :rules="rules">
|
||||
<el-form-item label="区域:">
|
||||
<Area ref="areaRef" v-model="addData.orgNo" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="终端编号:" prop="assetNumber">
|
||||
<el-input v-model="addData.assetNumber" clearable placeholder="请输入关键字"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="资产编号:" prop="devNumber">-->
|
||||
<!-- <el-input v-model="addData.devNumber" clearable placeholder="请输入关键字"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item class="item" label="报告:" style="margin-top: 10px" prop="fileList">-->
|
||||
<!-- <el-upload-->
|
||||
<!-- v-model:file-list="addData.fileList"-->
|
||||
<!-- ref="upload"-->
|
||||
<!-- action=""-->
|
||||
<!-- :limit="1"-->
|
||||
<!-- :on-exceed="handleExceed"-->
|
||||
<!-- :auto-upload="false"-->
|
||||
<!-- >-->
|
||||
<!-- <template #trigger>-->
|
||||
<!-- <el-button type="primary">上传文件</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-upload>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="选择审核人:" prop="checker">-->
|
||||
<!-- <el-select v-model="addData.checker" clearable placeholder="请选择审核人">-->
|
||||
<!-- <el-option v-for="item in auditList" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { uploadFile, addFlow, update } from '@/api/process-boot/retire'
|
||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||
import { UploadProps, UploadRawFile, genFileId, ElMessage } from 'element-plus'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const rules = reactive({
|
||||
assetNumber: [{ required: true, message: '请输入终端编号', trigger: 'blur' }],
|
||||
devNumber: [{ required: true, message: '请输入资产编号', trigger: 'blur' }],
|
||||
|
||||
checker: [{ required: true, message: '请选择审核人', trigger: 'change' }],
|
||||
fileList: [{ required: true, message: '请选择文件', trigger: 'change' }]
|
||||
})
|
||||
const title: any = ref('')
|
||||
const auditList: any = ref([])
|
||||
|
||||
const addData: any = ref({
|
||||
orgNo: dictData.state.area[0].id,
|
||||
assetNumber: '',
|
||||
devNumber: '',
|
||||
fileList: [],
|
||||
checker: '',
|
||||
applyType: 4,
|
||||
type: 5
|
||||
})
|
||||
const formRef = ref()
|
||||
// 新增
|
||||
const config = () => {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
if (title.value == '新增终端退役申请单') {
|
||||
let form = new FormData()
|
||||
form.append('file', addData.value.fileList[0].raw)
|
||||
await uploadFile(form).then((res: any) => {
|
||||
addData.value.fileName = res.data.minFileName
|
||||
addData.value.filePath = res.data.minFileUrl
|
||||
})
|
||||
addData.value.applicationFormText = JSON.stringify({
|
||||
assetNumber: addData.value.assetNumber,
|
||||
devNumber: addData.value.devNumber
|
||||
})
|
||||
addData.value.operate = 1
|
||||
addData.value.checkerName = auditList.value.find((item: any) => item.id == addData.value.checker).name
|
||||
addFlow(addData.value).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
cancel()
|
||||
})
|
||||
} else if (title.value == '编辑终端退役申请单') {
|
||||
if (addData.value.fileList[0].raw != undefined) {
|
||||
let form = new FormData()
|
||||
form.append('file', addData.value.fileList[0].raw)
|
||||
await uploadFile(form).then((res: any) => {
|
||||
addData.value.fileName = res.data.minFileName
|
||||
addData.value.filePath = res.data.minFileUrl
|
||||
})
|
||||
}
|
||||
addData.value.applicationFormText = JSON.stringify({
|
||||
assetNumber: addData.value.assetNumber,
|
||||
devNumber: addData.value.devNumber
|
||||
})
|
||||
addData.value.operate = 1
|
||||
addData.value.checkerName = auditList.value.find((item: any) => item.id == addData.value.checker).name
|
||||
update(addData.value).then((res: any) => {
|
||||
ElMessage.success('修改成功!')
|
||||
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 审核
|
||||
const audit = () => {}
|
||||
// 重置
|
||||
const cancel = () => {
|
||||
formRef.value.resetFields()
|
||||
emit('onSubmit')
|
||||
}
|
||||
const open = (text: string, row?: any) => {
|
||||
if (row) {
|
||||
addData.value = JSON.parse(JSON.stringify(row))
|
||||
addData.value.assetNumber = row.applyForm.assetNumber
|
||||
addData.value.devNumber = row.applyForm.devNumber
|
||||
addData.value.fileList = [{ name: row.fileName, url: row.filePath }]
|
||||
} else {
|
||||
addData.value = {
|
||||
orgNo: dictData.state.area[0].id,
|
||||
assetNumber: '',
|
||||
devNumber: '',
|
||||
fileList: [],
|
||||
checker: '',
|
||||
applyType: 4,
|
||||
type: 5
|
||||
}
|
||||
}
|
||||
formRef.value.resetFields()
|
||||
title.value = text
|
||||
}
|
||||
|
||||
// 取消
|
||||
onMounted(() => {
|
||||
getUserByRoleType(3).then(res => {
|
||||
auditList.value = res.data
|
||||
})
|
||||
})
|
||||
const upload = ref()
|
||||
|
||||
// 上传
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
upload.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload.value!.handleStart(file)
|
||||
}
|
||||
|
||||
defineExpose({ open, config, audit })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
117
src/views/pqs/supervise_jb/retire/detail.vue
Normal file
117
src/views/pqs/supervise_jb/retire/detail.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<!--工作流view的路径:/pqs/supervise/retire/detail-->
|
||||
<div class='default-main'>
|
||||
<!-- <h1>详细信息回显</h1>-->
|
||||
<el-descriptions :column='2' border>
|
||||
<el-descriptions-item label='供电公司'>
|
||||
{{ detailData.gdName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='变电站'>
|
||||
{{ detailData.subName }}
|
||||
</el-descriptions-item>
|
||||
<template v-if='detailData.deviceType == 1'>
|
||||
<el-descriptions-item label='终端终端' :span='2'>
|
||||
{{ detailData.deviceName }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item label='母线'>
|
||||
{{ detailData.volName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='监测点'>
|
||||
{{ detailData.deviceName }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<!-- <el-descriptions-item label='当前状态'>-->
|
||||
<!-- <el-tag :type='getDeviceStatusType(detailData.deviceStatus)'>-->
|
||||
<!-- {{ getDeviceStatus(detailData.deviceStatus) }}-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label='变更前状态'>
|
||||
<el-tag :type='getDeviceStatusType(detailData.devOriginalStatus)'>
|
||||
{{ getDeviceStatus(detailData.devOriginalStatus) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='目标状态'>
|
||||
<el-tag :type='getDeviceStatusType(detailData.devStatus)'>
|
||||
{{ getDeviceStatus(detailData.devStatus) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span='2' label='变更原因'>
|
||||
{{ detailData.propertyNo }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
|
||||
defineOptions({ name: 'QuitRunningDeviceDetail' })
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref({}) // 详情数据
|
||||
const queryId = query.id// 从 URL 传递过来的 id 编号
|
||||
const getDeviceStatus = (status: number) => {
|
||||
if (status === 0) {
|
||||
return '运行'
|
||||
}
|
||||
if (status === 1) {
|
||||
return '检修'
|
||||
}
|
||||
if (status === 2) {
|
||||
return '停运'
|
||||
}
|
||||
if (status === 3) {
|
||||
return '调试'
|
||||
}
|
||||
if (status === 4) {
|
||||
return '退运'
|
||||
}
|
||||
return '运行'
|
||||
}
|
||||
|
||||
const getDeviceStatusType = (status: number) => {
|
||||
if (status === 0) {
|
||||
return 'success'
|
||||
}
|
||||
if (status === 1) {
|
||||
return 'warning'
|
||||
}
|
||||
if (status === 2) {
|
||||
return 'danger'
|
||||
}
|
||||
if (status === 3) {
|
||||
return 'warning'
|
||||
}
|
||||
if (status === 4) {
|
||||
return 'info'
|
||||
}
|
||||
return 'success'
|
||||
}
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getRunningDeviceById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
|
||||
</script>
|
||||
258
src/views/pqs/supervise_jb/retire/deviceQuitPopup.vue
Normal file
258
src/views/pqs/supervise_jb/retire/deviceQuitPopup.vue
Normal file
@@ -0,0 +1,258 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" width="450px" top="20vh">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form-item label="终端" prop="deviceId">
|
||||
<el-tree-select
|
||||
v-model="form.deviceId"
|
||||
:data="data"
|
||||
filterable
|
||||
:filter-node-method="filterNode"
|
||||
style="width: 100%"
|
||||
@change="changeDevStatus"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端当前状态:">
|
||||
<el-select v-model="runFlag" disabled placeholder="请选择终端" clearable class="select">
|
||||
<el-option
|
||||
v-for="item in devStatusList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="变更状态:" prop="devStatus">
|
||||
<el-select v-model="form.devStatus" placeholder="请选择终端状态" clearable class="select">
|
||||
<el-option
|
||||
v-for="item in devStatuData"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="变更原因" prop="propertyNo">
|
||||
<el-input
|
||||
type="textarea"
|
||||
clearable
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入变更原因"
|
||||
v-model="form.propertyNo"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
|
||||
<el-button type="primary" @click="submit(true)" :loading="loading" >保存</el-button>
|
||||
<el-button type="primary" @click="submit(false)" :loading="loading" >提交审批</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||
import { getTerminalSelectTree } from '@/api/device-boot/Business'
|
||||
import { addRunningDevice, quitRunningDeviceUpdate } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { getDeviceDetailData } from '@/api/device-boot/line'
|
||||
import { defaultProps } from '@/utils/tree'
|
||||
const devStatusList = ref([
|
||||
{ name: '运行', value: '0' },
|
||||
{ name: '检修', value: '1' },
|
||||
{ name: '退运', value: '4' }
|
||||
])
|
||||
//下拉数据源
|
||||
const sourceData = ref()
|
||||
const deviceList = ref()
|
||||
const data = ref()
|
||||
const title = ref('')
|
||||
const loading = ref(false)
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
const devStatuData: any = ref([])
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const runFlag = ref('')
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = ref({
|
||||
id: '',
|
||||
deviceId: '',
|
||||
deviceType: '1',
|
||||
devOriginalStatus: '0',
|
||||
devStatus: '',
|
||||
propertyNo: '',
|
||||
saveOrCheckflag: ''
|
||||
})
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
deviceId: [{ required: true, message: '终端不能为空', trigger: 'change' }],
|
||||
devStatus: [{ required: true, message: '请选择状态', trigger: 'change' }],
|
||||
propertyNo: [{ required: true, message: '请输入退役原因', trigger: 'blur' }]
|
||||
}
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
const filterNode = (value: string, data: any, node: any) => {
|
||||
if (!value) return true
|
||||
|
||||
if (data.label) {
|
||||
return chooseNode(value, data, node)
|
||||
}
|
||||
}
|
||||
|
||||
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。label是中文字符,enlabel是英文字符.
|
||||
const chooseNode = (value: string, data: any, node: any) => {
|
||||
if (data.label.indexOf(value) !== -1) {
|
||||
return true
|
||||
}
|
||||
const level = node.level
|
||||
// 如果传入的节点本身就是一级节点就不用校验了
|
||||
if (level === 1) {
|
||||
return false
|
||||
}
|
||||
// 先取当前节点的父节点
|
||||
let parentData = node.parent
|
||||
// 遍历当前节点的父节点
|
||||
let index = 0
|
||||
while (index < level - 1) {
|
||||
// 如果匹配到直接返回,此处label值是中文字符,enlabel是英文字符。判断匹配中英文过滤
|
||||
if (parentData.data.label.indexOf(value) !== -1) {
|
||||
return true
|
||||
}
|
||||
// 否则的话再往上一层做匹配
|
||||
parentData = parentData.parent
|
||||
index++
|
||||
}
|
||||
// 没匹配到返回false
|
||||
return false
|
||||
}
|
||||
|
||||
const open = async (text: string, tempData?: any) => {
|
||||
title.value = text
|
||||
//终端
|
||||
await getTerminalSelectTree(4).then(res => {
|
||||
deviceList.value = res.data
|
||||
})
|
||||
sourceData.value = deviceList.value
|
||||
data.value = deviceList.value
|
||||
if (tempData) {
|
||||
// 表单赋值
|
||||
for (let key in form.value) {
|
||||
form.value[key] = tempData[key]
|
||||
}
|
||||
form.value.deviceType = form.value.deviceType + ''
|
||||
changeDevStatus(form.value.deviceId, true)
|
||||
form.value.devStatus = tempData.devStatus != null ? tempData.devStatus + '' : ''
|
||||
} else {
|
||||
resetForm()
|
||||
// 在此处恢复默认表单
|
||||
for (let key in form.value) {
|
||||
form.value[key] = ''
|
||||
}
|
||||
runFlag.value = ''
|
||||
form.value.deviceType = '1'
|
||||
}
|
||||
form.value.deviceType = '1'
|
||||
|
||||
// changeType(form.value.deviceType)
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit =async (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
form.value.saveOrCheckflag = '1'
|
||||
|
||||
await addRunningDevice(form.value).then(res => {
|
||||
ElMessage.success('保存成功!')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
})
|
||||
} else {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
form.value.saveOrCheckflag = '2'
|
||||
if (form.value.devOriginalStatus == form.value.devStatus) {
|
||||
if (form.value.devOriginalStatus == '0') {
|
||||
ElMessage.warning('终端当前状态就是运行,无需变更!')
|
||||
} else if (form.value.devOriginalStatus == '1') {
|
||||
ElMessage.warning('终端当前状态就是检修,无需变更!')
|
||||
} else {
|
||||
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
||||
}
|
||||
} else {
|
||||
if (form.value.id) {
|
||||
await quitRunningDeviceUpdate(form.value).then(res => {
|
||||
ElMessage.success('重新发起成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
})
|
||||
} else {
|
||||
await addRunningDevice(form.value).then(res => {
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('申请成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
/**
|
||||
* 终端类型切换
|
||||
*/
|
||||
|
||||
const changeType = (event: any) => {
|
||||
sourceData.value = deviceList.value
|
||||
form.value.deviceId = ''
|
||||
data.value = sourceData.value
|
||||
}
|
||||
|
||||
const changeDevStatus = async (event: any, flag?: boolean) => {
|
||||
await getDeviceDetailData(event).then(res => {
|
||||
//给当前终端赋值初始运行状态
|
||||
runFlag.value = res.data.runFlag + ''
|
||||
form.value.devOriginalStatus = runFlag.value
|
||||
if (!flag) form.value.devStatus = ''
|
||||
devStatuData.value = devStatusList.value.filter(item => item.value != res.data.runFlag)
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-upload-list__item {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 180px;
|
||||
}
|
||||
::v-deep .el-tree-node__children > div {
|
||||
display: block !important;
|
||||
}
|
||||
:deep(.el-select__input) {
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
55
src/views/pqs/supervise_jb/retire/index.vue
Normal file
55
src/views/pqs/supervise_jb/retire/index.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<el-tab-pane label='终端状态管理' name='0'>
|
||||
<terminal :id="id" v-if="activeName == '0'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='监测点状态管理' name='1'>
|
||||
<monitor :id="id" v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import terminal from './terminal.vue'
|
||||
import monitor from './monitor.vue'
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
defineOptions({
|
||||
name: 'supervision/retire'
|
||||
})
|
||||
const activeName = ref('0')
|
||||
const route = useRoute()
|
||||
const id = ref('')
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('supervision/retire')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '0') {
|
||||
activeName.value = '0'
|
||||
} else {
|
||||
activeName.value = '1'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
331
src/views/pqs/supervise_jb/retire/monitor.vue
Normal file
331
src/views/pqs/supervise_jb/retire/monitor.vue
Normal file
@@ -0,0 +1,331 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker nextFlag theCurrentTime>
|
||||
<template #select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="搜索">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、监测点"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||
<!--弹框-->
|
||||
<monitor-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'supervision/retire'
|
||||
})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const deviceQuitPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||
{ title: '监测点', field: 'deviceName', minWidth: 200 },
|
||||
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
|
||||
{
|
||||
title: '变更前状态',
|
||||
field: 'devOriginalStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
|
||||
replaceValue: {
|
||||
0: '投运',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '目标状态',
|
||||
field: 'devStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '投运',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('编辑', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('重新发起', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
// for (let key in tableStore.table.params) {
|
||||
// if (tableStore.table.params[key] === '') {
|
||||
// delete tableStore.table.params[key]
|
||||
// }
|
||||
|
||||
// }
|
||||
tableStore.table.params.deviceType = 2
|
||||
}
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.status = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
//新增退运终端信息
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增监测点状态变更')
|
||||
}
|
||||
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelQuitRunningDevice(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
238
src/views/pqs/supervise_jb/retire/monitorQuitPopup.vue
Normal file
238
src/views/pqs/supervise_jb/retire/monitorQuitPopup.vue
Normal file
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" width="450px" top="20vh">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<!-- <el-form-item label="终端类型" prop="deviceType">
|
||||
<el-radio-group v-model="form.deviceType" :disabled="title == '监测点退运'" @change="changeType">
|
||||
<el-radio border label="1">监测终端</el-radio>
|
||||
<el-radio border label="2">监测点</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="监测点" prop="deviceId">
|
||||
<el-tree-select
|
||||
v-model="form.deviceId"
|
||||
:data="data"
|
||||
filterable
|
||||
:default-expand-all="true"
|
||||
style="width: 100%"
|
||||
@change="changeDevStatus"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测点当前状态:">
|
||||
<el-select v-model="runFlag" disabled placeholder="请选择监测点" clearable class="select">
|
||||
<el-option
|
||||
v-for="item in runFlagList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="变更状态:" prop="devStatus">
|
||||
<el-select v-model="form.devStatus" placeholder="请选择监测点变更状态" clearable class="select">
|
||||
<el-option
|
||||
v-for="item in runFlagData"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退运原因" prop="propertyNo">
|
||||
<!-- <el-input
|
||||
v-model='form.propertyNo'
|
||||
clearable
|
||||
placeholder='请输入退役原因'
|
||||
/> -->
|
||||
<el-input
|
||||
type="textarea"
|
||||
clearable
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入退运原因"
|
||||
v-model="form.propertyNo"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
|
||||
<el-button type="primary" @click="submit(true)" :loading="loading" >保存</el-button>
|
||||
<el-button type="primary" @click="submit(false)" :loading="loading" >提交审批</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||
import { getTerminalSelectTree } from '@/api/device-boot/Business'
|
||||
import { addRunningDevice, quitRunningDeviceUpdate } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { getLineDetailData } from '@/api/device-boot/line'
|
||||
|
||||
//下拉数据源
|
||||
const sourceData = ref()
|
||||
const lineList = ref()
|
||||
const data = ref()
|
||||
const title = ref('')
|
||||
const loading = ref(false)
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
const runFlag = ref('')
|
||||
|
||||
const runFlagData: any = ref([])
|
||||
const dialogVisible = ref(false)
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = ref({
|
||||
id: '',
|
||||
deviceId: '',
|
||||
deviceType: '2',
|
||||
devOriginalStatus: '0',
|
||||
devStatus: '',
|
||||
saveOrCheckflag: '',
|
||||
propertyNo: ''
|
||||
})
|
||||
const runFlagList = [
|
||||
{ id: '0', name: '投运' },
|
||||
{ id: '1', name: '检修' },
|
||||
{ id: '2', name: '停运' },
|
||||
{ id: '3', name: '调试' },
|
||||
{ id: '4', name: '退运' }
|
||||
]
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
deviceId: [{ required: true, message: '终端不能为空', trigger: 'change' }],
|
||||
propertyNo: [{ required: true, message: '请输入退役原因', trigger: 'blur' }],
|
||||
devStatus: [{ required: true, message: '请选择变更状态', trigger: 'blur' }]
|
||||
}
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
const open = async (text: string, tempData?: any) => {
|
||||
title.value = text
|
||||
//监测点
|
||||
await getTerminalSelectTree(6).then(res => {
|
||||
lineList.value = res.data
|
||||
})
|
||||
|
||||
sourceData.value = lineList.value
|
||||
data.value = lineList.value
|
||||
if (tempData) {
|
||||
// 表单赋值
|
||||
for (let key in form.value) {
|
||||
form.value[key] = tempData[key]
|
||||
}
|
||||
form.value.deviceType = form.value.deviceType + ''
|
||||
changeDevStatus(form.value.deviceId, true)
|
||||
form.value.devStatus = tempData.devStatus != null ? tempData.devStatus + '' : ''
|
||||
} else {
|
||||
resetForm()
|
||||
// 在此处恢复默认表单
|
||||
for (let key in form.value) {
|
||||
form.value[key] = ''
|
||||
}
|
||||
form.value.deviceType = '1'
|
||||
runFlag.value = ''
|
||||
}
|
||||
form.value.deviceType = '2'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = async (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
form.value.saveOrCheckflag = '1'
|
||||
|
||||
await addRunningDevice(form.value).then(res => {
|
||||
ElMessage.success('保存成功!')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
})
|
||||
} else {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
form.value.saveOrCheckflag = '2'
|
||||
{
|
||||
if (form.value.id) {
|
||||
await quitRunningDeviceUpdate(form.value)
|
||||
ElMessage.success('重新发起成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
} else {
|
||||
await addRunningDevice(form.value)
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('申请成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
/**
|
||||
* 终端类型切换
|
||||
*/
|
||||
|
||||
const changeType = (event: any) => {
|
||||
sourceData.value = lineList.value
|
||||
form.value.deviceId = ''
|
||||
data.value = sourceData.value
|
||||
}
|
||||
const changeDevStatus = async (event: any, flag?: any) => {
|
||||
await getLineDetailData(event).then(res => {
|
||||
//给当前终端赋值初始投运状态
|
||||
// switch (res.data.runFlag) {
|
||||
|
||||
// case '投运':
|
||||
// form.value.devOriginalStatus = '0'
|
||||
// break
|
||||
// case '检修':
|
||||
// form.value.devOriginalStatus = '1'
|
||||
// break
|
||||
// case '停运':
|
||||
// form.value.devOriginalStatus = '2'
|
||||
// break
|
||||
// case '调试':
|
||||
// form.value.devOriginalStatus = '3'
|
||||
// break
|
||||
// default:
|
||||
// form.value.devOriginalStatus = '4'
|
||||
// break
|
||||
// }
|
||||
runFlag.value = runFlagList.filter(item => item.name == res.data.runFlag)[0].id
|
||||
form.value.devOriginalStatus = runFlag.value
|
||||
if (!flag) {
|
||||
form.value.devStatus = ''
|
||||
}
|
||||
runFlagData.value = runFlagList.filter(item => item.name != res.data.runFlag)
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-upload-list__item {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 180px;
|
||||
}
|
||||
</style>
|
||||
324
src/views/pqs/supervise_jb/retire/terminal.vue
Normal file
324
src/views/pqs/supervise_jb/retire/terminal.vue
Normal file
@@ -0,0 +1,324 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker nextFlag theCurrentTime>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="搜索">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||
<!--弹框-->
|
||||
<device-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'supervision/retire'
|
||||
})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const deviceQuitPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
||||
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
||||
{
|
||||
title: '变更前状态',
|
||||
field: 'devOriginalStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '目标状态',
|
||||
field: 'devStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('编辑', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('重新发起', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
// for (let key in tableStore.table.params) {
|
||||
// if (tableStore.table.params[key] === '') {
|
||||
// delete tableStore.table.params[key]
|
||||
// }
|
||||
// }
|
||||
tableStore.table.params.deviceType = 1
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
//新增退运终端信息
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增终端状态变更')
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelQuitRunningDevice(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
516
src/views/pqs/supervise_jb/technology/components/alarm.vue
Normal file
516
src/views/pqs/supervise_jb/technology/components/alarm.vue
Normal file
@@ -0,0 +1,516 @@
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!--弹框-->
|
||||
<feedback-popup ref="feedbackPopup" />
|
||||
|
||||
<!-- 详情 -->
|
||||
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
|
||||
<detail :id="detailId" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { cancelFeedback, getById } from '@/api/supervision-boot/leaflet'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
||||
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
||||
const dictData = useDictData()
|
||||
|
||||
const statusSelect = dictData.statusSelect()
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const { push } = useRouter()
|
||||
|
||||
const feedbackPopup = ref()
|
||||
const tableRef = ref()
|
||||
const dialogVisible = ref(false)
|
||||
const detailId = ref('')
|
||||
const TableHeaderRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/warningLeaflet/alarmPageData',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemType',
|
||||
title: '告警单问题来源',
|
||||
minWidth: '150',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'warning',
|
||||
2: 'warning',
|
||||
3: 'warning',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '技术监督计划',
|
||||
2: '在线监测超标问题',
|
||||
3: '用户投诉问题',
|
||||
4: '试运行监测点问题'
|
||||
}
|
||||
},
|
||||
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
|
||||
{ field: 'leafletName', title: '单据名称', minWidth: '150' },
|
||||
{ field: 'issueDetail', title: '告警内容', minWidth: '150' },
|
||||
{ field: 'reformAdvice', title: '整改意见', minWidth: '150' },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: '150',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
5: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
5: '新增'
|
||||
}
|
||||
},
|
||||
|
||||
{ field: 'createTime', title: '创建时间', minWidth: '150' },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'dealState',
|
||||
title: '是否解决',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未解决',
|
||||
1: '已解决',
|
||||
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '报告',
|
||||
// minWidth: '150',
|
||||
// align: 'center',
|
||||
// render: 'buttons',
|
||||
// fixed: 'right',
|
||||
// buttons: [
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '查看报告',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return !(row.problemType == 2 || row.problemType == 4)
|
||||
// },
|
||||
// click: row => {
|
||||
// if (row.problemType == 2) {
|
||||
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||
|
||||
// window.open(window.location.origin + '/#/previewFile?' + match[1])
|
||||
// } else {
|
||||
// if (row.problemPath == null) {
|
||||
// ElMessage({
|
||||
// message: '暂无报告!',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// } else {
|
||||
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
||||
// // window.open(res.data.url)
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '报告下载',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return !(row.problemType == 2 || row.problemType == 4)
|
||||
// },
|
||||
// click: row => {
|
||||
// if (row.problemType == 2) {
|
||||
// window.open(row.filePath)
|
||||
// } else {
|
||||
// if (row.problemPath == null) {
|
||||
// ElMessage({
|
||||
// message: '暂无报告!',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// } else {
|
||||
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
||||
// window.open(res.data.url)
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: '220',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '查看报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !(row.problemType == 2 || row.problemType == 4)
|
||||
},
|
||||
click: row => {
|
||||
if (row.problemType == 2) {
|
||||
const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||
|
||||
window.open(window.location.origin + '/#/previewFile?' + match[1])
|
||||
} else {
|
||||
if (row.problemPath == null) {
|
||||
ElMessage({
|
||||
message: '暂无报告!',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
window.open(window.location.origin + '/#/previewFile?/' + row.problemPath)
|
||||
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
||||
// // window.open(res.data.url)
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '报告下载',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !(row.problemType == 2 || row.problemType == 4)
|
||||
},
|
||||
click: row => {
|
||||
if (row.problemType == 2) {
|
||||
window.open(row.filePath)
|
||||
} else {
|
||||
if (row.problemPath == null) {
|
||||
ElMessage({
|
||||
message: '暂无报告!',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
||||
window.open(res.data.url)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看信息',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.problemId || row.problemType != 1
|
||||
},
|
||||
click: async row => {
|
||||
dialogVisible.value = true
|
||||
detailId.value = row.problemId
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '发送督办单',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// click: row => {
|
||||
// // handleAudit(row.processInstanceId)
|
||||
// ElMessage.warning('待打通生成管理系统接口!')
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '问题反馈',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dutyOrgId != adminInfo.$state.deptId || row.status !== 5
|
||||
},
|
||||
click: row => {
|
||||
feedbackPopup.value.open(
|
||||
'填报告警反馈单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
row.reformAdvice
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.dutyOrgId != adminInfo.$state.deptId || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
feedbackPopup.value.open(
|
||||
'编辑告警反馈单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
|
||||
row.reformAdvice,
|
||||
row.takeStep,
|
||||
row.reportPath
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
// deviceQuitPopup.value.open('重新发起', row)
|
||||
feedbackPopup.value.open(
|
||||
'重新填报告警反馈单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
row.reformAdvice,
|
||||
row.takeStep,
|
||||
row.reportPath,
|
||||
row.reformAdvice
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelFeedback(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
tableStore.table.params.status = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const props = defineProps(['id', 'businessKey'])
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
let fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
|
||||
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT || fullId == 'null') return // 路由时间超过500ms,则不执行
|
||||
await getById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
if (res && res.code == 'A0000') {
|
||||
if (props.businessKey == '3') {
|
||||
feedbackPopup.value.open(
|
||||
'填报告警反馈单',
|
||||
res.data.id,
|
||||
res.data.status,
|
||||
res.data.issueDetail,
|
||||
res.data.problemPath,
|
||||
res.data.supervisionReport,
|
||||
res.data.reformAdvice
|
||||
)
|
||||
} else {
|
||||
feedbackPopup.value.open(
|
||||
'重新填报告警反馈单',
|
||||
res.data.id,
|
||||
res.data.status,
|
||||
res.data.issueDetail,
|
||||
res.data.problemPath,
|
||||
res.data.supervisionReport,
|
||||
res.data.reformAdvice,
|
||||
res.data.takeStep,
|
||||
res.data.reportPath,
|
||||
res.data.reformAdvice
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
372
src/views/pqs/supervise_jb/technology/components/earlyWarn.vue
Normal file
372
src/views/pqs/supervise_jb/technology/components/earlyWarn.vue
Normal file
@@ -0,0 +1,372 @@
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!--弹框-->
|
||||
<feedback-popup ref="feedbackPopup" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import {cancelFeedback, getById} from '@/api/supervision-boot/leaflet'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
||||
const dictData = useDictData()
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const { push } = useRouter()
|
||||
const tableRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const feedbackPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/warningLeaflet/warningPageData',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'problemType',
|
||||
title: '预警单问题来源',
|
||||
minWidth: '150',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'warning',
|
||||
2: 'warning',
|
||||
3: 'warning',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '技术监督计划',
|
||||
2: '在线监测超标问题',
|
||||
3: '用户投诉问题',
|
||||
4: '试运行监测点问题'
|
||||
}
|
||||
},
|
||||
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
|
||||
{ field: 'reformAdvice', title: '整改意见', minWidth: '150' },
|
||||
{ field: 'leafletName', title: '单据名称', minWidth: '150' },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: '150',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
5: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
5: '新增'
|
||||
}
|
||||
},
|
||||
|
||||
{ field: 'createTime', title: '创建时间', minWidth: '150' },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '报告',
|
||||
// minWidth: '150',
|
||||
// align: 'center',
|
||||
// render: 'buttons',
|
||||
// fixed: 'right',
|
||||
// buttons: [
|
||||
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: '220',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '查看报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.problemType != 2
|
||||
},
|
||||
click: row => {
|
||||
const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||
|
||||
window.open(window.location.origin + '/#/previewFile?' + match[1])
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '报告下载',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.problemType != 2
|
||||
},
|
||||
click: row => {
|
||||
window.open(row.filePath)
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '发送督办单',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// click: row => {
|
||||
// // handleAudit(row.processInstanceId)
|
||||
// ElMessage.warning('待打通生成管理系统接口!')
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '问题反馈',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dutyOrgId != adminInfo.$state.deptId || row.status !== 5
|
||||
},
|
||||
click: row => {
|
||||
feedbackPopup.value.open(
|
||||
'填报预警反馈单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.reportPath,
|
||||
row.reformAdvice
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.dutyOrgId != adminInfo.$state.deptId || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
feedbackPopup.value.open(
|
||||
'编辑预警反馈单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.reportPath,
|
||||
row.reformAdvice,
|
||||
row.takeStep,
|
||||
row.reportPath
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
// deviceQuitPopup.value.open('重新发起', row)
|
||||
feedbackPopup.value.open(
|
||||
'重新填报预警反馈单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.reportPath,
|
||||
row.reformAdvice,
|
||||
row.takeStep,
|
||||
row.reportPath
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelFeedback(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const props = defineProps(['id','businessKey'])
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
let fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT || fullId == 'null') return // 路由时间超过500ms,则不执行
|
||||
await getById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
if(props.businessKey == '3'){
|
||||
feedbackPopup.value.open(
|
||||
'填报预警反馈单',
|
||||
res.data.id,
|
||||
res.data.status,
|
||||
res.data.issueDetail,
|
||||
res.data.problemPath,
|
||||
res.data.reportPath,
|
||||
res.data.reformAdvice
|
||||
)
|
||||
}else{
|
||||
feedbackPopup.value.open(
|
||||
'重新填报预警反馈单',
|
||||
res.data.id,
|
||||
res.data.status,
|
||||
res.data.issueDetail,
|
||||
res.data.problemPath,
|
||||
res.data.reportPath,
|
||||
res.data.reformAdvice,
|
||||
res.data.takeStep,
|
||||
res.data.reportPath
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}, {immediate: true})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
157
src/views/pqs/supervise_jb/technology/components/listForm.vue
Normal file
157
src/views/pqs/supervise_jb/technology/components/listForm.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" style="width: 800px" :before-close="handleClose">
|
||||
<el-form :model="form" class="form-two" label-width="auto" :rules="rules">
|
||||
<el-form-item label="单据编号:" prop="billNo">
|
||||
<el-input v-model="form.billNo" placeholder="请输入单据编号" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据名称:" prop="billName">
|
||||
<el-input v-model="form.billName" placeholder="请输入单据名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类别:" prop="billType">
|
||||
<el-select v-model="form.billType" clearable placeholder="请选择单据类别">
|
||||
<el-option
|
||||
v-for="item in Categories"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="编制单位名称:" prop="createrOrgName">
|
||||
<el-input v-model="form.createrOrgName" placeholder="请输入编制单位名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属专业:" prop="specialityType">
|
||||
<el-select v-model="form.specialityType" clearable placeholder="请选择所属专业">
|
||||
<el-option v-for="item in Major" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="责任单位名称:" prop="orgName">
|
||||
<el-input v-model="form.orgName" placeholder="请输入责任单位名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收人名称:" prop="receiveUserId">
|
||||
<el-select v-model="form.receiveUserId" 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="createrTime">
|
||||
<el-date-picker
|
||||
v-model="form.createrTime"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="主管部门名称:" prop="managerDeptName">
|
||||
<el-input v-model="form.managerDeptName" placeholder="请输入主管部门名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="主送单位名称:" prop="mainSenderName">
|
||||
<el-input v-model="form.mainSenderName" placeholder="请输入主送单位名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="抄送单位名称:" prop="copySenderName">
|
||||
<el-input v-model="form.copySenderName" placeholder="请输入抄送单位名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理建议:" prop="dealAdvise">
|
||||
<el-input
|
||||
v-model="form.dealAdvise"
|
||||
type="textarea"
|
||||
autosize
|
||||
placeholder="请输入处理建议"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="依据标准:" prop="techSupvBasis">
|
||||
<el-input v-model="form.techSupvBasis" type="textarea" autosize placeholder="请输入依据标准"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题描述:" prop="problemDesc">
|
||||
<el-input v-model="form.problemDesc" type="textarea" autosize placeholder="请输入问题描述"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
const emit = defineEmits(['onsubmit'])
|
||||
const dictData = useDictData()
|
||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||
const dialogVisible = ref(false)
|
||||
const title: any = ref('')
|
||||
const ImplementationPeople = ref([])
|
||||
const Categories = ref([])
|
||||
const Major = ref([])
|
||||
const form: any = ref({
|
||||
billName: '',
|
||||
billNo: '',
|
||||
billType: '',
|
||||
copySenderId: '',
|
||||
copySenderName: '',
|
||||
createrOrgId: '',
|
||||
createrOrgName: '',
|
||||
createrTime: '',
|
||||
dealAdvise: '',
|
||||
mainSenderId: '',
|
||||
mainSenderName: '',
|
||||
managerDeptId: '',
|
||||
managerDeptName: '',
|
||||
orgId: '',
|
||||
orgName: '',
|
||||
problemDesc: '',
|
||||
receiveUserName: '',
|
||||
receiveUserId: '',
|
||||
specialityType: '',
|
||||
techSupvBasis: ''
|
||||
})
|
||||
const elform = ref()
|
||||
const uploadRef = ref()
|
||||
const rules = {
|
||||
billNo: [{ required: true, message: '请输入单据编号', trigger: 'blur' }],
|
||||
billName: [{ required: true, message: '请输入单据名称', trigger: 'blur' }],
|
||||
billType: [{ required: true, message: '请选择单据类别', trigger: 'change' }],
|
||||
createrOrgName: [{ required: true, message: '请选择编制单位', trigger: 'change' }],
|
||||
specialityType: [{ required: true, message: '请选择所属专业', trigger: 'change' }],
|
||||
orgName: [{ required: true, message: '请选择责任单位', trigger: 'change' }],
|
||||
createrTime: [{ required: true, message: '选择日期', trigger: 'change' }],
|
||||
managerDeptName: [{ required: true, message: '请选择主管部门名称', trigger: 'change' }],
|
||||
techSupvBasis: [{ required: true, message: '请输入依据标准', trigger: 'blur' }],
|
||||
problemDesc: [{ required: true, message: '请输入问题描述', trigger: 'blur' }],
|
||||
dealAdvise: [{ required: true, message: '请输入处理建议', trigger: 'blur' }],
|
||||
treatmentMeasures: [{ required: true, message: '请输入采取措施', trigger: 'blur' }],
|
||||
fillUserId: [{ required: true, message: '请选择接收人名称', trigger: 'change' }],
|
||||
completeTime: [{ required: true, message: '选择日期', trigger: 'change' }]
|
||||
}
|
||||
const submit = () => {
|
||||
handleClose()
|
||||
}
|
||||
|
||||
const open = (text: any) => {
|
||||
dialogVisible.value = true
|
||||
title.value = text
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
// elform.value.resetFields()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
214
src/views/pqs/supervise_jb/technology/components/overview.vue
Normal file
214
src/views/pqs/supervise_jb/technology/components/overview.vue
Normal file
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择筛选数据"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div class="box">
|
||||
<MyEChart style="flex: 1.2" :options="options1" />
|
||||
<MyEChart style="flex: 2" :options="options2" />
|
||||
</div>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { info } from 'console'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
const options1 = ref({})
|
||||
const options2 = ref({})
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
publicHeight: 345,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'name', title: '事务名称' },
|
||||
{ field: 'type', title: '事务类型' },
|
||||
{ field: 'createUser', title: '创建人员' },
|
||||
{ field: 'companyName', title: '创建部门' },
|
||||
{ field: 'modifyUser', title: '处理人员' },
|
||||
{ field: 'modifyTime', title: '处理时间' },
|
||||
{ field: 'progressTime', title: '进行时间(天)' },
|
||||
{ field: 'progress', title: '流程状态' },
|
||||
{ field: 'alertType', title: '预警类型' },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '上传',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: '',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
info()
|
||||
})
|
||||
//渲染图表
|
||||
const info = () => {
|
||||
options1.value = {
|
||||
title: {
|
||||
text: '商务类型',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
data: ['全部', '预警单', '告警单']
|
||||
}
|
||||
],
|
||||
yAxis: [{}],
|
||||
series: [
|
||||
{
|
||||
name: '数量',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30, //最大宽度
|
||||
data: [
|
||||
{
|
||||
value: 9,
|
||||
id: ''
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
options2.value = {
|
||||
title: {
|
||||
text: '事务流程',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
data: [
|
||||
'全部',
|
||||
'开始',
|
||||
'预/告警单下发',
|
||||
'预/告警单反馈',
|
||||
'现场测试',
|
||||
'整改通知单下发',
|
||||
'整改通知单反馈',
|
||||
'完结'
|
||||
]
|
||||
}
|
||||
],
|
||||
yAxis: [{}],
|
||||
series: [
|
||||
{
|
||||
name: '数量',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30, //最大宽度
|
||||
data: [
|
||||
{
|
||||
value: 9,
|
||||
id: ''
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '2'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '3'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '4'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '5'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '6'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
// 新增
|
||||
const add = () => {
|
||||
title.value = '新增告警单'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
height: 280px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
188
src/views/pqs/supervise_jb/technology/components/technology.vue
Normal file
188
src/views/pqs/supervise_jb/technology/components/technology.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择筛选数据"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事务类型:">
|
||||
<el-select v-model="tableStore.table.params.type" clearable placeholder="请选择事务类型">
|
||||
<el-option
|
||||
v-for="item in affairs"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属流程:">
|
||||
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择所属流程">
|
||||
<el-option
|
||||
v-for="item in process"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新建</el-button>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">上传模板</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const process = [
|
||||
{
|
||||
name: '开始',
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
name: '预/告警单下发',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
name: '反馈单上传',
|
||||
id: '2'
|
||||
},
|
||||
{
|
||||
name: '现场测试',
|
||||
id: '3'
|
||||
},
|
||||
{
|
||||
name: '整改通知单下发',
|
||||
id: '4'
|
||||
},
|
||||
{
|
||||
name: '整改通知单反馈',
|
||||
id: '5'
|
||||
},
|
||||
{
|
||||
name: '完结',
|
||||
id: '6'
|
||||
}
|
||||
]
|
||||
const affairs = [
|
||||
{
|
||||
name: '预警单',
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
name: '告警单',
|
||||
id: '1'
|
||||
}
|
||||
]
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'name', title: '名称' },
|
||||
{
|
||||
field: 'grade',
|
||||
title: '等级'
|
||||
},
|
||||
{ field: 'bigType', title: '策略选择' },
|
||||
{ field: 'updateBy', title: '更新人员' },
|
||||
{ field: 'updateTime', title: '更新时间' },
|
||||
{
|
||||
field: 'state',
|
||||
title: '状态',
|
||||
activeValue: '2',
|
||||
inactiveValue: '1',
|
||||
render: 'switch',
|
||||
onChangeField: (row: any, value) => {
|
||||
console.log('🚀 ~ row:', 444123, value)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '绑定',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: '',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除?'
|
||||
},
|
||||
click: row => {
|
||||
removeUse({ userIds: row.userId }).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
// 新增
|
||||
const add = () => {
|
||||
title.value = '新增告警单'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
</script>
|
||||
114
src/views/pqs/supervise_jb/technology/detail.vue
Normal file
114
src/views/pqs/supervise_jb/technology/detail.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<!--工作流view的路径:/pqs/supervise/technology/detail-->
|
||||
<div class="default-main">
|
||||
<!-- <h1>详细信息回显</h1>-->
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item :label="detailData.leafletType == 1 ? '预警单名称' : '告警单名称'">
|
||||
{{ detailData.leafletName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :label="detailData.leafletType == 1 ? '预警单' : '告警单' + '问题来源'">
|
||||
{{ getProblemType(detailData.problemType) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" :label="detailData.leafletType == 1 ? '预警单' : '告警单' + '问题描述'">
|
||||
{{ detailData.issueDetail }}
|
||||
</el-descriptions-item>
|
||||
<template v-if="detailData.problemType == 4">
|
||||
<el-descriptions-item :span="2" label="附件">
|
||||
<el-icon class="elView" v-if="detailData?.problemName">
|
||||
<View @click="openFile(detailData?.problemName)" />
|
||||
</el-icon>
|
||||
<a :href="detailData.problemPath" target="_blank">{{ detailData.problemName }}</a>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item :span="2" label="整改意见">
|
||||
{{ detailData.reformAdvice }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="采取措施">
|
||||
{{ detailData.takeStep }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="处理成效报告">
|
||||
<el-icon class="elView" v-if="detailData?.reportName">
|
||||
<View @click="openFile(detailData?.reportName)" />
|
||||
</el-icon>
|
||||
<a :href="detailData.reportPath" target="_blank">{{ detailData.reportName }}</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getById } from '@/api/supervision-boot/leaflet'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({ name: 'technology/detail' })
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData: any = ref({}) // 详情数据
|
||||
const queryId = query.id // 从 URL 传递过来的 id 编号
|
||||
const getProblemType = (type: number) => {
|
||||
if (type === 1) {
|
||||
return '技术监督计划'
|
||||
}
|
||||
if (type === 2) {
|
||||
return '在线监测超标问题'
|
||||
}
|
||||
if (type === 3) {
|
||||
return '用户投诉问题'
|
||||
}
|
||||
if (type === 4) {
|
||||
return '试运行监测点问题'
|
||||
}
|
||||
return '试运行监测点问题'
|
||||
}
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
getFileData()
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const getFileData = async () => {
|
||||
//如果有问题附件
|
||||
if (detailData.value.problemPath) {
|
||||
await getFileNameAndFilePath({ filePath: detailData.value.problemPath }).then(res => {
|
||||
detailData.value.problemPath = res.data.url
|
||||
detailData.value.problemName = res.data.fileName
|
||||
})
|
||||
}
|
||||
|
||||
await getFileNameAndFilePath({ filePath: detailData.value.reportPath }).then(res => {
|
||||
detailData.value.reportPath = res.data.url
|
||||
detailData.value.reportName = res.data.fileName
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
276
src/views/pqs/supervise_jb/technology/feedbackPopup.vue
Normal file
276
src/views/pqs/supervise_jb/technology/feedbackPopup.vue
Normal file
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="450px" top="30vh">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form-item label="问题详情:">
|
||||
<el-input v-model="form.issueDetail" disabled autocomplete="off" type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 6 }" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改意见:">
|
||||
<el-input v-model="form.reformAdvice" autocomplete="off" disabled type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 6 }" readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="技术监督报告:" v-if="showFile1">
|
||||
<el-icon class="elView" v-if="supervisionReportDetail?.supervisionReportName">
|
||||
<View @click="openFile(supervisionReportDetail?.supervisionReportName)" />
|
||||
</el-icon>
|
||||
<a :href="supervisionReportDetail.supervisionReportPath" target="_blank">
|
||||
{{ supervisionReportDetail.supervisionReportName }}
|
||||
</a>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题附件:" v-if="showFile">
|
||||
<el-icon class="elView" v-if="problemDetail?.problemName">
|
||||
<View @click="openFile(problemDetail?.problemName)" />
|
||||
</el-icon>
|
||||
<a :href="problemDetail.problemPath" target="_blank">{{ problemDetail.problemName }}</a>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="采取的措施:" prop="takeStep">
|
||||
<el-input v-model="form.takeStep" autocomplete="off" placeholder="请输入采取的措施" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="反馈报告:" class="uploadFile" prop="reportPath">
|
||||
<el-upload v-model:file-list="form.reportPath" ref="uploadRef" action="" :accept="acceptType"
|
||||
:limit="1" :on-exceed="handleExceed" :on-change="choose" :auto-upload="false"
|
||||
:on-progress="uploadFileName('reportPath')" :on-remove="removeFile">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="close">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
|
||||
<el-button type="primary" @click="submit(true)" :loading="loading">保存</el-button>
|
||||
<el-button type="primary" @click="submit(false)" :loading="loading">提交审批</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject, reactive, nextTick } from 'vue'
|
||||
import { ElMessage, genFileId, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||
import { getFileNameAndFilePath, uploadFile } from '@/api/system-boot/file'
|
||||
import { addFeedback, updateFeedback } from '@/api/supervision-boot/leaflet'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
//.doc,.docx,.xlsx,.xls,.pdf
|
||||
const acceptType = ref('')
|
||||
//下拉数据源
|
||||
const title = ref('')
|
||||
const loading = ref(false)
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
// 上传报告
|
||||
const uploadRef = ref()
|
||||
const dialogVisible = ref(false)
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = ref({
|
||||
id: '',
|
||||
status: '',
|
||||
issueDetail: '',
|
||||
reformAdvice: '',
|
||||
takeStep: '',
|
||||
reportPath: []
|
||||
})
|
||||
//附件是否显示
|
||||
const showFile = ref(false)
|
||||
const showFile1 = ref(false)
|
||||
|
||||
const problemDetail = reactive({
|
||||
problemPath: '',
|
||||
problemName: ''
|
||||
})
|
||||
const supervisionReportDetail = reactive({
|
||||
supervisionReportPath: '',
|
||||
supervisionReportName: ''
|
||||
})
|
||||
|
||||
//处理成效报告
|
||||
const reportFilePath: any = ref('')
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
takeStep: [{ required: true, message: '请输入采取的措施', trigger: 'blur' }],
|
||||
reportPath: [{ required: true, message: '请上传处理成效报告', trigger: 'blur' }]
|
||||
}
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
const open = async (
|
||||
text: string,
|
||||
id: string,
|
||||
status: any,
|
||||
issueDetail: string,
|
||||
problemPath?: string,
|
||||
supervisionReport?: string,
|
||||
reformAdvice?: string,
|
||||
takeStep?: string,
|
||||
reportPath?: string
|
||||
) => {
|
||||
title.value = text
|
||||
resetForm()
|
||||
if (takeStep) {
|
||||
form.value.takeStep = takeStep
|
||||
}
|
||||
// uploadRef.value?.clearFiles()
|
||||
if (reportPath) {
|
||||
form.value.reportPath = JSON.parse(
|
||||
JSON.stringify([
|
||||
{
|
||||
name: reportPath?.split('/')[2]
|
||||
}
|
||||
])
|
||||
)
|
||||
}
|
||||
form.value.id = id
|
||||
form.value.status = status
|
||||
form.value.issueDetail = issueDetail || ''
|
||||
form.value.reformAdvice = reformAdvice || ''
|
||||
reportFilePath.value = reportPath
|
||||
//判断附件是否存在,如果存在则回显出让用户可以点击下载
|
||||
if (problemPath) {
|
||||
let arrPath = problemPath.split(',')
|
||||
await getFileNameAndFilePath({ filePath: arrPath[0] }).then(res => {
|
||||
problemDetail.problemPath = res.data.url
|
||||
problemDetail.problemName = res.data.fileName
|
||||
})
|
||||
showFile.value = true
|
||||
} else {
|
||||
showFile.value = false
|
||||
}
|
||||
if (supervisionReport) {
|
||||
let arrPath = supervisionReport.split(',')
|
||||
console.log('🚀 ~ arrPath:', arrPath)
|
||||
await getFileNameAndFilePath({ filePath: arrPath[0] }).then(res => {
|
||||
supervisionReportDetail.supervisionReportPath = res.data.url
|
||||
supervisionReportDetail.supervisionReportName = res.data.fileName
|
||||
})
|
||||
showFile1.value = true
|
||||
} else {
|
||||
showFile1.value = false
|
||||
}
|
||||
|
||||
dialogVisible.value = true
|
||||
}
|
||||
//移除文件上传
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
}
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
form.value = {
|
||||
id: '',
|
||||
status: '',
|
||||
issueDetail: '',
|
||||
reformAdvice: '',
|
||||
takeStep: '',
|
||||
reportPath: []
|
||||
}
|
||||
resetForm()
|
||||
}
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = async (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
let subForm = JSON.parse(JSON.stringify(form.value))
|
||||
subForm = {
|
||||
...subForm,
|
||||
reportPath: form.value.reportPath.length > 0 ? reportFilePath.value : null
|
||||
}
|
||||
subForm.saveOrCheckflag = '1'
|
||||
//此时该告警单处于待反馈状态
|
||||
await addFeedback(subForm).then(res => {
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('保存成功!')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
})
|
||||
} else {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let subForm = JSON.parse(JSON.stringify(form.value))
|
||||
subForm = {
|
||||
...subForm,
|
||||
reportPath: form.value.reportPath.length > 0 ? reportFilePath.value : null
|
||||
}
|
||||
if (!reportFilePath.value) {
|
||||
return ElMessage({
|
||||
message: '请上传处理成效报告',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
subForm.saveOrCheckflag = '2'
|
||||
if (form.value.status == '3') {
|
||||
await updateFeedback(subForm).then(res => {
|
||||
ElMessage.success('重新发起成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
})
|
||||
} else {
|
||||
//此时该告警单处于待反馈状态
|
||||
await addFeedback(subForm).then(res => {
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('申请成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
|
||||
let uploadName = ref('')
|
||||
const choose = (e: any) => {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
reportFilePath.value = res.data.name
|
||||
// form.value.reportPath = res.data.name
|
||||
})
|
||||
}
|
||||
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
|
||||
//上传报告改变
|
||||
const uploadFileName = val => {
|
||||
uploadName.value = val
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-upload-list__item {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
62
src/views/pqs/supervise_jb/technology/index.vue
Normal file
62
src/views/pqs/supervise_jb/technology/index.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<!-- <el-tab-pane label="概览" name="1"><overview v-if="activeName == '1'"/></el-tab-pane>
|
||||
<el-tab-pane label="技术监督管理" name="2"><technology v-if="activeName == '2'"/></el-tab-pane> -->
|
||||
|
||||
<el-tab-pane label='预警单列表' name='3'>
|
||||
<earlyWarn :id="id" :businessKey='key' v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='告警单列表' name='4'>
|
||||
<alarm :id="id" :businessKey='key' v-if="activeName == '4'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import earlyWarn from './components/earlyWarn.vue'
|
||||
import alarm from './components/alarm.vue'
|
||||
import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
const route = useRoute()
|
||||
const id = ref('')
|
||||
const key = ref('')
|
||||
defineOptions({
|
||||
name: 'supervision/supervision/manage'
|
||||
})
|
||||
|
||||
const activeName: any = ref('3')
|
||||
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('supervision/supervision/manage')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '0' || type == '3') {
|
||||
activeName.value = '3'
|
||||
} else {
|
||||
activeName.value = '4'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
key.value = (route.query.key as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
153
src/views/pqs/supervise_jb/terminal/components/add.vue
Normal file
153
src/views/pqs/supervise_jb/terminal/components/add.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" style="width: 800px" :before-close="handleClose">
|
||||
<el-form :model="form" :rules="rules" class="form-two" ref="elform" label-width="120px">
|
||||
<el-form-item label="终端编号:" prop="id">
|
||||
<el-input
|
||||
clearable
|
||||
:disabled="title == `编辑`"
|
||||
v-model="form.id"
|
||||
placeholder="请输入终端编号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端名称:" prop="name">
|
||||
<el-input clearable v-model="form.name" placeholder="请输入终端名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="送检单位:" prop="inspectionUnit">
|
||||
<el-input clearable v-model="form.inspectionUnit" placeholder="请输入送检单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测时间:" prop="inspectionTime">
|
||||
<el-date-picker
|
||||
v-model="form.inspectionTime"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="安装位置:" prop="installPlace">
|
||||
<el-input clearable v-model="form.installPlace" placeholder="请输入安装位置"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家:" prop="manufacture">
|
||||
<el-select v-model="form.manufacture" placeholder="请选择生产厂家" clearable class="select">
|
||||
<el-option
|
||||
v-for="item in manufactorList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="原始数据报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.fileList"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".doc,.docx"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { upload, insertTerminal, updateTerminal } from '@/api/process-boot/terminal'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
const emit = defineEmits(['onsubmit'])
|
||||
const dictData = useDictData()
|
||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||
const dialogVisible = ref(false)
|
||||
const title: any = ref('')
|
||||
const form: any = ref({
|
||||
id: '',
|
||||
inspectionUnit: '',
|
||||
inspectionTime: '',
|
||||
installPlace: '',
|
||||
originalReport: '',
|
||||
manufacture: '',
|
||||
name: '',
|
||||
originalName: '',
|
||||
orgNo: dictData.state.area[0].id,
|
||||
orgName: dictData.state.area[0].name,
|
||||
fileList: []
|
||||
})
|
||||
const elform = ref()
|
||||
const uploadRef = ref()
|
||||
const rules = {
|
||||
id: [{ required: true, message: '请输入终端编号', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '请输入终端名称', trigger: 'blur' }],
|
||||
installPlace: [{ required: true, message: '请输入安装位置', trigger: 'blur' }],
|
||||
inspectionUnit: [{ required: true, message: '请输入送检单位', trigger: 'blur' }],
|
||||
inspectionTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
||||
manufacture: [{ required: true, message: '请选择生产厂家', trigger: 'change' }],
|
||||
fileList: [{ required: true, message: '请选择文件', trigger: 'change' }]
|
||||
}
|
||||
const submit = () => {
|
||||
elform.value.validate((valid: any) => {
|
||||
if (title.value == '新增') {
|
||||
insertTerminal(form.value).then(res => {
|
||||
ElMessage.success('新增成功!')
|
||||
handleClose()
|
||||
emit('onsubmit')
|
||||
})
|
||||
} else {
|
||||
updateTerminal(form.value).then(res => {
|
||||
ElMessage.success('修改成功!')
|
||||
handleClose()
|
||||
emit('onsubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 上传报告
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
const choose = (e: any) => {
|
||||
upload(e.raw).then(res => {
|
||||
form.value.originalReport = res.data
|
||||
form.value.originalName = e.name
|
||||
})
|
||||
}
|
||||
|
||||
const open = (row: any) => {
|
||||
title.value = row.title
|
||||
if (row.title == '编辑') {
|
||||
row.row ? (form.value = JSON.parse(JSON.stringify(row.row))) : ''
|
||||
form.value.orgNo = dictData.state.area[0].id
|
||||
form.value.fileList = [{ name: form.value.originalName, status: 'ready', uid: form.value.id }]
|
||||
}
|
||||
dialogVisible.value = true
|
||||
}
|
||||
const handleClose = () => {
|
||||
elform.value.resetFields()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
79
src/views/pqs/supervise_jb/terminal/components/cycleEch.vue
Normal file
79
src/views/pqs/supervise_jb/terminal/components/cycleEch.vue
Normal file
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker></TableHeader>
|
||||
<div style="display: flex" v-loading="tableStore.table.loading" :style="{ height: height }">
|
||||
<MyEchart :options="options1" />
|
||||
<MyEchart :options="options2" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { ref, provide, onMounted } from 'vue'
|
||||
const options1 = ref()
|
||||
const options2 = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/process/pmsTerminalDetection/getCycleStatistics',
|
||||
method: 'POST',
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.id = tableStore.table.params.deptIndex
|
||||
},
|
||||
loadCallback: () => {
|
||||
options1.value = {
|
||||
legend: {
|
||||
data: ['已展开', '未展开']
|
||||
},
|
||||
xAxis: {
|
||||
data: tableStore.table.data.dateStatistics.map(item => item.orgName)
|
||||
},
|
||||
yAxis: {
|
||||
name: '台'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '已展开',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.dateStatistics.map(item => item.expanded)
|
||||
},
|
||||
{
|
||||
name: '未展开',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.dateStatistics.map(item => item.notExpanded)
|
||||
}
|
||||
]
|
||||
}
|
||||
options2.value = {
|
||||
legend: {
|
||||
data: ['检测终端数量']
|
||||
},
|
||||
xAxis: {
|
||||
data: tableStore.table.data.orgStatistics.map(item => item.orgName)
|
||||
},
|
||||
yAxis: {
|
||||
name: '台'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '检测终端数量',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.orgStatistics.map(item => item.count)
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const height = mainHeight(160).height
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
302
src/views/pqs/supervise_jb/terminal/components/cycleTab.vue
Normal file
302
src/views/pqs/supervise_jb/terminal/components/cycleTab.vue
Normal file
@@ -0,0 +1,302 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="终端名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.name"
|
||||
clearable
|
||||
placeholder="请输入终端名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.manufacture"
|
||||
placeholder="请选择生产厂家"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
class="select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in manufactorList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检测结果">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.testResults"
|
||||
placeholder="请选择检测结果"
|
||||
clearable
|
||||
class="select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in testResultsList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls"
|
||||
:on-change="choose"
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button
|
||||
icon="el-icon-Upload"
|
||||
type="primary"
|
||||
style="margin-left: 12px; margin-right: 12px"
|
||||
>
|
||||
excel导入
|
||||
</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传检测报告</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 上传检测报告 -->
|
||||
<el-dialog
|
||||
draggable
|
||||
title="上传检测报告__支持批量上传"
|
||||
v-model="showBatchUpload"
|
||||
width="30%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-upload
|
||||
multiple
|
||||
action=""
|
||||
:auto-upload="false"
|
||||
:limit="999"
|
||||
accept=".doc,.docx"
|
||||
:file-list="fileList"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="chooseBatch"
|
||||
ref="upload"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||
<span :style="`color:#f58003`">
|
||||
(*传入的检测报告文件格式(终端编号-检测报告(yyyy-MM-dd).docx))
|
||||
</span>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { DownloadExport, reportDownload, batchTerminal, importReport } from '@/api/process-boot/terminal'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||
const testResultsList = [
|
||||
{
|
||||
id: 0,
|
||||
name: '未展开'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已展开'
|
||||
}
|
||||
]
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const showBatchUpload = ref(false)
|
||||
const fileList: any = ref([])
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||
publicHeight: 85,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'id', title: '终端编号' },
|
||||
{
|
||||
field: 'manufacture',
|
||||
title: '生产厂家',
|
||||
formatter(row: any) {
|
||||
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'installPlace', title: '安装位置' },
|
||||
{ field: 'inspectionUnit', title: '送检单位' },
|
||||
{
|
||||
field: 'testResults',
|
||||
title: '检测结果',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未展开',
|
||||
1: '已展开'
|
||||
}
|
||||
// formatter(row: any) {
|
||||
// return row.cellValue == 0 ? '未展开' : '已展开'
|
||||
// }
|
||||
},
|
||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '250',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载原始数据报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.originalReport == null
|
||||
},
|
||||
click: row => {
|
||||
download(row, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载检测报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.inspectionReport == null
|
||||
},
|
||||
click: row => {
|
||||
download(row, 1)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
tableStore.table.params.name = ''
|
||||
tableStore.table.params.id = dictData.state.area[0].id
|
||||
tableStore.table.params.testResults = ''
|
||||
tableStore.table.params.manufacture = []
|
||||
tableStore.table.params.type = 1
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
// 关闭弹窗查询
|
||||
const onsubmit = () => {}
|
||||
// 下载模版
|
||||
const Export = () => {
|
||||
DownloadExport().then((res: any) => {
|
||||
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 = '终端入网检测录入模板' // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
// 下载报告
|
||||
const download = (row: any, type: number) => {
|
||||
reportDownload({
|
||||
id: row.id,
|
||||
type: type
|
||||
}).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
// excel导入
|
||||
const choose = (e: any) => {
|
||||
batchTerminal(e.raw).then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功,无错误数据!')
|
||||
tableStore.index()
|
||||
} else {
|
||||
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
||||
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 = '模板错误信息' // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 上传原始报告
|
||||
const UploadOriginal = () => {
|
||||
showBatchUpload.value = true
|
||||
}
|
||||
// 上传
|
||||
const BatchUpload = () => {
|
||||
let form = new FormData()
|
||||
form.append('type', '1')
|
||||
fileList.value.forEach((item: any) => {
|
||||
form.append('files', item.raw)
|
||||
})
|
||||
importReport(form)
|
||||
.then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功!')
|
||||
handleClose()
|
||||
tableStore.index()
|
||||
} else {
|
||||
ElMessage.error('上传失败!')
|
||||
}
|
||||
})
|
||||
.catch(response => {
|
||||
// console.log(response);
|
||||
})
|
||||
// fileList.value
|
||||
}
|
||||
const chooseBatch = (e: any) => {
|
||||
fileList.value.push(e)
|
||||
}
|
||||
const handleRemove = (e: any) => {
|
||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||
}
|
||||
const handleClose = () => {
|
||||
fileList.value = []
|
||||
showBatchUpload.value = false
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
860
src/views/pqs/supervise_jb/terminal/components/detail.vue
Normal file
860
src/views/pqs/supervise_jb/terminal/components/detail.vue
Normal file
@@ -0,0 +1,860 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ detailData.reporter }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报日期">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报部门">
|
||||
{{ detailData.orgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工程预期投产日期">
|
||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户性质">
|
||||
{{
|
||||
userTypeList.find(item => {
|
||||
return item.value == detailData.userType
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在地市">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="归口管理部门">
|
||||
{{ detailData.responsibleDepartment }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户状态">
|
||||
{{
|
||||
userStateList.find(item => {
|
||||
return item.value == detailData.userStatus
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="厂站名称">
|
||||
{{ detailData.substation }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称">
|
||||
{{ detailData.projectName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.voltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="非线性终端类型" v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.nonlinearDeviceType ? proviteData.nonlinearDeviceType : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估单位">
|
||||
{{ detailData.evaluationDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估结论" :span="2">
|
||||
{{ detailData.evaluationConclusion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
:label="
|
||||
detailData.userType == '4' || detailData.userType == '5' ? '非线性设备类型: ' : '非线性负荷类型:'
|
||||
"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.nonlinearLoadType }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否需要治理">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">{{ proviteData.needGovernance == 0 ? '否' : '是' }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开展背景测试">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="关联终端" v-if="props.openType != 'create'">
|
||||
<span>
|
||||
{{ devIdList[0]?.devName }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联监测点" v-if="props.openType != 'create'">
|
||||
<span>
|
||||
<!-- {{ detailData?.lineId }} -->
|
||||
{{ devIdList[0]?.lineList.filter(item => item.lineId == detailData?.lineId)[0].lineName }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
||||
<span>
|
||||
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="用户协议容量(MVA)"
|
||||
v-if="detailData.userType == 0 || detailData.userType == 1"
|
||||
>
|
||||
{{ proviteData.agreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="PCC供电终端容量(MVA)"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.pccEquipmentCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="基准短路容量(MVA)"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData.baseShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="系统最小短路容量(MVA)"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData?.minShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="用户用电协议容量(MVA)"
|
||||
v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
"
|
||||
>
|
||||
{{ proviteData?.userAgreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="PCC点" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.pccPoint }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="评估类型" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{
|
||||
evaluationTypeList.find(item => {
|
||||
return item.id == proviteData?.evaluationType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审单位" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.evaluationChekDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="行业" v-if="detailData.userType == 6">
|
||||
{{
|
||||
industryList.find(item => {
|
||||
return item.id == proviteData.industry
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感终端名称" v-if="detailData.userType == 6">
|
||||
{{ proviteData.deviceName }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="供电电源数量" v-if="detailData.userType == 6">-->
|
||||
<!-- {{ proviteData.powerSupplyCount }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="供电电源情况" v-if="detailData.userType == 6">
|
||||
{{
|
||||
powerSupplyInfoOptionList.find(item => {
|
||||
return item.id == proviteData.powerSupplyInfo
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="供电电源" :span="2" v-if="detailData.userType == 6">
|
||||
{{ proviteData.powerSupply }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负荷级别" v-if="detailData.userType == 6">
|
||||
{{
|
||||
loadLevelOptionList.find(item => {
|
||||
return item.id == proviteData.loadLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
|
||||
{{
|
||||
energyQualityIndexList.find(item => {
|
||||
return item.id == proviteData.energyQualityIndex
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="可研报告">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url" rel="nofollow">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目初步设计说明书">
|
||||
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription?.name">
|
||||
<View @click="openFile(proviteData?.preliminaryDesignDescription?.name)" />
|
||||
</el-icon>
|
||||
|
||||
<a target="_blank" :href="proviteData?.preliminaryDesignDescription?.url">
|
||||
{{ proviteData?.preliminaryDesignDescription?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport?.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReport?.url">
|
||||
{{ proviteData?.predictionEvaluationReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审意见报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions?.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReviewOpinions?.url">
|
||||
{{ proviteData?.predictionEvaluationReviewOpinions?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="用户接入变电站主接线示意图"
|
||||
v-if="detailData.userType != 0 && detailData.userType != 1"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram?.name">
|
||||
<View @click="openFile(proviteData?.substationMainWiringDiagram?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.substationMainWiringDiagram?.url">
|
||||
{{ proviteData?.substationMainWiringDiagram?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.sensitiveDevices?.name">
|
||||
<View @click="openFile(proviteData?.sensitiveDevices?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.sensitiveDevices?.url">
|
||||
{{ proviteData?.sensitiveDevices?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport?.name">
|
||||
<View @click="openFile(proviteData?.antiInterferenceReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.antiInterferenceReport?.url">
|
||||
{{ proviteData?.antiInterferenceReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.powerQualityReport?.name">
|
||||
<View @click="openFile(proviteData?.powerQualityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.powerQualityReport?.url">
|
||||
{{ proviteData?.powerQualityReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="其他附件"
|
||||
v-if="proviteData?.additionalAttachments && proviteData?.additionalAttachments?.url"
|
||||
>
|
||||
<el-icon class="elView" v-if="proviteData?.additionalAttachments?.name">
|
||||
<View @click="openFile(proviteData?.additionalAttachments?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.additionalAttachments?.url">
|
||||
{{ proviteData?.additionalAttachments?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="入网评估报告">
|
||||
<div v-for="item in netInReportList">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理评估报告">
|
||||
<div v-for="item in governReportList">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="信息安全检测报告" >
|
||||
<el-icon class="elView" v-if="form.informationSecurityTestReport[0]?.name">
|
||||
<View @click="openFile(form.informationSecurityTestReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.informationSecurityTestReport[0]?.url">
|
||||
{{ form.informationSecurityTestReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="入网设计方案审查报告" >
|
||||
<div v-for="item in form.NetReport">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理工程验收报告" >
|
||||
<div v-for="item in form.governReport">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="验收检验报告单" >
|
||||
<el-icon class="elView" v-if="form.acceptanceInspectionReportSingle[0]?.name">
|
||||
<View @click="openFile(form.acceptanceInspectionReportSingle[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.acceptanceInspectionReportSingle[0]?.url">
|
||||
{{ form.acceptanceInspectionReportSingle[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="验收检验报告" >
|
||||
<el-icon class="elView" v-if="form.acceptanceInspectionReport[0]?.name">
|
||||
<View @click="openFile(form.acceptanceInspectionReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.acceptanceInspectionReport[0]?.url">
|
||||
{{ form.acceptanceInspectionReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="型式实验报告" >
|
||||
<el-icon class="elView" v-if="form.typeExperimentReport[0]?.name">
|
||||
<View @click="openFile(form.typeExperimentReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.typeExperimentReport[0]?.url">
|
||||
{{ form.typeExperimentReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出厂检验报告" >
|
||||
<el-icon class="elView" v-if="form.factoryInspectionReport[0]?.name">
|
||||
<View @click="openFile(form.factoryInspectionReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.factoryInspectionReport[0]?.url">
|
||||
{{ form.factoryInspectionReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性能检测报告" >
|
||||
<el-icon class="elView" v-if="form.performanceTestReport[0]?.name">
|
||||
<View @click="openFile(form.performanceTestReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.performanceTestReport[0]?.url">
|
||||
{{ form.performanceTestReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主接线图" >
|
||||
<el-icon class="elView" v-if="form.mainWiringDiagram[0]?.name">
|
||||
<View @click="openFile(form.mainWiringDiagram[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.mainWiringDiagram[0]?.url">
|
||||
{{ form.mainWiringDiagram[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试运行报告" >
|
||||
<el-icon class="elView" v-if="form.runTheReport[0]?.name">
|
||||
<View @click="openFile(form.runTheReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.runTheReport[0]?.url">
|
||||
{{ form.runTheReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getUserReportById, getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import PreviewFile from '@/components/PreviewFile/index.vue'
|
||||
import { getByDeptDevLine } from '@/api/supervision-boot/interfere/index'
|
||||
import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined),
|
||||
update: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openType: {
|
||||
type: String,
|
||||
default: 'create'
|
||||
}
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const devIdList = ref([])
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const netInReportList: any = ref([])
|
||||
const governReportList: any = ref([])
|
||||
//用户性质数组
|
||||
const userTypeList = reactive([
|
||||
{
|
||||
label: '新建电网工程',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '扩建电网工程',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '新建非线性负荷用户',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '扩建非线性负荷用户',
|
||||
value: '3'
|
||||
},
|
||||
{
|
||||
label: '新建新能源发电站',
|
||||
value: '4'
|
||||
},
|
||||
{
|
||||
label: '扩建新能源发电站',
|
||||
value: '5'
|
||||
},
|
||||
{
|
||||
label: '敏感及重要用户',
|
||||
value: '6'
|
||||
}
|
||||
])
|
||||
//用户状态数组
|
||||
const userStateList = reactive([
|
||||
{
|
||||
label: '可研',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '建设',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '退运',
|
||||
value: '3'
|
||||
}
|
||||
])
|
||||
const form: any = ref({
|
||||
NetReport: [], //入网设计方案审查报告:
|
||||
governReport: [], //治理工程验收报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||
acceptanceInspectionReport: [], //验收检验报告:
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
factoryInspectionReport: [], //出厂检验报告:
|
||||
performanceTestReport: [], //性能检测报告
|
||||
mainWiringDiagram: [], //主接线图:
|
||||
runTheReport: [] //试运行报告
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//字典获取所在地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典获取敏感电能质量指标
|
||||
const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
||||
//字典获取行业类型
|
||||
const industryList = dictData.getBasicData('industry_type_jb')
|
||||
//字典电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典评估类型
|
||||
const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
|
||||
//字典预测评估单位
|
||||
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
|
||||
const loadLevelOptionList = dictData.getBasicData('load_level')
|
||||
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
if (props.update) {
|
||||
await getUserReportUpdateById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data.userReportMessageJson
|
||||
getProviteData()
|
||||
})
|
||||
} else {
|
||||
await getUserReportById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
getProviteData()
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
|
||||
queryFiles()
|
||||
}
|
||||
const proviteData = ref()
|
||||
//可研报告
|
||||
const feasibilityReportRef: any = ref(null)
|
||||
//项目初步设计说明书
|
||||
const preliminaryDesignDescriptionRef: any = ref(null)
|
||||
//预测评估报告
|
||||
const predictionEvaluationReportRef: any = ref(null)
|
||||
//预测评估评审意见报告
|
||||
const predictionEvaluationReviewOpinionsRef: any = ref(null)
|
||||
//用户接入变电站主接线示意图
|
||||
const substationMainWiringDiagramRef: any = ref(null)
|
||||
//主要敏感终端清单
|
||||
const sensitiveDevicesRef: any = ref(null)
|
||||
//抗扰度测试报告
|
||||
const antiInterferenceReportRef: any = ref(null)
|
||||
//背景电能质量测试报告
|
||||
const powerQualityReportRef: any = ref(null)
|
||||
//其他附件
|
||||
const additionalAttachmentsRef: any = ref(null)
|
||||
//预览
|
||||
const preview = (val: any, url: any) => {
|
||||
nextTick(() => {
|
||||
//可研报告
|
||||
if (val == 'feasibilityReport') {
|
||||
feasibilityReportRef?.value.open(url)
|
||||
}
|
||||
//项目初步设计说明书
|
||||
if (val == 'preliminaryDesignDescription') {
|
||||
preliminaryDesignDescriptionRef?.value.open(url)
|
||||
}
|
||||
//预测评估报告
|
||||
if (val == 'predictionEvaluationReport') {
|
||||
console.log(url, '9999999')
|
||||
predictionEvaluationReportRef?.value.open(url)
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
if (val == 'predictionEvaluationReviewOpinions') {
|
||||
predictionEvaluationReviewOpinionsRef?.value.open(url)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (val == 'substationMainWiringDiagram') {
|
||||
substationMainWiringDiagramRef?.value.open(url)
|
||||
}
|
||||
//主要敏感终端清单
|
||||
if (val == 'sensitiveDevices') {
|
||||
sensitiveDevicesRef?.value.open(url)
|
||||
}
|
||||
//抗扰度测试报告
|
||||
if (val == 'antiInterferenceReport') {
|
||||
antiInterferenceReportRef?.value.open(url)
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
if (val == 'powerQualityReport') {
|
||||
powerQualityReportRef?.value.open(url)
|
||||
}
|
||||
//其他附件
|
||||
if (val == 'additionalAttachments') {
|
||||
additionalAttachmentsRef?.value.open(url)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const queryFiles = () => {
|
||||
getFileById({ id: props.id }).then(res => {
|
||||
res.data.forEach((item: any) => {
|
||||
if (item.url.length > 0) getFileNamePaths(item.url, item.name)
|
||||
})
|
||||
})
|
||||
}
|
||||
//判断userType选择取用的对象
|
||||
const getProviteData = async () => {
|
||||
if (detailData.value.userType == '0' || detailData.value.userType == '1') {
|
||||
proviteData.value = detailData.value.userReportProjectPO
|
||||
//查询非线性终端类型
|
||||
await getDictTreeById(proviteData.value.nonlinearDeviceType).then(res => {
|
||||
proviteData.value.nonlinearDeviceType = res.data?.name
|
||||
})
|
||||
} else if (
|
||||
detailData.value.userType == '2' ||
|
||||
detailData.value.userType == '3' ||
|
||||
detailData.value.userType == '4' ||
|
||||
detailData.value.userType == '5'
|
||||
) {
|
||||
proviteData.value = detailData.value.userReportSubstationPO
|
||||
//查询非线性负荷类型
|
||||
await getDictTreeById(proviteData.value.nonlinearLoadType).then(res => {
|
||||
proviteData.value.nonlinearLoadType = res.data?.name
|
||||
})
|
||||
} else {
|
||||
proviteData.value = detailData.value.userReportSensitivePO
|
||||
}
|
||||
//可研报告
|
||||
if (proviteData.value.feasibilityReport) {
|
||||
await getFileNamePath(proviteData.value.feasibilityReport, 'feasibilityReport')
|
||||
}
|
||||
//项目初步设计说明书
|
||||
if (proviteData.value.preliminaryDesignDescription) {
|
||||
await getFileNamePath(proviteData.value.preliminaryDesignDescription, 'preliminaryDesignDescription')
|
||||
}
|
||||
//预测评估报告
|
||||
if (proviteData.value.predictionEvaluationReport) {
|
||||
await getFileNamePath(proviteData.value.predictionEvaluationReport, 'predictionEvaluationReport')
|
||||
}
|
||||
|
||||
//预测评估评审意见报告
|
||||
if (proviteData.value.predictionEvaluationReviewOpinions) {
|
||||
await getFileNamePath(
|
||||
proviteData.value.predictionEvaluationReviewOpinions,
|
||||
'predictionEvaluationReviewOpinions'
|
||||
)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (proviteData.value.substationMainWiringDiagram) {
|
||||
await getFileNamePath(proviteData.value.substationMainWiringDiagram, 'substationMainWiringDiagram')
|
||||
}
|
||||
|
||||
//主要敏感终端清单
|
||||
if (proviteData.value.sensitiveDevices) {
|
||||
await getFileNamePath(proviteData.value.sensitiveDevices, 'sensitiveDevices')
|
||||
}
|
||||
|
||||
//抗扰度测试报告
|
||||
if (proviteData.value.antiInterferenceReport) {
|
||||
await getFileNamePath(proviteData.value.antiInterferenceReport, 'antiInterferenceReport')
|
||||
}
|
||||
|
||||
//背景电能质量测试报告
|
||||
if (proviteData.value.powerQualityReport) {
|
||||
await getFileNamePath(proviteData.value.powerQualityReport, 'powerQualityReport')
|
||||
}
|
||||
|
||||
//其他附件
|
||||
if (proviteData.value.additionalAttachments) {
|
||||
getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
|
||||
}
|
||||
|
||||
// 入网评估报告
|
||||
if (detailData.value.netInReport.length > 0) {
|
||||
netInReportList.value = []
|
||||
detailData.value.netInReport.forEach((item: any) => {
|
||||
if (item != null) {
|
||||
getFileNamePath(item, 'netInReport')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 治理评估告"
|
||||
if (detailData.value.governReport.length > 0) {
|
||||
governReportList.value = []
|
||||
detailData.value.governReport.forEach((item: any) => {
|
||||
if (item != null) {
|
||||
getFileNamePath(item, 'governReport')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 调用关联终端接口
|
||||
getByDeptDevLine({ id: detailData.value.orgId }).then(res => {
|
||||
devIdList.value = res.data.filter((item: any) => item.devId == detailData.value.devId)
|
||||
})
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data && res.data.name && res.data.url) {
|
||||
//可研报告
|
||||
if (pathName == 'feasibilityReport' && proviteData.value.feasibilityReport) {
|
||||
proviteData.value.feasibilityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//项目初步设计说明书
|
||||
else if (pathName == 'preliminaryDesignDescription' && proviteData.value.preliminaryDesignDescription) {
|
||||
proviteData.value.preliminaryDesignDescription = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'predictionEvaluationReport' && proviteData.value.predictionEvaluationReport) {
|
||||
proviteData.value.predictionEvaluationReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
else if (
|
||||
pathName == 'predictionEvaluationReviewOpinions' &&
|
||||
proviteData.value.predictionEvaluationReviewOpinions
|
||||
) {
|
||||
proviteData.value.predictionEvaluationReviewOpinions = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'substationMainWiringDiagram' && proviteData.value.substationMainWiringDiagram) {
|
||||
proviteData.value.substationMainWiringDiagram = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感终端清单
|
||||
else if (pathName == 'sensitiveDevices' && proviteData.value.sensitiveDevices) {
|
||||
proviteData.value.sensitiveDevices = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//抗扰度测试报告
|
||||
else if (pathName == 'antiInterferenceReport' && proviteData.value.antiInterferenceReport) {
|
||||
proviteData.value.antiInterferenceReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
else if (pathName == 'powerQualityReport' && proviteData.value.powerQualityReport) {
|
||||
proviteData.value.powerQualityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//其他附件
|
||||
else if (pathName == 'additionalAttachments' && proviteData.value.additionalAttachments) {
|
||||
proviteData.value.additionalAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
|
||||
if (pathName == 'netInReport') {
|
||||
netInReportList.value.push({
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
})
|
||||
} else if (pathName == 'governReport') {
|
||||
governReportList.value.push({
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const getFileNamePaths = async (val: any, pathName: any) => {
|
||||
let data = val.split(',')
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
await getFileNameAndFilePath({ filePath: '/supervision/' + data[i] }).then(res => {
|
||||
res.data.name = res.data.fileName
|
||||
form.value[pathName].push(res.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
watch(
|
||||
() => props.id,
|
||||
(val, oldVal) => {
|
||||
val && getInfo()
|
||||
}
|
||||
)
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
// float: right;
|
||||
}
|
||||
// .el-icon {
|
||||
// float: left;
|
||||
// }
|
||||
// a {
|
||||
// display: block;
|
||||
// width: 200px;
|
||||
// float: right;
|
||||
// }
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='运行状态'>
|
||||
<el-select v-model="tableStore.table.params.runF" clearable placeholder="请选择运行状态">
|
||||
<el-option
|
||||
v-for="item in runFlagList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='信息查询'>
|
||||
<el-input style="width:200px;" placeholder="电站名称,终端编号,型号" v-model='tableStore.table.params.searchValue' clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</template>
|
||||
<template #operation>
|
||||
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' />
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const istatusList = dictData.getBasicData('On-network_Status')
|
||||
const TableHeaderRef = ref()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const tableStore = new TableStore({
|
||||
url: '/device-boot/runManage/getDeviceLedger',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
/* { title: '序号', type: 'seq', width: 80 },*/
|
||||
{
|
||||
field: 'areaName',
|
||||
title: '省公司',
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
field: 'gdName',
|
||||
title: '市公司',
|
||||
minWidth: 150
|
||||
},
|
||||
{ field: 'bdName', title: '所属变电站', minWidth: 120 },
|
||||
{ field: 'devName', title: '终端编号', minWidth: 110 },
|
||||
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
|
||||
{
|
||||
field: 'manufacturer',
|
||||
title: '厂家',
|
||||
minWidth: 80
|
||||
},
|
||||
{ field: 'devType', title: '终端型号', minWidth: 100 },
|
||||
|
||||
{ field: 'ip', title: '终端网络参数', minWidth: 100 },
|
||||
{ field: 'port', title: '端口号', minWidth: 40 },
|
||||
{
|
||||
field: 'runFlag',
|
||||
title: '运行状态',
|
||||
minWidth: 80,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
'投运': 'success',
|
||||
'停运': 'danger',
|
||||
'检修': 'warning',
|
||||
'调试': 'warning',
|
||||
'退运': 'danger',
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/* {
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
}*/
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.serverName = 'harmonic-boot'
|
||||
tableStore.table.params.statisticalType = {
|
||||
name: '电网拓扑',
|
||||
code: 'Power_Network'
|
||||
}
|
||||
|
||||
tableStore.table.params.runFlag = []
|
||||
if(tableStore.table.params.runF!=null){
|
||||
tableStore.table.params.runFlag = [tableStore.table.params.runF]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.runF=null
|
||||
tableStore.table.params.runFlag=[]
|
||||
tableStore.table.params.searchValue=''
|
||||
|
||||
const runFlagList = [{id:0,name:'投运'},{id:1,name:'检修'},{id:2,name:'停运'},{id:3,name:'调试'},{id:4,name:'退运'}]
|
||||
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,385 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
||||
:value="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">模板下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||
</el-dialog>
|
||||
<!-- 批量导入 -->
|
||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
const addForms = ref()
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const loading = ref(false)
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getInterferenceUserPage',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
|
||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '可研',
|
||||
1: '建设',
|
||||
2: '运行',
|
||||
3: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详细信息',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
lookInfo(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
// showDisabled: row => {
|
||||
// return (
|
||||
// (row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
||||
// !(row.dataType == 1)
|
||||
// )
|
||||
// },
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
|
||||
click: row => {
|
||||
addForms.value.filterUsers([6])
|
||||
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.setcontroFlag()
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
|
||||
const userId = ref()
|
||||
const dialogShow = ref(false)
|
||||
|
||||
const lookInfo = (id: string) => {
|
||||
userId.value = id
|
||||
dialogShow.value = true
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
dataType: 1,
|
||||
reason: value
|
||||
}
|
||||
await cancelFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
const addFormModel = () => {
|
||||
addForms.value.filterUsers([6])
|
||||
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '用户档案录入'
|
||||
})
|
||||
})
|
||||
}
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
//导出模板
|
||||
const exportExcelTemplate = async() => {
|
||||
loading.value = true
|
||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '干扰源用户台账模板'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
},0)
|
||||
}
|
||||
|
||||
//批量导入用户数据
|
||||
const importUserData = () => {
|
||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||
}
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getUserReportById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.setcontroFlag()
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label='运行状态'>
|
||||
<el-select v-model="tableStore.table.params.runF" clearable placeholder="请选择运行状态">
|
||||
<el-option
|
||||
v-for="item in runFlagList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息查询">
|
||||
<el-input style="width:240px;" placeholder="电站名称,终端编号,监测点名称" v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</template>
|
||||
|
||||
<template #operation>
|
||||
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const istatusList = dictData.getBasicData('On-network_Status')
|
||||
const TableHeaderRef = ref()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const tableStore = new TableStore({
|
||||
url: '/device-boot/runManage/getLineLedger',
|
||||
publicHeight: 65,
|
||||
isWebPaging: true,
|
||||
method: 'POST',
|
||||
column: [
|
||||
/* { title: '序号', type: 'seq', width: 80 },*/
|
||||
|
||||
{
|
||||
field: 'areaName',
|
||||
title: '省公司',
|
||||
minWidth: 100
|
||||
},
|
||||
|
||||
{ field: 'gdName', title: '市公司', minWidth: 150 },
|
||||
{
|
||||
field: 'bdName',
|
||||
title: '所属变电站',
|
||||
minWidth: 150
|
||||
},
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 130 },
|
||||
{ field: 'scale', title: '监测点电压等级', minWidth: 120 },
|
||||
|
||||
{ field: 'loadType', title: '干扰源类型', minWidth: 120 },
|
||||
{ field: 'objName', title: '监测对象名称', minWidth: 180 },
|
||||
{
|
||||
field: 'shortCapacity',
|
||||
title: '最小短路容量(MVA)',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
field: 'devCapacity',
|
||||
title: '供电终端容量(MVA )',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
field: 'dealCapacity',
|
||||
title: '用户协议容量(MVA)',
|
||||
minWidth: 150
|
||||
},
|
||||
/* { field: 'comFlag', title: '通讯状态 ', minWidth: 120 },*/
|
||||
{ field: 'id', title: '监测点序号', minWidth: 90 },
|
||||
{
|
||||
field: 'runFlag',
|
||||
title: '运行状态',
|
||||
minWidth: 80,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
'投运': 'success',
|
||||
'停运': 'danger',
|
||||
'检修': 'warning',
|
||||
'调试': 'warning',
|
||||
'退运': 'danger',
|
||||
|
||||
},
|
||||
},
|
||||
{ field: 'devName', title: '监测终端编号 ', minWidth: 140 },
|
||||
{ field: 'ptType', title: '监测终端接线方式', minWidth: 140 },
|
||||
{
|
||||
field: 'voltageDev',
|
||||
title: '电压偏差上限(%)',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
field: 'uvoltageDev',
|
||||
title: '电压偏差下限(%)',
|
||||
minWidth: 120
|
||||
},
|
||||
|
||||
|
||||
/* {
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
}*/
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.serverName = 'harmonic-boot'
|
||||
|
||||
tableStore.table.params.runFlag = []
|
||||
if(tableStore.table.params.runF!=null){
|
||||
tableStore.table.params.runFlag = [tableStore.table.params.runF]
|
||||
}
|
||||
tableStore.table.params.comFlag = [0, 1]
|
||||
tableStore.table.params.statisticalType = {
|
||||
name: '电网拓扑',
|
||||
code: 'Power_Network'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.runF=null
|
||||
tableStore.table.params.runFlag=[]
|
||||
tableStore.table.params.searchValue=''
|
||||
|
||||
|
||||
const runFlagList = [{id:0,name:'运行'},{id:1,name:'检修'},{id:2,name:'停运'},{id:3,name:'调试'},{id:4,name:'退运'}]
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker></TableHeader>
|
||||
<div style="display: flex" v-loading="tableStore.table.loading" :style="{ height: height }">
|
||||
<MyEchart :options="options1" />
|
||||
<MyEchart :options="options2" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { ref, provide, onMounted } from 'vue'
|
||||
const options1 = ref()
|
||||
const options2 = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/process/pmsTerminalDetection/getStatistics',
|
||||
method: 'POST',
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.id = tableStore.table.params.deptIndex
|
||||
},
|
||||
loadCallback: () => {
|
||||
options1.value = {
|
||||
legend: {
|
||||
data: ['日检测终端数量']
|
||||
},
|
||||
xAxis: {
|
||||
data: tableStore.table.data.dateStatistics.map((item:any) => item.statisticsDate)
|
||||
},
|
||||
yAxis: {
|
||||
name: '台'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '日检测终端数量',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.dateStatistics.map((item:any) => item.count)
|
||||
}
|
||||
]
|
||||
}
|
||||
options2.value = {
|
||||
legend: {
|
||||
data: ['检测终端数量']
|
||||
},
|
||||
xAxis: {
|
||||
data: tableStore.table.data.orgStatistics.map((item:any) => item.orgName)
|
||||
},
|
||||
yAxis: {
|
||||
name: '台'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '检测终端数量',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.orgStatistics.map((item:any) => item.count)
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const height = mainHeight(160).height
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
372
src/views/pqs/supervise_jb/terminal/components/networkTab.vue
Normal file
372
src/views/pqs/supervise_jb/terminal/components/networkTab.vue
Normal file
@@ -0,0 +1,372 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="终端名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.name"
|
||||
clearable
|
||||
placeholder="请输入终端名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.manufacture"
|
||||
placeholder="请选择生产厂家"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
class="select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in manufactorList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检测结果">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.testResults"
|
||||
placeholder="请选择检测结果"
|
||||
clearable
|
||||
class="select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in testResultsList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="Export">下载模板</el-button>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls"
|
||||
:on-change="choose"
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button
|
||||
icon="el-icon-Upload"
|
||||
type="primary"
|
||||
style="margin-left: 12px; margin-right: 12px"
|
||||
>
|
||||
excel导入
|
||||
</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传原始报告</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<newlyIncreased ref="addRef" @onsubmit="tableStore.index()" />
|
||||
<!-- 上传原始报告 -->
|
||||
<el-dialog
|
||||
draggable
|
||||
title="上传原始报告__支持批量上传"
|
||||
v-model="showBatchUpload"
|
||||
width="30%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-upload
|
||||
multiple
|
||||
action=""
|
||||
:auto-upload="false"
|
||||
:limit="999"
|
||||
accept=".doc,.docx"
|
||||
:file-list="fileList"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="chooseBatch"
|
||||
ref="upload"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||
<span :style="`color:#f58003`"> (*传入的原始数据文件格式(终端编号-原始数据报告.docx))</span>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import newlyIncreased from './add.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import {
|
||||
DownloadExport,
|
||||
reportDownload,
|
||||
batchTerminal,
|
||||
delTerminal,
|
||||
getTerminalPage,
|
||||
importReport
|
||||
} from '@/api/process-boot/terminal'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||
const testResultsList = [
|
||||
{
|
||||
id: 0,
|
||||
name: '未展开'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已展开'
|
||||
}
|
||||
]
|
||||
|
||||
const fileList: any = ref([])
|
||||
const TableHeaderRef = ref()
|
||||
const addRef = ref()
|
||||
const showBatchUpload = ref(false)
|
||||
const tableRef = ref()
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||
publicHeight: 85,
|
||||
method: 'POST',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox' },
|
||||
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{ field: 'id', title: '终端编号' },
|
||||
{ field: 'name', title: '终端名称' },
|
||||
{
|
||||
field: 'manufacture',
|
||||
title: '生产厂家',
|
||||
formatter(row: any) {
|
||||
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'installPlace', title: '安装位置' },
|
||||
{ field: 'inspectionUnit', title: '送检单位' },
|
||||
{
|
||||
field: 'testResults',
|
||||
title: '检测结果',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未展开',
|
||||
1: '已展开'
|
||||
}
|
||||
},
|
||||
{ field: 'inspectionTime', title: '检测时间' },
|
||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '250',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
addRef.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
delTerminal([row.id]).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载原始数据报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.originalReport == null
|
||||
},
|
||||
click: row => {
|
||||
download(row, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载检测报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.inspectionReport == null
|
||||
},
|
||||
click: row => {
|
||||
download(row, 1)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
tableStore.table.params.name = ''
|
||||
tableStore.table.params.id = dictData.state.area[0].id
|
||||
tableStore.table.params.testResults = ''
|
||||
tableStore.table.params.manufacture = []
|
||||
tableStore.table.params.type = 0
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const add = () => {
|
||||
addRef.value.open({
|
||||
title: '新增'
|
||||
})
|
||||
}
|
||||
|
||||
// 下载模版
|
||||
const Export = () => {
|
||||
DownloadExport().then((res: any) => {
|
||||
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 = '终端入网检测录入模板' // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
// 下载报告
|
||||
const download = (row: any, type: number) => {
|
||||
reportDownload({
|
||||
id: row.id,
|
||||
type: type
|
||||
}).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
// excel导入
|
||||
const choose = (e: any) => {
|
||||
batchTerminal(e.raw).then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功,无错误数据!')
|
||||
tableStore.index()
|
||||
} else {
|
||||
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
||||
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 = '模板错误信息' // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getTerminalPage(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '终端入网检测', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// 上传原始报告
|
||||
const UploadOriginal = () => {
|
||||
showBatchUpload.value = true
|
||||
}
|
||||
// 上传
|
||||
const BatchUpload = () => {
|
||||
let form = new FormData()
|
||||
form.append('type', '0')
|
||||
fileList.value.forEach((item: any) => {
|
||||
form.append('files', item.raw)
|
||||
})
|
||||
importReport(form)
|
||||
.then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功!')
|
||||
handleClose()
|
||||
tableStore.index()
|
||||
} else {
|
||||
ElMessage.error('上传失败!')
|
||||
}
|
||||
})
|
||||
.catch(response => {
|
||||
// console.log(response);
|
||||
})
|
||||
// fileList.value
|
||||
}
|
||||
const chooseBatch = (e: any) => {
|
||||
fileList.value.push(e)
|
||||
}
|
||||
const handleRemove = (e: any) => {
|
||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||
}
|
||||
const handleClose = () => {
|
||||
fileList.value = []
|
||||
showBatchUpload.value = false
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,233 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
draggable
|
||||
class="cn-operate-dialog"
|
||||
v-model="eventDataUploadVisible"
|
||||
:title="title"
|
||||
style="width: 415px"
|
||||
top="25vh"
|
||||
>
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" ref="formRef">
|
||||
<el-form-item label="用户数据文件">
|
||||
<el-upload
|
||||
v-model:file-list="fileList"
|
||||
ref="uploadEventData"
|
||||
action=""
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
:on-change="choose"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">选择数据文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="eventDataUploadVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, inject } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { importSensitiveUserData, importSensitiveReportData } from '@/api/supervision-boot/userReport/form'
|
||||
|
||||
const fileList = ref<UploadUserFile[]>([])
|
||||
|
||||
const formRef = ref()
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const eventDataUploadVisible = ref(false)
|
||||
const title = ref('')
|
||||
const uploadEventData = ref<UploadInstance>()
|
||||
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive({
|
||||
file: null
|
||||
})
|
||||
|
||||
//弹出界面,默认选择用户的第一个生产线的第一条进线进行数据导入
|
||||
const open = async (text: string) => {
|
||||
title.value = text
|
||||
resetForm()
|
||||
form.file = null
|
||||
fileList.value = []
|
||||
eventDataUploadVisible.value = true
|
||||
}
|
||||
|
||||
//重置表单内容
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择待上传文件
|
||||
*/
|
||||
const choose = (e: any) => {
|
||||
form.file = e.raw
|
||||
}
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadEventData.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadEventData.value!.handleStart(file)
|
||||
fileList.value = [{ name: file.name, url: '' }]
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = async () => {
|
||||
if (form.file) {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let data = new FormData()
|
||||
data.append('file', form.file)
|
||||
if (title.value === '导入干扰源用户') {
|
||||
await importSensitiveReportData(data)
|
||||
.then(res => handleImportResponse(title.value, res))
|
||||
.finally(() => {
|
||||
tableStore.index()
|
||||
eventDataUploadVisible.value = false
|
||||
})
|
||||
} else {
|
||||
await importSensitiveUserData(data)
|
||||
.then(res => handleImportResponse(title.value, res))
|
||||
.finally(() => {
|
||||
tableStore.index()
|
||||
eventDataUploadVisible.value = false
|
||||
})
|
||||
}
|
||||
// if (title.value == '导入干扰源用户') {
|
||||
// await importSensitiveReportData(data)
|
||||
// .then((res: any) => {
|
||||
// if (res.type === 'application/json') {
|
||||
// // 说明是普通对象数据,读取信息
|
||||
// const fileReader = new FileReader()
|
||||
// fileReader.onloadend = () => {
|
||||
// try {
|
||||
// const jsonData = JSON.parse(fileReader.result)
|
||||
// // 后台信息
|
||||
// if (jsonData.code === 'A0000') {
|
||||
// ElMessage.success('导入成功')
|
||||
// } else {
|
||||
// ElMessage.error('导入失败,请查看下载附件!')
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
// }
|
||||
// fileReader.readAsText(res)
|
||||
// } else {
|
||||
// ElMessage.error('导入失败,请查看下载附件!')
|
||||
// let blob = new Blob([res], {
|
||||
// type: 'application/vnd.ms-excel'
|
||||
// })
|
||||
// const url = window.URL.createObjectURL(blob)
|
||||
// const link = document.createElement('a')
|
||||
// link.href = url
|
||||
// link.download = '干扰源用户失败列表'
|
||||
// document.body.appendChild(link)
|
||||
// link.click()
|
||||
// link.remove()
|
||||
// }
|
||||
// })
|
||||
// .finally(() => {
|
||||
// tableStore.index()
|
||||
// eventDataUploadVisible.value = false
|
||||
// })
|
||||
// } else {
|
||||
// await importSensitiveUserData(data)
|
||||
// .then((res: any) => {
|
||||
// if (res.type === 'application/json') {
|
||||
// // 说明是普通对象数据,读取信息
|
||||
// const fileReader = new FileReader()
|
||||
// fileReader.onloadend = () => {
|
||||
// try {
|
||||
// const jsonData = JSON.parse(fileReader.result)
|
||||
// // 后台信息
|
||||
// if (jsonData.code === 'A0000') {
|
||||
// ElMessage.success('导入成功')
|
||||
// } else {
|
||||
// ElMessage.error('导入失败,请查看下载附件!')
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
// }
|
||||
// fileReader.readAsText(res)
|
||||
// } else {
|
||||
// ElMessage.error('导入失败,请查看下载附件!')
|
||||
// let blob = new Blob([res], {
|
||||
// type: 'application/vnd.ms-excel'
|
||||
// })
|
||||
// const url = window.URL.createObjectURL(blob)
|
||||
// const link = document.createElement('a')
|
||||
// link.href = url
|
||||
// link.download = '敏感及重要用户失败列表'
|
||||
// document.body.appendChild(link)
|
||||
// link.click()
|
||||
// link.remove()
|
||||
// }
|
||||
// })
|
||||
// .finally(() => {
|
||||
// tableStore.index()
|
||||
// eventDataUploadVisible.value = false
|
||||
// })
|
||||
// }
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElMessage.error('请选择数据文件')
|
||||
}
|
||||
}
|
||||
|
||||
async function handleImportResponse(title: any, res: any) {
|
||||
if (res.type === 'application/json') {
|
||||
const fileReader = new FileReader()
|
||||
fileReader.onloadend = () => {
|
||||
try {
|
||||
const jsonData = JSON.parse(fileReader.result)
|
||||
if (jsonData.code === 'A0000') {
|
||||
ElMessage.success('导入成功')
|
||||
} else {
|
||||
ElMessage.error('导入失败,请查看下载附件!')
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
fileReader.readAsText(res)
|
||||
} else {
|
||||
ElMessage.error('导入失败,请查看下载附件!')
|
||||
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = title.includes('干扰源用户') ? '干扰源用户失败列表' : '敏感及重要用户失败列表'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-form-item__content div {
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
||||
:value="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">模版下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<el-dialog title="详情" width="80%" v-model="dialogShow">
|
||||
<DetailInfo :id="userId"></DetailInfo>
|
||||
</el-dialog>
|
||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create" :submissionControl="false"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||
import { downloadSensitiveUserTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const loading = ref(false)
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const loadLevelOptionList = dictData.getBasicData('load_level')
|
||||
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getSensitiveUserPage',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
{
|
||||
field: 'substation',
|
||||
title: '厂站名称',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
|
||||
{
|
||||
field: 'userReportSensitivePO.loadLevel',
|
||||
title: '负荷级别',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return loadLevelOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'userReportSensitivePO.powerSupplyInfo',
|
||||
title: '供电电源情况',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return powerSupplyInfoOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '可研',
|
||||
1: '建设',
|
||||
2: '运行',
|
||||
3: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详细信息',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
lookInfo(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return (
|
||||
(row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
||||
!(row.dataType == 1)
|
||||
)
|
||||
},
|
||||
// disabled: row => {
|
||||
// return !(row.status == 0)
|
||||
// },
|
||||
click: row => {
|
||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
const addForms = ref()
|
||||
const userId = ref()
|
||||
const dialogShow = ref(false)
|
||||
|
||||
const lookInfo = (id: string) => {
|
||||
userId.value = id
|
||||
dialogShow.value = true
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 新增
|
||||
const addFormModel = () => {
|
||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||
|
||||
addForms.value.open({
|
||||
title: '用户档案录入'
|
||||
})
|
||||
}
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
|
||||
//导出模板
|
||||
const exportExcelTemplate = async () => {
|
||||
loading.value = true
|
||||
await downloadSensitiveUserTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '敏感及重要用户模板'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
//批量导入用户数据
|
||||
const importUserData = () => {
|
||||
sensitiveUserPopup.value.open('导入敏感及重要用户')
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader datePicker area nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="信息查询">
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
placeholder="请输入变电站/监测点名称"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation></template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :showOverflow="false" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/harmonic-boot/PollutionSubstation/substationInfo',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
isWebPaging: true,
|
||||
paramsPOST: true,
|
||||
column: [
|
||||
{ field: 'deptName', title: '所在地市', minWidth: 100 },
|
||||
{ field: 'substationName', title: '变电站名称', minWidth: 100 },
|
||||
|
||||
{
|
||||
field: 'dwLineList',
|
||||
title: '电网侧监测点名称',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return obj.cellValue.length == 0 ? '/' : obj.cellValue.join('\n')
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'yhLineList',
|
||||
title: '非电网侧监测点名称',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return obj.cellValue.length == 0 ? '/' : obj.cellValue.join('\n')
|
||||
}
|
||||
},
|
||||
{ field: 'alarmFreq', title: '告警频次', minWidth: 80 },
|
||||
{ field: 'vpollutionData', title: '谐波电压污染值', minWidth: 80 },
|
||||
{ field: 'ipollutionData', title: '谐波电流污染值', minWidth: 80 }
|
||||
]
|
||||
})
|
||||
|
||||
tableStore.table.params.searchValue = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
66
src/views/pqs/supervise_jb/terminal/index.vue
Normal file
66
src/views/pqs/supervise_jb/terminal/index.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<el-tab-pane label='干扰源用户台账' name='1'>
|
||||
<interferenceUserTable :id='id' v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='敏感及重要用户台账' name='2'>
|
||||
<sensitiveUserTable v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='变电站台账' name='3'>
|
||||
<substationLedger v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='终端台账' name='4'>
|
||||
<deviceLedgerTable v-if="activeName == '4'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='监测点台账' name='5'>
|
||||
<monitorLedgerTable v-if="activeName == '5'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { onMounted, reactive, ref, provide } from 'vue'
|
||||
import interferenceUserTable from './components/interferenceUserTable.vue'
|
||||
import sensitiveUserTable from './components/sensitiveUserTable.vue'
|
||||
import substationLedger from './components/substationLedger.vue'
|
||||
import deviceLedgerTable from './components/deviceLedgerTable.vue'
|
||||
import monitorLedgerTable from './components/monitorLedgerTable.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const id = ref('')
|
||||
|
||||
defineOptions({
|
||||
name: 'Supervision/Terminaldetection'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('Supervision/Terminaldetection')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '1') {
|
||||
activeName.value = '1'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- <h1>详细信息回显</h1>-->
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="变电站">
|
||||
{{ detailData?.substation }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="供电公司">
|
||||
{{ detailData?.dept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端名称">
|
||||
{{ detailData?.deviceName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="逾期天数">
|
||||
<span
|
||||
:style="{ color: detailData?.overdueDay > 10 ? 'red' : detailData?.overdueDay > 3 ? 'yellow' : '' }"
|
||||
>
|
||||
{{ detailData?.overdueDay }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="流程状态">
|
||||
<el-tag :type="getDeviceStatusType(detailData?.status)">
|
||||
{{ getDeviceStatus(detailData?.status) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报告文件">
|
||||
<el-icon class="elView" v-if="detailData?.reportPaths?.fileName">
|
||||
<View @click="openFile(detailData?.reportPaths?.fileName)" />
|
||||
</el-icon>
|
||||
<a :href="detailData.reportPaths?.url">
|
||||
{{ detailData.reportPaths?.fileName }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="描述">
|
||||
{{ detailData?.description }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
defineOptions({ name: 'QuitRunningDeviceDetail' })
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
// import { querySurveyDetail } from '@/api/process-boot/generalTest'
|
||||
import { getInfoById } from '@/api/supervision-boot/cycleDetection/index'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
const { query } = useRoute() // 查询参数
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData: any = ref({}) // 详情数据
|
||||
const levelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
const aList: any = ref([]) // 详情数据
|
||||
const queryId = query.id // 从 URL 传递过来的 id 编号
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getInfoById({ id: props.id || queryId }).then(res => {
|
||||
detailData.value = res.data
|
||||
})
|
||||
await getFileNameAndFilePath({ filePath: detailData.value.checkFilePath }).then((res: any) => {
|
||||
detailData.value.reportPaths = res.data
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const getDeviceStatus = (status: number) => {
|
||||
if (status === 1) {
|
||||
return '审批中'
|
||||
}
|
||||
if (status === 2) {
|
||||
return '审批通过'
|
||||
}
|
||||
if (status === 3) {
|
||||
return '审批不通过'
|
||||
}
|
||||
if (status === 4) {
|
||||
return '已取消'
|
||||
}
|
||||
return '审批通过'
|
||||
}
|
||||
|
||||
const getDeviceStatusType = (status: number) => {
|
||||
if (status === 1) {
|
||||
return 'primary'
|
||||
}
|
||||
if (status === 2) {
|
||||
return 'success'
|
||||
}
|
||||
if (status === 3) {
|
||||
return 'danger'
|
||||
}
|
||||
if (status === 4) {
|
||||
return 'warning'
|
||||
}
|
||||
return 'success'
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<el-dialog draggable class='cn-operate-dialog' v-model='dialogVisible' :title='title' width='550px' top='20vh'>
|
||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
||||
|
||||
<el-form-item label='所属供电公司' >
|
||||
<el-input
|
||||
readonly
|
||||
v-model='form.dept'
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='终端名称' >
|
||||
<el-input
|
||||
readonly
|
||||
v-model='form.deviceName'
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item for='-' label='本次定检时间:' prop='nowCheckTime'>
|
||||
<el-date-picker
|
||||
v-model='form.nowCheckTime'
|
||||
placeholder='选择日期'
|
||||
format='YYYY-MM-DD'
|
||||
style='width: 100%'
|
||||
value-format='YYYY-MM-DD'
|
||||
type='date'
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item for='-' label='报告文件:' class='uploadFile' prop='reportPath'>
|
||||
<el-upload
|
||||
v-model:file-list='form.reportPath'
|
||||
ref='uploadRef'
|
||||
action=''
|
||||
accept=''
|
||||
:limit='1'
|
||||
:on-exceed='handleExceed'
|
||||
:on-change='choose'
|
||||
:auto-upload='false'
|
||||
:on-remove='removeFile'
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type='primary'>上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label='描述' prop='description'>
|
||||
<el-input
|
||||
type='textarea'
|
||||
clearable
|
||||
:autosize='{ minRows: 2, maxRows: 4 }'
|
||||
placeholder='请输入描述'
|
||||
v-model='form.description'
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<span class='dialog-footer'>
|
||||
<el-button @click='dialogVisible = false'>取消</el-button>
|
||||
<el-button type='primary' @click='submit'>确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { ref, inject } from 'vue'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { reload, submitDevice } from '@/api/supervision-boot/cycleDetection/index'
|
||||
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
//下拉数据源
|
||||
|
||||
const title = ref('')
|
||||
const formRef = ref()
|
||||
const reportPath = ref('')
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form: any = ref({
|
||||
id: '',
|
||||
reportPath: [],
|
||||
description: '',
|
||||
nowCheckTime: '',
|
||||
dept: '',
|
||||
deviceName: ''
|
||||
})
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
reportPath: [{ required: true, message: '请上传文件', trigger: 'change' }],
|
||||
nowCheckTime: [{ required: true, message: '请选择定检时间', trigger: 'change' }],
|
||||
description: [{ required: true, message: '请输入描述', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const open = async (text: string, tempData?: any) => {
|
||||
title.value = text
|
||||
if (tempData) {
|
||||
form.value.id = tempData.id
|
||||
form.value.dept = tempData.dept
|
||||
form.value.deviceName = tempData.deviceName
|
||||
form.value.status = tempData.status
|
||||
|
||||
if (tempData.status == null) {
|
||||
form.value.reportPath = []
|
||||
form.value.description = ''
|
||||
} else {
|
||||
form.value.reportPath = [{ name: tempData.checkFilePath.split('/')[2] }]
|
||||
form.value.description = tempData.description
|
||||
form.value.nowCheckTime = tempData.thisTimeCheck
|
||||
}
|
||||
}
|
||||
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
if (form.value.status == null) {
|
||||
submitDevice({ ...form.value, reportPath: reportPath.value }).then(res => {
|
||||
ElMessage({
|
||||
message: '提交成功!',
|
||||
type: 'success'
|
||||
})
|
||||
dialogVisible.value = false
|
||||
emits('onSubmit')
|
||||
})
|
||||
} else {
|
||||
reload({ ...form.value, reportPath: reportPath.value }).then(res => {
|
||||
ElMessage({
|
||||
message: '提交成功!',
|
||||
type: 'success'
|
||||
})
|
||||
dialogVisible.value = false
|
||||
emits('onSubmit')
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 上传报告
|
||||
const uploadRef = ref()
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
const choose = (e: any) => {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
reportPath.value = res.data.name
|
||||
// reportPath.value = '测试aaa'
|
||||
})
|
||||
}
|
||||
|
||||
//移除文件上传
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'>
|
||||
.el-upload-list__item {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
::v-deep .el-tree-node__children > div {
|
||||
display: block !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,284 @@
|
||||
<!---终端入网检测-->
|
||||
<template>
|
||||
<TableHeader area ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='搜索'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
placeholder='输入变电站.终端名称'
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='流程状态'>
|
||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||
<el-option
|
||||
v-for='item in statusSelect'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='处理状态'>
|
||||
<el-select v-model='tableStore.table.params.state' clearable placeholder='请选处理状态'>
|
||||
<el-option
|
||||
v-for='item in stateSelect'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' />
|
||||
<Form ref='FormRef' @onSubmit='tableStore.index()' />
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, onMounted, provide, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Form from './form.vue'
|
||||
import { cancel, getInfoById } from '@/api/supervision-boot/cycleDetection/index'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const FormRef = ref()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const stateSelect = [
|
||||
{
|
||||
id: 0,
|
||||
name: '未处理'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '处理中'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '已处理'
|
||||
}
|
||||
]
|
||||
//申请联调
|
||||
const debugForms = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/checkDevice/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ field: 'substation', title: '变电站' },
|
||||
|
||||
{ field: 'dept', title: '供电公司' },
|
||||
{
|
||||
field: 'deviceName',
|
||||
title: '终端名称'
|
||||
},
|
||||
{
|
||||
field: 'thisTimeCheck',
|
||||
title: '本次定检时间'
|
||||
},
|
||||
{
|
||||
field: 'nextTimeCheck',
|
||||
title: '下次定检时间'
|
||||
},
|
||||
{
|
||||
field: 'overdueDay',
|
||||
title: '逾期天数',
|
||||
type: 'html',
|
||||
formatter: (row: any) => {
|
||||
|
||||
let text = row.row.status == 2
|
||||
? '/'
|
||||
: `<span style='color: ${
|
||||
row.row.overdueDay > 10 ? 'red' : row.row.overdueDay > 3 ? 'yellow' : ''
|
||||
};text-decoration: none'>${row.row.overdueDay}</span>`
|
||||
|
||||
return text
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
5: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
5: '同步台账成功',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
},
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '报告上传',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status != null
|
||||
},
|
||||
click: row => {
|
||||
FormRef.value.open('报告上传', row)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
FormRef.value.open('重新发起', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: async row => {
|
||||
// cancelLeave(row)
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancel(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.statveList = [2]
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.state = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const addFormModel = () => {
|
||||
}
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
const props = defineProps(['id', 'businessKey'])
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getInfoById({ id: fullId }).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
if (props.businessKey == '3') {
|
||||
FormRef.value.open('报告上传', res.data)
|
||||
} else {
|
||||
FormRef.value.open('重新发起', res.data)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
::v-deep .el-input__wrapper {
|
||||
// width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
:title="title"
|
||||
width="30%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
:close-on-click-modal="false"
|
||||
:lazy="true"
|
||||
draggable
|
||||
>
|
||||
<!--监测点信息录入 基础信息+监测点信息 监测点信息要有用户名称、用户状态 -->
|
||||
<el-form
|
||||
:model="form"
|
||||
:validate-on-rule-change="false"
|
||||
:scroll-to-error="true"
|
||||
:rules="rules"
|
||||
ref="ruleFormRef"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-form-item label="原因:" prop="reason">
|
||||
<el-input
|
||||
v-model="form.reason"
|
||||
autocomplete="off"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
placeholder="请输入原因"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="confirmForm(true)">保存</el-button> -->
|
||||
<el-button type="primary" @click="confirmForm(false)" :loading="loading" >提交审批</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {
|
||||
addMointorPointTempLinedebug,
|
||||
updateMointorPointTempLinedebug
|
||||
} from '@/api/supervision-boot/jointDebugList/index'
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const props = defineProps({
|
||||
debugId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const form: any = ref({})
|
||||
const loading = ref(false)
|
||||
const ruleFormRef: any = ref(null)
|
||||
//定义切换form类型
|
||||
const selectFormType = ref('')
|
||||
selectFormType.value = '0'
|
||||
const resetForm = () => {
|
||||
form.value = {
|
||||
reason: '', //填报人
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
//初始化数据
|
||||
resetForm()
|
||||
//定义校验规则
|
||||
const rules = ref({
|
||||
//基础信息
|
||||
reason: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入原因',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
})
|
||||
watch(
|
||||
() => form.value,
|
||||
(val, oldVal) => {},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
const title = ref('')
|
||||
const open = (text: any, row: any) => {
|
||||
dialogFormVisible.value = true
|
||||
title.value = text
|
||||
form.value.id = row.id
|
||||
form.value.reason = row.reason
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
//取消表单校验状态
|
||||
ruleFormRef.value && ruleFormRef.value?.resetFields()
|
||||
dialogFormVisible.value = false
|
||||
emits('onSubmit')
|
||||
resetForm()
|
||||
}
|
||||
onMounted(() => {
|
||||
console.log()
|
||||
})
|
||||
|
||||
//设置工程投产日期时间选择范围不能<今天
|
||||
const disabledDate = time => {
|
||||
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||
}
|
||||
//提交
|
||||
const confirmForm = async (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
// 提交监测点信息
|
||||
|
||||
//提交监测点联调信息
|
||||
form.value.saveOrCheckflag = '1'
|
||||
await addMointorPointTempLinedebug(form.value).then(res => {
|
||||
ruleFormRef.value.resetFields()
|
||||
ElMessage.success('保存成功!')
|
||||
resetForm()
|
||||
close()
|
||||
})
|
||||
} else {
|
||||
// 提交监测点信息
|
||||
ruleFormRef.value.validate(async (valid) => {
|
||||
if (valid) {
|
||||
//提交监测点联调信息
|
||||
form.value.saveOrCheckflag = '2'
|
||||
if (!(title.value == '重新发起' || title.value == '编辑')) {
|
||||
await addMointorPointTempLinedebug(form.value).then(res => {
|
||||
ruleFormRef.value.resetFields()
|
||||
ElMessage.success('申请联调成功!')
|
||||
resetForm()
|
||||
close()
|
||||
})
|
||||
} else {
|
||||
await updateMointorPointTempLinedebug(form.value).then(res => {
|
||||
ruleFormRef.value.resetFields()
|
||||
ElMessage.success('重新发起成功!')
|
||||
resetForm()
|
||||
close()
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log('表单验证失败')
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="监测点名称">
|
||||
{{ detailData.lineName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="调试原因">
|
||||
{{ detailData.reason }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点编号">
|
||||
{{ detailData.lineId }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端编码">
|
||||
{{ detailData.monitoringTerminalCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端名称">
|
||||
{{ detailData.monitoringTerminalName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电网侧变电站">
|
||||
{{ detailData.powerSubstationName }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getMointorPointTempLinedebugDetail } from '@/api/supervision-boot/jointDebugList/index'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
const { query } = useRoute() // 查询参数
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getMointorPointTempLinedebugDetail({ id: props.id || queryId }).then(res => {
|
||||
detailData.value = res.data
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.default-main {
|
||||
// height: calc(100vh - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
}
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,359 @@
|
||||
<!---终端入网检测-->
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="搜索">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button> -->
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!-- 申请联调弹框 -->
|
||||
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import {
|
||||
getMointorPointTempLinedebugDetail,
|
||||
setTempLinedebugLedgerSync
|
||||
} from '@/api/supervision-boot/jointDebugList/index'
|
||||
import debug from './debug.vue'
|
||||
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { deleteTempLineDebugReport } from '@/api/supervision-boot/delete/index'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
statusSelect.push({ name: '同步台账成功', id: 5 })
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/tempLinedebug/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{
|
||||
field: 'powerSubstationName',
|
||||
title: '电网侧变电站',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 170 },
|
||||
{
|
||||
field: 'reason',
|
||||
title: '调试原因',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'lineId', title: '监测点编号', minWidth: 170 },
|
||||
// { field: 'monitoringTerminalCode', title: '终端编码', minWidth: 170 },
|
||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
5: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
5: '同步台账成功',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
},
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '编辑',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-Open',
|
||||
// render: 'basicButton',
|
||||
// showDisabled: row => {
|
||||
// return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
// },
|
||||
// disabled: row => {
|
||||
// return !(row.status == 0)
|
||||
// },
|
||||
// click: row => {
|
||||
// debugForms.value.open('编辑', row)
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '申请联调',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-add',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
// handleDebug(row)
|
||||
debugForms.value.open('申请联调', row)
|
||||
},
|
||||
disabled: row => {
|
||||
return row.reason
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
debugForms.value.open('重新发起', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '同步台账',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-add',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
setTempLinedebugLedgerSync({ id: row.id }).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
message: '台账同步成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
},
|
||||
disabled: row => {
|
||||
return row.status != 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.statveList = [2]
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
// tableStore.table.params.loadType = ''
|
||||
// tableStore.table.params.userName = ''
|
||||
// tableStore.table.params.fileUploadflag = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getLoadTypeUserList(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '未建档非线性用户', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
//申请联调
|
||||
const debugForms = ref()
|
||||
const debugId = ref('')
|
||||
const handleDebug = (row: any) => {
|
||||
debugId.value = row.id
|
||||
console.log(debugId.value)
|
||||
debugForms.value.open('申请联调', row)
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelMointorPointTempLinedebug(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getMointorPointTempLinedebugDetail({ id: fullId }).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
debugForms.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
::v-deep .el-input__wrapper {
|
||||
// width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="监测点台账信息" v-if="detailData.lineFilePath">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.lineFilePath.url">
|
||||
{{ detailData?.lineFilePath.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ detailData.reporter }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报日期">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报部门">
|
||||
{{ detailData.orgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工程投产日期">
|
||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在地市">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户状态">
|
||||
{{
|
||||
userStateList.find(item => {
|
||||
return item.value == detailData.userStatus
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联干扰源">
|
||||
{{ detailData.userName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联终端">
|
||||
{{ detailData.monitoringTerminalName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点名称">
|
||||
{{ detailData.lineName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return detailData.voltageLevel == item.id
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接入母线">
|
||||
{{ detailData.connectedBus }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="短路容量">
|
||||
{{ detailData.shortCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="协议容量">
|
||||
{{ detailData.dealCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端容量">
|
||||
{{ detailData.devCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="基准容量">
|
||||
{{ detailData.standardCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="CT变比">
|
||||
{{ detailData.ct1 }}{{ detailData.ct2 ? '/' + detailData.ct2 : '' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="PT变比">
|
||||
{{ detailData.pt1 }}{{ detailData.pt2 ? '/' + detailData.pt2 : '' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上送网公司编码">
|
||||
{{ detailData.lineId }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="测量间隔">
|
||||
{{
|
||||
timeIntervalList.find(item => {
|
||||
return item.id == detailData.timeInterval
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="干扰源类型">
|
||||
{{ detailData.loadType }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="干扰源类别">
|
||||
{{ detailData.businessType }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点性质">
|
||||
{{ detailData.pointNature == '0' ? '电网侧' : '非电网侧' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否参与统计">
|
||||
{{ detailData.isStatistical == '0' ? '是' : '否' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="对象名称(对端)">
|
||||
{{ detailData.objName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电网侧变电站">
|
||||
{{ detailData.powerSubstationName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否并网点">
|
||||
{{ detailData.isGridConnectionPoint == '0' ? '是' : '否' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压偏差上限">
|
||||
{{ detailData.voltageDeviationUpperLimit }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压偏差下限">
|
||||
{{ detailData.voltageDeviationLowerLimit }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点运行状态">
|
||||
{{
|
||||
operationStatusList.find(item => {
|
||||
return detailData.operationStatus == item.id
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<!--文件地址-->
|
||||
<el-descriptions-item label="主接线图" v-if="detailData?.mainWiringDiagram">
|
||||
<el-icon class="elView" v-if="detailData?.mainWiringDiagram.name">
|
||||
<View @click="openFile(detailData?.mainWiringDiagram.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="detailData?.mainWiringDiagram.url">
|
||||
{{ detailData?.mainWiringDiagram.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getTempLineDetailsById } from '@/api/supervision-boot/monitorpoint/index'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
//测量间隔数据
|
||||
const timeIntervalList = [
|
||||
{
|
||||
id: '1',
|
||||
name: '一分钟'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '三分钟'
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
name: '五分钟'
|
||||
},
|
||||
{
|
||||
id: '10',
|
||||
name: '十分钟'
|
||||
}
|
||||
]
|
||||
//用户状态数组
|
||||
const userStateList = reactive([
|
||||
{
|
||||
label: '可研',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '建设',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '退运',
|
||||
value: '3'
|
||||
}
|
||||
])
|
||||
const dictData = useDictData()
|
||||
//字典获取监测点电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//定义监测点运行状态下拉框数据
|
||||
const operationStatusList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '运行'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '检修'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '停运'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '调试'
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
name: '退运'
|
||||
}
|
||||
]
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getTempLineDetailsById({ id: props.id || queryId }).then(res => {
|
||||
detailData.value = res.data
|
||||
getFileName()
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
const getFileName = async () => {
|
||||
//监测点台账信息
|
||||
if (detailData.value.lineFilePath) {
|
||||
await getFileNamePath(detailData.value.lineFilePath, 'lineFilePath')
|
||||
}
|
||||
//主接线图
|
||||
else if (detailData.value.mainWiringDiagram) {
|
||||
await getFileNamePath(detailData.value.mainWiringDiagram, 'mainWiringDiagram')
|
||||
}
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data) {
|
||||
//监测点台账信息
|
||||
if (pathName == 'lineFilePath' && detailData.value.lineFilePath) {
|
||||
detailData.value.lineFilePath = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主接线图
|
||||
else if (pathName == 'mainWiringDiagram' && detailData.value.mainWiringDiagram) {
|
||||
detailData.value.mainWiringDiagram = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.default-main {
|
||||
// height: calc(100vh - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
}
|
||||
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,326 @@
|
||||
<!---终端入网检测-->
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="搜索">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<!-- 新增弹框 -->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import addForm from './addForm.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelMointorPointFormData, getTempLineDetailsById } from '@/api/supervision-boot/monitorpoint/index'
|
||||
import { deleteTempLineReport } from '@/api/supervision-boot/delete/index'
|
||||
import { getTerminalDetailsById } from "@/api/supervision-boot/terminal";
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const show: any = ref(false)
|
||||
const fileList = ref([])
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/tempLine/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
// { field: 'orgName', title: '填报部门名称', minWidth: 170 },
|
||||
{
|
||||
field: 'powerSubstationName',
|
||||
title: '电网侧电站',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'connectedBus', title: '关联母线', minWidth: 170 },
|
||||
{ field: 'monitoringTerminalName', title: '所属终端', minWidth: 170 },
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 150 },
|
||||
{ field: 'reportDate', title: '填报日期', minWidth: 150 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
// tableStore.table.params.loadType = ''
|
||||
// tableStore.table.params.userName = ''
|
||||
// tableStore.table.params.fileUploadflag = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '监测点信息'
|
||||
})
|
||||
}, 0)
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelMointorPointFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteTempLineReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getLoadTypeUserList(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '未建档非线性用户', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getTempLineDetailsById({ id: fullId }).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
::v-deep .el-input__wrapper {
|
||||
// width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,538 @@
|
||||
<template>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ detailData.reporter }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报日期">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报部门">
|
||||
{{ detailData.orgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工程投产日期">
|
||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="所在地市">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="用户状态">
|
||||
{{
|
||||
userStateList.find(item => {
|
||||
return item.value == detailData.userStatus
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<!--文件地址-->
|
||||
<el-descriptions-item label="所属供电公司">
|
||||
{{ detailData.supervisionTempDeviceReport?.powerCompany }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="并网变电站">
|
||||
{{ detailData.supervisionTempDeviceReport?.substationName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变电站电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.substationVoltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="经度">
|
||||
{{ detailData.supervisionTempDeviceReport?.longitude }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="纬度">
|
||||
{{ detailData.supervisionTempDeviceReport?.latitude }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="检测终端编码">
|
||||
{{ detailData.supervisionTempDeviceReport?.monitoringTerminalCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="检测终端名称">
|
||||
{{ detailData.supervisionTempDeviceReport?.monitoringTerminalName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="通讯类型">
|
||||
{{
|
||||
frontTypeList.filter(item => item.id == detailData.supervisionTempDeviceReport?.frontType)[0]?.name ||
|
||||
detailData.supervisionTempDeviceReport?.frontType
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压互感器类型">
|
||||
{{
|
||||
voltageTransformerTypeList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.voltageTransformerType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端接线方式类型">
|
||||
{{
|
||||
terminalWiringMethodTypeList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.terminalWiringMethodType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="中性点接线方式">
|
||||
{{
|
||||
neutralPointWiringMethodList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.neutralPointWiringMethod
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="厂家">
|
||||
{{
|
||||
manufacturerList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.manufacturer
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="厂家终端编号">
|
||||
{{ detailData.supervisionTempDeviceReport?.manufacturerDeviceNumber }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端IP">
|
||||
{{ detailData.supervisionTempDeviceReport?.terminalIp }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端型号">
|
||||
{{
|
||||
terminalTypeList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.terminalType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="端口">
|
||||
{{ detailData.supervisionTempDeviceReport?.terminalPort }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属前置机">
|
||||
{{
|
||||
frontEndMachineList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.frontEndMachine
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="本次终端检测时间">
|
||||
{{ detailData.supervisionTempDeviceReport?.currentTerminalDetectionTime?.replace('T', ' ') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="下次终端定检时间">
|
||||
{{ detailData.supervisionTempDeviceReport?.nextTerminalInspectionTime?.replace('T', ' ') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="识别码">
|
||||
{{ detailData.supervisionTempDeviceReport?.identificationCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端秘钥">
|
||||
{{ detailData.supervisionTempDeviceReport?.terminalSecretKey }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="经度">
|
||||
{{ detailData.supervisionTempDeviceReport?.longitude }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="纬度">
|
||||
{{ detailData.supervisionTempDeviceReport?.latitude }}
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="终端模型">
|
||||
{{
|
||||
terminalModelList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.terminalModel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="数据类型">
|
||||
{{
|
||||
dataTypeList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.dataType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="通讯状态">
|
||||
{{
|
||||
communicationStatusList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.communicationStatus
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="SIM卡号">
|
||||
{{ detailData.supervisionTempDeviceReport?.simCardNumber }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="投运时间">
|
||||
{{ detailData.supervisionTempDeviceReport?.commissioningTime?.replace('T', ' ') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="数据更新时间">
|
||||
{{ detailData.supervisionTempDeviceReport?.dataUpdateTime?.replace('T', ' ') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="对时功能">
|
||||
{{
|
||||
detailData.supervisionTempDeviceReport?.timeSyncFunction == '0'
|
||||
? '否'
|
||||
: detailData.supervisionTempDeviceReport?.timeSyncFunction == '1'
|
||||
? '是'
|
||||
: '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电镀功能">
|
||||
{{
|
||||
detailData.supervisionTempDeviceReport?.electroplatingFunction == '0'
|
||||
? '否'
|
||||
: detailData.supervisionTempDeviceReport?.electroplatingFunction == '1'
|
||||
? '是'
|
||||
: '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测终端安装位置">
|
||||
{{
|
||||
monitoringDeviceInstallationPositionList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.monitoringDeviceInstallationPosition
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="召唤标志">
|
||||
{{
|
||||
summonFlagList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.summonFlag
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="告警功能">
|
||||
{{
|
||||
detailData.supervisionTempDeviceReport?.alarmFunction == '0'
|
||||
? '否'
|
||||
: detailData.supervisionTempDeviceReport?.alarmFunction == '1'
|
||||
? '是'
|
||||
: '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="合同号">
|
||||
{{ detailData.supervisionTempDeviceReport?.contractNumber }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="信息安全检测报告">
|
||||
<el-icon class="elView" v-if="detailData?.informationSecurityTestReport?.name">
|
||||
<View @click="openFile(detailData?.informationSecurityTestReport?.name)" />
|
||||
</el-icon>
|
||||
<a
|
||||
target="_blank"
|
||||
:href="detailData?.informationSecurityTestReport?.url"
|
||||
v-if="detailData?.informationSecurityTestReport?.name"
|
||||
>
|
||||
{{ detailData?.informationSecurityTestReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="验收检验报告单">
|
||||
<el-icon class="elView" v-if="detailData?.acceptanceInspectionReportSingle?.name">
|
||||
<View @click="openFile(detailData?.acceptanceInspectionReportSingle?.name)" />
|
||||
</el-icon>
|
||||
<a
|
||||
target="_blank"
|
||||
:href="detailData?.acceptanceInspectionReportSingle?.url"
|
||||
v-if="detailData?.acceptanceInspectionReportSingle?.name"
|
||||
>
|
||||
{{ detailData?.acceptanceInspectionReportSingle?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="验收检验报告">
|
||||
<el-icon class="elView" v-if="detailData?.acceptanceInspectionReport?.name">
|
||||
<View @click="openFile(detailData?.acceptanceInspectionReport?.name)" />
|
||||
</el-icon>
|
||||
<a
|
||||
target="_blank"
|
||||
:href="detailData?.acceptanceInspectionReport?.url"
|
||||
v-if="detailData?.acceptanceInspectionReport?.name"
|
||||
>
|
||||
{{ detailData?.acceptanceInspectionReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="型式实验报告">
|
||||
<el-icon class="elView" v-if="detailData?.typeExperimentReport?.name">
|
||||
<View @click="openFile(detailData?.typeExperimentReport?.name)" />
|
||||
</el-icon>
|
||||
<a
|
||||
target="_blank"
|
||||
v-if="detailData?.typeExperimentReport?.name"
|
||||
:href="detailData?.typeExperimentReport?.url"
|
||||
>
|
||||
{{ detailData?.typeExperimentReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出厂检验报告">
|
||||
<el-icon class="elView" v-if="detailData?.factoryInspectionReport?.name">
|
||||
<View @click="openFile(detailData?.factoryInspectionReport?.name)" />
|
||||
</el-icon>
|
||||
<a
|
||||
target="_blank"
|
||||
:href="detailData?.factoryInspectionReport?.url"
|
||||
v-if="detailData?.factoryInspectionReport?.name"
|
||||
>
|
||||
{{ detailData?.factoryInspectionReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性能检测报告">
|
||||
<el-icon class="elView" v-if="detailData?.performanceTestReport?.name">
|
||||
<View @click="openFile(detailData?.performanceTestReport?.name)" />
|
||||
</el-icon>
|
||||
<a
|
||||
target="_blank"
|
||||
:href="detailData?.performanceTestReport?.url"
|
||||
v-if="detailData?.performanceTestReport?.name"
|
||||
>
|
||||
{{ detailData?.performanceTestReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其他附件">
|
||||
<el-icon class="elView" v-if="detailData?.otherAttachments?.name">
|
||||
<View @click="openFile(detailData?.otherAttachments?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="detailData?.otherAttachments?.url" v-if="detailData?.otherAttachments?.name">
|
||||
{{ detailData?.otherAttachments?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import { nodeAllList } from '@/api/device-boot/Business'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
|
||||
//用户状态数组
|
||||
const userStateList = reactive([
|
||||
{
|
||||
label: '可研',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '建设',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '退运',
|
||||
value: '3'
|
||||
}
|
||||
])
|
||||
const dictData = useDictData()
|
||||
//字典获取所在地市
|
||||
const frontTypeList = dictData.getBasicData('Front_Type', ['CLD', '61850'])
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//定义监测终端安装位置下拉框数据
|
||||
const monitoringDeviceInstallationPositionList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '电网侧'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '用户侧'
|
||||
}
|
||||
]
|
||||
//定义召唤标志下拉框数据
|
||||
const summonFlagList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '周期触发'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '变为触发'
|
||||
}
|
||||
]
|
||||
//定义终端模型下拉框数据
|
||||
const terminalModelList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '虚拟终端'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '虚拟终端'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '虚拟终端'
|
||||
}
|
||||
]
|
||||
//定义通讯状态下拉框数据
|
||||
const communicationStatusList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '中断'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '正常'
|
||||
}
|
||||
]
|
||||
//字典获取监测点电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典获取数据类型
|
||||
const dataTypeList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '暂态系统'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '稳态系统'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '两个系统'
|
||||
}
|
||||
]
|
||||
//字典获取终端型号
|
||||
const terminalTypeList = dictData.getBasicData('Dev_Type')
|
||||
//字典获取电压互感器类型
|
||||
const voltageTransformerTypeList = dictData.getBasicData('Voltage_Transformer')
|
||||
//字典获取中性点接线方式
|
||||
const neutralPointWiringMethodList = dictData.getBasicData('Neutral_Point')
|
||||
//字典获取终端接线方式类型
|
||||
const terminalWiringMethodTypeList = dictData.getBasicData('Dev_Connect')
|
||||
//字典获取厂家
|
||||
const manufacturerList = dictData.getBasicData('Dev_Manufacturers')
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getTerminalDetailsById({ id: props.id || queryId }).then(res => {
|
||||
detailData.value = res.data
|
||||
getFileName()
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
//获取所属前置机数据
|
||||
const frontEndMachineList = ref([])
|
||||
const getFrontEndMachineList = () => {
|
||||
nodeAllList().then(res => {
|
||||
frontEndMachineList.value = res.data
|
||||
})
|
||||
}
|
||||
getFrontEndMachineList()
|
||||
const getFileName = async () => {
|
||||
//信息安全检测报告
|
||||
if (detailData.value.informationSecurityTestReport) {
|
||||
await getFileNamePath(detailData.value.informationSecurityTestReport, 'informationSecurityTestReport')
|
||||
}
|
||||
//验收检验报告单
|
||||
if (detailData.value.acceptanceInspectionReportSingle) {
|
||||
await getFileNamePath(detailData.value.acceptanceInspectionReportSingle, 'acceptanceInspectionReportSingle')
|
||||
}
|
||||
//验收检验报告
|
||||
if (detailData.value.acceptanceInspectionReport) {
|
||||
await getFileNamePath(detailData.value.acceptanceInspectionReport, 'acceptanceInspectionReport')
|
||||
}
|
||||
//型式实验报告
|
||||
if (detailData.value.typeExperimentReport) {
|
||||
await getFileNamePath(detailData.value.typeExperimentReport, 'typeExperimentReport')
|
||||
}
|
||||
//出厂检验报告
|
||||
if (detailData.value.factoryInspectionReport) {
|
||||
await getFileNamePath(detailData.value.factoryInspectionReport, 'factoryInspectionReport')
|
||||
}
|
||||
|
||||
//性能检测报告
|
||||
if (detailData.value.performanceTestReport) {
|
||||
await getFileNamePath(detailData.value.performanceTestReport, 'performanceTestReport')
|
||||
}
|
||||
//其他附件
|
||||
if (detailData.value.otherAttachments) {
|
||||
await getFileNamePath(detailData.value.otherAttachments, 'otherAttachments')
|
||||
}
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data) {
|
||||
//信息安全检测报告
|
||||
if (pathName == 'informationSecurityTestReport' && detailData.value.informationSecurityTestReport) {
|
||||
detailData.value.informationSecurityTestReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//验收检验报告单
|
||||
else if (
|
||||
pathName == 'acceptanceInspectionReportSingle' &&
|
||||
detailData.value.acceptanceInspectionReportSingle
|
||||
) {
|
||||
detailData.value.acceptanceInspectionReportSingle = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
|
||||
//验收检验报告
|
||||
else if (pathName == 'acceptanceInspectionReport' && detailData.value.acceptanceInspectionReport) {
|
||||
detailData.value.acceptanceInspectionReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//型式实验报告
|
||||
else if (pathName == 'typeExperimentReport' && detailData.value.typeExperimentReport) {
|
||||
detailData.value.typeExperimentReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//出场检验报告
|
||||
else if (pathName == 'factoryInspectionReport' && detailData.value.factoryInspectionReport) {
|
||||
detailData.value.factoryInspectionReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//性能检测报告
|
||||
else if (pathName == 'performanceTestReport' && detailData.value.performanceTestReport) {
|
||||
detailData.value.performanceTestReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//其他附件
|
||||
else if (pathName == 'otherAttachments' && detailData.value.otherAttachments) {
|
||||
detailData.value.otherAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.default-main {
|
||||
// height: calc(100vh - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
}
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="搜索">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate"
|
||||
:loading="loading">模版下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<!-- 新增弹框 -->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||
<!-- 上传模版 -->
|
||||
<uploadATemplate ref="uploadATemplateRef" />
|
||||
|
||||
<!-- 上传模版 详情 -->
|
||||
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
||||
<DetailInfo :id="userId"></DetailInfo>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { downloadDevTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import DetailInfo from '@/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue'
|
||||
import { cancelTerminalFormData, getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
||||
import uploadATemplate from './uploadATemplate.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
|
||||
import { getUserReportById } from "@/api/supervision-boot/interfere";
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const TableHeaderRef = ref()
|
||||
const userId = ref()
|
||||
const loading = ref(false)
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const ruleFormRef = ref()
|
||||
const uploadATemplateRef = ref()
|
||||
const show: any = ref(false)
|
||||
const fileList = ref([])
|
||||
const dialogShow = ref(false)
|
||||
const flag = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/deVReport/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{
|
||||
field: 'orgName',
|
||||
title: '填报部门名称',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
row.cellValue = row.cellValue ? row.cellValue : ''
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'substationName',
|
||||
title: '所属变电站',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
||||
{ field: 'monitoringTerminalCode', title: '终端编号', minWidth: 170 },
|
||||
{ field: 'reportDate', title: '填报日期', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.importType != 0 || !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.importType != 1
|
||||
},
|
||||
click: row => {
|
||||
userId.value = row.id
|
||||
dialogShow.value = true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.importType == 1 ? false : row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return row.importType == 1 ? false : !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
// tableStore.table.params.loadType = ''
|
||||
// tableStore.table.params.userName = ''
|
||||
// tableStore.table.params.fileUploadflag = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '终端信息'
|
||||
})
|
||||
}, 0)
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelTerminalFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
deleteDevReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//导出模板
|
||||
const exportExcelTemplate = async () => {
|
||||
loading.value = true
|
||||
downloadDevTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '终端入网检测模板'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
//批量导入用户数据
|
||||
const importUserData = () => {
|
||||
uploadATemplateRef.value.open('导入终端入网检测')
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getTerminalDetailsById({ id: fullId }).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
::v-deep .el-input__wrapper {
|
||||
// width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
draggable
|
||||
class="cn-operate-dialog"
|
||||
v-model="eventDataUploadVisible"
|
||||
:title="title"
|
||||
style="width: 415px"
|
||||
top="25vh"
|
||||
>
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" ref="formRef">
|
||||
<el-form-item label="用户数据文件">
|
||||
<el-upload
|
||||
v-model:file-list="fileList"
|
||||
ref="uploadEventData"
|
||||
action=""
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
:on-change="choose"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">选择数据文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="eventDataUploadVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, inject } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { deVReportImportSensitive } from '@/api/supervision-boot/userReport/form'
|
||||
|
||||
const fileList = ref<UploadUserFile[]>([])
|
||||
|
||||
const formRef = ref()
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const eventDataUploadVisible = ref(false)
|
||||
const title = ref('')
|
||||
const uploadEventData = ref<UploadInstance>()
|
||||
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive({
|
||||
file: null
|
||||
})
|
||||
|
||||
//弹出界面,默认选择用户的第一个生产线的第一条进线进行数据导入
|
||||
const open = async (text: string) => {
|
||||
title.value = text
|
||||
resetForm()
|
||||
form.file = null
|
||||
fileList.value = []
|
||||
eventDataUploadVisible.value = true
|
||||
}
|
||||
|
||||
//重置表单内容
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择待上传文件
|
||||
*/
|
||||
const choose = (e: any) => {
|
||||
form.file = e.raw
|
||||
}
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadEventData.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadEventData.value!.handleStart(file)
|
||||
fileList.value = [{ name: file.name, url: '' }]
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = async () => {
|
||||
if (form.file) {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let data = new FormData()
|
||||
data.append('file', form.file)
|
||||
await deVReportImportSensitive(data)
|
||||
.then(res => handleImportResponse(title.value, res))
|
||||
.finally(() => {
|
||||
tableStore.index()
|
||||
eventDataUploadVisible.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElMessage.error('请选择数据文件')
|
||||
}
|
||||
}
|
||||
|
||||
async function handleImportResponse(title: any, res: any) {
|
||||
if (res.type === 'application/json') {
|
||||
const fileReader = new FileReader()
|
||||
fileReader.onloadend = () => {
|
||||
try {
|
||||
const jsonData = JSON.parse(fileReader.result)
|
||||
if (jsonData.code === 'A0000') {
|
||||
ElMessage.success('导入成功')
|
||||
} else {
|
||||
ElMessage.error('导入失败,请查看下载附件!')
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
fileReader.readAsText(res)
|
||||
} else {
|
||||
ElMessage.error('导入失败,请查看下载附件!')
|
||||
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '终端入网检测失败列表'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-form-item__content div {
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
<el-tab-pane label="终端入网检测" name="1">
|
||||
<terminal :id="id" v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="监测点台账录入" name="2">
|
||||
<monitorpoint :id="id" v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="监测点联调列表" name="3">
|
||||
<jointDebugList :id="id" v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="终端周期检测" name="4">
|
||||
<cycleDetection :id="id" :businessKey='key' v-if="activeName == '4'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import terminal from './components/terminainal/index.vue'
|
||||
import monitorpoint from './components/monitorpoint/index.vue'
|
||||
import jointDebugList from './components/jointDebugList/index.vue'
|
||||
import cycleDetection from './components/cycleDetection/index.vue'
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
defineOptions({
|
||||
name: 'terminalNetwotk'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
|
||||
const route = useRoute()
|
||||
const id = ref('')
|
||||
const key = ref('')
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('terminalNetwotk')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '1') {
|
||||
activeName.value = '1'
|
||||
} else if (type == '2') {
|
||||
activeName.value = '2'
|
||||
} else if (type == '3') {
|
||||
activeName.value = '3'
|
||||
} else {
|
||||
activeName.value = '4'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
key.value = (route.query.key as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
99
src/views/pqs/supervise_jb/testRun/components/detail.vue
Normal file
99
src/views/pqs/supervise_jb/testRun/components/detail.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="监测点名称">
|
||||
{{ detailData.lineName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接入母线">
|
||||
{{ detailData.connectedBus }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="终端编号">
|
||||
{{ detailData.monitoringTerminalCode }}
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="终端名称">
|
||||
{{ detailData.monitoringTerminalName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变电站">
|
||||
{{ detailData.powerSubstationName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="调试原因">
|
||||
{{ detailData.reason }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点在线率">
|
||||
{{ detailData.onlineRate ? detailData.onlineRate * 100 + '%' : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点数据完整性">
|
||||
{{ detailData.integrityRate ? detailData.integrityRate * 100 + '%' : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试运行报告">
|
||||
<el-icon class="elView" v-if="detailData?.reportName">
|
||||
<View @click="openFile(detailData?.reportName)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="detailData?.reportUrl">
|
||||
{{ detailData?.reportName }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import { getMointorPointTempLinedebugDetail } from '@/api/supervision-boot/jointDebugList/index'
|
||||
import { getRunTestById } from '@/api/supervision-boot/lineRunTest'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
const { query } = useRoute() // 查询参数
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getRunTestById(props.id).then(res => {
|
||||
detailData.value = res.data
|
||||
if (res.data.testRunReport.length > 0 && res.data.testRunReport != null) {
|
||||
getFileNameAndFilePath({ filePath: res.data.testRunReport }).then(report => {
|
||||
detailData.value.reportUrl = report.data.url
|
||||
detailData.value.reportName = report.data.fileName
|
||||
console.log('🚀 ~ getFileNameAndFilePath ~ detailData.value:', detailData.value)
|
||||
})
|
||||
}
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.default-main {
|
||||
// height: calc(100vh - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
}
|
||||
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
452
src/views/pqs/supervise_jb/testRun/index.vue
Normal file
452
src/views/pqs/supervise_jb/testRun/index.vue
Normal file
@@ -0,0 +1,452 @@
|
||||
<!---试运行列表-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<!-- <el-dialog
|
||||
v-model='timeDialog'
|
||||
width='500px'
|
||||
append-to-body
|
||||
destroy-on-close>
|
||||
<div class='block'>
|
||||
<span class="demonstration">试运行时间</span>
|
||||
<el-date-picker
|
||||
:popper-append-to-body="false"
|
||||
:v-model="dateValue"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
|
||||
</div>
|
||||
<div class='block' style='text-align: center'>
|
||||
<el-button type='primary' style='margin-top: 50px' @click='runTestSubmit'>确认</el-button>
|
||||
</div>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { addRunTest, update, cancel } from '@/api/supervision-boot/lineRunTest'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { VxeTablePropTypes } from 'vxe-table'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { deleteTempLineRunTestReport } from '@/api/supervision-boot/delete/index'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const { push } = useRouter()
|
||||
const adminInfo = useAdminInfo()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/tempLinedebug/pageHasDebug',
|
||||
method: 'POST',
|
||||
// publicHeight: 65,
|
||||
column: [
|
||||
{ title: '', type: 'checkbox', width: 40 },
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
||||
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
|
||||
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140 },
|
||||
{ field: 'powerSubstationName', title: '变电站', minWidth: 160 },
|
||||
{ field: 'reason', title: '调试原因', minWidth: 160 },
|
||||
{
|
||||
field: 'testRunState',
|
||||
title: '试运行状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
1: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待试运行',
|
||||
1: '试运行中',
|
||||
2: '试运行成功',
|
||||
3: '试运行失败',
|
||||
null: '待试运行'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'testRunTime',
|
||||
title: '试运行时间范围',
|
||||
minWidth: 200,
|
||||
formatter: row => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
null: '/',
|
||||
9: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 230,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '查看报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.testRunReport == null || row.testRunReport.length == 0
|
||||
},
|
||||
click: row => {
|
||||
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||
|
||||
window.open(window.location.origin + '/#/previewFile?' + row.testRunReport)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '下载报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
downloadTheReport(row.testRunReport)
|
||||
},
|
||||
disabled: row => {
|
||||
return row.testRunReport == null || row.testRunReport.length == 0
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
},
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '重新试运行',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
monitorIds = []
|
||||
monitorIds.push(row.id)
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: 1,
|
||||
id: row.id
|
||||
}
|
||||
update(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 3 || row.status == 4)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.statveList = [2]
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
||||
labelField: '',
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info') || !(row.testRunState == 1 || row.testRunState == 2)
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let createBy = tableStore.table.selection.map(item => item.createBy)
|
||||
let status = tableStore.table.selection.map(item => item.status)
|
||||
if (adminInfo.roleCode.includes('delete_info')) {
|
||||
deleteList()
|
||||
} else if (createBy.includes(adminInfo.$state.id) && status.includes(0)) {
|
||||
deleteList()
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '只能删除自己填报的数据!!!'
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const deleteList = () => {
|
||||
deleteTempLineRunTestReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancel(data).then(res => {
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
//试运行
|
||||
let monitorIds: any = []
|
||||
|
||||
const startRunTest = () => {
|
||||
monitorIds = []
|
||||
let flag = true
|
||||
if (tableStore.table.selection.length === 0) {
|
||||
return ElMessage({
|
||||
message: '请至少选择一个监测点进行试运行',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
|
||||
tableStore.table.selection.forEach(item => {
|
||||
if (item.testRunState != 0) {
|
||||
flag = false
|
||||
}
|
||||
if (item.testRunState == 0) {
|
||||
monitorIds.push(item.id)
|
||||
}
|
||||
})
|
||||
|
||||
if (!flag) {
|
||||
return ElMessage({
|
||||
message: '请选择未试运行的监测点进行试运行',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
ElMessageBox.confirm('是否确认执行72小时监测点试运行?', '试运行', {
|
||||
confirmButtonText: '确 认',
|
||||
cancelButtonText: '取 消'
|
||||
})
|
||||
.then(() => {
|
||||
runTestSubmit(0)
|
||||
})
|
||||
.catch(() => console.info('操作取消'))
|
||||
}
|
||||
|
||||
// 下载报告
|
||||
const downloadTheReport = (url: string) => {
|
||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
||||
console.log(res.data.url, 'res')
|
||||
const link = document.createElement('a')
|
||||
link.href = res.data.url
|
||||
link.download = res.data.name
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
|
||||
const runTestSubmit = (type: number) => {
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: type
|
||||
}
|
||||
addRunTest(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
let nowTime = Date.now()
|
||||
let routeTime = route.query.t as number || 1
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
if (route.fullPath.includes('/testRun')) {
|
||||
let id = (route.query.id as string) || 'null'
|
||||
if (id != 'null') {
|
||||
monitorIds = []
|
||||
monitorIds.push(id)
|
||||
const start = new Date()
|
||||
start.setDate(start.getDate() + 1)
|
||||
start.setHours(0, 0, 0)
|
||||
const end = new Date()
|
||||
end.setDate(end.getDate() + 3)
|
||||
end.setHours(23, 59, 59)
|
||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||
const data = {
|
||||
startTime: startString,
|
||||
endTime: endString,
|
||||
lineIds: monitorIds,
|
||||
operateType: 1,
|
||||
id
|
||||
}
|
||||
update(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '发起试运行成功',
|
||||
type: 'success'
|
||||
})
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
71
src/views/pqs/supervise_jb/testRun/testRun.vue
Normal file
71
src/views/pqs/supervise_jb/testRun/testRun.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
|
||||
<el-tab-pane label="监测点台账录入" name="1">
|
||||
<monitorpoint :id="id" v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="监测点联调列表" name="2">
|
||||
<jointDebugList :id="id" v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="试运行评估" name="3">
|
||||
<testRun :id="id" v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import monitorpoint from '@/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue'
|
||||
import jointDebugList from '@/views/pqs/supervise/terminalNetworkDetection/components/jointDebugList/index.vue'
|
||||
import testRun from './testRun.vue'
|
||||
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
defineOptions({
|
||||
name: 'terminalNetwotk'
|
||||
})
|
||||
const activeName = ref('2')
|
||||
|
||||
const route = useRoute()
|
||||
const id = ref('')
|
||||
const key = ref('')
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('terminalNetwotk')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '1') {
|
||||
activeName.value = '1'
|
||||
} else if (type == '2') {
|
||||
activeName.value = '2'
|
||||
} else if (type == '3') {
|
||||
activeName.value = '3'
|
||||
} else {
|
||||
activeName.value = '4'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
key.value = (route.query.key as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-button icon="el-icon-Download" type="primary" @click="positioningexport">导出</el-button>
|
||||
</div>
|
||||
<vxe-table height="400" ref="positioningtableRef" auto-resize :data="AnalysisData"
|
||||
v-bind="defaultAttribute">
|
||||
:cell-class-name="cellClassName" v-bind="defaultAttribute">
|
||||
<vxe-table-column title="序号" width="70" type="seq" align="center">
|
||||
<template v-slot="row">
|
||||
<span>{{ (form.pageNum - 1) * form.pageSize + row.rowIndex + 1 }}</span>
|
||||
@@ -135,7 +135,12 @@ onMounted(() => {
|
||||
{ label: '周', value: 4 }
|
||||
])
|
||||
})
|
||||
|
||||
const cellClassName = ({ row, rowIndex }) => {
|
||||
console.log("🚀 ~ cellClassName ~ rowIndex:", rowIndex)
|
||||
if (rowIndex === 0) {
|
||||
return 'highlight-first-row';
|
||||
}
|
||||
};
|
||||
// 启动关联分析
|
||||
const firing = () => { }
|
||||
// 暂降源定位
|
||||
@@ -226,5 +231,7 @@ const positioningexport = () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
:deep(.highlight-first-row) {
|
||||
color: red !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user