From d3cfe40087ec65b1739380bac2afe6933d18ccfa Mon Sep 17 00:00:00 2001 From: haha Date: Sat, 28 Dec 2024 20:35:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9B=91=E6=8E=A7=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/vm/vue/v3/readme.txt | 2 +- yanzhu-modules/yanzhu-manage/pom.xml | 6 +- .../controller/ProVideoMonitorController.java | 41 +++ yanzhu-ui-vue3/src/App.vue | 3 + yanzhu-ui-vue3/src/api/manage/videoMonitor.js | 7 + .../src/assets/icons/svg/4screen.svg | 1 + .../src/assets/icons/svg/9screen.svg | 1 + yanzhu-ui-vue3/src/assets/icons/svg/video.svg | 1 + .../src/components/CurrentProject/index.vue | 8 +- .../src/components/flow/Role/index.vue | 2 +- yanzhu-ui-vue3/src/store/modules/user.js | 4 +- .../src/views/flowable/definition/index.vue | 4 +- .../views/flowable/task/finished/index.vue | 2 +- .../views/flowable/task/myProcess/index.vue | 2 +- .../src/views/flowable/task/todo/index.vue | 2 +- .../views/manage/attendanceUbiData/index.vue | 10 +- .../manage/attendanceUbiData/statistics.vue | 10 +- .../src/views/manage/attendance_cfg/index.vue | 14 +- .../manage/attendance_ubi_device/index.vue | 16 +- .../attendance_ubi_device/ubiDeviceDrawer.vue | 2 +- .../src/views/manage/basSignet/index.vue | 2 +- .../src/views/manage/basTemplate/index.vue | 6 +- .../src/views/manage/busExamInfo/index.vue | 6 +- .../views/manage/busExamQuestion/index.vue | 8 +- .../src/views/manage/busExamUser/index.vue | 2 +- .../views/manage/busTrainingVideo/index.vue | 6 +- .../manage/busTrainingVideoUser/index.vue | 2 +- .../views/manage/greenCarbonData/index.vue | 16 +- .../views/manage/greenCarbonItem/index.vue | 22 +- .../src/views/manage/milestone/index.vue | 10 +- .../src/views/manage/plan/index.vue | 2 +- .../manage/proProjectInfoSubdepts/index.vue | 6 +- .../proProjectInfoSubdeptsGroup/index.vue | 8 +- .../proProjectInfoSubdeptsUsers/index.vue | 6 +- .../src/views/manage/videoMonitor/index.vue | 98 +++---- .../src/views/manage/videoMonitor/list.vue | 249 ++++++++++++++++++ .../videoMonitor/videoMonitorDrawer.vue | 47 ++-- 37 files changed, 478 insertions(+), 156 deletions(-) create mode 100644 yanzhu-ui-vue3/src/assets/icons/svg/4screen.svg create mode 100644 yanzhu-ui-vue3/src/assets/icons/svg/9screen.svg create mode 100644 yanzhu-ui-vue3/src/assets/icons/svg/video.svg create mode 100644 yanzhu-ui-vue3/src/views/manage/videoMonitor/list.vue diff --git a/yanzhu-modules/yanzhu-gen/src/main/resources/vm/vue/v3/readme.txt b/yanzhu-modules/yanzhu-gen/src/main/resources/vm/vue/v3/readme.txt index 10362d62..cdb1c431 100644 --- a/yanzhu-modules/yanzhu-gen/src/main/resources/vm/vue/v3/readme.txt +++ b/yanzhu-modules/yanzhu-gen/src/main/resources/vm/vue/v3/readme.txt @@ -1 +1 @@ -如果使用的是RuoYi-Cloud-Vue3前端,那么需要覆盖一下此目录的模板index.vue.vm、index-tree.vue.vm文件到上级vue目录。 \ No newline at end of file +濡傛灉浣跨敤鐨勬槸RuoYi-Cloud-Vue3鍓嶇锛岄偅涔堥渶瑕佽鐩栦竴涓嬫鐩綍鐨勬ā鏉縤ndex.vue.vm銆乮ndex-tree.vue.vm鏂囦欢鍒颁笂绾ue鐩綍銆 \ No newline at end of file diff --git a/yanzhu-modules/yanzhu-manage/pom.xml b/yanzhu-modules/yanzhu-manage/pom.xml index 2b7ec9d3..d0127fc9 100644 --- a/yanzhu-modules/yanzhu-manage/pom.xml +++ b/yanzhu-modules/yanzhu-manage/pom.xml @@ -123,7 +123,7 @@ iTextAsian 1.0.0 system - ${pom.basedir}\libs\iTextAsian-1.0.0.jar + ${pom.basedir}/libs/iTextAsian-1.0.0.jar @@ -143,7 +143,7 @@ aspose-words 15.8.0 system - ${pom.basedir}\libs\aspose-words-15.8.0-jdk16.jar + ${pom.basedir}/libs/aspose-words-15.8.0-jdk16.jar @@ -166,7 +166,7 @@ aspose-tasks 24.10 system - ${pom.basedir}\libs\aspose-tasks-24.10-jdk17.jar + ${pom.basedir}/libs/aspose-tasks-24.10-jdk17.jar net.sf.mpxj diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProVideoMonitorController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProVideoMonitorController.java index a066468b..63027dd5 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProVideoMonitorController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProVideoMonitorController.java @@ -1,13 +1,18 @@ package com.yanzhu.manage.controller; import java.util.List; +import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletResponse; + +import com.alibaba.fastjson2.JSONObject; +import com.yanzhu.common.core.utils.http.HttpUtils; import com.yanzhu.common.core.utils.poi.ExcelUtil; import com.yanzhu.common.core.web.controller.BaseController; import com.yanzhu.common.core.web.domain.AjaxResult; import com.yanzhu.common.core.web.page.TableDataInfo; import com.yanzhu.common.log.annotation.Log; import com.yanzhu.common.log.enums.BusinessType; +import com.yanzhu.common.redis.service.RedisService; import com.yanzhu.common.security.annotation.RequiresPermissions; import com.yanzhu.manage.domain.ProVideoMonitor; import com.yanzhu.manage.service.IProVideoMonitorService; @@ -100,4 +105,40 @@ public class ProVideoMonitorController extends BaseController { return toAjax(proVideoMonitorService.deleteProVideoMonitorByIds(ids)); } + + + @Autowired + private RedisService redisService; + + @RequiresPermissions("manage:videoMonitor:list") + @GetMapping("/getYsToken/{id}") + public AjaxResult getYsToken(@PathVariable Long id){ + ProVideoMonitor proVideoMonitor = proVideoMonitorService.selectProVideoMonitorById(id); + if(proVideoMonitor == null){ + return AjaxResult.error("鏃犳晥ID"); + } + String key="YS_Token__"+ proVideoMonitor.getAppkey()+"_"+proVideoMonitor.getSecret(); + JSONObject jo=redisService.getCacheObject(key); + String token=""; + if(jo!=null){ + long expireTime= jo.getLong("expireTime"); + if(expireTime> System.currentTimeMillis()+1000*60){ + token=jo.getString("accessToken"); + return AjaxResult.success(token); + } + } + String postData="appKey="+proVideoMonitor.getAppkey()+"&appSecret="+proVideoMonitor.getSecret(); + String url="https://open.ys7.com/api/lapp/token/get"; + String data= HttpUtils.sendPost(url,postData); + jo=JSONObject.parseObject(data); + if("200".equals(jo.getString("code"))){ + JSONObject jobj=jo.getJSONObject("data"); + token=jobj.getString("accessToken"); + long expireTime= jobj.getLong("expireTime"); + redisService.setCacheObject(key,jobj,expireTime-System.currentTimeMillis(), TimeUnit.MICROSECONDS); + } + return AjaxResult.success(token); + } + + } diff --git a/yanzhu-ui-vue3/src/App.vue b/yanzhu-ui-vue3/src/App.vue index 1ead6db3..276191f2 100644 --- a/yanzhu-ui-vue3/src/App.vue +++ b/yanzhu-ui-vue3/src/App.vue @@ -69,4 +69,7 @@ onMounted(() => { :focus-visible { outline: none !important; } +.command{ + cursor: pointer; +} \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/api/manage/videoMonitor.js b/yanzhu-ui-vue3/src/api/manage/videoMonitor.js index 465545e9..6f255082 100644 --- a/yanzhu-ui-vue3/src/api/manage/videoMonitor.js +++ b/yanzhu-ui-vue3/src/api/manage/videoMonitor.js @@ -42,3 +42,10 @@ export function delVideoMonitor(id) { method: 'delete' }) } + +export function getYsToken(id){ + return request({ + url: '/manage/videoMonitor/getYsToken/' + id, + method: 'get' + }) +} \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/assets/icons/svg/4screen.svg b/yanzhu-ui-vue3/src/assets/icons/svg/4screen.svg new file mode 100644 index 00000000..f85e93ce --- /dev/null +++ b/yanzhu-ui-vue3/src/assets/icons/svg/4screen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/assets/icons/svg/9screen.svg b/yanzhu-ui-vue3/src/assets/icons/svg/9screen.svg new file mode 100644 index 00000000..51747d7c --- /dev/null +++ b/yanzhu-ui-vue3/src/assets/icons/svg/9screen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/assets/icons/svg/video.svg b/yanzhu-ui-vue3/src/assets/icons/svg/video.svg new file mode 100644 index 00000000..396885fb --- /dev/null +++ b/yanzhu-ui-vue3/src/assets/icons/svg/video.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/components/CurrentProject/index.vue b/yanzhu-ui-vue3/src/components/CurrentProject/index.vue index 7d2af4a9..982437a5 100644 --- a/yanzhu-ui-vue3/src/components/CurrentProject/index.vue +++ b/yanzhu-ui-vue3/src/components/CurrentProject/index.vue @@ -1,6 +1,6 @@