Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-home
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9b24747e
authored
May 30, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
5994c916
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
src/utils/util.js
src/views/home/components/Marketing/GPTAnalysis.vue
src/utils/util.js
View file @
9b24747
...
@@ -88,6 +88,38 @@ util.openTab = function(url) {
...
@@ -88,6 +88,38 @@ util.openTab = function(url) {
link
.
rel
=
'opener'
link
.
rel
=
'opener'
link
.
click
()
link
.
click
()
}
}
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
util
.
limitPrice
=
(
newValue
,
oldValue
,
intergerDigit
,
pointDigit
,
minValue
,
maxValue
,
regRule
)
=>
{
/* eslint-disable */
var
reg
=
{
priceReg
:
/^
\d[\d\.]
*$/
,
numReg
:
/^
[
1-9
]\d
*$/
,
zNumReg
:
/^
\d
*$/
}
/* eslint-enable */
regRule
=
regRule
||
'priceReg'
if
(
newValue
&&
((
minValue
&&
newValue
<
minValue
)
||
(
maxValue
&&
newValue
>
maxValue
)))
{
return
oldValue
||
''
}
if
(
newValue
&&
reg
[
regRule
].
test
(
newValue
+
''
))
{
if
(
/
\.
/
.
test
(
newValue
))
{
newValue
=
newValue
+
''
var
interger
=
newValue
.
split
(
'.'
)[
0
]
var
point
=
newValue
.
split
(
'.'
)[
1
]
var
intergerNum
=
interger
.
length
>
intergerDigit
?
oldValue
.
split
(
'.'
)[
0
]
:
interger
var
pointNum
=
point
.
length
>
pointDigit
?
point
.
slice
(
0
,
pointDigit
)
:
point
newValue
=
pointDigit
?
intergerNum
+
'.'
+
pointNum
:
newValue
.
split
(
'.'
)[
0
]
}
else
{
newValue
=
newValue
.
length
>
intergerDigit
?
oldValue
.
slice
(
0
,
intergerDigit
)
:
newValue
if
(
regRule
==
'zNumReg'
)
{
newValue
=
newValue
.
split
(
''
)[
0
]
==
'0'
?
'0'
:
newValue
}
}
return
newValue
}
else
{
return
newValue
?
oldValue
:
''
}
}
util
.
isShowBtn
=
function
(
value
,
permissions
)
{
util
.
isShowBtn
=
function
(
value
,
permissions
)
{
let
isShowStatus
=
false
let
isShowStatus
=
false
const
menu
=
JSON
.
parse
(
sessionStorage
[
'SCRM_BASE_MENULIST'
])
const
menu
=
JSON
.
parse
(
sessionStorage
[
'SCRM_BASE_MENULIST'
])
...
...
src/views/home/components/Marketing/GPTAnalysis.vue
View file @
9b24747
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 10:23:52
* @Date: 2023-05-16 10:23:52
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-30 1
4:26:42
* @LastEditTime: 2023-05-30 1
5:28:53
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\GPTAnalysis.vue
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\GPTAnalysis.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -199,6 +199,7 @@ import getUploadImgColor from '@/utils/color'
...
@@ -199,6 +199,7 @@ import getUploadImgColor from '@/utils/color'
import
{
mapState
,
mapActions
}
from
'vuex'
import
{
mapState
,
mapActions
}
from
'vuex'
import
gpt
from
'@/mixins/gpt'
import
gpt
from
'@/mixins/gpt'
import
draw
from
'@/mixins/draw'
import
draw
from
'@/mixins/draw'
import
util
from
'@/utils/util'
export
default
{
export
default
{
mixins
:
[
gpt
,
draw
],
mixins
:
[
gpt
,
draw
],
name
:
'analysis'
,
name
:
'analysis'
,
...
@@ -425,7 +426,10 @@ export default {
...
@@ -425,7 +426,10 @@ export default {
mergeStr
(
val
)
{
mergeStr
(
val
)
{
console
.
log
(
val
,
999999999999
)
console
.
log
(
val
,
999999999999
)
this
.
setMergeImg
(
val
)
this
.
setMergeImg
(
val
)
}
},
'editForm.activityPrice'
(
newValue
,
oldValue
)
{
this
.
editForm
.
activityPrice
=
util
.
limitPrice
(
newValue
,
oldValue
,
6
,
2
,
0
)
},
},
},
components
:
{
components
:
{
selectGiftDialog
,
selectGiftDialog
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment