Commit 4e73859b by 姜鹏凯

bug fixed

1 parent a4932e02
......@@ -22,7 +22,7 @@
</div>
<div v-else-if="unit.origin === 5">
<div class="text text-right">
{{unit.customerName}}
{{unit.kfName}}
</div>
<div class="send-time text-right">
{{unit.sendTime}}
......
......@@ -70,11 +70,18 @@
},
methods: {
setMemeber (e) {
this.customerList.forEach(dd => {
if (dd.openKfId === e) {
this.manList = dd.userIdList
}
})
console.log(e)
if (e) {
this.customerList.forEach(dd => {
if (dd.openKfId === e) {
this.manList = dd.userIdList
}
})
}
else {
this.manList = []
this.data.userIds = ''
}
this.submit()
},
selectMember (e) {
......
......@@ -8,7 +8,7 @@
<img :src="avator" style="width: 40px; height: 40px"></img>
</div>
<div class="show_name">
<div class="length-limit">{{call}} &nbsp;&nbsp; @{{companyName}}</div>
<div class="length-limit">{{call}} &nbsp;&nbsp;<span style="color: #ffcf0e;">@{{companyName}}</span></div>
<div class="sub">
{{call}}为你服务
</div>
......
......@@ -2,7 +2,7 @@
<div class="preview">
<div class="title">{{name}}</div>
<div class="content">
<div class="none" v-if="def === 'welcome'">
<div class="none" v-if="def === 'welcome' || def === 'detail'">
<div class="none" v-if="data.receptionType === 1">
<div class="time">
{{time}}
......@@ -89,7 +89,7 @@
</div>
</div>
</div>
<div v-else>
<div v-if="def === 'detail' || def==='rules'">
<div class="time">
{{time}}
</div>
......@@ -232,6 +232,7 @@
border-bottom-right-radius: 20px;
padding: 10px;
.time {
margin-top:10px;
width: 100%;
text-align: center;
// margin-bottom: 10px;
......
......@@ -12,7 +12,7 @@
<part2 :isEdit="isEdit" :name='form.name' :avatar="form.avatar" :editData="form" @update="getWecome"></part2>
</div>
<div v-show="currentActive === 3">
<part3 :isEdit="isEdit" :editData="form" :name='form.name' :avatar="form.avatar" @submit="setSubmit"></part3>
<part3 :isEdit="isEdit" :editData="form" :name='form.name' :avatar="form.avatar" :submitLoading="loading" @submit="setSubmit"></part3>
</div>
</div>
</template>
......@@ -28,7 +28,8 @@
currentActive: 1,
form: {},
isEdit: false,
id: ''
id: '',
loading: false
}
},
components: {
......@@ -53,10 +54,16 @@
getDetailFn () {
getDetail(this.id).then(res => {
this.form = res.data
this.form.welcome.forEach(dd => {
if (dd.workCycle) {
dd.workCycle = dd.workCycle.split(',')
}
})
this.isEdit = true
})
},
setSubmit (type, data) {
console.log(typeof(data))
if (type === 2) {
this.currentActive = type
} else {
......@@ -74,17 +81,26 @@
this.form.endNoticeTime = data.endNoticeTime
this.form.endTimeType = data.endTimeType
this.form.endContent = data.endContent
this.form.welcome.forEach(dd => {
dd.workCycle = dd.workCycle.join(',')
let tempData = JSON.parse(JSON.stringify(this.form))
tempData.welcome.forEach(dd => {
if (dd.workCycle) {
dd.workCycle = dd.workCycle.join(',')
}
})
this.loading = true
setTimeout(() => {
this.loading = false
}, 3000)
if (this.form.id) {
editService(this.form).then(res => {
editService(tempData).then(res => {
this.$message.success('操作成功!')
this.loading = false
this.$router.go(-1)
})
} else {
addService(this.form).then(res => {
this.$message.success('操作成功!')
this.loading = false
this.$router.go(-1)
})
}
......
......@@ -137,7 +137,7 @@
</el-col>
<el-col style="width: 350px">
<div class="g-card g-pad20" style="height: 100%">
<show-in-phone v-if="show" :name="detail.name" :avatar="detail.avatar" :data="detail"></show-in-phone>
<show-in-phone v-if="show" :name="detail.name" def="detail" :avatar="detail.avatar" :data="detail"></show-in-phone>
</div>
</el-col>
</el-row>
......@@ -178,7 +178,9 @@
getDetail(this.id).then(res => {
this.detail = res.data
this.detail.welcome.forEach(dd => {
dd.workCycle = dd.workCycle.split(',')
if (dd.workCycle) {
dd.workCycle = dd.workCycle.split(',')
}
console.log(dd.workCycle)
})
this.show = true
......
......@@ -158,11 +158,7 @@
},
getData () {
this.tableLoading = true
getList(
{
orderByColumn: 'wki.update_time',
isAsc: 'desc'
}).then(res => {
getList().then(res => {
this.list = res.rows
this.tableLoading = false
})
......
......@@ -39,13 +39,13 @@
<el-card class="box-card roster-card" :key="index">
<el-form-item label="工作周期">
<el-checkbox-group v-model="item.workCycle" @change="checkStartEnd($event, index)">
<el-checkbox :label="1">周一</el-checkbox>
<el-checkbox :label="2">周二</el-checkbox>
<el-checkbox :label="3">周三</el-checkbox>
<el-checkbox :label="4">周四</el-checkbox>
<el-checkbox :label="5">周五</el-checkbox>
<el-checkbox :label="6">周六</el-checkbox>
<el-checkbox :label="7">周日</el-checkbox>
<el-checkbox label="1">周一</el-checkbox>
<el-checkbox label="2">周二</el-checkbox>
<el-checkbox label="3">周三</el-checkbox>
<el-checkbox label="4">周四</el-checkbox>
<el-checkbox label="5">周五</el-checkbox>
<el-checkbox label="6">周六</el-checkbox>
<el-checkbox label="7">周日</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="时间段">
......@@ -113,7 +113,7 @@
<el-button type="text" icon="el-icon-delete" @click="onRemoveMenu(index)">删除</el-button>
</div>
</template>
<div v-if="form.welcome[0].menuList.length < 9">
<div v-if="form.welcome[0].menuList.length < 8">
<el-button size="mini" type="primary" plain @click="onAddMenu">+添加菜单</el-button>
<div class="sub-des">
客户点击菜单,客服自动回复
......@@ -130,7 +130,7 @@
</el-col>
<el-col style="width: 350px">
<div class="g-card g-pad20" style="height: 100%">
<show-in-phone :name="name" :avatar="avatar" :data="form" :show="show"></show-in-phone>
<show-in-phone :name="name" :avatar="avatar" def="welcome" :data="form" :show="show"></show-in-phone>
</div>
</el-col>
</el-row>
......@@ -195,7 +195,8 @@
}]
},
setEdit () {
if (this.idEdit) {
if (this.isEdit) {
console.log('编辑了')
this.form = {
receptionType: this.editData.receptionType,
splitTime: this.editData.splitTime,
......@@ -204,11 +205,15 @@
}
},
nextStep (type) {
if (this.form.receptionType === 2) {
this.form.welcome[0].type = 2
}
this.$emit('update', type, this.form)
},
checkStartEnd () {
},
setInit (type) {
console.log('初始化了')
if (type === 1) {
this.form = {
receptionType: 1,
......
......@@ -75,14 +75,14 @@
</el-form-item>
<el-form-item>
<el-button plain @click="nextStep(2)">上一步</el-button>
<el-button type="primary" @click="nextStep">确定</el-button>
<el-button type="primary" v-loading="submitLoading" @click="nextStep">确定</el-button>
</el-form-item>
</el-form>
</div>
</el-col>
<el-col style="width: 350px">
<div class="g-card g-pad20" style="height: 100%">
<show-in-phone :name="name" :avatar="avatar" :data="form" def="rule"></show-in-phone>
<show-in-phone :name="name" :avatar="avatar" :data="form" def="rules"></show-in-phone>
</div>
</el-col>
</el-row>
......@@ -139,6 +139,10 @@
default: () => {
return {}
}
},
submitLoading: {
type: Boolean,
default: false
}
},
watch: {
......@@ -158,7 +162,10 @@
}
},
nextStep (type) {
console.log(type)
if (!this.userList.length) {
this.$message.error('请选择接待员工!')
return
}
let arr = []
this.userList.forEach(dd => {
arr.push({ userId: dd.userId })
......
......@@ -49,7 +49,7 @@
<el-table-column label="最近更新时间" align="center" prop="updateTime" width="180"></el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="230" class-name="small-padding fixed-width">
<template slot-scope="{ row }">
<el-button type="text" class="copy_btn" :id="'btn' + row.id" :data-clipboard-text="row.url" :data-clipboard-target="'#' + 'btn' + row.id">复制链接</el-button>
<el-button type="text" class="copy_btn" :id="'btn' + row.id" :data-clipboard-text="row.url" :data-clipboard-target="'#' + 'btn' + row.id" @click="copy(row.id)">复制链接</el-button>
<el-divider direction="vertical"></el-divider>
<el-button type="text" @click="downloadSingleFn(row)">下载二维码</el-button>
<el-divider direction="vertical"></el-divider>
......@@ -100,6 +100,7 @@
},
data () {
return {
clipboard:null,
loading: false,
list: [],
showDialog: false,
......@@ -240,7 +241,6 @@
this.total = Number(res.total)
this.loading = false
})
// this.list = [{ id: '11111', "typeName": "nisi eiusmod ea Excepteur dolore", "name": "in aliqua adipisicing sed ut", "type": 71152170.26921538, "kfName": "ad quis dolore", "kfAvatar": "ullamco ex quis", "kfUrl": "labore laboris veniam", "accessCnt": 84703618.49096513, "consultCnt": 89256939.32291824, "receptionCnt": 81229066.2598409, "createTime": "Ut incididunt", "updateTime": "aliqua fugiat deserunt", "createBy": "mollit", "updateBy": "ad officia nisi sunt commodo" }, { "typeName": "do", "name": "irure", "type": 40085324.48885304, "kfName": "Duis sed", "kfAvatar": "sed Lorem velit", "kfUrl": "commodo ut dolor ipsum", "accessCnt": -89463968.4334356, "consultCnt": 63888465.387045145, "receptionCnt": -41534624.394609265, "createTime": "amet velit laboris fugiat", "updateTime": "in sit eiusmod", "createBy": "Ut dolor ea", "updateBy": "incididunt reprehenderit" }, { "typeName": "in sunt et dolore tempor", "name": "quis laboris", "type": -7995649.530553937, "kfName": "amet velit eu", "kfAvatar": "aute dolore anim amet", "kfUrl": "minim", "accessCnt": 99871395.3190921, "consultCnt": 73324612.44769356, "receptionCnt": 64278887.23853704, "createTime": "culpa dolor ut do", "updateTime": "in eu ex", "createBy": "magna tempor dolore dolore amet", "updateBy": "occaecat id Ut qui adipisicing" }]
},
searchFn () {
this.search.pageNum = 1
......@@ -260,7 +260,6 @@
},
handleSelectionChange (e) {
this.selectList = e
console.log(e)
},
addFn (data) {
this.form = {
......@@ -289,7 +288,6 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(ids)
return deleteScene(data ? ids : ids.join(','))
}).then(() => {
this.getData()
......@@ -299,20 +297,35 @@
} else {
this.$message.info('请选择操作项!')
}
},
copy(id) {
this.clipboard = new ClipboardJS('#btn' + id);
this.clipboard.on('success', (e) => {
this.$notify({
title: '成功',
message: '链接已复制到剪切板,可粘贴。',
type: 'success'
})
e.clearSelection()
this.clipboard.destroy()
})
this.clipboard.on('error', (e) => {
this.$message.error('链接复制失败')
})
}
},
mounted () {
var clipboard = new ClipboardJS('.copy_btn')
clipboard.on('success', (e) => {
this.$notify({
title: '成功',
message: '链接已复制到剪切板,可粘贴。',
type: 'success'
})
})
clipboard.on('error', (e) => {
this.$message.error('链接复制失败')
})
// var clipboard = new ClipboardJS('.copy_btn')
// clipboard.on('success', (e) => {
// this.$notify({
// title: '成功',
// message: '链接已复制到剪切板,可粘贴。',
// type: 'success'
// })
// })
// clipboard.on('error', (e) => {
// this.$message.error('链接复制失败')
// })
},
created () {
if (this.$route.query.openKfId) {
......
......@@ -150,7 +150,6 @@
})
})
.then((res) => {
console.log(res)
download(res.msg)
})
.catch((error) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!