Browse Source

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

hongrunxia 4 months ago
parent
commit
5a7a2fa258

+ 4 - 4
src/views/vent/gas/components/list/index.vue

@@ -46,8 +46,8 @@
       type?: 'input' | 'default' | 'status-light';
       /** 输入框的固定宽度 */
       labelWidth?: number | string;
-      /** 通用状态灯配置,第一项配置激活状态,第二项配置失活状态 */
-      status?: [{ label: string; value: any }, { label: string }];
+      /** 状态灯配置,第一项配置激活状态,第二项配置失活状态,都不匹配则为默认无状态 */
+      status?: [{ label: string; value: any }, { label: string; value: any }];
       items: {
         /** value(即右侧)部分是否有边框 */
         bordered?: boolean;
@@ -61,8 +61,8 @@
         type?: 'input' | 'default' | 'status-light';
         /** 输入框的固定宽度 */
         labelWidth?: number | string;
-        /** 状态灯配置,第一项配置激活状态,第二项配置失活状态 */
-        status?: [{ label: string; value: any }, { label: string }];
+        /** 状态灯配置,第一项配置激活状态,第二项配置失活状态,都不匹配则为默认无状态 */
+        status?: [{ label: string; value: any }, { label: string; value: any }];
         span?: number;
       }[];
     }>(),

+ 50 - 6
src/views/vent/gas/components/list/listItem.vue

@@ -52,15 +52,15 @@
       labelWidth?: number | string;
       /** 输入框的固定宽度 */
       valueWidth?: number | string;
-      /** 状态灯配置,第一项配置激活状态,第二项配置失活状态 */
-      status?: [{ label: string; value: any }, { label: string }];
+      /** 状态灯配置,第一项配置激活状态,第二项配置失活状态,都不匹配则为默认无状态 */
+      status?: [{ label: string; value: any }, { label: string; value: any }];
     }>(),
     {
       bordered: false,
       backgrounded: true,
       type: 'default',
       label: '',
-      value: '',
+      value: '-',
       labelWidth: 100,
     }
   );
@@ -69,11 +69,20 @@
   // 状态灯相关的内容
   const statusLightConfig = computed(() => {
     if (!props.status) return { label: 'unknown', class: 'list-item__deactived' };
-    const actived = props.value === props.status[0].value;
+    let classSuffix = 'default';
+    let statusLabel = '';
+    if (props.value === props.status[0].value) {
+      classSuffix = 'actived';
+      statusLabel = props.status[0].label;
+    }
+    if (props.value === props.status[1].value) {
+      classSuffix = 'deactived';
+      statusLabel = props.status[1].label;
+    }
 
     return {
-      label: props.status[actived ? 0 : 1].label,
-      class: actived ? 'list-item__actived' : 'list-item__deactived',
+      label: statusLabel,
+      class: `list-item__${classSuffix}`,
     };
   });
 
@@ -142,6 +151,8 @@
   }
 
   .list-item__actived {
+    min-width: 20px;
+    height: 100%;
     padding-left: 20px;
     background-image: url('@/assets/images/company/home/select-bg.png');
     background-repeat: no-repeat;
@@ -150,6 +161,8 @@
   }
 
   .list-item__deactived {
+    min-width: 20px;
+    height: 100%;
     padding-left: 20px;
     background-image: url('@/assets/images/company/home/unselect-bg.png');
     background-repeat: no-repeat;
@@ -157,6 +170,37 @@
     background-size: 20px 20px;
   }
 
+  .list-item__default {
+    min-width: 20px;
+    height: 100%;
+    padding-left: 20px;
+    position: relative;
+  }
+  .list-item__default::before {
+    display: block;
+    content: '';
+    position: absolute;
+    width: 8px;
+    height: 8px;
+    top: calc(50% - 4px);
+    left: 10px;
+    border-radius: 50%;
+    background-color: #858585;
+  }
+  .list-item__default::after {
+    display: block;
+    content: '';
+    position: absolute;
+    width: 12px;
+    height: 12px;
+    top: calc(50% - 6px);
+    left: 8px;
+    border-radius: 50%;
+    background-color: #85858544;
+    box-shadow: 0 0 1px 1px #85858599;
+    box-sizing: border-box;
+  }
+
   ::v-deep .zxm-input {
     color: @white;
   }

