|
@@ -20,6 +20,7 @@
|
|
</div>
|
|
</div>
|
|
<template #footer>
|
|
<template #footer>
|
|
<span class="dialog-footer">
|
|
<span class="dialog-footer">
|
|
|
|
+ <el-button type="primary" v-if="route.query.taskId" @click="handlePush">结果上报</el-button>
|
|
<!-- <el-button type="primary" @click="handleSubmit">提交手动剔除值</el-button> -->
|
|
<!-- <el-button type="primary" @click="handleSubmit">提交手动剔除值</el-button> -->
|
|
<el-button type="primary" v-if="['1', '0'].includes(parameter.type) && parameter.id" @click="handleSubmit">自动剔除异常值</el-button>
|
|
<el-button type="primary" v-if="['1', '0'].includes(parameter.type) && parameter.id" @click="handleSubmit">自动剔除异常值</el-button>
|
|
<el-button @click="handleCancel">取消</el-button>
|
|
<el-button @click="handleCancel">取消</el-button>
|
|
@@ -32,7 +33,10 @@
|
|
import { Filter } from '@element-plus/icons-vue'
|
|
import { Filter } from '@element-plus/icons-vue'
|
|
import { ref, onMounted, watch } from 'vue'
|
|
import { ref, onMounted, watch } from 'vue'
|
|
import { generalArrFilterHandler } from '@/utils/el-table-v2-utils'
|
|
import { generalArrFilterHandler } from '@/utils/el-table-v2-utils'
|
|
-import { abnormalByIdApi } from '@/api/modules/manage/sortieParameter'
|
|
|
|
|
|
+import { abnormalByIdApi, pushApi } from '@/api/modules/manage/sortieParameter'
|
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
|
+import { useRoute } from 'vue-router'
|
|
|
|
+const route = useRoute()
|
|
// import { useRouter } from 'vue-router'
|
|
// import { useRouter } from 'vue-router'
|
|
// const router = useRouter()
|
|
// const router = useRouter()
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -59,10 +63,10 @@ export interface ParameterProps {
|
|
const dialogVisible = ref(false)
|
|
const dialogVisible = ref(false)
|
|
let columnData = ref([] as any[])
|
|
let columnData = ref([] as any[])
|
|
const initColumnData = () => {
|
|
const initColumnData = () => {
|
|
- columnData.value = [
|
|
|
|
- { key: 'index', title: '序号', cellRenderer: ({ rowIndex }) => `${rowIndex + 1}`, align: 'center', width: 50 },
|
|
|
|
- { key: '时间', title: '时间', dataKey: '时间', align: 'center', width: 200 }
|
|
|
|
- ]
|
|
|
|
|
|
+ columnData.value = [{ key: 'index', title: '序号', cellRenderer: ({ rowIndex }) => `${rowIndex + 1}`, align: 'center', width: 50 }]
|
|
|
|
+ if (['1', '2'].includes(parameter.value.type)) {
|
|
|
|
+ columnData.value.push({ key: '时间', title: '时间', dataKey: '时间', align: 'center', width: 200 })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
let columns = ref([] as any[])
|
|
let columns = ref([] as any[])
|
|
// 父组件传过来的参数
|
|
// 父组件传过来的参数
|
|
@@ -73,6 +77,25 @@ const parameter = ref<ParameterProps>({
|
|
type: ''
|
|
type: ''
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+// 取消按钮,重置表单,关闭弹框
|
|
|
|
+const handlePush = async () => {
|
|
|
|
+ let content: any = ''
|
|
|
|
+ dataTable.value.forEach(el => {
|
|
|
|
+ let data: any = ''
|
|
|
|
+ Object.keys(el).forEach(key => {
|
|
|
|
+ data = `${data}${key}:${el[key]};`
|
|
|
|
+ })
|
|
|
|
+ content = `${content}${data}`
|
|
|
|
+ })
|
|
|
|
+ let data = {
|
|
|
|
+ id: route.query.taskId,
|
|
|
|
+ content: content
|
|
|
|
+ }
|
|
|
|
+ const res = await pushApi(data)
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ ElMessage.success('执行成功')
|
|
|
|
+ }
|
|
|
|
+}
|
|
// 取消按钮,重置表单,关闭弹框
|
|
// 取消按钮,重置表单,关闭弹框
|
|
const handleSubmit = async () => {
|
|
const handleSubmit = async () => {
|
|
const res = await abnormalByIdApi(parameter.value.id)
|
|
const res = await abnormalByIdApi(parameter.value.id)
|
|
@@ -95,7 +118,7 @@ const isAbnormalRenderer = (key: string | string[]) => {
|
|
return key.includes('_是否异常')
|
|
return key.includes('_是否异常')
|
|
}
|
|
}
|
|
const isFalseAlarmRenderer = (key: string | string[]) => {
|
|
const isFalseAlarmRenderer = (key: string | string[]) => {
|
|
- return key.includes('_是否虚警')
|
|
|
|
|
|
+ return key.includes('是否虚警')
|
|
}
|
|
}
|
|
// 前一筛选状态
|
|
// 前一筛选状态
|
|
let prevFilters = ref([] as any[])
|
|
let prevFilters = ref([] as any[])
|