st-comp 0.0.90 → 0.0.92

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.
Files changed (57) hide show
  1. package/components.d.ts +1 -0
  2. package/es/ChartLayout.js +2 -2
  3. package/es/Dialog.js +10 -10
  4. package/es/FactorWarning.cjs +1 -0
  5. package/es/FactorWarning.js +461 -0
  6. package/es/Kline.cjs +1 -1
  7. package/es/Kline.js +11 -10
  8. package/es/KlineNew.cjs +1 -1
  9. package/es/KlineNew.js +10 -9
  10. package/es/Pagination.cjs +1 -1
  11. package/es/Pagination.js +106 -105
  12. package/es/Table.cjs +1 -1
  13. package/es/Table.js +309 -431
  14. package/es/VarietySearch.cjs +1 -12
  15. package/es/VarietySearch.js +788 -2512
  16. package/es/VirtualTable.js +89 -89
  17. package/es/{base-e85dae08.js → base-1bc9f12c.js} +19 -19
  18. package/es/{castArray-b93d1330.js → castArray-f42865a2.js} +1 -1
  19. package/es/{config-provider-cb918d0f.js → config-provider-c8d3957d.js} +3 -3
  20. package/es/{el-button-aab1dbd4.js → el-button-93e0ac7c.js} +33 -33
  21. package/es/{el-empty-ab3ce002.js → el-empty-0c85d9b7.js} +13 -13
  22. package/es/el-icon-0ea8fbf8.cjs +1 -0
  23. package/es/el-icon-4ed993c7.js +1 -0
  24. package/es/el-input-29806e42.js +543 -0
  25. package/es/el-input-a8791103.cjs +9 -0
  26. package/es/{el-overlay-98d7f866.js → el-overlay-53eb27a5.js} +6 -6
  27. package/es/el-popover-1d087574.cjs +1 -0
  28. package/es/el-popover-dd66e2c8.js +133 -0
  29. package/es/el-radio-group-46e8f574.cjs +12 -0
  30. package/es/el-radio-group-caebab9d.js +1743 -0
  31. package/es/{el-scrollbar-7b9d83d5.js → el-scrollbar-e17fad47.js} +14 -14
  32. package/es/el-select-64511731.cjs +1 -0
  33. package/es/el-select-ac302f3c.js +1360 -0
  34. package/es/{el-icon-2d22f211.js → el-table-column-b8e2141b.js} +750 -750
  35. package/es/{el-tag-87576c55.js → el-tag-9493bdff.js} +66 -66
  36. package/es/{focus-trap-067be6d2.js → focus-trap-1b2aef75.js} +1 -1
  37. package/es/{raf-b091dc88.js → raf-6d7e80f4.js} +1 -1
  38. package/es/{scroll-510cef88.js → scroll-a928a93e.js} +1 -1
  39. package/es/style.css +1 -1
  40. package/es/{use-form-item-439ac27c.js → use-form-item-aeec8499.js} +38 -38
  41. package/es/{use-global-config-857b51f5.js → use-global-config-b07c467a.js} +12 -12
  42. package/es/{vnode-8c7963dc.js → vnode-aa872900.js} +1 -1
  43. package/es/{zh-cn-c2b42b5f.js → zh-cn-d29347f8.js} +2 -2
  44. package/lib/bundle.js +1 -1
  45. package/lib/bundle.umd.cjs +181 -181
  46. package/lib/{index-4512909d.js → index-74cdff5f.js} +23623 -23192
  47. package/lib/{python-7403caa0.js → python-ed84da20.js} +1 -1
  48. package/lib/style.css +1 -1
  49. package/package.json +1 -1
  50. package/packages/FactorWarning/index.ts +8 -0
  51. package/packages/FactorWarning/index.vue +383 -0
  52. package/packages/index.ts +2 -0
  53. package/src/pages/FactorWarning/index.vue +72 -0
  54. package/src/router/routes.ts +5 -0
  55. package/es/el-select-d3f15536.cjs +0 -9
  56. package/es/el-select-fd76b16b.js +0 -1894
  57. /package/es/{el-icon-773986c7.cjs → el-table-column-773986c7.cjs} +0 -0
