cxs 2 settimane fa
parent
commit
6d7632e196

+ 6 - 0
src/api/modules/allData.ts

@@ -86,3 +86,9 @@ export const getMaintainrecordList = (params:{}) => {
 export const getUserList = () => {
   return http.post<ResPage<any>>(PORT1 + `/queryalluserpacket`);
 };
+
+
+//获取自动站编报项目设置【queryaspacket】
+export const getYaspacketList = (params:{}) => {
+  return http.post<ResPage<any>>(PORT1 + `/queryaspacket`,params);
+};

+ 112 - 57
src/views/system/stations/components/newspapers.vue

@@ -3,124 +3,120 @@
     <div style="display: flex;flex-direction: column;">
       <div style="flex-grow: 1;height: 66vh;overflow-y: auto;overflow-x: hidden">
         <div class="disposition-title">报告类型</div>
-        <el-radio-group v-model="radio" style="width: 100%;" text-color="#000000">
+        <el-radio-group v-model="searchPktType" style="width: 100%;" text-color="#000000" @change="searchPktTypetFmt">
         <el-row :gutter="20" style="width: 100%;">
           <el-col :span="4">
-            <el-radio :value="1">整点编报</el-radio>
+            <el-radio :value="0">整点编报</el-radio>
           </el-col>
           <el-col :span="4">
-            <el-radio  :value="2">半点编报</el-radio>
+            <el-radio  :value="1">半点编报</el-radio>
           </el-col>
           <el-col :span="4">
-            <el-radio  :value="3">临时编报</el-radio>
+            <el-radio  :value="2">临时编报</el-radio>
           </el-col>
         </el-row>
         </el-radio-group>
         <div class="disposition-title">报告类型</div>
-        <el-radio-group v-model="radio" style="width: 100%">
+        <el-radio-group v-model="searchPktFmt" style="width: 100%" @change="searchPktTypetFmt">
         <el-row :gutter="20"  style="width: 100%;">
           <el-col :span="4">
-            <el-radio v-model="radio" :value="1">军队报文格式</el-radio>
+            <el-radio v-model="radio" :value="0">空军报文格式</el-radio>
           </el-col>
           <el-col :span="4">
-            <el-radio v-model="radio" :value="2">空军报文格式</el-radio>
+            <el-radio v-model="radio" :value="1">军队报文格式</el-radio>
           </el-col>
         </el-row>
         </el-radio-group>
         <div class="disposition-title">第一段(基本项目段)</div>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
+        <el-checkbox-group v-model="pkt_jbxm" style="width: 100%" disabled>
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
-              <el-checkbox label="是否固定台站" value="是否固定台站" />
+              <el-checkbox label="是否固定台站" />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="最小能见度" value="最小能见度" />
+              <el-checkbox label="最小能见度"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="本站气压" value="本站气压" />
+              <el-checkbox label="本站气压"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="海平面气压" value="海平面气压" />
+              <el-checkbox label="海平面气压"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="时降水量" value="时降水量" />
+              <el-checkbox label="时降水量"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="日降水量" value="日降水量" />
+              <el-checkbox label="日降水量"/>
             </el-col>
           </el-row>
         </el-checkbox-group>
         <div class="disposition-title">第二段(航空航天段)</div>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
+        <el-checkbox-group v-model="pkt_hkht" style="width: 100%" disabled>
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
-              <el-checkbox label="垂直能见度" value="垂直能见度" />
+              <el-checkbox label="垂直能见度"  />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="跑道视程" value="跑道视程" />
+              <el-checkbox label="跑道视程"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="场面、零点、高度表" value="场面、零点、高度表" />
+              <el-checkbox label="场面、零点、高度表"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="静电场" value="静电场" />
+              <el-checkbox label="静电场"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="雷电" value="雷电" />
+              <el-checkbox label="雷电"/>
             </el-col>
           </el-row>
         </el-checkbox-group>
         <div class="disposition-title">第三段(重要危险段)</div>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
+        <el-checkbox-group v-model="pkt_zywx" style="width: 100%" disabled>
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
-              <el-checkbox label="瞬时最大风速" value="瞬时最大风速" />
+              <el-checkbox label="瞬时最大风速" />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="积雨云方向去向" value="积雨云方向去向" />
+              <el-checkbox label="积雨云方向去向"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="冰雹最大直径" value="冰雹最大直径" />
+              <el-checkbox label="冰雹最大直径" />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="云敝山所在方向" value="云敝山所在方向" />
+              <el-checkbox label="云敝山所在方向"/>
             </el-col>
           </el-row>
-        </el-checkbox-group>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
-              <el-checkbox label="低云方向去向" value="低云方向去向" />
+              <el-checkbox label="低云方向去向" />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="最大静电场强度" value="最大静电场强度" />
+              <el-checkbox label="最大静电场强度"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="雷暴方向去向" value="雷暴方向去向" />
+              <el-checkbox label="雷暴方向去向" />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="龙卷方向去向" value="龙卷方向去向" />
+              <el-checkbox label="龙卷方向去向"/>
             </el-col>
           </el-row>
         </el-checkbox-group>
         <div class="disposition-title">第四段(海洋水文段)</div>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
+        <el-checkbox-group v-model="pkt_hysw" style="width: 100%" disabled>
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
-              <el-checkbox label="航向和航速" value="航向和航速" />
+              <el-checkbox label="航向和航速"  />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="表层海水温度" value="表层海水温度" />
+              <el-checkbox label="表层海水温度"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="表层海水盐度" value="表层海水盐度" />
+              <el-checkbox label="表层海水盐度"  />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="海况和波周期" value="海况和波周期" />
+              <el-checkbox label="海况和波周期"/>
             </el-col>
           </el-row>
-        </el-checkbox-group>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
               <el-checkbox label="波级和波高" value="波级和波高" />
@@ -137,55 +133,53 @@
           </el-row>
         </el-checkbox-group>
         <div class="disposition-title">第五段(非基本项)</div>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
+        <el-checkbox-group v-model="pkt_fjbx" style="width: 100%" disabled>
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
-              <el-checkbox label="地表溫度" value="地表溫度" />
+              <el-checkbox label="地表溫度"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="地表和积雪" value="地表和积雪" />
+              <el-checkbox label="地表和积雪"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="蒸发量组" value="蒸发量组" />
+              <el-checkbox label="蒸发量组" />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="日照时数" value="日照时数" />
+              <el-checkbox label="日照时数"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="电线结冰最大重量" value="电线结冰最大重量" />
+              <el-checkbox label="电线结冰最大重量"/>
             </el-col>
           </el-row>
         </el-checkbox-group>
         <div class="disposition-title">第六段(日极值段)</div>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
+        <el-checkbox-group v-model="pkt_rjz" style="width: 100%" disabled>
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
-              <el-checkbox label="最高温度" value="最高温度" />
+              <el-checkbox label="最高温度"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="最低温度" value="最低温度" />
+              <el-checkbox label="最低温度" />
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="地表最高温度" value="地表最高温度" />
+              <el-checkbox label="地表最高温度"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="地表最低温度" value="地表最低温度" />
+              <el-checkbox label="地表最低温度"/>
             </el-col>
           </el-row>
-        </el-checkbox-group>
-        <el-checkbox-group v-model="checkList" style="width: 100%">
           <el-row :gutter="20"  style="width: 100%;">
             <el-col :span="4">
-              <el-checkbox label="最高潮高" value="最高潮高" />
+              <el-checkbox label="最高潮高"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="最高潮时" value="最高潮时" />
+              <el-checkbox label="最高潮时"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="最低潮高" value="最低潮高" />
+              <el-checkbox label="最低潮高"/>
             </el-col>
             <el-col :span="4">
-              <el-checkbox label="最低潮时" value="最低潮时" />
+              <el-checkbox label="最低潮时"/>
             </el-col>
           </el-row>
         </el-checkbox-group>
@@ -222,9 +216,70 @@
     </div>
   </el-form>
 </template>
-
 <script setup lang="tsx">
-import {reactive, ref} from "vue";
+import {defineProps, onMounted, ref} from "vue";
+import {getUserList, getYaspacketList} from "@/api/modules/allData";
+
+const props = defineProps<{
+  selectData?: {};
+}>();
+
+const searchPktType = ref(0)
+const searchPktFmt = ref(0)
+
+const processTableData = ref([]);
+const pageable = ref<any>({
+  asCode: props.selectData.as_code,
+  pageNum: 1,
+  pageSize: 20,
+});
+const getList= async ()=>{
+  const { data } = await getYaspacketList(pageable.value);
+  processTableData.value = data.list[0]
+  findData()
+}
+
+const pkt_jbxm = ref([])
+const pkt_hkht = ref([])
+const pkt_zywx = ref([])
+const pkt_hysw = ref([])
+const pkt_fjbx = ref([])
+const pkt_rjz = ref([])
+
+const findData=()=>{
+  const result = processTableData.value.find(item => item.pkt_type === searchPktType.value && item.pkt_fmt === searchPktFmt.value);
+  if(result){
+    console.log(pkt_jbxm.value)
+    pkt_jbxm.value = result.pkt_jbxm.split('|').map(val => val === '1');
+    pkt_hkht.value =result.pkt_hkht.split('|').map(val => val === '1');
+    pkt_zywx.value =result.pkt_zywx.split('|').map(val => val === '1');
+    pkt_hysw.value =result.pkt_hysw.split('|').map(val => val === '1');
+    pkt_fjbx.value=result.pkt_fjbx.split('|').map(val => val === '1');
+    pkt_rjz.value = result.pkt_rjz.split('|').map(val => val === '1');
+  }else {
+    pkt_jbxm.value = []
+    pkt_hkht.value = []
+    pkt_zywx.value = []
+    pkt_hysw.value =[]
+    pkt_fjbx.value =[]
+    pkt_rjz.value =[]
+  }
+
+}
+
+const searchPktTypetFmt = ()=>{
+  console.log(pkt_jbxm.value)
+  findData()
+}
+
+onMounted(() => {
+  getList()
+})
+
+
+
+
+
 const formRef = ref<any>();
 const formInline = ref<any>({
   element:'',

+ 4 - 1
src/views/system/stations/components/parametersBasic.vue

@@ -358,8 +358,11 @@
 
 <script setup lang="tsx">
 import sCheckbox from "@/components/SCheckbox/index.vue"
-import {reactive, ref} from "vue";
+import {defineProps, reactive, ref} from "vue";
 import {ColumnProps} from "@/components/ProTable/interface";
+const props = defineProps<{
+  selectData?: {};
+}>();
 const formRef = ref<any>();
 const formInline = ref<any>({
   division:"",

+ 4 - 1
src/views/system/stations/components/strategySafeguard.vue

@@ -332,7 +332,10 @@
 </template>
 
 <script setup lang="tsx">
-import {reactive, ref} from "vue";
+import {defineProps, reactive, ref} from "vue";
+const props = defineProps<{
+  selectData?: {};
+}>();
 import {ColumnProps} from "@/components/ProTable/interface";
 
 const rules = ref<any>(

+ 4 - 1
src/views/system/stations/components/threshold.vue

@@ -138,7 +138,10 @@
 </template>
 
 <script setup lang="tsx">
-import {reactive, ref} from "vue";
+import {defineProps, reactive, ref} from "vue";
+const props = defineProps<{
+  selectData?: {};
+}>();
 import {ColumnProps} from "@/components/ProTable/interface";
 const formRef = ref<any>();
 const formInline = ref<any>({

+ 4 - 1
src/views/system/stations/components/translation.vue

@@ -150,8 +150,11 @@
 </template>
 
 <script setup lang="tsx">
-import {reactive, ref} from "vue";
+import {defineProps, reactive, ref} from "vue";
 import {ColumnProps} from "@/components/ProTable/interface";
+const props = defineProps<{
+  selectData?: {};
+}>();
 const formRef = ref<any>();
 const formInline = ref<any>({
   intervalSelected: false,

+ 4 - 1
src/views/system/stations/components/verificationCertificate.vue

@@ -162,8 +162,11 @@
 </template>
 
 <script setup lang="tsx">
-import {reactive, ref} from "vue";
+import {defineProps, reactive, ref} from "vue";
 import {ColumnProps} from "@/components/ProTable/interface";
+const props = defineProps<{
+  selectData?: {};
+}>();
 const formRef = ref<any>();
 const dialog = reactive<any>({
   visible: false,

+ 11 - 8
src/views/system/stations/index.vue

@@ -42,7 +42,7 @@
                   content="编辑"
                   placement="top"
                 >
-                  <el-button type="primary" link @click="handleUpdate">
+                  <el-button type="primary" link @click="handleUpdate(scope.row)">
                     <el-icon >
                       <Edit />
                     </el-icon>
@@ -80,25 +80,25 @@
     </div>
 
     <!-- 添加或修改对话框 -->
-    <el-dialog :title="dialog.title" v-model="dialog.visible" width="1600px" append-to-body :close-on-click-modal="false">
+    <el-dialog v-if="dialog.visible" :title="dialog.title" v-model="dialog.visible" width="1600px" append-to-body :close-on-click-modal="false">
       <el-tabs tab-position="left" class="demo-tabs" style="height: 700px">
         <el-tab-pane label="基本参数">
-          <ParametersBasic></ParametersBasic>
+          <ParametersBasic :select-data="rowItem"></ParametersBasic>
         </el-tab-pane>
         <el-tab-pane label="观测要素">
-         <Translation></Translation>
+         <Translation :select-data="rowItem"></Translation>
         </el-tab-pane>
         <el-tab-pane label="仪器检定证">
-          <VerificationCertificate></VerificationCertificate>
+          <VerificationCertificate :select-data="rowItem"></VerificationCertificate>
         </el-tab-pane>
         <el-tab-pane label="阈值设置">
-          <Threshold></Threshold>
+          <Threshold :select-data="rowItem"></Threshold>
         </el-tab-pane>
         <el-tab-pane label="保障策略设置">
-          <StrategySafeguard></StrategySafeguard>
+          <StrategySafeguard :select-data="rowItem"></StrategySafeguard>
         </el-tab-pane>
         <el-tab-pane label="编报项目设置">
-          <Newspapers></Newspapers>
+          <Newspapers :select-data="rowItem"></Newspapers>
         </el-tab-pane>
       </el-tabs>
     </el-dialog>
@@ -242,9 +242,12 @@ const handleAdd = () => {
   dialog.title = "新增站台";
 }
 
+const rowItem = ref({})
+
 /** 修改按钮操作 */
 const handleUpdate = async (row?: any) => {
   reset();
+  rowItem.value = row
   dialog.visible = true;
   dialog.title = "编辑站台";
 }