mooho-base-admin-plus 2.10.4 → 2.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.10.4",
4
+ "version": "2.10.6",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -883,7 +883,6 @@
883
883
  }
884
884
  } else if (outcome.pointCount == 2) {
885
885
  if (outcome.points == null || JSON.parse(outcome.points).length != 2) {
886
- let d = this.getOutcomePoint(outcome);
887
886
  outcome.points = JSON.stringify([
888
887
  { x: Math.round(((activityFrom.x - activityTo.x) * 2) / 3 + activityTo.x), y: Math.round(((activityFrom.y - activityTo.y) * 2) / 3 + activityTo.y) },
889
888
  { x: Math.round((activityFrom.x - activityTo.x) / 3 + activityTo.x), y: Math.round((activityFrom.y - activityTo.y) / 3 + activityTo.y) }
@@ -3,6 +3,7 @@ import axios from 'axios';
3
3
  import util from '../util';
4
4
  import swal from 'sweetalert2';
5
5
  import Setting from '../../setting';
6
+ import router from '../../router';
6
7
 
7
8
  // import { Message, Notice } from 'view-design';
8
9
 
@@ -84,6 +85,11 @@ service.interceptors.request.use(
84
85
  const token = util.cookies.get('token');
85
86
  // 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
86
87
  config.headers['Authorization'] = 'Bearer ' + token;
88
+
89
+ if (router && router.currentRoute && router.currentRoute.value) {
90
+ config.headers['Frontend-Url'] = router.currentRoute.value.path;
91
+ }
92
+
87
93
  return config;
88
94
  },
89
95
  error => {
@@ -1,6 +1,5 @@
1
1
  import util from '../libs/util';
2
2
  import { cloneDeep, get, set } from 'lodash';
3
- import router from '../router';
4
3
  import { mapState, mapActions, mapMutations } from 'vuex';
5
4
  import dateFormat from 'date-fns/format';
6
5
  import Setting from '../setting';
@@ -111,7 +110,7 @@ export default {
111
110
  return this.userPermissions[key];
112
111
  } else {
113
112
  // 页面权限点
114
- let url = router.currentRoute.value.fullPath.substr(1).split('?')[0];
113
+ let url = this.$router.currentRoute.value.fullPath.substr(1).split('?')[0];
115
114
 
116
115
  if (this.userPermissions[url + '$' + key] == true) {
117
116
  return true;
@@ -26,7 +26,6 @@
26
26
  <script>
27
27
  import { mapActions } from 'vuex';
28
28
  import mixinPage from '../../mixins/page';
29
- import router from '../../router';
30
29
  //import permissionApi from '../../api/permission';
31
30
 
32
31
  export default {
@@ -68,7 +67,7 @@
68
67
 
69
68
  // 重定向对象不存在则返回顶层路径
70
69
  setTimeout(() => {
71
- router.replace(this.$route.query.redirect || '/home');
70
+ this.$router.replace(this.$route.query.redirect || '/home');
72
71
  });
73
72
  }
74
73
  },
@@ -4,7 +4,6 @@
4
4
  <PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
5
5
  </div>
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
- {{ allow('create') }}
8
7
  <view-table ref="table" v-if="page" :create-enable="allow('create')" @create="create">
9
8
  <template #top>
10
9
  <slot name="top"></slot>
@@ -186,7 +185,6 @@
186
185
  </div>
187
186
  </template>
188
187
  <script>
189
- import { useRouter } from 'vue-router';
190
188
  import modelApi from '../../api/model';
191
189
  import applicationApi from '../../api/application';
192
190
  import processInstApi from '../../api/processInst';
@@ -229,13 +227,6 @@
229
227
  },
230
228
  computed: {},
231
229
  async mounted() {
232
- let router = this.$router;
233
-
234
- console.log('router.currentRoute.value.fullPath', router.currentRoute.value.fullPath);
235
- console.log('this.userPermissions', this.userPermissions);
236
- console.log("url + '$' + key", router.currentRoute.value.fullPath.substr(1).split('?')[0] + '$' + 'create');
237
- console.log("this.userPermissions[url + '$' + key]", this.userPermissions[router.currentRoute.value.fullPath.substr(1).split('?')[0] + '$' + 'create']);
238
-
239
230
  if (this.$route.meta.data.id) {
240
231
  let res = await this.loadPage(this.$route.meta.data.id);
241
232
  this.page = res.customPage;
@@ -271,9 +262,10 @@
271
262
  this.isRecallable = this.page.applicationType.isRecallable;
272
263
 
273
264
  setTimeout(() => {
274
- if (!this.allow('all')) {
275
- this.$refs.table.filterData['createUserID'] = this.info.id;
276
- }
265
+ // if (!this.allow('all')) {
266
+ // this.$refs.table.filterData['s_self'] = true;
267
+ // this.$refs.table.filterData['createUserID'] = this.info.id;
268
+ // }
277
269
 
278
270
  this.$refs.table.init(this.page.tableViewCode, () => {
279
271
  if (!this.$refs.table.tableView.autoLoadDisable) {