Commit 21c5ed70 by 张立顺

请求提示

1 parent 94b35711
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<!-- <p class="pageTitle">客户管理</p> --> <!-- <p class="pageTitle">客户管理</p> -->
<!-- :style="{ 'min-height': heightBox + 'px' }" --> <!-- :style="{ 'min-height': heightBox + 'px' }" -->
<div class="pageContent"> <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 class="leadList">
<div> <div>
<span></span> <span></span>
...@@ -12,13 +13,17 @@ ...@@ -12,13 +13,17 @@
<!-- <GLButton size="small" @click="handleExport" fn="导出">导出</GLButton> --> <!-- <GLButton size="small" @click="handleExport" fn="导出">导出</GLButton> -->
<el-button @click="handleDrawer">gpt</el-button> <el-button @click="handleDrawer">gpt</el-button>
</div> </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"> <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>
<!-- <span slot="customerSex" slot-scope="scope" >--> <!-- <span slot="customerSex" slot-scope="scope" >-->
<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> </span>
<!-- 企微名称 --> <!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg"> <div slot="nickNameList" slot-scope="scope" class="expandImg">
...@@ -26,13 +31,18 @@ ...@@ -26,13 +31,18 @@
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx"> <div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
<div v-if="idx == 0"> <div v-if="idx == 0">
<span>{{ list.nickName }}</span> <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> </div>
<span v-if="idx == 1"> <span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" :key="index" style="padding-bottom: 3px !important"> <div v-for="(i, index) in scope.scope.nickNameList" :key="index" style="padding-bottom: 3px !important">
<span>{{ i.nickName }}</span> <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> </div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" /> <img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover> </el-popover>
...@@ -44,7 +54,8 @@ ...@@ -44,7 +54,8 @@
</span> </span>
<span slot="addWay" slot-scope="scope"> <span slot="addWay" slot-scope="scope">
<el-tooltip effect="dark" :content="toLabel(scope.scope.addWay)" placement="top"> <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> </el-tooltip>
</span> </span>
<!-- subscribe --> <!-- subscribe -->
...@@ -60,7 +71,8 @@ ...@@ -60,7 +71,8 @@
</span> </span>
<span slot="status" slot-scope="scope"> <span slot="status" slot-scope="scope">
<span class="statusText"> <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>{{ statusText(scope.scope.status) }}</span>
</span> </span>
</span> </span>
...@@ -74,15 +86,25 @@ ...@@ -74,15 +86,25 @@
<el-form ref="orderform" :model="orderform" class="order-form"> <el-form ref="orderform" :model="orderform" class="order-form">
<div class="order"> <div class="order">
<el-form-item label="输入内容"> <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-form-item> <el-form-item>
<el-button size="small" @click="handleResetOrder">重置</el-button> <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> </el-form-item>
</div> </div>
<div class="result"> <div class="result">
<el-form-item label="解析结果"> <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-input type="textarea" v-model="orderform.result" rows="3"></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -99,6 +121,7 @@ export default { ...@@ -99,6 +121,7 @@ export default {
name: 'clientManage', name: 'clientManage',
data() { data() {
return { return {
// chatLoading: true,
isReload: true, isReload: true,
url: url, url: url,
sloading: false, sloading: false,
...@@ -469,7 +492,8 @@ export default { ...@@ -469,7 +492,8 @@ export default {
this.$refs.clientManage.setTableHeightFun() this.$refs.clientManage.setTableHeightFun()
}, },
setTableFinishFun() { 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() this.getGptList()
}, },
getParams() { getParams() {
...@@ -621,6 +645,7 @@ export default { ...@@ -621,6 +645,7 @@ export default {
async handleOrder() { async handleOrder() {
this.disabled = true this.disabled = true
this.gptRequest = true this.gptRequest = true
//await this.handleResetOrder() //await this.handleResetOrder()
// const tagsAll = this.tableParams.reduce((tags, next) => { // const tagsAll = this.tableParams.reduce((tags, next) => {
// tags += next.labelUnitList.map(({ labelName }) => labelName).join(',') // tags += next.labelUnitList.map(({ labelName }) => labelName).join(',')
...@@ -674,7 +699,7 @@ export default { ...@@ -674,7 +699,7 @@ export default {
console.log(this.searchForm) console.log(this.searchForm)
// 设置 searchForm // 设置 searchForm
this.searchTable() this.searchTable()
// this.gptRequest = false
// list // list
} else { } else {
this.$message.error(message) this.$message.error(message)
...@@ -693,25 +718,49 @@ export default { ...@@ -693,25 +718,49 @@ export default {
return false return false
} }
this.$refs.orderform.resetFields()
this.gptRequest = false
console.log('getGptList')
this.drawer = false
let list = this.$refs.clientManage.data 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格式` 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 => { this.$apis.crowdManage.gpt(content).then(result => {
console.log(result) // console.log(result)
let _obj = result.data let _obj = result.data
k.test = _obj.content this.$refs.clientManage.data[index].test = _obj.content
}) // this.$refs.clientManage.data = this.$refs.clientManage.data
return k this.$forceUpdate()
}) })
} }
},
mounted() {} // 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() { }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/styles/variables.scss'; @import '@/styles/variables.scss';
@import '@/styles/resetelement.scss'; @import '@/styles/resetelement.scss';
// /deep/.el-table .el-table__header tr th{ // /deep/.el-table .el-table__header tr th{
// line-height: 30px; // line-height: 30px;
// } // }
...@@ -722,8 +771,10 @@ export default { ...@@ -722,8 +771,10 @@ export default {
} }
} }
} }
.expandImg { .expandImg {
display: flex; display: flex;
// justify-content: center; // justify-content: center;
.smallFontSize { .smallFontSize {
margin-left: 2px; margin-left: 2px;
...@@ -733,18 +784,22 @@ export default { ...@@ -733,18 +784,22 @@ export default {
line-height: 20px; line-height: 20px;
font-weight: 400; font-weight: 400;
} }
.imgEll { .imgEll {
margin-left: 6.5px; margin-left: 6.5px;
cursor: pointer; cursor: pointer;
// margin-bottom:3px; // margin-bottom:3px;
} }
} }
.pure-green-text { .pure-green-text {
color: #61cc43; color: #61cc43;
} }
.pure-yello-text { .pure-yello-text {
color: #fb8f28; color: #fb8f28;
} }
.scrm-sub-client-container { .scrm-sub-client-container {
.pageTitle { .pageTitle {
margin-bottom: 20px; margin-bottom: 20px;
...@@ -756,33 +811,42 @@ export default { ...@@ -756,33 +811,42 @@ export default {
line-height: 20px; line-height: 20px;
letter-spacing: 1px; letter-spacing: 1px;
} }
.pageContent { .pageContent {
.leadList { .leadList {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 8px; margin-bottom: 8px;
div { div {
text-align: center; text-align: center;
span:nth-child(1) { span:nth-child(1) {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
} }
} }
/deep/ .el-button { /deep/ .el-button {
color: #5850ff; color: #5850ff;
border: 1px solid #5850ff; border: 1px solid #5850ff;
} }
} }
padding: 20px 20px 30px; padding: 20px 20px 30px;
background-color: #fff; background-color: #fff;
.el-button + .el-button {
.el-button+.el-button {
margin-left: 10px; margin-left: 10px;
} }
.searchTop { .searchTop {
// margin-bottom: 20px; // margin-bottom: 20px;
} }
.glsx-table { .glsx-table {
// /deep/ .el-table__fixed { // /deep/ .el-table__fixed {
// height: 100% !important; //设置高优先,以覆盖内联样式 // height: 100% !important; //设置高优先,以覆盖内联样式
// } // }
...@@ -794,11 +858,13 @@ export default { ...@@ -794,11 +858,13 @@ export default {
.entmicro { .entmicro {
display: flex; display: flex;
i { i {
color: #75acff; color: #75acff;
margin-right: 3px; margin-right: 3px;
font-size: 14px; font-size: 14px;
} }
// } // }
} }
...@@ -813,13 +879,14 @@ export default { ...@@ -813,13 +879,14 @@ export default {
.gpt_box { .gpt_box {
display: flex; display: flex;
.left { .left {
flex: 1; flex: 1;
} }
.right { .right {
flex-shrink: 0; flex-shrink: 0;
width: 400px; width: 400px;
margin-left: 40px; 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!