Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
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 7e22d874
authored
Apr 03, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
02bcb7bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
src/views/clientManage/index.vue
src/views/clientManage/index.vue
View file @
7e22d87
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
</span>
</span>
<span
v-else
>
解析结果
</span>
<span
v-else
>
解析结果
</span>
</
template
>
</
template
>
<el-input
type=
"textarea"
v-model=
"orderform.result"
rows=
"
3
"
></el-input>
<el-input
type=
"textarea"
v-model=
"orderform.result"
rows=
"
4
"
></el-input>
</el-form-item>
</el-form-item>
</div>
</div>
</el-form>
</el-form>
...
@@ -637,7 +637,8 @@ export default {
...
@@ -637,7 +637,8 @@ export default {
async
handleOrder
()
{
async
handleOrder
()
{
this
.
disabled
=
true
this
.
disabled
=
true
this
.
gptRequest
=
true
this
.
gptRequest
=
true
//await this.handleResetOrder()
this
.
searchForm
=
{}
// this.resetTable()
// const tagsAll = this.tableParams.reduce((tags, next) => {
// const tagsAll = this.tableParams.reduce((tags, next) => {
// tags += next.labelUnitList.map(({ labelName }) => labelName).join(',')
// tags += next.labelUnitList.map(({ labelName }) => labelName).join(',')
// return tags + ','
// return tags + ','
...
@@ -663,7 +664,7 @@ export default {
...
@@ -663,7 +664,7 @@ export default {
Object
.
assign
(
this
.
keys
,
{
subject
:
''
,
festival
:
''
})
Object
.
assign
(
this
.
keys
,
{
subject
:
''
,
festival
:
''
})
const
order
=
this
.
orderform
.
order
const
order
=
this
.
orderform
.
order
// const content = '帮我查询从2023-3-29日至2023-04-05日期间西安飞广州或者深圳的机票,从上面一句话中提取出发日期,命名为date,出发地,命名为start,目的地,命名为end,输出json格式。'
// const content = '帮我查询从2023-3-29日至2023-04-05日期间西安飞广州或者深圳的机票,从上面一句话中提取出发日期,命名为date,出发地,命名为start,目的地,命名为end,输出json格式。'
const
content
=
`
${
order
}
,
忽略之前的上下文,
今年是2023年,针对上面这段文字,
const
content
=
`
${
order
}
,今年是2023年,针对上面这段文字,
提取出营销文案关键字,命名为subject;
提取出营销文案关键字,命名为subject;
提取出节日,命名为festival,如果是数字,转化成大写,例如:五一节;
提取出节日,命名为festival,如果是数字,转化成大写,例如:五一节;
提取出车主归属地或者车牌号,命名为carNumber,如广东的车主,则取值为"粤";
提取出车主归属地或者车牌号,命名为carNumber,如广东的车主,则取值为"粤";
...
@@ -713,7 +714,7 @@ export default {
...
@@ -713,7 +714,7 @@ export default {
return
element
return
element
})
})
// let content = '我有一批客户,资料(id,customerName,customerSex,customerPhone,buyDate,carVin,carNumber) 分别是:'
// let content = '我有一批客户,资料(id,customerName,customerSex,customerPhone,buyDate,carVin,carNumber) 分别是:'
let
content
=
`
忽略之前的上下文,
现在是2023年,我有
${
list
.
length
}
个客户资料分别是:`
let
content
=
`现在是2023年,我有
${
list
.
length
}
个客户资料分别是:`
let
cutomerInfo
=
[]
let
cutomerInfo
=
[]
for
(
let
index
=
0
;
index
<
list
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
list
.
length
;
index
++
)
{
let
{
customerName
,
customerSex
,
customerPhone
,
buyDate
,
carVin
,
carNumber
}
=
list
[
index
]
let
{
customerName
,
customerSex
,
customerPhone
,
buyDate
,
carVin
,
carNumber
}
=
list
[
index
]
...
@@ -725,16 +726,26 @@ export default {
...
@@ -725,16 +726,26 @@ export default {
this
.
$apis
.
crowdManage
.
gpt
(
content
).
then
(
result
=>
{
this
.
$apis
.
crowdManage
.
gpt
(
content
).
then
(
result
=>
{
const
{
code
,
success
,
message
,
data
}
=
result
const
{
code
,
success
,
message
,
data
}
=
result
if
(
code
==
'000000'
&&
success
)
{
if
(
code
==
'000000'
&&
success
)
{
if
(
!
result
.
data
)
{
//
if (!result.data) {
this
.
$message
.
error
(
'生成文案异常,请重试!'
)
//
this.$message.error('生成文案异常,请重试!')
return
//
return
}
//
}
// console.log(result)
// console.log(result)
// let _obj = result.data
// let _obj = result.data
// this.$refs.clientManage.data[index].test = _obj.content
// this.$refs.clientManage.data[index].test = _obj.content
// this.$refs.clientManage.data = this.$refs.clientManage.data
// this.$refs.clientManage.data = this.$refs.clientManage.data
list
.
map
((
k
,
i
)
=>
{
list
.
map
((
k
,
i
)
=>
{
k
.
test
=
result
.
data
.
customers
[
i
].
content
k
.
test
=
result
?.
data
?.
customers
[
i
]?.
content
||
'生成文案异常,请重试!'
const
{
customerName
,
customerSex
,
customerPhone
}
=
k
k
.
test
&&
k
.
test
!=
'生成文案异常,请重试!'
&&
setTimeout
(()
=>
{
this
.
$notify
({
title
:
'发送成功'
,
message
:
`
${
customerName
}${{
1
:
'先生'
,
2
:
'女士'
}
[customerSex] || '先生/女士'},手机号:
${
customerPhone
}
发送成功.`
,
type
:
'success'
})
},
i
*
1000
)
return
k
return
k
})
})
this
.
$forceUpdate
()
this
.
$forceUpdate
()
...
...
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