imatrix-ui 2.9.22-dw → 2.9.24-dw

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,6 +1,6 @@
1
1
  {
2
2
  "name": "imatrix-ui",
3
- "version": "2.9.22-dw",
3
+ "version": "2.9.24-dw",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
@@ -50,20 +50,25 @@ const dynamicSourceSelectService = {
50
50
  }
51
51
 
52
52
  return new Promise((resolve, reject) => {
53
- this.$http.post(backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(result => {
54
- if (result.backendUrl) {
55
- // result.backendUrl表示需要使用动态数据源所属的系统路径重新获得一次数据
56
- this.$http.post(result.backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(finallyResult => {
57
- resolve(finallyResult)
58
- }).catch(error => {
59
- reject(error)
60
- })
61
- } else {
62
- resolve(result)
63
- }
64
- }).catch(error => {
65
- reject(error)
66
- })
53
+ // 页面设计不请求动态数据源
54
+ if (Vue.prototype.systemCode !== undefined && Vue.prototype.systemCode === 'iMatrix') {
55
+ resolve()
56
+ } else {
57
+ this.$http.post(backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(result => {
58
+ if (result.backendUrl) {
59
+ // result.backendUrl表示需要使用动态数据源所属的系统路径重新获得一次数据
60
+ this.$http.post(result.backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(finallyResult => {
61
+ resolve(finallyResult)
62
+ }).catch(error => {
63
+ reject(error)
64
+ })
65
+ } else {
66
+ resolve(result)
67
+ }
68
+ }).catch(error => {
69
+ reject(error)
70
+ })
71
+ }
67
72
  })
68
73
  }
69
74
  }
@@ -34,6 +34,7 @@ const superGridService = {
34
34
  this.isSql = isSqlSetting
35
35
  param.isSql = isSqlSetting + ''
36
36
  }
37
+ param.publishVersion = this.publishVersion
37
38
  if (this.options && typeof (this.options.isAdministerListView) !== 'undefined' && this.options.isAdministerListView) {
38
39
  param.isAdminister = this.options.isAdministerListView + ''
39
40
  }
@@ -281,6 +281,10 @@ export default {
281
281
  return {}
282
282
  }
283
283
  },
284
+ publishVersion: {
285
+ type: Number,
286
+ default: 0
287
+ },
284
288
  // 为了兼容平台的旧写法,暂不删除以下属性
285
289
  // 操作列、占位符列内容显示的函数,格式为:{'属性名':方法},例如:{'name':viewUser,'operation':showOperation}
286
290
  customFormatter: {
@@ -634,6 +638,14 @@ export default {
634
638
  handler(newValue, oldValue) {
635
639
  this.$emit('change-rows-per-page', this.pageSize)
636
640
  }
641
+ },
642
+ // 更新parent值
643
+ 'options.extraParam.entityMap': {
644
+ deep: true,
645
+ handler(newValue, oldValue) {
646
+ console.log('watch====options.extraParam.entityMap===改变==', newValue)
647
+ this.parentFormData = newValue
648
+ }
637
649
  }
638
650
  },
639
651
  provide() {
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-undef */
2
2
  import Vue from 'vue'
3
- import store from './store'
4
3
  import { packageEnumAndBeanColumnValueSets } from '../../utils/value-set'
4
+ import store from './store'
5
5
  import { isHasOptionFunction } from './utils'
6
6
  const superGridService = {
7
7
  initialize() {
@@ -12,6 +12,7 @@ const superGridService = {
12
12
  this.isSql = isSqlSetting
13
13
  param.isSql = isSqlSetting + ''
14
14
  }
15
+ param.publishVersion = this.publishVersion
15
16
  this.isLoading = true
16
17
  // 初始化组件时先获取元信息再获取数据,以后翻页、排序、查询不再去获取元数据了
17
18
  this.$http.post(url, param).then(data => {
@@ -27,15 +27,21 @@
27
27
  </el-col>
28
28
  <el-col v-for="(params,index) in gridData" :key="params.id" :span="6" :offset="1.5" class="col-content">
29
29
  <el-card :body-style="{ padding: '0px' }" shadow="hover">
30
- <div @mouseenter="enter(index)" @mouseleave="leave()" @click="clickContent(params)">
30
+ <!-- <div @mouseenter="enter(index)" @mouseleave="leave()" @click="clickContent(params)"> -->
31
+ <div @click="clickContent(params)">
31
32
  <transition name="fade">
32
- <div v-if="seen && index === current" class="popContainer">
33
- <div class="else-button">
33
+ <!-- <div v-if="seen && index === current" class="popContainer"> -->
34
+ <div class="popContainer">
35
+ <div class="else-button" style="background: rgba(0,0,0,0.5); min-height: 20%;">
36
+ <!-- <div class="else-button" style="min-height: 20%;"> -->
37
+ <slot :name="slotBefore" :params="params" />
34
38
  <template v-for="button in operations">
35
39
  <template v-if="isShowButton(params, button)">
36
40
  <el-tooltip v-if="button.icon" :key="button.name" v-permission="button.permission?button.permission:'true'" class="item" effect="dark" :content="button.name" placement="top">
41
+ <!-- <em style="color: black;" :class="button.icon +' icons'" @click.stop="buttonClick(button.event, params)" /> -->
37
42
  <em :class="button.icon +' icons'" @click.stop="buttonClick(button.event, params)" />
38
43
  </el-tooltip>
44
+ <!-- <em v-else :key="button.name" v-permission="button.permission?button.permission:'true'" style="color: black;" :class="button.name +' icons'" @click.stop="buttonClick(button.event, params)">{{ button.name }} </em> -->
39
45
  <em v-else :key="button.name" v-permission="button.permission?button.permission:'true'" :class="button.name +' icons'" @click.stop="buttonClick(button.event, params)">{{ button.name }} </em>
40
46
  </template>
41
47
  </template>
@@ -160,7 +166,7 @@
160
166
  width: 23.15%;
161
167
  display: block;
162
168
  height: 200px;
163
- background: rgba(0,0,0,0.5);
169
+ // background: rgba(0,0,0,0.5);
164
170
  text-align: right;
165
171
  }
166
172
  .fade-enter-active, .fade-leave-active {
@@ -229,6 +235,10 @@ export default {
229
235
  default: function() {
230
236
  return {}
231
237
  }
238
+ },
239
+ publishVersion: {
240
+ type: Number,
241
+ default: 0
232
242
  }
233
243
  },
234
244
  data() {
@@ -280,7 +290,8 @@ export default {
280
290
  storeId,
281
291
  currentId: null, // 当前点击的记录id
282
292
  isShowRadio, // 单选时是否显示单选按钮
283
- titleStyle: null // 标题的样式对象,格式为:{ color: 'green', fontWeight: 'bold'}
293
+ titleStyle: null, // 标题的样式对象,格式为:{ color: 'green', fontWeight: 'bold'}
294
+ slotBefore: 'before'
284
295
  }
285
296
  },
286
297
  computed: {
@@ -314,7 +325,7 @@ export default {
314
325
  this.$watch('hasLoadData', function(newVal, oldVal) {
315
326
  if (newVal === true) {
316
327
  this.$nextTick(() => {
317
- this.rowDrop()
328
+ // this.rowDrop()
318
329
  const gridParams = store.get(this.storeId)
319
330
  if (isHasOptionFunction('gridComplete', this.storeId)) {
320
331
  gridParams.options.gridComplete.call(this, { gridData: this.gridData, columns: gridParams.columns, superGrid: this.$refs.superGrid })
@@ -1,5 +1,5 @@
1
1
  import ssoService from '../../api/sso-service'
2
- import { setToken, removeToken, setUsername, getUsername, removeUsername, setCurrentUser, removeCurrentUser } from '../../utils/auth'
2
+ import { setToken, removeToken, setUsername, getUsername, removeUsername, setCurrentUser, removeCurrentUser, removePublishControl } from '../../utils/auth'
3
3
 
4
4
  import { removePermissions, getPermissions, setPermissions, getMenus, setMenus, removeMenus } from '../../utils/permissionAuth'
5
5
 
@@ -102,6 +102,8 @@ const user = {
102
102
 
103
103
  removeMenus()
104
104
 
105
+ removePublishControl()
106
+
105
107
  resolve(data)
106
108
  }).catch(error => {
107
109
  reject(error)
@@ -4,6 +4,8 @@ import Vue from 'vue'
4
4
  const jwtKey = 'JWT'
5
5
  const currentUserNameKey = 'USERNAME'
6
6
  const currentUserInfoKey = 'CURRENT_USER'
7
+ const versionEnv = 'VERSION_ENVIRONMENT'
8
+ const userVersion = 'CURRENT_USER_SYSTEM_VERSION'
7
9
 
8
10
  function getToken() {
9
11
  let token = getCookieCache(jwtKey)
@@ -96,6 +98,11 @@ function setSessionCache(key, value) {
96
98
  function removeSessionCache(key) {
97
99
  sessionStorage.removeItem(key)
98
100
  }
101
+
102
+ function removePublishControl() {
103
+ removeCookieCache(versionEnv)
104
+ removeCookieCache(userVersion)
105
+ }
99
106
  export default {
100
107
  getToken,
101
108
  setToken,
@@ -111,5 +118,6 @@ export default {
111
118
  removeCookieCache,
112
119
  getSessionCache,
113
120
  setSessionCache,
114
- removeSessionCache
121
+ removeSessionCache,
122
+ removePublishControl
115
123
  }
package/src/utils/auth.js CHANGED
@@ -59,3 +59,7 @@ export function setSessionCache(key, value) {
59
59
  export function removeSessionCache(key) {
60
60
  authApi.removeSessionCache(key)
61
61
  }
62
+
63
+ export function removePublishControl() {
64
+ authApi.removePublishControl()
65
+ }