@@ -257,7 +257,9 @@
checkedInfo:false,
checked1:false,//选中状态
concatenatedNamesTooltip:'暂无发布部门',
- doesItExist:false
+ doesItExist:false,
+ // 防抖计时器
+ debounceTimer: null
};
},
mounted(){
@@ -334,13 +336,7 @@
},
watch: {
filtertreeText(val){
- if(this.checkedInfo==true){
- this.fitlerNoFrameOptions = this.noFrameOptions.filter(option => {
- return option.name.toLowerCase().includes(val.toLowerCase());
- });
- }else{
- this.$refs.treeNode.filter(val);
- }
+ this.search();
},
filterText(val) {
this.$refs.tree.filter(val);
@@ -349,29 +345,29 @@
methods: {
// 全部选中
- chooseAll() {
- this.roleList = "";
- // 判断按钮的状态
- if (this.checked1) {
- this.loading=true;
- // 设置
- this.$refs.tree.setCheckedNodes(this.list);
- } else {
- this.$refs.tree.setCheckedNodes([]);
- }
- this.treelist = this.$refs.tree.getCheckedKeys();
- this.treeListNodes = this.$refs.tree.getCheckedNodes();
+ chooseAll() {
+ this.roleList = "";
+ // 判断按钮的状态
+ if (this.checked1) {
+ this.loading=true;
+ // 设置
+ this.$refs.tree.setCheckedNodes(this.list);
+ } else {
+ this.$refs.tree.setCheckedNodes([]);
+ }
+ this.treeListNodes = this.$refs.tree.getCheckedNodes();
+ this.treelist = this.$refs.tree.getCheckedKeys();
this.selectdept = JSON.stringify(this.treelist)
this.options = []
if (this.treelist.length == 0) {
this.selectdept = []
}
this.leftTreedatabind()
- },
- //增加键盘回车事件
+ },
+ //增加键盘回车事件
search(){
// 控制一下,如果用户没输入东西就不去搜索
- if(this.filtertreeText == ""){
+ /*if(this.filtertreeText == ""){
return
}else{
if(this.checkedInfo==true){
@@ -381,7 +377,19 @@
}else{
this.$refs.treeNode.filter(this.filtertreeText);
}
+
+ }*/
+ // 清除之前的计时器
+ if (this.debounceTimer) {
+ clearTimeout(this.debounceTimer);
}
+ // 设置新的计时器
+ this.debounceTimer = setTimeout(() => {
+ // 调用查询接口的方法
+ this.loading=true;
+ this.options = []
+ this.leftTreedatabind()
+ }, 500); // 500 毫秒的延迟,可以根据实际需求调整
},
navtab(e){
this.tab = e;
@@ -443,7 +451,8 @@
this.options = []
let params = {
dept: _this.selectdept,
- fileType: _this.filetype
+ fileType: _this.filetype,
+ filtertreeText: _this.filtertreeText
}
$.ajax({
url: api.leftTreeurl,
@@ -475,7 +484,7 @@
_this.formFileNum = 0
}
//最后搜索一下
- this.search();
+ //this.search();
});
},
@@ -485,7 +494,8 @@
this.options = []
let params = {
dept: _this.selectdept,
- fileType: _this.filetype
+ fileType: _this.filetype,
+ filtertreeText: _this.filtertreeText
}
$.ajax({
url: api.leftTreeurl,
@@ -510,7 +520,7 @@
_this.defaultkey.push(element.ID)
});
//最后搜索一下
- this.search();
+ //this.search();
}
});
},
@@ -531,7 +541,7 @@
}
},
selcetchangetype(e) {
- this.loading=true;
+ this.loading=true;
this.filetype = this.selectvalue
this.options = []
this.leftTreedatabind()
@@ -564,7 +574,7 @@
nodeArry.push(nodeObj.data)
this.$refs.tree.setCheckedNodes(nodeArry);
this.treeListNodes = this.$refs.tree.getCheckedNodes();
- this.selectdept = [];
+ //this.selectdept = [];
this.processFileNum = '';//流程数量
this.policyFileNum = '';//制度数量
if(this.checkedInfo==true){
@@ -590,16 +600,17 @@
setDefault(){
this.treelist.push(this.departmentId);
this.idjson.push(this.departmentId);
+ this.selectdept = JSON.stringify(this.treelist)
},
openGptHome() {
//let url = "https://chatgpt-uat.dcin-test.digitalyili.com/welcome?from=libchat&lib=ef2b50fd79c52577d51222bc58b231d7&priv=1&sid=" + sid ;
//this.fullscreen = window.innerWidth <= 768; // 小屏幕时全屏显示
- //https://yiligpt.x.digitalyili.com/libchat?lib=b8e082947190f2aa4fca0d96a5a95ea5&priv=1&sid=
+ //https://yiligpt.x.digitalyili.com/libchat?lib=b8e082947190f2aa4fca0d96a5a95ea5&priv=1&sid=
//this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https://yiligpt.x.digitalyili.com/libchat?lib=b8e082947190f2aa4fca0d96a5a95ea5&priv=1&sid=" + sid;
- var sids=encodeURIComponent(sid);
- //this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https%3A%2F%2Fyiligpt.x.digitalyili.com%2Flibchat%3Flib%3Db8e082947190f2aa4fca0d96a5a95ea5%26priv%3D1%26sid%3D"+ sids;
- this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https://yiligpt.x.digitalyili.com/libchat%25253Flib=b8e082947190f2aa4fca0d96a5a95ea5%252526priv=1%252526sid="+ sids;
- document.cookie = "AWSSESSIONID="+sid;
+ var sids=encodeURIComponent(sid);
+ //this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https%3A%2F%2Fyiligpt.x.digitalyili.com%2Flibchat%3Flib%3Db8e082947190f2aa4fca0d96a5a95ea5%26priv%3D1%26sid%3D"+ sids;
+ this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https://yiligpt.x.digitalyili.com/libchat%25253Flib=b8e082947190f2aa4fca0d96a5a95ea5%252526priv=1%252526sid="+ sids;
+ document.cookie = "AWSSESSIONID="+sid;
this.param1=sid;
this.dialogVisible = true;
@@ -611,7 +622,7 @@
this.dialogVisible = false;
window.open("https://iam.digitalyili.com/proxy/sso?target=https%3A%2F%2Fyiligpt.x.digitalyili.com%2Fauth-center%253Fplatform%253Doa%2526lib%253Db8e082947190f2aa4fca0d96a5a95ea5%2526priv%253D1", "_blank");
}
- },
+ },
});
@@ -702,7 +713,7 @@
.el-input--prefix .el-input__inner{padding-left: 45px; height: 35px;line-height: 35px; width: 90%;}
.el-input__icon{line-height: 35px;}
.el-input--suffix .el-input__inner{ height: 35px;line-height: 35px; width: 100%;}
-#postSearchCart .el-input{width: 81%!important;}
+ #postSearchCart .el-input{width: 81%!important;}
.el-input__suffix{right: 25px;}
/* 左侧手风琴样式 */
.el-tree-node__content{ background-color: #f1f5fa!important;padding: 6px 10px!important;}
diff --git a/com.awspaas.user.apps.yili.reportform/src/com/awspaas/user/apps/yili/reportform/controller/DataViewController.java b/com.awspaas.user.apps.yili.reportform/src/com/awspaas/user/apps/yili/reportform/controller/DataViewController.java
index 9a4144d1..0f026b9e 100644
--- a/com.awspaas.user.apps.yili.reportform/src/com/awspaas/user/apps/yili/reportform/controller/DataViewController.java
+++ b/com.awspaas.user.apps.yili.reportform/src/com/awspaas/user/apps/yili/reportform/controller/DataViewController.java
@@ -67,10 +67,17 @@ public class DataViewController {
}
return queryTermsDeptVal;
}
+
@Mapping(value = "com.awspaas.user.apps.yili.reportform.service.DataViewService_deptView",
desc = "部门视图")
public String deptView(UserContext uc, RequestParams params) {
- String deptViewVal = deptViewVal = new DataViewService(uc).deptView(uc, params);
- return deptViewVal;
+ //这里先做一个参数,用于新旧切换
+ String deptViewVersion = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.reportform", "deptViewVersion");
+ System.out.println(">>>deptViewVersion = " + deptViewVersion);
+ if("2.0".equals(deptViewVersion)){
+ return new DataViewService(uc).getDeptViewInfo(uc, params);
+ }else{
+ return new DataViewService(uc).deptView(uc, params);
+ }
}
}
diff --git a/com.awspaas.user.apps.yili.reportform/src/com/awspaas/user/apps/yili/reportform/service/DataViewService.java b/com.awspaas.user.apps.yili.reportform/src/com/awspaas/user/apps/yili/reportform/service/DataViewService.java
index f2eed024..e1819276 100644
--- a/com.awspaas.user.apps.yili.reportform/src/com/awspaas/user/apps/yili/reportform/service/DataViewService.java
+++ b/com.awspaas.user.apps.yili.reportform/src/com/awspaas/user/apps/yili/reportform/service/DataViewService.java
@@ -24,19 +24,15 @@ import com.alibaba.fastjson.JSONObject;
import com.awspaas.user.apps.yili.reportform.util.GetNodesUtil;
import com.awspaas.user.apps.yili.reportform.util.TaskUtil;
import com.awspaas.user.apps.yili.reportform.util.TreeUtil;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeSet;
-import java.util.function.Function;
+
+import java.sql.Connection;
+import java.util.*;
import java.util.stream.Collectors;
import net.sf.json.JSONArray;
import org.springframework.util.StringUtils;
+import javax.lang.model.SourceVersion;
+
import static java.util.stream.Collectors.collectingAndThen;
import static java.util.stream.Collectors.toCollection;
@@ -1672,11 +1668,7 @@ public class DataViewService
fileTypes.add(fileType);
fileType = new HashMap<>();
fileType.put("termsKey", "policyFile");
- fileType.put("termsVal", "制度");
- fileTypes.add(fileType);
- fileType = new HashMap<>();
- fileType.put("termsKey", "guideFile");
- fileType.put("termsVal", "操作指导");
+ fileType.put("termsVal", "制度/操作指导");
fileTypes.add(fileType);
fileType = new HashMap<>();
fileType.put("termsKey", "formFile");
@@ -1700,13 +1692,77 @@ public class DataViewService
}
-
-
-
-
-
-
-
+ /**
+ * 根据查询条件获取部门视图数据
+ * @param uc 用户上下文
+ * @param params 参数列表
+ * @return
+ */
+ public String getDeptViewInfo(UserContext uc, RequestParams params) {
+ ResponseObject ro = ResponseObject.newOkResponse();
+ List
frameIDs = new ArrayList<>();//树的架构文件集合
+ LinkedHashMap filesCount = new LinkedHashMap<>();//各文件数量集合
+ filesCount.put("processFileNum", 0);
+ filesCount.put("policyFileNum", 0);
+ filesCount.put("guideFileNum", 0);
+ filesCount.put("formFileNum", 0);
+ filesCount.put("processschemeFileNum", 0);
+ filesCount.put("engineeringtandardFileNum", 0);
+ List