Browse Source

fix: modification behavior of receiving card information of device

daigang 3 năm trước cách đây
mục cha
commit
d9c29fd879

+ 1 - 1
src/views/realm/device/settings/components/external/Gateway/index.vue

@@ -81,7 +81,7 @@
         </template>
         <div
           v-else
-          class="l-flex__fill l-flex--row center u-color--info"
+          class="l-flex__fill l-flex--row center"
         >
           <div class="l-flex--col center">
             <button

+ 10 - 32
src/views/realm/device/settings/components/external/ReceivingCard/index.vue

@@ -17,22 +17,8 @@
                 v-model="info.manufacturerKey"
                 class="l-flex__fill c-info__value"
                 :schema="manufacturerSelectSchema"
-              />
-              <!-- <el-select
-                v-model="info.manufacturerKey"
-                class="l-flex__fill c-info__value"
-                placeholder="请选择厂商"
-                :loading="manufacturers.loading"
-                @visible-change="getReceivingCardManufacturers"
                 @change="onChangeProp('manufacturerKey')"
-              >
-                <el-option
-                  v-for="manufacturer in manufacturers.list"
-                  :key="manufacturer.value"
-                  :label="manufacturer.label"
-                  :value="manufacturer.value"
-                />
-              </el-select> -->
+              />
             </div>
             <div class="l-flex--row l-flex__fill c-info__item">
               <div class="l-flex__none c-info__title">
@@ -125,7 +111,7 @@
         </el-dialog>
       </template>
       <template v-else>
-        <div class="l-flex__fill l-flex--row center u-color--info">
+        <div class="l-flex__fill l-flex--row center">
           <div class="l-flex--col center">
             <button
               class="o-button"
@@ -161,19 +147,6 @@
           </el-upload>
           <div class="c-grid-form u-align-self--center">
             <span class="c-grid-form__label required">厂商</span>
-            <!-- <el-select
-              v-model="receivingCard.manufacturerKey"
-              placeholder="请选择厂商"
-              :loading="manufacturers.loading"
-              @visible-change="getReceivingCardManufacturers"
-            >
-              <el-option
-                v-for="manufacturer in manufacturers.list"
-                :key="manufacturer.value"
-                :label="manufacturer.label"
-                :value="manufacturer.value"
-              />
-            </el-select> -->
             <schema-select
               v-model="receivingCard.manufacturerKey"
               placeholder="请选择厂商"
@@ -420,9 +393,14 @@ export default {
         this.info[key] = this.$defaultInfo[key]
         return
       }
-      this.updateProp(key, this.info[key]).catch(() => {
-        this.$defaultInfo[key] = this.info[key]
-      })
+      this.updateProp(key, this.info[key]).then(
+        () => {
+          this.$defaultInfo[key] = this.info[key]
+        },
+        () => {
+          this.info[key] = this.$defaultInfo[key]
+        }
+      )
     },
     updateProp (key, data, options) {
       const formData = new FormData()

+ 1 - 1
src/views/realm/device/settings/components/external/SendingCard/index.vue

@@ -68,7 +68,7 @@
         </template>
         <div
           v-else
-          class="l-flex__fill l-flex--row center u-color--info"
+          class="l-flex__fill l-flex--row center"
         >
           <div class="l-flex--col center">
             <button