{"id":5993,"date":"2026-05-16T16:13:13","date_gmt":"2026-05-16T08:13:13","guid":{"rendered":"https:\/\/www.newtune.org\/?page_id=5993"},"modified":"2026-05-16T16:13:13","modified_gmt":"2026-05-16T08:13:13","slug":"%e6%bc%94%e8%97%9d%e6%b4%bb%e5%8b%95%e8%b3%87%e6%96%99%e5%ba%ab","status":"publish","type":"page","link":"https:\/\/www.newtune.org\/?page_id=5993","title":{"rendered":"\u6f14\u85dd\u6d3b\u52d5\u8cc7\u6599\u5eab"},"content":{"rendered":"<div id=\"pl-5993\"  class=\"panel-layout\" ><div id=\"pg-5993-0\"  class=\"panel-grid panel-no-style\" ><div id=\"pgc-5993-0-0\"  class=\"panel-grid-cell\" ><div id=\"panel-5993-0-0-0\" class=\"so-panel widget widget_text panel-first-child panel-last-child\" data-index=\"0\" >\t\t\t<div class=\"textwidget\"><style>\n\t.panel-row {\n\t\tborder-radius: 10px;\n\t\tbackground-color: #CCC;\n\t\tpadding: 10px 5px;\n\t\tmargin-bottom: 15px;\n\t}\n\t.data-row {\n\t\tborder: 1px solid #aaa;\n\t\tborder-radius: 10px;\n\t\tmargin: 5px 0px;\n\t}\n\t.data-row > div {\n\t\tpadding: 5px;\n\t}\n\t.data-row .data-row-title{\n\t\tfont-size: 1.25em;\n\t\tcolor: #880000;\n\t\tborder-radius:5px;\n\t}\n\t.data-row .data-row-date{\n\t\tfont-size: 1em;\n\t}\n\t.data-row .data-row-null{\n\t\tpadding: 20px 0px;\n\t\ttext-align: center;\n\t\tcolor: #aaa;\n\t\tfont-size: 1.5em;\n\t}\n\t.poster-img {\n\t\tborder-radius:10px;\n\t}\n<\/style>\n<div class=\"row panel-row\">\n<div class=\"col-xs-12 col-sm-3\" style=\"padding:2px 5px\">\u5e74\u4efd <select id='selYear' onchange='updateSe()'><\/select><\/div>\n<div class=\"col-xs-12 col-sm-5\" style=\"padding:2px 5px\">\u985e\u5225 <select id='selType' onchange='updateSe()'><\/select><\/div>\n<div class=\"col-xs-12 col-sm-4\"><\/div>\n<\/div>\n<div class=\"\" id=\"searchResultDiv\"><\/div>\n<p><script>\nvar se = null;\nvar searchResult = null;\nvar renderType = 1;\nfunction createDiv(classStr, value){\n\tconst newDiv = document.createElement(\"div\");\n\tnewDiv.className = classStr;\n\tnewDiv.innerHTML = value;\n\treturn newDiv;\n}\nfunction createImgDiv(divClassStr, imgClassStr, src, alt){\n\tconst newDiv = createDiv(divClassStr, '');\n\tconst newImg = document.createElement(\"img\");\n\tnewImg.className = imgClassStr;\n\tnewImg.src=src;\n\tnewImg.alt=alt;\n\tnewDiv.appendChild(newImg);\n\treturn newDiv;\n}\nfunction updateSe(){\n\tdoQuery(document.getElementById('selYear').value, document.getElementById('selType').value);\n}\nfunction renderView1(data){\n\tse.textContent = '';\n\tdata.forEach(item => {\n\t\tconst row = createDiv(\"row data-row\",'');\n\t\trow.appendChild(createImgDiv(\"col-xs-4 col-sm-3 col-md-2\",\"img-responsive poster-img\",item.PERF_POSTERFNAME,\"poster\"));\n\t\tconst col = createDiv(\"col-xs-8 col-sm-9 col-md-10 row\", '');\n\t\tcol.appendChild(createDiv(\"data-row-title\", item.PERF_TITLE));\n\t\tcol.appendChild(createDiv(\"data-row-date\", \"\u65e5\u671f\uff1a\"+item.PERF_DATE));\n\t\tcol.appendChild(createDiv(\"data-row-address\", \"\u5730\u9ede\uff1a\"+item.PERF_ADDRESS));\n\t\tcol.appendChild(createDiv(\"data-row-organizer\", \"\u4e3b\u8fa6\uff1a\"+item.PERF_ORGANIZER));\n\/\/\t\tcol.appendChild(createDiv(\"data-row-desc\", item.PERF_DESCRIPTION));\n\t\trow.appendChild(col);\n\t\tse.appendChild(row);\n\t});\n}\nfunction renderNull(){\n\tse.textContent = '';\n\tconst row = createDiv(\"row data-row\",'');\n\trow.appendChild(createDiv(\"data-row-null\", \"\u6c92\u6709\u6240\u9078\u8cc7\u6599\"));\n\tse.appendChild(row);\t\n}\nfunction renderView(){\n\/\/\"PERF_ID\",\"PERF_TITLE\",\"PERF_DATETIME\",\"PERF_ADDRESS\",\"PERF_X\",\"PERF_Y\",\"PERF_ORGANIZER\",\"PERF_CONDUCTOR\",\"PERF_PREFACE\",\"PERF_PROGRAM\",\"PERF_PROGRAM_LIST\",\n\/\/\"PERF_ARTIST\"\n\/\/\"PERF_ARTIST_LIST\",\"PERF_PEOPLE\",\"PERF_SONGDESCRIPTION\",\"PERF_ARTISTDESCRIPTION\",\"PERF_DESCRIPTION\",\n\/\/\"PERF_REPORT\",\"PERF_SPECIAL\",\"PERF_REMARK\",\"PERF_POSTERFNAME\"\n\tif(searchResult.length==0) renderNull();\n\telse {\n\t\tswitch(renderType) {\n\t\t\tcase 1:\n\t\t\tdefault:\n\t\t\t\trenderView1(searchResult);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\nasync function doQuery(year,type) {\n\tfetch('https:\/\/www.newtune.org\/app\/api\/eventapi.php', \n\t\t  {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {'Content-Type': 'application\/x-www-form-urlencoded',},\n\t\t\tbody: new URLSearchParams({f:'get',y:year,t:type}),\n\t})\n\t.then(response => {\n    \tif (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); }\n    \t\/\/ Return the promise from response.json()\n    \treturn response.json();\n  \t})\n\t.then(data => {\n\t\tsearchResult = data;\n\t\trenderView();\n\t})\n\t.catch(error => console.error('Error:', error));\n}\nasync function initYear() {\n\tfetch('https:\/\/www.newtune.org\/app\/api\/eventapi.php', \n\t\t  {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {'Content-Type': 'application\/x-www-form-urlencoded',},\n\t\t\tbody: new URLSearchParams({f: 'list-1'}),\n\t})\n\t.then(response => {\n    \tif (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); }\n    \t\/\/ Return the promise from response.json()\n    \treturn response.json();\n  \t})\n\t.then(data => {\n\t\tconst selectElement = document.getElementById('selYear');\n\t\tconst fragment = document.createDocumentFragment();\n\t\t  \tconst o1 = document.createElement('option');\n  \t\t\to1.value = '';\n  \t\t\to1.textContent = '\u6700\u8fd1\u4e94\u5e74';\n  \t\t\tfragment.appendChild(o1);\n  \t\t\tconst o2 = document.createElement('option');\n  \t\t\to2.value = '_ALL_';\n  \t\t\to2.textContent = '\u6240\u6709\u5e74\u4efd';\n  \t\t\tfragment.appendChild(o2);\n\t\tdata.forEach(item => {\n  \t\t\tconst option = document.createElement('option');\n  \t\t\toption.value = item.K;\n  \t\t\toption.textContent = item.V;\n  \t\t\tfragment.appendChild(option);\n\t\t});\n\t\t\/\/ Single DOM update for better performance\n\t\tselectElement.appendChild(fragment);\n\t})\n\t.catch(error => console.error('Error:', error));\n}\nasync function initType() {\n\tfetch('https:\/\/www.newtune.org\/app\/api\/eventapi.php', \n\t\t  {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {'Content-Type': 'application\/x-www-form-urlencoded',},\n\t\t\tbody: new URLSearchParams({f: 'list-2'}),\n\t})\n\t.then(response => {\n    \tif (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); }\n    \t\/\/ Return the promise from response.json()\n    \treturn response.json();\n  \t})\n\t.then(data => {\n\t\tconst selectElement = document.getElementById('selType');\n\t\tconst fragment = document.createDocumentFragment();\n\t\tdata.forEach(item => {\n  \t\t\tconst option = document.createElement('option');\n  \t\t\toption.value = item.ITEMS;\n  \t\t\toption.textContent = item.ITEMS;\n  \t\t\tfragment.appendChild(option);\n\t\t});\n\t\t\tconst o2 = document.createElement('option');\n  \t\t\to2.value = '_ALL_';\n  \t\t\to2.textContent = '\u6240\u6709\u985e\u5225';\n  \t\t\tfragment.appendChild(o2);\n\t\t\/\/ Single DOM update for better performance\n\t\tselectElement.appendChild(fragment);\n\t})\n\t.catch(error => console.error('Error:', error));\n}\nasync function initResult(){\n\tdoQuery(\"\",\"\");\n}\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n\tse = document.getElementById('searchResultDiv');\n    initYear();\n\tinitType();\n\tinitResult();\n});\n<\/script><\/p>\n\n<\/div>\n\t\t<\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>\u5e74\u4efd \u985e\u5225<\/p>\n","protected":false},"author":22,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5993","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.newtune.org\/index.php?rest_route=\/wp\/v2\/pages\/5993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newtune.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.newtune.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.newtune.org\/index.php?rest_route=\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newtune.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5993"}],"version-history":[{"count":6,"href":"https:\/\/www.newtune.org\/index.php?rest_route=\/wp\/v2\/pages\/5993\/revisions"}],"predecessor-version":[{"id":6040,"href":"https:\/\/www.newtune.org\/index.php?rest_route=\/wp\/v2\/pages\/5993\/revisions\/6040"}],"wp:attachment":[{"href":"https:\/\/www.newtune.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}