|
@@ -4,46 +4,33 @@
|
|
<div style="flex-grow: 1;height: 66vh;overflow-y: auto;overflow-x: hidden">
|
|
<div style="flex-grow: 1;height: 66vh;overflow-y: auto;overflow-x: hidden">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :span="10">
|
|
<el-col :span="10">
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData" size="small" style="max-height: 66vh;" @selection-change="handleSelectionChange">
|
|
|
|
- <el-table-column type="selection" width="40" align="center"/>
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="processTableData" size="small"
|
|
|
|
+ style="max-height: 66vh;" @selection-change="handleSelectionChange">
|
|
|
|
+ <!-- <el-table-column type="selection" width="40" align="center" /> -->
|
|
<template v-for="item in columns" :key="item">
|
|
<template v-for="item in columns" :key="item">
|
|
- <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'">
|
|
|
|
|
|
+ <el-table-column v-bind="item" :align="item.align ?? 'left'"
|
|
|
|
+ :reserve-selection="item.type == 'selection'">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <template v-if="item.prop === 'b'">
|
|
|
|
- <el-select
|
|
|
|
- class="no-border-select"
|
|
|
|
- v-model="scope.row.b"
|
|
|
|
- size="small">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in options"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <template v-if="item.prop === 'part_type'">
|
|
|
|
+ <div>{{ findNameByType(1,scope.row.part_type) }}</div>
|
|
</template>
|
|
</template>
|
|
- <template v-if="item.prop === 'c'">
|
|
|
|
- <el-select
|
|
|
|
- class="no-border-select"
|
|
|
|
- v-model="scope.row.c"
|
|
|
|
- size="small">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in options2"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <template v-if="item.prop === 'se_mode'">
|
|
|
|
+ <!-- <el-select class="no-border-select" v-model="scope.row.b" size="small">
|
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
+ </el-select> -->
|
|
|
|
+ <div>{{ scope.row.se_mode === 0 ? '人工' : '自动' }}</div>
|
|
|
|
+
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.prop === 'se_type'">
|
|
|
|
+ <!-- <el-select class="no-border-select" v-model="scope.row.c" size="small">
|
|
|
|
+ <el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
+ </el-select> -->
|
|
|
|
+ <div>{{ findNameByType(2,scope.row.se_type) }}</div>
|
|
</template>
|
|
</template>
|
|
<template v-if="item.prop === 'operation'">
|
|
<template v-if="item.prop === 'operation'">
|
|
- <el-tooltip
|
|
|
|
- class="box-item"
|
|
|
|
- effect="dark"
|
|
|
|
- content="编辑"
|
|
|
|
- placement="top"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-tooltip class="box-item" effect="dark" content="编辑" placement="top">
|
|
<el-button type="primary" link @click="handleUpdate">
|
|
<el-button type="primary" link @click="handleUpdate">
|
|
- <el-icon >
|
|
|
|
|
|
+ <el-icon>
|
|
<Edit />
|
|
<Edit />
|
|
</el-icon>
|
|
</el-icon>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -67,28 +54,28 @@
|
|
<el-col :span="14">
|
|
<el-col :span="14">
|
|
<div class="disposition-title" style="margin-top: 0px">其它</div>
|
|
<div class="disposition-title" style="margin-top: 0px">其它</div>
|
|
<div style="display: flex;align-items: center">
|
|
<div style="display: flex;align-items: center">
|
|
- <el-checkbox v-model="formInline.intervalSelected" label="风演变时间间隔【>m/s】"/>
|
|
|
|
- <el-input v-model="formInline.interval" style="width: 80px;margin-left: 5px"/>
|
|
|
|
|
|
+ <el-checkbox v-model="formInline.intervalSelected" label="风演变时间间隔【>m/s】" />
|
|
|
|
+ <el-input v-model="formInline.interval" style="width: 80px;margin-left: 5px" />
|
|
</div>
|
|
</div>
|
|
<div style="display: flex;align-items: center;margin-top: 10px">
|
|
<div style="display: flex;align-items: center;margin-top: 10px">
|
|
<el-checkbox v-model="formInline.conditionSelected" label="毛发表启用条件【<℃】" />
|
|
<el-checkbox v-model="formInline.conditionSelected" label="毛发表启用条件【<℃】" />
|
|
- <el-input v-model="formInline.condition" style="width: 80px;margin-left: 16px"/>
|
|
|
|
|
|
+ <el-input v-model="formInline.condition" style="width: 80px;margin-left: 16px" />
|
|
<div style="margin-left: 10px">系数1</div>
|
|
<div style="margin-left: 10px">系数1</div>
|
|
- <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px"/>
|
|
|
|
|
|
+ <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px" />
|
|
<div style="margin-left: 10px">系数2</div>
|
|
<div style="margin-left: 10px">系数2</div>
|
|
- <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px"/>
|
|
|
|
|
|
+ <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px" />
|
|
<div style="margin-left: 10px">系数3</div>
|
|
<div style="margin-left: 10px">系数3</div>
|
|
- <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px"/>
|
|
|
|
|
|
+ <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px" />
|
|
<div style="margin-left: 10px">系数4</div>
|
|
<div style="margin-left: 10px">系数4</div>
|
|
- <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px"/>
|
|
|
|
|
|
+ <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px" />
|
|
</div>
|
|
</div>
|
|
<div style="display: flex;align-items: center;margin-top: 10px">
|
|
<div style="display: flex;align-items: center;margin-top: 10px">
|
|
<el-checkbox v-model="formInline.deviationSelected" label="风向传感器指北偏差" />
|
|
<el-checkbox v-model="formInline.deviationSelected" label="风向传感器指北偏差" />
|
|
- <el-input v-model="formInline.deviation" style="width: 80px;margin-left: 38px"/>
|
|
|
|
|
|
+ <el-input v-model="formInline.deviation" style="width: 80px;margin-left: 38px" />
|
|
</div>
|
|
</div>
|
|
<el-row :gutter="20" style="margin-top: 10px">
|
|
<el-row :gutter="20" style="margin-top: 10px">
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-checkbox v-model="formInline.intervalSelected" label="雷暴所在方向和去向" />
|
|
|
|
|
|
+ <el-checkbox v-model="formInline.intervalSelected" label="雷暴所在方向和去向" />
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<el-checkbox v-model="formInline.intervalSelected" label="积雨云所在方向和去向" />
|
|
<el-checkbox v-model="formInline.intervalSelected" label="积雨云所在方向和去向" />
|
|
@@ -96,27 +83,24 @@
|
|
</el-row>
|
|
</el-row>
|
|
<el-row :gutter="20" style="margin-top: 10px">
|
|
<el-row :gutter="20" style="margin-top: 10px">
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-checkbox v-model="formInline.intervalSelected" label="龙卷所在方向和去向"/>
|
|
|
|
|
|
+ <el-checkbox v-model="formInline.intervalSelected" label="龙卷所在方向和去向" />
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-checkbox v-model="formInline.intervalSelected" label="不大于300米低云所在的方向和去向"/>
|
|
|
|
|
|
+ <el-checkbox v-model="formInline.intervalSelected" label="不大于300米低云所在的方向和去向" />
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<div class="disposition-title" style="margin-top: 20px">设置干湿表型号</div>
|
|
<div class="disposition-title" style="margin-top: 20px">设置干湿表型号</div>
|
|
- <el-table stripe ref="tableRef" :border="true" :data="processTableData2" style="max-height: 315px" size="small" @selection-change="handleSelectionChange">
|
|
|
|
- <el-table-column type="selection" width="40" align="center"/>
|
|
|
|
|
|
+ <el-table stripe ref="tableRef" :border="true" :data="processTableData2" style="max-height: 315px"
|
|
|
|
+ size="small" @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column type="selection" width="40" align="center" />
|
|
<template v-for="item in columns2" :key="item">
|
|
<template v-for="item in columns2" :key="item">
|
|
- <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'">
|
|
|
|
|
|
+ <el-table-column v-bind="item" :align="item.align ?? 'left'"
|
|
|
|
+ :reserve-selection="item.type == 'selection'">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<template v-if="item.prop === 'operation'">
|
|
<template v-if="item.prop === 'operation'">
|
|
- <el-tooltip
|
|
|
|
- class="box-item"
|
|
|
|
- effect="dark"
|
|
|
|
- content="编辑"
|
|
|
|
- placement="top"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-tooltip class="box-item" effect="dark" content="编辑" placement="top">
|
|
<el-button type="primary" link @click="handleUpdate">
|
|
<el-button type="primary" link @click="handleUpdate">
|
|
- <el-icon >
|
|
|
|
|
|
+ <el-icon>
|
|
<Edit />
|
|
<Edit />
|
|
</el-icon>
|
|
</el-icon>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -141,7 +125,7 @@
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="disposition-bottom">
|
|
<div class="disposition-bottom">
|
|
- <el-button > 取消 </el-button>
|
|
|
|
|
|
+ <el-button> 取消 </el-button>
|
|
<el-button type="primary" plain> 上一步 </el-button>
|
|
<el-button type="primary" plain> 上一步 </el-button>
|
|
<el-button type="primary"> 下一步 </el-button>
|
|
<el-button type="primary"> 下一步 </el-button>
|
|
</div>
|
|
</div>
|
|
@@ -150,104 +134,81 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="tsx">
|
|
<script setup lang="tsx">
|
|
-import {defineProps, reactive, ref} from "vue";
|
|
|
|
-import {ColumnProps} from "@/components/ProTable/interface";
|
|
|
|
-const props = defineProps<{
|
|
|
|
- selectData?: {};
|
|
|
|
-}>();
|
|
|
|
|
|
+import { defineProps, reactive, ref, onMounted } from "vue";
|
|
|
|
+import { ColumnProps } from "@/components/ProTable/interface";
|
|
|
|
+import { getYassensorlist, getUserList, getYallSensorList, getPlatformList, getAllpartlist } from "@/api/modules/allData";
|
|
|
|
+
|
|
|
|
+const props = defineProps(['selectData'])
|
|
|
|
+
|
|
|
|
+const elements = ref<any>([])
|
|
|
|
+const pageable = ref<any>({
|
|
|
|
+ asCode: props.selectData?.as_code,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 20,
|
|
|
|
+
|
|
|
|
+});
|
|
|
|
+const getInfo = async () => {
|
|
|
|
+
|
|
|
|
+ let { data } = await getYassensorlist(pageable.value)
|
|
|
|
+ processTableData.value = data[props.selectData?.as_code]
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const platformInfo=ref<any>({})
|
|
|
|
+const getPlatformListInfo = async () => {
|
|
|
|
+ let { data } = await getPlatformList({ pageNum: 1, pageSize: 20, asCode: props.selectData?.as_code })
|
|
|
|
+ platformInfo.value = data.list[0]
|
|
|
|
+ console.log(data, '平台');
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 获取要素字典
|
|
|
|
+const allPart = ref<any>([])
|
|
|
|
+const getAllPart = async () => {
|
|
|
|
+ const { data } = await getAllpartlist()
|
|
|
|
+ allPart.value = data.list
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 获取传感器字典
|
|
|
|
+const sensorList = ref<any>([]);
|
|
|
|
+const getSensorList = async () => {
|
|
|
|
+ const { data } = await getYallSensorList();
|
|
|
|
+ sensorList.value = data.list
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const handleUpdate = () => {
|
|
|
|
+}
|
|
|
|
+
|
|
const formRef = ref<any>();
|
|
const formRef = ref<any>();
|
|
const formInline = ref<any>({
|
|
const formInline = ref<any>({
|
|
intervalSelected: false,
|
|
intervalSelected: false,
|
|
- interval:'',
|
|
|
|
|
|
+ interval: '',
|
|
deviationSelected: false,
|
|
deviationSelected: false,
|
|
- deviation:'',
|
|
|
|
|
|
+ deviation: '',
|
|
conditionSelected: false,
|
|
conditionSelected: false,
|
|
- condition:''
|
|
|
|
|
|
+ condition: ''
|
|
})
|
|
})
|
|
const multipleSelection = ref<[]>([])
|
|
const multipleSelection = ref<[]>([])
|
|
const handleSelectionChange = (val: []) => {
|
|
const handleSelectionChange = (val: []) => {
|
|
multipleSelection.value = val
|
|
multipleSelection.value = val
|
|
}
|
|
}
|
|
-const processTableData = ref([
|
|
|
|
- {
|
|
|
|
- a: "风向",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- a: "风速",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- a: "温度",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- a: "湿度",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- a: "气压",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- a: "降水",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- a: "云",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },{
|
|
|
|
- a: "能见度",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- a: "天气现象",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },{
|
|
|
|
- a: "积雪",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },{
|
|
|
|
- a: "地面温度",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },{
|
|
|
|
- a: "大气电场",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },{
|
|
|
|
- a: "闪电",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },{
|
|
|
|
- a: "日照",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },{
|
|
|
|
- a: "总辐射",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
- },{
|
|
|
|
- a: "光照度",
|
|
|
|
- b: "",
|
|
|
|
- c: ""
|
|
|
|
|
|
+
|
|
|
|
+// 通过给定的type去查照
|
|
|
|
+function findNameByType(check, type) {
|
|
|
|
+ if (check === 1) {
|
|
|
|
+ let foundObject = allPart.value.find(obj => obj.part_type === type);
|
|
|
|
+ return foundObject ? foundObject.part_name : '参数错误'; // 如果找到了对象,返回其name属性,否则返回null
|
|
|
|
+ } else {
|
|
|
|
+ let foundObject = sensorList.value.find(obj => obj.se_type === type);
|
|
|
|
+ return foundObject ? foundObject.se_name : '参数错误'; // 如果找到了对象,返回其name属性,否则返回null
|
|
}
|
|
}
|
|
-]);
|
|
|
|
|
|
+}
|
|
|
|
+const processTableData = ref([]);
|
|
|
|
|
|
// 表格配置项
|
|
// 表格配置项
|
|
const columns = reactive<ColumnProps[]>([
|
|
const columns = reactive<ColumnProps[]>([
|
|
- { prop: "a", label: "项目",width:200 },
|
|
|
|
- { prop: "b", label: "观测模式",width:150 },
|
|
|
|
- { prop: "c", label: "传感器名称" }
|
|
|
|
|
|
+ { prop: "part_type", label: "项目", width: 200 },
|
|
|
|
+ { prop: "se_mode", label: "观测模式", width: 150 },
|
|
|
|
+ { prop: "se_type", label: "传感器名称" }
|
|
]);
|
|
]);
|
|
|
|
|
|
const processTableData2 = ref([
|
|
const processTableData2 = ref([
|
|
@@ -280,9 +241,9 @@ const processTableData2 = ref([
|
|
|
|
|
|
// 表格配置项
|
|
// 表格配置项
|
|
const columns2 = reactive<ColumnProps[]>([
|
|
const columns2 = reactive<ColumnProps[]>([
|
|
- { prop: "a", label: "干湿表型号"},
|
|
|
|
- { prop: "b", label: "未结冰", width:200},
|
|
|
|
- { prop: "c", label: "结冰", width:200 }
|
|
|
|
|
|
+ { prop: "a", label: "干湿表型号" },
|
|
|
|
+ { prop: "b", label: "未结冰", width: 200 },
|
|
|
|
+ { prop: "c", label: "结冰", width: 200 }
|
|
]);
|
|
]);
|
|
|
|
|
|
const options = [
|
|
const options = [
|
|
@@ -332,28 +293,34 @@ const options2 = [
|
|
{
|
|
{
|
|
value: '8',
|
|
value: '8',
|
|
label: '雷电预警仪',
|
|
label: '雷电预警仪',
|
|
- },{
|
|
|
|
|
|
+ }, {
|
|
value: '9',
|
|
value: '9',
|
|
label: '日照传感器',
|
|
label: '日照传感器',
|
|
- },{
|
|
|
|
|
|
+ }, {
|
|
value: '10',
|
|
value: '10',
|
|
label: '总辐射传感器',
|
|
label: '总辐射传感器',
|
|
- },{
|
|
|
|
|
|
+ }, {
|
|
value: '11',
|
|
value: '11',
|
|
label: '光照度传感器',
|
|
label: '光照度传感器',
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+
|
|
|
|
+onMounted(() => {
|
|
|
|
+ getAllPart()
|
|
|
|
+ getSensorList()
|
|
|
|
+ getInfo()
|
|
|
|
+ getPlatformListInfo()
|
|
|
|
+});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
-.table-box{
|
|
|
|
|
|
+.table-box {
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-::v-deep .no-border-select .el-select__wrapper {
|
|
|
|
- box-shadow: 0 0 0 0px!important;
|
|
|
|
|
|
+::v-deep .no-border-select .el-select__wrapper {
|
|
|
|
+ box-shadow: 0 0 0 0px !important;
|
|
background-color: #00000000;
|
|
background-color: #00000000;
|
|
}
|
|
}
|
|
-
|
|
|
|
</style>
|
|
</style>
|