Browse Source

Merge branch 'master' of https://prodog.leanwo.com:3000/prodog-client-2023/client-base-v4

liangzhicheng 2 years ago
parent
commit
f65d630fbd
3 changed files with 23 additions and 3 deletions
  1. 1 1
      package.json
  2. 14 2
      src/client/OrganizationEditPanel.vue
  3. 8 0
      src/client/TopNavigation.vue

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.99",
+  "version": "4.0.01",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 14 - 2
src/client/OrganizationEditPanel.vue

@@ -202,6 +202,7 @@ const clientNameStr = ref('');
 const { proxy } = getCurrentInstance(); //访问this
 const parentOrganizationAdditionHql = ref('');
 const parentFieldValue = ref({});
+const clients = ref([]);
 const parentOrganizationFieldValue = ref({
   displayValue: [],
   fieldType: 'Key',
@@ -217,10 +218,13 @@ onMounted(() => {
 });
 // 获取公司名称id
 const getComponyInfo = () => {
+  companies.value = [];
   getCompony().then(
     success => {
       if (success.errorCode == 0) {
-        companies.value = success.datas;
+        if(success.datas && success.datas.length >0){
+          getALLClient(success.datas);
+        }
       } else {
         message.error(success.errorMessage);
       }
@@ -230,7 +234,15 @@ const getComponyInfo = () => {
     },
   );
 };
-
+// 展示子公司数据
+const getALLClient = datas => {
+  datas.forEach(item =>{
+    companies.value.push({id:item.id,name:item.name});
+    if(item.childrenClients && item.childrenClients.length >0){
+      getALLClient(item.childrenClients);
+    }
+  });
+};
 // 编辑公司(获取公司信息)
 const editClient = () => {
   if (clientNameStr.value) {

+ 8 - 0
src/client/TopNavigation.vue

@@ -83,6 +83,10 @@ export default {
 
   mounted: function () {
     this.getLocalStorage();
+    if (this.isMobile()) {
+      this.visible = false;
+      this.$emit('menuVisibleChanged');
+    }
   },
 
   methods: {
@@ -98,6 +102,10 @@ export default {
       this.visible = !this.visible;
       this.$emit('menuVisibleChanged');
     },
+    isMobile() {
+      let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
+      return flag;
+    },
   },
 };
 </script>