1
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
77 2024-09-06 18:04:53 +08:00
parent 364d174bd9
commit d100f33096
2 changed files with 288 additions and 284 deletions

View 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}
})
}
}

View File

@ -12,83 +12,66 @@
</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 <span style="font-size: 23px;
style="font-size: 23px; color: #000000;
color: #000000; background-color:#ffffff;
background-color:#ffffff; border-color: #fdfdff;">{{o.title}}</span>
border-color: #fdfdff;">{{ o.title }}</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="handelExtend(o.id)">推广</el-button> <el-button style="float: right; padding: 3px 0" type="text" @click="handelExtend(o.id)">推广</el-button>
</div> </div>
</template>
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
<!-- <div style="width: 30%">-->
<!-- <div>采购员</div>-->
<!-- <p style="font-size: 25px">1</p>-->
<!-- </div>-->
<div style="width: 30%"> <div style="width: 30%">
<div <div style="font-size: 18px; color: #999595;
style="font-size: 18px;
color: #999595;
background-color:#ffffff; background-color:#ffffff;
border-color: #fdfdff;">总浏览量</div> border-color: #fdfdff;">总浏览量</div>
<p style="font-size: 25px">{{ o.pageView }}</p> <p style="font-size: 25px">{{o.pageView}}</p>
</div> </div>
<div style="width: 30%"> <div style="width: 30%">
<el-link <el-link style="font-size: 18px;
style="font-size: 18px;
color: #999595; color: #999595;
background-color:#ffffff; background-color:#ffffff;
border-color: #fdfdff;" @click="extendList(o.id)">采集数量</el-link> border-color: #fdfdff;" @click="extendList(o.id)">采集数量</el-link>
<p style="font-size: 25px" @click="extendList(o.id)">{{ o.collectionQuantity }}</p> <p style="font-size: 25px" @click="extendList(o.id)">{{o.collectionQuantity}}</p>
</div> </div>
</div> </div>
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
<div> <div>
<span <span style="font-size: 16px;
style="font-size: 16px;
color: #999595; color: #999595;
background-color:#ffffff; background-color:#ffffff;
border-color: #fdfdff;">创建人{{ o.createPeople }}</span> border-color: #fdfdff;">创建人{{o.createPeople}}</span>
</div> </div>
<div <div style="font-size: 16px;
style="font-size: 16px;
color: #999595; color: #999595;
background-color:#ffffff; background-color:#ffffff;
border-color: #fdfdff;">创建时间{{ o.createTime }}</div> border-color: #fdfdff;">创建时间{{o.createTime}}</div>
</div> </div>
</el-card> </el-card>
<!-- </el-col>-->
<!-- 添加表单对话框 --> <!-- 添加表单对话框 -->
<el-dialog :title="title" v-model:visible="open" width="500px" append-to-body> <el-dialog :title="title" v-model="open" width="500">
<div style="text-align: center"> <div style="text-align: center">
<!-- <el-form-item label="表单标题">--> <!-- <el-form-item label="表单标题">-->
<div><span>标题</span> <el-input <div><span>标题</span> <el-input style="border-bottom: 1px solid skyblue;margin-bottom: 10px"
style="border-bottom: 1px solid skyblue;margin-bottom: 10px"
v-model="addParams.title" placeholder="请输入表单标题" /> v-model="addParams.title" placeholder="请输入表单标题" />
</div> </div>
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- <el-form-item label="字段名称">--> <!-- <el-form-item label="字段名称">-->
<div v-for="(item, index) in inputarr" :key="index" style="margin-bottom: 10px;"> <div v-for="(item,index) in inputarr" :key="index" style="margin-bottom: 10px;">
<span>字段</span> <el-input <span>字段</span>
style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]" <el-input style="border: 1px solid #DCDFE6;border-radius: 3px; "
placeholder="请输入字段" /> v-model="inputarr[index]" placeholder="请输入字段" />
</div> </div>
<div> <div>
<el-button <el-button @click="adinput"
@click="adinput"
style="text-align: center;width: 90%;background-color: rgb(232,244,255);color:#1890ff">添加字段</el-button> style="text-align: center;width: 90%;background-color: rgb(232,244,255);color:#1890ff">添加字段</el-button>
</div> </div>
<!-- </el-form-item>--> <!-- </el-form-item>-->
</div> </div>
<br />
<div class="el-input-foot"> <div class="el-input-foot">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
@ -96,13 +79,13 @@ style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
</el-dialog> </el-dialog>
<!-- 推广链接对话框--> <!-- 推广链接对话框-->
<el-dialog :title="extendTitle" v-model:visible="extendOpen" width="500px" append-to-body> <el-dialog :title="extendTitle" v-model="extendOpen" width="500px" append-to-body>
<el-input v-model="extendLink" placeholder="请输入内容" :disabled="true" /> <el-input v-model="extendLink" placeholder="请输入内容" :disabled="true" />
<el-button @click="copyAddress">复制</el-button> <el-button @click="copyAddress">复制</el-button>
</el-dialog> </el-dialog>
<!-- 采集数据列表 --> <!-- 采集数据列表 -->
<el-dialog :title="collectTitle" v-model:visible="collectOpen" append-to-body> <el-dialog :title="collectTitle" v-model="collectOpen" append-to-body>
<el-table border v-loading="loading" :data="collectLink" @selection-change="handleSelectionChange"> <el-table border v-loading="loading" :data="collectLink" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<div> <div>
@ -111,14 +94,12 @@ style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
<!-- <el-table-column label="编号" align="center" prop="id" />--> <!-- <el-table-column label="编号" align="center" prop="id" />-->
<!-- <el-table-column label="id" align="center" prop="dynamicDataId" />--> <!-- <el-table-column label="id" align="center" prop="dynamicDataId" />-->
<!-- <el-table-column v-for="item in collectLink" :label="item.map" align="center" :prop="item" />--> <!-- <el-table-column v-for="item in collectLink" :label="item.map" align="center" :prop="item" />-->
<template> <template v-for="(item, index) in Object.keys(collectLink[0])" :key="index">
<el-table> <el-table-column :label="item">
<el-table-column v-for="(item, index) in Object.keys(collectLink[0])" :key="index" :label="item">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row[item] }}</span> <span>{{scope.row[item]}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table>
</template> </template>
</el-table> </el-table>
</el-dialog> </el-dialog>
@ -126,7 +107,7 @@ style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
</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'],
@ -185,7 +166,7 @@ style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
}, },
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;
@ -197,10 +178,11 @@ style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
}, },
// //
submitForm() { submitForm() {
console.log('ssssss')
this.addParams.inputarr = this.inputarr this.addParams.inputarr = this.inputarr
this.addParams.pageView = '0' this.addParams.pageView = '0'
this.addParams.collectionQuantity = '0' this.addParams.collectionQuantity = '0'
ArticleCategoryApi.saveDynamicData(this.addParams).then(response => { FollowUpRecordApi.saveDynamicData(this.addParams).then(response => {
// this.cardList = response.data; // this.cardList = response.data;
// this.total = response.total; // this.total = response.total;
this.loading = false; this.loading = false;
@ -240,7 +222,7 @@ style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
this.id = id this.id = id
this.collectOpen = true; this.collectOpen = true;
this.collectTitle = "采集数据"; this.collectTitle = "采集数据";
ArticleCategoryApi.collectDataList(this.id).then(response => { collectDataList(this.id).then(response => {
this.collectLink = response.data this.collectLink = response.data
}); });
}, },
@ -254,7 +236,6 @@ style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
}; };
</script> </script>
<style scoped> <style scoped>
.clearfix:before, .clearfix:before,
.clearfix:after { .clearfix:after {
display: table; display: table;