ss-component-new 1.1.678 → 1.1.679

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- import { defineComponent as C, reactive as y, ref as f, onMounted as E, resolveComponent as s, createElementBlock as m, openBlock as p, createElementVNode as i, createVNode as u, withCtx as c, Fragment as w, renderList as A, createBlock as B, createTextVNode as F } from "vue";
2
- import { g as I, E as v } from "./index-DjOudbez.js";
1
+ import { defineComponent as C, reactive as f, ref as i, onMounted as E, resolveComponent as s, createElementBlock as v, openBlock as _, createElementVNode as b, createVNode as u, withCtx as c, Fragment as w, renderList as A, createBlock as B, createTextVNode as F } from "vue";
2
+ import { g as I, E as g } from "./index-DjOudbez.js";
3
3
  import { useRouter as M } from "vue-router";
4
4
  import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const T = { class: "tenant-wrap" }, $ = { class: "tenant-content" }, q = /* @__PURE__ */ C({
6
6
  __name: "index",
7
7
  setup(D) {
8
- const n = y({
8
+ const n = f({
9
9
  tenantKey: ""
10
- }), b = y({
10
+ }), K = f({
11
11
  tenantKey: [
12
12
  { required: !0, message: "请选择模型", trigger: "blur" }
13
13
  ]
14
- }), d = f(null), _ = f([]), g = M(), K = async () => {
14
+ }), m = i(null), y = i([]), k = M(), x = async () => {
15
15
  var o, t;
16
16
  try {
17
17
  const l = await I({
@@ -20,38 +20,38 @@ const T = { class: "tenant-wrap" }, $ = { class: "tenant-content" }, q = /* @__P
20
20
  }
21
21
  });
22
22
  if (l.data.code === 200) {
23
- const r = (t = (o = l == null ? void 0 : l.data) == null ? void 0 : o.result) == null ? void 0 : t.flatMap((e) => e == null ? void 0 : e.key);
24
- _.value = r == null ? void 0 : r.map((e) => ({
23
+ const r = (t = (o = l == null ? void 0 : l.data) == null ? void 0 : o.result) == null ? void 0 : t.flatMap((e) => e == null ? void 0 : e.key), d = r == null ? void 0 : r.map((e) => ({
25
24
  value: e == null ? void 0 : e.systemKey,
26
25
  label: `【${e == null ? void 0 : e.systemKey}】` + ((e == null ? void 0 : e.name) ?? "未知")
27
26
  }));
27
+ y.value = [...d].sort((e, p) => e.value.localeCompare(p.value));
28
28
  } else
29
- v.error("获取模型数据响应失败");
29
+ g.error("获取模型数据响应失败");
30
30
  } catch {
31
- v.error("获取模型数据失败");
31
+ g.error("获取模型数据失败");
32
32
  }
33
33
  };
34
34
  E(() => {
35
- K();
35
+ x();
36
36
  });
37
- const k = (o) => {
37
+ const V = (o) => {
38
38
  o == null || o.validate((t) => {
39
- t && (console.log("submitForm", n), sessionStorage.setItem("tenantKey", n == null ? void 0 : n.tenantKey), g.push("/login"));
39
+ t && (console.log("submitForm", n), sessionStorage.setItem("tenantKey", n == null ? void 0 : n.tenantKey), k.push("/login"));
40
40
  });
41
41
  };
42
42
  return (o, t) => {
43
- const l = s("el-option"), r = s("el-select"), e = s("el-form-item"), x = s("el-form"), V = s("el-button");
44
- return p(), m("div", T, [
45
- i("div", $, [
46
- t[3] || (t[3] = i("div", { class: "tenant-title" }, "租户信息", -1)),
47
- u(x, {
43
+ const l = s("el-option"), r = s("el-select"), d = s("el-form-item"), e = s("el-form"), p = s("el-button");
44
+ return _(), v("div", T, [
45
+ b("div", $, [
46
+ t[3] || (t[3] = b("div", { class: "tenant-title" }, "租户信息", -1)),
47
+ u(e, {
48
48
  model: n,
49
- rules: b,
49
+ rules: K,
50
50
  ref_key: "formRef",
51
- ref: d
51
+ ref: m
52
52
  }, {
53
53
  default: c(() => [
54
- u(e, {
54
+ u(d, {
55
55
  label: "",
56
56
  prop: "tenantKey"
57
57
  }, {
@@ -59,12 +59,12 @@ const T = { class: "tenant-wrap" }, $ = { class: "tenant-content" }, q = /* @__P
59
59
  u(r, {
60
60
  modelValue: n.tenantKey,
61
61
  "onUpdate:modelValue": t[0] || (t[0] = (a) => n.tenantKey = a),
62
- placeholder: "请选择",
62
+ placeholder: "请选择(可搜索查询)",
63
63
  filterable: "",
64
64
  clearable: ""
65
65
  }, {
66
66
  default: c(() => [
67
- (p(!0), m(w, null, A(_.value, (a) => (p(), B(l, {
67
+ (_(!0), v(w, null, A(y.value, (a) => (_(), B(l, {
68
68
  key: a.value,
69
69
  label: a.label,
70
70
  value: a.value
@@ -78,9 +78,9 @@ const T = { class: "tenant-wrap" }, $ = { class: "tenant-content" }, q = /* @__P
78
78
  ]),
79
79
  _: 1
80
80
  }, 8, ["model", "rules"]),
81
- u(V, {
81
+ u(p, {
82
82
  type: "primary",
83
- onClick: t[1] || (t[1] = (a) => k(d.value))
83
+ onClick: t[1] || (t[1] = (a) => V(m.value))
84
84
  }, {
85
85
  default: c(() => t[2] || (t[2] = [
86
86
  F(" 确认 ")
@@ -92,7 +92,7 @@ const T = { class: "tenant-wrap" }, $ = { class: "tenant-content" }, q = /* @__P
92
92
  ]);
93
93
  };
94
94
  }
95
- }), j = /* @__PURE__ */ N(q, [["__scopeId", "data-v-ba9cb3f6"]]);
95
+ }), j = /* @__PURE__ */ N(q, [["__scopeId", "data-v-5d82b8dd"]]);
96
96
  export {
97
97
  j as default
98
98
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-9Jyf7D58.cjs"),f=require("vue-router"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g={class:"tenant-wrap"},C={class:"tenant-content"},k=e.defineComponent({__name:"index",setup(V){const n=e.reactive({tenantKey:""}),i=e.reactive({tenantKey:[{required:!0,message:"请选择模型",trigger:"blur"}]}),p=e.ref(null),_=e.ref([]),v=f.useRouter(),y=async()=>{var l,o;try{const r=await d.getInsofDataApi({key:{layer:"superAdmin"}});if(r.data.code===200){const s=(o=(l=r==null?void 0:r.data)==null?void 0:l.result)==null?void 0:o.flatMap(t=>t==null?void 0:t.key),u=s==null?void 0:s.map(t=>({value:t==null?void 0:t.systemKey,label:`【${t==null?void 0:t.systemKey}】`+((t==null?void 0:t.name)??"未知")}));_.value=[...u].sort((t,c)=>t.value.localeCompare(c.value))}else d.ElMessage.error("获取模型数据响应失败")}catch{d.ElMessage.error("获取模型数据失败")}};e.onMounted(()=>{y()});const m=l=>{l==null||l.validate(o=>{o&&(console.log("submitForm",n),sessionStorage.setItem("tenantKey",n==null?void 0:n.tenantKey),v.push("/login"))})};return(l,o)=>{const r=e.resolveComponent("el-option"),s=e.resolveComponent("el-select"),u=e.resolveComponent("el-form-item"),t=e.resolveComponent("el-form"),c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",C,[o[3]||(o[3]=e.createElementVNode("div",{class:"tenant-title"},"租户信息",-1)),e.createVNode(t,{model:n,rules:i,ref_key:"formRef",ref:p},{default:e.withCtx(()=>[e.createVNode(u,{label:"",prop:"tenantKey"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:n.tenantKey,"onUpdate:modelValue":o[0]||(o[0]=a=>n.tenantKey=a),placeholder:"请选择(可搜索查询)",filterable:"",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,a=>(e.openBlock(),e.createBlock(r,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"]),e.createVNode(c,{type:"primary",onClick:o[1]||(o[1]=a=>m(p.value))},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode(" 确认 ")])),_:1,__:[2]})])])}}}),x=b._export_sfc(k,[["__scopeId","data-v-5d82b8dd"]]);exports.default=x;