Procházet zdrojové kódy

更新图标 人员录入表格 级联勾选校验问题

apple před 4 hodinami
rodič
revize
6795a64bce

binární
image/logo/largeLogo.png


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 403 - 331
js/vue/ss-components.js


+ 3 - 4
page/biz/ry_inp.ss.jsp

@@ -5,8 +5,8 @@
 --%>
 	<table class="form">
 		<tr>
-			<th rowspan="4" style="width:150px;">相片</th>
-			<td rowspan="4" style="width:260px;">
+			<th rowspan="2" style="width:150px;">相片</th>
+			<td rowspan="2">
 				<input name="zjzwj" class="id-photo"/>
 				<input name="yszwj" style="margin-top:42px; margin-left:13px;" class="life-photo"/>
 			</td>
@@ -20,8 +20,7 @@
 		<tr>
 			<th>身份证件类别</th>
 			<td><input name="sfzjlbm" width="170px" value="${empty sfzjlbm? 1 : sfzjlbm}"/></td>
-		</tr>
-		<tr>
+		
 			<th>证件号</th>
 			<td><input name="sfzh" width="167px"/></td>
 		</tr>

+ 0 - 1
page/env/objInp.jsp

@@ -70,7 +70,6 @@
 <%--		</ss:equal>--%>
 		<ss:equal val='${empty saveAndCommitDest}' val2='false'>
 			<ss-bottom-button
-					style="display:none"
 					id="saveAndCommit"
 					text="${saveAndCommitButtonValue}"
 					onclick='ss.form.submit({url:"<ss:serv name='${saveAndCommit}' dest='${saveAndCommitDest}' parm='${saveAndCommitParam}'/>",width:${saveAndCommitwidth},height:${saveAndCommitheight},minHeight:${saveAndCommitminheight},maxHeight:${saveAndCommitmaxheight},targetWin:null});'<%-- 最后一个参数原来为targetWin:parent导致刷新了顶层窗口,改为null Ben(20251215) --%>

+ 45 - 30
page/env/objList.jsp

@@ -1554,7 +1554,7 @@
                     this.searchButtonConfigCheckId = String(management);
                     this.ssPaging.pageNo = 1;
                     this.userInteracted = true;
-                    this.loadPobjList();
+                    this.loadPobjList({ source: "scope" });
                 },
                 // 提取当前表单参数(用于 ajax 调用 /service?ssServ=...)
                 getSearchFormParams() {
@@ -1662,9 +1662,11 @@
 	                    const nextList = Array.isArray(ssData.objList) ? ssData.objList.map((r) => this.normalizeObjToCard(r)) : [];
 	                    if (this.listConfig) this.listConfig.list = nextList;
 	                    this.cardGridKind = this.detectCardGridKind();
-	                    // 功能说明:列表渲染数据更新后,按当前容器尺寸更新 autoRowNumPer(不立即重拉;下次列表请求时生效) by xu 20260123
-	                    if (this.$nextTick) this.$nextTick(() => this.scheduleAutoRowNumPer("list"));
-	                    else this.scheduleAutoRowNumPer("list");
+	                    // 功能说明:列表接口返回后不再每次重算 autoRowNumPer,避免翻页过程中 rowNumPer 在 15/16 间抖动;仅在 autoRowNumPer 尚未得到时兜底计算一次 by xu 20260303
+                    if (!Number(this.autoRowNumPer || 0)) {
+                        if (this.$nextTick) this.$nextTick(() => this.scheduleAutoRowNumPer("list-init"));
+                        else this.scheduleAutoRowNumPer("list-init");
+                    }
 	                },
                 // 功能说明:将 <对象名>_cxycl 返回的 bookList 写回右侧预订面板 by xu 20260114
                 applyPobjYclData(ssData) {
@@ -1797,32 +1799,45 @@
                         });
                 },
 	                // 拉取列表数据(分页/搜索等)
-	                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);
-	                    // 功能说明:rowNumPer 按 autoRowNumPer 生效(resize 只记录,不立即请求;下次接口请求时才更新) by xu 20260123
-	                    try {
-	                        const next = Number(this.autoRowNumPer || 0);
-	                        const cur = Number(this.ssPaging?.rowNumPer || 0);
-	                        if (next > 0 && next !== cur) {
-	                            try { console.log("[objList][自适应分页] 列表请求前应用 rowNumPer", { cur, next, pageNo: this.ssPaging?.pageNo }); } catch (_) {}
-	                            this.ssPaging.rowNumPer = next;
-	                            // 功能说明:页大小变化时回到第一页,避免页码与数据范围不一致 by xu 20260123
-	                            this.ssPaging.pageNo = 1;
-	                        }
-	                    } catch (_) {
-	                    }
-	                    const startedAt = Date.now();
-	                    this.loadingList = true;
-	                    // 点击后立即清空列表区域,避免用户误以为没点到
-	                    if (this.listConfig) {
-	                        this.listConfig.draftbox = [];
+                loadPobjList(options = {}) {
+                    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 opts = (options && typeof options === "object") ? options : {};
+                    const source = String(opts.source || "general");
+                    const lockRowNumPer = !!opts.lockRowNumPer;
+                    this.__lastListLoadSource = source;
+
+                    // 功能说明:rowNumPer 按 autoRowNumPer 生效(resize 只记录,不立即请求;下次接口请求时才更新) by xu 20260123
+                    // 功能说明:翻页/刷新请求锁定当前 rowNumPer,避免在翻页链路中被 autoRowNumPer 覆盖导致 pageNo 重置 by xu 20260303
+                    if (!lockRowNumPer) {
+                        try {
+                            const next = Number(this.autoRowNumPer || 0);
+                            const cur = Number(this.ssPaging?.rowNumPer || 0);
+                            if (next > 0 && next !== cur) {
+                                try { console.log("[objList][自适应分页] 列表请求前应用 rowNumPer", { source, cur, next, pageNo: this.ssPaging?.pageNo }); } catch (_) {}
+                                this.ssPaging.rowNumPer = next;
+                                // 功能说明:仅在非翻页来源下,页大小变化时回到第一页;翻页来源必须保持当前页码 by xu 20260303
+                                if (source !== "page") {
+                                    this.ssPaging.pageNo = 1;
+                                }
+                            }
+                        } catch (_) {
+                        }
+                    }
+
+                    const startedAt = Date.now();
+                    this.loadingList = true;
+                    // 点击后立即清空列表区域,避免用户误以为没点到
+                    if (this.listConfig) {
+                        this.listConfig.draftbox = [];
                         this.listConfig.list = [];
                     }
                     const params = this.getPobjParams();
+                    try { console.log("[objList][分页请求]", { source, lockRowNumPer, pageNo: params?.pageNo, rowNumPer: params?.rowNumPer, rowNum: params?.rowNum }); } catch (_) {}
                     return this.callSsService(ssServ, params)
                         .then((res) => {
                             const payload = res && typeof res === "object" ? (res.ssData || res) : null;
@@ -2098,14 +2113,14 @@
                     this.ssPaging.rowNumPer = rowNumPer;
                     this.ssPaging.rowNum = rowNum;
                     this.userInteracted = true;
-                    this.loadPobjList();
+                    this.loadPobjList({ source: "page", lockRowNumPer: true });
                 },
                 search() {
                     // 搜索:回到第一页,调用列表接口刷新(不刷新右侧栏)
                     if (this.loadingList) return;
                     this.ssPaging.pageNo = 1;
                     this.userInteracted = true;
-                    this.loadPobjList();
+                    this.loadPobjList({ source: "search" });
                 }
             },
 		                mounted() {
@@ -2119,7 +2134,7 @@
 		                                if (vm.loadingList) return;
 		                                // 保持当前筛选/页码,仅刷新列表数据
 		                                vm.userInteracted = true;
-		                                vm.loadPobjList();
+                                vm.loadPobjList({ source: "refresh", lockRowNumPer: true });
 		                            } catch (e) {
 		                                console.error("[objList] wdRefresh failed", e);
 		                            }

+ 126 - 0
page/env/onoffBtnDemo.jsp

@@ -0,0 +1,126 @@
+<%@ page language="java" pageEncoding="UTF-8" isELIgnored="false" %>
+<%@ taglib uri="/ssTag" prefix="ss"%>
+<!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 type="text/javascript" src="/ss/jquery/jquery.js"></script>
+    <script src="/js/load.js"></script>
+    <script type="text/javascript" src="/js/display.js"></script>
+    <script type="text/javascript" src="/js/form.js"></script>
+    <script>
+        window.ss = window.ss || {};
+        window.ss.dom = window.ss.dom || {};
+        window.ss.dom.formElemConfig = window.ss.dom.formElemConfig || {};
+    </script>
+    <style>
+        body {
+            margin: 0;
+            padding: 24px;
+            background: #f7f8fa;
+            box-sizing: border-box;
+        }
+        .demo-card {
+            background: #fff;
+            border: 1px solid #e5e6eb;
+            border-radius: 8px;
+            padding: 24px;
+        }
+        .demo-title {
+            font-size: 18px;
+            font-weight: 600;
+            margin-bottom: 8px;
+        }
+        .demo-desc {
+            color: #666;
+            margin-bottom: 20px;
+        }
+        .demo-row {
+            display: flex;
+            align-items: flex-start;
+            margin-bottom: 16px;
+        }
+        .demo-label {
+            width: 120px;
+            line-height: 32px;
+            color: #333;
+            flex-shrink: 0;
+        }
+        .demo-value {
+            line-height: 32px;
+            color: #1677ff;
+            font-weight: 600;
+        }
+        .demo-onoff-group {
+            display: flex;
+            flex-wrap: wrap;
+            gap: 12px;
+        }
+        .demo-actions {
+            margin-top: 24px;
+        }
+        .demo-submit {
+            min-width: 96px;
+            height: 34px;
+            border: none;
+            border-radius: 4px;
+            background: #1677ff;
+            color: #fff;
+            cursor: pointer;
+        }
+    </style>
+</head>
+<body>
+<form id="app" method="post">
+    <div class="demo-card">
+        <div class="demo-title">SsOnoff 单选按钮 Demo</div>
+        <div class="demo-desc">
+            后端需提供:onoffBtnList(code、desc)以及 grczlbm(当前选中值)
+        </div>
+
+        <div class="demo-row">
+            <div class="demo-label">当前值</div>
+            <div class="demo-value">{{ grczlbm || '未选择' }}</div>
+        </div>
+
+        <div class="demo-row">
+            <div class="demo-label">操作类别</div>
+            <div class="demo-onoff-group">
+                <ss-onoff
+                    v-for="item in onoffBtnList"
+                    :key="item.code"
+                    name="grczlbm"
+                    v-model="grczlbm"
+                    :label="item.desc"
+                    :value="item.code"
+                    width="120px"
+                    :null="false"
+                ></ss-onoff>
+            </div>
+        </div>
+
+        <div class="demo-actions">
+            <button class="demo-submit" type="submit">提交</button>
+        </div>
+    </div>
+</form>
+</body>
+</html>
+
+<script type="module">
+    const data = {
+        grczlbm: "${grczlbm}",
+        onoffBtnList: "${onoffBtnList}" : []
+    };
+
+    SS.ready(function () {
+        window.SS.dom.initializeFormApp({
+            el: "#app",
+            data() {
+                return data;
+            }
+        });
+    });
+</script>

+ 50 - 3
skin/easy/css/icon-biz/iconfont.css

@@ -4,7 +4,6 @@
        url('../../fonts/icon-biz/iconfont.woff') format('woff'),
        url('../../fonts/icon-biz/iconfont.ttf') format('truetype');
 }
-
 .icon-biz {
   font-family: "icon-biz" !important;
   font-size: 16px;
@@ -13,6 +12,54 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-obj-dy:before {
+  content: "\e685";
+}
+
+.icon-obj-ly:before {
+  content: "\e684";
+}
+
+.icon-obj-bj:before {
+  content: "\e683";
+}
+
+.icon-obj-gwSjxc:before {
+  content: "\e682";
+}
+
+.icon-obj-gwFwc:before {
+  content: "\e681";
+}
+
+.icon-obj-xyGrxf:before {
+  content: "\e680";
+}
+
+.icon-obj-xfjGrxf:before {
+  content: "\e67f";
+}
+
+.icon-biz-cw:before {
+  content: "\e67e";
+}
+
+.icon-cw-cu:before {
+  content: "\e67d";
+}
+
+.icon-obj-grfwbmx:before {
+  content: "\e678";
+}
+
+.icon-obj-dr:before {
+  content: "\e677";
+}
+
+.icon-obj-grfwb:before {
+  content: "\e674";
+}
+
 .icon-obj-xczd:before {
   content: "\e672";
 }
@@ -41,7 +88,7 @@
   content: "\e66f";
 }
 
-.icon-obj-jtcy:before {
+.icon-obj-xyJtcy:before {
   content: "\e66c";
 }
 
@@ -153,7 +200,7 @@
   content: "\e637";
 }
 
-.icon-obj-mjdJcjl:before {
+.icon-obj-jcjl:before {
   content: "\e636";
 }
 

binární
skin/easy/fonts/icon-biz/iconfont.ttf


binární
skin/easy/fonts/icon-biz/iconfont.woff


binární
skin/easy/fonts/icon-biz/iconfont.woff2


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů