tangning před 1 rokem
rodič
revize
4d580235b8

+ 10 - 10
src/views/device/index.vue

@@ -107,18 +107,18 @@
           title: '设备类型',
           dataIndex: 'type',
           ellipsis: false,
-          width: 80,  
+          width: 80,
           customRender: ({ record }) => {
             let typeObj = {
-              '0':'旧双目相机',
-              '1':'四维看看',
-              '2':'四维看看lite',
-              '9':'四维看见',
-              '10':'四维深时',
-              '11':'四维深光',
-            }
-            return typeObj[record.type]
-          }        
+              '0': '旧双目相机',
+              '1': '四维看看',
+              '2': '四维看看lite',
+              '9': '四维看见',
+              '10': '四维深时',
+              '11': '四维深光',
+            };
+            return typeObj[record.type];
+          }
         },
 
         {

+ 8 - 4
src/views/productOperation/modal/detailModal.vue

@@ -127,12 +127,12 @@
             options: getOptionList('editAuth', 1),
             onChange: async (value) => {
               let params = await getFieldsValue();
-              console.log('params', params);
+              console.log('params', params, value);
               isEdit.value = value.target.value == 0 ? true : false;
               if (value.target.value == 1) {
                 params.lookAuth = 1;
               }
-              params.isEmpower = isEdit.value ? [] : params.isEmpower;
+              params.isEmpower = isEdit.value ? [0] : params.isEmpower;
               setFieldsValue({ ...params, editAuth: value.target.value });
               updateSchema([
                 {
@@ -142,10 +142,14 @@
                 {
                   field: 'lookAuth',
                   componentProps: {
-                    // disabled: value.target.value == 0,
+                    disabled: value.target.value == 1,
                   },
                 },
                 {
+                  field: 'lookEndTime',
+                  ifShow: value.target.value != 1,
+                },
+                {
                   field: 'isEmpower',
                   componentProps: {
                     options: setOption(),
@@ -281,7 +285,7 @@
           ...data,
           isEmpower: [0], //[data.canAuthLook ? 0 : '', data.canEditLook ? 1 : ''],
         };
-        isEdit.value = setData.editAuth == 0 ? true : false;
+        isEdit.value = true;
         if (data) {
           title.value = data.id ? '编辑授权' : '新增授权';
           modelRef.value = data.id ? true : false;