vue2-client 1.2.28-test → 1.2.28-test1

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": "vue2-client",
3
- "version": "1.2.28-test",
3
+ "version": "1.2.28-test1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -26,9 +26,17 @@ module.exports = {
26
26
  accept: '.mp3,.cda,.wav,.aif,.aiff,.ape,.ra,'
27
27
  },
28
28
  {
29
- label: '压缩包 ',
29
+ label: '压缩包',
30
30
  accept: '.zip,.rar,.7z,'
31
31
  },
32
+ {
33
+ label: '其他文本',
34
+ accept: '.json,.txt,'
35
+ },
36
+ {
37
+ label: '无限制',
38
+ accept: '*'
39
+ },
32
40
  ],
33
41
  // 查询方式
34
42
  queryType: [
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div id="depListManage">
3
+
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'depListManage',
10
+ data () {
11
+ return {}
12
+ },
13
+ created () {
14
+ },
15
+ mounted () {
16
+ },
17
+ methods: {}
18
+ }
19
+ </script>
20
+
21
+ <style lang="less">
22
+
23
+ </style>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div id="funListManage">
3
+
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'funListManage',
10
+ data () {
11
+ return {}
12
+ },
13
+ created () {
14
+ },
15
+ mounted () {
16
+ },
17
+ methods: {}
18
+ }
19
+ </script>
20
+
21
+ <style lang="less">
22
+
23
+ </style>
@@ -0,0 +1,15 @@
1
+ import depListManage from '@vue2-client/pages/resourceManage/depListManage'
2
+ import funListManage from '@vue2-client/pages/resourceManage/funListManage'
3
+ import orgListManage from '@vue2-client/pages/resourceManage/orgListManage'
4
+ import resourceManageMain from '@vue2-client/pages/resourceManage/resourceManageMain'
5
+ import roleListManage from '@vue2-client/pages/resourceManage/roleListManage'
6
+ import staffListManage from '@vue2-client/pages/resourceManage/staffListManage'
7
+
8
+ export default resourceManageMain
9
+ export {
10
+ depListManage,
11
+ funListManage,
12
+ orgListManage,
13
+ roleListManage,
14
+ staffListManage
15
+ }
@@ -0,0 +1,98 @@
1
+ <template>
2
+ <div id="orgListManage">
3
+ <a-card :bordered="false">
4
+ <!--<a-row :gutter="48">-->
5
+ <!--<a-col>-->
6
+ <!--<a-space>-->
7
+ <!--<a-button type="primary" @click="addItem" v-if="!buttonState || buttonState.add">-->
8
+ <!--<a-icon :style="iconStyle" type="plus"/>新增-->
9
+ <!--</a-button>-->
10
+ <!--<a-button-->
11
+ <!--v-if="!buttonState || buttonState.edit"-->
12
+ <!--:loading="editDataLoading"-->
13
+ <!--:disabled="!isModify"-->
14
+ <!--class="btn-success"-->
15
+ <!--type="dashed"-->
16
+ <!--@click="editItem">-->
17
+ <!--<a-icon :style="iconStyle" type="edit"/>修改-->
18
+ <!--</a-button>-->
19
+ <!--<a-button :disabled="!isDelete" type="danger" @click="deleteItem" v-if="!buttonState || buttonState.delete">-->
20
+ <!--<a-icon :style="iconStyle" type="delete"/>删除-->
21
+ <!--</a-button>-->
22
+ <!--</a-space>-->
23
+ <!--<span :style="{ float: 'right', overflow: 'hidden', marginBottom: '8px' }">-->
24
+ <!--<a-button-group>-->
25
+ <!--<a-button @click="toggleIsFormShow">-->
26
+ <!--<a-icon :style="iconStyle" type="vertical-align-top"/>-->
27
+ <!--</a-button>-->
28
+ <!--<a-button @click="refresh(true)">-->
29
+ <!--<a-icon :style="iconStyle" type="reload" />-->
30
+ <!--</a-button>-->
31
+ <!--<a-button @click="showDrawer">-->
32
+ <!--<a-icon :style="iconStyle" type="table" />-->
33
+ <!--</a-button>-->
34
+ <!--<a-button @click="exports">-->
35
+ <!--<a-icon :style="iconStyle" type="cloud-download"/>-->
36
+ <!--</a-button>-->
37
+ <!--</a-button-group>-->
38
+ <!--</span>-->
39
+ <!--</a-col>-->
40
+ <!--</a-row>-->
41
+ <a-table
42
+ rowKey="id"
43
+ size="middle"
44
+ bordered
45
+ :pagination="false"
46
+ :columns="columns"
47
+ :data-source="funTree">
48
+ </a-table>
49
+ </a-card>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import { getOrganization, searchFun } from '@vue2-client/base-client/plugins/GetLoginInfoService'
55
+ import { getColumnsJson } from '@vue2-client/services/api'
56
+ export default {
57
+ // 组织管理
58
+ name: 'orgListManage',
59
+ data () {
60
+ return {
61
+ columnsJson: [],
62
+ funTree: [],
63
+ columns: [
64
+ {
65
+ title: '组织名称',
66
+ dataIndex: 'name'
67
+ },
68
+ {
69
+ title: '排序',
70
+ dataIndex: 'position'
71
+ },
72
+ {
73
+ title: '组件目录',
74
+ dataIndex: 'f_dir'
75
+ },
76
+ {
77
+ title: '描述',
78
+ dataIndex: 'f_description'
79
+ }
80
+ ]
81
+ }
82
+ },
83
+ created () {
84
+ },
85
+ async mounted () {
86
+ getColumnsJson('orgListManage', (res) => {
87
+ this.columnsJson = res
88
+ })
89
+ const fun = await getOrganization()
90
+ this.funTree = searchFun(fun, '组织机构')
91
+ },
92
+ methods: {
93
+ }
94
+ }
95
+ </script>
96
+
97
+ <style lang="less">
98
+ </style>
@@ -1,55 +1,58 @@
1
- <!--<template>-->
2
- <!--<div id="resourceManageMain">-->
3
- <!--<a-tabs>-->
4
- <!--<a-tab-pane key="1" force-render>-->
5
- <!--<span slot="tab"><a-icon type="apartment" />资源管理</span>-->
6
- <!--Content of Tab Pane 1-->
7
- <!--</a-tab-pane>-->
8
- <!--<a-tab-pane key="2" tab="功能管理" force-render>-->
9
- <!--Content of Tab Pane 2-->
10
- <!--</a-tab-pane>-->
11
- <!--<a-tab-pane key="3" tab="部门管理" force-render>-->
12
- <!--Content of Tab Pane 3-->
13
- <!--</a-tab-pane>-->
14
- <!--</a-tabs>-->
15
- <!--</div>-->
16
- <!--</template>-->
17
-
18
1
  <script>
