diff --git a/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java b/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java
index cc014f3..6ba4546 100644
--- a/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java
+++ b/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java
@@ -7,7 +7,6 @@ import java.util.Map;
import com.cyx.common.annotation.Log;
import com.cyx.common.core.controller.BaseController;
import com.cyx.common.core.domain.AjaxResult;
-import com.cyx.common.core.domain.entity.SysDept;
import com.cyx.common.core.page.TableDataInfo;
import com.cyx.common.enums.BusinessType;
import com.cyx.common.utils.poi.ExcelUtil;
diff --git a/cyx-admin/src/main/resources/application.yml b/cyx-admin/src/main/resources/application.yml
index 93365ec..c53bd27 100644
--- a/cyx-admin/src/main/resources/application.yml
+++ b/cyx-admin/src/main/resources/application.yml
@@ -7,7 +7,7 @@ ruoyi:
# 版权年份
copyrightYear: 2023
# 实例演示开关
- demoEnabled: false
+ demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
profile: D:/ruoyi/uploadPath
# 获取ip地址开关
@@ -16,7 +16,7 @@ ruoyi:
# 开发环境配置
server:
# 服务器的HTTP端口,默认为80
- port: 8088
+ port: 8101
servlet:
# 应用的访问路径
context-path: /
diff --git a/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html b/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html
index e0d247a..9e1201d 100644
--- a/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html
+++ b/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html
@@ -121,6 +121,8 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
+ actions.push('查看图片 ');
+ actions.push('下载文件 ');
actions.push('上传附件 ');
actions.push('查看详情 ');
// actions.push('删除');
@@ -146,7 +148,54 @@
$.table.search()
}
})
- })
+ });
+ $("#bootstrap-table").on("click",".viewFiles0828",function () {
+ let _files = $(this)[0].dataset.files.split(',');
+ let _type = $(this)[0].dataset.type;
+ let _dataImg = [];
+ let _downData = [];
+ _files.forEach((item,index) => {
+ if(item.indexOf(".jpg")>-1 || item.indexOf(".png")>-1){
+ _dataImg.push({
+ "alt": "",
+ "pid": index, //图片id
+ "src": window.location.origin+item, //原图地址
+ "thumb": window.location.origin+item //缩略图地址
+ })
+ }else if(item.indexOf(".docx")> -1 || item.indexOf(".doc") > -1 || item.indexOf(".xlsx") > -1 || item.indexOf(".xls") > -1 || item.indexOf(".pdf") > -1){
+ _downData.push(item);
+ }
+ })
+ if(_type === '1'){ //查看图片
+ let json = {
+ "title": "查看图片", //相册标题
+ "id": 123, //相册id
+ "start": 0, //初始显示的图片序号,默认0
+ "data": _dataImg
+ };
+ layer.photos({
+ photos: json,
+ closeBtn: 0, //右上角按钮,可通过配置1和2来展示,如果不显示,则closeBtn: 0
+ anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
+ });
+ }else{ //下载附件
+ if(_downData.length === 0){
+ $.modal.msgError('暂无文件!')
+ return false;
+ }
+ _downData.forEach(item => {
+ let _lastNum = item.lastIndexOf('/')+1;
+ let _title = item.substr(_lastNum,item.length-1);
+ const a = document.createElement('a');
+ a.style.display = 'none';
+ a.download = _title;
+ a.href = window.location.origin+item;
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ })
+ }
+ });
});