tangning 1 ano atrás
pai
commit
056026fb18
2 arquivos alterados com 42 adições e 2 exclusões
  1. 30 2
      src/views/product/rtk/AddModal.vue
  2. 12 0
      src/views/product/rtk/list.vue

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

@@ -48,6 +48,18 @@
           },
         },
         {
+          field: 'cameraSnCode',
+          component: 'Input',
+          required: true,
+          label: '相机sn',
+          componentProps: {
+            maxLength: 50,
+          },
+          colProps: {
+            span: 20,
+          },
+        },
+        {
           field: 'rtkType',
           component: 'Select',
           label: '板卡类型',
@@ -73,6 +85,9 @@
                 key: 2,
               },
             ],
+            onChange: (value) => {
+              handlertkType(value);
+            },
           },
           // required: true,
         },
@@ -152,7 +167,7 @@
           componentProps: {
             maxLength: 50,
             // readonly:preventAutoFill.value,
-            placeholder:"请输入数字、字母大小写组合"
+            placeholder: '请输入数字、字母大小写组合',
           },
           colProps: { span: 20 },
         },
@@ -175,7 +190,7 @@
           },
         },
       ];
-      const [registerForm, { validate, resetFields, setFieldsValue }] = useForm({
+      const [registerForm, { validate, resetFields, setFieldsValue, updateSchema }] = useForm({
         labelWidth: 120,
         schemas,
         showActionButtonGroup: false,
@@ -195,6 +210,19 @@
         console.log('data', data);
         setFieldsValue(data);
       }
+      function handlertkType(val) {
+        console.log('val', val);
+        let ifShow = val == 0;
+        updateSchema([
+          { field: 'ipAddr', ifShow },
+          { field: 'mountPoint', ifShow },
+          { field: 'port', ifShow },
+          { field: 'userName', ifShow },
+          { field: 'password', ifShow },
+          { field: 'operator', ifShow },
+          { field: 'cameraSnCode', ifShow },
+        ]);
+      }
       const handleSubmit = async () => {
         try {
           const params = await validate();

+ 12 - 0
src/views/product/rtk/list.vue

@@ -65,6 +65,12 @@
       const [register, { openModal }] = useModal();
       const columns: BasicColumn[] = [
         {
+          title: '相机sn',
+          ellipsis: true,
+          dataIndex: 'cameraSnCode',
+          width: 100,
+        },
+        {
           title: '板卡类型',
           dataIndex: 'rtkType',
           ellipsis: true,
@@ -115,6 +121,12 @@
           width: 120,
         },
         {
+          title: '创建人',
+          ellipsis: true,
+          dataIndex: 'createNickName',
+          width: 100,
+        },
+        {
           title: '创建时间',
           ellipsis: true,
           dataIndex: 'createTime',