19
- import { mapState } from 'vuex'
20
- import { getResourceFunction } from '@vue2-client/base-client/plugins/GetLoginInfoService'
2
+ import { depListManage, funListManage, orgListManage, roleListManage, staffListManage } from '@vue2-client/pages/resourceManage'
3
+ import exp403 from '@vue2-client/pages/exception/403'
4
+ import { getResourceFunction, searchFun } from '@vue2-client/base-client/plugins/GetLoginInfoService'
21
5
 
22
6
  export default {
23
7
  name: 'resourceManageMain',
24
- computed: {
25
- ...mapState('account', ['login'])
26
- },
8
+ components: { depListManage, funListManage, orgListManage, roleListManage, staffListManage },
27
9
  data () {
28
10
  return {
11
+ renderSW: false,
29
12
  resFun: []
30
13
  }
31
14
  },
15
+ render () {
16
+ if (!this.renderSW) return
17
+ if (!this.resFun || this.resFun.length <= 0) {
18
+ return (
19
+ <div id="resourceManageMain">
20
+ <exp403></exp403>
21
+ </div>
22
+ )
23
+ }
24
+ const tabPane = []
25
+ for (const [index, row] of this.resFun.entries()) {
26
+ tabPane.push(
27
+ <a-tab-pane key={index} force-render>
28
+ <span slot="tab"><a-icon type={row.icon || 'exclamation'}/>{row.name}</span>
29
+ <row.link></row.link>
30
+ </a-tab-pane>
31
+ )
32
+ }
33
+ return (
34
+ <div id="resourceManageMain">
35
+ <a-tabs>
36
+ {tabPane}
37
+ </a-tabs>
38
+ </div>
39
+ )
40
+ },
32
41
  created () {
33
42
  },
34
43
  async mounted () {
35
44
  const fun = await getResourceFunction()
36
- console.log('->', fun)
37
- this.resFun = this.searchFun(fun, '资源功能')
45
+ this.resFun = searchFun(fun, '资源功能')
46
+ this.renderSW = true
38
47
  },
39
48
  methods: {
40
- searchFun (fun, name) {
41
- if (fun.length > 0) {
42
- if (fun[0].name == name) {
43
- return fun[0].children
44
- } else {
45
- return this.searchFun(fun[0].children, name)
46
- }
47
- }
48
- }
49
49
  }
50
50
  }
51
51
  </script>
52
52
 
53
53
  <style lang="less">
54
-
54
+ #resourceManageMain {
55
+ background-color: @gray-1;
56
+ height: calc(100vh - 117px);
57
+ }
55
58
  </style>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div id="roleListManage">
3
+
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'roleListManage',
10
+ data () {
11
+ return {}
12
+ },
13
+ created () {
14
+ },
15
+ mounted () {
16
+ },
17
+ methods: {}
18
+ }
19
+ </script>
20
+
21
+ <style lang="less">
22
+
23
+ </style>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div id="staffListManage">
3
+
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'staffListManage',
10
+ data () {
11
+ return {}
12
+ },
13
+ created () {
14
+ },
15
+ mounted () {
16
+ },
17
+ methods: {}
18
+ }
19
+ </script>
20
+
21
+ <style lang="less">
22
+
23
+ </style>
@@ -1,4 +1,5 @@
1
1
  import { METHOD, request } from '@vue2-client/utils/request'
2
+ import { indexedDB } from '@vue2-client/utils/indexedDB'
2
3
 
3
4
  const commonApi = {
4
5
  // 获取表格列配置
@@ -13,6 +14,15 @@ const commonApi = {
13
14
  getDictionaryParam: '/webmeterapi/getDictionaryParam'
14
15
  }
15
16
 
17
+ /**
18
+ * 带缓存查询的表格配置文件查询
19
+ * @param queryParamsName 配置名称
20
+ * @param callback 回调函数
21
+ */
22
+ export function getColumnsJson (queryParamsName, callback) {
23
+ indexedDB.getByWeb(queryParamsName, commonApi.getColumnsJson, { str: queryParamsName }, callback)
24
+ }
25
+
16
26
  /**
17
27
  * 通用表单查询
18
28
  */
@@ -1,4 +1,4 @@
1
- import { commonApi, query, addOrModify, remove } from '@vue2-client/services/api/common'
1
+ import { commonApi, getColumnsJson, query, addOrModify, remove } from '@vue2-client/services/api/common'
2
2
  import { CustomerDetailsViewApi } from '@vue2-client/services/api/CustomerDetailsViewApi'
3
3
  import { DeviceBrandDetailsViewApi } from '@vue2-client/services/api/DeviceBrandDetailsViewApi'
4
4
  import { DeviceDetailsViewApi } from '@vue2-client/services/api/DeviceDetailsViewApi'
@@ -18,7 +18,7 @@ import { TicketDetailsViewApi } from '@vue2-client/services/api/TicketDetailsVie
18
18
  import { WebmeterAnalysisViewApi } from '@vue2-client/services/api/WebmeterAnalysisViewApi'
19
19
 
20
20
  export {
21
- commonApi, query, addOrModify, remove,
21
+ commonApi, getColumnsJson, query, addOrModify, remove,
22
22
  CustomerDetailsViewApi,
23
23
  DeviceBrandDetailsViewApi,
24
24
  DeviceDetailsViewApi,