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