index_html.h 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715
  1. /* 自动生成的文本数据头文件 */
  2. /* 源文件: index.html */
  3. /* 文件大小: 68563 字节 */
  4. /* 生成时间: 2025-11-21 06:01:53 */
  5. /* 编码: utf-8 */
  6. #ifndef P_INDEX_HTML_H
  7. #define P_INDEX_HTML_H
  8. #include <stddef.h>
  9. // 文本数据(UTF-8编码)
  10. const char *p_index_html =
  11. "<!DOCTYPE html>\n"
  12. "<html>\n"
  13. "<head>\n"
  14. " <meta charset=\"UTF-8\">\n"
  15. " <!--<meta http-equiv=\"refresh\" content=\"0; url=/src/index2.html\">-->\n"
  16. " <!-- 0表示立即跳转 -->\n"
  17. " <script src=\"api/petite-vue.min.js\" defer></script>\n"
  18. " <!--<script src=\"./api/axios.min.js\"></script>-->\n"
  19. " <script src=\"api/data.js\"></script>\n"
  20. " <script src=\"api/ws.js\"></script>\n"
  21. " <script src=\"api/display_data.js\"></script>\n"
  22. " <script src=\"api/operation.js\"></script>\n"
  23. " <script src=\"api/channel_display.js\"></script>\n"
  24. " <!--<script src=\"./api/pagination.js\"></script>-->\n"
  25. " <!--<script src=\"./api/Threshold_Adjust.js\"></script>-->\n"
  26. " <!--<script src=\"./api/system_alarm.js\"></script>-->\n"
  27. " <script src=\"api/sys_paras.js\"></script>\n"
  28. " <!-- CSS 文件 -->\n"
  29. " <link rel=\"stylesheet\" href=\"css/index.css\">\n"
  30. "</head>\n"
  31. "<body>\n"
  32. "<div class=\"tab-container\">\n"
  33. " <div class=\"tab-header\">\n"
  34. " <button class=\"tab-btn active\" style=\"margin-left: 30%;\" data-tab=\"tab1\">状态监控</button>\n"
  35. " <button class=\"tab-btn\" data-tab=\"tab2\">⽹络配置</button>\n"
  36. " <button class=\"tab-btn\" data-tab=\"tab3\">485配置</button>\n"
  37. " <button class=\"tab-btn\" data-tab=\"tab4\">SNMP</button>\n"
  38. " <button class=\"tab-btn\" data-tab=\"tab5\">设备信息</button>\n"
  39. " <span style=\"text-align: center;line-height: 50px;margin-left: 20%;\">{{dateTime}}</span>\n"
  40. " </div>\n"
  41. " <div class=\"tab-content active\" id=\"tab1\">\n"
  42. " <!--<iframe class=\"tab-iframe\" src=\"/src/pdu.html\"></iframe>-->\n"
  43. " <div id=\"app\" @vue:mounted=\"fetchData\" class=\"container\">\n"
  44. " <!-- 上部:总设备信息 -->\n"
  45. " <div class=\"summary-section\">\n"
  46. " <div class=\"left-buttons\">\n"
  47. " <button v-show=\"showExternal\" @click=\"toggleThreeDevices(1)\" class=\"btn btn-energy\">L1</button>\n"
  48. " <button v-show=\"showExternal\" @click=\"toggleThreeDevices(2)\" class=\"btn btn-threshold\">L2</button>\n"
  49. " <button v-show=\"showExternal\" @click=\"toggleThreeDevices(3)\" class=\"btn btn-delay\">L3</button>\n"
  50. " </div>\n"
  51. " <div class=\"button-container\">\n"
  52. " <div class=\"left-buttons\">\n"
  53. " <button @click=\"showFzszModal = true;\" class=\"btn btn-threshold\">阈值设置</button>\n"
  54. " <button @click=\"showysszModal=true\" class=\"btn btn-delay\">延时设置</button>\n"
  55. " <button @click=\" hdlsz()\" class=\"btn btn-energy\">耗电量重置</button>\n"
  56. " </div>\n"
  57. " <div class=\"right-buttons\">\n"
  58. " <button @click=\"toggleAllDevices(true)\" class=\" btn btn-energy\">总开</button>\n"
  59. " <button @click=\"toggleAllDevices(false)\" class=\"btn btn-close\">总关</button>\n"
  60. " </div>\n"
  61. " </div>\n"
  62. " <table class=\"summary-table\">\n"
  63. " <thead>\n"
  64. " <tr>\n"
  65. " <th>总电压(V)</th>\n"
  66. " <th>总电流(A)</th>\n"
  67. " <th>总功率(KW)</th>\n"
  68. " <!--<th>总频率(HZ)</th>-->\n"
  69. " <th>总耗电量(Kwh)</th>\n"
  70. " </tr>\n"
  71. " </thead>\n"
  72. " <tbody style=\"height: 50px;\">\n"
  73. " <tr>\n"
  74. " <td>{{ summary.totalVoltage }}</td>\n"
  75. " <td>{{ summary.totalCurrent }}</td>\n"
  76. " <td >{{ summary.totalPower }}</td>\n"
  77. " <!--<td >{{ summary.totalFrequency }}</td>-->\n"
  78. " <td >{{ summary.totalEnergy }}</td>\n"
  79. " </tr>\n"
  80. " </tbody>\n"
  81. " </table>\n"
  82. " <div class=\"summary-actions\">\n"
  83. " </div>\n"
  84. " </div>\n"
  85. " <!-- 中部:设备管理列表 -->\n"
  86. " <div class=\"table-container\">\n"
  87. " <div class=\"scrollable-table\">\n"
  88. " <table class=\"device-table\">\n"
  89. " <thead>\n"
  90. " <tr>\n"
  91. " <th>通道名称</th>\n"
  92. " <th>相序</th>\n"
  93. " <th>电压(V)</th>\n"
  94. " <th>电流(A)</th>\n"
  95. " <th>功率(W)</th>\n"
  96. " <th>频率(HZ)</th>\n"
  97. " <th>耗电量(Kwh)</th>\n"
  98. " <th>开启延时(S)</th>\n"
  99. " <th>关闭延时(S)</th>\n"
  100. " <th>状态</th>\n"
  101. " <th>操作</th>\n"
  102. " </tr>\n"
  103. " </thead>\n"
  104. " <tbody>\n"
  105. " <tr v-for=\"device in channelList\">\n"
  106. " <td >{{ device.productChName }}</td>\n"
  107. " <td >{{ device.productPhOrder }}</td>\n"
  108. " <td v-if=\"device.colorStyledy!=''\" :style=\"device.colorStyledy\">{{ device.productChVoltage }}</td>\n"
  109. " <td v-else :style=\"device.colorStyledy2\">{{ device.productChVoltage }}</td>\n"
  110. " <td :style=\"device.colorStyledl\">{{ device.productChCurrent }}</td>\n"
  111. " <td :style=\"device.colorStylegl\">{{ device.productChPower }}</td>\n"
  112. " <td>{{ device.productChPowerFreq }}</td>\n"
  113. " <td :style=\"device.colorStylehdl\">{{ device.productChConsumption }}</td>\n"
  114. " <td >{{ device.firingInterval }}</td>\n"
  115. " <td >{{ device.closeInterval }}</td>\n"
  116. " <td :class=\"device.productChStatus ? 'status-active' : 'status-inactive'\">\n"
  117. " {{ device.productChStatus==1 ? '接通' : '断开' }}\n"
  118. " </td>\n"
  119. " <td>\n"
  120. " <button @click=\"toggleDeviceStatus(device)\"\n"
  121. " :class=\"device.productChStatus ? 'btn btn-close' : 'btn btn-on'\">\n"
  122. " {{ device.productChStatus==1 ? '关闭' : '开启' }}\n"
  123. " </button>\n"
  124. " </td>\n"
  125. " </tr>\n"
  126. " </tbody>\n"
  127. " </table>\n"
  128. " </div>\n"
  129. " </div>\n"
  130. " <!-- 下部:状态显示 -->\n"
  131. " <div class=\"status-section\">\n"
  132. " <div class=\"status-boxes\">\n"
  133. " <div class=\"status-box\">\n"
  134. " <h3>温度</h3>\n"
  135. " <p v-if=\"statusData.temperatureStatus==0\" style=\"color: red\">{{ statusData.temperature }}</p>\n"
  136. " <p v-else :style=\"statusData.tempcolorStyle\">{{ statusData.temperature }} </p>\n"
  137. " </div>\n"
  138. " <div class=\"status-box\">\n"
  139. " <h3>湿度</h3>\n"
  140. " <p v-if=\"statusData.temperatureStatus==0\" style=\"color: red\">{{ statusData.humidity }}</p>\n"
  141. " <p v-else :style=\"statusData.humcolorStylesx\">{{ statusData.humidity }} </p>\n"
  142. " </div>\n"
  143. " <div class=\"status-box\">\n"
  144. " <h3>烟雾</h3>\n"
  145. " <p v-if=\"statusData.waterLeakStatus==0\" style=\"color: red\">{{ statusData.waterLeak }}</p>\n"
  146. " <p v-else>{{ statusData.waterLeak }} </p>\n"
  147. " </div>\n"
  148. " <div class=\"status-box\">\n"
  149. " <h3>CO2</h3>\n"
  150. " <p v-if=\"statusData.smokeStatus==0\" style=\"color: red\">{{ statusData.smoke }}</p>\n"
  151. " <p v-else :style=\"statusData.smokecolorStylesx\">{{ statusData.smoke }} </p>\n"
  152. " </div>\n"
  153. " <div class=\"status-box\" @click=\"showFzszModalgj=true\" style=\" cursor: pointer; position: relative; \">\n"
  154. " <h3>报警</h3>\n"
  155. " <p>{{ statusData.alarm1 }}</p>\n"
  156. " </div>\n"
  157. " </div>\n"
  158. " </div>\n"
  159. " <!-- 耗电量设置弹窗内容 -->\n"
  160. " <div v-if=\"showFormModal\" class=\"modal-overlay\" >\n"
  161. " <div class=\"modal-content\">\n"
  162. " <h2>耗电量重置</h2>\n"
  163. " <!-- 下拉选择 -->\n"
  164. " <div class=\"form-group\" >\n"
  165. " <label>通道:</label>\n"
  166. " <div class=\"select-header\">\n"
  167. " <p class=\"hint\">提示:使用Ctrl/Cmd键进行多选</p>\n"
  168. " <button class=\"select-all\" @click=\"toggleSelectAll2\">\n"
  169. " {{ formData.productChIds.length === Object.keys(channelList1).length ? '取消全选' : '全选' }}\n"
  170. " </button>\n"
  171. " </div>\n"
  172. " <select v-model=\"formData.productChIds\" multiple >\n"
  173. " <option v-for=\"option in channelList1\" :value=\"option.productChId\">{{ option.productChName }}</option>\n"
  174. " </select>\n"
  175. " <div class=\"selected-items\">\n"
  176. " <h3>已选通道:</h3>\n"
  177. " <div class=\"selected-tags\">\n"
  178. " <span v-if=\"formData.productChIds.length === 0\" class=\"no-selection\">暂无选择</span>\n"
  179. " <div v-for=\"id in formData.productChIds\" :key=\"id\" class=\"tag\">\n"
  180. " {{ getOptionName2(id) }}\n"
  181. " <button @click=\"removeOption2(id)\">×</button>\n"
  182. " </div>\n"
  183. " </div>\n"
  184. " </div>\n"
  185. " <!--<label>通道:</label>-->\n"
  186. " <!--<select v-model=\"formData.channel_power_infro\" class=\"custom-select\">-->\n"
  187. " <!--<option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择耗电量复位通道...</option>-->\n"
  188. " <!--<option v-for=\"option in channelList1\" :value=\"option.channel_power_infro\">{{ option.productChName }}</option>-->\n"
  189. " <!--</select>-->\n"
  190. " </div>\n"
  191. " <!-- 表单按钮 -->\n"
  192. " <div class=\"form-actions\">\n"
  193. " <button type=\"button\" class=\"btn btn-energy\" @click=\"hdlczClickClose()\">取消</button>\n"
  194. " <button class=\"btn btn-energy\" @click=\"hdlczClick()\" >提交</button>\n"
  195. " </div>\n"
  196. " </div>\n"
  197. " </div>\n"
  198. " <!-- 阈值设置弹窗内容 -->\n"
  199. " <div @vue:mounted=\"fzszData\" v-if=\"showFzszModal\" class=\"modal-overlay\" >\n"
  200. " <div class=\"modal-content\" style=\"max-width: 100%;overflow-y: hidden\">\n"
  201. " <h2>阈值设置</h2>\n"
  202. " <button @click=\"handleUpdateList()\" style=\"margin: 10px;\" :class=\" 'btn btn-on'\">批量设置 </button>\n"
  203. " <div class=\"scrollable-table\" style=\" max-height: 60vh; \">\n"
  204. " <table class=\"device-table\">\n"
  205. " <thead>\n"
  206. " <tr>\n"
  207. " <th>通道名称</th>\n"
  208. " <th>通道号</th>\n"
  209. " <th>电流上限</th>\n"
  210. " <th>电压上限</th>\n"
  211. " <th>电压下限</th>\n"
  212. " <th>功率上限</th>\n"
  213. " <th>耗电量上限</th>\n"
  214. " <th>操作</th>\n"
  215. " </tr>\n"
  216. " </thead>\n"
  217. " <tbody>\n"
  218. " <tr v-for=\"power in powerThresholdList\" :key=\"power.productChId\">\n"
  219. " <td>{{ power.productChName }}</td>\n"
  220. " <td>{{ power.productChId }}</td>\n"
  221. " <td>{{ power.currentUpperAction }}</td>\n"
  222. " <td>{{ power.voltageUpperAction }}</td>\n"
  223. " <td>{{ power.voltageDownAction }}</td>\n"
  224. " <td>{{ power.powerUpperAction }}</td>\n"
  225. " <td>{{ power.alarmContentUpperAction }}</td>\n"
  226. " <td>\n"
  227. " <button @click=\"handleUpdate(power)\" :class=\" 'btn btn-on'\">\n"
  228. " {{ '设置' }}\n"
  229. " </button>\n"
  230. " </td>\n"
  231. " </tr>\n"
  232. " </tbody>\n"
  233. " </table>\n"
  234. " </div>\n"
  235. " <!-- 表单按钮 -->\n"
  236. " <div class=\"button-footer form-actions\">\n"
  237. " <button type=\"button\" class=\"btn btn-energy\" @click=\"fzscClickClose()\">取消</button>\n"
  238. " </div>\n"
  239. " </div>\n"
  240. " </div>\n"
  241. " <!-- 阈值设置单设备弹窗内容 -->\n"
  242. " <div v-if=\"showFzszModal2\" class=\"modal-overlay\" >\n"
  243. " <div class=\"modal-content\">\n"
  244. " <div class=\"form-group\" v-if=\"fzscData.list=='1'\" >\n"
  245. " <label>通道:</label>\n"
  246. " <div class=\"select-header\">\n"
  247. " <p class=\"hint\">提示:使用Ctrl/Cmd键进行多选</p>\n"
  248. " <button class=\"select-all\" @click=\"toggleSelectAll\">\n"
  249. " {{ fzscData.productChIds.length === Object.keys(channelList1).length ? '取消全选' : '全选' }}\n"
  250. " </button>\n"
  251. " </div>\n"
  252. " <select v-model=\"fzscData.productChIds\" multiple >\n"
  253. " <option v-for=\"option in channelList1\" :value=\"option.productChId\">{{ option.productChName }}</option>\n"
  254. " </select>\n"
  255. " <div class=\"selected-items\">\n"
  256. " <h3>已选通道:</h3>\n"
  257. " <div class=\"selected-tags\">\n"
  258. " <span v-if=\"fzscData.productChIds.length === 0\" class=\"no-selection\">暂无选择</span>\n"
  259. " <div v-for=\"id in fzscData.productChIds\" :key=\"id\" class=\"tag\">\n"
  260. " {{ getOptionName(id) }}\n"
  261. " <button @click=\"removeOption(id)\">×</button>\n"
  262. " </div>\n"
  263. " </div>\n"
  264. " </div>\n"
  265. " </div>\n"
  266. " <div class=\"form-group\" v-if=\"fzscData.list==''\">\n"
  267. " <label>通道号:</label>\n"
  268. " <input type=\"text\" v-model=\"fzscData.productChId\" readonly >\n"
  269. " </div>\n"
  270. " <div class=\"form-group\" >\n"
  271. " <label>电流上限:</label>\n"
  272. " <input type=\"text\" v-model=\"fzscData.currentUpperAction\">\n"
  273. " </div>\n"
  274. " <div class=\"form-group\" >\n"
  275. " <label>电压上限:</label>\n"
  276. " <input type=\"text\" v-model=\"fzscData.voltageUpperAction\">\n"
  277. " </div>\n"
  278. " <div class=\"form-group\" >\n"
  279. " <label>电压下限:</label>\n"
  280. " <input type=\"text\" v-model=\"fzscData.voltageDownAction\">\n"
  281. " </div>\n"
  282. " <div class=\"form-group\" >\n"
  283. " <label>功率上限:</label>\n"
  284. " <input type=\"text\" v-model=\"fzscData.powerUpperAction\">\n"
  285. " </div>\n"
  286. " <div class=\"form-group\" >\n"
  287. " <label>耗电量上限:</label>\n"
  288. " <input type=\"text\" v-model=\"fzscData.alarmContentUpperAction\">\n"
  289. " </div>\n"
  290. " <!-- 表单按钮 -->\n"
  291. " <div class=\"form-actions\">\n"
  292. " <button class=\"btn btn-energy\" @click=\"fzscClick()\" >提交</button>\n"
  293. " <button type=\"button\" class=\"btn btn-energy\" @click=\"fzscClickClose2()\">取消</button>\n"
  294. " </div>\n"
  295. " </div>\n"
  296. " </div>\n"
  297. " <!-- 延时设置列表 -->\n"
  298. " <div @vue:mounted=\"ysszData\" v-if=\"showysszModal\" class=\"modal-overlay\" >\n"
  299. " <div class=\"modal-content\" style=\"max-width: 100%;overflow-y: hidden\">\n"
  300. " <h2>延时设置</h2>\n"
  301. " <div class=\"scrollable-table\" style=\" max-height: 60vh; \">\n"
  302. " <table class=\"device-table\">\n"
  303. " <thead>\n"
  304. " <tr>\n"
  305. " <th>通道名称</th>\n"
  306. " <th>通道号</th>\n"
  307. " <th>开启时间</th>\n"
  308. " <th>关闭时间</th>\n"
  309. " <th>操作</th>\n"
  310. " </tr>\n"
  311. " </thead>\n"
  312. " <tbody>\n"
  313. " <tr v-for=\"power in ysszList\" :key=\"power.productChId\">\n"
  314. " <td>{{ power.productChName }}</td>\n"
  315. " <td>{{ power.productChId }}</td>\n"
  316. " <td>{{ power.firingInterval }}</td>\n"
  317. " <td>{{ power.closeInterval }}</td>\n"
  318. " <td>\n"
  319. " <button @click=\"ysszhandleUpdate(power)\" :class=\" 'btn btn-on'\">\n"
  320. " {{ '设置' }}\n"
  321. " </button>\n"
  322. " </td>\n"
  323. " </tr>\n"
  324. " </tbody>\n"
  325. " </table>\n"
  326. " </div>\n"
  327. " <!-- 表单按钮 -->\n"
  328. " <div class=\"button-footer form-actions\">\n"
  329. " <button type=\"button\" class=\"btn btn-energy\" @click=\"ysszClickClose()\">取消</button>\n"
  330. " </div>\n"
  331. " </div>\n"
  332. " </div>\n"
  333. " <!-- 延时设置内容 -->\n"
  334. " <div v-if=\"showysszModal2\" class=\"modal-overlay2\" >\n"
  335. " <div class=\"modal-content\">\n"
  336. " <div class=\"form-group\" >\n"
  337. " <label>通道号:</label>\n"
  338. " <input type=\"text\" v-model=\"ysszData2.productChId\" readonly >\n"
  339. " </div>\n"
  340. " <div class=\"form-group\" >\n"
  341. " <label>开启时间(S):</label>\n"
  342. " <input type=\"text\" v-model=\"ysszData2.firingInterval\">\n"
  343. " </div>\n"
  344. " <div class=\"form-group\" >\n"
  345. " <label>关闭时间(S):</label>\n"
  346. " <input type=\"text\" v-model=\"ysszData2.closeInterval\">\n"
  347. " </div>\n"
  348. " <!-- 表单按钮 -->\n"
  349. " <div class=\"form-actions\">\n"
  350. " <button class=\"btn btn-energy\" @click=\"ysszClick()\" >提交</button>\n"
  351. " <button type=\"button\" class=\"btn btn-energy\" @click=\"ysszClickClose2()\">取消</button>\n"
  352. " </div>\n"
  353. " </div>\n"
  354. " </div>\n"
  355. " <!--告警信息弹窗-->\n"
  356. " <div v-if=\"showFzszModalgj\" class=\"modal-overlay\" >\n"
  357. " <div class=\"modal-content\" style=\"max-width: 100%;overflow-y: hidden\">\n"
  358. " <div class=\"scrollable-table\" style=\" max-height: 60vh; \">\n"
  359. " <table class=\"device-table\">\n"
  360. " <thead>\n"
  361. " <tr>\n"
  362. " <th>序号</th>\n"
  363. " <th>报警时间</th>\n"
  364. " <th>报警类型</th>\n"
  365. " <th>报警信息</th>\n"
  366. " </tr>\n"
  367. " </thead>\n"
  368. " <tbody>\n"
  369. " <tr v-for=\"(item, index) in his_alarmd\" :key=\"index\">\n"
  370. " <td>{{ item.number }}</td>\n"
  371. " <td>{{ item.date }}</td>\n"
  372. " <td>{{ item.type }}</td>\n"
  373. " <td>{{ item.waning_context }}</td>\n"
  374. " </tr>\n"
  375. " </tbody>\n"
  376. " </table>\n"
  377. " </div>\n"
  378. " <!-- 表单按钮 -->\n"
  379. " <div class=\"button-footer form-actions\">\n"
  380. " <button type=\"button\" class=\"btn btn-energy\" @click=\"fzscClickClosegj()\">取消</button>\n"
  381. " </div>\n"
  382. " </div>\n"
  383. " </div>\n"
  384. " </div>\n"
  385. " </div>\n"
  386. "<!--网络配置-->\n"
  387. " <div class=\"tab-content\" id=\"tab2\" @vue:mounted=\"wkszQuery\">\n"
  388. " <div >\n"
  389. " <div class=\"modal-content\">\n"
  390. " <div class=\"form-group\" >\n"
  391. " <label>选择模式:</label>\n"
  392. " <select v-model=\"wlszForm.mode\" class=\"custom-select\">\n"
  393. " <option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>\n"
  394. " <option v-for=\"option in modes\" :value=\"option.id\">{{ option.name }}</option>\n"
  395. " </select>\n"
  396. " </div>\n"
  397. " <div class=\"form-group\" >\n"
  398. " <label>IP:</label>\n"
  399. " <input type=\"text\" v-model=\"wlszForm.ipaddr\" >\n"
  400. " </div>\n"
  401. " <div class=\"form-group\" >\n"
  402. " <label>掩码:</label>\n"
  403. " <input type=\"text\" v-model=\"wlszForm.mask\" >\n"
  404. " </div>\n"
  405. " <div class=\"form-group\" >\n"
  406. " <label>网关:</label>\n"
  407. " <input type=\"text\" v-model=\"wlszForm.gateway\" >\n"
  408. " </div>\n"
  409. " <div class=\"form-group\" >\n"
  410. " <label>DNS1:</label>\n"
  411. " <input type=\"text\" v-model=\"wlszForm.dns1\" >\n"
  412. " </div>\n"
  413. " <div class=\"form-group\" >\n"
  414. " <label>DNS2:</label>\n"
  415. " <input type=\"text\" v-model=\"wlszForm.dns2\" >\n"
  416. " </div>\n"
  417. " <!--<div class=\"form-group\" >-->\n"
  418. " <!--<label>DHCP:</label>-->\n"
  419. " <!--<input type=\"text\" v-model=\"wlszForm.dhcp\" >-->\n"
  420. " <!--</div>-->\n"
  421. " <!-- 表单按钮 -->\n"
  422. " <div class=\"form-actions\">\n"
  423. " <button class=\"btn btn-energy\" @click=\"submitForm('wksz')\" >确定</button>\n"
  424. " </div>\n"
  425. " </div>\n"
  426. " </div>\n"
  427. " </div>\n"
  428. " <!--485配置-->\n"
  429. " <div class=\"tab-content\" id=\"tab3\" @vue:mounted=\"rsQuery\">\n"
  430. " <div class=\"modal-content\">\n"
  431. " <div class=\"form-group\" >\n"
  432. " <select v-model=\"wlszForm2.mode\" class=\"custom-select\">\n"
  433. " <option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择耗电量复位通道...</option>\n"
  434. " <option v-for=\"option in modes2\" :value=\"option.id\">{{ option.name }}</option>\n"
  435. " </select>\n"
  436. " </div>\n"
  437. " <div class=\"form-group\" >\n"
  438. " <label>地址:</label>\n"
  439. " <input type=\"text\" v-model=\"wlszForm2.addr\" >\n"
  440. " </div>\n"
  441. " <div class=\"form-group\" >\n"
  442. " <label>波特率:</label>\n"
  443. " <input type=\"text\" v-model=\"wlszForm2.baud\" >\n"
  444. " </div>\n"
  445. " <!-- 表单按钮 -->\n"
  446. " <div class=\"form-actions\">\n"
  447. " <button class=\"btn btn-energy\" @click=\"submitForm('rs')\" >确定</button>\n"
  448. " </div>\n"
  449. " </div>\n"
  450. " </div>\n"
  451. " <!--SNMP配置-->\n"
  452. " <div class=\"tab-content\" id=\"tab4\" >\n"
  453. " <div class=\"modal-content\">\n"
  454. " <div class=\"form-group\" >\n"
  455. " <label>社团项:</label>\n"
  456. " <input type=\"text\" v-model=\"wlszForm3.publics\" >\n"
  457. " </div>\n"
  458. " <!--<div class=\"form-group\" >-->\n"
  459. " <!--<label>Trap IP:</label>-->\n"
  460. " <!--<select v-model=\"wlszForm3.version\" @change=\"handleChange\" class=\"custom-select\">-->\n"
  461. " <!--<option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>-->\n"
  462. " <!--<option v-for=\"option in SNMPs\" :value=\"option.id\">{{ option.name }}</option>-->\n"
  463. " <!--</select>-->\n"
  464. " <!--</div>-->\n"
  465. " <div class=\"form-group\" >\n"
  466. " <label>Trap IP:</label>\n"
  467. " <input type=\"text\" v-model=\"wlszForm3.trap_ip\" >\n"
  468. " </div>\n"
  469. " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
  470. " <!--<label>用户名:</label>-->\n"
  471. " <!--<input type=\"text\" v-model=\"wlszForm3.yhm\" >-->\n"
  472. " <!--</div>-->\n"
  473. " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
  474. " <!--<label>认证协议:</label>-->\n"
  475. " <!--<select v-model=\"wlszForm3.mode\" class=\"custom-select\">-->\n"
  476. " <!--<option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>-->\n"
  477. " <!--<option v-for=\"option in rzxys\" :value=\"option.id\">{{ option.name }}</option>-->\n"
  478. " <!--</select>-->\n"
  479. " <!--</div>-->\n"
  480. " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
  481. " <!--<label>认证密码:</label>-->\n"
  482. " <!--<input type=\"text\" v-model=\"wlszForm3.rzmm\" >-->\n"
  483. " <!--</div>-->\n"
  484. " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
  485. " <!--<label>加密协议:</label>-->\n"
  486. " <!--<select v-model=\"wlszForm3.trapmode\" class=\"custom-select\">-->\n"
  487. " <!--<option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>-->\n"
  488. " <!--<option v-for=\"option in jmxys\" :value=\"option.id\">{{ option.name }}</option>-->\n"
  489. " <!--</select>-->\n"
  490. " <!--</div>-->\n"
  491. " <!--<div class=\"form-group\" v-if=\"snmpShow\">-->\n"
  492. " <!--<label>加密密码:</label>-->\n"
  493. " <!--<input type=\"text\" v-model=\"wlszForm3.jmmm\" >-->\n"
  494. " <!--</div>-->\n"
  495. " <!-- 表单按钮 -->\n"
  496. " <div class=\"form-actions\">\n"
  497. " <button class=\"btn btn-energy\" @click=\"submitForm('snmp')\" >确定</button>\n"
  498. " </div>\n"
  499. " </div>\n"
  500. " </div>\n"
  501. " <!--设备信息-->\n"
  502. " <div class=\"tab-content\" id=\"tab5\" >\n"
  503. " <!--<iframe class=\"tab-iframe\" src=\"/src/sbsz.html\"></iframe>-->\n"
  504. " <div class=\"divAll\" >\n"
  505. " <!--设备信息-->\n"
  506. " <div class=\"modal-content\" @vue:mounted=\"sbxxQuery\">\n"
  507. " <div class=\"form-group\" >\n"
  508. " <label>系统时间:</label>\n"
  509. " <input type=\"text\" style=\"width: 70%\" v-model=\"wlszForm4.sys_time\" >\n"
  510. " <button style=\"margin-left: 10px;\" class=\"btn btn-energy\" @click=\"showXtsjModalClick()\">设置</button>\n"
  511. " </div>\n"
  512. " <div class=\"form-group\" >\n"
  513. " <label>固件版本:</label>\n"
  514. " <input type=\"text\" style=\"width: 70%\" v-model=\"wlszForm4.ver\" >\n"
  515. " <!--<button style=\"margin-left: 10px;\" class=\"btn btn-energy\" @click=\"showFjscModalClick()\" >升级</button>-->\n"
  516. " </div>\n"
  517. " </div>\n"
  518. " <!--设备系统时间设置-->\n"
  519. " <div v-if=\"showXtsjModal\" class=\"modal-overlay2\" >\n"
  520. " <div class=\"modal-content\" >\n"
  521. " <h2>时间设置</h2>\n"
  522. " <!-- 下拉选择 -->\n"
  523. " <div class=\"form-group\" >\n"
  524. " <label>时区:</label>\n"
  525. " <select v-model=\"wlszForm4.tzone\" class=\"custom-select\">\n"
  526. " <option :value=\"null\" disabled selected hidden style=\"color: #aaa;\">请选择...</option>\n"
  527. " <option v-for=\"option in sqs\" :value=\"option.id\">{{ option.name }}</option>\n"
  528. " </select>\n"
  529. " </div>\n"
  530. " <div class=\"form-group\" >\n"
  531. " <label for=\"selectedDate\">选择日期:</label>\n"
  532. " <div class=\"date-input-container\">\n"
  533. " <input\n"
  534. " v-model=\"wlszForm4.sys_time\"\n"
  535. " type=\"text\"\n"
  536. " id=\"selectedDate\"\n"
  537. " class=\"date-input\"\n"
  538. " placeholder=\"点击选择日期\"\n"
  539. " @click=\"showPicker\"\n"
  540. " >\n"
  541. " <div class=\"calendar-icon\">\n"
  542. " <i class=\"fas fa-calendar-alt\"></i>\n"
  543. " </div>\n"
  544. " </div>\n"
  545. " <!--<div class=\"datetime-modal\" v-if=\"isPickerVisible\">-->\n"
  546. " <div class=\"modal-overlay2\" v-if=\"isPickerVisible\">\n"
  547. " <div class=\"modal-content\">\n"
  548. " <div class=\"form-group\" >\n"
  549. " <label>日期:</label>\n"
  550. " <select v-model=\"dateForm.year\" style=\"width: 25%\" >\n"
  551. " <option v-for=\"option in years\" :value=\"option.id\">{{ option.name }}</option>\n"
  552. " </select>\n"
  553. " <select v-model=\"dateForm.month\" @change=\"updateDays\" style=\"width: 25%\" >\n"
  554. " <option v-for=\"option in months\" :value=\"option.id\">{{ option.name }}</option>\n"
  555. " </select>\n"
  556. " <select v-model=\"dateForm.day\" style=\"width: 25%\" >\n"
  557. " <option v-for=\"option in dayAll\" :value=\"option.id\">{{ option.name }}</option>\n"
  558. " </select>\n"
  559. " </div>\n"
  560. " <div class=\"form-group\" >\n"
  561. " <label>时间:</label>\n"
  562. " <select v-model=\"dateForm.hour\" style=\"width: 25%\" >\n"
  563. " <option v-for=\"option in hours\" :value=\"option.id\">{{ option.name }}</option>\n"
  564. " </select>\n"
  565. " <select v-model=\"dateForm.minute\" style=\"width: 25%\" >\n"
  566. " <option v-for=\"option in minutes\" :value=\"option.id\">{{ option.name }}</option>\n"
  567. " </select>\n"
  568. " <select v-model=\"dateForm.second\" style=\"width: 25%\" >\n"
  569. " <option v-for=\"option in minutes\" :value=\"option.id\">{{ option.name }}</option>\n"
  570. " </select>\n"
  571. " </div>\n"
  572. " <button class=\"btn btn-energy\" @click=\"confirmSelection\"> 确认 </button>\n"
  573. " <button class=\"btn btn-energy\" @click=\"isPickerVisible = false\">取消 </button>\n"
  574. " </div>\n"
  575. " </div>\n"
  576. " </div>\n"
  577. " <!-- 表单按钮 -->\n"
  578. " <div class=\"form-actions\" >\n"
  579. " <button class=\"btn btn-energy\" @click=\"stxjClick()\" >提交</button>\n"
  580. " <button type=\"button\" class=\"btn btn-energy\" @click=\"showXtsjModal=false\">取消</button>\n"
  581. " </div>\n"
  582. " </div>\n"
  583. " </div>\n"
  584. " <!--附件上传-->\n"
  585. " <div v-if=\"showScfjModal\" class=\"modal-overlay2\" >\n"
  586. " <div class=\"upload-container\" style=\" background: white;width: 400px\">\n"
  587. " <div class=\"form-group\" >\n"
  588. " <label>固件版本:</label>\n"
  589. " <input type=\"text\" style=\"width: 100%\" v-model=\"wlszForm5.ver\" >\n"
  590. " </div>\n"
  591. " <div class=\"upload-area\"\n"
  592. " :class=\"{ dragover: isDragover }\"\n"
  593. " @click=\"selectFiles\"\n"
  594. " @dragover.prevent=\"isDragover = true\"\n"
  595. " @dragleave=\"isDragover = false\"\n"
  596. " @drop.prevent=\"handleDrop\">\n"
  597. " <div class=\"upload-text\">\n"
  598. " <h3>拖放文件到此处上传或选择文件</h3>\n"
  599. " <!--<p>支持单个或多个文件上传,最大支持200MB</p>-->\n"
  600. " </div>\n"
  601. " <input type=\"file\" class=\"file-input\" multiple @change=\"handleFileSelect\" ref=\"fileInput\">\n"
  602. " </div>\n"
  603. " <div class=\"files-list\" v-if=\"files.length > 0\">\n"
  604. " <h3>已选择文件 ({{ files.length }})</h3>\n"
  605. " <div class=\"file-item\" v-for=\"file in files\" :key=\"file.id\">\n"
  606. " <div class=\"file-info\">\n"
  607. " <div class=\"file-name\">{{ file.name }}</div>\n"
  608. " </div>\n"
  609. " </div>\n"
  610. " </div>\n"
  611. " <div class=\"actions\">\n"
  612. " <button class=\"btn\" @click=\"uploadFiles\" :disabled=\"files.length === 0 || isUploading || wlszForm5.ver==''\">\n"
  613. " <i class=\"fas fa-upload\"></i> 保存\n"
  614. " </button>\n"
  615. " <button class=\"btn btn-secondary\" @click=\"clearFiles\" >\n"
  616. " <i class=\"fas fa-times\"></i> 取消\n"
  617. " </button>\n"
  618. " </div>\n"
  619. " </div>\n"
  620. " </div>\n"
  621. " </div>\n"
  622. " </div>\n"
  623. " <!-- 保存确认弹框 -->\n"
  624. " <div class=\"modal-overlay2\" v-if=\"showSaveModal\">\n"
  625. " <div class=\"modal-content\">\n"
  626. " <h2>系统提示</h2>\n"
  627. " <p>{{popMessage}}</p>\n"
  628. " <div class=\"form-actions\">\n"
  629. " <button class=\"btn btn-energy\" @click=\"showSaveModal = false\">取消</button>\n"
  630. " <button class=\"btn btn-energy\" @click=\"saveData12()\">确定</button>\n"
  631. " </div>\n"
  632. " </div>\n"
  633. " </div>\n"
  634. "</div>\n"
  635. "<script type=\"module\">\n"
  636. " let activePageIntervalId1 = null;\n"
  637. " let activePageIntervalId2= null;\n"
  638. " let activePageIntervalId3 = null;\n"
  639. " let activePageIntervalId4 = null;\n"
  640. " let activePageIntervalId5 = null;\n"
  641. " let tabId = 'tab1';\n"
  642. " document.addEventListener('DOMContentLoaded', function() {\n"
  643. " const tabBtns = document.querySelectorAll('.tab-btn');\n"
  644. " const tabContents = document.querySelectorAll('.tab-content');\n"
  645. " tabBtns.forEach(btn => {\n"
  646. " btn.addEventListener('click', function() {\n"
  647. " // 移除所有按钮和内容的active类\n"
  648. " tabBtns.forEach(btn => btn.classList.remove('active'));\n"
  649. " tabContents.forEach(content => content.classList.remove('active'));\n"
  650. " // 为当前按钮添加active类\n"
  651. " this.classList.add('active');\n"
  652. " // 显示对应的内容\n"
  653. " tabId = this.getAttribute('data-tab');\n"
  654. " document.getElementById(tabId).classList.add('active');\n"
  655. " if(tabId=='tab1'){\n"
  656. " function1();\n"
  657. " }else if(tabId=='tab2'){\n"
  658. " function2();\n"
  659. " }else if(tabId=='tab3'){\n"
  660. " function3();\n"
  661. " }else if(tabId=='tab4'){\n"
  662. " function4();\n"
  663. " }else if(tabId=='tab5'){\n"
  664. " function5();\n"
  665. " }\n"
  666. " });\n"
  667. " });\n"
  668. " const today = new Date();\n"
  669. " today.setHours(0, 0, 0, 0);\n"
  670. " const app = PetiteVue.createApp({\n"
  671. " snmpShow:false,\n"
  672. " showXtsjModal:false,\n"
  673. " productType:\"\",\n"
  674. " productId:\"\",\n"
  675. " productNumber:\"\",\n"
  676. " channelList1:[],\n"
  677. " ysszList:[],\n"
  678. " ysszData2:{},\n"
  679. " timeData:{},\n"
  680. " popMessage:'',\n"
  681. " dateTime:'',\n"
  682. " systemTime:'',\n"
  683. " wlszForm:{\n"
  684. " mode:'',\n"
  685. " ipaddr:'',\n"
  686. " mask:'',\n"
  687. " gateway:'',\n"
  688. " dns1:'',\n"
  689. " dns2:'',\n"
  690. " dhcp:'',\n"
  691. " type:''\n"
  692. " },\n"
  693. " wlszForm2:{\n"
  694. " mode:'',\n"
  695. " addr:'',\n"
  696. " baud:''\n"
  697. " },\n"
  698. " wlszForm3:{\n"
  699. " mode:'',\n"
  700. " publics:'',\n"
  701. " version:'',\n"
  702. " yhm:'',\n"
  703. " rzmm:'',\n"
  704. " trapmode:'',\n"
  705. " jmmm:'',\n"
  706. " trap_ip:'',\n"
  707. " },\n"
  708. " readonlyvalidate: false,\n"
  709. " showSaveModal: false,\n"
  710. " showDeleteModal: false,\n"
  711. " message: '',\n"
  712. " messageType: '',\n"
  713. " popType: '',\n"
  714. " popMessage:'',\n"
  715. " modes:[{\"id\":0,\"name\":\"自动\"},{\"id\":1,\"name\":\"手动\"}],\n"
  716. " modes2:[{\"id\":0,\"name\":\"主机模式\"},{\"id\":1,\"name\":\"从机模式\"}],\n"
  717. " SNMPs:[{\"id\":\"SNMP V1\",\"name\":\"SNMP V1\"},{\"id\":\"SNMP V2c\",\"name\":\"SNMP V2c\"},{\"id\":\"SNMP V3\",\"name\":\"SNMP V3\"}],\n"
  718. " 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"
  719. " jmxys:[{\"id\":\"0\",\"name\":\"无\"},{\"id\":\"DES\",\"name\":\"DES\"},{\"id\":\"AES\",\"name\":\"AES\"}],\n"
  720. " async stxjClickClose(){\n"
  721. " this.showXtsjModal=false\n"
  722. " },\n"
  723. " async wkszQuery(){\n"
  724. " },\n"
  725. " async rsQuery(){\n"
  726. " },\n"
  727. " async submitForm(type){\n"
  728. " this.showSaveModal = true\n"
  729. " this.popMessage=\"确认要提交吗?\";\n"
  730. " if(type=='wksz'){\n"
  731. " this.saveDataAll=this.wlszForm;\n"
  732. " this.popType='wksz';\n"
  733. " this.saveDataAll.len=241\n"
  734. " }else if(type=='rs'){\n"
  735. " this.saveDataAll=this.wlszForm2;\n"
  736. " this.saveDataAll.len=6;\n"
  737. " this.popType='rs';\n"
  738. " }else if(type=='snmp'){\n"
  739. " this.saveDataAll=this.wlszForm3;\n"
  740. " this.saveDataAll.len=45\n"
  741. " this.popType='snmp';\n"
  742. " }\n"
  743. " },\n"
  744. " async saveData12(){\n"
  745. " if(this.popType=='wksz'){\n"
  746. " network_settings(this.saveDataAll)\n"
  747. " }else if(this.popType=='rs'){\n"
  748. " modbus_settings(this.saveDataAll)\n"
  749. " }else if(this.popType=='snmp'){\n"
  750. " snmp_settings(this.saveDataAll)\n"
  751. " }else if(this.popType=='zkzg'){\n"
  752. " if( this.saveDataAll.type=='close'){\n"
  753. " all_close();\n"
  754. " }else if( this.saveDataAll.type=='open'){\n"
  755. " all_open();\n"
  756. " }\n"
  757. " }else if(this.popType=='yssz'){\n"
  758. " delay_update(this.saveDataAll.channel_power_infro)\n"
  759. " this.ysszClickClose2()\n"
  760. " }else if(this.popType=='hdlcz'){\n"
  761. " for(const ket in this.saveDataAll.channel_power_infros){\n"
  762. " power_reset(this.saveDataAll.channel_power_infros[ket])\n"
  763. " }\n"
  764. " this.hdlczClickClose()\n"
  765. " }else if(this.popType=='fzsz'){\n"
  766. " if(this.saveDataAll.list=='1'){\n"
  767. " for(const ket in this.saveDataAll.channel_power_infros){\n"
  768. " threshold_update(this.saveDataAll.channel_power_infros[ket])\n"
  769. " }\n"
  770. " }else{\n"
  771. " threshold_update(this.saveDataAll.channel_power_infro)\n"
  772. " }\n"
  773. " this.fzscClickClose2()\n"
  774. " }else if(this.popType=='tdkg'){\n"
  775. " if( this.saveDataAll.type=='close'){\n"
  776. " single_close({...j_data},{...channel_power_infro},this.saveDataAll.productChId);\n"
  777. " }else if( this.saveDataAll.type=='open'){\n"
  778. " single_open({...j_data},{...channel_power_infro},this.saveDataAll.productChId);\n"
  779. " }\n"
  780. " }else if(this.popType=='sjsz'){\n"
  781. " sys_settings(this.saveDataAll)\n"
  782. " this.showSaveModal = false\n"
  783. " this.showXtsjModal=false\n"
  784. " }\n"
  785. " this.showSaveModal=false\n"
  786. " this.saveDataAll={};\n"
  787. " this.popType='';\n"
  788. " // alert(\"操作成功\")\n"
  789. " },\n"
  790. " handleChange(value){\n"
  791. " if(this.wlszForm3.version=='SNMP V3'){\n"
  792. " this.snmpShow=true;\n"
  793. " }else{\n"
  794. " this.snmpShow=false;\n"
  795. " this.wlszForm3.yhm='';\n"
  796. " this.wlszForm3.mode='';\n"
  797. " this.wlszForm3.rzmm='';\n"
  798. " this.wlszForm3.jmxy='';\n"
  799. " this.wlszForm3.jmmm='';\n"
  800. " this.wlszForm3.trapmode='' ;\n"
  801. " }\n"
  802. " },\n"
  803. " showSaveModal: false,\n"
  804. " showDeleteModal: false,\n"
  805. " message: '',\n"
  806. " messageType: '',\n"
  807. " // 消息和UI状态\n"
  808. " message: '',\n"
  809. " messages: [],\n"
  810. " // 状态\n"
  811. " showExternal:false,\n"
  812. " // 耗电量设置\n"
  813. " showFormModal:false,\n"
  814. " // 阈值设置\n"
  815. " showFzszModal:false,\n"
  816. " //告警\n"
  817. " showFzszModalgj:false,\n"
  818. " showFzszModal2:false,\n"
  819. " showysszModal:false,\n"
  820. " showysszModal2:false,\n"
  821. " formData:{productChName:null,productChId:null,channel_power_infro:null,productChIds:[]},\n"
  822. " powerThresholdList:[],\n"
  823. " fzscData:{\n"
  824. " productChIds:[]\n"
  825. " },\n"
  826. " items: [],\n"
  827. " newItem: '',\n"
  828. " loading: false,\n"
  829. " error: null,\n"
  830. " summary: {...initialFormData},\n"
  831. " channelList: [\n"
  832. " {\n"
  833. " productChName: '通道1',\n"
  834. " productPhOrder: 'A相',\n"
  835. " productChVoltage: '220V',\n"
  836. " productChCurrent: '10A',\n"
  837. " productChPower: '2.2kW',\n"
  838. " productChPowerFreq: '50Hz',\n"
  839. " productChConsumption: '15kWh',\n"
  840. " firingInterval: '5s',\n"
  841. " closeInterval: '3s',\n"
  842. " productChId: '3221',\n"
  843. " status: true\n"
  844. " },\n"
  845. " ],\n"
  846. " statusData: {\n"
  847. " temperatureStatus:1,\n"
  848. " temperature: '',\n"
  849. " humidity: '',\n"
  850. " waterLeak: '',\n"
  851. " waterLeakStatus: 1,\n"
  852. " smoke: '',\n"
  853. " smokeStatus: 1,\n"
  854. " alarm1: ''\n"
  855. " },\n"
  856. " productType:\"\",\n"
  857. " threeType:\"1\",\n"
  858. " productId:\"\",\n"
  859. " productNumber:\"\",\n"
  860. " channelList1:[],\n"
  861. " ysszList:[],\n"
  862. " totalFormList:[],\n"
  863. " his_alarmd:[],\n"
  864. " ysszData2:{},\n"
  865. " popMessage:'',\n"
  866. " popType:'',\n"
  867. " saveDataAll:null,\n"
  868. " // 计算属性\n"
  869. " get connectionStatus() {\n"
  870. " if (this.isConnected) return 'connected';\n"
  871. " if (this.isConnecting) return 'connecting';\n"
  872. " return 'disconnected';\n"
  873. " },\n"
  874. " get statusText() {\n"
  875. " if (this.isConnected) return '已连接到 WebSocket 服务器';\n"
  876. " if (this.isConnecting) return '正在连接...';\n"
  877. " return '未连接';\n"
  878. " },\n"
  879. " async toggleDeviceStatus(device) {\n"
  880. " var command=\"\";\n"
  881. " const params={};\n"
  882. " params.productChId=device.productChId;\n"
  883. " // if(device.productChStatus=='1'){\n"
  884. " // command='channelclose';\n"
  885. " // this.popMessage=\"确认要关闭此通道吗?\";\n"
  886. " // params.type=\"close\";\n"
  887. " // }else{\n"
  888. " // command='channelopen';\n"
  889. " // this.popMessage=\"确认要打开此通道吗?\";\n"
  890. " // params.type=\"open\";\n"
  891. " // }\n"
  892. " if(device.productChStatus=='1'){\n"
  893. " single_close({...j_data},{...channel_power_infro},device.productChId);\n"
  894. " }else{\n"
  895. " single_open({...j_data},{...channel_power_infro},device.productChId);\n"
  896. " }\n"
  897. " // const result = await confirmAction({\n"
  898. " // title: message\n"
  899. " // });\n"
  900. " // this.showSaveModal = true\n"
  901. " // this.saveDataAll=params;\n"
  902. " // this.popType='tdkg';\n"
  903. " },\n"
  904. " /** 阈值设置按钮操作 */\n"
  905. " handleUpdate(row) {\n"
  906. " this.fzscData = JSON.parse(JSON.stringify(row));\n"
  907. " this.fzscData.list='';\n"
  908. " this.showFzszModal2 = true;\n"
  909. " // this.title = this.$t('pz');\n"
  910. " },\n"
  911. " getOptionName(id) {\n"
  912. " for(const key in this.channelList1){\n"
  913. " if(this.channelList1[key].productChId===id){\n"
  914. " return this.channelList1[key].productChName\n"
  915. " break\n"
  916. " }\n"
  917. " }\n"
  918. " ;\n"
  919. " },\n"
  920. " removeOption(id) {\n"
  921. " this.fzscData.productChIds = this.fzscData.productChIds.filter(optId => optId !== id);\n"
  922. " },\n"
  923. " toggleSelectAll() {\n"
  924. " if (this.fzscData.productChIds.length === Object.keys(this.channelList1).length ) {\n"
  925. " this.fzscData.productChIds = [];\n"
  926. " } else {\n"
  927. " for(const key in this.channelList1){\n"
  928. " this.fzscData.productChIds.push(this.channelList1[key].productChId)\n"
  929. " }\n"
  930. " // this.fzscData.productChIds = this.channelList1.map(option => option.productChId);\n"
  931. " }\n"
  932. " },\n"
  933. " getOptionName2(id) {\n"
  934. " for(const key in this.channelList1){\n"
  935. " if(this.channelList1[key].productChId===id){\n"
  936. " return this.channelList1[key].productChName\n"
  937. " break\n"
  938. " }\n"
  939. " }\n"
  940. " ;\n"
  941. " },\n"
  942. " removeOption2(id) {\n"
  943. " this.formData.productChIds = this.formData.productChIds.filter(optId => optId !== id);\n"
  944. " },\n"
  945. " toggleSelectAll2() {\n"
  946. " if (this.formData.productChIds.length === Object.keys(this.channelList1).length ) {\n"
  947. " this.formData.productChIds = [];\n"
  948. " } else {\n"
  949. " for(const key in this.channelList1){\n"
  950. " this.formData.productChIds.push(this.channelList1[key].productChId)\n"
  951. " }\n"
  952. " // this.fzscData.productChIds = this.channelList1.map(option => option.productChId);\n"
  953. " }\n"
  954. " },\n"
  955. " /** 阈值设置按钮操作 */\n"
  956. " handleUpdateList() {\n"
  957. " this.fzscData.list='1';\n"
  958. " this.fzscData.productChIds=[];\n"
  959. " this.fzscData.currentUpperAction='';\n"
  960. " this.fzscData.voltageUpperAction='';\n"
  961. " this.fzscData.voltageDownAction='';\n"
  962. " this.fzscData.powerUpperAction='';\n"
  963. " this.fzscData.alarmContentUpperAction='';\n"
  964. " this.showFzszModal2 = true;\n"
  965. " // this.title = this.$t('pz');\n"
  966. " },\n"
  967. " ysszhandleUpdate(row) {\n"
  968. " this.ysszData2 = JSON.parse(JSON.stringify(row));\n"
  969. " this.showysszModal2 = true;\n"
  970. " // this.title = this.$t('pz');\n"
  971. " },\n"
  972. " // 查询阈值设置列表\n"
  973. " async fzszData(){\n"
  974. " },\n"
  975. " // 查询延时设置列表\n"
  976. " async ysszData(){\n"
  977. " },\n"
  978. " hdlczClickClose(){\n"
  979. " this.showFormModal = false\n"
  980. " this.formData.channel_power_infro=null;\n"
  981. " },\n"
  982. " fzscClickClose(){\n"
  983. " this.showFzszModal = false;\n"
  984. " this.powerThresholdList=[];\n"
  985. " // this.formData.productChId=null;\n"
  986. " },\n"
  987. " fzscClickClosegj(){\n"
  988. " this.showFzszModalgj = false;\n"
  989. " },\n"
  990. " fzscClickClose2(){\n"
  991. " this.showFzszModal2 = false\n"
  992. " // this.formData.productChId=null;\n"
  993. " },\n"
  994. " ysszClickClose(){\n"
  995. " this.showysszModal = false;\n"
  996. " this.ysszList=[];\n"
  997. " },\n"
  998. " ysszClickClose2(){\n"
  999. " this.showysszModal2 = false;\n"
  1000. " },\n"
  1001. " hdlsz(){\n"
  1002. " this.formData.productChIds=[]\n"
  1003. " this.showFormModal = true\n"
  1004. " },\n"
  1005. " // 耗电量重置\n"
  1006. " async hdlczClick(){\n"
  1007. " const params={};\n"
  1008. " let lists=[]\n"
  1009. " console.log( this.formData.productChIds)\n"
  1010. " for( const id in this.formData.productChIds){\n"
  1011. " for( const key in this.powerThresholdList ){\n"
  1012. " if(this.formData.productChIds[id]== this.powerThresholdList[key].productChId){\n"
  1013. " lists.push(this.powerThresholdList[key].channel_power_infro);\n"
  1014. " break\n"
  1015. " }\n"
  1016. " }\n"
  1017. " }\n"
  1018. " params.channel_power_infros= lists;\n"
  1019. " // params.channel_power_infro=this.formData.channel_power_infro;\n"
  1020. " this.popMessage=\"确认要重置此通道吗?\";\n"
  1021. " // const result = await confirmAction({\n"
  1022. " // title: message\n"
  1023. " // });\n"
  1024. " this.showSaveModal = true\n"
  1025. " this.saveDataAll=params;\n"
  1026. " this.popType='hdlcz';\n"
  1027. " },\n"
  1028. " // 阈值设置保存\n"
  1029. " async fzscClick(){\n"
  1030. " const params={};\n"
  1031. " params.list=this.fzscData.list;\n"
  1032. " if(this.fzscData.list=='1'){\n"
  1033. " if(this.fzscData.productChIds.length==0){\n"
  1034. " alert(\"请选择通道\")\n"
  1035. " return\n"
  1036. " }\n"
  1037. " if(this.fzscData.alarmContentUpperAction=='' || this.fzscData.currentUpperAction=='' || this.fzscData.voltageDownAction=='' || this.fzscData.voltageUpperAction==''){\n"
  1038. " alert(\"存在未设置项,请重试\")\n"
  1039. " return\n"
  1040. " }\n"
  1041. " if(this.fzscData.voltageUpperAction!=0 && this.fzscData.voltageDownAction !=0 && this.fzscData.voltageUpperAction* 10<=this.fzscData.voltageDownAction* 10){\n"
  1042. " alert(\"电压上限需要大于下限\")\n"
  1043. " return\n"
  1044. " }\n"
  1045. " let lists=[]\n"
  1046. " for( const id in this.fzscData.productChIds){\n"
  1047. " for( const key in this.powerThresholdList ){\n"
  1048. " if(this.fzscData.productChIds[id]== this.powerThresholdList[key].productChId){\n"
  1049. " let param=this.powerThresholdList[key].channel_power_infro;\n"
  1050. " param.thr.w_upper=this.fzscData.alarmContentUpperAction* 1000;\n"
  1051. " param.thr.c_upper=this.fzscData.currentUpperAction* 10;\n"
  1052. " param.thr.p_upper=this.fzscData.powerUpperAction* 1000;\n"
  1053. " param.thr.v_lower=this.fzscData.voltageDownAction* 10;\n"
  1054. " param.thr.v_upper=this.fzscData.voltageUpperAction* 10;\n"
  1055. " lists.push(param);\n"
  1056. " break\n"
  1057. " }\n"
  1058. " }\n"
  1059. " }\n"
  1060. " params.channel_power_infros= lists;\n"
  1061. " }else{\n"
  1062. " params.channel_power_infro=this.fzscData.channel_power_infro;\n"
  1063. " params.channel_power_infro.thr.w_upper=this.fzscData.alarmContentUpperAction* 1000;\n"
  1064. " params.channel_power_infro.thr.c_upper=this.fzscData.currentUpperAction* 10;\n"
  1065. " params.channel_power_infro.thr.p_upper=this.fzscData.powerUpperAction* 1000;\n"
  1066. " params.channel_power_infro.thr.v_lower=this.fzscData.voltageDownAction* 10;\n"
  1067. " params.channel_power_infro.thr.v_upper=this.fzscData.voltageUpperAction* 10;\n"
  1068. " }\n"
  1069. " this.popMessage=\"确认要保存吗?\";\n"
  1070. " // const result = await confirmAction({\n"
  1071. " // title: message\n"
  1072. " // });\n"
  1073. " this.showSaveModal = true\n"
  1074. " this.saveDataAll=params;\n"
  1075. " this.popType='fzsz';\n"
  1076. " },\n"
  1077. " // 延时设置保存\n"
  1078. " async ysszClick(){\n"
  1079. " const params={};\n"
  1080. " params.channel_power_infro=this.ysszData2.channel_power_infro;\n"
  1081. " params.channel_power_infro.info.start_delay=this.ysszData2.firingInterval;\n"
  1082. " params.channel_power_infro.info.stop_delay=this.ysszData2.closeInterval;\n"
  1083. " this.popMessage=\"确认要保存吗?\";\n"
  1084. " this.showSaveModal = true\n"
  1085. " this.saveDataAll=params;\n"
  1086. " this.popType='yssz';\n"
  1087. " },\n"
  1088. " // 总开总关\n"
  1089. " async toggleAllDevices(status) {\n"
  1090. " const params={};\n"
  1091. " params.productId=this.productId;\n"
  1092. " params.type= \"open\"\n"
  1093. " this.popMessage=\"确认要开启设备下所有通道吗?\";\n"
  1094. " if(status){\n"
  1095. " params.type= \"open\"\n"
  1096. " this.popMessage=\"确认要开启设备下所有通道吗?\";\n"
  1097. " }else{\n"
  1098. " params.type= \"close\"\n"
  1099. " this.popMessage=\"确认要关闭设备下所有通道吗?\";\n"
  1100. " }\n"
  1101. " // const result = await confirmAction({\n"
  1102. " // title: message\n"
  1103. " // });\n"
  1104. " this.showSaveModal = true;\n"
  1105. " this.saveDataAll=params;\n"
  1106. " this.popType='zkzg';\n"
  1107. " },\n"
  1108. " // 获取数据方法\n"
  1109. " async fetchData() {\n"
  1110. " \n"
  1111. " function5();\n"
  1112. " this.queryTotalStatus5();\n"
  1113. " if (activePageIntervalId1 != null) {\n"
  1114. " clearInterval(activePageIntervalId1);\n"
  1115. " };\n"
  1116. " activePageIntervalId1 = setInterval(() => {\n"
  1117. " if(tabId=='tab1'){\n"
  1118. " function1();\n"
  1119. " this.queryTotalStatus();\n"
  1120. " if(this.wlszForm4.sys_time=='' || this.wlszForm4.sys_time==null){\n"
  1121. " this.queryTotalStatus5();\n"
  1122. " }\n"
  1123. " }else if(tabId=='tab2'){\n"
  1124. " this.queryTotalStatus2();\n"
  1125. " }else if(tabId=='tab3'){\n"
  1126. " this.queryTotalStatus3();\n"
  1127. " }else if(tabId=='tab4'){\n"
  1128. " this.queryTotalStatus4();\n"
  1129. " }else if(tabId=='tab5'){\n"
  1130. " this.queryTotalStatus5();\n"
  1131. " var js={};\n"
  1132. " on_ws_msg(js);\n"
  1133. " }\n"
  1134. " }, 100);\n"
  1135. " },\n"
  1136. " // 总体监控赋值\n"
  1137. " async queryTotalStatus(){\n"
  1138. " this.productType={... productTypeData}.productType;\n"
  1139. " if( this.productType=='1'){\n"
  1140. " this.showExternal=true;\n"
  1141. " this.totalFormList= {... initialTotalFormList}\n"
  1142. " if(this.threeType=='1'){\n"
  1143. " this.summary= this.totalFormList[0];\n"
  1144. " }else if(this.threeType=='2'){\n"
  1145. " this.summary= this.totalFormList[1];\n"
  1146. " }else if(this.threeType=='3'){\n"
  1147. " this.summary= this.totalFormList[2];\n"
  1148. " }\n"
  1149. " }else{\n"
  1150. " this.summary={... initialFormData};\n"
  1151. " }\n"
  1152. " this.channelList={...channelAllList};\n"
  1153. " this.channelList1 = {...channelAllList1};\n"
  1154. " this.powerThresholdList = {...initialYzFormList};\n"
  1155. " this.ysszList = {...channelAllList1};\n"
  1156. " if({...his_alarm}!=null){\n"
  1157. " this.statusData.alarm1 = Object.keys({...his_alarm}).length;\n"
  1158. " var alarmds={...his_alarm};\n"
  1159. " this.his_alarmd=[]\n"
  1160. " for(var i=0;i<Object.keys({...his_alarm}).length ;i++){\n"
  1161. " var open=alarmds[i];\n"
  1162. " open.number=i+1;\n"
  1163. " open.date= (open.date.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1164. " open.waning_context= (open.waning_context.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1165. " if(open.type==0){\n"
  1166. " open.type='电量信息报警'\n"
  1167. " }else if(open.type==1){\n"
  1168. " open.type='传感器报警'\n"
  1169. " }\n"
  1170. " this.his_alarmd.push(open)\n"
  1171. " }\n"
  1172. " }\n"
  1173. " if({...sensorc_list}!=null && Object.keys({...sensorc_list}).length>0){\n"
  1174. " let sencorList={...sensorc_list};\n"
  1175. " for(const key in sencorList){\n"
  1176. " if(sencorList[key].info.type==0){ // 温湿度\n"
  1177. " if(sencorList[key].info.status==1){ // 在线\n"
  1178. " try{\n"
  1179. " let sensor_val =sencorList[key].sensor_val\n"
  1180. " this.statusData.temperature=sensor_val[1].val.toFixed(2)\n"
  1181. " if(sensor_val[1].s_alarm & 0x1){ // 上限\n"
  1182. " this.statusData.tempcolorStyle='color: red;font-weight: bold;'\n"
  1183. " }else if(sensor_val[1].s_alarm & 0x2){ // 下限\n"
  1184. " this.statusData.tempcolorStyle='color: #ff00ff;font-weight: bold;'\n"
  1185. " }else{\n"
  1186. " this.statusData.tempcolorStyle=''\n"
  1187. " }\n"
  1188. " this.statusData.humidity=sensor_val[0].val.toFixed(2)\n"
  1189. " if(sensor_val[0].s_alarm & 0x1){ // 上限\n"
  1190. " this.statusData.humcolorStylesx='color: red;font-weight: bold;'\n"
  1191. " }else if(sensor_val[0].s_alarm & 0x2){ // 下限\n"
  1192. " this.statusData.humcolorStylesx='color: #ff00ff;font-weight: bold;'\n"
  1193. " }else{\n"
  1194. " this.statusData.humcolorStylesx=''\n"
  1195. " }\n"
  1196. " }catch (e) {\n"
  1197. " console.log(\"温湿度传感器赋值失败\")\n"
  1198. " }\n"
  1199. " }else{\n"
  1200. " this.statusData.temperatureStatus=0;\n"
  1201. " this.statusData.temperature='离线'\n"
  1202. " this.statusData.humidity='离线'\n"
  1203. " }\n"
  1204. " }else if(sencorList[key].info.type==1){ // 烟雾\n"
  1205. " if(sencorList[key].info.status==1) { // 在线\n"
  1206. " try{\n"
  1207. " let sensor_val =sencorList[key].sensor_val\n"
  1208. " this.statusData.waterLeak=sensor_val[0].s_alarm.act\n"
  1209. " }catch (e) {\n"
  1210. " console.log(\"烟雾传感器赋值失败\")\n"
  1211. " }\n"
  1212. " }else {\n"
  1213. " this.statusData.waterLeakStatus=0;\n"
  1214. " this.statusData.waterLeak='离线'\n"
  1215. " }\n"
  1216. " }else if(sencorList[key].info.type==4){ // C02\n"
  1217. " if(sencorList[key].info.status==1) {\n"
  1218. " // 在线\n"
  1219. " try{\n"
  1220. " let sensor_val =sencorList[key].sensor_val\n"
  1221. " this.statusData.smoke=sensor_val[0].val.toFixed(2)\n"
  1222. " if(sensor_val[0] & 0x1 ){ // 上限\n"
  1223. " this.statusData.smokecolorStylesx='color: red;font-weight: bold;'\n"
  1224. " }else if(sensor_val[0] & 0x2){ // 下限\n"
  1225. " this.statusData.smokecolorStylesx='color: #ff00ff;font-weight: bold;'\n"
  1226. " }else{\n"
  1227. " this.statusData.smokecolorStylesx=''\n"
  1228. " }\n"
  1229. " }catch (e) {\n"
  1230. " console.log(\"CO2传感器赋值失败\")\n"
  1231. " }\n"
  1232. " }else{\n"
  1233. " this.statusData.smokeStatus=0;\n"
  1234. " this.statusData.smoke='离线'\n"
  1235. " }\n"
  1236. " }\n"
  1237. " }\n"
  1238. " }\n"
  1239. " },\n"
  1240. " //网络设置\n"
  1241. " wlszForm_vack:null,\n"
  1242. " async queryTotalStatus2(){\n"
  1243. " if(this.wlszForm_vack==null && {...network_data}!=null && Object.keys({...network_data}).length>0){\n"
  1244. " this.wlszForm = {...network_data};\n"
  1245. " this.wlszForm.ipaddr= (this.wlszForm.ipaddr.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1246. " this.wlszForm.mask= (this.wlszForm.mask.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1247. " this.wlszForm.gateway= (this.wlszForm.gateway.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1248. " this.wlszForm.dns1= (this.wlszForm.dns1.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1249. " this.wlszForm.dns2= (this.wlszForm.dns2.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1250. " this.wlszForm_vack = {...network_data};\n"
  1251. " }\n"
  1252. " },\n"
  1253. " //485\n"
  1254. " wlszForm2_vack:null,\n"
  1255. " async queryTotalStatus3(){\n"
  1256. " if( this.wlszForm2_vack==null && {...cas_data}!=null && Object.keys({...cas_data}).length>0){\n"
  1257. " this.wlszForm2 = {...cas_data};\n"
  1258. " this.wlszForm2_vack = {...cas_data};\n"
  1259. " }\n"
  1260. " },\n"
  1261. " // snmp\n"
  1262. " wlszForm3_back:null,\n"
  1263. " async queryTotalStatus4(){\n"
  1264. " if(this.wlszForm3_back==null){\n"
  1265. " if( {...snmp_data}!=null && Object.keys({...snmp_data}).length>0){\n"
  1266. " this.wlszForm3 = {...snmp_data};\n"
  1267. " this.wlszForm3.publics= (this.wlszForm3.publics.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1268. " this.wlszForm3.trap_ip= (this.wlszForm3.trap_ip.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1269. " this.wlszForm3.mode= this.wlszForm3.mode ;\n"
  1270. " this.wlszForm3.version= this.wlszForm3.version ;\n"
  1271. " this.wlszForm3.trapmode= this.wlszForm3.trapmode ;\n"
  1272. " this.wlszForm3_back = {...snmp_data};\n"
  1273. " // if(this.wlszForm3!=null && this.wlszForm3.version=='SNMP V3'){\n"
  1274. " // this.snmpShow=true;\n"
  1275. " // }else{\n"
  1276. " // this.snmpShow=false;\n"
  1277. " // // this.wlszForm3={}\n"
  1278. " // }\n"
  1279. " }\n"
  1280. " }\n"
  1281. " },\n"
  1282. " // 设备信息\n"
  1283. " wlszForm4_back:null,\n"
  1284. " async queryTotalStatus5(){\n"
  1285. " if(this.wlszForm4_back==null && {...lang_data}!=null && Object.keys({...lang_data}).length>0){\n"
  1286. " this.wlszForm4 = {...lang_data};\n"
  1287. " this.wlszForm4_back = {...lang_data};\n"
  1288. " this.wlszForm4.ver= (this.wlszForm4.ver.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1289. " this.wlszForm5.ver= (this.wlszForm4.ver.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1290. " this.wlszForm4.sys_time= (this.wlszForm4.sys_time.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1291. " this.systemTime=new Date(this.wlszForm4.sys_time);\n"
  1292. " // 计时器为空,操作\n"
  1293. " setInterval(() => {\n"
  1294. " var date= this.systemTime ;\n"
  1295. " var year = date.getFullYear();\n"
  1296. " var month = date.getMonth() + 1 < 10 ? \"0\" + (date.getMonth() + 1) : date.getMonth() + 1;\n"
  1297. " var day = date.getDate() < 10 ? \"0\" + date.getDate() : date.getDate();\n"
  1298. " var hours = date.getHours() < 10 ? \"0\" + date.getHours() : date.getHours();\n"
  1299. " var minutes = date.getMinutes() < 10 ? \"0\" + date.getMinutes() : date.getMinutes();\n"
  1300. " var seconds = date.getSeconds() < 10 ? \"0\" + date.getSeconds() : date.getSeconds();\n"
  1301. " this.dateTime= year + '-' + month + '-' + day + ' ' + hours+ ':' + minutes + ':' + seconds;\n"
  1302. " this.systemTime=new Date(date.getTime()+1000);\n"
  1303. " }, 1000);\n"
  1304. " }\n"
  1305. " },\n"
  1306. " // 三相切换赋值\n"
  1307. " async toggleThreeDevices(type){\n"
  1308. " this.threeType=type;\n"
  1309. " if(type=='1'){\n"
  1310. " this.summary= this.totalFormList[0];\n"
  1311. " }else if(type=='2'){\n"
  1312. " this.summary= this.totalFormList[1];\n"
  1313. " }else if(type=='3'){\n"
  1314. " this.summary= this.totalFormList[2];\n"
  1315. " }\n"
  1316. " },\n"
  1317. " // 传感器查询\n"
  1318. " async sensorStatusMonitoring(){\n"
  1319. " const params={};\n"
  1320. " params.type=\"listMapQuery\";\n"
  1321. " params.productId=this.productId;\n"
  1322. " },\n"
  1323. " async channelStatusMonitoring(){\n"
  1324. " const params={};\n"
  1325. " params.type=\"listQuery\";\n"
  1326. " params.productId=this.productId;\n"
  1327. " },\n"
  1328. " showXtsjModal:false,\n"
  1329. " showScfjModal:false,\n"
  1330. " popMessage:'',\n"
  1331. " wlszForm4:{\n"
  1332. " \"lang\": \"\",\n"
  1333. " \"tzone\": \"\",\n"
  1334. " \"route\": \"\",\n"
  1335. " \"ver\": \"\",\n"
  1336. " \"sys_time\":\"\",\n"
  1337. " \"len\": 52\n"
  1338. " },\n"
  1339. " wlszForm5:{\n"
  1340. " \"lang\": \"\",\n"
  1341. " \"tzone\": \"\",\n"
  1342. " \"route\": \"\",\n"
  1343. " \"ver\": \"\",\n"
  1344. " \"sys_time\":\"\",\n"
  1345. " \"len\": 52\n"
  1346. " },\n"
  1347. " showSaveModal: false,\n"
  1348. " popType: '',\n"
  1349. " popMessage:'',\n"
  1350. " sqs:[{\"id\":8,\"name\":\"东8区\"},{\"id\":-8,\"name\":\"西8区\"},{\"id\":0,\"name\":\"任意时区\"}],\n"
  1351. " currentDate: new Date(),\n"
  1352. " selectedDate: null,\n"
  1353. " selectedHour: 12,\n"
  1354. " selectedMinute: 0,\n"
  1355. " selectedSecond: 0,\n"
  1356. " isPickerVisible: false,\n"
  1357. " files: [],\n"
  1358. " isDragover: false,\n"
  1359. " isUploading: false,\n"
  1360. " nextFileId: 1,\n"
  1361. " years:[],\n"
  1362. " months:[],\n"
  1363. " dayAll:[],\n"
  1364. " hours:[],\n"
  1365. " minutes:[],\n"
  1366. " dateForm:{},\n"
  1367. " // 日期新方法\n"
  1368. " get daysNew() {\n"
  1369. " const currentYear = new Date().getFullYear();\n"
  1370. " for (let i = currentYear - 20; i <= currentYear + 5; i++) {\n"
  1371. " this.years.push({\n"
  1372. " id:i,\n"
  1373. " name:i+'年'\n"
  1374. " })\n"
  1375. " };\n"
  1376. " // 初始化月份\n"
  1377. " for (let i = 1; i <= 12; i++) {\n"
  1378. " this.months.push({\n"
  1379. " id:i,\n"
  1380. " name:i+'月'\n"
  1381. " })\n"
  1382. " }\n"
  1383. " this.updateDays();\n"
  1384. " for (let i = 0; i < 24; i++) {\n"
  1385. " this.hours.push({\n"
  1386. " id:i,\n"
  1387. " name:i\n"
  1388. " })\n"
  1389. " }\n"
  1390. " // 初始化分钟\n"
  1391. " for (let i = 0; i < 60; i++) {\n"
  1392. " this.minutes.push({\n"
  1393. " id:i,\n"
  1394. " name:i\n"
  1395. " })\n"
  1396. " }\n"
  1397. " },\n"
  1398. " updateDays(){\n"
  1399. " if(this.dateForm.year==null || this.dateForm.month==null){\n"
  1400. " return\n"
  1401. " }\n"
  1402. " const year = parseInt(this.dateForm.year);\n"
  1403. " const month = parseInt(this.dateForm.month);\n"
  1404. " // 如果年月未选择,默认显示31天\n"
  1405. " let daysInMonth = 1;\n"
  1406. " if (year && month) {\n"
  1407. " // 计算所选年月有多少天\n"
  1408. " daysInMonth = new Date(year, month, 0).getDate();\n"
  1409. " }\n"
  1410. " this.dayAll=[];\n"
  1411. " // 添加日期选项\n"
  1412. " for (let i = 1; i <= daysInMonth; i++) {\n"
  1413. " this.dayAll.push({\n"
  1414. " id:i,\n"
  1415. " name:i\n"
  1416. " })\n"
  1417. " }\n"
  1418. " this.dateForm.day=null;\n"
  1419. " },\n"
  1420. " // 日期选择方法\n"
  1421. " showPicker() {\n"
  1422. " // this.dateForm.year='';\n"
  1423. " // this.dateForm.month='';\n"
  1424. " // this.dateForm.day='';\n"
  1425. " // this.dateForm.hour='';\n"
  1426. " // this.dateForm.minute='';\n"
  1427. " // this.dateForm.second='';\n"
  1428. " this.isPickerVisible = true;\n"
  1429. " // 如果没有选择日期,默认使用今天\n"
  1430. " if (!this.selectedDate) {\n"
  1431. " this.selectedDate = new Date();\n"
  1432. " }\n"
  1433. " var date=new Date(this.wlszForm4.sys_time);\n"
  1434. " this.dateForm.year = date.getFullYear();\n"
  1435. " this.dateForm.month = date.getMonth() + 1 < 10 ? (date.getMonth() + 1) : date.getMonth() + 1;\n"
  1436. " if( this.dateForm.month !=null){\n"
  1437. " this.updateDays();\n"
  1438. " }\n"
  1439. " this.dateForm.day = date.getDate() < 10 ? date.getDate() : date.getDate();\n"
  1440. " this.dateForm.hour = date.getHours() < 10 ? date.getHours() : date.getHours();\n"
  1441. " this.dateForm.minute= date.getMinutes() < 10 ? date.getMinutes() : date.getMinutes();\n"
  1442. " this.dateForm.second= date.getSeconds() < 10 ? date.getSeconds() : date.getSeconds();\n"
  1443. " // 设置当前时间为选择的时间\n"
  1444. " const now = new Date();\n"
  1445. " this.selectedHour = now.getHours();\n"
  1446. " this.selectedMinute = now.getMinutes();\n"
  1447. " this.selectedSecond = now.getSeconds();\n"
  1448. " },\n"
  1449. " clearSelection() {\n"
  1450. " this.selectedDate = null;\n"
  1451. " this.selectedHour = 0;\n"
  1452. " this.selectedMinute = 0;\n"
  1453. " this.selectedSecond = 0;\n"
  1454. " },\n"
  1455. " confirmSelection() {\n"
  1456. " var month=this.dateForm.month<10?'0'+this.dateForm.month:this.dateForm.month\n"
  1457. " var day=this.dateForm.day<10?'0'+this.dateForm.day:this.dateForm.day\n"
  1458. " var hour=this.dateForm.hour<10?'0'+this.dateForm.hour:this.dateForm.hour\n"
  1459. " var minute=this.dateForm.minute<10?'0'+this.dateForm.minute:this.dateForm.minute\n"
  1460. " var second=this.dateForm.second<10?'0'+this.dateForm.second:this.dateForm.second\n"
  1461. " this.wlszForm4.sys_time=this.dateForm.year+'-'+month+'-'+day+' '+ hour+':'+ minute+':'+ second;\n"
  1462. " this.isPickerVisible = false;\n"
  1463. " },\n"
  1464. " async sbxxQuery(){\n"
  1465. " // this.wlszForm4= await this.data.data\n"
  1466. " },\n"
  1467. " async stxjClick(){\n"
  1468. " this.showSaveModal = true\n"
  1469. " this.popMessage=\"确认要提交吗?\";\n"
  1470. " this.wlszForm4.type=\"NtpSave\";\n"
  1471. " this.saveDataAll=this.wlszForm4;\n"
  1472. " this.popType='sjsz';\n"
  1473. " },\n"
  1474. " showXtsjModalClick(){\n"
  1475. " this.clearSelection();\n"
  1476. " this.showXtsjModal=true;\n"
  1477. " },\n"
  1478. " // 上传附件方法\n"
  1479. " showFjscModalClick(){\n"
  1480. " this.showScfjModal=true;\n"
  1481. " this.wlszForm5=JSON.parse(JSON.stringify( this.wlszForm4));\n"
  1482. " },\n"
  1483. " selectFiles() {\n"
  1484. " this.$refs.fileInput.click();\n"
  1485. " },\n"
  1486. " handleFileSelect(e) {\n"
  1487. " const selectedFiles = Array.from(e.target.files);\n"
  1488. " this.files = [];\n"
  1489. " this.addFiles(selectedFiles);\n"
  1490. " // 清空input,允许重复选择相同文件\n"
  1491. " e.target.value = '';\n"
  1492. " },\n"
  1493. " handleDrop(e) {\n"
  1494. " this.isDragover = false;\n"
  1495. " const droppedFiles = Array.from(e.dataTransfer.files);\n"
  1496. " this.addFiles(droppedFiles);\n"
  1497. " },\n"
  1498. " addFiles(fileList) {\n"
  1499. " fileList.forEach(file => {\n"
  1500. " this.files.push({\n"
  1501. " id: this.nextFileId++,\n"
  1502. " file: file,\n"
  1503. " name: file.name,\n"
  1504. " size: file.size,\n"
  1505. " type: file.type,\n"
  1506. " status: 'pending', // pending, uploading, success, error\n"
  1507. " progress: 0\n"
  1508. " });\n"
  1509. " });\n"
  1510. " },\n"
  1511. " clearFiles() {\n"
  1512. " this.files = [];\n"
  1513. " this.showScfjModal=false;\n"
  1514. " },\n"
  1515. " async uploadFiles() {\n"
  1516. " if (this.files.length === 0) return;\n"
  1517. " if(this.wlszForm5.ver=='' || this.wlszForm5.ver==null){\n"
  1518. " return\n"
  1519. " }\n"
  1520. " this.isUploading = true;\n"
  1521. " for (const fileObj of this.files) {\n"
  1522. " if (fileObj.status === 'success') continue;\n"
  1523. " sys_up_settings(this.wlszForm5.ver,fileObj.file)\n"
  1524. " this.clearFiles()\n"
  1525. " }\n"
  1526. " this.isUploading = false;\n"
  1527. " },\n"
  1528. " // 初始化事件监听\n"
  1529. " initEventListeners() {\n"
  1530. " document.addEventListener('vue-command', (event) => {\n"
  1531. " if (event.detail.type === 'process') {\n"
  1532. " this.processData(event.detail.source);\n"
  1533. " } else if (event.detail.type === 'update') {\n"
  1534. " this.updateData(event.detail.data);\n"
  1535. " }\n"
  1536. " });\n"
  1537. " }\n"
  1538. " }).mount();\n"
  1539. " // 将方法暴露到全局\n"
  1540. " window.externalIncrement = () => {\n"
  1541. " app.externalIncrement();\n"
  1542. " };\n"
  1543. " });\n"
  1544. "</script>\n"
  1545. "</body>\n"
  1546. "</html>"
  1547. ;
  1548. // 文本数据大小(包括null终止符)
  1549. const size_t p_index_html_size = 68564;
  1550. // 文本长度(字符数)
  1551. const size_t p_index_html_length = 66365;
  1552. #endif /* P_INDEX_HTML_H */