修改 在线监测告警 页面

This commit is contained in:
GGJ
2024-04-07 16:40:16 +08:00
parent 266da2405f
commit 81a1e38344
8 changed files with 273 additions and 68 deletions

View File

@@ -36,21 +36,49 @@
</el-steps>
<!-- 原因分析 0 -->
<process1 v-if="control == 0" :addData="addData" ref="process0Ref" @handleClose="handleClose" />
<process1
v-if="control == 0"
:addData="addData"
:List="List"
:disabled="disabled"
ref="process0Ref"
@handleClose="handleClose"
/>
<!-- 计划整改措施 1-->
<process2 v-if="control == 1" :addData="addData" ref="process1Ref" @handleClose="handleClose" />
<process2
v-if="control == 1"
:addData="addData"
:List="List"
:disabled="disabled"
ref="process1Ref"
@handleClose="handleClose"
/>
<!-- 实际采取措施 2 -->
<process3 v-if="control == 2" :addData="addData" ref="process2Ref" @handleClose="handleClose" />
<process3
v-if="control == 2"
:addData="addData"
:List="List"
:disabled="disabled"
ref="process2Ref"
@handleClose="handleClose"
/>
<!-- 成效分析 3 -->
<process4 v-if="control == 3" :addData="addData" ref="process3Ref" @handleClose="handleClose" />
<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="active == control">
<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>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { ref, onMounted } from 'vue'
import { useDictData } from '@/stores/dictData'
import process1 from './process1.vue'
import process2 from './process2.vue'
@@ -60,6 +88,7 @@ import { getAbnormalDetail } 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 stepTitle = ['原因分析', '计划整改措施', '实际采取措施', '成效分析']
@@ -67,12 +96,19 @@ const process0Ref = ref()
const process1Ref = ref()
const process2Ref = ref()
const process3Ref = ref()
const disabled = ref(false)
const prop = defineProps({
isDisabled: {
type: Boolean,
default: false
}
})
const problemData = dictData.getBasicData('Problem_Sources')
const open = (row: any) => {
addData.value = row
getAbnormalDetail(row.powerQualityProblemNo).then((res: any) => {
List.value = res.data
if (res.data.filePathYyfx == null) {
active.value = 0
} else if (res.data.filePathJhzg == null) {
@@ -91,17 +127,25 @@ const open = (row: any) => {
active.value = 2
}
}
control.value = active.value
control.value = active.value == 4 ? 3 : active.value
})
}
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) {