x
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -8,6 +8,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/admin/umi.7c524e1b.js"></script>
|
||||
<script src="/admin/umi.90fadbb5.js"></script>
|
||||
|
||||
</body></html>
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[929],{83645:function(K,c,e){e.r(c),e.d(c,{default:function(){return C}});var g=e(25359),s=e.n(g),h=e(49811),y=e.n(h),k=e(54306),m=e.n(k),j=e(12472),I=e(55147),v=e(86195),T=e(44901),d=e(50959),S=e(83766),a=e(11527),b=function(){return(0,a.jsx)(S.vY,{title:"\u6570\u636E\u7EDF\u8BA1",request:y()(s()().mark(function i(){return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,v.request)("/api/fanyong/tongji"));case 1:case"end":return n.stop()}},i)})),column:2,columns:[{title:"\u8BA2\u5355\u603B\u6570\u91CF",key:"order_num",dataIndex:"order_num"},{title:"\u7528\u6237\u603B\u6570\u91CF",key:"user_num",dataIndex:"user_num"},{title:"\u5B9E\u9645\u603B\u6536\u5165(\u542B\u8FD4\u4F63)",key:"total_actual",dataIndex:"total_actual",valueType:"money",fieldProps:{moneySymbol:"$"}},{title:"\u9884\u4F30\u603B\u6536\u5165(\u542B\u8FD4\u4F63)",key:"total_estimate",dataIndex:"total_estimate",valueType:"money",fieldProps:{moneySymbol:"$"}},{title:"\u5B9E\u9645\u8FD4\u4F63\u91D1\u989D",key:"total_rake_actual",dataIndex:"total_rake_actual",valueType:"money",fieldProps:{moneySymbol:"$"}},{title:"\u9884\u4F30\u8FD4\u4F63\u91D1\u989D",key:"total_rake_estimate",dataIndex:"total_rake_estimate",valueType:"money",fieldProps:{moneySymbol:"$"}},{title:"\u5B9E\u9645\u8FD4\u4F63\u6536\u76CA",key:"total_irake_actual",dataIndex:"total_irake_actual",valueType:"money",fieldProps:{moneySymbol:"$"}},{title:"\u9884\u4F30\u8FD4\u4F63\u6536\u76CA",key:"total_irake_estimate",dataIndex:"total_irake_estimate",valueType:"money",fieldProps:{moneySymbol:"$"}},{title:"\u5B9E\u9645\u8FD4\u4F63\u6536\u76CA\u7387",key:"total_irake_actual_pct",dataIndex:"total_irake_actual_pct",valueType:"percent"},{title:"\u9884\u4F30\u8FD4\u4F63\u6536\u76CA\u7387",key:"total_irake_estimate_pct",dataIndex:"total_irake_estimate_pct",valueType:"percent"},{title:"\u5B9E\u9645\u603B\u6536\u5165(\u4E0D\u542B\u8FD4\u4F63)",key:"total_actual",dataIndex:"total_iactual",valueType:"money",fieldProps:{moneySymbol:"$"}},{title:"\u9884\u4F30\u603B\u6536\u5165(\u4E0D\u542B\u8FD4\u4F63)",key:"total_estimate",dataIndex:"total_iestimate",valueType:"money",fieldProps:{moneySymbol:"$"}}]})},P=function(o){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,a.jsx)(T.Z,{count:o,overflowCount:1e4,style:{marginBlockStart:-2,marginInlineStart:4,color:n?"#1890FF":"#999",backgroundColor:n?"#E6F7FF":"#eee"}})},C=function(){var i=(0,d.useState)("tab1"),o=m()(i,2),n=o[0],$=o[1],F=(0,d.useState)([]),f=m()(F,2),R=f[0],E=f[1],p=(0,d.useRef)();return(0,a.jsxs)(j._z,{children:[(0,a.jsx)(b,{}),(0,a.jsx)(I.Rs,{search:{filterType:"light"},rowKey:"name",request:y()(s()().mark(function l(){var r,t=arguments;return s()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return r=t.length>0&&t[0]!==void 0?t[0]:{},r.activeKey=n,u.abrupt("return",(0,v.request)("/api/fanyong",{params:r}).then(function(x){return E(x.tabs),x}));case 3:case"end":return u.stop()}},l)})),pagination:{defaultPageSize:10},metas:{site:{title:"\u8D2D\u7269\u5E73\u53F0",valueType:"select",fieldProps:{},valueEnum:{all:{text:"\u5168\u90E8"},tb:{text:"\u6DD8\u5B9D"},jd:{text:"\u4EAC\u4E1C"},pdd:{text:"\u62FC\u591A\u591A"}}},user_id:{title:"\u7528\u6237",valueType:"select",fieldProps:{mode:"multiple"},valueEnum:{all:{text:"\u5168\u90E8"},tb:{text:"\u6DD8\u5B9D"},jd:{text:"\u4EAC\u4E1C"},pdd:{text:"\u62FC\u591A\u591A"}}},avatar:{dataIndex:"image",search:!1},title:{dataIndex:"sku_name",search:!1},description:{dataIndex:"status",search:!1},content:{search:!1,dataIndex:"content",render:function(r){return(0,a.jsx)("div",{style:{display:"flex",justifyContent:"space-around"},children:r.map(function(t){return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{style:{color:"#00000073"},children:t.label}),(0,a.jsxs)("div",{style:{color:"#000000D9"},children:[t.status==="success"&&(0,a.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:"#52c41a",marginInlineEnd:8}}),t.value]})]},t.label)})},"label")}},actions:{render:function(r,t){return[(0,a.jsx)("a",{href:t.image,target:"_blank",rel:"noopener noreferrer",children:"\u64CD\u4F5C"},"link")]}}},actionRef:p,toolbar:{menu:{activeKey:n,items:R.map(function(l){return{key:l.key,label:(0,a.jsxs)("span",{children:[l.title,P(l.value,n===l.key)]})}}),onChange:function(r){var t;$(r),(t=p.current)===null||t===void 0||t.reload()}}}})]})}}}]);
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
@@ -145,8 +145,8 @@ func initCarry() {
|
||||
var scripts = []string{}
|
||||
//执行采集脚本
|
||||
fs := Functions
|
||||
for i := range fs {
|
||||
for j := range from.Scripts {
|
||||
for j := range from.Scripts {
|
||||
for i := range fs {
|
||||
if fs[i].UUID == from.Scripts[j] && !Contains(scripts, fs[i].UUID) {
|
||||
fs[i].Handle(s, nil)
|
||||
content = s.GetContent()
|
||||
|
||||
+26
-9
@@ -3,6 +3,7 @@ package core
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"math"
|
||||
"math/rand"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
@@ -32,18 +33,34 @@ func (sender *Strings) Diff(a, b []interface{}) []interface{} {
|
||||
return c
|
||||
}
|
||||
|
||||
// 寻找所有共同拥有的连续最长字符串
|
||||
func (sender *Strings) Intersects(sa, sb string) []string {
|
||||
var common []string
|
||||
for i := 0; i < len(sa); i++ {
|
||||
for j := i + 1; j <= len(sa); j++ {
|
||||
substr := sa[i:j]
|
||||
if len(substr) > 0 && strings.Contains(sb, substr) && !Contains(common, substr) {
|
||||
common = append(common, substr)
|
||||
func similarity(str1, str2 string) int {
|
||||
str1 = strings.ToLower(str1)
|
||||
str2 = strings.ToLower(str2)
|
||||
ml := 2
|
||||
ws := []string{}
|
||||
tp := []rune{}
|
||||
for _, r := range str2 {
|
||||
tp = append(tp, r)
|
||||
if !strings.Contains(str1, string(tp)) {
|
||||
tp = tp[:len(tp)-1]
|
||||
if len(tp) > ml {
|
||||
ws = append(ws, string(tp))
|
||||
}
|
||||
tp = []rune{r}
|
||||
}
|
||||
}
|
||||
return common
|
||||
if strings.Contains(str1, string(tp)) {
|
||||
ws = append(ws, string(tp))
|
||||
}
|
||||
return len(strings.Join(ws, ""))
|
||||
}
|
||||
|
||||
func (sender *Strings) Similarity(str1, str2 string) float64 {
|
||||
max := math.Max(
|
||||
float64(similarity(str1, str2))/float64(len(str2)),
|
||||
float64(similarity(str2, str1))/float64(len(str1)),
|
||||
)
|
||||
return max
|
||||
}
|
||||
|
||||
func (sender *Strings) Intersect(a, b interface{}) interface{} {
|
||||
|
||||
@@ -70,6 +70,19 @@ func (cl *Collection) FindOne(filter interface{}) interface{} {
|
||||
return result
|
||||
}
|
||||
|
||||
func (cl *Collection) Aggregate(pipeline interface{}) interface{} {
|
||||
cursor, err := cl.collection.Aggregate(context.Background(), pipeline)
|
||||
if err != nil {
|
||||
panic(cl.Vm.NewGoError(err))
|
||||
}
|
||||
var results = []map[string]interface{}{}
|
||||
cursor.All(context.Background(), &results)
|
||||
if err != nil {
|
||||
panic(cl.Vm.NewGoError(err))
|
||||
}
|
||||
return results
|
||||
}
|
||||
|
||||
func (cl *Collection) FindOneAndDelete(filter interface{}) interface{} {
|
||||
var result = map[string]interface{}{}
|
||||
err := cl.collection.FindOneAndDelete(context.Background(), filter).Decode(result)
|
||||
@@ -152,6 +165,14 @@ func (cl *Collection) Find(filter interface{}, params map[string]interface{}) in
|
||||
return results
|
||||
}
|
||||
|
||||
func (cl *Collection) CountDocuments(filter interface{}) int64 {
|
||||
v, err := cl.collection.CountDocuments(context.Background(), filter)
|
||||
if err != nil {
|
||||
panic(cl.Vm.NewGoError(err))
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
func (cl *Collection) UpdateOne(filter, update interface{}, params map[string]interface{}) interface{} {
|
||||
opts := []*options.UpdateOptions{}
|
||||
if v, ok := params["upsert"]; ok {
|
||||
|
||||
Reference in New Issue
Block a user