|
|
@@ -1,1082 +1,2128 @@
|
|
|
<%@ taglib prefix="ss" uri="/ssTag" %>
|
|
|
<%@ page language="java" pageEncoding="UTF-8" isELIgnored="false" %>
|
|
|
-<%@ taglib uri="/ssTag" prefix="ss"%>
|
|
|
-<%pageContext.setAttribute("wdpageinformation","{'hastab':'0'}");%>
|
|
|
+<%@ taglib uri="/ssTag" prefix="ss" %>
|
|
|
+<%pageContext.setAttribute("wdpageinformation", "{'hastab':'0'}");%>
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
- <meta http-equiv="pragma" content="no-cache">
|
|
|
- <meta http-equiv="cache-control" content="no-cache">
|
|
|
- <meta http-equiv="expires" content="0">
|
|
|
- <script>window.loginStatus="${empty sessionScope['ssUser']?'0':'1'}"</script>
|
|
|
- <ss:skin file='main.css'/>
|
|
|
- <script type="text/javascript" src="/ss/jquery/jquery.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/artdialog/artDialogUtil.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/js/base.js"></script>
|
|
|
- <script> if(!window.wd) var wd={}; if(!wd.display) wd.display={}; wd.display.wdDialogId="objList"; if(!wd.app) wd.app={}; wd.app.name='pms';</script>
|
|
|
- <script type="text/javascript" src="/ss/js/masklayer.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/js/wdDialogInit.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/js/common.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/js/display.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/js/edit.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/nicescroll/jquery.nicescroll.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/nicescroll/jquery.nicescroll.iframehelper.min.js"></script>
|
|
|
- <link rel="stylesheet" type="text/css" href="/ss/window/theme/dhtmlxwindows.css">
|
|
|
- <link rel="stylesheet" type="text/css" href="/ss/window/theme/dhx_blue/dhtmlxwindows_dhx_blue.css">
|
|
|
- <script type="text/javascript" src="/ss/window/dhtmlxcommon.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/window/dhtmlxwindows.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/window/dhtmlxcontainer.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/js/common.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/js/display.js"></script>
|
|
|
- <script type="text/javascript" src="/ss/js/edit.js"></script>
|
|
|
- <ssDlg setPval="true"/> <%-- setValue="true" close="true"。Lin --%>
|
|
|
- <script type="text/javascript" src="/ss/jquery/jquery.ellipsis.js"></script>
|
|
|
-
|
|
|
- <%-- 新UI引入的JS --%>
|
|
|
- <script src="/js/load.js"></script> <%-- ="/newUI/ss/js/base.js"。Lin(新UI) --%>
|
|
|
- <script src="/js/pageC.js"></script> <%-- 对象变动、修改、查看页,左则选项卡宽度 在里面定义 Ben(20251213) --%>
|
|
|
+ <meta http-equiv="pragma" content="no-cache">
|
|
|
+ <meta http-equiv="cache-control" content="no-cache">
|
|
|
+ <meta http-equiv="expires" content="0">
|
|
|
+ <script>window.loginStatus = "${empty sessionScope['ssUser']?'0':'1'}"</script>
|
|
|
+ <ss:skin file='main.css'/>
|
|
|
+ <script type="text/javascript" src="/ss/jquery/jquery.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/artdialog/artDialogUtil.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/js/base.js"></script>
|
|
|
+ <script> if (!window.wd) var wd = {};
|
|
|
+ if (!wd.display) wd.display = {};
|
|
|
+ wd.display.wdDialogId = "objList";
|
|
|
+ if (!wd.app) wd.app = {};
|
|
|
+ wd.app.name = 'pms';</script>
|
|
|
+ <script type="text/javascript" src="/ss/js/masklayer.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/js/wdDialogInit.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/js/common.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/js/display.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/js/edit.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/nicescroll/jquery.nicescroll.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/nicescroll/jquery.nicescroll.iframehelper.min.js"></script>
|
|
|
+ <link rel="stylesheet" type="text/css" href="/ss/window/theme/dhtmlxwindows.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="/ss/window/theme/dhx_blue/dhtmlxwindows_dhx_blue.css">
|
|
|
+ <script type="text/javascript" src="/ss/window/dhtmlxcommon.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/window/dhtmlxwindows.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/window/dhtmlxcontainer.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/js/common.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/js/display.js"></script>
|
|
|
+ <script type="text/javascript" src="/ss/js/edit.js"></script>
|
|
|
+ <ssDlg setPval="true"/>
|
|
|
+ <%-- setValue="true" close="true"。Lin --%>
|
|
|
+ <script type="text/javascript" src="/ss/jquery/jquery.ellipsis.js"></script>
|
|
|
+
|
|
|
+ <%-- 新UI引入的JS --%>
|
|
|
+ <script src="/js/load.js"></script>
|
|
|
+ <%-- ="/newUI/ss/js/base.js"。Lin(新UI) --%>
|
|
|
+ <script src="/js/pageC.js"></script>
|
|
|
+ <%-- 对象变动、修改、查看页,左则选项卡宽度 在里面定义 Ben(20251213) --%>
|
|
|
|
|
|
<%-- 改为 <data@ss name="prt"/>。Lin
|
|
|
<tab@ss name="print" enable="viewobject.funcMap.play.print"/> --%>
|
|
|
- <ss:data name='prt'/><%-- 初始化弹出窗口的打印按钮的后台数据 Ben--%>
|
|
|
-<%--批量打印--%>
|
|
|
-<%-- 去掉,改为 <jsp@ss file="/ss/prtIcon.jsp"/>。Lin
|
|
|
- 不用 "wdBatchPrint",统一用 "wdPrint" -- 写在 prtIcon.jsp 里
|
|
|
- <equal@ss val="${empty prt}" val2="false">
|
|
|
- <script>
|
|
|
- $(function(){
|
|
|
- try{
|
|
|
- var wdDialogId=wd.display.getwdDialogId();
|
|
|
- var win=wd.topWindow.dhxWins.window(wdDialogId);
|
|
|
- win.button("wdBatchPrint").show();
|
|
|
- win.button("wdBatchPrint").onclick=function(){
|
|
|
- <varServ@ss dlg="true" name="${prt.service}" dest="${prt.dest}" parm="${prt.param}" title="${prt.title}" width="${prt.width}" height="${prt.height}" minHeight="${prt.minHeight}" maxHeight="${prt.maxHeight}"/>
|
|
|
- }
|
|
|
- }catch(e){
|
|
|
- console.log(e);
|
|
|
- }
|
|
|
- })
|
|
|
- </script>
|
|
|
- </equal@ss>
|
|
|
---%>
|
|
|
- <%@include file="/ss/clip/prtIcon.jsp"%><%-- 引入初始化弹出窗口的打印按钮的JS Ben--%>
|
|
|
-
|
|
|
- <script>
|
|
|
- window.ss.dom.formElemConfig = window.ss.dom.formElemConfig || {};
|
|
|
- </script>
|
|
|
+ <ss:data name='prt'/><%-- 初始化弹出窗口的打印按钮的后台数据 Ben--%>
|
|
|
+
|
|
|
+ <%@include file="/ss/clip/prtIcon.jsp" %>
|
|
|
+ <%-- 引入初始化弹出窗口的打印按钮的JS Ben--%>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ window.ss.dom.formElemConfig = window.ss.dom.formElemConfig || {};
|
|
|
+ </script>
|
|
|
+ <style>
|
|
|
+ /* 首页 loading:没加载完不显示页面内容 */
|
|
|
+ .pobj-loading-home {
|
|
|
+ position: fixed;
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ z-index: 9999;
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 列表 loading:区域性(搜索条件和分页之间) */
|
|
|
+ .pobj-list-loading {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 260px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .pobj-spinner {
|
|
|
+ width: 18px;
|
|
|
+ height: 18px;
|
|
|
+ border-radius: 50%;
|
|
|
+ border: 2px solid rgba(0, 0, 0, 0.2);
|
|
|
+ border-top-color: rgba(0, 0, 0, 0.65);
|
|
|
+ animation: pobjSpin 0.8s linear infinite;
|
|
|
+ }
|
|
|
+
|
|
|
+ @keyframes pobjSpin {
|
|
|
+ from {
|
|
|
+ transform: rotate(0deg);
|
|
|
+ }
|
|
|
+ to {
|
|
|
+ transform: rotate(360deg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </style>
|
|
|
</head>
|
|
|
<body>
|
|
|
|
|
|
<div id="app">
|
|
|
-
|
|
|
- <form class="page-container" id="myForm" action="<ss:serv name='${currentService.service}' dest='${currentService.dest}' parm='${currentService.param}'/>" method="post">
|
|
|
- <input type="hidden" name="isAnd" value='${isAnd}'/>
|
|
|
- <input name="management" type="hidden" value="${management}"/>
|
|
|
- <input name="isFulltext" type="hidden" value="${isFulltext}"/>
|
|
|
-
|
|
|
- <%--搜索条件start--%>
|
|
|
- <div class="search-bar">
|
|
|
- <ss-breadcrumb></ss-breadcrumb>
|
|
|
- <div class="search-bar-contaienr">
|
|
|
-
|
|
|
- <%--新UI 单对象查询翻页end Ben --%>
|
|
|
-
|
|
|
-
|
|
|
- <%--关键词--%>
|
|
|
- <%-- 再去掉 -- 只支持一行。Lin
|
|
|
- <ss:rpt name='searchableFields' id='fieldsList'>
|
|
|
- --%>
|
|
|
- <ss:rpt name='fieldsList' id='searchItem'>
|
|
|
- <%
|
|
|
- ss.obj.ObjFieldB f= (ss.obj.ObjFieldB)pageContext.getAttribute("searchItem");
|
|
|
- pageContext.setAttribute("searchItemValue",request.getParameter(f.name));
|
|
|
- %>
|
|
|
-
|
|
|
- <%--codebook 使用select下拉--%>
|
|
|
- <ss:equal val='${empty searchItem.cbName}' val2='false'>
|
|
|
- <%-- 旧的objecPicker
|
|
|
- <input type="text" name="${searchItem.name}" value="${searchItemValue}"/>
|
|
|
- <input type="text" name="${searchItem.name}Name" placeholder="${searchItem.desc}" style="width:${searchItem.width};min-width: 108px;"/>
|
|
|
- <ss:equal val='${empty cadcadingInputs[searchItem.name]}' val2='true'>
|
|
|
- <ss:objp name='${searchItem.name}' cb='${searchItem.cbName}' inp='true' filterField='${searchItem.filterFieldStr}'/>
|
|
|
- </ss:equal> --%>
|
|
|
-
|
|
|
- <%-- 新UI --%>
|
|
|
- <!-- <ss-objp
|
|
|
- v-model="${searchItem.name}"
|
|
|
- name="${searchItem.name}"
|
|
|
- :options="${searchItem.name}Option"
|
|
|
- placeholder="${searchItem.desc}"
|
|
|
- width="120"
|
|
|
- input="true"
|
|
|
- ></ss-objp> -->
|
|
|
-
|
|
|
- <ss-objp
|
|
|
- v-model="${searchItem.name}"
|
|
|
- name="${searchItem.name}"
|
|
|
- :opt="${searchItem.name}Option"
|
|
|
- placeholder="${searchItem.desc}"
|
|
|
- width="150px"
|
|
|
- inp="true"
|
|
|
- url="/service?ssServ=loadObjpOpt&objectpickerdropdown1=1"
|
|
|
- cb="${searchItem.cbName}"
|
|
|
- ></ss-objp>
|
|
|
- <script>
|
|
|
- /**
|
|
|
- * objectPicker(如:性别码)
|
|
|
- * optUrl:加载下拉菜单option选项的url
|
|
|
- */
|
|
|
- window.ss.dom.formElemConfig.${searchItem.name}={desc:'${searchItem.desc}',value:'${searchItemValue}',optUrl:'123456',type: 2};//放当前页面表单元素配置的变量
|
|
|
- </script>
|
|
|
- </ss:equal>
|
|
|
- <%--codebook 使用input输入框--%>
|
|
|
- <ss:equal val='${empty searchItem.cbName}' val2='true'>
|
|
|
- <%--日期--%>
|
|
|
- <ss:equal val='${searchItem.type}' valList='3,11'> <%-- 改 equal:val1='true' val2='${searchItem.type == "time"}'。Lin --%>
|
|
|
- <!-- <div class="input-inside"> -->
|
|
|
- <%--年度--%>
|
|
|
- <%--
|
|
|
- <ss:equal val='${searchItem.enrolDate}' val2='true'>
|
|
|
- <input type='hidden' placeholder="${searchItem.desc}" name='${searchItem.name}'
|
|
|
- value="<ss:txt val='${searchItemValue}'/>"/>
|
|
|
- <div><input type="text" name="${searchItem.name}_year" autocomplete="off" />
|
|
|
- <input name="${searchItem.name}_month" type="button" value="春季" ssVal="3"/>
|
|
|
- <input name="${searchItem.name}_month" type="button" value="秋季" ssVal="9"/>
|
|
|
- </div><script>(function(){wd.edit.onoffInit('radio','${searchItem.name}_month','',false,null,null,null,'edit');})();</script>
|
|
|
- <script>(function(){
|
|
|
- wd.display.initEnrolDate('${searchItem.name}','edit');
|
|
|
- })()
|
|
|
- </script>
|
|
|
-
|
|
|
- </ss:equal>
|
|
|
- --%>
|
|
|
- <%--日期--%>
|
|
|
-
|
|
|
- <ss:equal val='${searchItem.type==11}' val2='true'>
|
|
|
- <%--<input type='text' autocomplete="off" placeholder="${searchItem.desc}" name='${searchItem.name}'
|
|
|
- value='<ss:txt val='${searchItemValue}'/>' format="${searchItem.fmt}"/>
|
|
|
- <input type="button" ssType="date" ssName="${searchItem.name}"/>--%>
|
|
|
-
|
|
|
- <!-- <ss-date-picker
|
|
|
- v-model="${searchItem.name}"
|
|
|
- name="${searchItem.name}"
|
|
|
- type="date"
|
|
|
- placeholder="${searchItem.desc}"
|
|
|
- width="120px"
|
|
|
- ></ss-date-picker> -->
|
|
|
- <ss-search-date-picker
|
|
|
- v-model="${searchItem.name}"
|
|
|
- name="${searchItem.name}"
|
|
|
- type="date"
|
|
|
- placeholder="${searchItem.desc}"
|
|
|
- width="100px"
|
|
|
- fmt="${searchItem.fmt}"
|
|
|
- ></ss-search-date-picker>
|
|
|
- <script>
|
|
|
- //日期类型(出生日期)
|
|
|
- window.ss.dom.formElemConfig.${searchItem.name}={desc:'${searchItem.desc}',value:'${searchItemValue}',type:3, name:'${searchItem.name}'};//放当前页面表单元素配置的变量
|
|
|
- </script>
|
|
|
-
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
-
|
|
|
- <!-- </div> -->
|
|
|
- </ss:equal>
|
|
|
- <%--文本--%>
|
|
|
- <%-- 改 equal:val1='false' val2='${searchItem.type == "time"}'。Lin --%>
|
|
|
-
|
|
|
- <ss:notEqual val='${searchItem.type}' valList='3,11'>
|
|
|
- <%--<input name='${searchItem.name}' placeholder="${searchItem.desc}" type='text'
|
|
|
- value='<ss:txt val='${searchItemValue}'/>'/>
|
|
|
- <input type="hidden" ssType="and" ssName="${searchItem.name}"/>--%>
|
|
|
- <%--<script>wd.edit.addClearTextButton("${searchItem.name}");</script>--%>
|
|
|
- <ss-search-input
|
|
|
- name="${searchItem.name}"
|
|
|
- placeholder="${searchItem.desc}"
|
|
|
- v-model="${searchItem.name}"
|
|
|
- width="100px"
|
|
|
- >
|
|
|
- </ss-search-input>
|
|
|
- </ss:notEqual>
|
|
|
-
|
|
|
- </ss:equal>
|
|
|
- </ss:rpt>
|
|
|
- <%-- 再去掉 -- 只支持一行。Lin
|
|
|
- </ss:rpt>
|
|
|
- --%>
|
|
|
- <%--
|
|
|
- <ss:rpt name='cadcadingName' id='item'>
|
|
|
- <ss:ccp name='${item}'/>
|
|
|
- </ss:rpt>
|
|
|
- --%>
|
|
|
-
|
|
|
- <ss:equal val='${hasKeyWord}' val2='true'>
|
|
|
- <%--
|
|
|
- <input name="ssKeyword" value="${ssKeyword}" type="text" placeholder="关键词"/>
|
|
|
- <script>wd.edit.addClearTextButton("ssKeyword");</script>
|
|
|
- --%>
|
|
|
- <!-- <ss-search-input
|
|
|
- name="ssKeyword"
|
|
|
- placeholder="关键词"
|
|
|
- v-model="form.keyword"
|
|
|
- width="120"
|
|
|
- >
|
|
|
- </ss-search-input> -->
|
|
|
- <ss-search-input
|
|
|
- name="ssKeyword"
|
|
|
- placeholder="关键词"
|
|
|
- v-model="ssKeyword"
|
|
|
- width="100px"
|
|
|
- @search="search"
|
|
|
- >
|
|
|
- </ss-search-input>
|
|
|
- <script>
|
|
|
-
|
|
|
- //关键词
|
|
|
- window.ss.dom.formElemConfig.ssKeyword={value:'${ssKeyword}',name:"ssKeyword",desc:"关键词",type:31};//放当前页面表单元素配置的变量
|
|
|
- </script>
|
|
|
-
|
|
|
- </ss:equal>
|
|
|
- <ss-search-button
|
|
|
- text="所有"
|
|
|
- icon-class="nav-icon-search"
|
|
|
- :opt="searchButtonConfig"
|
|
|
- :check-id="searchButtonConfigCheckId"
|
|
|
- ></ss-search-button>
|
|
|
- <%-- 新UI 单对象查询 选项卡、翻页start Ben --%>
|
|
|
- <ss:equal val='${"1"==isReady && !isMultipleObject}' val2='true'>
|
|
|
- <%--
|
|
|
- <ss:equal val='${hasScope}' val2='true'>
|
|
|
- <ul style="list-style: none;display: inline-block;">
|
|
|
- <li ssType="searchScope" ssVal=99>所有</li>
|
|
|
- <li ssType="searchScope" ssVal=2>管理</li>
|
|
|
- <li ssType="searchScope" ssVal=1>创建</li>
|
|
|
- <li ssType="searchScope" ssVal=3>已办</li>
|
|
|
- <li ssType="searchScope" ssVal=55>停用</li>
|
|
|
- </ul>
|
|
|
- </ss:equal>
|
|
|
- --%>
|
|
|
- </ss:equal>
|
|
|
- <%--
|
|
|
- <input type="submit" name="ssSearch" value="搜索" class="content-invertButton"/>
|
|
|
- --%>
|
|
|
- <!-- <ss-search-button text="搜索" @click="console.log('这里改成提交表单')">
|
|
|
- </ss-search-button> -->
|
|
|
-
|
|
|
- <script>
|
|
|
- <%-- 根按钮(管理按钮) --%>
|
|
|
- window.ss.dom.btnElemConfig = window.ss.dom.btnElemConfig || {};
|
|
|
-
|
|
|
- </script>
|
|
|
-
|
|
|
- <%--多对像搜索隐藏全文按钮--%>
|
|
|
- <%--
|
|
|
- <ss:equal val='${isMultipleObject}' val2='false'>
|
|
|
- --%><%--
|
|
|
+ <div v-show="loadingHome" class="pobj-loading-home" style="display:none;">
|
|
|
+ <div class="pobj-spinner"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <%-- 功能说明:主布局容器(左侧表单 + 右侧 ss-sidebar) by xu 20260113 --%>
|
|
|
+ <div style="display: flex; height: 100%; " v-show="homeReady">
|
|
|
+ <%-- 功能说明:左侧表单区域在 flex 中占满剩余宽度(避免挤掉右侧 ss-sidebar) by xu 20260113 --%>
|
|
|
+ <form class="page-container" id="myForm" style="flex: 1; min-width: 0; width: auto;"
|
|
|
+ action="<ss:serv name='${currentService.service}' dest='${currentService.dest}' parm='${currentService.param}'/>"
|
|
|
+ method="post">
|
|
|
+ <input type="hidden" name="isAnd" v-model="form.isAnd"/>
|
|
|
+ <input name="management" type="hidden" v-model="form.management"/>
|
|
|
+ <input name="isFulltext" type="hidden" v-model="form.isFulltext"/>
|
|
|
+ <input type="hidden" name="pageNo" v-model="ssPaging.pageNo"/>
|
|
|
+ <input type="hidden" name="rowNumPer" v-model="ssPaging.rowNumPer"/>
|
|
|
+ <input type="hidden" name="rowNum" v-model="ssPaging.rowNum"/>
|
|
|
+
|
|
|
+ <%--搜索条件start--%>
|
|
|
+ <div class="search-bar">
|
|
|
+ <ss-breadcrumb></ss-breadcrumb>
|
|
|
+ <div class="search-bar-contaienr">
|
|
|
+ <template v-if="homeReady">
|
|
|
+ <template v-for="field in searchFieldList" :key="field.name">
|
|
|
+ <ss-objp
|
|
|
+ v-if="field.cbName"
|
|
|
+ v-model="form[field.name]"
|
|
|
+ :name="field.name"
|
|
|
+ :placeholder="field.desc"
|
|
|
+ width="150px"
|
|
|
+ inp="true"
|
|
|
+ url="/service?ssServ=loadObjpOpt&objectpickerdropdown1=1"
|
|
|
+ :cb="field.cbName"
|
|
|
+ ></ss-objp>
|
|
|
+ <ss-search-date-picker
|
|
|
+ v-else-if="field.type == 11"
|
|
|
+ v-model="form[field.name]"
|
|
|
+ :name="field.name"
|
|
|
+ type="date"
|
|
|
+ :placeholder="field.desc"
|
|
|
+ width="140px"
|
|
|
+ :fmt="field.fmt"
|
|
|
+ ></ss-search-date-picker>
|
|
|
+ <ss-search-date-picker
|
|
|
+ v-else-if="field.type == 3"
|
|
|
+ v-model="form[field.name]"
|
|
|
+ :name="field.name"
|
|
|
+ type="datetime"
|
|
|
+ :placeholder="field.desc"
|
|
|
+ width="200px"
|
|
|
+ :fmt="field.fmt"
|
|
|
+ ></ss-search-date-picker>
|
|
|
+ <ss-search-input
|
|
|
+ v-else
|
|
|
+ :name="field.name"
|
|
|
+ :placeholder="field.desc"
|
|
|
+ v-model="form[field.name]"
|
|
|
+ width="120px"
|
|
|
+ @search="search"
|
|
|
+ ></ss-search-input>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <ss-search-input
|
|
|
+ v-if="hasKeyword"
|
|
|
+ name="ssKeyword"
|
|
|
+ placeholder="关键词"
|
|
|
+ v-model="form.ssKeyword"
|
|
|
+ width="120px"
|
|
|
+ @search="search"
|
|
|
+ ></ss-search-input>
|
|
|
+
|
|
|
+ <ss-search-button
|
|
|
+ v-if="hasScope"
|
|
|
+ :key="'scope-' + String(searchButtonConfigCheckId)"
|
|
|
+ text="所有"
|
|
|
+ icon-class="nav-icon-search"
|
|
|
+ :opt="searchButtonConfig"
|
|
|
+ :check-id="searchButtonConfigCheckId"
|
|
|
+ ></ss-search-button>
|
|
|
+
|
|
|
+ <template v-for="func in rootFuncList" :key="func.id || func.servName">
|
|
|
+ <ss-search-button
|
|
|
+ :text="func.desc || func.title || ''"
|
|
|
+ icon-class="nav-icon-add"
|
|
|
+ :opt="[]"
|
|
|
+ :check-id="0"
|
|
|
+ @click="handleRootFuncClick(func)"
|
|
|
+ ></ss-search-button>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
+
|
|
|
+ <%--新UI 单对象查询翻页end Ben --%>
|
|
|
+
|
|
|
+
|
|
|
+ <%--关键词--%>
|
|
|
+ <%-- 再去掉 -- 只支持一行。Lin
|
|
|
+ <ss:rpt name='searchableFields' id='fieldsList'>
|
|
|
+ --%>
|
|
|
+ <ss:rpt name='fieldsList' id='searchItem'>
|
|
|
+ <%
|
|
|
+ ss.obj.ObjFieldB f = (ss.obj.ObjFieldB) pageContext.getAttribute("searchItem");
|
|
|
+ pageContext.setAttribute("searchItemValue", request.getParameter(f.name));
|
|
|
+ %>
|
|
|
+
|
|
|
+ <%--codebook 使用select下拉--%>
|
|
|
+ <ss:equal val='${empty searchItem.cbName}' val2='false'>
|
|
|
+ <%-- 旧的objecPicker
|
|
|
+ <input type="text" name="${searchItem.name}" value="${searchItemValue}"/>
|
|
|
+ <input type="text" name="${searchItem.name}Name" placeholder="${searchItem.desc}" style="width:${searchItem.width};min-width: 108px;"/>
|
|
|
+ <ss:equal val='${empty cadcadingInputs[searchItem.name]}' val2='true'>
|
|
|
+ <ss:objp name='${searchItem.name}' cb='${searchItem.cbName}' inp='true' filterField='${searchItem.filterFieldStr}'/>
|
|
|
+ </ss:equal> --%>
|
|
|
+
|
|
|
+ <%-- 新UI --%>
|
|
|
+ <!-- <ss-objp
|
|
|
+ v-model="${searchItem.name}"
|
|
|
+ name="${searchItem.name}"
|
|
|
+ :options="${searchItem.name}Option"
|
|
|
+ placeholder="${searchItem.desc}"
|
|
|
+ width="120"
|
|
|
+ input="true"
|
|
|
+ ></ss-objp> -->
|
|
|
+
|
|
|
+ <ss-objp
|
|
|
+ v-model="${searchItem.name}"
|
|
|
+ name="${searchItem.name}"
|
|
|
+ :opt="${searchItem.name}Option"
|
|
|
+ placeholder="${searchItem.desc}"
|
|
|
+ width="150px"
|
|
|
+ inp="true"
|
|
|
+ url="/service?ssServ=loadObjpOpt&objectpickerdropdown1=1"
|
|
|
+ cb="${searchItem.cbName}"
|
|
|
+ ></ss-objp>
|
|
|
+ <script>
|
|
|
+ /**
|
|
|
+ * objectPicker(如:性别码)
|
|
|
+ * optUrl:加载下拉菜单option选项的url
|
|
|
+ */
|
|
|
+ window.ss.dom.formElemConfig.${searchItem.name} = {
|
|
|
+ desc: '${searchItem.desc}',
|
|
|
+ value: '${searchItemValue}',
|
|
|
+ optUrl: '123456',
|
|
|
+ type: 2
|
|
|
+ };//放当前页面表单元素配置的变量
|
|
|
+ </script>
|
|
|
+ </ss:equal>
|
|
|
+ <%--codebook 使用input输入框--%>
|
|
|
+ <ss:equal val='${empty searchItem.cbName}' val2='true'>
|
|
|
+ <%--日期--%>
|
|
|
+ <ss:equal val='${searchItem.type}'
|
|
|
+ valList='3,11'> <%-- 改 equal:val1='true' val2='${searchItem.type == "time"}'。Lin --%>
|
|
|
+ <!-- <div class="input-inside"> -->
|
|
|
+ <%--年度--%>
|
|
|
+ <%--
|
|
|
+ <ss:equal val='${searchItem.enrolDate}' val2='true'>
|
|
|
+ <input type='hidden' placeholder="${searchItem.desc}" name='${searchItem.name}'
|
|
|
+ value="<ss:txt val='${searchItemValue}'/>"/>
|
|
|
+ <div><input type="text" name="${searchItem.name}_year" autocomplete="off" />
|
|
|
+ <input name="${searchItem.name}_month" type="button" value="春季" ssVal="3"/>
|
|
|
+ <input name="${searchItem.name}_month" type="button" value="秋季" ssVal="9"/>
|
|
|
+ </div><script>(function(){wd.edit.onoffInit('radio','${searchItem.name}_month','',false,null,null,null,'edit');})();</script>
|
|
|
+ <script>(function(){
|
|
|
+ wd.display.initEnrolDate('${searchItem.name}','edit');
|
|
|
+ })()
|
|
|
+ </script>
|
|
|
+
|
|
|
+ </ss:equal>
|
|
|
+ --%>
|
|
|
+ <%--日期--%>
|
|
|
+
|
|
|
+ <ss:equal val='${searchItem.type==11}' val2='true'>
|
|
|
+ <%--<input type='text' autocomplete="off" placeholder="${searchItem.desc}" name='${searchItem.name}'
|
|
|
+ value='<ss:txt val='${searchItemValue}'/>' format="${searchItem.fmt}"/>
|
|
|
+ <input type="button" ssType="date" ssName="${searchItem.name}"/>--%>
|
|
|
+
|
|
|
+ <!-- <ss-date-picker
|
|
|
+ v-model="${searchItem.name}"
|
|
|
+ name="${searchItem.name}"
|
|
|
+ type="date"
|
|
|
+ placeholder="${searchItem.desc}"
|
|
|
+ width="120px"
|
|
|
+ ></ss-date-picker> -->
|
|
|
+ <ss-search-date-picker
|
|
|
+ v-model="${searchItem.name}"
|
|
|
+ name="${searchItem.name}"
|
|
|
+ type="date"
|
|
|
+ placeholder="${searchItem.desc}"
|
|
|
+ width="100px"
|
|
|
+ fmt="${searchItem.fmt}"
|
|
|
+ ></ss-search-date-picker>
|
|
|
+ <script>
|
|
|
+ //日期类型(出生日期)
|
|
|
+ window.ss.dom.formElemConfig.${searchItem.name} = {
|
|
|
+ desc: '${searchItem.desc}',
|
|
|
+ value: '${searchItemValue}',
|
|
|
+ type: 3,
|
|
|
+ name: '${searchItem.name}'
|
|
|
+ };//放当前页面表单元素配置的变量
|
|
|
+ </script>
|
|
|
+
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- </div> -->
|
|
|
+ </ss:equal>
|
|
|
+ <%--文本--%>
|
|
|
+ <%-- 改 equal:val1='false' val2='${searchItem.type == "time"}'。Lin --%>
|
|
|
+
|
|
|
+ <ss:notEqual val='${searchItem.type}' valList='3,11'>
|
|
|
+ <%--<input name='${searchItem.name}' placeholder="${searchItem.desc}" type='text'
|
|
|
+ value='<ss:txt val='${searchItemValue}'/>'/>
|
|
|
+ <input type="hidden" ssType="and" ssName="${searchItem.name}"/>--%>
|
|
|
+ <%--<script>wd.edit.addClearTextButton("${searchItem.name}");</script>--%>
|
|
|
+ <ss-search-input
|
|
|
+ name="${searchItem.name}"
|
|
|
+ placeholder="${searchItem.desc}"
|
|
|
+ v-model="${searchItem.name}"
|
|
|
+ width="100px"
|
|
|
+ >
|
|
|
+ </ss-search-input>
|
|
|
+ </ss:notEqual>
|
|
|
+
|
|
|
+ </ss:equal>
|
|
|
+ </ss:rpt>
|
|
|
+ <%-- 再去掉 -- 只支持一行。Lin
|
|
|
+ </ss:rpt>
|
|
|
+ --%>
|
|
|
+ <%--
|
|
|
+ <ss:rpt name='cadcadingName' id='item'>
|
|
|
+ <ss:ccp name='${item}'/>
|
|
|
+ </ss:rpt>
|
|
|
+ --%>
|
|
|
+
|
|
|
+ <ss:equal val='${hasKeyWord}' val2='true'>
|
|
|
+ <%--
|
|
|
+ <input name="ssKeyword" value="${ssKeyword}" type="text" placeholder="关键词"/>
|
|
|
+ <script>wd.edit.addClearTextButton("ssKeyword");</script>
|
|
|
+ --%>
|
|
|
+ <!-- <ss-search-input
|
|
|
+ name="ssKeyword"
|
|
|
+ placeholder="关键词"
|
|
|
+ v-model="form.keyword"
|
|
|
+ width="120"
|
|
|
+ >
|
|
|
+ </ss-search-input> -->
|
|
|
+ <ss-search-input
|
|
|
+ name="ssKeyword"
|
|
|
+ placeholder="关键词"
|
|
|
+ v-model="ssKeyword"
|
|
|
+ width="100px"
|
|
|
+ @search="search"
|
|
|
+ >
|
|
|
+ </ss-search-input>
|
|
|
+ <script>
|
|
|
+
|
|
|
+ //关键词
|
|
|
+ window.ss.dom.formElemConfig.ssKeyword = {
|
|
|
+ value: '${ssKeyword}',
|
|
|
+ name: "ssKeyword",
|
|
|
+ desc: "关键词",
|
|
|
+ type: 31
|
|
|
+ };//放当前页面表单元素配置的变量
|
|
|
+ </script>
|
|
|
+
|
|
|
+ </ss:equal>
|
|
|
+ <ss-search-button
|
|
|
+ text="所有"
|
|
|
+ icon-class="nav-icon-search"
|
|
|
+ :opt="searchButtonConfig"
|
|
|
+ :check-id="searchButtonConfigCheckId"
|
|
|
+ ></ss-search-button>
|
|
|
+ <%-- 新UI 单对象查询 选项卡、翻页start Ben --%>
|
|
|
+ <ss:equal val='${"1"==isReady && !isMultipleObject}' val2='true'>
|
|
|
+ <%--
|
|
|
+ <ss:equal val='${hasScope}' val2='true'>
|
|
|
+ <ul style="list-style: none;display: inline-block;">
|
|
|
+ <li ssType="searchScope" ssVal=99>所有</li>
|
|
|
+ <li ssType="searchScope" ssVal=2>管理</li>
|
|
|
+ <li ssType="searchScope" ssVal=1>创建</li>
|
|
|
+ <li ssType="searchScope" ssVal=3>已办</li>
|
|
|
+ <li ssType="searchScope" ssVal=55>停用</li>
|
|
|
+ </ul>
|
|
|
+ </ss:equal>
|
|
|
+ --%>
|
|
|
+ </ss:equal>
|
|
|
+ <%--
|
|
|
+ <input type="submit" name="ssSearch" value="搜索" class="content-invertButton"/>
|
|
|
+ --%>
|
|
|
+ <!-- <ss-search-button text="搜索" @click="console.log('这里改成提交表单')">
|
|
|
+ </ss-search-button> -->
|
|
|
+
|
|
|
+ <script>
|
|
|
+ <%-- 根按钮(管理按钮) --%>
|
|
|
+ window.ss.dom.btnElemConfig = window.ss.dom.btnElemConfig || {};
|
|
|
+
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <%--多对像搜索隐藏全文按钮--%>
|
|
|
+ <%--
|
|
|
+ <ss:equal val='${isMultipleObject}' val2='false'>
|
|
|
+ --%><%--
|
|
|
<input type="hidden" ssType="fts" ssName="fts" value="全文"/>--%> <%-- wdType="isFulltext" wdName="isFulltext"。Lin --%>
|
|
|
- <%--</ss:equal>--%>
|
|
|
-
|
|
|
-
|
|
|
- <%--根按钮(管理按钮)start--%>
|
|
|
-
|
|
|
- <ss:rpt name='buttonList' id='button'>
|
|
|
- <ss:auth serv='${button.service}'>
|
|
|
- <ss:equal val='${empty button.pluginList}' val2='true'>
|
|
|
- <%--
|
|
|
- <input type="button" name="${button.name}" value="${button.buttonName}" class="content-button"
|
|
|
- onclick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${button.service}' dest='${button.dest}' parm='${button.param}'/>",title:"${button.title}",width:"${button.width}",height:"${button.height}",minHeight:"${button.minHeight}",maxHeight:"${button.maxHeight+100}",showTitle:"${button.showTitle}"});'/>
|
|
|
- --%>
|
|
|
-
|
|
|
- <!-- <ss-search-button
|
|
|
- text="${button.name}"
|
|
|
- icon-class="nav-icon-add"
|
|
|
- ></ss-search-button> -->
|
|
|
-
|
|
|
- <script>
|
|
|
- function ${button.id}handleClick() {
|
|
|
- wd.display.showComponent({
|
|
|
- show:["wdDialog"],
|
|
|
- url:"<ss:serv name='${button.service}' dest='${button.dest}' parm='${button.param}'/>",
|
|
|
- title:"${button.title}",
|
|
|
- width:"${button.width}",
|
|
|
- height:"${button.height}",
|
|
|
- minHeight:"${button.minHeight}",
|
|
|
- maxHeight:"${button.maxHeight+100}",
|
|
|
- showTitle:"${button.showTitle}"
|
|
|
- });
|
|
|
- }
|
|
|
- <%-- 实际没用上,注释掉 Ben(20251225)
|
|
|
- window.ss.dom.btnElemConfig.${button.id}={
|
|
|
- desc:"${button.buttonName}",
|
|
|
- id:"${button.id}",
|
|
|
- dropOptions:[],
|
|
|
- onclick: () => {
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${button.service}' dest='${button.dest}' parm='${button.param}'/>",title:"${button.title}",width:"${button.width}",height:"${button.height}",minHeight:"${button.minHeight}",maxHeight:"${button.maxHeight+100}",showTitle:"${button.showTitle}"});
|
|
|
- }
|
|
|
- };
|
|
|
- --%>
|
|
|
- </script>
|
|
|
- <ss-search-button
|
|
|
- text="${button.buttonName}"
|
|
|
- icon-class="nav-icon-add"
|
|
|
- :opt="[]"
|
|
|
- :check-id="0"
|
|
|
- onclick="${button.id}handleClick()"
|
|
|
- ></ss-search-button>
|
|
|
- </ss:equal>
|
|
|
- <ss:equal val='${empty button.pluginList}' val2='false'>
|
|
|
- <ss:rpt name='${button.pluginList}' id='plugin'>
|
|
|
+ <%--</ss:equal>--%>
|
|
|
+
|
|
|
+
|
|
|
+ <%--根按钮(管理按钮)start--%>
|
|
|
+
|
|
|
+ <ss:rpt name='buttonList' id='button'>
|
|
|
+ <ss:auth serv='${button.service}'>
|
|
|
+ <ss:equal val='${empty button.pluginList}' val2='true'>
|
|
|
+ <%--
|
|
|
+ <input type="button" name="${button.name}" value="${button.buttonName}" class="content-button"
|
|
|
+ onclick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${button.service}' dest='${button.dest}' parm='${button.param}'/>",title:"${button.title}",width:"${button.width}",height:"${button.height}",minHeight:"${button.minHeight}",maxHeight:"${button.maxHeight+100}",showTitle:"${button.showTitle}"});'/>
|
|
|
+ --%>
|
|
|
+
|
|
|
+ <!-- <ss-search-button
|
|
|
+ text="${button.name}"
|
|
|
+ icon-class="nav-icon-add"
|
|
|
+ ></ss-search-button> -->
|
|
|
+
|
|
|
+ <script>
|
|
|
+ function ${button.id}handleClick() {
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='${button.service}' dest='${button.dest}' parm='${button.param}'/>",
|
|
|
+ title: "${button.title}",
|
|
|
+ width: "${button.width}",
|
|
|
+ height: "${button.height}",
|
|
|
+ minHeight: "${button.minHeight}",
|
|
|
+ maxHeight: "${button.maxHeight+100}",
|
|
|
+ showTitle: "${button.showTitle}"
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ <%-- 实际没用上,注释掉 Ben(20251225)
|
|
|
+ window.ss.dom.btnElemConfig.${button.id}={
|
|
|
+ desc:"${button.buttonName}",
|
|
|
+ id:"${button.id}",
|
|
|
+ dropOptions:[],
|
|
|
+ onclick: () => {
|
|
|
+ wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${button.service}' dest='${button.dest}' parm='${button.param}'/>",title:"${button.title}",width:"${button.width}",height:"${button.height}",minHeight:"${button.minHeight}",maxHeight:"${button.maxHeight+100}",showTitle:"${button.showTitle}"});
|
|
|
+ }
|
|
|
+ };
|
|
|
+ --%>
|
|
|
+ </script>
|
|
|
+ <ss-search-button
|
|
|
+ text="${button.buttonName}"
|
|
|
+ icon-class="nav-icon-add"
|
|
|
+ :opt="[]"
|
|
|
+ :check-id="0"
|
|
|
+ onclick="${button.id}handleClick()"
|
|
|
+ ></ss-search-button>
|
|
|
+ </ss:equal>
|
|
|
+ <ss:equal val='${empty button.pluginList}' val2='false'>
|
|
|
+ <ss:rpt name='${button.pluginList}' id='plugin'>
|
|
|
<span style="display:none;" class="${button.id}children" value="${plugin.plugin.desc}"
|
|
|
- onclick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${plugin.service}' dest='${plugin.dest}' parm='${plugin.param}'/>",title:"${plugin.title}",width:"${plugin.width}",height:"${plugin.height}",minHeight:"${plugin.minHeight}",maxHeight:"${plugin.maxHeight}",showTitle:"${plugin.showTitle}"});'>
|
|
|
+ onclick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv
|
|
|
+ name='${plugin.service}' dest='${plugin.dest}'
|
|
|
+ parm='${plugin.param}'/>",title:"${plugin.title}",width:"${plugin.width}",height:"${plugin.height}",minHeight:"${plugin.minHeight}",maxHeight:"${plugin.maxHeight}",showTitle:"${plugin.showTitle}"});'>
|
|
|
</span>
|
|
|
- </ss:rpt>
|
|
|
- <%-- <input type="button" id="${button.id}" name="${button.name}" value="${button.buttonName}" class="content-button" onclick='void(0)'/>
|
|
|
- <span style=" display:inline-table; width: 60px; ">
|
|
|
- <input type="button" id="${button.id}" name="${button.name}" value="${button.buttonName}" class="content-button" onclick='void(0)'/>
|
|
|
-
|
|
|
- <span class="icon-dimPoint" style="margin-right: 7px;margin-top: -25px;position: relative;">
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <script>wd.display.attachButton("${button.id}","${button.id}children",null,false,true)</script>--%>
|
|
|
-
|
|
|
-
|
|
|
- <%-- 新UI start Ben --%>
|
|
|
- <!-- <ss-search-button
|
|
|
- text="${plugin.plugin.desc}"
|
|
|
- icon-class="nav-icon-add"
|
|
|
- :options="${button.id}DropOptions"
|
|
|
- ></ss-search-button> -->
|
|
|
- <%-- :opt改为取vue.data中的变量,而不取window.ss.dom.btnElemConfig(因为取不到),onclick改为:onclick xu(20251209) --%>
|
|
|
- <ss-search-button
|
|
|
- text="${button.buttonName}"
|
|
|
- icon-class="nav-icon-add"
|
|
|
- :opt="btnElemConfig.${button.id}.dropOptions"
|
|
|
- check-id="${management}"
|
|
|
- onclick="${button.id}handleClick()"
|
|
|
- ></ss-search-button>
|
|
|
- <script>
|
|
|
- function ${button.id}handleClick() {
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${plugin.service}' dest='${plugin.dest}' parm='${plugin.param}'/>",title:"${plugin.title}",width:"${plugin.width}",height:"${plugin.height}",minHeight:"${plugin.minHeight}",maxHeight:"${plugin.maxHeight}",showTitle:"${plugin.showTitle}"});
|
|
|
- }
|
|
|
-
|
|
|
- <%-- 实际没用上,注释掉 Ben(20251225)
|
|
|
- window.ss.dom.btnElemConfig.${button.id}={id:"${button.id}",dropOptions:[],
|
|
|
- onclick: () => {
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${plugin.service}' dest='${plugin.dest}' parm='${plugin.param}'/>",title:"${plugin.title}",width:"${plugin.width}",height:"${plugin.height}",minHeight:"${plugin.minHeight}",maxHeight:"${plugin.maxHeight}",showTitle:"${plugin.showTitle}"});
|
|
|
- }
|
|
|
- };
|
|
|
- --%>
|
|
|
-
|
|
|
- <%-- 循环生成按钮数组 --%>
|
|
|
- <ss:rpt name='${button.pluginList}' id='plugin'>
|
|
|
- window.ss.dom.btnElemConfig.${button.id}.dropOptions.push(
|
|
|
- {
|
|
|
- desc:'${plugin.plugin.desc}',<%-- 按钮名 --%>
|
|
|
- callback: function(){
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${plugin.service}' dest='${plugin.dest}' parm='${plugin.param}'/>",title:"${plugin.title}",width:"${plugin.width}",height:"${plugin.height}",minHeight:"${plugin.minHeight}",maxHeight:"${plugin.maxHeight}",showTitle:"${plugin.showTitle}"});
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- </ss:rpt>
|
|
|
- </script>
|
|
|
- <%-- 新UI end Ben --%>
|
|
|
-
|
|
|
- </ss:equal>
|
|
|
- </ss:auth>
|
|
|
- </ss:rpt>
|
|
|
- <%--管理按钮end--%>
|
|
|
-
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <%-- <div class="search-bar">
|
|
|
- <ss-breadcrumb></ss-breadcrumb>
|
|
|
- <div class="search-bar-contaienr">
|
|
|
- <!-- <ss-objp
|
|
|
- v-model="csd"
|
|
|
- name="csd"
|
|
|
- :options="[{ label: '广东', value: '1' },{ label: '广西', value: '2' }]"
|
|
|
- placeholder="省份"
|
|
|
- width="150"
|
|
|
- input="true"
|
|
|
- ></ss-objp> -->
|
|
|
- <!-- <ss-search-input
|
|
|
- name="keyword"
|
|
|
- placeholder="关键词"
|
|
|
- v-model="form.keyword"
|
|
|
- width="200px"
|
|
|
- >
|
|
|
- </ss-search-input> -->
|
|
|
- <template v-for="item in formElemConfig">
|
|
|
-
|
|
|
- <template v-if="item.type == systemType.SEARCHDATE">
|
|
|
- <ss-search-date-picker
|
|
|
- v-model="item.value"
|
|
|
- :name="item.name"
|
|
|
- type="date"
|
|
|
- :placeholder="item.desc"
|
|
|
- width="100px"
|
|
|
- ></ss-search-date-picker>
|
|
|
- </template>
|
|
|
- <template v-if="item.type == systemType.SEARCHTIME">
|
|
|
- <ss-search-date-picker
|
|
|
- v-model="item.value"
|
|
|
- :name="item.name"
|
|
|
- type="time"
|
|
|
- :placeholder="item.desc"
|
|
|
- width="100px"
|
|
|
- ></ss-search-date-picker>
|
|
|
- </template>
|
|
|
- <template v-if="item.type == systemType.SEARCHDATETIME">
|
|
|
- <ss-search-date-picker
|
|
|
- v-model="item.value"
|
|
|
- :name="item.name"
|
|
|
- type="datetime"
|
|
|
- :placeholder="item.desc"
|
|
|
- width="200px"
|
|
|
- ></ss-search-date-picker>
|
|
|
- </template>
|
|
|
- <template v-if="item.type == systemType.OBJPICKER">
|
|
|
- <ss-objp
|
|
|
- v-model="item.value"
|
|
|
- :name="item.name"
|
|
|
- :options="item.options"
|
|
|
- :placeholder="item.desc"
|
|
|
- width="150"
|
|
|
- input="true"
|
|
|
- ></ss-objp>
|
|
|
- </template>
|
|
|
- <template v-if="item.type == systemType.SEARCHINPUT">
|
|
|
- <ss-search-input
|
|
|
- :name="item.name"
|
|
|
- :placeholder="item.desc"
|
|
|
- v-model="item.value"
|
|
|
- width="100px"
|
|
|
- >
|
|
|
- </ss-search-input>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
-
|
|
|
- <ss-search-button
|
|
|
- text="所有"
|
|
|
- icon-class="nav-icon-search"
|
|
|
- :options="searchButtonConfig"
|
|
|
- :check-id="searchButtonConfigCheckId"
|
|
|
- ></ss-search-button>
|
|
|
-
|
|
|
- <template v-for="item in btnElemConfig">
|
|
|
- <ss-search-button
|
|
|
- :text="item.desc"
|
|
|
- icon-class="nav-icon-add"
|
|
|
- :options="item.dropOptions"
|
|
|
- :check-id="item.dropOptionsCheckId"
|
|
|
- onclick="item.onclick"
|
|
|
- ></ss-search-button>
|
|
|
- </template>
|
|
|
- <!-- <ss-search-button
|
|
|
- text="新增(无下拉)"
|
|
|
- icon-class="nav-icon-add"
|
|
|
- onclick="console.log('点击了')"
|
|
|
- ></ss-search-button> -->
|
|
|
- </div>
|
|
|
- </div> --%>
|
|
|
- <%--搜索条件end--%>
|
|
|
- <%--个人统计表start${!isMultipleObject}--%>
|
|
|
-
|
|
|
- <ss:equal val='${"1"!=isReady && !isMultipleObject}' val2='true'>
|
|
|
- <input name="addgrtjUrl" type="hidden" value='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='addPcht' parm='{"wdConfirmationCaptchaService":"0","dxm":"${ssObjName}","use_grtjmbid":"${use_grtjmbid}"}' dest='pchtSet'/>",title:"挑选统计图指标",width:800,height:580});'/>
|
|
|
- <input name="grtjSizeUrl" type="hidden" value="<ss:serv name='savePstatSize' parm='{"wdConfirmationCaptchaService":"0","dxm":"${ssObjName}","grtjSize":"ssVal{grtjSize}","use_grtjmbid":"${use_grtjmbid}"}'/>"/>
|
|
|
- <input name="getgrtjJsonUrl" type="hidden" value="<ss:serv name='getgrtjJson' parm='{"wdConfirmationCaptchaService":"0"}'/>"/>
|
|
|
- <input name="getEChartData" type="hidden" value="<ss:serv name='wrPchtPlay' parm='{"wdConfirmationCaptchaService":"0"}'/>"/> <%-- name='getEChartData' --%>
|
|
|
- <div class="graph scrollbar" style="padding-right: 16px;display: block;width: 100%;height: 100%;overflow: auto;text-align: left;-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none;-khtml-user-select: none;user-select: none;font-size: 0px;box-sizing: border-box;padding:15px 20px">
|
|
|
- <ss:rpt name='${grtjList}' id='item'>
|
|
|
- <div class="graph-list plugin-invertDiv" grtjid="${item.grtjid}" grtjlbm="${item.grtjlbm}" style="min-width:120px;min-height:65px;width:${item.kd}px;height:${item.gd}px;overflow: auto;position: relative;margin: 2px;" onclick="checkChart(this)">
|
|
|
-
|
|
|
- <ss:equal val='${item.grtjlbm}' val2='1'>
|
|
|
-
|
|
|
- <div class="graph-list-body" id="tjt-${item.grtjid}" style="height:48px;width: 100%;">${item.mc} </div>
|
|
|
- <span class="graph-list-mask" style="position: absolute;display: flex;width: 100%;height: 48px;top: 0px;left: 0px;">
|
|
|
- <span class="shortcutPlugin-icon plugin-icon" style="margin-left:5px;position: relative;left: 0;top: 0px;width: 48px;height: 48px;" onclick='refreshTjt("${item.grtjid}")'>
|
|
|
-
|
|
|
- </span>
|
|
|
- <div style="display:inline-block;position: relative;left: 0;top: 0px;width: 200px;height: 48px;background-color: white;font-size: 16px;font-weight: bold;display: flex;align-items: center;">${item.mc} </div>
|
|
|
- <span class="icon-set-statistics" style="position: absolute;right: 0px;top: 0px;width: 48px;height: 48px;"
|
|
|
- onclick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='initPchtSet' parm='{"wdConfirmationCaptchaService":"0","grtjid":"${item.grtjid}","dxm":"${ssObjName}"}' dest='pchtSet'/>",title:"挑选统计图指标",width:800,height:580});'>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <ss:equal val='${item.grtjlbm}' val2='51'> <%-- 为什么会写成 <ss:equal???Lin --%>
|
|
|
- <span class="graph-list-body" style="height:40px;width: 100%;">${item.mc}</span>
|
|
|
- <span class="icon-set" style="position: absolute;right: 0px;top: 0px;width: 70px;height: 40px;"
|
|
|
- onclick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='initPformSet' parm='{"wdConfirmationCaptchaService":"0","grtjid":"${item.grtjid}","dxm":"${ssObjName}"}' dest='pformSet'/>",title:"挑选统计表",width:800,height:580});'>
|
|
|
- </span>
|
|
|
- <%-- Start 抄自下方的的原统计表列表。原对象首页的下半部分,已被去掉。Lin --%>
|
|
|
- <table class="scrollbar" style="max-height: 100%;width: 100%;">
|
|
|
- <tbody style="width: 100%;padding: 0px 16px 0px 11px;box-sizing: border-box;" ssFith='{list:true,rowHeight:35}'>
|
|
|
- <ss:rpt name='${item.grtjmxList}' id='item2'>
|
|
|
- <tr>
|
|
|
- <ss:equal val='${empty item2.page}' val2='true'> <%-- 使用表格模板工具。Lin --%>
|
|
|
- <td class="hLine"
|
|
|
- onClick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='stat_tableDesign_bb' parm='{"wdConfirmationCaptchaService":"0","bgmbid":"${item2.bgmbid}"}' dest='bgmb_xsmb'/>",title:"显示模板",width:1010,height:750});'>
|
|
|
- </ss:equal>
|
|
|
- <ss:equal val='${empty item2.page}' val2='false'> <%-- 高级表格。Lin --%>
|
|
|
- <td class="hLine"
|
|
|
- onClick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${item2.serv}' dest='${item2.page}'/>",title:"${item2.mc}",width:"${item2.width}",height:"${item2.height}",minHeight:"${item2.height}",maxHeight:"${item2.height}",showTitle:"${item2.mc}"});'>
|
|
|
- </ss:equal>
|
|
|
- <div class="longCardList-info" style="font-size: 0px;display: inline-block;float: left;">
|
|
|
- <span class="longCardList-highlight" style="margin-bottom: 3px;">
|
|
|
- <a>${item2.mc}</a>
|
|
|
- </span>
|
|
|
- <div id="${item2.bgmbid}" class="longCardList-dim growHeightDiv" width='750'>
|
|
|
- <ss:txt val='${item2.ms}'/>
|
|
|
- </div>
|
|
|
- <script type="text/javascript" charset="utf-8" src="/ss/js/growHeight.js"></script>
|
|
|
-<script type="text/javascript" charset="utf-8" src="/ss/js/display.js"></script>
|
|
|
-<script type="text/javascript" charset="utf-8" >
|
|
|
-wd.display.initGrowHigh('${item2.bgmbid}','80px',{},null,false);
|
|
|
-
|
|
|
-</script>
|
|
|
-
|
|
|
- <div id="lmms${item2.bgmbid}$" class="longCardList" width='750' height='18px'>
|
|
|
- <ss:txt val='${item2.lmms}'/>
|
|
|
- </div>
|
|
|
- <script type="text/javascript" charset="utf-8" src="/ss/js/growHeight.js"></script>
|
|
|
-<script type="text/javascript" charset="utf-8" src="/ss/js/display.js"></script>
|
|
|
-<script type="text/javascript" charset="utf-8" >
|
|
|
-wd.display.initGrowHigh('lmms${item2.bgmbid}','80px',{},null,false);
|
|
|
-</script>
|
|
|
-
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </ss:rpt>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%-- <span class="graph-list-resize plugin-drag" style="position: absolute;right: 0px;bottom: 0px;"></span> --%>
|
|
|
- <%-- <span class="vLine" style="height: 40px;width: 1px;position: absolute;right: 70px;top: 0px"></span> --%>
|
|
|
- <%-- <span class="hLine-highlight" style="width: 100%;height: 0px;position: absolute;top: 40px;left: 0px;"></span> --%>
|
|
|
- </div>
|
|
|
- </ss:rpt>
|
|
|
- <div>
|
|
|
- <div class="button icon-add graphButton" style="height: 60px;line-height: 82px;float: right;margin-top: 0px;margin-right: 0px;"
|
|
|
- <%-- 再改为 WebC.REQ_objName,避免与数据表里的 对象名 字段重名。用到再确认。Lin
|
|
|
- 传到 objList.ss.jsp 的是 ${ssObjName},传给 pformSet 的是 dxm(统计指标.对象名、个人统计.对象名)
|
|
|
- onClick='<serv@ss dlg="true" dest="env_search_bgmb_zj" parm="{dxm:"${dxm}"}" title="添加表格模板"/>'> --%>
|
|
|
- onClick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='addPform' parm='{"wdConfirmationCaptchaService":"0","dxm":"${ssObjName}"}' dest='pformSet'/>",title:"设置统计表",width:800,height:580});'>
|
|
|
- 增加表
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
- <div class="button icon-add graphButton" style="height: 60px;float: right;margin-top: 0px;margin-right: 0px;line-height: 82px;"
|
|
|
- onClick='wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='addPcht' parm='{"wdConfirmationCaptchaService":"0","dxm":"${ssObjName}","use_grtjmbid":"${use_grtjmbid}"}' dest='pchtSet'/>",title:"设置统计图",width:800,height:580});'>
|
|
|
- 增加图</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- </ss:equal>
|
|
|
- <%--个人统计表end--%>
|
|
|
-
|
|
|
- <div style="clear: both;"></div>
|
|
|
- <script type="text/javascript" src="/ss/js/myEcharts.js"></script>
|
|
|
-
|
|
|
-
|
|
|
- <script type="text/javascript" src="/ss/env/env_search.js"></script><%-- 旧UI初始化查询列表的js,新UI做好后,要被删掉的 --%>
|
|
|
-
|
|
|
- <%-- 新UI初始化查询列表数据的JS --%>
|
|
|
- <script>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- window.ss.dom.listConfig = window.ss.dom.listConfig || {};
|
|
|
-
|
|
|
- //二级对象 草稿箱
|
|
|
- window.ss.dom.listConfig.draftbox = [];
|
|
|
- <%-- 草稿箱start --%>
|
|
|
- <ss:rpt name='cgxList' id='item'>
|
|
|
- {
|
|
|
- let item = {};
|
|
|
- window.ss.dom.listConfig.draftbox.push(item);
|
|
|
-
|
|
|
- <%-- 下面的titlexxx是原来td的一个属性,不知道有啥用 --%>
|
|
|
- <ss:equal val='${not empty item.service.play && empty item.service.update && empty item.service.change}' val2='true'>
|
|
|
- item.titlexxx="${item.service.play.title}";
|
|
|
- item.onclick=function (){
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${item.service.play.service}' dest='${item.service.play.dest}' parm='${item.service.play.param}'/>",title:"${item.service.play.title}",width:"${item.service.play.width}",height:"${item.service.play.height}",minHeight:"${item.service.play.minHeight}",maxHeight:"${item.service.play.maxHeight}"});
|
|
|
- };
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <ss:equal val='${item.service.lbm}' val2='1'>
|
|
|
- <ss:equal val='${empty item.service.update}' val2='false'>
|
|
|
- item.titlexxx="${item.service.update.title}";
|
|
|
- item.onclick=function (){
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${item.service.update.service}' dest='${item.service.update.dest}' parm='${item.service.update.param}'/>",title:"${item.service.update.title}",width:"${item.service.update.width}",height:"${item.service.update.height}",minHeight:"${item.service.update.minHeight}",maxHeight:"${item.service.update.maxHeight}"});
|
|
|
- };
|
|
|
- </ss:equal>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <ss:equal val='${item.service.lbm}' val2='11'>
|
|
|
- <ss:equal val='${empty item.service.change}' val2='false'>
|
|
|
- item.titlexxx="${item.service.change.title}";
|
|
|
- item.onclick=function (){
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${item.service.change.service}' dest='${item.service.change.dest}' parm='${item.service.change.param}'/>",title:"${item.service.change.title}",width:"${item.service.change.width}",height:"${item.service.change.height}",minHeight:"${item.service.change.minHeight}",maxHeight:"${item.service.change.maxHeight}"});
|
|
|
- };
|
|
|
- </ss:equal>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- item.buttons=[];
|
|
|
-
|
|
|
- <ss:equal val='${item.service.lbm}' val2='1'>
|
|
|
- item.buttons.push(
|
|
|
- {
|
|
|
- class: "cart-list-setting",
|
|
|
- title: "增加",
|
|
|
- onclick: () => {
|
|
|
- console.log("点击了增加");
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <ss:equal val='${item.service.lbm}' val2='11'>
|
|
|
- item.buttons.push(
|
|
|
- {
|
|
|
- class: "cart-list-setting",
|
|
|
- title: "变动",
|
|
|
- onclick: () => {
|
|
|
- console.log("点击了变动");
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- </ss:equal>
|
|
|
- <ss:equal val='${item.service.lbm}' val2='51'>
|
|
|
- item.buttons.push(
|
|
|
- {
|
|
|
- class: "cart-list-setting",
|
|
|
- title: "停用",
|
|
|
- onclick: () => {
|
|
|
- console.log("点击了停用");
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- </ss:equal>
|
|
|
- <ss:equal val='${item.service.lbm}' val2='55'>
|
|
|
- item.buttons.push(
|
|
|
- {
|
|
|
- class: "cart-list-setting",
|
|
|
- title: "启用",
|
|
|
- onclick: () => {
|
|
|
- console.log("点击了启用");
|
|
|
- }
|
|
|
- }
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <ss:equal val='${item.service.lbm}' valList='51,55'>
|
|
|
- item.buttons.push(
|
|
|
- {
|
|
|
- class: "cart-list-setting",
|
|
|
- title: "还原",
|
|
|
- onclick: () => {
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='deleteSq' parm='{"wdConfirmationCaptchaService":"0","sqid":"${item.sqid}"}' dest='info'/>",title:"提示信息",width:715,height:483});
|
|
|
- }
|
|
|
- }
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- console.log('###item.thumbnail:${item.thumbnail}');
|
|
|
-
|
|
|
- <%--缩略图--%>
|
|
|
- <ss:equal val='${empty item.thumbnail}' val2='false'>
|
|
|
-
|
|
|
- <ss:equal val='${item.service.state}' val2='0'>
|
|
|
- item.thumb="${sessionScope['ssUser'].skinDir}image/object/default-${item.ssObjName}.png" onerror="javascript:this.src='${sessionScope['ssUser'].skinDir}image/default-photo.png';this.onerror=null;";
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <ss:notEqual val='${item.service.state}' val2='0'>
|
|
|
- item.thumb="<ss:serv name='dlByHttp' parm='{"wdConfirmationCaptchaService":"0","path":"${item.thumbnail.value}","type":"img"}'/>";
|
|
|
- </ss:notEqual>
|
|
|
-
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%-- 列标题 --%>
|
|
|
- <ss:equal val='${empty item.first}' val2='false'> <%-- 改 equal:val1="true" val2="${not empty item.first}"。Lin --%>
|
|
|
- <%--不带codebook--%>
|
|
|
- <ss:equal val='${empty item.first.field.cbName}' val2='true'>
|
|
|
- item.title="<ss:txt val='${item.first.value}' miniDate='false' fmt='${item.first.field.fmt}'/>";
|
|
|
- </ss:equal>
|
|
|
- <%--带codebook--%>
|
|
|
- <ss:equal val='${empty item.first.field.cbName}' val2='false'>
|
|
|
- item.title="<ss:cbTrans cb='${item.first.field.cbName}' val='${item.first.value}'/>";
|
|
|
- </ss:equal>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%--列标题:缺标题显示属性start--%>
|
|
|
- <ss:equal val='${empty item.first && not empty item.third}' val2='true'>
|
|
|
- item.title='';
|
|
|
- <ss:rpt name='${item.third}' id='itemList'>
|
|
|
- <ss:rpt name='${itemList}' id='item2'>
|
|
|
- item.title+='${item2.field.desc}:';
|
|
|
- <%--不带codebook--%>
|
|
|
- <ss:equal val='${empty item2.field.cbName}' val2='true'>
|
|
|
- item.title+='<ss:txt val='${item2.value}' fmt='${item2.field.fmt}' miniDate='false'/> ';
|
|
|
- </ss:equal>
|
|
|
- <%--带codebook--%>
|
|
|
- <ss:equal val='${empty item2.field.cbName}' val2='false'>
|
|
|
- item.title+='<ss:cbTrans cb='${item2.field.cbName}' val='${item2.value}'/> ';
|
|
|
- </ss:equal>
|
|
|
- </ss:rpt>
|
|
|
- </ss:rpt>
|
|
|
- </ss:equal>
|
|
|
- <%--缺标题显示属性end--%>
|
|
|
-
|
|
|
- <%--正文或摘要--%>
|
|
|
- <ss:equal val='${empty item.second}' val2='false'>
|
|
|
- item.summary='${item.second.value}';
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%-- 列表底部的对象属性(tags) --%>
|
|
|
- <ss:equal val='${empty item.first || empty item.third}' val2='false'>
|
|
|
- item.tags=[];
|
|
|
- <ss:rpt name='${item.third}' id='itemList'>
|
|
|
- <ss:rpt name='${itemList}' id='item2'>
|
|
|
- {
|
|
|
-
|
|
|
- let v;
|
|
|
- <%--不带codebook--%>
|
|
|
- <ss:equal val='${empty item2.field.cbName}' val2='true'>
|
|
|
- v='<ss:txt val='${item2.value}' fmt='${item2.field.fmt}' miniDate='false'/>';
|
|
|
- </ss:equal>
|
|
|
- <%--带codebook--%>
|
|
|
- <ss:equal val='${empty item2.field.cbName}' val2='false'>
|
|
|
- v='<ss:cbTrans cb='${item2.field.cbName}' val='${item2.value}'/>';
|
|
|
- </ss:equal>
|
|
|
- item.tags.push({'${item2.field.desc}':v});
|
|
|
- }
|
|
|
- </ss:rpt>
|
|
|
- </ss:rpt>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%-- 对象变动前后属性列表 --%>
|
|
|
- item.changeItems=[];
|
|
|
- <ss:rpt name='${item.forth}' id='item3'>
|
|
|
- item.changeItems.push({name:'${item3.name}',oldValue:'${item3.oldValue}',newValue:'${item3.newValue}'});
|
|
|
- </ss:rpt>
|
|
|
-
|
|
|
- }
|
|
|
- </ss:rpt>
|
|
|
- <%-- 草稿箱end --%>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- //在用或停用的对象列表
|
|
|
- window.ss.dom.listConfig.list = [];
|
|
|
- <ss:rpt name='objectList' id='item'><%-- 循环一次生成一行列表 start --%>
|
|
|
- {
|
|
|
- let item = {};//列表的其中一行的属性
|
|
|
- window.ss.dom.listConfig.list.push(item);
|
|
|
-
|
|
|
- <ss:equal val='${item.service.state}' val2='0'><%-- 借阅 --%>
|
|
|
- item.onclick=function(){
|
|
|
- wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='ydsq_tj' parm='{"wdConfirmationCaptchaService":"0","ssObjId":"${item.ssObjId}","ssObjName":"${item.ssObjName}"}' dest='ydsq_tj'/>",title:"借阅",width:613,height:387});
|
|
|
- }
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <ss:equal val='${empty item.service.play}' val2='false'><%-- 有权查看,不需要借阅的情况 --%>
|
|
|
- item.titlexxx="${item.service.play.title}";
|
|
|
- item.onclick=function(){
|
|
|
- wd.display.showComponent({getSize:1,width:((${item.service.play.width}+DOM_SIZE_objInfoTabWidth)+""),show:["wdDialog"],url:"<ss:serv name='${item.service.play.service}' dest='${item.service.play.dest}' parm='${item.service.play.param}'/>",title:"${item.service.play.title}",height:"${item.service.play.height}",minHeight:"${item.service.play.minHeight}",maxHeight:"${item.service.play.maxHeight}"});
|
|
|
- }
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <ss:equal val='${empty item.thumbnail}' val2='false'><%-- 缩略图 --%>
|
|
|
- <ss:equal val='${item.service.state}' val2='0'><%-- 借阅 --%>
|
|
|
- item.thumb="${sessionScope['ssUser'].skinDir}image/object/default-${item.ssObjName}.png";
|
|
|
- </ss:equal>
|
|
|
- <ss:notEqual val='${item.service.state}' val2='0'>
|
|
|
- console.log('@@@图片:${item.thumbnail.value}');
|
|
|
- item.thumb="<ss:serv name='dlByHttp' parm='{"wdConfirmationCaptchaService":"0","path":"${item.thumbnail.value}","type":"img"}'/>";
|
|
|
- </ss:notEqual>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%-- 标题 --%>
|
|
|
- <ss:equal val='${empty item.first}' val2='false'> <%-- 改 equal:val1="true" val2="${not empty item.first}"。Lin --%>
|
|
|
- <%--不带codebook--%>
|
|
|
- <ss:equal val='${empty item.first.field.cbName}' val2='true'>
|
|
|
- item.title="<ss:txt val='${item.first.value}' miniDate='false' fmt='${item.first.field.fmt}'/>";
|
|
|
- </ss:equal>
|
|
|
- <%--带codebook--%>
|
|
|
- <ss:equal val='${empty item.first.field.cbName}' val2='false'>
|
|
|
- item.title="<ss:cbTrans cb='${item.first.field.cbName}' val='${item.first.value}'/>";
|
|
|
- </ss:equal>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%--缺标题显示属性当标题start--%>
|
|
|
- <ss:equal val='${empty item.first && not empty item.third}' val2='true'>
|
|
|
- item.title='';
|
|
|
- <ss:rpt name='${item.third}' id='itemList'>
|
|
|
- <ss:rpt name='${itemList}' id='item2'>
|
|
|
-
|
|
|
- item.title+='${item2.field.desc}:';<%--属性名--%>
|
|
|
-
|
|
|
- <%--不带codebook--%><%--属性值--%>
|
|
|
- <ss:equal val='${empty item2.field.cbName}' val2='true'>
|
|
|
- item.title+="<ss:txt val='${item2.value}' fmt='${item2.field.fmt}' miniDate='false'/> ";
|
|
|
- </ss:equal>
|
|
|
- <%--带codebook--%><%--属性值--%>
|
|
|
- <ss:equal val='${empty item2.field.cbName}' val2='false'>
|
|
|
- item.title+="<ss:cbTrans cb='${item2.field.cbName}' val='${item2.value}'/> ";
|
|
|
- </ss:equal>
|
|
|
- </ss:rpt>
|
|
|
- </ss:rpt>
|
|
|
- </ss:equal>
|
|
|
- <%--缺标题显示属性当标题end--%>
|
|
|
-
|
|
|
- <%-- 摘要 --%>
|
|
|
- <ss:equal val='${empty item.second}' val2='false'>
|
|
|
- item.summary = '${item.second.value}';
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%-- 列表底部的对象标签组 --%>
|
|
|
- item.tags=[];<%-- 提到条件外面 Ben(20251230) --%>
|
|
|
- <ss:equal val='${empty item.first || empty item.third}' val2='false'>
|
|
|
- <%--item.tags=[]; 提到条件外面,不然列表报 Mount failed:TypeError: Cannot read properties of undefined (reading 'map') Ben(20251230) --%>
|
|
|
- <ss:rpt name='${item.third}' id='itemList'>
|
|
|
- <ss:rpt name='${itemList}' id='item2'>
|
|
|
- {
|
|
|
- let v;
|
|
|
-
|
|
|
- <%--不带codebook--%>
|
|
|
- <ss:equal val='${empty item2.field.cbName}' val2='true'>
|
|
|
- v='<ss:txt val='${item2.value}' miniDate='false' fmt='${item2.field.fmt}'/>';
|
|
|
- </ss:equal>
|
|
|
- <%--带codebook--%>
|
|
|
- <ss:equal val='${empty item2.field.cbName}' val2='false'>
|
|
|
- v='<ss:cbTrans cb='${item2.field.cbName}' val='${item2.value}'/>';
|
|
|
- </ss:equal>
|
|
|
- item.tags.push({${item2.field.desc}:v});
|
|
|
- }
|
|
|
- </ss:rpt>
|
|
|
- </ss:rpt>
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- <%--按钮--%>
|
|
|
- <ss:equal val='${empty item.service.btnList}' val2='false'>
|
|
|
- item.buttons=[];
|
|
|
- <ss:rpt name='${item.service.btnList}' id='btn'>
|
|
|
-
|
|
|
- item.buttons.push(
|
|
|
- {
|
|
|
- id:"${btn.btnID}",
|
|
|
- titlexxx:"${btn.title}",
|
|
|
- class: "cart-list-setting",
|
|
|
- title: "${btn.name}",
|
|
|
- onclick: () => {
|
|
|
- <%--列表的变动按钮就在这里,下面的width会根据不同业务对象而不同
|
|
|
- 弹窗参数加上getSize=1,使showComponent弹窗方法不再通过ajax从后台取宽高 --%>
|
|
|
- wd.display.showComponent({getSize:1,width:((${btn.width}+DOM_SIZE_objInfoTabWidth)+""),show:["wdDialog"],url:"<ss:serv name='${btn.service}' dest='${btn.dest}' parm='${btn.param}'/>",title:"${btn.title}",height:"${btn.height}",minHeight:"${btn.minHeight}",maxHeight:"${btn.maxHeight}"});
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
-<%--
|
|
|
- <ss:equal val='${index}' val2='0'>
|
|
|
- </ss:equal>
|
|
|
- <ss:notEqual val='${index}' val2='0'>
|
|
|
- </ss:notEqual>
|
|
|
-改为不区分是否第1个变动按钮,都输出相同json数据 --%>
|
|
|
- </ss:rpt>
|
|
|
-
|
|
|
- </ss:equal>
|
|
|
-
|
|
|
- }
|
|
|
- </ss:rpt><%-- 循环一次生成一行列表 end --%>
|
|
|
-
|
|
|
-
|
|
|
- </script>
|
|
|
-
|
|
|
- <%--搜索结果start--%>
|
|
|
-
|
|
|
- <%-- 功能说明:卡片区域使用 grid 自动分列,剩余宽度平分(不锁死 max-width) by xu 20260109 --%>
|
|
|
- <div :class="['content-area','item-content-area', cardGridKind ? ('ss-card-grid--' + cardGridKind) : '']">
|
|
|
- <template v-for="(item, i) in listConfig.draftbox" :key="i">
|
|
|
- <ss-folder-card v-if="item.children" :item="item"></ss-folder-card>
|
|
|
- <!-- 功能说明:通过 props 传 ssObjName(用于无图占位 biz icon) by xu 20260109 -->
|
|
|
- <ss-list-card v-else :item="item" :ss-obj-name="ssObjName" :card-click-action="cardClickAction"></ss-list-card>
|
|
|
- </template>
|
|
|
- <template v-for="(item, i) in listConfig.list" :key="i">
|
|
|
- <ss-folder-card v-if="item.children" :item="item"></ss-folder-card>
|
|
|
- <!-- 功能说明:通过 props 传 ssObjName(用于无图占位 biz icon) by xu 20260109 -->
|
|
|
- <ss-list-card v-else :item="item" :ss-obj-name="ssObjName" :card-click-action="cardClickAction"></ss-list-card>
|
|
|
- </template>
|
|
|
-
|
|
|
- <ss-page
|
|
|
- v-show="${ssPaging.rowNum}"
|
|
|
- :total="${ssPaging.rowNum==null?0:ssPaging.rowNum}"
|
|
|
- :size="${ssPaging.rowNumPer==null?wdRowCountPerPage:ssPaging.rowNumPer}"
|
|
|
- :page="${ssPaging.pageNo==null?1:ssPaging.pageNo}"
|
|
|
- @change="handlePageChange" >
|
|
|
- </ss-page>
|
|
|
-
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </form>
|
|
|
+ </ss:rpt>
|
|
|
+ <%-- <input type="button" id="${button.id}" name="${button.name}" value="${button.buttonName}" class="content-button" onclick='void(0)'/>
|
|
|
+ <span style=" display:inline-table; width: 60px; ">
|
|
|
+ <input type="button" id="${button.id}" name="${button.name}" value="${button.buttonName}" class="content-button" onclick='void(0)'/>
|
|
|
+
|
|
|
+ <span class="icon-dimPoint" style="margin-right: 7px;margin-top: -25px;position: relative;">
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <script>wd.display.attachButton("${button.id}","${button.id}children",null,false,true)</script>--%>
|
|
|
+
|
|
|
+
|
|
|
+ <%-- 新UI start Ben --%>
|
|
|
+ <!-- <ss-search-button
|
|
|
+ text="${plugin.plugin.desc}"
|
|
|
+ icon-class="nav-icon-add"
|
|
|
+ :options="${button.id}DropOptions"
|
|
|
+ ></ss-search-button> -->
|
|
|
+ <%-- :opt改为取vue.data中的变量,而不取window.ss.dom.btnElemConfig(因为取不到),onclick改为:onclick xu(20251209) --%>
|
|
|
+ <ss-search-button
|
|
|
+ text="${button.buttonName}"
|
|
|
+ icon-class="nav-icon-add"
|
|
|
+ :opt="btnElemConfig.${button.id}.dropOptions"
|
|
|
+ check-id="${management}"
|
|
|
+ onclick="${button.id}handleClick()"
|
|
|
+ ></ss-search-button>
|
|
|
+ <script>
|
|
|
+ function ${button.id}handleClick() {
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='${plugin.service}' dest='${plugin.dest}' parm='${plugin.param}'/>",
|
|
|
+ title: "${plugin.title}",
|
|
|
+ width: "${plugin.width}",
|
|
|
+ height: "${plugin.height}",
|
|
|
+ minHeight: "${plugin.minHeight}",
|
|
|
+ maxHeight: "${plugin.maxHeight}",
|
|
|
+ showTitle: "${plugin.showTitle}"
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ <%-- 实际没用上,注释掉 Ben(20251225)
|
|
|
+ window.ss.dom.btnElemConfig.${button.id}={id:"${button.id}",dropOptions:[],
|
|
|
+ onclick: () => {
|
|
|
+ wd.display.showComponent({show:["wdDialog"],url:"<ss:serv name='${plugin.service}' dest='${plugin.dest}' parm='${plugin.param}'/>",title:"${plugin.title}",width:"${plugin.width}",height:"${plugin.height}",minHeight:"${plugin.minHeight}",maxHeight:"${plugin.maxHeight}",showTitle:"${plugin.showTitle}"});
|
|
|
+ }
|
|
|
+ };
|
|
|
+ --%>
|
|
|
+
|
|
|
+ <%-- 循环生成按钮数组 --%>
|
|
|
+ <ss:rpt name='${button.pluginList}' id='plugin'>
|
|
|
+ window.ss.dom.btnElemConfig
|
|
|
+ .${button.id}.
|
|
|
+ dropOptions.push(
|
|
|
+ {
|
|
|
+ desc: '${plugin.plugin.desc}', <%-- 按钮名 --%>
|
|
|
+ callback: function () {
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='${plugin.service}' dest='${plugin.dest}' parm='${plugin.param}'/>",
|
|
|
+ title: "${plugin.title}",
|
|
|
+ width: "${plugin.width}",
|
|
|
+ height: "${plugin.height}",
|
|
|
+ minHeight: "${plugin.minHeight}",
|
|
|
+ maxHeight: "${plugin.maxHeight}",
|
|
|
+ showTitle: "${plugin.showTitle}"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ </ss:rpt>
|
|
|
+ </script>
|
|
|
+ <%-- 新UI end Ben --%>
|
|
|
+
|
|
|
+ </ss:equal>
|
|
|
+ </ss:auth>
|
|
|
+ </ss:rpt>
|
|
|
+ <%--管理按钮end--%>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <%--搜索条件end--%>
|
|
|
+
|
|
|
+
|
|
|
+ <script type="text/javascript" src="/ss/env/env_search.js"></script>
|
|
|
+ <%-- 旧UI初始化查询列表的js,新UI做好后,要被删掉的 --%>
|
|
|
+
|
|
|
+ <%-- 新UI初始化查询列表数据的JS --%>
|
|
|
+ <script>
|
|
|
+
|
|
|
+
|
|
|
+ window.ss.dom.listConfig = window.ss.dom.listConfig || {};
|
|
|
+
|
|
|
+ //二级对象 草稿箱
|
|
|
+ window.ss.dom.listConfig.draftbox = [];
|
|
|
+ <%-- 草稿箱start --%>
|
|
|
+ <ss:rpt name='cgxList' id='item'>
|
|
|
+ {
|
|
|
+ let item = {};
|
|
|
+ window.ss.dom.listConfig.draftbox.push(item);
|
|
|
+
|
|
|
+ <%-- 下面的titlexxx是原来td的一个属性,不知道有啥用 --%>
|
|
|
+ <ss:equal val='${not empty item.service.play && empty item.service.update && empty item.service.change}' val2='true'>
|
|
|
+ item.titlexxx = "${item.service.play.title}";
|
|
|
+ item.onclick = function () {
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='${item.service.play.service}' dest='${item.service.play.dest}' parm='${item.service.play.param}'/>",
|
|
|
+ title: "${item.service.play.title}",
|
|
|
+ width: "${item.service.play.width}",
|
|
|
+ height: "${item.service.play.height}",
|
|
|
+ minHeight: "${item.service.play.minHeight}",
|
|
|
+ maxHeight: "${item.service.play.maxHeight}"
|
|
|
+ });
|
|
|
+ };
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <ss:equal val='${item.service.lbm}' val2='1'>
|
|
|
+ <ss:equal val='${empty item.service.update}' val2='false'>
|
|
|
+ item.titlexxx = "${item.service.update.title}";
|
|
|
+ item.onclick = function () {
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='${item.service.update.service}' dest='${item.service.update.dest}' parm='${item.service.update.param}'/>",
|
|
|
+ title: "${item.service.update.title}",
|
|
|
+ width: "${item.service.update.width}",
|
|
|
+ height: "${item.service.update.height}",
|
|
|
+ minHeight: "${item.service.update.minHeight}",
|
|
|
+ maxHeight: "${item.service.update.maxHeight}"
|
|
|
+ });
|
|
|
+ };
|
|
|
+ </ss:equal>
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <ss:equal val='${item.service.lbm}' val2='11'>
|
|
|
+ <ss:equal val='${empty item.service.change}' val2='false'>
|
|
|
+ item.titlexxx = "${item.service.change.title}";
|
|
|
+ item.onclick = function () {
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='${item.service.change.service}' dest='${item.service.change.dest}' parm='${item.service.change.param}'/>",
|
|
|
+ title: "${item.service.change.title}",
|
|
|
+ width: "${item.service.change.width}",
|
|
|
+ height: "${item.service.change.height}",
|
|
|
+ minHeight: "${item.service.change.minHeight}",
|
|
|
+ maxHeight: "${item.service.change.maxHeight}"
|
|
|
+ });
|
|
|
+ };
|
|
|
+ </ss:equal>
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ item.buttons = [];
|
|
|
+
|
|
|
+ <ss:equal val='${item.service.lbm}' val2='1'>
|
|
|
+ item.buttons.push(
|
|
|
+ {
|
|
|
+ class: "cart-list-setting",
|
|
|
+ title: "增加",
|
|
|
+ onclick: () => {
|
|
|
+ console.log("点击了增加");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <ss:equal val='${item.service.lbm}' val2='11'>
|
|
|
+ item.buttons.push(
|
|
|
+ {
|
|
|
+ class: "cart-list-setting",
|
|
|
+ title: "变动",
|
|
|
+ onclick: () => {
|
|
|
+ console.log("点击了变动");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ </ss:equal>
|
|
|
+ <ss:equal val='${item.service.lbm}' val2='51'>
|
|
|
+ item.buttons.push(
|
|
|
+ {
|
|
|
+ class: "cart-list-setting",
|
|
|
+ title: "停用",
|
|
|
+ onclick: () => {
|
|
|
+ console.log("点击了停用");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ </ss:equal>
|
|
|
+ <ss:equal val='${item.service.lbm}' val2='55'>
|
|
|
+ item.buttons.push(
|
|
|
+ {
|
|
|
+ class: "cart-list-setting",
|
|
|
+ title: "启用",
|
|
|
+ onclick: () => {
|
|
|
+ console.log("点击了启用");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <ss:equal val='${item.service.lbm}' valList='51,55'>
|
|
|
+ item.buttons.push(
|
|
|
+ {
|
|
|
+ class: "cart-list-setting",
|
|
|
+ title: "还原",
|
|
|
+ onclick: () => {
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='deleteSq' parm='{"wdConfirmationCaptchaService":"0","sqid":"${item.sqid}"}' dest='info'/>",
|
|
|
+ title: "提示信息",
|
|
|
+ width: 715,
|
|
|
+ height: 483
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ console.log('###item.thumbnail:${item.thumbnail}');
|
|
|
+
|
|
|
+ <%--缩略图--%>
|
|
|
+ <ss:equal val='${empty item.thumbnail}' val2='false'>
|
|
|
+
|
|
|
+ <ss:equal val='${item.service.state}' val2='0'>
|
|
|
+ item.thumb = "${sessionScope['ssUser'].skinDir}image/object/default-${item.ssObjName}.png"
|
|
|
+ onerror = "javascript:this.src='${sessionScope['ssUser'].skinDir}image/default-photo.png';this.onerror=null;";
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <ss:notEqual val='${item.service.state}' val2='0'>
|
|
|
+ item.thumb = "<ss:serv name='dlByHttp' parm='{"wdConfirmationCaptchaService":"0","path":"${item.thumbnail.value}","type":"img"}'/>";
|
|
|
+ </ss:notEqual>
|
|
|
+
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <%-- 列标题 --%>
|
|
|
+ <ss:equal val='${empty item.first}' val2='false'> <%-- 改 equal:val1="true" val2="${not empty item.first}"。Lin --%>
|
|
|
+ <%--不带codebook--%>
|
|
|
+ <ss:equal val='${empty item.first.field.cbName}' val2='true'>
|
|
|
+ item.title = "<ss:txt val='${item.first.value}' miniDate='false' fmt='${item.first.field.fmt}'/>";
|
|
|
+ </ss:equal>
|
|
|
+ <%--带codebook--%>
|
|
|
+ <ss:equal val='${empty item.first.field.cbName}' val2='false'>
|
|
|
+ item.title = "<ss:cbTrans cb='${item.first.field.cbName}' val='${item.first.value}'/>";
|
|
|
+ </ss:equal>
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <%--列标题:缺标题显示属性start--%>
|
|
|
+ <ss:equal val='${empty item.first && not empty item.third}' val2='true'>
|
|
|
+ item.title = '';
|
|
|
+ <ss:rpt name='${item.third}' id='itemList'>
|
|
|
+ <ss:rpt name='${itemList}' id='item2'>
|
|
|
+ item.title += '${item2.field.desc}:';
|
|
|
+ <%--不带codebook--%>
|
|
|
+ <ss:equal val='${empty item2.field.cbName}' val2='true'>
|
|
|
+ item.title += '<ss:txt val='${item2.value}' fmt='${item2.field.fmt}' miniDate='false'/> ';
|
|
|
+ </ss:equal>
|
|
|
+ <%--带codebook--%>
|
|
|
+ <ss:equal val='${empty item2.field.cbName}' val2='false'>
|
|
|
+ item.title += '<ss:cbTrans cb='${item2.field.cbName}' val='${item2.value}'/> ';
|
|
|
+ </ss:equal>
|
|
|
+ </ss:rpt>
|
|
|
+ </ss:rpt>
|
|
|
+ </ss:equal>
|
|
|
+ <%--缺标题显示属性end--%>
|
|
|
+
|
|
|
+ <%--正文或摘要--%>
|
|
|
+ <ss:equal val='${empty item.second}' val2='false'>
|
|
|
+ // 摘要字段统一映射为 desc(用于 ss-list-card 右侧文字区规则) by xu 20260113
|
|
|
+ item.desc = '${item.second.value}';
|
|
|
+ item.summary = '${item.second.value}'; // legacy 兜底 by xu 20260113
|
|
|
+ </ss:equal>
|
|
|
+ // 对象号字段映射(用于 ss-list-card 第三部分回显) by xu 20260113
|
|
|
+ item.objNum = '${item.ssObjId}';
|
|
|
+
|
|
|
+ <%-- 列表底部的对象属性(tags) --%>
|
|
|
+ <ss:equal val='${empty item.first || empty item.third}' val2='false'>
|
|
|
+ item.tags = [];
|
|
|
+ <ss:rpt name='${item.third}' id='itemList'>
|
|
|
+ <ss:rpt name='${itemList}' id='item2'>
|
|
|
+ {
|
|
|
+
|
|
|
+ let v;
|
|
|
+ <%--不带codebook--%>
|
|
|
+ <ss:equal val='${empty item2.field.cbName}' val2='true'>
|
|
|
+ v = '<ss:txt val='${item2.value}' fmt='${item2.field.fmt}' miniDate='false'/>';
|
|
|
+ </ss:equal>
|
|
|
+ <%--带codebook--%>
|
|
|
+ <ss:equal val='${empty item2.field.cbName}' val2='false'>
|
|
|
+ v = '<ss:cbTrans cb='${item2.field.cbName}' val='${item2.value}'/>';
|
|
|
+ </ss:equal>
|
|
|
+ item.tags.push({'${item2.field.desc}': v});
|
|
|
+ }
|
|
|
+ </ss:rpt>
|
|
|
+ </ss:rpt>
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <%-- 对象变动前后属性列表 --%>
|
|
|
+ item.changeItems = [];
|
|
|
+ <ss:rpt name='${item.forth}' id='item3'>
|
|
|
+ item.changeItems.push({
|
|
|
+ name: '${item3.name}',
|
|
|
+ oldValue: '${item3.oldValue}',
|
|
|
+ newValue: '${item3.newValue}'
|
|
|
+ });
|
|
|
+ </ss:rpt>
|
|
|
+
|
|
|
+ }
|
|
|
+ </ss:rpt>
|
|
|
+ <%-- 草稿箱end --%>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //在用或停用的对象列表
|
|
|
+ window.ss.dom.listConfig.list = [];
|
|
|
+ <ss:rpt name='objectList' id='item'><%-- 循环一次生成一行列表 start --%>
|
|
|
+ {
|
|
|
+ let item = {};//列表的其中一行的属性
|
|
|
+ window.ss.dom.listConfig.list.push(item);
|
|
|
+
|
|
|
+ <ss:equal val='${item.service.state}' val2='0'><%-- 借阅 --%>
|
|
|
+ item.onclick = function () {
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='ydsq_tj' parm='{"wdConfirmationCaptchaService":"0","ssObjId":"${item.ssObjId}","ssObjName":"${item.ssObjName}"}' dest='ydsq_tj'/>",
|
|
|
+ title: "借阅",
|
|
|
+ width: 613,
|
|
|
+ height: 387
|
|
|
+ });
|
|
|
+ }
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <ss:equal val='${empty item.service.play}' val2='false'><%-- 有权查看,不需要借阅的情况 --%>
|
|
|
+ item.titlexxx = "${item.service.play.title}";
|
|
|
+ item.onclick = function () {
|
|
|
+ wd.display.showComponent({
|
|
|
+ getSize: 1,
|
|
|
+ width: ((${item.service.play.width}+DOM_SIZE_objInfoTabWidth) + ""),
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='${item.service.play.service}' dest='${item.service.play.dest}' parm='${item.service.play.param}'/>",
|
|
|
+ title: "${item.service.play.title}",
|
|
|
+ height: "${item.service.play.height}",
|
|
|
+ minHeight: "${item.service.play.minHeight}",
|
|
|
+ maxHeight: "${item.service.play.maxHeight}"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <ss:equal val='${empty item.thumbnail}' val2='false'><%-- 缩略图 --%>
|
|
|
+ <ss:equal val='${item.service.state}' val2='0'><%-- 借阅 --%>
|
|
|
+ item.thumb = "${sessionScope['ssUser'].skinDir}image/object/default-${item.ssObjName}.png";
|
|
|
+ </ss:equal>
|
|
|
+ <ss:notEqual val='${item.service.state}' val2='0'>
|
|
|
+ console.log('@@@图片:${item.thumbnail.value}');
|
|
|
+ item.thumb = "<ss:serv name='dlByHttp' parm='{"wdConfirmationCaptchaService":"0","path":"${item.thumbnail.value}","type":"img"}'/>";
|
|
|
+ </ss:notEqual>
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <%-- 标题 --%>
|
|
|
+ <ss:equal val='${empty item.first}' val2='false'> <%-- 改 equal:val1="true" val2="${not empty item.first}"。Lin --%>
|
|
|
+ <%--不带codebook--%>
|
|
|
+ <ss:equal val='${empty item.first.field.cbName}' val2='true'>
|
|
|
+ item.title = "<ss:txt val='${item.first.value}' miniDate='false' fmt='${item.first.field.fmt}'/>";
|
|
|
+ </ss:equal>
|
|
|
+ <%--带codebook--%>
|
|
|
+ <ss:equal val='${empty item.first.field.cbName}' val2='false'>
|
|
|
+ item.title = "<ss:cbTrans cb='${item.first.field.cbName}' val='${item.first.value}'/>";
|
|
|
+ </ss:equal>
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <%--缺标题显示属性当标题start--%>
|
|
|
+ <ss:equal val='${empty item.first && not empty item.third}' val2='true'>
|
|
|
+ item.title = '';
|
|
|
+ <ss:rpt name='${item.third}' id='itemList'>
|
|
|
+ <ss:rpt name='${itemList}' id='item2'>
|
|
|
+
|
|
|
+ item.title += '${item2.field.desc}:';
|
|
|
+ <%--属性名--%>
|
|
|
+
|
|
|
+ <%--不带codebook--%><%--属性值--%>
|
|
|
+ <ss:equal val='${empty item2.field.cbName}' val2='true'>
|
|
|
+ item.title += "<ss:txt val='${item2.value}' fmt='${item2.field.fmt}' miniDate='false'/> ";
|
|
|
+ </ss:equal>
|
|
|
+ <%--带codebook--%><%--属性值--%>
|
|
|
+ <ss:equal val='${empty item2.field.cbName}' val2='false'>
|
|
|
+ item.title += "<ss:cbTrans cb='${item2.field.cbName}' val='${item2.value}'/> ";
|
|
|
+ </ss:equal>
|
|
|
+ </ss:rpt>
|
|
|
+ </ss:rpt>
|
|
|
+ </ss:equal>
|
|
|
+ <%--缺标题显示属性当标题end--%>
|
|
|
+
|
|
|
+ <%-- 摘要 --%>
|
|
|
+ <ss:equal val='${empty item.second}' val2='false'>
|
|
|
+ // 摘要字段统一映射为 desc(用于 ss-list-card 右侧文字区规则) by xu 20260113
|
|
|
+ item.desc = '${item.second.value}';
|
|
|
+ item.summary = '${item.second.value}'; // legacy 兜底 by xu 20260113
|
|
|
+ </ss:equal>
|
|
|
+ // 对象号字段映射(用于 ss-list-card 第三部分回显) by xu 20260113
|
|
|
+ item.objNum = '${item.ssObjId}';
|
|
|
+
|
|
|
+ <%-- 列表底部的对象标签组 --%>
|
|
|
+ item.tags = [];
|
|
|
+ <%-- 提到条件外面 Ben(20251230) --%>
|
|
|
+ <ss:equal val='${empty item.first || empty item.third}' val2='false'>
|
|
|
+ <%--item.tags=[]; 提到条件外面,不然列表报 Mount failed:TypeError: Cannot read properties of undefined (reading 'map') Ben(20251230) --%>
|
|
|
+ <ss:rpt name='${item.third}' id='itemList'>
|
|
|
+ <ss:rpt name='${itemList}' id='item2'>
|
|
|
+ {
|
|
|
+ let v;
|
|
|
+
|
|
|
+ <%--不带codebook--%>
|
|
|
+ <ss:equal val='${empty item2.field.cbName}' val2='true'>
|
|
|
+ v = '<ss:txt val='${item2.value}' miniDate='false' fmt='${item2.field.fmt}'/>';
|
|
|
+ </ss:equal>
|
|
|
+ <%--带codebook--%>
|
|
|
+ <ss:equal val='${empty item2.field.cbName}' val2='false'>
|
|
|
+ v = '<ss:cbTrans cb='${item2.field.cbName}' val='${item2.value}'/>';
|
|
|
+ </ss:equal>
|
|
|
+ item.tags.push({
|
|
|
+ ${item2.field.desc}:
|
|
|
+ v
|
|
|
+ })
|
|
|
+ ;
|
|
|
+ }
|
|
|
+ </ss:rpt>
|
|
|
+ </ss:rpt>
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ <%--按钮--%>
|
|
|
+ <ss:equal val='${empty item.service.btnList}' val2='false'>
|
|
|
+ item.buttons = [];
|
|
|
+ <ss:rpt name='${item.service.btnList}' id='btn'>
|
|
|
+
|
|
|
+ item.buttons.push(
|
|
|
+ {
|
|
|
+ id: "${btn.btnID}",
|
|
|
+ titlexxx: "${btn.title}",
|
|
|
+ class: "cart-list-setting",
|
|
|
+ title: "${btn.name}",
|
|
|
+ onclick: () => {
|
|
|
+ <%--列表的变动按钮就在这里,下面的width会根据不同业务对象而不同
|
|
|
+ 弹窗参数加上getSize=1,使showComponent弹窗方法不再通过ajax从后台取宽高 --%>
|
|
|
+ wd.display.showComponent({
|
|
|
+ getSize: 1,
|
|
|
+ width: ((${btn.width}+DOM_SIZE_objInfoTabWidth) + ""),
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url: "<ss:serv name='${btn.service}' dest='${btn.dest}' parm='${btn.param}'/>",
|
|
|
+ title: "${btn.title}",
|
|
|
+ height: "${btn.height}",
|
|
|
+ minHeight: "${btn.minHeight}",
|
|
|
+ maxHeight: "${btn.maxHeight}"
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ <%--
|
|
|
+ <ss:equal val='${index}' val2='0'>
|
|
|
+ </ss:equal>
|
|
|
+ <ss:notEqual val='${index}' val2='0'>
|
|
|
+ </ss:notEqual>
|
|
|
+ 改为不区分是否第1个变动按钮,都输出相同json数据 --%>
|
|
|
+ </ss:rpt>
|
|
|
+
|
|
|
+ </ss:equal>
|
|
|
+
|
|
|
+ }
|
|
|
+ </ss:rpt><%-- 循环一次生成一行列表 end --%>
|
|
|
+
|
|
|
+
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <%--搜索结果start--%>
|
|
|
+
|
|
|
+ <%-- 功能说明:卡片区域使用 grid 自动分列,剩余宽度平分(不锁死 max-width) by xu 20260109 --%>
|
|
|
+ <div v-show="userInteracted && loadingList" class="pobj-list-loading" style="display:none;">
|
|
|
+ <div class="pobj-spinner"></div>
|
|
|
+ </div>
|
|
|
+ <div v-show="!(userInteracted && loadingList)"
|
|
|
+ :class="['content-area','item-content-area', cardGridKind ? ('ss-card-grid--' + cardGridKind) : '']">
|
|
|
+ <template v-for="(item, i) in listConfig.draftbox" :key="i">
|
|
|
+ <ss-folder-card v-if="item.children" :item="item"></ss-folder-card>
|
|
|
+ <!-- 功能说明:传入 ssObjName + cardClickAction(卡片主体点击 view/single;角标仍多选) by xu 20260109 -->
|
|
|
+ <ss-list-card v-else :item="item" :ss-obj-name="ssObjName" :card-click-action="cardClickAction"
|
|
|
+ @toggle-select="handleToggleSelect"></ss-list-card>
|
|
|
+ </template>
|
|
|
+ <template v-for="(item, i) in listConfig.list" :key="i">
|
|
|
+ <ss-folder-card v-if="item.children" :item="item"></ss-folder-card>
|
|
|
+ <!-- 功能说明:传入 ssObjName + cardClickAction(卡片主体点击 view/single;角标仍多选) by xu 20260109 -->
|
|
|
+ <ss-list-card v-else :item="item" :ss-obj-name="ssObjName" :card-click-action="cardClickAction"
|
|
|
+ @toggle-select="handleToggleSelect"></ss-list-card>
|
|
|
+ </template>
|
|
|
+ <ss-page
|
|
|
+ :key="String(ssPaging?.pageNo || 1) + '-' + String(ssPaging?.rowNumPer || 12) + '-' + String(ssPaging?.rowNum || 0)" <%-- // 功能说明:分页默认每页12条 by xu 20260116 --%>
|
|
|
+ :total="Number(ssPaging?.rowNum || 0)"
|
|
|
+ :size="Number(ssPaging?.rowNumPer || 12)" <%-- // 功能说明:分页默认每页12条 by xu 20260116 --%>
|
|
|
+ :page="Number(ssPaging?.pageNo || 1)"
|
|
|
+ @change="handlePageChange">
|
|
|
+ </ss-page>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ </form>
|
|
|
+
|
|
|
+ <!-- 功能说明:右侧业务面板(ss-sidebar),用于已选/服务/预定/图表等 by xu 20260113 -->
|
|
|
+ <ss-sidebar
|
|
|
+ :buttons="sidebarButtons"
|
|
|
+ :panels="sidebarPanels"
|
|
|
+ @remove="handleSidebarRemove"
|
|
|
+ ></ss-sidebar>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</body>
|
|
|
|
|
|
</html>
|
|
|
<script type="module">
|
|
|
- <%-- 打印新UI相关json对象 --%>
|
|
|
- // function objectPickMockAjax(url) {
|
|
|
- // return new Promise((resolve) => {
|
|
|
- // setTimeout(() => {
|
|
|
- // resolve([
|
|
|
- // { label: '学校领导', value: '190'},
|
|
|
- // { label: '业务部', value: '101241' },
|
|
|
- // { label: '男', value: '1' },
|
|
|
- // { label: '女', value: '2' }
|
|
|
- // ]);
|
|
|
- // }, 1000);
|
|
|
- // });
|
|
|
- // }
|
|
|
- // 定义 objPickerLoad 函数
|
|
|
- // async function objPickerLoad(url, optionsName) {
|
|
|
- // const result = await objectPickMockAjax(url);
|
|
|
- // return result;
|
|
|
- // }
|
|
|
-
|
|
|
- const data = {
|
|
|
- ssObjName:"${ssObjName}",
|
|
|
- systemType: window.ss.dom.TYPE,
|
|
|
- listConfig:window.ss.dom.listConfig,
|
|
|
- formElemConfig:window.ss.dom.formElemConfig,
|
|
|
- cardGridKind: '', // 功能:卡片网格布局类型(none/photo/thumbnail) by xu 20260109
|
|
|
- cardClickAction: "view", // 功能:卡片主体点击动作(view=查看;single=单选互斥;角标仍多选) by xu 20260109
|
|
|
- <%-- 实际没用上,注释掉 Ben(20251225) btnElemConfig:window.ss.dom.btnElemConfig, --%>
|
|
|
-
|
|
|
- searchButtonConfigCheckId:'${management}',
|
|
|
- searchButtonConfig:[
|
|
|
- {
|
|
|
- id:"99",
|
|
|
- desc: "所有",
|
|
|
- callback: () => {
|
|
|
- $("[name=pageNo]").val('1');
|
|
|
- $("[name=management]").val('99');
|
|
|
- $("#myForm").submit();
|
|
|
-
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- id:"2",
|
|
|
- desc: "管理",
|
|
|
- callback: () => {
|
|
|
- $("[name=pageNo]").val('1');
|
|
|
- $("[name=management]").val('2');
|
|
|
- $("#myForm").submit();
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- id:"1",
|
|
|
- desc: "创建",
|
|
|
- callback: () => {
|
|
|
- $("[name=pageNo]").val('1');
|
|
|
- $("[name=management]").val('1');
|
|
|
- $("#myForm").submit();
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- id:"3",
|
|
|
- desc: "已办",
|
|
|
- callback: () => {
|
|
|
- $("[name=pageNo]").val('1');
|
|
|
- $("[name=management]").val('3');
|
|
|
- $("#myForm").submit();
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- id:"55",
|
|
|
- desc: "停用",
|
|
|
- callback: () => {
|
|
|
- $("[name=pageNo]").val('1');
|
|
|
- $("[name=management]").val('55');
|
|
|
- $("#myForm").submit();
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- }
|
|
|
- if (window.ss.dom.formElemConfig) {
|
|
|
- Object.entries(window.ss.dom.formElemConfig).forEach(([key, config]) => {
|
|
|
- data[key] = config.value;
|
|
|
- // 处理 objPicker
|
|
|
+ <%-- 打印新UI相关json对象 --%>
|
|
|
+
|
|
|
+
|
|
|
+ const data = {
|
|
|
+ ssObjName: "${ssObjName}", // 对象名
|
|
|
+ // 后端注入的 ssServ 接口名(用于 ajax 拉取查询首页/列表数据)
|
|
|
+ ssSearchPobjHomeServName: "${ssSearchPobjHomeServName}", // <对象名>_cxsy
|
|
|
+ ssSearchPobjListServName: "${ssSearchPobjListServName}", // <对象名>_cxlb
|
|
|
+
|
|
|
+ // 接口返回(调试用,可删)
|
|
|
+ ssHomeResp: null,
|
|
|
+ ssListResp: null,
|
|
|
+
|
|
|
+ // 页面状态
|
|
|
+ homeReady: false,
|
|
|
+ userInteracted: false, // 用户触发(搜索/翻页/切换范围)
|
|
|
+ loadingHome: false,
|
|
|
+ loadingList: false,
|
|
|
+
|
|
|
+ // 首页接口返回字段(按 page/objlist修改.txt)
|
|
|
+ searchFieldList: [], // 查询条件字段
|
|
|
+ rootFuncList: [], // 根功能
|
|
|
+ hasKeyword: false, // 是否有关键词
|
|
|
+ hasScope: false, // 是否带范围
|
|
|
+ thnType: 0, // 缩略图类型:1横向 2竖向 3方形 4圆形(目前仅用 1/2,其他先不处理)
|
|
|
+ ssPaging: {pageNo: 1, rowNumPer: 12, rowNum: 0}, // 翻页信息 // 功能说明:默认每页12条 by xu 20260116
|
|
|
+ rbarFuncList: [], // 右侧栏功能
|
|
|
+ rbarTabNameList: [], // 右侧栏选项卡
|
|
|
+ pstatList: [], // 功能说明:个人统计图表配置(右侧图表区) by xu 20260114
|
|
|
+
|
|
|
+ // 查询表单参数(用于接口入参)
|
|
|
+ form: {management: "99", isFulltext: "0", isAnd: "", ssKeyword: ""},
|
|
|
+
|
|
|
+ systemType: window.ss.dom.TYPE,
|
|
|
+ listConfig: window.ss.dom.listConfig || {draftbox: [], list: []},
|
|
|
+ formElemConfig: window.ss.dom.formElemConfig || {},
|
|
|
+ // 卡片区域:自动分列/宽度平分 by xu 20260109
|
|
|
+ cardGridKind: '', // none/photo/thumbnail by xu 20260109
|
|
|
+ // 卡片主体点击动作:view=查看(调用 item.onclick);single=单选互斥;角标仍多选 by xu 20260109
|
|
|
+ cardClickAction: "view", // 功能说明:默认先用 view,首页接口若返回预定面板则切到 single by xu 20260114
|
|
|
+ hasBookPanel: false, // 功能说明:是否存在预定面板(驱动 cardClickAction + 选中后联动 cxycl) by xu 20260116
|
|
|
+ hasServPanel: false, // 功能说明:是否存在服务面板(严格依赖首页 rbarTabNameList 是否返回 rbarServ) by xu 20260116
|
|
|
+ yclLoading: false, // 功能说明:已选对象联动(cxycl)加载状态 by xu 20260114
|
|
|
+ yclResp: null, // 功能说明:已选对象联动接口返回(调试/兜底) by xu 20260114
|
|
|
+ // 右侧已选(用于未来接入 ss-sidebar 的已选面板) by xu 20260109
|
|
|
+ selectedItems: [],
|
|
|
+ // 右侧边栏:顶部按钮(由首页接口 rbarFuncList 初始化)
|
|
|
+ sidebarButtons: [],
|
|
|
+ // 右侧边栏:分区配置(由 initSidebarPanels 初始化) by xu 20260113
|
|
|
+ sidebarPanels: [],
|
|
|
+ <%-- 实际没用上,注释掉 Ben(20251225) btnElemConfig:window.ss.dom.btnElemConfig, --%>
|
|
|
+
|
|
|
+ searchButtonConfigCheckId: "99",
|
|
|
+ searchButtonConfig: [
|
|
|
+ {
|
|
|
+ id: "99",
|
|
|
+ desc: "所有",
|
|
|
+ callback: () => window.__objListVm && window.__objListVm.switchScope(99),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "2",
|
|
|
+ desc: "管理",
|
|
|
+ callback: () => window.__objListVm && window.__objListVm.switchScope(2),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "1",
|
|
|
+ desc: "创建",
|
|
|
+ callback: () => window.__objListVm && window.__objListVm.switchScope(1),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "3",
|
|
|
+ desc: "已办",
|
|
|
+ callback: () => window.__objListVm && window.__objListVm.switchScope(3),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "55",
|
|
|
+ desc: "停用",
|
|
|
+ callback: () => window.__objListVm && window.__objListVm.switchScope(55),
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ if (window.ss.dom.formElemConfig) {
|
|
|
+ Object.entries(window.ss.dom.formElemConfig).forEach(([key, config]) => {
|
|
|
+ data[key] = config.value;
|
|
|
+ // 处理 objPicker
|
|
|
if (config.type === window.ss.dom.TYPE.OBJPICKER) {
|
|
|
data[key + "ObjPicker"] = true;
|
|
|
data[key + "Option"] = [];
|
|
|
data[key + "Url"] = config.optUrl;
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- console.log('data:'+JSON.stringify(data));
|
|
|
- SS.ready(function () {
|
|
|
- window.ss.dom.initializeFormApp({
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ SS.ready(function () {
|
|
|
+ // 功能说明:右侧 ss-sidebar__inner 统一增加 padding-top=10px(撤回外层 wrapper 方案) by xu 20260114
|
|
|
+ try {
|
|
|
+ if (!document.getElementById("ss-objlist-sidebar-inner-padding")) {
|
|
|
+ var st = document.createElement("style");
|
|
|
+ st.id = "ss-objlist-sidebar-inner-padding";
|
|
|
+ st.type = "text/css";
|
|
|
+ st.appendChild(document.createTextNode("#app .ss-sidebar__inner{padding-top:10px;}"));
|
|
|
+ document.head.appendChild(st);
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+ window.ss.dom.initializeFormApp({
|
|
|
el: "#app",
|
|
|
- data(){
|
|
|
+ data() {
|
|
|
return data;
|
|
|
},
|
|
|
- methods: {
|
|
|
- // 功能:探测当前业务列表卡片类型,用于网格列最小宽度 by xu 20260109
|
|
|
- detectCardGridKind() {
|
|
|
- const all = []
|
|
|
- .concat(this.listConfig?.draftbox || [])
|
|
|
- .concat(this.listConfig?.list || []);
|
|
|
- // 真实业务中形态一致;这里按“最大”优先:thumbnail > photo > none by xu 20260109
|
|
|
- if (all.some(it => String(it?.thumbType || '').trim() === 'thumbnail')) return 'thumbnail';
|
|
|
- if (all.some(it => !!it?.thumb || !!it?.thumbType)) return 'photo';
|
|
|
- return 'none';
|
|
|
- },
|
|
|
- handlePageChange({pageNo, rowNumPer, rowNum}) {
|
|
|
- // 更新隐藏表单值
|
|
|
- document.getElementsByName('pageNo')[0].value = pageNo;
|
|
|
- document.getElementsByName('rowNumPer')[0].value = rowNumPer;
|
|
|
- document.getElementsByName('rowNum')[0].value = rowNum;
|
|
|
- // 提交表单
|
|
|
- document.getElementById('myForm').submit();
|
|
|
- },
|
|
|
- search(){
|
|
|
- document.getElementById('myForm').submit();
|
|
|
- }
|
|
|
- },
|
|
|
- mounted(){
|
|
|
- // 初始化卡片网格类型(用于自动分列/宽度平分) by xu 20260109
|
|
|
- this.cardGridKind = this.detectCardGridKind();
|
|
|
- // const self = this;
|
|
|
- // 在这里可以使用 Vue 实例
|
|
|
- // Object.entries(this.$data).forEach(([key, value]) => {
|
|
|
- // 处理 objPicker
|
|
|
- // if (key.includes('ObjPicker')) {
|
|
|
- // const originalKey = key.replace('ObjPicker', '');
|
|
|
- // if (value) {
|
|
|
- // objPickerLoad(value, key).then(result => {
|
|
|
- // if(self.formElemConfig[originalKey]) {
|
|
|
- // self.formElemConfig[originalKey].name = originalKey;
|
|
|
- // self.formElemConfig[originalKey].options = result;
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- }
|
|
|
-
|
|
|
+ methods: {
|
|
|
+ openServiceDialog(srv) {
|
|
|
+ if (!srv) return;
|
|
|
+ // 功能说明:优先 ssToken 打开;若无 ssToken(如 rootFuncList),回退 servName+dest+parm 拼接 by xu 20260114
|
|
|
+ const token = String(srv.ssToken || "").trim();
|
|
|
+ let url = "";
|
|
|
+ if (token) {
|
|
|
+ url = "/service?ssToken=" + encodeURIComponent(token);
|
|
|
+ } else if (srv.servName) {
|
|
|
+ url = "/service?ssServ=" + encodeURIComponent(String(srv.servName));
|
|
|
+ if (srv.dest) url += "&ssDest=" + encodeURIComponent(String(srv.dest));
|
|
|
+ // 功能说明:兼容后端字段名 parm/param(两种都可能出现) by xu 20260114
|
|
|
+ const p = (srv.parm !== undefined ? srv.parm : srv.param);
|
|
|
+ try {
|
|
|
+ if (typeof p === "string") {
|
|
|
+ const s = p.trim();
|
|
|
+ if (s && (s[0] === "{" || s[0] === "[")) {
|
|
|
+ const obj = JSON.parse(s);
|
|
|
+ if (obj && typeof obj === "object") {
|
|
|
+ Object.entries(obj).forEach(([k, v]) => {
|
|
|
+ if (v === undefined || v === null) return;
|
|
|
+ url += "&" + encodeURIComponent(k) + "=" + encodeURIComponent(String(v));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else if (s) {
|
|
|
+ url += (s.startsWith("&") ? "" : "&") + s;
|
|
|
+ }
|
|
|
+ } else if (p && typeof p === "object") {
|
|
|
+ Object.entries(p).forEach(([k, v]) => {
|
|
|
+ if (v === undefined || v === null) return;
|
|
|
+ url += "&" + encodeURIComponent(k) + "=" + encodeURIComponent(String(v));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch (_) {
|
|
|
+ }
|
|
|
+ } else if (srv.dest) {
|
|
|
+ // 功能说明:报表场景可能后端不返回 fwm(servName),支持仅用 ssDest 打开 by xu 20260115
|
|
|
+ url = "/service?ssDest=" + encodeURIComponent(String(srv.dest));
|
|
|
+ // 功能说明:兼容后端字段名 parm/param(两种都可能出现) by xu 20260115
|
|
|
+ const p = (srv.parm !== undefined ? srv.parm : srv.param);
|
|
|
+ try {
|
|
|
+ if (typeof p === "string") {
|
|
|
+ const s = p.trim();
|
|
|
+ if (s && (s[0] === "{" || s[0] === "[")) {
|
|
|
+ const obj = JSON.parse(s);
|
|
|
+ if (obj && typeof obj === "object") {
|
|
|
+ Object.entries(obj).forEach(([k, v]) => {
|
|
|
+ if (v === undefined || v === null) return;
|
|
|
+ url += "&" + encodeURIComponent(k) + "=" + encodeURIComponent(String(v));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else if (s) {
|
|
|
+ url += (s.startsWith("&") ? "" : "&") + s;
|
|
|
+ }
|
|
|
+ } else if (p && typeof p === "object") {
|
|
|
+ Object.entries(p).forEach(([k, v]) => {
|
|
|
+ if (v === undefined || v === null) return;
|
|
|
+ url += "&" + encodeURIComponent(k) + "=" + encodeURIComponent(String(v));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch (_) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 功能说明:打开弹窗时透传当前搜索条件(searchFieldList.name -> form[name])by xu 20260116
|
|
|
+ try {
|
|
|
+ const list = Array.isArray(this.searchFieldList) ? this.searchFieldList : [];
|
|
|
+ const escapeRegExp = (s) => String(s || "").replace(/[.*+?^{}$()|[\]\\]/g, "\\$&");
|
|
|
+ const hasParam = (u, key) => {
|
|
|
+ if (!key) return false;
|
|
|
+ const re = new RegExp("([?&])" + escapeRegExp(key) + "=");
|
|
|
+ return re.test(String(u || ""));
|
|
|
+ };
|
|
|
+ const appendParam = (u, key, value) => {
|
|
|
+ if (!key) return u;
|
|
|
+ if (value === undefined || value === null) return u;
|
|
|
+ const s = String(value);
|
|
|
+ if (s === "") return u;
|
|
|
+ if (hasParam(u, key)) return u;
|
|
|
+ return (
|
|
|
+ u +
|
|
|
+ (u.indexOf("?") > -1 ? "&" : "?") +
|
|
|
+ encodeURIComponent(String(key)) +
|
|
|
+ "=" +
|
|
|
+ encodeURIComponent(s)
|
|
|
+ );
|
|
|
+ };
|
|
|
+ list.forEach((f) => {
|
|
|
+ const key = f && f.name;
|
|
|
+ if (!key) return;
|
|
|
+ const v = this.form ? this.form[key] : undefined;
|
|
|
+ if (Array.isArray(v)) {
|
|
|
+ v.forEach((vv) => {
|
|
|
+ url = appendParam(url, key, vv);
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ url = appendParam(url, key, v);
|
|
|
+ });
|
|
|
+ } catch (_) {
|
|
|
+ }
|
|
|
+ if (!url) return;
|
|
|
+ console.log("[objList] openServiceDialog url =", url, "srv =", srv);
|
|
|
+ wd.display.showComponent({
|
|
|
+ show: ["wdDialog"],
|
|
|
+ url,
|
|
|
+ title: srv.title || srv.desc || "",
|
|
|
+ width: srv.width,
|
|
|
+ height: srv.height,
|
|
|
+ minHeight: srv.minHeight,
|
|
|
+ maxHeight: srv.maxHeight,
|
|
|
+ showTitle: srv.showTitle,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ formatValByFmt(val, fmt) {
|
|
|
+ // 功能说明:统一按 fmt 动态格式化 {val, fmt}(支持任意组合 yyyy/MM/dd/HH/mm/ss),用于 title/catList by xu 20260114
|
|
|
+ try {
|
|
|
+ if (!fmt || val === undefined || val === null || val === "") return val;
|
|
|
+ const raw = typeof val === "string"
|
|
|
+ ? val.replace(/[\u202f\u00a0]/g, " ").replace(/ /g, " ").trim()
|
|
|
+ : val;
|
|
|
+ const d = raw instanceof Date ? raw : new Date(raw);
|
|
|
+ if (isNaN(d.getTime())) return val;
|
|
|
+ const pad2 = (n) => String(n).padStart(2, "0");
|
|
|
+ const tokens = {
|
|
|
+ yyyy: String(d.getFullYear()),
|
|
|
+ MM: pad2(d.getMonth() + 1),
|
|
|
+ M: String(d.getMonth() + 1),
|
|
|
+ dd: pad2(d.getDate()),
|
|
|
+ d: String(d.getDate()),
|
|
|
+ HH: pad2(d.getHours()),
|
|
|
+ H: String(d.getHours()),
|
|
|
+ mm: pad2(d.getMinutes()),
|
|
|
+ m: String(d.getMinutes()),
|
|
|
+ ss: pad2(d.getSeconds()),
|
|
|
+ s: String(d.getSeconds()),
|
|
|
+ };
|
|
|
+ const f = String(fmt);
|
|
|
+ // 不写死具体 fmt:按 token 替换;若 fmt 不含 token,则回退原值 by xu 20260114
|
|
|
+ if (!/(yyyy|MM|dd|HH|mm|ss|M|d|H|m|s)/.test(f)) return val;
|
|
|
+ return f.replace(/yyyy|MM|dd|HH|mm|ss|M|d|H|m|s/g, (k) => tokens[k] ?? k);
|
|
|
+ } catch (_) {
|
|
|
+ return val;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ buildThumbUrl(thn) {
|
|
|
+ if (!thn) return "";
|
|
|
+ return "/service?ssServ=dlByHttp&type=img&path=" + encodeURIComponent(String(thn));
|
|
|
+ },
|
|
|
+ normalizeObjToCard(row) {
|
|
|
+ const card = {
|
|
|
+ _raw: row,
|
|
|
+ ssObjName: row?.ssObjName,
|
|
|
+ objNum: row?.ssObjId,
|
|
|
+ title: "",
|
|
|
+ desc: row?.abs || "",
|
|
|
+ tags: [],
|
|
|
+ buttons: [],
|
|
|
+ stateIconList: row?.stateIconList || [],
|
|
|
+ statusIcons: [],
|
|
|
+ bigState: row?.bigState,
|
|
|
+ bookState: row?.bookState,
|
|
|
+ };
|
|
|
+ // 功能说明:将后端 stateIconList 映射为卡片右上角 statusIcons(后缀=1忽略;icon-state-*/icon-servType-* 只要后缀!=1 则显示 icon-sauth) by xu 20260116
|
|
|
+ try {
|
|
|
+ const rawList = Array.isArray(row?.stateIconList) ? row.stateIconList : [];
|
|
|
+ const icons = [];
|
|
|
+ let showSauth = false;
|
|
|
+ rawList.forEach((s) => {
|
|
|
+ const cls = String(s || "").trim();
|
|
|
+ if (!cls) return;
|
|
|
+ const m = cls.match(/-(\d+)$/);
|
|
|
+ const code = m ? Number(m[1]) : NaN;
|
|
|
+ if (code === 1) return; // 约定:后缀为 1 的不处理 by xu 20260116
|
|
|
+ // 约定:state/servType 只要有一个后缀不为 1,就展示一个 icon-sauth(去重) by xu 20260116
|
|
|
+ if (cls.indexOf("icon-state-") === 0 || cls.indexOf("icon-servType-") === 0) {
|
|
|
+ showSauth = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (showSauth) {
|
|
|
+ icons.push({class: "menu-base-icon icon-sauth", title: "使用中"});
|
|
|
+ }
|
|
|
+ card.statusIcons = icons;
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+ // 功能说明:title 可能是 {val, fmt}(日期/时间),此处按 fmt 做格式化(避免显示英文时间串) by xu 20260114
|
|
|
+ try {
|
|
|
+ const t = row?.title;
|
|
|
+ if (t && typeof t === "object" && t.val !== undefined) {
|
|
|
+ card.title = String(this.formatValByFmt(t.val, t.fmt) ?? "");
|
|
|
+ } else {
|
|
|
+ card.title = String(row?.title?.val || row?.title || "");
|
|
|
+ }
|
|
|
+ } catch (_) {
|
|
|
+ card.title = String(row?.title?.val || row?.title || "");
|
|
|
+ }
|
|
|
+ // 功能说明:bookState 优先于 bigState(0绿空闲/1黄预订中/2红),映射到卡片 status by xu 20260116
|
|
|
+ const hasBookState = row?.bookState !== undefined && row?.bookState !== null && row?.bookState !== "";
|
|
|
+ const hasBigState = row?.bigState !== undefined && row?.bigState !== null && row?.bigState !== "";
|
|
|
+ if (hasBookState || hasBigState) {
|
|
|
+ const stateVal = hasBookState ? Number(row.bookState) : Number(row.bigState);
|
|
|
+ card.status = stateVal === 2 ? "disabled" : stateVal === 1 ? "unavailable" : stateVal === 0 ? "available" : "";
|
|
|
+ }
|
|
|
+ // thnType:缩略图类型(目前仅处理 1=横向、2=竖向;其余先按无缩略图处理)
|
|
|
+ // 注意:即使 thn 为空,只要 thnType 存在,也要保留缩略图区域,以显示“对象号_icon”占位
|
|
|
+ const thnType = Number(this.thnType || 0);
|
|
|
+ if (thnType === 1) card.thumbType = "thumbnail"; // 横向:180×100
|
|
|
+ else if (thnType === 2) card.thumbType = "photo"; // 竖向:73×100(默认)
|
|
|
+
|
|
|
+ // thn:缩略图不为空 => 有图片(否则 ss-list-card 会按 thumbType 显示占位 icon)
|
|
|
+ if (row?.thn) card.thumb = this.buildThumbUrl(row.thn);
|
|
|
+ if (Array.isArray(row?.catList)) {
|
|
|
+ row.catList.forEach((c) => {
|
|
|
+ if (!c || !c.desc) return;
|
|
|
+ // 功能说明:catList 存在 fmt 时格式化时间(yyyy-MM-dd / yyyy-MM-dd HH:mm:ss),避免直接显示英文时间串 by xu 20260114
|
|
|
+ const val = this.formatValByFmt(c.val, c.fmt);
|
|
|
+ card.tags.push({[c.desc]: val});
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (Array.isArray(row?.chgRootFuncList)) {
|
|
|
+ row.chgRootFuncList.forEach((btn) => {
|
|
|
+ card.buttons.push({
|
|
|
+ id: btn.id,
|
|
|
+ titlexxx: btn.title,
|
|
|
+ class: "cart-list-setting",
|
|
|
+ title: btn.desc || btn.title || "",
|
|
|
+ onclick: () => this.openServiceDialog(btn),
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (row?.play) {
|
|
|
+ card.onclick = () => this.openServiceDialog(row.play);
|
|
|
+ }
|
|
|
+ return card;
|
|
|
+ },
|
|
|
+ buildPstatChartPanels(bizIcon) {
|
|
|
+ // 功能说明:根据 pstatList 构建右侧图表面板(type=chart),用于 ss-sidebar 底部图表区 by xu 20260114
|
|
|
+ const list = Array.isArray(this.pstatList) ? this.pstatList : [];
|
|
|
+ return list
|
|
|
+ .filter((it) => Number(it?.grtjlbm) === 1)
|
|
|
+ .map((it) => ({
|
|
|
+ type: "chart",
|
|
|
+ _grtjid: it?.grtjid,
|
|
|
+ title: it?.mc || "",
|
|
|
+ iconClass: bizIcon,
|
|
|
+ // 功能说明:右侧面板图表高度做上限(避免后端 gd 过大导致 sidebar 竖向撑爆) by xu 20260114
|
|
|
+ height: (() => {
|
|
|
+ const gd = Number(it?.gd);
|
|
|
+ const h = (isFinite(gd) && gd > 0) ? Math.max(160, Math.min(260, gd)) : 220;
|
|
|
+ return String(h) + "px";
|
|
|
+ })(),
|
|
|
+ // 功能说明:统计图默认先用柱状图(后续可按后端类型再扩展) by xu 20260115
|
|
|
+ options: {
|
|
|
+ xAxis: {type: "category", data: []},
|
|
|
+ yAxis: {type: "value"},
|
|
|
+ series: [{type: "bar", data: []}]
|
|
|
+ },
|
|
|
+ }));
|
|
|
+ },
|
|
|
+ loadPstatChartData(panel) {
|
|
|
+ // 功能说明:根据 grtjid 调 wrPchtPlay 获取真实数据,并写回 panel.options 触发渲染 by xu 20260114
|
|
|
+ const grtjid = panel?._grtjid;
|
|
|
+ if (!grtjid) return Promise.resolve(null);
|
|
|
+ return this.callSsService("wrPchtPlay", {grtjid})
|
|
|
+ .then((res) => {
|
|
|
+ const payload = res && typeof res === "object" ? (res.ssData || res) : null;
|
|
|
+ // 功能说明:兼容 wrPchtPlay 返回 dataArray(name=mc,value=sl) by xu 20260114
|
|
|
+ let list =
|
|
|
+ (payload && (payload.dataArray || payload.dataList || payload.list || payload.data)) ||
|
|
|
+ payload;
|
|
|
+ if (!Array.isArray(list)) list = [];
|
|
|
+ const data = list
|
|
|
+ .map((it) => {
|
|
|
+ if (!it || typeof it !== "object") return null;
|
|
|
+ const name = it.name ?? it.mc ?? it.desc ?? it.title;
|
|
|
+ const value = it.value ?? it.sl ?? it.zrs ?? it.count ?? it.num;
|
|
|
+ if (name === undefined || name === null) return null;
|
|
|
+ const v = Number(value);
|
|
|
+ return {name: String(name), value: isNaN(v) ? 0 : v};
|
|
|
+ })
|
|
|
+ .filter(Boolean);
|
|
|
+ // 功能说明:统计图默认先用柱状图(tooltip/label 显示数值;全 0 也正常展示) by xu 20260115
|
|
|
+ const xData = data.map((it) => it.name);
|
|
|
+ const yData = data.map((it) => it.value);
|
|
|
+ panel.options = {
|
|
|
+ color: ["#5470C6", "#91CC75", "#FAC858", "#EE6666", "#73C0DE", "#3BA272", "#FC8452", "#9A60B4", "#EA7CCC"],
|
|
|
+ tooltip: {trigger: "axis", axisPointer: {type: "shadow"}},
|
|
|
+ grid: {left: "3%", right: "3%", top: 12, bottom: 24, containLabel: true},
|
|
|
+ xAxis: {
|
|
|
+ type: "category",
|
|
|
+ data: xData,
|
|
|
+ axisLabel: {interval: 0, rotate: xData.length > 6 ? 30 : 0}
|
|
|
+ },
|
|
|
+ yAxis: {type: "value"},
|
|
|
+ series: [{
|
|
|
+ type: "bar",
|
|
|
+ barMaxWidth: 36,
|
|
|
+ data: yData,
|
|
|
+ label: {show: true, position: "top"},
|
|
|
+ }],
|
|
|
+ };
|
|
|
+ // 功能说明:强制触发 sidebarPanels 更新(避免仅在选中卡片后才刷新图表) by xu 20260114
|
|
|
+ try {
|
|
|
+ this.sidebarPanels = (this.sidebarPanels || []).slice();
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+ // 功能说明:图表初次渲染时容器尺寸可能未稳定,nextTick 后触发 resize,避免“未选中=灰色圆” by xu 20260114
|
|
|
+ try {
|
|
|
+ const self = this;
|
|
|
+ if (self && self.$nextTick) {
|
|
|
+ self.$nextTick(function () {
|
|
|
+ try {
|
|
|
+ window.dispatchEvent(new Event("resize"));
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ setTimeout(function () {
|
|
|
+ try {
|
|
|
+ window.dispatchEvent(new Event("resize"));
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+ }, 120);
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ console.error("loadPstatChartData failed", grtjid, e);
|
|
|
+ return null;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ applyPobjHomeData(ssData) {
|
|
|
+ if (!ssData || typeof ssData !== "object") return;
|
|
|
+ this.ssHomeResp = ssData;
|
|
|
+ this.homeReady = true;
|
|
|
+ this.userInteracted = false;
|
|
|
+
|
|
|
+ this.ssObjName = ssData.ssObjName || this.ssObjName; // 对象名
|
|
|
+ this.searchFieldList = Array.isArray(ssData.searchFieldList) ? ssData.searchFieldList : []; // 查询条件字段
|
|
|
+ this.rootFuncList = Array.isArray(ssData.rootFuncList) ? ssData.rootFuncList : []; // 根功能
|
|
|
+ this.hasKeyword = !!ssData.hasKeyword; // 是否有关键词
|
|
|
+ this.hasScope = !!ssData.hasScope; // 是否带范围
|
|
|
+ this.thnType = Number(ssData.thnType || 0); // 缩略图类型
|
|
|
+ this.ssPaging = ssData.ssPaging || this.ssPaging; // 翻页信息
|
|
|
+ this.rbarFuncList = Array.isArray(ssData.rbarFuncList) ? ssData.rbarFuncList : []; // 右侧栏功能
|
|
|
+ this.rbarTabNameList = Array.isArray(ssData.rbarTabNameList) ? ssData.rbarTabNameList : []; // 右侧栏选项卡
|
|
|
+ // 功能说明:cd 一级对象先强制显示“服务”tab(后端暂未返回 rbarServ,仅用于当前阶段联调) by xu 20260116
|
|
|
+ if (String(this.ssObjName || "").trim().toLowerCase() === "cd" && !this.rbarTabNameList.includes("rbarServ") && !this.rbarTabNameList.includes("rbarserv")) {
|
|
|
+ this.rbarTabNameList.push("rbarServ");
|
|
|
+ }
|
|
|
+ this.pstatList = Array.isArray(ssData.pstatList) ? ssData.pstatList : []; // 功能说明:个人统计图表配置 by xu 20260114
|
|
|
+
|
|
|
+ // 功能说明:如果首页返回预定/服务面板(rbarBook/rbarbook/rbarServ),则卡片主体点击切到 single(单选互斥),否则保持 view(查看) by xu 20260116
|
|
|
+ {
|
|
|
+ const tabs = Array.isArray(this.rbarTabNameList) ? this.rbarTabNameList : [];
|
|
|
+ const norm = (s) => String(s || "").trim().toLowerCase();
|
|
|
+ this.hasBookPanel = tabs.some((t) => norm(t) === "rbarbook"); // 功能说明:预定tab存在才回显bookList by xu 20260116
|
|
|
+ this.hasServPanel = tabs.some((t) => norm(t) === "rbarserv"); // 功能说明:服务tab存在才回显servList by xu 20260116
|
|
|
+ this.cardClickAction = (this.hasBookPanel || this.hasServPanel) ? "single" : "view"; // 功能说明:预定/服务任一存在则单选联动 by xu 20260116
|
|
|
+ }
|
|
|
+
|
|
|
+ this.searchButtonConfigCheckId = String(this.form?.management || "99");
|
|
|
+
|
|
|
+ // 用当前表单参数初始化 form(确保 v-model 有值)
|
|
|
+ const curParams = this.getSearchFormParams();
|
|
|
+ const nextForm = {...this.form, ...curParams};
|
|
|
+ this.searchFieldList.forEach((f) => {
|
|
|
+ if (f && f.name && !(f.name in nextForm)) nextForm[f.name] = "";
|
|
|
+ });
|
|
|
+ this.form = nextForm;
|
|
|
+ this.searchButtonConfigCheckId = String(this.form?.management || "99");
|
|
|
+
|
|
|
+ // 初始化列表(objList/draftList)
|
|
|
+ const nextDraft = Array.isArray(ssData.draftList) ? ssData.draftList.map((r) => this.normalizeObjToCard(r)) : [];
|
|
|
+ const nextList = Array.isArray(ssData.objList) ? ssData.objList.map((r) => this.normalizeObjToCard(r)) : [];
|
|
|
+ if (this.listConfig) {
|
|
|
+ this.listConfig.draftbox = nextDraft;
|
|
|
+ this.listConfig.list = nextList;
|
|
|
+ }
|
|
|
+ // 列表数据更新后,重新探测卡片网格类型
|
|
|
+ this.cardGridKind = this.detectCardGridKind();
|
|
|
+
|
|
|
+ // 初始化右侧栏(选项卡 + 功能)
|
|
|
+ const bizIcon = this.ssObjName ? ("menu-icon icon-obj-" + this.ssObjName) : "";
|
|
|
+ const pickedPanel = {
|
|
|
+ type: "list",
|
|
|
+ title: "已选",
|
|
|
+ count: this.selectedItems.length,
|
|
|
+ iconClass: bizIcon,
|
|
|
+ closable: true,
|
|
|
+ itemLayout: "person",
|
|
|
+ items: this.selectedItems,
|
|
|
+ mode: "selected",
|
|
|
+ itemAction: true,
|
|
|
+ onClear: () => this.clearSelectedItems(),
|
|
|
+ };
|
|
|
+ // 功能说明:面板 key 兼容后端大小写(rbarBook/rbarbook/rbarServ),并移除“对象”tab by xu 20260116
|
|
|
+ const titleMap = {rbarry: "人员", rbarbook: "预定", rbarserv: "服务"};
|
|
|
+ const tabs = Array.isArray(this.rbarTabNameList) ? this.rbarTabNameList : [];
|
|
|
+ const normKey = (s) => String(s || "").trim().toLowerCase();
|
|
|
+ const tabPanels = tabs.map((k) => {
|
|
|
+ const nk = normKey(k);
|
|
|
+ // 功能说明:右侧栏去掉“对象”tab(即使后端返回 rbarObj 也忽略) by xu 20260116
|
|
|
+ if (nk === "rbarobj") return null;
|
|
|
+ const p = {
|
|
|
+ type: "list",
|
|
|
+ _tabKey: nk, // 功能说明:保存原始 tab key(用于后续写回 items) by xu 20260114
|
|
|
+ title: titleMap[nk] || k,
|
|
|
+ iconClass: bizIcon,
|
|
|
+ items: [],
|
|
|
+ itemAction: false,
|
|
|
+ };
|
|
|
+ // 功能说明:右侧“预定/服务”面板复用“已选”tab 的 person 布局(title+meta),避免渲染 ss-sidebar-tag by xu 20260116
|
|
|
+ if (nk === "rbarbook") {
|
|
|
+ p.itemLayout = "person";
|
|
|
+ }
|
|
|
+ if (nk === "rbarserv") {
|
|
|
+ p.itemLayout = "simple"; // 功能说明:服务面板只回显 mc(名称),不需要 meta 槽位 by xu 20260116
|
|
|
+ }
|
|
|
+ // 功能说明:右侧“人员”面板先做前端 mock 搜索头(仅展示,不接后端) by xu 20260114
|
|
|
+ if (nk === "rbarry") {
|
|
|
+ p.iconClass = "menu-icon icon-obj-ry";
|
|
|
+ p.count = 0;
|
|
|
+ p.headerFilters = [
|
|
|
+ {
|
|
|
+ key: "keyword",
|
|
|
+ component: "ss-search-input",
|
|
|
+ props: {name: "keyword", placeholder: "人员", width: "140px"},
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ p.headerSearchButton = true;
|
|
|
+ p.onSearch = function (payload) {
|
|
|
+ try {
|
|
|
+ console.log("人员搜索", payload);
|
|
|
+ } catch (_) {
|
|
|
+ }
|
|
|
+ };
|
|
|
+ p.mode = "selected";
|
|
|
+ p.items = [];
|
|
|
+ p.itemAction = false;
|
|
|
+ }
|
|
|
+ return p;
|
|
|
+ }).filter(Boolean);
|
|
|
+ this.sidebarPanels = [pickedPanel, ...tabPanels];
|
|
|
+ try {
|
|
|
+ console.log("[pobj] sidebarPanels(init)", (this.sidebarPanels || []).map((p) => ({
|
|
|
+ title: p?.title,
|
|
|
+ type: p?.type,
|
|
|
+ tab: p?._tabKey
|
|
|
+ })));
|
|
|
+ } catch (_) {
|
|
|
+ } // 功能说明:打印初始化后的面板列表,排查缺少“对象/预定”tab by xu 20260116
|
|
|
+
|
|
|
+ // 功能说明:将 pstatList=51 聚拢为一个“报表”面板(type=report-table),用于右侧报表区 by xu 20260115
|
|
|
+ try {
|
|
|
+ const reportList = (Array.isArray(this.pstatList) ? this.pstatList : []).filter((it) => Number(it?.grtjlbm) === 51);
|
|
|
+ if (reportList.length) {
|
|
|
+ this.sidebarPanels = this.sidebarPanels.concat([{
|
|
|
+ type: "report-table",
|
|
|
+ title: "报表",
|
|
|
+ iconClass: bizIcon,
|
|
|
+ items: reportList,
|
|
|
+ // 功能说明:点击统计表单元格,优先按 fwm/bjm 组装后端 service 并弹窗 by xu 20260115
|
|
|
+ onOpen: (srv) => this.openServiceDialog(srv),
|
|
|
+ }]);
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+
|
|
|
+ // 功能说明:将 pstatList=1 映射为右侧图表区(type=chart),并调 wrPchtPlay 拉取真实数据 by xu 20260114
|
|
|
+ const chartPanels = this.buildPstatChartPanels(bizIcon);
|
|
|
+ if (chartPanels.length) {
|
|
|
+ this.sidebarPanels = this.sidebarPanels.concat(chartPanels);
|
|
|
+ chartPanels.forEach((p) => this.loadPstatChartData(p));
|
|
|
+ // 功能说明:追加 chartPanels 后触发一次 resize,避免首次进入图表为灰色圆(布局未完成) by xu 20260114
|
|
|
+ try {
|
|
|
+ setTimeout(function () {
|
|
|
+ window.dispatchEvent(new Event("resize"));
|
|
|
+ }, 0);
|
|
|
+ } catch (_) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.sidebarButtons = this.rbarFuncList.map((f) => ({
|
|
|
+ id: f.id || f.servName,
|
|
|
+ text: f.desc || f.title || "",
|
|
|
+ onClick: () => this.openServiceDialog(f),
|
|
|
+ }));
|
|
|
+
|
|
|
+ },
|
|
|
+ handleRootFuncClick(func) {
|
|
|
+ this.openServiceDialog(func);
|
|
|
+ },
|
|
|
+ // 切换范围(所有/管理/创建/已办/停用)=> 刷新列表(不刷新右侧栏)
|
|
|
+ switchScope(management) {
|
|
|
+ if (this.loadingList) return;
|
|
|
+ this.form.management = String(management);
|
|
|
+ this.searchButtonConfigCheckId = String(management);
|
|
|
+ this.ssPaging.pageNo = 1;
|
|
|
+ this.userInteracted = true;
|
|
|
+ this.loadPobjList();
|
|
|
+ },
|
|
|
+ // 提取当前表单参数(用于 ajax 调用 /service?ssServ=...)
|
|
|
+ getSearchFormParams() {
|
|
|
+ const params = {};
|
|
|
+ try {
|
|
|
+ const arr = $("#myForm").serializeArray();
|
|
|
+ arr.forEach(({name, value}) => {
|
|
|
+ if (!name) return;
|
|
|
+ if (Object.prototype.hasOwnProperty.call(params, name)) {
|
|
|
+ const cur = params[name];
|
|
|
+ params[name] = Array.isArray(cur) ? cur.concat([value]) : [cur, value];
|
|
|
+ } else {
|
|
|
+ params[name] = value;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch (e) {
|
|
|
+ console.error("getSearchFormParams failed", e);
|
|
|
+ }
|
|
|
+ return params;
|
|
|
+ },
|
|
|
+ // 以 Vue data 为准,组装列表/搜索请求参数(避免依赖组件内部 input 的实现)
|
|
|
+ getPobjParams() {
|
|
|
+ const params = {};
|
|
|
+ const form = this.form || {};
|
|
|
+ Object.keys(form).forEach((k) => {
|
|
|
+ const v = form[k];
|
|
|
+ if (v === undefined || v === null) return;
|
|
|
+ if (typeof v === "object") return;
|
|
|
+ params[k] = v;
|
|
|
+ });
|
|
|
+ if (this.ssPaging) {
|
|
|
+ params.pageNo = this.ssPaging.pageNo;
|
|
|
+ params.rowNumPer = this.ssPaging.rowNumPer;
|
|
|
+ params.rowNum = this.ssPaging.rowNum;
|
|
|
+ }
|
|
|
+ return params;
|
|
|
+ },
|
|
|
+ // 通用:调用后端 service(统一返回原生 Promise,避免 jqXHR 不支持 finally/catch)
|
|
|
+ callSsService(ssServ, extraParams = {}) {
|
|
|
+ if (!ssServ) return Promise.resolve(null);
|
|
|
+ return new Promise((resolve) => {
|
|
|
+ // 功能说明:演示兜底——后端 wrPchtPlay 异常时,固定 grtjid 返回 mock 数据 by xu 20260116
|
|
|
+ try {
|
|
|
+ const serv = String(ssServ || "").trim();
|
|
|
+ const grtjid = Number(extraParams?.grtjid);
|
|
|
+ if (serv === "wrPchtPlay" && (grtjid === 57243 || grtjid === 57241)) {
|
|
|
+ const mockMap = {
|
|
|
+ 57243: {
|
|
|
+ ssCode: 0,
|
|
|
+ ssData: {
|
|
|
+ dataArray: [
|
|
|
+ {
|
|
|
+ tjzbm: 9005000201,
|
|
|
+ sjtjzbm: 90050002,
|
|
|
+ mc: "教室",
|
|
|
+ ms: "教室",
|
|
|
+ xh: 1,
|
|
|
+ sl: 7,
|
|
|
+ jsgs: "yfbl_js",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tjzbm: 9005000202,
|
|
|
+ sjtjzbm: 90050002,
|
|
|
+ mc: "图书馆",
|
|
|
+ ms: "图书馆",
|
|
|
+ xh: 2,
|
|
|
+ sl: 8,
|
|
|
+ jsgs: "yfbl_tsg",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tjzbm: 9005000203,
|
|
|
+ sjtjzbm: 90050002,
|
|
|
+ mc: "学生宿舍",
|
|
|
+ ms: "学生宿舍",
|
|
|
+ xh: 3,
|
|
|
+ sl: 5,
|
|
|
+ jsgs: "yfbl_xsss",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tjzbm: 9005000204,
|
|
|
+ sjtjzbm: 90050002,
|
|
|
+ mc: "办公室",
|
|
|
+ ms: "办公室",
|
|
|
+ xh: 4,
|
|
|
+ sl: 17,
|
|
|
+ jsgs: "yfbl_bgs",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tjzbm: 9005000205,
|
|
|
+ sjtjzbm: 90050002,
|
|
|
+ mc: "食堂",
|
|
|
+ ms: "食堂",
|
|
|
+ xh: 5,
|
|
|
+ sl: 8,
|
|
|
+ jsgs: "yfbl_st",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tjzbm: 9005000206,
|
|
|
+ sjtjzbm: 90050002,
|
|
|
+ mc: "教师宿舍",
|
|
|
+ ms: "教师宿舍",
|
|
|
+ xh: 6,
|
|
|
+ sl: 9,
|
|
|
+ jsgs: "yfbl_jsss",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ grtj: {
|
|
|
+ grtjid: 57243,
|
|
|
+ jlztm: 1,
|
|
|
+ yjtjzbm: 0,
|
|
|
+ mc: "各类用房详细分布",
|
|
|
+ tjtlbm: 21,
|
|
|
+ grtjlbm: 0,
|
|
|
+ xh: 0,
|
|
|
+ kd: 0,
|
|
|
+ gd: 0,
|
|
|
+ tabName: "grtj",
|
|
|
+ idName: "grtjid",
|
|
|
+ fieldTypeMap: {
|
|
|
+ kd: 2,
|
|
|
+ jlztm: 2,
|
|
|
+ xh: 2,
|
|
|
+ grtjlbm: 2,
|
|
|
+ gd: 2,
|
|
|
+ grtjid: 4,
|
|
|
+ tjtlbm: 2,
|
|
|
+ mc: 1,
|
|
|
+ dxm: 1,
|
|
|
+ yyryid: 5,
|
|
|
+ grtjmbid: 5,
|
|
|
+ yjtjzbm: 4
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ 57241: {
|
|
|
+ ssCode: 0,
|
|
|
+ ssData: {
|
|
|
+ dataArray: [
|
|
|
+ {
|
|
|
+ tjzbm: 9005000101,
|
|
|
+ sjtjzbm: 90050001,
|
|
|
+ mc: "教学及辅助用房",
|
|
|
+ ms: "教学及辅助用房",
|
|
|
+ xh: 1,
|
|
|
+ sl: 49,
|
|
|
+ jsgs: "jzmjbl_jxjfzyf",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tjzbm: 9005000102,
|
|
|
+ sjtjzbm: 90050001,
|
|
|
+ mc: "行政办公用房",
|
|
|
+ ms: "行政办公用房",
|
|
|
+ xh: 2,
|
|
|
+ sl: 17,
|
|
|
+ jsgs: "jzmjbl_xzbgyf",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tjzbm: 9005000103,
|
|
|
+ sjtjzbm: 90050001,
|
|
|
+ mc: "生活用房",
|
|
|
+ ms: "生活用房",
|
|
|
+ xh: 3,
|
|
|
+ sl: 25,
|
|
|
+ jsgs: "jzmjbl_shyf",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ tjzbm: 9005000104,
|
|
|
+ sjtjzbm: 90050001,
|
|
|
+ mc: "其他用房",
|
|
|
+ ms: "其他用房",
|
|
|
+ xh: 4,
|
|
|
+ sl: 5,
|
|
|
+ jsgs: "jzmjbl_qtyf",
|
|
|
+ dxm: "cd"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ grtj: {
|
|
|
+ grtjid: 57241,
|
|
|
+ jlztm: 1,
|
|
|
+ yjtjzbm: 0,
|
|
|
+ mc: "校舍建筑面积总体分布",
|
|
|
+ tjtlbm: 21,
|
|
|
+ grtjlbm: 0,
|
|
|
+ xh: 0,
|
|
|
+ kd: 0,
|
|
|
+ gd: 0,
|
|
|
+ tabName: "grtj",
|
|
|
+ idName: "grtjid",
|
|
|
+ fieldTypeMap: {
|
|
|
+ kd: 2,
|
|
|
+ jlztm: 2,
|
|
|
+ xh: 2,
|
|
|
+ grtjlbm: 2,
|
|
|
+ gd: 2,
|
|
|
+ grtjid: 4,
|
|
|
+ tjtlbm: 2,
|
|
|
+ mc: 1,
|
|
|
+ dxm: 1,
|
|
|
+ yyryid: 5,
|
|
|
+ grtjmbid: 5,
|
|
|
+ yjtjzbm: 4
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
+ return resolve(mockMap[String(grtjid)] || null);
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: "get",
|
|
|
+ url: "/service",
|
|
|
+ data: {ssServ, ...extraParams},
|
|
|
+ dataType: "text",
|
|
|
+ })
|
|
|
+ .done((text) => {
|
|
|
+ if (typeof text !== "string") return resolve(text);
|
|
|
+ const t = text.trim();
|
|
|
+ if (!t) return resolve(null);
|
|
|
+ try {
|
|
|
+ return resolve(JSON.parse(t));
|
|
|
+ } catch (_) {
|
|
|
+ return resolve(text);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .fail((xhr, status, err) => {
|
|
|
+ console.error("callSsService failed", ssServ, status, err);
|
|
|
+ resolve(null);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 初始化:拉取查询首页数据(搜索条件/初始列表/右侧面板等)
|
|
|
+ loadPobjHome() {
|
|
|
+ const ssServ = this.ssSearchPobjHomeServName;
|
|
|
+ if (!ssServ) return Promise.resolve(null);
|
|
|
+ if (this.loadingHome) return Promise.resolve(null);
|
|
|
+ const startedAt = Date.now();
|
|
|
+ this.loadingHome = true;
|
|
|
+ this.homeReady = false;
|
|
|
+ this.userInteracted = false;
|
|
|
+ const params = this.getPobjParams();
|
|
|
+ return this.callSsService(ssServ, params)
|
|
|
+ .then((res) => {
|
|
|
+ const payload = res && typeof res === "object" ? (res.ssData || res) : null;
|
|
|
+ this.applyPobjHomeData(payload);
|
|
|
+ console.log("[pobj] home", ssServ, res);
|
|
|
+ return res;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ const delay = Math.max(0, 200 - (Date.now() - startedAt));
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loadingHome = false;
|
|
|
+ }, delay);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ applyPobjListData(ssData) {
|
|
|
+ if (!ssData || typeof ssData !== "object") return;
|
|
|
+ // thnType(若列表接口也返回,则更新;一般由首页接口返回)
|
|
|
+ if (ssData.thnType != null) this.thnType = Number(ssData.thnType || 0);
|
|
|
+ if (ssData.ssPaging) {
|
|
|
+ this.ssPaging = {
|
|
|
+ ...this.ssPaging,
|
|
|
+ ...ssData.ssPaging,
|
|
|
+ pageNo: Number(ssData.ssPaging.pageNo || 1),
|
|
|
+ rowNumPer: Number(ssData.ssPaging.rowNumPer || 12), // 功能说明:分页默认每页12条 by xu 20260116
|
|
|
+ rowNum: Number(ssData.ssPaging.rowNum || 0),
|
|
|
+ };
|
|
|
+ }
|
|
|
+ const nextList = Array.isArray(ssData.objList) ? ssData.objList.map((r) => this.normalizeObjToCard(r)) : [];
|
|
|
+ if (this.listConfig) this.listConfig.list = nextList;
|
|
|
+ this.cardGridKind = this.detectCardGridKind();
|
|
|
+ },
|
|
|
+ // 功能说明:将 <对象名>_cxycl 返回的 bookList 写回右侧预定面板 by xu 20260114
|
|
|
+ applyPobjYclData(ssData) {
|
|
|
+ // 功能说明:兼容返回结构(ssData 可能是整包 {ssCode,ssData} 或直接 ssData),避免“预定tab不回显” by xu 20260116
|
|
|
+ if (!ssData) return;
|
|
|
+ const data = (ssData && typeof ssData === "object" && ssData.ssData && typeof ssData.ssData === "object") ? ssData.ssData : ssData;
|
|
|
+ if (!data || typeof data !== "object") return;
|
|
|
+ const ensurePanel = (tabKeyLower, title) => {
|
|
|
+ // 功能说明:严格依赖首页 rbarTabNameList 决定是否允许创建面板:未返回 rbarServ 时即使 cxycl 有 servList 也不处理 by xu 20260116
|
|
|
+ if (tabKeyLower === "rbarbook" && !this.hasBookPanel) return null;
|
|
|
+ if (tabKeyLower === "rbarserv" && !this.hasServPanel) return null;
|
|
|
+ const panels = Array.isArray(this.sidebarPanels) ? this.sidebarPanels : [];
|
|
|
+ let p = panels.find((it) => String(it?._tabKey || "").toLowerCase() === tabKeyLower);
|
|
|
+ if (p) return p;
|
|
|
+ const idx = panels.findIndex((it) => it?.type === "chart");
|
|
|
+ const insertAt = idx >= 0 ? idx : panels.length;
|
|
|
+ p = {
|
|
|
+ type: "list",
|
|
|
+ _tabKey: tabKeyLower,
|
|
|
+ title,
|
|
|
+ iconClass: this.ssObjName ? ("menu-icon icon-obj-" + this.ssObjName) : "",
|
|
|
+ items: [],
|
|
|
+ itemAction: false,
|
|
|
+ };
|
|
|
+ // 功能说明:预定面板默认使用 person 布局(title+meta) by xu 20260116
|
|
|
+ if (tabKeyLower === "rbarbook") p.itemLayout = "person";
|
|
|
+ if (tabKeyLower === "rbarserv") p.itemLayout = "simple"; // 功能说明:服务面板只回显 mc(名称) by xu 20260116
|
|
|
+ panels.splice(insertAt, 0, p);
|
|
|
+ this.sidebarPanels = panels;
|
|
|
+ return p;
|
|
|
+ };
|
|
|
+
|
|
|
+ const fmtDt = (v) => { // 功能说明:JSP 页面避免使用 JS 模板字符串插值(可能被 JSP EL 干扰),统一用字符串拼接 by xu 20260114
|
|
|
+ if (v === undefined || v === null || v === "") return "";
|
|
|
+ const d = new Date(v);
|
|
|
+ if (!isNaN(d.getTime())) {
|
|
|
+ const pad2 = (n) => String(n).padStart(2, "0");
|
|
|
+ return (
|
|
|
+ String(d.getFullYear()) +
|
|
|
+ "-" +
|
|
|
+ pad2(d.getMonth() + 1) +
|
|
|
+ "-" +
|
|
|
+ pad2(d.getDate()) +
|
|
|
+ " " +
|
|
|
+ pad2(d.getHours()) +
|
|
|
+ ":" +
|
|
|
+ pad2(d.getMinutes())
|
|
|
+ );
|
|
|
+ }
|
|
|
+ return String(v);
|
|
|
+ };
|
|
|
+
|
|
|
+ const bookList = Array.isArray(data.bookList) ? data.bookList : [];
|
|
|
+ const servList = Array.isArray(data.servList) ? data.servList : []; // 功能说明:将 <对象名>_cxycl 返回的 servList 写回右侧服务面板 by xu 20260116
|
|
|
+
|
|
|
+ try {
|
|
|
+ console.log("[pobj] cxycl bookList", {len: bookList.length, bookList: bookList});
|
|
|
+ } catch (_) {
|
|
|
+ } // 功能说明:打印 cxycl 返回,排查“预定tab不回显” by xu 20260116
|
|
|
+ // 功能说明:无论 bookList 是否为空,都要写回面板(为空则清空旧数据),避免“切换对象但仍显示上一次预定人” by xu 20260114
|
|
|
+ const bookPanel = ensurePanel("rbarbook", "预定");
|
|
|
+ if (bookPanel) {
|
|
|
+ bookPanel.itemLayout = "person"; // 功能说明:预定面板复用“已选”tab 的 person 布局(title+中间 meta 槽位),不走 tags by xu 20260114
|
|
|
+ bookPanel.items = bookList.map((b) => ({
|
|
|
+ _raw: b,
|
|
|
+ id: b?.id,
|
|
|
+ title: String(b?.ydr ?? ""), // 功能说明:预定面板 title=预订人 by xu 20260114
|
|
|
+ meta: String(b?.ydrdh ?? ""), // 功能说明:预定面板中间槽位 meta=电话(同“已选”tab) by xu 20260114
|
|
|
+ tags: [], // 功能说明:预定面板不使用 tags(避免自定义标签样式) by xu 20260114
|
|
|
+ }));
|
|
|
+ bookPanel.count = bookPanel.items.length;
|
|
|
+ }
|
|
|
+ // 功能说明:服务面板按预定(book)回显逻辑写回(title+meta),为空也要清空 by xu 20260116
|
|
|
+ const servPanel = ensurePanel("rbarserv", "服务");
|
|
|
+ if (servPanel) {
|
|
|
+ servPanel.itemLayout = "simple"; // 功能说明:服务面板字段只有 id/mc,仅回显 mc(名称) by xu 20260116
|
|
|
+ servPanel.items = servList.map((s) => ({
|
|
|
+ _raw: s,
|
|
|
+ id: s?.id, // 功能说明:服务面板 id=数据库ID by xu 20260116
|
|
|
+ title: String(s?.mc ?? ""), // 功能说明:服务面板 title=mc(名称) by xu 20260116
|
|
|
+ tags: [],
|
|
|
+ }));
|
|
|
+ servPanel.count = servPanel.items.length;
|
|
|
+ }
|
|
|
+ // 功能说明:强制触发 sidebarPanels 更新,避免仅修改子对象导致视图未刷新(预定tab回显不更新) by xu 20260116
|
|
|
+ try {
|
|
|
+ this.sidebarPanels = (this.sidebarPanels || []).slice();
|
|
|
+ } catch (e) {
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ console.log("[pobj] cxycl bookPanel(after)", {
|
|
|
+ title: bookPanel.title,
|
|
|
+ tab: bookPanel._tabKey,
|
|
|
+ count: bookPanel.count,
|
|
|
+ first: bookPanel.items?.[0],
|
|
|
+ });
|
|
|
+ } catch (_) {
|
|
|
+ } // 功能说明:打印写回后的面板状态,排查“预定tab不回显” by xu 20260116
|
|
|
+ },
|
|
|
+ // 功能说明:选中对象后联动调用 <对象名>_cxycl,填充右侧预定/服务面板 by xu 20260114
|
|
|
+ loadPobjYclByItem(item) {
|
|
|
+ if (!(this.hasBookPanel || this.hasServPanel)) return Promise.resolve(null); // 功能说明:预定/服务任一存在才调用 cxycl;否则不联动 by xu 20260116
|
|
|
+ const objNum = item?.objNum || item?._raw?.ssObjId || item?._raw?.ssObjId;
|
|
|
+ if (!objNum) return Promise.resolve(null);
|
|
|
+ const ssServ = this.ssObjName ? (String(this.ssObjName) + "_cxycl") : "";
|
|
|
+ if (!ssServ) return Promise.resolve(null);
|
|
|
+ const reqId = (this.__yclReqId = (this.__yclReqId || 0) + 1);
|
|
|
+ this.yclLoading = true;
|
|
|
+ // 功能说明:cxycl 需要同时传入 ssObjIdName=<对象名>id,且把对象ID用该字段名提交(如 cdid=90052) by xu 20260114
|
|
|
+ const ssObjIdName = String(this.ssObjName || "") + "id";
|
|
|
+ const params = {ssObjName: this.ssObjName, ssObjIdName: ssObjIdName, ssObjId: objNum};
|
|
|
+ params[ssObjIdName] = objNum;
|
|
|
+ return this.callSsService(ssServ, params)
|
|
|
+ .then((res) => {
|
|
|
+ if (reqId !== this.__yclReqId) return null;
|
|
|
+ // 功能说明:兼容 $.ajax/axios 等不同返回结构,避免取错层级导致 bookList 为空 by xu 20260116
|
|
|
+ const payload = res && typeof res === "object" ? (res.ssData || res?.data?.ssData || res?.data || res) : null;
|
|
|
+ this.yclResp = payload;
|
|
|
+ this.applyPobjYclData(payload);
|
|
|
+ return res;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ if (reqId !== this.__yclReqId) return;
|
|
|
+ this.yclLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 拉取列表数据(分页/搜索等)
|
|
|
+ loadPobjList() {
|
|
|
+ const ssServ = this.ssSearchPobjListServName;
|
|
|
+ if (!ssServ) return Promise.resolve(null);
|
|
|
+ // 只有用户操作后才允许请求列表(避免初始化阶段出现第二个 loading)
|
|
|
+ if (!this.userInteracted) return Promise.resolve(null);
|
|
|
+ if (this.loadingList) return Promise.resolve(null);
|
|
|
+ const startedAt = Date.now();
|
|
|
+ this.loadingList = true;
|
|
|
+ // 点击后立即清空列表区域,避免用户误以为没点到
|
|
|
+ if (this.listConfig) {
|
|
|
+ this.listConfig.draftbox = [];
|
|
|
+ this.listConfig.list = [];
|
|
|
+ }
|
|
|
+ const params = this.getPobjParams();
|
|
|
+ return this.callSsService(ssServ, params)
|
|
|
+ .then((res) => {
|
|
|
+ const payload = res && typeof res === "object" ? (res.ssData || res) : null;
|
|
|
+ this.ssListResp = payload;
|
|
|
+ this.applyPobjListData(payload);
|
|
|
+ console.log("[pobj] list", ssServ, res);
|
|
|
+ return res;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ const delay = Math.max(0, 200 - (Date.now() - startedAt));
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loadingList = false;
|
|
|
+ }, delay);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 初始化右侧边栏分区(已选 items 指向 selectedItems) by xu 20260113
|
|
|
+ initSidebarPanels() {
|
|
|
+ const bizIcon = this.ssObjName ? ('menu-icon icon-obj-' + this.ssObjName) : '';
|
|
|
+ // 初始只放“已选”,其他分区由首页接口(rbarTabNameList)初始化
|
|
|
+ this.sidebarPanels = [];
|
|
|
+ this.sidebarButtons = [];
|
|
|
+ },
|
|
|
+ // 更新已选分区计数 by xu 20260113
|
|
|
+ updatePickedPanelCount() {
|
|
|
+ const pickedPanel = this.sidebarPanels?.find?.((p) => p?.title === '已选');
|
|
|
+ if (pickedPanel) pickedPanel.count = this.selectedItems.length;
|
|
|
+ },
|
|
|
+ // 清空已选(右侧 header 清空按钮) by xu 20260113
|
|
|
+ clearSelectedItems() {
|
|
|
+ this.selectedItems.forEach((it) => {
|
|
|
+ if (it) it._ssSelected = false;
|
|
|
+ });
|
|
|
+ this.selectedItems.splice(0, this.selectedItems.length);
|
|
|
+ this.updatePickedPanelCount();
|
|
|
+ },
|
|
|
+ // 右侧边栏移除 -> 反向同步左侧卡片状态 by xu 20260113
|
|
|
+ handleSidebarRemove(item) {
|
|
|
+ if (!item) return;
|
|
|
+ item._ssSelected = false;
|
|
|
+ const idx = this.selectedItems.indexOf(item);
|
|
|
+ if (idx > -1) this.selectedItems.splice(idx, 1);
|
|
|
+ this.updatePickedPanelCount();
|
|
|
+ },
|
|
|
+ // 功能:探测当前业务列表卡片类型,用于网格列最小宽度 by xu 20260109
|
|
|
+ detectCardGridKind() {
|
|
|
+ const all = [].concat(this.listConfig?.draftbox || []).concat(this.listConfig?.list || []);
|
|
|
+ if (all.some(it => String(it?.thumbType || '').trim() === 'thumbnail')) return 'thumbnail';
|
|
|
+ if (all.some(it => !!it?.thumb || !!it?.thumbType)) return 'photo';
|
|
|
+ return 'none';
|
|
|
+ },
|
|
|
+ // 左侧卡片角标选中(多选)+ 卡片主体单选互斥(exclusive) by xu 20260109
|
|
|
+ handleToggleSelect({item, selected, exclusive}) {
|
|
|
+ if (!item) return;
|
|
|
+ // 已选分区:中间槽位 meta(可按业务改为后端字段) by xu 20260113
|
|
|
+ if (!item.meta) item.meta = String(item.objNum || '');
|
|
|
+ const idx = this.selectedItems.indexOf(item);
|
|
|
+ if (exclusive && selected && this.cardClickAction === 'single') {
|
|
|
+ this.selectedItems.forEach((it) => {
|
|
|
+ if (it && it !== item) it._ssSelected = false;
|
|
|
+ });
|
|
|
+ // 不要重新赋值数组,保留引用(供右侧面板使用) by xu 20260109
|
|
|
+ this.selectedItems.splice(0, this.selectedItems.length);
|
|
|
+ this.selectedItems.push(item);
|
|
|
+ this.updatePickedPanelCount();
|
|
|
+ // 功能说明:预定模式下,单选互斥选中后联动加载右侧预定/服务数据 by xu 20260114
|
|
|
+ this.loadPobjYclByItem(item);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (selected) {
|
|
|
+ if (idx === -1) this.selectedItems.push(item);
|
|
|
+ // 功能说明:预定模式下,多选角标选中也可触发联动(以最近选中项为准) by xu 20260114
|
|
|
+ this.loadPobjYclByItem(item);
|
|
|
+ } else {
|
|
|
+ if (idx > -1) this.selectedItems.splice(idx, 1);
|
|
|
+ }
|
|
|
+ this.updatePickedPanelCount();
|
|
|
+ },
|
|
|
+ handlePageChange({pageNo, rowNumPer, rowNum}) {
|
|
|
+ // 翻页:调用列表接口刷新(不刷新右侧栏)
|
|
|
+ if (this.loadingList) return;
|
|
|
+ this.ssPaging.pageNo = pageNo;
|
|
|
+ this.ssPaging.rowNumPer = rowNumPer;
|
|
|
+ this.ssPaging.rowNum = rowNum;
|
|
|
+ this.userInteracted = true;
|
|
|
+ this.loadPobjList();
|
|
|
+ },
|
|
|
+ search() {
|
|
|
+ // 搜索:回到第一页,调用列表接口刷新(不刷新右侧栏)
|
|
|
+ if (this.loadingList) return;
|
|
|
+ this.ssPaging.pageNo = 1;
|
|
|
+ this.userInteracted = true;
|
|
|
+ this.loadPobjList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // 供 scope 回调引用(ss-search-button 的 opt.callback 里需要找到 vm)
|
|
|
+ window.__objListVm = this;
|
|
|
+ // 初始化:把 URL/form 上已有的参数合并到 form/ssPaging(支持回显 + ajax)
|
|
|
+ const curParams = this.getSearchFormParams();
|
|
|
+ this.form = {...this.form, ...curParams};
|
|
|
+ if (curParams.pageNo) this.ssPaging.pageNo = Number(curParams.pageNo) || 1;
|
|
|
+ if (curParams.rowNumPer) this.ssPaging.rowNumPer = Number(curParams.rowNumPer) || 12; // 功能说明:默认每页12条(兼容未传rowNumPer) by xu 20260116
|
|
|
+ this.searchButtonConfigCheckId = String(this.form?.management || "99");
|
|
|
+ // 初始化卡片网格类型(用于自动分列/宽度平分) by xu 20260109
|
|
|
+ this.cardGridKind = this.detectCardGridKind();
|
|
|
+ // 初始化右侧边栏分区 by xu 20260113
|
|
|
+ this.initSidebarPanels();
|
|
|
+ this.userInteracted = false;
|
|
|
+ // 先跑通首页接口:用于初始化顶部搜索条件、初始列表、右侧栏
|
|
|
+ this.loadPobjHome();
|
|
|
+ }
|
|
|
});
|
|
|
- });
|
|
|
-
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
- <%-- 原有的清令牌 --%>
|
|
|
- tokenCleanser("<ss:serv name='ss.clearPageToken'/>", {tokenList:"<%= pageContext.getAttribute(ss.page.PageC.PAGE_tokenList)%>"});
|
|
|
+ <%-- 原有的清令牌 --%>
|
|
|
+ tokenCleanser("<ss:serv name='ss.clearPageToken'/>", {tokenList: "<%= pageContext.getAttribute(ss.page.PageC.PAGE_tokenList)%>"});
|
|
|
</script>
|