Commit ac32da8d by 姜鹏凯

Merge branch 'develop'

2 parents 5ebff2a6 8ad0d1d1
...@@ -131,7 +131,6 @@ ...@@ -131,7 +131,6 @@
created() { created() {
getCosConfig().then((res) => { getCosConfig().then((res) => {
this.cosConfig = res this.cosConfig = res
console.log(this.cosConfig)
if (this.cosConfig.fileObject == 'tencentOss') { if (this.cosConfig.fileObject == 'tencentOss') {
this.cosInstance = new Cos({ this.cosInstance = new Cos({
SecretId: res.secretId, SecretId: res.secretId,
...@@ -192,7 +191,7 @@ ...@@ -192,7 +191,7 @@
this.aliOss() this.aliOss()
} }
}, },
aliOss() { async aliOss() {
this.loading = true this.loading = true
let file = undefined let file = undefined
if (!this.multiple || this.limit == 1) { if (!this.multiple || this.limit == 1) {
...@@ -209,22 +208,17 @@ ...@@ -209,22 +208,17 @@
this.$message.error('存储空间正忙,请稍后再试') this.$message.error('存储空间正忙,请稍后再试')
return return
} }
let name = `/${dateFormat(date, 'yyyy-MM-dd')}/t${date.getTime()}-${uuid()}${format}` let name = `${dateFormat(date, 'yyyy-MM-dd')}/t${date.getTime()}-${uuid()}${format}`
this.ossObj try {
.multipartUpload(name, file, { const data = await this.ossObj.multipartUpload(name, file, {
progress: (progressData) => { progress: (progressData) => {
console.log(progressData) this.percentage = progressData * 100
this.percentage = progressData.percent * 100 // this.speed = (progressData.speed / 1024 / 1024).toFixed(2)
this.speed = (progressData.speed / 1024 / 1024).toFixed(2)
} }
}) })
.then((err1, data) => { if (data) {
this.percentage = this.speed = 0 this.percentage = this.speed = 0
if (err1) { let location = this.cosConfig.cosImgUrlPrefix + data.name
this.loading = false
this.$message.error('上传失败,请稍后再试')
} else {
let location = 'https://' + data.Location
this.$emit('upSuccess', location) this.$emit('upSuccess', location)
this.type == 2 this.type == 2
? //获取视频第一帧画面 ? //获取视频第一帧画面
...@@ -247,10 +241,10 @@ ...@@ -247,10 +241,10 @@
this.$emit('update:fileList', this.fileList.concat({ name, url: location })) this.$emit('update:fileList', this.fileList.concat({ name, url: location }))
} }
} }
}) } catch (e) {
.catch((err) => { this.loading = false
console.log(err) this.$message.error('上传失败,请稍后再试')
}) }
}, },
tencentFn() { tencentFn() {
this.loading = true this.loading = true
...@@ -290,7 +284,6 @@ ...@@ -290,7 +284,6 @@
}, },
(err1, data) => { (err1, data) => {
this.percentage = this.speed = 0 this.percentage = this.speed = 0
console.log(data)
if (err1) { if (err1) {
this.loading = false this.loading = false
this.$message.error('上传失败,请稍后再试') this.$message.error('上传失败,请稍后再试')
...@@ -560,7 +553,7 @@ ...@@ -560,7 +553,7 @@
<circle cx="50" cy="50" r="20" fill="none" class="path"></circle> <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>
</svg> </svg>
</div> </div>
<div class="cc" style="margin-top: 35px;"> <div class="cc" style="margin-top: 35px;" v-if="speed">
{{ speed + 'M/s' }} {{ speed + 'M/s' }}
</div> </div>
</div> </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<TextareaExtend <TextareaExtend
:disabled="isDetail" :disabled="isDetail"
v-model="talkForm.templateInfo" v-model="talkForm.templateInfo"
:toolbar="['emoji', 'insertCustomerNickName']" :toolbar="isDetail ? [] : ['emoji']"
maxlength="2000" maxlength="2000"
show-word-limit show-word-limit
placeholder="请输入" placeholder="请输入"
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
baseData: { baseData: {
type: 0, type: 0,
client: { client: {
content: '',
type: 0, type: 0,
sex: null, sex: null,
trackState: null, trackState: null,
...@@ -108,7 +109,7 @@ ...@@ -108,7 +109,7 @@
taskSendTime: '', taskSendTime: '',
taskEndTime: '' taskEndTime: ''
}, },
attachmentsList: [], attachments: [],
senderList: [] senderList: []
}, },
submitLoading: false, submitLoading: false,
...@@ -125,11 +126,11 @@ ...@@ -125,11 +126,11 @@
}, },
data: { data: {
type: Object, type: Object,
default: () => [] default: {}
}, },
posterObj: { posterObj: {
type: Object, type: Object,
default: () => [] default: {}
} }
}, },
watch: { watch: {
...@@ -149,9 +150,10 @@ ...@@ -149,9 +150,10 @@
methods: { methods: {
getPreviewInfoText(data) { getPreviewInfoText(data) {
this.preview.templateInfo = data.templateInfo this.preview.templateInfo = data.templateInfo
this.$forceUpdate()
}, },
getPreviewInfo(data) { getPreviewInfo(data) {
this.preview = data this.preview.previewData = JSON.parse(JSON.stringify(data.previewData))
if (this.baseData.style == 1) { if (this.baseData.style == 1) {
this.preview.previewData.unshift({ this.preview.previewData.unshift({
mediaType: '5', mediaType: '5',
......
...@@ -73,11 +73,11 @@ ...@@ -73,11 +73,11 @@
templateInfo: '', templateInfo: '',
attachments: [] attachments: []
}, },
previewData: [],
form: { form: {
type: 0, type: 0,
client: { client: {
type: 0, type: 0,
content: '',
sex: null, sex: null,
trackState: null, trackState: null,
addBeginTime: '', addBeginTime: '',
...@@ -98,23 +98,23 @@ ...@@ -98,23 +98,23 @@
if (this.form.attachments) { if (this.form.attachments) {
let arr = [] let arr = []
this.form.attachments.forEach((dd) => { this.form.attachments.forEach((dd) => {
if (dd.msgType == 'text') { if (dd.msgType !== 'text') {
this.attachmentsData.templateInfo = dd.content
} else {
arr.push(dd) arr.push(dd)
} }
}) })
this.attachmentsData.templateInfo = this.form.client.content
let data = setAttachments(arr) let data = setAttachments(arr)
this.attachmentsData.attachments = data this.attachmentsData.attachments = data
this.$emit('preview', { this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo,
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)) previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments))
}) })
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) })
} }
if (!this.form.client) { if (!this.form.client) {
this.form.client = { this.form.client = {
type: 0, type: 0,
sex: '', sex: '',
content: '',
trackState: '', trackState: '',
addBeginTime: '', addBeginTime: '',
addEndTime: '', addEndTime: '',
...@@ -132,12 +132,12 @@ ...@@ -132,12 +132,12 @@
}, },
changeInfo(data) { changeInfo(data) {
this.form.client.content = data this.form.client.content = data
this.$forceUpdate()
this.$emit('update', this.form) this.$emit('update', this.form)
this.$emit('previewText', { templateInfo: data, previewData: this.previewData }) this.$emit('previewText', { templateInfo: data })
}, },
getPhoneData(data) { getPhoneData(data) {
this.previewData = data this.$emit('preview', { previewData: data })
this.$emit('preview', { templateInfo: this.attachmentsData.templateInfo, previewData: data })
}, },
getAttentment(data) { getAttentment(data) {
this.form.attachments = data this.form.attachments = data
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
form: { form: {
type: 0, type: 0,
group: { group: {
contnet: '',
type: 0, type: 0,
userIds: '', userIds: '',
sendType: 0, sendType: 0,
...@@ -93,22 +94,22 @@ ...@@ -93,22 +94,22 @@
if (this.form.attachments) { if (this.form.attachments) {
let arr = [] let arr = []
this.form.attachments.forEach((dd) => { this.form.attachments.forEach((dd) => {
if (dd.msgType == 'text') { if (dd.msgType !== 'text') {
this.attachmentsData.templateInfo = dd.content
} else {
arr.push(dd) arr.push(dd)
} }
}) })
this.attachmentsData.templateInfo = this.form.client.content
let data = setAttachments(arr) let data = setAttachments(arr)
this.attachmentsData.attachments = data this.attachmentsData.attachments = data
this.$emit('preview', { this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo,
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)) previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments))
}) })
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) })
} }
if (!this.form.group) { if (!this.form.group) {
this.form.group = { this.form.group = {
type: 0, type: 0,
content: '',
userIds: '', userIds: '',
sendType: 0, sendType: 0,
taskSendTime: '', taskSendTime: '',
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<TextareaExtend <TextareaExtend
:disabled="isDetail" :disabled="isDetail"
v-model="templateInfo" v-model="templateInfo"
:toolbar="isDetail ? '' : ['emoji']" :toolbar="isDetail ? [] : ['emoji']"
maxlength="2000" maxlength="2000"
show-word-limit show-word-limit
placeholder="请输入" placeholder="请输入"
......
...@@ -258,6 +258,12 @@ ...@@ -258,6 +258,12 @@
}, },
created() { created() {
this.getList() this.getList()
this.$store.dispatch(
'app/setBusininessDesc',
`
<div>通过群发、朋友圈、应用消息等多种推广形式快捷推广智能短链,触达客户</div>
`
)
} }
} }
</script> </script>
......
...@@ -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,7 +72,7 @@ ...@@ -68,7 +72,7 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'enterprise-wechat-part2', name: 'enterprise-wechat-part2',
data() { data() {
return { return {
...@@ -81,20 +85,20 @@ export default { ...@@ -81,20 +85,20 @@ export default {
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: { watch: {
data: 'setData', data: 'setData'
}, },
props: { props: {
data: { data: {
type: Object, type: Object,
default: {}, default: {}
}, }
}, },
methods: { methods: {
editAgentSecret() { editAgentSecret() {
...@@ -139,17 +143,17 @@ export default { ...@@ -139,17 +143,17 @@ export default {
if (Object.keys(this.data).length) { if (Object.keys(this.data).length) {
this.form = this.data 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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!