+ 28 - 10
src/views/vent/gas/gasInspect/components/inspectEdit.vue

@@ -6,8 +6,8 @@
                 <a-input v-model:value="formStateEdit.id" disabled />
             </a-form-item>
             <a-form-item label="瓦斯巡检地点:">
-                <a-select ref="select" v-model:value="formStateEdit.strInstallPos" placeholder="请选择...">
-                    <a-select-option v-for="(item, index) in addressList" :key="index">{{ item.label
+                <a-select ref="select" v-model:value="formStateEdit.strInstallPos" placeholder="请选择..." @change="changeAddress">
+                    <a-select-option v-for="(item, index) in addressList" :key="item.value">{{ item.label
                         }}</a-select-option>
                 </a-select>
             </a-form-item>
@@ -31,7 +31,7 @@
 <script setup lang="ts">
 import { ref, reactive, onMounted, watch } from 'vue'
 import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
-import { queryAllDisTeam } from '../gasInspect.api'
+import { queryAllDisTeam,getAllGasIns } from '../gasInspect.api'
 
 let props = defineProps({
     inspectEditData: {
@@ -47,11 +47,9 @@ let formStateEdit = reactive<any>({
     strInstallPos: '',
     disTeamId: '',
     insType: '',
+    deviceId:''
 })
-let addressList = ref<any[]>([//监测地点下拉选项列表
-    // { label: '地址1', value: '1' },
-    // { label: '地址2', value: '2' },
-])
+let addressList = ref<any[]>([])//监测地点下拉选项列表
 let qdList = ref<any[]>([])//区队下拉选项列表
 let $emit = defineEmits(['confirmEdit', 'cancelEdit'])
 
@@ -68,6 +66,25 @@ async function queryAllDisTeamList() {
         })
     }
 }
+//获取所有巡检地址
+async function getAllGasInsList(){
+    let res=await getAllGasIns()
+    console.log(res,'所有巡检地点---------')
+    if(res.length!=0){
+        addressList.value=res.map(el=>{
+            return {
+                label:el.strinstallpos,
+                value:el.strinstallpos,
+                deviceId: el.id,
+            }
+        })
+    }
+}
+//巡检地址选项切换
+let changeAddress=(val)=>{
+    formStateEdit.deviceId=addressList.value.filter(v=>v.value==val)[0].deviceId
+    formStateEdit.strInstallPos=val
+}
 //编辑提交
 let confirmEdit = () => {
     $emit('confirmEdit', formStateEdit)
@@ -79,15 +96,16 @@ let cancelEdit = () => {
         strInstallPos: '',
         disTeamId: '',
         insType: '',
+        deviceId:''
     }
     $emit('cancelEdit',)
 }
 watch(() => props.inspectEditData, (newV, oldV) => {
     formStateEdit = Object.assign({}, newV)
-}, { immediate: true })
-onMounted(() => {
+    getAllGasInsList()
     queryAllDisTeamList()
-})
+}, { immediate: true })
+onMounted(() => {})
 </script>
 
 <style lang="less" scoped>

+ 1 - 1
src/views/vent/gas/gasInspect/components/uploadOrdown.vue

