终端检测重新发起
This commit is contained in:
@@ -15,6 +15,17 @@ export const addTerminalFormData = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑终端信息表单数据(重新发起)
|
||||||
|
*/
|
||||||
|
export const updateTerminalFormData = (data: any) => {
|
||||||
|
return createAxios({
|
||||||
|
url: '/supervision-boot/deVReport/update',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取关联设备列表
|
* 获取关联设备列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="width: 600px;">
|
<div style="width: 600px">
|
||||||
<el-select v-model="interval" style="min-width: 90px; width: 90px; margin-right: 10px" @change="timeChange">
|
<el-select v-model="interval" style="min-width: 90px; width: 90px; margin-right: 10px" @change="timeChange">
|
||||||
<el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="timeValue"
|
v-model="timeValue"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
:disabled="disabledPicker"
|
:disabled="disabledPicker"
|
||||||
style="width: 210px; margin-right: 10px"
|
style="width: 220px; margin-right: 10px"
|
||||||
unlink-panels
|
unlink-panels
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
:shortcuts="shortcuts"
|
:shortcuts="shortcuts"
|
||||||
/>
|
/>
|
||||||
<el-button :disabled="backDisabled" type="primary" :icon="DArrowLeft" @click="preClick"></el-button>
|
<el-button :disabled="backDisabled" type="primary" :icon="DArrowLeft" @click="preClick"></el-button>
|
||||||
<el-button type="primary" :icon="VideoPause" @click="nowTime">当前</el-button>
|
<el-button type="primary" :icon="VideoPause" @click="nowTime">当前</el-button>
|
||||||
<el-button :disabled="preDisabled" type="primary" :icon="DArrowRight" @click="next"></el-button>
|
<el-button :disabled="preDisabled" type="primary" :icon="DArrowRight" @click="next"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { DArrowLeft, VideoPause, DArrowRight } from '@element-plus/icons-vue'
|
import { DArrowLeft, VideoPause, DArrowRight } from '@element-plus/icons-vue'
|
||||||
import { ref, onMounted, nextTick,watch} from 'vue'
|
import { ref, onMounted, nextTick, watch } from 'vue'
|
||||||
|
|
||||||
const interval = ref(3)
|
const interval = ref(3)
|
||||||
const timeFlag = ref(1)
|
const timeFlag = ref(1)
|
||||||
@@ -112,6 +112,7 @@ const timeChange = (e: number) => {
|
|||||||
|
|
||||||
// 当前
|
// 当前
|
||||||
const nowTime = () => {
|
const nowTime = () => {
|
||||||
|
console.log(interval.value,"000000000");
|
||||||
timeChange(interval.value)
|
timeChange(interval.value)
|
||||||
}
|
}
|
||||||
// 上一个
|
// 上一个
|
||||||
@@ -142,7 +143,6 @@ const preClick = () => {
|
|||||||
//按周
|
//按周
|
||||||
} else if (interval.value == 4) {
|
} else if (interval.value == 4) {
|
||||||
//根据开始时间推
|
//根据开始时间推
|
||||||
|
|
||||||
let start = new Date(year, month - 1, date)
|
let start = new Date(year, month - 1, date)
|
||||||
start.setDate(start.getDate() - 7)
|
start.setDate(start.getDate() - 7)
|
||||||
startTime = formatTime(start)
|
startTime = formatTime(start)
|
||||||
@@ -179,7 +179,6 @@ const preClick = () => {
|
|||||||
//下一个
|
//下一个
|
||||||
const next = () => {
|
const next = () => {
|
||||||
//向后
|
//向后
|
||||||
|
|
||||||
let startTime = timeValue.value[0]
|
let startTime = timeValue.value[0]
|
||||||
let endTime = timeValue.value[1]
|
let endTime = timeValue.value[1]
|
||||||
let year = parseInt(startTime.substring(0, 4))
|
let year = parseInt(startTime.substring(0, 4))
|
||||||
@@ -499,7 +498,7 @@ function formatDate(date: Date): string {
|
|||||||
const day = String(date.getDate()).padStart(2, '0')
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
return `${year}-${month}-${day}`
|
return `${year}-${month}-${day}`
|
||||||
}
|
}
|
||||||
defineExpose({ timeValue, interval, timeFlag, setTimeOptions, setInterval, getYearOnYear, getMonthOnMonth ,timeChange})
|
defineExpose({ timeValue, interval, timeFlag, setTimeOptions, setInterval, getYearOnYear, getMonthOnMonth, timeChange })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
label-position="left"
|
label-position="left"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
>
|
>
|
||||||
<el-form-item label="日期" v-if="datePicker" style="grid-column: span 2; max-width: 600px;">
|
<el-form-item label="日期" v-if="datePicker" style="grid-column: span 2; max-width: 610px;">
|
||||||
<DatePicker ref="datePickerRef"></DatePicker>
|
<DatePicker ref="datePickerRef"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|||||||
@@ -591,7 +591,11 @@ import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
|||||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { uploadFile } from '@/api/system-boot/file'
|
import { uploadFile } from '@/api/system-boot/file'
|
||||||
import { addTerminalFormData, getSubstationVoltageLevel } from '@/api/supervision-boot/terminal/index'
|
import {
|
||||||
|
addTerminalFormData,
|
||||||
|
getSubstationVoltageLevel,
|
||||||
|
updateTerminalFormData
|
||||||
|
} from '@/api/supervision-boot/terminal/index'
|
||||||
import { getAllDeptList } from '@/api/common'
|
import { getAllDeptList } from '@/api/common'
|
||||||
import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
||||||
import { nodeAllList } from '@/api/device-boot/Business'
|
import { nodeAllList } from '@/api/device-boot/Business'
|
||||||
@@ -775,11 +779,6 @@ const changeSubstation = async () => {
|
|||||||
let obj = substationList.value.find((item: any) => item.id == form.value.substation)
|
let obj = substationList.value.find((item: any) => item.id == form.value.substation)
|
||||||
form.value.substationVoltageLevel = obj?.voltageLevel
|
form.value.substationVoltageLevel = obj?.voltageLevel
|
||||||
}
|
}
|
||||||
const containerRef = ref<HTMLElement | null>(null)
|
|
||||||
|
|
||||||
const handleClick = (e: MouseEvent) => {
|
|
||||||
e.preventDefault()
|
|
||||||
}
|
|
||||||
const resetForm: any = async () => {
|
const resetForm: any = async () => {
|
||||||
form.value = {
|
form.value = {
|
||||||
reporter: '', //填报人
|
reporter: '', //填报人
|
||||||
@@ -1342,12 +1341,13 @@ const disabledDate = time => {
|
|||||||
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||||
}
|
}
|
||||||
const activeName = ref('0')
|
const activeName = ref('0')
|
||||||
|
const resendId = ref('')
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
await getPowerCompanyList()
|
await getPowerCompanyList()
|
||||||
title.value = row.title
|
title.value = row.title
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
if (row.row) {
|
if (row.row) {
|
||||||
|
resendId.value = row.row.id
|
||||||
await getTerminalDetailsById({ id: row.row.id }).then((res: any) => {
|
await getTerminalDetailsById({ id: row.row.id }).then((res: any) => {
|
||||||
form.value = { customSubstaionFlag: '0', ...res.data, ...res.data.supervisionTempDeviceReport }
|
form.value = { customSubstaionFlag: '0', ...res.data, ...res.data.supervisionTempDeviceReport }
|
||||||
let list = [
|
let list = [
|
||||||
@@ -1369,7 +1369,7 @@ const open = async (row: any) => {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
form.value.orgId = adminInfo.$state.deptName
|
form.value.id = row.row.id
|
||||||
deviceFilePath.value = res.data.deviceFilePath
|
deviceFilePath.value = res.data.deviceFilePath
|
||||||
acceptanceInspectionReportSingle.value = res.data.acceptanceInspectionReportSingle
|
acceptanceInspectionReportSingle.value = res.data.acceptanceInspectionReportSingle
|
||||||
acceptanceInspectionReport.value = res.data.acceptanceInspectionReport
|
acceptanceInspectionReport.value = res.data.acceptanceInspectionReport
|
||||||
@@ -1398,42 +1398,6 @@ const confirmForm = () => {
|
|||||||
devReportForm.value.reporter = adminInfo.$state.id
|
devReportForm.value.reporter = adminInfo.$state.id
|
||||||
devReportForm.value.orgId = adminInfo.$state.deptId
|
devReportForm.value.orgId = adminInfo.$state.deptId
|
||||||
let confirmFormData = JSON.parse(JSON.stringify(devReportForm.value))
|
let confirmFormData = JSON.parse(JSON.stringify(devReportForm.value))
|
||||||
if (!acceptanceInspectionReportSingle.value) {
|
|
||||||
return ElMessage({
|
|
||||||
message: '请上传验收检验报告单',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (!acceptanceInspectionReport.value) {
|
|
||||||
return ElMessage({
|
|
||||||
message: '请上传验收检验报告',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (!typeExperimentReport.value) {
|
|
||||||
return ElMessage({
|
|
||||||
message: '请上传型式实验报告',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (!factoryInspectionReport.value) {
|
|
||||||
return ElMessage({
|
|
||||||
message: '请上传出厂检验报告',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (!performanceTestReport.value) {
|
|
||||||
return ElMessage({
|
|
||||||
message: '请上传性能检测报告',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (!informationSecurityTestReport.value) {
|
|
||||||
return ElMessage({
|
|
||||||
message: '请上传信息安全检测报告',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//提交终端信息
|
//提交终端信息
|
||||||
confirmFormData = {
|
confirmFormData = {
|
||||||
...confirmFormData,
|
...confirmFormData,
|
||||||
@@ -1460,6 +1424,21 @@ const confirmForm = () => {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log(confirmFormData)
|
console.log(confirmFormData)
|
||||||
|
form.value.orgId = adminInfo.$state.deptName
|
||||||
|
confirmFormData.supervisionTempDeviceReportParam.commissioningTime =
|
||||||
|
confirmFormData.supervisionTempDeviceReportParam.commissioningTime.replace('T', ' ')
|
||||||
|
confirmFormData.id = resendId.value
|
||||||
|
updateTerminalFormData(confirmFormData).then((res: any) => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
ElMessage({
|
||||||
|
message: '重新发起成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
ruleFormRef.value.resetFields()
|
||||||
|
resetForm()
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('表单验证失败')
|
console.log('表单验证失败')
|
||||||
|
|||||||
@@ -108,38 +108,38 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
handleAudit(row.processInstanceId)
|
handleAudit(row.processInstanceId,row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// name: 'edit',
|
name: 'edit',
|
||||||
// title: '重新发起',
|
title: '重新发起',
|
||||||
// type: 'warning',
|
type: 'warning',
|
||||||
// icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
// render: 'basicButton',
|
render: 'basicButton',
|
||||||
// disabled: row => {
|
disabled: row => {
|
||||||
// return row.status == 1 || row.status == 2
|
return row.status == 1 || row.status == 2
|
||||||
// },
|
},
|
||||||
// click: row => {
|
click: row => {
|
||||||
// addForms.value.open({
|
addForms.value.open({
|
||||||
// title: '重新发起',
|
title: '重新发起',
|
||||||
// row: row
|
row: row
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: 'cancel',
|
name: 'cancel',
|
||||||
// title: '取消',
|
title: '取消',
|
||||||
// type: 'danger',
|
type: 'danger',
|
||||||
// icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
// render: 'basicButton',
|
render: 'basicButton',
|
||||||
// disabled: row => {
|
disabled: row => {
|
||||||
// return row.status == 3 || row.status == 2 || row.status == 4
|
return row.status == 3 || row.status == 2 || row.status == 4
|
||||||
// },
|
},
|
||||||
// click: row => {
|
click: row => {
|
||||||
// // cancelLeave(row)
|
// cancelLeave(row)
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -186,40 +186,16 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any) => {
|
const handleAudit = (instanceId: any,historyInstanceId:any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
query: {
|
query: {
|
||||||
id: instanceId
|
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 '新建电网工程'
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user