Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 8ba79e2e
authored
Mar 23, 2023
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
文字更改
1 parent
ecd3bb0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
86 deletions
linkwe-pc/src/views/enterpriseWechat/part2.vue
linkwe-pc/src/views/enterpriseWechat/part2.vue
View file @
8ba79e2
...
@@ -4,27 +4,29 @@
...
@@ -4,27 +4,29 @@
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div
class=
"my-title"
>
自建应用
</div>
<div
class=
"my-title"
>
自建应用
</div>
<el-form-item
label=
"消息应用ID:"
prop=
"agentId"
>
<el-form-item
label=
"消息应用ID:"
prop=
"agentId"
>
<el-input
style=
"width: 40%"
v-model=
"form.agentId"
placeholder=
"请输入消息应用ID"
></el-input>
<el-input
style=
"width: 40%
;
"
v-model=
"form.agentId"
placeholder=
"请输入消息应用ID"
></el-input>
<div
class=
"tips"
>
用于接收应用消息,在企微后台->应用工具->自建应用中配置并获取
</div>
<div
class=
"tips"
>
用于接收应用消息,在企微后台->应用工具->自建应用中配置并获取
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"消息应用Secret:"
prop=
"agentSecret"
>
<el-form-item
label=
"消息应用Secret:"
prop=
"agentSecret"
>
<div>
<div>
<el-input
<el-input
style=
"width: 40%"
style=
"width: 40%
;
"
:disabled=
"!agentSecretEditState"
:disabled=
"!agentSecretEditState"
:type=
"agentSecretEditState ? 'text' : 'password'"
:type=
"agentSecretEditState ? 'text' : 'password'"
v-model=
"form.agentSecret"
v-model=
"form.agentSecret"
placeholder=
"请输入消息应用Secret"
></el-input>
placeholder=
"请输入消息应用Secret"
<el-button
style=
"margin-left: 20px"
plain
v-if=
"agentSecretEditState"
@
click=
"cancelEditAgentSecret"
>
></el-input>
<el-button
style=
"margin-left: 20px;"
plain
v-if=
"agentSecretEditState"
@
click=
"cancelEditAgentSecret"
>
取消
取消
</el-button>
</el-button>
<el-button
type=
"primary"
plain
v-if=
"agentSecretEditState"
@
click=
"submitEditAgentSecret"
>
保存
</el-button>
<el-button
type=
"primary"
plain
v-if=
"agentSecretEditState"
@
click=
"submitEditAgentSecret"
>
保存
</el-button>
<el-button
<el-button
type=
"primary"
type=
"primary"
style=
"margin-left: 20px"
style=
"margin-left: 20px
;
"
plain
plain
v-if=
"!agentSecretEditState"
v-if=
"!agentSecretEditState"
@
click=
"editAgentSecret"
>
@
click=
"editAgentSecret"
>
修改
修改
</el-button>
</el-button>
</div>
</div>
...
@@ -36,28 +38,30 @@
...
@@ -36,28 +38,30 @@
<el-form-item
label=
"会话存档Secret:"
prop=
"chatSecret"
>
<el-form-item
label=
"会话存档Secret:"
prop=
"chatSecret"
>
<div>
<div>
<el-input
<el-input
style=
"width: 40%"
style=
"width: 40%
;
"
:disabled=
"!chatSecretEditState"
:disabled=
"!chatSecretEditState"
:type=
"chatSecretEditState ? 'text' : 'password'"
:type=
"chatSecretEditState ? 'text' : 'password'"
v-model=
"form.chatSecret"
v-model=
"form.chatSecret"
placeholder=
"请输入会话存档Secret"
></el-input>
placeholder=
"请输入会话存档Secret"
<el-button
style=
"margin-left: 20px"
plain
v-if=
"chatSecretEditState"
@
click=
"cancelEditChatSecret"
>
></el-input>
<el-button
style=
"margin-left: 20px;"
plain
v-if=
"chatSecretEditState"
@
click=
"cancelEditChatSecret"
>
取消
取消
</el-button>
</el-button>
<el-button
type=
"primary"
plain
v-if=
"chatSecretEditState"
@
click=
"submitEditChatSecret"
>
保存
</el-button>
<el-button
type=
"primary"
plain
v-if=
"chatSecretEditState"
@
click=
"submitEditChatSecret"
>
保存
</el-button>
<el-button
<el-button
type=
"primary"
type=
"primary"
style=
"margin-left: 20px"
style=
"margin-left: 20px
;
"
plain
plain
v-if=
"!chatSecretEditState"
v-if=
"!chatSecretEditState"
@
click=
"editChatSecret"
>
@
click=
"editChatSecret"
>
修改
修改
</el-button>
</el-button>
</div>
</div>
<div
class=
"tips"
>
用于同步企微会话,在企微后台->管理工具->会话存档中获取
</div>
<div
class=
"tips"
>
用于同步企微会话,在企微后台->管理工具->会话存档中获取
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"消息加密
公
钥:"
prop=
"financePrivateKey"
>
<el-form-item
label=
"消息加密
私
钥:"
prop=
"financePrivateKey"
>
<el-input
style=
"width: 40%
"
v-model=
"form.financePrivateKey"
placeholder=
"请输入消息加密公
钥"
></el-input>
<el-input
style=
"width: 40%
;"
v-model=
"form.financePrivateKey"
placeholder=
"请输入消息加密私
钥"
></el-input>
<div
class=
"tips"
>
用于同步企微会话,在企微后台->管理工具->会话存档中获取
</div>
<div
class=
"tips"
>
用于同步企微会话,在企微后台->管理工具->会话存档中获取
</div>
</el-form-item>
</el-form-item>
</div>
</div>
...
@@ -68,88 +72,88 @@
...
@@ -68,88 +72,88 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'enterprise-wechat-part2'
,
name
:
'enterprise-wechat-part2'
,
data
()
{
data
()
{
return
{
return
{
agentSecretCopy
:
''
,
agentSecretCopy
:
''
,
agentSecretEditState
:
false
,
agentSecretEditState
:
false
,
chatSecretCopy
:
''
,
chatSecretCopy
:
''
,
chatSecretEditState
:
false
,
chatSecretEditState
:
false
,
form
:
{},
form
:
{},
rules
:
{
rules
:
{
agentId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
chatSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
chatSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
financePrivateKey
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
financePrivateKey
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}]
// seasRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }],
// seasRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }],
// sopTagRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }]
// sopTagRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }]
},
}
}
},
watch
:
{
data
:
'setData'
,
},
props
:
{
data
:
{
type
:
Object
,
default
:
{},
},
},
methods
:
{
editAgentSecret
()
{
this
.
agentSecretEditState
=
true
this
.
agentSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
agentSecret
))
this
.
form
.
agentSecret
=
''
},
cancelEditAgentSecret
()
{
this
.
agentSecretEditState
=
false
this
.
form
.
agentSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
agentSecretCopy
))
},
submitEditAgentSecret
()
{
if
(
this
.
form
.
agentSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
agentSecretEditState
=
false
}
}
},
},
editChatSecret
()
{
watch
:
{
this
.
chatSecretEditState
=
true
data
:
'setData'
this
.
chatSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
chatSecret
))
this
.
form
.
chatSecret
=
''
},
},
cancelEditChatSecret
()
{
props
:
{
this
.
chatSecretEditState
=
false
data
:
{
this
.
form
.
chatSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chatSecretCopy
))
type
:
Object
,
},
default
:
{}
submitEditChatSecret
()
{
if
(
this
.
form
.
chatSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
chatSecretEditState
=
false
}
}
},
},
methods
:
{
submit
()
{
editAgentSecret
()
{
this
.
$refs
[
'form'
].
validate
((
validate
)
=>
{
this
.
agentSecretEditState
=
true
if
(
validate
)
{
this
.
agentSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
agentSecret
))
this
.
form
.
agentSecret
=
''
},
cancelEditAgentSecret
()
{
this
.
agentSecretEditState
=
false
this
.
form
.
agentSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
agentSecretCopy
))
},
submitEditAgentSecret
()
{
if
(
this
.
form
.
agentSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
agentSecretEditState
=
false
}
},
editChatSecret
()
{
this
.
chatSecretEditState
=
true
this
.
chatSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
chatSecret
))
this
.
form
.
chatSecret
=
''
},
cancelEditChatSecret
()
{
this
.
chatSecretEditState
=
false
this
.
form
.
chatSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chatSecretCopy
))
},
submitEditChatSecret
()
{
if
(
this
.
form
.
chatSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
chatSecretEditState
=
false
}
},
submit
()
{
this
.
$refs
[
'form'
].
validate
((
validate
)
=>
{
if
(
validate
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
}
})
},
setData
()
{
if
(
Object
.
keys
(
this
.
data
).
length
)
{
this
.
form
=
this
.
data
}
}
})
},
setData
()
{
if
(
Object
.
keys
(
this
.
data
).
length
)
{
this
.
form
=
this
.
data
}
}
},
},
},
mounted
()
{},
mounted
()
{},
created
()
{}
created
()
{},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.my-title
{
.my-title
{
}
}
.tips
{
.tips
{
color
:
#aaa
;
color
:
#aaa
;
font-size
:
12px
;
font-size
:
12px
;
}
}
</
style
>
</
style
>
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