package/components.d.ts CHANGED
@@ -28,6 +28,7 @@ declare module 'vue' {
28
28
  ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
29
29
  ElPopover: typeof import('element-plus/es')['ElPopover']
30
30
  ElRadio: typeof import('element-plus/es')['ElRadio']
31
+ ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
31
32
  ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
32
33
  ElSelect: typeof import('element-plus/es')['ElSelect']
33
34
  ElTable: typeof import('element-plus/es')['ElTable']
package/es/ChartLayout.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./base-e85dae08.js";
2
- import { E as r } from "./el-empty-ab3ce002.js";
1
+ import "./base-1bc9f12c.js";
2
+ import { E as r } from "./el-empty-0c85d9b7.js";
3
3
  import { openBlock as e, createElementBlock as a, normalizeStyle as n, Fragment as o, renderList as u, renderSlot as s, createBlock as y } from "vue";
4
4
  import { _ as m } from "./_plugin-vue_export-helper-dad06003.js";
5
5
  const f = {
package/es/Dialog.js CHANGED
@@ -1,14 +1,14 @@
1
- import "./base-e85dae08.js";
2
- import { z as V, E as g } from "./zh-cn-c2b42b5f.js";
3
- import { E as y } from "./el-overlay-98d7f866.js";
4
- import { E as v } from "./el-button-aab1dbd4.js";
1
+ import "./base-1bc9f12c.js";
2
+ import { z as V, E as g } from "./zh-cn-d29347f8.js";
3
+ import { E as y } from "./el-overlay-53eb27a5.js";
4
+ import { E as v } from "./el-button-93e0ac7c.js";
5
5
  import { defineComponent as C, computed as E, openBlock as x, createBlock as k, unref as B, withCtx as o, createVNode as i, normalizeStyle as b, createElementVNode as d, createTextVNode as m } from "vue";
6
- import "./config-provider-cb918d0f.js";
7
- import "./use-global-config-857b51f5.js";
8
- import "./use-form-item-439ac27c.js";
9
- import "./vnode-8c7963dc.js";
10
- import "./focus-trap-067be6d2.js";
11
- import "./scroll-510cef88.js";
6
+ import "./config-provider-c8d3957d.js";
7
+ import "./use-global-config-b07c467a.js";
8
+ import "./use-form-item-aeec8499.js";
9
+ import "./vnode-aa872900.js";
10
+ import "./focus-trap-1b2aef75.js";
11
+ import "./scroll-a928a93e.js";
12
12
  import "./index-657047bb.js";
13
13
  const z = /* @__PURE__ */ d("span", null, "This is a message", -1), N = { class: "dialog-footer" }, S = /* @__PURE__ */ C({
14
14
  __name: "index",
@@ -0,0 +1 @@
1
+ "use strict";require("./base-315cbfab.cjs");const v=require("./zh-cn-0024c96d.cjs"),U=require("./el-overlay-6d0c5cc3.cjs"),_=require("./el-table-column-773986c7.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-tag-a6a4d4ef.cjs");require("./el-scrollbar-9473fd47.cjs");const R=require("./el-popover-1d087574.cjs"),z=require("./el-button-ec16f484.cjs"),s=require("./el-radio-group-46e8f574.cjs"),j=require("./el-input-a8791103.cjs"),e=require("vue"),A=require("./_plugin-vue_export-helper-f246444f.cjs");require("./config-provider-17c85684.cjs");require("./use-global-config-d02be80b.cjs");require("./use-form-item-7924b6c1.cjs");require("./vnode-85a610a2.cjs");require("./focus-trap-ea177336.cjs");require("./scroll-a80e1458.cjs");require("./_commonjsHelpers-87b0abe8.cjs");require("./raf-c437ab23.cjs");require("./index-eea0bcb3.cjs");require("./castArray-f54f6f75.cjs");require("./typescript-b63f8e83.cjs");const g=a=>(e.pushScopeId("data-v-677b273f"),a=a(),e.popScopeId(),a),G={class:"st-factorWarning"},W={class:"custom-header"},H=g(()=>e.createElementVNode("span",{style:{"margin-right":"4px"}},"因子预警",-1)),J=g(()=>e.createElementVNode("span",{style:{margin:"0 5px"}},"~",-1)),K={key:0,style:{color:"#67c23a"}},Q={key:1,style:{color:"#f56c6c"}},X={key:0},Y={key:1},Z={key:2},ee={class:"custom-footer"},te={__name:"index",props:e.mergeModels({title:{type:[String,null],default:null},moreFactorOptions:{type:Array,default:()=>[]},emptyFactorOptions:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},allowOperation:{type:Boolean,default:!0},showConfig:{type:Object,default:()=>({})}},{visible:{default:!1},visibleModifiers:{}}),emits:e.mergeModels(["add","delete","enabled","closed"],["update:visible"]),setup(a,{emit:B}){const m=e.useModel(a,"visible"),x=a,f=B,c=Object.assign({ruleFormPrice:!0,ruleFormMark:!0,tableStatus:!0,tableCreateTime:!0,tableMark:!0,tableEnable:!0},x.showConfig),u=e.ref(x.allowOperation?"ruleForm":"table"),V=e.ref(null),l=e.ref({factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null}),T=e.ref({factorType:[{required:!0,message:"请选择交易类型",trigger:"blur"}],factorSelectedList:[{required:!0,message:"请选择预警因子",trigger:"blur"}],totalCount:[{required:!0,message:"请填写预警次数",trigger:"blur"}]}),b=async r=>{switch(r){case"threeMore":Object.assign(l.value,{factorType:1,factorSelectedList:["dkx金叉","dkx黄白线上+双箱单次","dkx金叉后+单箱突破","30均线上+向上+单箱"],totalCount:3});break;case"threeEmpty":Object.assign(l.value,{factorType:-1,factorSelectedList:["dkx死叉","dkx黄白线下+双箱单次","dkx死叉后+单箱突破","30均线下+向下+单箱"],totalCount:3});break}y(V.value,!1)},y=async(r,o=!0)=>{r&&await r.validate(k=>{if(!k)return!1;f("add",l.value),o?m.value=!1:l.value={factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null}})},E=r=>f("delete",r),q=r=>f("enabled",r);return e.watch(()=>m.value,r=>{r&&(u.value=x.allowOperation?"ruleForm":"table",l.value={factorType:1,factorSelectedList:[],totalCount:1,minPrice:null,maxPrice:null,mark:null})}),(r,o)=>{const k=s.ElRadioButton,w=s.ElRadioGroup,N=s.ElRadio,p=s.ElFormItem,h=_.ElCheckbox,S=_.ElCheckboxGroup,C=s.ElInputNumber,i=z.ElButton,F=j.ElInput,P=s.ElForm,n=_.ElTableColumn,O=R.ElPopconfirm,D=_.ElTable,L=U.ElDialog,M=v.ElConfigProvider;return e.openBlock(),e.createElementBlock("div",G,[e.createVNode(M,{locale:e.unref(v.zhCn)},{default:e.withCtx(()=>[e.createVNode(L,{modelValue:m.value,"onUpdate:modelValue":o[11]||(o[11]=t=>m.value=t),width:"840","align-center":"","destroy-on-close":"",onClosed:o[12]||(o[12]=t=>f("closed"))},{header:e.withCtx(({close:t,titleId:d,titleClass:I})=>[e.createElementVNode("div",W,[e.createElementVNode("div",{class:e.normalizeClass(I)},[H,e.createElementVNode("span",null,e.toDisplayString(a.title),1)],2),e.createVNode(w,{modelValue:u.value,"onUpdate:modelValue":o[0]||(o[0]=$=>u.value=$)},{default:e.withCtx(()=>[e.createVNode(k,{label:"ruleForm",disabled:!a.allowOperation},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["disabled"]),e.createVNode(k,{label:"table"},{default:e.withCtx(()=>[e.createTextVNode("管理")]),_:1})]),_:1},8,["modelValue"])])]),footer:e.withCtx(()=>[e.createElementVNode("div",ee,[e.createVNode(i,{onClick:o[9]||(o[9]=t=>m.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),u.value==="ruleForm"?(e.openBlock(),e.createBlock(i,{key:0,type:"primary",onClick:o[10]||(o[10]=t=>y(V.value))},{default:e.withCtx(()=>[e.createTextVNode(" 确认 ")]),_:1})):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[u.value==="ruleForm"?(e.openBlock(),e.createBlock(P,{key:0,ref_key:"ruleFormRef",ref:V,model:l.value,rules:T.value,"label-width":"90px"},{default:e.withCtx(()=>[e.createVNode(p,{label:"交易类型:",prop:"factorType"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:l.value.factorType,"onUpdate:modelValue":o[1]||(o[1]=t=>l.value.factorType=t)},{default:e.withCtx(()=>[e.createVNode(N,{label:1},{default:e.withCtx(()=>[e.createTextVNode("多")]),_:1}),e.createVNode(N,{label:-1},{default:e.withCtx(()=>[e.createTextVNode("空")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(p,{label:"预警因子:",prop:"factorSelectedList"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:l.value.factorSelectedList,"onUpdate:modelValue":o[2]||(o[2]=t=>l.value.factorSelectedList=t)},{default:e.withCtx(()=>[l.value.factorType===1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.moreFactorOptions,(t,d)=>(e.openBlock(),e.createBlock(h,{key:d,label:t.factorTypeName,style:{width:"200px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.factorTypeName),1)]),_:2},1032,["label"]))),128)):e.createCommentVNode("",!0),l.value.factorType===-1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.emptyFactorOptions,(t,d)=>(e.openBlock(),e.createBlock(h,{key:d,label:t.factorTypeName,style:{width:"200px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.factorTypeName),1)]),_:2},1032,["label"]))),128)):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1}),e.createVNode(p,{label:"预警次数:",prop:"totalCount"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:l.value.totalCount,"onUpdate:modelValue":o[3]||(o[3]=t=>l.value.totalCount=t),min:1,"controls-position":"right",style:{"margin-right":"20px"}},null,8,["modelValue"]),e.createVNode(i,{onClick:o[4]||(o[4]=t=>b("threeMore"))},{default:e.withCtx(()=>[e.createTextVNode("3次多")]),_:1}),e.createVNode(i,{onClick:o[5]||(o[5]=t=>b("threeEmpty"))},{default:e.withCtx(()=>[e.createTextVNode("3次空")]),_:1})]),_:1}),e.unref(c).ruleFormPrice?(e.openBlock(),e.createBlock(p,{key:0,label:"价格范围:"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:l.value.minPrice,"onUpdate:modelValue":o[6]||(o[6]=t=>l.value.minPrice=t),min:-999,placeholder:"请输入",max:999,"controls-position":"right"},null,8,["modelValue"]),J,e.createVNode(C,{modelValue:l.value.maxPrice,"onUpdate:modelValue":o[7]||(o[7]=t=>l.value.maxPrice=t),placeholder:"请输入",min:-999,max:999,"controls-position":"right"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(c).ruleFormMark?(e.openBlock(),e.createBlock(p,{key:1,label:"备注:"},{default:e.withCtx(()=>[e.createVNode(F,{modelValue:l.value.mark,"onUpdate:modelValue":o[8]||(o[8]=t=>l.value.mark=t),type:"textarea",placeholder:"请输入关键字",rows:2,style:{width:"380px"}},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])):e.createCommentVNode("",!0),u.value==="table"?(e.openBlock(),e.createBlock(D,{key:1,data:a.tableData,size:"small"},{default:e.withCtx(()=>[e.createVNode(n,{label:"预警周期",width:"80"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(t.row.freqName||"-"),1)]),_:1}),e.createVNode(n,{label:"交易类型",width:"80"},{default:e.withCtx(t=>[t.row.factorExtendValue==1?(e.openBlock(),e.createElementBlock("span",K,"多")):(e.openBlock(),e.createElementBlock("span",Q,"空"))]),_:1}),e.createVNode(n,{label:"预警因子"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(t.row.factorExtendName||"-"),1)]),_:1}),e.createVNode(n,{label:"预警次数",width:"80"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(`${t.row.currentCount} / ${t.row.totalCount}`),1)]),_:1}),e.unref(c).tableStatus?(e.openBlock(),e.createBlock(n,{key:0,label:"状态",width:"80"},{default:e.withCtx(t=>[e.createElementVNode("div",null,[t.row.enable===1?(e.openBlock(),e.createElementBlock("span",X,"未触发")):t.row.enable===2?(e.openBlock(),e.createElementBlock("span",Y,"已触发")):(e.openBlock(),e.createElementBlock("span",Z,"-"))])]),_:1})):e.createCommentVNode("",!0),e.unref(c).tableCreateTime?(e.openBlock(),e.createBlock(n,{key:1,label:"设置时间"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(t.row.createdTime||"-"),1)]),_:1})):e.createCommentVNode("",!0),e.unref(c).tableMark?(e.openBlock(),e.createBlock(n,{key:2,label:"备注"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(t.row.mark||"-"),1)]),_:1})):e.createCommentVNode("",!0),a.allowOperation?(e.openBlock(),e.createBlock(n,{key:3,label:"操作",width:"140"},{default:e.withCtx(t=>[e.unref(c).tableEnable?(e.openBlock(),e.createBlock(i,{key:0,disabled:t.row.currentCount!==t.row.totalCount,size:"small",onClick:d=>q(t.row)},{default:e.withCtx(()=>[e.createTextVNode(" 启用 ")]),_:2},1032,["disabled","onClick"])):e.createCommentVNode("",!0),e.createVNode(O,{title:"确定删除?",onConfirm:d=>E(t.row)},{reference:e.withCtx(()=>[e.createVNode(i,{size:"small"},{default:e.withCtx(()=>[e.createTextVNode("删除")]),_:1})]),_:2},1032,["onConfirm"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["data"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])]),_:1},8,["locale"])])}}},oe=A._export_sfc(te,[["__scopeId","data-v-677b273f"]]),le={install(a){a.component("st-factorWarning",oe)}};module.exports=le;
@@ -0,0 +1,461 @@
1
+ import "./base-1bc9f12c.js";
2
+ import { z as Q, E as X } from "./zh-cn-d29347f8.js";
3
+ import { E as Y } from "./el-overlay-53eb27a5.js";
4
+ import { E as Z, a as ee, b as te, c as le } from "./el-table-column-b8e2141b.js";
5
+ import "./el-tooltip-4ed993c7.js";
6
+ import "./el-tag-9493bdff.js";
7
+ import "./el-scrollbar-e17fad47.js";
8
+ import { E as oe } from "./el-popover-dd66e2c8.js";
9
+ import { E as ae } from "./el-button-93e0ac7c.js";
10
+ import { E as re, a as ne, b as ue, c as ie, d as de, e as se } from "./el-radio-group-caebab9d.js";
11
+ import { E as me } from "./el-input-29806e42.js";
12
+ import { mergeModels as L, useModel as ce, ref as E, watch as pe, openBlock as r, createElementBlock as c, createVNode as o, unref as f, withCtx as t, createElementVNode as _, normalizeClass as fe, toDisplayString as p, createTextVNode as n, createBlock as i, createCommentVNode as d, Fragment as M, renderList as $, pushScopeId as _e, popScopeId as be } from "vue";
13
+ import { _ as ye } from "./_plugin-vue_export-helper-dad06003.js";
14
+ import "./config-provider-c8d3957d.js";
15
+ import "./use-global-config-b07c467a.js";
16
+ import "./use-form-item-aeec8499.js";
17
+ import "./vnode-aa872900.js";
18
+ import "./focus-trap-1b2aef75.js";
19
+ import "./scroll-a928a93e.js";
20
+ import "./_commonjsHelpers-10dfc225.js";
21
+ import "./raf-6d7e80f4.js";
22
+ import "./index-657047bb.js";
23
+ import "./castArray-f42865a2.js";
24
+ import "./typescript-7ae59c4c.js";
25
+ const I = (u) => (_e("data-v-677b273f"), u = u(), be(), u), ve = { class: "st-factorWarning" }, ke = { class: "custom-header" }, ge = /* @__PURE__ */ I(() => /* @__PURE__ */ _("span", { style: { "margin-right": "4px" } }, "因子预警", -1)), we = /* @__PURE__ */ I(() => /* @__PURE__ */ _("span", { style: { margin: "0 5px" } }, "~", -1)), xe = {
26
+ key: 0,
27
+ style: { color: "#67c23a" }
28
+ }, Ce = {
29
+ key: 1,
30
+ style: { color: "#f56c6c" }
31
+ }, Ee = { key: 0 }, Ve = { key: 1 }, he = { key: 2 }, Te = { class: "custom-footer" }, Fe = {
32
+ __name: "index",
33
+ props: /* @__PURE__ */ L({
34
+ // 弹窗标题
35
+ title: { type: [String, null], default: null },
36
+ // 因子选项[多, 空]
37
+ moreFactorOptions: { type: Array, default: () => [] },
38
+ emptyFactorOptions: { type: Array, default: () => [] },
39
+ // 管理表格数据
40
+ tableData: { type: Array, default: () => [] },
41
+ // 是否允许进行操作(表单, 表格的操作)
42
+ allowOperation: { type: Boolean, default: !0 },
43
+ // 个别字段功能是否展示
44
+ showConfig: { type: Object, default: () => ({}) }
45
+ }, {
46
+ visible: { default: !1 },
47
+ visibleModifiers: {}
48
+ }),
49
+ emits: /* @__PURE__ */ L(["add", "delete", "enabled", "closed"], ["update:visible"]),
50
+ setup(u, { emit: U }) {
51
+ const g = ce(u, "visible"), V = u, x = U, b = Object.assign(
52
+ {
53
+ ruleFormPrice: !0,
54
+ // 表单-价格范围
55
+ ruleFormMark: !0,
56
+ // 表单-备注
57
+ tableStatus: !0,
58
+ // 表格-状态
59
+ tableCreateTime: !0,
60
+ // 表格-设置时间
61
+ tableMark: !0,
62
+ // 表格-备注
63
+ tableEnable: !0
64
+ // 表格-操作-启用
65
+ },
66
+ V.showConfig
67
+ ), y = E(V.allowOperation ? "ruleForm" : "table"), h = E(null), a = E({
68
+ factorType: 1,
69
+ factorSelectedList: [],
70
+ totalCount: 1,
71
+ minPrice: null,
72
+ maxPrice: null,
73
+ mark: null
74
+ }), B = E({
75
+ factorType: [{ required: !0, message: "请选择交易类型", trigger: "blur" }],
76
+ factorSelectedList: [{ required: !0, message: "请选择预警因子", trigger: "blur" }],
77
+ totalCount: [{ required: !0, message: "请填写预警次数", trigger: "blur" }]
78
+ }), F = async (s) => {
79
+ switch (s) {
80
+ case "threeMore":
81
+ Object.assign(a.value, {
82
+ factorType: 1,
83
+ factorSelectedList: ["dkx金叉", "dkx黄白线上+双箱单次", "dkx金叉后+单箱突破", "30均线上+向上+单箱"],
84
+ totalCount: 3
85
+ });
86
+ break;
87
+ case "threeEmpty":
88
+ Object.assign(a.value, {
89
+ factorType: -1,
90
+ factorSelectedList: ["dkx死叉", "dkx黄白线下+双箱单次", "dkx死叉后+单箱突破", "30均线下+向下+单箱"],
91
+ totalCount: 3
92
+ });
93
+ break;
94
+ }
95
+ S(h.value, !1);
96
+ }, S = async (s, l = !0) => {
97
+ s && await s.validate((C) => {
98
+ if (!C)
99
+ return !1;
100
+ x("add", a.value), l ? g.value = !1 : a.value = {
101
+ factorType: 1,
102
+ factorSelectedList: [],
103
+ totalCount: 1,
104
+ minPrice: null,
105
+ maxPrice: null,
106
+ mark: null
107
+ };
108
+ });
109
+ }, z = (s) => x("delete", s), R = (s) => x("enabled", s);
110
+ return pe(
111
+ () => g.value,
112
+ (s) => {
113
+ s && (y.value = V.allowOperation ? "ruleForm" : "table", a.value = {
114
+ factorType: 1,
115
+ factorSelectedList: [],
116
+ totalCount: 1,
117
+ minPrice: null,
118
+ maxPrice: null,
119
+ mark: null
120
+ });
121
+ }
122
+ ), (s, l) => {
123
+ const C = re, P = ne, O = ue, w = ie, N = Z, D = ee, T = de, v = ae, j = me, q = se, m = te, A = oe, W = le, G = Y, H = X;
124
+ return r(), c("div", ve, [
125
+ o(H, { locale: f(Q) }, {
126
+ default: t(() => [
127
+ o(G, {
128
+ modelValue: g.value,
129
+ "onUpdate:modelValue": l[11] || (l[11] = (e) => g.value = e),
130
+ width: "840",
131
+ "align-center": "",
132
+ "destroy-on-close": "",
133
+ onClosed: l[12] || (l[12] = (e) => x("closed"))
134
+ }, {
135
+ header: t(({ close: e, titleId: k, titleClass: J }) => [
136
+ _("div", ke, [
137
+ _("div", {
138
+ class: fe(J)
139
+ }, [
140
+ ge,
141
+ _("span", null, p(u.title), 1)
142
+ ], 2),
143
+ o(P, {
144
+ modelValue: y.value,
145
+ "onUpdate:modelValue": l[0] || (l[0] = (K) => y.value = K)
146
+ }, {
147
+ default: t(() => [
148
+ o(C, {
149
+ label: "ruleForm",
150
+ disabled: !u.allowOperation
151
+ }, {
152
+ default: t(() => [
153
+ n("添加")
154
+ ]),
155
+ _: 1
156
+ }, 8, ["disabled"]),
157
+ o(C, { label: "table" }, {
158
+ default: t(() => [
159
+ n("管理")
160
+ ]),
161
+ _: 1
162
+ })
163
+ ]),
164
+ _: 1
165
+ }, 8, ["modelValue"])
166
+ ])
167
+ ]),
168
+ footer: t(() => [
169
+ _("div", Te, [
170
+ o(v, {
171
+ onClick: l[9] || (l[9] = (e) => g.value = !1)
172
+ }, {
173
+ default: t(() => [
174
+ n("关闭")
175
+ ]),
176
+ _: 1
177
+ }),
178
+ y.value === "ruleForm" ? (r(), i(v, {
179
+ key: 0,
180
+ type: "primary",
181
+ onClick: l[10] || (l[10] = (e) => S(h.value))
182
+ }, {
183
+ default: t(() => [
184
+ n(" 确认 ")
185
+ ]),
186
+ _: 1
187
+ })) : d("", !0)
188
+ ])
189
+ ]),
190
+ default: t(() => [
191
+ y.value === "ruleForm" ? (r(), i(q, {
192
+ key: 0,
193
+ ref_key: "ruleFormRef",
194
+ ref: h,
195
+ model: a.value,
196
+ rules: B.value,
197
+ "label-width": "90px"
198
+ }, {
199
+ default: t(() => [
200
+ o(w, {
201
+ label: "交易类型:",
202
+ prop: "factorType"
203
+ }, {
204
+ default: t(() => [
205
+ o(P, {
206
+ modelValue: a.value.factorType,
207
+ "onUpdate:modelValue": l[1] || (l[1] = (e) => a.value.factorType = e)
208
+ }, {
209
+ default: t(() => [
210
+ o(O, { label: 1 }, {
211
+ default: t(() => [
212
+ n("多")
213
+ ]),
214
+ _: 1
215
+ }),
216
+ o(O, { label: -1 }, {
217
+ default: t(() => [
218
+ n("空")
219
+ ]),
220
+ _: 1
221
+ })
222
+ ]),
223
+ _: 1
224
+ }, 8, ["modelValue"])
225
+ ]),
226
+ _: 1
227
+ }),
228
+ o(w, {
229
+ label: "预警因子:",
230
+ prop: "factorSelectedList"
231
+ }, {
232
+ default: t(() => [
233
+ o(D, {
234
+ modelValue: a.value.factorSelectedList,
235
+ "onUpdate:modelValue": l[2] || (l[2] = (e) => a.value.factorSelectedList = e)
236
+ }, {
237
+ default: t(() => [
238
+ a.value.factorType === 1 ? (r(!0), c(M, { key: 0 }, $(u.moreFactorOptions, (e, k) => (r(), i(N, {
239
+ key: k,
240
+ label: e.factorTypeName,
241
+ style: { width: "200px" }
242
+ }, {
243
+ default: t(() => [
244
+ n(p(e.factorTypeName), 1)
245
+ ]),
246
+ _: 2
247
+ }, 1032, ["label"]))), 128)) : d("", !0),
248
+ a.value.factorType === -1 ? (r(!0), c(M, { key: 1 }, $(u.emptyFactorOptions, (e, k) => (r(), i(N, {
249
+ key: k,
250
+ label: e.factorTypeName,
251
+ style: { width: "200px" }
252
+ }, {
253
+ default: t(() => [
254
+ n(p(e.factorTypeName), 1)
255
+ ]),
256
+ _: 2
257
+ }, 1032, ["label"]))), 128)) : d("", !0)
258
+ ]),
259
+ _: 1
260
+ }, 8, ["modelValue"])
261
+ ]),
262
+ _: 1
263
+ }),
264
+ o(w, {
265
+ label: "预警次数:",
266
+ prop: "totalCount"
267
+ }, {
268
+ default: t(() => [
269
+ o(T, {
270
+ modelValue: a.value.totalCount,
271
+ "onUpdate:modelValue": l[3] || (l[3] = (e) => a.value.totalCount = e),
272
+ min: 1,
273
+ "controls-position": "right",
274
+ style: { "margin-right": "20px" }
275
+ }, null, 8, ["modelValue"]),
276
+ o(v, {
277
+ onClick: l[4] || (l[4] = (e) => F("threeMore"))
278
+ }, {
279
+ default: t(() => [
280
+ n("3次多")
281
+ ]),
282
+ _: 1
283
+ }),
284
+ o(v, {
285
+ onClick: l[5] || (l[5] = (e) => F("threeEmpty"))
286
+ }, {
287
+ default: t(() => [
288
+ n("3次空")
289
+ ]),
290
+ _: 1
291
+ })
292
+ ]),
293
+ _: 1
294
+ }),
295
+ f(b).ruleFormPrice ? (r(), i(w, {
296
+ key: 0,
297
+ label: "价格范围:"
298
+ }, {
299
+ default: t(() => [
300
+ o(T, {
301
+ modelValue: a.value.minPrice,
302
+ "onUpdate:modelValue": l[6] || (l[6] = (e) => a.value.minPrice = e),
303
+ min: -999,
304
+ placeholder: "请输入",
305
+ max: 999,
306
+ "controls-position": "right"
307
+ }, null, 8, ["modelValue"]),
308
+ we,
309
+ o(T, {
310
+ modelValue: a.value.maxPrice,
311
+ "onUpdate:modelValue": l[7] || (l[7] = (e) => a.value.maxPrice = e),
312
+ placeholder: "请输入",
313
+ min: -999,
314
+ max: 999,
315
+ "controls-position": "right"
316
+ }, null, 8, ["modelValue"])
317
+ ]),
318
+ _: 1
319
+ })) : d("", !0),
320
+ f(b).ruleFormMark ? (r(), i(w, {
321
+ key: 1,
322
+ label: "备注:"
323
+ }, {
324
+ default: t(() => [
325
+ o(j, {
326
+ modelValue: a.value.mark,
327
+ "onUpdate:modelValue": l[8] || (l[8] = (e) => a.value.mark = e),
328
+ type: "textarea",
329
+ placeholder: "请输入关键字",
330
+ rows: 2,
331
+ style: { width: "380px" }
332
+ }, null, 8, ["modelValue"])
333
+ ]),
334
+ _: 1
335
+ })) : d("", !0)
336
+ ]),
337
+ _: 1
338
+ }, 8, ["model", "rules"])) : d("", !0),
339
+ y.value === "table" ? (r(), i(W, {
340
+ key: 1,
341
+ data: u.tableData,
342
+ size: "small"
343
+ }, {
344
+ default: t(() => [
345
+ o(m, {
346
+ label: "预警周期",
347
+ width: "80"
348
+ }, {
349
+ default: t((e) => [
350
+ n(p(e.row.freqName || "-"), 1)
351
+ ]),
352
+ _: 1
353
+ }),
354
+ o(m, {
355
+ label: "交易类型",
356
+ width: "80"
357
+ }, {
358
+ default: t((e) => [
359
+ e.row.factorExtendValue == 1 ? (r(), c("span", xe, "多")) : (r(), c("span", Ce, "空"))
360
+ ]),
361
+ _: 1
362
+ }),
363
+ o(m, { label: "预警因子" }, {
364
+ default: t((e) => [
365
+ n(p(e.row.factorExtendName || "-"), 1)
366
+ ]),
367
+ _: 1
368
+ }),
369
+ o(m, {
370
+ label: "预警次数",
371
+ width: "80"
372
+ }, {
373
+ default: t((e) => [
374
+ n(p(`${e.row.currentCount} / ${e.row.totalCount}`), 1)
375
+ ]),
376
+ _: 1
377
+ }),
378
+ f(b).tableStatus ? (r(), i(m, {
379
+ key: 0,
380
+ label: "状态",
381
+ width: "80"
382
+ }, {
383
+ default: t((e) => [
384
+ _("div", null, [
385
+ e.row.enable === 1 ? (r(), c("span", Ee, "未触发")) : e.row.enable === 2 ? (r(), c("span", Ve, "已触发")) : (r(), c("span", he, "-"))
386
+ ])
387
+ ]),
388
+ _: 1
389
+ })) : d("", !0),
390
+ f(b).tableCreateTime ? (r(), i(m, {
391
+ key: 1,
392
+ label: "设置时间"
393
+ }, {
394
+ default: t((e) => [
395
+ n(p(e.row.createdTime || "-"), 1)
396
+ ]),
397
+ _: 1
398
+ })) : d("", !0),
399
+ f(b).tableMark ? (r(), i(m, {
400
+ key: 2,
401
+ label: "备注"
402
+ }, {
403
+ default: t((e) => [
404
+ n(p(e.row.mark || "-"), 1)
405
+ ]),
406
+ _: 1
407
+ })) : d("", !0),
408
+ u.allowOperation ? (r(), i(m, {
409
+ key: 3,
410
+ label: "操作",
411
+ width: "140"
412
+ }, {
413
+ default: t((e) => [
414
+ f(b).tableEnable ? (r(), i(v, {
415
+ key: 0,
416
+ disabled: e.row.currentCount !== e.row.totalCount,
417
+ size: "small",
418
+ onClick: (k) => R(e.row)
419
+ }, {
420
+ default: t(() => [
421
+ n(" 启用 ")
422
+ ]),
423
+ _: 2
424
+ }, 1032, ["disabled", "onClick"])) : d("", !0),
425
+ o(A, {
426
+ title: "确定删除?",
427
+ onConfirm: (k) => z(e.row)
428
+ }, {
429
+ reference: t(() => [
430
+ o(v, { size: "small" }, {
431
+ default: t(() => [
432
+ n("删除")
433
+ ]),
434
+ _: 1
435
+ })
436
+ ]),
437
+ _: 2
438
+ }, 1032, ["onConfirm"])
439
+ ]),
440
+ _: 1
441
+ })) : d("", !0)
442
+ ]),
443
+ _: 1
444
+ }, 8, ["data"])) : d("", !0)
445
+ ]),
446
+ _: 1
447
+ }, 8, ["modelValue"])
448
+ ]),
449
+ _: 1
450
+ }, 8, ["locale"])
451
+ ]);
452
+ };
453
+ }
454
+ }, Se = /* @__PURE__ */ ye(Fe, [["__scopeId", "data-v-677b273f"]]), et = {
455
+ install(u) {
456
+ u.component("st-factorWarning", Se);
457
+ }
458
+ };
459
+ export {
460
+ et as default
461
+ };