Browse Source

处理接口问题

306132416@qq.com 5 years ago
parent
commit
0b18ee5905

+ 1 - 1
src/App.vue

@@ -36,7 +36,7 @@ export default {
     return {
       navTitle1: ' > 数据管理',
       navTitle2: '',
-      isManufacturer: 'distributor', // distributor 经销商 manufacturer 厂商
+      isManufacturer: 'manufacturer', // distributor 经销商 manufacturer 厂商
     }
   },
   methods: {

+ 2 - 2
src/views/data/InforList.vue

@@ -69,8 +69,8 @@
                 <td>{{ obj.filePulishTime || "2021/02" }}</td>
                 <td>{{ obj.accountScope === 1 ? "共通" : "部分" }}</td>
                 <td>{{ obj.fileUploadDate || "2021/01/10 12:12" }}</td>
-                <td>{{ obj.download === 1 ? "已下载" : "未下载" }}</td>
-                <td>{{ obj.report === 1 ? "已反馈" : "未反馈" }}</td>
+                <td>{{ obj.download > 0 ? "已下载" : "未下载" }}</td>
+                <td>{{ obj.report === '1' ? "已反馈" : "未反馈" }}</td>
 
                 <td v-if="operation" :style="trStyle" class="operationStyle">
                   <span

+ 249 - 248
src/views/parameter/CarSeries.vue

@@ -1,248 +1,249 @@
-<template>
-  <div>
-    <div class="car_series" v-if="queryTag">
-      <div class="count">
-        <button @click="showModal">新增车系</button>
-        <Count :sum="sum"></Count>
-      </div>
-      <div class="table">
-        <Table
-          :tableData="tableData"
-          @edit="edit"
-          @delet_data="deleteData"
-          @car_type="carType"
-          :pageSize="sum"
-        ></Table>
-      </div>
-      <div class="page">
-        <Tablepage
-          :totalPage="totalPage"
-          :currentPage="currentPage"
-          @change_page="changePage"
-          @jump_page="jumpPage"
-        ></Tablepage>
-      </div>
-      <div class="modal" v-if="modalFlag">
-        <Modal
-          :modalFlag="modalFlag"
-          @hide_modal="showModal"
-          @submit="submit"
-        ></Modal>
-      </div>
-    </div>
-    <div v-else>
-      <CarType />
-    </div>
-  </div>
-</template>
-
-<script>
-import Count from "../../components/Count";
-import Tablepage from "../../components/TablePage";
-import Table from "./components/Carseries/CarSeriesTable";
-import Modal from "./components/Carseries/CarSeriesModal";
-import CarType from "./components/Carseries/CarType";
-export default {
-  components: {
-    Count,
-    Table,
-    Tablepage,
-    Modal,
-    CarType,
-  },
-  data() {
-    return {
-      sum: 140, // 一共有多少条数据
-      pageSize: 20, // 每页展示的数据
-      currentPage: 1,
-      // 表格配置
-      tableData: [],
-      modalFlag: false, // 控制模态框展示
-    };
-  },
-  computed: {
-    // 表格总页数
-    totalPage() {
-      return Math.ceil(this.sum / this.pageSize);
-    },
-    // 获取路由参数
-    queryTag() {
-      return this.$route.query && this.$route.query.tag ? 0 : 1;
-    },
-  },
-  methods: {
-    // 获取某一页面的数据,展示在表格
-    changePage: function (page) {
-      this.currentPage = page;
-      console.log(page);
-    },
-    // 点击上一页,下一页,首页,尾页
-    jumpPage: function (item) {
-      switch (item) {
-        case 1:
-          this.currentPage = 1;
-          break;
-        case 2:
-          this.currentPage = this.currentPage - 1;
-          break;
-        case 3:
-          this.currentPage = this.currentPage + 1;
-          break;
-        case 4:
-          this.currentPage = this.totalPage;
-          break;
-      }
-      console.log(this.currentPage);
-    },
-    // 展示、隐藏模态框
-    showModal: function () {
-      this.modalFlag = !this.modalFlag;
-    },
-    // 模态框保存
-    submit: function (car) {
-      this.addCarSeries(car).then(() => {
-        this.getDateList();
-      });
-      this.modalFlag = false;
-    },
-    // 点击编辑
-    edit(index, newName) {
-      let id = this.tableData[index]["id"];
-      console.log(id, newName);
-      let req = {
-        id,
-        typeName: newName,
-      };
-      this.updataCarTypeInfo(req).then(() => {
-        this.getDateList();
-      });
-    },
-    // 点击删除
-    deleteData: function (index) {
-      let id = this.tableData[index]["id"];
-      console.log(id);
-      this.deleteCarTypeInfo(id).then(() => {
-        this.getDateList();
-      });
-      console.log("删除", index);
-    },
-    // 点击系列车型
-    carType: function (index) {
-      // 页面变化
-      this.$router.push({ query: { tag: "vehicle_type", id: this.tableData[index]['id'] } });
-    },
-    // 新增车系  接口
-    addCarSeries: function (typeName) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          url: "/base/carTypeManager/addCarTypeInfo",
-          method: "post",
-          data: { typeName: typeName },
-        })
-          .then((res) => {
-            if (res.data && res.data.code === 200) {
-              resolve();
-            } else {
-              alert("新增失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            alert("新增失败,请重试");
-            reject(err);
-          });
-      });
-    },
-    // 获取列表数据  接口
-    getDateList: function () {
-      this.$http({
-        method: "post",
-        url: "/base/carTypeManager/selectCarTypePage",
-        data: {},
-      })
-        .then((res) => {
-          if (res.data && res.data.code === 200) {
-            console.log(res);
-            this.tableData = res.data.data;
-            this.sum = res.data.count;
-          } else {
-            console.log(res);
-          }
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    },
-    // 编辑车系  接口
-    updataCarTypeInfo: function (data) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          url: "/base/carTypeManager/updateCarTypeInfo",
-          method: "post",
-          data,
-        })
-          .then((res) => {
-            if (res.data && res.data.code === 200) {
-              resolve();
-            } else {
-              alert("编辑失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            alert("编辑失败,请重试");
-            reject(err);
-          });
-      });
-    },
-    // 删除车系   接口
-    deleteCarTypeInfo: function (id) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          url: "/base/carTypeManager/deleteCarTypeInfo",
-          method: "post",
-          data: {
-            id,
-          },
-        })
-          .then((res) => {
-            if (res.data && res.data.code === 200) {
-              resolve();
-            } else {
-              alert("删除失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            alert("删除失败,请重试");
-            reject(err);
-          });
-      });
-    },
-  },
-  mounted() {},
-  created() {
-    this.getDateList();
-  },
-};
-</script>
-
-<style scoped lang="less">
-.car_series {
-  .count {
-    height: 40px;
-    width: 100%;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    button {
-      width: 86px;
-      height: 30px;
-      position: relative;
-      bottom: -5px;
-      margin: 0;
-      border-radius: 2px;
-    }
-  }
-}
-</style>
+<template>
+  <div>
+    <div class="car_series" v-if="queryTag">
+      <div class="count">
+        <button @click="showModal">新增车系</button>
+        <Count :sum="sum"></Count>
+      </div>
+      <div class="table">
+        <Table
+          :tableData="tableData"
+          @edit="edit"
+          @delet_data="deleteData"
+          @car_type="carType"
+          :pageSize="sum"
+        ></Table>
+      </div>
+      <div class="page">
+        <Tablepage
+          :totalPage="totalPage"
+          :currentPage="currentPage"
+          @change_page="changePage"
+          @jump_page="jumpPage"
+        ></Tablepage>
+      </div>
+      <div class="modal" v-if="modalFlag">
+        <Modal
+          :modalFlag="modalFlag"
+          @hide_modal="showModal"
+          @submit="submit"
+        ></Modal>
+      </div>
+    </div>
+    <div v-else>
+      <CarType />
+    </div>
+  </div>
+</template>
+
+<script>
+import Count from "../../components/Count";
+import Tablepage from "../../components/TablePage";
+import Table from "./components/Carseries/CarSeriesTable";
+import Modal from "./components/Carseries/CarSeriesModal";
+import CarType from "./components/Carseries/CarType";
+export default {
+  components: {
+    Count,
+    Table,
+    Tablepage,
+    Modal,
+    CarType,
+  },
+  data() {
+    return {
+      sum: 140, // 一共有多少条数据
+      pageSize: 20, // 每页展示的数据
+      currentPage: 1,
+      // 表格配置
+      tableData: [],
+      modalFlag: false, // 控制模态框展示
+    };
+  },
+  computed: {
+    // 表格总页数
+    totalPage() {
+      return Math.ceil(this.sum / this.pageSize);
+    },
+    // 获取路由参数
+    queryTag() {
+      return this.$route.query && this.$route.query.tag ? 0 : 1;
+    },
+  },
+  methods: {
+    // 获取某一页面的数据,展示在表格
+    changePage: function (page) {
+      this.currentPage = page;
+      console.log(page);
+    },
+    // 点击上一页,下一页,首页,尾页
+    jumpPage: function (item) {
+      switch (item) {
+        case 1:
+          this.currentPage = 1;
+          break;
+        case 2:
+          this.currentPage = this.currentPage - 1;
+          break;
+        case 3:
+          this.currentPage = this.currentPage + 1;
+          break;
+        case 4:
+          this.currentPage = this.totalPage;
+          break;
+      }
+      console.log(this.currentPage);
+    },
+    // 展示、隐藏模态框
+    showModal: function () {
+      this.modalFlag = !this.modalFlag;
+    },
+    // 模态框保存
+    submit: function (car) {
+      this.addCarSeries(car).then(() => {
+        this.getDateList();
+      });
+      this.modalFlag = false;
+    },
+    // 点击编辑
+    edit(index, newName) {
+      let id = this.tableData[index]["id"];
+      console.log(id, newName);
+      let req = {
+        id,
+        typeName: newName,
+      };
+      this.updataCarTypeInfo(req).then(() => {
+        this.getDateList();
+      });
+    },
+    // 点击删除
+    deleteData: function (index) {
+      let id = this.tableData[index]["id"];
+      console.log(id);
+      this.deleteCarTypeInfo(id).then(() => {
+        this.getDateList();
+      });
+      console.log("删除", index);
+    },
+    // 点击系列车型
+    carType: function (index) {
+      // 页面变化
+      this.$router.push({ query: { tag: "vehicle_type", id: this.tableData[index]['id'] } });
+    },
+    // 新增车系  接口
+    addCarSeries: function (typeName) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          url: "/base/carTypeManager/addCarTypeInfo",
+          method: "post",
+          data: { typeName: typeName },
+        })
+          .then((res) => {
+            if (res.data && res.data.code === 200) {
+              resolve();
+            } else {
+              alert("新增失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            alert("新增失败,请重试");
+            reject(err);
+          });
+      });
+    },
+    // 获取列表数据  接口
+    getDateList: function () {
+      this.$http({
+        method: "post",
+        url: "/base/carTypeManager/selectCarTypePage",
+        data: {},
+      })
+        .then((res) => {
+          if (res.data && res.data.code === 200) {
+            console.log(res);
+            this.tableData = res.data.data;
+            this.sum = res.data.count;
+          } else {
+            console.log(res);
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 编辑车系  接口
+    updataCarTypeInfo: function (data) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          url: "/base/carTypeManager/updateCarTypeInfo",
+          method: "post",
+          data,
+        })
+          .then((res) => {
+            if (res.data && res.data.code === 200) {
+              resolve();
+            } else {
+              alert("编辑失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            alert("编辑失败,请重试");
+            reject(err);
+          });
+      });
+    },
+    // 删除车系   接口
+    deleteCarTypeInfo: function (id) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          url: "/base/carTypeManager/deleteCarTypeInfo",
+          method: "post",
+          data: {
+            id,
+            parentId:id
+          },
+        })
+          .then((res) => {
+            if (res.data && res.data.code === 200) {
+              resolve();
+            } else {
+              alert("删除失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            alert("删除失败,请重试");
+            reject(err);
+          });
+      });
+    },
+  },
+  mounted() {},
+  created() {
+    this.getDateList();
+  },
+};
+</script>
+
+<style scoped lang="less">
+.car_series {
+  .count {
+    height: 40px;
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    button {
+      width: 86px;
+      height: 30px;
+      position: relative;
+      bottom: -5px;
+      margin: 0;
+      border-radius: 2px;
+    }
+  }
+}
+</style>

+ 253 - 253
src/views/parameter/Grouping.vue

@@ -1,253 +1,253 @@
-<template>
-  <div>
-    <div class="grouping" v-if="queryTag">
-      <div class="count">
-        <button @click="showModal">新增小组</button>
-        <Count :sum="sum"></Count>
-      </div>
-      <div class="table">
-        <Table
-          :tableData="tableData"
-          @edit="edit"
-          @delet_data="deleteData"
-          @group_member="groupMember"
-          :pageSize="sum"
-        ></Table>
-      </div>
-      <div class="page">
-        <Tablepage
-          :totalPage="totalPage"
-          :currentPage="currentPage"
-          @change_page="changePage"
-          @jump_page="jumpPage"
-        ></Tablepage>
-      </div>
-      <div class="modal" v-if="modalFlag">
-        <Modal
-          :modalFlag="modalFlag"
-          @hide_modal="showModal"
-          @submit="submit"
-        ></Modal>
-      </div>
-    </div>
-    <div v-else>
-      <GroupMember />
-    </div>
-  </div>
-</template>
-
-<script>
-import Count from "../../components/Count";
-import Tablepage from "../../components/TablePage";
-import Table from "./components/Grouping/GroupingTable";
-import Modal from "./components/Grouping/GroupingModal";
-import GroupMember from "./components/Grouping/GroupMember";
-export default {
-  components: {
-    Count,
-    Table,
-    Tablepage,
-    Modal,
-    GroupMember,
-  },
-  data() {
-    return {
-      sum: 140, // 一共有多少条数据
-      pageSize: 20, // 每页展示的数据
-      currentPage: 1,
-      // 表格配置
-      tableData: [],
-      modalFlag: false, // 控制模态框展示
-    };
-  },
-  computed: {
-    // 表格总页数
-    totalPage() {
-      return Math.ceil(this.sum / this.pageSize);
-    },
-    // 获取路由参数
-    queryTag() {
-      return this.$route.query && this.$route.query.tag ? 0 : 1;
-    },
-  },
-  methods: {
-    // 获取某一页面的数据,展示在表格
-    changePage: function (page) {
-      this.currentPage = page;
-      console.log(page);
-    },
-    // 点击上一页,下一页,首页,尾页
-    jumpPage: function (item) {
-      switch (item) {
-        case 1:
-          this.currentPage = 1;
-          break;
-        case 2:
-          this.currentPage = this.currentPage - 1;
-          break;
-        case 3:
-          this.currentPage = this.currentPage + 1;
-          break;
-        case 4:
-          this.currentPage = this.totalPage;
-          break;
-      }
-      console.log(this.currentPage);
-    },
-    // 展示、隐藏模态框
-    showModal: function () {
-      this.modalFlag = !this.modalFlag;
-    },
-    // 模态框保存,
-    submit: function (groupName) {
-      this.addGroupInfo(groupName).then(() => {
-        this.selectGroupList();
-      });
-      this.modalFlag = false;
-    },
-    // 点击编辑
-    edit(index, newName) {
-      console.log(index, newName);
-      let id = this.tableData[index]['id'];
-      this.updateGroupInfo(id, newName).then(() => { 
-        this.selectGroupList();
-      })
-    },
-    // 点击删除
-    deleteData: function (index) {
-      console.log("删除", index);
-      let id = this.tableData[index]['id'];
-      this.deleteGroupInfo(id).then(() => {
-        this.selectGroupList();
-      })
-    },
-    // 点击小组成员
-    groupMember: function (index) {
-      // 页面变化
-      this.$router.push({ query: { tag: "group_member", id: this.tableData[index]['id'] } });
-    },
-    // 新增小组 接口
-    addGroupInfo: function (groupName) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          method: "post",
-          url: "/sys/group/addGroupInfo",
-          data: {
-            groupName
-          },
-        })
-          .then((res) => {
-            if (res.data && res.data.code === 200) {
-              console.log(res);
-              resolve();
-            } else {
-              alert("新增失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            console.log(err);
-            reject(err);
-          });
-      });
-    },
-    // 获取列表 接口
-    selectGroupList: function () {
-      this.$http({
-        method: "post",
-        url: "/sys/group/selectGroupList",
-        data: {},
-      })
-        .then((res) => {
-          if (res.data && res.data.code === 200) {
-            console.log(res);
-            this.tableData = res.data.data;
-            this.sum = res.data.count;
-          } else {
-            console.log(res);
-          }
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    },
-    // 编辑平台模块,接口
-    updateGroupInfo: function (id, platformName) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          method: "post",
-          url: "/sys/group/updateGroupInfo",
-          data: {
-            id,
-            platformName,
-          },
-        })
-          .then((res) => {
-            console.log(res, 1111);
-            if (res.data && res.data.code === 200) {
-              console.log(res);
-              resolve();
-            } else {
-              alert("编辑失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            alert("编辑失败,请重试");
-            console.log(err);
-            reject(err);
-          });
-      });
-    },
-    // 删除平台模块 接口
-    deleteGroupInfo: function (id) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          method: "post",
-          url: "/sys/group/deleteGroupInfo",
-          data: {
-            id
-          },
-        })
-          .then((res) => {
-            if (res.data && res.data.code === 200) {
-              console.log(res);
-              resolve();
-            } else {
-              alert("编辑失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            alert("编辑失败,请重试");
-            console.log(err);
-            reject(err);
-          });
-      });
-    },
-  },
-  created() {
-    this.selectGroupList();
-  }
-};
-</script>
-
-<style scoped lang="less">
-.grouping {
-  .count {
-    height: 40px;
-    width: 100%;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    button {
-      width: 86px;
-      height: 30px;
-      position: relative;
-      bottom: -5px;
-      margin: 0;
-      border-radius: 2px;
-    }
-  }
-}
-</style>
+<template>
+  <div>
+    <div class="grouping" v-if="queryTag">
+      <div class="count">
+        <button @click="showModal">新增小组</button>
+        <Count :sum="sum"></Count>
+      </div>
+      <div class="table">
+        <Table
+          :tableData="tableData"
+          @edit="edit"
+          @delet_data="deleteData"
+          @group_member="groupMember"
+          :pageSize="sum"
+        ></Table>
+      </div>
+      <div class="page">
+        <Tablepage
+          :totalPage="totalPage"
+          :currentPage="currentPage"
+          @change_page="changePage"
+          @jump_page="jumpPage"
+        ></Tablepage>
+      </div>
+      <div class="modal" v-if="modalFlag">
+        <Modal
+          :modalFlag="modalFlag"
+          @hide_modal="showModal"
+          @submit="submit"
+        ></Modal>
+      </div>
+    </div>
+    <div v-else>
+      <GroupMember />
+    </div>
+  </div>
+</template>
+
+<script>
+import Count from "../../components/Count";
+import Tablepage from "../../components/TablePage";
+import Table from "./components/Grouping/GroupingTable";
+import Modal from "./components/Grouping/GroupingModal";
+import GroupMember from "./components/Grouping/GroupMember";
+export default {
+  components: {
+    Count,
+    Table,
+    Tablepage,
+    Modal,
+    GroupMember,
+  },
+  data() {
+    return {
+      sum: 140, // 一共有多少条数据
+      pageSize: 20, // 每页展示的数据
+      currentPage: 1,
+      // 表格配置
+      tableData: [],
+      modalFlag: false, // 控制模态框展示
+    };
+  },
+  computed: {
+    // 表格总页数
+    totalPage() {
+      return Math.ceil(this.sum / this.pageSize);
+    },
+    // 获取路由参数
+    queryTag() {
+      return this.$route.query && this.$route.query.tag ? 0 : 1;
+    },
+  },
+  methods: {
+    // 获取某一页面的数据,展示在表格
+    changePage: function (page) {
+      this.currentPage = page;
+      console.log(page);
+    },
+    // 点击上一页,下一页,首页,尾页
+    jumpPage: function (item) {
+      switch (item) {
+        case 1:
+          this.currentPage = 1;
+          break;
+        case 2:
+          this.currentPage = this.currentPage - 1;
+          break;
+        case 3:
+          this.currentPage = this.currentPage + 1;
+          break;
+        case 4:
+          this.currentPage = this.totalPage;
+          break;
+      }
+      console.log(this.currentPage);
+    },
+    // 展示、隐藏模态框
+    showModal: function () {
+      this.modalFlag = !this.modalFlag;
+    },
+    // 模态框保存,
+    submit: function (groupName) {
+      this.addGroupInfo(groupName).then(() => {
+        this.selectGroupList();
+      });
+      this.modalFlag = false;
+    },
+    // 点击编辑
+    edit(index, newName) {
+      console.log(index, newName);
+      let id = this.tableData[index]['id'];
+      this.updateGroupInfo(id, newName).then(() => {
+        this.selectGroupList();
+      })
+    },
+    // 点击删除
+    deleteData: function (index) {
+      console.log("删除", index);
+      let id = this.tableData[index]['id'];
+      this.deleteGroupInfo(id).then(() => {
+        this.selectGroupList();
+      })
+    },
+    // 点击小组成员
+    groupMember: function (index) {
+      // 页面变化
+      this.$router.push({ query: { tag: "group_member", id: this.tableData[index]['id'] } });
+    },
+    // 新增小组 接口
+    addGroupInfo: function (groupName) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          method: "post",
+          url: "/sys/group/addGroupInfo",
+          data: {
+            groupName
+          },
+        })
+          .then((res) => {
+            if (res.data && res.data.code === 200) {
+              console.log(res);
+              resolve();
+            } else {
+              alert("新增失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            console.log(err);
+            reject(err);
+          });
+      });
+    },
+    // 获取列表 接口
+    selectGroupList: function () {
+      this.$http({
+        method: "post",
+        url: "/sys/group/selectGroupList",
+        data: {},
+      })
+        .then((res) => {
+          if (res.data && res.data.code === 200) {
+            console.log(res);
+            this.tableData = res.data.data;
+            this.sum = res.data.count;
+          } else {
+            console.log(res);
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 编辑平台模块,接口
+    updateGroupInfo: function (id, platformName) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          method: "post",
+          url: "/sys/group/updateGroupInfo",
+          data: {
+            id,
+            groupName:platformName,
+          },
+        })
+          .then((res) => {
+            console.log(res, 1111);
+            if (res.data && res.data.code === 200) {
+              console.log(res);
+              resolve();
+            } else {
+              alert("编辑失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            alert("编辑失败,请重试");
+            console.log(err);
+            reject(err);
+          });
+      });
+    },
+    // 删除平台模块 接口
+    deleteGroupInfo: function (id) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          method: "post",
+          url: "/sys/group/deleteGroupInfo",
+          data: {
+            id
+          },
+        })
+          .then((res) => {
+            if (res.data && res.data.code === 200) {
+              console.log(res);
+              resolve();
+            } else {
+              alert("编辑失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            alert("编辑失败,请重试");
+            console.log(err);
+            reject(err);
+          });
+      });
+    },
+  },
+  created() {
+    this.selectGroupList();
+  }
+};
+</script>
+
+<style scoped lang="less">
+.grouping {
+  .count {
+    height: 40px;
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    button {
+      width: 86px;
+      height: 30px;
+      position: relative;
+      bottom: -5px;
+      margin: 0;
+      border-radius: 2px;
+    }
+  }
+}
+</style>

