diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java index e2587d558..446e9a026 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java @@ -32,6 +32,8 @@ public class OSSFileServiceImpl extends ServiceImpl impl @Value(value = "${jero.path.upload}") private String uploadpath; + @Value(value = "${jero.path.uploadCos}") + private String uploadCospath; /** * 文件后缀黑名单 @@ -188,7 +190,7 @@ public class OSSFileServiceImpl extends ServiceImpl impl OSSFile oSSFile = new OSSFile(); try { - String ctxPath = uploadpath; + String ctxPath = uploadCospath; String fileName = null; String fileType = null; @@ -285,7 +287,7 @@ public class OSSFileServiceImpl extends ServiceImpl impl OSSFile oSSFile = new OSSFile(); try { - String ctxPath = uploadpath; + String ctxPath = uploadCospath; String fileName = null; String fileType = null; File file = new File(ctxPath + File.separator + bizPath + File.separator); diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/CommonController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/CommonController.java index 307364f65..9293b3018 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/CommonController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/CommonController.java @@ -167,8 +167,8 @@ public class CommonController { // bizPath = ""; // } } - OSSFile oSSFile = ossFileService.uploadLocal(file, bizPath,state,cut); -// OSSFile oSSFile = ossFileService.uploadLocalOfCos(file, bizPath,state,cut); // 切换cos +// OSSFile oSSFile = ossFileService.uploadLocal(file, bizPath,state,cut); + OSSFile oSSFile = ossFileService.uploadLocalOfCos(file, bizPath,state,cut); // 切换cos if (oConvertUtils.isNotEmpty(oSSFile)) { result.setResult(oSSFile); result.setSuccess(true); @@ -343,7 +343,7 @@ public class CommonController { * @param request * @param response */ -// @GetMapping(value = "/downLoadFile") + @GetMapping(value = "/downLoadFile") public void downLoadFromCos(String id,HttpServletRequest request, HttpServletResponse response) { if(StringUtils.isBlank(id)){ throw new JeroBootException("参数信息不全"); @@ -408,7 +408,7 @@ public class CommonController { * @param request * @param response */ - @GetMapping(value = "/downLoadFile") +// @GetMapping(value = "/downLoadFile") public void downLoadFile(String id,HttpServletRequest request, HttpServletResponse response) { // 查询数据表数据是否存在 LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index 9c8005283..c2d1b71bd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -23,6 +23,7 @@ import com.jero.common.exception.JeroBootException; import com.jero.common.system.query.QueryRuleEnum; import com.jero.common.system.vo.LoginUser; import com.jero.common.util.DateUtils; +import com.jero.common.util.oss.CosBootUtil; import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; import com.jero.modules.collection.entity.OnlCgformCollection; @@ -106,6 +107,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.text.DateFormat; import java.text.ParseException; @@ -3905,7 +3907,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl
-
-
+
+
@@ -32,57 +32,62 @@
-
+ :disabled="item.isLock == '1' ? true: false" + onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')" + :placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')" + v-model="item.dataValue" />
-
-
-
-
-
@@ -90,9 +95,9 @@
-
-
-
+
+
+
@@ -104,9 +109,9 @@
-
-
-
+
+
+
@@ -118,11 +123,11 @@
-
-
-
+
+
+
+ @click="clickButtonToUpload(item)"> {{ (item.dataValue === 'null' || item.dataValue === '' || item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} @@ -131,8 +136,8 @@
-
-
+
+
@@ -169,11 +174,12 @@
- +
@@ -185,50 +191,54 @@
- +
- +
- +
- +
- +
-
+
@@ -257,11 +267,12 @@
- +
@@ -273,46 +284,50 @@
- +
- +
- +
- +
- +
-
+
@@ -325,7 +340,7 @@
-
+
@@ -354,11 +369,12 @@
- +
@@ -370,48 +386,52 @@
- +
- +
- +
- +
- +
-
+
+ @click="clickButtonToUpload(item)"> {{ (item.dataValue === 'null' || item.dataValue === '' || item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} @@ -420,8 +440,8 @@
-
-
+
+
@@ -430,9 +450,8 @@
-
+
{{ (item.dataValue === 'null' || item.dataValue === '' || item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} @@ -442,8 +461,8 @@
-
-
+
+
@@ -452,9 +471,8 @@
-
+
{{ (item.dataValue === 'null' || item.dataValue === '' || item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} @@ -464,7 +482,7 @@
-
+
@@ -502,11 +520,12 @@
- +
@@ -518,48 +537,52 @@
- +
- +
- +
- +
- +
+ @click="clickButtonToUpload(item)"> {{ (item.dataValue === 'null' || item.dataValue === '' || item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} @@ -681,8 +704,7 @@ export default { } .add_flex_item{ width: 30%; - /*flex: 1;*/ - margin-right: 15px; + flex: 1; } .selectWid{ min-width: 150px; @@ -693,7 +715,7 @@ export default { .add-width{ width: 30%; } -/deep/.ant-table-column-sort .ant-table-row-cell-ellipsis{ - text-align: left; +.add--number{ + width: 101%; } diff --git a/jero-web/src/components/tools/UserMenu.vue b/jero-web/src/components/tools/UserMenu.vue index 12a0a75f2..817d6a825 100644 --- a/jero-web/src/components/tools/UserMenu.vue +++ b/jero-web/src/components/tools/UserMenu.vue @@ -114,7 +114,7 @@ import { mixinDevice } from '@/utils/mixin.js' import { getFileAccessHttpUrl, getAction } from '@/api/manage' import Vue from 'vue' - import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types' + import { UI_CACHE_DB_DICT_DATA ,ACCESS_TOKEN} from '@/store/mutation-types' import moment from 'moment' import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN' import enUS from 'ant-design-vue/es/locale/en_US' @@ -223,6 +223,7 @@ return that.Logout({}).then(() => { // update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面 that.$router.push({ path: '/user/login' }) + // window.location.href = 'https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' + encodeURIComponent('http://grp.nioint.com/dashboard/analysis') + '&response_type=code' localStorage.removeItem('language') // update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面 //window.location.reload() diff --git a/jero-web/src/components/uploadFileChangeDown/file.vue b/jero-web/src/components/uploadFileChangeDown/file.vue index 1b228aa76..3f08521d0 100644 --- a/jero-web/src/components/uploadFileChangeDown/file.vue +++ b/jero-web/src/components/uploadFileChangeDown/file.vue @@ -59,6 +59,7 @@ export default { } }, created() { + console.log(this.detailDate,'detailDate') const token = Vue.ls.get(ACCESS_TOKEN) this.headers = { 'X-Access-Token': token } this.containerId = 'container-ty-' + new Date().getTime() @@ -95,8 +96,6 @@ export default { } }, beforeUpload(file) { - - console.log(file) // let thisFileType = this.thisFileType.replace(/\s+/g, ""); this.fileTypeSatus = true //TODO 客户要求不拦截文件 @@ -125,6 +124,12 @@ export default { window.open(url, '_blank') }, handleChange(info) { + // this.detailDate.list.forEach((item) => { + // if(item.isLock === '1'){ + // this.$message.warning(this.$t('Frozenstatus')) + // return + // } + // }) if(info.fileList.length > 1) { this.$message.warning(this.$t('onlyOnefileUploaded')) return diff --git a/jero-web/src/permission.js b/jero-web/src/permission.js index ed185df30..121f30ec3 100644 --- a/jero-web/src/permission.js +++ b/jero-web/src/permission.js @@ -4,16 +4,48 @@ import store from './store' import NProgress from 'nprogress' // progress bar import 'nprogress/nprogress.css' // progress bar style import notification from 'ant-design-vue/es/notification' -import { ACCESS_TOKEN, INDEX_MAIN_PAGE_PATH } from '@/store/mutation-types' +import { ACCESS_TOKEN, USER_NAME, USER_INFO, UI_CACHE_DB_DICT_DATA, INDEX_MAIN_PAGE_PATH } from '@/store/mutation-types' import { generateIndexRouter } from '@/utils/util' +import { JSEncrypt } from 'jsencrypt' +import { getAction } from '@/api/manage' +import { welcome } from '@/utils/util' NProgress.configure({ showSpinner: false }) // NProgress Configuration -const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration'] // no redirect whitelist +const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration'] +// const whiteList = [] +// no redirect whitelist router.beforeEach((to, from, next) => { NProgress.start() // start progress bar - + if (to.query.code) { + getAction(`opensso/callback`, { code: to.query.code }).then(res => { + if (res.success) { + Vue.ls.set(ACCESS_TOKEN, res.result.token, 7 * 24 * 60 * 60 * 1000) + Vue.ls.set(USER_NAME, res.result.userInfo.username, 7 * 24 * 60 * 60 * 1000) + Vue.ls.set(USER_INFO, res.result.userInfo, 7 * 24 * 60 * 60 * 1000) + Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000) + store.commit('SET_TOKEN', res.result.token) + store.commit('SET_INFO', res.result.userInfo) + store.commit('SET_NAME', { + username: res.result.userInfo.username, + realname: res.result.userInfo.realname, + welcome: welcome() + }) + store.commit('SET_AVATAR', res.result.userInfo.avatar) + let fullPath = '' + if (to.fullPath == '/') { + fullPath = INDEX_MAIN_PAGE_PATH + } else { + fullPath = to.path + } + let query = to.query + delete query.code + next({ path: fullPath, query: query }) + } + }) + return + } if (Vue.ls.get(ACCESS_TOKEN)) { /* has token */ if (to.path === '/user/login') { @@ -52,6 +84,13 @@ router.beforeEach((to, from, next) => { // query: { redirect: to.fullPath } store.dispatch('Logout').then(() => { next({ path: '/user/login', query: { redirect: to.fullPath } }) + let fullPath = '' + if (to.fullPath == '/') { + fullPath = INDEX_MAIN_PAGE_PATH + } else { + fullPath = to.fullPath + } + // window.location.href = 'https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' + encodeURIComponent('http://grp.nioint.com' + fullPath) + '&response_type=code' }) }) } else { @@ -63,8 +102,14 @@ router.beforeEach((to, from, next) => { // 在免登录白名单,直接进入 next() } else { - next({ path: '/user/login', query: { redirect: to.fullPath } }) + let fullPath = '' + if (to.fullPath == '/') { + fullPath = INDEX_MAIN_PAGE_PATH + '?id=123' + } else { + fullPath = to.fullPath + } + // window.location.href = 'https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' + encodeURIComponent('http://grp.nioint.com' + fullPath) + '&response_type=code' NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it } } diff --git a/jero-web/src/views/user/Login.vue b/jero-web/src/views/user/Login.vue index a5e5370ee..868eb8246 100644 --- a/jero-web/src/views/user/Login.vue +++ b/jero-web/src/views/user/Login.vue @@ -414,7 +414,7 @@ }, //sso登录跳转 ssoLogin(){ - window.open('https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=http%3A%2F%2F39.98.140.126&response_type=code', '_blank') + window.open('https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fdashboard%2Fanalysis&response_type=code', '_blank') }, //sso登录 ssoLoginSuccess(){