diff --git a/package.json b/package.json index b16be80..cba1887 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "@amap/amap-jsapi-loader": "^1.0.1", "ant-design-vue": "^1.7.8", "axios": "^0.21.1", "core-js": "^2.6.9", diff --git a/src/api/datav.js b/src/api/datav.js new file mode 100644 index 0000000..bb6dde4 --- /dev/null +++ b/src/api/datav.js @@ -0,0 +1,9 @@ +import $http from '../assets/js/http' + +export function positioningList(department_code) { + return $http.post('project/project/positioning_list', {department_code: department_code}); +} + +export function positioningMember(data) { + return $http.post('project/project/positioning_member', data); +} diff --git a/src/main.js b/src/main.js index e288618..1cea468 100644 --- a/src/main.js +++ b/src/main.js @@ -67,6 +67,10 @@ Vue.directive('disable-click', { }, }); + window._AMapSecurityConfig = { + securityJsCode:'e8b6cb44e8e431d68052c8e10db99264', +} + Vue.config.productionTip = false; Vue.use(Antd); Vue.component('WrapperContent', WrapperContent); diff --git a/src/store/modules/menu.js b/src/store/modules/menu.js index e077586..eaf84f0 100644 --- a/src/store/modules/menu.js +++ b/src/store/modules/menu.js @@ -15,8 +15,11 @@ const common = { } }, actions: { - GET_MENU({commit}) { + GET_MENU({commit}, data) { return getMenuForUser().then(res => { + if(data!=1) res.data = res.data.filter((item) => { + return item.id==120 || item.id==121 + }) setStore('menu', res.data); commit('SET_MENU', res.data); }); diff --git a/src/views/datav/index.vue b/src/views/datav/index.vue new file mode 100644 index 0000000..b30daae --- /dev/null +++ b/src/views/datav/index.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/views/index.vue b/src/views/index.vue index 7d97050..7aabf7a 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -326,9 +326,9 @@ }, menuModelClick(event) { //点击顶部导航跳转页面 + console.log(event); let that = this; that.menu.forEach(function (v, k) { - console.log(v); if (v.id == event.key) { that.menus = v.children; let turnPath = '/'; diff --git a/src/views/member/login.vue b/src/views/member/login.vue index 4a425f1..acaeb24 100644 --- a/src/views/member/login.vue +++ b/src/views/member/login.vue @@ -383,7 +383,7 @@ } console.log(currentOrganization); await app.$store.dispatch('setCurrentOrganization', currentOrganization); - await app.$store.dispatch('GET_MENU').then(() => { + await app.$store.dispatch('GET_MENU', obj.userInfo.authorize).then(() => { app.loginSuccess(res, currentOrganization); }); } else { diff --git a/yarn.lock b/yarn.lock index f3e2862..ac44d99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@amap/amap-jsapi-loader@^1.0.1": + version "1.0.1" + resolved "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz#9ec4b4d5d2467eac451f6c852e35db69e9f9f0c0" + integrity sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw== + "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630"