Shannon_mu 3 лет назад
Родитель
Сommit
d60010a328

+ 1 - 1
operationSupport/src/api/common_api.js

@@ -13,7 +13,7 @@ export default (http) => ({
   */
   getTreeData: (sysId = '', type = '') => http.get(`/common/getTreeData?sysId=${sysId}&type=${type}`),
   /*查询字典库数据*/
-  getDictionaryData: (parentDictCode = '') => http.post('/user-center/dict/selectList',{parentDictCode}),
+  getDictionaryData: (parentDictCode = '') => http.post('/sc-user-center/dict/selectList',{parentDictCode}),
   /*获取相关gis服务 */
   getGis:(serviceType='')=>http.post('/systemSetting/selectGis',{serviceType}),
 })

+ 6 - 6
operationSupport/src/components/common/Header.vue

@@ -114,7 +114,7 @@ export default {
              });
              return;
             }
-            this.$http.postForm('/uims-message/message/judgingTheMessageJumpPermission',{
+            this.$http.postForm('/sc-message/message/judgingTheMessageJumpPermission',{
                 url:url.split('/')[url.split('/').length - 1],
                 appId:appId
             }).then(({ status, data, msg })=>{
@@ -127,14 +127,14 @@ export default {
         },
         // 退出登录
         logOut() {
-            var access_token = localStorage.getItem('UMIS_token');
+            var access_token = localStorage.getItem('SC_token');
             this.$http.postForm('/user-auth/user/logout', { access_token: access_token }).then(({ status, data, msg }) => {
                 if (0 === status) {
                     this.$message({
                         type: 'success',
                         message: '您已退出登录'
                     });
-                    localStorage.removeItem('UMIS_token');
+                    localStorage.removeItem('SC_token');
                     this.$store.commit('setloginInfo', '');
                     this.$store.dispatch("tags", []);
                     sessionStorage.removeItem("tabs");
@@ -182,7 +182,7 @@ export default {
         },
         //获取最新消息列表
         getMessageList(){
-            this.$http.postForm('/uims-message/message/queryLastMessage',{num:'5'}).then(({ status, data, msg }) => {
+            this.$http.postForm('/sc-message/message/queryLastMessage',{num:'5'}).then(({ status, data, msg }) => {
                 if (status === 0) {
                     this.$store.commit('setmessageList', data);
                 }
@@ -190,7 +190,7 @@ export default {
         },
         //查询未读消息数量
         getUnreadNumber(){
-            this.$http.postForm('/uims-message/message/queryUnreadMessageStatic').then(({ status, data, msg }) => {
+            this.$http.postForm('/sc-message/message/queryUnreadMessageStatic').then(({ status, data, msg }) => {
                 if (status === 0) {
                     data.map((item,index)=>{
                        if(item.cn){
@@ -204,7 +204,7 @@ export default {
         initWebSocket(id) {
             if ('WebSocket' in window) {
                 var serviceIp = this.envConfig.websoketUrl;
-                this.websocket = new WebSocket('ws://' + serviceIp + '/uims-message/webSocket/' + id);
+                this.websocket = new WebSocket('ws://' + serviceIp + '/sc-message/webSocket/' + id);
             }else {
                 console.log('当前浏览器 Not support websocket');
             }

+ 3 - 4
operationSupport/src/config/env.development.js

@@ -10,12 +10,12 @@ module.exports = {
   Env: "prod", // // 测试环境 dev |  正式环境 prod
 
 
-  baseUrl: "http://114.135.61.188:18093/login/login", // 项目地址
-  baseApi: "http://192.168.0.121:8082", // 本地api请求地址
+  baseUrl: "http://114.135.61.188:18093/sc-operation/", // 项目地址
+  baseApi: "http://114.135.61.186:21020/", // 本地api请求地址
   baseMapApi: "http://114.135.61.187:38082", // arcgis API
   baseImgApi: "http://114.135.61.186:21020", // 图片api请求地址
   baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
-  loginUrl: "http://114.135.61.188:18093/login/login",
+  loginUrl: "http://114.135.61.188:18093/sc-login/",
   websoketUrl: '114.135.61.187:38081',
   warnDetailUrl: "http://114.135.61.188:18093/dispatch/warnDetail",// 综合调度系统-系统管理-报警管理-报警详情界面
   taskManagementUrl: "http://114.135.61.188:18093/maintenance/taskManagement",// 运维管理系统-巡检管理-任务管理界面
@@ -26,5 +26,4 @@ module.exports = {
     imageSize: 5, // MB
     excelSize: 10 // MB
   },
-  staticsPath: "http://114.135.61.187:38081/user-center/statics"
 };

+ 0 - 1
operationSupport/src/config/env.production.js

@@ -23,5 +23,4 @@ module.exports = {
     imageSize: 5, // MB
     excelSize: 10 // MB
   },
-  staticsPath: "http://114.135.61.187:38081/user-center/statics"
 };

+ 4 - 4
operationSupport/src/main.js

@@ -55,7 +55,7 @@ Vue.prototype.routerLoad = {
     },
     // 获取菜单
     loadMenus() {
-        http.get('/user/findUserMenu', { appId: '1001' }).then(({ status, data, msg }) => {
+        http.get('/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
             if (0 === status) {
                 let routerArr = this.findOne(data[0].children);
                 if (routerArr[0].length) {
@@ -79,11 +79,11 @@ router.beforeEach((to, from, next) => {
     }
     next();
 
-    // if (localStorage.getItem("UMIS_token")) {
+    // if (localStorage.getItem("SC_token")) {
     //     let menuList = window.sessionStorage.getItem("listMuen")
     //     let newAr = [];
     //     if (menuList === null || menuList === undefined) {
-    //         http.get('/user-center/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
+    //         http.get('/sc-user-center/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
     //             if (0 == status) {
     //                 let datas = data[0].children
     //                 window.sessionStorage.setItem('listMuen', JSON.stringify(datas))
@@ -111,7 +111,7 @@ new Vue({
     store,
     render: h => h(App),
     created() {
-        if (localStorage.getItem('UMIS_token')) {
+        if (localStorage.getItem('SC_token')) {
             this.routerLoad.loadMenus();
         }
     }

+ 8 - 8
operationSupport/src/utils/http.js

@@ -17,7 +17,7 @@ http.interceptors.request.use(
         // config.url = `/user-auth${config.url}`;
         if (config.url.indexOf('/user-auth') !== -1) {
             config.url = config.url;
-        } else if (config.url.indexOf('/uims-message') !== -1) {
+        } else if (config.url.indexOf('/sc-message') !== -1) {
             config.url = config.url;
         } else if (config.url.indexOf('/operation-manager') !== -1) {
             config.url = config.url;
@@ -25,14 +25,14 @@ http.interceptors.request.use(
         else if (config.url.indexOf('/zoniot-water') !== -1) {
             config.url = config.url;
         }
-        else if (config.url.indexOf('/user-center') !== -1) {
+        else if (config.url.indexOf('/sc-user-center') !== -1) {
             config.url = config.url;
         }
         else {
-            config.url = `/user-center${config.url}`;
+            config.url = `/sc-user-center${config.url}`;
         }
         // config.headers['Accept'] = '*/*'
-        config.headers[localStorage.getItem('UMIS_token') && 'Authorization'] = 'Bearer ' + localStorage.getItem('UMIS_token');
+        config.headers[localStorage.getItem('SC_token') && 'Authorization'] = 'Bearer ' + localStorage.getItem('SC_token');
         // 全局添加cancelToken
         config.cancelToken = source.token;
         return config;
@@ -49,7 +49,7 @@ http.interceptors.response.use(
     (err) => {
         if (err.response.status == 401) {
             axios({
-                url: '/user-auth/user/getUserStatus?accessToken=' + localStorage.getItem('UMIS_token'),
+                url: '/user-auth/user/getUserStatus?accessToken=' + localStorage.getItem('SC_token'),
                 method: 'get'
             }).then((response) => {
                 if (window.relogin) return false;
@@ -64,7 +64,7 @@ http.interceptors.response.use(
                     }).then(() => {
                         window.open(config.loginUrl, '_self');
                         window.relogin = false;
-                        localStorage.removeItem('UMIS_token');
+                        localStorage.removeItem('SC_token');
                     }).catch(() => { });
                 } else if (data == 1) {
                     Vue.prototype.$msgBox('该账号已在其他地址登录,如需访问请重新登录', '', 'warning', {
@@ -75,7 +75,7 @@ http.interceptors.response.use(
                     }).then(() => {
                         window.open(config.loginUrl, '_self');
                         window.relogin = false;
-                        localStorage.removeItem('UMIS_token');
+                        localStorage.removeItem('SC_token');
                     }).catch(() => { });
                 } else {
                     Vue.prototype.$msgBox('你的账号已被停用,如有问题请联系管理员', '', 'warning', {
@@ -86,7 +86,7 @@ http.interceptors.response.use(
                     }).then(() => {
                         window.open(config.loginUrl, '_self');
                         window.relogin = false;
-                        localStorage.removeItem('UMIS_token');
+                        localStorage.removeItem('SC_token');
                     }).catch(() => { });
                 }
             })

+ 1 - 1
operationSupport/src/utils/initMap.js

@@ -102,7 +102,7 @@ export default {
             esriLoader.loadCss(this.envConfig.baseMapApi + '/arcgis/esri/css/main.css');
             // esriLoader.loadCss(this.testMapurlCss);
             new Promise((resolve, reject) => {
-                this.$http.post('/user-center/dict/selectList', { parentDictCode: 'GIS_SERVER_TYPE' }).then(({ status, data, msg }) => {
+                this.$http.post('/sc-user-center/dict/selectList', { parentDictCode: 'GIS_SERVER_TYPE' }).then(({ status, data, msg }) => {
                     if (0 === status) {
                         _self.allserviceType = data;
                     }

+ 9 - 9
operationSupport/src/views/messages/index.vue

@@ -157,7 +157,7 @@ export default {
             this.mixins_search();
         },
         toUrl(id,type,sceneType,urllink) {
-            this.$http.post('/uims-message/message/updateMultiple', { ids: [id], messageStatus: 1 }).then(({ status, data, msg }) => {});
+            this.$http.post('/sc-message/message/updateMultiple', { ids: [id], messageStatus: 1 }).then(({ status, data, msg }) => {});
             let url,appId;
             if(type==1||type==2){
                 url=urllink||this.envConfig.warnDetailUrl;
@@ -170,7 +170,7 @@ export default {
                 appId="1003";
             }
             //查询linkpath能不能跳转
-            this.$http.postForm('/uims-message/message/judgingTheMessageJumpPermission',{
+            this.$http.postForm('/sc-message/message/judgingTheMessageJumpPermission',{
                 url:url.split('/')[url.split('/').length - 1],
                 appId:appId
             }).then(({ status, data, msg })=>{
@@ -196,7 +196,7 @@ export default {
             this.$msgBox(`您确定要删除选中的${this.selectRow.length}条消息`, '删除后将无法恢复,是否继续?')
                 .then((_) => {
                     this.$http
-                        .post('/uims-message/message/updateMultiple', { ids: this.selectRow, status: 0 })
+                        .post('/sc-message/message/updateMultiple', { ids: this.selectRow, status: 0 })
                         .then(({ status, data, msg }) => {
                             if (status === 0) {
                                 this.search();
@@ -210,7 +210,7 @@ export default {
         deleteAll() {
             this.$msgBox(`您确定要删除全部消息`, '删除后将无法恢复,是否继续?')
                 .then((_) => {
-                    this.$http.post('/uims-message/message/updateMultiple', { ids: [], status: 0 }).then(({ status, data, msg }) => {
+                    this.$http.post('/sc-message/message/updateMultiple', { ids: [], status: 0 }).then(({ status, data, msg }) => {
                         if (status === 0) {
                             this.search();
                             this.$refs.table.checkAllChange();
@@ -224,7 +224,7 @@ export default {
             this.$msgBox(`您确定要标记选中的${this.selectRow.length}条消息为已读`, '标记后将无法恢复,是否继续?', 'warning')
                 .then((_) => {
                     this.$http
-                        .post('/uims-message/message/updateMultiple', { ids: this.selectRow, messageStatus: 1 })
+                        .post('/sc-message/message/updateMultiple', { ids: this.selectRow, messageStatus: 1 })
                         .then(({ status, data, msg }) => {
                             if (status === 0) {
                                 this.search();
@@ -238,7 +238,7 @@ export default {
         markAll() {
             this.$msgBox(`您确定要标记全部消息为已读`, '标记后将无法恢复,是否继续?', 'warning')
                 .then((_) => {
-                    this.$http.post('/uims-message/message/updateMultiple', { ids: [], messageStatus: 1 }).then(({ status, data, msg }) => {
+                    this.$http.post('/sc-message/message/updateMultiple', { ids: [], messageStatus: 1 }).then(({ status, data, msg }) => {
                         if (status === 0) {
                             this.search();
                             this.$refs.table.checkAllChange();
@@ -251,7 +251,7 @@ export default {
         },
         //查询未读消息数量
         getUnreadNumber() {
-            this.$http.postForm('/uims-message/message/queryUnreadMessageStatic').then(({ status, data, msg }) => {
+            this.$http.postForm('/sc-message/message/queryUnreadMessageStatic').then(({ status, data, msg }) => {
                 if (status === 0) {
                     let sum = 0;
                     data.map((item, index) => {
@@ -270,7 +270,7 @@ export default {
         },
         //获取最新消息列表
         getMessageList(){
-            this.$http.postForm('/uims-message/message/queryLastMessage',{num:'5'}).then(({ status, data, msg }) => {
+            this.$http.postForm('/sc-message/message/queryLastMessage',{num:'5'}).then(({ status, data, msg }) => {
                 if (status === 0) {
                     this.$store.commit('setmessageList', data);
                 }
@@ -278,7 +278,7 @@ export default {
         },
     },
     created() {
-        this.mixins_dataUrl = '/uims-message/message/selectPage';
+        this.mixins_dataUrl = '/sc-message/message/selectPage';
         this.search();
     }
 };

+ 3 - 3
operationSupport/vue.config.js

@@ -13,7 +13,7 @@ function resolve(dir) {
 }
 
 module.exports = {
-    publicPath: process.env.NODE_ENV === 'sit' ? '/userCenter' : '/',
+    publicPath: process.env.NODE_ENV === 'sit' ? '/sc-operation' : '/',
     productionSourceMap: false,
     chainWebpack: config => {
         // 配置别名
@@ -83,7 +83,7 @@ module.exports = {
                     /* "^/api": "" */
                 }
             },
-            '/user-center': {
+            '/sc-user-center': {
                 target: envConfig.baseApi,
                 ws: true, // 代理的WebSockets
                 changeOrigin: true, // 允许websockets跨域
@@ -92,7 +92,7 @@ module.exports = {
                     /* "^/api": "" */
                 }
             },
-            '/uims-message': {
+            '/sc-message': {
                 target: envConfig.baseApi,
                 ws: true, // 代理的WebSockets
                 changeOrigin: true, // 允许websockets跨域

+ 1 - 1
userCenter/src/views/system/organs/index.vue

@@ -193,7 +193,7 @@ export default {
             this.treeClick(data);
             this.$msgBox(`刪除机构 "${orgName}"`, '删除后将无法恢复,请问是否继续?')
                 .then(() => {
-                    this.$http.post('/org/deleteAll', id).then(({ status, data, msg }) => {
+                    this.$http.post('/org/deleteAll', [id]).then(({ status, data, msg }) => {
                         if (status === 0 && data) {
                             if (data.length) {
                                 this.$message.error('删除失败,请先删除机构下的用户!');