suxinf hace 4 años
padre
commit
ebdca488e0

+ 12 - 9
src/views/data/UploadInfor.vue

@@ -219,18 +219,20 @@ export default {
     clickCheckbox(i) {
       let list = this.checkedBoxList;
       let include = list.indexOf("all");
-      if (i === 0) {
-        this.checkedBoxList = [];
-        return;
-      }
-      if (include >= 0) {
-        this.checkedBoxList.splice(0, 1);
-      }
+      console.log(i, include);
+      // if (i === 0) {
+      //   this.checkedBoxList = [];
+      //   return;
+      // }
+      // if (include >= 0) {
+      //   this.checkedBoxList.splice(0, 1);
+      // }
     },
     // 点击按区域添加button
     addByArea: function () {
+      let strReq = this.checkedBoxList.join(",");
       let req = {
-        localArea: this.checkedBoxList,
+        localArea: strReq
       };
       console.log(req,'按区域添加');
       this.getAllDlr(req);
@@ -259,8 +261,9 @@ export default {
           this.addGroupList.push(element.id);
         }
       });
+      let strReq = this.addGroupList.join(",");
       let req = {
-        groupList: this.addGroupList
+        groupId: strReq
       }
       console.log('点击按小组添加入参', req)
       this.getAllDlr(req);

+ 47 - 35
src/views/data/UploadLinks.vue

@@ -9,14 +9,15 @@
             @focus="focusInput"
             v-model="inputValue"
             class="inputFocus"
+            placeholder="DLR Code / 经销商"
           />
         </div>
         <div class="area">
           <p>所属区域</p>
           <select v-model="areaValue">
             <option value="">请选择</option>
-            <option v-for="(item, index) in areaLists" :key="index">
-              {{ item.area }}
+            <option v-for="(item, index) in areaList" :key="index">
+              {{ item }}
             </option>
           </select>
         </div>
@@ -34,9 +35,11 @@
       <Count :sum="sum" />
     </div>
     <div class="tableBox">
-      <Table :tableData="tableData"></Table>
+      <Table
+        :tableData="tableData"
+        @go_detail="ulrJump"
+      ></Table>
     </div>
-
     <TablePage
       :currentPage="currentPage"
       :totalPage="totalPage"
@@ -47,7 +50,6 @@
 </template>
 
 <script>
-import { AREASLIST } from "./uploadinfo";
 import TablePage from "../../components/TablePage";
 import Count from "../../components/Count";
 import Table from "./components/UploadLinksTable";
