Bladeren bron

提交广告部分代码

Jing 3 maanden geleden
bovenliggende
commit
b24ccb6196
68 gewijzigde bestanden met toevoegingen van 817 en 875 verwijderingen
  1. BIN
      html/favicon.ico
  2. 0 22
      html/index.html
  3. BIN
      html/static/fonts/element-icons.27c72091.ttf
  4. BIN
      html/static/fonts/element-icons.535877f5.woff
  5. BIN
      html/static/fonts/element-icons.732389de.ttf
  6. BIN
      html/static/fonts/element-icons.9b70ee41.woff
  7. BIN
      html/static/img/401.089007e7.gif
  8. BIN
      html/static/img/404.a57b6f31.png
  9. BIN
      html/static/img/404_cloud.0f4bc32b.png
  10. BIN
      html/static/img/Picture.1d9ebd24.png
  11. BIN
      html/static/img/admin.aec5a334.png
  12. BIN
      html/static/img/banner1.81b17264.png
  13. BIN
      html/static/img/banner2.4b40b8ee.png
  14. BIN
      html/static/img/banner3.00f4e8b5.png
  15. BIN
      html/static/img/bannerSector.b82fa58f.png
  16. BIN
      html/static/img/bottom1.4beac894.png
  17. BIN
      html/static/img/bottom2.2ab2b933.png
  18. BIN
      html/static/img/bottom3.dbdf6a22.png
  19. BIN
      html/static/img/bottom4.8c29b6be.png
  20. BIN
      html/static/img/calendar.3e3aa850.png
  21. BIN
      html/static/img/commentSector.b580cfee.png
  22. BIN
      html/static/img/footerSector.07d0551c.png
  23. BIN
      html/static/img/group.73da7670.jpg
  24. BIN
      html/static/img/guanggaowei1.7d8aa632.png
  25. BIN
      html/static/img/guanggaowei2.abfa3344.png
  26. BIN
      html/static/img/headSector.1b2d653f.png
  27. BIN
      html/static/img/imgSector.8ac20f6a.png
  28. BIN
      html/static/img/imgTitleSector.1b0946a5.png
  29. BIN
      html/static/img/link1.af832e99.png
  30. BIN
      html/static/img/link2.0c9c4b61.png
  31. BIN
      html/static/img/linkSector.8ce40809.png
  32. BIN
      html/static/img/menuSector.3647fd2d.png
  33. BIN
      html/static/img/moreServicesSector.8bc11340.png
  34. BIN
      html/static/img/newsSector.6fef6112.png
  35. BIN
      html/static/img/pic1.c51c22b6.png
  36. BIN
      html/static/img/pic2.39705314.png
  37. BIN
      html/static/img/pic3.856b5b57.png
  38. BIN
      html/static/img/pic4.c837ef60.png
  39. BIN
      html/static/img/pictureTitle1.2940b713.png
  40. BIN
      html/static/img/pictureTitle2.9411dbfa.png
  41. BIN
      html/static/img/pictureTitle3.55dd3c4a.png
  42. BIN
      html/static/img/pictureTitle4.f2ccc53b.png
  43. BIN
      html/static/img/pictureTitle5.cb33d2eb.png
  44. BIN
      html/static/img/sign1.eb76e48d.png
  45. BIN
      html/static/img/sign2.31eb3bf2.png
  46. BIN
      html/static/img/style1.48175d28.png
  47. BIN
      html/static/img/style1topbg.de2443c2.png
  48. BIN
      html/static/img/style2.9e7f7324.png
  49. BIN
      html/static/img/style3.a01877d4.png
  50. BIN
      html/static/img/style4.e084cd61.png
  51. BIN
      html/static/img/style5.72973140.png
  52. BIN
      html/static/img/style6.964409a6.png
  53. BIN
      html/static/img/style7.a8ee7c16.png
  54. BIN
      html/static/img/style8.b65447cc.png
  55. BIN
      html/static/img/titleStyle1.7967b2ea.png
  56. BIN
      html/static/img/tui-editor-2x.b4361244.png
  57. BIN
      html/static/img/tui-editor.30dd0f52.png
  58. BIN
      html/static/img/user.ddf087d9.png
  59. 0 10
      html/static/js/0.js
  60. 0 246
      html/static/js/app.js
  61. 0 58
      html/static/js/chunk-vendors.js
  62. 89 8
      src/api/advertise.js
  63. 17 1
      src/router/index.js
  64. 2 1
      src/utils/baseUrl.js
  65. 118 0
      src/views/advertise/adPlaceDetail.vue
  66. 408 361
      src/views/advertise/adPlaceList.vue
  67. 178 165
      src/views/advertise/advertiseList.vue
  68. 5 3
      src/views/crawler/webCrawlerList.vue

BIN
html/favicon.ico


+ 0 - 22
html/index.html

