st-comp 0.0.194 → 0.0.196
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.
- package/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +270 -154
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +29 -29
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +15 -15
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +24 -24
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +20 -20
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +14 -14
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +17 -17
- package/es/Map.cjs +1 -1
- package/es/Map.js +102944 -1
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +1 -1
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +69 -69
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +25 -25
- package/es/User.cjs +1 -1
- package/es/User.js +21 -21
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +22 -22
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +9 -9
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +1395 -1381
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +13 -13
- package/es/{_initCloneObject-95a1fe6e.cjs → _initCloneObject-1136ed17.cjs} +1 -1
- package/es/{_initCloneObject-25087817.js → _initCloneObject-64989891.js} +9 -9
- package/es/{base-f5b11441.js → base-62a70f61.js} +40 -40
- package/es/{config-provider-95d27ce2.js → config-provider-962c9213.js} +6 -6
- package/es/{config-provider-79c2df1b.cjs → config-provider-c629566a.cjs} +1 -1
- package/es/{debounce-06f59c68.js → debounce-ccdceb02.js} +9 -9
- package/es/{dropdown-7a853d45.js → dropdown-220099ea.js} +9 -9
- package/es/{dropdown-c2ef9062.cjs → dropdown-28ffc2a0.cjs} +1 -1
- package/es/{el-autocomplete-b7bcfb25.cjs → el-autocomplete-01985d09.cjs} +1 -1
- package/es/{el-autocomplete-e74d589c.js → el-autocomplete-a2dd1bb5.js} +15 -15
- package/es/{el-button-5973d99c.cjs → el-button-1cb4ce47.cjs} +1 -1
- package/es/{el-button-5a260464.js → el-button-639a79ee.js} +33 -33
- package/es/{el-dialog-a24f4f8f.cjs → el-dialog-10b4cda4.cjs} +1 -1
- package/es/{el-dialog-8d8f6443.js → el-dialog-43cb14a3.js} +15 -15
- package/es/{el-divider-4e1c0fb8.js → el-divider-2f300113.js} +1 -1
- package/es/{el-empty-deee6b39.js → el-empty-34086220.js} +5 -5
- package/es/{el-form-item-3167d76a.js → el-form-item-5425e443.js} +33 -33
- package/es/{el-form-item-8dc6aec8.cjs → el-form-item-6d81753f.cjs} +1 -1
- package/es/{el-input-06243b61.cjs → el-input-ebe964c2.cjs} +1 -1
- package/es/{el-input-03aad76d.js → el-input-f24248f2.js} +33 -33
- package/es/{el-input-number-12c09ac3.js → el-input-number-36036e60.js} +35 -35
- package/es/{el-input-number-854b2066.cjs → el-input-number-e3d58911.cjs} +1 -1
- package/es/{el-loading-86fdef94.js → el-loading-74b350d7.js} +5 -5
- package/es/{el-loading-a536daf8.cjs → el-loading-a6dd5081.cjs} +1 -1
- package/es/{el-menu-item-1172154b.js → el-menu-item-7d04ed7a.js} +22 -22
- package/es/{el-menu-item-6522d54c.cjs → el-menu-item-9a591f08.cjs} +1 -1
- package/es/{el-message-0aeea1a3.cjs → el-message-3517c44c.cjs} +1 -1
- package/es/{el-message-35d4e3ac.js → el-message-4e885359.js} +23 -23
- package/es/{el-message-box-f43b6e7a.js → el-message-box-1286fd77.js} +20 -20
- package/es/{el-message-box-2e7304ce.cjs → el-message-box-317e9f09.cjs} +1 -1
- package/es/{el-overlay-04659660.js → el-overlay-0310aac7.js} +47 -47
- package/es/{el-overlay-ef92f51f.cjs → el-overlay-ed457566.cjs} +1 -1
- package/es/{el-popconfirm-29d538b6.js → el-popconfirm-6235978c.js} +24 -24
- package/es/{el-popconfirm-58a1b946.cjs → el-popconfirm-d61782ad.cjs} +1 -1
- package/es/{el-popper-c9e0136d.cjs → el-popper-32eaad7d.cjs} +1 -1
- package/es/{el-popper-ee1f8186.js → el-popper-f38ba0a1.js} +126 -126
- package/es/{el-scrollbar-05815cf5.cjs → el-scrollbar-2cac7413.cjs} +1 -1
- package/es/{el-scrollbar-09769d9e.js → el-scrollbar-d8e60ed2.js} +48 -48
- package/es/{el-segmented-d454a924.cjs → el-segmented-bf42d915.cjs} +1 -1
- package/es/{el-segmented-916b982a.js → el-segmented-ee920d27.js} +8 -8
- package/es/{el-select-6d813c15.cjs → el-select-64816d07.cjs} +1 -1
- package/es/{el-select-8cb88e3c.js → el-select-bfade57c.js} +307 -307
- package/es/{el-table-column-762a20e0.cjs → el-table-column-00904cbd.cjs} +1 -1
- package/es/{el-table-column-0c899664.js → el-table-column-41685d02.js} +12 -12
- package/es/{el-tag-554c333b.js → el-tag-ada32d9e.js} +21 -21
- package/es/{el-tag-fe492a6d.cjs → el-tag-defe821c.cjs} +1 -1
- package/es/index-098c2447.cjs +1 -0
- package/es/{index-b07f58c9.js → index-0a8e1adb.js} +75 -60
- package/es/{index-5b62ea0e.js → index-3e26cc9f.js} +52 -52
- package/es/{index-cfeda35a.js → index-482f09b5.js} +1 -1
- package/es/{index-69a9bd75.js → index-492bd129.js} +2 -2
- package/es/{index-b7fd560c.js → index-6277c792.js} +12 -12
- package/es/{index-384ed4b0.js → index-787d3588.js} +3 -3
- package/es/{index-df06f32a.js → index-843be67c.js} +20 -20
- package/es/{index-34048a1d.js → index-89502796.js} +36 -36
- package/es/{index-77f4746b.cjs → index-9b9ef5dd.cjs} +1 -1
- package/es/{index-a9d4ef0f.cjs → index-b306360f.cjs} +1 -1
- package/es/{index-62573d45.cjs → index-bc26fe71.cjs} +1 -1
- package/es/{index-a8ee0e8c.js → index-bc8e277e.js} +1031 -1015
- package/es/{index-7e4e0bd3.cjs → index-d4910ece.cjs} +1 -1
- package/es/{index-fdb71325.cjs → index-d725fef6.cjs} +65 -65
- package/es/{index-ca7dbd47.cjs → index-ecf79ee2.cjs} +1 -1
- package/es/{python-0405c62e.cjs → python-c27ba105.cjs} +1 -1
- package/es/{python-791e6a42.js → python-ecde9ff2.js} +1 -1
- package/es/raf-41aed4d4.js +6 -0
- package/es/{scroll-9e2dd92b.js → scroll-7d352c1f.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-global-config-1923bb6f.js → use-global-config-2704a841.js} +16 -16
- package/es/{use-global-config-c2c5ca8f.cjs → use-global-config-878461f3.cjs} +1 -1
- package/es/{validator-866ea0bb.cjs → validator-027eff1b.cjs} +1 -1
- package/es/{validator-fd32f925.js → validator-61a65ac7.js} +1 -1
- package/es/{vnode-f9752526.js → vnode-c51c8aa3.js} +1 -1
- package/es/{zh-cn-d667062d.js → zh-cn-19fbf029.js} +2 -2
- package/es/{zh-cn-0fa1aa6d.cjs → zh-cn-6ee4b8df.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +173 -173
- package/lib/{index-db060de6.js → index-dac23ed6.js} +16515 -16356
- package/lib/{python-077c8efa.js → python-fdc6b946.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/CustomFunction/index.vue +193 -15
- package/packages/MonacoEditor/index.vue +14 -1
- package/packages/MonacoEditor/tools.js +18 -0
- package/packages/VarietySearch/components/FactorScreen/index.vue +20 -8
- package/packages/VarietySearch/components/FactorScreen/tools.js +19 -0
- package/src/pages/CustomFunction/index.vue +2 -2
- package/src/pages/VarietySearch/index.vue +68 -19
- package/es/index-eab8a286.cjs +0 -1
- package/es/raf-fa761d02.js +0 -6
package/es/ChartLayout.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./base-
|
|
2
|
-
import { E as d } from "./el-empty-
|
|
1
|
+
import "./base-62a70f61.js";
|
|
2
|
+
import { E as d } from "./el-empty-34086220.js";
|
|
3
3
|
import { openBlock as e, createElementBlock as a, normalizeStyle as n, Fragment as o, renderList as u, renderSlot as m, createBlock as s } from "vue";
|
|
4
4
|
import { _ as y } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./index-
|
|
5
|
+
import "./index-89502796.js";
|
|
6
|
+
import "./index-482f09b5.js";
|
|
7
7
|
const f = {
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
package/es/CustomFunction.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-ef747d02.cjs");const
|
|
1
|
+
"use strict";require("./base-ef747d02.cjs");const A=require("./el-divider-4713d74c.cjs");require("./el-scrollbar-2cac7413.cjs");const H=require("./el-dialog-10b4cda4.cjs");require("./el-overlay-ed457566.cjs");const G=require("./el-input-ebe964c2.cjs"),J=require("./el-button-1cb4ce47.cjs");require("./el-tag-defe821c.cjs");const b=require("./el-select-64816d07.cjs"),K=require("./el-popper-32eaad7d.cjs"),Q=require("./el-popconfirm-d61782ad.cjs");require("./el-popover-0ea8fbf8.cjs");const e=require("vue"),d=require("./index-098c2447.cjs"),r=require("./el-message-3517c44c.cjs"),X=require("./_plugin-vue_export-helper-f246444f.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-878461f3.cjs");require("./index-ecf79ee2.cjs");require("./typescript-b63f8e83.cjs");require("./index-d4910ece.cjs");require("./index-eea0bcb3.cjs");require("./index-b306360f.cjs");require("./debounce-62f5b6e8.cjs");require("./config-provider-c629566a.cjs");const k=s=>(e.pushScopeId("data-v-0a65deeb"),s=s(),e.popScopeId(),s),Y={class:"custom-function"},Z={class:"func-option"},ee={class:"icons"},te={class:"custom-header"},oe={class:"left"},le=["id"],ne={class:"right"},ae={class:"func-name"},se={class:"left"},re=k(()=>e.createElementVNode("span",null,"函数名称:",-1)),ie={class:"right"},ce=k(()=>e.createElementVNode("div",{class:"tip-box"},"Tip: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算",-1)),de={class:"dialog-footer"},ue={class:"custom-header"},fe={class:"left"},me=["id"],pe={class:"right"},_e={class:"content"},ve={class:"dialog-footer"},Ve={__name:"index",props:{size:{type:String,default:"small"},selectWidth:{type:String,default:"200px"}},emits:["insert"],setup(s,{emit:S}){const{request:V}=e.inject("stConfig"),u=e.ref(null),h=e.ref(null),z=S,N=e.ref(null),f=e.ref(""),v=e.ref([]),m=e.ref(!1),l=e.reactive({id:null,funcName:"",funcExpression:""}),g=e.ref(!1),p=e.ref(!1),x=e.ref(!1),i=e.reactive({result:null,detail:"",code:""}),E=async()=>{const{body:n}=await V.post("/common/qt/querySearchFunctions");if(v.value=n??[],N.value===null)f.value="";else{const t=v.value.find(({id:a})=>a===N.value);f.value=t?t.funcName:""}},M=n=>{var t;n?N.value=(t=v.value.find(a=>a.funcName===n))==null?void 0:t.id:N.value=null},D=async n=>{await V.post("/common/qt/deleteSearchFunctionById",{id:n.id}),E()},C=(n,t)=>{switch(!!n){case!1:{Object.assign(l,{id:null,funcName:"",funcExpression:""});break}case!0:{Object.assign(l,{id:n.id,funcName:n.funcName,funcExpression:n.funcExpression});break}}t&&(l.id=null,l.funcName=`${l.funcName}-复制`),m.value=!0},F=async()=>{try{if(x.value=!0,l.funcExpression=u.value.getValue(),!l.funcExpression)return r.ElMessage.error("函数内容不可为空");if(/\$\{[^}]*\}/.test(l.funcExpression))return r.ElMessage.error("不支持包含变量用法的函数进行测试");const{body:n}=await V.post("/common/qt/testFactorSelect",{factorSelectExpr:l.funcExpression}),{result:t,detail:a}=n;Object.assign(i,{result:t,detail:a,code:l.funcExpression}),t===1?r.ElMessage.success("测试通过"):(r.ElMessage.error("测试未能通过"),p.value=!0)}finally{x.value=!1}},T=()=>{if(i.result===null)return r.ElMessage.warning("请先进行测试, 等待测试完成后可查看日志");p.value=!0},$=async()=>{try{if(g.value=!0,l.funcExpression=u.value.getValue(),!l.funcName)return r.ElMessage.error("函数名称不可为空");if(!l.funcExpression)return r.ElMessage.error("函数内容不可为空");await V.post("/common/qt/saveOrUpdateSearchFunction",l),r.ElMessage.success("操作成功"),m.value=!1,await E()}finally{g.value=!1}},w=()=>{if(!f.value)return r.ElMessage.error("请先选择自定义函数后, 再执行插入");const{funcName:n,funcExpression:t}=v.value.find(a=>a.funcName===f.value);z("insert",n,t)},B=()=>{h.value.open(u.value)};return e.onMounted(()=>{E()}),e.watch(()=>m.value,n=>{switch(n){case!0:{e.nextTick(()=>{var t,a;(t=u.value)==null||t.setValue(l.funcExpression),(a=u.value)==null||a.resize()}),Object.assign(i,{result:null,detail:""});break}case!1:{h.value.close();break}}}),(n,t)=>{const a=d.ElIcon,I=Q.ElPopconfirm,O=b.ElOption,j=b.ElSelect,c=J.ElButton,R=G.ElInput,U=e.resolveComponent("st-monacoEditor"),y=H.ElDialog,q=K.ElScrollbar,L=A.ElDivider,P=e.resolveComponent("st-varSelectDialog");return e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(j,{modelValue:f.value,"onUpdate:modelValue":t[0]||(t[0]=o=>f.value=o),size:s.size,placeholder:"自定义函数","no-match-text":"无匹配选项","no-data-text":"无选项数据",clearable:"",filterable:"",onChange:M,style:e.normalizeStyle({width:s.selectWidth})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,o=>(e.openBlock(),e.createBlock(O,{key:o.id,label:o.funcName,value:o.funcName,onClick:w},{default:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(o.funcName),1),e.createElementVNode("div",ee,[e.createVNode(a,{onClick:e.withModifiers(_=>C(o,!0),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(d.document_copy_default))]),_:2},1032,["onClick"]),e.createVNode(a,{onClick:e.withModifiers(_=>C(o),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(d.edit_default))]),_:2},1032,["onClick"]),e.createVNode(I,{title:"确认是否删除?","confirm-button-text":"确认","cancel-button-text":"取消",onConfirm:_=>D(o)},{reference:e.withCtx(()=>[e.createVNode(a,{onClick:e.withModifiers(()=>{},["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(d.delete_default))]),_:1})]),_:2},1032,["onConfirm"])])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","size","style"]),e.createVNode(c,{type:"primary",size:s.size,onClick:w},{default:e.withCtx(()=>[e.createTextVNode(" 插入 ")]),_:1},8,["size"]),e.createVNode(c,{type:"primary",size:s.size,onClick:t[1]||(t[1]=o=>C())},{default:e.withCtx(()=>[e.createTextVNode(" 新建 ")]),_:1},8,["size"]),e.createVNode(y,{"modal-class":"add-or-edit-dialog",modelValue:m.value,"onUpdate:modelValue":t[4]||(t[4]=o=>m.value=o),width:"1000","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:e.withCtx(({titleId:o,titleClass:_})=>[e.createElementVNode("div",te,[e.createElementVNode("div",oe,[e.createElementVNode("span",{id:o,class:e.normalizeClass(_)},e.toDisplayString(l.id?"编辑自定义函数":"新建自定义函数"),11,le)]),e.createElementVNode("div",ne,[e.createVNode(c,{size:"small",type:"primary",onClick:B},{default:e.withCtx(()=>[e.createTextVNode(" 变量选择器 ")]),_:1}),e.createVNode(a,{onClick:t[2]||(t[2]=W=>m.value=!1)},{default:e.withCtx(()=>[e.createVNode(e.unref(d.close_default))]),_:1})])])]),footer:e.withCtx(()=>[e.createElementVNode("div",de,[e.createVNode(c,{type:"primary",loading:g.value,onClick:$},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1},8,["loading"])])]),default:e.withCtx(()=>[e.createElementVNode("div",ae,[e.createElementVNode("div",se,[re,e.createVNode(R,{modelValue:l.funcName,"onUpdate:modelValue":t[3]||(t[3]=o=>l.funcName=o)},null,8,["modelValue"])]),e.createElementVNode("div",ie,[e.createVNode(c,{type:"primary",loading:x.value,onClick:F},{default:e.withCtx(()=>[e.createTextVNode(" 测试 ")]),_:1},8,["loading"]),e.createVNode(c,{icon:e.unref(d.document_default),onClick:T},{default:e.withCtx(()=>[e.createTextVNode(" 日志明细 ")]),_:1},8,["icon"])])]),ce,e.createVNode(U,{ref_key:"stMonacoEditorRef",ref:u,language:"lua",style:{width:"968px",height:"400px"}},null,512)]),_:1},8,["modelValue"]),e.createVNode(y,{"modal-class":"log-dialog",modelValue:p.value,"onUpdate:modelValue":t[7]||(t[7]=o=>p.value=o),width:"830","align-center":"","append-to-body":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:e.withCtx(({titleId:o,titleClass:_})=>[e.createElementVNode("div",ue,[e.createElementVNode("div",fe,[e.createElementVNode("span",{id:o,class:e.normalizeClass(_)}," 日志明细 ",10,me)]),e.createElementVNode("div",pe,[e.createVNode(a,{onClick:t[5]||(t[5]=W=>p.value=!1)},{default:e.withCtx(()=>[e.createVNode(e.unref(d.close_default))]),_:1})])])]),footer:e.withCtx(()=>[e.createElementVNode("div",ve,[e.createVNode(c,{onClick:t[6]||(t[6]=o=>p.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(" 关闭 ")]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",_e,[e.createVNode(q,{class:"code",height:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(i.code),1)]),_:1}),e.createVNode(L,{direction:"vertical"}),e.createVNode(q,{height:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",{class:e.normalizeClass(i.result===1?"success-log":"error-log")},e.toDisplayString(i.result===1?"测试通过 √":i.detail),3)]),_:1})])]),_:1},8,["modelValue"]),e.createVNode(P,{ref_key:"stVarSelectDialogRef",ref:h},null,512)])}}},Ne=X._export_sfc(Ve,[["__scopeId","data-v-0a65deeb"]]),he={install(s){s.component("st-customFunction",Ne)}};module.exports=he;
|
package/es/CustomFunction.js
CHANGED
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
import "./base-
|
|
2
|
-
import { E as
|
|
3
|
-
import "./el-
|
|
4
|
-
import { E as
|
|
5
|
-
import
|
|
6
|
-
import "./el-
|
|
7
|
-
import { E as
|
|
8
|
-
import "./el-
|
|
9
|
-
import "./el-
|
|
10
|
-
import { E as
|
|
1
|
+
import "./base-62a70f61.js";
|
|
2
|
+
import { E as oe } from "./el-divider-2f300113.js";
|
|
3
|
+
import "./el-scrollbar-d8e60ed2.js";
|
|
4
|
+
import { E as le } from "./el-dialog-43cb14a3.js";
|
|
5
|
+
import "./el-overlay-0310aac7.js";
|
|
6
|
+
import { E as ne } from "./el-input-f24248f2.js";
|
|
7
|
+
import { E as se } from "./el-button-639a79ee.js";
|
|
8
|
+
import "./el-tag-ada32d9e.js";
|
|
9
|
+
import { E as ae, a as ie } from "./el-select-bfade57c.js";
|
|
10
|
+
import { E as ce } from "./el-popper-f38ba0a1.js";
|
|
11
|
+
import { E as re } from "./el-popconfirm-6235978c.js";
|
|
11
12
|
import "./el-popover-4ed993c7.js";
|
|
12
|
-
import { inject as
|
|
13
|
-
import { d as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import "./index-
|
|
17
|
-
import "./index-
|
|
13
|
+
import { inject as ue, ref as r, reactive as q, onMounted as de, watch as fe, nextTick as me, resolveComponent as B, openBlock as z, createElementBlock as j, createVNode as t, normalizeStyle as pe, withCtx as o, Fragment as _e, renderList as ve, createBlock as ge, createElementVNode as n, toDisplayString as k, withModifiers as F, unref as E, createTextVNode as m, normalizeClass as O, pushScopeId as he, popScopeId as Ee } from "vue";
|
|
14
|
+
import { d as ye, e as xe, a as be, c as M, b as ke, E as Ce } from "./index-0a8e1adb.js";
|
|
15
|
+
import { E as u } from "./el-message-4e885359.js";
|
|
16
|
+
import { _ as Ve } from "./_plugin-vue_export-helper-dad06003.js";
|
|
17
|
+
import "./index-89502796.js";
|
|
18
|
+
import "./index-482f09b5.js";
|
|
18
19
|
import "./index-2e331d74.js";
|
|
19
|
-
import "./vnode-
|
|
20
|
-
import "./scroll-
|
|
21
|
-
import "./use-global-config-
|
|
22
|
-
import "./index-
|
|
20
|
+
import "./vnode-c51c8aa3.js";
|
|
21
|
+
import "./scroll-7d352c1f.js";
|
|
22
|
+
import "./use-global-config-2704a841.js";
|
|
23
|
+
import "./index-3e26cc9f.js";
|
|
23
24
|
import "./typescript-7ae59c4c.js";
|
|
24
|
-
import "./index-
|
|
25
|
+
import "./index-6277c792.js";
|
|
25
26
|
import "./index-657047bb.js";
|
|
26
|
-
import "./index-
|
|
27
|
-
import "./debounce-
|
|
28
|
-
import "./config-provider-
|
|
29
|
-
const
|
|
27
|
+
import "./index-787d3588.js";
|
|
28
|
+
import "./debounce-ccdceb02.js";
|
|
29
|
+
import "./config-provider-962c9213.js";
|
|
30
|
+
const R = (c) => (he("data-v-0a65deeb"), c = c(), Ee(), c), Se = { class: "custom-function" }, we = { class: "func-option" }, Ne = { class: "icons" }, ze = { class: "custom-header" }, Fe = { class: "left" }, Oe = ["id"], $e = { class: "right" }, De = { class: "func-name" }, Ie = { class: "left" }, qe = /* @__PURE__ */ R(() => /* @__PURE__ */ n("span", null, "函数名称:", -1)), Be = { class: "right" }, je = /* @__PURE__ */ R(() => /* @__PURE__ */ n("div", { class: "tip-box" }, "Tip: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算", -1)), Me = { class: "dialog-footer" }, Re = { class: "custom-header" }, Te = { class: "left" }, Ue = ["id"], Le = { class: "right" }, We = { class: "content" }, Ae = { class: "dialog-footer" }, Pe = {
|
|
30
31
|
__name: "index",
|
|
31
32
|
props: {
|
|
32
33
|
size: { type: String, default: "small" },
|
|
33
34
|
selectWidth: { type: String, default: "200px" }
|
|
34
35
|
},
|
|
35
36
|
emits: ["insert"],
|
|
36
|
-
setup(
|
|
37
|
-
const { request: x } =
|
|
37
|
+
setup(c, { emit: T }) {
|
|
38
|
+
const { request: x } = ue("stConfig"), p = r(null), C = r(null), U = T, b = r(null), _ = r(""), y = r([]), v = r(!1), s = q({
|
|
38
39
|
id: null,
|
|
39
40
|
funcName: "",
|
|
40
41
|
funcExpression: ""
|
|
41
|
-
}),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
}), V = r(!1), g = r(!1), S = r(!1), d = q({
|
|
43
|
+
result: null,
|
|
44
|
+
detail: "",
|
|
45
|
+
code: ""
|
|
46
|
+
}), w = async () => {
|
|
47
|
+
const { body: a } = await x.post("/common/qt/querySearchFunctions");
|
|
48
|
+
if (y.value = a ?? [], b.value === null)
|
|
49
|
+
_.value = "";
|
|
45
50
|
else {
|
|
46
|
-
const e =
|
|
47
|
-
|
|
51
|
+
const e = y.value.find(({ id: i }) => i === b.value);
|
|
52
|
+
_.value = e ? e.funcName : "";
|
|
48
53
|
}
|
|
49
|
-
},
|
|
54
|
+
}, L = (a) => {
|
|
50
55
|
var e;
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
await x.post("/common/qt/deleteSearchFunctionById", { id:
|
|
54
|
-
},
|
|
55
|
-
switch (!!
|
|
56
|
+
a ? b.value = (e = y.value.find((i) => i.funcName === a)) == null ? void 0 : e.id : b.value = null;
|
|
57
|
+
}, W = async (a) => {
|
|
58
|
+
await x.post("/common/qt/deleteSearchFunctionById", { id: a.id }), w();
|
|
59
|
+
}, N = (a, e) => {
|
|
60
|
+
switch (!!a) {
|
|
56
61
|
case !1: {
|
|
57
|
-
Object.assign(
|
|
62
|
+
Object.assign(s, {
|
|
58
63
|
id: null,
|
|
59
64
|
funcName: "",
|
|
60
65
|
funcExpression: ""
|
|
@@ -62,106 +67,125 @@ const fe = (i) => (se("data-v-3e8a98d7"), i = i(), ie(), i), _e = { class: "cust
|
|
|
62
67
|
break;
|
|
63
68
|
}
|
|
64
69
|
case !0: {
|
|
65
|
-
Object.assign(
|
|
66
|
-
id:
|
|
67
|
-
funcName:
|
|
68
|
-
funcExpression:
|
|
70
|
+
Object.assign(s, {
|
|
71
|
+
id: a.id,
|
|
72
|
+
funcName: a.funcName,
|
|
73
|
+
funcExpression: a.funcExpression
|
|
69
74
|
});
|
|
70
75
|
break;
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
|
-
e && (
|
|
74
|
-
},
|
|
78
|
+
e && (s.id = null, s.funcName = `${s.funcName}-复制`), v.value = !0;
|
|
79
|
+
}, A = async () => {
|
|
75
80
|
try {
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
if (
|
|
79
|
-
return
|
|
80
|
-
await x.post("/common/qt/
|
|
81
|
+
if (S.value = !0, s.funcExpression = p.value.getValue(), !s.funcExpression)
|
|
82
|
+
return u.error("函数内容不可为空");
|
|
83
|
+
if (/\$\{[^}]*\}/.test(s.funcExpression))
|
|
84
|
+
return u.error("不支持包含变量用法的函数进行测试");
|
|
85
|
+
const { body: a } = await x.post("/common/qt/testFactorSelect", { factorSelectExpr: s.funcExpression }), { result: e, detail: i } = a;
|
|
86
|
+
Object.assign(d, { result: e, detail: i, code: s.funcExpression }), e === 1 ? u.success("测试通过") : (u.error("测试未能通过"), g.value = !0);
|
|
81
87
|
} finally {
|
|
82
|
-
|
|
88
|
+
S.value = !1;
|
|
83
89
|
}
|
|
84
|
-
},
|
|
85
|
-
if (
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
+
}, P = () => {
|
|
91
|
+
if (d.result === null)
|
|
92
|
+
return u.warning("请先进行测试, 等待测试完成后可查看日志");
|
|
93
|
+
g.value = !0;
|
|
94
|
+
}, G = async () => {
|
|
95
|
+
try {
|
|
96
|
+
if (V.value = !0, s.funcExpression = p.value.getValue(), !s.funcName)
|
|
97
|
+
return u.error("函数名称不可为空");
|
|
98
|
+
if (!s.funcExpression)
|
|
99
|
+
return u.error("函数内容不可为空");
|
|
100
|
+
await x.post("/common/qt/saveOrUpdateSearchFunction", s), u.success("操作成功"), v.value = !1, await w();
|
|
101
|
+
} finally {
|
|
102
|
+
V.value = !1;
|
|
103
|
+
}
|
|
104
|
+
}, $ = () => {
|
|
105
|
+
if (!_.value)
|
|
106
|
+
return u.error("请先选择自定义函数后, 再执行插入");
|
|
107
|
+
const { funcName: a, funcExpression: e } = y.value.find((i) => i.funcName === _.value);
|
|
108
|
+
U("insert", a, e);
|
|
109
|
+
}, H = () => {
|
|
110
|
+
C.value.open(p.value);
|
|
90
111
|
};
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
}),
|
|
94
|
-
() =>
|
|
95
|
-
(
|
|
96
|
-
switch (
|
|
112
|
+
return de(() => {
|
|
113
|
+
w();
|
|
114
|
+
}), fe(
|
|
115
|
+
() => v.value,
|
|
116
|
+
(a) => {
|
|
117
|
+
switch (a) {
|
|
97
118
|
case !0: {
|
|
98
|
-
|
|
99
|
-
var e,
|
|
100
|
-
(e =
|
|
119
|
+
me(() => {
|
|
120
|
+
var e, i;
|
|
121
|
+
(e = p.value) == null || e.setValue(s.funcExpression), (i = p.value) == null || i.resize();
|
|
122
|
+
}), Object.assign(d, {
|
|
123
|
+
result: null,
|
|
124
|
+
detail: ""
|
|
101
125
|
});
|
|
102
126
|
break;
|
|
103
127
|
}
|
|
104
128
|
case !1: {
|
|
105
|
-
|
|
129
|
+
C.value.close();
|
|
106
130
|
break;
|
|
107
131
|
}
|
|
108
132
|
}
|
|
109
133
|
}
|
|
110
|
-
), (
|
|
111
|
-
const
|
|
112
|
-
return
|
|
113
|
-
t(
|
|
114
|
-
modelValue:
|
|
115
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
116
|
-
size:
|
|
134
|
+
), (a, e) => {
|
|
135
|
+
const i = Ce, J = re, K = ae, Q = ie, f = se, X = ne, Y = B("st-monacoEditor"), D = le, I = ce, Z = oe, ee = B("st-varSelectDialog");
|
|
136
|
+
return z(), j("div", Se, [
|
|
137
|
+
t(Q, {
|
|
138
|
+
modelValue: _.value,
|
|
139
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => _.value = l),
|
|
140
|
+
size: c.size,
|
|
117
141
|
placeholder: "自定义函数",
|
|
118
142
|
"no-match-text": "无匹配选项",
|
|
119
143
|
"no-data-text": "无选项数据",
|
|
120
144
|
clearable: "",
|
|
121
145
|
filterable: "",
|
|
122
|
-
onChange:
|
|
123
|
-
style:
|
|
146
|
+
onChange: L,
|
|
147
|
+
style: pe({ width: c.selectWidth })
|
|
124
148
|
}, {
|
|
125
|
-
default:
|
|
126
|
-
(
|
|
127
|
-
key:
|
|
128
|
-
label:
|
|
129
|
-
value:
|
|
130
|
-
onClick:
|
|
149
|
+
default: o(() => [
|
|
150
|
+
(z(!0), j(_e, null, ve(y.value, (l) => (z(), ge(K, {
|
|
151
|
+
key: l.id,
|
|
152
|
+
label: l.funcName,
|
|
153
|
+
value: l.funcName,
|
|
154
|
+
onClick: $
|
|
131
155
|
}, {
|
|
132
|
-
default:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
t(
|
|
137
|
-
onClick:
|
|
156
|
+
default: o(() => [
|
|
157
|
+
n("div", we, [
|
|
158
|
+
n("span", null, k(l.funcName), 1),
|
|
159
|
+
n("div", Ne, [
|
|
160
|
+
t(i, {
|
|
161
|
+
onClick: F((h) => N(l, !0), ["stop"])
|
|
138
162
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
t(
|
|
163
|
+
default: o(() => [
|
|
164
|
+
t(E(ye))
|
|
141
165
|
]),
|
|
142
166
|
_: 2
|
|
143
167
|
}, 1032, ["onClick"]),
|
|
144
|
-
t(
|
|
145
|
-
onClick:
|
|
168
|
+
t(i, {
|
|
169
|
+
onClick: F((h) => N(l), ["stop"])
|
|
146
170
|
}, {
|
|
147
|
-
default:
|
|
148
|
-
t(
|
|
171
|
+
default: o(() => [
|
|
172
|
+
t(E(xe))
|
|
149
173
|
]),
|
|
150
174
|
_: 2
|
|
151
175
|
}, 1032, ["onClick"]),
|
|
152
|
-
t(
|
|
176
|
+
t(J, {
|
|
153
177
|
title: "确认是否删除?",
|
|
154
178
|
"confirm-button-text": "确认",
|
|
155
179
|
"cancel-button-text": "取消",
|
|
156
|
-
onConfirm: (
|
|
180
|
+
onConfirm: (h) => W(l)
|
|
157
181
|
}, {
|
|
158
|
-
reference:
|
|
159
|
-
t(
|
|
160
|
-
onClick:
|
|
182
|
+
reference: o(() => [
|
|
183
|
+
t(i, {
|
|
184
|
+
onClick: F(() => {
|
|
161
185
|
}, ["stop"])
|
|
162
186
|
}, {
|
|
163
|
-
default:
|
|
164
|
-
t(
|
|
187
|
+
default: o(() => [
|
|
188
|
+
t(E(be))
|
|
165
189
|
]),
|
|
166
190
|
_: 1
|
|
167
191
|
})
|
|
@@ -176,30 +200,30 @@ const fe = (i) => (se("data-v-3e8a98d7"), i = i(), ie(), i), _e = { class: "cust
|
|
|
176
200
|
]),
|
|
177
201
|
_: 1
|
|
178
202
|
}, 8, ["modelValue", "size", "style"]),
|
|
179
|
-
t(
|
|
203
|
+
t(f, {
|
|
180
204
|
type: "primary",
|
|
181
|
-
size:
|
|
182
|
-
onClick:
|
|
205
|
+
size: c.size,
|
|
206
|
+
onClick: $
|
|
183
207
|
}, {
|
|
184
|
-
default:
|
|
185
|
-
|
|
208
|
+
default: o(() => [
|
|
209
|
+
m(" 插入 ")
|
|
186
210
|
]),
|
|
187
211
|
_: 1
|
|
188
212
|
}, 8, ["size"]),
|
|
189
|
-
t(
|
|
213
|
+
t(f, {
|
|
190
214
|
type: "primary",
|
|
191
|
-
size:
|
|
192
|
-
onClick: e[1] || (e[1] = (
|
|
215
|
+
size: c.size,
|
|
216
|
+
onClick: e[1] || (e[1] = (l) => N())
|
|
193
217
|
}, {
|
|
194
|
-
default:
|
|
195
|
-
|
|
218
|
+
default: o(() => [
|
|
219
|
+
m(" 新建 ")
|
|
196
220
|
]),
|
|
197
221
|
_: 1
|
|
198
222
|
}, 8, ["size"]),
|
|
199
|
-
t(
|
|
223
|
+
t(D, {
|
|
200
224
|
"modal-class": "add-or-edit-dialog",
|
|
201
|
-
modelValue:
|
|
202
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
225
|
+
modelValue: v.value,
|
|
226
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => v.value = l),
|
|
203
227
|
width: "1000",
|
|
204
228
|
"align-center": "",
|
|
205
229
|
"append-to-body": "",
|
|
@@ -209,80 +233,172 @@ const fe = (i) => (se("data-v-3e8a98d7"), i = i(), ie(), i), _e = { class: "cust
|
|
|
209
233
|
"modal-penetrable": !0,
|
|
210
234
|
"show-close": !1
|
|
211
235
|
}, {
|
|
212
|
-
header:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
id:
|
|
217
|
-
class:
|
|
218
|
-
},
|
|
236
|
+
header: o(({ titleId: l, titleClass: h }) => [
|
|
237
|
+
n("div", ze, [
|
|
238
|
+
n("div", Fe, [
|
|
239
|
+
n("span", {
|
|
240
|
+
id: l,
|
|
241
|
+
class: O(h)
|
|
242
|
+
}, k(s.id ? "编辑自定义函数" : "新建自定义函数"), 11, Oe)
|
|
219
243
|
]),
|
|
220
|
-
|
|
221
|
-
t(
|
|
244
|
+
n("div", $e, [
|
|
245
|
+
t(f, {
|
|
222
246
|
size: "small",
|
|
223
247
|
type: "primary",
|
|
224
|
-
onClick:
|
|
248
|
+
onClick: H
|
|
225
249
|
}, {
|
|
226
|
-
default:
|
|
227
|
-
|
|
250
|
+
default: o(() => [
|
|
251
|
+
m(" 变量选择器 ")
|
|
228
252
|
]),
|
|
229
253
|
_: 1
|
|
230
254
|
}),
|
|
231
|
-
t(
|
|
232
|
-
onClick: e[2] || (e[2] = (
|
|
255
|
+
t(i, {
|
|
256
|
+
onClick: e[2] || (e[2] = (te) => v.value = !1)
|
|
233
257
|
}, {
|
|
234
|
-
default:
|
|
235
|
-
t(
|
|
258
|
+
default: o(() => [
|
|
259
|
+
t(E(M))
|
|
236
260
|
]),
|
|
237
261
|
_: 1
|
|
238
262
|
})
|
|
239
263
|
])
|
|
240
264
|
])
|
|
241
265
|
]),
|
|
242
|
-
footer:
|
|
243
|
-
|
|
244
|
-
t(
|
|
266
|
+
footer: o(() => [
|
|
267
|
+
n("div", Me, [
|
|
268
|
+
t(f, {
|
|
245
269
|
type: "primary",
|
|
246
|
-
loading:
|
|
247
|
-
onClick:
|
|
270
|
+
loading: V.value,
|
|
271
|
+
onClick: G
|
|
248
272
|
}, {
|
|
249
|
-
default:
|
|
250
|
-
|
|
273
|
+
default: o(() => [
|
|
274
|
+
m(" 确定 ")
|
|
251
275
|
]),
|
|
252
276
|
_: 1
|
|
253
277
|
}, 8, ["loading"])
|
|
254
278
|
])
|
|
255
279
|
]),
|
|
256
|
-
default:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
280
|
+
default: o(() => [
|
|
281
|
+
n("div", De, [
|
|
282
|
+
n("div", Ie, [
|
|
283
|
+
qe,
|
|
284
|
+
t(X, {
|
|
285
|
+
modelValue: s.funcName,
|
|
286
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => s.funcName = l)
|
|
287
|
+
}, null, 8, ["modelValue"])
|
|
288
|
+
]),
|
|
289
|
+
n("div", Be, [
|
|
290
|
+
t(f, {
|
|
291
|
+
type: "primary",
|
|
292
|
+
loading: S.value,
|
|
293
|
+
onClick: A
|
|
294
|
+
}, {
|
|
295
|
+
default: o(() => [
|
|
296
|
+
m(" 测试 ")
|
|
297
|
+
]),
|
|
298
|
+
_: 1
|
|
299
|
+
}, 8, ["loading"]),
|
|
300
|
+
t(f, {
|
|
301
|
+
icon: E(ke),
|
|
302
|
+
onClick: P
|
|
303
|
+
}, {
|
|
304
|
+
default: o(() => [
|
|
305
|
+
m(" 日志明细 ")
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
}, 8, ["icon"])
|
|
309
|
+
])
|
|
264
310
|
]),
|
|
265
|
-
|
|
311
|
+
je,
|
|
312
|
+
t(Y, {
|
|
266
313
|
ref_key: "stMonacoEditorRef",
|
|
267
|
-
ref:
|
|
314
|
+
ref: p,
|
|
268
315
|
language: "lua",
|
|
269
316
|
style: { width: "968px", height: "400px" }
|
|
270
317
|
}, null, 512)
|
|
271
318
|
]),
|
|
272
319
|
_: 1
|
|
273
320
|
}, 8, ["modelValue"]),
|
|
274
|
-
t(
|
|
321
|
+
t(D, {
|
|
322
|
+
"modal-class": "log-dialog",
|
|
323
|
+
modelValue: g.value,
|
|
324
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => g.value = l),
|
|
325
|
+
width: "830",
|
|
326
|
+
"align-center": "",
|
|
327
|
+
"append-to-body": "",
|
|
328
|
+
draggable: "",
|
|
329
|
+
overflow: "",
|
|
330
|
+
modal: !1,
|
|
331
|
+
"modal-penetrable": !0,
|
|
332
|
+
"show-close": !1
|
|
333
|
+
}, {
|
|
334
|
+
header: o(({ titleId: l, titleClass: h }) => [
|
|
335
|
+
n("div", Re, [
|
|
336
|
+
n("div", Te, [
|
|
337
|
+
n("span", {
|
|
338
|
+
id: l,
|
|
339
|
+
class: O(h)
|
|
340
|
+
}, " 日志明细 ", 10, Ue)
|
|
341
|
+
]),
|
|
342
|
+
n("div", Le, [
|
|
343
|
+
t(i, {
|
|
344
|
+
onClick: e[5] || (e[5] = (te) => g.value = !1)
|
|
345
|
+
}, {
|
|
346
|
+
default: o(() => [
|
|
347
|
+
t(E(M))
|
|
348
|
+
]),
|
|
349
|
+
_: 1
|
|
350
|
+
})
|
|
351
|
+
])
|
|
352
|
+
])
|
|
353
|
+
]),
|
|
354
|
+
footer: o(() => [
|
|
355
|
+
n("div", Ae, [
|
|
356
|
+
t(f, {
|
|
357
|
+
onClick: e[6] || (e[6] = (l) => g.value = !1)
|
|
358
|
+
}, {
|
|
359
|
+
default: o(() => [
|
|
360
|
+
m(" 关闭 ")
|
|
361
|
+
]),
|
|
362
|
+
_: 1
|
|
363
|
+
})
|
|
364
|
+
])
|
|
365
|
+
]),
|
|
366
|
+
default: o(() => [
|
|
367
|
+
n("div", We, [
|
|
368
|
+
t(I, {
|
|
369
|
+
class: "code",
|
|
370
|
+
height: "600px"
|
|
371
|
+
}, {
|
|
372
|
+
default: o(() => [
|
|
373
|
+
n("pre", null, k(d.code), 1)
|
|
374
|
+
]),
|
|
375
|
+
_: 1
|
|
376
|
+
}),
|
|
377
|
+
t(Z, { direction: "vertical" }),
|
|
378
|
+
t(I, { height: "600px" }, {
|
|
379
|
+
default: o(() => [
|
|
380
|
+
n("pre", {
|
|
381
|
+
class: O(d.result === 1 ? "success-log" : "error-log")
|
|
382
|
+
}, k(d.result === 1 ? "测试通过 √" : d.detail), 3)
|
|
383
|
+
]),
|
|
384
|
+
_: 1
|
|
385
|
+
})
|
|
386
|
+
])
|
|
387
|
+
]),
|
|
388
|
+
_: 1
|
|
389
|
+
}, 8, ["modelValue"]),
|
|
390
|
+
t(ee, {
|
|
275
391
|
ref_key: "stVarSelectDialogRef",
|
|
276
|
-
ref:
|
|
392
|
+
ref: C
|
|
277
393
|
}, null, 512)
|
|
278
394
|
]);
|
|
279
395
|
};
|
|
280
396
|
}
|
|
281
|
-
},
|
|
282
|
-
install(
|
|
283
|
-
|
|
397
|
+
}, Ge = /* @__PURE__ */ Ve(Pe, [["__scopeId", "data-v-0a65deeb"]]), bt = {
|
|
398
|
+
install(c) {
|
|
399
|
+
c.component("st-customFunction", Ge);
|
|
284
400
|
}
|
|
285
401
|
};
|
|
286
402
|
export {
|
|
287
|
-
|
|
403
|
+
bt as default
|
|
288
404
|
};
|