vue2-client 1.2.38 → 1.2.42
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/CHANGELOG.md +109 -95
- package/package.json +90 -90
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +555 -0
- package/src/base-client/components/common/XAddForm/XAddForm.vue +339 -338
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +316 -315
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +3 -3
- package/src/components/setting/Setting.vue +4 -6
- package/src/config/default/setting.config.js +35 -34
- package/src/config/index.js +1 -4
- package/src/layouts/SinglePageView.vue +13 -17
- package/src/layouts/tabs/TabsView.vue +38 -39
- package/src/pages/login/Login.vue +201 -198
- package/src/router/async/router.map.js +58 -59
- package/src/theme/default/style.less +47 -33
- package/src/utils/routerUtil.js +4 -5
- package/vue.config.js +2 -2
- package/src/config/config.js +0 -15
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
handleCloseOk () {
|
|
467
467
|
return post(TicketDetailsViewApi.manualCloseTicket, {
|
|
468
468
|
ticketId: this.ticketId,
|
|
469
|
-
time: new Date()
|
|
469
|
+
time: this.format(new Date(), 'yyyy-MM-dd hh:mm:ss')
|
|
470
470
|
})
|
|
471
471
|
.then(res => {
|
|
472
472
|
if (res !== 0) {
|
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
this.getCurrentEmpId()
|
|
496
496
|
return post(TicketDetailsViewApi.confirmTicket, {
|
|
497
497
|
ticketId: this.ticketId,
|
|
498
|
-
time: new Date(),
|
|
498
|
+
time: this.format(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
|
499
499
|
empId: this.empIdInDataBase
|
|
500
500
|
})
|
|
501
501
|
.then(res => {
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
} else {
|
|
560
560
|
return post(TicketDetailsViewApi.transferTicketToOthers, {
|
|
561
561
|
ticketId: this.ticketId,
|
|
562
|
-
endTime: new Date(),
|
|
562
|
+
endTime: this.format(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
|
563
563
|
transferTo: this.transferTo,
|
|
564
564
|
note: this.note,
|
|
565
565
|
images: this.fileList
|
|
@@ -136,9 +136,7 @@ import Clipboard from 'clipboard'
|
|
|
136
136
|
import { mapState, mapMutations } from 'vuex'
|
|
137
137
|
import { formatConfig } from '@vue2-client/utils/formatter'
|
|
138
138
|
import { setting } from '@vue2-client/config/default'
|
|
139
|
-
import sysConfig from '@vue2-client/config/config'
|
|
140
139
|
import fastEqual from 'fast-deep-equal'
|
|
141
|
-
import deepMerge from 'deepmerge'
|
|
142
140
|
|
|
143
141
|
const ColorCheckboxGroup = ColorCheckbox.Group
|
|
144
142
|
const ImgCheckboxGroup = ImgCheckbox.Group
|
|
@@ -168,7 +166,7 @@ export default {
|
|
|
168
166
|
return this.$el.parentNode
|
|
169
167
|
},
|
|
170
168
|
copyCode () {
|
|
171
|
-
const config = this.extractConfig(
|
|
169
|
+
const config = this.extractConfig()
|
|
172
170
|
this.copyConfig = `// 自定义配置,参考 ./default/setting.config.js,需要自定义的属性在这里配置即可
|
|
173
171
|
module.exports = ${formatConfig(config)}
|
|
174
172
|
`
|
|
@@ -186,7 +184,7 @@ export default {
|
|
|
186
184
|
},
|
|
187
185
|
saveSetting () {
|
|
188
186
|
const closeMessage = this.$message.loading('正在保存到本地,请稍后...', 0)
|
|
189
|
-
const config = this.extractConfig(
|
|
187
|
+
const config = this.extractConfig()
|
|
190
188
|
localStorage.setItem(process.env.VUE_APP_SETTING_KEY, JSON.stringify(config))
|
|
191
189
|
setTimeout(closeMessage, 800)
|
|
192
190
|
},
|
|
@@ -200,10 +198,10 @@ export default {
|
|
|
200
198
|
})
|
|
201
199
|
},
|
|
202
200
|
// 提取配置
|
|
203
|
-
extractConfig (
|
|
201
|
+
extractConfig () {
|
|
204
202
|
const config = {}
|
|
205
203
|
const mySetting = this.$store.state.setting
|
|
206
|
-
const dftSetting =
|
|
204
|
+
const dftSetting = setting
|
|
207
205
|
Object.keys(mySetting).forEach(key => {
|
|
208
206
|
const dftValue = dftSetting[key]; const myValue = mySetting[key]
|
|
209
207
|
if (dftValue != undefined && !fastEqual(dftValue, myValue)) {
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
//
|
|
2
|
-
module.exports = {
|
|
3
|
-
lang: 'CN', // 语言,可选 CN(简体)、HK(繁体)、US(英语),也可扩展其它语言
|
|
4
|
-
theme: { // 主题
|
|
5
|
-
color: '#1890ff', // 主题色
|
|
6
|
-
mode: 'dark', // 主题模式 可选 dark、 light 和 night
|
|
7
|
-
success: '#52c41a', // 成功色
|
|
8
|
-
warning: '#faad14', // 警告色
|
|
9
|
-
error: '#f5222f' // 错误色
|
|
10
|
-
},
|
|
11
|
-
layout: 'side', // 导航布局,可选 side 和 head,分别为侧边导航和顶部导航
|
|
12
|
-
fixedHeader:
|
|
13
|
-
fixedSideBar: true, // 固定侧边栏,true:固定,false:不固定
|
|
14
|
-
fixedTabs:
|
|
15
|
-
pageWidth: 'fixed', // 内容区域宽度,fixed:固定宽度,fluid:流式宽度
|
|
16
|
-
weekMode: false, // 色弱模式,true:开启,false:不开启
|
|
17
|
-
multiPage: true, // 多页签模式,true:开启,false:不开启
|
|
18
|
-
cachePage: true, // 是否缓存页面数据,仅多页签模式下生效,true 缓存, false 不缓存
|
|
19
|
-
hideSetting: false, // 隐藏设置抽屉,true:隐藏,false:不隐藏
|
|
20
|
-
homePage: '/system/dictionaryManage', // 首页路由, 登陆后默认打开
|
|
21
|
-
ticketPage: '/submitTicket', // 提交工单路由
|
|
22
|
-
systemName: '基础组件平台', // 系统名称
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
// 此配置为系统默认设置
|
|
2
|
+
module.exports = {
|
|
3
|
+
lang: 'CN', // 语言,可选 CN(简体)、HK(繁体)、US(英语),也可扩展其它语言
|
|
4
|
+
theme: { // 主题
|
|
5
|
+
color: '#1890ff', // 主题色
|
|
6
|
+
mode: 'dark', // 主题模式 可选 dark、 light 和 night
|
|
7
|
+
success: '#52c41a', // 成功色
|
|
8
|
+
warning: '#faad14', // 警告色
|
|
9
|
+
error: '#f5222f' // 错误色
|
|
10
|
+
},
|
|
11
|
+
layout: 'side', // 导航布局,可选 side 和 head,分别为侧边导航和顶部导航
|
|
12
|
+
fixedHeader: true, // 固定头部状态栏,true:固定,false:不固定
|
|
13
|
+
fixedSideBar: true, // 固定侧边栏,true:固定,false:不固定
|
|
14
|
+
fixedTabs: true, // 固定页签头,true:固定,false:不固定
|
|
15
|
+
pageWidth: 'fixed', // 内容区域宽度,fixed:固定宽度,fluid:流式宽度
|
|
16
|
+
weekMode: false, // 色弱模式,true:开启,false:不开启
|
|
17
|
+
multiPage: true, // 多页签模式,true:开启,false:不开启
|
|
18
|
+
cachePage: true, // 是否缓存页面数据,仅多页签模式下生效,true 缓存, false 不缓存
|
|
19
|
+
hideSetting: false, // 隐藏设置抽屉,true:隐藏,false:不隐藏
|
|
20
|
+
homePage: '/system/dictionaryManage', // 首页路由, 登陆后默认打开
|
|
21
|
+
ticketPage: '/submitTicket', // 提交工单路由
|
|
22
|
+
systemName: '基础组件平台', // 系统名称
|
|
23
|
+
systemDesc: '为PC端中、后台系统业务开发提供支持', // 系统描述
|
|
24
|
+
copyright: '2022 AoFengSoft', // copyright
|
|
25
|
+
asyncRoutes: true, // 异步加载路由,true:开启,false:不开启
|
|
26
|
+
showPageTitle: true, // 是否显示页面标题(PageLayout 布局中的页面标题),true:显示,false:不显示
|
|
27
|
+
filterMenu: true, // 根据权限过滤菜单,true:过滤,false:不过滤
|
|
28
|
+
animate: { // 动画设置
|
|
29
|
+
disabled: true, // 禁用动画,true:禁用,false:启用
|
|
30
|
+
name: 'lightSpeed', // 动画效果,支持的动画效果可参考 ./animate.config.js
|
|
31
|
+
direction: 'left' // 动画方向,切换页面时动画的方向,参考 ./animate.config.js
|
|
32
|
+
},
|
|
33
|
+
footerLinks: [ // 页面底部链接,{link: '链接地址', name: '名称/显示文字', icon: '图标,支持 ant design vue 图标库'}
|
|
34
|
+
]
|
|
35
|
+
}
|
package/src/config/index.js
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
<page-toggle-transition :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
|
|
3
3
|
<template v-if="login">
|
|
4
4
|
<iframe
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
ref="singlepage">
|
|
5
|
+
ref="singlepage"
|
|
6
|
+
:src="iframeSrc"
|
|
7
|
+
class="single-page-iframe"
|
|
8
|
+
@load="load">
|
|
10
9
|
</iframe>
|
|
11
10
|
</template>
|
|
12
11
|
</page-toggle-transition>
|
|
@@ -22,32 +21,29 @@ export default {
|
|
|
22
21
|
components: { PageToggleTransition },
|
|
23
22
|
props: {
|
|
24
23
|
singlePageUrl: {
|
|
25
|
-
type:
|
|
26
|
-
default:
|
|
27
|
-
return { url: '' }
|
|
28
|
-
}
|
|
24
|
+
type: String,
|
|
25
|
+
default: ''
|
|
29
26
|
}
|
|
30
27
|
},
|
|
31
28
|
data () {
|
|
32
29
|
return {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
iframe: {}
|
|
30
|
+
iframeSrc: '../singlepage/page.html',
|
|
31
|
+
iframe: null
|
|
36
32
|
}
|
|
37
33
|
},
|
|
38
34
|
computed: {
|
|
39
|
-
...mapState('setting', ['
|
|
35
|
+
...mapState('setting', ['animate']),
|
|
40
36
|
...mapState('account', ['login'])
|
|
41
37
|
},
|
|
42
38
|
mounted () {
|
|
43
39
|
if (!this.login) {
|
|
44
40
|
this.setLogin(JSON.parse(sessionStorage.getItem(process.env.VUE_APP_LOGIN_KEY)))
|
|
45
41
|
}
|
|
42
|
+
this.iframe = this.$refs.singlepage.contentWindow
|
|
46
43
|
},
|
|
47
44
|
methods: {
|
|
48
45
|
...mapMutations('account', ['setLogin']),
|
|
49
46
|
load () {
|
|
50
|
-
this.iframe = this.$refs.singlepage.contentWindow
|
|
51
47
|
const appdata = {
|
|
52
48
|
singleValues: this.$appdata.getSingleValues(),
|
|
53
49
|
params: this.$appdata.getParams()
|
|
@@ -56,17 +52,17 @@ export default {
|
|
|
56
52
|
token: localStorage.getItem(ACCESS_TOKEN),
|
|
57
53
|
login: this.login,
|
|
58
54
|
appdata: appdata,
|
|
59
|
-
page: this.singlePageUrl
|
|
55
|
+
page: this.singlePageUrl
|
|
60
56
|
}
|
|
61
57
|
console.log('发送参数', data)
|
|
62
|
-
this.iframe
|
|
58
|
+
this.iframe?.postMessage(data, '*')
|
|
63
59
|
}
|
|
64
60
|
}
|
|
65
61
|
}
|
|
66
62
|
</script>
|
|
67
63
|
|
|
68
64
|
<style lang="less">
|
|
69
|
-
|
|
65
|
+
.single-page-iframe {
|
|
70
66
|
width: 100%;
|
|
71
67
|
height: calc(100vh - 117px);
|
|
72
68
|
border: none;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
<div id="TabsView">
|
|
3
|
+
<admin-layout>
|
|
4
|
+
<contextmenu :itemList="menuItemList" :visible.sync="menuVisible" @select="onMenuSelect" />
|
|
5
|
+
<tabs-head
|
|
6
|
+
v-if="multiPage"
|
|
7
|
+
:active="activePage"
|
|
8
|
+
:page-list="pageList"
|
|
9
|
+
@change="changePage"
|
|
10
|
+
@close="remove"
|
|
11
|
+
@refresh="refresh"
|
|
12
|
+
@contextmenu="onContextmenu"
|
|
13
|
+
/>
|
|
14
|
+
<div :class="['tabs-view-content', layout, pageWidth]" :style="`margin-top: ${multiPage ? -24 : 0}px`">
|
|
15
|
+
<page-toggle-transition v-show="!$route.meta.singlePage" :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
|
|
16
|
+
<a-keep-alive :exclude-keys="excludeKeys" v-if="multiPage && cachePage" v-model="clearCaches">
|
|
17
|
+
<router-view v-if="!refreshing" ref="tabContent" :key="$route.path" />
|
|
18
|
+
</a-keep-alive>
|
|
19
|
+
<router-view ref="tabContent" v-else-if="!refreshing" />
|
|
20
|
+
</page-toggle-transition>
|
|
21
21
|
<template v-for="page in single">
|
|
22
|
-
<single-page-view v-show="page.meta.singlePage === $route.meta.singlePage" :single-page-url="
|
|
22
|
+
<single-page-view v-show="page.meta.singlePage === $route.meta.singlePage" :single-page-url="page.meta.singlePage" :key="page.meta.singlePage" />
|
|
23
23
|
</template>
|
|
24
24
|
</div>
|
|
25
|
-
</
|
|
26
|
-
</
|
|
25
|
+
</admin-layout>
|
|
26
|
+
</div>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script>
|
|
@@ -338,24 +338,23 @@ export default {
|
|
|
338
338
|
}
|
|
339
339
|
</script>
|
|
340
340
|
|
|
341
|
-
<style
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
341
|
+
<style lang="less">
|
|
342
|
+
#TabsView {
|
|
343
|
+
.tabs-view {
|
|
344
|
+
margin: -16px auto 8px;
|
|
345
|
+
&.head.fixed {
|
|
346
|
+
max-width: 1400px;
|
|
347
|
+
}
|
|
346
348
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
349
|
+
.tabs-view-content {
|
|
350
|
+
position: relative;
|
|
351
|
+
&.head.fixed {
|
|
352
|
+
width: 1400px;
|
|
353
|
+
margin: 0 auto;
|
|
354
|
+
}
|
|
355
|
+
.ant-card:only-of-type {
|
|
356
|
+
min-height: calc(100vh - 64px - 56px - 16px);
|
|
357
|
+
}
|
|
353
358
|
}
|
|
354
359
|
}
|
|
355
360
|
</style>
|
|
356
|
-
|
|
357
|
-
<style scoped>
|
|
358
|
-
.tabs-view-content >>> .ant-card:only-of-type {
|
|
359
|
-
min-height: calc(100vh - 64px - 56px - 16px);
|
|
360
|
-
}
|
|
361
|
-
</style>
|