tangning 8 ay önce
ebeveyn
işleme
95eec540b9

+ 10 - 10
src/components/Form/src/components/NumberRange.vue

@@ -155,20 +155,20 @@
     console.log('handleChangeMinValue2', value, minValue_.value);
     const newMaxValue = value;
     // max < min 交换min max
-    if (
-      typeof newMaxValue === 'number' &&
-      parseFloat(String(newMaxValue)) < parseFloat(String(minValue_.value))
-    ) {
+    // if (
+    //   typeof newMaxValue === 'number' &&
+    //   parseFloat(String(newMaxValue)) < parseFloat(String(minValue_.value))
+    // ) {
       // 取值范围判定
       const { min, max } = decideValueRange(newMaxValue, Number(minValue_.value));
       // 更新绑定值
       updateValue(min, max);
-    } else {
-      // 取值范围判定
-      const { min, max } = decideValueRange(Number(minValue_.value), newMaxValue);
-      // 更新绑定值
-      updateValue(min, max);
-    }
+    // } else {
+    //   // 取值范围判定
+    //   const { min, max } = decideValueRange(Number(minValue_.value), newMaxValue);
+    //   // 更新绑定值
+    //   updateValue(min, max);
+    // }
   };
 
   // 更新数据

+ 3 - 1
src/views/account/product/index.vue

@@ -249,7 +249,9 @@
       const tableType = ref<number>(0); //0看看 、1看见、2深时
       const loading = ref(false);
       function cancelDownload() {
-        downloadOption.value = {};
+        downloadOption.value = {
+          percent: 0,
+        };
       }
       const searchFormSs: Partial<FormProps> = {
         labelWidth: 100,

+ 4 - 2
src/views/customer/scene.vue

@@ -108,7 +108,6 @@
     </div>
     <DownLoadModal
       :downloadOption="downloadOption"
-      @cancel="afterClose"
       @register="registerDownModal"
       @update="reload"
       cancelText="取消下载"
@@ -227,7 +226,9 @@
         ],
       };
       function cancelDownload() {
-        downloadOption.value = {};
+        downloadOption.value = {
+          percent: 0,
+        };
       }
       const [registerPriority, { openModal: openPriorityModal }] = useModal();
       const [registerDownModal, { openModal: openDownModal, closeModal }] = useModal();
@@ -361,6 +362,7 @@
                       window.open(res.url);
                       cancelDownload();
                       closeModal();
+                      return;
                     }
                     downloadOption.value = res;
                     console.log(res);

+ 5 - 2
src/views/product/rtk/AddModal.vue

@@ -244,6 +244,9 @@
                   var pattern = /[~!@#$%^&*<>|']/gi;
                   return pattern.test(s);
                 }
+                if (!value) {
+                  return Promise.reject('请输入深光rtk插件SN号');
+                }
                 if (value != null && value !== '') {
                   if (isSpec(value) || value.indexOf(' ') !== -1) {
                     return Promise.reject('不能包含特殊字符或空格');
@@ -331,7 +334,7 @@
         // handlertkSn(data.cameraSn ? true : false);
         resetFields();
         console.log('data', data);
-        tg = data.rtkType == 1 && data.accountType == 1 ? true : false
+        tg = data.rtkType != 0 && data.accountType == 1 ? true : false
         handleCarmanType(data.cameraType != null ? data.cameraType : 1);
         handlertkuserType(data.accountType != null ? data.accountType : 0);
         handlertkType(data.rtkType != null ? data.rtkType : 1);
@@ -345,7 +348,7 @@
           { field: 'failureTime', ifShow: val == 0 },
         ]
         setFieldsValue({
-          accountType: ''
+          accountType: null
         })
         let ifShow = tg || false
         // let ifShow = false

+ 3 - 0
src/views/product/rtk/data.ts

@@ -230,6 +230,9 @@ export const rtkdeviceColumns: any[] = [
     ellipsis: true,
     dataIndex: 'cameraSn',
     width: 100,
+    customRender: ({ record }) => {
+      return record.cameraSn || '-';
+    },
   },
   {
     title: '板卡类型',

+ 11 - 4
src/views/productOperation/cameraScene.vue

@@ -107,9 +107,9 @@
         </template>
       </BasicTable>
     </div>
+    <!-- @cancel="afterClose" -->
     <DownLoadModal
       :downloadOption="downloadOption"
-      @cancel="afterClose"
       @register="registerDownModal"
       @update="reload"
       cancelText="取消下载"
@@ -199,7 +199,11 @@
         schemas: getSchemas(),
       };
       function cancelDownload() {
-        downloadOption.value = {};
+        downloadOption.value = {
+          percent: 0,
+        };
+        console.log('取消下载', downloadOption.value);
+
       }
       const [registerPriority, { openModal: openPriorityModal }] = useModal();
       const [registerDownModal, { openModal: openDownModal, closeModal }] = useModal();
@@ -219,8 +223,10 @@
         beforeFetch: (T) => {
           loading.value = true;
           if (T.shootCounts) {
-            T.shootCountMin = T.shootCounts[0];
-            T.shootCountMax = T.shootCounts[1];
+            let min = T.shootCounts[0]<T.shootCounts[1]?T.shootCounts[0]:T.shootCounts[1];
+            let max = T.shootCounts[0]>T.shootCounts[1]?T.shootCounts[0]:T.shootCounts[1];
+            T.shootCountMin = min;
+            T.shootCountMax = max;
           }
           return T;
         },
@@ -357,6 +363,7 @@
                       window.open(res.url);
                       closeModal();
                       cancelDownload();
+                      return;
                     }
                     downloadOption.value = res;
                     console.log(res);

+ 8 - 1
src/views/productOperation/viewKankan.vue

@@ -298,7 +298,9 @@
         });
       }
       function cancelDownload() {
-        downloadOption.value = {};
+        downloadOption.value = {
+          percent: 0,
+        };
       }
       async function handleColdStorage(record: Recordable) {
         createConfirm({
@@ -369,6 +371,11 @@
                     if (res.percent >= 100) {
                       canDownload.value = false;
                       afterClose();
+                      window.open(res.url);
+                      closeModal();
+                      cancelDownload();
+                      return;
+
                     }
                     downloadOption.value = res;
                     console.log(res);