@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="renderer" content="webkit">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-    <link rel="icon" href="/favicon.ico">
-    <title>政讯通运营管理平台</title>
-    <!-- 引入 Element UI -->
-    <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.2/lib/theme-chalk/index.css">
-    <script src="https://unpkg.com/element-ui@2.13.2/lib/index.js"></script>
-    <script src="https://unpkg.com/element-ui@2.13.2/lib/umd/locale/en.js"></script>
-    <script src="https://unpkg.com/element-ui@2.13.2/lib/umd/locale/zh-CN.js"></script> -->
-    <!-- 引入 ECharts -->
-    <!-- <script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script> -->
-  <link href="/static/js/app.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.js" rel="preload" as="script"></head>
-  <body>
-    <div id="app"></div>
-    <!-- built files will be auto injected -->
-  <script type="text/javascript" src="/static/js/chunk-vendors.js"></script><script type="text/javascript" src="/static/js/app.js"></script></body>
-</html>

BIN
html/static/fonts/element-icons.27c72091.ttf


BIN
html/static/fonts/element-icons.535877f5.woff


BIN
html/static/fonts/element-icons.732389de.ttf


BIN
html/static/fonts/element-icons.9b70ee41.woff


BIN
html/static/img/401.089007e7.gif


BIN
html/static/img/404.a57b6f31.png


BIN
html/static/img/404_cloud.0f4bc32b.png


BIN
html/static/img/Picture.1d9ebd24.png


BIN
html/static/img/admin.aec5a334.png


BIN
html/static/img/banner1.81b17264.png


BIN
html/static/img/banner2.4b40b8ee.png


BIN
html/static/img/banner3.00f4e8b5.png


BIN
html/static/img/bannerSector.b82fa58f.png


BIN
html/static/img/bottom1.4beac894.png


BIN
html/static/img/bottom2.2ab2b933.png


BIN
html/static/img/bottom3.dbdf6a22.png


BIN
html/static/img/bottom4.8c29b6be.png


BIN
html/static/img/calendar.3e3aa850.png


BIN
html/static/img/commentSector.b580cfee.png


BIN
html/static/img/footerSector.07d0551c.png


BIN
html/static/img/group.73da7670.jpg


BIN
html/static/img/guanggaowei1.7d8aa632.png


BIN
html/static/img/guanggaowei2.abfa3344.png


BIN
html/static/img/headSector.1b2d653f.png


BIN
html/static/img/imgSector.8ac20f6a.png


BIN
html/static/img/imgTitleSector.1b0946a5.png


BIN
html/static/img/link1.af832e99.png


BIN
html/static/img/link2.0c9c4b61.png


BIN
html/static/img/linkSector.8ce40809.png


BIN
html/static/img/menuSector.3647fd2d.png


BIN
html/static/img/moreServicesSector.8bc11340.png


BIN
html/static/img/newsSector.6fef6112.png


BIN
html/static/img/pic1.c51c22b6.png


BIN
html/static/img/pic2.39705314.png


BIN
html/static/img/pic3.856b5b57.png


BIN
html/static/img/pic4.c837ef60.png


BIN
html/static/img/pictureTitle1.2940b713.png


BIN
html/static/img/pictureTitle2.9411dbfa.png


BIN
html/static/img/pictureTitle3.55dd3c4a.png


BIN
html/static/img/pictureTitle4.f2ccc53b.png


BIN
html/static/img/pictureTitle5.cb33d2eb.png


BIN
html/static/img/sign1.eb76e48d.png


BIN
html/static/img/sign2.31eb3bf2.png


BIN
html/static/img/style1.48175d28.png


BIN
html/static/img/style1topbg.de2443c2.png


BIN
html/static/img/style2.9e7f7324.png


BIN
html/static/img/style3.a01877d4.png


BIN
html/static/img/style4.e084cd61.png


BIN
html/static/img/style5.72973140.png


BIN
html/static/img/style6.964409a6.png


BIN
html/static/img/style7.a8ee7c16.png


BIN
html/static/img/style8.b65447cc.png


BIN
html/static/img/titleStyle1.7967b2ea.png


BIN
html/static/img/tui-editor-2x.b4361244.png


BIN
html/static/img/tui-editor.30dd0f52.png


BIN
html/static/img/user.ddf087d9.png


File diff suppressed because it is too large
+ 0 - 10
html/static/js/0.js


File diff suppressed because it is too large
+ 0 - 246
html/static/js/app.js


File diff suppressed because it is too large
+ 0 - 58
html/static/js/chunk-vendors.js


+ 89 - 8
src/api/advertise.js

@@ -2,14 +2,14 @@
 import request from '@/utils/request'
 
 //获取状态
