Commit c25fab77 by 前端

demo

1 parent fec3e28e
...@@ -4,7 +4,29 @@ ...@@ -4,7 +4,29 @@
<!-- <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> <div class="gpt_box">
<div class="left">
<GLCombiForm ref="combiForm" :formObj="searchForm" :formData="clientManageFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
</div>
<div class="right">
<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-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-form-item>
</div>
<div class="result">
<el-form-item label="解析结果">
<el-input type="textarea" v-model="orderform.result" rows="3"></el-input>
</el-form-item>
</div>
</el-form>
</div>
</div>
<div class="leadList"> <div class="leadList">
<div> <div>
<span></span> <span></span>
...@@ -12,11 +34,11 @@ ...@@ -12,11 +34,11 @@
<GLButton size="small" @click="handleExport" fn="导出">导出</GLButton> <GLButton size="small" @click="handleExport" fn="导出">导出</GLButton>
</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>
<!-- 企微名称 --> <!-- 企微名称 -->
...@@ -250,12 +272,12 @@ export default { ...@@ -250,12 +272,12 @@ export default {
width: 170, width: 170,
line: 1 line: 1
}, },
{ // {
label: '企微名称', // label: '企微名称',
prop: 'nickNameList', // prop: 'nickNameList',
addHtml: 'nickNameList', // addHtml: 'nickNameList',
width: 190 // width: 190
}, // },
{ {
label: '联系电话', label: '联系电话',
prop: 'customerPhone', prop: 'customerPhone',
...@@ -265,58 +287,57 @@ export default { ...@@ -265,58 +287,57 @@ export default {
{ {
label: '性别', label: '性别',
prop: 'customerSex', prop: 'customerSex',
addHtml: 'customerSex' addHtml: 'customerSex',
}, width: 120
{
label: '跟进员工',
prop: 'followStaff',
// addHtml: 'followStaff',
width: 320
}, },
// {
// label: '跟进员工',
// prop: 'followStaff',
// // addHtml: 'followStaff',
// width: 320
// },
{ {
label: '是否加企微', //1. 加入,0.未加入 label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoin', prop: 'isJoin',
addHtml: 'isJoin', addHtml: 'isJoin',
width: 120 width: 120
}, },
{ // {
label: '当前状态', // label: '当前状态',
prop: 'status', // prop: 'status',
addHtml: 'status', // addHtml: 'status',
width: 120 // width: 120
}, // },
{ // {
label: '所属渠道', // label: '所属渠道',
prop: 'sourceChannel', // prop: 'sourceChannel',
width: 140, // width: 140,
line: 1 // line: 1
}, // },
{ // {
label: '添加来源', // label: '添加来源',
prop: 'addWayName', // prop: 'addWayName',
width: 120 // width: 120
}, // },
{ // {
label: '添加时间', // label: '添加时间',
prop: 'addTime', // prop: 'addTime',
width: 170 // width: 170
}, // },
{ // {
label: '车系', // label: '车系',
prop: 'audi', // prop: 'audi',
width: 250, // width: 250,
line: 1 // line: 1
}, // },
{ {
label: '车架号', label: '车架号',
prop: 'carVin', prop: 'carVin',
width: 270,
line: 1 line: 1
}, },
{ {
label: '车牌号', label: '车牌号',
prop: 'carNumber', prop: 'carNumber',
width: 140,
line: 1 line: 1
}, },
{ {
...@@ -340,7 +361,10 @@ export default { ...@@ -340,7 +361,10 @@ export default {
followstaffList: [], followstaffList: [],
queryFlag: 0, queryFlag: 0,
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
flushTime: false flushTime: false,
orderform: {},
disabled:false,
placeholder: '帮我创建一个人群名为BBA群,描述为名车车主群。有保养记录没有试驾记录,近两年购车的奥迪奔驰和宝马的男性车主。',
} }
}, },
created() { created() {
...@@ -463,7 +487,7 @@ export default { ...@@ -463,7 +487,7 @@ export default {
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(async (resolve) => { return new Promise(async resolve => {
if (Object.keys(this.$route.query).length && this.queryFlag == 0) { if (Object.keys(this.$route.query).length && this.queryFlag == 0) {
const res = JSON.parse(window.localStorage.getItem('sourceList')) const res = JSON.parse(window.localStorage.getItem('sourceList'))
let add_way = this.$route.query.addWay || '' let add_way = this.$route.query.addWay || ''
...@@ -585,6 +609,79 @@ export default { ...@@ -585,6 +609,79 @@ export default {
id: id id: id
} }
}) })
},
async handleOrder() {
this.disabled = true
//await this.handleResetOrder()
// const tagsAll = this.tableParams.reduce((tags, next) => {
// tags += next.labelUnitList.map(({ labelName }) => labelName).join(',')
// return tags + ','
// }, '')
// 取值范围是:"${tagsAll}"输出json格式`
// 帮我创建一个人群名为测试群,描述为test,未加企微的客户。
// 帮我创建一个人群名为名车群,描述为名车车主群。去年和今年3月到4月间购车的奥迪和宝马车主。
// 帮我创建一个人群名为名车群,描述为名车车主群。去年和今年3月到4月间购车的奥迪和宝马有试驾的车主。
// 帮我创建一个人群名为名车群,描述为名车车主群。近两年购车的奥迪和宝马的30岁以下的有保养记录和试驾记录的男性车主。
//,取值范围:"'2020年','2021年','2022年','2023年','2000年','2001年','2002年','2003年'";
//,取值范围:"'1月','2月','3月','4月','5月','6月','7月','8月',9月,10月,11月,12月";
//,取值范围为:"'有','无'"
//取值范围为:"'30岁以下','31-40岁','41-55岁'",
// 提取出购车月份,命名为buyMonth,例如5月,用数组输出;
// tags包括上面的购车年份,命名为buyYear,购车月份,命名为buyMonth,车型,命名为brand,是否保养,命名为maintain
if (this.orderform.order == '') {
this.orderform.order = this.placeholder
}
const order = this.orderform.order
// const content = '帮我查询从2023-3-29日至2023-04-05日期间西安飞广州或者深圳的机票,从上面一句话中提取出发日期,命名为date,出发地,命名为start,目的地,命名为end,输出json格式。'
const content = `${order},忽略之前的上下文,今年是2023年,针对上面这段文字,
提取出联系电话,命名为phone;
提取出车牌号,命名为cas;
提取出客户名称,命名为customerName;
提取车架号,命名为vin;
提取性别,命名为sex,取值范围:0,1,男代表0,女代表1;
提取是否有保养记录,命名为maintain,取值范围为:"'有记录','无记录'",用数组输出;
提取出年龄,命名为age,取值范围为:"'30岁以下','31-40岁','41-55岁'",用数组输出;
提取出试驾记录,命名为drive,取值范围为:"'有','无'"用数组输出;
所有提取字段取值精确匹配。
所有提取的字段未精确匹配到的不提取和输出。
输出json格式`
console.log(this.$apis.crowdManage)
const result = await this.$apis.crowdManage.gpt(content)
this.orderform.result = JSON.stringify(result)
const { code, success, message, data } = result
if (code == '000000' && success) {
let arr = []
for (let k in data) {
let m = data[k]
if (m && m != null) {
if (Array.isArray(m)) {
arr = arr.concat(m)
} else {
arr.push(m)
}
}
}
//searchForm
this.searchForm = {...data};
// 设置 searchForm
this.searchTable()
// list
} else {
this.disabled = false
this.$message.error(message)
}
},
async handleResetOrder() {
this.orderform.result = ''
await this.resetTable()
} }
}, },
mounted() {} mounted() {}
...@@ -685,4 +782,16 @@ export default { ...@@ -685,4 +782,16 @@ export default {
} }
} }
} }
.gpt_box {
display: flex;
.left {
flex: 1;
}
.right {
flex-shrink: 0;
width: 400px;
margin-left: 40px;
}
}
</style> </style>
...@@ -19,6 +19,7 @@ const cdn = { ...@@ -19,6 +19,7 @@ const cdn = {
] ]
} }
module.exports = { module.exports = {
lintOnSave:false,
outputDir: `dist`, outputDir: `dist`,
publicPath, //node_env ? baseUrl : '/' publicPath, //node_env ? baseUrl : '/'
assetsDir: 'static', assetsDir: 'static',
......
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!