+ 252 - 251
src/views/parameter/PlatformModule.vue

@@ -1,251 +1,252 @@
-<template>
-  <div>
-    <div class="car_series" v-if="queryTag">
-      <div class="count">
-        <button @click="showModal">新增平台</button>
-        <Count :sum="sum"></Count>
-      </div>
-      <div class="table">
-        <Table
-          :tableData="tableData"
-          @edit="edit"
-          @delet_data="deleteData"
-          @jump_router="jumpRouter"
-          :pageSize="sum"
-        ></Table>
-      </div>
-      <div class="page">
-        <Tablepage
-          :totalPage="totalPage"
-          :currentPage="currentPage"
-          @change_page="changePage"
-          @jump_page="jumpPage"
-        ></Tablepage>
-      </div>
-      <div class="modal" v-if="modalFlag">
-        <Modal
-          :modalFlag="modalFlag"
-          @hide_modal="showModal"
-          @submit="submit"
-        ></Modal>
-      </div>
-    </div>
-    <div v-else>
-      <DetailPage />
-    </div>
-  </div>
-</template>
-
-<script>
-import Count from "../../components/Count";
-import Tablepage from "../../components/TablePage";
-import Table from "./components/PlatformModule/PlatformTable";
-import Modal from "./components/PlatformModule/PlatFormModal";
-import DetailPage from "./components/PlatformModule/DetailPage";
-export default {
-  components: {
-    Count,
-    Table,
-    Tablepage,
-    Modal,
-    DetailPage,
-  },
-  data() {
-    return {
-      sum: 100, // 一共有多少条数据
-      pageSize: 20, // 每页展示的数据
-      currentPage: 1,
-      tableData: [],
-      modalFlag: false, // 控制模态框展示
-    };
-  },
-  computed: {
-    // 表格总页数
-    totalPage() {
-      return Math.ceil(this.sum / this.pageSize);
-    },
-    // 获取路由参数
-    queryTag() {
-      return this.$route.query && this.$route.query.tag ? 0 : 1;
-    },
-  },
-  methods: {
-    // 获取某一页面的数据,展示在表格
-    changePage: function (page) {
-      this.currentPage = page;
-      console.log(page);
-    },
-    // 点击上一页,下一页,首页,尾页
-    jumpPage: function (item) {
-      switch (item) {
-        case 1:
-          this.currentPage = 1;
-          break;
-        case 2:
-          this.currentPage = this.currentPage - 1;
-          break;
-        case 3:
-          this.currentPage = this.currentPage + 1;
-          break;
-        case 4:
-          this.currentPage = this.totalPage;
-          break;
-      }
-      console.log(this.currentPage);
-    },
-    // 展示、隐藏模态框
-    showModal: function () {
-      this.modalFlag = !this.modalFlag;
-    },
-    // 模态框保存
-    submit: function (plateName) {
-      this.addPublishPlatformInfo(plateName).then(() => {
-        this.selectPublishPlatformPage();
-      });
-      this.modalFlag = false;
-    },
-    // 点击编辑
-    edit(index, newName) {
-      let id = this.tableData[index]["id"];
-      console.log(id);
-      this.updatePublishPlatformInfo(id, newName).then(() => {
-        this.selectPublishPlatformPage();
-      });
-    },
-    // 点击删除
-    deleteData: function (index) {
-      let id = this.tableData[index]['id'];
-      this.deletePublishPlatformInfo(id).then(() => {
-        this.selectPublishPlatformPage();
-      })
-    },
-    // 点击平台板块
-    jumpRouter: function (index) {
-      // 页面变化
-      this.$router.push({ query: { tag: "detail", id: this.tableData[index]['id'] } });
-    },
-    // 新增平台 接口
-    addPublishPlatformInfo: function (platformName) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          method: "post",
-          url: "/base/publishPlatformManager/addPublishPlatformInfo",
-          data: {
-            platformName,
-          },
-        })
-          .then((res) => {
-            if (res.data && res.data.code === 200) {
-              console.log(res);
-              resolve();
-            } else {
-              alert("新增失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            console.log(err);
-            reject(err);
-          });
-      });
-    },
-    // 获取列表 接口
-    selectPublishPlatformPage: function () {
-      this.$http({
-        method: "post",
-        url: "/base/publishPlatformManager/selectPublishPlatformPage",
-        data: {},
-      })
-        .then((res) => {
-          if (res.data && res.data.code === 200) {
-            console.log(res);
-            this.tableData = res.data.data;
-            this.sum = res.data.count;
-          } else {
-            console.log(res);
-          }
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    },
-    // 编辑平台模块,接口
-    updatePublishPlatformInfo: function (id, platformName) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          method: "post",
-          url: "/base/publishPlatformManager/updatePublishPlatformInfo",
-          data: {
-            id,
-            platformName,
-          },
-        })
-          .then((res) => {
-            console.log(res, 1111);
-            if (res.data && res.data.code === 200) {
-              console.log(res);
-              resolve();
-            } else {
-              alert("编辑失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            alert("编辑失败,请重试");
-            console.log(err);
-            reject(err);
-          });
-      });
-    },
-    // 删除平台模块 接口
-    deletePublishPlatformInfo: function (id) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          method: "post",
-          url: "/base/publishPlatformManager/deletePublishPlatformInfo",
-          data: {
-            id,
-          },
-        })
-          .then((res) => {
-            if (res.data && res.data.code === 200) {
-              console.log(res);
-              resolve();
-            } else {
-              alert("删除失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            alert("编辑失败,请重试");
-            console.log(err);
-            reject(err);
-          });
-      });
-    },
-  },
-  created() {
-    this.selectPublishPlatformPage();
-  },
-};
-</script>
-
-<style scoped lang="less">
-.car_series {
-  .count {
-    height: 40px;
-    width: 100%;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    button {
-      width: 86px;
-      height: 30px;
-      position: relative;
-      bottom: -5px;
-      margin: 0;
-      border-radius: 2px;
-    }
-  }
-}
-</style>
+<template>
+  <div>
+    <div class="car_series" v-if="queryTag">
+      <div class="count">
+        <button @click="showModal">新增平台</button>
+        <Count :sum="sum"></Count>
+      </div>
+      <div class="table">
+        <Table
+          :tableData="tableData"
+          @edit="edit"
+          @delet_data="deleteData"
+          @jump_router="jumpRouter"
+          :pageSize="sum"
+        ></Table>
+      </div>
+      <div class="page">
+        <Tablepage
+          :totalPage="totalPage"
+          :currentPage="currentPage"
+          @change_page="changePage"
+          @jump_page="jumpPage"
+        ></Tablepage>
+      </div>
+      <div class="modal" v-if="modalFlag">
+        <Modal
+          :modalFlag="modalFlag"
+          @hide_modal="showModal"
+          @submit="submit"
+        ></Modal>
+      </div>
+    </div>
+    <div v-else>
+      <DetailPage />
+    </div>
+  </div>
+</template>
+
+<script>
+import Count from "../../components/Count";
+import Tablepage from "../../components/TablePage";
+import Table from "./components/PlatformModule/PlatformTable";
+import Modal from "./components/PlatformModule/PlatFormModal";
+import DetailPage from "./components/PlatformModule/DetailPage";
+export default {
+  components: {
+    Count,
+    Table,
+    Tablepage,
+    Modal,
+    DetailPage,
+  },
+  data() {
+    return {
+      sum: 100, // 一共有多少条数据
+      pageSize: 20, // 每页展示的数据
+      currentPage: 1,
+      tableData: [],
+      modalFlag: false, // 控制模态框展示
+    };
+  },
+  computed: {
+    // 表格总页数
+    totalPage() {
+      return Math.ceil(this.sum / this.pageSize);
+    },
+    // 获取路由参数
+    queryTag() {
+      return this.$route.query && this.$route.query.tag ? 0 : 1;
+    },
+  },
+  methods: {
+    // 获取某一页面的数据,展示在表格
+    changePage: function (page) {
+      this.currentPage = page;
+      console.log(page);
+    },
+    // 点击上一页,下一页,首页,尾页
+    jumpPage: function (item) {
+      switch (item) {
+        case 1:
+          this.currentPage = 1;
+          break;
+        case 2:
+          this.currentPage = this.currentPage - 1;
+          break;
+        case 3:
+          this.currentPage = this.currentPage + 1;
+          break;
+        case 4:
+          this.currentPage = this.totalPage;
+          break;
+      }
+      console.log(this.currentPage);
+    },
+    // 展示、隐藏模态框
+    showModal: function () {
+      this.modalFlag = !this.modalFlag;
+    },
+    // 模态框保存
+    submit: function (plateName) {
+      this.addPublishPlatformInfo(plateName).then(() => {
+        this.selectPublishPlatformPage();
+      });
+      this.modalFlag = false;
+    },
+    // 点击编辑
+    edit(index, newName) {
+      let id = this.tableData[index]["id"];
+      console.log(id);
+      this.updatePublishPlatformInfo(id, newName).then(() => {
+        this.selectPublishPlatformPage();
+      });
+    },
+    // 点击删除
+    deleteData: function (index) {
+      let id = this.tableData[index]['id'];
+      this.deletePublishPlatformInfo(id).then(() => {
+        this.selectPublishPlatformPage();
+      })
+    },
+    // 点击平台板块
+    jumpRouter: function (index) {
+      // 页面变化
+      this.$router.push({ query: { tag: "detail", id: this.tableData[index]['id'] } });
+    },
+    // 新增平台 接口
+    addPublishPlatformInfo: function (platformName) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          method: "post",
+          url: "/base/publishPlatformManager/addPublishPlatformInfo",
+          data: {
+            platformName,
+          },
+        })
+          .then((res) => {
+            if (res.data && res.data.code === 200) {
+              console.log(res);
+              resolve();
+            } else {
+              alert("新增失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            console.log(err);
+            reject(err);
+          });
+      });
+    },
+    // 获取列表 接口
+    selectPublishPlatformPage: function () {
+      this.$http({
+        method: "post",
+        url: "/base/publishPlatformManager/selectPublishPlatformPage",
+        data: {},
+      })
+        .then((res) => {
+          if (res.data && res.data.code === 200) {
+            console.log(res);
+            this.tableData = res.data.data;
+            this.sum = res.data.count;
+          } else {
+            console.log(res);
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 编辑平台模块,接口
+    updatePublishPlatformInfo: function (id, platformName) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          method: "post",
+          url: "/base/publishPlatformManager/updatePublishPlatformInfo",
+          data: {
+            id,
+            platformName,
+          },
+        })
+          .then((res) => {
+            console.log(res, 1111);
+            if (res.data && res.data.code === 200) {
+              console.log(res);
+              resolve();
+            } else {
+              alert("编辑失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            alert("编辑失败,请重试");
+            console.log(err);
+            reject(err);
+          });
+      });
+    },
+    // 删除平台模块 接口
+    deletePublishPlatformInfo: function (id) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          method: "post",
+          url: "/base/publishPlatformManager/deletePublishPlatformInfo",
+          data: {
+            id,
+            parentId:id
+          },
+        })
+          .then((res) => {
+            if (res.data && res.data.code === 200) {
+              console.log(res);
+              resolve();
+            } else {
+              alert("删除失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            alert("编辑失败,请重试");
+            console.log(err);
+            reject(err);
+          });
+      });
+    },
+  },
+  created() {
+    this.selectPublishPlatformPage();
+  },
+};
+</script>
+
+<style scoped lang="less">
+.car_series {
+  .count {
+    height: 40px;
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    button {
+      width: 86px;
+      height: 30px;
+      position: relative;
+      bottom: -5px;
+      margin: 0;
+      border-radius: 2px;
+    }
+  }
+}
+</style>

