| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781 |
- 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";
- import { P as Picker } from "./index-0f48f786.js";
- import { B as BackTop } from "./index-9e456003.js";
- import { B as Button } from "./index-b1054607.js";
- import { C as CellGroup } from "./index-3a8cf159.js";
- import { C as Cell } from "./index-8540448e.js";
- import { F as Field } from "./index-41ec7e28.js";
- import { C as CusNavigation } from "./CusNavigation-87012716.js";
- import { p as post_promise } from "./index-18735c56.js";
- import { a as showConfirmDialog } from "./index-fefbbdb7.js";
- 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";
- import { p as popupSharedProps, a as popupSharedPropKeys, P as Popup } from "./index-eef3af38.js";
- import { L as Loading } from "./index-217c49a0.js";
- import { s as showToast } from "./function-call-dc072a29.js";
- import { F as Form } from "./index-0229ad12.js";
- import "./use-scope-id-0b5b8615.js";
- import "./use-route-726f0d0b.js";
- import "./axios-8cd254ce.js";
- import "./mount-component-2b0f7b23.js";
- import "./use-placeholder-16d7c5d7.js";
- import "./on-popup-reopen-c5ca1603.js";
- const [name, bem] = createNamespace("action-sheet");
- const actionSheetProps = extend({}, popupSharedProps, {
- title: String,
- round: truthProp,
- actions: makeArrayProp(),
- closeIcon: makeStringProp("cross"),
- closeable: truthProp,
- cancelText: String,
- description: String,
- closeOnPopstate: truthProp,
- closeOnClickAction: Boolean,
- safeAreaInsetBottom: truthProp
- });
- const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
- var stdin_default = defineComponent({
- name,
- props: actionSheetProps,
- emits: ["select", "cancel", "update:show"],
- setup(props, {
- slots,
- emit
- }) {
- const updateShow = (show) => emit("update:show", show);
- const onCancel = () => {
- updateShow(false);
- emit("cancel");
- };
- const renderHeader = () => {
- if (props.title) {
- return createVNode("div", {
- "class": bem("header")
- }, [props.title, props.closeable && createVNode(Icon, {
- "name": props.closeIcon,
- "class": [bem("close"), HAPTICS_FEEDBACK],
- "onClick": onCancel
- }, null)]);
- }
- };
- const renderCancel = () => {
- if (slots.cancel || props.cancelText) {
- return [createVNode("div", {
- "class": bem("gap")
- }, null), createVNode("button", {
- "type": "button",
- "class": bem("cancel"),
- "onClick": onCancel
- }, [slots.cancel ? slots.cancel() : props.cancelText])];
- }
- };
- const renderIcon = (action) => {
- if (action.icon) {
- return createVNode(Icon, {
- "class": bem("item-icon"),
- "name": action.icon
- }, null);
- }
- };
- const renderActionContent = (action, index2) => {
- if (action.loading) {
- return createVNode(Loading, {
- "class": bem("loading-icon")
- }, null);
- }
- if (slots.action) {
- return slots.action({
- action,
- index: index2
- });
- }
- return [createVNode("span", {
- "class": bem("name")
- }, [action.name]), action.subname && createVNode("div", {
- "class": bem("subname")
- }, [action.subname])];
- };
- const renderAction = (action, index2) => {
- const {
- color,
- loading,
- callback,
- disabled,
- className
- } = action;
- const onClick = () => {
- if (disabled || loading) {
- return;
- }
- if (callback) {
- callback(action);
- }
- if (props.closeOnClickAction) {
- updateShow(false);
- }
- nextTick(() => emit("select", action, index2));
- };
- return createVNode("button", {
- "type": "button",
- "style": {
- color
- },
- "class": [bem("item", {
- loading,
- disabled
- }), className],
- "onClick": onClick
- }, [renderIcon(action), renderActionContent(action, index2)]);
- };
- const renderDescription = () => {
- if (props.description || slots.description) {
- const content = slots.description ? slots.description() : props.description;
- return createVNode("div", {
- "class": bem("description")
- }, [content]);
- }
- };
- return () => createVNode(Popup, mergeProps({
- "class": bem(),
- "position": "bottom",
- "onUpdate:show": updateShow
- }, pick(props, popupInheritKeys)), {
- default: () => {
- var _a;
- return [renderHeader(), renderDescription(), createVNode("div", {
- "class": bem("content")
- }, [props.actions.map(renderAction), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
- }
- });
- }
- });
- const ActionSheet = withInstall(stdin_default);
- const index = "";
- var byteToHex = [];
- for (var i = 0; i < 256; ++i) {
- byteToHex.push((i + 256).toString(16).slice(1));
- }
- function unsafeStringify(arr, offset = 0) {
- 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();
- }
- var getRandomValues;
- var rnds8 = new Uint8Array(16);
- function rng() {
- if (!getRandomValues) {
- getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
- if (!getRandomValues) {
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
- }
- }
- return getRandomValues(rnds8);
- }
- var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
- const native = {
- randomUUID
- };
- function v4(options, buf, offset) {
- if (native.randomUUID && !buf && !options) {
- return native.randomUUID();
- }
- options = options || {};
- var rnds = options.random || (options.rng || rng)();
- rnds[6] = rnds[6] & 15 | 64;
- rnds[8] = rnds[8] & 63 | 128;
- if (buf) {
- offset = offset || 0;
- for (var i = 0; i < 16; ++i) {
- buf[offset + i] = rnds[i];
- }
- return buf;
- }
- return unsafeStringify(rnds);
- }
- const selColumns = [
- { text: "WiFi", value: "WiFi" },
- { text: "NB-IOT", value: "NB-IOT" },
- { text: "4G", value: "4G" }
- ];
- const platformColumns = [
- { text: "阿里云", value: "阿里云" },
- { text: "驼人", value: "驼人" },
- { text: "本地", value: "本地" }
- ];
- const _hoisted_1 = { class: "pages" };
- const _hoisted_2 = { class: "mains" };
- const _hoisted_3 = { class: "form" };
- const _hoisted_4 = { class: "submit-btn" };
- const _hoisted_5 = { class: "title" };
- const _hoisted_6 = { class: "form" };
- const _hoisted_7 = { class: "title" };
- const _hoisted_8 = { class: "form" };
- const _hoisted_9 = {
- class: "container",
- style: { "overflow-y": "auto", "flex-grow": "1", "background-color": "#f7f8fa" }
- };
- const _hoisted_10 = { class: "form" };
- const _hoisted_11 = { style: { "margin": "0.25rem 10%", "width": "80%" } };
- const _hoisted_12 = { class: "form" };
- const _hoisted_13 = { style: { "margin": "0.25rem 10%", "width": "80%" } };
- const _sfc_main = /* @__PURE__ */ defineComponent({
- __name: "Index",
- setup(__props) {
- const userInfo = useStoreOfUserInfo();
- const cusNavigation = ref();
- const wifiAction = ref(false);
- const wifiTitle = ref("");
- const addressAction = ref(false);
- const addressTitle = ref("");
- const formData = ref({});
- const wifiInfo = ref({});
- const addressInfo = ref({});
- const wifiDatas = ref([]);
- const addressDatas = ref([]);
- const showPicker = ref(false);
- const showPlatfromPicker = ref(false);
- const validator20 = (val) => val && val.length > 20 ? false : true;
- function onSubmit() {
- var _a;
- formData.value.wifi = JSON.stringify(wifiDatas.value);
- (_a = addressDatas == null ? void 0 : addressDatas.value) == null ? void 0 : _a.forEach((item) => {
- switch (item.platform) {
- case "阿里云":
- item.platform = "1";
- break;
- case "驼人":
- item.platform = "2";
- break;
- case "本地":
- item.platform = "3";
- break;
- }
- });
- formData.value.address = JSON.stringify(addressDatas.value);
- if (!formData.value.id) {
- formData.value.id = userInfo.id;
- }
- debugger;
- post_promise({ url: "/userConfig/config", data: formData.value }).then(
- (res) => {
- if (res.code === 0) {
- showToast({
- message: "WIFI信息配置成功!",
- onClose: () => {
- refreshCurrentRoute();
- }
- });
- wifiAction.value = false;
- }
- }
- );
- }
- const onConfirm = (selectedOptions) => {
- showPicker.value = false;
- addressInfo.value.networkType = selectedOptions.selectedValues[0];
- };
- const onConfirmPlatfrom = (selectedOptions) => {
- showPlatfromPicker.value = false;
- addressInfo.value.platform = selectedOptions.selectedValues[0];
- };
- function handleBlur() {
- wifiInfo.value.name = wifiInfo.value.name.trim();
- }
- function handleCancel(flag) {
- if (flag === "wifi") {
- wifiInfo.value = {};
- wifiAction.value = false;
- } else {
- addressInfo.value = {};
- addressAction.value = false;
- }
- }
- function onWifiSubmit() {
- let tip = "新增";
- if (!wifiInfo.value.password) {
- wifiInfo.value.password = "";
- }
- if (wifiInfo.value && wifiInfo.value.id) {
- for (let i = 0; i < wifiDatas.value.length; i++) {
- if (wifiDatas.value[i].id === wifiInfo.value.id) {
- wifiDatas.value[i] = wifiInfo.value;
- tip = "编辑";
- }
- }
- } else {
- wifiInfo.value = { ...wifiInfo.value, id: v4() };
- wifiDatas.value.push(wifiInfo.value);
- }
- showToast("WIFI信息" + tip + "成功,保存后生效");
- wifiAction.value = false;
- wifiInfo.value = {};
- }
- function onAddressSubmit() {
- let tip = "新增";
- if (addressInfo.value && addressInfo.value.id) {
- for (let i = 0; i < addressDatas.value.length; i++) {
- if (addressDatas.value[i].id === addressInfo.value.id) {
- addressDatas.value[i] = addressInfo.value;
- tip = "编辑";
- }
- }
- } else {
- addressInfo.value = { ...addressInfo.value, id: v4() };
- addressDatas.value.push(addressInfo.value);
- }
- showToast("对接配置" + tip + "成功,保存后生效");
- addressAction.value = false;
- addressInfo.value = {};
- }
- function handleAdd(addType) {
- if (addType === "wifi") {
- wifiTitle.value = "添加WIFI配置";
- wifiAction.value = true;
- } else {
- addressTitle.value = "添加对接配置";
- addressAction.value = true;
- }
- }
- function handleEdit(editType, record) {
- if (editType === "wifi") {
- wifiInfo.value = { ...record };
- wifiTitle.value = "编辑WIFI配置";
- wifiAction.value = true;
- } else {
- addressInfo.value = { ...record };
- addressTitle.value = "编辑对接配置";
- addressAction.value = true;
- }
- }
- function handleDel(record, delType) {
- if (delType === "wifi") {
- showConfirmDialog({
- title: "提示",
- message: "是否删除" + record.name + "?"
- }).then(() => {
- wifiDatas.value = wifiDatas.value.filter(
- (obj) => obj.id != record.id
- );
- }).catch(() => {
- console.log("删除WFIFI方法关闭...");
- });
- } else {
- showConfirmDialog({
- title: "提示",
- message: "是否删除" + record.address + "对接配置?"
- }).then(() => {
- addressDatas.value = addressDatas.value.filter(
- (obj) => obj.id != record.id
- );
- }).catch(() => {
- console.log("删除WFIFI方法关闭...");
- });
- }
- }
- onMounted(() => {
- getWifiInfo();
- });
- function getWifiInfo() {
- if (userInfo && userInfo.id) {
- post_promise({
- url: "/userConfig/detailById",
- data: {
- id: userInfo.id
- }
- }).then((result) => {
- var _a;
- console.log("result::::", result);
- if (result && result.data) {
- formData.value = result.data;
- wifiDatas.value = JSON.parse(result.data.wifi);
- addressDatas.value = JSON.parse(result.data.address);
- (_a = addressDatas == null ? void 0 : addressDatas.value) == null ? void 0 : _a.forEach((item) => {
- switch (item.platform) {
- case "1":
- item.platform = "阿里云";
- break;
- case "2":
- item.platform = "驼人";
- break;
- case "3":
- item.platform = "本地";
- break;
- }
- });
- }
- }).catch((err) => {
- console.log("err:::", err);
- });
- }
- }
- return (_ctx, _cache) => {
- const _component_van_field = Field;
- const _component_van_cell = Cell;
- const _component_van_cell_group = CellGroup;
- const _component_van_button = Button;
- const _component_van_form = Form;
- const _component_van_icon = Icon;
- const _component_van_back_top = BackTop;
- const _component_van_action_sheet = ActionSheet;
- const _component_van_picker = Picker;
- const _component_van_popup = Popup;
- return openBlock(), createElementBlock(Fragment, null, [
- createBaseVNode("div", _hoisted_1, [
- createVNode(unref(CusNavigation), {
- ref_key: "cusNavigation",
- ref: cusNavigation,
- gobackabled: "",
- title: "WIFI配置"
- }, null, 512),
- createBaseVNode("div", _hoisted_2, [
- _cache[23] || (_cache[23] = createBaseVNode("div", { class: "title" }, "医院配置", -1)),
- createBaseVNode("div", _hoisted_3, [
- createVNode(_component_van_form, { onSubmit }, {
- default: withCtx(() => [
- createVNode(_component_van_cell_group, { inset: "" }, {
- default: withCtx(() => [
- createVNode(_component_van_cell, null, {
- default: withCtx(() => [
- createVNode(_component_van_field, {
- modelValue: formData.value.deviceSecret,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value.deviceSecret = $event),
- name: "deviceSecret",
- label: "密钥",
- placeholder: "请填写密钥配置"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- })
- ]),
- _: 1
- }),
- createBaseVNode("div", _hoisted_4, [
- createVNode(_component_van_button, {
- round: "",
- block: "",
- type: "primary",
- "native-type": "submit"
- }, {
- default: withCtx(() => _cache[20] || (_cache[20] = [
- createTextVNode(" 提交 ")
- ])),
- _: 1
- })
- ])
- ]),
- _: 1
- })
- ]),
- createBaseVNode("div", _hoisted_5, [
- _cache[21] || (_cache[21] = createTextVNode(" 对接配置 ")),
- createBaseVNode("div", null, [
- createBaseVNode("a", {
- onClick: _cache[1] || (_cache[1] = ($event) => handleAdd("address")),
- style: { "margin-left": "20px" }
- }, "添加配置")
- ])
- ]),
- createBaseVNode("div", _hoisted_6, [
- (openBlock(true), createElementBlock(Fragment, null, renderList(addressDatas.value, (item, index2) => {
- return openBlock(), createElementBlock("div", {
- class: "wifi-info",
- style: {},
- key: index2
- }, [
- createVNode(_component_van_icon, {
- "class-prefix": "iconfont",
- name: item.networkType,
- size: 46
- }, null, 8, ["name"]),
- createVNode(_component_van_cell, {
- title: item.platform === "阿里云" ? item.productKey : item.address + ":" + item.port,
- label: item.platform,
- style: { "margin": "0.625rem 0 0 1rem" }
- }, {
- default: withCtx(() => [
- createVNode(_component_van_button, {
- plain: "",
- hairline: "",
- size: "small",
- text: "编辑",
- onClick: ($event) => handleEdit("address", item),
- type: "primary"
- }, null, 8, ["onClick"]),
- createVNode(_component_van_button, {
- size: "small",
- plain: "",
- hairline: "",
- text: "删除",
- type: "danger",
- onClick: ($event) => handleDel(item, "address"),
- class: "delete-button"
- }, null, 8, ["onClick"])
- ]),
- _: 2
- }, 1032, ["title", "label"])
- ]);
- }), 128))
- ]),
- createBaseVNode("div", _hoisted_7, [
- _cache[22] || (_cache[22] = createTextVNode(" WIFI配置 ")),
- createBaseVNode("div", null, [
- createBaseVNode("a", {
- onClick: _cache[2] || (_cache[2] = ($event) => handleAdd("wifi")),
- style: { "margin-left": "20px" }
- }, "添加网络")
- ])
- ]),
- createBaseVNode("div", _hoisted_8, [
- (openBlock(true), createElementBlock(Fragment, null, renderList(wifiDatas.value, (item, index2) => {
- return openBlock(), createElementBlock("div", {
- class: "wifi-info",
- style: {},
- key: index2
- }, [
- createVNode(_component_van_icon, {
- "class-prefix": "iconfont",
- name: "WIFIE",
- size: 46
- }),
- createVNode(_component_van_cell, {
- title: item.name,
- label: item.password,
- "title-class": "wifi-name",
- style: { "margin": "0.625rem 0 0 1rem" }
- }, {
- default: withCtx(() => [
- createVNode(_component_van_button, {
- plain: "",
- hairline: "",
- size: "small",
- text: "编辑",
- onClick: ($event) => handleEdit("wifi", item),
- type: "primary"
- }, null, 8, ["onClick"]),
- createVNode(_component_van_button, {
- size: "small",
- plain: "",
- hairline: "",
- text: "删除",
- type: "danger",
- onClick: ($event) => handleDel(item, "wifi"),
- class: "delete-button"
- }, null, 8, ["onClick"])
- ]),
- _: 2
- }, 1032, ["title", "label"])
- ]);
- }), 128))
- ])
- ]),
- createBaseVNode("div", _hoisted_9, [
- createVNode(_component_van_back_top, {
- target: ".container",
- right: "5vw",
- bottom: "80px"
- })
- ])
- ]),
- wifiAction.value ? (openBlock(), createBlock(_component_van_action_sheet, {
- key: 0,
- show: wifiAction.value,
- "onUpdate:show": _cache[5] || (_cache[5] = ($event) => wifiAction.value = $event),
- title: wifiTitle.value,
- onCancel: _cache[6] || (_cache[6] = ($event) => handleCancel("wifi")),
- "close-on-click-overlay": false
- }, {
- default: withCtx(() => [
- createBaseVNode("div", _hoisted_10, [
- createVNode(_component_van_form, { onSubmit: onWifiSubmit }, {
- default: withCtx(() => [
- createVNode(_component_van_cell_group, { inset: "" }, {
- default: withCtx(() => [
- createVNode(_component_van_cell, null, {
- default: withCtx(() => [
- createVNode(_component_van_field, {
- modelValue: wifiInfo.value.name,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => wifiInfo.value.name = $event),
- name: "name",
- label: "名称",
- onBlur: handleBlur,
- placeholder: "请输入WIFI名称",
- rules: [
- { required: true, message: "请输入WIFI名称" },
- { validator: validator20, message: "WIFI名称不得大于8位" }
- ]
- }, null, 8, ["modelValue", "rules"])
- ]),
- _: 1
- }),
- createVNode(_component_van_cell, null, {
- default: withCtx(() => [
- createVNode(_component_van_field, {
- modelValue: wifiInfo.value.password,
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => wifiInfo.value.password = $event),
- name: "password",
- label: "密码",
- placeholder: "请填写WIFI密码",
- rules: [
- { validator: validator20, message: "WIFI密码不得大于20位" }
- ]
- }, null, 8, ["modelValue", "rules"])
- ]),
- _: 1
- })
- ]),
- _: 1
- }),
- createBaseVNode("div", _hoisted_11, [
- createVNode(_component_van_button, {
- round: "",
- block: "",
- type: "primary",
- "native-type": "submit"
- }, {
- default: withCtx(() => _cache[24] || (_cache[24] = [
- createTextVNode(" 确认 ")
- ])),
- _: 1
- })
- ])
- ]),
- _: 1
- })
- ])
- ]),
- _: 1
- }, 8, ["show", "title"])) : createCommentVNode("", true),
- addressAction.value ? (openBlock(), createBlock(_component_van_action_sheet, {
- key: 1,
- show: addressAction.value,
- "onUpdate:show": _cache[18] || (_cache[18] = ($event) => addressAction.value = $event),
- title: addressTitle.value,
- onCancel: _cache[19] || (_cache[19] = ($event) => handleCancel("address")),
- "close-on-click-overlay": false
- }, {
- default: withCtx(() => [
- createBaseVNode("div", _hoisted_12, [
- createVNode(_component_van_form, { onSubmit: onAddressSubmit }, {
- default: withCtx(() => [
- createVNode(_component_van_cell_group, { inset: "" }, {
- default: withCtx(() => [
- createVNode(_component_van_cell, null, {
- default: withCtx(() => [
- createVNode(_component_van_field, {
- modelValue: addressInfo.value.networkType,
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => addressInfo.value.networkType = $event),
- name: "networkType ",
- label: "对接类型",
- placeholder: "请选择对接类型",
- onClick: _cache[8] || (_cache[8] = ($event) => showPicker.value = true),
- rules: [{ required: true, message: "请选择对接类型" }]
- }, null, 8, ["modelValue"]),
- createVNode(_component_van_popup, {
- show: showPicker.value,
- "onUpdate:show": _cache[10] || (_cache[10] = ($event) => showPicker.value = $event),
- round: "",
- position: "bottom"
- }, {
- default: withCtx(() => [
- createVNode(_component_van_picker, {
- columns: unref(selColumns),
- onCancel: _cache[9] || (_cache[9] = ($event) => showPicker.value = false),
- onConfirm
- }, null, 8, ["columns"])
- ]),
- _: 1
- }, 8, ["show"])
- ]),
- _: 1
- }),
- createVNode(_component_van_cell, null, {
- default: withCtx(() => [
- createVNode(_component_van_field, {
- modelValue: addressInfo.value.platform,
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => addressInfo.value.platform = $event),
- name: "platform ",
- label: "对接平台",
- placeholder: "请选择对接平台",
- onClick: _cache[12] || (_cache[12] = ($event) => showPlatfromPicker.value = true)
- }, null, 8, ["modelValue"]),
- createVNode(_component_van_popup, {
- show: showPlatfromPicker.value,
- "onUpdate:show": _cache[14] || (_cache[14] = ($event) => showPlatfromPicker.value = $event),
- round: "",
- position: "bottom"
- }, {
- default: withCtx(() => [
- createVNode(_component_van_picker, {
- columns: unref(platformColumns),
- onCancel: _cache[13] || (_cache[13] = ($event) => showPlatfromPicker.value = false),
- onConfirm: onConfirmPlatfrom
- }, null, 8, ["columns"])
- ]),
- _: 1
- }, 8, ["show"])
- ]),
- _: 1
- }),
- createVNode(_component_van_cell, null, {
- default: withCtx(() => [
- addressInfo.value.platform === "阿里云" ? (openBlock(), createBlock(_component_van_field, {
- key: 0,
- modelValue: addressInfo.value.productKey,
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => addressInfo.value.productKey = $event),
- name: "productKey",
- label: "产品编码",
- placeholder: "请输入产品编码",
- rules: [{ required: true, message: "请输入产品编码" }]
- }, null, 8, ["modelValue"])) : (openBlock(), createBlock(_component_van_field, {
- key: 1,
- modelValue: addressInfo.value.address,
- "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => addressInfo.value.address = $event),
- name: "address",
- label: "对接地址",
- placeholder: "请输入对接地址",
- rules: [{ required: true, message: "请输入对接地址" }]
- }, null, 8, ["modelValue"]))
- ]),
- _: 1
- }),
- createVNode(_component_van_cell, null, {
- default: withCtx(() => [
- createVNode(_component_van_field, {
- modelValue: addressInfo.value.port,
- "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => addressInfo.value.port = $event),
- name: "port",
- label: "对接端口",
- placeholder: "请输入对接端口",
- rules: [{ required: true, message: "请输入对接端口" }]
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- })
- ]),
- _: 1
- }),
- createBaseVNode("div", _hoisted_13, [
- createVNode(_component_van_button, {
- round: "",
- block: "",
- type: "primary",
- "native-type": "submit"
- }, {
- default: withCtx(() => _cache[25] || (_cache[25] = [
- createTextVNode(" 确认 ")
- ])),
- _: 1
- })
- ])
- ]),
- _: 1
- })
- ])
- ]),
- _: 1
- }, 8, ["show", "title"])) : createCommentVNode("", true)
- ], 64);
- };
- }
- });
- const Index_vue_vue_type_style_index_0_lang = "";
- export {
- _sfc_main as default
- };
|