{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\cssc-fvue\\src\\api\\uc.js","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\api\\uc.js","mtime":1681441192473},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import req from \"@/request.js\";\nvar uc = window.context.uc;\nimport Cookie from 'js-cookie';\nexport default {\n getUser: function getUser(param) {\n return new Promise(function (resolve, reject) {\n req.get(uc + \"/api/user/v1/user/getDetailByAccountOrId?account=\".concat(param)).then(function (rep) {\n resolve(rep.data);\n }), function (error) {\n reject(error);\n };\n });\n },\n getUserOrgPage: function getUserOrgPage(param) {\n return new Promise(function (resolve, reject) {\n req.post(uc + '/api/org/v1/orgs/getUserOrgPage', param).then(function (resp) {\n resolve(resp.data);\n }), function (error) {\n reject(error);\n };\n });\n },\n // 获取所有的用户参数\n getUserParams: function getUserParams() {\n return new Promise(function (resolve, reject) {\n req.get(uc + '/api/params/v1/userParams/getUserParams').then(function (resp) {\n resolve(resp.data);\n }), function (error) {\n reject(error);\n };\n });\n },\n getUserByUserId: function getUserByUserId(userId) {\n return new Promise(function (resolve, reject) {\n req.get(uc + '/api/org/v1/orgpost/getUserByUserId?userId=' + userId).then(function (resp) {\n resolve(resp.data);\n }), function (error) {\n reject(error);\n };\n });\n },\n //未读消息\n messagelist: function messagelist() {\n return new Promise(function (resolve, reject) {\n req.post(uc + \"/msg/messageReceiver/v1/listNoPage\").then(function (response) {\n resolve(response);\n }, function (error) {\n reject(error);\n });\n });\n },\n getCurrent: function getCurrent(cb) {\n req.post(uc + \"/api/user/v1/user/getByAccount\").then(function (rep) {\n cb(rep);\n });\n },\n getUserByAccount: function getUserByAccount(account, cb) {\n req.get(uc + \"/api/user/v1/user/getDetailByAccountOrId?account=\".concat(account)).then(function (rep) {\n if (rep) {\n cb(rep.data);\n }\n });\n },\n authentication: function authentication(principal, cb, errorCb) {\n var Base64 = require(\"js-base64\").Base64;\n\n var password = Base64.encode(principal.password); // 输入框中的密码应该是明文。 这里直接加密提交数据\n\n req.post(uc + \"/auth?tenantId=\".concat(principal.tenantId || ''), {\n username: principal.account,\n password: password\n }).then(function (rep) {\n if (rep.status == 200) {\n cb(rep.data);\n\n if (principal.remberPwd == 1) {\n Cookie.set('remberPwd', principal.remberPwd, {\n expires: 7,\n path: '/ '\n });\n Cookie.set('account', principal.account, {\n expires: 7,\n path: '/'\n });\n Cookie.set('accountPwd', password, {\n expires: 7,\n path: '/'\n }); // 存 的是密文\n } else {\n Cookie.set('remberPwd', 0);\n Cookie.set('account', '');\n Cookie.set('accountPwd', '');\n }\n } else {\n errorCb(rep.data.message);\n }\n }).catch(function (error) {\n if (error.response && error.response.data && error.response.data.message) {\n errorCb(error.response.data.message);\n } else {\n errorCb(error.message);\n }\n });\n },\n refreshAndGetAuthenticationToken: function refreshAndGetAuthenticationToken() {\n return new Promise(function (resolve, reject) {\n req.get(\"\".concat(uc, \"/refresh\")).then(function (rep) {\n resolve(rep.data);\n }).catch(function (error) {\n reject(error.message);\n });\n });\n },\n logout: function logout() {\n return req.get(\"\".concat(uc, \"/signout\"));\n },\n basicSso: function basicSso(token, cb, errorCb) {\n var service = localStorage.getItem(\"service\");\n req.get(uc + \"/sso/auth?ticket=\".concat(token, \"&code=\").concat(token, \"&service=\").concat(service)).then(function (rep) {\n if (!window.ssoConfig.mode || window.ssoConfig.mode == \"jwt\") {\n if (token.substr(0, 1) === ' ') {\n token = token.substr(1);\n }\n\n rep.data.token = token;\n }\n\n cb(rep.data);\n }).catch(function (error) {\n errorCb(error.message);\n });\n },\n modifyPwd: function modifyPwd(data, cb) {\n req.post(uc + \"/api/user/v1/user/changUserPsd\", data).then(function (rep) {\n cb(rep.data);\n });\n },\n getAllDimension: function getAllDimension(cb, errorCb) {\n req.get(uc + '/api/demension/v1/dems/getAll').then(function (rep) {\n cb(rep.data);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n getOrgsByDemension: function getOrgsByDemension(demensionId, cb, errorCb) {\n req.post(uc + '/api/org/v1/orgs/getByParentAndDem', {\n demId: demensionId\n }).then(function (rep) {\n cb(rep.data);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n getOrgsByParentIdAndDemension: function getOrgsByParentIdAndDemension(parentId, demensionId, cb, errorCb) {\n req.post(uc + '/api/org/v1/orgs/getByParentAndDem', {\n demId: demensionId,\n parentId: parentId\n }).then(function (rep) {\n cb(rep.data);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n getUsersByOrgId: function getUsersByOrgId(queryFilter, cb, errorCb) {\n req.post(uc + '/api/user/v1/users/queryByType', queryFilter).then(function (rep) {\n cb(rep);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n getCurrentOrg: function getCurrentOrg(cb) {\n req.get(uc + \"/api/org/v1/org/getOrgMaster\").then(function (rep) {\n cb(rep);\n });\n },\n queryOrgByFilter: function queryOrgByFilter(queryFilter, cb, errorCb) {\n req.post(uc + '/api/org/v1/orgs/getOrgPage', queryFilter).then(function (rep) {\n cb(rep);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n getOrgPostPage: function getOrgPostPage(queryFilter, cb, errorCb) {\n req.post('/api/org/v1/orgPosts/getOrgPostPage', queryFilter).then(function (rep) {\n cb(rep);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n getRolePage: function getRolePage(queryFilter, cb, errorCb) {\n req.post('/api/role/v1/roles/getRolePage', queryFilter).then(function (rep) {\n cb(rep);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n getJobPage: function getJobPage(queryFilter, cb, errorCb) {\n req.post('/api/job/v1/jobs/getJobPage', queryFilter).then(function (rep) {\n cb(rep);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n //查询维度列表\n getDemPage: function getDemPage(queryFilter, cb, errorCb) {\n req.post(uc + '/api/demension/v1/dems/getDemListAll', queryFilter).then(function (rep) {\n cb(rep);\n }).catch(function (error) {\n errorCb && errorCb(error.message);\n });\n },\n //获取默认密码策略\n getDefaultPwdStrategy: function getDefaultPwdStrategy() {\n return new Promise(function (resolve, reject) {\n req.get(\"\".concat(uc, \"/api/pwdStrategy/v1/getDefault\")).then(function (resp) {\n resolve(resp.data);\n }, function (error) {\n reject(error);\n });\n });\n },\n getDefPwdStrategy: function getDefPwdStrategy(cb) {\n req.get(uc + \"/api/pwdStrategy/v1/getDefault\").then(function (response) {\n cb(response.data);\n });\n },\n fileUpload: function fileUpload(param) {\n //文件上传\n return new Promise(function (resolve, reject) {\n req.post(uc + '/file/v1/fileUpload', param).then(function (response) {\n resolve(response.data);\n }), function (error) {\n reject(error);\n };\n });\n },\n getCurrentSeal: function getCurrentSeal() {\n // 获取当前登录用户的电子签章\n return new Promise(function (resolve, reject) {\n req.get(uc + '/uc/electronicSeal/v1/getSealByCurrentUserId').then(function (response) {\n resolve(response.data);\n }), function (error) {\n reject(error);\n };\n });\n }\n};",null]}