Przeglądaj źródła

屏幕参数添加

chengqian 6 miesięcy temu
rodzic
commit
e45ebb051b
1 zmienionych plików z 38 dodań i 24 usunięć
  1. 38 24
      web/src/view/devicesAdmin/screens/screens.vue

+ 38 - 24
web/src/view/devicesAdmin/screens/screens.vue

@@ -60,6 +60,7 @@
             <el-tag effect="light">{{ scope.row.screensCode }}</el-tag>
           </template>
         </el-table-column>
+        <el-table-column prop="sn" label="SN" />
         <el-table-column prop="screensBrand" label="品牌" />
         <el-table-column prop="screensModel" label="型号"/>
         <el-table-column prop="GateWay.gatewayName" label="所属网关"/>
@@ -129,6 +130,18 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="SN:" :inline="false" prop="sn">
+                <el-input v-model="screensInfo.sn"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="ip地址:" :inline="false" prop="ipAddress">
+                <el-input v-model="screensInfo.ipAddress"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
           <el-row>
             <el-col :span="12">
               <el-form-item label="品牌:" :inline="false" prop="screensBrand">
@@ -142,11 +155,6 @@
             </el-col>
           </el-row>
           <el-row>
-            <el-col :span="12">
-              <el-form-item label="ip地址:" :inline="false" prop="ipAddress">
-                <el-input v-model="screensInfo.ipAddress"></el-input>
-              </el-form-item>
-            </el-col>
             <el-col :span="12">
               <el-form-item label="所属网关:" :inline="false" prop="gatewayId">
                 <el-select v-model="screensInfo.gatewayId" placeholder="所属网关">
@@ -154,8 +162,6 @@
                 </el-select>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="分辨率:" :inline="false">
                 <el-select v-model="screensInfo.resolutionId" placeholder="请选择分辨率">
@@ -163,6 +169,8 @@
                 </el-select>
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="屏幕尺寸:" :inline="false">
                 <el-select v-model="screensInfo.screensSizeId" placeholder="请选择屏幕尺寸">
@@ -170,8 +178,6 @@
                 </el-select>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="所属分路:" :inline="false">
                 <el-select v-model="screensInfo.shunt" placeholder="请选择所属分路">
@@ -180,13 +186,13 @@
                 </el-select>
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="分路描述:" :inline="false">
                 <el-input v-model="screensInfo.shuntDescribe"></el-input>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="安装时间:" :inline="false">
                 <el-date-picker
@@ -240,69 +246,74 @@
             </el-col>
           </el-row>
           <el-row>
+            <el-col :span="12">
+              <el-form-item label="SN:" :inline="false">
+                {{screensInfo.sn }}
+              </el-form-item>
+            </el-col>
             <el-col :span="12">
               <el-form-item label="ip地址:" :inline="false">
                 {{screensInfo.ipAddress }}
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="所属网关:" :inline="false">
                 {{screensInfo.GateWay.gatewayName }}
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="分辨率:" :inline="false">
                 {{screensInfo.Resolution.price }}
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="屏幕尺寸:" :inline="false">
                 {{screensInfo.ScreensSize.size }}
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="所属分路:" :inline="false">
                 <el-tag effect="dark">{{screensInfo.shunt===1?"主路":screensInfo.shunt===2?"支路":"未知"}}</el-tag>
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="分路描述:" :inline="false">
                 {{screensInfo.shuntDescribe }}
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="安装时间:" :inline="false">
                 {{screensInfo.installTime }}
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="在线状态:" :inline="false">
                 <div class="onlinebox" :style="{'background': screensInfo.status===0 ? 'red':'green' }"></div>
                 <span :style="{ color: screensInfo.status === 0 ? 'red' : 'green' }">{{ screensInfo.status === 0 ? '离线' : '在线' }}</span>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="播放状态:" :inline="false">
                 <div class="onlinebox" :style="{'background': screensInfo.playStatus===0 ? 'red':'green' }"></div>
                 <span :style="{ color: screensInfo.playStatus === 0 ? 'red' : 'green' }">{{ screensInfo.playStatus === 0 ? '异常' : '正常' }}</span>
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label="模板状态:" :inline="false">
                 <div class="onlinebox" :style="{'background': screensInfo.displayStatus===0 ? 'red':'green' }"></div>
                 <span :style="{ color: screensInfo.displayStatus === 0 ? 'red' : 'green' }">{{ screensInfo.displayStatus === 0 ? '异常' : '正常' }}</span>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="12">
               <el-form-item label="素材状态:" :inline="false">
                 <div class="onlinebox" :style="{'background': screensInfo.sourceStatus===0 ? 'red':'green' }"></div>
@@ -347,9 +358,12 @@ const rules = ref({
   screensModel: [
     { required: true, message: '请填写型号',trigger: 'blur'},
   ],
-  ipAddress: [
-    { required: true,  message:'请输入ip地址',trigger: 'blur'},
-    { pattern:/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/,message: '请输入正确的ip地址',trigger: 'blur'}
+  // ipAddress: [
+  //   { required: true,  message:'请输入ip地址',trigger: 'blur'},
+  //   { pattern:/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/,message: '请输入正确的ip地址',trigger: 'blur'}
+  // ],
+  sn: [
+    { required: true,  message:'请输入设备SN',trigger: 'blur'},
   ],
   gatewayId: [
     { required: true,  message:'请选择网关',trigger: 'blur'},