Index-fde06628.js 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  1. import { d as defineComponent, c as createVNode, m as mergeProps, z as nextTick, A as useStoreOfUserInfo, r as ref, o as onMounted, b as createElementBlock, e as createBaseVNode, B as unref, f as withCtx, s as createTextVNode, F as Fragment, x as renderList, k as createBlock, C as createCommentVNode, j as openBlock, Q as refreshCurrentRoute } from "./index-5e4623ce.js";
  2. import { P as Picker } from "./index-0f48f786.js";
  3. import { B as BackTop } from "./index-9e456003.js";
  4. import { B as Button } from "./index-b1054607.js";
  5. import { C as CellGroup } from "./index-3a8cf159.js";
  6. import { C as Cell } from "./index-8540448e.js";
  7. import { F as Field } from "./index-41ec7e28.js";
  8. import { C as CusNavigation } from "./CusNavigation-87012716.js";
  9. import { p as post_promise } from "./index-18735c56.js";
  10. import { a as showConfirmDialog } from "./index-fefbbdb7.js";
  11. import { c as createNamespace, e as extend, t as truthProp, o as makeArrayProp, z as makeStringProp, y as pick, I as Icon, H as HAPTICS_FEEDBACK, w as withInstall } from "./index-487cde8c.js";
  12. import { p as popupSharedProps, a as popupSharedPropKeys, P as Popup } from "./index-eef3af38.js";
  13. import { L as Loading } from "./index-217c49a0.js";
  14. import { s as showToast } from "./function-call-dc072a29.js";
  15. import { F as Form } from "./index-0229ad12.js";
  16. import "./use-scope-id-0b5b8615.js";
  17. import "./use-route-726f0d0b.js";
  18. import "./axios-8cd254ce.js";
  19. import "./mount-component-2b0f7b23.js";
  20. import "./use-placeholder-16d7c5d7.js";
  21. import "./on-popup-reopen-c5ca1603.js";
  22. const [name, bem] = createNamespace("action-sheet");
  23. const actionSheetProps = extend({}, popupSharedProps, {
  24. title: String,
  25. round: truthProp,
  26. actions: makeArrayProp(),
  27. closeIcon: makeStringProp("cross"),
  28. closeable: truthProp,
  29. cancelText: String,
  30. description: String,
  31. closeOnPopstate: truthProp,
  32. closeOnClickAction: Boolean,
  33. safeAreaInsetBottom: truthProp
  34. });
  35. const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
  36. var stdin_default = defineComponent({
  37. name,
  38. props: actionSheetProps,
  39. emits: ["select", "cancel", "update:show"],
  40. setup(props, {
  41. slots,
  42. emit
  43. }) {
  44. const updateShow = (show) => emit("update:show", show);
  45. const onCancel = () => {
  46. updateShow(false);
  47. emit("cancel");
  48. };
  49. const renderHeader = () => {
  50. if (props.title) {
  51. return createVNode("div", {
  52. "class": bem("header")
  53. }, [props.title, props.closeable && createVNode(Icon, {
  54. "name": props.closeIcon,
  55. "class": [bem("close"), HAPTICS_FEEDBACK],
  56. "onClick": onCancel
  57. }, null)]);
  58. }
  59. };
  60. const renderCancel = () => {
  61. if (slots.cancel || props.cancelText) {
  62. return [createVNode("div", {
  63. "class": bem("gap")
  64. }, null), createVNode("button", {
  65. "type": "button",
  66. "class": bem("cancel"),
  67. "onClick": onCancel
  68. }, [slots.cancel ? slots.cancel() : props.cancelText])];
  69. }
  70. };
  71. const renderIcon = (action) => {
  72. if (action.icon) {
  73. return createVNode(Icon, {
  74. "class": bem("item-icon"),
  75. "name": action.icon
  76. }, null);
  77. }
  78. };
  79. const renderActionContent = (action, index2) => {
  80. if (action.loading) {
  81. return createVNode(Loading, {
  82. "class": bem("loading-icon")
  83. }, null);
  84. }
  85. if (slots.action) {
  86. return slots.action({
  87. action,
  88. index: index2
  89. });
  90. }
  91. return [createVNode("span", {
  92. "class": bem("name")
  93. }, [action.name]), action.subname && createVNode("div", {
  94. "class": bem("subname")
  95. }, [action.subname])];
  96. };
  97. const renderAction = (action, index2) => {
  98. const {
  99. color,
  100. loading,
  101. callback,
  102. disabled,
  103. className
  104. } = action;
  105. const onClick = () => {
  106. if (disabled || loading) {
  107. return;
  108. }
  109. if (callback) {
  110. callback(action);
  111. }
  112. if (props.closeOnClickAction) {
  113. updateShow(false);
  114. }
  115. nextTick(() => emit("select", action, index2));
  116. };
  117. return createVNode("button", {
  118. "type": "button",
  119. "style": {
  120. color
  121. },
  122. "class": [bem("item", {
  123. loading,
  124. disabled
  125. }), className],
  126. "onClick": onClick
  127. }, [renderIcon(action), renderActionContent(action, index2)]);
  128. };
  129. const renderDescription = () => {
  130. if (props.description || slots.description) {
  131. const content = slots.description ? slots.description() : props.description;
  132. return createVNode("div", {
  133. "class": bem("description")
  134. }, [content]);
  135. }
  136. };
  137. return () => createVNode(Popup, mergeProps({
  138. "class": bem(),
  139. "position": "bottom",
  140. "onUpdate:show": updateShow
  141. }, pick(props, popupInheritKeys)), {
  142. default: () => {
  143. var _a;
  144. return [renderHeader(), renderDescription(), createVNode("div", {
  145. "class": bem("content")
  146. }, [props.actions.map(renderAction), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
  147. }
  148. });
  149. }
  150. });
  151. const ActionSheet = withInstall(stdin_default);
  152. const index = "";
  153. var byteToHex = [];
  154. for (var i = 0; i < 256; ++i) {
  155. byteToHex.push((i + 256).toString(16).slice(1));
  156. }
  157. function unsafeStringify(arr, offset = 0) {
  158. return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
  159. }
  160. var getRandomValues;
  161. var rnds8 = new Uint8Array(16);
  162. function rng() {
  163. if (!getRandomValues) {
  164. getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
  165. if (!getRandomValues) {
  166. throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
  167. }
  168. }
  169. return getRandomValues(rnds8);
  170. }
  171. var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
  172. const native = {
  173. randomUUID
  174. };
  175. function v4(options, buf, offset) {
  176. if (native.randomUUID && !buf && !options) {
  177. return native.randomUUID();
  178. }
  179. options = options || {};
  180. var rnds = options.random || (options.rng || rng)();
  181. rnds[6] = rnds[6] & 15 | 64;
  182. rnds[8] = rnds[8] & 63 | 128;
  183. if (buf) {
  184. offset = offset || 0;
  185. for (var i = 0; i < 16; ++i) {
  186. buf[offset + i] = rnds[i];
  187. }
  188. return buf;
  189. }
  190. return unsafeStringify(rnds);
  191. }
  192. const selColumns = [
  193. { text: "WiFi", value: "WiFi" },
  194. { text: "NB-IOT", value: "NB-IOT" },
  195. { text: "4G", value: "4G" }
  196. ];
  197. const platformColumns = [
  198. { text: "阿里云", value: "阿里云" },
  199. { text: "驼人", value: "驼人" },
  200. { text: "本地", value: "本地" }
  201. ];
  202. const _hoisted_1 = { class: "pages" };
  203. const _hoisted_2 = { class: "mains" };
  204. const _hoisted_3 = { class: "form" };
  205. const _hoisted_4 = { class: "submit-btn" };
  206. const _hoisted_5 = { class: "title" };
  207. const _hoisted_6 = { class: "form" };
  208. const _hoisted_7 = { class: "title" };
  209. const _hoisted_8 = { class: "form" };
  210. const _hoisted_9 = {
  211. class: "container",
  212. style: { "overflow-y": "auto", "flex-grow": "1", "background-color": "#f7f8fa" }
  213. };
  214. const _hoisted_10 = { class: "form" };
  215. const _hoisted_11 = { style: { "margin": "0.25rem 10%", "width": "80%" } };
  216. const _hoisted_12 = { class: "form" };
  217. const _hoisted_13 = { style: { "margin": "0.25rem 10%", "width": "80%" } };
  218. const _sfc_main = /* @__PURE__ */ defineComponent({
  219. __name: "Index",
  220. setup(__props) {
  221. const userInfo = useStoreOfUserInfo();
  222. const cusNavigation = ref();
  223. const wifiAction = ref(false);
  224. const wifiTitle = ref("");
  225. const addressAction = ref(false);
  226. const addressTitle = ref("");
  227. const formData = ref({});
  228. const wifiInfo = ref({});
  229. const addressInfo = ref({});
  230. const wifiDatas = ref([]);
  231. const addressDatas = ref([]);
  232. const showPicker = ref(false);
  233. const showPlatfromPicker = ref(false);
  234. const validator20 = (val) => val && val.length > 20 ? false : true;
  235. function onSubmit() {
  236. var _a;
  237. formData.value.wifi = JSON.stringify(wifiDatas.value);
  238. (_a = addressDatas == null ? void 0 : addressDatas.value) == null ? void 0 : _a.forEach((item) => {
  239. switch (item.platform) {
  240. case "阿里云":
  241. item.platform = "1";
  242. break;
  243. case "驼人":
  244. item.platform = "2";
  245. break;
  246. case "本地":
  247. item.platform = "3";
  248. break;
  249. }
  250. });
  251. formData.value.address = JSON.stringify(addressDatas.value);
  252. if (!formData.value.id) {
  253. formData.value.id = userInfo.id;
  254. }
  255. debugger;
  256. post_promise({ url: "/userConfig/config", data: formData.value }).then(
  257. (res) => {
  258. if (res.code === 0) {
  259. showToast({
  260. message: "WIFI信息配置成功!",
  261. onClose: () => {
  262. refreshCurrentRoute();
  263. }
  264. });
  265. wifiAction.value = false;
  266. }
  267. }
  268. );
  269. }
  270. const onConfirm = (selectedOptions) => {
  271. showPicker.value = false;
  272. addressInfo.value.networkType = selectedOptions.selectedValues[0];
  273. };
  274. const onConfirmPlatfrom = (selectedOptions) => {
  275. showPlatfromPicker.value = false;
  276. addressInfo.value.platform = selectedOptions.selectedValues[0];
  277. };
  278. function handleBlur() {
  279. wifiInfo.value.name = wifiInfo.value.name.trim();
  280. }
  281. function handleCancel(flag) {
  282. if (flag === "wifi") {
  283. wifiInfo.value = {};
  284. wifiAction.value = false;
  285. } else {
  286. addressInfo.value = {};
  287. addressAction.value = false;
  288. }
  289. }
  290. function onWifiSubmit() {
  291. let tip = "新增";
  292. if (!wifiInfo.value.password) {
  293. wifiInfo.value.password = "";
  294. }
  295. if (wifiInfo.value && wifiInfo.value.id) {
  296. for (let i = 0; i < wifiDatas.value.length; i++) {
  297. if (wifiDatas.value[i].id === wifiInfo.value.id) {
  298. wifiDatas.value[i] = wifiInfo.value;
  299. tip = "编辑";
  300. }
  301. }
  302. } else {
  303. wifiInfo.value = { ...wifiInfo.value, id: v4() };
  304. wifiDatas.value.push(wifiInfo.value);
  305. }
  306. showToast("WIFI信息" + tip + "成功,保存后生效");
  307. wifiAction.value = false;
  308. wifiInfo.value = {};
  309. }
  310. function onAddressSubmit() {
  311. let tip = "新增";
  312. if (addressInfo.value && addressInfo.value.id) {
  313. for (let i = 0; i < addressDatas.value.length; i++) {
  314. if (addressDatas.value[i].id === addressInfo.value.id) {
  315. addressDatas.value[i] = addressInfo.value;
  316. tip = "编辑";
  317. }
  318. }
  319. } else {
  320. addressInfo.value = { ...addressInfo.value, id: v4() };
  321. addressDatas.value.push(addressInfo.value);
  322. }
  323. showToast("对接配置" + tip + "成功,保存后生效");
  324. addressAction.value = false;
  325. addressInfo.value = {};
  326. }
  327. function handleAdd(addType) {
  328. if (addType === "wifi") {
  329. wifiTitle.value = "添加WIFI配置";
  330. wifiAction.value = true;
  331. } else {
  332. addressTitle.value = "添加对接配置";
  333. addressAction.value = true;
  334. }
  335. }
  336. function handleEdit(editType, record) {
  337. if (editType === "wifi") {
  338. wifiInfo.value = { ...record };
  339. wifiTitle.value = "编辑WIFI配置";
  340. wifiAction.value = true;
  341. } else {
  342. addressInfo.value = { ...record };
  343. addressTitle.value = "编辑对接配置";
  344. addressAction.value = true;
  345. }
  346. }
  347. function handleDel(record, delType) {
  348. if (delType === "wifi") {
  349. showConfirmDialog({
  350. title: "提示",
  351. message: "是否删除" + record.name + "?"
  352. }).then(() => {
  353. wifiDatas.value = wifiDatas.value.filter(
  354. (obj) => obj.id != record.id
  355. );
  356. }).catch(() => {
  357. console.log("删除WFIFI方法关闭...");
  358. });
  359. } else {
  360. showConfirmDialog({
  361. title: "提示",
  362. message: "是否删除" + record.address + "对接配置?"
  363. }).then(() => {
  364. addressDatas.value = addressDatas.value.filter(
  365. (obj) => obj.id != record.id
  366. );
  367. }).catch(() => {
  368. console.log("删除WFIFI方法关闭...");
  369. });
  370. }
  371. }
  372. onMounted(() => {
  373. getWifiInfo();
  374. });
  375. function getWifiInfo() {
  376. if (userInfo && userInfo.id) {
  377. post_promise({
  378. url: "/userConfig/detailById",
  379. data: {
  380. id: userInfo.id
  381. }
  382. }).then((result) => {
  383. var _a;
  384. console.log("result::::", result);
  385. if (result && result.data) {
  386. formData.value = result.data;
  387. wifiDatas.value = JSON.parse(result.data.wifi);
  388. addressDatas.value = JSON.parse(result.data.address);
  389. (_a = addressDatas == null ? void 0 : addressDatas.value) == null ? void 0 : _a.forEach((item) => {
  390. switch (item.platform) {
  391. case "1":
  392. item.platform = "阿里云";
  393. break;
  394. case "2":
  395. item.platform = "驼人";
  396. break;
  397. case "3":
  398. item.platform = "本地";
  399. break;
  400. }
  401. });
  402. }
  403. }).catch((err) => {
  404. console.log("err:::", err);
  405. });
  406. }
  407. }
  408. return (_ctx, _cache) => {
  409. const _component_van_field = Field;
  410. const _component_van_cell = Cell;
  411. const _component_van_cell_group = CellGroup;
  412. const _component_van_button = Button;
  413. const _component_van_form = Form;
  414. const _component_van_icon = Icon;
  415. const _component_van_back_top = BackTop;
  416. const _component_van_action_sheet = ActionSheet;
  417. const _component_van_picker = Picker;
  418. const _component_van_popup = Popup;
  419. return openBlock(), createElementBlock(Fragment, null, [
  420. createBaseVNode("div", _hoisted_1, [
  421. createVNode(unref(CusNavigation), {
  422. ref_key: "cusNavigation",
  423. ref: cusNavigation,
  424. gobackabled: "",
  425. title: "WIFI配置"
  426. }, null, 512),
  427. createBaseVNode("div", _hoisted_2, [
  428. _cache[23] || (_cache[23] = createBaseVNode("div", { class: "title" }, "医院配置", -1)),
  429. createBaseVNode("div", _hoisted_3, [
  430. createVNode(_component_van_form, { onSubmit }, {
  431. default: withCtx(() => [
  432. createVNode(_component_van_cell_group, { inset: "" }, {
  433. default: withCtx(() => [
  434. createVNode(_component_van_cell, null, {
  435. default: withCtx(() => [
  436. createVNode(_component_van_field, {
  437. modelValue: formData.value.deviceSecret,
  438. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value.deviceSecret = $event),
  439. name: "deviceSecret",
  440. label: "密钥",
  441. placeholder: "请填写密钥配置"
  442. }, null, 8, ["modelValue"])
  443. ]),
  444. _: 1
  445. })
  446. ]),
  447. _: 1
  448. }),
  449. createBaseVNode("div", _hoisted_4, [
  450. createVNode(_component_van_button, {
  451. round: "",
  452. block: "",
  453. type: "primary",
  454. "native-type": "submit"
  455. }, {
  456. default: withCtx(() => _cache[20] || (_cache[20] = [
  457. createTextVNode(" 提交 ")
  458. ])),
  459. _: 1
  460. })
  461. ])
  462. ]),
  463. _: 1
  464. })
  465. ]),
  466. createBaseVNode("div", _hoisted_5, [
  467. _cache[21] || (_cache[21] = createTextVNode(" 对接配置 ")),
  468. createBaseVNode("div", null, [
  469. createBaseVNode("a", {
  470. onClick: _cache[1] || (_cache[1] = ($event) => handleAdd("address")),
  471. style: { "margin-left": "20px" }
  472. }, "添加配置")
  473. ])
  474. ]),
  475. createBaseVNode("div", _hoisted_6, [
  476. (openBlock(true), createElementBlock(Fragment, null, renderList(addressDatas.value, (item, index2) => {
  477. return openBlock(), createElementBlock("div", {
  478. class: "wifi-info",
  479. style: {},
  480. key: index2
  481. }, [
  482. createVNode(_component_van_icon, {
  483. "class-prefix": "iconfont",
  484. name: item.networkType,
  485. size: 46
  486. }, null, 8, ["name"]),
  487. createVNode(_component_van_cell, {
  488. title: item.platform === "阿里云" ? item.productKey : item.address + ":" + item.port,
  489. label: item.platform,
  490. style: { "margin": "0.625rem 0 0 1rem" }
  491. }, {
  492. default: withCtx(() => [
  493. createVNode(_component_van_button, {
  494. plain: "",
  495. hairline: "",
  496. size: "small",
  497. text: "编辑",
  498. onClick: ($event) => handleEdit("address", item),
  499. type: "primary"
  500. }, null, 8, ["onClick"]),
  501. createVNode(_component_van_button, {
  502. size: "small",
  503. plain: "",
  504. hairline: "",
  505. text: "删除",
  506. type: "danger",
  507. onClick: ($event) => handleDel(item, "address"),
  508. class: "delete-button"
  509. }, null, 8, ["onClick"])
  510. ]),
  511. _: 2
  512. }, 1032, ["title", "label"])
  513. ]);
  514. }), 128))
  515. ]),
  516. createBaseVNode("div", _hoisted_7, [
  517. _cache[22] || (_cache[22] = createTextVNode(" WIFI配置 ")),
  518. createBaseVNode("div", null, [
  519. createBaseVNode("a", {
  520. onClick: _cache[2] || (_cache[2] = ($event) => handleAdd("wifi")),
  521. style: { "margin-left": "20px" }
  522. }, "添加网络")
  523. ])
  524. ]),
  525. createBaseVNode("div", _hoisted_8, [
  526. (openBlock(true), createElementBlock(Fragment, null, renderList(wifiDatas.value, (item, index2) => {
  527. return openBlock(), createElementBlock("div", {
  528. class: "wifi-info",
  529. style: {},
  530. key: index2
  531. }, [
  532. createVNode(_component_van_icon, {
  533. "class-prefix": "iconfont",
  534. name: "WIFIE",
  535. size: 46
  536. }),
  537. createVNode(_component_van_cell, {
  538. title: item.name,
  539. label: item.password,
  540. "title-class": "wifi-name",
  541. style: { "margin": "0.625rem 0 0 1rem" }
  542. }, {
  543. default: withCtx(() => [
  544. createVNode(_component_van_button, {
  545. plain: "",
  546. hairline: "",
  547. size: "small",
  548. text: "编辑",
  549. onClick: ($event) => handleEdit("wifi", item),
  550. type: "primary"
  551. }, null, 8, ["onClick"]),
  552. createVNode(_component_van_button, {
  553. size: "small",
  554. plain: "",
  555. hairline: "",
  556. text: "删除",
  557. type: "danger",
  558. onClick: ($event) => handleDel(item, "wifi"),
  559. class: "delete-button"
  560. }, null, 8, ["onClick"])
  561. ]),
  562. _: 2
  563. }, 1032, ["title", "label"])
  564. ]);
  565. }), 128))
  566. ])
  567. ]),
  568. createBaseVNode("div", _hoisted_9, [
  569. createVNode(_component_van_back_top, {
  570. target: ".container",
  571. right: "5vw",
  572. bottom: "80px"
  573. })
  574. ])
  575. ]),
  576. wifiAction.value ? (openBlock(), createBlock(_component_van_action_sheet, {
  577. key: 0,
  578. show: wifiAction.value,
  579. "onUpdate:show": _cache[5] || (_cache[5] = ($event) => wifiAction.value = $event),
  580. title: wifiTitle.value,
  581. onCancel: _cache[6] || (_cache[6] = ($event) => handleCancel("wifi")),
  582. "close-on-click-overlay": false
  583. }, {
  584. default: withCtx(() => [
  585. createBaseVNode("div", _hoisted_10, [
  586. createVNode(_component_van_form, { onSubmit: onWifiSubmit }, {
  587. default: withCtx(() => [
  588. createVNode(_component_van_cell_group, { inset: "" }, {
  589. default: withCtx(() => [
  590. createVNode(_component_van_cell, null, {
  591. default: withCtx(() => [
  592. createVNode(_component_van_field, {
  593. modelValue: wifiInfo.value.name,
  594. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => wifiInfo.value.name = $event),
  595. name: "name",
  596. label: "名称",
  597. onBlur: handleBlur,
  598. placeholder: "请输入WIFI名称",
  599. rules: [
  600. { required: true, message: "请输入WIFI名称" },
  601. { validator: validator20, message: "WIFI名称不得大于8位" }
  602. ]
  603. }, null, 8, ["modelValue", "rules"])
  604. ]),
  605. _: 1
  606. }),
  607. createVNode(_component_van_cell, null, {
  608. default: withCtx(() => [
  609. createVNode(_component_van_field, {
  610. modelValue: wifiInfo.value.password,
  611. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => wifiInfo.value.password = $event),
  612. name: "password",
  613. label: "密码",
  614. placeholder: "请填写WIFI密码",
  615. rules: [
  616. { validator: validator20, message: "WIFI密码不得大于20位" }
  617. ]
  618. }, null, 8, ["modelValue", "rules"])
  619. ]),
  620. _: 1
  621. })
  622. ]),
  623. _: 1
  624. }),
  625. createBaseVNode("div", _hoisted_11, [
  626. createVNode(_component_van_button, {
  627. round: "",
  628. block: "",
  629. type: "primary",
  630. "native-type": "submit"
  631. }, {
  632. default: withCtx(() => _cache[24] || (_cache[24] = [
  633. createTextVNode(" 确认 ")
  634. ])),
  635. _: 1
  636. })
  637. ])
  638. ]),
  639. _: 1
  640. })
  641. ])
  642. ]),
  643. _: 1
  644. }, 8, ["show", "title"])) : createCommentVNode("", true),
  645. addressAction.value ? (openBlock(), createBlock(_component_van_action_sheet, {
  646. key: 1,
  647. show: addressAction.value,
  648. "onUpdate:show": _cache[18] || (_cache[18] = ($event) => addressAction.value = $event),
  649. title: addressTitle.value,
  650. onCancel: _cache[19] || (_cache[19] = ($event) => handleCancel("address")),
  651. "close-on-click-overlay": false
  652. }, {
  653. default: withCtx(() => [
  654. createBaseVNode("div", _hoisted_12, [
  655. createVNode(_component_van_form, { onSubmit: onAddressSubmit }, {
  656. default: withCtx(() => [
  657. createVNode(_component_van_cell_group, { inset: "" }, {
  658. default: withCtx(() => [
  659. createVNode(_component_van_cell, null, {
  660. default: withCtx(() => [
  661. createVNode(_component_van_field, {
  662. modelValue: addressInfo.value.networkType,
  663. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => addressInfo.value.networkType = $event),
  664. name: "networkType ",
  665. label: "对接类型",
  666. placeholder: "请选择对接类型",
  667. onClick: _cache[8] || (_cache[8] = ($event) => showPicker.value = true),
  668. rules: [{ required: true, message: "请选择对接类型" }]
  669. }, null, 8, ["modelValue"]),
  670. createVNode(_component_van_popup, {
  671. show: showPicker.value,
  672. "onUpdate:show": _cache[10] || (_cache[10] = ($event) => showPicker.value = $event),
  673. round: "",
  674. position: "bottom"
  675. }, {
  676. default: withCtx(() => [
  677. createVNode(_component_van_picker, {
  678. columns: unref(selColumns),
  679. onCancel: _cache[9] || (_cache[9] = ($event) => showPicker.value = false),
  680. onConfirm
  681. }, null, 8, ["columns"])
  682. ]),
  683. _: 1
  684. }, 8, ["show"])
  685. ]),
  686. _: 1
  687. }),
  688. createVNode(_component_van_cell, null, {
  689. default: withCtx(() => [
  690. createVNode(_component_van_field, {
  691. modelValue: addressInfo.value.platform,
  692. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => addressInfo.value.platform = $event),
  693. name: "platform ",
  694. label: "对接平台",
  695. placeholder: "请选择对接平台",
  696. onClick: _cache[12] || (_cache[12] = ($event) => showPlatfromPicker.value = true)
  697. }, null, 8, ["modelValue"]),
  698. createVNode(_component_van_popup, {
  699. show: showPlatfromPicker.value,
  700. "onUpdate:show": _cache[14] || (_cache[14] = ($event) => showPlatfromPicker.value = $event),
  701. round: "",
  702. position: "bottom"
  703. }, {
  704. default: withCtx(() => [
  705. createVNode(_component_van_picker, {
  706. columns: unref(platformColumns),
  707. onCancel: _cache[13] || (_cache[13] = ($event) => showPlatfromPicker.value = false),
  708. onConfirm: onConfirmPlatfrom
  709. }, null, 8, ["columns"])
  710. ]),
  711. _: 1
  712. }, 8, ["show"])
  713. ]),
  714. _: 1
  715. }),
  716. createVNode(_component_van_cell, null, {
  717. default: withCtx(() => [
  718. addressInfo.value.platform === "阿里云" ? (openBlock(), createBlock(_component_van_field, {
  719. key: 0,
  720. modelValue: addressInfo.value.productKey,
  721. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => addressInfo.value.productKey = $event),
  722. name: "productKey",
  723. label: "产品编码",
  724. placeholder: "请输入产品编码",
  725. rules: [{ required: true, message: "请输入产品编码" }]
  726. }, null, 8, ["modelValue"])) : (openBlock(), createBlock(_component_van_field, {
  727. key: 1,
  728. modelValue: addressInfo.value.address,
  729. "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => addressInfo.value.address = $event),
  730. name: "address",
  731. label: "对接地址",
  732. placeholder: "请输入对接地址",
  733. rules: [{ required: true, message: "请输入对接地址" }]
  734. }, null, 8, ["modelValue"]))
  735. ]),
  736. _: 1
  737. }),
  738. createVNode(_component_van_cell, null, {
  739. default: withCtx(() => [
  740. createVNode(_component_van_field, {
  741. modelValue: addressInfo.value.port,
  742. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => addressInfo.value.port = $event),
  743. name: "port",
  744. label: "对接端口",
  745. placeholder: "请输入对接端口",
  746. rules: [{ required: true, message: "请输入对接端口" }]
  747. }, null, 8, ["modelValue"])
  748. ]),
  749. _: 1
  750. })
  751. ]),
  752. _: 1
  753. }),
  754. createBaseVNode("div", _hoisted_13, [
  755. createVNode(_component_van_button, {
  756. round: "",
  757. block: "",
  758. type: "primary",
  759. "native-type": "submit"
  760. }, {
  761. default: withCtx(() => _cache[25] || (_cache[25] = [
  762. createTextVNode(" 确认 ")
  763. ])),
  764. _: 1
  765. })
  766. ])
  767. ]),
  768. _: 1
  769. })
  770. ])
  771. ]),
  772. _: 1
  773. }, 8, ["show", "title"])) : createCommentVNode("", true)
  774. ], 64);
  775. };
  776. }
  777. });
  778. const Index_vue_vue_type_style_index_0_lang = "";
  779. export {
  780. _sfc_main as default
  781. };