Commit 21c5ed70 by 张立顺

请求提示

1 parent 94b35711
......@@ -4,7 +4,8 @@
<!-- <p class="pageTitle">客户管理</p> -->
<!-- :style="{ 'min-height': heightBox + 'px' }" -->
<div class="pageContent">
<GLCombiForm ref="combiForm" :formObj="searchForm" :formData="clientManageFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLCombiForm ref="combiForm" :formObj="searchForm" :formData="clientManageFormList" @handleOk="searchTable"
@handleRest="resetTable"></GLCombiForm>
<div class="leadList">
<div>
<span></span>
......@@ -12,13 +13,17 @@
<!-- <GLButton size="small" @click="handleExport" fn="导出">导出</GLButton> -->
<el-button @click="handleDrawer">gpt</el-button>
</div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams">
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true"
:getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url"
:pageConf="pageConf" :tableParams="tableParams">
<span slot="customerName" slot-scope="scope">
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName ? scope.scope.customerName : '--' }}</GLFull>
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName ?
scope.scope.customerName : '--' }}</GLFull>
</span>
<!-- <span slot="customerSex" slot-scope="scope" >-->
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex ==
2 ? '女' : '' }}</span>
</span>
<!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg">
......@@ -26,13 +31,18 @@
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
<div v-if="idx == 0">
<span>{{ list.nickName }}</span>
<span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span>
<span class="smallFontSize"
:class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{
list.corpName }}</span>
</div>
<span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" :key="index" style="padding-bottom: 3px !important">
<span>{{ i.nickName }}</span>
<span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400; margin-left: 2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
<span
style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400; margin-left: 2px"
:class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName
}}</span>
</div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover>
......@@ -44,7 +54,8 @@
</span>
<span slot="addWay" slot-scope="scope">
<el-tooltip effect="dark" :content="toLabel(scope.scope.addWay)" placement="top">
<span style="display: inline-block; max-width: 120px; text-align: left">{{ toLabel(scope.scope.addWay) }}</span>
<span style="display: inline-block; max-width: 120px; text-align: left">{{ toLabel(scope.scope.addWay)
}}</span>
</el-tooltip>
</span>
<!-- subscribe -->
......@@ -60,7 +71,8 @@
</span>
<span slot="status" slot-scope="scope">
<span class="statusText">
<span :class="{ circleStatusGray: scope.scope.status === -1, circleStatusGreen: scope.scope.status == 0 }"></span>
<span
:class="{ circleStatusGray: scope.scope.status === -1, circleStatusGreen: scope.scope.status == 0 }"></span>
<span>{{ statusText(scope.scope.status) }}</span>
</span>
</span>
......@@ -74,15 +86,25 @@
<el-form ref="orderform" :model="orderform" class="order-form">
<div class="order">
<el-form-item label="输入内容">
<el-input type="textarea" v-model="orderform.order" rows="3" :clearable="true" :placeholder="`例如:${placeholder}`"></el-input>
<el-input type="textarea" v-model="orderform.order" rows="3" :clearable="true"
:placeholder="`例如:${placeholder}`"></el-input>
</el-form-item>
<el-form-item>
<el-button size="small" @click="handleResetOrder">重置</el-button>
<el-button type="primary" size="small" @click="handleOrder" :disabled="disabled">{{ disabled ? '解析中...' : '确定' }}</el-button>
<el-button type="primary" size="small" @click="handleOrder" :disabled="disabled">{{ disabled ? '解析中...' :
'确定' }}</el-button>
</el-form-item>
</div>
<div class="result">
<el-form-item label="解析结果">
<template slot="label">
<span v-if="gptRequest">
<!-- <span v-if="chatLoading"> -->
正在处理
<i class="el-icon-loading"></i>
</span>
<span v-else>解析结果</span>
</template>
<el-input type="textarea" v-model="orderform.result" rows="3"></el-input>
</el-form-item>
</div>
......@@ -99,6 +121,7 @@ export default {
name: 'clientManage',
data() {
return {
// chatLoading: true,
isReload: true,
url: url,
sloading: false,
......@@ -469,7 +492,8 @@ export default {
this.$refs.clientManage.setTableHeightFun()
},
setTableFinishFun() {
this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun()
// this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun()
console.log('setTableFinishFun')
this.getGptList()
},
getParams() {
......@@ -621,6 +645,7 @@ export default {
async handleOrder() {
this.disabled = true
this.gptRequest = true
//await this.handleResetOrder()
// const tagsAll = this.tableParams.reduce((tags, next) => {
// tags += next.labelUnitList.map(({ labelName }) => labelName).join(',')
......@@ -674,7 +699,7 @@ export default {
console.log(this.searchForm)
// 设置 searchForm
this.searchTable()
// this.gptRequest = false
// list
} else {
this.$message.error(message)
......@@ -693,25 +718,49 @@ export default {
return false
}
this.$refs.orderform.resetFields()
this.gptRequest = false
console.log('getGptList')
this.drawer = false
let list = this.$refs.clientManage.data
list.map(k => {
console.log(list)
list = list.map(element => {
element.test = '正在生成中...'
return element
})
for (let index = 0; index < list.length; index++) {
let k = list[index]
const content = `忽略之前的上下文,对姓名为${k.customerName}客户,${k.customerName}是一个人,性别为${{ '1': '男', '2': '女' }[k.customerSex] || '先生/女士'},客户手机号为${k.customerPhone},${k.customerPhone}是客户的电话不是客服电话;生成一条最少100字的4s店新车营销文案,字段命名为content。只需content一个字段即可;输出json格式`
// console.log(content, 'content')
this.$apis.crowdManage.gpt(content).then(result => {
console.log(result)
// console.log(result)
let _obj = result.data
k.test = _obj.content
this.$refs.clientManage.data[index].test = _obj.content
// this.$refs.clientManage.data = this.$refs.clientManage.data
this.$forceUpdate()
})
return k
})
}
// list.map(k => {
// const content = `忽略之前的上下文,对姓名为${k.customerName}客户,${k.customerName}是一个人,性别为${{ '1': '男', '2': '女' }[k.customerSex] || '先生/女士'},客户手机号为${k.customerPhone},${k.customerPhone}是客户的电话不是客服电话;生成一条最少100字的4s店新车营销文案,字段命名为content。只需content一个字段即可;输出json格式`
// this.$apis.crowdManage.gpt(content).then(result => {
// console.log(result)
// let _obj = result.data
// console.log(_obj.content, '_obj.content')
// k.test = _obj.content
// })
// return k
// })
}
},
mounted() {}
mounted() { }
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
// /deep/.el-table .el-table__header tr th{
// line-height: 30px;
// }
......@@ -722,8 +771,10 @@ export default {
}
}
}
.expandImg {
display: flex;
// justify-content: center;
.smallFontSize {
margin-left: 2px;
......@@ -733,18 +784,22 @@ export default {
line-height: 20px;
font-weight: 400;
}
.imgEll {
margin-left: 6.5px;
cursor: pointer;
// margin-bottom:3px;
}
}
.pure-green-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
.scrm-sub-client-container {
.pageTitle {
margin-bottom: 20px;
......@@ -756,33 +811,42 @@ export default {
line-height: 20px;
letter-spacing: 1px;
}
.pageContent {
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
padding: 20px 20px 30px;
background-color: #fff;
.el-button + .el-button {
.el-button+.el-button {
margin-left: 10px;
}
.searchTop {
// margin-bottom: 20px;
}
.glsx-table {
// /deep/ .el-table__fixed {
// height: 100% !important; //设置高优先,以覆盖内联样式
// }
......@@ -794,11 +858,13 @@ export default {
.entmicro {
display: flex;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
// }
}
......@@ -813,13 +879,14 @@ export default {
.gpt_box {
display: flex;
.left {
flex: 1;
}
.right {
flex-shrink: 0;
width: 400px;
margin-left: 40px;
}
}
</style>
}</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!