This commit is contained in:
parent
364d174bd9
commit
d100f33096
23
yudao-admin-vue3/src/api/crm/intelligent.ts
Normal file
23
yudao-admin-vue3/src/api/crm/intelligent.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
// 跟进记录 API
|
||||||
|
export const FollowUpRecordApi = {
|
||||||
|
// 查询表单列表
|
||||||
|
selectDynamicData: async () => {
|
||||||
|
return await request.get({ url: `/intelligentForm/selectDynamicData`})
|
||||||
|
},
|
||||||
|
|
||||||
|
//添加智能表单
|
||||||
|
saveDynamicData: async (data) => {
|
||||||
|
return await request.post({ url: `/intelligentForm/saveDynamicData`, data })
|
||||||
|
},
|
||||||
|
|
||||||
|
//查询对应表单的采集数据列表
|
||||||
|
collectDataList: async(query) => {
|
||||||
|
return await request.get({
|
||||||
|
url: '/intelligentForm/collectDataList',
|
||||||
|
method: 'get',
|
||||||
|
params: {id:query}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
@ -1,299 +1,280 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container" style="display: flex;flex-wrap: wrap">
|
<div class="app-container" style="display: flex;flex-wrap: wrap">
|
||||||
|
|
||||||
<!-- <el-col :span="8" v-for="(o, index) in 1" :key="o" :offset="index > 0 ? 2 : 0">-->
|
<!-- <el-col :span="8" v-for="(o, index) in 1" :key="o" :offset="index > 0 ? 2 : 0">-->
|
||||||
|
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<el-button type="primary" plain @click="handleAdd" style="border: none;">
|
<el-button type="primary" plain @click="handleAdd" style="border: none;">
|
||||||
+ 新建表单
|
+ 新建表单
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="box-card" v-for="o in cardList" :key="o.id">
|
<el-card class="box-card" v-for="o in cardList" :key="o">
|
||||||
<template #header>
|
<div class="clearfix">
|
||||||
<div class="clearfix">
|
<span style="font-size: 23px;
|
||||||
<span
|
color: #000000;
|
||||||
style="font-size: 23px;
|
background-color:#ffffff;
|
||||||
color: #000000;
|
border-color: #fdfdff;">{{o.title}}</span>
|
||||||
background-color:#ffffff;
|
<el-button style="float: right; padding: 3px 0" type="text" @click="handelExtend(o.id)">推广</el-button>
|
||||||
border-color: #fdfdff;">{{ o.title }}</span>
|
</div>
|
||||||
<el-button style="float: right; padding: 3px 0" type="text" @click="handelExtend(o.id)">推广</el-button>
|
<div style="display: flex;justify-content: space-between">
|
||||||
</div>
|
<div style="width: 30%">
|
||||||
</template>
|
<div style="font-size: 18px; color: #999595;
|
||||||
<div style="display: flex;justify-content: space-between">
|
background-color:#ffffff;
|
||||||
<!-- <div style="width: 30%">-->
|
border-color: #fdfdff;">总浏览量</div>
|
||||||
<!-- <div>采购员</div>-->
|
<p style="font-size: 25px">{{o.pageView}}</p>
|
||||||
<!-- <p style="font-size: 25px">1</p>-->
|
</div>
|
||||||
<!-- </div>-->
|
<div style="width: 30%">
|
||||||
<div style="width: 30%">
|
<el-link style="font-size: 18px;
|
||||||
<div
|
color: #999595;
|
||||||
style="font-size: 18px;
|
background-color:#ffffff;
|
||||||
color: #999595;
|
border-color: #fdfdff;" @click="extendList(o.id)">采集数量</el-link>
|
||||||
background-color:#ffffff;
|
<p style="font-size: 25px" @click="extendList(o.id)">{{o.collectionQuantity}}</p>
|
||||||
border-color: #fdfdff;">总浏览量</div>
|
</div>
|
||||||
<p style="font-size: 25px">{{ o.pageView }}</p>
|
</div>
|
||||||
</div>
|
<div style="display: flex;justify-content: space-between">
|
||||||
<div style="width: 30%">
|
<div>
|
||||||
<el-link
|
<span style="font-size: 16px;
|
||||||
style="font-size: 18px;
|
color: #999595;
|
||||||
color: #999595;
|
background-color:#ffffff;
|
||||||
background-color:#ffffff;
|
border-color: #fdfdff;">创建人:{{o.createPeople}}</span>
|
||||||
border-color: #fdfdff;" @click="extendList(o.id)">采集数量</el-link>
|
</div>
|
||||||
<p style="font-size: 25px" @click="extendList(o.id)">{{ o.collectionQuantity }}</p>
|
<div style="font-size: 16px;
|
||||||
</div>
|
color: #999595;
|
||||||
</div>
|
background-color:#ffffff;
|
||||||
<div style="display: flex;justify-content: space-between">
|
border-color: #fdfdff;">创建时间:{{o.createTime}}</div>
|
||||||
<div>
|
</div>
|
||||||
<span
|
</el-card>
|
||||||
style="font-size: 16px;
|
|
||||||
color: #999595;
|
<!-- 添加表单对话框 -->
|
||||||
background-color:#ffffff;
|
<el-dialog :title="title" v-model="open" width="500">
|
||||||
border-color: #fdfdff;">创建人:{{ o.createPeople }}</span>
|
|
||||||
</div>
|
<div style="text-align: center">
|
||||||
<div
|
<!-- <el-form-item label="表单标题">-->
|
||||||
style="font-size: 16px;
|
<div><span>标题</span> <el-input style="border-bottom: 1px solid skyblue;margin-bottom: 10px"
|
||||||
color: #999595;
|
v-model="addParams.title" placeholder="请输入表单标题" />
|
||||||
background-color:#ffffff;
|
</div>
|
||||||
border-color: #fdfdff;">创建时间:{{ o.createTime }}</div>
|
<!-- </el-form-item>-->
|
||||||
</div>
|
<!-- <el-form-item label="字段名称">-->
|
||||||
</el-card>
|
<div v-for="(item,index) in inputarr" :key="index" style="margin-bottom: 10px;">
|
||||||
|
<span>字段</span>
|
||||||
|
<el-input style="border: 1px solid #DCDFE6;border-radius: 3px; "
|
||||||
<!-- </el-col>-->
|
v-model="inputarr[index]" placeholder="请输入字段" />
|
||||||
|
</div>
|
||||||
<!-- 添加表单对话框 -->
|
<div>
|
||||||
<el-dialog :title="title" v-model:visible="open" width="500px" append-to-body>
|
<el-button @click="adinput"
|
||||||
|
style="text-align: center;width: 90%;background-color: rgb(232,244,255);color:#1890ff">添加字段</el-button>
|
||||||
<div style="text-align: center">
|
</div>
|
||||||
<!-- <el-form-item label="表单标题">-->
|
|
||||||
<div><span>标题</span> <el-input
|
<!-- </el-form-item>-->
|
||||||
style="border-bottom: 1px solid skyblue;margin-bottom: 10px"
|
</div>
|
||||||
v-model="addParams.title" placeholder="请输入表单标题" />
|
|
||||||
</div>
|
<div class="el-input-foot">
|
||||||
<!-- </el-form-item>-->
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<!-- <el-form-item label="字段名称">-->
|
<el-button @click="cancel">取 消</el-button>
|
||||||
<div v-for="(item, index) in inputarr" :key="index" style="margin-bottom: 10px;">
|
</div>
|
||||||
<span>字段</span> <el-input
|
</el-dialog>
|
||||||
style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
|
|
||||||
placeholder="请输入字段" />
|
<!-- 推广链接对话框-->
|
||||||
</div>
|
<el-dialog :title="extendTitle" v-model="extendOpen" width="500px" append-to-body>
|
||||||
<div>
|
<el-input v-model="extendLink" placeholder="请输入内容" :disabled="true" />
|
||||||
<el-button
|
<el-button @click="copyAddress">复制</el-button>
|
||||||
@click="adinput"
|
</el-dialog>
|
||||||
style="text-align: center;width: 90%;background-color: rgb(232,244,255);color:#1890ff">添加字段</el-button>
|
|
||||||
</div>
|
<!-- 采集数据列表 -->
|
||||||
|
<el-dialog :title="collectTitle" v-model="collectOpen" append-to-body>
|
||||||
<!-- </el-form-item>-->
|
<el-table border v-loading="loading" :data="collectLink" @selection-change="handleSelectionChange">
|
||||||
</div>
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<br />
|
<div>
|
||||||
<div class="el-input-foot">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
</div>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<!-- <el-table-column label="编号" align="center" prop="id" />-->
|
||||||
</div>
|
<!-- <el-table-column label="id" align="center" prop="dynamicDataId" />-->
|
||||||
</el-dialog>
|
<!-- <el-table-column v-for="item in collectLink" :label="item.map" align="center" :prop="item" />-->
|
||||||
|
<template v-for="(item, index) in Object.keys(collectLink[0])" :key="index">
|
||||||
<!-- 推广链接对话框-->
|
<el-table-column :label="item">
|
||||||
<el-dialog :title="extendTitle" v-model:visible="extendOpen" width="500px" append-to-body>
|
<template #default="scope">
|
||||||
<el-input v-model="extendLink" placeholder="请输入内容" :disabled="true" />
|
<span>{{scope.row[item]}}</span>
|
||||||
<el-button @click="copyAddress">复制</el-button>
|
</template>
|
||||||
</el-dialog>
|
</el-table-column>
|
||||||
|
</template>
|
||||||
<!-- 采集数据列表 -->
|
</el-table>
|
||||||
<el-dialog :title="collectTitle" v-model:visible="collectOpen" append-to-body>
|
</el-dialog>
|
||||||
<el-table border v-loading="loading" :data="collectLink" @selection-change="handleSelectionChange">
|
</div>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- <el-table-column label="编号" align="center" prop="id" />-->
|
|
||||||
<!-- <el-table-column label="id" align="center" prop="dynamicDataId" />-->
|
|
||||||
<!-- <el-table-column v-for="item in collectLink" :label="item.map" align="center" :prop="item" />-->
|
|
||||||
<template>
|
|
||||||
<el-table>
|
|
||||||
<el-table-column v-for="(item, index) in Object.keys(collectLink[0])" :key="index" :label="item">
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ scope.row[item] }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</template>
|
|
||||||
</el-table>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as ArticleCategoryApi from "@/api/mall/promotion/intelligent";
|
import {FollowUpRecordApi} from "@/api/crm/intelligent.ts";
|
||||||
export default {
|
export default {
|
||||||
name: "Business",
|
name: "Business",
|
||||||
dicts: ['stage_type', 'sales_stage'],
|
dicts: ['stage_type', 'sales_stage'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: '',
|
id: '',
|
||||||
inputarr: [''],
|
inputarr: [''],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
//推广弹出框标题
|
//推广弹出框标题
|
||||||
extendTitle: "",
|
extendTitle: "",
|
||||||
//采集数据列表弹出标题
|
//采集数据列表弹出标题
|
||||||
collectTitle: "",
|
collectTitle: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 是否显示推广弹出层
|
// 是否显示推广弹出层
|
||||||
extendOpen: false,
|
extendOpen: false,
|
||||||
//是否显示采集数据列表弹出层
|
//是否显示采集数据列表弹出层
|
||||||
collectOpen: false,
|
collectOpen: false,
|
||||||
//推广链接数据
|
//推广链接数据
|
||||||
extendLink: '',
|
extendLink: '',
|
||||||
//采集数据列表数据
|
//采集数据列表数据
|
||||||
collectLink: [{}],
|
collectLink: [{}],
|
||||||
//下拉框客户列表
|
//下拉框客户列表
|
||||||
customerList: [],
|
customerList: [],
|
||||||
//卡片列表
|
//卡片列表
|
||||||
cardList: [],
|
cardList: [],
|
||||||
addParams: {
|
addParams: {
|
||||||
title: '',
|
title: '',
|
||||||
pageView: '',
|
pageView: '',
|
||||||
collectionQuantity: '',
|
collectionQuantity: '',
|
||||||
inputarr: []
|
inputarr: []
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getIntelligentList();
|
this.getIntelligentList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//添加表单
|
//添加表单
|
||||||
adinput() {
|
adinput() {
|
||||||
this.inputarr.push('')
|
this.inputarr.push('')
|
||||||
console.log(this.inputarr)
|
console.log(this.inputarr)
|
||||||
},
|
},
|
||||||
getIntelligentList() {
|
getIntelligentList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
ArticleCategoryApi.selectDynamicData().then(response => {
|
FollowUpRecordApi.selectDynamicData().then(response => {
|
||||||
this.cardList = response.data;
|
this.cardList = response.data;
|
||||||
// this.total = response.total;
|
// this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
},
|
},
|
||||||
//提交按钮
|
//提交按钮
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.addParams.inputarr = this.inputarr
|
console.log('ssssss')
|
||||||
this.addParams.pageView = '0'
|
this.addParams.inputarr = this.inputarr
|
||||||
this.addParams.collectionQuantity = '0'
|
this.addParams.pageView = '0'
|
||||||
ArticleCategoryApi.saveDynamicData(this.addParams).then(response => {
|
this.addParams.collectionQuantity = '0'
|
||||||
// this.cardList = response.data;
|
FollowUpRecordApi.saveDynamicData(this.addParams).then(response => {
|
||||||
// this.total = response.total;
|
// this.cardList = response.data;
|
||||||
this.loading = false;
|
// this.total = response.total;
|
||||||
this.open = false;
|
this.loading = false;
|
||||||
this.getIntelligentList();
|
this.open = false;
|
||||||
});
|
this.getIntelligentList();
|
||||||
},
|
});
|
||||||
/** 新增按钮操作 */
|
},
|
||||||
handleAdd() {
|
/** 新增按钮操作 */
|
||||||
this.inputarr = []
|
handleAdd() {
|
||||||
this.addParams = {
|
this.inputarr = []
|
||||||
title: '',
|
this.addParams = {
|
||||||
inputarr: []
|
title: '',
|
||||||
}
|
inputarr: []
|
||||||
this.open = true;
|
}
|
||||||
this.title = "添加表单";
|
this.open = true;
|
||||||
},
|
this.title = "添加表单";
|
||||||
//推广按钮操作
|
},
|
||||||
handelExtend(id) {
|
//推广按钮操作
|
||||||
this.extendLink = 'http://101.43.112.107/form/extendLink/form?id=' + id
|
handelExtend(id) {
|
||||||
this.extendOpen = true;
|
this.extendLink = 'http://101.43.112.107/form/extendLink/form?id=' + id
|
||||||
this.extendTitle = "推广链接";
|
this.extendOpen = true;
|
||||||
},
|
this.extendTitle = "推广链接";
|
||||||
//复制按钮操作
|
},
|
||||||
copyAddress() {
|
//复制按钮操作
|
||||||
const input = document.createElement('input');
|
copyAddress() {
|
||||||
input.value = this.extendLink;
|
const input = document.createElement('input');
|
||||||
document.body.appendChild(input);
|
input.value = this.extendLink;
|
||||||
input.select();
|
document.body.appendChild(input);
|
||||||
document.execCommand('copy');
|
input.select();
|
||||||
document.body.removeChild(input);
|
document.execCommand('copy');
|
||||||
alert('已复制到剪贴板');
|
document.body.removeChild(input);
|
||||||
},
|
alert('已复制到剪贴板');
|
||||||
//采集数据展示
|
},
|
||||||
extendList(id) {
|
//采集数据展示
|
||||||
this.collectLink = null;
|
extendList(id) {
|
||||||
this.id = id
|
this.collectLink = null;
|
||||||
this.collectOpen = true;
|
this.id = id
|
||||||
this.collectTitle = "采集数据";
|
this.collectOpen = true;
|
||||||
ArticleCategoryApi.collectDataList(this.id).then(response => {
|
this.collectTitle = "采集数据";
|
||||||
this.collectLink = response.data
|
collectDataList(this.id).then(response => {
|
||||||
});
|
this.collectLink = response.data
|
||||||
},
|
});
|
||||||
// 多选框选中数据
|
},
|
||||||
handleSelectionChange(selection) {
|
// 多选框选中数据
|
||||||
this.ids = selection.map(item => item.id)
|
handleSelectionChange(selection) {
|
||||||
this.single = selection.length !== 1
|
this.ids = selection.map(item => item.id)
|
||||||
this.multiple = !selection.length
|
this.single = selection.length !== 1
|
||||||
},
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
};
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.clearfix:before,
|
||||||
|
.clearfix:after {
|
||||||
|
display: table;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
.clearfix:before,
|
.clearfix:after {
|
||||||
.clearfix:after {
|
clear: both
|
||||||
display: table;
|
}
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
.clearfix:after {
|
.box-card {
|
||||||
clear: both
|
width: 32%;
|
||||||
}
|
margin-bottom: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.box-card {
|
.container {
|
||||||
width: 32%;
|
display: flex;
|
||||||
margin-bottom: 10px;
|
justify-content: center;
|
||||||
margin-right: 10px;
|
align-items: center;
|
||||||
}
|
height: 100px;
|
||||||
|
/* 可根据需要调整高度 */
|
||||||
|
color: #ccc;
|
||||||
|
/* 灰白色 */
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.el-input-foot {
|
||||||
display: flex;
|
padding: 20px;
|
||||||
justify-content: center;
|
padding-top: 10px;
|
||||||
align-items: center;
|
text-align: center;
|
||||||
height: 100px;
|
box-sizing: border-box;
|
||||||
/* 可根据需要调整高度 */
|
}
|
||||||
color: #ccc;
|
|
||||||
/* 灰白色 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-input-foot {
|
::v-deep.el-input--medium {
|
||||||
padding: 20px;
|
width: 80%;
|
||||||
padding-top: 10px;
|
}
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep.el-input--medium {
|
::v-deep.el-input--medium .el-input__inner {
|
||||||
width: 80%;
|
border: none;
|
||||||
}
|
/* border-bottom:1px solid blue; */
|
||||||
|
}
|
||||||
::v-deep.el-input--medium .el-input__inner {
|
</style>
|
||||||
border: none;
|
|
||||||
/* border-bottom:1px solid blue; */
|
|
||||||
}
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue
Block a user