codeMan 2 лет назад
Родитель
Сommit
aeab450173

+ 3 - 2
src/components/layout/modules/menu.vue

@@ -10,7 +10,7 @@
           </div>
           </template>
           <template #icon>
-            <CalendarOutlined />
+            <img :src="item.iconurl" />
           </template>
           <a-menu-item v-for="app in item.apps" :key="app.systemappid" @click="routeChange(app)">
             {{app.meta.title}}
@@ -18,7 +18,7 @@
         </a-sub-menu>
         <a-menu-item v-if="item.apps.length == 1" :key="item.systemmoduleid" @click="modClick(item)">
           <template #icon>
-            <CalendarOutlined />
+            <img :src="item.iconurl" />
           </template>
           <span @click="routeChange(item.apps[0])">{{item.apps[0].meta.title}}</span>
         </a-menu-item>
@@ -55,6 +55,7 @@ const modClick = (item)=>{
 const routeChange = (app)=>{
   router.replace({path:app.path,meta:{keepAlive:false}})
 }
+console.log(mods.value);
 const colorState = ref({})
 const setTheme = (themeName)=> {
   if (themeName === 'light') {

+ 22 - 19
src/system/IOT/IoTdashboard/index.vue

@@ -17,7 +17,7 @@
       <!--顶部搜索已经其他操作-->
       <div class="header-control">
         <div class="left">
-          <a-switch v-model:checked="model" checked-children="地图" un-checked-children="列表" style="margin-right: 10px;" @change="modelChange" />
+          <a-button type="primary" size="small" round @click="model=false" v-if="model==true">切换列表</a-button>
           <!-- <a-input v-if="model" placeholder="区域" v-model:value="param.content.where.areaname" @keyup.enter="listData"></a-input> -->
         </div>
       </div>
@@ -98,26 +98,28 @@
         </div> -->
       </div>
         <!--列表-->
-      <div class="M-list" v-if="!model">
-        <normalTable rowKey="w_deviceid" ref="list" size="small" :param="param2" :columns="utils.TBLayout('equipmentTable')">
-          <template #tb_cell="{data}">
-            <div v-if="data.column.dataIndex == 'operation'">
-              <a-button type="link" @click="router.push({path:data.record.dashboardpath,query:{id:data.record.w_deviceid}})">控制界面</a-button>
-            </div>
-            <div v-else-if="data.column.dataIndex == 'rwtype'">
-              {{ data.record.rwtype == 0 ? '读' : data.record.rwtype == 1 ? '写' : '上报' }}
-            </div>
-            <div v-else>
-              {{ data.record[data.column.dataIndex] }}
-            </div>
+        <a-card :bordered="false" class="M-list" v-if="!model">
+          <template #title>
+            <a-button type="primary" size="small" round @click="model=true">切换地图</a-button>
           </template>
-          <template #operation>
-            
-          </template>
-        </normalTable>
-      </div>
+          <normalTable rowKey="w_deviceid" ref="list" size="small" :param="param2" :columns="utils.TBLayout('equipmentTable')">
+            <template #tb_cell="{data}">
+              <div v-if="data.column.dataIndex == 'operation'">
+                <a-button type="link" @click="router.push({path:data.record.dashboardpath,query:{id:data.record.w_deviceid}})">控制界面</a-button>
+              </div>
+              <div v-else-if="data.column.dataIndex == 'rwtype'">
+                {{ data.record.rwtype == 0 ? '读' : data.record.rwtype == 1 ? '写' : '上报' }}
+              </div>
+              <div v-else>
+                {{ data.record[data.column.dataIndex] }}
+              </div>
+            </template>
+            <template #operation>
+              
+            </template>
+          </normalTable>
+        </a-card>
     </div>
-    
   </div>
 </template>
 
@@ -340,6 +342,7 @@ onMounted(() => {
   getData()
   listData()
   set()
+  console.log(utils.TBLayout('equipmentTable'));
 })
 
 </script>

+ 3 - 3
src/system/IOT/controlPanel/model/shidianxing/index.vue

@@ -29,7 +29,7 @@
             v-if="detail.params.最不利点压力"
             :title="detail.params.最不利点压力.paramname" 
             top="-30" 
-            left="500" 
+            left="550" 
             :data="[{value:detail.params.最不利点压力.lastvalue,unit:detail.params.最不利点压力.unit}]"
           ></dataBlock>
           <dataBlock 
@@ -42,8 +42,8 @@
           <dataBlock 
             v-if="detail.params.阀后压力"
             :title="detail.params.阀后压力.paramname" 
-            top="30" 
-            left="300" 
+            top="0" 
+            left="340" 
             :data="[{value:detail.params.阀后压力.lastvalue,unit:detail.params.阀后压力.unit}]"
           ></dataBlock>
          

+ 1 - 0
src/system/IOT/controlPanel/model/shidianxing/modules/timeControl.vue

@@ -57,6 +57,7 @@
                 :form="cmdForm"
                 :ref="`Input${i}`"
                 :isCheck="true"
+                type="h:m"
                 inputBorder="1px solid #ccc"
               >
             </MyInput>

+ 4 - 4
src/system/IOT/controlPanel/modules/myInput.vue

@@ -16,7 +16,7 @@
             <div v-if="text">
               {{ text }}
             </div>
-            <div v-else>
+            <div v-else style="width: 100%;">
               <a-input style="width:100%" :disabled="disabled" v-bind="$attrs" v-if="!max && !min && !step"></a-input>
               <a-input-number style="width:100%" :disabled="disabled" v-bind="$attrs" :min="min" :max="max" :step="step" size="small" v-else/>
             </div>
@@ -44,7 +44,7 @@
         <div v-if="text" style="text-align: right;width: 100%;">
           {{ text }}
         </div>
-        <div v-else>
+        <div v-else style="width: 100%;">
           <a-input style="width:100%" :disabled="disabled" v-bind="$attrs" v-if="!max && !min && !step"></a-input>
           <a-input-number style="width:100%" :disabled="disabled" v-bind="$attrs" :min="min" :max="max" :step="step" size="small" v-else/>
         </div>
@@ -223,13 +223,13 @@ defineExpose({
   background: none !important;
   border: none !important;
   padding: 0 !important;
+  border: var(--input-border) !important;
   width: 50px;
 }
 
 
 /deep/.ant-input-number input {
-  text-align: right;
-  padding-right: 25px;
+  text-align: left;
 }
 
 

+ 10 - 1
src/system/IOT/equipmentMag/detail/index.vue

@@ -111,7 +111,7 @@ const changeDataStructure = (data) => {
     //   value:data.areaname
     // },
     {
-      label:'状态',
+      label:'启用状态',
       value:data.isused ? '启用':'停用',
       style:() => {
         let style = {}
@@ -119,6 +119,15 @@ const changeDataStructure = (data) => {
         return style
       }
     },
+    {
+      label:'运行状态',
+      value:data.status,
+      style:() => {
+        let style = {}
+        style.color = utils.statusAndColor(data.status)
+        return style
+      }
+    },
     {
       label:'描述',
       value:data.remarks

+ 3 - 1
src/system/moduleNormal/siteManager/modules/add.vue

@@ -67,7 +67,8 @@
     enterprisename:'',
     siteid:'',
     magsite:'',
-    sitename:''
+    sitename:'',
+    sys_enterpriseid:''
   })
   const rules = ref([])
   const showDrawer = ()=>{
@@ -95,6 +96,7 @@
   const onSelect = (data)=>{
     console.log(data)
     form.value.enterprisename = data.enterprisename
+    form.value.sys_enterpriseid = data.sys_enterpriseid
   }
 </script>
 

+ 3 - 1
src/system/moduleNormal/siteManager/modules/edit.vue

@@ -68,7 +68,8 @@ import {defineEmits, defineProps, ref} from 'vue'
     enterprisename:'',
     siteid:'',
     magsite:'',
-    sitename:''
+    sitename:'',
+    sys_enterpriseid:''
   })
   const rules = ref([])
   const showDrawer = ()=>{
@@ -98,6 +99,7 @@ import {defineEmits, defineProps, ref} from 'vue'
   const onSelect = (data)=>{
     console.log(data)
     form.value.enterprisename = data.enterprisename
+    form.value.sys_enterpriseid = data.sys_enterpriseid
   }
 </script>
 

+ 1 - 0
src/utils/utils.js

@@ -31,6 +31,7 @@ export default {
       // 获取应用数据
       const store = useAuthStore()
       let apps = store.app
+      console.log(apps);
       // 获取当前应用表格数据
       if (apps.meta.tables[tablename]) {
         let tablecols = apps.meta.tables[tablename].tablecols.map(e=>{