@@ -72,7 +72,7 @@ let handlerComfirm = () => {
 //取消
 let handlerCancel = () => {
     formState.insType = ''
-    $emit('handlerCancel', formState)
+    $emit('handlerCancel')
 }
 </script>
 

+ 8 - 3
src/views/vent/gas/gasInspect/gasInspect.api.ts

@@ -3,7 +3,7 @@ import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
     list = '/safety/gasInsCard/list',//通过id(巡检卡id)查询
-    importByExcel='/safety/gasDayReport/importByExcel',//导入瓦斯巡检地址
+    importByExcel='/safety/gasDayReport/importGasInsCard',//导入瓦斯巡检地址
     exportGasByExcel='/safety/gasDayReport/exportGasByExcel',//导出瓦斯巡检地址
     queryAllDisTeam='/safety/disTeamInfo/queryAllDisTeam',//查询所有区队
     moveOrderNum='/safety/gasInsCard/moveOrderNum',//上下移接口
@@ -11,7 +11,8 @@ enum Api {
     deleteCard='/safety/gasInsCard/delete',//瓦斯巡检卡删除
     taskSubmit='/safety/disTeamInfo/edit',//任务管理下发
     clearCardInfo='/safety/gasInsCard/clearCard',//瓦斯巡检卡信息删除
-    getAllUserInfo='/safety/gasInsCard/getAllUserInfo'//获取早中晚班巡检员列表
+    getAllUserInfo='/safety/gasInsCard/getAllUserInfo',//获取早中晚班巡检员列表
+    getAllGasIns='/safety/gasIns/getAllGasIns'//获取所有巡检地址
 
 }
 
@@ -70,4 +71,8 @@ export const getAllUserInfo = () => defHttp.get({ url: Api.getAllUserInfo, });
  * 任务管理下发
  * @param params 
  */
-export const taskSubmit = (params) => defHttp.post({ url: Api.taskSubmit,params });
+export const taskSubmit = (params) => defHttp.post({ url: Api.taskSubmit,params });
+/**
+ * 获取所有巡检地址
+ */
+export const getAllGasIns = () => defHttp.get({ url: Api.getAllGasIns, });

+ 25 - 17
src/views/vent/gas/gasInspect/index.vue

@@ -154,6 +154,7 @@ let handlerEdit = (record) => {
 async function confirmEdit(param) {
     let res = await edit({ ...param })
     if (res) {
+        visibleEdit.value = false
         queryByIdList()
     }
 }
@@ -197,11 +198,11 @@ async function queryByIdList() {
     let res = await list({ id: searchId.value, pageNo: pagination.current, pageSize: pagination.pageSize })
     console.log(res, '列表查询---')
     pagination.current = 1
-    tableData.value = res.records.map((el:any)=>{
+    tableData.value = res.records.map((el: any) => {
         return {
-            morning:el.insType,
-            afterNoon:el.insType,
-            evening:el.insType,
+            morning: el.insType,
+            afterNoon: el.insType,
+            evening: el.insType,
             ...el
         }
     })
@@ -224,12 +225,24 @@ let getupload = () => {
 }
 //确定导入
 async function handlerComfirm(param) {
-    let res = await importByExcel(param)
-    if (res.code == 200) {
-        visibleUploadorDown.value = false
-        message.success('导入成功')
-        queryByIdList()
+    if (modalType.value == 'upload') {
+        let res = await importByExcel(param)
+        if (res.code == 200) {
+            visibleUploadorDown.value = false
+            message.success('导入成功')
+            queryByIdList()
+        }
+    } else {
+        let res = await exportGasByExcel({ insType: param.insType })
+        console.log(res, '导出数据')
+        if (res) {
+            let filename = `${new Date().getTime()}.xlsx`;
+            downFilePublic(res, filename);
+            visibleUploadorDown.value = false
+            message.success('导出成功')
+        }
     }
+
 }
 //导出
 let getdownload = () => {
@@ -237,14 +250,9 @@ let getdownload = () => {
     visibleUploadorDown.value = true
     titleUploadorDown.value = '导出'
 }
-//确定导出
-async function handlerCancel(param) {
-    let res = await exportGasByExcel({ insType: param.insType })
-    console.log(res, '导出数据')
-    if (res) {
-        let filename = '111.xlsx';
-        downFilePublic(res, filename);
-    }
+//导入/导出取消
+let handlerCancel = () => {
+    visibleUploadorDown.value = false
 }
 // 下载公用方法
 function downFilePublic(content, fileName) {

+ 2 - 2
src/views/vent/gas/gasInspectNonfc/gasInspectNonfc.api.ts

@@ -3,8 +3,8 @@ import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
     list = '/safety/gasIns/list',//通过id(巡检卡id)查询
-    importByExcel='/safety/gasDayReport/importByExcel',//导入瓦斯巡检地址
-    exportGasByExcel='/safety/gasDayReport/exportGasByExcel',//导出瓦斯巡检地址
+    importByExcel='/safety/gasDayReport/importGasIns',//导入瓦斯巡检地址
+    exportGasByExcel='/safety/gasDayReport/exportGasIns',//导出瓦斯巡检地址
     queryAllDisTeam='/safety/disTeamInfo/queryAllDisTeam',//查询所有区队
     moveOrderNum='/safety/gasIns/moveOrderNum',//上下移接口
     edit='/safety/gasIns/edit',//瓦斯巡检地点编辑

+ 18 - 12
src/views/vent/gas/gasInspectNonfc/index.vue

@@ -47,7 +47,7 @@
                 <template #action="{ record }">
                     <a class="table-action-link" @click="handlerEdit(record)">编辑</a>
                     <a-popconfirm title="删除内容无法恢复,是否删除" ok-text="确定" cancel-text="取消"
-                        @confirm="handleDelCardInfo(record)" >
+                        @confirm="handleDelCardInfo(record)">
                         <a class="table-action-link">删除</a>
                     </a-popconfirm>
                     <a class="table-action-link" @click="moveUp(record)">上移</a>
@@ -200,12 +200,23 @@ let getupload = () => {
 }
 //确定导入
 async function handlerComfirm(param) {
-    let res = await importByExcel(param)
-    if (res.code == 200) {
-        visibleUploadorDown.value = false
-        message.success('导入成功')
-        queryByIdList()
+    if (modalType.value == 'upload') {
+        let res = await importByExcel(param)
+        if (res.code == 200) {
+            visibleUploadorDown.value = false
+            message.success('导入成功')
+            queryByIdList()
+        }
+    } else {
+        let res = await exportGasByExcel({ insType: param.insType })
+        console.log(res, '导出数据')
+        if (res) {
+            let filename = `${new Date().getTime()}.xlsx`;
+            downFilePublic(res, filename);
+            message.success('导出成功')
+        }
     }
+
 }
 //导出
 let getdownload = () => {
@@ -215,12 +226,7 @@ let getdownload = () => {
 }
 //确定导出
 async function handlerCancel(param) {
-    let res = await exportGasByExcel({ insType: param.insType })
-    console.log(res, '导出数据')
-    if (res) {
-        let filename = '111.xlsx';
-        downFilePublic(res, filename);
-    }
+    modalType.value =''
 }
 // 下载公用方法
 function downFilePublic(content, fileName) {

+ 8 - 5
src/views/vent/monitorManager/dedustMonitor/components/DedustHome.vue

@@ -1,15 +1,18 @@
 <template>
   <a-spin tip="Loading..." :spinning="loading">
     <div class="monitor-container">
+      <div style="position: absolute; height: 40px; width: 100%; top: calc(50%-20px); font-size: 20px; color: red; text-align: center">
+        {{ deviceInfo.warnDes }}
+      </div>
       <div class="lr left-box vent-margin-t-10">
         <ventBox1>
           <template #title>
             <div>除尘机状态</div>
           </template>
           <template #container>
-            <List layout="double-columns" title="故障状态" v-bind="dedustStatusPropA" />
-            <List title="报警状态" v-bind="dedustStatusPropB" />
-            <List title="激活状态" v-bind="dedustStatusPropC" />
+            <List icon="warning-title" type="status-light" :labelWidth="130" layout="double-columns" title="故障状态" v-bind="dedustStatusPropA" />
+            <List icon="warning-title" type="status-light" :labelWidth="300" title="报警状态" v-bind="dedustStatusPropB" />
+            <List icon="warning-title" type="status-light" :labelWidth="300" title="激活状态" v-bind="dedustStatusPropC" />
           </template>
         </ventBox1>
       </div>
@@ -19,7 +22,7 @@
             <div>监测参数</div>
           </template>
           <template #container>
-            <List v-bind="dedustMonitorProp" />
+            <List :labelWidth="200" v-bind="dedustMonitorProp" />
           </template>
         </ventBox1>
       </div>
@@ -130,7 +133,7 @@
       Object.assign(e, e.readData);
       e.readData = null;
     });
-    deviceInfo.value = _.get(res, 'deviceInfo.dedustefan.datalist[0]', {});
+    deviceInfo.value = _.get(res, 'deviceInfo.dedustefan.datalist[0]', { warnDes: '设备断开' });
     workFaceHistorySource.value = res.sysInfo.history;
     workFaceSource.value = Object.assign(res.sysInfo, res.sysInfo.readData);
     loading.value = false;

+ 13 - 17
src/views/vent/monitorManager/dedustMonitor/dedust.data.ts

@@ -1,15 +1,11 @@
-/** 故障相关状态配置 */
-export const statusConfigA = [{ value: 1, label: '故障' }, { label: '正常' }];
-/** 报警相关状态配置 */
-export const statusConfigB = [{ value: 1, label: '报警' }, { label: '正常' }];
-/** 激活与否相关状态配置 */
-export const statusConfigC = [{ value: 1, label: '激活' }, { label: '接触' }];
+/** 故障相关状态配置 0 正常 1 故障 */
+export const statusConfigA = [{ value: 0, label: '' }, { label: '' }];
+/** 报警相关状态配置 0 正常 1 报警 */
+export const statusConfigB = [{ value: 0, label: '' }, { label: '' }];
+/** 激活与否相关状态配置 0 接触 1 激活 */
+export const statusConfigC = [{ value: 0, label: '' }, { label: '' }];
 
 export const dedustMonitorConfig = [
-  {
-    prop: 'warnDes',
-    label: '报警描述',
-  },
   // {
   //   prop: 'FrequencySetPointZD',
   //   label: '最低频率设置',
@@ -24,31 +20,31 @@ export const dedustMonitorConfig = [
   // },
   {
     prop: 'Frequency',
-    label: '运行频率',
+    label: '运行频率(Hz)',
   },
   {
     prop: 'BusVoltage',
-    label: '母线电压',
+    label: '母线电压(V)',
   },
   {
     prop: 'OutputVoltage',
-    label: '输出电压',
+    label: '输出电压(V)',
   },
   {
     prop: 'Outputcurrent',
-    label: '输出电流',
+    label: '输出电流(A)',
   },
   {
     prop: 'OutputPower',
-    label: '输出功率',
+    label: '输出功率(kW)',
   },
   {
     prop: 'Current1',
-    label: '前机电流',
+    label: '前机电流(A)',
   },
   {
     prop: 'Current2',
-    label: '后机电流',
+    label: '后机电流(A)',
   },
 ];
 

+ 3 - 3
src/views/vent/monitorManager/deviceMonitor/components/device/modal/fiber.modal-Gx.vue

@@ -38,7 +38,7 @@
             <div class="item-container">
               <div class="title">最高温度位置</div>
               <div class="value">{{ posMonitor.highposition !== undefined && posMonitor.highposition !== null ?
-                posMonitor.highposition : '-' }} </div>
+                posMonitor.highposition : '-' }} <span>m</span></div>
             </div>
           </div>
           <div class="top-item">
@@ -72,7 +72,7 @@
             <div class="item-container">
               <div class="title">报警位置</div>
               <div class="value">{{ posMonitor.warnposition !== undefined && posMonitor.warnposition !== null ? posMonitor.warnposition : '-'
-                }} </div>
+                }} <span>m</span></div>
             </div>
           </div>
 
@@ -129,7 +129,7 @@ export default defineComponent({
     };
 
     const chartsColumns = chartsColumnListGx;
-    const xAxisPropType = ref('highposition');
+    const xAxisPropType = ref('time');
     const [register, { setModalProps, closeModal }] = useModalInner();