-export const getStatus=()=> {
+export const getStatus = () => {
   return request({
     url: '/order/getStauts',
     method: 'get',
   })
 }
 // 获取订单列表
-export const getOrderListAdmin=(data)=> {
+export const getOrderListAdmin = (data) => {
   return request({
     url: '/order/getOrderListAdmin',
     method: 'post',
@@ -17,15 +17,31 @@ export const getOrderListAdmin=(data)=> {
   })
 }
 // 获取订单详情
-export const getOrderDetailAdmin=(data)=> {
+export const getOrderDetailAdmin = (data) => {
   return request({
     url: '/order/getOrderDetailAdmin',
     method: 'post',
     data
   })
 }
+//获取订单详情 
+export const getOrderDetail = (params) => {
+  return request({
+    url: '/order/getOrderDetail',
+    method: 'get',
+    params
+  })
+}
+// 获取订单列表
+export const getOrderList = (params) => {
+  return request({
+    url: '/order/getOrderList',
+    method: 'get',
+    params
+  })
+}
 // 审核订单状态
-export const applyOrderStatusAdmin=(data)=> {
+export const applyOrderStatusAdmin = (data) => {
   return request({
     url: '/order/applyOrderStatusAdmin',
     method: 'post',
@@ -33,7 +49,7 @@ export const applyOrderStatusAdmin=(data)=> {
   })
 }
 // 修改订单价格
-export const editOrderAdmin=(data)=> {
+export const editOrderAdmin = (data) => {
   return request({
     url: '/order/editPriceOrderAdmin',
     method: 'post',
@@ -41,7 +57,7 @@ export const editOrderAdmin=(data)=> {
   })
 }
 // 驳回订单
-export const rejectOrderAdmin=(data)=> {
+export const rejectOrderAdmin = (data) => {
   return request({
     url: '/order/rejectOrderAdmin',
     method: 'post',
@@ -49,7 +65,7 @@ export const rejectOrderAdmin=(data)=> {
   })
 }
 // 结束订单
-export const endOrderAdmin=(data)=> {
+export const endOrderAdmin = (data) => {
   return request({
     url: '/order/endOrderAdmin',
     method: 'post',
@@ -57,10 +73,75 @@ export const endOrderAdmin=(data)=> {
   })
 }
 // 删除订单
-export const delOrderAdmin=(data)=> {
+export const delOrderAdmin = (data) => {
   return request({
     url: '/order/delOrderAdmin',
     method: 'post',
     data
   })
+}
+
+
+//广告位 ----------------------------------------------->
+// 创建广告位
+export const createAdPlace = (data) => {
+  return request({
+    url: '/ad/createAdPlace',
+    method: 'post',
+    data
+  })
+}
+
+// 广告位列表
+export const getAdPlaceList = (params) => {
+  return request({
+    url: '/ad/getAdPlaceList',
+    method: 'get',
+    params
+  })
+}
+
+// 删除广告位
+export const delAdPlace = (data) => {
+  return request({
+    url: '/ad/delAdPlace',
+    method: 'post',
+    data
+  })
+}
+
+// 修改广告位
+export const updateAdPlace = (data) => {
+  return request({
+    url: '/ad/updateAdPlace',
+    method: 'post',
+    data
+  })
+}
+
+// 获取广告位下面的广告
+export const getAdList = (params) => {
+  return request({
+    url: '/ad/getAdList',
+    method: 'get',
+    params
+  })
+}
+
+// 获取广告位详情
+export const getAdPlaceInfo = (params) => {
+  return request({
+    url: '/ad/getAdPlaceInfo',
+    method: 'get',
+    params
+  })
+}
+
+// 获取广告位尺寸
+export const getSize = (data) => {
+  return request({
+    url: '/order/getAD',
+    method: 'post',
+    data
+  })
 }

+ 17 - 1
src/router/index.js

@@ -434,7 +434,7 @@ export const constantRoutes = [
       {
         name: '',
         path: '',
-        component: () => import('@/views/advertise/advertiseList'),
+        component: () => import('@/views/advertise/advertiseList.vue'),
         meta: {
           title: '广告列表',
           hidden: true,
@@ -459,6 +459,22 @@ export const constantRoutes = [
       }
     ]
   },
+  {
+    path: '/adPlaceDetail',
+    component: Layout,
+    children: [
+      {
+        name: '',
+        path: '',
+        component: () => import('@/views/advertise/adPlaceDetail'),
+        meta: {
+          title: '广告位详情',
+          hidden: true,
+          breadcrumb: true
+        }
+      }
+    ]
+  },
   // {
   //   path: '/documentation',
   //   component: Layout,

+ 2 - 1
src/utils/baseUrl.js

@@ -1,6 +1,7 @@
 const URL = {
   //baseUrl: 'https://admin.bjzxtw.org.cn/zxtapi',//正式环境
-  baseUrl: 'http://116.131.8.26:9501',//正式环境
+  // baseUrl: 'http://116.131.8.26:9501',//正式环境
+  baseUrl: 'http://192.168.1.234:9501',//正式环境
   //baseUrl: 'http://183.131.25.186:9501',//测试环境
   //baseUrl: 'http://192.168.1.201:9501',//刘佳伟本地环境
   //baseUrl:'http://192.168.1.115:9501',//冯蕊的本地环境

+ 118 - 0
src/views/advertise/adPlaceDetail.vue

@@ -0,0 +1,118 @@
+<template>
+    <!-- 广告位详情 -->
+    <div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <el-table class="my-table" :data="tableData" style="width: 100%">
+                <el-table-column fixed prop="id" label="编号" width="90">
+                </el-table-column>
+                <el-table-column prop="website_name" label="网站名称" width="">
+                </el-table-column>
+                <el-table-column prop="name" label="广告名称" width="">
+                </el-table-column>
+                <!-- <el-table-column prop="image_src" label="广告图" width="">
+                </el-table-column> -->
+                <el-table-column label="广告图" width="">
+                    <template slot-scope="scope">
+                        <img :src="scope.row.image_src" alt="" class="uploadImage">
+                    </template>
+                </el-table-column>
+                <!-- <el-table-column prop="status" label="尺寸" width="">
+                </el-table-column> -->
+                <el-table-column prop="image_url" label="广告链接" width="">
+                </el-table-column>
+                <el-table-column prop="fromtime" label="开始时间" width="">
+                </el-table-column>
+                <el-table-column prop="totime" label="结束时间" width="">
+                </el-table-column>
+                <el-table-column prop="day" label="剩余时间 (天)" width="">
+                </el-table-column>
+            </el-table>
+        </div>
+        <!--分页 start------------------------------------------------------------>
+        <div class="alignBox">
+            <el-row>
+                <el-col :span="24">
+                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
+                        :total="total">
+                    </el-pagination>
+                </el-col>
+            </el-row>
+        </div>
+        <!--分页 end------------------------------------------------------------>
+        <!--表格内容 end------------------------------------------------------------>
+    </div>
+
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle'
+
+//引入公用样式
+import '@/styles/global.less';
+import { getAdList } from '@/api/advertise'
+export default {
+    components: {
+        tableTitle,//表格标题
+    },
+    data() {
+        return {
+            tableDivTitle: "广告位详情",  //列表标题
+
+            tableData: [],//表格数据
+
+            //活动id
+            activeid: "",
+
+            // 分页相关
+            page: 1,
+            pageSize: 10,
+            total: 0,
+
+        }
+    },
+
+    methods: {
+        //1.1 开始请求列表信息方法
+        getData() {
+            getAdList({
+                pid: this.activeid,
+                page: this.page,
+                pageSize: this.pageSize
+            }).then(data => {
+                console.log(data);
+                this.tableData = data.data.rows
+            })
+
+        },
+        //1.2 列表内容分页
+        //直接跳转
+        handleSizeChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        //1.3 点击分页
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getData();
+        },
+    },
+    mounted() {
+        this.activeid = this.$route.query.id
+        console.log(this.activeid);
+
+        this.getData()
+
+
+    },
+}
+</script>
+
+<style scoped lang="less">
+.layerBox {
+    padding: 30px 20px;
+}
+</style>

File diff suppressed because it is too large
+ 408 - 361
src/views/advertise/adPlaceList.vue


+ 178 - 165
src/views/advertise/advertiseList.vue

@@ -4,9 +4,9 @@
         <!-- 提示信息 -->
         <div class="tips">
             <el-row>
-                <el-col :span="12">
+                <el-col :span="24">
                     <i class="tipsIcon"></i>
-                    <span class="tipsText">7个工作日内,若运营没有操作用户的申请,则用户申请的时间、信息等将会释放。</span>
+                    <span class="tipsText">24小时内,若运营没有操作用户的申请,则用户申请的时间、信息等将会释放。</span>
                 </el-col>
             </el-row>
         </div>
@@ -16,29 +16,19 @@
                 <el-col :span="6" class="left">
                     <div class="searchBox">
                         <div class="searchTitle">工单编号</div>
-                        <el-input class="input" v-model="order_code" placeholder="请输入工单编号"></el-input>
+                        <el-input class="input" v-model="order_code" clearable placeholder="请输入工单编号"></el-input>
                     </div>
                 </el-col>
                 <el-col :span="6" class="left">
                     <div class="searchBox">
-                        <div class="searchTitle">审核状态</div>
-                        <el-select v-model="status" placeholder="请选择审核状态">
+                        <div class="searchTitle">订单状态</div>
+                        <el-select v-model="order_status" clearable placeholder="请选择订单状态">
                             <el-option v-for="item in order" :key="item.value" :label="item.label" :value="item.value">
                             </el-option>
                         </el-select>
                     </div>
                 </el-col>
-                <el-col :span="6" class="left">
-                    <div class="searchBox">
-                        <div class="searchTitle">广告状态</div>
-                        <el-select v-model="ad_status" placeholder="请选择广告状态">
-                            <el-option v-for="item in order_ad" :key="item.value" :label="item.label"
-                                :value="item.value">
-                            </el-option>
-                        </el-select>
-                    </div>
-                </el-col>
-                <el-col :span="6" class="right">
+                <el-col :span="8" class="right">
                     <div class="btnList">
                         <button class="search" @click="goSearch">搜索</button>
                         <button class="reset" @click="goReset">重置</button>
@@ -52,23 +42,21 @@
             <el-row>
                 <template>
                     <el-table class="my-table" :data="tableData" style="width: 100%">
-                        <el-table-column fixed prop="id" label="编号" width="90">
-                        </el-table-column>
-                        <el-table-column prop="order_num" label="工单编号" width="120">
+                        <el-table-column fixed prop="id" label="编号" width="80">
                         </el-table-column>
-                        <el-table-column prop="user_name" label="广告名称" width="255">
+                        <el-table-column prop="order_num" label="工单编号" width="175">
                         </el-table-column>
-                        <el-table-column prop="status" label="审核状态" width="90" algin="center">
+                        <el-table-column prop="name" label="广告名称" width="160">
                         </el-table-column>
-                        <el-table-column prop="ad_status" label="广告状态" width="90">
+                        <el-table-column prop="orderStatus" label="订单状态" width="100">
                         </el-table-column>
-                        <el-table-column prop="sttime" label="开始时间" width="120">
+                        <el-table-column prop="sttime" label="开始时间" width="">
                         </el-table-column>
-                        <el-table-column prop="edtime" label="结束时间" width="120">
+                        <el-table-column prop="edtime" label="结束时间" width="">
                         </el-table-column>
                         <el-table-column prop="cttime" label="创建时间" width="">
                         </el-table-column>
-                        <el-table-column prop="admin_user_name" label="操作人" width="100">
+                        <el-table-column prop="price" label="总金额" width="110">
                         </el-table-column>
                         <el-table-column fixed="right" label="操作" width="330">
                             <template slot-scope="scope">
@@ -108,18 +96,26 @@
                         <el-input v-model="ruleForm.name" disabled placeholder="请输入网站名称"></el-input>
                     </el-form-item>
                     <el-form-item label="广告网址:" prop="">
-                        <el-input v-model="ruleForm.name" disabled placeholder="请输入网站名称"></el-input>
+                        <el-input v-model="ruleForm.ad_url" disabled placeholder="请输入网站名称"></el-input>
                     </el-form-item>
                     <el-form-item label="广告图:" prop="">
                         <div class="adImage">
-                            <img src="../../assets/advertise/404.png" alt="">
+                            <img :src="ruleForm.adImg" v-if="this.ruleForm.adImg" alt="">
+                            <img :src="'../../assets/advertise/404.png'" v-else-if="this.ruleForm.adImg=''" alt="">
                         </div>
                     </el-form-item>
                     <el-form-item label="持续时间:" prop="">
-                        <el-date-picker v-model="ruleForm.startTime" type="datetime" disabled placeholder="选择日期时间">
-                        </el-date-picker> 至
-                        <el-date-picker v-model="ruleForm.endTime" type="datetime" disabled placeholder="选择日期时间">
-                        </el-date-picker>
+                        <el-col :span="11">
+                            <el-date-picker v-model="ruleForm.startTime" type="datetime" disabled placeholder="选择日期时间">
+                            </el-date-picker>
+                        </el-col>
+                        <el-col :span="2" class="zhi">
+                            至
+                        </el-col>
+                        <el-col :span="11">
+                            <el-date-picker v-model="ruleForm.endTime" type="datetime" disabled placeholder="选择日期时间">
+                            </el-date-picker>
+                        </el-col>
                     </el-form-item>
                     <el-form-item label="广告尺寸:" prop="">
                         <el-radio v-model="ruleForm.radio" label="1">1200x90px</el-radio>
@@ -128,15 +124,31 @@
 
                     <el-form-item label="价格:" prop="price">
                         <div class="price">
-                            <el-input v-model="ruleForm.price" placeholder="请输入价格"></el-input> 元 x
-                            <el-input v-model="ruleForm.days" disabled placeholder="请输入天数"></el-input> 天 x
-                            <el-input v-model="ruleForm.num" disabled placeholder="请输入个数"></el-input> 个
+                            <el-col :span="6">
+                                <el-input v-model="ruleForm.price" placeholder="请输入价格"></el-input>
+                            </el-col>
+                            <el-col :span="2" class="zhi">
+                                元 x
+                            </el-col>
+                            <el-col :span="6">
+                                <el-input v-model="ruleForm.days" disabled placeholder="请输入天数"></el-input>
+                            </el-col>
+                            <el-col :span="2" class="zhi">
+                                天 x
+                            </el-col>
+                            <el-col :span="6">
+                                <el-input v-model="ruleForm.num" disabled placeholder="请输入个数"></el-input>
+                            </el-col>
+                            <el-col :span="2" class="zhi">
+                                个
+                            </el-col>
                         </div>
                     </el-form-item>
                     <el-form-item label="广告位置:" prop="">
                         <span class="example" @click="goGraph">查看示例图</span>
                         <div>
-                            <el-button disabled v-for="item in 12" class="el_btnList">中农兴业网 一号广告位</el-button>
+                            <el-button disabled v-for="item in ruleForm.adPlace" class="el_btnList">{{ item
+                                }}</el-button>
                         </div>
                     </el-form-item>
                 </div>
@@ -181,7 +193,6 @@
                         </el-input>
                     </el-form-item>
                 </div>
-
             </el-form>
             <div slot="footer" class="dialog-footer">
                 <el-button @click="dialogFormVisible = false">取 消</el-button>
@@ -199,7 +210,7 @@ import tableTitle from './components/tableTitle.vue';
 
 //引入公用样式
 import '@/styles/global.less';
-import { getStatus, getOrderListAdmin, getOrderDetailAdmin, applyOrderStatusAdmin, editOrderAdmin, rejectOrderAdmin, endOrderAdmin, delOrderAdmin } from '@/api/advertise'
+import { getStatus, getOrderList, getOrderListAdmin, getOrderDetail, getOrderDetailAdmin, applyOrderStatusAdmin, editOrderAdmin, rejectOrderAdmin, endOrderAdmin, delOrderAdmin } from '@/api/advertise'
 export default {
     components: {
         tableTitle,//表格标题-
@@ -214,14 +225,14 @@ export default {
 
             form: {},  //审核状态的ref属性名称
 
-
             tableData: [],//表格数据
 
+            ad_img: 'http://183.131.25.186:9501/image/20250102/1735810611310322.png', //广告图
+
             // 搜索框相关
             order_code: '', //工单编号 
-            status: '',//审核状态
-            ad_status: '',//广告状态
-            order: [ //审核状态数据
+            order_status: '',//订单状态
+            order: [ //订单状态数据
                 {
                     value: 1,
                     label: '已通过'
@@ -230,27 +241,9 @@ export default {
                     value: 2,
                     label: '已驳回'
                 },
-                {
-                    value: 5,
-                    label: '待审核'
-                },
-            ],
-            order_ad: [ //广告状态数据
-                {
-                    value: 1,
-                    label: '待投放'
-                },
-                {
-                    value: 2,
-                    label: '已驳回'
-                },
                 {
                     value: 3,
-                    label: '已撤回'
-                },
-                {
-                    value: 4,
-                    label: '已修改'
+                    label: '已取消'
                 },
                 {
                     value: 5,
@@ -262,11 +255,7 @@ export default {
                 },
                 {
                     value: 7,
-                    label: '已结束'
-                },
-                {
-                    value: 8,
-                    label: '投放中'
+                    label: '已完成'
                 }
             ],
 
@@ -276,7 +265,9 @@ export default {
             // 分页相关
             page: 1,
             pageSize: 10,
-            total: '',
+            total: 0,
+
+            orderads: [],
 
             // 审核弹窗相关
             status_radio: "",   //审核状态
@@ -287,12 +278,14 @@ export default {
             ruleForm: {
                 name: '', //广告名称
                 ad_url: '', //广告网址
+                adImg: '', //广告图
                 radio: '',//广告尺寸
                 startTime: '', //开始时间
                 endTime: '',   //结束时间
                 price: '',  //价格
                 days: '',   //天数
                 num: '',   //个数
+                adPlace: [] //广告位
             },
             rules: {
                 name: [
@@ -304,57 +297,64 @@ export default {
             }
         }
     },
-    watch: {
-        status_radio: {
-            handler(newVal, oldVal) {
-                // console.log(newVal);
-            },
-            deep: true,
-            immediate: true
-        }
-    },
     methods: {
         //1.列表和分页相关 start ------------------------------------------------------------>
         //1.1 开始请求列表信息方法
         getData() {
-            let data = new FormData()
-            data.append('page', this.page)
-            data.append('pageSize', this.pageSize)
-            console.log(data);
+            if (this.order_code == '' || this.order_status == '') {
+                let data = new FormData()
+                data.append('page', this.page)
+                data.append('pageSize', this.pageSize)
+                data.append('status', this.order_status)
+                data.append('order_num', this.order_code)
 
-            getOrderListAdmin(data).then(data => {
-                console.log("全部数据", data);
-                console.log(data.data.rows);
-                this.tableData = data.data.rows
-                this.total = data.data.count
-                for (let item of this.tableData) {
-                    if (item.status == 1) {
-                        item.status = "已通过"
-                    } else if (item.status == 2) {
-                        item.status = "已驳回"
-                    } else if (item.status == 6) {
-                        item.status = "待审核"
+                getOrderListAdmin(data).then(data => {
+                    console.log(data);
+                    this.tableData = data.data.rows
+                    this.total = data.data.count
+                    for (let item of this.tableData) {
+                        if (item.status == 1) {
+                            item.orderStatus = '已通过'
+                        } else if (item.status == 7) {
+                            item.orderStatus = '已完成'
+                        } else if (item.status == 2) {
+                            item.orderStatus = '已驳回'
+                        } else if (item.status == 3) {
+                            item.orderStatus = '已取消'
+                        } else if (item.status == 5) {
+                            item.orderStatus = '已过期'
+                        } else if (item.status == 6) {
+                            item.orderStatus = '待审核'
+                        }
                     }
-
-                    if (item.ad_status == 1) {
-                        item.ad_status = "待投放"
-                    } else if (item.ad_status == 2) {
-                        item.ad_status = "已驳回"
-                    } else if (item.ad_status == 3) {
-                        item.ad_status = "已撤回"
-                    } else if (item.ad_status == 4) {
-                        item.ad_status = "已修改"
-                    } else if (item.ad_status == 5) {
-                        item.ad_status = "已过期"
-                    } else if (item.ad_status == 6) {
-                        item.ad_status = "待审核"
-                    } else if (item.ad_status == 7) {
-                        item.ad_status = "已结束"
-                    } else if (item.ad_status == 8) {
-                        item.ad_status = "待投放"
+                })
+            } else {
+                let data = new FormData()
+                data.append('page', this.page)
+                data.append('pageSize', this.pageSize)
+                console.log(data);
+                getOrderListAdmin(data).then(data => {
+                    console.log("getOrderListAdmin", data);
+                    this.tableData = data.data.rows
+                    this.total = data.data.count
+                    for (let item of this.tableData) {
+                        if (item.status == 1) {
+                            item.orderStatus = '已通过'
+                        } else if (item.status == 7) {
+                            item.orderStatus = '已完成'
+                        } else if (item.status == 2) {
+                            item.orderStatus = '已驳回'
+                        } else if (item.status == 3) {
+                            item.orderStatus = '已取消'
+                        } else if (item.status == 5) {
+                            item.orderStatus = '已过期'
+                        } else if (item.status == 6) {
+                            item.orderStatus = '待审核'
+                        }
                     }
-                }
-            })
+                })
+            }
+
         },
 
         //1.2 删除内容
@@ -414,74 +414,82 @@ export default {
         // 1.6 搜索按钮
         goSearch() {
             console.log(this.status);
-            
+
             let data = new FormData()
             data.append('page', this.page)
             data.append('pageSize', this.pageSize)
-            data.append('status', this.status)
-            data.append('ad_status', this.ad_status)
+            data.append('status', this.order_status)
             data.append('order_num', this.order_code)
-            data.append('sttime', "")
-            data.append('edtime', "")
             console.log(data);
 
             getOrderListAdmin(data).then(data => {
                 console.log(data);
-                console.log(data.data.rows);
                 this.tableData = data.data.rows
                 this.total = data.data.count
                 for (let item of this.tableData) {
                     if (item.status == 1) {
-                        item.status = "已通过"
+                        item.orderStatus = '已通过'
+                    } else if (item.status == 7) {
+                        item.orderStatus = '已完成'
                     } else if (item.status == 2) {
-                        item.status = "已驳回"
+                        item.orderStatus = '已驳回'
+                    } else if (item.status == 3) {
+                        item.orderStatus = '已取消'
+                    } else if (item.status == 5) {
+                        item.orderStatus = '已过期'
                     } else if (item.status == 6) {
-                        item.status = "待审核"
-                    }
-
-                    if (item.ad_status == 1) {
-                        item.ad_status = "待投放"
-                    } else if (item.ad_status == 2) {
-                        item.ad_status = "已驳回"
-                    } else if (item.ad_status == 3) {
-                        item.ad_status = "已撤回"
-                    } else if (item.ad_status == 4) {
-                        item.ad_status = "已修改"
-                    } else if (item.ad_status == 5) {
-                        item.ad_status = "已过期"
-                    } else if (item.ad_status == 6) {
-                        item.ad_status = "待审核"
-                    } else if (item.ad_status == 7) {
-                        item.ad_status = "已结束"
-                    } else if (item.ad_status == 8) {
-                        item.ad_status = "待投放"
+                        item.orderStatus = '待审核'
                     }
                 }
             })
         },
         //1.7 重置按钮
         goReset() {
-            this.order_code = '',
-                this.status = ''
-            this.ad_status = ''
+            this.order_code = ''
+            this.order_status = ''
+            this.page = 1
+            this.pageSize = 10
             this.getData();
         },
         //列表和分页相关 end ------------------------------------------------------------>
 
         //1.9 编辑
         goEdit(id, val) {
-            console.log(id);
-
+            console.log(id, val);
             this.activeid = id
             this.dialogTableVisible = true
-            console.log(id, val);
-            this.ruleForm.name = val.user_name
-            this.ruleForm.ad_url = val.ad_url
-            // this.ruleForm.radio = val.width
+            this.ruleForm.name = val.name
+            if (val.width == 1200) {
+                this.ruleForm.radio = '1'
+            } else {
+                this.ruleForm.radio = '2'
+            }
             this.ruleForm.startTime = val.sttime
             this.ruleForm.endTime = val.edtime
-            this.ruleForm.price = val.price
             this.ruleForm.days = val.days
+
+            let data = new FormData()
+            data.append('id', id)
+
+            //查看列表详情
+            getOrderDetailAdmin(data).then(data => {
+                // console.log('详情', data);
+                console.log('详情', data.data.ad[0]?.image_url);
+
+                this.ruleForm.ad_url = data.data.ad[0]?.image_url //广告链接
+                this.ruleForm.adImg = data.data.ad[0]?.image_src //广告图
+                this.ruleForm.num = data.data.ad.length //广告个数
+                this.ruleForm.price = val.price / val.days / this.ruleForm.num //广告价格
+
+                let adPlace = data.data.ad
+
+                this.ruleForm.adPlace = []
+
+                for (let item of adPlace) {
+                    this.ruleForm.adPlace.push(item.ad_name)//广告位名称
+                }
+                console.log(this.ruleForm.adPlace);
+            })
         },
 
         //2.0 审核
@@ -517,20 +525,20 @@ export default {
                 let data = new FormData()
                 data.append('id', this.activeid)
                 data.append('reason', this.textarea)
-                rejectOrderAdmin(data).then(data=>{
+                rejectOrderAdmin(data).then(data => {
                     console.log(data);
-                    if(data.code==200){
+                    if (data.code == 200) {
                         this.$message({
-                            message:'修改成功',
-                            type:'success'
+                            message: '修改成功',
+                            type: 'success'
                         })
                         this.dialogFormVisible = false
                         this.getData()
                     }
-                    if(data.code==0){
+                    if (data.code == 0) {
                         this.$message({
-                            message:data.message,
-                            type:'error'
+                            message: data.message,
+                            type: 'error'
                         })
                     }
                 })
@@ -540,9 +548,10 @@ export default {
         // 弹出层相关方法
         // 提交表单
         submitForm() {
+            let total = this.ruleForm.price * this.ruleForm.days * this.ruleForm.num
             let data = new FormData()
             data.append('id', this.activeid)
-            data.append('price', this.ruleForm.price)
+            data.append('price', total.toFixed(2))
             editOrderAdmin(data).then(data => {
                 console.log(data);
                 if (data.code == 200) {
@@ -551,13 +560,13 @@ export default {
                         message: '修改成功',
                         type: 'success'
                     })
+                    this.getData()
                 }
                 if (data.code == 0) {
                     this.$message({
                         message: data.message + ',需要保留两位小数',
                         type: 'error'
                     })
-                    this.dialogTableVisible = true
                 }
             })
         },
@@ -617,7 +626,7 @@ export default {
             position: relative;
             font-size: 14px;
             display: inline-block;
-            width: 73%;
+            width: 90%;
         }
 
         .searchTitle {
@@ -738,24 +747,28 @@ export default {
     padding-bottom: 1px;
     padding: 0px 60px 1px 20px;
 
+    .zhi {
+        text-align: center;
+    }
+
     .adImage {
         width: 140px;
         height: 140px;
-        line-height: 210px;
+        // line-height: 210px;
         border-radius: 12px;
         border: 1px solid rgba(85, 112, 241, 0.11);
 
         img {
             width: 140px;
-            height: 80px;
+            // height: 80px;
         }
     }
 
-    .price {
-        ::v-deep .el-input {
-            width: 29%;
-        }
-    }
+    // .price {
+    //     ::v-deep .el-input {
+    //         width: 29%;
+    //     }
+    // }
 
     .example {
         font-family: Microsoft YaHei;
@@ -769,7 +782,7 @@ export default {
 
     //日期时间选择器的宽
     ::v-deep .el-date-editor.el-input {
-        width: 48%;
+        width: 100%;
     }
 
     ::v-deep .el-button+.el-button {

+ 5 - 3
src/views/crawler/webCrawlerList.vue

@@ -355,9 +355,11 @@ export default {
         },
         //1.7 重置按钮
         goReset() {
-            this.message_name = '',
-                this.message_from = '',
-                this.message_state = ''
+            this.message_name = ''
+            this.message_from = ''
+            this.message_state = ''
+            this.page = 1
+            this.pageSize = 10
             this.getData()
         },
         //列表和分页相关 end ------------------------------------------------------------>

Some files were not shown because too many files changed in this diff