imatrix-ui 2.9.8-dw → 2.9.8-pv2
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/lib/super-ui.css +1 -1
- package/lib/super-ui.umd.min.js +5 -35
- package/package.json +1 -1
- package/packages/plugins/export-data-new.js +1 -1
- package/packages/plugins/export-data.js +1 -1
- package/packages/super-grid/src/search-form-item.vue +1 -1
- package/packages/super-grid/src/super-grid.vue +39 -75
- package/packages/super-nine-grid/src/super-nine-grid.vue +12 -5
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +1 -1
- package/src/i18n/langs/en.js +1 -1
- package/src/permission.js +1 -1
- package/src/plugins.js +3 -3
- package/src/styles/index.scss +2 -2
- package/src/styles/theme/gray/sidebar.scss +2 -14
- package/src/utils/common-util.js +1 -90
- package/src/utils/request.js +1 -1
- package/src/utils/util.js +5 -5
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +1 -1
- package/src/views/login/index.vue +1 -1
package/package.json
CHANGED
|
@@ -1346,86 +1346,51 @@ export default {
|
|
|
1346
1346
|
gridParams.options.subTableData &&
|
|
1347
1347
|
gridParams.options.subTableData.length > 0
|
|
1348
1348
|
) {
|
|
1349
|
-
this.
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
this.
|
|
1349
|
+
this.hasLoadData = false
|
|
1350
|
+
gridParams.loaded = true
|
|
1351
|
+
let subTableData = []
|
|
1352
|
+
// 如果有子表数据,则展示传递的子表数据
|
|
1353
|
+
if (isHasOptionFunction('gridDataLoaded', this.code)) {
|
|
1354
|
+
const gridData = gridParams.options.gridDataLoaded.call(this, {
|
|
1355
|
+
gridData: gridParams.options.subTableData,
|
|
1356
|
+
columns: gridParams.columns
|
|
1357
|
+
})
|
|
1358
|
+
if (gridData) {
|
|
1359
|
+
subTableData = gridData
|
|
1360
|
+
this.hasLoadData = true
|
|
1361
|
+
} else {
|
|
1362
|
+
subTableData = gridParams.options.subTableData
|
|
1363
|
+
this.hasLoadData = true
|
|
1364
1364
|
}
|
|
1365
|
+
} else {
|
|
1366
|
+
subTableData = gridParams.options.subTableData
|
|
1365
1367
|
this.hasLoadData = true
|
|
1366
|
-
gridParams.loaded = true
|
|
1367
1368
|
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1369
|
+
if (subTableData) {
|
|
1370
|
+
// 子表时所有记录的所有字段设置默认值null,优化子表编辑时性能
|
|
1371
|
+
subTableData.forEach(item => {
|
|
1372
|
+
this.setColumnsDefaultValue(gridParams.allColumns, item)
|
|
1373
|
+
})
|
|
1374
|
+
}
|
|
1375
|
+
if (this.pagination && this.isSubTableShowPage === true) {
|
|
1376
|
+
// 表示子表需要显示分页
|
|
1377
|
+
this.subTableData = subTableData
|
|
1378
|
+
// 更新记录总条数
|
|
1379
|
+
this.pagination.total = this.subTableData.length
|
|
1380
|
+
gridParams.subTableData = this.subTableData
|
|
1381
|
+
this.gridData = this.getSubTableGridData(this.subTableData)
|
|
1382
|
+
} else {
|
|
1383
|
+
this.gridData = subTableData
|
|
1384
|
+
}
|
|
1385
|
+
gridParams.gridData = this.gridData
|
|
1386
|
+
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
1387
|
+
gridParams.orgGridData = [].concat(
|
|
1388
|
+
JSON.parse(JSON.stringify(this.gridData))
|
|
1389
|
+
)
|
|
1389
1390
|
} else {
|
|
1390
|
-
|
|
1391
|
-
this.hasLoadData = true
|
|
1391
|
+
return this.fetchListData(searchParam, isSearch, parentRowIds, resove)
|
|
1392
1392
|
}
|
|
1393
|
-
} else {
|
|
1394
|
-
subTableData = initSubTableData
|
|
1395
|
-
this.hasLoadData = true
|
|
1396
|
-
}
|
|
1397
|
-
if (subTableData) {
|
|
1398
|
-
// 子表时所有记录的所有字段设置默认值null,优化子表编辑时性能
|
|
1399
|
-
subTableData.forEach(item => {
|
|
1400
|
-
this.setColumnsDefaultValue(gridParams.allColumns, item)
|
|
1401
|
-
})
|
|
1402
|
-
}
|
|
1403
|
-
if (this.pagination && this.isSubTableShowPage === true) {
|
|
1404
|
-
// 表示子表需要显示分页
|
|
1405
|
-
this.subTableData = subTableData
|
|
1406
|
-
// 更新记录总条数
|
|
1407
|
-
this.pagination.total = this.subTableData.length
|
|
1408
|
-
gridParams.subTableData = this.subTableData
|
|
1409
|
-
this.gridData = this.getSubTableGridData(this.subTableData)
|
|
1410
|
-
} else {
|
|
1411
|
-
this.gridData = subTableData
|
|
1412
|
-
}
|
|
1413
|
-
gridParams.gridData = this.gridData
|
|
1414
|
-
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
1415
|
-
gridParams.orgGridData = [].concat(
|
|
1416
|
-
JSON.parse(JSON.stringify(this.gridData))
|
|
1417
|
-
)
|
|
1418
|
-
},
|
|
1419
|
-
canRefreshTableData (gridParams) {
|
|
1420
|
-
let isCanRefreshTableData = false
|
|
1421
|
-
if (gridParams.options && !gridParams.options.isFormSubTable) {
|
|
1422
|
-
// 如果不是子表时
|
|
1423
|
-
isCanRefreshTableData = true
|
|
1424
|
-
} else if (gridParams.options && gridParams.options.isFormSubTable && gridParams.options.canRrefreshSubtableData !== undefined && gridParams.options.canRrefreshSubtableData === true) {
|
|
1425
|
-
// 是子表,且配置了子表无记录时更新子表记录集合
|
|
1426
|
-
isCanRefreshTableData = true
|
|
1427
1393
|
}
|
|
1428
|
-
return isCanRefreshTableData
|
|
1429
1394
|
},
|
|
1430
1395
|
getSubTableGridData(subTableData) {
|
|
1431
1396
|
let gridData = subTableData
|
|
@@ -2052,7 +2017,6 @@ export default {
|
|
|
2052
2017
|
handleSizeChange(val) {
|
|
2053
2018
|
if (!this.options || !this.options.isPageShow) {
|
|
2054
2019
|
// console.log(`每页 ${val} 条`)
|
|
2055
|
-
this.currentPage = 1
|
|
2056
2020
|
this.pageSize = val
|
|
2057
2021
|
this.changePage()
|
|
2058
2022
|
}
|
|
@@ -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
|
-
|
|
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 {
|
|
@@ -280,7 +286,8 @@ export default {
|
|
|
280
286
|
storeId,
|
|
281
287
|
currentId: null, // 当前点击的记录id
|
|
282
288
|
isShowRadio, // 单选时是否显示单选按钮
|
|
283
|
-
titleStyle: null // 标题的样式对象,格式为:{ color: 'green', fontWeight: 'bold'}
|
|
289
|
+
titleStyle: null, // 标题的样式对象,格式为:{ color: 'green', fontWeight: 'bold'}
|
|
290
|
+
slotBefore: 'before'
|
|
284
291
|
}
|
|
285
292
|
},
|
|
286
293
|
computed: {
|
package/src/i18n/i18n.js
CHANGED
package/src/i18n/langs/cn.js
CHANGED
package/src/i18n/langs/en.js
CHANGED
package/src/permission.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getToken, setToken } from './utils/auth' // 验权
|
|
|
4
4
|
import store from './store'
|
|
5
5
|
import router, { errorRouterMap } from './router'
|
|
6
6
|
NProgress.configure({ showSpinner: false })// NProgress Configuration
|
|
7
|
-
import { Message } from '
|
|
7
|
+
import { Message } from 'element-ui'
|
|
8
8
|
import Vue from 'vue'
|
|
9
9
|
|
|
10
10
|
const whiteList = ['/login', '/update-password', '/forget-password', '/reset-password', '/redirect'] // 不重定向白名单
|
package/src/plugins.js
CHANGED
|
@@ -3,9 +3,9 @@ import Vue from 'vue'
|
|
|
3
3
|
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
|
4
4
|
import './styles/index.scss' // global css
|
|
5
5
|
|
|
6
|
-
import ElementUI from '
|
|
7
|
-
import '
|
|
8
|
-
import locale from '
|
|
6
|
+
import ElementUI from 'element-ui'
|
|
7
|
+
import 'element-ui/lib/theme-chalk/index.css'
|
|
8
|
+
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
|
|
9
9
|
|
|
10
10
|
import SuperUI from 'imatrix-ui'
|
|
11
11
|
import 'imatrix-ui/lib/super-ui.css'
|
package/src/styles/index.scss
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
@import './theme/blue2/sidebar.scss';
|
|
10
10
|
@import './theme/gray/index.scss';
|
|
11
11
|
@import './theme/gray/sidebar.scss';
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
@import './theme/dark-blue/index.scss';
|
|
13
|
+
@import './theme/dark-blue/sidebar.scss';
|
|
14
14
|
@import './display-layout.scss';
|
|
15
15
|
|
|
16
16
|
body {
|
|
@@ -79,11 +79,8 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.el-menu {
|
|
82
|
-
position: static;
|
|
83
82
|
border: none;
|
|
84
|
-
|
|
85
|
-
height: auto;
|
|
86
|
-
max-height: 100vh;
|
|
83
|
+
height: 100%;
|
|
87
84
|
width: 100% !important;
|
|
88
85
|
background-color: #FFF;
|
|
89
86
|
color: #000D1F
|
|
@@ -191,22 +188,13 @@
|
|
|
191
188
|
}
|
|
192
189
|
}
|
|
193
190
|
|
|
194
|
-
.sidebar-container-popper .el-menu{
|
|
195
|
-
// height: 100vh;
|
|
196
|
-
height: auto;
|
|
197
|
-
max-height: 100vh;
|
|
198
|
-
overflow-y: auto;
|
|
199
|
-
overflow-x: hidden;
|
|
200
|
-
scroll-behavior: smooth;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
191
|
.sidebar-container-popper .el-submenu__title:not(.is-disabled):hover {
|
|
204
192
|
background: #F7F7F8;
|
|
205
193
|
color: rgba(0, 13, 31, 0.85);
|
|
206
194
|
font-weight: 500;
|
|
207
195
|
}
|
|
208
196
|
|
|
209
|
-
.sidebar-container-popper .el-menu
|
|
197
|
+
.sidebar-container-popper .el-menu .el-submenu.is-active>.el-submenu__title {
|
|
210
198
|
background-color: #EBECFF !important;
|
|
211
199
|
color: #3D4CF2;
|
|
212
200
|
font-weight: 500;
|
package/src/utils/common-util.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import sessionStorage from 'sessionstorage'
|
|
2
2
|
import Vue from 'vue'
|
|
3
|
-
import authApi from './auth-api'
|
|
4
|
-
import { getToken } from './auth'
|
|
5
3
|
/**
|
|
6
4
|
* 获得相对地址
|
|
7
5
|
*/
|
|
@@ -171,7 +169,7 @@ export function isPlateSys(systemCode) {
|
|
|
171
169
|
systemCode === 'mms' || systemCode === 'task' ||
|
|
172
170
|
systemCode === 'wf' || systemCode === 'dc' ||
|
|
173
171
|
systemCode === 'mc' || systemCode === 'mobile' ||
|
|
174
|
-
systemCode === 'acs' || systemCode === 'bs'
|
|
172
|
+
systemCode === 'acs' || systemCode === 'bs')) {
|
|
175
173
|
return true
|
|
176
174
|
} else {
|
|
177
175
|
return false
|
|
@@ -225,90 +223,3 @@ export function getTimeZone() {
|
|
|
225
223
|
}
|
|
226
224
|
return timeZone
|
|
227
225
|
}
|
|
228
|
-
|
|
229
|
-
export function isMobileBrowser() {
|
|
230
|
-
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Opera Mobi|Windows CE|Symbian|Windows Phone|POLARIS|lgtelecom|nokia|SonyEricsson|LG|SAMSUNG|Samsung/i
|
|
231
|
-
.test(navigator.userAgent)) {
|
|
232
|
-
//移动端浏览器
|
|
233
|
-
return true
|
|
234
|
-
} else {
|
|
235
|
-
//PC浏览器
|
|
236
|
-
return false
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export function getLocaleByLang(lang) {
|
|
241
|
-
let locale = 'cn'
|
|
242
|
-
if (lang && lang.indexOf('_') > 0) {
|
|
243
|
-
const language = lang.substring(0, lang.indexOf('_'))
|
|
244
|
-
locale = language
|
|
245
|
-
}
|
|
246
|
-
if (locale === 'zh') {
|
|
247
|
-
locale = 'cn'
|
|
248
|
-
}
|
|
249
|
-
return locale
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
const langKey = 'AMB_LANG_INFO'
|
|
253
|
-
|
|
254
|
-
export function cacheLangs(langs) {
|
|
255
|
-
let langResult
|
|
256
|
-
if(langs) {
|
|
257
|
-
langResult = JSON.stringify(langs)
|
|
258
|
-
}
|
|
259
|
-
return authApi.setCookieCache(langKey,langResult)
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export function getLangs() {
|
|
263
|
-
return authApi.getCookieCache(langKey)
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
*
|
|
267
|
-
* @param {*} langShort 例如:cn或en
|
|
268
|
-
* @returns 例如:zh_CN或en_US
|
|
269
|
-
*/
|
|
270
|
-
export function getLangByShort(langShort) {
|
|
271
|
-
let lang
|
|
272
|
-
const langResultJson = getLangs()
|
|
273
|
-
if(langResultJson){
|
|
274
|
-
const langObj = JSON.parse(langResultJson)
|
|
275
|
-
lang = langObj[langShort]
|
|
276
|
-
}
|
|
277
|
-
if(!lang){
|
|
278
|
-
lang = 'zh_CN'
|
|
279
|
-
}
|
|
280
|
-
return lang
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
// 首次加载业务系统时,缓存所有语言
|
|
284
|
-
export function cacheAllLanguagesUtil(http) {
|
|
285
|
-
return new Promise((resolve, reject) => {
|
|
286
|
-
const token = getToken()
|
|
287
|
-
if (token) {
|
|
288
|
-
http.get(Vue.prototype.baseAPI + '/component/all-languages').then((langList) => {
|
|
289
|
-
const langResult = {}
|
|
290
|
-
if (langList) {
|
|
291
|
-
langList.forEach(item => {
|
|
292
|
-
// 例如:zh_CN、en_US
|
|
293
|
-
const lang = item.value
|
|
294
|
-
let langShort
|
|
295
|
-
if (lang.indexOf('_') > 0) {
|
|
296
|
-
langShort = lang.substring(0, lang.indexOf('_'))
|
|
297
|
-
}
|
|
298
|
-
if (langShort && langShort === 'zh') {
|
|
299
|
-
// 中文处理,为了兼容历史逻辑
|
|
300
|
-
langShort = 'cn'
|
|
301
|
-
}
|
|
302
|
-
if (langShort) {
|
|
303
|
-
langResult[langShort] = lang
|
|
304
|
-
}
|
|
305
|
-
})
|
|
306
|
-
}
|
|
307
|
-
cacheLangs(langResult)
|
|
308
|
-
resolve()
|
|
309
|
-
})
|
|
310
|
-
} else {
|
|
311
|
-
resolve()
|
|
312
|
-
}
|
|
313
|
-
})
|
|
314
|
-
}
|
package/src/utils/request.js
CHANGED
package/src/utils/util.js
CHANGED
|
@@ -3,7 +3,6 @@ import Vue from 'vue'
|
|
|
3
3
|
import {
|
|
4
4
|
executeExpression
|
|
5
5
|
} from './calculator/calculator-util'
|
|
6
|
-
import { getLangByShort } from './common-util'
|
|
7
6
|
export function getI18n() {
|
|
8
7
|
if (!window.$locale) {
|
|
9
8
|
i18n.locale = 'cn'
|
|
@@ -14,11 +13,12 @@ export function getI18n() {
|
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
export function getLanguageWithLocale() {
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
16
|
+
const currentLocale = window.$locale
|
|
17
|
+
if (currentLocale && currentLocale === 'en') {
|
|
18
|
+
return 'en_US'
|
|
19
|
+
} else {
|
|
20
|
+
return 'zh_CN'
|
|
20
21
|
}
|
|
21
|
-
return getLangByShort(currentLocale)
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* 根据动态数据源获得下拉选的选项集合
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</app-link>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
|
-
<el-submenu v-else :index="resolvePath(item.code,item.path,item.pageType)" :show-timeout="0" :hide-timeout="50"
|
|
11
|
+
<el-submenu v-else :index="resolvePath(item.code,item.path,item.pageType)" :show-timeout="0" :hide-timeout="50" popper-class="sidebar-container-popper">
|
|
12
12
|
<template v-slot:title>
|
|
13
13
|
<item :icon="item.iconName" :title="getI18nName(item)" :has-children="item.children.length > 0?true:false" />
|
|
14
14
|
</template>
|