Commit 35b0a0f6 by 杨明

fixed

1 parent 5da869fd
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-06-07 15:47:23
* @LastEditTime: 2023-06-13 13:57:26
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......@@ -17,8 +17,8 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-02 14:10:14
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-06-09 14:03:45
* @LastEditTime: 2023-06-13 14:55:28
* @FilePath: \scrm-micro-home\src\views\home\ai\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -47,9 +47,9 @@
</template>
<script>
const ANSWER = [
{ label: '全部', value: null },
{ label: '已接通', value: 'success' },
{ label: '空号', value: 'notexist' },
{ labe: '关机', value: 'poweroff' },
{ label: '关机', value: 'poweroff' },
{ label: '停机', value: 'stopped' },
{ label: '无法接通', value: 'cantbeconnected' },
{ label: '用户忙', value: 'linebusy' },
......@@ -128,7 +128,6 @@ export default {
notConnectCount: 0
}
],
ANSWER,
getListApi: this.$apis.aiCall.conditionPage,
tableParams: {
tableOption: false,
......@@ -146,7 +145,7 @@ export default {
{
label: '是否接听',
prop: 'answer',
minWidth: 140
minWidth: 160
},
{
label: '呼叫时间',
......@@ -246,23 +245,23 @@ export default {
optionList: ANSWER,
optionId: 'value',
optionLabel: 'label',
changeAttr: (value, item) => {
if (value[0]) {
item.optionList[0].isDisabled = true
}
if (value[0] === null) {
item.optionList.forEach(o => {
if (o.value) {
o.isDisabled = true
}
})
}
if (value[0] === undefined) {
item.optionList.forEach(o => {
o.isDisabled = false
})
}
},
// changeAttr: (value, item) => {
// if (value[0]) {
// item.optionList[0].isDisabled = true
// }
// if (value[0] === null) {
// item.optionList.forEach(o => {
// if (o.value) {
// o.isDisabled = true
// }
// })
// }
// if (value[0] === undefined) {
// item.optionList.forEach(o => {
// o.isDisabled = false
// })
// }
// },
multiple: true
},
{
......
......@@ -29,7 +29,7 @@
</div>
<div class="help-tabel">
<GLTable @setTableFinishFun="setTableFinishFun" :noDataImg="url" ref="taskForm" :searchForm="searchForm" :getListApi="getListApi" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable v-show="taskNum != 0" @setTableFinishFun="setTableFinishFun" :noDataImg="url" ref="taskForm" :searchForm="searchForm" :getListApi="getListApi" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDel(scope.scope)" v-if="scope.scope.taskStatus == 1">删除</el-button>
<el-button type="text" @click="goDetail(scope.scope)">详情</el-button>
......@@ -44,7 +44,7 @@
<div class="null-image"><img src="@/assets/img/empty.png" /></div>
<div class="null-desc">
暂无数据,
<label @click="handleAdd">添加数据</label>
<label @click="handleAdd()">添加数据</label>
</div>
</div>
</div>
......@@ -278,6 +278,28 @@ export default {
}
}
}
.tabel-null {
min-height: calc(100vh - 390px);
display: flex;
justify-content: center;
align-items: center;
&-panel {
.null-image {
margin: 5px auto;
width: 64px;
}
.null-desc {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 22px;
label {
color: #5850ff;
cursor: pointer;
}
}
}
}
.task_icon {
position: relative;
&::after {
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-07 14:22:41
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-06-09 15:40:24
* @LastEditTime: 2023-06-13 15:07:52
* @FilePath: \scrm-micro-home\src\views\home\components\ai\addTask.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -30,14 +30,14 @@
</div>
<a :href="modelUrl">下载模板</a>
</div>
<div class="file-tips" v-if="!addForm.fileName && !importVisible">
<div class="file-tips" v-if="!addForm.fileName && !ImportResult.error">
支持扩展名:xls,xlsx
</div>
<div class="file-tips" v-if="addForm.fileName">
<i class="el-icon-success"></i>
文件已上传({{ addForm.fileName }})
</div>
<div class="file-tips" v-if="importVisible">
<div class="file-tips" v-if="ImportResult.error">
<i class="el-icon-error"></i>
检测到导入的号码格式错误,请修改后重新上传
</div>
......@@ -56,11 +56,38 @@
</div>
</el-form-item>
</el-form>
<GLDialog :appendToBody="true" title="导入数据失败" :hasFooter="true" mode="small" :visible.sync="importVisible">
<div class="dialog-body-panel">
<div class="import-result">
<label>{{ ImportResult.error }}</label>
条数据异常
</div>
<div class="import-tips">数据异常的可能原因:</div>
<div class="import-reason">
<div class="import-reason-content">1、存在不正确的手机号格式数据</div>
<div class="import-reason-content">2、存在重复的手机号数据</div>
<div class="import-reason-content">3、文件数据超出1000条限制</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="importVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="handleImport">导出错误数据</el-button>
</span>
</GLDialog>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import tabel from '@/mixins/tabel'
import util from '@/utils/util'
const validateTime = (rule, value, callback) => {
const o = +value.match(/\s(\d+):/)[1]
if (o < 9 || o > 20) {
callback(new Error('请选择9:00-20:00时间段'))
}else {
callback()
}
}
export default {
mixins: [tabel],
props: {
......@@ -80,6 +107,7 @@ export default {
},
aiOptions: [],
importVisible: false,
ImportResult: {},
modelUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/AI续保提醒 - 模板.xlsx',
url: '',
excelUrl: '',
......@@ -93,7 +121,10 @@ export default {
addRules: {
robotId: [{ required: true, message: '请选择AI', trigger: 'change' }],
merchantNameParam: [{ required: true, message: '请输入门店名称', trigger: 'blur' }],
aiStartTime: [{ required: true, message: '请选择外呼启动时间', trigger: 'change' }]
aiStartTime: [
{ required: true, message: '请选择外呼启动时间', trigger: 'change' },
{ validator: validateTime, trigger: 'change' }
]
}
}
},
......@@ -105,6 +136,9 @@ export default {
}
},
methods: {
handleImport() {
util.openUrl(this.ImportResult.errUrl.replace(/https?:/, ''))
},
//获取详情
conditionPage(id) {
this.$apis.aiCall.contentEcho({ id }).then(res => {
......@@ -186,6 +220,36 @@ export default {
}
</script>
<style lang="scss" scoped>
.dialog-body-panel {
.import-result {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
label {
color: #eb4e4e;
}
}
.import-tips {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
margin: 6px 0px;
}
.import-reason {
height: 92px;
background: #f5f5f5;
padding: 16px;
box-sizing: border-box;
&-content {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
.word-content {
width: 402px;
min-height: 80px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!