@@ -59,30 +61,12 @@ export default {
   },
   data() {
     return {
-      inputValue: "DLR Code / 经销商",
-      sum: 120,
+      inputValue: "",
+      sum: 0,
       currentPage: 1,
       pageSize: 20,
-      tableData: [
-        {
-          code: "L2021",
-          name: "雷克萨斯ES上市",
-          area: "北区",
-          time: "2021/03/04",
-          dataName: "雷克萨斯ES上市",
-          feedbackTime: "2021/03/04",
-          carSeries: "雷克萨斯ES",
-          carType: "ES雷克萨斯",
-          releaseMedia: "汽车之家",
-          releasePlate: "ES论坛",
-          projectClass: "东区",
-          contentClass: "产品",
-          contentClass2: "活动",
-          articleTitle: "雷克萨斯全新ES上市",
-          articleLink: "http://localhost:8080/#/uploadLinks",
-        },
-      ],
-      areaLists: AREASLIST,
+      tableData: [],
+      areaList: [],
       areaValue: "",
       startTime: "",
       endTime: "",
@@ -100,14 +84,17 @@ export default {
       this.inputValue = "";
     },
     search: function () {
-      let data= {
-        code: this.inputValue,
-        area: this.areaValue,
+      let data = {
+        queryParams: this.inputValue,
+        localArea: this.areaValue,
         startTime: this.startTime,
-        endTime: this.areaValue
-      }
+        endTime: this.endTime,
+      };
+      console.log(data,)
       this.firmsLinkUpload(data);
-      this.inputValue = "DLR Code / 经销商";
+      this.areaValue = '';
+      this.startTime = '';
+      this.endTime = '';
     },
     changePage: function (page) {
       this.currentPage = page;
@@ -131,15 +118,39 @@ export default {
       }
       this.firmsLinkUpload({});
     },
+    ulrJump: function(url) {
+      console.log(url)
+      window.location.href = url;
+    },
     // 获取表格数据
-    firmsLinkUpload: function (data={}) {
+    firmsLinkUpload: function (data = {}) {
       this.$http({
         method: "post",
         url: "/firmsLinkUpload",
         data: data,
       })
         .then((res) => {
-          console.log(res, '厂商链接上传');
+          this.tableData = res.data.data;
+          this.sum = res.data.count;
+          console.log(res.data.data, "厂商链接上传");
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 获取 所有区域  接口
+    getAreaList: function () {
+      this.$http({
+        method: "post",
+        url: "/sys/agent/selectAgentAreaInfoList",
+      })
+        .then((res) => {
+          console.log(res, 1111111);
+          if (res.data && res.data.code === 200) {
+            this.areaList = res.data.data;
+          } else {
+            console.log(res);
+          }
         })
         .catch((err) => {
           console.log(err);
@@ -148,6 +159,7 @@ export default {
   },
   created() {
     this.firmsLinkUpload();
+    this.getAreaList();
   },
 };
 </script>

+ 1 - 4
src/views/data/UploadRecord.vue

@@ -34,7 +34,6 @@
     </div>
     <div v-else>
       <Detail
-        :detailData='detailData'
       ></Detail>
     </div>
   </div>
@@ -60,7 +59,6 @@ export default {
       currentPage: 1,
       pageSize: 20,
       tableData: [],
-      detailData: {}
     };
   },
   computed: {
@@ -132,8 +130,7 @@ export default {
       }, 2000)
     },
     detail: function (i) {
-      this.detailData = this.tableData[i];
-      this.$router.push({ query: { tag: 'detail' } });
+      this.$router.push({ query: { tag: 'detail', id: i } });
     },
     // 上传记录列表接口
     getFirmsUploadList: function (data = {}) {

+ 4 - 5
src/views/data/components/RecordDetailTable.vue

@@ -15,10 +15,10 @@
           :key="index"
           :class="{ table_gray: index % 2 === 0 }"
         >
-          <td>{{ index + 1 }}</td>
-          <td>{{ obj.dlrCode }}</td>
-          <td>{{ obj.dlrName }}</td>
-          <td>{{ obj.localArea }}</td>
+          <td style="width: 7%">{{ index + 1 }}</td>
+          <td style="width: 18%">{{ obj.dlrCode }}</td>
+          <td style="width: 60%">{{ obj.dlrName }}</td>
+          <td style="width: 15%">{{ obj.localArea }}</td>
         </tr>
       </tbody>
     </table>
@@ -57,7 +57,6 @@ export default {
     overflow: auto;
     td {
       border: 1px solid #ccc;
-      width: 25%;
       height: 29px;
     }
     thead {

+ 1 - 1
src/views/data/components/UploadInforTable.vue

@@ -24,7 +24,7 @@
             <img
               src="../../../img/add.png"
               @click="changeIcon(index)"
-              v-if="item.flag"
+              v-if="!item.flag"
             />
             <img
               src="../../../img/delete.png"

+ 17 - 12
src/views/data/components/UploadLinksTable.vue

@@ -31,21 +31,21 @@
           :class="{ table_gray: index % 2 === 0 }"
         >
           <td style="width: 80px">{{ index + 1 }}</td>
-          <td>{{ obj.code }}</td>
-          <td style="width: 180px">{{ obj.name }}</td>
-          <td>{{ obj.area }}</td>
-          <td>{{ obj.time }}</td>
-          <td style="width: 180px">{{ obj.dataName }}</td>
+          <td>{{ obj.dlrCode }}</td>
+          <td style="width: 180px">{{ obj.dlrName }}</td>
+          <td>{{ obj.localArea }}</td>
+          <td>{{ obj.publishDate }}</td>
+          <td style="width: 180px">{{ obj.informationName }}</td>
           <td>{{ obj.feedbackTime }}</td>
           <td>{{ obj.carSeries }}</td>
-          <td>{{ obj.carType }}</td>
-          <td>{{ obj.releaseMedia }}</td>
-          <td>{{ obj.releasePlate }}</td>
-          <td>{{ obj.projectClass }}</td>
-          <td>{{ obj.contentClass }}</td>
+          <td>{{ obj.carTypeName }}</td>
+          <td>{{ obj.publishPlatformName }}</td>
+          <td>{{ obj.publishSourceName }}</td>
+          <td>{{ obj.projectTypeName }}</td>
+          <td>{{ obj.contentTypeName }}</td>
           <td>{{ obj.contentClass2 }}</td>
           <td style="width: 240px">
-              <a :href="obj.articleLink" class="blueStyle">{{ obj.articleTitle}}</a>
+              <div class="blueStyle" @click="ulrJump(obj.mediaUrl)">{{ obj.mediaTitle}}</div>
             </td>
         </tr>
       </tbody>
@@ -68,7 +68,12 @@ export default {
   data() {
     return {};
   },
-  methods: {},
+  methods: {
+    ulrJump: function(url) {
+      console.log(url);
+      this.$emit('go_detail', url)
+    }
+  },
 };
 </script>
 

+ 67 - 40
src/views/data/components/UploadRecordDetail.vue

@@ -51,11 +51,8 @@
       <div class="table" v-show="isShowTable">
         <div class="table_option">
           <select @change="seletByArea" v-model="optionValue">
-            <option value="" selected>全区</option>
-            <option value="s">南区</option>
-            <option value="n">北区</option>
-            <option value="e">东区</option>
-            <option value="self">自定义分组</option>
+            <option value="">请选择</option>
+            <option v-for="(item, index) in areaList" :key="index">{{item}}</option>
           </select>
           <div class="hidTable" @click="hidTable">
             <img src="../../../img/crossMark.png" />
@@ -88,24 +85,14 @@ import Table from "./RecordDetailTable";
 import Count from "../../../components/Count";
 import TablePage from "../../../components/TablePage";
 export default {
-  props: {
-    detailData: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-  },
   components: {
     Table,
     Count,
     TablePage,
   },
   mounted() {
-    let id = this.detailData['id'];
-    let data = {informationId: id};
-    console.log(this.detailData, 11);
-    this.selectInformationFileList(data);
+    this.getFirmsUploadList();
+    this.getAreaList();
   },
   data() {
     return {
@@ -115,7 +102,10 @@ export default {
       pageSize: 20,
       tableData: [],
       optionValue: "",
-      filesList: []
+      filesList: [],
+      index: (this.$route.query && this.$route.query.id) || "",
+      detailData: {},
+      areaList: []
     };
   },
   computed: {
@@ -128,20 +118,19 @@ export default {
     showTable: function () {
       this.isShowTable = !this.isShowTable;
       let id = this.detailData["id"];
-      let  dataObj= {
-          informationId: id,
-        };
-      this.getDlrData(dataObj);
+      let req = {
+        informationId: id,
+      };
+      this.getDlrData(req);
     },
     hidTable: function () {
       this.isShowTable = false;
     },
     seletByArea: function () {
-      console.log(this.optionValue, 111);
-      let dataObj = {
-        localArea: ['东区', '南区']
-      }
-      this.getDlrData(dataObj);
+      let req = {
+        localArea: this.optionValue,
+      };
+      this.getDlrData(req);
     },
     // 获取某一页面的数据,展示在表格
     changePage: function (page) {
@@ -170,10 +159,10 @@ export default {
     downloadFile: function (i) {
       console.log(i);
       let dataObj = {
-        fileId: this.filesList[i]['id'],
-        informationId: this.filesList[i]['informationId'],
+        fileId: this.filesList[i]["id"],
+        informationId: this.filesList[i]["informationId"],
         //agentId: this.filesList[i]['agentId'] 如果是厂商下载不传agentId
-      }
+      };
       console.log(dataObj);
       this.dealerDownload(dataObj);
     },
@@ -181,10 +170,49 @@ export default {
     downloadExcel: function () {
       let id = this.detailData["id"];
       let data = {
-        informationId: id
-      }
+        informationId: id,
+      };
       this.exportTem(data);
     },
+    // 上传记录列表接口 获取对应详情
+    getFirmsUploadList: function (data = {}) {
+      this.$http({
+        method: "post",
+        url: "/firmsUploadList",
+        data: data,
+      })
+        .then((res) => {
+          if (res.data && res.data.code === 200) {
+            this.detailData = res.data.data[this.index];
+            let id = this.detailData["id"];
+            let req = { informationId: id };
+            this.selectInformationFileList(req);
+          } else {
+            console.log(res);
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 获取 所有区域  接口
+    getAreaList: function () {
+      this.$http({
+        method: "post",
+        url: "/sys/agent/selectAgentAreaInfoList",
+      })
+        .then((res) => {
+          if (res.data && res.data.code === 200) {
+            this.areaList = res.data.data;
+            console.log(this.areaList);
+          } else {
+            console.log(res);
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
     // 导出   接口
     exportTem: function (data) {
       return new Promise((resolve, reject) => {
@@ -212,15 +240,14 @@ export default {
       });
     },
     // 分页获取所有进销商信息接口
-    getDlrData: function (dataObj={}) {
+    getDlrData: function (dataObj = {}) {
       this.$http({
         method: "post",
         url: "/sys/agent/selectAgentInfoPage",
-        data: dataObj
+        data: dataObj,
       })
         .then((res) => {
           if (res.data && res.data.code === 200) {
-            console.log(res.data.data);
             this.tableData = res.data.data;
             this.sum = res.data.count;
           } else {
@@ -236,12 +263,12 @@ export default {
       this.$http({
         method: "post",
         url: "/selectInformationFileList",
-        data: data
+        data: data,
       })
         .then((res) => {
           if (res.data && res.data.code === 200) {
             this.filesList = res.data.data;
-            console.log(res.data.data , '文件');
+            console.log(res.data.data, "文件");
           } else {
             console.log(res);
           }
@@ -251,11 +278,11 @@ export default {
         });
     },
     // 文件下载接口
-    dealerDownload: function(data) {
+    dealerDownload: function (data) {
       this.$http({
         method: "post",
         url: "/dealerDownload",
-        data: data
+        data: data,
       })
         .then((res) => {
           if (res.data.code === 200) {
@@ -274,7 +301,7 @@ export default {
         .catch((err) => {
           console.log(err);
         });
-    }
+    },
   },
 };
 </script>

+ 4 - 2
src/views/parameter/components/Grouping/GroupMember.vue

@@ -97,8 +97,9 @@ export default {
     deleteData (index) {
       let req = {
         id: this.tableData[index]['id'],
-        groupId: this.groupId
+        groupId: this.groupId,
       }
+      console.log(req);
       this.deleteAgentInfo(req).then(() => {
         this.selectAgentInfoPage(this.groupId);
       })
@@ -106,9 +107,10 @@ export default {
     },
     // 新增车型模态框 保存
     submit: function(list) {
+      let strReq = list.join(",");
       let req = {
         groupId: this.groupId,
-        agentId: list
+        agentId: strReq
       }
       console.log(req, '入参')
       this.groupAddDlr(req).then(() => {

+ 10 - 9
src/views/parameter/components/Grouping/GroupMemberModal.vue

@@ -119,20 +119,21 @@ export default {
     clickCheckbox(i) {
       let list = this.checkedBoxList;
       let include = list.indexOf("全区");
-      if (i === 0) {
-        this.checkedBoxList = [];
-        return;
-      }
-      if (include >= 0) {
-        this.checkedBoxList.splice(0, 1);
-      }
+      console.log(include, i);
+      // if (i === 0) {
+      //   this.checkedBoxList = [];
+      //   return;
+      // }
+      // if (include >= 0) {
+      //   this.checkedBoxList.splice(0, 1);
+      // }
     },
     // 点击按区域添加button
     addByArea: function () {
+      let strReq = this.checkedBoxList.join(",");
       let req = {
-        localArea: this.checkedBoxList,
+        localArea: strReq,
       };
-      console.log(req);
       this.getDlrData(req);
     },
     // 自定义添加