Showing
21 changed files
with
362 additions
and
193 deletions
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | 2 | ||
| 3 | -// 获取路由 | 3 | +// 获取路由所有路由 |
| 4 | export const getRouters = () => { | 4 | export const getRouters = () => { |
| 5 | return request({ | 5 | return request({ |
| 6 | url: '/bus-customer/menu/selectMenu', | 6 | url: '/bus-customer/menu/selectMenu', |
| ... | @@ -8,3 +8,10 @@ export const getRouters = () => { | ... | @@ -8,3 +8,10 @@ export const getRouters = () => { |
| 8 | }) | 8 | }) |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | +//获取用户可访问的路由 | ||
| 12 | +export const getUserRouters = () => { | ||
| 13 | + return request({ | ||
| 14 | + url: '/bus-customer/obtainUserRights', | ||
| 15 | + method: 'post' | ||
| 16 | + }) | ||
| 17 | +} | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | +import axios from "axios"; | ||
| 3 | + | ||
| 4 | +const baseUrl = process.env.VUE_APP_BASE_API; //接口地址 | ||
| 2 | 5 | ||
| 3 | // 查询客户数据 | 6 | // 查询客户数据 |
| 4 | /** | 7 | /** |
| ... | @@ -56,15 +59,62 @@ export function addCustomerData(data) { | ... | @@ -56,15 +59,62 @@ export function addCustomerData(data) { |
| 56 | //上传证书 | 59 | //上传证书 |
| 57 | export function uploadCertificate(ecomEntCode, certificate) { | 60 | export function uploadCertificate(ecomEntCode, certificate) { |
| 58 | const formData = new FormData(); | 61 | const formData = new FormData(); |
| 59 | - formData.append('certificate', certificate.multipartFile); | 62 | + formData.append('certificate', certificate); |
| 60 | - | 63 | + formData.append('ecomEntCode', ecomEntCode); |
| 61 | return request({ | 64 | return request({ |
| 62 | - url: '/bus-customer/customers/uploadCertificate?ecomEntCode=' + ecomEntCode, | 65 | + url: '/bus-customer/customers/uploadCertificate', |
| 63 | method: 'post', | 66 | method: 'post', |
| 64 | data: formData, | 67 | data: formData, |
| 65 | - headers: { | 68 | + }); |
| 66 | - 'Content-Type': 'multipart/form-data' | 69 | +} |
| 67 | - } | 70 | + |
| 71 | +//删除证书 | ||
| 72 | +export function delCertificate(id, certificate) { | ||
| 73 | + | ||
| 74 | + return request({ | ||
| 75 | + url: '/bus-customer/customers/deleteCertificate', | ||
| 76 | + method: 'post', | ||
| 77 | + params: {id:id,certificate:certificate}, | ||
| 78 | + }); | ||
| 79 | +} | ||
| 80 | + | ||
| 81 | +//下载证书 | ||
| 82 | +export function downloadCertificate(id,filename) { | ||
| 83 | + | ||
| 84 | + // return request({ | ||
| 85 | + // url: '/bus-customer/customers/getCertificate/' + id, | ||
| 86 | + // method: 'get', | ||
| 87 | + // responseType: 'blob', // 确保响应类型为 blob | ||
| 88 | + // // data: formData, | ||
| 89 | + // }); | ||
| 90 | + console.log("fileName"+filename); | ||
| 91 | + return new Promise((resolve, reject) => { | ||
| 92 | + // axios({ | ||
| 93 | + // method: "get", | ||
| 94 | + // url: '/bus-customer/customers/getCertificate/' + id, | ||
| 95 | + // responseType: "blob", | ||
| 96 | + // }) | ||
| 97 | + var url = baseUrl + '/bus-customer/customers/getCertificate/'+id; | ||
| 98 | + request({ | ||
| 99 | + url: url, | ||
| 100 | + method: 'get', | ||
| 101 | + responseType: 'blob', // 确保响应类型为 blob | ||
| 102 | + params: id, | ||
| 103 | + }) | ||
| 104 | + .then((res) => { | ||
| 105 | + console.log("aaaaaa"+res); | ||
| 106 | + const aLink = document.createElement("a"); | ||
| 107 | + aLink.href = URL.createObjectURL(res); | ||
| 108 | + aLink.setAttribute("download", filename); // 设置下载文件名称 | ||
| 109 | + document.body.appendChild(aLink); | ||
| 110 | + aLink.click(); | ||
| 111 | + document.body.removeChild(aLink); | ||
| 112 | + resolve(res); | ||
| 113 | + | ||
| 114 | + }) | ||
| 115 | + .catch((err) => { | ||
| 116 | + reject(err); | ||
| 117 | + }); | ||
| 68 | }); | 118 | }); |
| 69 | } | 119 | } |
| 70 | 120 | ||
| ... | @@ -98,7 +148,7 @@ export function updateCustomerData(data) { | ... | @@ -98,7 +148,7 @@ export function updateCustomerData(data) { |
| 98 | // formData.append("qingdaoUserId", data.qingdaoUserId); | 148 | // formData.append("qingdaoUserId", data.qingdaoUserId); |
| 99 | return request({ | 149 | return request({ |
| 100 | url: '/bus-customer/customers/update', | 150 | url: '/bus-customer/customers/update', |
| 101 | - method: 'post', | 151 | + method: 'put', |
| 102 | data: data | 152 | data: data |
| 103 | }) | 153 | }) |
| 104 | } | 154 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -51,3 +51,15 @@ export function updatePortData(data) { | ... | @@ -51,3 +51,15 @@ export function updatePortData(data) { |
| 51 | data: data | 51 | data: data |
| 52 | }) | 52 | }) |
| 53 | } | 53 | } |
| 54 | + | ||
| 55 | +// 获取口岸字典 | ||
| 56 | +/** | ||
| 57 | + * @param | ||
| 58 | + */ | ||
| 59 | +export function getPortCodeList() { | ||
| 60 | + return request({ | ||
| 61 | + url: '/bus-customer/portInfo/getPortCodeList', | ||
| 62 | + method: 'get', | ||
| 63 | + // params: data | ||
| 64 | + }) | ||
| 65 | + } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -119,13 +119,13 @@ export function updateUserData(data) { | ... | @@ -119,13 +119,13 @@ export function updateUserData(data) { |
| 119 | */ | 119 | */ |
| 120 | export function updateUserRoleChange(data) { | 120 | export function updateUserRoleChange(data) { |
| 121 | return request({ | 121 | return request({ |
| 122 | - url: '/bus-customer/user/updateUser', | 122 | + url: '/bus-customer/user/roleEditing', |
| 123 | method: 'put', | 123 | method: 'put', |
| 124 | data: data | 124 | data: data |
| 125 | }) | 125 | }) |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | -// 获取口岸字典 | 128 | +// 获取用户口岸字典 |
| 129 | /** | 129 | /** |
| 130 | * @param | 130 | * @param |
| 131 | */ | 131 | */ |
| ... | @@ -160,3 +160,15 @@ export function getUserRoleType(data) { | ... | @@ -160,3 +160,15 @@ export function getUserRoleType(data) { |
| 160 | params: data | 160 | params: data |
| 161 | }) | 161 | }) |
| 162 | } | 162 | } |
| 163 | +/** | ||
| 164 | + * 获取role已绑定的Menue | ||
| 165 | + * @param {} roleId | ||
| 166 | + * @returns | ||
| 167 | + */ | ||
| 168 | +export function getMenuByRoleId(roleId) { | ||
| 169 | + return request({ | ||
| 170 | + url: '/bus-customer/role/selectMenu?roleId='+roleId, | ||
| 171 | + method: 'get', | ||
| 172 | + // params: data | ||
| 173 | + }) | ||
| 174 | +} | ... | ... |
| ... | @@ -72,6 +72,13 @@ export const constantRoutes = [ | ... | @@ -72,6 +72,13 @@ export const constantRoutes = [ |
| 72 | // name: '首页', | 72 | // name: '首页', |
| 73 | // meta: { title: '首页', icon: 'dashboard' } | 73 | // meta: { title: '首页', icon: 'dashboard' } |
| 74 | // }, | 74 | // }, |
| 75 | + // { | ||
| 76 | + // path: '/customerConfig', | ||
| 77 | + // component: (resolve) => require(['@/views/customerConfig/index'], resolve), | ||
| 78 | + // hidden: false, | ||
| 79 | + // name: 'CustomerConfig', | ||
| 80 | + // meta: { title: '客户管理', icon: '' } | ||
| 81 | + // }, | ||
| 75 | // ] | 82 | // ] |
| 76 | // }, | 83 | // }, |
| 77 | { | 84 | { |
| ... | @@ -86,7 +93,8 @@ export const constantRoutes = [ | ... | @@ -86,7 +93,8 @@ export const constantRoutes = [ |
| 86 | hidden: false, | 93 | hidden: false, |
| 87 | name: 'ReportingData', | 94 | name: 'ReportingData', |
| 88 | meta: { title: '申报数据管理', icon: 'upload' } | 95 | meta: { title: '申报数据管理', icon: 'upload' } |
| 89 | - } | 96 | + }, |
| 97 | + | ||
| 90 | ] | 98 | ] |
| 91 | }, | 99 | }, |
| 92 | { | 100 | { |
| ... | @@ -95,13 +103,13 @@ export const constantRoutes = [ | ... | @@ -95,13 +103,13 @@ export const constantRoutes = [ |
| 95 | hidden: false, | 103 | hidden: false, |
| 96 | meta: { title: '查询管理', icon: 'fedexExportIcon' }, | 104 | meta: { title: '查询管理', icon: 'fedexExportIcon' }, |
| 97 | children: [ | 105 | children: [ |
| 98 | - { | 106 | + // { |
| 99 | - path: '/exportBillQuery', | 107 | + // path: '/exportBillQuery', |
| 100 | - component: (resolve) => require(['@/views/exportBillQuery/index'], resolve), | 108 | + // component: (resolve) => require(['@/views/exportBillQuery/index'], resolve), |
| 101 | - hidden: false, | 109 | + // hidden: false, |
| 102 | - name: 'ExportBillQuery', | 110 | + // name: 'ExportBillQuery', |
| 103 | - meta: { title: '出口订单查询', icon: '' }, | 111 | + // meta: { title: '出口订单查询', icon: '' }, |
| 104 | - }, | 112 | + // }, |
| 105 | { | 113 | { |
| 106 | path: '/exportBillDetail', | 114 | path: '/exportBillDetail', |
| 107 | component: (resolve) => require(['@/views/exportBillDetail/index'], resolve), | 115 | component: (resolve) => require(['@/views/exportBillDetail/index'], resolve), |
| ... | @@ -123,27 +131,27 @@ export const constantRoutes = [ | ... | @@ -123,27 +131,27 @@ export const constantRoutes = [ |
| 123 | name: 'ExportListDetail', | 131 | name: 'ExportListDetail', |
| 124 | meta: { title: '出口清单详情', icon: '' }, | 132 | meta: { title: '出口清单详情', icon: '' }, |
| 125 | }, | 133 | }, |
| 126 | - { | 134 | + // { |
| 127 | - path: '/exportTransportBillQuery', | 135 | + // path: '/exportTransportBillQuery', |
| 128 | - component: (resolve) => require(['@/views/exportTransportBillQuery/index'], resolve), | 136 | + // component: (resolve) => require(['@/views/exportTransportBillQuery/index'], resolve), |
| 129 | - hidden: false, | 137 | + // hidden: false, |
| 130 | - name: 'ExportTransportBillQuery', | 138 | + // name: 'ExportTransportBillQuery', |
| 131 | - meta: { title: '出口运单查询', icon: '' }, | 139 | + // meta: { title: '出口运单查询', icon: '' }, |
| 132 | - }, | 140 | + // }, |
| 133 | - { | 141 | + // { |
| 134 | - path: '/exportListQuery', | 142 | + // path: '/exportListQuery', |
| 135 | - component: (resolve) => require(['@/views/exportListQuery/index'], resolve), | 143 | + // component: (resolve) => require(['@/views/exportListQuery/index'], resolve), |
| 136 | - name: '首页', | 144 | + // name: '首页', |
| 137 | - name: 'ExportListQuery', | 145 | + // name: 'ExportListQuery', |
| 138 | - meta: { title: '出口清单查询', icon: '' } | 146 | + // meta: { title: '出口清单查询', icon: '' } |
| 139 | - }, | 147 | + // }, |
| 140 | - { | 148 | + // { |
| 141 | - path: '/listBranchQuery', | 149 | + // path: '/listBranchQuery', |
| 142 | - component: (resolve) => require(['@/views/listBranchQuery/index'], resolve), | 150 | + // component: (resolve) => require(['@/views/listBranchQuery/index'], resolve), |
| 143 | - name: 'ListBranchQuery', | 151 | + // name: 'ListBranchQuery', |
| 144 | - hidden: false, | 152 | + // hidden: false, |
| 145 | - meta: { title: '清单总分单查询', icon: '' } | 153 | + // meta: { title: '清单总分单查询', icon: '' } |
| 146 | - }, | 154 | + // }, |
| 147 | { | 155 | { |
| 148 | path: '/listBranchDetail', | 156 | path: '/listBranchDetail', |
| 149 | component: (resolve) => require(['@/views/listBranchDetail/index'], resolve), | 157 | component: (resolve) => require(['@/views/listBranchDetail/index'], resolve), |
| ... | @@ -158,85 +166,85 @@ export const constantRoutes = [ | ... | @@ -158,85 +166,85 @@ export const constantRoutes = [ |
| 158 | hidden: true, | 166 | hidden: true, |
| 159 | meta: { title: '物流离境单详情', icon: '' } | 167 | meta: { title: '物流离境单详情', icon: '' } |
| 160 | }, | 168 | }, |
| 161 | - { | 169 | + // { |
| 162 | - path: '/logisticsExitQuery', | 170 | + // path: '/logisticsExitQuery', |
| 163 | - component: (resolve) => require(['@/views/logisticsExitQuery/index'], resolve), | 171 | + // component: (resolve) => require(['@/views/logisticsExitQuery/index'], resolve), |
| 164 | - name: 'LogisticsExitQuery', | 172 | + // name: 'LogisticsExitQuery', |
| 165 | - meta: { title: '物流离境单查询', icon: '' } | 173 | + // meta: { title: '物流离境单查询', icon: '' } |
| 166 | - }, | 174 | + // }, |
| 167 | - { | 175 | + // { |
| 168 | - path: 'exportRevokeBillQuery', | 176 | + // path: 'exportRevokeBillQuery', |
| 169 | - component: (resolve) => require(['@/views/exportRevokeBillQuery/index'], resolve), | 177 | + // component: (resolve) => require(['@/views/exportRevokeBillQuery/index'], resolve), |
| 170 | - name: 'ExportRevokeBillQuery', | 178 | + // name: 'ExportRevokeBillQuery', |
| 171 | - meta: { title: '出口撤销单查询', icon: '' } | 179 | + // meta: { title: '出口撤销单查询', icon: '' } |
| 172 | - } | 180 | + // } |
| 173 | - ] | ||
| 174 | - }, | ||
| 175 | - { | ||
| 176 | - path: '/summary', | ||
| 177 | - component: Layout, | ||
| 178 | - hidden: false, | ||
| 179 | - meta: { title: '汇总申报', icon: 'fedexSummary' }, | ||
| 180 | - children: [ | ||
| 181 | - { | ||
| 182 | - path: '/summary', | ||
| 183 | - component: (resolve) => require(['@/views/summaryEdit/index'], resolve), | ||
| 184 | - hidden: false, | ||
| 185 | - name: 'Summary', | ||
| 186 | - meta: { title: '汇总申报', icon: '' } | ||
| 187 | - }, | ||
| 188 | - { | ||
| 189 | - path: '/summaryDataSearch', | ||
| 190 | - component: (resolve) => require(['@/views/summaryDataSearch/index'], resolve), | ||
| 191 | - hidden: false, | ||
| 192 | - name: 'SummaryDataSearch', | ||
| 193 | - meta: { title: '汇总申请单查询', icon: '' } | ||
| 194 | - } | ||
| 195 | - ] | ||
| 196 | - }, | ||
| 197 | - { | ||
| 198 | - path: '/system', | ||
| 199 | - component: Layout, | ||
| 200 | - hidden: false, | ||
| 201 | - meta: { title: '系统管理', icon: 'fedexQueue' }, | ||
| 202 | - children: [ | ||
| 203 | - { | ||
| 204 | - path: '/portConfig', | ||
| 205 | - component: (resolve) => require(['@/views/portConfig/index'], resolve), | ||
| 206 | - hidden: false, | ||
| 207 | - name: 'PortConfig', | ||
| 208 | - meta: { title: '口岸信息管理', icon: '' } | ||
| 209 | - }, | ||
| 210 | - { | ||
| 211 | - path: '/customerConfig', | ||
| 212 | - component: (resolve) => require(['@/views/customerConfig/index'], resolve), | ||
| 213 | - hidden: false, | ||
| 214 | - name: 'CustomerConfig', | ||
| 215 | - meta: { title: '客户管理', icon: '' } | ||
| 216 | - }, | ||
| 217 | - { | ||
| 218 | - path: '/cipherMachineConfig', | ||
| 219 | - component: (resolve) => require(['@/views/cipherMachineConfig/index'], resolve), | ||
| 220 | - hidden: false, | ||
| 221 | - name: 'CipherMachineConfig', | ||
| 222 | - meta: { title: '密码机管理', icon: '' } | ||
| 223 | - }, | ||
| 224 | - { | ||
| 225 | - path: '/userRoleConfig', | ||
| 226 | - component: (resolve) => require(['@/views/userRoleConfig/index'], resolve), | ||
| 227 | - hidden: false, | ||
| 228 | - name: 'UserRoleConfig', | ||
| 229 | - meta: { title: '用户管理权限', icon: '' } | ||
| 230 | - }, | ||
| 231 | - { | ||
| 232 | - path: '/roleConfig', | ||
| 233 | - component: (resolve) => require(['@/views/roleConfig/index'], resolve), | ||
| 234 | - hidden: false, | ||
| 235 | - name: 'RoleConfig', | ||
| 236 | - meta: { title: '角色管理权限', icon: '' } | ||
| 237 | - }, | ||
| 238 | ] | 181 | ] |
| 239 | }, | 182 | }, |
| 183 | + // { | ||
| 184 | + // path: '/summary', | ||
| 185 | + // component: Layout, | ||
| 186 | + // hidden: false, | ||
| 187 | + // meta: { title: '汇总申报', icon: 'fedexSummary' }, | ||
| 188 | + // children: [ | ||
| 189 | + // { | ||
| 190 | + // path: '/summary', | ||
| 191 | + // component: (resolve) => require(['@/views/summaryEdit/index'], resolve), | ||
| 192 | + // hidden: false, | ||
| 193 | + // name: 'Summary', | ||
| 194 | + // meta: { title: '汇总申报', icon: '' } | ||
| 195 | + // }, | ||
| 196 | + // { | ||
| 197 | + // path: '/summaryDataSearch', | ||
| 198 | + // component: (resolve) => require(['@/views/summaryDataSearch/index'], resolve), | ||
| 199 | + // hidden: false, | ||
| 200 | + // name: 'SummaryDataSearch', | ||
| 201 | + // meta: { title: '汇总申请单查询', icon: '' } | ||
| 202 | + // } | ||
| 203 | + // ] | ||
| 204 | + // }, | ||
| 205 | + // { | ||
| 206 | + // path: '/system', | ||
| 207 | + // component: Layout, | ||
| 208 | + // hidden: false, | ||
| 209 | + // meta: { title: '系统管理', icon: 'fedexQueue' }, | ||
| 210 | + // children: [ | ||
| 211 | + // { | ||
| 212 | + // path: '/portConfig', | ||
| 213 | + // component: (resolve) => require(['@/views/portConfig/index'], resolve), | ||
| 214 | + // hidden: false, | ||
| 215 | + // name: 'PortConfig', | ||
| 216 | + // meta: { title: '口岸信息管理', icon: '' } | ||
| 217 | + // }, | ||
| 218 | + // { | ||
| 219 | + // path: '/customerConfig', | ||
| 220 | + // component: (resolve) => require(['@/views/customerConfig/index'], resolve), | ||
| 221 | + // hidden: false, | ||
| 222 | + // name: 'CustomerConfig', | ||
| 223 | + // meta: { title: '客户管理', icon: '' } | ||
| 224 | + // }, | ||
| 225 | + // { | ||
| 226 | + // path: '/cipherMachineConfig', | ||
| 227 | + // component: (resolve) => require(['@/views/cipherMachineConfig/index'], resolve), | ||
| 228 | + // hidden: false, | ||
| 229 | + // name: 'CipherMachineConfig', | ||
| 230 | + // meta: { title: '密码机管理', icon: '' } | ||
| 231 | + // }, | ||
| 232 | + // { | ||
| 233 | + // path: '/userRoleConfig', | ||
| 234 | + // component: (resolve) => require(['@/views/userRoleConfig/index'], resolve), | ||
| 235 | + // hidden: false, | ||
| 236 | + // name: 'UserRoleConfig', | ||
| 237 | + // meta: { title: '用户管理权限', icon: '' } | ||
| 238 | + // }, | ||
| 239 | + // { | ||
| 240 | + // path: '/roleConfig', | ||
| 241 | + // component: (resolve) => require(['@/views/roleConfig/index'], resolve), | ||
| 242 | + // hidden: false, | ||
| 243 | + // name: 'RoleConfig', | ||
| 244 | + // meta: { title: '角色管理权限', icon: '' } | ||
| 245 | + // }, | ||
| 246 | + // ] | ||
| 247 | + // }, | ||
| 240 | ] | 248 | ] |
| 241 | 249 | ||
| 242 | export default new Router({ | 250 | export default new Router({ | ... | ... |
| 1 | import { constantRoutes } from '@/router' | 1 | import { constantRoutes } from '@/router' |
| 2 | -import { getRouters } from '@/api/menu' | 2 | +import { getRouters,getUserRouters } from '@/api/menu' |
| 3 | import Layout from '@/layout/index' | 3 | import Layout from '@/layout/index' |
| 4 | import ParentView from '@/components/ParentView'; | 4 | import ParentView from '@/components/ParentView'; |
| 5 | import { titleCase } from '@/utils/index.js' | 5 | import { titleCase } from '@/utils/index.js' |
| ... | @@ -16,7 +16,7 @@ const permission = { | ... | @@ -16,7 +16,7 @@ const permission = { |
| 16 | mutations: { | 16 | mutations: { |
| 17 | SET_ROUTES: (state, routes) => { | 17 | SET_ROUTES: (state, routes) => { |
| 18 | state.addRoutes = routes | 18 | state.addRoutes = routes |
| 19 | - // state.routes = constantRoutes.concat(routes) | 19 | + state.routes = constantRoutes.concat(routes) |
| 20 | }, | 20 | }, |
| 21 | SET_DEFAULT_ROUTES: (state, routes) => { | 21 | SET_DEFAULT_ROUTES: (state, routes) => { |
| 22 | state.defaultRoutes = constantRoutes.concat(routes) | 22 | state.defaultRoutes = constantRoutes.concat(routes) |
| ... | @@ -38,9 +38,9 @@ const permission = { | ... | @@ -38,9 +38,9 @@ const permission = { |
| 38 | async GenerateRoutes({ commit }) { | 38 | async GenerateRoutes({ commit }) { |
| 39 | return new Promise(resolve => { | 39 | return new Promise(resolve => { |
| 40 | // 向后端请求路由数据 | 40 | // 向后端请求路由数据 |
| 41 | - getRouters().then(res => { | 41 | + getUserRouters().then(res => { |
| 42 | - const sdata = constantRoutes | 42 | + const sdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))) |
| 43 | - const rdata = constantRoutes | 43 | + const rdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))) |
| 44 | const sidebarRoutes = filterAsyncRouter(sdata) | 44 | const sidebarRoutes = filterAsyncRouter(sdata) |
| 45 | const rewriteRoutes = filterAsyncRouter(rdata, false, true) | 45 | const rewriteRoutes = filterAsyncRouter(rdata, false, true) |
| 46 | rewriteRoutes.push({ path: '*', redirect: '/reportingData', hidden: true }) | 46 | rewriteRoutes.push({ path: '*', redirect: '/reportingData', hidden: true }) |
| ... | @@ -137,47 +137,76 @@ function setRoute(route, childrens) { | ... | @@ -137,47 +137,76 @@ function setRoute(route, childrens) { |
| 137 | return route | 137 | return route |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | -//针对出口数据结构特殊处理 | 140 | +function routeItemInfo(data) { |
| 141 | -function routeItemInfo(val) { | 141 | + const routes = [ |
| 142 | - let arr = val | 142 | + { |
| 143 | - let router = [] | 143 | + path: '/redirect', |
| 144 | - let childrens = [] | 144 | + component: Layout, |
| 145 | - let url = location.origin + '/Emp/#login?token=' + getToken() | 145 | + hidden: true, |
| 146 | - arr.forEach(item => { | 146 | + children: [ |
| 147 | - let obj = {} | 147 | + { |
| 148 | - if (item.xtype != 'Emp') { | 148 | + path: '/redirect/:path(.*)', |
| 149 | - obj = { | 149 | + component: (resolve) => require(['@/views/redirect'], resolve) |
| 150 | - children: [], | 150 | + } |
| 151 | - component: item.id == '999999' ? 'Layout' : `/${item.xtype}`, | 151 | + ] |
| 152 | - hidden: item.id == '999999' ? true : false, | ||
| 153 | - id: Number(item.number), | ||
| 154 | - meta: { | ||
| 155 | - title: item.text, | ||
| 156 | - icon: item.icon, | ||
| 157 | }, | 152 | }, |
| 158 | - name: item.xtype != null && item.xtype != '' ? item.xtype.indexOf('/') >= 0 ? titleCase(item.xtype.split('/')[1]) : titleCase(item.xtype) : '', | 153 | + { |
| 159 | - parentId: !item.parentId ? 0 : Number(item.parentId), | 154 | + path: '/404', |
| 160 | - path: item.id == '999999' ? '' : !item.parentId ? `/${item.id}` : `${item.id}`, | 155 | + component: (resolve) => require(['@/views/error/404'], resolve), |
| 161 | - // title: item.text, | 156 | + hidden: true |
| 162 | - // icon: item.icon | ||
| 163 | - } | ||
| 164 | - if (obj.path == 'system_appSystemConfigCenter_env' || obj.path == 'system_appSystemConfigCenter_detail') { | ||
| 165 | - obj.hidden = true | ||
| 166 | - } | ||
| 167 | - } else { | ||
| 168 | - obj = { | ||
| 169 | - component: 'Link', | ||
| 170 | - path: url, | ||
| 171 | - meta: { | ||
| 172 | - title: item.text, | ||
| 173 | - icon: item.icon, | ||
| 174 | }, | 157 | }, |
| 158 | + { | ||
| 159 | + path: '/401', | ||
| 160 | + component: (resolve) => require(['@/views/error/401'], resolve), | ||
| 161 | + hidden: true | ||
| 162 | + }, | ||
| 163 | + { | ||
| 164 | + path: '/login', | ||
| 165 | + component: (resolve) => require(['@/views/login'], resolve), | ||
| 166 | + hidden: true, | ||
| 167 | + meta: { noCache: true } | ||
| 168 | + }, | ||
| 169 | + { | ||
| 170 | + path: '/relogin', | ||
| 171 | + component: (resolve) => require(['@/views/redjrectLogin'], resolve), | ||
| 172 | + hidden: true, | ||
| 173 | + meta: { noCache: true, breadcrumb: false } | ||
| 175 | } | 174 | } |
| 176 | - } | 175 | + ]; |
| 177 | - item.parentId ? childrens.push(obj) : | 176 | + |
| 178 | - router.push(obj) | 177 | + data.forEach(item => { |
| 179 | - }) | 178 | + const isParent=item.parentId==0 && item.children.length==0; |
| 180 | - return setRoute(router, childrens) | 179 | + const route = { |
| 180 | + path: item.path, | ||
| 181 | + component: "Layout", | ||
| 182 | + alwaysShow: true, | ||
| 183 | + hidden: false, | ||
| 184 | + meta: { title: item.name, icon: item.icon }, | ||
| 185 | + children: !isParent ? item.children.map(child => ({ | ||
| 186 | + path: child.path, | ||
| 187 | + component: `${child.path}`, | ||
| 188 | + hidden: false, | ||
| 189 | + name: child.name, | ||
| 190 | + meta: { title: child.name, icon: child.icon || '' } | ||
| 191 | + })) | ||
| 192 | + : | ||
| 193 | + [ | ||
| 194 | + { | ||
| 195 | + path: item.path, | ||
| 196 | + component: `${item.path}`, | ||
| 197 | + hidden: false, | ||
| 198 | + name: item.name, | ||
| 199 | + meta: { title: item.name, icon: item.icon || '' } | ||
| 200 | + } | ||
| 201 | + ] | ||
| 202 | + | ||
| 203 | + | ||
| 204 | + }; | ||
| 205 | + routes.push(route); | ||
| 206 | + }); | ||
| 207 | + | ||
| 208 | + console.log(routes); | ||
| 209 | + return routes; | ||
| 181 | } | 210 | } |
| 182 | 211 | ||
| 183 | export const loadView = (view) => { // 路由懒加载 | 212 | export const loadView = (view) => { // 路由懒加载 | ... | ... |
| ... | @@ -48,6 +48,19 @@ | ... | @@ -48,6 +48,19 @@ |
| 48 | ></el-button> | 48 | ></el-button> |
| 49 | </el-form-item> | 49 | </el-form-item> |
| 50 | </el-col> | 50 | </el-col> |
| 51 | + <el-col :span="2"> | ||
| 52 | + <!-- 清空查询条件--> | ||
| 53 | + <el-form-item class="textLeft textCenter"> | ||
| 54 | + <el-button | ||
| 55 | + type="text" | ||
| 56 | + size="small" | ||
| 57 | + icon="el-icon-refresh" | ||
| 58 | + @click="clear" | ||
| 59 | + > | ||
| 60 | + 重置 | ||
| 61 | + </el-button> | ||
| 62 | + </el-form-item> | ||
| 63 | + </el-col> | ||
| 51 | </el-row> | 64 | </el-row> |
| 52 | </el-form> | 65 | </el-form> |
| 53 | <div class="optionButton"> | 66 | <div class="optionButton"> |
| ... | @@ -191,8 +204,8 @@ export default { | ... | @@ -191,8 +204,8 @@ export default { |
| 191 | obj.endCreationTime = ""; | 204 | obj.endCreationTime = ""; |
| 192 | obj.startCreationTime = ""; | 205 | obj.startCreationTime = ""; |
| 193 | if (obj.creationTime.length > 0) { | 206 | if (obj.creationTime.length > 0) { |
| 194 | - obj.endCreationTime = obj.creationTime[0]; | 207 | + obj.endCreationTime = obj.creationTime[1]; |
| 195 | - obj.startCreationTime = obj.creationTime[1]; | 208 | + obj.startCreationTime = obj.creationTime[0]; |
| 196 | } | 209 | } |
| 197 | getCipherMachineList(obj) | 210 | getCipherMachineList(obj) |
| 198 | .then((res) => { | 211 | .then((res) => { |
| ... | @@ -247,6 +260,12 @@ export default { | ... | @@ -247,6 +260,12 @@ export default { |
| 247 | }); | 260 | }); |
| 248 | } | 261 | } |
| 249 | }, | 262 | }, |
| 263 | + clear() { | ||
| 264 | + this.sreachFormData={ | ||
| 265 | + cipherMachineNumber: "", | ||
| 266 | + creationTime: [], | ||
| 267 | + }; | ||
| 268 | + } | ||
| 250 | }, | 269 | }, |
| 251 | }; | 270 | }; |
| 252 | </script> | 271 | </script> | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -144,7 +144,7 @@ | ... | @@ -144,7 +144,7 @@ |
| 144 | <template slot="optionColumn"> | 144 | <template slot="optionColumn"> |
| 145 | <el-table-column align="left" label="操作" width="150"> | 145 | <el-table-column align="left" label="操作" width="150"> |
| 146 | <template slot-scope="scope"> | 146 | <template slot-scope="scope"> |
| 147 | - <el-button type="text" @click="downloadFile(scope.row)"> | 147 | + <el-button type="text" @click="downloadFile(scope.row)" :disabled="!scope.row.certificare"> |
| 148 | 下载证书 | 148 | 下载证书 |
| 149 | </el-button> | 149 | </el-button> |
| 150 | <el-button type="text" @click="update(scope.row)"> 修改 </el-button> | 150 | <el-button type="text" @click="update(scope.row)"> 修改 </el-button> |
| ... | @@ -157,14 +157,13 @@ | ... | @@ -157,14 +157,13 @@ |
| 157 | :title="dialogTitle" | 157 | :title="dialogTitle" |
| 158 | :type="editType" | 158 | :type="editType" |
| 159 | :active="activeData" | 159 | :active="activeData" |
| 160 | - :dict="dict" | ||
| 161 | @close="dialogClose" | 160 | @close="dialogClose" |
| 162 | /> | 161 | /> |
| 163 | </div> | 162 | </div> |
| 164 | </template> | 163 | </template> |
| 165 | 164 | ||
| 166 | <script> | 165 | <script> |
| 167 | -import { getCustomerList } from "@/api/system/customer-ai.js"; | 166 | +import { getCustomerList,downloadCertificate } from "@/api/system/customer-ai.js"; |
| 168 | import { getPortList } from "@/api/system/user.js"; | 167 | import { getPortList } from "@/api/system/user.js"; |
| 169 | import DialogVue from "./dialog.vue"; | 168 | import DialogVue from "./dialog.vue"; |
| 170 | export default { | 169 | export default { |
| ... | @@ -244,12 +243,12 @@ export default { | ... | @@ -244,12 +243,12 @@ export default { |
| 244 | align: "left", | 243 | align: "left", |
| 245 | }, | 244 | }, |
| 246 | ], | 245 | ], |
| 247 | - dict: { | 246 | + // dict: { |
| 248 | - orderRequester: [ | 247 | + // orderRequester: [ |
| 249 | - { name: "企业", code: "ENTERPRISE_DECLARATION", value: "1" }, | 248 | + // { name: "企业", code: "ENTERPRISE_DECLARATION", value: "1" }, |
| 250 | - { name: "FEDEX", code: "FEDEX_DECLARATION", value: "2" }, | 249 | + // { name: "FEDEX", code: "FEDEX_DECLARATION", value: "2" }, |
| 251 | - ], | 250 | + // ], |
| 252 | - }, | 251 | + // }, |
| 253 | loadings: { | 252 | loadings: { |
| 254 | searchLoading: false, | 253 | searchLoading: false, |
| 255 | }, | 254 | }, |
| ... | @@ -319,17 +318,28 @@ export default { | ... | @@ -319,17 +318,28 @@ export default { |
| 319 | }; | 318 | }; |
| 320 | }, | 319 | }, |
| 321 | //下载证书 | 320 | //下载证书 |
| 322 | - downloadFile(val) {}, | 321 | + downloadFile(val) { |
| 322 | + downloadCertificate(val.id,val.certificare).then((res)=>{ | ||
| 323 | + | ||
| 324 | + }).catch((err)=>{ | ||
| 325 | + console.log(err); | ||
| 326 | + this.alertErrorMsg("证书下载失败,请联系管理员!"); | ||
| 327 | + }) | ||
| 328 | + }, | ||
| 323 | addCustomer() { | 329 | addCustomer() { |
| 324 | this.dialogTitle = "新增客户"; | 330 | this.dialogTitle = "新增客户"; |
| 325 | this.editType = "add"; | 331 | this.editType = "add"; |
| 326 | this.outerVisible = true; | 332 | this.outerVisible = true; |
| 327 | }, | 333 | }, |
| 328 | update(val) { | 334 | update(val) { |
| 335 | + let data={ | ||
| 336 | + ...val, | ||
| 337 | + file:null | ||
| 338 | + } | ||
| 329 | this.dialogTitle = "修改客户"; | 339 | this.dialogTitle = "修改客户"; |
| 330 | this.editType = "update"; | 340 | this.editType = "update"; |
| 331 | this.outerVisible = true; | 341 | this.outerVisible = true; |
| 332 | - this.activeData = val; | 342 | + this.activeData = data; |
| 333 | console.log(this.activeData); | 343 | console.log(this.activeData); |
| 334 | }, | 344 | }, |
| 335 | dialogClose() { | 345 | dialogClose() { | ... | ... |
| ... | @@ -46,7 +46,7 @@ | ... | @@ -46,7 +46,7 @@ |
| 46 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" | 46 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" |
| 47 | :key="index" | 47 | :key="index" |
| 48 | :label="item.itemChineseName" | 48 | :label="item.itemChineseName" |
| 49 | - :value="item.itemCode" | 49 | + :value="item.itemValue" |
| 50 | ></el-option> | 50 | ></el-option> |
| 51 | </el-select> | 51 | </el-select> |
| 52 | </Formitem> | 52 | </Formitem> | ... | ... |
| ... | @@ -661,13 +661,13 @@ | ... | @@ -661,13 +661,13 @@ |
| 661 | </el-col> | 661 | </el-col> |
| 662 | <!-- 申报时间 --> | 662 | <!-- 申报时间 --> |
| 663 | <el-col :span="3"> | 663 | <el-col :span="3"> |
| 664 | - <Formitem label="报送时间" prop="appTimeStr"> | 664 | + <Formitem label="报送时间" prop="appTime"> |
| 665 | <el-input | 665 | <el-input |
| 666 | type="text" | 666 | type="text" |
| 667 | class="inputShadow" | 667 | class="inputShadow" |
| 668 | - id="inputInner--appTimeStr" | 668 | + id="inputInner--appTime" |
| 669 | resize="none" | 669 | resize="none" |
| 670 | - v-model="formData.appTimeStr" | 670 | + v-model="formData.appTime" |
| 671 | clearable | 671 | clearable |
| 672 | placeholder="" | 672 | placeholder="" |
| 673 | ></el-input> | 673 | ></el-input> | ... | ... |
| ... | @@ -125,7 +125,7 @@ | ... | @@ -125,7 +125,7 @@ |
| 125 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" | 125 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" |
| 126 | :key="index" | 126 | :key="index" |
| 127 | :label="item.itemChineseName" | 127 | :label="item.itemChineseName" |
| 128 | - :value="item.itemCode" | 128 | + :value="item.itemValue" |
| 129 | ></el-option> | 129 | ></el-option> |
| 130 | </el-select> | 130 | </el-select> |
| 131 | </Formitem> | 131 | </Formitem> | ... | ... |
| ... | @@ -41,7 +41,7 @@ | ... | @@ -41,7 +41,7 @@ |
| 41 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" | 41 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" |
| 42 | :key="index" | 42 | :key="index" |
| 43 | :label="item.itemChineseName" | 43 | :label="item.itemChineseName" |
| 44 | - :value="item.itemCode" | 44 | + :value="item.itemValue" |
| 45 | ></el-option> | 45 | ></el-option> |
| 46 | </el-select> | 46 | </el-select> |
| 47 | </Formitem> | 47 | </Formitem> |
| ... | @@ -171,7 +171,7 @@ export default { | ... | @@ -171,7 +171,7 @@ export default { |
| 171 | }, | 171 | }, |
| 172 | { | 172 | { |
| 173 | name: "创建时间", | 173 | name: "创建时间", |
| 174 | - value: "createTimeStr", | 174 | + value: "createTime", |
| 175 | width: "", | 175 | width: "", |
| 176 | align: "left", | 176 | align: "left", |
| 177 | }, | 177 | }, | ... | ... |
| ... | @@ -46,7 +46,7 @@ | ... | @@ -46,7 +46,7 @@ |
| 46 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" | 46 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" |
| 47 | :key="index" | 47 | :key="index" |
| 48 | :label="item.itemChineseName" | 48 | :label="item.itemChineseName" |
| 49 | - :value="item.itemCode" | 49 | + :value="item.itemValue" |
| 50 | ></el-option> | 50 | ></el-option> |
| 51 | </el-select> | 51 | </el-select> |
| 52 | </Formitem> | 52 | </Formitem> |
| ... | @@ -207,7 +207,7 @@ export default { | ... | @@ -207,7 +207,7 @@ export default { |
| 207 | }, | 207 | }, |
| 208 | { | 208 | { |
| 209 | name: "创建时间", | 209 | name: "创建时间", |
| 210 | - value: "createTimeStr", | 210 | + value: "createTime", |
| 211 | width: "", | 211 | width: "", |
| 212 | align: "left", | 212 | align: "left", |
| 213 | }, | 213 | }, | ... | ... |
| ... | @@ -210,13 +210,13 @@ | ... | @@ -210,13 +210,13 @@ |
| 210 | </Formitem> | 210 | </Formitem> |
| 211 | </el-col> --> | 211 | </el-col> --> |
| 212 | <el-col :span="3"> | 212 | <el-col :span="3"> |
| 213 | - <Formitem label="报送时间" prop="createTimeStr"> | 213 | + <Formitem label="报送时间" prop="createTime"> |
| 214 | <el-input | 214 | <el-input |
| 215 | type="text" | 215 | type="text" |
| 216 | class="inputShadow" | 216 | class="inputShadow" |
| 217 | - id="inputInner--createTimeStr" | 217 | + id="inputInner--createTime" |
| 218 | resize="none" | 218 | resize="none" |
| 219 | - v-model="formData.createTimeStr" | 219 | + v-model="formData.createTime" |
| 220 | clearable | 220 | clearable |
| 221 | placeholder="" | 221 | placeholder="" |
| 222 | ></el-input> | 222 | ></el-input> | ... | ... |
| ... | @@ -41,7 +41,7 @@ | ... | @@ -41,7 +41,7 @@ |
| 41 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" | 41 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" |
| 42 | :key="index" | 42 | :key="index" |
| 43 | :label="item.itemChineseName" | 43 | :label="item.itemChineseName" |
| 44 | - :value="item.itemCode" | 44 | + :value="item.itemValue" |
| 45 | ></el-option> | 45 | ></el-option> |
| 46 | </el-select> | 46 | </el-select> |
| 47 | </Formitem> | 47 | </Formitem> | ... | ... |
| ... | @@ -41,7 +41,7 @@ | ... | @@ -41,7 +41,7 @@ |
| 41 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" | 41 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" |
| 42 | :key="index" | 42 | :key="index" |
| 43 | :label="item.itemChineseName" | 43 | :label="item.itemChineseName" |
| 44 | - :value="item.itemCode" | 44 | + :value="item.itemValue" |
| 45 | ></el-option> | 45 | ></el-option> |
| 46 | </el-select> | 46 | </el-select> |
| 47 | </Formitem> | 47 | </Formitem> | ... | ... |
| ... | @@ -128,8 +128,8 @@ | ... | @@ -128,8 +128,8 @@ |
| 128 | </template> | 128 | </template> |
| 129 | 129 | ||
| 130 | <script> | 130 | <script> |
| 131 | -import { getPortConfigList } from "@/api/system/port-api.js"; | 131 | +import { getPortConfigList,getPortCodeList } from "@/api/system/port-api.js"; |
| 132 | -import { getPortList } from "@/api/system/user.js"; | 132 | +// import { getPortList } from "@/api/system/user.js"; |
| 133 | import DialogVue from "./dialog.vue"; | 133 | import DialogVue from "./dialog.vue"; |
| 134 | export default { | 134 | export default { |
| 135 | name: "PortConfig", | 135 | name: "PortConfig", |
| ... | @@ -236,7 +236,7 @@ export default { | ... | @@ -236,7 +236,7 @@ export default { |
| 236 | }, | 236 | }, |
| 237 | //获取口岸子字典 | 237 | //获取口岸子字典 |
| 238 | searchPortDictData() { | 238 | searchPortDictData() { |
| 239 | - getPortList() | 239 | + getPortCodeList() |
| 240 | .then((res) => { | 240 | .then((res) => { |
| 241 | if (res.code === "200") { | 241 | if (res.code === "200") { |
| 242 | this.dict.port = res.data; | 242 | this.dict.port = res.data; | ... | ... |
| ... | @@ -102,7 +102,7 @@ | ... | @@ -102,7 +102,7 @@ |
| 102 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" | 102 | v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS" |
| 103 | :key="index" | 103 | :key="index" |
| 104 | :label="item.itemChineseName" | 104 | :label="item.itemChineseName" |
| 105 | - :value="item.itemCode" | 105 | + :value="item.itemValue" |
| 106 | ></el-option> | 106 | ></el-option> |
| 107 | </el-select> | 107 | </el-select> |
| 108 | </Formitem> | 108 | </Formitem> |
| ... | @@ -186,7 +186,7 @@ | ... | @@ -186,7 +186,7 @@ |
| 186 | ref="entryTable" | 186 | ref="entryTable" |
| 187 | :data="tableData" | 187 | :data="tableData" |
| 188 | :headerData="headerData" | 188 | :headerData="headerData" |
| 189 | - :maxHeight="tableMaxheight" | 189 | + :height="430" |
| 190 | :border="true" | 190 | :border="true" |
| 191 | :pagination="true" | 191 | :pagination="true" |
| 192 | :order="false" | 192 | :order="false" |
| ... | @@ -349,7 +349,7 @@ export default { | ... | @@ -349,7 +349,7 @@ export default { |
| 349 | }, | 349 | }, |
| 350 | { | 350 | { |
| 351 | name: "电商企业", | 351 | name: "电商企业", |
| 352 | - value: "ebccode", | 352 | + value: "ecomEntName", |
| 353 | width: "", | 353 | width: "", |
| 354 | align: "left", | 354 | align: "left", |
| 355 | }, | 355 | }, | ... | ... |
| ... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
| 6 | :show-close="false" | 6 | :show-close="false" |
| 7 | width="25%" | 7 | width="25%" |
| 8 | :close-on-click-modal="false" | 8 | :close-on-click-modal="false" |
| 9 | + :destroy-on-close="true" | ||
| 9 | v-loading="loadings.dialogLoading" | 10 | v-loading="loadings.dialogLoading" |
| 10 | @close="close" | 11 | @close="close" |
| 11 | > | 12 | > |
| ... | @@ -67,6 +68,7 @@ import { | ... | @@ -67,6 +68,7 @@ import { |
| 67 | addRoleData, | 68 | addRoleData, |
| 68 | updateRoleData, | 69 | updateRoleData, |
| 69 | updateRoleMenuData, | 70 | updateRoleMenuData, |
| 71 | + getMenuByRoleId, | ||
| 70 | } from "@/api/system/user.js"; | 72 | } from "@/api/system/user.js"; |
| 71 | import { getRouters } from "@/api/menu"; | 73 | import { getRouters } from "@/api/menu"; |
| 72 | export default { | 74 | export default { |
| ... | @@ -134,6 +136,7 @@ export default { | ... | @@ -134,6 +136,7 @@ export default { |
| 134 | } else if (this.type == "menuChange") { | 136 | } else if (this.type == "menuChange") { |
| 135 | this.formData = this.active; | 137 | this.formData = this.active; |
| 136 | this.searchTreeData(); | 138 | this.searchTreeData(); |
| 139 | + this.loadCheckedKeys();//加载已绑定的菜单 | ||
| 137 | } | 140 | } |
| 138 | } | 141 | } |
| 139 | }, | 142 | }, |
| ... | @@ -284,8 +287,27 @@ export default { | ... | @@ -284,8 +287,27 @@ export default { |
| 284 | this.formData = { | 287 | this.formData = { |
| 285 | roleName: "", | 288 | roleName: "", |
| 286 | }; | 289 | }; |
| 290 | + this.checkedKeys = [] | ||
| 287 | this.$emit("close"); | 291 | this.$emit("close"); |
| 288 | }, | 292 | }, |
| 293 | + // 加载已绑定的菜单 | ||
| 294 | + loadCheckedKeys() { | ||
| 295 | + if (this.formData.roleId) { | ||
| 296 | + getMenuByRoleId(this.formData.roleId) | ||
| 297 | + .then((res) => { | ||
| 298 | + if (res.code === "200") { | ||
| 299 | + this.checkedKeys = res.data.filter(item => item.isBinding && (item.parentMenuId!=0 ) ).map(item => item.menuId); | ||
| 300 | + console.log(this.checkedKeys); | ||
| 301 | + } else { | ||
| 302 | + this.alertWarningMsg(res.message); | ||
| 303 | + } | ||
| 304 | + }) | ||
| 305 | + .catch((err) => { | ||
| 306 | + console.log(err); | ||
| 307 | + }); | ||
| 308 | + } | ||
| 309 | + }, | ||
| 310 | + | ||
| 289 | }, | 311 | }, |
| 290 | }; | 312 | }; |
| 291 | </script> | 313 | </script> | ... | ... |
| ... | @@ -270,7 +270,7 @@ export default { | ... | @@ -270,7 +270,7 @@ export default { |
| 270 | getRoleDict() | 270 | getRoleDict() |
| 271 | .then((res) => { | 271 | .then((res) => { |
| 272 | if (res.code === "200") { | 272 | if (res.code === "200") { |
| 273 | - this.dict.roleList = res.data.value; | 273 | + this.dict.roleList = res.data; |
| 274 | } | 274 | } |
| 275 | }) | 275 | }) |
| 276 | .catch((err) => { | 276 | .catch((err) => { | ... | ... |
-
Please register or login to post a comment