feat:打包分支代码提交
Showing
144 changed files
with
2987 additions
and
1068 deletions
... | @@ -11,10 +11,11 @@ | ... | @@ -11,10 +11,11 @@ |
11 | "@jiaminghi/data-view": "^2.10.0", | 11 | "@jiaminghi/data-view": "^2.10.0", |
12 | "axios": "^0.21.1", | 12 | "axios": "^0.21.1", |
13 | "clipboard": "^2.0.11", | 13 | "clipboard": "^2.0.11", |
14 | "jsoneditor": "^9.9.2", | ||
15 | "core-js": "^3.6.5", | 14 | "core-js": "^3.6.5", |
16 | "echarts": "^4.6.0", | 15 | "echarts": "^4.6.0", |
16 | "file-saver": "^2.0.5", | ||
17 | "js-cookie": "2.2.0", | 17 | "js-cookie": "2.2.0", |
18 | "jsoneditor": "^9.9.2", | ||
18 | "lodash": "^4.17.21", | 19 | "lodash": "^4.17.21", |
19 | "node-sass": "^4.14.1", | 20 | "node-sass": "^4.14.1", |
20 | "normalize.css": "7.0.0", | 21 | "normalize.css": "7.0.0", |
... | @@ -24,7 +25,9 @@ | ... | @@ -24,7 +25,9 @@ |
24 | "vue-json-editor": "^1.4.3", | 25 | "vue-json-editor": "^1.4.3", |
25 | "vue-router": "3.0.2", | 26 | "vue-router": "3.0.2", |
26 | "vuex": "3.1.0", | 27 | "vuex": "3.1.0", |
27 | "xe-utils": "^3.5.7" | 28 | "xe-utils": "^3.5.7", |
29 | "xlsx": "^0.17.0", | ||
30 | "xlsx-style": "^0.8.13" | ||
28 | }, | 31 | }, |
29 | "devDependencies": { | 32 | "devDependencies": { |
30 | "@vue/cli-plugin-babel": "4.4.4", | 33 | "@vue/cli-plugin-babel": "4.4.4", | ... | ... |
1 | import request from "@/utils/request"; | 1 | |
2 | import SERVER from "./config"; | ||
3 | import { getParams } from './util' | 2 | import { getParams } from './util' |
4 | import { | 3 | import { |
5 | api, | 4 | api, |
6 | getAction, | 5 | getAction, |
7 | postAction, | ||
8 | deleteAction, | 6 | deleteAction, |
9 | putAction | 7 | putAction |
10 | } from './manageApi' | 8 | } from './manageApi' |
11 | |||
12 | /** 角色管理开始 */ | 9 | /** 角色管理开始 */ |
13 | // 获取角色列表 categoryId | 10 | // 获取角色列表 by categoryId |
14 | export const getRolesById = categoryId => { | 11 | export const getRolesById = categoryId => { |
15 | const conditionGroup = { | 12 | const conditionGroup = { |
16 | conditions: [ | 13 | conditions: [ |
17 | { | 14 | { |
18 | property: 'category', | 15 | property: 'category', |
19 | value:categoryId, | 16 | value: categoryId, |
20 | operator: 'EQ' | 17 | operator: 'EQ' |
21 | } | 18 | } |
22 | ], | 19 | ], |
23 | queryRelation: 'AND' | 20 | queryRelation: 'AND' |
24 | } | 21 | } |
25 | const params = getParams(conditionGroup); | 22 | const params = getParams(conditionGroup) |
26 | return getAction(api.roles, params) | 23 | return getAction(api.roles, params) |
27 | } | 24 | } |
28 | // 人员列表 | 25 | /** 角色管理结束 */ |
29 | export const getUserRoles = (id) => { | 26 | /** 授权管理开始 */ |
30 | return getAction(`${api.userRoles}/${id}/users`) | 27 | // 获取权限列表 |
31 | } | 28 | export const getAuthorityListAction = (productId, subsystemCode) => { |
32 | // 更新人员 | 29 | const conditionGroup = { |
33 | export const updateUser = (id, data) => { | 30 | conditions: [ |
34 | return putAction(`${api.userRoles}/${id}/users`, data) | 31 | { |
35 | } | 32 | property: 'productId', |
36 | // 根据条件获取用户 | 33 | value: productId, |
37 | export const getUserList = (params) => { | 34 | operator: 'EQ' |
38 | return getAction(api.users, params) | 35 | }, |
39 | } | 36 | { |
40 | // 导出用户列表 | 37 | property: 'code', |
41 | export const exportUserList = (params) => { | 38 | value: subsystemCode + '_MENU', |
42 | return getAction(api.users + '/export', params) | 39 | operator: 'EQ' |
40 | } | ||
41 | ], | ||
42 | queryRelation: 'AND' | ||
43 | } | ||
44 | const params = getParams(conditionGroup) | ||
45 | return getAction(api.resourceCategory, params) | ||
43 | } | 46 | } |
44 | // 更新用户状态 | 47 | |
45 | export const updateStatus = (id, status) => { | 48 | /** |
46 | return putAction(`${api.users}/${id}/${status}/status`) | 49 | * 获取角色的权限 id operationCodes resourceCategoryCode |
50 | * id 授权id | ||
51 | * operationCodes 操作符集合 | ||
52 | * resourceCategoryCode 菜单默认MENU | ||
53 | */ | ||
54 | export const getRoleAuthorityList = ( | ||
55 | id, | ||
56 | operationCodes, | ||
57 | resourceCategoryCode | ||
58 | ) => { | ||
59 | return getAction(`${api.rolePermissions}/${id}`, { | ||
60 | operationCodes: operationCodes, | ||
61 | resourceCategoryCode: resourceCategoryCode | ||
62 | }) | ||
47 | } | 63 | } |
48 | // 更新用户解锁状态 | 64 | // 角色授权 |
49 | export const updateLock = (id) => { | 65 | export const roleAuthority = (id, permissionDtos) => { |
50 | return putAction(`${api.users}/${id}/lock`) | 66 | return putAction(`${api.rolePermissions}/${id}`, permissionDtos) |
51 | } | 67 | } |
52 | // 重置用户密码 | ||
53 | // export const resetPassword = id => { | ||
54 | // return putAction(`${api.users}/${id}/reset-password`) | ||
55 | // } | ||
56 | 68 | ||
57 | // 重置用户密码 | ||
58 | export const resetPassword = (ids) => { | ||
59 | return putAction(`${api.users}/reset-passwords?ids=${ids}`) | ||
60 | } | ||
61 | 69 | ||
62 | // 删除人员 | 70 | |
63 | export const delUser = (id, data) => { | ||
64 | return deleteAction(`${api.userRoles}/${id}/users`, data) | ||
65 | } | ||
66 | // 获取父级菜单 | 71 | // 获取父级菜单 |
67 | export const getParentMenuListAction = (id) => { | 72 | export const getParentMenuListAction = (id) => { |
68 | let conditionGroup = {} | 73 | let conditionGroup = {} |
... | @@ -81,3 +86,4 @@ export const getParentMenuListAction = (id) => { | ... | @@ -81,3 +86,4 @@ export const getParentMenuListAction = (id) => { |
81 | const params = getParams(conditionGroup) | 86 | const params = getParams(conditionGroup) |
82 | return getAction(api.menus, params) | 87 | return getAction(api.menus, params) |
83 | } | 88 | } |
89 | ... | ... |
1 | /* | ||
2 | * @Description: 统计率 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-01 15:37:49 | ||
5 | */ | ||
6 | /* 引入请求文件 */ | ||
1 | import request from '@/utils/request' | 7 | import request from '@/utils/request' |
8 | /* 引入配置文件 */ | ||
2 | import SERVER from './config' | 9 | import SERVER from './config' |
3 | |||
4 | class business { | 10 | class business { |
5 | /* | 11 | /** |
6 | 成功率统计 | 12 | * @description: 成功率统计 |
7 | startDate:开始日期 | 13 | * @param {*} startDate |
8 | endDate:结束日期 | 14 | * @param {*} endDate |
9 | */ | 15 | * @param {*} qxdm |
10 | async getSuucessRate(startDate,endDate,qxdm) { | 16 | * @author: renchao |
17 | */ | ||
18 | async getSuucessRate (startDate, endDate, qxdm) { | ||
11 | return request({ | 19 | return request({ |
12 | url: SERVER.SERVERAPI + '/rest/statistics/Business/sf', | 20 | url: SERVER.SERVERAPI + '/rest/statistics/Business/sf', |
13 | method: 'get', | 21 | method: 'get', |
14 | params: { | 22 | params: { |
15 | startDate:startDate, | 23 | startDate: startDate, |
16 | endDate:endDate, | 24 | endDate: endDate, |
17 | qxdm:qxdm | 25 | qxdm: qxdm |
18 | } | 26 | } |
19 | }) | 27 | }) |
20 | } | 28 | } | ... | ... |
src/api/config.js
0 → 100644
1 | /* | ||
2 | * @Description: 这个是所有api的前缀配置文件 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-01 15:35:44 | ||
5 | */ | ||
6 | export default { | ||
7 | // SERVERAPI: '/service-bdcsjsb-th', //浩浩 | ||
8 | // SERVERAPI: '/service-bdcsjsb-zz', | ||
9 | SERVERAPI: '/bdcsjsb', //赵千 | ||
10 | MANAGEMENTAPI: 'http://192.168.2.236/management' | ||
11 | // SERVERAPI: '/bdcsjsb-service' | ||
12 | // SERVERAPI: '/bdcsjsb-jiao0' | ||
13 | } | ||
14 | // 汉中 | ||
15 | // export default { | ||
16 | // // SERVERAPI: '/service-bdcsjsb-th', //线上 | ||
17 | // SERVERAPI: '/bdcsjsb', //赵千 | ||
18 | // MANAGEMENTAPI: 'http://172.16.56.32:8877/management' | ||
19 | // } |
1 | /* | ||
2 | * @Description: 数据上报模块api文件 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-03 14:38:57 | ||
5 | */ | ||
6 | /* 引入axios请求文件 */ | ||
1 | import request from '@/utils/request' | 7 | import request from '@/utils/request' |
8 | /* 引入配置 */ | ||
2 | import SERVER from './config' | 9 | import SERVER from './config' |
10 | const urlHeader = SERVER.SERVERAPI + '/rest/sjsb/DataReport/' | ||
3 | 11 | ||
4 | // 区县上报分页 | 12 | /** |
13 | * @description: 区县上报根据业务id获取xml | ||
14 | * @param {*} bizMsgid | ||
15 | * @author: renchao | ||
16 | */ | ||
5 | export function getXml (bizMsgid) { | 17 | export function getXml (bizMsgid) { |
6 | return request({ | 18 | return request({ |
7 | url: SERVER.SERVERAPI + '/rest/sjsb/DataReport/getXml', | 19 | url: urlHeader + 'getXml', |
8 | method: 'get', | 20 | method: 'get', |
9 | params: { | 21 | params: { |
10 | businessId: bizMsgid | 22 | businessId: bizMsgid |
... | @@ -12,58 +24,102 @@ export function getXml (bizMsgid) { | ... | @@ -12,58 +24,102 @@ export function getXml (bizMsgid) { |
12 | }) | 24 | }) |
13 | } | 25 | } |
14 | 26 | ||
15 | // 区县上报分页 | 27 | /** |
28 | * @description: 区县上报分页 | ||
29 | * @param {*} data | ||
30 | * @author: renchao | ||
31 | */ | ||
16 | export function getAreaReportPage (data) { | 32 | export function getAreaReportPage (data) { |
17 | return request({ | 33 | return request({ |
18 | url: SERVER.SERVERAPI + '/rest/sjsb/DataReport/getAreaReportPage', | 34 | url: urlHeader + 'getAreaReportPage', |
19 | method: 'post', | 35 | method: 'post', |
20 | data | 36 | data |
21 | }) | 37 | }) |
22 | } | 38 | } |
23 | 39 | ||
24 | 40 | /** | |
25 | // 接入数据上报分页 | 41 | * @description: 接入数据上报分页 |
42 | * @author: renchao | ||
43 | */ | ||
26 | export function getReceiveDataReportPage (data) { | 44 | export function getReceiveDataReportPage (data) { |
27 | return request({ | 45 | return request({ |
28 | url: SERVER.SERVERAPI + '/rest/sjsb/DataReport/getReceiveDataReportPage', | 46 | url: urlHeader + 'getReceiveDataReportPage', |
29 | method: 'post', | 47 | method: 'post', |
30 | data | 48 | data |
31 | }) | 49 | }) |
32 | } | 50 | } |
33 | 51 | ||
34 | // 数据上报分页 | 52 | /** |
53 | * @description: 数据上报分页 | ||
54 | * @author: renchao | ||
55 | */ | ||
35 | export function getDataReportPage (data) { | 56 | export function getDataReportPage (data) { |
36 | return request({ | 57 | return request({ |
37 | url: SERVER.SERVERAPI + '/rest/sjsb/DataReport/getDataReportPage', | 58 | url: urlHeader + 'getDataReportPage', |
38 | method: 'post', | 59 | method: 'post', |
39 | data | 60 | data |
40 | }) | 61 | }) |
41 | } | 62 | } |
42 | 63 | /** | |
43 | // 查询数据上报详情tabs选项卡 | 64 | * @description: 查询数据上报详情tabs选项卡 |
65 | * @author: renchao | ||
66 | */ | ||
44 | export function getTabsDetail (params) { | 67 | export function getTabsDetail (params) { |
45 | return request({ | 68 | return request({ |
46 | url: SERVER.SERVERAPI + '/rest/sjsb/DataReport/getTabsDetail', | 69 | url: urlHeader + 'getTabsDetail', |
47 | method: 'get', | 70 | method: 'get', |
48 | params | 71 | params |
49 | }) | 72 | }) |
50 | } | 73 | } |
51 | // 查询数据上报详情 | 74 | /** |
75 | * @description: 查询数据上报详情 | ||
76 | * @author: renchao | ||
77 | */ | ||
52 | export function getReportDetail (params) { | 78 | export function getReportDetail (params) { |
53 | return request({ | 79 | return request({ |
54 | url: SERVER.SERVERAPI + '/rest/sjsb/DataReport/getReportDetail', | 80 | url: urlHeader + 'getReportDetail', |
55 | method: 'get', | 81 | method: 'get', |
56 | params | 82 | params |
57 | }) | 83 | }) |
58 | } | 84 | } |
59 | 85 | ||
60 | // 结果 | 86 | /** |
87 | * @description: 获取数据上报结果 | ||
88 | * @param {*} bsmReport | ||
89 | * @author: renchao | ||
90 | */ | ||
61 | export function getReceiveDataReportResult (bsmReport) { | 91 | export function getReceiveDataReportResult (bsmReport) { |
62 | return request({ | 92 | return request({ |
63 | url: SERVER.SERVERAPI + '/rest/sjsb/DataReport/getReceiveDataReportResult', | 93 | url: urlHeader + 'getReceiveDataReportResult', |
64 | method: 'get', | 94 | method: 'get', |
65 | params: { | 95 | params: { |
66 | bsmReport: bsmReport | 96 | bsmReport: bsmReport |
67 | } | 97 | } |
68 | }) | 98 | }) |
99 | } | ||
100 | |||
101 | /** | ||
102 | * @description: 重新上报 | ||
103 | * @param {*} bsmReport | ||
104 | * @author: renchao | ||
105 | */ | ||
106 | |||
107 | export function restartGenerateXml (bsmReport) { | ||
108 | return request({ | ||
109 | url: urlHeader + 'restartGenerateXml?bsmReport=' + bsmReport, | ||
110 | method: 'post' | ||
111 | }) | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * @description: 编辑报文头 | ||
116 | * @param {*} data | ||
117 | * @author: renchao | ||
118 | */ | ||
119 | export function edit (data) { | ||
120 | return request({ | ||
121 | url: urlHeader + 'edit', | ||
122 | method: 'post', | ||
123 | data | ||
124 | }) | ||
69 | } | 125 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -78,12 +78,12 @@ export const api = { | ... | @@ -78,12 +78,12 @@ export const api = { |
78 | crudPut: crud + '/rest/put', // crudPut | 78 | crudPut: crud + '/rest/put', // crudPut |
79 | crudDel: crud + '/rest/delete', // crudDel | 79 | crudDel: crud + '/rest/delete', // crudDel |
80 | crudMetadata: crud + '/rest/metadata', //crudMetadata | 80 | crudMetadata: crud + '/rest/metadata', //crudMetadata |
81 | crudBusiness : crud + '/rest/business', // crudBusiness | 81 | crudBusiness: crud + '/rest/business', // crudBusiness |
82 | crudDatasources : crud + '/rest/datasources', // crudDatasources | 82 | crudDatasources: crud + '/rest/datasources', // crudDatasources |
83 | } | 83 | } |
84 | 84 | ||
85 | // 根据code获取字典 params={isTree:true}) | 85 | // 根据code获取字典 params={isTree:true}) |
86 | export function getDictItems(code, params = {}) { | 86 | export function getDictItems (code, params = {}) { |
87 | return request({ | 87 | return request({ |
88 | url: `${api.baseDataCategory}/${code}/base-datas`, | 88 | url: `${api.baseDataCategory}/${code}/base-datas`, |
89 | method: 'get', | 89 | method: 'get', |
... | @@ -91,21 +91,21 @@ export function getDictItems(code, params = {}) { | ... | @@ -91,21 +91,21 @@ export function getDictItems(code, params = {}) { |
91 | }) | 91 | }) |
92 | } | 92 | } |
93 | // 获取一级字典值下级接口 | 93 | // 获取一级字典值下级接口 |
94 | export function getDictItemsChild(id) { | 94 | export function getDictItemsChild (id) { |
95 | return request({ | 95 | return request({ |
96 | url: `${api.baseData}/dict/${id}`, | 96 | url: `${api.baseData}/dict/${id}`, |
97 | method: 'get' | 97 | method: 'get' |
98 | }) | 98 | }) |
99 | } | 99 | } |
100 | // 获取传入字段的所有级别字典值 | 100 | // 获取传入字段的所有级别字典值 |
101 | export function getAllDictItems(name) { | 101 | export function getAllDictItems (name) { |
102 | return request({ | 102 | return request({ |
103 | url: `${api.baseDataCategory}/${name}/base-datas`, | 103 | url: `${api.baseDataCategory}/${name}/base-datas`, |
104 | method: 'get' | 104 | method: 'get' |
105 | }) | 105 | }) |
106 | } | 106 | } |
107 | // get公共方法 | 107 | // get公共方法 |
108 | export function getAction(url, params = {}) { | 108 | export function getAction (url, params = {}) { |
109 | return request({ | 109 | return request({ |
110 | url, | 110 | url, |
111 | method: 'get', | 111 | method: 'get', |
... | @@ -113,7 +113,7 @@ export function getAction(url, params = {}) { | ... | @@ -113,7 +113,7 @@ export function getAction(url, params = {}) { |
113 | }) | 113 | }) |
114 | } | 114 | } |
115 | // post公共方法 | 115 | // post公共方法 |
116 | export function postAction(url, data = null) { | 116 | export function postAction (url, data = null) { |
117 | return request({ | 117 | return request({ |
118 | url, | 118 | url, |
119 | method: 'post', | 119 | method: 'post', |
... | @@ -121,7 +121,7 @@ export function postAction(url, data = null) { | ... | @@ -121,7 +121,7 @@ export function postAction(url, data = null) { |
121 | }) | 121 | }) |
122 | } | 122 | } |
123 | // method= {post | put} | 123 | // method= {post | put} |
124 | export function httpAction(url, data, method) { | 124 | export function httpAction (url, data, method) { |
125 | return request({ | 125 | return request({ |
126 | url, | 126 | url, |
127 | method, | 127 | method, |
... | @@ -129,7 +129,7 @@ export function httpAction(url, data, method) { | ... | @@ -129,7 +129,7 @@ export function httpAction(url, data, method) { |
129 | }) | 129 | }) |
130 | } | 130 | } |
131 | // put公共方法 | 131 | // put公共方法 |
132 | export function putAction(url, data = null) { | 132 | export function putAction (url, data = null) { |
133 | return request({ | 133 | return request({ |
134 | url, | 134 | url, |
135 | method: 'put', | 135 | method: 'put', |
... | @@ -137,7 +137,7 @@ export function putAction(url, data = null) { | ... | @@ -137,7 +137,7 @@ export function putAction(url, data = null) { |
137 | }) | 137 | }) |
138 | } | 138 | } |
139 | // delete | 139 | // delete |
140 | export function deleteAction(url, data = null) { | 140 | export function deleteAction (url, data = null) { |
141 | return request({ | 141 | return request({ |
142 | url, | 142 | url, |
143 | method: 'delete', | 143 | method: 'delete', |
... | @@ -146,7 +146,7 @@ export function deleteAction(url, data = null) { | ... | @@ -146,7 +146,7 @@ export function deleteAction(url, data = null) { |
146 | } | 146 | } |
147 | 147 | ||
148 | // 批量删除 | 148 | // 批量删除 |
149 | export function deleteBranch(url, data) { | 149 | export function deleteBranch (url, data) { |
150 | return request({ | 150 | return request({ |
151 | url, | 151 | url, |
152 | method: 'delete', | 152 | method: 'delete', | ... | ... |
src/api/personnelManage.js
0 → 100644
1 | |||
2 | import { | ||
3 | api, | ||
4 | getAction, | ||
5 | deleteAction, | ||
6 | putAction | ||
7 | } from './manageApi' | ||
8 | |||
9 | |||
10 | export const updateUserPassword = (data) => { | ||
11 | return putAction(`${api.users}/update-password`, data) | ||
12 | } | ||
13 | |||
14 | // 根据条件获取用户 | ||
15 | export const getUserList = (params) => { | ||
16 | return getAction(api.users, params) | ||
17 | } | ||
18 | |||
19 | |||
20 | |||
21 | // 重置用户密码 | ||
22 | // export const resetPassword = id => { | ||
23 | // return putAction(`${api.users}/${id}/reset-password`) | ||
24 | // } | ||
25 | |||
26 | // 重置用户密码 | ||
27 | export const resetPassword = (ids) => { | ||
28 | return putAction(`${api.users}/reset-passwords?ids=${ids}`) | ||
29 | } | ||
30 | |||
31 | // 人员列表 | ||
32 | export const getUserRoles = (id) => { | ||
33 | return getAction(`${api.userRoles}/${id}/users`) | ||
34 | } | ||
35 | // 更新人员 | ||
36 | export const updateUser = (id, data) => { | ||
37 | return putAction(`${api.userRoles}/${id}/users`, data) | ||
38 | } | ||
39 |
1 | /* | ||
2 | * @Description: 登薄日志 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-02 13:45:53 | ||
5 | */ | ||
6 | /* 引入请求文件 */ | ||
1 | import request from '@/utils/request' | 7 | import request from '@/utils/request' |
8 | /* 引入配置文件 */ | ||
2 | import SERVER from './config' | 9 | import SERVER from './config' |
3 | 10 | const urlHeader = SERVER.SERVERAPI + '/rest/sjsb/RecordLog/' | |
4 | // 登簿日志分页 | 11 | /** |
12 | * @description: 登簿日志分页 | ||
13 | * @author: renchao | ||
14 | */ | ||
5 | export function getRecordLogPage (data) { | 15 | export function getRecordLogPage (data) { |
6 | return request({ | 16 | return request({ |
7 | url: SERVER.SERVERAPI + '/rest/sjsb/RecordLog/getRecordLogPage', | 17 | url: urlHeader + 'getRecordLogPage', |
8 | method: 'post', | 18 | method: 'post', |
9 | data | 19 | data |
10 | }) | 20 | }) |
11 | } | 21 | } |
12 | 22 | ||
13 | 23 | /** | |
24 | * @description: 获取详情明细 | ||
25 | * @param {*} dbBsm | ||
26 | * @author: renchao | ||
27 | */ | ||
28 | export function getDetail (dbBsm) { | ||
29 | return request({ | ||
30 | url: urlHeader + 'getDetail', | ||
31 | method: 'get', | ||
32 | params: { | ||
33 | dbBsm: dbBsm | ||
34 | } | ||
35 | }) | ||
36 | } | ||
37 | /** | ||
38 | * @description: 详情页面编辑 | ||
39 | * @param {*} data | ||
40 | * @author: renchao | ||
41 | */ | ||
42 | export function edit (data) { | ||
43 | return request({ | ||
44 | url: urlHeader + 'edit', | ||
45 | method: 'post', | ||
46 | data | ||
47 | }) | ||
48 | } | ||
49 | /** | ||
50 | * @description: 登薄日志重新生成报文 | ||
51 | * @param {*} dbBsm | ||
52 | * @author: renchao | ||
53 | */ | ||
54 | export function regenerateDbXml (dbBsm) { | ||
55 | return request({ | ||
56 | url: urlHeader + 'regenerateDbXml', | ||
57 | method: 'get', | ||
58 | params: { | ||
59 | dbBsm: dbBsm | ||
60 | } | ||
61 | }) | ||
62 | } | ... | ... |
src/api/statistics.js
0 → 100644
1 | /* | ||
2 | * @Author: yangwei | ||
3 | * @Date: 2023-03-09 09:29:52 | ||
4 | * @LastEditors: yangwei | ||
5 | * @LastEditTime: 2023-03-09 10:31:31 | ||
6 | * @FilePath: \bdcjg-web\src\api\statistics.js | ||
7 | * @Description: | ||
8 | * | ||
9 | * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. | ||
10 | */ | ||
11 | import request from '@/utils/request' | ||
12 | import SERVER from './config' | ||
13 | const url = SERVER.SERVERAPI + '/rest/statistics/Efficient/' | ||
14 | /** | ||
15 | * dataReceiveQuality | ||
16 | * @param startDate | ||
17 | * @param endDate | ||
18 | * @returns {AxiosPromise} | ||
19 | */ | ||
20 | export function dataReceiveQuality (startDate, endDate) { | ||
21 | return request({ | ||
22 | url: url + 'dataReceiveQuality?startDate='+startDate+'&endDate='+endDate, | ||
23 | method: 'post' | ||
24 | }) | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * 空项率统计 | ||
29 | * @returns {AxiosPromise} | ||
30 | * @param startDate | ||
31 | * @param endDate | ||
32 | */ | ||
33 | export function nonNullSta (startDate, endDate) { | ||
34 | return request({ | ||
35 | url: url + 'nonNullSta?startDate='+startDate+'&endDate='+endDate, | ||
36 | method: 'post' | ||
37 | }) | ||
38 | } | ||
39 | |||
40 | /** | ||
41 | * 登簿质量统计 | ||
42 | * @returns {AxiosPromise} | ||
43 | * @param startDate | ||
44 | * @param endDate | ||
45 | */ | ||
46 | export function registerBookQuality (startDate, endDate) { | ||
47 | return request({ | ||
48 | url: url + 'registerBookQuality?startDate='+startDate+'&endDate='+endDate, | ||
49 | method: 'post' | ||
50 | }) | ||
51 | } |
... | @@ -8,10 +8,21 @@ export function getUserInfo () { | ... | @@ -8,10 +8,21 @@ export function getUserInfo () { |
8 | }) | 8 | }) |
9 | } | 9 | } |
10 | 10 | ||
11 | // // 获取菜单信息 | ||
12 | // export function getMenuInfo () { | ||
13 | // return request({ | ||
14 | // url: SERVER.SERVERAPI + '/rest/user/getUserAuthorizationMenus', | ||
15 | // method: 'get', | ||
16 | // }) | ||
17 | // } | ||
18 | |||
11 | // 获取菜单信息 | 19 | // 获取菜单信息 |
12 | export function getMenuInfo () { | 20 | export function getMenuInfo (data) { |
13 | return request({ | 21 | return request({ |
14 | url: SERVER.SERVERAPI + '/rest/user/getUserAuthorizationMenus', | 22 | url: SERVER.SERVERAPI + '/rest/user/getUserAuthorizationMenus', |
15 | method: 'get', | 23 | method: 'get', |
24 | params: { | ||
25 | productCode: data, | ||
26 | }, | ||
16 | }) | 27 | }) |
17 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
28 | } | ... | ... |
... | @@ -4,8 +4,7 @@ | ... | @@ -4,8 +4,7 @@ |
4 | 4 | ||
5 | <script> | 5 | <script> |
6 | import tdTheme from "./theme.json"; // 引入默认主题 | 6 | import tdTheme from "./theme.json"; // 引入默认主题 |
7 | import "../map/hanzhong.js"; | 7 | import { mapGetters } from "vuex"; |
8 | |||
9 | export default { | 8 | export default { |
10 | name: "echart", | 9 | name: "echart", |
11 | props: { | 10 | props: { |
... | @@ -30,14 +29,14 @@ export default { | ... | @@ -30,14 +29,14 @@ export default { |
30 | default: () => ({}), | 29 | default: () => ({}), |
31 | }, | 30 | }, |
32 | }, | 31 | }, |
33 | data() { | 32 | data () { |
34 | return { | 33 | return { |
35 | chart: null, | 34 | chart: null, |
36 | }; | 35 | }; |
37 | }, | 36 | }, |
38 | watch: { | 37 | watch: { |
39 | options: { | 38 | options: { |
40 | handler(options) { | 39 | handler (options) { |
41 | // 设置true清空echart缓存 | 40 | // 设置true清空echart缓存 |
42 | this.chart.setOption(options, true); | 41 | this.chart.setOption(options, true); |
43 | window.addEventListener("resize", () => { | 42 | window.addEventListener("resize", () => { |
... | @@ -46,22 +45,33 @@ export default { | ... | @@ -46,22 +45,33 @@ export default { |
46 | } | 45 | } |
47 | }); | 46 | }); |
48 | }, | 47 | }, |
49 | deep: true, | 48 | deep: true |
49 | }, | ||
50 | }, | ||
51 | computed: { | ||
52 | ...mapGetters(["dicData"]), | ||
53 | logoName () { | ||
54 | return ( | ||
55 | this.dicData["sysCode"] && | ||
56 | this.dicData["sysCode"].filter((item) => item.DCODE == "areaMap") | ||
57 | ); | ||
50 | }, | 58 | }, |
51 | }, | 59 | }, |
52 | mounted() { | 60 | mounted () { |
53 | this.$echarts.registerTheme("tdTheme", tdTheme); // 覆盖默认主题 | 61 | this.$echarts.registerTheme("tdTheme", tdTheme); // 覆盖默认主题 |
54 | this.initChart(); | 62 | this.$nextTick(() => { |
63 | this.initChart(); | ||
64 | }) | ||
55 | }, | 65 | }, |
56 | beforeDestroy() { | 66 | beforeDestroy () { |
57 | this.chart.dispose(); | 67 | // this.chart.dispose(); |
58 | this.chart = null; | 68 | this.chart = null; |
59 | }, | 69 | }, |
60 | methods: { | 70 | methods: { |
61 | initChart() { | 71 | initChart () { |
62 | // 初始化echart | 72 | // 初始化echart |
63 | this.chart = this.$echarts.init(this.$el, "tdTheme"); | 73 | this.chart = this.$echarts.init(this.$el, "tdTheme"); |
64 | function nowSize(val, initWidth = 1920) { | 74 | function nowSize (val, initWidth = 1920) { |
65 | return val * (nowClientWidth / initWidth); | 75 | return val * (nowClientWidth / initWidth); |
66 | } | 76 | } |
67 | this.chart.setOption(this.options, true); | 77 | this.chart.setOption(this.options, true); | ... | ... |
src/common/map/yushu.js
0 → 100644
This diff is collapsed.
Click to expand it.
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="naturalBuilding itemForm"> | 2 | <div class="naturalBuilding itemForm"> |
3 | <el-form :model="naturalForm" :rules="rules" ref="formList" label-width="115px" :key="key"> | 3 | <el-form :model="naturalForm" :rules="rules" ref="formList" label-width="115px" :key="key"> |
4 | <div v-for="(item, index) in naturalForm.naturalList" :key="index" class="naturalBuilding-item"> | 4 | <div v-for="(item, index) in naturalForm.naturalList" :key="index" class="naturalBuilding-item"> |
5 | <p class="naturalBuilding-name">自然幢{{ index + 1 }}</p> | 5 | <p class="naturalBuilding-name obligee-item-name">自然幢{{ index + 1 }}</p> |
6 | <div class="naturalBuilding-list"> | 6 | <div class="naturalBuilding-list"> |
7 | <el-row> | 7 | <el-row> |
8 | <el-col :span="8"> | 8 | <el-col :span="8"> |
... | @@ -330,7 +330,7 @@ export default { | ... | @@ -330,7 +330,7 @@ export default { |
330 | default: "", | 330 | default: "", |
331 | }, | 331 | }, |
332 | }, | 332 | }, |
333 | data() { | 333 | data () { |
334 | return { | 334 | return { |
335 | naturalForm: { | 335 | naturalForm: { |
336 | naturalList: [ | 336 | naturalList: [ |
... | @@ -366,7 +366,7 @@ export default { | ... | @@ -366,7 +366,7 @@ export default { |
366 | }; | 366 | }; |
367 | }, | 367 | }, |
368 | methods: { | 368 | methods: { |
369 | async featchData() { | 369 | async featchData () { |
370 | try { | 370 | try { |
371 | let { result: res } = await kttFwZrz.getKttFwZrzById(this.bsmSjsb); | 371 | let { result: res } = await kttFwZrz.getKttFwZrzById(this.bsmSjsb); |
372 | this.naturalForm.naturalList = res; | 372 | this.naturalForm.naturalList = res; |
... | @@ -375,7 +375,7 @@ export default { | ... | @@ -375,7 +375,7 @@ export default { |
375 | this.$refs.msg.messageShow(); | 375 | this.$refs.msg.messageShow(); |
376 | } | 376 | } |
377 | }, | 377 | }, |
378 | handleUpdateForm() { | 378 | handleUpdateForm () { |
379 | return new Promise(async (resolve) => { | 379 | return new Promise(async (resolve) => { |
380 | try { | 380 | try { |
381 | let res = await kttFwZrz.updateKttFwZrz(this.naturalForm.naturalList); | 381 | let res = await kttFwZrz.updateKttFwZrz(this.naturalForm.naturalList); | ... | ... |
src/components/DownLbTable/LbColumn.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-column.vue | ||
3 | * Remark: element-column | ||
4 | * Project: lb-element-table | ||
5 | * Author: 任超 | ||
6 | * File Created: Tuesday, 19th March 2019 9:58:23 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 10:14:42 am | ||
8 | * Modified By: 任超 | ||
9 | */ | ||
10 | |||
11 | <template> | ||
12 | <el-table-column v-bind="$attrs" v-on="$listeners" :prop="column.prop" :label="column.label" :type="column.type" | ||
13 | :index="column.index" :column-key="column.columnKey" :width="column.width" :min-width="column.minWidth" | ||
14 | :fixed="column.fixed" :scoped-slot="column.renderHeader" :sortable="column.sortable || false" | ||
15 | :sort-method="column.sortMethod" :sort-by="column.sortBy" :sort-orders="column.sortOrders" | ||
16 | :resizable="column.resizable || true" :formatter="column.formatter" | ||
17 | :show-overflow-tooltip="column.showOverflowTooltip || false" :align="column.align || align || 'center'" | ||
18 | :header-align="column.headerAlign || headerAlign || column.align || align || 'center'" | ||
19 | :class-name="column.className" :label-class-name="column.labelClassName" :selectable="column.selectable" | ||
20 | :reserve-selection="column.reserveSelection || false" :filters="column.filters" | ||
21 | :filter-placement="column.filterPlacement" :filter-multiple="column.filterMultiple" | ||
22 | :filter-method="column.filterMethod" :filtered-value="column.filteredValue"> | ||
23 | <template slot="header" slot-scope="scope"> | ||
24 | <lb-render v-if="column.renderHeader" :scope="scope" :render="column.renderHeader"> | ||
25 | </lb-render> | ||
26 | <span v-else>{{ scope.column.label }}</span> | ||
27 | </template> | ||
28 | |||
29 | <template slot-scope="scope"> | ||
30 | <lb-render :scope="scope" :render="column.render"> | ||
31 | </lb-render> | ||
32 | </template> | ||
33 | |||
34 | <template v-if="column.children"> | ||
35 | <lb-column v-for="(col, index) in column.children" :key="index" :column="col"> | ||
36 | </lb-column> | ||
37 | </template> | ||
38 | </el-table-column> | ||
39 | </template> | ||
40 | |||
41 | <script> | ||
42 | import LbRender from './LbRender' | ||
43 | import forced from './forced.js' | ||
44 | export default { | ||
45 | name: 'LbColumn', | ||
46 | props: { | ||
47 | column: Object, | ||
48 | headerAlign: String, | ||
49 | align: String | ||
50 | }, | ||
51 | components: { | ||
52 | LbRender | ||
53 | }, | ||
54 | methods: { | ||
55 | setColumn () { | ||
56 | if (this.column.type) { | ||
57 | this.column.renderHeader = forced[this.column.type].renderHeader | ||
58 | this.column.render = this.column.render || forced[this.column.type].renderCell | ||
59 | } | ||
60 | if (this.column.formatter) { | ||
61 | this.column.render = (h, scope) => { | ||
62 | return <span>{scope.column.formatter(scope.row, scope.column, scope.row, scope.$index)}</span> | ||
63 | } | ||
64 | } | ||
65 | if (!this.column.render) { | ||
66 | this.column.render = (h, scope) => { | ||
67 | return <span>{scope.row[scope.column.property]}</span> | ||
68 | } | ||
69 | } | ||
70 | } | ||
71 | }, | ||
72 | watch: { | ||
73 | column: { | ||
74 | handler () { | ||
75 | this.setColumn() | ||
76 | }, | ||
77 | immediate: true | ||
78 | } | ||
79 | } | ||
80 | } | ||
81 | </script> |
src/components/DownLbTable/LbRender.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-render.vue | ||
3 | * Remark: 自定义render | ||
4 | * Project: lb-element-table | ||
5 | * Author: 任超 | ||
6 | * File Created: Tuesday, 19th March 2019 10:15:30 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 10:15:32 am | ||
8 | * Modified By: 任超 | ||
9 | */ | ||
10 | <script> | ||
11 | export default { | ||
12 | name: 'LbRender', | ||
13 | functional: true, | ||
14 | props: { | ||
15 | scope: Object, | ||
16 | render: Function | ||
17 | }, | ||
18 | render: (h, ctx) => { | ||
19 | return ctx.props.render ? ctx.props.render(h, ctx.props.scope) : '' | ||
20 | } | ||
21 | } | ||
22 | </script> |
src/components/DownLbTable/forced.js
0 → 100644
1 | export default { | ||
2 | selection: { | ||
3 | renderHeader: (h, { store }) => { | ||
4 | return ( | ||
5 | <el-checkbox | ||
6 | disabled={store.states.data && store.states.data.length === 0} | ||
7 | indeterminate={ | ||
8 | store.states.selection.length > 0 && !store.states.isAllSelected | ||
9 | } | ||
10 | nativeOn-click={store.toggleAllSelection} | ||
11 | value={store.states.isAllSelected} | ||
12 | /> | ||
13 | ) | ||
14 | }, | ||
15 | renderCell: (h, { row, column, store, $index }) => { | ||
16 | return ( | ||
17 | <el-checkbox | ||
18 | nativeOn-click={event => event.stopPropagation()} | ||
19 | value={store.isSelected(row)} | ||
20 | disabled={ | ||
21 | column.selectable | ||
22 | ? !column.selectable.call(null, row, $index) | ||
23 | : false | ||
24 | } | ||
25 | on-input={() => { | ||
26 | store.commit('rowSelectedChanged', row) | ||
27 | }} | ||
28 | /> | ||
29 | ) | ||
30 | }, | ||
31 | sortable: false, | ||
32 | resizable: false | ||
33 | }, | ||
34 | index: { | ||
35 | renderHeader: (h, scope) => { | ||
36 | return <span>{scope.column.label || '#'}</span> | ||
37 | }, | ||
38 | renderCell: (h, { $index, column }) => { | ||
39 | let i = $index + 1 | ||
40 | const index = column.index | ||
41 | |||
42 | if (typeof index === 'number') { | ||
43 | i = $index + index | ||
44 | } else if (typeof index === 'function') { | ||
45 | i = index($index) | ||
46 | } | ||
47 | |||
48 | return <div>{i}</div> | ||
49 | }, | ||
50 | sortable: false | ||
51 | }, | ||
52 | expand: { | ||
53 | renderHeader: (h, scope) => { | ||
54 | return <span>{scope.column.label || ''}</span> | ||
55 | }, | ||
56 | renderCell: (h, { row, store }, proxy) => { | ||
57 | const expanded = store.states.expandRows.indexOf(row) > -1 | ||
58 | return ( | ||
59 | <div | ||
60 | class={ | ||
61 | 'el-table__expand-icon ' + | ||
62 | (expanded ? 'el-table__expand-icon--expanded' : '') | ||
63 | } | ||
64 | on-click={e => proxy.handleExpandClick(row, e)} | ||
65 | > | ||
66 | <i class='el-icon el-icon-arrow-right' /> | ||
67 | </div> | ||
68 | ) | ||
69 | }, | ||
70 | sortable: false, | ||
71 | resizable: false, | ||
72 | className: 'el-table__expand-column' | ||
73 | } | ||
74 | } |
src/components/DownLbTable/index.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-table.vue | ||
3 | * Remark: element table | ||
4 | * Project: lb-element-table | ||
5 | * Author: 任超 | ||
6 | * File Created: Tuesday, 19th March 2019 9:55:27 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 9:55:34 am | ||
8 | * Modified By: 任超 | ||
9 | */ | ||
10 | |||
11 | <template> | ||
12 | <div :class="['lb-table', customClass]"> | ||
13 | <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable" :border='border' | ||
14 | :row-class-name="tableRowClassName" :show-header='showHeader' @row-click="singleElection" v-bind="$attrs" | ||
15 | :height="tableHeight" v-on="$listeners" :data="data" style="width: 100%" | ||
16 | :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | ||
17 | <el-table-column width="45" align="center" v-if="isRadio"> | ||
18 | <template slot-scope="scope"> | ||
19 | <el-radio v-model="selected" :label="scope.$index"></el-radio> | ||
20 | </template> | ||
21 | </el-table-column> | ||
22 | |||
23 | <el-table-column :label="downTitle" align="center"> | ||
24 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> | ||
25 | </lb-column> | ||
26 | </el-table-column> | ||
27 | </el-table> | ||
28 | <br> | ||
29 | <el-pagination class="lb-table-pagination" v-if="pagination" v-bind="$attrs" v-on="$listeners" background | ||
30 | layout="total, prev, pager, next" @current-change="paginationCurrentChange" | ||
31 | :style="{ 'margin-top': paginationTop, 'text-align': paginationAlign }"> | ||
32 | </el-pagination> | ||
33 | </div> | ||
34 | </template> | ||
35 | |||
36 | <script> | ||
37 | import LbColumn from './LbColumn' | ||
38 | export default { | ||
39 | props: { | ||
40 | column: Array, | ||
41 | data: Array, | ||
42 | spanMethod: Function, | ||
43 | pagination: { | ||
44 | type: Boolean, | ||
45 | default: true, | ||
46 | }, | ||
47 | downExcel: { | ||
48 | type: Boolean, | ||
49 | default: false, | ||
50 | }, | ||
51 | downTitle: { | ||
52 | type: String, | ||
53 | default: '标题' | ||
54 | }, | ||
55 | isRadio: { | ||
56 | type: Boolean, | ||
57 | default: false, | ||
58 | }, | ||
59 | border: { | ||
60 | type: Boolean, | ||
61 | default: false, | ||
62 | }, | ||
63 | showHeader: { | ||
64 | type: Boolean, | ||
65 | default: true, | ||
66 | }, | ||
67 | paginationTop: { | ||
68 | type: String, | ||
69 | default: '0', | ||
70 | }, | ||
71 | heightNum: { | ||
72 | type: Number, | ||
73 | default: 355, | ||
74 | }, | ||
75 | maxHeight: { | ||
76 | type: Number, | ||
77 | default: 500 | ||
78 | }, | ||
79 | heightNumSetting: { | ||
80 | type: Boolean, | ||
81 | default: false, | ||
82 | }, | ||
83 | customClass: { | ||
84 | type: String, | ||
85 | default: '', | ||
86 | }, | ||
87 | paginationAlign: { | ||
88 | type: String, | ||
89 | default: 'left', | ||
90 | }, | ||
91 | merge: Array, | ||
92 | }, | ||
93 | components: { | ||
94 | LbColumn, | ||
95 | }, | ||
96 | data () { | ||
97 | return { | ||
98 | tableHeight: 'auto', | ||
99 | mergeLine: {}, | ||
100 | mergeIndex: {}, | ||
101 | selected: '' | ||
102 | } | ||
103 | }, | ||
104 | created () { | ||
105 | this.getMergeArr(this.data, this.merge) | ||
106 | this.getHeight() | ||
107 | }, | ||
108 | computed: { | ||
109 | dataLength () { | ||
110 | return [] || this.data.length | ||
111 | }, | ||
112 | }, | ||
113 | methods: { | ||
114 | // 单选 | ||
115 | singleElection (row) { | ||
116 | this.selected = this.data.indexOf(row); | ||
117 | }, | ||
118 | |||
119 | tableRowClassName ({ row, rowIndex }) { | ||
120 | if (rowIndex % 2 === 1) { | ||
121 | return 'interlaced'; | ||
122 | } | ||
123 | }, | ||
124 | getHeight () { | ||
125 | if (!this.heightNumSetting) { | ||
126 | let _this = this | ||
127 | if (this.heightNum) { | ||
128 | _this.$nextTick(() => { | ||
129 | |||
130 | window.addEventListener('resize', () => { | ||
131 | _this.tableHeight = _this.calcHeightx(230) | ||
132 | }); | ||
133 | _this.tableHeight = _this.calcHeightx(230) | ||
134 | }) | ||
135 | } else { | ||
136 | _this.tableHeight = window.innerHeight - _this.heightNum | ||
137 | } | ||
138 | } | ||
139 | }, | ||
140 | calcHeightx (value, wappered = true) { | ||
141 | //项目自定义的公共header部分的高度,可忽略 | ||
142 | let header = document.querySelector(".from-clues-header").offsetHeight; | ||
143 | //value为动态计算table界面高度时,减去的其他空白部分,需自行在调试找到临界值,剩下的就是table表格的高度(包含header+body部分) | ||
144 | value = value == undefined ? 100 : value; | ||
145 | let res = window.innerHeight - parseInt(header) - value; | ||
146 | if (wappered) { | ||
147 | //通过原生方法,获取dom节点的高度------获取element-ui table表格body的元素 | ||
148 | let wapper = window.document.getElementsByClassName('el-table__body-wrapper'); | ||
149 | //通过原生方法,获取dom节点的高度------获取element-ui table表格header的元素 | ||
150 | let header = window.document.getElementsByClassName('el-table__header-wrapper'); | ||
151 | //必须加延时,要不然赋不上去值 | ||
152 | setTimeout(() => { | ||
153 | //通过上边计算得到的table高度的value值,减去table表格的header高度,剩下的通过dom节点直接强行赋给table表格的body | ||
154 | wapper[0].style.height = (value - header[0].clientHeight) | ||
155 | }, 100) | ||
156 | } | ||
157 | return res; | ||
158 | }, | ||
159 | clearSelection () { | ||
160 | this.$refs.elTable.clearSelection() | ||
161 | }, | ||
162 | toggleRowSelection (row, selected) { | ||
163 | this.$refs.elTable.toggleRowSelection(row, selected) | ||
164 | }, | ||
165 | toggleAllSelection () { | ||
166 | this.$refs.elTable.toggleAllSelection() | ||
167 | }, | ||
168 | toggleRowExpansion (row, expanded) { | ||
169 | this.$refs.elTable.toggleRowExpansion(row, expanded) | ||
170 | }, | ||
171 | setCurrentRow (row) { | ||
172 | this.$refs.elTable.setCurrentRow(row) | ||
173 | }, | ||
174 | clearSort () { | ||
175 | this.$refs.elTable.clearSort() | ||
176 | }, | ||
177 | clearFilter (columnKey) { | ||
178 | this.$refs.elTable.clearFilter(columnKey) | ||
179 | }, | ||
180 | doLayout () { | ||
181 | this.$refs.elTable.doLayout() | ||
182 | }, | ||
183 | sort (prop, order) { | ||
184 | this.$refs.elTable.sort(prop, order) | ||
185 | }, | ||
186 | paginationCurrentChange (val) { | ||
187 | this.$emit('p-current-change', val) | ||
188 | }, | ||
189 | getMergeArr (tableData, merge) { | ||
190 | if (!merge) return | ||
191 | this.mergeLine = {} | ||
192 | this.mergeIndex = {} | ||
193 | merge.forEach((item, k) => { | ||
194 | tableData.forEach((data, i) => { | ||
195 | if (i === 0) { | ||
196 | this.mergeIndex[item] = this.mergeIndex[item] || [] | ||
197 | this.mergeIndex[item].push(1) | ||
198 | this.mergeLine[item] = 0 | ||
199 | } else { | ||
200 | if (data[item] === tableData[i - 1][item]) { | ||
201 | this.mergeIndex[item][this.mergeLine[item]] += 1 | ||
202 | this.mergeIndex[item].push(0) | ||
203 | } else { | ||
204 | this.mergeIndex[item].push(1) | ||
205 | this.mergeLine[item] = i | ||
206 | } | ||
207 | } | ||
208 | }) | ||
209 | }) | ||
210 | }, | ||
211 | mergeMethod ({ row, column, rowIndex, columnIndex }) { | ||
212 | const index = this.merge.indexOf(column.property) | ||
213 | if (index > -1) { | ||
214 | const _row = this.mergeIndex[this.merge[index]][rowIndex] | ||
215 | const _col = _row > 0 ? 1 : 0 | ||
216 | return { | ||
217 | rowspan: _row, | ||
218 | colspan: _col, | ||
219 | } | ||
220 | } | ||
221 | }, | ||
222 | }, | ||
223 | watch: { | ||
224 | merge () { | ||
225 | this.getMergeArr(this.data, this.merge) | ||
226 | }, | ||
227 | dataLength () { | ||
228 | this.getMergeArr(this.data, this.merge) | ||
229 | } | ||
230 | }, | ||
231 | } | ||
232 | </script> | ||
233 | <style rel="stylesheet/scss" scoped lang="scss"> | ||
234 | .lb-table { | ||
235 | margin-top: 1px; | ||
236 | |||
237 | .interlaced { | ||
238 | background: #fafcff; | ||
239 | border: 1px solid #ebf2fa; | ||
240 | } | ||
241 | } | ||
242 | |||
243 | /deep/.el-table .cell { | ||
244 | padding-left: 3px; | ||
245 | padding-right: 3px; | ||
246 | } | ||
247 | |||
248 | /deep/.el-radio__label { | ||
249 | display: none; | ||
250 | } | ||
251 | </style> |
src/components/DownLbTable/redeme.md
0 → 100644
1 | <template> | 1 | <template> |
2 | <!--上报统计柱状图 --> | 2 | <!--上报统计柱状图 --> |
3 | <Echart | 3 | <Echart |
4 | :options="options" | 4 | :options="options" |
5 | id="bottomLeftChart" | 5 | id="bottomLeftChart" |
6 | height="100%" | 6 | height="100%" |
7 | width="100%" | 7 | width="100%"></Echart> |
8 | ></Echart> | ||
9 | </template> | 8 | </template> |
10 | 9 | ||
11 | <script> | 10 | <script> |
12 | import Echart from "@/common/echart"; | 11 | import Echart from "@/common/echart"; |
13 | export default { | 12 | export default { |
14 | data() { | 13 | data () { |
15 | return { | 14 | return { |
16 | options: {}, | 15 | options: {}, |
17 | }; | 16 | }; |
18 | }, | ||
19 | components: { | ||
20 | Echart, | ||
21 | }, | ||
22 | props: { | ||
23 | cdata: { | ||
24 | type: Object, | ||
25 | default: () => ({}), | ||
26 | }, | 17 | }, |
27 | }, | 18 | components: { |
28 | watch: { | 19 | Echart, |
29 | cdata: { | 20 | }, |
30 | handler(newData) { | 21 | props: { |
31 | this.options = { | 22 | cdata: { |
32 | tooltip: { | 23 | type: Object, |
33 | trigger: "axis", | 24 | default: () => ({}), |
34 | axisPointer: { | 25 | }, |
35 | type: "shadow", | 26 | }, |
36 | }, | 27 | watch: { |
37 | }, | 28 | cdata: { |
38 | grid: { | 29 | handler (newData) { |
39 | left: "5%", | 30 | this.options = { |
40 | right: "8%", | 31 | tooltip: { |
41 | bottom: "5%", | 32 | trigger: "axis", |
42 | containLabel: true, | 33 | axisPointer: { |
43 | }, | 34 | type: "shadow", |
44 | xAxis: { | ||
45 | type: "value", | ||
46 | splitLine: { show: false }, | ||
47 | axisTick: { show: false }, | ||
48 | axisLine: { | ||
49 | show: true, | ||
50 | lineStyle: { | ||
51 | color: "#01F3F5", | ||
52 | }, | ||
53 | }, | ||
54 | axisLabel: { | ||
55 | show: true, | ||
56 | textStyle: { | ||
57 | color: "#01F3F5", | ||
58 | fontSize: 12, | ||
59 | }, | 35 | }, |
60 | }, | 36 | }, |
61 | }, | 37 | grid: { |
62 | yAxis: { | 38 | left: "5%", |
63 | type: "category", | 39 | right: "8%", |
64 | data: newData.category, | 40 | bottom: "5%", |
65 | axisLine: { | 41 | containLabel: true, |
66 | show: true, | ||
67 | lineStyle: { | ||
68 | color: "#01F3F5", | ||
69 | }, | ||
70 | }, | 42 | }, |
71 | }, | 43 | xAxis: { |
72 | series: [ | 44 | type: "value", |
73 | { | 45 | splitLine: { show: false }, |
74 | name: "成功", | 46 | axisTick: { show: false }, |
75 | type: "bar", | 47 | axisLine: { |
76 | stack: "总量", | ||
77 | barWidth: 18, | ||
78 | label: { | ||
79 | show: true, | 48 | show: true, |
80 | formatter: function (params) { | 49 | lineStyle: { |
81 | if (params.value > 0) { | 50 | color: "#01F3F5", |
82 | return params.value; | 51 | }, |
83 | } else { | ||
84 | return ''; | ||
85 | } | ||
86 | } | ||
87 | }, | 52 | }, |
88 | itemStyle: { | 53 | axisLabel: { |
89 | normal: { | 54 | show: true, |
90 | color: "#5fba7d", | 55 | textStyle: { |
56 | color: "#01F3F5", | ||
57 | fontSize: 12, | ||
91 | }, | 58 | }, |
92 | }, | 59 | }, |
93 | data: newData.barData, | ||
94 | |||
95 | }, | 60 | }, |
96 | { | 61 | yAxis: { |
97 | name: "失败", | 62 | type: "category", |
98 | type: "bar", | 63 | data: newData.category, |
99 | stack: "总量", | 64 | axisLine: { |
100 | label: { | ||
101 | show: true, | 65 | show: true, |
102 | formatter: function (params) { | 66 | lineStyle: { |
103 | if (params.value > 0) { | 67 | color: "#01F3F5", |
104 | return params.value; | 68 | }, |
105 | } else { | 69 | }, |
106 | return ''; | 70 | }, |
107 | } | 71 | series: [ |
108 | } | 72 | { |
109 | 73 | name: "成功", | |
74 | type: "bar", | ||
75 | stack: "总量", | ||
76 | barWidth: 18, | ||
77 | label: { | ||
78 | show: true, | ||
79 | formatter: function (params) { | ||
80 | if (params.value > 0) { | ||
81 | return params.value; | ||
82 | } else { | ||
83 | return ''; | ||
84 | } | ||
85 | } | ||
86 | }, | ||
87 | itemStyle: { | ||
88 | normal: { | ||
89 | color: "#5fba7d", | ||
90 | }, | ||
91 | }, | ||
92 | data: newData.barData, | ||
110 | 93 | ||
111 | }, | 94 | }, |
112 | itemStyle: { | 95 | { |
113 | normal: { | 96 | name: "失败", |
114 | // 这里设置圆角 | 97 | type: "bar", |
115 | color: "#c97168", | 98 | stack: "总量", |
99 | label: { | ||
100 | show: true, | ||
101 | formatter: function (params) { | ||
102 | if (params.value > 0) { | ||
103 | return params.value; | ||
104 | } else { | ||
105 | return ''; | ||
106 | } | ||
107 | } | ||
108 | |||
109 | |||
116 | }, | 110 | }, |
111 | itemStyle: { | ||
112 | normal: { | ||
113 | // 这里设置圆角 | ||
114 | color: "#c97168", | ||
115 | }, | ||
116 | }, | ||
117 | data: newData.lineData, | ||
117 | }, | 118 | }, |
118 | data: newData.lineData, | 119 | ], |
119 | }, | 120 | }; |
120 | ], | 121 | }, |
121 | }; | 122 | immediate: true, |
123 | deep: true, | ||
122 | }, | 124 | }, |
123 | immediate: true, | ||
124 | deep: true, | ||
125 | }, | 125 | }, |
126 | }, | 126 | }; |
127 | }; | ||
128 | </script> | 127 | </script> | ... | ... |
... | @@ -3,47 +3,47 @@ | ... | @@ -3,47 +3,47 @@ |
3 | </template> | 3 | </template> |
4 | 4 | ||
5 | <script> | 5 | <script> |
6 | import Chart from "./Chart"; | 6 | import Chart from "./Chart"; |
7 | import work from "@/api/work"; | 7 | import work from "@/api/work"; |
8 | export default { | 8 | export default { |
9 | data() { | 9 | data () { |
10 | return { | 10 | return { |
11 | cdata: { | 11 | cdata: { |
12 | category: [], | 12 | category: [], |
13 | lineData: [], | 13 | lineData: [], |
14 | barData: [], | 14 | barData: [], |
15 | }, | 15 | }, |
16 | }; | 16 | }; |
17 | }, | 17 | }, |
18 | components: { | 18 | components: { |
19 | Chart, | 19 | Chart, |
20 | }, | 20 | }, |
21 | mounted() { | 21 | mounted () { |
22 | window.addEventListener("resize", () => { | 22 | window.addEventListener("resize", () => { |
23 | this.submitViews(); | ||
24 | }); | ||
23 | this.submitViews(); | 25 | this.submitViews(); |
24 | }); | ||
25 | this.submitViews(); | ||
26 | }, | ||
27 | methods: { | ||
28 | async submitViews() { | ||
29 | try { | ||
30 | let { result: res } = await work.submitViews("A20"); | ||
31 | this.cdata.category = []; | ||
32 | this.cdata.barData = []; | ||
33 | this.cdata.lineData = []; | ||
34 | res.map((item) => { | ||
35 | return ( | ||
36 | this.cdata.category.push(item.areaName), | ||
37 | this.cdata.barData.push(item.successCount), | ||
38 | this.cdata.lineData.push(item.failureCount) | ||
39 | ); | ||
40 | }); | ||
41 | } catch (error) { | ||
42 | // this.$refs.msg.messageShow(); | ||
43 | } | ||
44 | }, | 26 | }, |
45 | }, | 27 | methods: { |
46 | }; | 28 | async submitViews () { |
29 | try { | ||
30 | let { result: res } = await work.submitViews("A20"); | ||
31 | this.cdata.category = []; | ||
32 | this.cdata.barData = []; | ||
33 | this.cdata.lineData = []; | ||
34 | res.map((item) => { | ||
35 | return ( | ||
36 | this.cdata.category.push(item.areaName), | ||
37 | this.cdata.barData.push(item.successCount), | ||
38 | this.cdata.lineData.push(item.failureCount) | ||
39 | ); | ||
40 | }); | ||
41 | } catch (error) { | ||
42 | // this.$refs.msg.messageShow(); | ||
43 | } | ||
44 | }, | ||
45 | }, | ||
46 | }; | ||
47 | </script> | 47 | </script> |
48 | 48 | ||
49 | <style lang="scss" scoped></style> | 49 | <style lang="scss" scoped></style> | ... | ... |
1 | <template> | 1 | <template> |
2 | <!--登记类型总量柱状图 --> | 2 | <!--登记类型总量柱状图 --> |
3 | <Echart :options="options" id="bottomLeftChart" height="100%" width="100%" class="" ></Echart> | 3 | <Echart :options="options" id="bottomLeftChart" height="100%" width="100%" class=""></Echart> |
4 | </template> | 4 | </template> |
5 | 5 | ||
6 | <script> | 6 | <script> |
7 | import Echart from "@/common/echart"; | 7 | import Echart from "@/common/echart"; |
8 | export default { | 8 | export default { |
9 | data () { | 9 | data () { |
10 | return { | 10 | return { |
11 | options: {}, | 11 | options: {}, |
12 | }; | 12 | }; |
13 | }, | ||
14 | components: { | ||
15 | Echart, | ||
16 | }, | ||
17 | props: { | ||
18 | cdata: { | ||
19 | type: Object, | ||
20 | default: () => ({}), | ||
21 | }, | 13 | }, |
22 | }, | 14 | components: { |
23 | watch: { | 15 | Echart, |
24 | cdata: { | 16 | }, |
25 | handler (newData) { | 17 | props: { |
26 | this.options = { | 18 | cdata: { |
27 | grid: { | 19 | type: Object, |
28 | // 让图表占满容器 | 20 | default: () => ({}), |
29 | top: "20%", | 21 | }, |
30 | left: "10%", | 22 | }, |
31 | right: "5%", | 23 | watch: { |
32 | bottom: "16%", | 24 | cdata: { |
33 | }, | 25 | handler (newData) { |
34 | xAxis: { | 26 | this.options = { |
35 | data: newData.category, | 27 | grid: { |
36 | axisLabel: { | 28 | // 让图表占满容器 |
37 | show: true, | 29 | top: "20%", |
38 | color: "#ffff", | 30 | left: "12%", |
31 | right: "5%", | ||
32 | bottom: "16%", | ||
33 | }, | ||
34 | xAxis: { | ||
35 | data: newData.category, | ||
36 | axisLabel: { | ||
37 | show: true, | ||
38 | color: "#ffff", | ||
39 | textStyle: { | 39 | textStyle: { |
40 | fontWeight: "normal", | 40 | fontWeight: "normal", |
41 | fontSize: "8", | 41 | fontSize: "8", |
42 | }, | 42 | }, |
43 | }, | ||
44 | axisTick: { | ||
45 | show: false, | ||
46 | }, | ||
47 | axisLine: { | ||
48 | show: true, | ||
49 | lineStyle: { | ||
50 | color: "rgba(95, 180, 237, 0.32)", | ||
51 | }, | 43 | }, |
52 | } | 44 | axisTick: { |
53 | }, | 45 | show: false, |
54 | yAxis: { | ||
55 | splitLine: { | ||
56 | show: false, | ||
57 | }, | ||
58 | axisLine: { | ||
59 | show: true, | ||
60 | lineStyle: { | ||
61 | color: "rgba(95, 180, 237, 0.32)", | ||
62 | }, | 46 | }, |
47 | axisLine: { | ||
48 | show: true, | ||
49 | lineStyle: { | ||
50 | color: "rgba(95, 180, 237, 0.32)", | ||
51 | }, | ||
52 | } | ||
63 | }, | 53 | }, |
64 | axisTick: { | 54 | yAxis: { |
65 | show: false, | 55 | splitLine: { |
66 | }, | 56 | show: false, |
67 | axisLabel: { | ||
68 | color: "#ffff", | ||
69 | }, | ||
70 | }, | ||
71 | series: [ | ||
72 | { | ||
73 | // 顶部圆片 | ||
74 | type: "pictorialBar", | ||
75 | animation: false, | ||
76 | itemStyle: { | ||
77 | color: "rgba(115, 240, 252, 1)", | ||
78 | }, | 57 | }, |
79 | symbolRepeat: false, | 58 | axisLine: { |
80 | symbolSize: [15, 8], | 59 | show: true, |
81 | symbolMargin: 1, | 60 | lineStyle: { |
82 | z: 10, | 61 | color: "rgba(95, 180, 237, 0.32)", |
83 | data: newData.lineData, | 62 | }, |
84 | symbolPosition: "end", | 63 | }, |
85 | symbolOffset: [0, -4], | 64 | axisTick: { |
86 | }, | 65 | show: false, |
87 | { | 66 | }, |
88 | // 底部圆片 | 67 | axisLabel: { |
89 | type: "pictorialBar", | 68 | color: "#ffff", |
90 | animation: false, | ||
91 | |||
92 | itemStyle: { | ||
93 | color: "rgba(50, 96, 225, 0.8)", | ||
94 | }, | 69 | }, |
95 | symbolRepeat: false, | ||
96 | symbolSize: [15, 8], | ||
97 | symbolMargin: 1, | ||
98 | z: 10, | ||
99 | data: newData.lineData, | ||
100 | symbolPosition: "start", | ||
101 | symbolOffset: [0, 3], | ||
102 | }, | 70 | }, |
103 | { | 71 | series: [ |
104 | barWidth: 15, | 72 | { |
105 | animation: false, | 73 | // 顶部圆片 |
74 | type: "pictorialBar", | ||
75 | animation: false, | ||
76 | itemStyle: { | ||
77 | color: "rgba(115, 240, 252, 1)", | ||
78 | }, | ||
79 | symbolRepeat: false, | ||
80 | symbolSize: [15, 8], | ||
81 | symbolMargin: 1, | ||
82 | z: 10, | ||
83 | data: newData.lineData, | ||
84 | symbolPosition: "end", | ||
85 | symbolOffset: [0, -4], | ||
86 | }, | ||
87 | { | ||
88 | // 底部圆片 | ||
89 | type: "pictorialBar", | ||
90 | animation: false, | ||
106 | 91 | ||
107 | type: "bar", | 92 | itemStyle: { |
108 | label: { | 93 | color: "rgba(50, 96, 225, 0.8)", |
109 | show: true, | ||
110 | position: "top", | ||
111 | textStyle: { | ||
112 | color: "#ffff", | ||
113 | }, | 94 | }, |
95 | symbolRepeat: false, | ||
96 | symbolSize: [15, 8], | ||
97 | symbolMargin: 1, | ||
98 | z: 10, | ||
99 | data: newData.lineData, | ||
100 | symbolPosition: "start", | ||
101 | symbolOffset: [0, 3], | ||
114 | }, | 102 | }, |
115 | itemStyle: { | 103 | { |
116 | color: this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ | 104 | barWidth: 15, |
117 | { offset: 1, color: "rgba(82, 180, 249, 0.35)" }, | 105 | animation: false, |
118 | { offset: 0, color: "rgba(82, 180, 249, 1)" }, | 106 | |
119 | ]), | 107 | type: "bar", |
108 | label: { | ||
109 | show: true, | ||
110 | position: "top", | ||
111 | textStyle: { | ||
112 | color: "#ffff", | ||
113 | }, | ||
114 | }, | ||
115 | itemStyle: { | ||
116 | color: this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ | ||
117 | { offset: 1, color: "rgba(82, 180, 249, 0.35)" }, | ||
118 | { offset: 0, color: "rgba(82, 180, 249, 1)" }, | ||
119 | ]), | ||
120 | }, | ||
121 | data: newData.lineData, | ||
120 | }, | 122 | }, |
121 | data: newData.lineData, | 123 | ], |
122 | }, | 124 | } |
123 | ], | 125 | }, |
124 | } | 126 | immediate: true, |
127 | deep: true, | ||
125 | }, | 128 | }, |
126 | immediate: true, | ||
127 | deep: true, | ||
128 | }, | 129 | }, |
129 | }, | 130 | }; |
130 | }; | ||
131 | </script> | 131 | </script> | ... | ... |
This diff is collapsed.
Click to expand it.
... | @@ -4,75 +4,77 @@ | ... | @@ -4,75 +4,77 @@ |
4 | id="centreLeft1Chart" | 4 | id="centreLeft1Chart" |
5 | :key="key" | 5 | :key="key" |
6 | height="1.0417rem" | 6 | height="1.0417rem" |
7 | width="80%" | 7 | width="80%"></Echart> |
8 | ></Echart> | ||
9 | </template> | 8 | </template> |
10 | <script> | 9 | <script> |
11 | import Echart from "@/common/echart"; | 10 | import Echart from "@/common/echart"; |
12 | export default { | 11 | export default { |
13 | components: { | 12 | components: { |
14 | Echart, | 13 | Echart, |
15 | }, | ||
16 | data() { | ||
17 | return { | ||
18 | key: 0, | ||
19 | }; | ||
20 | }, | ||
21 | props: { | ||
22 | cdata: { | ||
23 | type: Object, | ||
24 | default: () => ({}), | ||
25 | }, | 14 | }, |
26 | }, | 15 | data () { |
27 | watch: { | 16 | return { |
28 | cdata: { | 17 | key: 0, |
29 | handler(newData) { | 18 | }; |
19 | }, | ||
20 | props: { | ||
21 | cdata: { | ||
22 | type: Object, | ||
23 | default: () => ({}), | ||
24 | }, | ||
25 | }, | ||
26 | watch: { | ||
27 | cdata: { | ||
28 | handler (newData) { | ||
30 | 29 | ||
31 | this.options = { | 30 | this.options = { |
32 | color: [ | 31 | color: [ |
33 | "#37a2da", | 32 | "#37a2da", |
34 | "#32c5e9", | 33 | "#32c5e9", |
35 | "#9fe6b8", | 34 | "#9fe6b8", |
36 | "#ffdb5c", | 35 | "#ffdb5c", |
37 | "#ff9f7f", | 36 | "#ff9f7f", |
38 | "#8378ea", | 37 | "#8378ea", |
39 | "#fb7293", | 38 | "#fb7293", |
40 | "#e7bcf3", | 39 | "#e7bcf3", |
41 | 40 | ||
42 | ], | 41 | ], |
43 | series: [ | 42 | series: [ |
44 | { | 43 | { |
45 | name: "Access From", | 44 | name: "Access From", |
46 | type: "pie", | 45 | type: "pie", |
47 | radius: ["54%", "70%"], | 46 | radius: ["54%", "70%"], |
48 | avoidLabelOverlap: true, | 47 | avoidLabelOverlap: true, |
49 | label: { | 48 | label: { |
50 | formatter: (params) => { | 49 | formatter: (params) => { |
51 | // console.log(params) | 50 | // console.log(params) |
52 | return `${params.name}(${params.value}`; | 51 | return `${params.name}\n(${params.value})`; |
52 | }, | ||
53 | position: "outer", | ||
54 | alignTo: "edge", | ||
55 | margin: 5 | ||
53 | }, | 56 | }, |
54 | }, | 57 | labelLine: { |
55 | labelLine: { | 58 | lineStyle: { |
56 | lineStyle: { | 59 | width: 3, |
57 | width: 3, | 60 | }, |
58 | }, | 61 | }, |
59 | }, | 62 | data: newData.seriesData, |
60 | data: newData.seriesData, | 63 | } |
61 | } | 64 | ], |
62 | ], | 65 | }; |
63 | }; | 66 | this.key++; |
64 | this.key++; | 67 | }, |
68 | immediate: true, | ||
69 | deep: true, | ||
65 | }, | 70 | }, |
66 | immediate: true, | ||
67 | deep: true, | ||
68 | }, | 71 | }, |
69 | }, | 72 | }; |
70 | }; | ||
71 | </script> | 73 | </script> |
72 | 74 | ||
73 | <style lang="scss" scoped> | 75 | <style lang="scss" scoped> |
74 | #centreLeft1Chart { | 76 | #centreLeft1Chart { |
75 | margin-bottom: 0.0521rem; | 77 | margin-bottom: 0.0521rem; |
76 | margin-left: .3125rem; | 78 | margin-left: 0.3125rem; |
77 | } | 79 | } |
78 | </style> | 80 | </style> | ... | ... |
1 | <!-- | 1 | <!-- |
2 | 功能:结果 | 2 | * @Description: |
3 | 作者:calliope | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-13 11:09:01 | ||
4 | --> | 5 | --> |
5 | <template> | 6 | <template> |
6 | <div class='result'> | 7 | <div class='result'> |
7 | <p>响应xml</p> | 8 | <div class="result-con" style="margin-bottom: 15px;"> |
8 | <el-input type="textarea" disabled :rows="6" class="resulttext" placeholder="响应xml" v-model="REPMSGXML"> | 9 | <p>响应xml</p> |
9 | </el-input> | 10 | <el-input type="textarea" disabled :rows="6" class="resulttext" placeholder="响应xml" v-model="REPMSGXML"> |
10 | <p>错误信息</p> | 11 | </el-input> |
11 | <el-input type="textarea" disabled :rows="6" class="resulttext" placeholder="错误信息" v-model="ERRORINFO"> | 12 | </div> |
12 | </el-input> | 13 | <div class="result-con" style="margin-top: 15px;"> |
14 | <p>错误信息</p> | ||
15 | <el-input type="textarea" disabled :rows="6" class="resulttext" placeholder="错误信息" v-model="ERRORINFO"> | ||
16 | </el-input> | ||
17 | </div> | ||
13 | </div> | 18 | </div> |
14 | </template> | 19 | </template> |
15 | <script> | 20 | <script> |
... | @@ -40,21 +45,40 @@ export default { | ... | @@ -40,21 +45,40 @@ export default { |
40 | <style scoped lang='scss'> | 45 | <style scoped lang='scss'> |
41 | @import '~@/styles/public.scss'; | 46 | @import '~@/styles/public.scss'; |
42 | 47 | ||
48 | |||
43 | .result { | 49 | .result { |
44 | padding: 15px; | 50 | padding: 15px; |
45 | 51 | height: 100%; | |
46 | p { | ||
47 | color: #ffffff; | ||
48 | line-height: 26px; | ||
49 | font-size: 18px; | ||
50 | } | ||
51 | 52 | ||
52 | /deep/.el-textarea__inner { | 53 | /deep/.el-textarea__inner { |
53 | min-height: 33vh !important; | 54 | height: 30vh !important; |
54 | background-color: #08346F !important; | ||
55 | color: #ffffff; | 55 | color: #ffffff; |
56 | border: none !important; | 56 | border: none !important; |
57 | color: #ffffff; | ||
57 | } | 58 | } |
58 | 59 | ||
60 | &-con { | ||
61 | background: #04275B; | ||
62 | border-radius: 2px; | ||
63 | padding: 10px; | ||
64 | box-sizing: border-box; | ||
65 | |||
66 | p { | ||
67 | color: #2997E8; | ||
68 | font-size: 14px; | ||
69 | position: relative; | ||
70 | padding-left: 10px; | ||
71 | } | ||
72 | |||
73 | p::before { | ||
74 | position: absolute; | ||
75 | content: ''; | ||
76 | width: 3px; | ||
77 | height: 10px; | ||
78 | background-color: #2997E8; | ||
79 | left: 0; | ||
80 | top: 3px; | ||
81 | } | ||
82 | } | ||
59 | } | 83 | } |
60 | </style> | 84 | </style> | ... | ... |
This diff is collapsed.
Click to expand it.
... | @@ -10,26 +10,15 @@ export default { | ... | @@ -10,26 +10,15 @@ export default { |
10 | type: String, | 10 | type: String, |
11 | default: '' | 11 | default: '' |
12 | } | 12 | } |
13 | }, | ||
14 | data () { | ||
15 | return { | ||
16 | myValue: this.value, | ||
17 | } | ||
18 | }, | ||
19 | methods: { | ||
20 | onJsonChange (value) { | ||
21 | }, | ||
22 | onJsonSave (value) { | ||
23 | } | ||
24 | } | 13 | } |
25 | } | 14 | } |
26 | 15 | ||
27 | </script> | 16 | </script> |
28 | 17 | ||
29 | <style scoped lang="scss"> | 18 | <style scoped lang="scss"> |
30 | /* jsoneditor右上角默认有一个链接,加css去掉了 */ | ||
31 | /deep/.el-textarea__inner { | 19 | /deep/.el-textarea__inner { |
32 | min-height: 73vh !important; | 20 | height: 67vh !important; |
21 | border: none !important; | ||
33 | background-color: #08346F !important; | 22 | background-color: #08346F !important; |
34 | color: #ffffff; | 23 | color: #ffffff; |
35 | border: none !important; | 24 | border: none !important; | ... | ... |
... | @@ -2,6 +2,7 @@ | ... | @@ -2,6 +2,7 @@ |
2 | <div> | 2 | <div> |
3 | <i class="el-icon-s-management icon" :title="title" @click="openDialog" /> | 3 | <i class="el-icon-s-management icon" :title="title" @click="openDialog" /> |
4 | <el-dialog | 4 | <el-dialog |
5 | class="configuration" | ||
5 | :key="key" | 6 | :key="key" |
6 | :title="title" | 7 | :title="title" |
7 | :inner-dialog="true" | 8 | :inner-dialog="true" |
... | @@ -9,8 +10,7 @@ | ... | @@ -9,8 +10,7 @@ |
9 | width="600px" | 10 | width="600px" |
10 | :close-on-click-modal="false" | 11 | :close-on-click-modal="false" |
11 | append-to-body | 12 | append-to-body |
12 | @cancel="cancel" | 13 | @cancel="cancel"> |
13 | > | ||
14 | <vue-json-editor | 14 | <vue-json-editor |
15 | id="minejson" | 15 | id="minejson" |
16 | v-model="resultInfo" | 16 | v-model="resultInfo" |
... | @@ -18,15 +18,13 @@ | ... | @@ -18,15 +18,13 @@ |
18 | lang="zh" | 18 | lang="zh" |
19 | @json-change="onJsonChange" | 19 | @json-change="onJsonChange" |
20 | @json-save="onJsonSave" | 20 | @json-save="onJsonSave" |
21 | @has-error="onError" | 21 | @has-error="onError" /> |
22 | /> | ||
23 | <el-tooltip | 22 | <el-tooltip |
24 | content="全屏缩放" | 23 | content="全屏缩放" |
25 | effect="dark" | 24 | effect="dark" |
26 | placement="bottom" | 25 | placement="bottom" |
27 | fullscreen | 26 | fullscreen |
28 | class="fullScreen" | 27 | class="fullScreen"> |
29 | > | ||
30 | <i class="el-icon-full-screen" @click="enLarge" /> | 28 | <i class="el-icon-full-screen" @click="enLarge" /> |
31 | </el-tooltip> | 29 | </el-tooltip> |
32 | <template slot="footer"> | 30 | <template slot="footer"> |
... | @@ -34,142 +32,156 @@ | ... | @@ -34,142 +32,156 @@ |
34 | <el-button | 32 | <el-button |
35 | type="primary" | 33 | type="primary" |
36 | class="confirmBtn" | 34 | class="confirmBtn" |
37 | @click="onJsonSave" | 35 | @click="onJsonSave">保存</el-button> |
38 | >保存</el-button> | ||
39 | <el-button | 36 | <el-button |
40 | type="primary" | 37 | type="primary" |
41 | class="cancelBtn" | 38 | class="cancelBtn" |
42 | @click="cancel" | 39 | @click="cancel">关闭</el-button> |
43 | >关闭</el-button> | ||
44 | </div> | 40 | </div> |
45 | </template> | 41 | </template> |
46 | </el-dialog> | 42 | </el-dialog> |
47 | </div> | 43 | </div> |
48 | </template> | 44 | </template> |
49 | <script> | 45 | <script> |
50 | import vueJsonEditor from 'vue-json-editor' | 46 | import vueJsonEditor from 'vue-json-editor' |
51 | export default { | 47 | export default { |
52 | components: { | 48 | components: { |
53 | vueJsonEditor | 49 | vueJsonEditor |
54 | }, | ||
55 | props: { | ||
56 | title: { | ||
57 | type: String, | ||
58 | default: '配置参数' | ||
59 | }, | 50 | }, |
60 | resultInfos: { | 51 | props: { |
61 | type: String, | 52 | title: { |
62 | default: '' | 53 | type: String, |
63 | } | 54 | default: '配置参数' |
64 | }, | ||
65 | data() { | ||
66 | return { | ||
67 | activeNames: [], | ||
68 | resultInfo: {}, | ||
69 | tmpResultInfo: {}, | ||
70 | dialogVisible: false, | ||
71 | hasJsonFlag: true, | ||
72 | key: 0, | ||
73 | isEnlarge: false | ||
74 | } | ||
75 | }, | ||
76 | watch: { | ||
77 | resultInfos: { | ||
78 | handler: function(val) { | ||
79 | ++this.key | ||
80 | this.resultInfo = | ||
81 | this.resultInfos === '' ? {} : JSON.parse(this.resultInfos) | ||
82 | this.tmpResultInfo = this.resultInfo | ||
83 | }, | 55 | }, |
84 | deep: true, | 56 | resultInfos: { |
85 | immediate: true | 57 | type: String, |
86 | } | 58 | default: '' |
87 | }, | ||
88 | |||
89 | mounted() { | ||
90 | this.resultInfo = | ||
91 | this.resultInfos === '' ? {} : JSON.parse(this.resultInfos) | ||
92 | }, | ||
93 | |||
94 | methods: { | ||
95 | onJsonChange(value) { | ||
96 | // 只有在格式正确的时候进入此事件 | ||
97 | this.hasJsonFlag = true | ||
98 | }, | ||
99 | onJsonSave() { | ||
100 | const value = this.resultInfo | ||
101 | console.log(this.resultInfo, 'resultInfo') | ||
102 | if (this.hasJsonFlag === false) { | ||
103 | this.$message.error({ message: 'json格式验证失败', showClose: true }) | ||
104 | // alert("json验证失败") | ||
105 | return false | ||
106 | } else { | ||
107 | this.dialogVisible = false | ||
108 | this.$emit('getJsonString', JSON.stringify(value)) | ||
109 | return true | ||
110 | } | 59 | } |
111 | }, | 60 | }, |
112 | onError(value) { | 61 | data () { |
113 | this.hasJsonFlag = false | 62 | return { |
63 | activeNames: [], | ||
64 | resultInfo: {}, | ||
65 | tmpResultInfo: {}, | ||
66 | dialogVisible: false, | ||
67 | hasJsonFlag: true, | ||
68 | key: 0, | ||
69 | isEnlarge: false | ||
70 | } | ||
114 | }, | 71 | }, |
115 | openDialog() { | 72 | watch: { |
116 | this.dialogVisible = true | 73 | resultInfos: { |
74 | handler: function (val) { | ||
75 | ++this.key | ||
76 | this.resultInfo = | ||
77 | this.resultInfos === '' ? {} : JSON.parse(this.resultInfos) | ||
78 | this.tmpResultInfo = this.resultInfo | ||
79 | }, | ||
80 | deep: true, | ||
81 | immediate: true | ||
82 | } | ||
117 | }, | 83 | }, |
118 | cancel() { | 84 | |
119 | console.log(this.tmpResultInfo, 'tmpResultInfo') | 85 | mounted () { |
120 | this.resultInfo = this.tmpResultInfo | 86 | this.resultInfo = |
121 | this.dialogVisible = false | 87 | this.resultInfos === '' ? {} : JSON.parse(this.resultInfos) |
122 | }, | 88 | }, |
123 | // 放大 | 89 | |
124 | enLarge() { | 90 | methods: { |
125 | const fullarea = document.getElementById('minejson') | 91 | onJsonChange (value) { |
126 | if (fullarea.requestFullscreen) { | 92 | // 只有在格式正确的时候进入此事件 |
127 | fullarea.requestFullscreen() | 93 | this.hasJsonFlag = true |
128 | } else if (fullarea.webkitRequestFullScreen) { | 94 | }, |
129 | fullarea.webkitRequestFullScreen() // webkit内核(chrome、safari、Opera等) | 95 | onJsonSave () { |
130 | } else if (fullarea.mozRequestFullScreen) { | 96 | const value = this.resultInfo |
131 | fullarea.mozRequestFullScreen() // moz内核(firefox) | 97 | console.log(this.resultInfo, 'resultInfo') |
132 | } else if (fullarea.msRequestFullscreen) { | 98 | if (this.hasJsonFlag === false) { |
133 | fullarea.msRequestFullscreen() // IE11、edge | 99 | this.$message.error({ message: 'json格式验证失败', showClose: true }) |
100 | // alert("json验证失败") | ||
101 | return false | ||
102 | } else { | ||
103 | this.dialogVisible = false | ||
104 | this.$emit('getJsonString', JSON.stringify(value)) | ||
105 | return true | ||
106 | } | ||
107 | }, | ||
108 | onError (value) { | ||
109 | this.hasJsonFlag = false | ||
110 | }, | ||
111 | openDialog () { | ||
112 | this.dialogVisible = true | ||
113 | }, | ||
114 | cancel () { | ||
115 | console.log(this.tmpResultInfo, 'tmpResultInfo') | ||
116 | this.resultInfo = this.tmpResultInfo | ||
117 | this.dialogVisible = false | ||
118 | }, | ||
119 | // 放大 | ||
120 | enLarge () { | ||
121 | const fullarea = document.getElementById('minejson') | ||
122 | if (fullarea.requestFullscreen) { | ||
123 | fullarea.requestFullscreen() | ||
124 | } else if (fullarea.webkitRequestFullScreen) { | ||
125 | fullarea.webkitRequestFullScreen() // webkit内核(chrome、safari、Opera等) | ||
126 | } else if (fullarea.mozRequestFullScreen) { | ||
127 | fullarea.mozRequestFullScreen() // moz内核(firefox) | ||
128 | } else if (fullarea.msRequestFullscreen) { | ||
129 | fullarea.msRequestFullscreen() // IE11、edge | ||
130 | } | ||
131 | this.isEnlarge = true | ||
134 | } | 132 | } |
135 | this.isEnlarge = true | ||
136 | } | 133 | } |
137 | } | 134 | } |
138 | } | ||
139 | </script> | 135 | </script> |
140 | 136 | ||
141 | <style scoped lang="scss"> | 137 | <style scoped lang="scss"> |
142 | /* jsoneditor右上角默认有一个链接,加css去掉了 */ | 138 | /* jsoneditor右上角默认有一个链接,加css去掉了 */ |
143 | .icon { | 139 | .icon { |
144 | color: #349af3; | 140 | color: #349af3; |
145 | } | 141 | } |
146 | /deep/ .jsoneditor-vue { | 142 | /deep/ .jsoneditor-vue { |
147 | height: 100%; | 143 | height: 100%; |
148 | } | 144 | } |
149 | .fullScreen { | 145 | .fullScreen { |
150 | position: absolute; | 146 | position: absolute; |
151 | right: 5%; | 147 | right: 5%; |
152 | top: 22%; | 148 | top: 20%; |
153 | cursor: pointer; | 149 | cursor: pointer; |
154 | color: #fff; | 150 | color: #fff; |
155 | } | 151 | } |
156 | /deep/ .jsoneditor-modes { | 152 | /deep/ .jsoneditor-modes { |
157 | display: none !important; | 153 | display: none !important; |
158 | } | 154 | } |
159 | .jsoneditor-poweredBy { | 155 | /deep/.jsoneditor-poweredBy { |
160 | display: none !important; | 156 | display: none !important; |
161 | } | 157 | } |
162 | .jsoneditor-menu { | 158 | .jsoneditor-menu { |
163 | background-color: #9c9e9f !important; | 159 | background-color: #9c9e9f !important; |
164 | border-bottom: 1px solid #9c9e9f !important; | 160 | border-bottom: 1px solid #9c9e9f !important; |
165 | } | 161 | } |
166 | .jsoneditor { | 162 | .jsoneditor { |
167 | border: 1px solid #9c9e9f !important; | 163 | border: 1px solid #9c9e9f !important; |
168 | } | 164 | } |
169 | .el-collapse { | 165 | .el-collapse { |
170 | border: 0; | 166 | border: 0; |
171 | } | 167 | } |
172 | .el-collapse-item__header { | 168 | .el-collapse-item__header { |
173 | height: 44px; | 169 | height: 44px; |
174 | } | 170 | } |
171 | .configuration { | ||
172 | color: white; | ||
173 | margin-top: 6vh; | ||
174 | /deep/.el-dialog { | ||
175 | background-color: #031a46 !important; | ||
176 | border: 1px solid #5f82c7; | ||
177 | .el-dialog__header { | ||
178 | .el-dialog__title { | ||
179 | color: white !important; | ||
180 | } | ||
181 | .el-dialog__headerbtn { | ||
182 | top: 20px; | ||
183 | } | ||
184 | } | ||
185 | } | ||
186 | } | ||
175 | </style> | 187 | </style> | ... | ... |
... | @@ -10,9 +10,9 @@ | ... | @@ -10,9 +10,9 @@ |
10 | 10 | ||
11 | <template> | 11 | <template> |
12 | <div :class="['lb-table', customClass]"> | 12 | <div :class="['lb-table', customClass]"> |
13 | <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable" | 13 | <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable" :border='border' |
14 | :border='border' :row-class-name="tableRowClassName" :show-header='showHeader' @row-click="singleElection" | 14 | :row-class-name="tableRowClassName" :show-header='showHeader' @row-click="singleElection" v-bind="$attrs" |
15 | v-bind="$attrs" :height="tableHeight" v-on="$listeners" :data="data" style="width: 100%" | 15 | :height="tableHeight" v-on="$listeners" :data="data" style="width: 100%" |
16 | :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | 16 | :span-method="this.merge ? this.mergeMethod : this.spanMethod"> |
17 | <el-table-column width="45" align="center" v-if="isRadio"> | 17 | <el-table-column width="45" align="center" v-if="isRadio"> |
18 | <template slot-scope="scope"> | 18 | <template slot-scope="scope"> |
... | @@ -24,9 +24,10 @@ | ... | @@ -24,9 +24,10 @@ |
24 | </lb-column> | 24 | </lb-column> |
25 | </el-table> | 25 | </el-table> |
26 | 26 | ||
27 | <el-table v-else ref="elTable" class="table-fixed" :row-style="{ height: '50px' }" :border='border' | 27 | <el-table v-else ref="elTable" id="heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" |
28 | :row-class-name="tableRowClassName" :show-header='showHeader' v-bind="$attrs" :max-height="maxHeight" | 28 | :border='border' :row-class-name="tableRowClassName" :show-header='showHeader' v-bind="$attrs" |
29 | v-on="$listeners" :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | 29 | :max-height="maxHeight" :height="tableHeight" v-on="$listeners" :data="data" style="width: 100%" |
30 | :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | ||
30 | 31 | ||
31 | <el-table-column width="45" align="center" v-if="isRadio"> | 32 | <el-table-column width="45" align="center" v-if="isRadio"> |
32 | <template slot-scope="scope"> | 33 | <template slot-scope="scope"> |
... | @@ -80,6 +81,10 @@ export default { | ... | @@ -80,6 +81,10 @@ export default { |
80 | type: Number, | 81 | type: Number, |
81 | default: 500 | 82 | default: 500 |
82 | }, | 83 | }, |
84 | minHeight: { | ||
85 | type: Number, | ||
86 | default: undefined | ||
87 | }, | ||
83 | heightNumSetting: { | 88 | heightNumSetting: { |
84 | type: Boolean, | 89 | type: Boolean, |
85 | default: false, | 90 | default: false, |
... | @@ -139,6 +144,11 @@ export default { | ... | @@ -139,6 +144,11 @@ export default { |
139 | } else { | 144 | } else { |
140 | _this.tableHeight = window.innerHeight - _this.heightNum | 145 | _this.tableHeight = window.innerHeight - _this.heightNum |
141 | } | 146 | } |
147 | } else { | ||
148 | this.tableHeight = this.heightNum | ||
149 | this.$nextTick(() => { | ||
150 | this.minHeight && (document.getElementById('heightNumSetting').style.minHeight = this.minHeight + 'px') | ||
151 | }) | ||
142 | } | 152 | } |
143 | }, | 153 | }, |
144 | calcHeightx (value, wappered = true) { | 154 | calcHeightx (value, wappered = true) { | ... | ... |
src/components/downLbTable/LbColumn.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-column.vue | ||
3 | * Remark: element-column | ||
4 | * Project: lb-element-table | ||
5 | * Author: 任超 | ||
6 | * File Created: Tuesday, 19th March 2019 9:58:23 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 10:14:42 am | ||
8 | * Modified By: 任超 | ||
9 | */ | ||
10 | |||
11 | <template> | ||
12 | <el-table-column v-bind="$attrs" v-on="$listeners" :prop="column.prop" :label="column.label" :type="column.type" | ||
13 | :index="column.index" :column-key="column.columnKey" :width="column.width" :min-width="column.minWidth" | ||
14 | :fixed="column.fixed" :scoped-slot="column.renderHeader" :sortable="column.sortable || false" | ||
15 | :sort-method="column.sortMethod" :sort-by="column.sortBy" :sort-orders="column.sortOrders" | ||
16 | :resizable="column.resizable || true" :formatter="column.formatter" | ||
17 | :show-overflow-tooltip="column.showOverflowTooltip || false" :align="column.align || align || 'center'" | ||
18 | :header-align="column.headerAlign || headerAlign || column.align || align || 'center'" | ||
19 | :class-name="column.className" :label-class-name="column.labelClassName" :selectable="column.selectable" | ||
20 | :reserve-selection="column.reserveSelection || false" :filters="column.filters" | ||
21 | :filter-placement="column.filterPlacement" :filter-multiple="column.filterMultiple" | ||
22 | :filter-method="column.filterMethod" :filtered-value="column.filteredValue"> | ||
23 | <template slot="header" slot-scope="scope"> | ||
24 | <lb-render v-if="column.renderHeader" :scope="scope" :render="column.renderHeader"> | ||
25 | </lb-render> | ||
26 | <span v-else>{{ scope.column.label }}</span> | ||
27 | </template> | ||
28 | |||
29 | <template slot-scope="scope"> | ||
30 | <lb-render :scope="scope" :render="column.render"> | ||
31 | </lb-render> | ||
32 | </template> | ||
33 | |||
34 | <template v-if="column.children"> | ||
35 | <lb-column v-for="(col, index) in column.children" :key="index" :column="col"> | ||
36 | </lb-column> | ||
37 | </template> | ||
38 | </el-table-column> | ||
39 | </template> | ||
40 | |||
41 | <script> | ||
42 | import LbRender from './LbRender' | ||
43 | import forced from './forced.js' | ||
44 | export default { | ||
45 | name: 'LbColumn', | ||
46 | props: { | ||
47 | column: Object, | ||
48 | headerAlign: String, | ||
49 | align: String | ||
50 | }, | ||
51 | components: { | ||
52 | LbRender | ||
53 | }, | ||
54 | methods: { | ||
55 | setColumn () { | ||
56 | if (this.column.type) { | ||
57 | this.column.renderHeader = forced[this.column.type].renderHeader | ||
58 | this.column.render = this.column.render || forced[this.column.type].renderCell | ||
59 | } | ||
60 | if (this.column.formatter) { | ||
61 | this.column.render = (h, scope) => { | ||
62 | return <span>{scope.column.formatter(scope.row, scope.column, scope.row, scope.$index)}</span> | ||
63 | } | ||
64 | } | ||
65 | if (!this.column.render) { | ||
66 | this.column.render = (h, scope) => { | ||
67 | return <span>{scope.row[scope.column.property]}</span> | ||
68 | } | ||
69 | } | ||
70 | } | ||
71 | }, | ||
72 | watch: { | ||
73 | column: { | ||
74 | handler () { | ||
75 | this.setColumn() | ||
76 | }, | ||
77 | immediate: true | ||
78 | } | ||
79 | } | ||
80 | } | ||
81 | </script> |
src/components/downLbTable/LbRender.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-render.vue | ||
3 | * Remark: 自定义render | ||
4 | * Project: lb-element-table | ||
5 | * Author: 任超 | ||
6 | * File Created: Tuesday, 19th March 2019 10:15:30 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 10:15:32 am | ||
8 | * Modified By: 任超 | ||
9 | */ | ||
10 | <script> | ||
11 | export default { | ||
12 | name: 'LbRender', | ||
13 | functional: true, | ||
14 | props: { | ||
15 | scope: Object, | ||
16 | render: Function | ||
17 | }, | ||
18 | render: (h, ctx) => { | ||
19 | return ctx.props.render ? ctx.props.render(h, ctx.props.scope) : '' | ||
20 | } | ||
21 | } | ||
22 | </script> |
src/components/downLbTable/forced.js
0 → 100644
1 | export default { | ||
2 | selection: { | ||
3 | renderHeader: (h, { store }) => { | ||
4 | return ( | ||
5 | <el-checkbox | ||
6 | disabled={store.states.data && store.states.data.length === 0} | ||
7 | indeterminate={ | ||
8 | store.states.selection.length > 0 && !store.states.isAllSelected | ||
9 | } | ||
10 | nativeOn-click={store.toggleAllSelection} | ||
11 | value={store.states.isAllSelected} | ||
12 | /> | ||
13 | ) | ||
14 | }, | ||
15 | renderCell: (h, { row, column, store, $index }) => { | ||
16 | return ( | ||
17 | <el-checkbox | ||
18 | nativeOn-click={event => event.stopPropagation()} | ||
19 | value={store.isSelected(row)} | ||
20 | disabled={ | ||
21 | column.selectable | ||
22 | ? !column.selectable.call(null, row, $index) | ||
23 | : false | ||
24 | } | ||
25 | on-input={() => { | ||
26 | store.commit('rowSelectedChanged', row) | ||
27 | }} | ||
28 | /> | ||
29 | ) | ||
30 | }, | ||
31 | sortable: false, | ||
32 | resizable: false | ||
33 | }, | ||
34 | index: { | ||
35 | renderHeader: (h, scope) => { | ||
36 | return <span>{scope.column.label || '#'}</span> | ||
37 | }, | ||
38 | renderCell: (h, { $index, column }) => { | ||
39 | let i = $index + 1 | ||
40 | const index = column.index | ||
41 | |||
42 | if (typeof index === 'number') { | ||
43 | i = $index + index | ||
44 | } else if (typeof index === 'function') { | ||
45 | i = index($index) | ||
46 | } | ||
47 | |||
48 | return <div>{i}</div> | ||
49 | }, | ||
50 | sortable: false | ||
51 | }, | ||
52 | expand: { | ||
53 | renderHeader: (h, scope) => { | ||
54 | return <span>{scope.column.label || ''}</span> | ||
55 | }, | ||
56 | renderCell: (h, { row, store }, proxy) => { | ||
57 | const expanded = store.states.expandRows.indexOf(row) > -1 | ||
58 | return ( | ||
59 | <div | ||
60 | class={ | ||
61 | 'el-table__expand-icon ' + | ||
62 | (expanded ? 'el-table__expand-icon--expanded' : '') | ||
63 | } | ||
64 | on-click={e => proxy.handleExpandClick(row, e)} | ||
65 | > | ||
66 | <i class='el-icon el-icon-arrow-right' /> | ||
67 | </div> | ||
68 | ) | ||
69 | }, | ||
70 | sortable: false, | ||
71 | resizable: false, | ||
72 | className: 'el-table__expand-column' | ||
73 | } | ||
74 | } |
src/components/downLbTable/index.vue
0 → 100644
1 | /* | ||
2 | * FileName: lb-table.vue | ||
3 | * Remark: element table | ||
4 | * Project: lb-element-table | ||
5 | * Author: 任超 | ||
6 | * File Created: Tuesday, 19th March 2019 9:55:27 am | ||
7 | * Last Modified: Tuesday, 19th March 2019 9:55:34 am | ||
8 | * Modified By: 任超 | ||
9 | */ | ||
10 | |||
11 | <template> | ||
12 | <div :class="['lb-table', customClass]"> | ||
13 | <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable" :border='border' | ||
14 | :row-class-name="tableRowClassName" :show-header='showHeader' @row-click="singleElection" v-bind="$attrs" | ||
15 | :height="tableHeight" v-on="$listeners" :data="data" style="width: 100%" | ||
16 | :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | ||
17 | <el-table-column width="45" align="center" v-if="isRadio"> | ||
18 | <template slot-scope="scope"> | ||
19 | <el-radio v-model="selected" :label="scope.$index"></el-radio> | ||
20 | </template> | ||
21 | </el-table-column> | ||
22 | |||
23 | <el-table-column :label="downTitle" align="center"> | ||
24 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> | ||
25 | </lb-column> | ||
26 | </el-table-column> | ||
27 | </el-table> | ||
28 | <br> | ||
29 | <el-pagination class="lb-table-pagination" v-if="pagination" v-bind="$attrs" v-on="$listeners" background | ||
30 | layout="total, prev, pager, next" @current-change="paginationCurrentChange" | ||
31 | :style="{ 'margin-top': paginationTop, 'text-align': paginationAlign }"> | ||
32 | </el-pagination> | ||
33 | </div> | ||
34 | </template> | ||
35 | |||
36 | <script> | ||
37 | import LbColumn from './LbColumn' | ||
38 | export default { | ||
39 | props: { | ||
40 | column: Array, | ||
41 | data: Array, | ||
42 | spanMethod: Function, | ||
43 | pagination: { | ||
44 | type: Boolean, | ||
45 | default: true, | ||
46 | }, | ||
47 | downExcel: { | ||
48 | type: Boolean, | ||
49 | default: false, | ||
50 | }, | ||
51 | downTitle: { | ||
52 | type: String, | ||
53 | default: '标题' | ||
54 | }, | ||
55 | isRadio: { | ||
56 | type: Boolean, | ||
57 | default: false, | ||
58 | }, | ||
59 | border: { | ||
60 | type: Boolean, | ||
61 | default: false, | ||
62 | }, | ||
63 | showHeader: { | ||
64 | type: Boolean, | ||
65 | default: true, | ||
66 | }, | ||
67 | paginationTop: { | ||
68 | type: String, | ||
69 | default: '0', | ||
70 | }, | ||
71 | heightNum: { | ||
72 | type: Number, | ||
73 | default: 355, | ||
74 | }, | ||
75 | maxHeight: { | ||
76 | type: Number, | ||
77 | default: 500 | ||
78 | }, | ||
79 | heightNumSetting: { | ||
80 | type: Boolean, | ||
81 | default: false, | ||
82 | }, | ||
83 | customClass: { | ||
84 | type: String, | ||
85 | default: '', | ||
86 | }, | ||
87 | paginationAlign: { | ||
88 | type: String, | ||
89 | default: 'left', | ||
90 | }, | ||
91 | merge: Array, | ||
92 | }, | ||
93 | components: { | ||
94 | LbColumn, | ||
95 | }, | ||
96 | data () { | ||
97 | return { | ||
98 | tableHeight: 'auto', | ||
99 | mergeLine: {}, | ||
100 | mergeIndex: {}, | ||
101 | selected: '' | ||
102 | } | ||
103 | }, | ||
104 | created () { | ||
105 | this.getMergeArr(this.data, this.merge) | ||
106 | this.getHeight() | ||
107 | }, | ||
108 | computed: { | ||
109 | dataLength () { | ||
110 | return [] || this.data.length | ||
111 | }, | ||
112 | }, | ||
113 | methods: { | ||
114 | // 单选 | ||
115 | singleElection (row) { | ||
116 | this.selected = this.data.indexOf(row); | ||
117 | }, | ||
118 | |||
119 | tableRowClassName ({ row, rowIndex }) { | ||
120 | if (rowIndex % 2 === 1) { | ||
121 | return 'interlaced'; | ||
122 | } | ||
123 | }, | ||
124 | getHeight () { | ||
125 | if (!this.heightNumSetting) { | ||
126 | let _this = this | ||
127 | if (this.heightNum) { | ||
128 | _this.$nextTick(() => { | ||
129 | |||
130 | window.addEventListener('resize', () => { | ||
131 | _this.tableHeight = _this.calcHeightx(230) | ||
132 | }); | ||
133 | _this.tableHeight = _this.calcHeightx(230) | ||
134 | }) | ||
135 | } else { | ||
136 | _this.tableHeight = window.innerHeight - _this.heightNum | ||
137 | } | ||
138 | } | ||
139 | }, | ||
140 | calcHeightx (value, wappered = true) { | ||
141 | //项目自定义的公共header部分的高度,可忽略 | ||
142 | let header = document.querySelector(".from-clues-header").offsetHeight; | ||
143 | //value为动态计算table界面高度时,减去的其他空白部分,需自行在调试找到临界值,剩下的就是table表格的高度(包含header+body部分) | ||
144 | value = value == undefined ? 100 : value; | ||
145 | let res = window.innerHeight - parseInt(header) - value; | ||
146 | if (wappered) { | ||
147 | //通过原生方法,获取dom节点的高度------获取element-ui table表格body的元素 | ||
148 | let wapper = window.document.getElementsByClassName('el-table__body-wrapper'); | ||
149 | //通过原生方法,获取dom节点的高度------获取element-ui table表格header的元素 | ||
150 | let header = window.document.getElementsByClassName('el-table__header-wrapper'); | ||
151 | //必须加延时,要不然赋不上去值 | ||
152 | setTimeout(() => { | ||
153 | //通过上边计算得到的table高度的value值,减去table表格的header高度,剩下的通过dom节点直接强行赋给table表格的body | ||
154 | wapper[0].style.height = (value - header[0].clientHeight) | ||
155 | }, 100) | ||
156 | } | ||
157 | return res; | ||
158 | }, | ||
159 | clearSelection () { | ||
160 | this.$refs.elTable.clearSelection() | ||
161 | }, | ||
162 | toggleRowSelection (row, selected) { | ||
163 | this.$refs.elTable.toggleRowSelection(row, selected) | ||
164 | }, | ||
165 | toggleAllSelection () { | ||
166 | this.$refs.elTable.toggleAllSelection() | ||
167 | }, | ||
168 | toggleRowExpansion (row, expanded) { | ||
169 | this.$refs.elTable.toggleRowExpansion(row, expanded) | ||
170 | }, | ||
171 | setCurrentRow (row) { | ||
172 | this.$refs.elTable.setCurrentRow(row) | ||
173 | }, | ||
174 | clearSort () { | ||
175 | this.$refs.elTable.clearSort() | ||
176 | }, | ||
177 | clearFilter (columnKey) { | ||
178 | this.$refs.elTable.clearFilter(columnKey) | ||
179 | }, | ||
180 | doLayout () { | ||
181 | this.$refs.elTable.doLayout() | ||
182 | }, | ||
183 | sort (prop, order) { | ||
184 | this.$refs.elTable.sort(prop, order) | ||
185 | }, | ||
186 | paginationCurrentChange (val) { | ||
187 | this.$emit('p-current-change', val) | ||
188 | }, | ||
189 | getMergeArr (tableData, merge) { | ||
190 | if (!merge) return | ||
191 | this.mergeLine = {} | ||
192 | this.mergeIndex = {} | ||
193 | merge.forEach((item, k) => { | ||
194 | tableData.forEach((data, i) => { | ||
195 | if (i === 0) { | ||
196 | this.mergeIndex[item] = this.mergeIndex[item] || [] | ||
197 | this.mergeIndex[item].push(1) | ||
198 | this.mergeLine[item] = 0 | ||
199 | } else { | ||
200 | if (data[item] === tableData[i - 1][item]) { | ||
201 | this.mergeIndex[item][this.mergeLine[item]] += 1 | ||
202 | this.mergeIndex[item].push(0) | ||
203 | } else { | ||
204 | this.mergeIndex[item].push(1) | ||
205 | this.mergeLine[item] = i | ||
206 | } | ||
207 | } | ||
208 | }) | ||
209 | }) | ||
210 | }, | ||
211 | mergeMethod ({ row, column, rowIndex, columnIndex }) { | ||
212 | const index = this.merge.indexOf(column.property) | ||
213 | if (index > -1) { | ||
214 | const _row = this.mergeIndex[this.merge[index]][rowIndex] | ||
215 | const _col = _row > 0 ? 1 : 0 | ||
216 | return { | ||
217 | rowspan: _row, | ||
218 | colspan: _col, | ||
219 | } | ||
220 | } | ||
221 | }, | ||
222 | }, | ||
223 | watch: { | ||
224 | merge () { | ||
225 | this.getMergeArr(this.data, this.merge) | ||
226 | }, | ||
227 | dataLength () { | ||
228 | this.getMergeArr(this.data, this.merge) | ||
229 | } | ||
230 | }, | ||
231 | } | ||
232 | </script> | ||
233 | <style rel="stylesheet/scss" scoped lang="scss"> | ||
234 | .lb-table { | ||
235 | margin-top: 1px; | ||
236 | |||
237 | .interlaced { | ||
238 | background: #fafcff; | ||
239 | border: 1px solid #ebf2fa; | ||
240 | } | ||
241 | } | ||
242 | |||
243 | /deep/.el-table .cell { | ||
244 | padding-left: 3px; | ||
245 | padding-right: 3px; | ||
246 | } | ||
247 | |||
248 | /deep/.el-radio__label { | ||
249 | display: none; | ||
250 | } | ||
251 | </style> |
src/components/downLbTable/redeme.md
0 → 100644
src/image/bdclogo.png
0 → 100644
![](/bdc/bdcjg-web/raw/1b95b632333ced06e5d1cb5cb2e5d27c8169803c/src/image/bdclogo.png)
20.9 KB
No preview for this file type
src/image/loginBoxsb.png
0 → 100644
![](/bdc/bdcjg-web/raw/1b95b632333ced06e5d1cb5cb2e5d27c8169803c/src/image/loginBoxsb.png)
296 KB
src/image/loginLogo.png
0 → 100644
![](/bdc/bdcjg-web/raw/1b95b632333ced06e5d1cb5cb2e5d27c8169803c/src/image/loginLogo.png)
256 KB
src/image/passlogo.png
0 → 100644
![](/bdc/bdcjg-web/raw/1b95b632333ced06e5d1cb5cb2e5d27c8169803c/src/image/passlogo.png)
655 Bytes
src/image/userlogo.png
0 → 100644
![](/bdc/bdcjg-web/raw/1b95b632333ced06e5d1cb5cb2e5d27c8169803c/src/image/userlogo.png)
612 Bytes
src/image/yzlogo.png
0 → 100644
![](/bdc/bdcjg-web/raw/1b95b632333ced06e5d1cb5cb2e5d27c8169803c/src/image/yzlogo.png)
621 Bytes
... | @@ -2,10 +2,10 @@ | ... | @@ -2,10 +2,10 @@ |
2 | <div class="navbar-con"> | 2 | <div class="navbar-con"> |
3 | <div class="navbar"> | 3 | <div class="navbar"> |
4 | <div class="title"> | 4 | <div class="title"> |
5 | {{ logoName[0].DNAME }} | 5 | {{ logoName[0] && logoName[0].DNAME }} |
6 | </div> | 6 | </div> |
7 | <div class="user"> | 7 | <div class="user"> |
8 | 欢迎进入系统 {{ userInfo.name }} | 8 | 欢迎进入系统 {{ userName }} |
9 | <span @click="onCancel"> | 9 | <span @click="onCancel"> |
10 | <svg-icon icon-class="close" class="closeStyle" />退出系统</span> | 10 | <svg-icon icon-class="close" class="closeStyle" />退出系统</span> |
11 | </div> | 11 | </div> |
... | @@ -16,244 +16,247 @@ | ... | @@ -16,244 +16,247 @@ |
16 | <sidebarRight /> | 16 | <sidebarRight /> |
17 | </div> | 17 | </div> |
18 | </div> | 18 | </div> |
19 | </div> | 19 | </div> |
20 | </template> | 20 | </template> |
21 | <script> | 21 | <script> |
22 | import sidebarLeft from "./Sidebar/sidebarLeft"; | 22 | import sidebarLeft from "./Sidebar/sidebarLeft"; |
23 | import sidebarRight from "./Sidebar/sidebarRight"; | 23 | import sidebarRight from "./Sidebar/sidebarRight"; |
24 | import { logout } from "@/api/login.js"; | 24 | import { logout } from "@/api/login.js"; |
25 | import { mapGetters } from "vuex"; | 25 | import { mapGetters } from "vuex"; |
26 | export default { | 26 | export default { |
27 | components: { | 27 | components: { |
28 | sidebarLeft, | 28 | sidebarLeft, |
29 | sidebarRight, | 29 | sidebarRight, |
30 | }, | 30 | }, |
31 | computed: { | 31 | computed: { |
32 | ...mapGetters(["sidebar", "dicData", "userInfo"]), | 32 | ...mapGetters(["sidebar", "dicData", "userInfo"]), |
33 | logoName: function () { | 33 | logoName () { |
34 | return this.dicData['sysCode'] && this.dicData['sysCode'].filter(item => | 34 | return this.dicData['sysCode'] && this.dicData['sysCode'].filter(item => |
35 | item.DCODE == "systemTitle" | 35 | item.DCODE == "systemTitle" |
36 | ) | 36 | ) |
37 | } | 37 | }, |
38 | }, | 38 | userName () { |
39 | methods: { | 39 | return this.userInfo ? this.userInfo.name : "" |
40 | onCancel () { | 40 | } |
41 | logout() | 41 | }, |
42 | .then((res) => { | 42 | methods: { |
43 | sessionStorage.removeItem("token"); | 43 | onCancel () { |
44 | this.$store.dispatch("user/resetState"); | 44 | logout() |
45 | this.$router.replace({ | 45 | .then((res) => { |
46 | path: "/login", | 46 | sessionStorage.removeItem("token"); |
47 | query: { | 47 | this.$store.dispatch("user/resetState"); |
48 | redirect: this.$route.fullPath, | 48 | this.$router.replace({ |
49 | }, | 49 | path: "/jg", |
50 | query: { | ||
51 | redirect: this.$route.fullPath, | ||
52 | }, | ||
53 | }); | ||
54 | }) | ||
55 | .catch((error) => { | ||
56 | // console.dir(error); | ||
50 | }); | 57 | }); |
51 | }) | 58 | }, |
52 | .catch((error) => { | ||
53 | // console.dir(error); | ||
54 | }); | ||
55 | }, | 59 | }, |
56 | }, | 60 | }; |
57 | }; | ||
58 | </script> | 61 | </script> |
59 | <style lang="scss" scoped> | 62 | <style lang="scss" scoped> |
60 | /deep/.el-menu--horizontal { | 63 | /deep/.el-menu--horizontal { |
61 | display: flex; | 64 | display: flex; |
62 | align-items: center; | 65 | align-items: center; |
63 | } | 66 | } |
64 | |||
65 | .menubg { | ||
66 | height: 34px; | ||
67 | width: 130px; | ||
68 | text-align: center; | ||
69 | color: #ffffff; | ||
70 | margin-right: 20px; | ||
71 | background: url("~@/image/navbar.png") no-repeat; | ||
72 | background-size: 100% 100%; | ||
73 | } | ||
74 | |||
75 | /deep/.el-menu-item { | ||
76 | @extend .menubg; | ||
77 | } | ||
78 | |||
79 | /deep/.el-submenu { | ||
80 | @extend .menubg; | ||
81 | } | ||
82 | |||
83 | /deep/.el-submenu__title { | ||
84 | height: 34px; | ||
85 | color: #ffffff; | ||
86 | } | ||
87 | 67 | ||
88 | /deep/.el-submenu__title span { | 68 | .menubg { |
89 | font-size: 14px; | 69 | height: 34px; |
90 | } | 70 | width: 130px; |
71 | text-align: center; | ||
72 | color: #ffffff; | ||
73 | margin-right: 20px; | ||
74 | background: url("~@/image/navbar.png") no-repeat; | ||
75 | background-size: 100% 100%; | ||
76 | } | ||
91 | 77 | ||
92 | .sidebarLeft { | 78 | /deep/.el-menu-item { |
93 | position: relative; | 79 | @extend .menubg; |
94 | top: 13px; | 80 | } |
95 | width: 30%; | ||
96 | } | ||
97 | 81 | ||
98 | /deep/.el-menu { | 82 | /deep/.el-submenu { |
99 | display: flex; | 83 | @extend .menubg; |
100 | justify-content: space-between; | 84 | } |
101 | } | ||
102 | 85 | ||
103 | /deep/.el-menu-item { | 86 | /deep/.el-submenu__title { |
104 | flex: 1; | 87 | height: 34px; |
105 | width: 100%; | 88 | color: #ffffff; |
106 | } | 89 | } |
107 | 90 | ||
108 | .sidebarRight { | 91 | /deep/.el-submenu__title span { |
109 | position: relative; | 92 | font-size: 14px; |
110 | top: 13px; | 93 | } |
111 | width: 30%; | ||
112 | padding-left: 20px; | ||
113 | } | ||
114 | 94 | ||
115 | // 导航选中背景色 | 95 | .sidebarLeft { |
116 | .xuanzhong { | 96 | position: relative; |
117 | background: url("~@/image/selNavbar.png") no-repeat; | 97 | top: 13px; |
118 | background-size: 100% 100%; | 98 | width: 30%; |
119 | color: #ffffff !important; | 99 | } |
120 | font-weight: 700; | ||
121 | } | ||
122 | 100 | ||
123 | /deep/.el-menu-item:hover { | 101 | /deep/.el-menu { |
124 | @extend .xuanzhong; | 102 | display: flex; |
125 | } | 103 | justify-content: space-between; |
104 | } | ||
126 | 105 | ||
127 | /deep/.el-submenu__title:hover { | 106 | /deep/.el-menu-item { |
128 | @extend .xuanzhong; | 107 | flex: 1; |
129 | } | 108 | width: 100%; |
109 | } | ||
130 | 110 | ||
131 | /deep/.el-menu--horizontal .el-menu-item:not(.is-disabled):focus { | 111 | .sidebarRight { |
132 | @extend .xuanzhong; | 112 | position: relative; |
133 | } | 113 | top: 13px; |
114 | width: 30%; | ||
115 | padding-left: 20px; | ||
116 | } | ||
134 | 117 | ||
135 | /deep/.el-menu-item.is-active { | 118 | // 导航选中背景色 |
136 | @extend .xuanzhong; | 119 | .xuanzhong { |
137 | } | 120 | background: url("~@/image/selNavbar.png") no-repeat; |
121 | background-size: 100% 100%; | ||
122 | color: #ffffff !important; | ||
123 | font-weight: 700; | ||
124 | } | ||
138 | 125 | ||
139 | .navbar { | 126 | /deep/.el-menu-item:hover { |
140 | height: $headerHeight; | 127 | @extend .xuanzhong; |
141 | overflow: hidden; | 128 | } |
142 | position: relative; | ||
143 | display: flex; | ||
144 | align-items: center; | ||
145 | padding: 0 20px; | ||
146 | justify-content: space-between; | ||
147 | background: url("~@/image/header.png") no-repeat; | ||
148 | background-size: 100% 100%; | ||
149 | 129 | ||
150 | .user { | 130 | /deep/.el-submenu__title:hover { |
151 | font-size: 12px; | 131 | @extend .xuanzhong; |
152 | color: #ffffff; | 132 | } |
153 | position: absolute; | ||
154 | right: 20px; | ||
155 | top: 0; | ||
156 | cursor: pointer; | ||
157 | 133 | ||
158 | .closeStyle { | 134 | /deep/.el-menu--horizontal .el-menu-item:not(.is-disabled):focus { |
159 | margin-right: 5px; | 135 | @extend .xuanzhong; |
160 | } | ||
161 | } | 136 | } |
162 | 137 | ||
163 | .title { | 138 | /deep/.el-menu-item.is-active { |
164 | position: absolute; | 139 | @extend .xuanzhong; |
165 | left: 0; | ||
166 | top: 10px; | ||
167 | bottom: 0; | ||
168 | right: 0; | ||
169 | margin: 0 auto; | ||
170 | font-size: 32px; | ||
171 | color: #ffffff; | ||
172 | font-weight: 700; | ||
173 | text-align: center; | ||
174 | } | 140 | } |
175 | 141 | ||
176 | .right-menu { | 142 | .navbar { |
177 | float: right; | 143 | height: $headerHeight; |
178 | height: 100%; | 144 | overflow: hidden; |
179 | line-height: 50px; | 145 | position: relative; |
180 | display: flex; | 146 | display: flex; |
181 | align-items: center; | 147 | align-items: center; |
148 | padding: 0 20px; | ||
149 | justify-content: space-between; | ||
150 | background: url("~@/image/header.png") no-repeat; | ||
151 | background-size: 100% 100%; | ||
182 | 152 | ||
183 | .shutdown { | 153 | .user { |
184 | font-size: 20px; | 154 | font-size: 12px; |
185 | margin-left: 15px; | 155 | color: #ffffff; |
156 | position: absolute; | ||
157 | right: 20px; | ||
158 | top: 0; | ||
186 | cursor: pointer; | 159 | cursor: pointer; |
160 | |||
161 | .closeStyle { | ||
162 | margin-right: 5px; | ||
163 | } | ||
187 | } | 164 | } |
188 | 165 | ||
189 | .organization-item { | 166 | .title { |
190 | margin-right: 40px; | 167 | position: absolute; |
191 | margin-top: -40px !important; | 168 | left: 0; |
169 | top: 10px; | ||
170 | bottom: 0; | ||
171 | right: 0; | ||
172 | margin: 0 auto; | ||
173 | font-size: 32px; | ||
174 | color: #ffffff; | ||
175 | font-weight: 700; | ||
176 | text-align: center; | ||
192 | } | 177 | } |
193 | 178 | ||
194 | .item { | 179 | .right-menu { |
195 | margin-right: 40px; | 180 | float: right; |
196 | margin-top: -20px; | 181 | height: 100%; |
197 | line-height: 18.4px; | 182 | line-height: 50px; |
198 | cursor: pointer; | 183 | display: flex; |
199 | position: relative; | 184 | align-items: center; |
200 | 185 | ||
201 | .item-box { | 186 | .shutdown { |
202 | position: absolute; | 187 | font-size: 20px; |
203 | top: -5px; | 188 | margin-left: 15px; |
204 | left: 3px; | ||
205 | width: 100%; | ||
206 | min-width: 25px; | ||
207 | height: 25px; | ||
208 | cursor: pointer; | 189 | cursor: pointer; |
209 | z-index: 100; | ||
210 | } | 190 | } |
211 | } | ||
212 | |||
213 | &:focus { | ||
214 | outline: none; | ||
215 | } | ||
216 | 191 | ||
217 | .right-menu-item { | 192 | .organization-item { |
218 | display: inline-block; | 193 | margin-right: 40px; |
219 | height: 100%; | 194 | margin-top: -40px !important; |
220 | font-size: 18px; | 195 | } |
221 | color: #fff; | ||
222 | vertical-align: text-bottom; | ||
223 | 196 | ||
224 | &.hover-effect { | 197 | .item { |
198 | margin-right: 40px; | ||
199 | margin-top: -20px; | ||
200 | line-height: 18.4px; | ||
225 | cursor: pointer; | 201 | cursor: pointer; |
226 | transition: background 0.3s; | 202 | position: relative; |
227 | display: flex; | ||
228 | align-items: center; | ||
229 | 203 | ||
230 | &:hover { | 204 | .item-box { |
231 | background: rgba(0, 0, 0, 0.025); | 205 | position: absolute; |
206 | top: -5px; | ||
207 | left: 3px; | ||
208 | width: 100%; | ||
209 | min-width: 25px; | ||
210 | height: 25px; | ||
211 | cursor: pointer; | ||
212 | z-index: 100; | ||
232 | } | 213 | } |
233 | } | 214 | } |
234 | } | ||
235 | 215 | ||
236 | .avatar-wrapper { | 216 | &:focus { |
237 | position: relative; | 217 | outline: none; |
238 | display: flex; | 218 | } |
239 | height: 40px; | ||
240 | align-items: center; | ||
241 | 219 | ||
242 | .user-avatar { | 220 | .right-menu-item { |
243 | cursor: pointer; | 221 | display: inline-block; |
244 | width: 35px; | 222 | height: 100%; |
245 | height: 35px; | 223 | font-size: 18px; |
246 | border-radius: 50%; | 224 | color: #fff; |
225 | vertical-align: text-bottom; | ||
226 | |||
227 | &.hover-effect { | ||
228 | cursor: pointer; | ||
229 | transition: background 0.3s; | ||
230 | display: flex; | ||
231 | align-items: center; | ||
232 | |||
233 | &:hover { | ||
234 | background: rgba(0, 0, 0, 0.025); | ||
235 | } | ||
236 | } | ||
247 | } | 237 | } |
248 | 238 | ||
249 | .el-icon-caret-bottom { | 239 | .avatar-wrapper { |
250 | cursor: pointer; | 240 | position: relative; |
251 | position: absolute; | 241 | display: flex; |
252 | right: -15px; | 242 | height: 40px; |
253 | top: 17px; | 243 | align-items: center; |
254 | font-size: 12px; | 244 | |
245 | .user-avatar { | ||
246 | cursor: pointer; | ||
247 | width: 35px; | ||
248 | height: 35px; | ||
249 | border-radius: 50%; | ||
250 | } | ||
251 | |||
252 | .el-icon-caret-bottom { | ||
253 | cursor: pointer; | ||
254 | position: absolute; | ||
255 | right: -15px; | ||
256 | top: 17px; | ||
257 | font-size: 12px; | ||
258 | } | ||
255 | } | 259 | } |
256 | } | 260 | } |
257 | } | 261 | } |
258 | } | ||
259 | </style> | 262 | </style> | ... | ... |
1 | <template> | 1 | <template> |
2 | <el-menu router :default-active="activeMenu" mode="horizontal"> | 2 | <el-menu router :default-active="activeMenu" mode="horizontal"> |
3 | <!-- 权限菜单 --> | 3 | <!-- 权限菜单 --> |
4 | <sidebar-item v-for="route in permission_routes.slice(2, 5)" :key="route.path" :item="route" | 4 | <sidebar-item v-for="route in permission_routes.slice(3, 6)" :key="route.path" :item="route" |
5 | :base-path="route.path" /> | 5 | :base-path="route.path" /> |
6 | <!-- 菜单全部展示 --> | 6 | <!-- 菜单全部展示 --> |
7 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> | 7 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> |
... | @@ -9,35 +9,40 @@ | ... | @@ -9,35 +9,40 @@ |
9 | </template> | 9 | </template> |
10 | 10 | ||
11 | <script> | 11 | <script> |
12 | import { mapGetters } from 'vuex' | 12 | import { mapGetters } from 'vuex' |
13 | import Logo from './Logo' | 13 | import Logo from './Logo' |
14 | import SidebarItem from './SidebarItem' | 14 | import SidebarItem from './SidebarItem' |
15 | import variables from '@/styles/variables.scss' | 15 | import variables from '@/styles/variables.scss' |
16 | import { asyncRoutes } from '@/router' | 16 | import { asyncRoutes } from '@/router' |
17 | export default { | 17 | export default { |
18 | components: { SidebarItem, Logo }, | 18 | components: { SidebarItem, Logo }, |
19 | computed: { | 19 | computed: { |
20 | ...mapGetters(['permission_routes', 'sidebar']), | 20 | ...mapGetters(['permission_routes', 'sidebar']), |
21 | activeMenu () { | 21 | |
22 | const route = this.$route | 22 | activeMenu () { |
23 | const { meta, path } = route | 23 | |
24 | if (meta.activeMenu) { | 24 | const route = this.$route |
25 | return meta.activeMenu | 25 | const { meta, path } = route |
26 | if (meta.activeMenu) { | ||
27 | return meta.activeMenu | ||
28 | } | ||
29 | return path | ||
30 | }, | ||
31 | variables () { | ||
32 | return variables | ||
33 | }, | ||
34 | asyncRoutes () { | ||
35 | return asyncRoutes.slice(0, 3) | ||
26 | } | 36 | } |
27 | return path | ||
28 | }, | 37 | }, |
29 | variables () { | 38 | mounted () { |
30 | return variables | 39 | console.log("permission_routes", this.permission_routes); |
31 | }, | ||
32 | asyncRoutes () { | ||
33 | return asyncRoutes.slice(0, 3) | ||
34 | } | 40 | } |
35 | } | 41 | } |
36 | } | ||
37 | </script> | 42 | </script> |
38 | <style scoped lang="scss"> | 43 | <style scoped lang="scss"> |
39 | .el-menu--horizontal { | ||
40 | display: flex; | ||
41 | background: none !important; | ||
42 | } | ||
43 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
44 | .el-menu--horizontal { | ||
45 | display: flex; | ||
46 | background: none !important; | ||
47 | } | ||
48 | </style> | ... | ... |
1 | <!-- | ||
2 | * @Author: xiaomiao 1158771342@qq.com | ||
3 | * @Date: 2023-01-10 09:03:06 | ||
4 | * @LastEditors: xiaomiao 1158771342@qq.com | ||
5 | * @LastEditTime: 2023-03-08 10:45:43 | ||
6 | * @FilePath: \监管系统\js-web-jianguan\src\layout\components\Sidebar\sidebarRight.vue | ||
7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
8 | --> | ||
1 | <template> | 9 | <template> |
2 | <el-menu router :default-active="activeMenu" mode="horizontal"> | 10 | <el-menu router :default-active="activeMenu" mode="horizontal"> |
3 | <!-- 权限菜单 --> | 11 | <!-- 权限菜单 --> |
4 | <sidebar-item v-for="route in permission_routes.slice(5, 8)" :key="route.path" :item="route" | 12 | <sidebar-item v-for="route in permission_routes.slice(6, 9)" :key="route.path" :item="route" |
5 | :base-path="route.path" /> | 13 | :base-path="route.path" /> |
6 | <!-- 菜单全部展示 --> | 14 | <!-- 菜单全部展示 --> |
7 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> | 15 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> |
... | @@ -9,59 +17,59 @@ | ... | @@ -9,59 +17,59 @@ |
9 | </template> | 17 | </template> |
10 | 18 | ||
11 | <script> | 19 | <script> |
12 | import { mapGetters } from 'vuex' | 20 | import { mapGetters } from 'vuex' |
13 | import Logo from './Logo' | 21 | import Logo from './Logo' |
14 | import SidebarItem from './SidebarItem' | 22 | import SidebarItem from './SidebarItem' |
15 | import variables from '@/styles/variables.scss' | 23 | import variables from '@/styles/variables.scss' |
16 | import { asyncRoutes } from '@/router' | 24 | import { asyncRoutes } from '@/router' |
17 | export default { | 25 | export default { |
18 | components: { SidebarItem, Logo }, | 26 | components: { SidebarItem, Logo }, |
19 | computed: { | 27 | computed: { |
20 | ...mapGetters(['permission_routes', 'sidebar']), | 28 | ...mapGetters(['permission_routes', 'sidebar']), |
21 | activeMenu () { | 29 | activeMenu () { |
22 | const route = this.$route | 30 | const route = this.$route |
23 | const { meta, path } = route | 31 | const { meta, path } = route |
24 | if (meta.activeMenu) { | 32 | if (meta.activeMenu) { |
25 | return meta.activeMenu | 33 | return meta.activeMenu |
34 | } | ||
35 | return path | ||
36 | }, | ||
37 | variables () { | ||
38 | return variables | ||
39 | }, | ||
40 | asyncRoutes () { | ||
41 | return asyncRoutes.slice(3, 6) | ||
26 | } | 42 | } |
27 | return path | ||
28 | }, | ||
29 | variables () { | ||
30 | return variables | ||
31 | }, | ||
32 | asyncRoutes () { | ||
33 | return asyncRoutes.slice(3, 6) | ||
34 | } | 43 | } |
35 | } | 44 | } |
36 | } | ||
37 | </script> | 45 | </script> |
38 | <style scoped lang="scss"> | 46 | <style scoped lang="scss"> |
39 | .el-menu--horizontal { | 47 | .el-menu--horizontal { |
40 | display: flex; | 48 | display: flex; |
41 | background: none !important; | 49 | background: none !important; |
42 | } | 50 | } |
43 | 51 | ||
44 | /deep/.el-menu-item:hover { | 52 | /deep/.el-menu-item:hover { |
45 | background: none; | 53 | background: none; |
46 | font-weight: 700; | 54 | font-weight: 700; |
47 | color: #fff !important; | 55 | color: #fff !important; |
48 | } | 56 | } |
49 | 57 | ||
50 | /deep/.el-submenu__title { | 58 | /deep/.el-submenu__title { |
51 | color: #fff; | 59 | color: #fff; |
52 | font-size: 18px; | 60 | font-size: 18px; |
53 | } | 61 | } |
54 | 62 | ||
55 | /deep/.el-submenu__title:hover { | 63 | /deep/.el-submenu__title:hover { |
56 | background: none; | 64 | background: none; |
57 | font-weight: 700; | 65 | font-weight: 700; |
58 | font-size: 20px; | 66 | font-size: 20px; |
59 | } | 67 | } |
60 | 68 | ||
61 | /deep/.el-menu--horizontal .el-menu-item:not(.is-disabled):focus { | ||
62 | background: none; | ||
63 | color: #fff; | ||
64 | font-size: 20px; | ||
65 | font-weight: 700 !important; | ||
66 | } | ||
67 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
69 | /deep/.el-menu--horizontal .el-menu-item:not(.is-disabled):focus { | ||
70 | background: none; | ||
71 | color: #fff; | ||
72 | font-size: 20px; | ||
73 | font-weight: 700 !important; | ||
74 | } | ||
75 | </style> | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-10 14:59:43 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <div class="app-wrapper"> | 7 | <div class="app-wrapper jgWrapper"> |
3 | <navbar /> | 8 | <navbar /> |
4 | <div class="appMain"> | 9 | <div class="appMain"> |
5 | <app-main /> | 10 | <app-main /> |
... | @@ -7,54 +12,61 @@ | ... | @@ -7,54 +12,61 @@ |
7 | </div> | 12 | </div> |
8 | </template> | 13 | </template> |
9 | <script> | 14 | <script> |
10 | import { AppMain, Navbar, Sidebar, TagsView } from './components' | 15 | import { AppMain, Navbar, Sidebar, TagsView } from './components' |
11 | import ResizeMixin from './mixin/ResizeHandler' | 16 | import ResizeMixin from './mixin/ResizeHandler' |
12 | import { mapState } from 'vuex' | 17 | import { mapState } from 'vuex' |
13 | export default { | 18 | export default { |
14 | name: 'Layout', | 19 | name: 'Layout', |
15 | components: { | 20 | components: { |
16 | AppMain, | 21 | AppMain, |
17 | Navbar, | 22 | Navbar, |
18 | Sidebar, | 23 | Sidebar, |
19 | TagsView | 24 | TagsView |
20 | }, | 25 | }, |
21 | mixins: [ResizeMixin], | 26 | created () { |
22 | computed: { | 27 | this.$store.dispatch("products/setData", "BDCJGPT"); |
23 | ...mapState({ | 28 | console.log("ZOULEJG"); |
24 | sidebar: state => state.app.sidebar, | 29 | }, |
25 | needTagsView: state => state.settings.tagsView, | 30 | mixins: [ResizeMixin], |
26 | fixedHeader: state => state.settings.fixedHeader | 31 | computed: { |
27 | }) | 32 | ...mapState({ |
33 | sidebar: state => state.app.sidebar, | ||
34 | needTagsView: state => state.settings.tagsView, | ||
35 | fixedHeader: state => state.settings.fixedHeader | ||
36 | }) | ||
37 | } | ||
28 | } | 38 | } |
29 | } | ||
30 | </script> | 39 | </script> |
40 | <style lang="scss"> | ||
41 | @import "~@/styles/jgSidebar.scss"; | ||
42 | </style> | ||
31 | <style lang="scss" scoped> | 43 | <style lang="scss" scoped> |
32 | @import "~@/styles/mixin.scss"; | 44 | @import "~@/styles/mixin.scss"; |
33 | 45 | ||
34 | .app-wrapper { | 46 | .app-wrapper { |
35 | @include clearfix; | 47 | @include clearfix; |
36 | position: relative; | 48 | position: relative; |
37 | height: 100%; | 49 | height: 100%; |
38 | width: 100%; | 50 | width: 100%; |
39 | min-width: 1280px; | 51 | min-width: 1280px; |
40 | background: url('~@/image/bg.png') no-repeat; | 52 | background: url("~@/image/bg.png") no-repeat; |
41 | background-size: 100% 100%; | 53 | background-size: 100% 100%; |
42 | padding: 12px; | 54 | padding: 12px; |
43 | box-sizing: border-box; | 55 | box-sizing: border-box; |
44 | 56 | ||
45 | &.mobile.openSidebar { | 57 | &.mobile.openSidebar { |
46 | position: fixed; | 58 | position: fixed; |
47 | top: 0; | 59 | top: 0; |
60 | } | ||
48 | } | 61 | } |
49 | } | ||
50 | 62 | ||
51 | .appMain { | 63 | .appMain { |
52 | min-width: 1290px; | 64 | // min-width: 1280px; |
53 | height: calc(100vh - 101px) !important; | 65 | height: calc(100vh - 101px) !important; |
54 | box-sizing: border-box; | 66 | box-sizing: border-box; |
55 | 67 | ||
56 | .app-main { | 68 | .app-main { |
57 | height: 100%; | 69 | height: 100%; |
70 | } | ||
58 | } | 71 | } |
59 | } | ||
60 | </style> | 72 | </style> | ... | ... |
... | @@ -4,11 +4,7 @@ | ... | @@ -4,11 +4,7 @@ |
4 | <div class="logo"> | 4 | <div class="logo"> |
5 | <img :src="require('@/image/logo.png')" alt="" /> | 5 | <img :src="require('@/image/logo.png')" alt="" /> |
6 | </div> | 6 | </div> |
7 | <div class="backdrop"> | ||
8 | <Breadcrumb /> | ||
9 | </div> | ||
10 | <div class="right-menu"> | 7 | <div class="right-menu"> |
11 | <div class="dataView d-center pointer" @click="handleDataView">大屏展示</div> | ||
12 | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> | 8 | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> |
13 | <div class="avatar-wrapper"> | 9 | <div class="avatar-wrapper"> |
14 | <span style="padding-right:10px">{{ name }}</span> | 10 | <span style="padding-right:10px">{{ name }}</span> |
... | @@ -67,15 +63,6 @@ export default { | ... | @@ -67,15 +63,6 @@ export default { |
67 | } | 63 | } |
68 | } | 64 | } |
69 | 65 | ||
70 | .dataView { | ||
71 | color: #fff; | ||
72 | width: 120px; | ||
73 | height: 32px; | ||
74 | background: url('../../image/dp.png'); | ||
75 | background-size: cover; | ||
76 | margin-right: 20px; | ||
77 | } | ||
78 | |||
79 | .NoticeBar { | 66 | .NoticeBar { |
80 | position: absolute; | 67 | position: absolute; |
81 | bottom: 0; | 68 | bottom: 0; |
... | @@ -83,7 +70,7 @@ export default { | ... | @@ -83,7 +70,7 @@ export default { |
83 | 70 | ||
84 | .el-dropdown-menu { | 71 | .el-dropdown-menu { |
85 | padding: 0 !important; | 72 | padding: 0 !important; |
86 | border: 1px solid #EBEEF5; | 73 | border: 1px solid #ebeef5; |
87 | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12); | 74 | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12); |
88 | border-radius: 4px 0 0 4px 4px; | 75 | border-radius: 4px 0 0 4px 4px; |
89 | 76 | ||
... | @@ -93,14 +80,14 @@ export default { | ... | @@ -93,14 +80,14 @@ export default { |
93 | font-size: 14px; | 80 | font-size: 14px; |
94 | font-family: PingFangSC-Regular, PingFang SC; | 81 | font-family: PingFangSC-Regular, PingFang SC; |
95 | font-weight: 400; | 82 | font-weight: 400; |
96 | color: #4A4A4A; | 83 | color: #4a4a4a; |
97 | width: 140px; | 84 | width: 140px; |
98 | height: 36px; | 85 | height: 36px; |
99 | line-height: 36px; | 86 | line-height: 36px; |
100 | } | 87 | } |
101 | 88 | ||
102 | .el-dropdown-menu__item:nth-child(6) { | 89 | .el-dropdown-menu__item:nth-child(6) { |
103 | border-top: 1px solid #EBEEF5; | 90 | border-top: 1px solid #ebeef5; |
104 | } | 91 | } |
105 | 92 | ||
106 | .popper__arrow { | 93 | .popper__arrow { |
... | @@ -111,8 +98,8 @@ export default { | ... | @@ -111,8 +98,8 @@ export default { |
111 | 98 | ||
112 | .el-dropdown-menu__item:not(.is-disabled):hover, | 99 | .el-dropdown-menu__item:not(.is-disabled):hover, |
113 | .el-dropdown-menu__item:focus { | 100 | .el-dropdown-menu__item:focus { |
114 | background: #F6F7F9; | 101 | background: #f6f7f9; |
115 | color: #4A4A4A; | 102 | color: #4a4a4a; |
116 | } | 103 | } |
117 | } | 104 | } |
118 | 105 | ||
... | @@ -120,15 +107,11 @@ export default { | ... | @@ -120,15 +107,11 @@ export default { |
120 | height: $headerHeight; | 107 | height: $headerHeight; |
121 | overflow: hidden; | 108 | overflow: hidden; |
122 | position: relative; | 109 | position: relative; |
123 | // background: linear-gradient(270deg, #148CEE 0%, #1870E3 100%); //默认颜色 | 110 | background: #3D59C4; |
124 | // box-shadow: 0 1px 0px rgba(0, 21, 41, 0.08); | ||
125 | background: #0D1230; | ||
126 | display: flex; | 111 | display: flex; |
127 | align-items: center; | 112 | align-items: center; |
128 | padding-right: 20px; | 113 | padding-right: 20px; |
129 | justify-content: space-between; | 114 | justify-content: space-between; |
130 | margin-bottom: 10px; | ||
131 | |||
132 | .header-logo { | 115 | .header-logo { |
133 | width: 300px; | 116 | width: 300px; |
134 | } | 117 | } | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-06 16:18:21 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <div> | 7 | <div> |
3 | <el-scrollbar wrap-class="scrollbar-wrapper"> | 8 | <el-scrollbar wrap-class="scrollbar-wrapper"> |
4 | <el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" | 9 | <el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" |
5 | :unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" | 10 | :unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical"> |
6 | mode="vertical"> | ||
7 | <!-- 权限菜单 --> | 11 | <!-- 权限菜单 --> |
8 | <!-- <sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" /> --> | 12 | <sidebar-item v-for="route in permission_routes.slice(3)" :key="route.path" :item="route" |
13 | :base-path="route.path" /> | ||
9 | <!-- 菜单全部展示 --> | 14 | <!-- 菜单全部展示 --> |
10 | <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> | 15 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> |
11 | </el-menu> | 16 | </el-menu> |
12 | </el-scrollbar> | 17 | </el-scrollbar> |
13 | </div> | 18 | </div> |
... | @@ -27,6 +32,9 @@ export default { | ... | @@ -27,6 +32,9 @@ export default { |
27 | title: defaultSettings.title | 32 | title: defaultSettings.title |
28 | } | 33 | } |
29 | }, | 34 | }, |
35 | created () { | ||
36 | console.log(this.permission_routes); | ||
37 | }, | ||
30 | computed: { | 38 | computed: { |
31 | ...mapGetters(['permission_routes', 'sidebar']), | 39 | ...mapGetters(['permission_routes', 'sidebar']), |
32 | activeMenu () { | 40 | activeMenu () { | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-10 15:00:56 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <div class="app-wrapper"> | 7 | <div class="app-wrapper scWrapper"> |
3 | <navbar /> | 8 | <navbar /> |
4 | <div class="main-container"> | 9 | <div class="main-container"> |
5 | <sidebar class="sidebar-container" /> | 10 | <sidebar class="sidebar-container" /> |
... | @@ -8,60 +13,66 @@ | ... | @@ -8,60 +13,66 @@ |
8 | </div> | 13 | </div> |
9 | </template> | 14 | </template> |
10 | <script> | 15 | <script> |
11 | import { AppMain, Navbar, Sidebar, TagsView } from './components' | 16 | import { AppMain, Navbar, Sidebar, TagsView } from './components' |
12 | import ResizeMixin from './mixin/ResizeHandler' | 17 | import ResizeMixin from './mixin/ResizeHandler' |
13 | import { mapState } from 'vuex' | 18 | import { mapState } from 'vuex' |
14 | export default { | 19 | export default { |
15 | name: 'Layout', | 20 | name: 'Layout', |
16 | components: { | 21 | components: { |
17 | AppMain, | 22 | AppMain, |
18 | Navbar, | 23 | Navbar, |
19 | Sidebar, | 24 | Sidebar, |
20 | TagsView | 25 | TagsView |
21 | }, | 26 | }, |
22 | mixins: [ResizeMixin], | 27 | mixins: [ResizeMixin], |
23 | computed: { | 28 | created () { |
24 | ...mapState({ | 29 | this.$store.dispatch("products/setData", "BDCSBPT"); |
25 | sidebar: state => state.app.sidebar, | 30 | console.log("ZOULEJG"); |
26 | needTagsView: state => state.settings.tagsView, | 31 | }, |
27 | fixedHeader: state => state.settings.fixedHeader | 32 | computed: { |
28 | }) | 33 | ...mapState({ |
34 | sidebar: state => state.app.sidebar, | ||
35 | needTagsView: state => state.settings.tagsView, | ||
36 | fixedHeader: state => state.settings.fixedHeader | ||
37 | }) | ||
38 | } | ||
29 | } | 39 | } |
30 | } | ||
31 | </script> | 40 | </script> |
32 | <style lang="scss" scoped> | 41 | <style lang="scss"> |
33 | @import "~@/styles/mixin.scss"; | 42 | @import "~@/styles/mixin.scss"; |
43 | @import "~@/styles/sbSidebar.scss"; | ||
34 | 44 | ||
35 | .app-wrapper { | 45 | .app-wrapper { |
36 | @include clearfix; | 46 | @include clearfix; |
37 | position: relative; | 47 | position: relative; |
38 | height: 100%; | 48 | height: 100%; |
39 | width: 100%; | 49 | width: 100%; |
40 | background-color: $containerbg; | 50 | // background-color: $containerbg; |
51 | padding: 0; | ||
41 | 52 | ||
42 | &.mobile.openSidebar { | 53 | &.mobile.openSidebar { |
43 | position: fixed; | 54 | position: fixed; |
44 | top: 0; | 55 | top: 0; |
56 | } | ||
45 | } | 57 | } |
46 | } | ||
47 | 58 | ||
48 | .drawer-bg { | 59 | .drawer-bg { |
49 | background: #000; | 60 | background: #000; |
50 | opacity: 0.3; | 61 | opacity: 0.3; |
51 | width: 100%; | 62 | width: 100%; |
52 | top: 0; | 63 | top: 0; |
53 | height: 100%; | 64 | height: 100%; |
54 | position: absolute; | 65 | position: absolute; |
55 | z-index: 999; | 66 | z-index: 999; |
56 | } | 67 | } |
57 | 68 | ||
58 | .fixed-header { | 69 | .fixed-header { |
59 | width: 100%; | 70 | width: 100%; |
60 | transition: width 0.28s; | 71 | transition: width 0.28s; |
61 | } | 72 | } |
62 | 73 | ||
63 | .el-dropdown-menu--small { | 74 | .el-dropdown-menu--small { |
64 | padding: 0; | 75 | padding: 0; |
65 | width: 5px; | 76 | width: 5px; |
66 | } | 77 | } |
67 | </style> | 78 | </style> | ... | ... |
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-10 16:43:16 | ||
5 | */ | ||
1 | import router from "./router"; | 6 | import router from "./router"; |
2 | import store from "./store"; | 7 | import store from "./store"; |
3 | import { getMenuInfo } from "@/api/user"; | 8 | import { getMenuInfo } from "@/api/user"; |
... | @@ -6,33 +11,31 @@ import "nprogress/nprogress.css"; // progress bar style | ... | @@ -6,33 +11,31 @@ import "nprogress/nprogress.css"; // progress bar style |
6 | import getPageTitle from "@/utils/get-page-title"; | 11 | import getPageTitle from "@/utils/get-page-title"; |
7 | import Cookies from "js-cookie"; | 12 | import Cookies from "js-cookie"; |
8 | NProgress.configure({ showSpinner: false }); // NProgress Configuration | 13 | NProgress.configure({ showSpinner: false }); // NProgress Configuration |
9 | |||
10 | router.beforeEach(async (to, from, next) => { | 14 | router.beforeEach(async (to, from, next) => { |
11 | NProgress.start(); | 15 | NProgress.start(); |
12 | document.title = getPageTitle(to.meta.title); | 16 | document.title = getPageTitle(to.meta.title); |
13 | let hasAddDict = store.state.dict.addDict; | 17 | let hasAddDict = store.state.dict.addDict; |
14 | let hasUser = store.state.user.hasUser; | 18 | let hasUser = store.state.user.hasUser; |
15 | let hasAddRoute = store.state.permission.addRoutes; | 19 | let hasAddRoute = store.state.permission.addRoutes; |
16 | if (to.path == "/login") { | 20 | if (to.path == "/sb" || to.path == "/jg") { |
17 | sessionStorage.removeItem("token"); | 21 | sessionStorage.removeItem("token"); |
22 | sessionStorage.setItem("psth", to.path) | ||
18 | next(); | 23 | next(); |
19 | } else { | 24 | } else { |
25 | let code = sessionStorage.getItem("psth") == "/sb" ? "BDCSBPT" : "BDCJGPT" | ||
20 | //判断token是否存在 | 26 | //判断token是否存在 |
21 | const hasToken = sessionStorage.getItem("token"); | 27 | const hasToken = sessionStorage.getItem("token"); |
22 | if (hasToken) { | 28 | if (hasToken) { |
23 | //请求用户信息 | 29 | //请求用户信息 |
24 | if (!hasUser) { | 30 | if (!hasUser) { |
25 | store.dispatch("user/getUserInfo"); | 31 | store.dispatch("user/getUserInfo"); |
26 | } | 32 | import("@/styles/public.scss"); |
27 | //加载字典 | ||
28 | if (!hasAddDict) { | ||
29 | store.dispatch("dict/generateDic"); | ||
30 | } | 33 | } |
31 | if (hasAddRoute) { | 34 | if (hasAddRoute) { |
32 | next(); | 35 | next(); |
33 | } else { | 36 | } else { |
34 | //请求菜单 | 37 | //请求菜单 |
35 | const { result: getMenuData } = (await getMenuInfo()) || []; | 38 | const { result: getMenuData } = (await getMenuInfo(code)) || []; |
36 | const accessRoutes = await store.dispatch( | 39 | const accessRoutes = await store.dispatch( |
37 | "permission/generateRoutes", | 40 | "permission/generateRoutes", |
38 | getMenuData | 41 | getMenuData |
... | @@ -42,16 +45,22 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -42,16 +45,22 @@ router.beforeEach(async (to, from, next) => { |
42 | { path: "*", redirect: "/404", hidden: true }, | 45 | { path: "*", redirect: "/404", hidden: true }, |
43 | ]); | 46 | ]); |
44 | const routeTo = Cookies.get("routerTo"); | 47 | const routeTo = Cookies.get("routerTo"); |
48 | if (!hasAddDict) { | ||
49 | await store.dispatch("dict/generateDic"); | ||
50 | } | ||
45 | if (routeTo && routeTo !== "/") { | 51 | if (routeTo && routeTo !== "/") { |
46 | next({ ...to, replace: true }); | 52 | next({ ...to, replace: true }); |
47 | } else { | 53 | } else { |
48 | next("/home"); | 54 | next("/home"); |
49 | } | 55 | } |
50 | } | 56 | } |
57 | } else if (sessionStorage.getItem("psth")) { | ||
58 | next(sessionStorage.getItem("psth")); | ||
51 | } else { | 59 | } else { |
52 | next("/login"); | 60 | next("/jg"); |
53 | } | 61 | } |
54 | } | 62 | } |
63 | |||
55 | NProgress.done(); | 64 | NProgress.done(); |
56 | }); | 65 | }); |
57 | router.afterEach((to) => { | 66 | router.afterEach((to) => { | ... | ... |
1 | import Vue from 'vue' | 1 | import Vue from 'vue' |
2 | import Router from 'vue-router' | 2 | import Router from 'vue-router' |
3 | Vue.use(Router) | 3 | Vue.use(Router) |
4 | /* Layout */ | ||
5 | import Layout from '@/layout' | 4 | import Layout from '@/layout' |
6 | /* Router Modules */ | 5 | |
7 | // import componentsRouter from './modules/components' | ||
8 | export const constantRoutes = [ | 6 | export const constantRoutes = [ |
9 | { | 7 | { |
10 | path: '/404', | 8 | path: '/404', |
... | @@ -22,9 +20,14 @@ export const constantRoutes = [ | ... | @@ -22,9 +20,14 @@ export const constantRoutes = [ |
22 | }, | 20 | }, |
23 | //登录 | 21 | //登录 |
24 | { | 22 | { |
25 | path: "/login", | 23 | path: "/jg", |
26 | name: "login", | 24 | name: "loginjg", |
27 | component: () => import("@/views/login/index.vue"), | 25 | component: () => import("@/views/loginjg/index.vue"), |
26 | }, | ||
27 | { | ||
28 | path: "/sb", | ||
29 | name: "loginsb", | ||
30 | component: () => import("@/views/loginsb/index.vue"), | ||
28 | }, | 31 | }, |
29 | // 监管首页 | 32 | // 监管首页 |
30 | { | 33 | { | ... | ... |
1 | /* | ||
2 | * @Author: xiaomiao 1158771342@qq.com | ||
3 | * @Date: 2023-03-09 15:24:53 | ||
4 | * @LastEditors: xiaomiao 1158771342@qq.com | ||
5 | * @LastEditTime: 2023-03-13 09:03:16 | ||
6 | * @FilePath: \上报\bdcjg-web\src\store\modules\permission.js | ||
7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
8 | */ | ||
1 | import { constantRoutes } from '@/router' | 9 | import { constantRoutes } from '@/router' |
2 | import asyncRouter from '@/utils/asyncRouter.js' | 10 | import asyncRouter from '@/utils/asyncRouter.js' |
3 | const state = { | 11 | const state = { |
4 | routes: [], | 12 | routes: [], |
5 | addRoutes: false, | 13 | addRoutes: false, |
6 | } | 14 | } |
7 | 15 | ||
8 | const mutations = { | 16 | const mutations = { |
9 | SET_ROUTES: (state, routes) => { | 17 | SET_ROUTES: (state, routes) => { |
10 | state.addRoutes = true | 18 | state.addRoutes = true |
11 | state.routes = routes | 19 | state.routes = routes |
12 | }, | 20 | }, |
13 | RESET_ROUTE: (state) => { | 21 | RESET_ROUTE: (state) => { |
14 | state.addRoutes = false | 22 | state.addRoutes = false |
15 | } | 23 | } |
16 | } | 24 | } |
17 | const actions = { | 25 | const actions = { |
18 | // 添加全部菜单 | 26 | // 添加全部菜单 |
19 | generateRoutes ({ commit }, getMenuInfo) { | 27 | generateRoutes ({ commit }, getMenuInfo) { |
20 | return new Promise(resolve => { | 28 | return new Promise(resolve => { |
21 | // 将权限菜单数组转成路由树数据结构 | 29 | // 将权限菜单数组转成路由树数据结构 |
22 | let permission_tree = asyncRouter(getMenuInfo) | 30 | let permission_tree = asyncRouter(getMenuInfo) |
23 | const mergeResult = _.cloneDeep(constantRoutes).concat(permission_tree); | 31 | const mergeResult = _.cloneDeep(constantRoutes).concat(permission_tree); |
24 | commit('SET_ROUTES', mergeResult) | 32 | commit('SET_ROUTES', mergeResult) |
25 | resolve(permission_tree) | 33 | resolve(permission_tree) |
26 | }) | 34 | }) |
27 | }, | 35 | }, |
28 | // 重置路由 | 36 | // 重置路由 |
29 | resetRoutes ({ commit }) { | 37 | resetRoutes ({ commit }) { |
30 | commit('RESET_ROUTE') | 38 | commit('RESET_ROUTE') |
31 | } | 39 | } |
32 | } | 40 | } |
33 | // 树转数组 | 41 | // 树转数组 |
34 | function dfs (root, fVisit) { | 42 | function dfs (root, fVisit) { |
35 | let stack = Array.isArray(root) ? [...root] : [root]; | 43 | let stack = Array.isArray(root) ? [...root] : [root]; |
36 | while (stack.length) { | 44 | while (stack.length) { |
37 | let node = stack.pop(); | 45 | let node = stack.pop(); |
38 | fVisit && fVisit(node); | 46 | fVisit && fVisit(node); |
39 | let children = node.children; | 47 | let children = node.children; |
40 | if (children && children.length) { | 48 | if (children && children.length) { |
41 | for (let i = children.length - 1; i >= 0; i--) stack.push(children[i]); | 49 | for (let i = children.length - 1; i >= 0; i--) stack.push(children[i]); |
42 | } | ||
43 | } | 50 | } |
51 | } | ||
44 | } | 52 | } |
45 | // 数组转树 | 53 | // 数组转树 |
46 | //需要插入父节点id,pid为null或'',就是找root节点,然后root节点再去找自己的子节点 | 54 | //需要插入父节点id,pid为null或'',就是找root节点,然后root节点再去找自己的子节点 |
47 | function array2Tree (data, pid) { | 55 | function array2Tree (data, pid) { |
48 | let res = []; | 56 | let res = []; |
49 | data.forEach(item => { | 57 | data.forEach(item => { |
50 | if (item.parentId === pid) { | 58 | if (item.parentId === pid) { |
51 | let itemChildren = array2Tree(data, item.id); | 59 | let itemChildren = array2Tree(data, item.id); |
52 | if (itemChildren.length) item.children = itemChildren; | 60 | if (itemChildren.length) item.children = itemChildren; |
53 | res.push(item); | 61 | res.push(item); |
54 | } | 62 | } |
55 | }); | 63 | }); |
56 | // 菜单数据反转,保持一致 | 64 | // 菜单数据反转,保持一致 |
57 | res.reverse() | 65 | res.reverse() |
58 | _.each(res, c => { | 66 | _.each(res, c => { |
59 | if (c.children && c.children.length > 0) { | 67 | if (c.children && c.children.length > 0) { |
60 | c.children.reverse() | 68 | c.children.reverse() |
61 | } | 69 | } |
62 | }) | 70 | }) |
63 | return res; | 71 | return res; |
64 | } | 72 | } |
65 | 73 | ||
66 | export default { | 74 | export default { |
67 | namespaced: true, | 75 | namespaced: true, |
68 | state, | 76 | state, |
69 | mutations, | 77 | mutations, |
70 | actions | 78 | actions |
71 | } | 79 | } | ... | ... |
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-07 09:38:47 | ||
5 | */ | ||
1 | import { getUserInfo } from "@/api/user"; | 6 | import { getUserInfo } from "@/api/user"; |
2 | const state = { | 7 | const state = { |
3 | hasUser: false, | 8 | hasUser: false, |
... | @@ -15,14 +20,14 @@ const mutations = { | ... | @@ -15,14 +20,14 @@ const mutations = { |
15 | }; | 20 | }; |
16 | 21 | ||
17 | const actions = { | 22 | const actions = { |
18 | getUserInfo({ commit }) { | 23 | getUserInfo ({ commit }) { |
19 | return new Promise(async (resolve) => { | 24 | return new Promise(async (resolve) => { |
20 | let { result: res } = await getUserInfo(); | 25 | let { result: res } = await getUserInfo(); |
21 | commit("SET_USERINFO", res); | 26 | commit("SET_USERINFO", res); |
22 | resolve(true); | 27 | resolve(true); |
23 | }); | 28 | }); |
24 | }, | 29 | }, |
25 | resetState({ commit }) { | 30 | resetState ({ commit }) { |
26 | commit("RESET_USER"); | 31 | commit("RESET_USER"); |
27 | }, | 32 | }, |
28 | }; | 33 | }; | ... | ... |
... | @@ -2,11 +2,19 @@ | ... | @@ -2,11 +2,19 @@ |
2 | overflow: hidden; | 2 | overflow: hidden; |
3 | background: url("~@/image/dialogBg.png") no-repeat !important; | 3 | background: url("~@/image/dialogBg.png") no-repeat !important; |
4 | background-size: 100% 100% !important; | 4 | background-size: 100% 100% !important; |
5 | min-height: 90vh; | ||
5 | 6 | ||
6 | .dialog_title { | 7 | .dialog_title { |
7 | display: flex; | 8 | display: flex; |
8 | position: relative; | 9 | position: relative; |
9 | top: -2px; | 10 | font-size: 22px; |
11 | top: -10px; | ||
12 | width: 38%; | ||
13 | height: 40px; | ||
14 | margin-left: 28px; | ||
15 | justify-content: center; | ||
16 | white-space: nowrap; | ||
17 | |||
10 | b { | 18 | b { |
11 | font-weight: 200; | 19 | font-weight: 200; |
12 | display: inline-block; | 20 | display: inline-block; |
... | @@ -48,10 +56,88 @@ | ... | @@ -48,10 +56,88 @@ |
48 | box-shadow: inset 0px 0px 12px 0px #02D9FD; | 56 | box-shadow: inset 0px 0px 12px 0px #02D9FD; |
49 | border-radius: 2px; | 57 | border-radius: 2px; |
50 | border: 1px solid #6BC1FC; | 58 | border: 1px solid #6BC1FC; |
51 | margin: 0 18px 15px 18px; | 59 | margin: 0 18px 10px 18px; |
60 | } | ||
61 | } | ||
62 | |||
63 | .item-content-input { | ||
64 | /deep/.el-input__inner { | ||
65 | border: none !important; | ||
66 | text-align: right; | ||
67 | } | ||
68 | } | ||
69 | |||
70 | .regularHeight { | ||
71 | display: flex; | ||
72 | flex: 1; | ||
73 | height: 100%; | ||
74 | flex-direction: column; | ||
75 | |||
76 | .editDialogBox-con, | ||
77 | .JsonEditor { | ||
78 | flex: 1; | ||
79 | height: 100%; | ||
52 | } | 80 | } |
53 | } | 81 | } |
54 | 82 | ||
83 | .dialog-from { | ||
84 | padding: 13px; | ||
85 | border-radius: 2px; | ||
86 | box-sizing: border-box; | ||
87 | |||
88 | .el-row { | ||
89 | display: flex; | ||
90 | flex-wrap: nowrap; | ||
91 | } | ||
92 | |||
93 | .el-col { | ||
94 | line-height: 18px; | ||
95 | display: flex; | ||
96 | align-items: center; | ||
97 | margin-bottom: 3px; | ||
98 | color: #B5D6DC; | ||
99 | border-radius: 2px; | ||
100 | border: 1px solid #224C7C; | ||
101 | span { | ||
102 | display: inline-block; | ||
103 | padding: 3px; | ||
104 | border-radius: 3px; | ||
105 | overflow: hidden; | ||
106 | white-space: nowrap; | ||
107 | text-align: left; | ||
108 | color: #02D9FD; | ||
109 | } | ||
110 | |||
111 | p { | ||
112 | flex: 1; | ||
113 | width: 100%; | ||
114 | padding-left: 5px; | ||
115 | line-height: 20px; | ||
116 | color: #c0c4cc; | ||
117 | cursor: not-allowed; | ||
118 | white-space: nowrap; | ||
119 | margin-right: 5px; | ||
120 | text-align: right; | ||
121 | } | ||
122 | } | ||
123 | } | ||
124 | |||
125 | /deep/.el-textarea__inner { | ||
126 | border: 1px solid #224C7C; | ||
127 | margin: 0 0 10px 0 !important; | ||
128 | width: 100% !important; | ||
129 | color: #dadde3 !important; | ||
130 | background: transparent !important; | ||
131 | } | ||
132 | |||
133 | /deep/.el-input__inner { | ||
134 | border: 1px solid #224C7C !important; | ||
135 | margin: 0 !important; | ||
136 | width: 100% !important; | ||
137 | color: #dadde3 !important; | ||
138 | background: transparent !important; | ||
139 | } | ||
140 | |||
55 | .dialog_title { | 141 | .dialog_title { |
56 | @include flex; | 142 | @include flex; |
57 | justify-content: space-between; | 143 | justify-content: space-between; |
... | @@ -60,7 +146,6 @@ | ... | @@ -60,7 +146,6 @@ |
60 | 146 | ||
61 | .el-dialog__header { | 147 | .el-dialog__header { |
62 | color: #FFFFFF; | 148 | color: #FFFFFF; |
63 | // background: #074487; | ||
64 | height: 46px !important; | 149 | height: 46px !important; |
65 | width: 97%; | 150 | width: 97%; |
66 | margin: 0 auto; | 151 | margin: 0 auto; |
... | @@ -70,6 +155,7 @@ | ... | @@ -70,6 +155,7 @@ |
70 | .el-dialog__body { | 155 | .el-dialog__body { |
71 | padding-top: 0; | 156 | padding-top: 0; |
72 | padding-bottom: 0; | 157 | padding-bottom: 0; |
158 | height: 95vh; | ||
73 | } | 159 | } |
74 | 160 | ||
75 | .el-dialog__headerbtn { | 161 | .el-dialog__headerbtn { |
... | @@ -79,7 +165,8 @@ | ... | @@ -79,7 +165,8 @@ |
79 | background-size: 100% 100%; | 165 | background-size: 100% 100%; |
80 | right: 40px; | 166 | right: 40px; |
81 | top: 33px; | 167 | top: 33px; |
82 | &:hover{ | 168 | |
169 | &:hover { | ||
83 | box-shadow: inset 0px 0px 12px 0px #02D9FD; | 170 | box-shadow: inset 0px 0px 12px 0px #02D9FD; |
84 | } | 171 | } |
85 | } | 172 | } | ... | ... |
1 | // cover some element-ui styles | 1 | // cover some element-ui styles |
2 | |||
3 | .el-breadcrumb__inner, | 2 | .el-breadcrumb__inner, |
4 | .el-breadcrumb__inner a { | 3 | .el-breadcrumb__inner a { |
5 | font-weight: 400 !important; | 4 | font-weight: 400 !important; |
... | @@ -16,6 +15,25 @@ | ... | @@ -16,6 +15,25 @@ |
16 | padding: 0 7px !important; | 15 | padding: 0 7px !important; |
17 | } | 16 | } |
18 | 17 | ||
18 | // input 样式 | ||
19 | // 全局css 加上以下代码,可以隐藏上下箭头 | ||
20 | |||
21 | // 取消input的上下箭头 | ||
22 | input::-webkit-inner-spin-button { | ||
23 | -webkit-appearance: none !important; | ||
24 | |||
25 | } | ||
26 | |||
27 | input::-webkit-outer-spin-button { | ||
28 | -webkit-appearance: none !important; | ||
29 | |||
30 | } | ||
31 | |||
32 | input[type="number"] { | ||
33 | -moz-appearance: textfield; | ||
34 | |||
35 | } | ||
36 | |||
19 | .el-upload { | 37 | .el-upload { |
20 | input[type="file"] { | 38 | input[type="file"] { |
21 | display: none !important; | 39 | display: none !important; |
... | @@ -208,10 +226,29 @@ table td { | ... | @@ -208,10 +226,29 @@ table td { |
208 | box-shadow: inset 0px 0px 20px 0px #03DBFF !important; | 226 | box-shadow: inset 0px 0px 20px 0px #03DBFF !important; |
209 | } | 227 | } |
210 | 228 | ||
211 | .el-table__body tr:hover>td { | 229 | .el-table__body tr:hover>td, |
230 | .el-table__body tr.hover-row>td.el-table__cell { | ||
212 | background: none !important; | 231 | background: none !important; |
213 | } | 232 | } |
214 | 233 | ||
234 | // table 固定列样式 | ||
235 | // tr:hover { | ||
236 | // background: #063160 !important; | ||
237 | // box-shadow: inset 0px 0px 20px 0px #03DBFF !important; | ||
238 | // } | ||
239 | // .el-table__fixed-right-patch { | ||
240 | // background-color: #073781 | ||
241 | // } | ||
242 | |||
243 | .el-table__fixed-right { | ||
244 | background-color: #073781 | ||
245 | } | ||
246 | |||
247 | .el-table__fixed::before, | ||
248 | .el-table__fixed-right::before { | ||
249 | display: none; | ||
250 | } | ||
251 | |||
215 | // 表格样式 | 252 | // 表格样式 |
216 | .el-table th { | 253 | .el-table th { |
217 | height: 48px !important; | 254 | height: 48px !important; |
... | @@ -488,4 +525,50 @@ table td { | ... | @@ -488,4 +525,50 @@ table td { |
488 | .el-select-dropdown__item.hover, | 525 | .el-select-dropdown__item.hover, |
489 | .el-select-dropdown__item:hover { | 526 | .el-select-dropdown__item:hover { |
490 | background-color: transparent !important; | 527 | background-color: transparent !important; |
528 | } | ||
529 | |||
530 | // 提示框 | ||
531 | .el-message-box { | ||
532 | background-color: #031a46; | ||
533 | border: 1px solid #5f82c7; | ||
534 | |||
535 | .el-message-box__title { | ||
536 | color: white; | ||
537 | } | ||
538 | |||
539 | .el-message-box__content { | ||
540 | color: white; | ||
541 | } | ||
542 | } | ||
543 | |||
544 | // 上级菜单 | ||
545 | .el-cascader__dropdown { | ||
546 | background-color: #031a46; | ||
547 | border: 1px solid #5f82c7; | ||
548 | |||
549 | } | ||
550 | |||
551 | .el-cascader-menu { | ||
552 | color: white; | ||
553 | } | ||
554 | |||
555 | .el-radio { | ||
556 | .el-cascader-menu:hover { | ||
557 | color: white; | ||
558 | } | ||
559 | } | ||
560 | |||
561 | .el-cascader-node:not(.is-disabled):hover, | ||
562 | .el-cascader-node:not(.is-disabled):focus { | ||
563 | background: #F5F7FA; | ||
564 | background-image: initial; | ||
565 | background-position-x: initial; | ||
566 | background-position-y: initial; | ||
567 | background-size: initial; | ||
568 | background-repeat-x: initial; | ||
569 | background-repeat-y: initial; | ||
570 | background-attachment: initial; | ||
571 | background-origin: initial; | ||
572 | background-clip: initial; | ||
573 | background-color: rgb(80, 142, 235); | ||
491 | } | 574 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | @import './mixin.scss'; | 2 | @import './mixin.scss'; |
3 | @import './transition.scss'; | 3 | @import './transition.scss'; |
4 | @import './element-ui.scss'; | 4 | @import './element-ui.scss'; |
5 | @import './sidebar.scss'; | 5 | // @import './sidebar.scss'; |
6 | 6 | ||
7 | /* CSS 初始化 */ | 7 | /* CSS 初始化 */ |
8 | html, | 8 | html, |
... | @@ -336,6 +336,15 @@ aside { | ... | @@ -336,6 +336,15 @@ aside { |
336 | color: $yellow; | 336 | color: $yellow; |
337 | } | 337 | } |
338 | 338 | ||
339 | // 操作按钮样式 | ||
340 | .btnColor { | ||
341 | color: #8DEAF9; | ||
342 | } | ||
343 | .successColor { | ||
344 | color:#67C23A | ||
345 | } | ||
346 | |||
347 | |||
339 | // 通过 入库 样式 | 348 | // 通过 入库 样式 |
340 | .adopt, | 349 | .adopt, |
341 | .success { | 350 | .success { |
... | @@ -408,4 +417,10 @@ aside { | ... | @@ -408,4 +417,10 @@ aside { |
408 | top: 2px; | 417 | top: 2px; |
409 | background: #FF7962; | 418 | background: #FF7962; |
410 | color: #FF7962; | 419 | color: #FF7962; |
420 | } | ||
421 | |||
422 | // 引入字体 | ||
423 | @font-face { | ||
424 | font-family: AliBold; | ||
425 | src: url('../image/font/Alibaba_PuHuiTi_2.0_55_Regular_85_Bold.ttf') | ||
411 | } | 426 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | #app { | 1 | .jgWrapper { |
2 | .main-container { | 2 | .main-container { |
3 | width: 100%; | 3 | width: 100%; |
4 | height: calc(100% - 74px); | 4 | height: calc(100% - 74px); |
... | @@ -340,4 +340,5 @@ | ... | @@ -340,4 +340,5 @@ |
340 | word-break: break-all; | 340 | word-break: break-all; |
341 | line-height: 20px; | 341 | line-height: 20px; |
342 | flex: 1; | 342 | flex: 1; |
343 | |||
343 | } | 344 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
This diff is collapsed.
Click to expand it.
src/styles/sbSidebar.scss
0 → 100644
1 | .scWrapper { | ||
2 | .main-container { | ||
3 | width: 100%; | ||
4 | height: calc(100% - 74px); | ||
5 | transition: margin-left 0.28s; | ||
6 | display: flex; | ||
7 | } | ||
8 | |||
9 | .sidebar-container { | ||
10 | transition: width 0.28s; | ||
11 | width: $sideBarWidth !important; | ||
12 | font-size: 0px; | ||
13 | margin-right: 15px; | ||
14 | background: #121F41; | ||
15 | |||
16 | .horizontal-collapse-transition { | ||
17 | transition: 0s width ease-in-out, 0s padding-left ease-in-out, | ||
18 | 0s padding-right ease-in-out; | ||
19 | } | ||
20 | |||
21 | .scrollbar-wrapper { | ||
22 | overflow-x: hidden !important; | ||
23 | margin-right: 0 !important; | ||
24 | |||
25 | &::-webkit-scrollbar { | ||
26 | display: none; | ||
27 | } | ||
28 | } | ||
29 | |||
30 | a { | ||
31 | display: inline-block; | ||
32 | width: 100%; | ||
33 | overflow: hidden; | ||
34 | } | ||
35 | |||
36 | .svg-icon { | ||
37 | margin-right: 5px; | ||
38 | } | ||
39 | |||
40 | .sub-el-icon { | ||
41 | margin-right: 12px; | ||
42 | margin-left: -2px; | ||
43 | } | ||
44 | |||
45 | .el-menu { | ||
46 | background-color: transparent !important; | ||
47 | border: none; | ||
48 | height: 100%; | ||
49 | width: 100% !important; | ||
50 | } | ||
51 | |||
52 | // menu hover | ||
53 | .el-menu--collapse .el-submenu__title, | ||
54 | .el-menu--collapse .submenu-title-noDropdown { | ||
55 | margin-left: 0px !important; | ||
56 | } | ||
57 | |||
58 | // 有子级 | ||
59 | .el-submenu__title { | ||
60 | padding-left: 10px !important; | ||
61 | color: $menuText; | ||
62 | height: 42px; | ||
63 | background: linear-gradient(90deg, #013874 0%, #081B56 100%); | ||
64 | margin-bottom: 8px; | ||
65 | |||
66 | &:hover { | ||
67 | color: $subMenuActiveText !important; | ||
68 | background: linear-gradient(90deg, #1D66DC 0%, #081B56 100%); | ||
69 | |||
70 | .svg-icon, | ||
71 | i, | ||
72 | span { | ||
73 | color: $subMenuActiveText !important; | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | |||
78 | // 没有子级 | ||
79 | .submenu-title-noDropdown { | ||
80 | color: $menuText; | ||
81 | padding-left: 20px; | ||
82 | margin-bottom: 8px; | ||
83 | background: linear-gradient(90deg, #013874 0%, #081B56 100%); | ||
84 | |||
85 | &:hover { | ||
86 | color: $menuActiveText !important; | ||
87 | background: linear-gradient(90deg, #1D66DC 0%, #081B56 100%); | ||
88 | |||
89 | .svg-icon { | ||
90 | color: #1ea6f8 !important; | ||
91 | } | ||
92 | |||
93 | i { | ||
94 | color: #1ea6f8 !important; | ||
95 | } | ||
96 | } | ||
97 | } | ||
98 | |||
99 | .submenu-title-noDropdown.is-active, | ||
100 | .el-submenu__title.is-active { | ||
101 | color: $menuActiveText; | ||
102 | background: linear-gradient(90deg, #1D66DC 0%, #081B56 100%); | ||
103 | |||
104 | .svg-icon { | ||
105 | color: #1ea6f8 !important; | ||
106 | } | ||
107 | |||
108 | i { | ||
109 | color: #1ea6f8 !important; | ||
110 | } | ||
111 | } | ||
112 | |||
113 | .submenu-title-noDropdown, | ||
114 | .el-submenu__title { | ||
115 | font-weight: 600; | ||
116 | font-size: $sideBarFontSize; | ||
117 | |||
118 | // margin: 0 10px; | ||
119 | >i { | ||
120 | color: $subMenuActiveText !important; | ||
121 | transform: rotate(90deg); | ||
122 | -webkit-transform: rotate(90deg); | ||
123 | -moz-transform: rotate(90deg); | ||
124 | -ms-transform: rotate(90deg); | ||
125 | -o-transform: rotate(90deg); | ||
126 | margin-right: 10px; | ||
127 | } | ||
128 | |||
129 | .svg-icon { | ||
130 | font-size: 18px; | ||
131 | margin-top: -5px; | ||
132 | } | ||
133 | } | ||
134 | |||
135 | .el-submenu.is-opened>.el-submenu__title .el-submenu__icon-arrow { | ||
136 | transform: rotateZ(0deg) !important; | ||
137 | -webkit-transform: rotateZ(0deg) !important; | ||
138 | -moz-transform: rotateZ(0deg) !important; | ||
139 | -ms-transform: rotateZ(0deg) !important; | ||
140 | -o-transform: rotateZ(0deg) !important; | ||
141 | } | ||
142 | |||
143 | .is-active>.el-submenu__title { | ||
144 | color: #fff !important; | ||
145 | } | ||
146 | |||
147 | & .nest-menu .el-submenu>.el-submenu__title, | ||
148 | & .el-submenu .el-menu-item { | ||
149 | &.is-active { | ||
150 | background-color: $subMenuHover !important; | ||
151 | color: $menuActiveText !important; | ||
152 | } | ||
153 | |||
154 | &:hover { | ||
155 | background-color: $subMenuHover !important; | ||
156 | color: $menuActiveText !important; | ||
157 | } | ||
158 | |||
159 | min-width: 130px !important; | ||
160 | background-color: transparent !important; | ||
161 | font-weight: 600; | ||
162 | font-size: $sideBarFontSize; | ||
163 | margin: 0 10px; | ||
164 | // border-radius: 6px; | ||
165 | } | ||
166 | } | ||
167 | |||
168 | .hideSidebar { | ||
169 | .sidebar-container { | ||
170 | width: 54px !important; | ||
171 | } | ||
172 | |||
173 | .submenu-title-noDropdown { | ||
174 | padding: 0 !important; | ||
175 | position: relative; | ||
176 | |||
177 | .el-tooltip { | ||
178 | padding: 0 !important; | ||
179 | |||
180 | .svg-icon { | ||
181 | margin-left: 16px; | ||
182 | } | ||
183 | |||
184 | .sub-el-icon { | ||
185 | margin-left: 19px; | ||
186 | } | ||
187 | } | ||
188 | } | ||
189 | |||
190 | .el-submenu { | ||
191 | overflow: hidden; | ||
192 | |||
193 | &>.el-submenu__title { | ||
194 | padding: 0 !important; | ||
195 | |||
196 | .svg-icon { | ||
197 | margin-left: 16px; | ||
198 | } | ||
199 | |||
200 | .sub-el-icon { | ||
201 | margin-left: 19px; | ||
202 | } | ||
203 | |||
204 | .el-submenu__icon-arrow { | ||
205 | display: none; | ||
206 | } | ||
207 | } | ||
208 | } | ||
209 | |||
210 | .el-menu--collapse { | ||
211 | .el-submenu { | ||
212 | &>.el-submenu__title { | ||
213 | &>span { | ||
214 | height: 0; | ||
215 | width: 0; | ||
216 | overflow: hidden; | ||
217 | visibility: hidden; | ||
218 | display: inline-block; | ||
219 | } | ||
220 | } | ||
221 | } | ||
222 | } | ||
223 | } | ||
224 | |||
225 | .el-menu--collapse .el-menu .el-submenu { | ||
226 | min-width: $sideBarWidth !important; | ||
227 | } | ||
228 | |||
229 | // mobile responsive | ||
230 | .mobile { | ||
231 | .main-container { | ||
232 | margin-left: 0px; | ||
233 | } | ||
234 | |||
235 | .sidebar-container { | ||
236 | transition: transform 0.28s; | ||
237 | width: $sideBarWidth !important; | ||
238 | } | ||
239 | |||
240 | &.hideSidebar { | ||
241 | .sidebar-container { | ||
242 | pointer-events: none; | ||
243 | transition-duration: 0.3s; | ||
244 | transform: translate3d(-$sideBarWidth, 0, 0); | ||
245 | } | ||
246 | } | ||
247 | } | ||
248 | |||
249 | .withoutAnimation { | ||
250 | |||
251 | .main-container, | ||
252 | .sidebar-container { | ||
253 | transition: none; | ||
254 | } | ||
255 | } | ||
256 | } | ||
257 | |||
258 | // when menu collapsed | ||
259 | .el-menu--vertical { | ||
260 | &>.el-menu { | ||
261 | .svg-icon { | ||
262 | margin-right: 16px; | ||
263 | } | ||
264 | |||
265 | .sub-el-icon { | ||
266 | margin-right: 12px; | ||
267 | margin-left: -2px; | ||
268 | } | ||
269 | } | ||
270 | |||
271 | .nest-menu .el-submenu>.el-submenu__title, | ||
272 | .el-menu-item { | ||
273 | width: calc(100% - 12px); | ||
274 | border-top-right-radius: 8px; | ||
275 | border-bottom-right-radius: 8px; | ||
276 | font-weight: 600 !important; | ||
277 | font-size: 15px !important; | ||
278 | background-color: $menuHover !important; | ||
279 | color: $menuText !important; | ||
280 | |||
281 | &:hover { | ||
282 | background-color: $menuHover !important; | ||
283 | opacity: .9; | ||
284 | |||
285 | .svg-icon, | ||
286 | i, | ||
287 | span { | ||
288 | color: $menuText; | ||
289 | } | ||
290 | } | ||
291 | } | ||
292 | |||
293 | // the scroll bar appears when the subMenu is too long | ||
294 | >.el-menu--popup { | ||
295 | max-height: 100vh; | ||
296 | overflow-y: auto; | ||
297 | background-color: #32ACFE !important; | ||
298 | border-top-right-radius: 8px; | ||
299 | border-bottom-right-radius: 8px; | ||
300 | min-width: 140px; | ||
301 | padding: 12px 0; | ||
302 | |||
303 | &::-webkit-scrollbar-track-piece { | ||
304 | background: #d3dce6; | ||
305 | } | ||
306 | |||
307 | &::-webkit-scrollbar { | ||
308 | width: 6px; | ||
309 | } | ||
310 | |||
311 | &::-webkit-scrollbar-thumb { | ||
312 | background: #99a9bf; | ||
313 | border-radius: 20px; | ||
314 | } | ||
315 | } | ||
316 | } | ||
317 | |||
318 | .el-submenu__title { | ||
319 | display: flex; | ||
320 | align-items: center; | ||
321 | } | ||
322 | |||
323 | .el-submenu__title span { | ||
324 | white-space: normal; | ||
325 | word-break: break-all; | ||
326 | line-height: 20px; | ||
327 | flex: 1; | ||
328 | padding-right: 20px; | ||
329 | } | ||
330 | |||
331 | .el-menu-item { | ||
332 | height: 42px; | ||
333 | display: flex; | ||
334 | align-items: center; | ||
335 | padding-right: 20px !important; | ||
336 | } | ||
337 | |||
338 | .el-menu-item span { | ||
339 | white-space: nowrap !important; | ||
340 | word-break: break-all; | ||
341 | line-height: 20px; | ||
342 | flex: 1; | ||
343 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-07 09:35:10 | ||
5 | */ | ||
1 | import Layout from '@/layout' | 6 | import Layout from '@/layout' |
2 | export default function filterAsyncRouter (routers) { | 7 | export default function filterAsyncRouter (routers) { |
3 | routers.forEach(item => { | 8 | routers.forEach(item => { |
... | @@ -21,4 +26,4 @@ export default function filterAsyncRouter (routers) { | ... | @@ -21,4 +26,4 @@ export default function filterAsyncRouter (routers) { |
21 | } | 26 | } |
22 | function loadView (view) { | 27 | function loadView (view) { |
23 | return r => require.ensure([], () => r(require(`@/views${view}.vue`))) | 28 | return r => require.ensure([], () => r(require(`@/views${view}.vue`))) |
24 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
29 | } | ... | ... |
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-13 14:11:50 | ||
5 | */ | ||
1 | /** | 6 | /** |
2 | * 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器 | 7 | * 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器 |
3 | */ | 8 | */ |
... | @@ -57,17 +62,17 @@ service.interceptors.response.use( | ... | @@ -57,17 +62,17 @@ service.interceptors.response.use( |
57 | } | 62 | } |
58 | ); | 63 | ); |
59 | //对错误信息的处理函数 | 64 | //对错误信息的处理函数 |
60 | function handleErrorData(status) { | 65 | function handleErrorData (status) { |
61 | switch (status) { | 66 | switch (status) { |
62 | case 401: | 67 | // case 401: |
63 | Message.error("由于长时间未操作,请重新登录!"); | 68 | // Message.error("由于长时间未操作,请重新登录!"); |
64 | router.replace({ | 69 | // router.replace({ |
65 | path: "/login", | 70 | // path: "/login/jg", |
66 | query: { | 71 | // query: { |
67 | redirect: router.history.current.fullPath, | 72 | // redirect: router.history.current.fullPath, |
68 | }, | 73 | // }, |
69 | }); | 74 | // }); |
70 | break; | 75 | // break; |
71 | case 403: | 76 | case 403: |
72 | Message.error("拒绝访问"); | 77 | Message.error("拒绝访问"); |
73 | break; | 78 | break; | ... | ... |
1 | import Vue from 'vue' | 1 | import Vue from 'vue' |
2 | 2 | ||
3 | // 下载,导出 | 3 | // 下载,导出 |
4 | Vue.prototype.$download = function(name, href) { | 4 | Vue.prototype.$download = function (name, href) { |
5 | var a = document.createElement('a') // 创建a标签 | 5 | var a = document.createElement('a') // 创建a标签 |
6 | var e = document.createEvent('MouseEvents') // 创建鼠标事件对象 | 6 | var e = document.createEvent('MouseEvents') // 创建鼠标事件对象 |
7 | e.initEvent('click', false, false) // 初始化事件对象 | 7 | e.initEvent('click', false, false) // 初始化事件对象 |
... | @@ -10,7 +10,7 @@ Vue.prototype.$download = function(name, href) { | ... | @@ -10,7 +10,7 @@ Vue.prototype.$download = function(name, href) { |
10 | a.dispatchEvent(e) // 给指定的元素,执行事件click事件 | 10 | a.dispatchEvent(e) // 给指定的元素,执行事件click事件 |
11 | } | 11 | } |
12 | // 导出json文件 | 12 | // 导出json文件 |
13 | Vue.prototype.$downloadJson = function(data, name) { | 13 | Vue.prototype.$downloadJson = function (data, name) { |
14 | // 1 生成文件的 blob 对象 | 14 | // 1 生成文件的 blob 对象 |
15 | const blobData = new Blob([JSON.stringify(data)], { | 15 | const blobData = new Blob([JSON.stringify(data)], { |
16 | type: 'application/octet-stream' | 16 | type: 'application/octet-stream' |
... | @@ -84,7 +84,7 @@ const checkCode = (rule, value, callback) => { | ... | @@ -84,7 +84,7 @@ const checkCode = (rule, value, callback) => { |
84 | // } | 84 | // } |
85 | // } | 85 | // } |
86 | // 日期格式转换 "yyyy-MM-dd HH:mm:ss" | 86 | // 日期格式转换 "yyyy-MM-dd HH:mm:ss" |
87 | Vue.prototype.$formdate = function(date) { | 87 | Vue.prototype.$formdate = function (date) { |
88 | if (!date) { | 88 | if (!date) { |
89 | return "" | 89 | return "" |
90 | } | 90 | } |
... | @@ -95,22 +95,22 @@ Vue.prototype.$formdate = function(date) { | ... | @@ -95,22 +95,22 @@ Vue.prototype.$formdate = function(date) { |
95 | var hh = (d.getHours() < 10 ? '0' + d.getHours() : d.getHours()) + ':'; | 95 | var hh = (d.getHours() < 10 ? '0' + d.getHours() : d.getHours()) + ':'; |
96 | var mm = (d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes()) + ':'; | 96 | var mm = (d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes()) + ':'; |
97 | var ss = (d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds()); | 97 | var ss = (d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds()); |
98 | return YY + MM + DD +" "+hh + mm + ss | 98 | return YY + MM + DD + " " + hh + mm + ss |
99 | } | 99 | } |
100 | // 时间格式过滤 | 100 | // 时间格式过滤 |
101 | Vue.filter('timeFilter', function(timeStr) { | 101 | Vue.filter('timeFilter', function (timeStr) { |
102 | if (timeStr) { | 102 | if (timeStr) { |
103 | return timeStr.substring(0, 10) | 103 | return timeStr.substring(0, 10) |
104 | } | 104 | } |
105 | }) | 105 | }) |
106 | export function getType(o) { | 106 | export function getType (o) { |
107 | return Object.prototype.toString.call(o).slice(8, -1) | 107 | return Object.prototype.toString.call(o).slice(8, -1) |
108 | } | 108 | } |
109 | export function isKeyType(o, type) { | 109 | export function isKeyType (o, type) { |
110 | return getType(o).toLowerCase() === type.toLowerCase() | 110 | return getType(o).toLowerCase() === type.toLowerCase() |
111 | } | 111 | } |
112 | // 深拷贝全局挂载 | 112 | // 深拷贝全局挂载 |
113 | Vue.prototype.$deepCopy = function(sth) { | 113 | Vue.prototype.$deepCopy = function (sth) { |
114 | // 深度复制数组 | 114 | // 深度复制数组 |
115 | // if (Object.prototype.toString.call(obj) === "[object Array]") { | 115 | // if (Object.prototype.toString.call(obj) === "[object Array]") { |
116 | // const object = []; | 116 | // const object = []; |
... | @@ -196,7 +196,7 @@ Vue.prototype.$dealArrNotDisabled = arr => { | ... | @@ -196,7 +196,7 @@ Vue.prototype.$dealArrNotDisabled = arr => { |
196 | } | 196 | } |
197 | } | 197 | } |
198 | } | 198 | } |
199 | function nodeDeal(arr) { | 199 | function nodeDeal (arr) { |
200 | arr.forEach(item => { | 200 | arr.forEach(item => { |
201 | delete item.disabled | 201 | delete item.disabled |
202 | if (item.children) { | 202 | if (item.children) { |
... | @@ -222,7 +222,7 @@ Vue.prototype.$dealArrDisabled = (arr, id) => { | ... | @@ -222,7 +222,7 @@ Vue.prototype.$dealArrDisabled = (arr, id) => { |
222 | } | 222 | } |
223 | } | 223 | } |
224 | } | 224 | } |
225 | function nodeDeal(arr) { | 225 | function nodeDeal (arr) { |
226 | arr.forEach(item => { | 226 | arr.forEach(item => { |
227 | item['disabled'] = true | 227 | item['disabled'] = true |
228 | if (item.children) { | 228 | if (item.children) { |
... | @@ -249,10 +249,9 @@ Vue.prototype.$getNodeRoute = (val, id) => { | ... | @@ -249,10 +249,9 @@ Vue.prototype.$getNodeRoute = (val, id) => { |
249 | } | 249 | } |
250 | } | 250 | } |
251 | }) | 251 | }) |
252 | function nodefun(newVal, newId, newCid_list) { | 252 | function nodefun (newVal, newId, newCid_list) { |
253 | let flag = false | 253 | let flag = false |
254 | newVal.forEach(j => { | 254 | newVal.forEach(j => { |
255 | // console.log(j) | ||
256 | if (j.id === newId) { | 255 | if (j.id === newId) { |
257 | newCid_list.push(j.id) | 256 | newCid_list.push(j.id) |
258 | flag = true | 257 | flag = true |
... | @@ -272,7 +271,7 @@ Vue.prototype.$getNodeRoute = (val, id) => { | ... | @@ -272,7 +271,7 @@ Vue.prototype.$getNodeRoute = (val, id) => { |
272 | return newCid_list | 271 | return newCid_list |
273 | } | 272 | } |
274 | } | 273 | } |
275 | function result(cid_list) { | 274 | function result (cid_list) { |
276 | const arr = cid_list.concat() | 275 | const arr = cid_list.concat() |
277 | arr.pop() | 276 | arr.pop() |
278 | return arr | 277 | return arr |
... | @@ -325,7 +324,7 @@ Vue.prototype.$findParent = (list, id) => { | ... | @@ -325,7 +324,7 @@ Vue.prototype.$findParent = (list, id) => { |
325 | Vue.prototype.$findChildren = (list, nodeId) => { | 324 | Vue.prototype.$findChildren = (list, nodeId) => { |
326 | let newArray = [] | 325 | let newArray = [] |
327 | let flag = false | 326 | let flag = false |
328 | function dealList(list, nodeId) { | 327 | function dealList (list, nodeId) { |
329 | if (list.length !== 0) { | 328 | if (list.length !== 0) { |
330 | list.forEach(item => { | 329 | list.forEach(item => { |
331 | if (!flag) { | 330 | if (!flag) { | ... | ... |
1 | 1 | ||
2 | import XLSX2 from "xlsx"; | ||
3 | import XLSX from "xlsx-style"; | ||
2 | /** | 4 | /** |
3 | * 获取数据类型 | 5 | * 获取数据类型 |
4 | * @param {All} [o] 需要检测的数据 | 6 | * @param {All} [o] 需要检测的数据 |
5 | * @returns {String} | 7 | * @returns {String} |
6 | */ | 8 | */ |
7 | export function getType(o) { | 9 | export function getType (o) { |
8 | return Object.prototype.toString.call(o).slice(8, -1); | 10 | return Object.prototype.toString.call(o).slice(8, -1); |
9 | } | 11 | } |
10 | /** | 12 | /** |
... | @@ -13,10 +15,10 @@ export function getType(o) { | ... | @@ -13,10 +15,10 @@ export function getType(o) { |
13 | * @param {String} [type] 数据类型 | 15 | * @param {String} [type] 数据类型 |
14 | * @returns {Boolean} | 16 | * @returns {Boolean} |
15 | */ | 17 | */ |
16 | export function isKeyType(o, type) { | 18 | export function isKeyType (o, type) { |
17 | return getType(o).toLowerCase() === type.toLowerCase(); | 19 | return getType(o).toLowerCase() === type.toLowerCase(); |
18 | } | 20 | } |
19 | export function deepCopy(sth) { | 21 | export function deepCopy (sth) { |
20 | let copy; | 22 | let copy; |
21 | if (null == sth || "object" != typeof sth) return sth; | 23 | if (null == sth || "object" != typeof sth) return sth; |
22 | if (isKeyType(sth, 'date')) { | 24 | if (isKeyType(sth, 'date')) { |
... | @@ -47,7 +49,7 @@ export function deepCopy(sth) { | ... | @@ -47,7 +49,7 @@ export function deepCopy(sth) { |
47 | * @param endLen 字符串后面保留位数 | 49 | * @param endLen 字符串后面保留位数 |
48 | * @returns {string} | 50 | * @returns {string} |
49 | */ | 51 | */ |
50 | export function hideCode(str, frontLen, endLen = 0) { | 52 | export function hideCode (str, frontLen, endLen = 0) { |
51 | var len = str.length - frontLen - endLen; | 53 | var len = str.length - frontLen - endLen; |
52 | var xing = ''; | 54 | var xing = ''; |
53 | for (var i = 0; i < len; i++) { | 55 | for (var i = 0; i < len; i++) { |
... | @@ -57,7 +59,7 @@ export function hideCode(str, frontLen, endLen = 0) { | ... | @@ -57,7 +59,7 @@ export function hideCode(str, frontLen, endLen = 0) { |
57 | }; | 59 | }; |
58 | // 数组去重 | 60 | // 数组去重 |
59 | 61 | ||
60 | export function unique(arr) { | 62 | export function unique (arr) { |
61 | var obj = {}; | 63 | var obj = {}; |
62 | return arr.filter(function (item, index, arr) { | 64 | return arr.filter(function (item, index, arr) { |
63 | return obj.hasOwnProperty(typeof item + item) ? false : (obj[typeof item + item] = true) | 65 | return obj.hasOwnProperty(typeof item + item) ? false : (obj[typeof item + item] = true) |
... | @@ -65,7 +67,7 @@ export function unique(arr) { | ... | @@ -65,7 +67,7 @@ export function unique(arr) { |
65 | } | 67 | } |
66 | // 创造id | 68 | // 创造id |
67 | 69 | ||
68 | export function getUuid(len, radix) { | 70 | export function getUuid (len, radix) { |
69 | var chars = "0123456789abcdefghijklmnopqrstuvwxyz".split( | 71 | var chars = "0123456789abcdefghijklmnopqrstuvwxyz".split( |
70 | "" | 72 | "" |
71 | ); | 73 | ); |
... | @@ -89,7 +91,7 @@ export function getUuid(len, radix) { | ... | @@ -89,7 +91,7 @@ export function getUuid(len, radix) { |
89 | } | 91 | } |
90 | 92 | ||
91 | //js计算两个时间戳之间的时间差 (月) | 93 | //js计算两个时间戳之间的时间差 (月) |
92 | export function intervalTime(startTime, endTime) { | 94 | export function intervalTime (startTime, endTime) { |
93 | // var timestamp=new Date().getTime(); //计算当前时间戳 | 95 | // var timestamp=new Date().getTime(); //计算当前时间戳 |
94 | var timestamp = (Date.parse(new Date())) / 1000;//计算当前时间戳 (毫秒级) | 96 | var timestamp = (Date.parse(new Date())) / 1000;//计算当前时间戳 (毫秒级) |
95 | var date1 = ""; //开始时间 | 97 | var date1 = ""; //开始时间 |
... | @@ -107,16 +109,184 @@ export function intervalTime(startTime, endTime) { | ... | @@ -107,16 +109,184 @@ export function intervalTime(startTime, endTime) { |
107 | return mon | 109 | return mon |
108 | } | 110 | } |
109 | // 日期转时间戳 | 111 | // 日期转时间戳 |
110 | export function js_strto_time(str_time) { | 112 | export function js_strto_time (str_time) { |
111 | var str = str_time.replace(/-/g, '/') // 将-替换成/,因为下面这个构造函数只支持/分隔的日期字符串 | 113 | var str = str_time.replace(/-/g, '/') // 将-替换成/,因为下面这个构造函数只支持/分隔的日期字符串 |
112 | var date = new Date(str) // 构造一个日期型数据,值为传入的字符串 | 114 | var date = new Date(str) // 构造一个日期型数据,值为传入的字符串 |
113 | return date.getTime() | 115 | return date.getTime() |
114 | } | 116 | } |
115 | // 时间戳转日期 | 117 | // 时间戳转日期 |
116 | export function timestampToTime(timestamp) { | 118 | export function timestampToTime (timestamp) { |
117 | var date = new Date(timestamp)//时间戳为10位需*1000,时间戳为13位的话不需乘1000 | 119 | var date = new Date(timestamp)//时间戳为10位需*1000,时间戳为13位的话不需乘1000 |
118 | var Y = date.getFullYear() + '-' | 120 | var Y = date.getFullYear() + '-' |
119 | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-' | 121 | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-' |
120 | var D = date.getDate() > 10 ? date.getDate() : '0' + date.getDate() | 122 | var D = date.getDate() > 10 ? date.getDate() : '0' + date.getDate() |
121 | return Y + M + D | 123 | return Y + M + D |
122 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
124 | } | ||
125 | |||
126 | |||
127 | function formatDate (value) { | ||
128 | var date = new Date(value); | ||
129 | var y = date.getFullYear(), | ||
130 | m = date.getMonth() + 1, | ||
131 | d = date.getDate() | ||
132 | if (m < 10) { m = '0' + m; } | ||
133 | if (d < 10) { d = '0' + d; } | ||
134 | var t = y + '-' + m + '-' + d | ||
135 | return t; | ||
136 | } | ||
137 | |||
138 | export function getCurrentDate (date = 'firstDay') { | ||
139 | var now = new Date() // 当前日期 | ||
140 | var nowYear = now.getFullYear() //当前年 | ||
141 | var nowMonth = now.getMonth() //当前月 (值为0~11) | ||
142 | var d = now.getDate() //当天 | ||
143 | if (date == 'firstDay') { | ||
144 | return formatDate(new Date(nowYear, nowMonth, 1)) // 本月开始时间 | ||
145 | } else { | ||
146 | return formatDate(new Date(nowYear, nowMonth + 1, 0)) // 本月结束时间 | ||
147 | } | ||
148 | } | ||
149 | |||
150 | export function setExport2Excel (exportName) { | ||
151 | /* generate workbook object from table */ | ||
152 | var wb = XLSX2.utils.table_to_sheet(document.querySelector("#mytable"));//mytable为表格的id名 | ||
153 | if (!wb['!merges']) { | ||
154 | this.$message.warning('无法导出:报表无数据'); | ||
155 | return | ||
156 | } | ||
157 | for (var i = 0; i < 11; i++) { | ||
158 | wb["!cols"][i] = { wpx: 150 } | ||
159 | } | ||
160 | // 样式的文档地址 | ||
161 | // https://www.npmjs.com/package/xlsx-style | ||
162 | for (const key in wb) { | ||
163 | if (key == 'A1') { | ||
164 | wb[key].s = { | ||
165 | font: {//字体设置 | ||
166 | sz: 24, | ||
167 | bold: true, | ||
168 | }, | ||
169 | alignment: {//文字居中 | ||
170 | horizontal: 'center', | ||
171 | vertical: 'center', | ||
172 | wrapText: 1, | ||
173 | indent: 0, | ||
174 | wrap_text: true | ||
175 | }, | ||
176 | border: { // 设置边框 | ||
177 | top: { style: 'thin' }, | ||
178 | bottom: { style: 'thin' }, | ||
179 | left: { style: 'thin' }, | ||
180 | right: { style: 'thin' } | ||
181 | } | ||
182 | } | ||
183 | } else if (key.indexOf('!') === -1) { | ||
184 | wb[key].s = { | ||
185 | font: {//字体设置 | ||
186 | sz: 13, | ||
187 | bold: false, | ||
188 | color: { | ||
189 | rgb: '000000'//十六进制,不带# | ||
190 | } | ||
191 | }, | ||
192 | alignment: {//文字居中 | ||
193 | horizontal: 'center', | ||
194 | vertical: 'center', | ||
195 | wrapText: 1, | ||
196 | indent: 0, | ||
197 | wrap_text: true | ||
198 | }, | ||
199 | border: { // 设置边框 | ||
200 | top: { style: 'thin' }, | ||
201 | bottom: { style: 'thin' }, | ||
202 | left: { style: 'thin' }, | ||
203 | right: { style: 'thin' } | ||
204 | } | ||
205 | } | ||
206 | } | ||
207 | } | ||
208 | var data = addRangeBorder(wb['!merges'], wb) //合并项添加边框 | ||
209 | var filedata = sheet2blob(data) | ||
210 | openDownloadDialog(filedata, exportName + ".xlsx") | ||
211 | } | ||
212 | //为合并项添加边框 | ||
213 | function addRangeBorder (range, ws) { | ||
214 | let arr = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; | ||
215 | |||
216 | range.forEach(item => { | ||
217 | let startColNumber = Number(item.s.r), endColNumber = Number(item.e.r); | ||
218 | let startRowNumber = Number(item.s.c), endRowNumber = Number(item.e.c); | ||
219 | console.log(startColNumber); | ||
220 | const test = ws[arr[startRowNumber] + (startColNumber + 1)]; | ||
221 | for (let col = startColNumber; col <= endColNumber; col++) { | ||
222 | for (let row = startRowNumber; row <= endRowNumber; row++) { | ||
223 | ws[arr[row] + (col + 1)] = test; | ||
224 | } | ||
225 | } | ||
226 | }) | ||
227 | return ws; | ||
228 | } | ||
229 | //将一个sheet转成最终的excel文件的blob对象,然后利用URL.createObjectURL下载 | ||
230 | function sheet2blob (sheet, sheetName) { | ||
231 | sheetName = sheetName || 'sheet1'; | ||
232 | var workbook = { | ||
233 | SheetNames: [sheetName], | ||
234 | Sheets: {} | ||
235 | }; | ||
236 | workbook.Sheets[sheetName] = sheet; // 生成excel的配置项 | ||
237 | |||
238 | var wopts = { | ||
239 | bookType: 'xlsx', // 要生成的文件类型 | ||
240 | bookSST: false, // 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性 | ||
241 | type: 'binary' | ||
242 | }; | ||
243 | var wbout = XLSX.write(workbook, wopts); | ||
244 | var blob = new Blob([s2ab(wbout)], { | ||
245 | type: "application/octet-stream" | ||
246 | }); // 字符串转ArrayBuffer | ||
247 | function s2ab (s) { | ||
248 | var buf = new ArrayBuffer(s.length); | ||
249 | var view = new Uint8Array(buf); | ||
250 | for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF; | ||
251 | return buf; | ||
252 | } | ||
253 | return blob; | ||
254 | } | ||
255 | function openDownloadDialog (url, saveName) { | ||
256 | if (typeof url == 'object' && url instanceof Blob) { | ||
257 | url = URL.createObjectURL(url); // 创建blob地址 | ||
258 | } | ||
259 | var aLink = document.createElement('a'); | ||
260 | aLink.href = url; | ||
261 | aLink.download = saveName || ''; // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,file:///模式下不会生效 | ||
262 | var event; | ||
263 | if (window.MouseEvent) event = new MouseEvent('click'); | ||
264 | else { | ||
265 | event = document.createEvent('MouseEvents'); | ||
266 | event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | ||
267 | } | ||
268 | aLink.dispatchEvent(event); | ||
269 | } | ||
270 | |||
271 | |||
272 | |||
273 | |||
274 | export function judgeListComplete (list) { | ||
275 | function judgeObjectComplete (obj) { | ||
276 | let flag = false | ||
277 | for (const key in obj) { | ||
278 | if (obj[key] == '' && key != 'index') { | ||
279 | flag = true | ||
280 | } | ||
281 | } | ||
282 | return flag | ||
283 | } | ||
284 | let isNotComplete = list.findIndex(item => { | ||
285 | return judgeObjectComplete(item) === true | ||
286 | }) | ||
287 | if (isNotComplete > -1) { | ||
288 | return false | ||
289 | } else { | ||
290 | return true | ||
291 | } | ||
292 | } | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/views/loginsb/index.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/statistics/css/index.scss
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/views/sthj/components/data/dbdata.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/sthj/components/data/sbdata.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/views/sthj/components/editDialog.vue
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/views/system/roles/data/roles.js
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/views/system/users/index.scss
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment