diff --git a/js/accessory/child/accessory_return_form.js b/js/accessory/child/accessory_return_form.js index 7c8b704..47fbd01 100644 --- a/js/accessory/child/accessory_return_form.js +++ b/js/accessory/child/accessory_return_form.js @@ -355,7 +355,7 @@ function selectAll(selectStatus) {//传入参数(全选框的选中状态) n.checked = true; }); $.each(jjDataArr, function (index, item) { - delIdArr.push(item.id); + delIdArr.push(item.partId); }) } else { $("input[name='check']").each(function (i, n) { diff --git a/js/basic/fit_type_list.js b/js/basic/fit_type_list.js index f5a22cb..467ae3d 100644 --- a/js/basic/fit_type_list.js +++ b/js/basic/fit_type_list.js @@ -18,7 +18,7 @@ layui.config({ dtreeData = getDTreeData(); fitTypeTree = dtree.render({ elem: "#fitTypeTree", - width: "30%", // 指定树的宽度 + width: "50%", // 指定树的宽度 dataFormat: "list", none: "无数据", menubar: true, @@ -77,7 +77,7 @@ function addOrEditFitType(type, node, $div) { title = '修改'; } console.log(node); - openIframeByDtree("fit_type_form", title, './child/fit_type_form.html', '40%', '50%', node, $div); + openIframeByDtree("fit_type_form", title, './child/fit_type_form.html', '50%', '50%', node, $div); } // 赋值新增节点 diff --git a/js/public.js b/js/public.js index aec6516..3a69f21 100644 --- a/js/public.js +++ b/js/public.js @@ -181,64 +181,77 @@ function getUrlParam(key) { // 预览文件 function commonViewFile(params) { - let path = fileUrl + params + '?auth=' + sessionStorage.getItem("gz-token"); - // path = fileUrl + params - console.log(path); + let path = fileUrl + params + '?auth=' + sessionStorage.getItem("gz-token"); + // path = fileUrl + params + console.log(path); let encodePath = encodeURIComponent(useBase64.encode64(path)); window.open(viewFileUrl + encodePath + '&token=' + generateToken()); } let _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; const useBase64 = { - encode64:(e) => { - let t = ""; - let f = 0; - e = useBase64.encodeUTF8(e); - while (f < e.length) { - const n = e.charCodeAt(f++); - const r = e.charCodeAt(f++); - const i = e.charCodeAt(f++); - let s = n >> 2; - let o = (n & 3) << 4 | r >> 4; - let u = (r & 15) << 2 | i >> 6; - let a = i & 63; - if (isNaN(r)) { - u = a = 64; - } else if (isNaN(i)) { - a = 64; - } - t += _keyStr[s] + _keyStr[o] + _keyStr[u] + _keyStr[a]; - } - return t; - }, - decode64: (e) => { - let t = ""; - let f = 0; - e = e.replace(/[^A-Za-z0-9+/=]/g, ""); - while (f < e.length) { - const s = _keyStr.indexOf(e.charAt(f++)); - const o = _keyStr.indexOf(e.charAt(f++)); - const u = _keyStr.indexOf(e.charAt(f++)); - const a = _keyStr.indexOf(e.charAt(f++)); - let n = s << 2 | o >> 4; - let r = (o & 15) << 4 | u >> 2; - let i = (u & 3) << 6 | a; - t += String.fromCharCode(n); - if (u !== 64) { - t += String.fromCharCode(r); - } - if (a !== 64) { - t += String.fromCharCode(i); - } - } - return useBase64.decodeUTF8(t); - }, + encode64: (e) => { + let t = ""; + let f = 0; + e = useBase64.encodeUTF8(e); + while (f < e.length) { + const n = e.charCodeAt(f++); + const r = e.charCodeAt(f++); + const i = e.charCodeAt(f++); + let s = n >> 2; + let o = (n & 3) << 4 | r >> 4; + let u = (r & 15) << 2 | i >> 6; + let a = i & 63; + if (isNaN(r)) { + u = a = 64; + } else if (isNaN(i)) { + a = 64; + } + t += _keyStr[s] + _keyStr[o] + _keyStr[u] + _keyStr[a]; + } + return t; + }, + decode64: (e) => { + let t = ""; + let f = 0; + e = e.replace(/[^A-Za-z0-9+/=]/g, ""); + while (f < e.length) { + const s = _keyStr.indexOf(e.charAt(f++)); + const o = _keyStr.indexOf(e.charAt(f++)); + const u = _keyStr.indexOf(e.charAt(f++)); + const a = _keyStr.indexOf(e.charAt(f++)); + let n = s << 2 | o >> 4; + let r = (o & 15) << 4 | u >> 2; + let i = (u & 3) << 6 | a; + t += String.fromCharCode(n); + if (u !== 64) { + t += String.fromCharCode(r); + } + if (a !== 64) { + t += String.fromCharCode(i); + } + } + return useBase64.decodeUTF8(t); + }, + + encodeUTF8: (input) => { + return unescape(encodeURIComponent(input)); + }, + + decodeUTF8: (input) => { + return decodeURIComponent(escape(input)); + }, +} + +/* 校验查询关键字是否包含特殊字符 */ +function checkValue(value) { + if (value) { + let pattern = new RegExp("[%<>]"); + if (pattern.test(value)) { + return true; + } + } + return false; +} - encodeUTF8: (input) => { - return unescape(encodeURIComponent(input)); - }, - decodeUTF8: (input) => { - return decodeURIComponent(escape(input)); - }, -} \ No newline at end of file diff --git a/page/accessory/child/accessory_return_form.html b/page/accessory/child/accessory_return_form.html index 55f890b..2c02f16 100644 --- a/page/accessory/child/accessory_return_form.html +++ b/page/accessory/child/accessory_return_form.html @@ -4,7 +4,7 @@
-