Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

zhangcl 3 tygodni temu
rodzic
commit
47d305dcc0
2 zmienionych plików z 18 dodań i 6 usunięć
  1. 1 1
      src/views/Home/Index.vue
  2. 17 5
      src/views/pms/device/IotDeviceForm.vue

+ 1 - 1
src/views/Home/Index.vue

@@ -340,7 +340,7 @@ const messageStats = ref<IotStatisticsDeviceMessageSummaryRespVO>({
   upstreamCounts: {},
   downstreamCounts: {}
 })
-const mttr = ref()
+const mttr = ref(0)
 const safe = ref()
 /** 获取统计数据 */
 const getStats = async () => {

+ 17 - 5
src/views/pms/device/IotDeviceForm.vue

@@ -110,12 +110,22 @@
               <el-button type="info" @click="openModelForm">请选择</el-button>
             </div>
           </el-col>
+          <el-col :span="8">
+            <el-form-item :label="t('deviceForm.useProject')" prop="useProject">
+              <el-input v-model="formData.useProject" :disabled="isDetail" height="60px" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item :label="t('deviceForm.assetOwner')" prop="assetOwnership">
+              <el-input v-model="formData.assetOwnership" :disabled="isDetail" height="60px" />
+            </el-form-item>
+          </el-col>
           <el-col :span="8">
             <el-form-item :label="t('deviceForm.picture')" prop="picUrl">
               <UploadImg v-model="formData.picUrl" :disabled="isDetail" height="60px" />
             </el-form-item>
           </el-col>
-          <el-col :span="24">
+          <el-col :span="8">
             <el-form-item :label="t('deviceForm.remark')" prop="remark">
               <el-input v-model="formData.remark" type="textarea" :placeholder="t('deviceForm.remarkHolder')" />
             </el-form-item>
@@ -310,9 +320,9 @@
               >
                 <el-option
                   v-for="item in field.selectOptions.dataSpecsList"
-                  :key="item.value"
+                  :key="item.name"
                   :label="item.name"
-                  :value="item.value"
+                  :value="item.name"
                 />
               </el-select>
 
@@ -411,7 +421,9 @@ const formData = ref({
   deviceStatus: undefined,
   assetProperty: undefined,
   picUrl: undefined,
+  assetOwnership: undefined,
   remark: undefined,
+  useProject: undefined,
   manufacturerId: undefined,
   manufacturerName: undefined,
   supplierId: undefined,
@@ -609,7 +621,6 @@ onMounted(async () => {
   const userInfo = wsCache.get(CACHE_KEY.USER)
   // NOTE: 是否需要像`setUserInfoAction`一样判断`userInfo != null`
   username.value = userInfo.user.nickname
-  debugger
   deptList.value = handleTree(await DeptApi.getSimpleDeptList())
   productClassifyList.value = handleTree(
     await ProductClassifyApi.IotProductClassifyApi.getSimpleProductClassifyList()
@@ -629,6 +640,7 @@ onMounted(async () => {
       list.value.forEach((item) => {
         formData.value[item.code] = item.value;
       })
+      debugger
     } finally {
       formLoading.value = false
     }
@@ -685,7 +697,7 @@ const resetForm = () => {
 }
 
 .base-expandable-content.is-expanded {
-  min-height: 260px; /* 或者根据内容设定一个合适的最大高度 */
+  min-height: 250px; /* 或者根据内容设定一个合适的最大高度 */
 }
 .zz-expandable-content {
   max-height: 0; /* 初始高度为0 */