Răsfoiți Sursa

代码调整

lipenghui 3 luni în urmă
părinte
comite
e861cbc42d

+ 1 - 1
src/router/modules/remaining.ts

@@ -195,7 +195,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
           activeMenu: '/device/info'
         }
       },{
-        path: 'tddevice/detail/:id/:ifInline/:time/:name/:code',
+        path: 'tddevice/detail/:id/:ifInline/:time/:name/:code/:dept',
         component: () => import('@/views/pms/device/monitor/TdDeviceInfo.vue'),
         name: 'TdDeviceDetail',
         meta: {

+ 5 - 0
src/views/pms/device/DeviceInfo.vue

@@ -56,6 +56,11 @@
                 {{ formData.model ? formData.model : '-' }}
               </el-form-item>
             </el-col>
+            <el-col :span="8">
+              <el-form-item label="责任人:" prop="responsibleNames">
+                {{ formData.responsibleNames ? formData.responsibleNames : '-' }}
+              </el-form-item>
+            </el-col>
           </el-row>
         </el-form>
       </div>

+ 19 - 10
src/views/pms/device/monitor/TdDeviceInfo.vue

@@ -1,25 +1,33 @@
 <template>
   <ContentWrap v-loading="formLoading">
     <ContentWrap>
-      <el-form style="height:39px;margin-left: 15px;">
-        <el-row>
-          <el-col :span="6">
+      <el-form style="height:89px;margin-left: 15px;">
+        <el-row style="display: flex;flex-direction: row; ">
+<!--          <el-col :span="6">-->
             <el-form-item prop="deviceCode">
               <template #label>
                 <span class="custom-label">资产编码:</span>
               </template>
               <span class="custom-label">{{ formData.deviceCode }}</span>
             </el-form-item>
-          </el-col>
-          <el-col :span="6">
+<!--          </el-col>-->
+<!--          <el-col :span="6">-->
             <el-form-item prop="deviceName">
               <template #label>
                 <span class="custom-label">设备类别:</span>
               </template>
               <span class="custom-label">{{ formData.deviceName }}</span>
             </el-form-item>
-          </el-col>
-          <el-col :span="6">
+<!--          </el-col>-->
+<!--          <el-col :span="6">-->
+            <el-form-item prop="dept">
+              <template #label>
+                <span class="custom-label">所在部门:</span>
+              </template>
+              <span class="custom-label">{{ formData.dept }}</span>
+            </el-form-item>
+<!--          </el-col>-->
+<!--          <el-col :span="6">-->
             <el-form-item  prop="ifInline">
               <template #label>
                 <span class="custom-label">是否在线:</span>
@@ -32,15 +40,15 @@
                 </template>
 <!--              </span>-->
             </el-form-item>
-          </el-col>
-          <el-col :span="6">
+<!--          </el-col>-->
+<!--          <el-col :span="6">-->
             <el-form-item prop="lastInlineTime">
               <template #label>
                 <span class="custom-label">最后数据时间:</span>
               </template>
               <span class="custom-label">{{ formData.lastInlineTime }}</span>
             </el-form-item>
-          </el-col>
+<!--          </el-col>-->
         </el-row>
       </el-form>
     </ContentWrap>
@@ -169,6 +177,7 @@ onMounted(async () => {
   formData.value.deviceName = params.name
   formData.value.lastInlineTime = params.time
   formData.value.ifInline = params.ifInline
+  formData.value.dept = params.dept
   await IotDeviceApi.getIotDeviceTds(id).then(res => {
     specs.value = res
     specs.value = specs.value.sort((a, b) => {

+ 4 - 4
src/views/pms/device/monitor/index.vue

@@ -92,7 +92,7 @@
                   <div class="mr-2.5 flex items-center">
                     <img src="@/assets/svgs/iot/card-fill.svg" class="w-[18px] h-[18px]" />
                   </div>
-                  <div class="text-[16px] font-600 flex-1">{{ item.deviceName }}</div>
+                  <div class="text-[16px] font-600 flex-1">{{ item.deviceCode+item.deviceName }}</div>
                   <!-- 添加设备状态标签 -->
                   <div class="inline-flex items-center">
                     <div
@@ -145,7 +145,7 @@
                     class="flex-1 !px-2 !h-[32px] text-[13px]"
                     type="warning"
                     plain
-                    @click="openDetail(item.id, item.ifInline, item.lastInlineTime,item.deviceName,item.deviceCode)"
+                    @click="openDetail(item.id, item.ifInline, item.lastInlineTime,item.deviceName,item.deviceCode,item.deptName)"
                   >
                     <Icon icon="ep:view" class="mr-1" />
                     详情
@@ -322,13 +322,13 @@ const resetQuery = () => {
 
 /** 打开详情 */
 const { push } = useRouter()
-const openDetail = (id: number,ifInline: string, time:string, name:string,code:string) => {
+const openDetail = (id: number,ifInline: string, time:string, name:string,code:string, dept:string) => {
   debugger
   if (time === null||time === undefined) {
     message.warning("没有数采数据")
     return
   }
-  push({ name: 'TdDeviceDetail', params: { id,ifInline, time,name,code } })
+  push({ name: 'TdDeviceDetail', params: { id,ifInline, time,name,code,dept } })
 }