From dafe0199d57f24eba3d0319e5e0b823d28ba6e3f Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Thu, 9 Jun 2022 15:12:17 +0800 Subject: [PATCH 1/6] =?UTF-8?q?[update]=20=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/CollectionType/index.vue | 303 ++++++++++-------- 1 file changed, 164 insertions(+), 139 deletions(-) diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index 0a7533ca8..19f3e7369 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -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" />
-
-
-
-
-
@@ -169,11 +174,12 @@
- +
@@ -185,43 +191,47 @@
- +
- +
- +
- +
- +
@@ -257,11 +267,12 @@
- +
@@ -273,43 +284,47 @@
- +
- +
- +
- +
- +
@@ -354,11 +369,12 @@
- +
@@ -370,43 +386,47 @@
- +
- +
- +
- +
- +
@@ -502,11 +522,12 @@
- +
@@ -518,43 +539,47 @@
- +
- +
- +
- +
- +
@@ -681,7 +706,7 @@ export default { } .add_flex_item{ width: 30%; - /*flex: 1;*/ + flex: 1; margin-right: 15px; } .selectWid{ @@ -693,7 +718,7 @@ export default { .add-width{ width: 30%; } -/deep/.ant-table-column-sort .ant-table-row-cell-ellipsis{ - text-align: left; +.add--number{ + width: 101%; } From f417a51861d1195b653aa856ff447d53eae4bf25 Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Thu, 9 Jun 2022 15:38:22 +0800 Subject: [PATCH 2/6] =?UTF-8?q?[update]=20=E6=A0=A1=E9=AA=8C=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/CollectionType/index.vue | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index 19f3e7369..b09722ca4 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -2,9 +2,9 @@
-
-
-
+
+
+
@@ -135,8 +135,8 @@
-
-
+
+
@@ -146,7 +146,7 @@
-
+
@@ -238,8 +238,8 @@
-
-
+
+
@@ -251,14 +251,14 @@ -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
- +
-
+
- + {{ item.label }} @@ -341,7 +341,7 @@
-
+
@@ -494,7 +494,7 @@
-
+
@@ -717,6 +717,7 @@ export default { } .add-width{ width: 30%; + margin-right: 15px; } .add--number{ width: 101%; From 722817b5c48bf7ad22c45cbe49a23790ee9e7a3c Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Thu, 9 Jun 2022 15:52:56 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oss/service/impl/OSSFileServiceImpl.java | 6 +- .../system/controller/CommonController.java | 8 +-- .../BussDocumentLibraryEOServiceImpl.java | 69 +++++++++++++------ .../impl/DummyInventoryInfoEOServiceImpl.java | 11 ++- .../ProjectLawsInventoryEOServiceImpl.java | 12 +++- .../src/main/resources/application-dev.yml | 1 + 6 files changed, 76 insertions(+), 31 deletions(-) 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 Date: Thu, 9 Jun 2022 16:48:03 +0800 Subject: [PATCH 4/6] =?UTF-8?q?sso=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/tools/UserMenu.vue | 3 +- jero-web/src/permission.js | 53 ++++++++++++++++++++-- jero-web/src/views/user/Login.vue | 2 +- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/jero-web/src/components/tools/UserMenu.vue b/jero-web/src/components/tools/UserMenu.vue index 12a0a75f2..d44114306 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://localhost:3000/dashboard/analysis') + '&response_type=code' localStorage.removeItem('language') // update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面 //window.location.reload() 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(){ From 2ad19d319895982c9289b3241b98be6906cf1f92 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Thu, 9 Jun 2022 16:50:16 +0800 Subject: [PATCH 5/6] =?UTF-8?q?sso=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/tools/UserMenu.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-web/src/components/tools/UserMenu.vue b/jero-web/src/components/tools/UserMenu.vue index d44114306..817d6a825 100644 --- a/jero-web/src/components/tools/UserMenu.vue +++ b/jero-web/src/components/tools/UserMenu.vue @@ -223,7 +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://localhost:3000/dashboard/analysis') + '&response_type=code' + // 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() From 4904a627daa8c2cc50e5629ebc2428cdd8fb76ad Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Thu, 9 Jun 2022 16:54:26 +0800 Subject: [PATCH 6/6] =?UTF-8?q?[update]=20=E5=86=BB=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../src/components/CollectionType/index.vue | 356 +++++++++--------- .../components/uploadFileChangeDown/file.vue | 9 +- 4 files changed, 185 insertions(+), 182 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 7720a2d63..e1f8e11ff 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -712,6 +712,7 @@ module.exports = { uploadTime: 'Upload time', enclosure: 'Enclosure', // 认证 + Frozenstatus: 'Frozen status, can only be viewed', chinese: 'chinese', integerOrDecimal: 'integer Or Decimal', OneDecimalPlace: 'One Decimal Place', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 14fbf2d2a..4633d006b 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -723,6 +723,7 @@ module.exports = { uploadTime: '上传时间', enclosure: '附件', // 认证 + Frozenstatus: '冻结状态,仅可以查看', chinese: '中文', integerOrDecimal: '整数或小数', OneDecimalPlace: '一位小数', diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index b09722ca4..b07eb64da 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -3,8 +3,8 @@
-
-
+
+
@@ -95,9 +95,9 @@
-
-
-
+
+
+
@@ -109,9 +109,9 @@
-
-
-
+
+
+
@@ -123,11 +123,11 @@
-
-
-
+
+
+
+ @click="clickButtonToUpload(item)"> {{ (item.dataValue === 'null' || item.dataValue === '' || item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} @@ -135,9 +135,9 @@
-
-
-
+
+
+
@@ -146,7 +146,7 @@
-
+
@@ -238,110 +238,8 @@
-
-
- - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - - - {{ item.label }} - - - -
-
-
- -
-
-
+
+
@@ -412,7 +310,7 @@
-
-
- - {{ (item.dataValue === 'null' || item.dataValue === '' || - item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} - -
-
-
- -
-
-
- - - - {{ itemin.label }} - - - -
-
- - {{ (item.dataValue === 'null' || item.dataValue === '' || - item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} - -
-
-
- -
-
-
+
@@ -472,29 +336,12 @@
-
- - {{ (item.dataValue === 'null' || item.dataValue === '' || - item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} - -
- -
-
-
- - - - {{ itemin.label }} - - - -
-
+ +
+
+
@@ -584,7 +431,158 @@
+ @click="clickButtonToUpload(item)"> + {{ (item.dataValue === 'null' || item.dataValue === '' || + item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + +
+
+
+ +
+
+
+ + + + {{ itemin.label }} + + + +
+
+ + {{ (item.dataValue === 'null' || item.dataValue === '' || + item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + +
+
+
+ +
+
+
+ + + + {{ item.label }} + + + +
+
+ + {{ (item.dataValue === 'null' || item.dataValue === '' || + item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + +
+
+
+ +
+
+
+ + + + {{ itemin.label }} + + + +
+
+ + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ {{ (item.dataValue === 'null' || item.dataValue === '' || item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} @@ -707,7 +705,6 @@ export default { .add_flex_item{ width: 30%; flex: 1; - margin-right: 15px; } .selectWid{ min-width: 150px; @@ -717,7 +714,6 @@ export default { } .add-width{ width: 30%; - margin-right: 15px; } .add--number{ width: 101%; 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