vue2-client 1.0.0 → 1.2.1
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/.eslintrc.js +81 -81
- package/README.md +65 -55
- package/babel.config.js +15 -14
- package/docs/index.md +29 -29
- package/docs/notice.md +24 -0
- package/index.js +28 -0
- package/jest.config.js +3 -3
- package/package.json +1 -1
- package/public/index.html +27 -27
- package/src/App.vue +2 -2
- package/src/base-client/all.js +57 -57
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +1159 -1159
- package/src/base-client/components/common/CreateQuery/index.md +1 -1
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +540 -540
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +1 -1
- package/src/base-client/components/common/CustomColumnsDrawer/index.md +1 -1
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +150 -150
- package/src/base-client/components/common/FormGroupEdit/index.md +1 -1
- package/src/base-client/components/common/FormGroupQuery/index.md +1 -1
- package/src/base-client/components/common/XAddForm/XAddForm.vue +323 -323
- package/src/base-client/components/common/XAddForm/index.md +1 -1
- package/src/base-client/components/common/XBadge/index.md +1 -1
- package/src/base-client/components/common/XCard/index.md +1 -1
- package/src/base-client/components/common/XForm/XForm.vue +275 -275
- package/src/base-client/components/common/XForm/XFormItem.vue +217 -217
- package/src/base-client/components/common/XForm/index.md +196 -196
- package/src/base-client/components/common/XFormCol/index.md +1 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +405 -405
- package/src/base-client/components/common/XFormTable/index.md +2 -2
- package/src/base-client/components/common/XTable/XTable.vue +262 -262
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +1 -1
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +226 -226
- package/src/base-client/components/iot/CustomerDetailsView/index.md +2 -2
- package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +1 -1
- package/src/base-client/components/iot/DataAnalysisViewGD/DataAnalysisViewGD.vue +548 -548
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +453 -453
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +231 -231
- package/src/base-client/components/iot/DeviceDetailsView/index.md +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -330
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +3 -3
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +122 -122
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +3 -3
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +277 -277
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +472 -472
- package/src/base-client/components/iot/InstructDetailsView/index.md +1 -1
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +380 -380
- package/src/base-client/components/iot/LogDetailsView/index.md +1 -1
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +360 -360
- package/src/base-client/components/iot/MeterDetailsView/index.md +1 -1
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +185 -185
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +292 -292
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +237 -237
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +257 -257
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +190 -190
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +723 -723
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +1 -1
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/components/system/DictionaryDetailsView/index.md +1 -1
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +248 -248
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +406 -406
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +486 -486
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +184 -184
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +303 -303
- package/src/base-client/plugins/AppData.js +69 -69
- package/src/base-client/plugins/GetLoginInfoService.js +221 -222
- package/src/base-client/plugins/index.js +21 -21
- package/src/bootstrap.js +6 -4
- package/src/components/Ellipsis/Ellipsis.vue +1 -1
- package/src/components/Ellipsis/index.md +2 -2
- package/src/components/NumberInfo/index.md +1 -1
- package/src/components/STable/README.md +3 -3
- package/src/components/Trend/index.md +1 -1
- package/src/components/cache/AKeepAlive.js +1 -1
- package/src/components/checkbox/index.js +2 -2
- package/src/components/index.js +15 -15
- package/src/components/menu/menu.js +1 -1
- package/src/components/setting/Setting.vue +4 -4
- package/src/components/table/advance/AdvanceTable.vue +3 -3
- package/src/components/transition/PageToggleTransition.vue +1 -1
- package/src/config/default/setting.config.js +33 -33
- package/src/layouts/CommonLayout.vue +1 -1
- package/src/layouts/ComponentLayoutOne.vue +47 -47
- package/src/layouts/PageLayout.vue +2 -2
- package/src/layouts/SinglePageView.vue +1 -1
- package/src/layouts/header/AdminHeader.vue +2 -2
- package/src/layouts/header/HeaderAvatar.vue +1 -1
- package/src/layouts/header/HeaderNotice.vue +97 -97
- package/src/layouts/tabs/TabsHead.vue +1 -1
- package/src/layouts/tabs/TabsView.vue +6 -6
- package/src/main.js +20 -12
- package/src/mock/common/reportData.js +20 -20
- package/src/mock/goods/index.js +2 -2
- package/src/mock/index.js +6 -6
- package/src/mock/project/index.js +1 -1
- package/src/mock/user/current.js +1 -1
- package/src/mock/user/login.js +1 -1
- package/src/mock/user/routes.js +61 -61
- package/src/mock/workplace/index.js +1 -1
- package/src/pages/exception/403.vue +25 -25
- package/src/pages/exception/404.vue +25 -25
- package/src/pages/exception/500.vue +25 -25
- package/src/pages/login/Login.vue +194 -194
- package/src/pages/report/ReportTable.js +125 -125
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/resourceManage/resourceManageMain.vue +55 -55
- package/src/pages/system/applyInstallView/Core.vue +1 -1
- package/src/pages/system/applyInstallView/index.vue +1 -1
- package/src/pages/system/dictionary/index.vue +1 -1
- package/src/pages/system/queryParams/index.vue +1 -1
- package/src/router/async/config.async.js +1 -1
- package/src/router/async/router.map.js +59 -59
- package/src/router/guards.js +3 -3
- package/src/router/index.js +4 -8
- package/src/services/api/common.js +39 -39
- package/src/services/api/restTools.js +23 -23
- package/src/services/dataSource.js +1 -1
- package/src/services/user.js +2 -2
- package/src/store/index.js +3 -6
- package/src/store/modules/setting.js +5 -5
- package/src/theme/index.less +5 -5
- package/src/theme/reportTable.less +58 -58
- package/src/utils/i18n.js +2 -2
- package/src/utils/indexedDB.js +146 -146
- package/src/utils/request.js +3 -3
- package/src/utils/routerUtil.js +18 -5
- package/tests/unit/ReportTable.spec.js +15 -15
- package/vue.config.js +153 -152
- package/webpack.config.js +12 -0
- package/src/index.js +0 -29
- package/src/router/config.js +0 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Tooltip from 'ant-design-vue/es/tooltip'
|
|
3
|
-
import { cutStrByFullLength, getStrFullLength } from '
|
|
3
|
+
import { cutStrByFullLength, getStrFullLength } from '@vue2-client/components/_util/util'
|
|
4
4
|
/*
|
|
5
5
|
const isSupportLineClamp = document.body.style.webkitLineClamp !== undefined;
|
|
6
6
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
引用方式:
|
|
8
8
|
|
|
9
9
|
```javascript
|
|
10
|
-
import Ellipsis from '
|
|
10
|
+
import Ellipsis from '@vue2-client/components/Ellipsis'
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
components: {
|
|
@@ -35,4 +35,4 @@ export default {
|
|
|
35
35
|
参数 | 说明 | 类型 | 默认值
|
|
36
36
|
----|------|-----|------
|
|
37
37
|
tooltip | 移动到文本展示完整内容的提示 | boolean | -
|
|
38
|
-
length | 在按照长度截取下的文本最大字符数,超过则截取省略 | number | -
|
|
38
|
+
length | 在按照长度截取下的文本最大字符数,超过则截取省略 | number | -
|
|
@@ -31,7 +31,7 @@ Table 重封装组件说明
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script>
|
|
34
|
-
import STable from '
|
|
34
|
+
import STable from '@vue2-client/components'
|
|
35
35
|
|
|
36
36
|
export default {
|
|
37
37
|
components: {
|
|
@@ -130,7 +130,7 @@ Table 重封装组件说明
|
|
|
130
130
|
</template>
|
|
131
131
|
|
|
132
132
|
<script>
|
|
133
|
-
import STable from '
|
|
133
|
+
import STable from '@vue2-client/components/table/'
|
|
134
134
|
|
|
135
135
|
export default {
|
|
136
136
|
components: {
|
|
@@ -338,4 +338,4 @@ result.then(r => {
|
|
|
338
338
|
更新时间
|
|
339
339
|
----
|
|
340
340
|
|
|
341
|
-
该文档最后更新于: 2019-06-23 PM 17:19
|
|
341
|
+
该文档最后更新于: 2019-06-23 PM 17:19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ColorCheckbox from '
|
|
2
|
-
import ImgCheckbox from '
|
|
1
|
+
import ColorCheckbox from '@vue2-client/components/checkbox/ColorCheckbox'
|
|
2
|
+
import ImgCheckbox from '@vue2-client/components/checkbox/ImgCheckbox'
|
|
3
3
|
|
|
4
4
|
export {
|
|
5
5
|
ColorCheckbox,
|
package/src/components/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// chart
|
|
2
|
-
import Bar from '
|
|
3
|
-
import ChartCard from '
|
|
4
|
-
import Liquid from '
|
|
5
|
-
import MiniArea from '
|
|
6
|
-
import MiniSmoothArea from '
|
|
7
|
-
import MiniBar from '
|
|
8
|
-
import MiniProgress from '
|
|
9
|
-
import Radar from '
|
|
10
|
-
import RankList from '
|
|
11
|
-
import TransferBar from '
|
|
12
|
-
import TagCloud from '
|
|
2
|
+
import Bar from '@vue2-client/components/Charts/Bar'
|
|
3
|
+
import ChartCard from '@vue2-client/components/Charts/ChartCard'
|
|
4
|
+
import Liquid from '@vue2-client/components/Charts/Liquid'
|
|
5
|
+
import MiniArea from '@vue2-client/components/Charts/MiniArea'
|
|
6
|
+
import MiniSmoothArea from '@vue2-client/components/Charts/MiniSmoothArea'
|
|
7
|
+
import MiniBar from '@vue2-client/components/Charts/MiniBar'
|
|
8
|
+
import MiniProgress from '@vue2-client/components/Charts/MiniProgress'
|
|
9
|
+
import Radar from '@vue2-client/components/Charts/Radar'
|
|
10
|
+
import RankList from '@vue2-client/components/Charts/RankList'
|
|
11
|
+
import TransferBar from '@vue2-client/components/Charts/TransferBar'
|
|
12
|
+
import TagCloud from '@vue2-client/components/Charts/TagCloud'
|
|
13
13
|
|
|
14
14
|
// pro components
|
|
15
|
-
import Ellipsis from '
|
|
16
|
-
import NumberInfo from '
|
|
17
|
-
import STable from '
|
|
18
|
-
import Trend from '
|
|
15
|
+
import Ellipsis from '@vue2-client/components/Ellipsis'
|
|
16
|
+
import NumberInfo from '@vue2-client/components/NumberInfo'
|
|
17
|
+
import STable from '@vue2-client/components/STable'
|
|
18
|
+
import Trend from '@vue2-client/components/Trend'
|
|
19
19
|
|
|
20
20
|
export {
|
|
21
21
|
Bar,
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
import Menu from 'ant-design-vue/es/menu'
|
|
35
35
|
import Icon from 'ant-design-vue/es/icon'
|
|
36
36
|
import fastEqual from 'fast-deep-equal'
|
|
37
|
-
import { getI18nKey } from '
|
|
37
|
+
import { getI18nKey } from '@vue2-client/utils/routerUtil'
|
|
38
38
|
import { mapMutations } from 'vuex'
|
|
39
39
|
|
|
40
40
|
const { Item, SubMenu } = Menu
|
|
@@ -131,12 +131,12 @@
|
|
|
131
131
|
|
|
132
132
|
<script>
|
|
133
133
|
import SettingItem from './SettingItem'
|
|
134
|
-
import { ColorCheckbox, ImgCheckbox } from '
|
|
134
|
+
import { ColorCheckbox, ImgCheckbox } from '@vue2-client/components/checkbox'
|
|
135
135
|
import Clipboard from 'clipboard'
|
|
136
136
|
import { mapState, mapMutations } from 'vuex'
|
|
137
|
-
import { formatConfig } from '
|
|
138
|
-
import { setting } from '
|
|
139
|
-
import sysConfig from '
|
|
137
|
+
import { formatConfig } from '@vue2-client/utils/formatter'
|
|
138
|
+
import { setting } from '@vue2-client/config/default'
|
|
139
|
+
import sysConfig from '@vue2-client/config/config'
|
|
140
140
|
import fastEqual from 'fast-deep-equal'
|
|
141
141
|
import deepMerge from 'deepmerge'
|
|
142
142
|
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script>
|
|
56
|
-
import ActionSize from '
|
|
57
|
-
import ActionColumns from '
|
|
58
|
-
import SearchArea from '
|
|
56
|
+
import ActionSize from '@vue2-client/components/table/advance/ActionSize'
|
|
57
|
+
import ActionColumns from '@vue2-client/components/table/advance/ActionColumns'
|
|
58
|
+
import SearchArea from '@vue2-client/components/table/advance/SearchArea'
|
|
59
59
|
export default {
|
|
60
60
|
name: 'AdvanceTable',
|
|
61
61
|
components: { SearchArea, ActionColumns, ActionSize },
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
// 此配置为系统默认设置,需修改的设置项,在src/config/config.js中添加修改项即可。也可直接在此文件中修改。
|
|
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: false, // 固定头部状态栏,true:固定,false:不固定
|
|
13
|
-
fixedSideBar: true, // 固定侧边栏,true:固定,false:不固定
|
|
14
|
-
fixedTabs: false, // 固定页签头,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
|
-
systemName: '物联网监控平台', // 系统名称
|
|
22
|
-
copyright: '2021 Mr.Jiang', // copyright
|
|
23
|
-
asyncRoutes: true, // 异步加载路由,true:开启,false:不开启
|
|
24
|
-
showPageTitle: true, // 是否显示页面标题(PageLayout 布局中的页面标题),true:显示,false:不显示
|
|
25
|
-
filterMenu: true, // 根据权限过滤菜单,true:过滤,false:不过滤
|
|
26
|
-
animate: { // 动画设置
|
|
27
|
-
disabled: true, // 禁用动画,true:禁用,false:启用
|
|
28
|
-
name: 'lightSpeed', // 动画效果,支持的动画效果可参考 ./animate.config.js
|
|
29
|
-
direction: 'left' // 动画方向,切换页面时动画的方向,参考 ./animate.config.js
|
|
30
|
-
},
|
|
31
|
-
footerLinks: [ // 页面底部链接,{link: '链接地址', name: '名称/显示文字', icon: '图标,支持 ant design vue 图标库'}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
1
|
+
// 此配置为系统默认设置,需修改的设置项,在src/config/config.js中添加修改项即可。也可直接在此文件中修改。
|
|
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: false, // 固定头部状态栏,true:固定,false:不固定
|
|
13
|
+
fixedSideBar: true, // 固定侧边栏,true:固定,false:不固定
|
|
14
|
+
fixedTabs: false, // 固定页签头,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
|
+
systemName: '物联网监控平台', // 系统名称
|
|
22
|
+
copyright: '2021 Mr.Jiang', // copyright
|
|
23
|
+
asyncRoutes: true, // 异步加载路由,true:开启,false:不开启
|
|
24
|
+
showPageTitle: true, // 是否显示页面标题(PageLayout 布局中的页面标题),true:显示,false:不显示
|
|
25
|
+
filterMenu: true, // 根据权限过滤菜单,true:过滤,false:不过滤
|
|
26
|
+
animate: { // 动画设置
|
|
27
|
+
disabled: true, // 禁用动画,true:禁用,false:启用
|
|
28
|
+
name: 'lightSpeed', // 动画效果,支持的动画效果可参考 ./animate.config.js
|
|
29
|
+
direction: 'left' // 动画方向,切换页面时动画的方向,参考 ./animate.config.js
|
|
30
|
+
},
|
|
31
|
+
footerLinks: [ // 页面底部链接,{link: '链接地址', name: '名称/显示文字', icon: '图标,支持 ant design vue 图标库'}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="ComponentLayoutOne">
|
|
3
|
-
<a-layout>
|
|
4
|
-
<a-layout-sider v-bind="siderProps">
|
|
5
|
-
<slot name="left"></slot>
|
|
6
|
-
</a-layout-sider>
|
|
7
|
-
<a-layout>
|
|
8
|
-
<slot></slot>
|
|
9
|
-
</a-layout>
|
|
10
|
-
</a-layout>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
export default {
|
|
16
|
-
name: 'ComponentLayoutOne',
|
|
17
|
-
props: {
|
|
18
|
-
// Layout.Sider props对象
|
|
19
|
-
siderProps: {
|
|
20
|
-
type: Object,
|
|
21
|
-
default: () => {
|
|
22
|
-
return {}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
data () {
|
|
27
|
-
return {}
|
|
28
|
-
},
|
|
29
|
-
created () {
|
|
30
|
-
},
|
|
31
|
-
mounted () {
|
|
32
|
-
},
|
|
33
|
-
methods: {}
|
|
34
|
-
}
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<style lang="less">
|
|
38
|
-
@import '~ant-design-vue/../../src/theme/index';
|
|
39
|
-
#ComponentLayoutOne {
|
|
40
|
-
.ant-layout-sider {
|
|
41
|
-
.ant-layout-sider-zero-width-trigger {
|
|
42
|
-
top: 50%;
|
|
43
|
-
background-color: @shadow-color;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="ComponentLayoutOne">
|
|
3
|
+
<a-layout>
|
|
4
|
+
<a-layout-sider v-bind="siderProps">
|
|
5
|
+
<slot name="left"></slot>
|
|
6
|
+
</a-layout-sider>
|
|
7
|
+
<a-layout>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</a-layout>
|
|
10
|
+
</a-layout>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
name: 'ComponentLayoutOne',
|
|
17
|
+
props: {
|
|
18
|
+
// Layout.Sider props对象
|
|
19
|
+
siderProps: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => {
|
|
22
|
+
return {}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
data () {
|
|
27
|
+
return {}
|
|
28
|
+
},
|
|
29
|
+
created () {
|
|
30
|
+
},
|
|
31
|
+
mounted () {
|
|
32
|
+
},
|
|
33
|
+
methods: {}
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style lang="less">
|
|
38
|
+
@import '~ant-design-vue/../../src/theme/index';
|
|
39
|
+
#ComponentLayoutOne {
|
|
40
|
+
.ant-layout-sider {
|
|
41
|
+
.ant-layout-sider-zero-width-trigger {
|
|
42
|
+
top: 50%;
|
|
43
|
+
background-color: @shadow-color;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script>
|
|
29
|
-
import PageHeader from '
|
|
29
|
+
import PageHeader from '@vue2-client/components/page/header/PageHeader'
|
|
30
30
|
import { mapState, mapMutations } from 'vuex'
|
|
31
|
-
import { getI18nKey } from '
|
|
31
|
+
import { getI18nKey } from '@vue2-client/utils/routerUtil'
|
|
32
32
|
|
|
33
33
|
export default {
|
|
34
34
|
name: 'PageLayout',
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<script>
|
|
16
16
|
import PageToggleTransition from '../components/transition/PageToggleTransition'
|
|
17
|
-
import { ACCESS_TOKEN } from '
|
|
17
|
+
import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
|
|
18
18
|
import { mapState, mapMutations } from 'vuex'
|
|
19
19
|
|
|
20
20
|
export default {
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
import HeaderSearch from './HeaderSearch'
|
|
42
42
|
import HeaderNotice from './HeaderNotice'
|
|
43
43
|
import HeaderAvatar from './HeaderAvatar'
|
|
44
|
-
import IMenu from '
|
|
44
|
+
import IMenu from '@vue2-client/components/menu/menu'
|
|
45
45
|
import { mapState, mapMutations } from 'vuex'
|
|
46
46
|
import { Modal } from 'ant-design-vue'
|
|
47
|
-
import { indexedDB } from '
|
|
47
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
48
48
|
|
|
49
49
|
export default {
|
|
50
50
|
name: 'AdminHeader',
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-dropdown :trigger="['click']" v-model="show">
|
|
3
|
-
<div slot="overlay">
|
|
4
|
-
<a-spin :spinning="loading">
|
|
5
|
-
<a-tabs class="dropdown-tabs" :tabBarStyle="{textAlign: 'center'}" :style="{width: '297px'}">
|
|
6
|
-
<a-tab-pane tab="通知" key="1">
|
|
7
|
-
<a-list>
|
|
8
|
-
<a-list-item :key="item.id" class="tab-pane" v-for=" item in exception">
|
|
9
|
-
<a-list-item-meta :title="'设备号'+ item.e_f_device_id" :description="item.e_f_error_msg" @click="read(item)">
|
|
10
|
-
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"/>
|
|
11
|
-
</a-list-item-meta>
|
|
12
|
-
</a-list-item>
|
|
13
|
-
</a-list>
|
|
14
|
-
</a-tab-pane>
|
|
15
|
-
<a-tab-pane tab="消息" key="2">
|
|
16
|
-
<a-list class="tab-pane"></a-list>
|
|
17
|
-
</a-tab-pane>
|
|
18
|
-
<a-tab-pane tab="待办" key="3">
|
|
19
|
-
<a-list class="tab-pane"></a-list>
|
|
20
|
-
</a-tab-pane>
|
|
21
|
-
</a-tabs>
|
|
22
|
-
</a-spin>
|
|
23
|
-
</div>
|
|
24
|
-
<span @click="fetchNotice" class="header-notice">
|
|
25
|
-
<a-badge class="notice-badge" :count=" exception.length">
|
|
26
|
-
<a-icon :class="['header-notice-icon']" type="bell" />
|
|
27
|
-
</a-badge>
|
|
28
|
-
</span>
|
|
29
|
-
</a-dropdown>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
import { post } from '
|
|
34
|
-
export default {
|
|
35
|
-
name: 'HeaderNotice',
|
|
36
|
-
data () {
|
|
37
|
-
return {
|
|
38
|
-
loading: false,
|
|
39
|
-
show: false,
|
|
40
|
-
exception: []
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
computed: {
|
|
44
|
-
},
|
|
45
|
-
created () {
|
|
46
|
-
this.refresh()
|
|
47
|
-
},
|
|
48
|
-
methods: {
|
|
49
|
-
read (item) {
|
|
50
|
-
post('/webmeterapi/saveSingleTable', { data: { tablename: 't_iot_device_exception', param: { id: item.e_id, f_is_read: 1 } } }).then(res => {
|
|
51
|
-
this.refresh()
|
|
52
|
-
})
|
|
53
|
-
},
|
|
54
|
-
refresh () {
|
|
55
|
-
post('/webmeterapi/commonQuery', { queryParamsName: 'deviceExceptionQueryParams', conditionParams: { e_f_is_read: 0 }, pageNo: 1, pageSize: 999999 }).then(res => {
|
|
56
|
-
this.exception = res.data
|
|
57
|
-
})
|
|
58
|
-
},
|
|
59
|
-
fetchNotice () {
|
|
60
|
-
if (this.loading) {
|
|
61
|
-
this.loading = false
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
this.loadding = true
|
|
65
|
-
setTimeout(() => {
|
|
66
|
-
this.loadding = false
|
|
67
|
-
}, 1000)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
</script>
|
|
72
|
-
|
|
73
|
-
<style lang="less">
|
|
74
|
-
.header-notice{
|
|
75
|
-
display: inline-block;
|
|
76
|
-
transition: all 0.3s;
|
|
77
|
-
span {
|
|
78
|
-
vertical-align: initial;
|
|
79
|
-
}
|
|
80
|
-
.notice-badge{
|
|
81
|
-
color: inherit;
|
|
82
|
-
.header-notice-icon{
|
|
83
|
-
font-size: 16px;
|
|
84
|
-
padding: 4px;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
.dropdown-tabs{
|
|
89
|
-
background-color: @base-bg-color;
|
|
90
|
-
box-shadow: 0 2px 8px @shadow-color;
|
|
91
|
-
border-radius: 4px;
|
|
92
|
-
.tab-pane{
|
|
93
|
-
padding: 0 24px 12px;
|
|
94
|
-
min-height: 250px;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-dropdown :trigger="['click']" v-model="show">
|
|
3
|
+
<div slot="overlay">
|
|
4
|
+
<a-spin :spinning="loading">
|
|
5
|
+
<a-tabs class="dropdown-tabs" :tabBarStyle="{textAlign: 'center'}" :style="{width: '297px'}">
|
|
6
|
+
<a-tab-pane tab="通知" key="1">
|
|
7
|
+
<a-list>
|
|
8
|
+
<a-list-item :key="item.id" class="tab-pane" v-for=" item in exception">
|
|
9
|
+
<a-list-item-meta :title="'设备号'+ item.e_f_device_id" :description="item.e_f_error_msg" @click="read(item)">
|
|
10
|
+
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"/>
|
|
11
|
+
</a-list-item-meta>
|
|
12
|
+
</a-list-item>
|
|
13
|
+
</a-list>
|
|
14
|
+
</a-tab-pane>
|
|
15
|
+
<a-tab-pane tab="消息" key="2">
|
|
16
|
+
<a-list class="tab-pane"></a-list>
|
|
17
|
+
</a-tab-pane>
|
|
18
|
+
<a-tab-pane tab="待办" key="3">
|
|
19
|
+
<a-list class="tab-pane"></a-list>
|
|
20
|
+
</a-tab-pane>
|
|
21
|
+
</a-tabs>
|
|
22
|
+
</a-spin>
|
|
23
|
+
</div>
|
|
24
|
+
<span @click="fetchNotice" class="header-notice">
|
|
25
|
+
<a-badge class="notice-badge" :count=" exception.length">
|
|
26
|
+
<a-icon :class="['header-notice-icon']" type="bell" />
|
|
27
|
+
</a-badge>
|
|
28
|
+
</span>
|
|
29
|
+
</a-dropdown>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import { post } from '@vue2-client/services/api/restTools'
|
|
34
|
+
export default {
|
|
35
|
+
name: 'HeaderNotice',
|
|
36
|
+
data () {
|
|
37
|
+
return {
|
|
38
|
+
loading: false,
|
|
39
|
+
show: false,
|
|
40
|
+
exception: []
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
computed: {
|
|
44
|
+
},
|
|
45
|
+
created () {
|
|
46
|
+
this.refresh()
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
read (item) {
|
|
50
|
+
post('/webmeterapi/saveSingleTable', { data: { tablename: 't_iot_device_exception', param: { id: item.e_id, f_is_read: 1 } } }).then(res => {
|
|
51
|
+
this.refresh()
|
|
52
|
+
})
|
|
53
|
+
},
|
|
54
|
+
refresh () {
|
|
55
|
+
post('/webmeterapi/commonQuery', { queryParamsName: 'deviceExceptionQueryParams', conditionParams: { e_f_is_read: 0 }, pageNo: 1, pageSize: 999999 }).then(res => {
|
|
56
|
+
this.exception = res.data
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
fetchNotice () {
|
|
60
|
+
if (this.loading) {
|
|
61
|
+
this.loading = false
|
|
62
|
+
return
|
|
63
|
+
}
|
|
64
|
+
this.loadding = true
|
|
65
|
+
setTimeout(() => {
|
|
66
|
+
this.loadding = false
|
|
67
|
+
}, 1000)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style lang="less">
|
|
74
|
+
.header-notice{
|
|
75
|
+
display: inline-block;
|
|
76
|
+
transition: all 0.3s;
|
|
77
|
+
span {
|
|
78
|
+
vertical-align: initial;
|
|
79
|
+
}
|
|
80
|
+
.notice-badge{
|
|
81
|
+
color: inherit;
|
|
82
|
+
.header-notice-icon{
|
|
83
|
+
font-size: 16px;
|
|
84
|
+
padding: 4px;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
.dropdown-tabs{
|
|
89
|
+
background-color: @base-bg-color;
|
|
90
|
+
box-shadow: 0 2px 8px @shadow-color;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
.tab-pane{
|
|
93
|
+
padding: 0 24px 12px;
|
|
94
|
+
min-height: 250px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
</style>
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
|
-
import AdminLayout from '
|
|
31
|
-
import Contextmenu from '
|
|
32
|
-
import PageToggleTransition from '
|
|
30
|
+
import AdminLayout from '@vue2-client/layouts/AdminLayout'
|
|
31
|
+
import Contextmenu from '@vue2-client/components/menu/Contextmenu'
|
|
32
|
+
import PageToggleTransition from '@vue2-client/components/transition/PageToggleTransition'
|
|
33
33
|
import { mapState, mapMutations } from 'vuex'
|
|
34
|
-
import { getI18nKey } from '
|
|
35
|
-
import AKeepAlive from '
|
|
36
|
-
import TabsHead from '
|
|
34
|
+
import { getI18nKey } from '@vue2-client/utils/routerUtil'
|
|
35
|
+
import AKeepAlive from '@vue2-client/components/cache/AKeepAlive'
|
|
36
|
+
import TabsHead from '@vue2-client/layouts/tabs/TabsHead'
|
|
37
37
|
import SinglePageView from '../SinglePageView'
|
|
38
38
|
|
|
39
39
|
export default {
|