Просмотр исходного кода

Merge branch 'dev' of http://face3d.4dage.com:7005/zhangyupeng/geosign-mp into dev

tangning 3 лет назад
Родитель
Сommit
98ca7d2dc0

+ 2 - 1
src/api/corporation/list.ts

@@ -25,7 +25,8 @@ enum Api {
   uploadMusic = '/kankan-api/api/manager/file/uploadMusic',
   updateCompany = '/kankan-api/api/manager/company/insertOrUpdate',
   selectCompanyDevice = '/kankan-api/api/manager/company/selectCompanyDevice',
-  unbindDevice = '/kankan-api/api/manager/company/unbindDevice',
+  // unbindDevice = '/kankan-api/api/manager/company/unbindDevice',
+  unbindDevice = '/kankan-api/api/manager/camera/unbind',
 }
 
 /**

+ 1 - 1
src/api/sys/model/userModel.ts

@@ -26,7 +26,7 @@ export interface LoginParams {
 
 export interface updateUserInfoPasswordParam {
   id: string | number;
-  password: string;
+  password?: string;
   newPassword?: string;
 }
 

+ 1 - 0
src/locales/lang/ja/routes/corporation.ts

@@ -42,4 +42,5 @@ export default {
   addCorporation: '会社を追加する',
   managerName: '会社の代表',
   optSuccess: '追加に成功しました。デフォルトのパスワードはGeosign123',
+  approveState: '承認状況',
 };

+ 1 - 0
src/locales/lang/zh-CN/routes/corporation.ts

@@ -42,4 +42,5 @@ export default {
   addCorporation: '新增企业',
   managerName: '联系人',
   optSuccess: '添加成功,默认密码为Geosign123',
+  approveState: '审核状态',
 };

+ 1 - 1
src/views/corporation/verify.vue

@@ -74,7 +74,7 @@
           width: 120,
         },
         {
-          title: t('common.state'),
+          title: t('routes.corporation.approveState'),
           dataIndex: 'state',
           slots: { customRender: 'no' },
           width: 180,

+ 5 - 25
src/views/staff/list.vue

@@ -34,7 +34,7 @@
   </div>
 </template>
 <script lang="ts">
-  import { defineComponent } from 'vue';
+  import { defineComponent, computed } from 'vue';
   import { BasicTable, useTable, BasicColumn, FormProps, TableAction } from '/@/components/Table';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { uploadApi } from '/@/api/sys/upload';
@@ -47,30 +47,10 @@
   // import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard';
   import { useGo } from '/@/hooks/web/usePage';
   // import { Time } from '/@/components/Time';
+  import { useLocaleStore } from '/@/store/modules/locale';
+  const localeStore = useLocaleStore();
 
-  //   appid: null
-  // companyId: 1107
-  // companyName: "南山居"
-  // createTime: 1644801035000
-  // createUser: "11111111111"
-  // fdkkPassword: null
-  // fdkkUser: null
-  // head: null
-  // id: 20356
-  // memoName: "顶顶顶顶"
-  // message: null
-  // nickName: "用户13822221234"
-  // phone: "13822221234"
-  // roleIdList: null
-  // roleList: null
-  // roleName: "公司员工"
-  // state: null
-  // token: null
-  // type: 1
-  // updateTime: 1644801035000
-  // updateUser: "11111111111"
-  // userName: "13822221234"
-  // userPassword: "2a22bac40f44af4d3b5fdc20ea706fc5"
+  const isJA = computed(() => localeStore.getLocale === 'ja');
 
   export default defineComponent({
     components: { BasicTable, TableAction, SetpaswordModal },
@@ -127,7 +107,7 @@
           dataIndex: '',
           slots: { customRender: 'action' },
           fixed: 'right',
-          width: 80,
+          width: isJA.value ? 160 : 120,
         },
       ];
 

+ 14 - 7
src/views/staff/setpaswordModal.vue

@@ -5,19 +5,24 @@
     @ok="handSubmit"
     :title="t('routes.personalSetting.updateBtn')"
     @visible-change="handleVisibleChange"
+    @cancel="resetFields"
   >
     <div class="pt-3px pr-3px">
-      <BasicForm @register="registerForm" :model="model" />
+      <BasicForm @register="registerForm" />
     </div>
   </BasicModal>
 </template>
 <script lang="ts">
   import { useI18n } from '/@/hooks/web/useI18n';
   import { encodeStr } from '/@/utils/encodeUtil';
-  import { defineComponent, ref, nextTick } from 'vue';
+  import { defineComponent, nextTick } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
   import { updatePasswordApi } from '/@/api/sys/user';
+  import { useMessage } from '/@/hooks/web/useMessage';
+
+  const { createMessage } = useMessage();
+
   export default defineComponent({
     components: { BasicModal, BasicForm },
     props: {
@@ -41,7 +46,7 @@
           colProps: { span: 18 },
         },
       ];
-      const modelRef = ref({});
+
       const [
         registerForm,
         {
@@ -59,7 +64,7 @@
         },
       });
 
-      const [register] = useModalInner((data) => {
+      const [register, { closeModal }] = useModalInner((data) => {
         data && onDataReceive(data);
       });
 
@@ -70,11 +75,13 @@
       }
       async function handSubmit() {
         const { id, password } = await validate();
-        updatePasswordApi({ id, password: encodeStr(window.btoa(password)) });
+        await updatePasswordApi({ id, newPassword: encodeStr(window.btoa(password)) });
+        createMessage.success(t('common.optSuccess'));
+        resetFields();
+        closeModal();
       }
       function handleVisibleChange(v) {
         v && props.userData && nextTick(() => onDataReceive(props.userData));
-        resetFields();
       }
 
       return {
@@ -83,8 +90,8 @@
         t,
         schemas,
         registerForm,
-        model: modelRef,
         handleVisibleChange,
+        resetFields,
       };
     },
   });