| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715 |
- /* 自动生成的文本数据头文件 */
- /* 源文件: index.html */
- /* 文件大小: 68563 字节 */
- /* 生成时间: 2025-11-21 06:01:53 */
- /* 编码: utf-8 */
- #ifndef P_INDEX_HTML_H
- #define P_INDEX_HTML_H
- #include <stddef.h>
- // 文本数据(UTF-8编码)
- const char *p_index_html =
- "<!DOCTYPE html>\n"
- "<html>\n"
- "<head>\n"
- " <meta charset=\"UTF-8\">\n"
- " <!--<meta http-equiv=\"refresh\" content=\"0; url=/src/index2.html\">-->\n"
- " <!-- 0表示立即跳转 -->\n"
- " <script src=\"api/petite-vue.min.js\" defer></script>\n"
- " <!--<script src=\"./api/axios.min.js\"></script>-->\n"
- " <script src=\"api/data.js\"></script>\n"
- " <script src=\"api/ws.js\"></script>\n"
- " <script src=\"api/display_data.js\"></script>\n"
- " <script src=\"api/operation.js\"></script>\n"
- " <script src=\"api/channel_display.js\"></script>\n"
- " <!--<script src=\"./api/pagination.js\"></script>-->\n"
- " <!--<script src=\"./api/Threshold_Adjust.js\"></script>-->\n"
- " <!--<script src=\"./api/system_alarm.js\"></script>-->\n"
- " <script src=\"api/sys_paras.js\"></script>\n"
- " <!-- CSS 文件 -->\n"
- " <link rel=\"stylesheet\" href=\"css/index.css\">\n"
-
-
-
-
- "</head>\n"
- "<body>\n"
- "<div class=\"tab-container\">\n"
- " <div class=\"tab-header\">\n"
- " <button class=\"tab-btn active\" style=\"margin-left: 30%;\" data-tab=\"tab1\">状态监控</button>\n"
- " <button class=\"tab-btn\" data-tab=\"tab2\">⽹络配置</button>\n"
- " <button class=\"tab-btn\" data-tab=\"tab3\">485配置</button>\n"
- " <button class=\"tab-btn\" data-tab=\"tab4\">SNMP</button>\n"
- " <button class=\"tab-btn\" data-tab=\"tab5\">设备信息</button>\n"
- " <span style=\"text-align: center;line-height: 50px;margin-left: 20%;\">{{dateTime}}</span>\n"
- " </div>\n"
-
- " <div class=\"tab-content active\" id=\"tab1\">\n"
- " <!--<iframe class=\"tab-iframe\" src=\"/src/pdu.html\"></iframe>-->\n"
- " <div id=\"app\" @vue:mounted=\"fetchData\" class=\"container\">\n"
- " <!-- 上部:总设备信息 -->\n"
-
- " <div class=\"summary-section\">\n"
- " <div class=\"left-buttons\">\n"
- " <button v-show=\"showExternal\" @click=\"toggleThreeDevices(1)\" class=\"btn btn-energy\">L1</button>\n"
- " <button v-show=\"showExternal\" @click=\"toggleThreeDevices(2)\" class=\"btn btn-threshold\">L2</button>\n"
- " <button v-show=\"showExternal\" @click=\"toggleThreeDevices(3)\" class=\"btn btn-delay\">L3</button>\n"
- " </div>\n"
- " <div class=\"button-container\">\n"
- " <div class=\"left-buttons\">\n"
- " <button @click=\"showFzszModal = true;\" class=\"btn btn-threshold\">阈值设置</button>\n"
- " <button @click=\"showysszModal=true\" class=\"btn btn-delay\">延时设置</button>\n"
- " <button @click=\" hdlsz()\" class=\"btn btn-energy\">耗电量重置</button>\n"
- " </div>\n"
- " <div class=\"right-buttons\">\n"
- " <button @click=\"toggleAllDevices(true)\" class=\" btn btn-energy\">总开</button>\n"
- " <button @click=\"toggleAllDevices(false)\" class=\"btn btn-close\">总关</button>\n"
- " </div>\n"
- " </div>\n"
-
-
- " <table class=\"summary-table\">\n"
- " <thead>\n"
- " <tr>\n"
- " <th>总电压(V)</th>\n"
- " <th>总电流(A)</th>\n"
- " <th>总功率(KW)</th>\n"
- " <!--<th>总频率(HZ)</th>-->\n"
- " <th>总耗电量(Kwh)</th>\n"
- " </tr>\n"
- " </thead>\n"
- " <tbody style=\"height: 50px;\">\n"
- " <tr>\n"
- " <td>{{ summary.totalVoltage }}</td>\n"
- " <td>{{ summary.totalCurrent }}</td>\n"
- " <td >{{ summary.totalPower }}</td>\n"
- " <!--<td >{{ summary.totalFrequency }}</td>-->\n"
- " <td >{{ summary.totalEnergy }}</td>\n"
- " </tr>\n"
- " </tbody>\n"
- " </table>\n"
- " <div class=\"summary-actions\">\n"
-
-
- " </div>\n"
- " </div>\n"
-
- " <!-- 中部:设备管理列表 -->\n"
- " <div class=\"table-container\">\n"
- " <div class=\"scrollable-table\">\n"
- " <table class=\"device-table\">\n"
- " <thead>\n"
- " <tr>\n"
- " <th>通道名称</th>\n"
- " <th>相序</th>\n"
- " <th>电压(V)</th>\n"
- " <th>电流(A)</th>\n"
- " <th>功率(W)</th>\n"
- " <th>频率(HZ)</th>\n"
- " <th>耗电量(Kwh)</th>\n"
- " <th>开启延时(S)</th>\n"
- " <th>关闭延时(S)</th>\n"
- " <th>状态</th>\n"
- " <th>操作</th>\n"
- " </tr>\n"
- " </thead>\n"
- " <tbody>\n"
- " <tr v-for=\"device in channelList\">\n"
- " <td >{{ device.productChName }}</td>\n"
- " <td >{{ device.productPhOrder }}</td>\n"
- " <td v-if=\"device.colorStyledy!=''\" :style=\"device.colorStyledy\">{{ device.productChVoltage }}</td>\n"
- " <td v-else :style=\"device.colorStyledy2\">{{ device.productChVoltage }}</td>\n"
- " <td :style=\"device.colorStyledl\">{{ device.productChCurrent }}</td>\n"
- " <td :style=\"device.colorStylegl\">{{ device.productChPower }}</td>\n"
- " <td>{{ device.productChPowerFreq }}</td>\n"
- " <td :style=\"device.colorStylehdl\">{{ device.productChConsumption }}</td>\n"
- " <td >{{ device.firingInterval }}</td>\n"
- " <td >{{ device.closeInterval }}</td>\n"
- " <td :class=\"device.productChStatus ? 'status-active' : 'status-inactive'\">\n"
- " {{ device.productChStatus==1 ? '接通' : '断开' }}\n"
- " </td>\n"
- " <td>\n"
- " <button @click=\"toggleDeviceStatus(device)\"\n"
- " :class=\"device.productChStatus ? 'btn btn-close' : 'btn btn-on'\">\n"
- " {{ device.productChStatus==1 ? '关闭' : '开启' }}\n"
- " </button>\n"
- " </td>\n"
- " </tr>\n"
- " </tbody>\n"
- " </table>\n"
- " </div>\n"
-
- " </div>\n"
-
- " <!-- 下部:状态显示 -->\n"
- " <div class=\"status-section\">\n"
- " <div class=\"status-boxes\">\n"
- " <div class=\"status-box\">\n"
- " <h3>温度</h3>\n"
- " <p v-if=\"statusData.temperatureStatus==0\" style=\"color: red\">{{ statusData.temperature }}</p>\n"
- " <p v-else :style=\"statusData.tempcolorStyle\">{{ statusData.temperature }} </p>\n"
- " </div>\n"
- " <div class=\"status-box\">\n"
- " <h3>湿度</h3>\n"
- " <p v-if=\"statusData.temperatureStatus==0\" style=\"color: red\">{{ statusData.humidity }}</p>\n"
- " <p v-else :style=\"statusData.humcolorStylesx\">{{ statusData.humidity }} </p>\n"
-
- " </div>\n"
- " <div class=\"status-box\">\n"
- " <h3>烟雾</h3>\n"
- " <p v-if=\"statusData.waterLeakStatus==0\" style=\"color: red\">{{ statusData.waterLeak }}</p>\n"
- " <p v-else>{{ statusData.waterLeak }} </p>\n"
- " </div>\n"
- " <div class=\"status-box\">\n"
- " <h3>CO2</h3>\n"
- " <p v-if=\"statusData.smokeStatus==0\" style=\"color: red\">{{ statusData.smoke }}</p>\n"
- " <p v-else :style=\"statusData.smokecolorStylesx\">{{ statusData.smoke }} </p>\n"
- " </div>\n"
- " <div class=\"status-box\" @click=\"showFzszModalgj=true\" style=\" cursor: pointer; position: relative; \">\n"
- " <h3>报警</h3>\n"
- " <p>{{ statusData.alarm1 }}</p>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " <!-- 耗电量设置弹窗内容 -->\n"
- " <div v-if=\"showFormModal\" class=\"modal-overlay\" >\n"
- " <div class=\"modal-content\">\n"
- " <h2>耗电量重置</h2>\n"
- " <!-- 下拉选择 -->\n"
- " <div class=\"form-group\" >\n"
- " <label>通道:</label>\n"
- " <div class=\"select-header\">\n"
- " <p class=\"hint\">提示:使用Ctrl/Cmd键进行多选</p>\n"
- " <button class=\"select-all\" @click=\"toggleSelectAll2\">\n"
- " {{ formData.productChIds.length === Object.keys(channelList1).length ? '取消全选' : '全选' }}\n"
- " </button>\n"
- " </div>\n"
- " <select v-model=\"formData.productChIds\" multiple >\n"
- " <option v-for=\"option in channelList1\" :value=\"option.productChId\">{{ option.productChName }}</option>\n"
- " </select>\n"
-
- " <div class=\"selected-items\">\n"
- " <h3>已选通道:</h3>\n"
- " <div class=\"selected-tags\">\n"
- " <span v-if=\"formData.productChIds.length === 0\" class=\"no-selection\">暂无选择</span>\n"
- " <div v-for=\"id in formData.productChIds\" :key=\"id\" class=\"tag\">\n"
- " {{ getOptionName2(id) }}\n"
- " <button @click=\"removeOption2(id)\">×</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " <!--<label>通道:</label>-->\n"
- " <!--<select v-model=\"formData.channel_power_infro\" class=\"custom-select\">-->\n"
- " <!--<option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择耗电量复位通道...</option>-->\n"
- " <!--<option v-for=\"option in channelList1\" :value=\"option.channel_power_infro\">{{ option.productChName }}</option>-->\n"
- " <!--</select>-->\n"
- " </div>\n"
- " <!-- 表单按钮 -->\n"
- " <div class=\"form-actions\">\n"
- " <button type=\"button\" class=\"btn btn-energy\" @click=\"hdlczClickClose()\">取消</button>\n"
- " <button class=\"btn btn-energy\" @click=\"hdlczClick()\" >提交</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
-
- " <!-- 阈值设置弹窗内容 -->\n"
- " <div @vue:mounted=\"fzszData\" v-if=\"showFzszModal\" class=\"modal-overlay\" >\n"
- " <div class=\"modal-content\" style=\"max-width: 100%;overflow-y: hidden\">\n"
- " <h2>阈值设置</h2>\n"
- " <button @click=\"handleUpdateList()\" style=\"margin: 10px;\" :class=\" 'btn btn-on'\">批量设置 </button>\n"
- " <div class=\"scrollable-table\" style=\" max-height: 60vh; \">\n"
- " <table class=\"device-table\">\n"
- " <thead>\n"
- " <tr>\n"
- " <th>通道名称</th>\n"
- " <th>通道号</th>\n"
- " <th>电流上限</th>\n"
- " <th>电压上限</th>\n"
- " <th>电压下限</th>\n"
- " <th>功率上限</th>\n"
- " <th>耗电量上限</th>\n"
- " <th>操作</th>\n"
- " </tr>\n"
- " </thead>\n"
- " <tbody>\n"
- " <tr v-for=\"power in powerThresholdList\" :key=\"power.productChId\">\n"
- " <td>{{ power.productChName }}</td>\n"
- " <td>{{ power.productChId }}</td>\n"
- " <td>{{ power.currentUpperAction }}</td>\n"
- " <td>{{ power.voltageUpperAction }}</td>\n"
- " <td>{{ power.voltageDownAction }}</td>\n"
- " <td>{{ power.powerUpperAction }}</td>\n"
- " <td>{{ power.alarmContentUpperAction }}</td>\n"
- " <td>\n"
- " <button @click=\"handleUpdate(power)\" :class=\" 'btn btn-on'\">\n"
- " {{ '设置' }}\n"
- " </button>\n"
- " </td>\n"
- " </tr>\n"
- " </tbody>\n"
- " </table>\n"
- " </div>\n"
- " <!-- 表单按钮 -->\n"
- " <div class=\"button-footer form-actions\">\n"
- " <button type=\"button\" class=\"btn btn-energy\" @click=\"fzscClickClose()\">取消</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
-
- " <!-- 阈值设置单设备弹窗内容 -->\n"
- " <div v-if=\"showFzszModal2\" class=\"modal-overlay\" >\n"
- " <div class=\"modal-content\">\n"
- " <div class=\"form-group\" v-if=\"fzscData.list=='1'\" >\n"
- " <label>通道:</label>\n"
- " <div class=\"select-header\">\n"
- " <p class=\"hint\">提示:使用Ctrl/Cmd键进行多选</p>\n"
- " <button class=\"select-all\" @click=\"toggleSelectAll\">\n"
- " {{ fzscData.productChIds.length === Object.keys(channelList1).length ? '取消全选' : '全选' }}\n"
- " </button>\n"
- " </div>\n"
- " <select v-model=\"fzscData.productChIds\" multiple >\n"
- " <option v-for=\"option in channelList1\" :value=\"option.productChId\">{{ option.productChName }}</option>\n"
- " </select>\n"
-
- " <div class=\"selected-items\">\n"
- " <h3>已选通道:</h3>\n"
- " <div class=\"selected-tags\">\n"
- " <span v-if=\"fzscData.productChIds.length === 0\" class=\"no-selection\">暂无选择</span>\n"
- " <div v-for=\"id in fzscData.productChIds\" :key=\"id\" class=\"tag\">\n"
- " {{ getOptionName(id) }}\n"
- " <button @click=\"removeOption(id)\">×</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " <div class=\"form-group\" v-if=\"fzscData.list==''\">\n"
- " <label>通道号:</label>\n"
- " <input type=\"text\" v-model=\"fzscData.productChId\" readonly >\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>电流上限:</label>\n"
- " <input type=\"text\" v-model=\"fzscData.currentUpperAction\">\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>电压上限:</label>\n"
- " <input type=\"text\" v-model=\"fzscData.voltageUpperAction\">\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>电压下限:</label>\n"
- " <input type=\"text\" v-model=\"fzscData.voltageDownAction\">\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>功率上限:</label>\n"
- " <input type=\"text\" v-model=\"fzscData.powerUpperAction\">\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>耗电量上限:</label>\n"
- " <input type=\"text\" v-model=\"fzscData.alarmContentUpperAction\">\n"
- " </div>\n"
- " <!-- 表单按钮 -->\n"
- " <div class=\"form-actions\">\n"
- " <button class=\"btn btn-energy\" @click=\"fzscClick()\" >提交</button>\n"
- " <button type=\"button\" class=\"btn btn-energy\" @click=\"fzscClickClose2()\">取消</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
-
- " <!-- 延时设置列表 -->\n"
- " <div @vue:mounted=\"ysszData\" v-if=\"showysszModal\" class=\"modal-overlay\" >\n"
- " <div class=\"modal-content\" style=\"max-width: 100%;overflow-y: hidden\">\n"
- " <h2>延时设置</h2>\n"
- " <div class=\"scrollable-table\" style=\" max-height: 60vh; \">\n"
- " <table class=\"device-table\">\n"
- " <thead>\n"
- " <tr>\n"
- " <th>通道名称</th>\n"
- " <th>通道号</th>\n"
- " <th>开启时间</th>\n"
- " <th>关闭时间</th>\n"
- " <th>操作</th>\n"
- " </tr>\n"
- " </thead>\n"
- " <tbody>\n"
- " <tr v-for=\"power in ysszList\" :key=\"power.productChId\">\n"
- " <td>{{ power.productChName }}</td>\n"
- " <td>{{ power.productChId }}</td>\n"
- " <td>{{ power.firingInterval }}</td>\n"
- " <td>{{ power.closeInterval }}</td>\n"
- " <td>\n"
- " <button @click=\"ysszhandleUpdate(power)\" :class=\" 'btn btn-on'\">\n"
- " {{ '设置' }}\n"
- " </button>\n"
- " </td>\n"
- " </tr>\n"
- " </tbody>\n"
- " </table>\n"
- " </div>\n"
- " <!-- 表单按钮 -->\n"
- " <div class=\"button-footer form-actions\">\n"
- " <button type=\"button\" class=\"btn btn-energy\" @click=\"ysszClickClose()\">取消</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " <!-- 延时设置内容 -->\n"
- " <div v-if=\"showysszModal2\" class=\"modal-overlay2\" >\n"
- " <div class=\"modal-content\">\n"
- " <div class=\"form-group\" >\n"
- " <label>通道号:</label>\n"
- " <input type=\"text\" v-model=\"ysszData2.productChId\" readonly >\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>开启时间(S):</label>\n"
- " <input type=\"text\" v-model=\"ysszData2.firingInterval\">\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>关闭时间(S):</label>\n"
- " <input type=\"text\" v-model=\"ysszData2.closeInterval\">\n"
- " </div>\n"
-
- " <!-- 表单按钮 -->\n"
- " <div class=\"form-actions\">\n"
- " <button class=\"btn btn-energy\" @click=\"ysszClick()\" >提交</button>\n"
- " <button type=\"button\" class=\"btn btn-energy\" @click=\"ysszClickClose2()\">取消</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
-
- " <!--告警信息弹窗-->\n"
- " <div v-if=\"showFzszModalgj\" class=\"modal-overlay\" >\n"
- " <div class=\"modal-content\" style=\"max-width: 100%;overflow-y: hidden\">\n"
- " <div class=\"scrollable-table\" style=\" max-height: 60vh; \">\n"
- " <table class=\"device-table\">\n"
- " <thead>\n"
- " <tr>\n"
- " <th>序号</th>\n"
- " <th>报警时间</th>\n"
- " <th>报警类型</th>\n"
- " <th>报警信息</th>\n"
- " </tr>\n"
- " </thead>\n"
- " <tbody>\n"
- " <tr v-for=\"(item, index) in his_alarmd\" :key=\"index\">\n"
- " <td>{{ item.number }}</td>\n"
- " <td>{{ item.date }}</td>\n"
- " <td>{{ item.type }}</td>\n"
- " <td>{{ item.waning_context }}</td>\n"
- " </tr>\n"
- " </tbody>\n"
- " </table>\n"
- " </div>\n"
- " <!-- 表单按钮 -->\n"
- " <div class=\"button-footer form-actions\">\n"
- " <button type=\"button\" class=\"btn btn-energy\" @click=\"fzscClickClosegj()\">取消</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
-
- " </div>\n"
-
- " </div>\n"
- "<!--网络配置-->\n"
- " <div class=\"tab-content\" id=\"tab2\" @vue:mounted=\"wkszQuery\">\n"
- " <div >\n"
- " <div class=\"modal-content\">\n"
- " <div class=\"form-group\" >\n"
- " <label>选择模式:</label>\n"
- " <select v-model=\"wlszForm.mode\" class=\"custom-select\">\n"
- " <option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>\n"
- " <option v-for=\"option in modes\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>IP:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm.ipaddr\" >\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>掩码:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm.mask\" >\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>网关:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm.gateway\" >\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>DNS1:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm.dns1\" >\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>DNS2:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm.dns2\" >\n"
- " </div>\n"
- " <!--<div class=\"form-group\" >-->\n"
- " <!--<label>DHCP:</label>-->\n"
- " <!--<input type=\"text\" v-model=\"wlszForm.dhcp\" >-->\n"
- " <!--</div>-->\n"
- " <!-- 表单按钮 -->\n"
- " <div class=\"form-actions\">\n"
- " <button class=\"btn btn-energy\" @click=\"submitForm('wksz')\" >确定</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " <!--485配置-->\n"
- " <div class=\"tab-content\" id=\"tab3\" @vue:mounted=\"rsQuery\">\n"
- " <div class=\"modal-content\">\n"
- " <div class=\"form-group\" >\n"
- " <select v-model=\"wlszForm2.mode\" class=\"custom-select\">\n"
- " <option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择耗电量复位通道...</option>\n"
- " <option v-for=\"option in modes2\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>地址:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm2.addr\" >\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>波特率:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm2.baud\" >\n"
- " </div>\n"
-
- " <!-- 表单按钮 -->\n"
- " <div class=\"form-actions\">\n"
- " <button class=\"btn btn-energy\" @click=\"submitForm('rs')\" >确定</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " <!--SNMP配置-->\n"
- " <div class=\"tab-content\" id=\"tab4\" >\n"
- " <div class=\"modal-content\">\n"
- " <div class=\"form-group\" >\n"
- " <label>社团项:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm3.publics\" >\n"
- " </div>\n"
- " <!--<div class=\"form-group\" >-->\n"
- " <!--<label>Trap IP:</label>-->\n"
- " <!--<select v-model=\"wlszForm3.version\" @change=\"handleChange\" class=\"custom-select\">-->\n"
- " <!--<option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>-->\n"
- " <!--<option v-for=\"option in SNMPs\" :value=\"option.id\">{{ option.name }}</option>-->\n"
- " <!--</select>-->\n"
- " <!--</div>-->\n"
- " <div class=\"form-group\" >\n"
- " <label>Trap IP:</label>\n"
- " <input type=\"text\" v-model=\"wlszForm3.trap_ip\" >\n"
- " </div>\n"
- " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
- " <!--<label>用户名:</label>-->\n"
- " <!--<input type=\"text\" v-model=\"wlszForm3.yhm\" >-->\n"
- " <!--</div>-->\n"
- " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
- " <!--<label>认证协议:</label>-->\n"
- " <!--<select v-model=\"wlszForm3.mode\" class=\"custom-select\">-->\n"
- " <!--<option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>-->\n"
- " <!--<option v-for=\"option in rzxys\" :value=\"option.id\">{{ option.name }}</option>-->\n"
- " <!--</select>-->\n"
- " <!--</div>-->\n"
- " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
- " <!--<label>认证密码:</label>-->\n"
- " <!--<input type=\"text\" v-model=\"wlszForm3.rzmm\" >-->\n"
- " <!--</div>-->\n"
- " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
- " <!--<label>加密协议:</label>-->\n"
- " <!--<select v-model=\"wlszForm3.trapmode\" class=\"custom-select\">-->\n"
- " <!--<option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>-->\n"
- " <!--<option v-for=\"option in jmxys\" :value=\"option.id\">{{ option.name }}</option>-->\n"
- " <!--</select>-->\n"
- " <!--</div>-->\n"
- " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
- " <!--<label>加密密码:</label>-->\n"
- " <!--<input type=\"text\" v-model=\"wlszForm3.jmmm\" >-->\n"
- " <!--</div>-->\n"
- " <!-- 表单按钮 -->\n"
- " <div class=\"form-actions\">\n"
- " <button class=\"btn btn-energy\" @click=\"submitForm('snmp')\" >确定</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " <!--设备信息-->\n"
- " <div class=\"tab-content\" id=\"tab5\" >\n"
- " <!--<iframe class=\"tab-iframe\" src=\"/src/sbsz.html\"></iframe>-->\n"
- " <div class=\"divAll\" >\n"
- " <!--设备信息-->\n"
- " <div class=\"modal-content\" @vue:mounted=\"sbxxQuery\">\n"
- " <div class=\"form-group\" >\n"
- " <label>系统时间:</label>\n"
- " <input type=\"text\" style=\"width: 70%\" v-model=\"wlszForm4.sys_time\" >\n"
- " <button style=\"margin-left: 10px;\" class=\"btn btn-energy\" @click=\"showXtsjModalClick()\">设置</button>\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>固件版本:</label>\n"
- " <input type=\"text\" style=\"width: 70%\" v-model=\"wlszForm4.ver\" >\n"
- " <!--<button style=\"margin-left: 10px;\" class=\"btn btn-energy\" @click=\"showFjscModalClick()\" >升级</button>-->\n"
- " </div>\n"
-
- " </div>\n"
-
- " <!--设备系统时间设置-->\n"
- " <div v-if=\"showXtsjModal\" class=\"modal-overlay2\" >\n"
- " <div class=\"modal-content\" >\n"
- " <h2>时间设置</h2>\n"
- " <!-- 下拉选择 -->\n"
- " <div class=\"form-group\" >\n"
- " <label>时区:</label>\n"
- " <select v-model=\"wlszForm4.tzone\" class=\"custom-select\">\n"
- " <option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>\n"
- " <option v-for=\"option in sqs\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label for=\"selectedDate\">选择日期:</label>\n"
- " <div class=\"date-input-container\">\n"
- " <input\n"
- " v-model=\"wlszForm4.sys_time\"\n"
- " type=\"text\"\n"
- " id=\"selectedDate\"\n"
- " class=\"date-input\"\n"
- " placeholder=\"点击选择日期\"\n"
- " @click=\"showPicker\"\n"
- " >\n"
- " <div class=\"calendar-icon\">\n"
- " <i class=\"fas fa-calendar-alt\"></i>\n"
- " </div>\n"
- " </div>\n"
-
- " <!--<div class=\"datetime-modal\" v-if=\"isPickerVisible\">-->\n"
- " <div class=\"modal-overlay2\" v-if=\"isPickerVisible\">\n"
- " <div class=\"modal-content\">\n"
- " <div class=\"form-group\" >\n"
- " <label>日期:</label>\n"
- " <select v-model=\"dateForm.year\" style=\"width: 25%\" >\n"
- " <option v-for=\"option in years\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " <select v-model=\"dateForm.month\" @change=\"updateDays\" style=\"width: 25%\" >\n"
- " <option v-for=\"option in months\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " <select v-model=\"dateForm.day\" style=\"width: 25%\" >\n"
- " <option v-for=\"option in dayAll\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " </div>\n"
- " <div class=\"form-group\" >\n"
- " <label>时间:</label>\n"
- " <select v-model=\"dateForm.hour\" style=\"width: 25%\" >\n"
- " <option v-for=\"option in hours\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " <select v-model=\"dateForm.minute\" style=\"width: 25%\" >\n"
- " <option v-for=\"option in minutes\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " <select v-model=\"dateForm.second\" style=\"width: 25%\" >\n"
- " <option v-for=\"option in minutes\" :value=\"option.id\">{{ option.name }}</option>\n"
- " </select>\n"
- " </div>\n"
- " <button class=\"btn btn-energy\" @click=\"confirmSelection\"> 确认 </button>\n"
- " <button class=\"btn btn-energy\" @click=\"isPickerVisible = false\">取消 </button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- " <!-- 表单按钮 -->\n"
- " <div class=\"form-actions\" >\n"
- " <button class=\"btn btn-energy\" @click=\"stxjClick()\" >提交</button>\n"
- " <button type=\"button\" class=\"btn btn-energy\" @click=\"showXtsjModal=false\">取消</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
-
- " <!--附件上传-->\n"
- " <div v-if=\"showScfjModal\" class=\"modal-overlay2\" >\n"
- " <div class=\"upload-container\" style=\" background: white;width: 400px\">\n"
- " <div class=\"form-group\" >\n"
- " <label>固件版本:</label>\n"
- " <input type=\"text\" style=\"width: 100%\" v-model=\"wlszForm5.ver\" >\n"
- " </div>\n"
- " <div class=\"upload-area\"\n"
- " :class=\"{ dragover: isDragover }\"\n"
- " @click=\"selectFiles\"\n"
- " @dragover.prevent=\"isDragover = true\"\n"
- " @dragleave=\"isDragover = false\"\n"
- " @drop.prevent=\"handleDrop\">\n"
-
- " <div class=\"upload-text\">\n"
- " <h3>拖放文件到此处上传或选择文件</h3>\n"
- " <!--<p>支持单个或多个文件上传,最大支持200MB</p>-->\n"
- " </div>\n"
-
- " <input type=\"file\" class=\"file-input\" multiple @change=\"handleFileSelect\" ref=\"fileInput\">\n"
-
- " </div>\n"
-
- " <div class=\"files-list\" v-if=\"files.length > 0\">\n"
- " <h3>已选择文件 ({{ files.length }})</h3>\n"
-
- " <div class=\"file-item\" v-for=\"file in files\" :key=\"file.id\">\n"
-
- " <div class=\"file-info\">\n"
- " <div class=\"file-name\">{{ file.name }}</div>\n"
- " </div>\n"
-
- " </div>\n"
- " </div>\n"
- " <div class=\"actions\">\n"
- " <button class=\"btn\" @click=\"uploadFiles\" :disabled=\"files.length === 0 || isUploading || wlszForm5.ver==''\">\n"
- " <i class=\"fas fa-upload\"></i> 保存\n"
- " </button>\n"
- " <button class=\"btn btn-secondary\" @click=\"clearFiles\" >\n"
- " <i class=\"fas fa-times\"></i> 取消\n"
- " </button>\n"
- " </div>\n"
-
- " </div>\n"
-
- " </div>\n"
-
- " </div>\n"
-
- " </div>\n"
-
- " <!-- 保存确认弹框 -->\n"
- " <div class=\"modal-overlay2\" v-if=\"showSaveModal\">\n"
- " <div class=\"modal-content\">\n"
- " <h2>系统提示</h2>\n"
- " <p>{{popMessage}}</p>\n"
- " <div class=\"form-actions\">\n"
- " <button class=\"btn btn-energy\" @click=\"showSaveModal = false\">取消</button>\n"
- " <button class=\"btn btn-energy\" @click=\"saveData12()\">确定</button>\n"
- " </div>\n"
- " </div>\n"
- " </div>\n"
- "</div>\n"
- "<script type=\"module\">\n"
- " let activePageIntervalId1 = null;\n"
- " let activePageIntervalId2= null;\n"
- " let activePageIntervalId3 = null;\n"
- " let activePageIntervalId4 = null;\n"
- " let activePageIntervalId5 = null;\n"
- " let tabId = 'tab1';\n"
- " document.addEventListener('DOMContentLoaded', function() {\n"
- " const tabBtns = document.querySelectorAll('.tab-btn');\n"
- " const tabContents = document.querySelectorAll('.tab-content');\n"
- " tabBtns.forEach(btn => {\n"
- " btn.addEventListener('click', function() {\n"
- " // 移除所有按钮和内容的active类\n"
- " tabBtns.forEach(btn => btn.classList.remove('active'));\n"
- " tabContents.forEach(content => content.classList.remove('active'));\n"
-
- " // 为当前按钮添加active类\n"
- " this.classList.add('active');\n"
-
- " // 显示对应的内容\n"
- " tabId = this.getAttribute('data-tab');\n"
- " document.getElementById(tabId).classList.add('active');\n"
- " if(tabId=='tab1'){\n"
- " function1();\n"
- " }else if(tabId=='tab2'){\n"
- " function2();\n"
- " }else if(tabId=='tab3'){\n"
- " function3();\n"
- " }else if(tabId=='tab4'){\n"
- " function4();\n"
- " }else if(tabId=='tab5'){\n"
- " function5();\n"
- " }\n"
- " });\n"
- " });\n"
-
- " const today = new Date();\n"
- " today.setHours(0, 0, 0, 0);\n"
- " const app = PetiteVue.createApp({\n"
- " snmpShow:false,\n"
- " showXtsjModal:false,\n"
- " productType:\"\",\n"
- " productId:\"\",\n"
- " productNumber:\"\",\n"
- " channelList1:[],\n"
- " ysszList:[],\n"
- " ysszData2:{},\n"
- " timeData:{},\n"
- " popMessage:'',\n"
- " dateTime:'',\n"
- " systemTime:'',\n"
- " wlszForm:{\n"
- " mode:'',\n"
- " ipaddr:'',\n"
- " mask:'',\n"
- " gateway:'',\n"
- " dns1:'',\n"
- " dns2:'',\n"
- " dhcp:'',\n"
- " type:''\n"
- " },\n"
- " wlszForm2:{\n"
- " mode:'',\n"
- " addr:'',\n"
- " baud:''\n"
- " },\n"
- " wlszForm3:{\n"
- " mode:'',\n"
- " publics:'',\n"
- " version:'',\n"
- " yhm:'',\n"
- " rzmm:'',\n"
- " trapmode:'',\n"
- " jmmm:'',\n"
- " trap_ip:'',\n"
- " },\n"
-
- " readonlyvalidate: false,\n"
- " showSaveModal: false,\n"
- " showDeleteModal: false,\n"
- " message: '',\n"
- " messageType: '',\n"
- " popType: '',\n"
- " popMessage:'',\n"
- " modes:[{\"id\":0,\"name\":\"自动\"},{\"id\":1,\"name\":\"手动\"}],\n"
- " modes2:[{\"id\":0,\"name\":\"主机模式\"},{\"id\":1,\"name\":\"从机模式\"}],\n"
- " SNMPs:[{\"id\":\"SNMP V1\",\"name\":\"SNMP V1\"},{\"id\":\"SNMP V2c\",\"name\":\"SNMP V2c\"},{\"id\":\"SNMP V3\",\"name\":\"SNMP V3\"}],\n"
- " rzxys:[{\"id\":\"MD5\",\"name\":\"MD5\"},{\"id\":\"SHA\",\"name\":\"SHA\"},{\"id\":\"SHA-224\",\"name\":\"SHA-224\"},{\"id\":\"SHA-256\",\"name\":\"SHA-256\"},{\"id\":\"SHA-384\",\"name\":\"SHA-384\"},{\"id\":\"SHA-512\",\"name\":\"SHA-512\"}],\n"
- " jmxys:[{\"id\":\"0\",\"name\":\"无\"},{\"id\":\"DES\",\"name\":\"DES\"},{\"id\":\"AES\",\"name\":\"AES\"}],\n"
- " async stxjClickClose(){\n"
- " this.showXtsjModal=false\n"
- " },\n"
-
- " async wkszQuery(){\n"
-
- " },\n"
- " async rsQuery(){\n"
-
- " },\n"
-
- " async submitForm(type){\n"
- " this.showSaveModal = true\n"
- " this.popMessage=\"确认要提交吗?\";\n"
- " if(type=='wksz'){\n"
- " this.saveDataAll=this.wlszForm;\n"
- " this.popType='wksz';\n"
- " this.saveDataAll.len=241\n"
- " }else if(type=='rs'){\n"
- " this.saveDataAll=this.wlszForm2;\n"
- " this.saveDataAll.len=6;\n"
- " this.popType='rs';\n"
- " }else if(type=='snmp'){\n"
- " this.saveDataAll=this.wlszForm3;\n"
- " this.saveDataAll.len=45\n"
- " this.popType='snmp';\n"
- " }\n"
-
- " },\n"
-
- " async saveData12(){\n"
- " if(this.popType=='wksz'){\n"
- " network_settings(this.saveDataAll)\n"
- " }else if(this.popType=='rs'){\n"
- " modbus_settings(this.saveDataAll)\n"
- " }else if(this.popType=='snmp'){\n"
- " snmp_settings(this.saveDataAll)\n"
- " }else if(this.popType=='zkzg'){\n"
- " if( this.saveDataAll.type=='close'){\n"
- " all_close();\n"
-
- " }else if( this.saveDataAll.type=='open'){\n"
- " all_open();\n"
-
- " }\n"
- " }else if(this.popType=='yssz'){\n"
- " delay_update(this.saveDataAll.channel_power_infro)\n"
- " this.ysszClickClose2()\n"
- " }else if(this.popType=='hdlcz'){\n"
- " for(const ket in this.saveDataAll.channel_power_infros){\n"
- " power_reset(this.saveDataAll.channel_power_infros[ket])\n"
- " }\n"
- " this.hdlczClickClose()\n"
- " }else if(this.popType=='fzsz'){\n"
- " if(this.saveDataAll.list=='1'){\n"
- " for(const ket in this.saveDataAll.channel_power_infros){\n"
- " threshold_update(this.saveDataAll.channel_power_infros[ket])\n"
- " }\n"
- " }else{\n"
- " threshold_update(this.saveDataAll.channel_power_infro)\n"
- " }\n"
-
- " this.fzscClickClose2()\n"
- " }else if(this.popType=='tdkg'){\n"
-
- " if( this.saveDataAll.type=='close'){\n"
- " single_close({...j_data},{...channel_power_infro},this.saveDataAll.productChId);\n"
-
- " }else if( this.saveDataAll.type=='open'){\n"
- " single_open({...j_data},{...channel_power_infro},this.saveDataAll.productChId);\n"
- " }\n"
-
- " }else if(this.popType=='sjsz'){\n"
- " sys_settings(this.saveDataAll)\n"
- " this.showSaveModal = false\n"
- " this.showXtsjModal=false\n"
- " }\n"
- " this.showSaveModal=false\n"
- " this.saveDataAll={};\n"
- " this.popType='';\n"
- " // alert(\"操作成功\")\n"
- " },\n"
- " handleChange(value){\n"
- " if(this.wlszForm3.version=='SNMP V3'){\n"
- " this.snmpShow=true;\n"
- " }else{\n"
- " this.snmpShow=false;\n"
- " this.wlszForm3.yhm='';\n"
- " this.wlszForm3.mode='';\n"
- " this.wlszForm3.rzmm='';\n"
- " this.wlszForm3.jmxy='';\n"
- " this.wlszForm3.jmmm='';\n"
- " this.wlszForm3.trapmode='' ;\n"
- " }\n"
- " },\n"
- " showSaveModal: false,\n"
- " showDeleteModal: false,\n"
- " message: '',\n"
- " messageType: '',\n"
-
-
- " // 消息和UI状态\n"
- " message: '',\n"
- " messages: [],\n"
-
-
- " // 状态\n"
- " showExternal:false,\n"
- " // 耗电量设置\n"
- " showFormModal:false,\n"
- " // 阈值设置\n"
- " showFzszModal:false,\n"
- " //告警\n"
- " showFzszModalgj:false,\n"
- " showFzszModal2:false,\n"
- " showysszModal:false,\n"
- " showysszModal2:false,\n"
- " formData:{productChName:null,productChId:null,channel_power_infro:null,productChIds:[]},\n"
- " powerThresholdList:[],\n"
- " fzscData:{\n"
- " productChIds:[]\n"
- " },\n"
- " items: [],\n"
- " newItem: '',\n"
- " loading: false,\n"
- " error: null,\n"
- " summary: {...initialFormData},\n"
- " channelList: [\n"
- " {\n"
- " productChName: '通道1',\n"
- " productPhOrder: 'A相',\n"
- " productChVoltage: '220V',\n"
- " productChCurrent: '10A',\n"
- " productChPower: '2.2kW',\n"
- " productChPowerFreq: '50Hz',\n"
- " productChConsumption: '15kWh',\n"
- " firingInterval: '5s',\n"
- " closeInterval: '3s',\n"
- " productChId: '3221',\n"
- " status: true\n"
- " },\n"
-
- " ],\n"
- " statusData: {\n"
- " temperatureStatus:1,\n"
- " temperature: '',\n"
- " humidity: '',\n"
- " waterLeak: '',\n"
- " waterLeakStatus: 1,\n"
- " smoke: '',\n"
- " smokeStatus: 1,\n"
- " alarm1: ''\n"
- " },\n"
- " productType:\"\",\n"
- " threeType:\"1\",\n"
- " productId:\"\",\n"
- " productNumber:\"\",\n"
- " channelList1:[],\n"
- " ysszList:[],\n"
- " totalFormList:[],\n"
- " his_alarmd:[],\n"
- " ysszData2:{},\n"
- " popMessage:'',\n"
- " popType:'',\n"
-
- " saveDataAll:null,\n"
-
- " // 计算属性\n"
- " get connectionStatus() {\n"
- " if (this.isConnected) return 'connected';\n"
- " if (this.isConnecting) return 'connecting';\n"
- " return 'disconnected';\n"
- " },\n"
-
- " get statusText() {\n"
- " if (this.isConnected) return '已连接到 WebSocket 服务器';\n"
- " if (this.isConnecting) return '正在连接...';\n"
- " return '未连接';\n"
- " },\n"
-
-
-
- " async toggleDeviceStatus(device) {\n"
- " var command=\"\";\n"
- " const params={};\n"
- " params.productChId=device.productChId;\n"
- " // if(device.productChStatus=='1'){\n"
- " // command='channelclose';\n"
- " // this.popMessage=\"确认要关闭此通道吗?\";\n"
- " // params.type=\"close\";\n"
- " // }else{\n"
- " // command='channelopen';\n"
- " // this.popMessage=\"确认要打开此通道吗?\";\n"
- " // params.type=\"open\";\n"
- " // }\n"
- " if(device.productChStatus=='1'){\n"
- " single_close({...j_data},{...channel_power_infro},device.productChId);\n"
- " }else{\n"
- " single_open({...j_data},{...channel_power_infro},device.productChId);\n"
- " }\n"
- " // const result = await confirmAction({\n"
- " // title: message\n"
- " // });\n"
-
- " // this.showSaveModal = true\n"
- " // this.saveDataAll=params;\n"
- " // this.popType='tdkg';\n"
-
-
-
- " },\n"
- " /** 阈值设置按钮操作 */\n"
- " handleUpdate(row) {\n"
- " this.fzscData = JSON.parse(JSON.stringify(row));\n"
- " this.fzscData.list='';\n"
- " this.showFzszModal2 = true;\n"
- " // this.title = this.$t('pz');\n"
- " },\n"
- " getOptionName(id) {\n"
- " for(const key in this.channelList1){\n"
- " if(this.channelList1[key].productChId===id){\n"
- " return this.channelList1[key].productChName\n"
- " break\n"
- " }\n"
- " }\n"
- " ;\n"
- " },\n"
- " removeOption(id) {\n"
- " this.fzscData.productChIds = this.fzscData.productChIds.filter(optId => optId !== id);\n"
- " },\n"
- " toggleSelectAll() {\n"
-
- " if (this.fzscData.productChIds.length === Object.keys(this.channelList1).length ) {\n"
- " this.fzscData.productChIds = [];\n"
- " } else {\n"
- " for(const key in this.channelList1){\n"
- " this.fzscData.productChIds.push(this.channelList1[key].productChId)\n"
- " }\n"
-
- " // this.fzscData.productChIds = this.channelList1.map(option => option.productChId);\n"
- " }\n"
- " },\n"
-
- " getOptionName2(id) {\n"
- " for(const key in this.channelList1){\n"
- " if(this.channelList1[key].productChId===id){\n"
- " return this.channelList1[key].productChName\n"
- " break\n"
- " }\n"
- " }\n"
- " ;\n"
- " },\n"
- " removeOption2(id) {\n"
- " this.formData.productChIds = this.formData.productChIds.filter(optId => optId !== id);\n"
- " },\n"
- " toggleSelectAll2() {\n"
- " if (this.formData.productChIds.length === Object.keys(this.channelList1).length ) {\n"
- " this.formData.productChIds = [];\n"
- " } else {\n"
- " for(const key in this.channelList1){\n"
- " this.formData.productChIds.push(this.channelList1[key].productChId)\n"
- " }\n"
-
- " // this.fzscData.productChIds = this.channelList1.map(option => option.productChId);\n"
- " }\n"
- " },\n"
- " /** 阈值设置按钮操作 */\n"
- " handleUpdateList() {\n"
- " this.fzscData.list='1';\n"
- " this.fzscData.productChIds=[];\n"
- " this.fzscData.currentUpperAction='';\n"
- " this.fzscData.voltageUpperAction='';\n"
- " this.fzscData.voltageDownAction='';\n"
- " this.fzscData.powerUpperAction='';\n"
- " this.fzscData.alarmContentUpperAction='';\n"
-
- " this.showFzszModal2 = true;\n"
- " // this.title = this.$t('pz');\n"
- " },\n"
-
- " ysszhandleUpdate(row) {\n"
- " this.ysszData2 = JSON.parse(JSON.stringify(row));\n"
- " this.showysszModal2 = true;\n"
- " // this.title = this.$t('pz');\n"
- " },\n"
- " // 查询阈值设置列表\n"
- " async fzszData(){\n"
-
- " },\n"
- " // 查询延时设置列表\n"
- " async ysszData(){\n"
-
- " },\n"
- " hdlczClickClose(){\n"
- " this.showFormModal = false\n"
- " this.formData.channel_power_infro=null;\n"
- " },\n"
-
- " fzscClickClose(){\n"
- " this.showFzszModal = false;\n"
- " this.powerThresholdList=[];\n"
- " // this.formData.productChId=null;\n"
- " },\n"
- " fzscClickClosegj(){\n"
- " this.showFzszModalgj = false;\n"
- " },\n"
-
- " fzscClickClose2(){\n"
- " this.showFzszModal2 = false\n"
- " // this.formData.productChId=null;\n"
- " },\n"
-
- " ysszClickClose(){\n"
- " this.showysszModal = false;\n"
- " this.ysszList=[];\n"
- " },\n"
- " ysszClickClose2(){\n"
- " this.showysszModal2 = false;\n"
- " },\n"
-
- " hdlsz(){\n"
- " this.formData.productChIds=[]\n"
- " this.showFormModal = true\n"
- " },\n"
-
- " // 耗电量重置\n"
- " async hdlczClick(){\n"
- " const params={};\n"
- " let lists=[]\n"
- " console.log( this.formData.productChIds)\n"
- " for( const id in this.formData.productChIds){\n"
- " for( const key in this.powerThresholdList ){\n"
- " if(this.formData.productChIds[id]== this.powerThresholdList[key].productChId){\n"
- " lists.push(this.powerThresholdList[key].channel_power_infro);\n"
- " break\n"
- " }\n"
- " }\n"
- " }\n"
- " params.channel_power_infros= lists;\n"
-
- " // params.channel_power_infro=this.formData.channel_power_infro;\n"
- " this.popMessage=\"确认要重置此通道吗?\";\n"
- " // const result = await confirmAction({\n"
- " // title: message\n"
- " // });\n"
-
- " this.showSaveModal = true\n"
- " this.saveDataAll=params;\n"
- " this.popType='hdlcz';\n"
-
-
- " },\n"
- " // 阈值设置保存\n"
- " async fzscClick(){\n"
- " const params={};\n"
- " params.list=this.fzscData.list;\n"
- " if(this.fzscData.list=='1'){\n"
- " if(this.fzscData.productChIds.length==0){\n"
- " alert(\"请选择通道\")\n"
- " return\n"
- " }\n"
- " if(this.fzscData.alarmContentUpperAction=='' || this.fzscData.currentUpperAction=='' || this.fzscData.voltageDownAction=='' || this.fzscData.voltageUpperAction==''){\n"
- " alert(\"存在未设置项,请重试\")\n"
- " return\n"
- " }\n"
- " if(this.fzscData.voltageUpperAction!=0 && this.fzscData.voltageDownAction !=0 && this.fzscData.voltageUpperAction* 10<=this.fzscData.voltageDownAction* 10){\n"
- " alert(\"电压上限需要大于下限\")\n"
- " return\n"
- " }\n"
- " let lists=[]\n"
- " for( const id in this.fzscData.productChIds){\n"
- " for( const key in this.powerThresholdList ){\n"
- " if(this.fzscData.productChIds[id]== this.powerThresholdList[key].productChId){\n"
- " let param=this.powerThresholdList[key].channel_power_infro;\n"
- " param.thr.w_upper=this.fzscData.alarmContentUpperAction* 1000;\n"
- " param.thr.c_upper=this.fzscData.currentUpperAction* 10;\n"
- " param.thr.p_upper=this.fzscData.powerUpperAction* 1000;\n"
- " param.thr.v_lower=this.fzscData.voltageDownAction* 10;\n"
- " param.thr.v_upper=this.fzscData.voltageUpperAction* 10;\n"
- " lists.push(param);\n"
- " break\n"
- " }\n"
- " }\n"
- " }\n"
- " params.channel_power_infros= lists;\n"
-
- " }else{\n"
- " params.channel_power_infro=this.fzscData.channel_power_infro;\n"
- " params.channel_power_infro.thr.w_upper=this.fzscData.alarmContentUpperAction* 1000;\n"
- " params.channel_power_infro.thr.c_upper=this.fzscData.currentUpperAction* 10;\n"
- " params.channel_power_infro.thr.p_upper=this.fzscData.powerUpperAction* 1000;\n"
- " params.channel_power_infro.thr.v_lower=this.fzscData.voltageDownAction* 10;\n"
- " params.channel_power_infro.thr.v_upper=this.fzscData.voltageUpperAction* 10;\n"
-
- " }\n"
-
- " this.popMessage=\"确认要保存吗?\";\n"
- " // const result = await confirmAction({\n"
- " // title: message\n"
- " // });\n"
-
- " this.showSaveModal = true\n"
- " this.saveDataAll=params;\n"
- " this.popType='fzsz';\n"
-
- " },\n"
-
- " // 延时设置保存\n"
- " async ysszClick(){\n"
- " const params={};\n"
- " params.channel_power_infro=this.ysszData2.channel_power_infro;\n"
- " params.channel_power_infro.info.start_delay=this.ysszData2.firingInterval;\n"
- " params.channel_power_infro.info.stop_delay=this.ysszData2.closeInterval;\n"
- " this.popMessage=\"确认要保存吗?\";\n"
- " this.showSaveModal = true\n"
- " this.saveDataAll=params;\n"
- " this.popType='yssz';\n"
-
- " },\n"
-
-
- " // 总开总关\n"
- " async toggleAllDevices(status) {\n"
- " const params={};\n"
- " params.productId=this.productId;\n"
- " params.type= \"open\"\n"
- " this.popMessage=\"确认要开启设备下所有通道吗?\";\n"
- " if(status){\n"
- " params.type= \"open\"\n"
- " this.popMessage=\"确认要开启设备下所有通道吗?\";\n"
- " }else{\n"
- " params.type= \"close\"\n"
- " this.popMessage=\"确认要关闭设备下所有通道吗?\";\n"
- " }\n"
- " // const result = await confirmAction({\n"
- " // title: message\n"
- " // });\n"
-
- " this.showSaveModal = true;\n"
- " this.saveDataAll=params;\n"
- " this.popType='zkzg';\n"
- " },\n"
-
- " // 获取数据方法\n"
- " async fetchData() {\n"
- " \n"
- " function5();\n"
- " this.queryTotalStatus5();\n"
- " if (activePageIntervalId1 != null) {\n"
- " clearInterval(activePageIntervalId1);\n"
- " };\n"
- " activePageIntervalId1 = setInterval(() => {\n"
- " if(tabId=='tab1'){\n"
- " function1();\n"
- " this.queryTotalStatus();\n"
- " if(this.wlszForm4.sys_time=='' || this.wlszForm4.sys_time==null){\n"
- " this.queryTotalStatus5();\n"
- " }\n"
-
- " }else if(tabId=='tab2'){\n"
- " this.queryTotalStatus2();\n"
- " }else if(tabId=='tab3'){\n"
- " this.queryTotalStatus3();\n"
- " }else if(tabId=='tab4'){\n"
- " this.queryTotalStatus4();\n"
- " }else if(tabId=='tab5'){\n"
- " this.queryTotalStatus5();\n"
- " var js={};\n"
- " on_ws_msg(js);\n"
- " }\n"
-
- " }, 100);\n"
- " },\n"
- " // 总体监控赋值\n"
- " async queryTotalStatus(){\n"
- " this.productType={... productTypeData}.productType;\n"
- " if( this.productType=='1'){\n"
- " this.showExternal=true;\n"
- " this.totalFormList= {... initialTotalFormList}\n"
- " if(this.threeType=='1'){\n"
- " this.summary= this.totalFormList[0];\n"
- " }else if(this.threeType=='2'){\n"
- " this.summary= this.totalFormList[1];\n"
- " }else if(this.threeType=='3'){\n"
- " this.summary= this.totalFormList[2];\n"
- " }\n"
-
- " }else{\n"
- " this.summary={... initialFormData};\n"
- " }\n"
- " this.channelList={...channelAllList};\n"
- " this.channelList1 = {...channelAllList1};\n"
- " this.powerThresholdList = {...initialYzFormList};\n"
- " this.ysszList = {...channelAllList1};\n"
- " if({...his_alarm}!=null){\n"
- " this.statusData.alarm1 = Object.keys({...his_alarm}).length;\n"
- " var alarmds={...his_alarm};\n"
- " this.his_alarmd=[]\n"
- " for(var i=0;i<Object.keys({...his_alarm}).length ;i++){\n"
- " var open=alarmds[i];\n"
- " open.number=i+1;\n"
- " open.date= (open.date.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " open.waning_context= (open.waning_context.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " if(open.type==0){\n"
- " open.type='电量信息报警'\n"
- " }else if(open.type==1){\n"
- " open.type='传感器报警'\n"
- " }\n"
- " this.his_alarmd.push(open)\n"
- " }\n"
-
- " }\n"
- " if({...sensorc_list}!=null && Object.keys({...sensorc_list}).length>0){\n"
- " let sencorList={...sensorc_list};\n"
- " for(const key in sencorList){\n"
- " if(sencorList[key].info.type==0){ // 温湿度\n"
- " if(sencorList[key].info.status==1){ // 在线\n"
- " try{\n"
- " let sensor_val =sencorList[key].sensor_val\n"
- " this.statusData.temperature=sensor_val[1].val.toFixed(2)\n"
-
- " if(sensor_val[1].s_alarm & 0x1){ // 上限\n"
- " this.statusData.tempcolorStyle='color: red;font-weight: bold;'\n"
- " }else if(sensor_val[1].s_alarm & 0x2){ // 下限\n"
- " this.statusData.tempcolorStyle='color: #ff00ff;font-weight: bold;'\n"
- " }else{\n"
- " this.statusData.tempcolorStyle=''\n"
- " }\n"
-
- " this.statusData.humidity=sensor_val[0].val.toFixed(2)\n"
-
- " if(sensor_val[0].s_alarm & 0x1){ // 上限\n"
- " this.statusData.humcolorStylesx='color: red;font-weight: bold;'\n"
- " }else if(sensor_val[0].s_alarm & 0x2){ // 下限\n"
- " this.statusData.humcolorStylesx='color: #ff00ff;font-weight: bold;'\n"
- " }else{\n"
- " this.statusData.humcolorStylesx=''\n"
- " }\n"
- " }catch (e) {\n"
- " console.log(\"温湿度传感器赋值失败\")\n"
- " }\n"
- " }else{\n"
- " this.statusData.temperatureStatus=0;\n"
- " this.statusData.temperature='离线'\n"
- " this.statusData.humidity='离线'\n"
- " }\n"
-
-
- " }else if(sencorList[key].info.type==1){ // 烟雾\n"
- " if(sencorList[key].info.status==1) { // 在线\n"
- " try{\n"
- " let sensor_val =sencorList[key].sensor_val\n"
- " this.statusData.waterLeak=sensor_val[0].s_alarm.act\n"
- " }catch (e) {\n"
- " console.log(\"烟雾传感器赋值失败\")\n"
- " }\n"
- " }else {\n"
- " this.statusData.waterLeakStatus=0;\n"
- " this.statusData.waterLeak='离线'\n"
- " }\n"
-
- " }else if(sencorList[key].info.type==4){ // C02\n"
- " if(sencorList[key].info.status==1) {\n"
- " // 在线\n"
- " try{\n"
- " let sensor_val =sencorList[key].sensor_val\n"
- " this.statusData.smoke=sensor_val[0].val.toFixed(2)\n"
- " if(sensor_val[0] & 0x1 ){ // 上限\n"
- " this.statusData.smokecolorStylesx='color: red;font-weight: bold;'\n"
- " }else if(sensor_val[0] & 0x2){ // 下限\n"
- " this.statusData.smokecolorStylesx='color: #ff00ff;font-weight: bold;'\n"
- " }else{\n"
- " this.statusData.smokecolorStylesx=''\n"
- " }\n"
- " }catch (e) {\n"
- " console.log(\"CO2传感器赋值失败\")\n"
- " }\n"
- " }else{\n"
- " this.statusData.smokeStatus=0;\n"
- " this.statusData.smoke='离线'\n"
- " }\n"
-
- " }\n"
- " }\n"
- " }\n"
-
-
- " },\n"
-
- " //网络设置\n"
- " wlszForm_vack:null,\n"
- " async queryTotalStatus2(){\n"
- " if(this.wlszForm_vack==null && {...network_data}!=null && Object.keys({...network_data}).length>0){\n"
- " this.wlszForm = {...network_data};\n"
- " this.wlszForm.ipaddr= (this.wlszForm.ipaddr.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm.mask= (this.wlszForm.mask.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm.gateway= (this.wlszForm.gateway.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm.dns1= (this.wlszForm.dns1.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm.dns2= (this.wlszForm.dns2.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm_vack = {...network_data};\n"
- " }\n"
- " },\n"
-
- " //485\n"
- " wlszForm2_vack:null,\n"
- " async queryTotalStatus3(){\n"
- " if( this.wlszForm2_vack==null && {...cas_data}!=null && Object.keys({...cas_data}).length>0){\n"
- " this.wlszForm2 = {...cas_data};\n"
- " this.wlszForm2_vack = {...cas_data};\n"
- " }\n"
- " },\n"
- " // snmp\n"
- " wlszForm3_back:null,\n"
- " async queryTotalStatus4(){\n"
- " if(this.wlszForm3_back==null){\n"
- " if( {...snmp_data}!=null && Object.keys({...snmp_data}).length>0){\n"
- " this.wlszForm3 = {...snmp_data};\n"
- " this.wlszForm3.publics= (this.wlszForm3.publics.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm3.trap_ip= (this.wlszForm3.trap_ip.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm3.mode= this.wlszForm3.mode ;\n"
- " this.wlszForm3.version= this.wlszForm3.version ;\n"
- " this.wlszForm3.trapmode= this.wlszForm3.trapmode ;\n"
- " this.wlszForm3_back = {...snmp_data};\n"
- " // if(this.wlszForm3!=null && this.wlszForm3.version=='SNMP V3'){\n"
- " // this.snmpShow=true;\n"
- " // }else{\n"
- " // this.snmpShow=false;\n"
- " // // this.wlszForm3={}\n"
- " // }\n"
- " }\n"
- " }\n"
-
-
- " },\n"
- " // 设备信息\n"
- " wlszForm4_back:null,\n"
- " async queryTotalStatus5(){\n"
- " if(this.wlszForm4_back==null && {...lang_data}!=null && Object.keys({...lang_data}).length>0){\n"
- " this.wlszForm4 = {...lang_data};\n"
- " this.wlszForm4_back = {...lang_data};\n"
- " this.wlszForm4.ver= (this.wlszForm4.ver.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm5.ver= (this.wlszForm4.ver.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.wlszForm4.sys_time= (this.wlszForm4.sys_time.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
- " this.systemTime=new Date(this.wlszForm4.sys_time);\n"
- " // 计时器为空,操作\n"
- " setInterval(() => {\n"
- " var date= this.systemTime ;\n"
- " var year = date.getFullYear();\n"
- " var month = date.getMonth() + 1 < 10 ? \"0\" + (date.getMonth() + 1) : date.getMonth() + 1;\n"
- " var day = date.getDate() < 10 ? \"0\" + date.getDate() : date.getDate();\n"
- " var hours = date.getHours() < 10 ? \"0\" + date.getHours() : date.getHours();\n"
- " var minutes = date.getMinutes() < 10 ? \"0\" + date.getMinutes() : date.getMinutes();\n"
- " var seconds = date.getSeconds() < 10 ? \"0\" + date.getSeconds() : date.getSeconds();\n"
- " this.dateTime= year + '-' + month + '-' + day + ' ' + hours+ ':' + minutes + ':' + seconds;\n"
- " this.systemTime=new Date(date.getTime()+1000);\n"
- " }, 1000);\n"
- " }\n"
- " },\n"
- " // 三相切换赋值\n"
- " async toggleThreeDevices(type){\n"
- " this.threeType=type;\n"
- " if(type=='1'){\n"
- " this.summary= this.totalFormList[0];\n"
- " }else if(type=='2'){\n"
- " this.summary= this.totalFormList[1];\n"
- " }else if(type=='3'){\n"
- " this.summary= this.totalFormList[2];\n"
- " }\n"
- " },\n"
-
-
- " // 传感器查询\n"
- " async sensorStatusMonitoring(){\n"
- " const params={};\n"
- " params.type=\"listMapQuery\";\n"
- " params.productId=this.productId;\n"
-
-
- " },\n"
- " async channelStatusMonitoring(){\n"
- " const params={};\n"
- " params.type=\"listQuery\";\n"
- " params.productId=this.productId;\n"
-
-
- " },\n"
-
- " showXtsjModal:false,\n"
- " showScfjModal:false,\n"
- " popMessage:'',\n"
- " wlszForm4:{\n"
- " \"lang\": \"\",\n"
- " \"tzone\": \"\",\n"
- " \"route\": \"\",\n"
- " \"ver\": \"\",\n"
- " \"sys_time\":\"\",\n"
- " \"len\": 52\n"
- " },\n"
- " wlszForm5:{\n"
- " \"lang\": \"\",\n"
- " \"tzone\": \"\",\n"
- " \"route\": \"\",\n"
- " \"ver\": \"\",\n"
- " \"sys_time\":\"\",\n"
- " \"len\": 52\n"
- " },\n"
- " showSaveModal: false,\n"
- " popType: '',\n"
- " popMessage:'',\n"
- " sqs:[{\"id\":8,\"name\":\"东8区\"},{\"id\":-8,\"name\":\"西8区\"},{\"id\":0,\"name\":\"任意时区\"}],\n"
- " currentDate: new Date(),\n"
- " selectedDate: null,\n"
- " selectedHour: 12,\n"
- " selectedMinute: 0,\n"
- " selectedSecond: 0,\n"
- " isPickerVisible: false,\n"
- " files: [],\n"
- " isDragover: false,\n"
- " isUploading: false,\n"
- " nextFileId: 1,\n"
- " years:[],\n"
- " months:[],\n"
- " dayAll:[],\n"
- " hours:[],\n"
- " minutes:[],\n"
- " dateForm:{},\n"
- " // 日期新方法\n"
- " get daysNew() {\n"
- " const currentYear = new Date().getFullYear();\n"
- " for (let i = currentYear - 20; i <= currentYear + 5; i++) {\n"
- " this.years.push({\n"
- " id:i,\n"
- " name:i+'年'\n"
- " })\n"
- " };\n"
- " // 初始化月份\n"
- " for (let i = 1; i <= 12; i++) {\n"
- " this.months.push({\n"
- " id:i,\n"
- " name:i+'月'\n"
- " })\n"
- " }\n"
- " this.updateDays();\n"
-
- " for (let i = 0; i < 24; i++) {\n"
- " this.hours.push({\n"
- " id:i,\n"
- " name:i\n"
- " })\n"
- " }\n"
-
- " // 初始化分钟\n"
- " for (let i = 0; i < 60; i++) {\n"
- " this.minutes.push({\n"
- " id:i,\n"
- " name:i\n"
- " })\n"
- " }\n"
- " },\n"
- " updateDays(){\n"
- " if(this.dateForm.year==null || this.dateForm.month==null){\n"
- " return\n"
- " }\n"
- " const year = parseInt(this.dateForm.year);\n"
- " const month = parseInt(this.dateForm.month);\n"
-
- " // 如果年月未选择,默认显示31天\n"
- " let daysInMonth = 1;\n"
-
- " if (year && month) {\n"
- " // 计算所选年月有多少天\n"
- " daysInMonth = new Date(year, month, 0).getDate();\n"
- " }\n"
- " this.dayAll=[];\n"
- " // 添加日期选项\n"
- " for (let i = 1; i <= daysInMonth; i++) {\n"
- " this.dayAll.push({\n"
- " id:i,\n"
- " name:i\n"
- " })\n"
- " }\n"
- " this.dateForm.day=null;\n"
- " },\n"
-
-
- " // 日期选择方法\n"
-
- " showPicker() {\n"
- " // this.dateForm.year='';\n"
- " // this.dateForm.month='';\n"
- " // this.dateForm.day='';\n"
- " // this.dateForm.hour='';\n"
- " // this.dateForm.minute='';\n"
- " // this.dateForm.second='';\n"
- " this.isPickerVisible = true;\n"
- " // 如果没有选择日期,默认使用今天\n"
- " if (!this.selectedDate) {\n"
- " this.selectedDate = new Date();\n"
- " }\n"
- " var date=new Date(this.wlszForm4.sys_time);\n"
- " this.dateForm.year = date.getFullYear();\n"
- " this.dateForm.month = date.getMonth() + 1 < 10 ? (date.getMonth() + 1) : date.getMonth() + 1;\n"
- " if( this.dateForm.month !=null){\n"
- " this.updateDays();\n"
- " }\n"
- " this.dateForm.day = date.getDate() < 10 ? date.getDate() : date.getDate();\n"
- " this.dateForm.hour = date.getHours() < 10 ? date.getHours() : date.getHours();\n"
- " this.dateForm.minute= date.getMinutes() < 10 ? date.getMinutes() : date.getMinutes();\n"
- " this.dateForm.second= date.getSeconds() < 10 ? date.getSeconds() : date.getSeconds();\n"
-
-
- " // 设置当前时间为选择的时间\n"
- " const now = new Date();\n"
- " this.selectedHour = now.getHours();\n"
- " this.selectedMinute = now.getMinutes();\n"
- " this.selectedSecond = now.getSeconds();\n"
- " },\n"
-
-
-
- " clearSelection() {\n"
- " this.selectedDate = null;\n"
- " this.selectedHour = 0;\n"
- " this.selectedMinute = 0;\n"
- " this.selectedSecond = 0;\n"
- " },\n"
-
- " confirmSelection() {\n"
- " var month=this.dateForm.month<10?'0'+this.dateForm.month:this.dateForm.month\n"
- " var day=this.dateForm.day<10?'0'+this.dateForm.day:this.dateForm.day\n"
- " var hour=this.dateForm.hour<10?'0'+this.dateForm.hour:this.dateForm.hour\n"
- " var minute=this.dateForm.minute<10?'0'+this.dateForm.minute:this.dateForm.minute\n"
- " var second=this.dateForm.second<10?'0'+this.dateForm.second:this.dateForm.second\n"
- " this.wlszForm4.sys_time=this.dateForm.year+'-'+month+'-'+day+' '+ hour+':'+ minute+':'+ second;\n"
- " this.isPickerVisible = false;\n"
- " },\n"
-
-
- " async sbxxQuery(){\n"
-
- " // this.wlszForm4= await this.data.data\n"
- " },\n"
-
- " async stxjClick(){\n"
- " this.showSaveModal = true\n"
- " this.popMessage=\"确认要提交吗?\";\n"
- " this.wlszForm4.type=\"NtpSave\";\n"
- " this.saveDataAll=this.wlszForm4;\n"
- " this.popType='sjsz';\n"
- " },\n"
-
- " showXtsjModalClick(){\n"
- " this.clearSelection();\n"
- " this.showXtsjModal=true;\n"
- " },\n"
-
-
- " // 上传附件方法\n"
- " showFjscModalClick(){\n"
- " this.showScfjModal=true;\n"
- " this.wlszForm5=JSON.parse(JSON.stringify( this.wlszForm4));\n"
- " },\n"
-
- " selectFiles() {\n"
- " this.$refs.fileInput.click();\n"
- " },\n"
-
- " handleFileSelect(e) {\n"
- " const selectedFiles = Array.from(e.target.files);\n"
- " this.files = [];\n"
- " this.addFiles(selectedFiles);\n"
- " // 清空input,允许重复选择相同文件\n"
- " e.target.value = '';\n"
- " },\n"
-
- " handleDrop(e) {\n"
- " this.isDragover = false;\n"
- " const droppedFiles = Array.from(e.dataTransfer.files);\n"
- " this.addFiles(droppedFiles);\n"
- " },\n"
-
- " addFiles(fileList) {\n"
- " fileList.forEach(file => {\n"
- " this.files.push({\n"
- " id: this.nextFileId++,\n"
- " file: file,\n"
- " name: file.name,\n"
- " size: file.size,\n"
- " type: file.type,\n"
- " status: 'pending', // pending, uploading, success, error\n"
- " progress: 0\n"
- " });\n"
- " });\n"
- " },\n"
-
-
-
- " clearFiles() {\n"
- " this.files = [];\n"
- " this.showScfjModal=false;\n"
- " },\n"
-
- " async uploadFiles() {\n"
- " if (this.files.length === 0) return;\n"
- " if(this.wlszForm5.ver=='' || this.wlszForm5.ver==null){\n"
- " return\n"
- " }\n"
- " this.isUploading = true;\n"
-
- " for (const fileObj of this.files) {\n"
- " if (fileObj.status === 'success') continue;\n"
- " sys_up_settings(this.wlszForm5.ver,fileObj.file)\n"
- " this.clearFiles()\n"
- " }\n"
-
- " this.isUploading = false;\n"
- " },\n"
-
- " // 初始化事件监听\n"
- " initEventListeners() {\n"
- " document.addEventListener('vue-command', (event) => {\n"
- " if (event.detail.type === 'process') {\n"
- " this.processData(event.detail.source);\n"
- " } else if (event.detail.type === 'update') {\n"
- " this.updateData(event.detail.data);\n"
- " }\n"
- " });\n"
- " }\n"
-
- " }).mount();\n"
-
- " // 将方法暴露到全局\n"
- " window.externalIncrement = () => {\n"
- " app.externalIncrement();\n"
- " };\n"
- " });\n"
- "</script>\n"
- "</body>\n"
-
- "</html>"
- ;
- // 文本数据大小(包括null终止符)
- const size_t p_index_html_size = 68564;
- // 文本长度(字符数)
- const size_t p_index_html_length = 66365;
- #endif /* P_INDEX_HTML_H */
|