+ 183 - 178
src/views/parameter/components/Grouping/GroupMember.vue

@@ -1,178 +1,183 @@
-<template>
-  <div>
-  <div class="car_series">
-    <div class="count">
-      <button @click="showModal">新增成员</button>
-      <Count :sum='sum'></Count>
-    </div>
-    <div class="table">
-      <Table
-        :tableData='tableData'
-        @edit='edit'
-        @delet_data='deleteData'
-        :pageSize='sum'
-      ></Table>
-    </div>
-    <div class="page">
-      <Tablepage
-        :totalPage='totalPage'
-        :currentPage='currentPage'
-        @change_page='changePage'
-        @jump_page='jumpPage'
-      ></Tablepage>
-    </div>
-    <div class="modal" v-if="modalFlag">
-      <Modal
-        :modalFlag='modalFlag'
-        @submit='submit'
-        @hide_modal='showModal'
-      ></Modal>
-    </div>
-  </div>
-  </div>
-</template>
-
-<script>
-import Count from '../../../../components/Count'
-import Tablepage from '../../../../components/TablePage';
-import Table from './GroupMemberTable';
-import Modal from "./GroupMemberModal";
-
-export default {
-  components: {
-    Count,
-    Table,
-    Tablepage,
-    Modal
-  },
-  data() {
-    return {
-      sum: 140, // 一共有多少条数据
-      pageSize: 20, // 每页展示的数据
-      currentPage: 1,
-      tableData: [],
-      modalFlag: false, // 控制模态框展示
-      groupId: this.$route.query.id 
-    }
-  },
-  computed:{
-    // 表格总页数
-    totalPage() {
-      return Math.ceil(this.sum/this.pageSize);
-    }
-  },
-  methods: {
-    // 获取某一页面的数据,展示在表格
-    changePage: function(page) {
-      this.currentPage = page;
-      console.log(page);
-    },
-    // 点击上一页,下一页,首页,尾页
-    jumpPage: function(item) {
-      switch(item) {
-        case 1:
-          this.currentPage = 1;
-          break;
-        case 2:
-          this.currentPage = this.currentPage - 1;
-          break;
-        case 3:
-          this.currentPage = this.currentPage + 1;
-          break;
-        case 4:
-          this.currentPage = this.totalPage;
-          break;
-      }
-      console.log(this.currentPage);
-    },
-    // 展示、隐藏模态框
-    showModal: function() {
-      this.modalFlag = !this.modalFlag;
-    },
-    // 点击编辑
-    edit (index, newName) {
-      console.log(index, newName);
-    },
-    // 点击删除
-    deleteData (index) {
-      console.log('删除', index);
-    },
-    // 新增车型模态框 保存
-    submit: function(list1, list2) {
-        console.log('保存', list1, list2);
-        this.modalFlag = false;
-    },
-    // 获取列表 接口
-    selectAgentInfoPage: function (groupId) {
-      this.$http({
-        method: "post",
-        url: "/sys/agent/selectAgentInfoPage",
-        data: {
-          groupId 
-        },
-      })
-        .then((res) => {
-          if (res.data && res.data.code === 200) {
-            console.log(res);
-            this.tableData = res.data.data;
-            this.sum = res.data.count;
-          } else {
-            console.log(res);
-          }
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    },
-    // 删除平台模块 接口
-    deleteAgentInfo: function (groupId) {
-      return new Promise((resolve, reject) => {
-        this.$http({
-          method: "post",
-          url: "/sys/agent/deleteAgentInfo",
-          data: {
-            groupId
-          },
-        })
-          .then((res) => {
-            if (res.data && res.data.code === 200) {
-              console.log(res);
-              resolve();
-            } else {
-              alert("编辑失败,请重试");
-              console.log(res);
-            }
-          })
-          .catch((err) => {
-            alert("编辑失败,请重试");
-            console.log(err);
-            reject(err);
-          });
-      });
-    },
-  },
-  mounted() {
-    this.selectAgentInfoPage(this.groupId);
-  }
-}
-</script>
-
-<style scoped lang="less">
-.car_series{
-  .count{
-    height: 40px;
-    width: 100%;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    button{
-      width: 86px;
-      height: 30px;
-      position: relative;
-      bottom: -5px;
-      margin: 0;
-      border-radius: 2px;
-    }
-  }
-}
-</style>
+<template>
+  <div>
+  <div class="car_series">
+    <div class="count">
+      <button @click="showModal">新增成员</button>
+      <Count :sum='sum'></Count>
+    </div>
+    <div class="table">
+      <Table
+        :tableData='tableData'
+        @edit='edit'
+        @delet_data='deleteData'
+        :pageSize='sum'
+      ></Table>
+    </div>
+    <div class="page">
+      <Tablepage
+        :totalPage='totalPage'
+        :currentPage='currentPage'
+        @change_page='changePage'
+        @jump_page='jumpPage'
+      ></Tablepage>
+    </div>
+    <div class="modal" v-if="modalFlag">
+      <Modal
+        :modalFlag='modalFlag'
+        @submit='submit'
+        @hide_modal='showModal'
+      ></Modal>
+    </div>
+  </div>
+  </div>
+</template>
+
+<script>
+import Count from '../../../../components/Count'
+import Tablepage from '../../../../components/TablePage';
+import Table from './GroupMemberTable';
+import Modal from "./GroupMemberModal";
+
+export default {
+  components: {
+    Count,
+    Table,
+    Tablepage,
+    Modal
+  },
+  data() {
+    return {
+      sum: 140, // 一共有多少条数据
+      pageSize: 20, // 每页展示的数据
+      currentPage: 1,
+      tableData: [],
+      modalFlag: false, // 控制模态框展示
+      groupId: this.$route.query.id
+    }
+  },
+  computed:{
+    // 表格总页数
+    totalPage() {
+      return Math.ceil(this.sum/this.pageSize);
+    }
+  },
+  methods: {
+    // 获取某一页面的数据,展示在表格
+    changePage: function(page) {
+      this.currentPage = page;
+      console.log(page);
+    },
+    // 点击上一页,下一页,首页,尾页
+    jumpPage: function(item) {
+      switch(item) {
+        case 1:
+          this.currentPage = 1;
+          break;
+        case 2:
+          this.currentPage = this.currentPage - 1;
+          break;
+        case 3:
+          this.currentPage = this.currentPage + 1;
+          break;
+        case 4:
+          this.currentPage = this.totalPage;
+          break;
+      }
+      console.log(this.currentPage);
+    },
+    // 展示、隐藏模态框
+    showModal: function() {
+      this.modalFlag = !this.modalFlag;
+    },
+    // 点击编辑
+    edit (index, newName) {
+      console.log(index, newName);
+    },
+    // 点击删除
+    deleteData (index) {
+      console.log('删除', index);
+    },
+    // 新增车型模态框 保存
+    submit: function(list1, list2) {
+       ///sys/agentGroup/bindAgentGroup 调用这个接口来新增小组成员
+      // 入参 {
+      //  groupId:groupId
+      //  agentId:[经销商id1,经销商id2]
+      // }
+        console.log('保存', list1, list2);
+        this.modalFlag = false;
+    },
+    // 获取列表 接口
+    selectAgentInfoPage: function (groupId) {
+      this.$http({
+        method: "post",
+        url: "/sys/agent/selectAgentInfoPage",
+        data: {
+          groupId
+        },
+      })
+        .then((res) => {
+          if (res.data && res.data.code === 200) {
+            console.log(res);
+            this.tableData = res.data.data;
+            this.sum = res.data.count;
+          } else {
+            console.log(res);
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    // 删除平台模块 接口
+    deleteAgentInfo: function (groupId) {
+      return new Promise((resolve, reject) => {
+        this.$http({
+          method: "post",
+          url: "/sys/agent/deleteAgentInfo",
+          data: {
+            groupId
+          },
+        })
+          .then((res) => {
+            if (res.data && res.data.code === 200) {
+              console.log(res);
+              resolve();
+            } else {
+              alert("编辑失败,请重试");
+              console.log(res);
+            }
+          })
+          .catch((err) => {
+            alert("编辑失败,请重试");
+            console.log(err);
+            reject(err);
+          });
+      });
+    },
+  },
+  mounted() {
+    this.selectAgentInfoPage(this.groupId);
+  }
+}
+</script>
+
+<style scoped lang="less">
+.car_series{
+  .count{
+    height: 40px;
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    button{
+      width: 86px;
+      height: 30px;
+      position: relative;
+      bottom: -5px;
+      margin: 0;
+      border-radius: 2px;
+    }
+  }
+}
+</style>