Przeglądaj źródła

feat(组件): 修改bug

tangning 2 lat temu
rodzic
commit
435f2ecb97

+ 1 - 1
src/api/sys/user.ts

@@ -7,7 +7,7 @@ import type { AppRouteRecordRaw } from '/@/router/types';
 enum Api {
   // Login = '/basic-api/login',
   Login = '/service/manage/login',
-  Logout = '/basic-api/logout',
+  Logout = '/service/manage/logout',
   GetUserInfo = '/service/manage/sysUser/getInfo',
   GetPermCode = '/service/manage/sysMenu/getButtonByUserId',
 }

+ 1 - 1
src/components/Upload/src/FileList.vue

@@ -21,7 +21,7 @@
       return () => {
         const { columns, actionColumn, dataSource } = props;
         const columnList = [...columns, actionColumn];
-        console.log('createPreviewActionColumn',columnList,props)
+        console.log('createPreviewActionColumn',columnList,dataSource)
         return (
           <table class="file-table">
             <colgroup>

+ 1 - 1
src/components/Upload/src/UploadPreviewModal.vue

@@ -36,10 +36,10 @@
         (value) => {
           if (!isArray(value)) value = [];
           const fileFlow = props.fileFlow
-            console.log('uploadApi',fileFlow,props)
           fileListRef.value = value
             .filter((item) => !!item)
             .map((item) => {
+            console.log('uploadApiitem',item)
               return {
                 url: fileFlow?item.url:item,
                 type: fileFlow?'':item.split('.').pop() || '',

+ 2 - 0
src/components/Upload/src/data.tsx

@@ -139,6 +139,7 @@ export function createPreviewActionColumn({
     dataIndex: 'action',
     fixed: false,
     customRender: ({ record }) => {
+      console.log('record',record)
       const actions: ActionItem[] = [
         {
           label: t('component.upload.del'),
@@ -147,6 +148,7 @@ export function createPreviewActionColumn({
         },
         {
           label: t('component.upload.download'),
+          ifShow:false,
           onClick: handleDownload.bind(null, record),
         },
       ];

+ 3 - 0
src/components/Upload/src/helper.ts

@@ -12,6 +12,9 @@ export function checkImgType(file: File) {
 
 export function isImgTypeByName(name: string) {
   console.log('isImgTypeByName',name)
+  if(!name){
+    return false
+  }
   // return /\.(jpg|jpeg|png|gif)$/i.test(name);
   // return /\.(jpg|jpeg|png|gif)$/i.test(name.split('?').shift());
   return /\.(jpg|jpeg|png|gif)$/i.test(name.split('?').shift());

+ 2 - 2
src/layouts/default/header/index.vue

@@ -33,11 +33,11 @@
 
     <!-- action  -->
     <div :class="`${prefixCls}-action`">
-      <AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" />
+      <!-- <AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" /> -->
 
       <ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" />
 
-      <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" />
+      <!-- <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" /> -->
 
       <FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" />
 

+ 2 - 0
src/locales/lang/zh-CN/routes/product.ts

@@ -20,6 +20,8 @@ export default {
     1:'四维看看',
     2:'四维看见',
     3:'四维深时',
+    // 9:'四维看见',
+    // 10:'四维深时',
   },
   outType:{
     0:'正常销售',

+ 1 - 1
src/locales/lang/zh-CN/sys.ts

@@ -66,7 +66,7 @@ export default {
     forgetFormTitle: '重置密码',
 
     signInTitle: '让数字化飞入寻常百姓家',
-    signInDesc: '实景三维激光相机!',
+    signInDesc: '',
     policy: '我同意xxx隐私政策',
     scanSign: `扫码后点击"确认",即可完成登录`,
 

+ 4 - 1
src/utils/http/axios/Axios.ts

@@ -144,7 +144,10 @@ export class VAxios {
           });
           return;
         }
-
+        if(params.data![key] == undefined){
+          formData.append(key, '');
+          return;
+        }
         formData.append(key, params.data![key]);
       });
     }

+ 1 - 1
src/views/account/overview/caremModal.vue

@@ -58,7 +58,7 @@
       })
       const columns: BasicColumn[] = [
         {
-          title: 'sn码',
+          title: 'SN码',
           dataIndex: 'snCode',
           width: 120,
         },

+ 2 - 2
src/views/account/product/data.tsx

@@ -53,7 +53,7 @@ export const columns:  BasicColumn[] = [
     },
   },
   {
-    title: 'sn码',
+    title: 'SN码',
     dataIndex: 'snCode',
     width: 180,
   },
@@ -254,7 +254,7 @@ export const cameraSearchForm: Partial<FormProps> = {
     },
     {
       field: 'snCode',
-      label: 'sn码',
+      label: 'SN码',
       component: 'Input',
       componentProps: {
         maxLength: 100,

+ 17 - 28
src/views/customer/device.vue

@@ -40,6 +40,9 @@
   import DeviceLinkModal from './modal/DeviceLinkModal.vue';
   import { useModal } from '/@/components/Modal';
   import { useRouter } from 'vue-router';
+  import { useI18n } from '/@/hooks/web/useI18n';
+  import { UnbindCameraApi } from '/@/api/account';
+  const { t } = useI18n();
   export default defineComponent({
     components: {
       BasicTable,
@@ -51,7 +54,7 @@
       [Descriptions.Item.name]: Descriptions.Item,
     },
     setup() {
-      const { createConfirm } = useMessage();//createMessage,
+      const { createMessage, createConfirm } = useMessage();
       const [registerLinkModal, { openModal: openLinkModal }] = useModal();
       const router = useRouter();
       const companyId: Number = router.currentRoute.value.params.id - 0;
@@ -60,7 +63,7 @@
       });
       const columns: BasicColumn[] = [
         {
-          title: 'sn码',
+          title: 'SN码',
           dataIndex: 'snCode',
           width: 180,
         },
@@ -95,15 +98,15 @@
           title: '出库类型',
           dataIndex: 'outType',
           width: 80,
-          // customRender: ({ record }) => {
-          //   let typeObj ={
-          //     '0':'正常销售',
-          //     '1':'员工自用',
-          //     '2':'礼品赠送',
-          //     '3':'其他',
-          //   }
-          //   return typeObj[record.outType]
-          // }
+          customRender: ({ record }) => {
+            let typeObj ={
+              '0':t('routes.product.outType.0'),
+              '1':t('routes.product.outType.1'),
+              '2':t('routes.product.outType.2'),
+              '3':t('routes.product.outType.3'),
+            }
+            return typeObj[record.outType]
+          }
         },
         {
           title: '客户名称',
@@ -222,28 +225,14 @@
         canResize: false,
       });
       async function handleUnbind(record: Recordable) {
-        console.log('handleDelete', record);
-
-        // sceneDelete({ num: record.num })
-        //   .then(() => {
-        //     message.success({
-        //       content: '删除成功',
-        //     });
-
-        //     reload();
-        //   })
-        //   .catch(() => {
-        //     message.success({
-        //       content: '删除失败',
-        //     });
-        //   });
-
         createConfirm({
           iconType: 'warning',
           title: () => h('span', '温馨提示'),
           content: '解绑后用户将看不到该相机拍摄的场景。<br/>确定解绑吗?',
           onOk: async () => {
-            // await DownExport();
+            await UnbindCameraApi({cameraId:record.id})
+            createMessage.success(t('common.optSuccess'));
+            reload()
           },
         });
       }

+ 1 - 1
src/views/customer/index.vue

@@ -111,7 +111,7 @@
           dataIndex: 'companyDesc',
           width: 180,
           customRender: ({ record }) => {
-            return record.cameraCount ? record.cameraCount : '-';
+            return record.companyDesc ? record.companyDesc : '-';
           },
         },
         {

+ 4 - 4
src/views/customer/modal/DeviceLinkModal.vue

@@ -58,10 +58,8 @@
             fileFlow: true,
             accept: ['xls', 'xlsx'],
             afterFetch: function (data) {
-              // console.log('uploadApi', data);
-              // Reflect.set(data, 'url', data.file);
+              // Reflect.set(data, 'url', data.name);
               fileFlow.file = data.file;
-              console.log(fileFlow.file);
               return data;
             },
           },
@@ -98,7 +96,9 @@
           const params = await validate();
           const apiData = {
             file: fileFlow.file,
-            type: 2,
+            data:{
+              type: 2,
+            }
           };
           const res = await companyUploadExcel(apiData);
           console.log('res', res);

+ 8 - 4
src/views/customer/modal/InfoModal.vue

@@ -63,7 +63,7 @@
             //   // @ts-ignore
             //   validator: async (rule, value) => {
             //     if (!value) {
-            //       return Promise.reject('请输入相机sn码');
+            //       return Promise.reject('请输入相机SN码');
             //     }
             //     if (/.*[\u4e00-\u9fa5]+.*$/.test(value)) {
             //       /* eslint-disable-next-line */
@@ -111,6 +111,7 @@
           field: 'topLogo',
           component: 'Upload',
           label: '顶部LOGO',
+          helpMessage:'进入场景时显示的LOGO',
           defaultValue: null,
           componentProps: {
             api: uploadApi,
@@ -118,7 +119,7 @@
             maxSize: 5,
             accept: ['jpg', 'png'],
             afterFetch: function (data) {
-              Reflect.set(data, 'url', data.data);
+              // Reflect.set(data, 'url', data.data);
               return data;
             },
           },
@@ -129,6 +130,7 @@
         {
           field: 'floorLogo',
           component: 'Upload',
+          helpMessage:'在场景内漫游时,显示在地面的LOGO',
           label: '地面LOGO',
           defaultValue: null,
           componentProps: {
@@ -137,7 +139,7 @@
             maxSize: 5,
             accept: ['jpg', 'png'],
             afterFetch: function (data) {
-              Reflect.set(data, 'url', data.data);
+              // Reflect.set(data, 'url', data.data);
               return data;
             },
           },
@@ -150,13 +152,14 @@
           component: 'Upload',
           label: '二维码LOGO',
           defaultValue: null,
+          helpMessage:'显示在场景二维码中间的LOGO',
           componentProps: {
             api: uploadApi,
             maxNumber: 1,
             maxSize: 5,
             accept: ['jpg', 'png'],
             afterFetch: function (data) {
-              Reflect.set(data, 'url', data.data);
+              // Reflect.set(data, 'url', data.data);
               return data;
             },
           },
@@ -168,6 +171,7 @@
           field: 'showLogo',
           component: 'RadioGroup',
           label: '初始LOGO',
+          helpMessage:'四维时代提供技术支持',
           defaultValue: 1,
           componentProps: {
             options: [

+ 2 - 2
src/views/customer/modal/MoveModal.vue

@@ -65,7 +65,7 @@
               // @ts-ignore
               validator: async (rule, value) => {
                 if (!value) {
-                  return Promise.reject('请输入相机sn码');
+                  return Promise.reject('请输入相机SN码');
                 }
                 if (/.*[\u4e00-\u9fa5]+.*$/.test(value)) {
                   /* eslint-disable-next-line */
@@ -77,7 +77,7 @@
             },
           ],
           componentProps: {
-            placeholder: '请输入相机sn码',
+            placeholder: '请输入相机SN码',
             maxLength: 15,
             onChange: (data) => {
               console.log('data', data);

+ 23 - 28
src/views/customer/scene.vue

@@ -178,7 +178,7 @@
           },
         },
         {
-          title: 'sn码',
+          title: 'SN码',
           dataIndex: 'snCode',
           width: 180,
         },
@@ -229,24 +229,24 @@
           title: '状态',
           dataIndex: 'statusString',
           width: 80,
-          customRender: ({ record }) => {
-            let str;
-            switch (record.status - 0) {
-              case 0:
-                str = '计算中';
-                break;
-              case 1:
-                str = '计算成功';
-                break;
-              case -2:
-                str = '计算成功';
-                break;
-              case -1:
-                str = '计算失败';
-                break;
-            }
-            return record.payStatus == 1 ? '封存' : str;
-          },
+          // customRender: ({ record }) => {
+          //   let str;
+          //   switch (record.status - 0) {
+          //     case 0:
+          //       str = '计算中';
+          //       break;
+          //     case 1:
+          //       str = '计算成功';
+          //       break;
+          //     case -2:
+          //       str = '计算成功';
+          //       break;
+          //     case -1:
+          //       str = '计算失败';
+          //       break;
+          //   }
+          //   return record.payStatus == 1 ? '封存' : str;
+          // },
         },
         {
           title: '操作',
@@ -275,7 +275,7 @@
           },
           {
             field: 'snCode',
-            label: 'sn码',
+            label: 'SN码',
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -309,7 +309,7 @@
         // title: `场景列表`,
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
-        searchInfo: { companyId },
+        searchInfo: { companyId,type:tableType },
         useSearchForm: true,
         formConfig: searchForm,
         showTableSetting: true,
@@ -358,13 +358,7 @@
             message.success({
               content: '删除成功',
             });
-
             reload();
-          })
-          .catch(() => {
-            message.success({
-              content: '删除失败',
-            });
           });
         //   },
         // });
@@ -393,7 +387,7 @@
 
         checkDownLoad({ num: record.num }).then((res) => {
           console.log(res);
-          if (res.downloadStatus == 0) {
+          if (res.downloadStatus != 3) {
             // 未下载过,需要打包
             sceneDownload({ num: record.num }).then((res) => {
               console.log(res);
@@ -417,6 +411,7 @@
               }
             });
           } else {
+          window.open(res.downloadUrl);
           }
         });
       }

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

@@ -94,7 +94,7 @@
       });
       const columns: BasicColumn[] = [
         {
-          title: 'sn码',
+          title: 'SN码',
           dataIndex: 'snCode',
           width: 180,
         },
@@ -131,10 +131,10 @@
           width: 80,
           customRender: ({ record }) => {
             let typeObj ={
-              '0':'正常销售',
-              '1':'员工自用',
-              '2':'礼品赠送',
-              '3':'其他',
+              '0':t('routes.product.outType.0'),
+              '1':t('routes.product.outType.1'),
+              '2':t('routes.product.outType.2'),
+              '3':t('routes.product.outType.3'),
             }
             return typeObj[record.outType]
           }
@@ -316,7 +316,7 @@
           title: () => h('span', '温馨提示'),
           content: '解绑后用户将看不到该相机拍摄的场景。<br/>确定解绑吗?',
           onOk: async () => {
-            await await UnbindCameraApi({cameraId:record.id})
+            await UnbindCameraApi({cameraId:record.id})
             createMessage.success(t('common.optSuccess'));
             reload()
           },

+ 3 - 0
src/views/invoice/EditModal.vue

@@ -3,6 +3,9 @@
     v-bind="$attrs"
     @register="register"
     title="开票详情"
+    height="500"
+    :showOkBtn="false"
+    :showCancelBtn="false"
     @visible-change="handleVisibleChange"
     @cancel="resetFields"
     @ok="handleSubmit"

+ 1 - 0
src/views/invoice/InvoiceModal.vue

@@ -3,6 +3,7 @@
     v-bind="$attrs"
     @register="register"
     title="开票登记"
+    okText="发送"
     @visible-change="handleVisibleChange"
     @cancel="resetFields"
     @ok="handleSubmit"

+ 1 - 1
src/views/operate/components/message/addModal.vue

@@ -51,7 +51,7 @@
         },{
             field: 'noteContent',
             component: 'InputTextArea',
-            required: true,
+            // required: true,
             label: '备注',
             componentProps: {
               maxLength: 200,

+ 7 - 1
src/views/operate/components/recruit/addModal.vue

@@ -52,6 +52,9 @@
             component: 'Input',
             required: true,
             label: '职位名称',
+            componentProps: {
+              maxLength: 15,
+            },
             colProps: {
               span: 22,
             },
@@ -60,6 +63,9 @@
             component: 'Input',
             required: true,
             label: '工作地点',
+            componentProps: {
+              maxLength: 15,
+            },
             colProps: {
               span: 22,
             },
@@ -69,7 +75,7 @@
             label: '薪资待遇',
             required: true,
             componentProps: {
-              maxLength: 5,
+              maxLength: 15,
               placeholder: '请输入',
               max: 999,
               min: 0,

+ 1 - 1
src/views/order/downloadList.vue

@@ -81,7 +81,7 @@
           dataIndex: 'userName',
           width: 120,
         },{
-          title: '相机sn码',
+          title: 'SN码',
           dataIndex: 'snCode',
           width: 120,
         },{

+ 2 - 5
src/views/product/sdk/index.vue

@@ -43,12 +43,9 @@
               },
               {
                 label: '删除',
-                ifShow: getTypeCheckPerm('sdk-delete'),
+                ifShow: getTypeCheckPerm('sdk-delete') && record.status != 1,
                 icon: 'ic:outline-delete-outline',
-                popConfirm: {
-                  title: '是否确认删除',
-                  confirm: handleDelete.bind(null, record),
-                },
+                onClick: handleDelete.bind(null, record),
               },
             ]"
           />

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

@@ -23,12 +23,12 @@
             :actions="[
               {
                 label: '迁移',
-                ifShow:getTypeCheckPerm('scenes-move'),
+                ifShow:getTypeCheckPerm('scenes-move') && tableType != 3,
                 onClick: handleMove.bind(null, record),
               },
               {
                 label: '下载',
-                ifShow:getTypeCheckPerm('scenes-download'),
+                ifShow:getTypeCheckPerm('scenes-download') && tableType != 3,
                 disabled:
                   (record.payStatus - 0 != 1 && record.status - 0 == 0 ) ||
                   (record.payStatus - 0 != 1 && record.status - 0 == -1 ),
@@ -38,7 +38,7 @@
               {
                 label: '重算',
                 disabled: record.payStatus != 1 && record.status - 0 == 0,
-                ifShow:getTypeCheckPerm('scenes-recalculate'),
+                ifShow:getTypeCheckPerm('scenes-recalculate') && tableType != 3,
                 popConfirm: {
                   title: '是否重算?',
                   confirm: handleReset.bind(null, record),
@@ -179,7 +179,7 @@
           },
         },
         {
-          title: 'sn码',
+          title: 'SN码',
           dataIndex: 'snCode',
           width: 180,
         },
@@ -276,7 +276,7 @@
           },
           {
             field: 'snCode',
-            label: 'sn码',
+            label: 'SN码',
             component: 'Input',
             componentProps: {
               maxLength: 100,

+ 2 - 2
src/views/productOperation/modal/MoveModal.vue

@@ -65,7 +65,7 @@
               // @ts-ignore
               validator: async (rule, value) => {
                 if (!value) {
-                  return Promise.reject('请输入相机sn码');
+                  return Promise.reject('请输入相机SN码');
                 }
                 if (/.*[\u4e00-\u9fa5]+.*$/.test(value)) {
                   /* eslint-disable-next-line */
@@ -77,7 +77,7 @@
             },
           ],
           componentProps: {
-            placeholder: '请输入相机sn码',
+            placeholder: '请输入相机SN码',
             maxLength: 15,
             onChange: (data) => {
               console.log('data', data);

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

@@ -87,7 +87,7 @@
         },
 
         {
-          title: 'sn码',
+          title: 'SN码',
           dataIndex: 'snCode',
           width: 180,
         },

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

@@ -132,6 +132,7 @@
       ];
       const searchForm: Partial<FormProps> = {
         labelWidth: 100,
+        autoSubmitOnEnter:true,
         schemas: [
           {
             field: 'sceneName',

+ 2 - 2
src/views/sys/login/LoginForm.vue

@@ -37,9 +37,9 @@
       <ACol :span="12">
         <FormItem :style="{ 'text-align': 'right' }">
           <!-- No logic, you need to deal with it yourself -->
-          <Button type="link" size="small" @click="setLoginState(LoginStateEnum.RESET_PASSWORD)">
+          <!-- <Button type="link" size="small" @click="setLoginState(LoginStateEnum.RESET_PASSWORD)">
             {{ t('sys.login.forgetPassword') }}
-          </Button>
+          </Button> -->
         </FormItem>
       </ACol>
     </ARow>