workflowTrade.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <template>
  2. <div class="search-platform container-height">
  3. <div v-if="!isChildRoute">
  4. <Breadcrumb />
  5. <div class="padding12 bg_color_fff border_radius_16 box_shadow_card">
  6. <!-- 搜索与创建区域 -->
  7. <div class="search-create-bar">
  8. <div class="search-input-container flex_1">
  9. <input
  10. type="text"
  11. v-model="searchFom.title"
  12. :placeholder="$t('common.qingshuruyaosousuodegongzuoliu')"
  13. class="search-input"
  14. />
  15. <button class="search-btn bg_color_primary" @click="getList('init')">
  16. <img :src="searchIcon" alt="" class="icon-search">
  17. {{$t('common.shousuo')}}
  18. </button>
  19. </div>
  20. <button class="create-btn bg_color_primary" @click.stop.prevent="goWorkflowAdd">
  21. <img :src="addIcon" alt="" class="icon-add">
  22. {{$t('common.fabuxuqiu')}}
  23. </button>
  24. </div>
  25. <div class="typeList flex-between typeborder">
  26. <div class="gray font_size14 typeName">平台:</div>
  27. <div class="flex_1 gap10">
  28. <div class="font_size14 typeItem active" v-for="item in 5" :key="item">全部</div>
  29. </div>
  30. </div>
  31. <div class="typeList flex-between typeborder">
  32. <div class="gray font_size14 typeName">需求状态:</div>
  33. <div class="flex_1 gap10">
  34. <div class="font_size14 typeItem active" v-for="item in 5" :key="item">全部</div>
  35. </div>
  36. </div>
  37. <div class="typeList flex-between">
  38. <div class="gray font_size14 typeName">发布时间:</div>
  39. <div class="flex_1 gap10">
  40. <div class="font_size14 typeItem active" v-for="item in 5" :key="item">全部</div>
  41. </div>
  42. </div>
  43. </div>
  44. <!-- 列表 -->
  45. <div class="course-list mt20">
  46. <div class="font_size20 bold mb10">共 <span class="color_theme">{{listTotal}}</span> 条需求</div>
  47. <div class="padding16 bg_color_fff border_radius_16 mb20 box_shadow_card list_item_animation"
  48. v-for="item in 4" :key="item"
  49. >
  50. <div @click="goworkflowTradeDetail(item)" class="cursor-pointer">
  51. <div class="flex-between">
  52. <div class="gap10">
  53. <el-button type="primary">免费</el-button>
  54. <div class="bold font_size30">AI智能线索富集与多渠道通知系统</div>
  55. </div>
  56. <div class="font_size24 color_price bold">¥2000.00-3000.00</div>
  57. </div>
  58. <div class="gap20 mt10">
  59. <el-button type="primary" size="large" plain>一级分类名称</el-button>
  60. <el-button type="primary" size="large" plain>二级分类名称</el-button>
  61. <div class="gap5">
  62. <img :src="yuangong" alt="员工" style="width: 16px; height: 16px;">
  63. <span class="font_size14">张三</span>
  64. </div>
  65. <div class="gap5">
  66. <img :src="riliIcon" alt="员工" style="width: 16px; height: 16px;">
  67. <span class="font_size14">2024-10-16</span>
  68. </div>
  69. <!-- <div class="gap5">
  70. <img :src="shiyongIcon" alt="员工" style="width: 16px; height: 16px;">
  71. <span class="font_size14">2,456使用</span>
  72. </div> -->
  73. <!-- <div class="gap5">
  74. <img :src="yunIcon" alt="员工" style="width: 16px; height: 16px;">
  75. <span class="font_size14">n8n平台</span>
  76. </div> -->
  77. <!-- <div class="gap5">
  78. <img :src="biaoqianIcon" alt="员工" style="width: 16px; height: 16px;">
  79. <span class="font_size14">二级分类名称-三级分类名称</span>
  80. </div> -->
  81. </div>
  82. <div class="font_size16 gray mt10">此n8n工作流是一款强大的AI驱动的潜在客户富集与通知系统,专为市场营销和销售团队设计。它通过智能表单收集线索,利用OpenAI深度分析并丰富客户数据,自动识别关键信息。系统能根据预设条件,通过多种渠道即时发送个性化通知,显著提升线索质量、转化率及团队协作效率,是优化客户关系管理的关键工具。</div>
  83. </div>
  84. <div class="mt20">
  85. <div class="flex-between">
  86. <div class="gap10">
  87. <el-avatar :size="32" :src="appStore.avatar" />
  88. <div class="font_size16 bold">张三</div>
  89. <div class="font_size14 gray mt2">2024-10-16</div>
  90. </div>
  91. <el-button type="primary" size="large">
  92. <img :src="zaixianbaomingIcon" alt="" class="mr10" style="width: 16px; height: 16px;">
  93. <span class="font_size14">{{$t('common.zaixianbaoming')}}</span>
  94. </el-button>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <!-- 分页 -->
  100. <!-- 替换原有的分页代码 -->
  101. <Pagination
  102. :total="searchFom.total"
  103. :page-size="searchFom.pageSize"
  104. :current-page="searchFom.pageNum"
  105. @page-change="handlePageChange"
  106. />
  107. </div>
  108. <router-view />
  109. </div>
  110. </template>
  111. <script setup>
  112. import searchIcon from '@/assets/imgs/search.png'
  113. import addIcon from '@/assets/imgs/add.png'
  114. import yuangong from '@/assets/imgs/yuangong.png'
  115. import riliIcon from '@/assets/imgs/rili.png'
  116. import shiyongIcon from '@/assets/imgs/shiyong.png'
  117. import yunIcon from '@/assets/imgs/yun.png'
  118. import biaoqianIcon from '@/assets/imgs/biaoqian.png'
  119. import zaixianbaomingIcon from '@/assets/imgs/zaixianbaoming.png'
  120. import Pagination from '@/components/Pagination.vue'
  121. import { getQuestList } from '@/api/workflowTrade.js'
  122. import { useRouter, useRoute } from 'vue-router'
  123. const router = useRouter()
  124. const route = useRoute()
  125. console.log(router,route)
  126. import { ref, computed, reactive, onMounted } from 'vue'
  127. import { useAppStore } from '@/pinia/appStore'
  128. const appStore = useAppStore()
  129. //获取参数
  130. const query = route.query
  131. const activePlatform = ref(query.activePlatform || '')
  132. //获取当前路由路径
  133. // const currentPath = ref(router.currentRoute.value.path)
  134. const isChildRoute = computed(() => {
  135. return route.matched.length > 1
  136. })
  137. // 添加分页相关数据
  138. const list = ref([])
  139. const listTotal = ref(0)
  140. const searchFom = reactive({
  141. categoryId1: '',
  142. categoryId2: '',
  143. categoryId3: '',
  144. title: '',
  145. pageNum: 1,
  146. pageSize: 10,
  147. })
  148. onMounted(() => {
  149. getList();
  150. })
  151. const handlePageChange = (page) => {
  152. searchFom.pageNum = page
  153. // 这里可以添加获取数据的逻辑
  154. console.log('当前页:', page);
  155. getList();
  156. }
  157. // 查询寻找工作流列表
  158. const getList = async (type) => {
  159. if(type === 'init'){
  160. searchFom.pageNum = 1
  161. }
  162. const res = await getQuestList(searchFom)
  163. if(res.code === 200){
  164. // listTotal.value = res.data.total
  165. // list.value = res.data.records
  166. }
  167. }
  168. const goworkflowTradeDetail = (item={}) => {
  169. //增加参数名称
  170. router.push({
  171. path: `/workflow-trade/workflow-trade-detail`,
  172. query: {
  173. id:2,
  174. metaTitle: item.name || '详情'
  175. }
  176. })
  177. };
  178. const goWorkflowAdd = () => {
  179. //增加参数名称
  180. router.push({
  181. path: `/workflow-trade/workflow-trade-add`,
  182. query: {
  183. }
  184. })
  185. };
  186. </script>
  187. <style scoped lang="scss">
  188. // 2. 混合器:按钮通用样式
  189. @mixin btn-style() {
  190. padding: 0 16px;
  191. color: #ffffff;
  192. border: none;
  193. border-radius: 10px;
  194. cursor: pointer;
  195. display: flex;
  196. align-items: center;
  197. gap:8px;
  198. font-size: 18px;
  199. &:hover {
  200. opacity: 0.9;
  201. }
  202. }
  203. .search-platform {
  204. // 搜索创建栏嵌套
  205. .search-create-bar {
  206. display: flex;
  207. align-items: center;
  208. gap: 8px;
  209. background-color: rgba(255, 255, 255, 0.5);
  210. border-radius: 10px;
  211. .search-input {
  212. flex: 1;
  213. height: 60px;
  214. padding: 0 12px;
  215. outline: none;
  216. font-size: 18px;
  217. border-radius:7px;
  218. border: none;
  219. width: 100%;
  220. //占位符的颜色
  221. ::placeholder {
  222. color: #999;
  223. }
  224. }
  225. .search-btn {
  226. height: 50px;
  227. @include btn-style();
  228. }
  229. .create-btn {
  230. height: 56px;
  231. @include btn-style();
  232. }
  233. .search-input-container{
  234. position: relative;
  235. border-radius: 8px;
  236. border:2px solid $primary-color;
  237. .search-btn{
  238. position: absolute;
  239. top: 6px;
  240. right: 6px;
  241. }
  242. }
  243. }
  244. .typeList{
  245. padding: 20px 0;
  246. &.typeborder{
  247. border-bottom: 1px dashed #DCDFE6;
  248. }
  249. .typeName{
  250. margin-top: 6px;
  251. width: 80px;
  252. }
  253. .typeItem{
  254. margin: 0 8px;
  255. &.active{
  256. background: rgba(45,113,255,0.1);
  257. border-radius: 4px 4px 4px 4px;
  258. padding: 4px 8px;
  259. color: $primary-color;
  260. font-weight: 600;
  261. }
  262. }
  263. }
  264. }
  265. </style>