index_html.h 81 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713
  1. /* 自动生成的文本数据头文件 */
  2. /* 源文件: index.html */
  3. /* 文件大小: 68489 字节 */
  4. /* 生成时间: 2025-09-16 05:47:07 */
  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>总功率(W)</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. " }\n"
  1132. " }, 1000);\n"
  1133. " },\n"
  1134. " // 总体监控赋值\n"
  1135. " async queryTotalStatus(){\n"
  1136. " this.productType={... productTypeData}.productType;\n"
  1137. " if( this.productType=='1'){\n"
  1138. " this.showExternal=true;\n"
  1139. " this.totalFormList= {... initialTotalFormList}\n"
  1140. " if(this.threeType=='1'){\n"
  1141. " this.summary= this.totalFormList[0];\n"
  1142. " }else if(this.threeType=='2'){\n"
  1143. " this.summary= this.totalFormList[1];\n"
  1144. " }else if(this.threeType=='3'){\n"
  1145. " this.summary= this.totalFormList[2];\n"
  1146. " }\n"
  1147. " }else{\n"
  1148. " this.summary={... initialFormData};\n"
  1149. " }\n"
  1150. " this.channelList={...channelAllList};\n"
  1151. " this.channelList1 = {...channelAllList1};\n"
  1152. " this.powerThresholdList = {...initialYzFormList};\n"
  1153. " this.ysszList = {...channelAllList1};\n"
  1154. " if({...his_alarm}!=null){\n"
  1155. " this.statusData.alarm1 = Object.keys({...his_alarm}).length;\n"
  1156. " var alarmds={...his_alarm};\n"
  1157. " this.his_alarmd=[]\n"
  1158. " for(var i=0;i<Object.keys({...his_alarm}).length ;i++){\n"
  1159. " var open=alarmds[i];\n"
  1160. " open.number=i+1;\n"
  1161. " open.date= (open.date.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1162. " open.waning_context= (open.waning_context.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1163. " if(open.type==0){\n"
  1164. " open.type='电量信息报警'\n"
  1165. " }else if(open.type==1){\n"
  1166. " open.type='传感器报警'\n"
  1167. " }\n"
  1168. " this.his_alarmd.push(open)\n"
  1169. " }\n"
  1170. " }\n"
  1171. " if({...sensorc_list}!=null && Object.keys({...sensorc_list}).length>0){\n"
  1172. " let sencorList={...sensorc_list};\n"
  1173. " for(const key in sencorList){\n"
  1174. " if(sencorList[key].info.type==0){ // 温湿度\n"
  1175. " if(sencorList[key].info.status==1){ // 在线\n"
  1176. " try{\n"
  1177. " let sensor_val =sencorList[key].sensor_val\n"
  1178. " this.statusData.temperature=sensor_val[1].val.toFixed(2)\n"
  1179. " if(sensor_val[1].s_alarm & 0x1){ // 上限\n"
  1180. " this.statusData.tempcolorStyle='color: red;font-weight: bold;'\n"
  1181. " }else if(sensor_val[1].s_alarm & 0x2){ // 下限\n"
  1182. " this.statusData.tempcolorStyle='color: #ff00ff;font-weight: bold;'\n"
  1183. " }else{\n"
  1184. " this.statusData.tempcolorStyle=''\n"
  1185. " }\n"
  1186. " this.statusData.humidity=sensor_val[0].val.toFixed(2)\n"
  1187. " if(sensor_val[0].s_alarm & 0x1){ // 上限\n"
  1188. " this.statusData.humcolorStylesx='color: red;font-weight: bold;'\n"
  1189. " }else if(sensor_val[0].s_alarm & 0x2){ // 下限\n"
  1190. " this.statusData.humcolorStylesx='color: #ff00ff;font-weight: bold;'\n"
  1191. " }else{\n"
  1192. " this.statusData.humcolorStylesx=''\n"
  1193. " }\n"
  1194. " }catch (e) {\n"
  1195. " console.log(\"温湿度传感器赋值失败\")\n"
  1196. " }\n"
  1197. " }else{\n"
  1198. " this.statusData.temperatureStatus=0;\n"
  1199. " this.statusData.temperature='离线'\n"
  1200. " this.statusData.humidity='离线'\n"
  1201. " }\n"
  1202. " }else if(sencorList[key].info.type==1){ // 烟雾\n"
  1203. " if(sencorList[key].info.status==1) { // 在线\n"
  1204. " try{\n"
  1205. " let sensor_val =sencorList[key].sensor_val\n"
  1206. " this.statusData.waterLeak=sensor_val[0].s_alarm.act\n"
  1207. " }catch (e) {\n"
  1208. " console.log(\"烟雾传感器赋值失败\")\n"
  1209. " }\n"
  1210. " }else {\n"
  1211. " this.statusData.waterLeakStatus=0;\n"
  1212. " this.statusData.waterLeak='离线'\n"
  1213. " }\n"
  1214. " }else if(sencorList[key].info.type==4){ // C02\n"
  1215. " if(sencorList[key].info.status==1) {\n"
  1216. " // 在线\n"
  1217. " try{\n"
  1218. " let sensor_val =sencorList[key].sensor_val\n"
  1219. " this.statusData.smoke=sensor_val[0].val.toFixed(2)\n"
  1220. " if(sensor_val[0] & 0x1 ){ // 上限\n"
  1221. " this.statusData.smokecolorStylesx='color: red;font-weight: bold;'\n"
  1222. " }else if(sensor_val[0] & 0x2){ // 下限\n"
  1223. " this.statusData.smokecolorStylesx='color: #ff00ff;font-weight: bold;'\n"
  1224. " }else{\n"
  1225. " this.statusData.smokecolorStylesx=''\n"
  1226. " }\n"
  1227. " }catch (e) {\n"
  1228. " console.log(\"CO2传感器赋值失败\")\n"
  1229. " }\n"
  1230. " }else{\n"
  1231. " this.statusData.smokeStatus=0;\n"
  1232. " this.statusData.smoke='离线'\n"
  1233. " }\n"
  1234. " }\n"
  1235. " }\n"
  1236. " }\n"
  1237. " },\n"
  1238. " //网络设置\n"
  1239. " wlszForm_vack:null,\n"
  1240. " async queryTotalStatus2(){\n"
  1241. " if(this.wlszForm_vack==null && {...network_data}!=null && Object.keys({...network_data}).length>0){\n"
  1242. " this.wlszForm = {...network_data};\n"
  1243. " this.wlszForm.ipaddr= (this.wlszForm.ipaddr.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1244. " this.wlszForm.mask= (this.wlszForm.mask.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1245. " this.wlszForm.gateway= (this.wlszForm.gateway.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1246. " this.wlszForm.dns1= (this.wlszForm.dns1.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1247. " this.wlszForm.dns2= (this.wlszForm.dns2.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1248. " this.wlszForm_vack = {...network_data};\n"
  1249. " }\n"
  1250. " },\n"
  1251. " //485\n"
  1252. " wlszForm2_vack:null,\n"
  1253. " async queryTotalStatus3(){\n"
  1254. " if( this.wlszForm2_vack==null && {...cas_data}!=null && Object.keys({...cas_data}).length>0){\n"
  1255. " this.wlszForm2 = {...cas_data};\n"
  1256. " this.wlszForm2_vack = {...cas_data};\n"
  1257. " }\n"
  1258. " },\n"
  1259. " // snmp\n"
  1260. " wlszForm3_back:null,\n"
  1261. " async queryTotalStatus4(){\n"
  1262. " if(this.wlszForm3_back==null){\n"
  1263. " if( {...snmp_data}!=null && Object.keys({...snmp_data}).length>0){\n"
  1264. " this.wlszForm3 = {...snmp_data};\n"
  1265. " this.wlszForm3.publics= (this.wlszForm3.publics.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1266. " this.wlszForm3.trap_ip= (this.wlszForm3.trap_ip.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1267. " this.wlszForm3.mode= this.wlszForm3.mode ;\n"
  1268. " this.wlszForm3.version= this.wlszForm3.version ;\n"
  1269. " this.wlszForm3.trapmode= this.wlszForm3.trapmode ;\n"
  1270. " this.wlszForm3_back = {...snmp_data};\n"
  1271. " // if(this.wlszForm3!=null && this.wlszForm3.version=='SNMP V3'){\n"
  1272. " // this.snmpShow=true;\n"
  1273. " // }else{\n"
  1274. " // this.snmpShow=false;\n"
  1275. " // // this.wlszForm3={}\n"
  1276. " // }\n"
  1277. " }\n"
  1278. " }\n"
  1279. " },\n"
  1280. " // 设备信息\n"
  1281. " wlszForm4_back:null,\n"
  1282. " async queryTotalStatus5(){\n"
  1283. " if(this.wlszForm4_back==null && {...lang_data}!=null && Object.keys({...lang_data}).length>0){\n"
  1284. " this.wlszForm4 = {...lang_data};\n"
  1285. " this.wlszForm4_back = {...lang_data};\n"
  1286. " this.wlszForm4.ver= (this.wlszForm4.ver.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1287. " this.wlszForm5.ver= (this.wlszForm4.ver.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1288. " this.wlszForm4.sys_time= (this.wlszForm4.sys_time.replace(/\\\\u0000/g, '\\u0000')).replace(/\\u0000/g, '');\n"
  1289. " this.systemTime=new Date(this.wlszForm4.sys_time);\n"
  1290. " // 计时器为空,操作\n"
  1291. " setInterval(() => {\n"
  1292. " var date= this.systemTime ;\n"
  1293. " var year = date.getFullYear();\n"
  1294. " var month = date.getMonth() + 1 < 10 ? \"0\" + (date.getMonth() + 1) : date.getMonth() + 1;\n"
  1295. " var day = date.getDate() < 10 ? \"0\" + date.getDate() : date.getDate();\n"
  1296. " var hours = date.getHours() < 10 ? \"0\" + date.getHours() : date.getHours();\n"
  1297. " var minutes = date.getMinutes() < 10 ? \"0\" + date.getMinutes() : date.getMinutes();\n"
  1298. " var seconds = date.getSeconds() < 10 ? \"0\" + date.getSeconds() : date.getSeconds();\n"
  1299. " this.dateTime= year + '-' + month + '-' + day + ' ' + hours+ ':' + minutes + ':' + seconds;\n"
  1300. " this.systemTime=new Date(date.getTime()+1000);\n"
  1301. " }, 1000);\n"
  1302. " }\n"
  1303. " },\n"
  1304. " // 三相切换赋值\n"
  1305. " async toggleThreeDevices(type){\n"
  1306. " this.threeType=type;\n"
  1307. " if(type=='1'){\n"
  1308. " this.summary= this.totalFormList[0];\n"
  1309. " }else if(type=='2'){\n"
  1310. " this.summary= this.totalFormList[1];\n"
  1311. " }else if(type=='3'){\n"
  1312. " this.summary= this.totalFormList[2];\n"
  1313. " }\n"
  1314. " },\n"
  1315. " // 传感器查询\n"
  1316. " async sensorStatusMonitoring(){\n"
  1317. " const params={};\n"
  1318. " params.type=\"listMapQuery\";\n"
  1319. " params.productId=this.productId;\n"
  1320. " },\n"
  1321. " async channelStatusMonitoring(){\n"
  1322. " const params={};\n"
  1323. " params.type=\"listQuery\";\n"
  1324. " params.productId=this.productId;\n"
  1325. " },\n"
  1326. " showXtsjModal:false,\n"
  1327. " showScfjModal:false,\n"
  1328. " popMessage:'',\n"
  1329. " wlszForm4:{\n"
  1330. " \"lang\": \"\",\n"
  1331. " \"tzone\": \"\",\n"
  1332. " \"route\": \"\",\n"
  1333. " \"ver\": \"\",\n"
  1334. " \"sys_time\":\"\",\n"
  1335. " \"len\": 52\n"
  1336. " },\n"
  1337. " wlszForm5:{\n"
  1338. " \"lang\": \"\",\n"
  1339. " \"tzone\": \"\",\n"
  1340. " \"route\": \"\",\n"
  1341. " \"ver\": \"\",\n"
  1342. " \"sys_time\":\"\",\n"
  1343. " \"len\": 52\n"
  1344. " },\n"
  1345. " showSaveModal: false,\n"
  1346. " popType: '',\n"
  1347. " popMessage:'',\n"
  1348. " sqs:[{\"id\":8,\"name\":\"东8区\"},{\"id\":-8,\"name\":\"西8区\"},{\"id\":0,\"name\":\"任意时区\"}],\n"
  1349. " currentDate: new Date(),\n"
  1350. " selectedDate: null,\n"
  1351. " selectedHour: 12,\n"
  1352. " selectedMinute: 0,\n"
  1353. " selectedSecond: 0,\n"
  1354. " isPickerVisible: false,\n"
  1355. " files: [],\n"
  1356. " isDragover: false,\n"
  1357. " isUploading: false,\n"
  1358. " nextFileId: 1,\n"
  1359. " years:[],\n"
  1360. " months:[],\n"
  1361. " dayAll:[],\n"
  1362. " hours:[],\n"
  1363. " minutes:[],\n"
  1364. " dateForm:{},\n"
  1365. " // 日期新方法\n"
  1366. " get daysNew() {\n"
  1367. " const currentYear = new Date().getFullYear();\n"
  1368. " for (let i = currentYear - 20; i <= currentYear + 5; i++) {\n"
  1369. " this.years.push({\n"
  1370. " id:i,\n"
  1371. " name:i+'年'\n"
  1372. " })\n"
  1373. " };\n"
  1374. " // 初始化月份\n"
  1375. " for (let i = 1; i <= 12; i++) {\n"
  1376. " this.months.push({\n"
  1377. " id:i,\n"
  1378. " name:i+'月'\n"
  1379. " })\n"
  1380. " }\n"
  1381. " this.updateDays();\n"
  1382. " for (let i = 0; i < 24; i++) {\n"
  1383. " this.hours.push({\n"
  1384. " id:i,\n"
  1385. " name:i\n"
  1386. " })\n"
  1387. " }\n"
  1388. " // 初始化分钟\n"
  1389. " for (let i = 0; i < 60; i++) {\n"
  1390. " this.minutes.push({\n"
  1391. " id:i,\n"
  1392. " name:i\n"
  1393. " })\n"
  1394. " }\n"
  1395. " },\n"
  1396. " updateDays(){\n"
  1397. " if(this.dateForm.year==null || this.dateForm.month==null){\n"
  1398. " return\n"
  1399. " }\n"
  1400. " const year = parseInt(this.dateForm.year);\n"
  1401. " const month = parseInt(this.dateForm.month);\n"
  1402. " // 如果年月未选择,默认显示31天\n"
  1403. " let daysInMonth = 1;\n"
  1404. " if (year && month) {\n"
  1405. " // 计算所选年月有多少天\n"
  1406. " daysInMonth = new Date(year, month, 0).getDate();\n"
  1407. " }\n"
  1408. " this.dayAll=[];\n"
  1409. " // 添加日期选项\n"
  1410. " for (let i = 1; i <= daysInMonth; i++) {\n"
  1411. " this.dayAll.push({\n"
  1412. " id:i,\n"
  1413. " name:i\n"
  1414. " })\n"
  1415. " }\n"
  1416. " this.dateForm.day=null;\n"
  1417. " },\n"
  1418. " // 日期选择方法\n"
  1419. " showPicker() {\n"
  1420. " // this.dateForm.year='';\n"
  1421. " // this.dateForm.month='';\n"
  1422. " // this.dateForm.day='';\n"
  1423. " // this.dateForm.hour='';\n"
  1424. " // this.dateForm.minute='';\n"
  1425. " // this.dateForm.second='';\n"
  1426. " this.isPickerVisible = true;\n"
  1427. " // 如果没有选择日期,默认使用今天\n"
  1428. " if (!this.selectedDate) {\n"
  1429. " this.selectedDate = new Date();\n"
  1430. " }\n"
  1431. " var date=new Date(this.wlszForm4.sys_time);\n"
  1432. " this.dateForm.year = date.getFullYear();\n"
  1433. " this.dateForm.month = date.getMonth() + 1 < 10 ? (date.getMonth() + 1) : date.getMonth() + 1;\n"
  1434. " if( this.dateForm.month !=null){\n"
  1435. " this.updateDays();\n"
  1436. " }\n"
  1437. " this.dateForm.day = date.getDate() < 10 ? date.getDate() : date.getDate();\n"
  1438. " this.dateForm.hour = date.getHours() < 10 ? date.getHours() : date.getHours();\n"
  1439. " this.dateForm.minute= date.getMinutes() < 10 ? date.getMinutes() : date.getMinutes();\n"
  1440. " this.dateForm.second= date.getSeconds() < 10 ? date.getSeconds() : date.getSeconds();\n"
  1441. " // 设置当前时间为选择的时间\n"
  1442. " const now = new Date();\n"
  1443. " this.selectedHour = now.getHours();\n"
  1444. " this.selectedMinute = now.getMinutes();\n"
  1445. " this.selectedSecond = now.getSeconds();\n"
  1446. " },\n"
  1447. " clearSelection() {\n"
  1448. " this.selectedDate = null;\n"
  1449. " this.selectedHour = 0;\n"
  1450. " this.selectedMinute = 0;\n"
  1451. " this.selectedSecond = 0;\n"
  1452. " },\n"
  1453. " confirmSelection() {\n"
  1454. " var month=this.dateForm.month<10?'0'+this.dateForm.month:this.dateForm.month\n"
  1455. " var day=this.dateForm.day<10?'0'+this.dateForm.day:this.dateForm.day\n"
  1456. " var hour=this.dateForm.hour<10?'0'+this.dateForm.hour:this.dateForm.hour\n"
  1457. " var minute=this.dateForm.minute<10?'0'+this.dateForm.minute:this.dateForm.minute\n"
  1458. " var second=this.dateForm.second<10?'0'+this.dateForm.second:this.dateForm.second\n"
  1459. " this.wlszForm4.sys_time=this.dateForm.year+'-'+month+'-'+day+' '+ hour+':'+ minute+':'+ second;\n"
  1460. " this.isPickerVisible = false;\n"
  1461. " },\n"
  1462. " async sbxxQuery(){\n"
  1463. " // this.wlszForm4= await this.data.data\n"
  1464. " },\n"
  1465. " async stxjClick(){\n"
  1466. " this.showSaveModal = true\n"
  1467. " this.popMessage=\"确认要提交吗?\";\n"
  1468. " this.wlszForm4.type=\"NtpSave\";\n"
  1469. " this.saveDataAll=this.wlszForm4;\n"
  1470. " this.popType='sjsz';\n"
  1471. " },\n"
  1472. " showXtsjModalClick(){\n"
  1473. " this.clearSelection();\n"
  1474. " this.showXtsjModal=true;\n"
  1475. " },\n"
  1476. " // 上传附件方法\n"
  1477. " showFjscModalClick(){\n"
  1478. " this.showScfjModal=true;\n"
  1479. " this.wlszForm5=JSON.parse(JSON.stringify( this.wlszForm4));\n"
  1480. " },\n"
  1481. " selectFiles() {\n"
  1482. " this.$refs.fileInput.click();\n"
  1483. " },\n"
  1484. " handleFileSelect(e) {\n"
  1485. " const selectedFiles = Array.from(e.target.files);\n"
  1486. " this.files = [];\n"
  1487. " this.addFiles(selectedFiles);\n"
  1488. " // 清空input,允许重复选择相同文件\n"
  1489. " e.target.value = '';\n"
  1490. " },\n"
  1491. " handleDrop(e) {\n"
  1492. " this.isDragover = false;\n"
  1493. " const droppedFiles = Array.from(e.dataTransfer.files);\n"
  1494. " this.addFiles(droppedFiles);\n"
  1495. " },\n"
  1496. " addFiles(fileList) {\n"
  1497. " fileList.forEach(file => {\n"
  1498. " this.files.push({\n"
  1499. " id: this.nextFileId++,\n"
  1500. " file: file,\n"
  1501. " name: file.name,\n"
  1502. " size: file.size,\n"
  1503. " type: file.type,\n"
  1504. " status: 'pending', // pending, uploading, success, error\n"
  1505. " progress: 0\n"
  1506. " });\n"
  1507. " });\n"
  1508. " },\n"
  1509. " clearFiles() {\n"
  1510. " this.files = [];\n"
  1511. " this.showScfjModal=false;\n"
  1512. " },\n"
  1513. " async uploadFiles() {\n"
  1514. " if (this.files.length === 0) return;\n"
  1515. " if(this.wlszForm5.ver=='' || this.wlszForm5.ver==null){\n"
  1516. " return\n"
  1517. " }\n"
  1518. " this.isUploading = true;\n"
  1519. " for (const fileObj of this.files) {\n"
  1520. " if (fileObj.status === 'success') continue;\n"
  1521. " sys_up_settings(this.wlszForm5.ver,fileObj.file)\n"
  1522. " this.clearFiles()\n"
  1523. " }\n"
  1524. " this.isUploading = false;\n"
  1525. " },\n"
  1526. " // 初始化事件监听\n"
  1527. " initEventListeners() {\n"
  1528. " document.addEventListener('vue-command', (event) => {\n"
  1529. " if (event.detail.type === 'process') {\n"
  1530. " this.processData(event.detail.source);\n"
  1531. " } else if (event.detail.type === 'update') {\n"
  1532. " this.updateData(event.detail.data);\n"
  1533. " }\n"
  1534. " });\n"
  1535. " }\n"
  1536. " }).mount();\n"
  1537. " // 将方法暴露到全局\n"
  1538. " window.externalIncrement = () => {\n"
  1539. " app.externalIncrement();\n"
  1540. " };\n"
  1541. " });\n"
  1542. "</script>\n"
  1543. "</body>\n"
  1544. "</html>"
  1545. ;
  1546. // 文本数据大小(包括null终止符)
  1547. const size_t p_index_html_size = 68490;
  1548. // 文本长度(字符数)
  1549. const size_t p_index_html_length = 66291;
  1550. #endif /* P_INDEX_HTML_H */