tangning 8 months ago
parent
commit
1b1a77b144

+ 11 - 8
src/views/product/rtk/AddModal.vue

@@ -112,6 +112,7 @@
           component: 'Select',
           label: '设备类型',
           required: true,
+          defaultValue: 1,
           colProps: {
             span: 18,
           },
@@ -231,7 +232,7 @@
           },
           rules: [
             {
-              required: false,
+              required: true,
               // @ts-ignore
               validator: (rule, value) => {
                 console.log('isValidateTxtNonSpec', value);
@@ -323,21 +324,21 @@
         handlertkSn(data.cameraSn ? true : false);
         resetFields();
         console.log('data', data);
-        handlertkuserType(1);
-        handleCarmanType(0);
-        handlertkType(1);
+        handlertkuserType(data.accountType != null ? data.accountType : 0);
+        handleCarmanType(data.cameraType || 1);
+        handlertkType(data.rtkType || 1);
         setFieldsValue(data);
         clearValidate();
       }
       function handlertkType(val) {
         console.log('val', val);
         updateSchema([
-          { field: 'failureTime', ifShow: val == 0 },
+          { field: 'accountType', ifShow: val != 0 },
         ]);
       }
       function handlertkuserType(val) {
         console.log('val', val);
-        let ifShow = val == 0;
+        let ifShow = val == 1;
         updateSchema([
           { field: 'ipAddr', ifShow },
           { field: 'mountPoint', ifShow },
@@ -350,9 +351,11 @@
         ]);
       }
       function handleCarmanType(val) {
-        let ifShow = val == 2;
+        let ifShow = val == 3;
         updateSchema([
           { field: 'sgRtkSn', ifShow },
+          { field: 'failureTime', ifShow: val == 3 },
+          { field: 'cameraSn', required: val != 3 },
         ]);
       }
       function handlertkSn(val) {
@@ -362,7 +365,7 @@
         updateSchema([
           { field: 'cameraSn', required },
           // { field: 'rtkType', required },
-          // { field: 'sgRtkSn', required },
+          { field: 'sgRtkSn', required },
           { field: 'ipAddr', required },
           { field: 'mountPoint', required },
           { field: 'port', required },

+ 64 - 6
src/views/product/rtk/data.ts

@@ -211,6 +211,21 @@ export const rtkuserColumns: any[] = [
 ];
 export const rtkdeviceColumns: any[] = [
   {
+    title: '设备类型',
+    dataIndex: 'cameraType',
+    ellipsis: true,
+    width: 120,
+    customRender: ({ record }) => {
+      const obj = {
+        0: '四维看看',
+        1: '四维看见',
+        2: '四维深时',
+        3: '四维深光',
+      };
+      return obj[record.cameraType] || '-';
+    },
+  },
+  {
     title: '相机SN',
     ellipsis: true,
     dataIndex: 'cameraSn',
@@ -234,33 +249,76 @@ export const rtkdeviceColumns: any[] = [
     title: '板卡SN号',
     ellipsis: true,
     dataIndex: 'rtkSnCode',
-    width: 180,
+    width: 265,
   },
   {
     title: '深光rtk插件SN号',
     ellipsis: true,
     dataIndex: 'sgRtkSn',
-    width: 180,
+    width: 160,
   },
   {
-    title: '创建人',
+    title: '账号类型',
     ellipsis: true,
-    dataIndex: 'createNickName',
+    dataIndex: 'accountType',
+    width: 80,
+    customRender: ({ record }) => {
+      const obj = {
+        0: '账号池',
+        1: '专用账号',
+      };
+      return obj[record.accountType] || '-';
+    },
+  },
+  {
+    title: '用户名称',
+    ellipsis: true,
+    dataIndex: 'userName',
     width: 120,
   },
   {
-    title: '创建时间',
+    title: '运营商',
     ellipsis: true,
-    dataIndex: 'createTime',
+    dataIndex: 'operator',
     width: 120,
   },
   {
+    title: 'IP地址',
+    ellipsis: true,
+    dataIndex: 'ipAddr',
+    width: 120,
+  },
+  {
+    title: '挂载点',
+    ellipsis: true,
+    dataIndex: 'mountPoint',
+    width: 120,
+  },
+  {
+    title: '端口',
+    ellipsis: true,
+    dataIndex: 'port',
+    width: 50,
+  },
+  {
     title: '到期时间',
     ellipsis: true,
     dataIndex: 'failureTime',
+    width: 160,
+  },
+  {
+    title: '创建人',
+    ellipsis: true,
+    dataIndex: 'createNickName',
     width: 120,
   },
   {
+    title: '创建时间',
+    ellipsis: true,
+    dataIndex: 'createTime',
+    width: 160,
+  },
+  {
     title: '状态',
     dataIndex: 'useStatus',
     width: 60,

+ 4 - 3
src/views/product/rtk/list.vue

@@ -3,7 +3,7 @@
     <template #footer>
       <a-tabs v-model:activeKey="activeKey" @change="changeTable">
         <a-tab-pane :key="0" tab="RTK设备管理" />
-        <a-tab-pane :key="1" tab="账号池" />
+        <a-tab-pane :key="1" tab="差分账号池" />
         <a-tab-pane :key="2" tab="账号使用日志" />
       </a-tabs>
     </template>
@@ -176,6 +176,7 @@
           {
             field: 'sgRtkSn',
             label: '深光rtk插件SN号',
+            labelWidth: 140,
             component: 'Input',
             colProps: {
               xl: 8,
@@ -190,7 +191,7 @@
         columns: rtkdeviceColumns,
         useSearchForm: true,
         showIndexColumn: false,
-        formConfig: rtksearchForm,
+        formConfig: searchForm,
         showTableSetting: true,
         fetchSetting: {
           pageField: 'pageNum',
@@ -209,7 +210,7 @@
       });
       const [registeruserTable, { reload: reload1 }] = useTable({
         api: rtkAccountList,
-        title: '账号池管理',
+        title: '差分账号池管理',
         columns: rtkuserColumns,
         useSearchForm: true,
         showIndexColumn: false,

+ 1 - 1
src/views/productOperation/cameraScene.vue

@@ -253,7 +253,7 @@
           sgetForm.updateSchema(getSchemas(val))
         }
         console.log('sgetForm', sgetForm);
-        setColumns(getColumns(val == 2 || val == 6));
+        setColumns(getColumns(val == 6));
         clearSelectedRowKeys();
         reload();
       }

+ 1 - 1
src/views/productOperation/data.ts

@@ -57,7 +57,7 @@ export const getSchemas = (val) => {
       field: 'locationType',
       component: 'Select',
       label: '场景类型',
-      ifShow: val != 3 && (val == 2 || val == 6),
+      ifShow: val != 3 && val == 6,
       colProps: {
         xl: 7,
         xxl: 7,