Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

july 4 лет назад
Родитель
Сommit
bc47e4984a

+ 5 - 0
package-lock.json

@@ -7543,6 +7543,11 @@
         "commander": "*"
         "commander": "*"
       }
       }
     },
     },
+    "moment": {
+      "version": "2.29.1",
+      "resolved": "https://registry.nlark.com/moment/download/moment-2.29.1.tgz",
+      "integrity": "sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M="
+    },
     "move-concurrently": {
     "move-concurrently": {
       "version": "1.0.1",
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
       "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",

+ 8 - 0
src/api/census/census.js

@@ -17,3 +17,11 @@ export const getTenantPlatformBills = (params) => {
     params: params
     params: params
   })
   })
 }
 }
+
+export const getTenantTodayCensusCount = (params) => {
+  return request({
+    url: '/api/census/getTenantTodayCensusCount',
+    method: 'get',
+    params: params
+  })
+}

+ 50 - 0
src/api/ldt_bills/goodsbills.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/goodsbills/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_bills/goodsbills/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_bills/goodsbills/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_bills/goodsbills/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_bills/goodsbills/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 50 - 0
src/api/ldt_goods/goods.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_goods/goods/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_goods/goods/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_goods/goods/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_goods/goods/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_goods/goods/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 50 - 0
src/api/ldt_goods/goodscategory.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_goods/goodscategory/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_goods/goodscategory/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_goods/goodscategory/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_goods/goodscategory/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_goods/goodscategory/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 50 - 0
src/api/ldt_goods/goodsproperty.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_goods/goodsproperty/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_goods/goodsproperty/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_goods/goodsproperty/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_goods/goodsproperty/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_goods/goodsproperty/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 50 - 0
src/api/ldt_user/useraddress.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_user/useraddress/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_user/useraddress/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_user/useraddress/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_user/useraddress/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_user/useraddress/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 353 - 0
src/views/ldt_bills/goodsbills.vue

@@ -0,0 +1,353 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.goodsbills_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/ldt_bills/goodsbills";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "接收人id",
+              prop: "receiveId",
+              rules: [{
+                required: true,
+                message: "请输入接收人id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "付款人id",
+              prop: "payId",
+              rules: [{
+                required: true,
+                message: "请输入付款人id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "账单id",
+              prop: "billsId",
+              rules: [{
+                required: true,
+                message: "请输入账单id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "订单状态",
+              prop: "orderStatus",
+              rules: [{
+                required: true,
+                message: "请输入订单状态",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "取餐方式",
+              prop: "takeType",
+              rules: [{
+                required: true,
+                message: "请输入取餐方式",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "订单json信息",
+              prop: "goodsPreview",
+              rules: [{
+                required: true,
+                message: "请输入订单json信息",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "商品总数",
+              prop: "goodsTotalNum",
+              rules: [{
+                required: true,
+                message: "请输入商品总数",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "商品总价格",
+              prop: "totalPrice",
+              rules: [{
+                required: true,
+                message: "请输入商品总价格",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "包装费",
+              prop: "packingPrice",
+              rules: [{
+                required: true,
+                message: "请输入包装费",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "配送费",
+              prop: "sendingPrice",
+              rules: [{
+                required: true,
+                message: "请输入配送费",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "取单号",
+              prop: "verifyNum",
+              rules: [{
+                required: true,
+                message: "请输入取单号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "用户备注、订单取消原因、或其他额外信息",
+              prop: "extraInfo",
+              rules: [{
+                required: true,
+                message: "请输入用户备注、订单取消原因、或其他额外信息",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "支付时间",
+              prop: "payTime",
+              rules: [{
+                required: true,
+                message: "请输入支付时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "订单完成时间",
+              prop: "finishTime",
+              rules: [{
+                required: true,
+                message: "请输入订单完成时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "用户联系电话",
+              prop: "userPhone",
+              rules: [{
+                required: true,
+                message: "请输入用户联系电话",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "取餐人",
+              prop: "receiver",
+              rules: [{
+                required: true,
+                message: "请输入取餐人",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "收货地址",
+              prop: "addressDetail",
+              rules: [{
+                required: true,
+                message: "请输入收货地址",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.goodsbills_add, false),
+          viewBtn: this.vaildData(this.permission.goodsbills_view, false),
+          delBtn: this.vaildData(this.permission.goodsbills_delete, false),
+          editBtn: this.vaildData(this.permission.goodsbills_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 315 - 0
src/views/ldt_goods/goods.vue

@@ -0,0 +1,315 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.goods_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/ldt_goods/goods";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "所属商户",
+              prop: "shopId",
+              dicUrl: "/api/ldt_shop/shop/list",
+              type:"select",
+              props:{
+                label:"name",
+                value:"id",
+                res:"data.records"
+              },
+              rules: [{
+                required: true,
+                message: "请输入商户id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "类目名称",
+              prop: "goodsCategoryName",
+              dicUrl: "/api/ldt_goods/goodscategory/list",
+              type:"select",
+              props:{
+                label:"name",
+                value:"name",
+                res:"data.records"
+              },
+              rules: [{
+                required: true,
+                message: "请输入商品类目名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "商品名称",
+              prop: "name",
+              rules: [{
+                required: true,
+                message: "请输入商品名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "显示次序",
+              prop: "displayOrder",
+              type:"number",
+              minRows:0,
+              maxRows:100,
+              rules: [{
+                required: true,
+                message: "请输入显示次序",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "默认价格(单位 分)",
+              prop: "defaultPrice",
+              rules: [{
+                required: true,
+                message: "请输入默认价格(单位 分)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否在卖",
+              prop: "isSell",
+              type:"switch",
+              dicData: [
+                {
+                  label: "否",
+                  value: false
+                },
+                {
+                  label: "是",
+                  value: true
+                }
+              ],
+              rules: [{
+                required: true,
+                message: "请输入是否在卖",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "商品图片",
+              prop: "image",
+              type: 'upload',
+              dataType: "string",
+              listType: 'picture-img',
+              span: 24,
+              propsHttp: {
+                res: 'data',
+                url: 'link'
+              },
+              canvasOption: {
+                text: 'avue',
+                ratio: 0.1
+              },
+              tip: '只能上传jpg/png文件,且不超过500kb',
+              action: '/api/blade-resource/oss/endpoint/put-file',
+              rules: [{
+                required: true,
+                message: "请输入商品图片",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "描述",
+              prop: "description",
+              type:"textarea",
+              rules: [{
+                required: false,
+                message: "请输入描述",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.goods_add, false),
+          viewBtn: this.vaildData(this.permission.goods_view, false),
+          delBtn: this.vaildData(this.permission.goods_delete, false),
+          editBtn: this.vaildData(this.permission.goods_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 257 - 0
src/views/ldt_goods/goodscategory.vue

@@ -0,0 +1,257 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.goodscategory_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/ldt_goods/goodscategory.js";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "所属商户",
+              prop: "shopId",
+              dicUrl: "/api/ldt_shop/shop/list",
+              type:"select",
+              props:{
+                label:"name",
+                value:"id",
+                res:"data.records"
+              },
+              rules: [{
+                required: true,
+                message: "请输入商户id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "名称",
+              prop: "name",
+              rules: [{
+                required: true,
+                message: "请输入名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "显示顺序",
+              prop: "displayOrder",
+              type:"number",
+              minRows:0,
+              maxRows:100,
+              rules: [{
+                required: true,
+                message: "请输入显示顺序",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否显示",
+              prop: "showStatus",
+              type:"switch",
+              dicData: [
+                {
+                  label: "否",
+                  value: false
+                },
+                {
+                  label: "是",
+                  value: true
+                }
+              ],
+              rules: [{
+                required: true,
+                message: "请输入是否显示",
+                trigger: "change"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.goodscategory_add, false),
+          viewBtn: this.vaildData(this.permission.goodscategory_view, false),
+          delBtn: this.vaildData(this.permission.goodscategory_delete, false),
+          editBtn: this.vaildData(this.permission.goodscategory_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 272 - 0
src/views/ldt_goods/goodsproperty.vue

@@ -0,0 +1,272 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.goodsproperty_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/ldt_goods/goodsproperty";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "所属商品",
+              prop: "shopId",
+              dicUrl: "/api/ldt_goods/goods/list",
+              type:"select",
+              props:{
+                label:"name",
+                value:"id",
+                res:"data.records"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属商品",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "内置的属性类型",
+              prop: "category",
+              rules: [{
+                required: true,
+                message: "请输入内置的属性类型",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "可选项,eg: 常温",
+              prop: "propertyOption",
+              rules: [{
+                required: true,
+                message: "请输入可选项,eg: 常温",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否作为默认选择",
+              prop: "isDefault",
+              type:"switch",
+              dicData: [
+                {
+                  label: "否",
+                  value: false
+                },
+                {
+                  label: "是",
+                  value: true
+                }
+              ],
+              rules: [{
+                required: true,
+                message: "请输入是否作为默认选择",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "重置基础价格,只有选择大小属性时需要填写",
+              prop: "rebasePrice",
+              rules: [{
+                required: false,
+                message: "请输入重置基础价格,只有选择大小属性时需要",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "额外价格(单位:分)",
+              prop: "extraPrice",
+              rules: [{
+                required: true,
+                message: "请输入额外价格",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.goodsproperty_add, false),
+          viewBtn: this.vaildData(this.permission.goodsproperty_view, false),
+          delBtn: this.vaildData(this.permission.goodsproperty_delete, false),
+          editBtn: this.vaildData(this.permission.goodsproperty_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 272 - 0
src/views/ldt_user/useraddress.vue

@@ -0,0 +1,272 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.useraddress_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/ldt_user/useraddress";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "用户地址",
+              prop: "userId",
+              rules: [{
+                required: true,
+                message: "请输入用户地址",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "接收人",
+              prop: "consignee",
+              rules: [{
+                required: true,
+                message: "请输入接收人",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "收货电话",
+              prop: "phone",
+              rules: [{
+                required: true,
+                message: "请输入收货电话",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否默认",
+              prop: "isDefault",
+              rules: [{
+                required: true,
+                message: "请输入是否默认",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "省",
+              prop: "provinceName",
+              rules: [{
+                required: true,
+                message: "请输入省",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "市",
+              prop: "cityName",
+              rules: [{
+                required: true,
+                message: "请输入市",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "区",
+              prop: "areaName",
+              rules: [{
+                required: true,
+                message: "请输入区",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "",
+              prop: "address",
+              rules: [{
+                required: true,
+                message: "请输入",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.useraddress_add, false),
+          viewBtn: this.vaildData(this.permission.useraddress_view, false),
+          delBtn: this.vaildData(this.permission.useraddress_delete, false),
+          editBtn: this.vaildData(this.permission.useraddress_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 77 - 30
src/views/wel/index.vue

@@ -12,16 +12,18 @@
       <el-date-picker
       <el-date-picker
         v-model="tenantPlatformBills.time"
         v-model="tenantPlatformBills.time"
         type="month"
         type="month"
+        @change="getTenantPlatformBills"
+        value-format="yyyy-MM"
         placeholder="选择月">
         placeholder="选择月">
       </el-date-picker>
       </el-date-picker>
-      <div ref="tenantPlatformBills" style="height: 300px;width: 100%"></div>
+      <div ref="tenantPlatformBills" style="height: 600px;width: 100%"></div>
     </div>
     </div>
   </basic-container>
   </basic-container>
 </template>
 </template>
 <script>
 <script>
 import * as echarts from 'echarts';
 import * as echarts from 'echarts';
 import moment from "moment";
 import moment from "moment";
-import {getTenantCensusCount, getTenantPlatformBills} from '@/api/census/census';
+import {getTenantCensusCount, getTenantPlatformBills, getTenantTodayCensusCount} from '@/api/census/census';
 
 
 export default {
 export default {
   data() {
   data() {
@@ -34,7 +36,6 @@ export default {
               alert(JSON.stringify(item));
               alert(JSON.stringify(item));
             },
             },
             count: 0,
             count: 0,
-            decimals: 2,
             title: '新增商场',
             title: '新增商场',
             href: 'https://avuejs.com',
             href: 'https://avuejs.com',
             target: '_blank'
             target: '_blank'
@@ -71,7 +72,8 @@ export default {
               alert(JSON.stringify(item));
               alert(JSON.stringify(item));
             },
             },
             count: 0,
             count: 0,
-            title: '今日收入',
+            decimals: 2,
+            title: '今日充值',
             href: 'https://avuejs.com',
             href: 'https://avuejs.com',
             target: '_blank'
             target: '_blank'
           },
           },
@@ -80,10 +82,21 @@ export default {
               alert(JSON.stringify(item));
               alert(JSON.stringify(item));
             },
             },
             count: 0,
             count: 0,
-            title: '今日提现',
+            decimals: 2,
+            title: '今日收入',
             href: 'https://avuejs.com',
             href: 'https://avuejs.com',
             target: '_blank'
             target: '_blank'
-          }
+          },
+          // {
+          //   click: function (item) {
+          //     alert(JSON.stringify(item));
+          //   },
+          //   count: 0,
+          //   decimals: 2,
+          //   title: '今日提现',
+          //   href: 'https://avuejs.com',
+          //   target: '_blank'
+          // }
         ]
         ]
       },
       },
       optionTotal: {
       optionTotal: {
@@ -129,20 +142,32 @@ export default {
             click: function (item) {
             click: function (item) {
               alert(JSON.stringify(item));
               alert(JSON.stringify(item));
             },
             },
-            title: '收入总额',
+            title: '充值总额',
             count: 0,
             count: 0,
-            icon: 'el-icon-s-marketing',
-            color: '#f37b1d',
+            decimals: 2,
+            icon: 'el-icon-s-finance',
+            color: '#1cbbb4',
           },
           },
           {
           {
             click: function (item) {
             click: function (item) {
               alert(JSON.stringify(item));
               alert(JSON.stringify(item));
             },
             },
-            title: '提现总额',
+            title: '收入总额',
             count: 0,
             count: 0,
-            icon: 'el-icon-s-finance',
-            color: '#1cbbb4',
-          }
+            decimals: 2,
+            icon: 'el-icon-s-marketing',
+            color: '#f37b1d',
+          },
+          // {
+          //   click: function (item) {
+          //     alert(JSON.stringify(item));
+          //   },
+          //   title: '提现总额',
+          //   count: 0,
+          //   decimals: 2,
+          //   icon: 'el-icon-s-finance',
+          //   color: '#1cbbb4',
+          // }
         ]
         ]
       },
       },
       tenantPlatformBills: {
       tenantPlatformBills: {
@@ -155,8 +180,6 @@ export default {
               show: false,
               show: false,
               type: 'continuous',
               type: 'continuous',
               seriesIndex: 0,
               seriesIndex: 0,
-              min: 0,
-              max: 400
             },
             },
             {
             {
               show: false,
               show: false,
@@ -182,13 +205,14 @@ export default {
             },
             },
           ],
           ],
           yAxis: [
           yAxis: [
-            { // 纵轴标尺固定
+            {
+              // 纵轴标尺固定
               type: 'value',
               type: 'value',
               scale: true,
               scale: true,
               max: 100,
               max: 100,
               min: 0,
               min: 0,
               splitNumber: 5,
               splitNumber: 5,
-              boundaryGap: [10, 10]
+              boundaryGap: [5, 5]
             }
             }
           ],
           ],
           grid: [
           grid: [
@@ -217,34 +241,50 @@ export default {
     //初始化方法
     //初始化方法
     init() {
     init() {
       this.getTenantCensusCount();
       this.getTenantCensusCount();
+      this.getTenantTodayCensusCount();
       this.getTenantPlatformBills();
       this.getTenantPlatformBills();
     },
     },
-    //获取租户数
+    //获取租户数据统计
     getTenantCensusCount() {
     getTenantCensusCount() {
       //获取租户数量
       //获取租户数量
       getTenantCensusCount().then(res => {
       getTenantCensusCount().then(res => {
-        this.optionTotal.option.data[0].count = res.data.data.userCount;
-        this.optionTotal.option.data[1].count = res.data.data.memberCount;
-        this.optionTotal.option.data[2].count = res.data.data.shopCount;
-        this.optionTotal.option.data[3].count = res.data.data.mallCount;
+        this.optionTotal.data[0].count = res.data.data.mallCount;
+        this.optionTotal.data[1].count = res.data.data.shopCount;
+        this.optionTotal.data[2].count = res.data.data.userCount;
+        this.optionTotal.data[3].count = res.data.data.agentCount;
+        this.optionTotal.data[4].count = res.data.data.rechargeTotal;
       });
       });
     },
     },
-    //获取租户数量
+    //获取租户当日数据统计
+    getTenantTodayCensusCount() {
+      //获取租户数量
+      getTenantTodayCensusCount().then(res => {
+        this.optionToday.data[0].count = res.data.data.mallCount;
+        this.optionToday.data[1].count = res.data.data.shopCount;
+        this.optionToday.data[2].count = res.data.data.userCount;
+        this.optionToday.data[3].count = res.data.data.agentCount;
+        this.optionToday.data[4].count = res.data.data.rechargeTotal;
+      });
+    },
+    //获取租户平台收益趋势
     getTenantPlatformBills() {
     getTenantPlatformBills() {
       let time = moment(this.tenantPlatformBills.time);
       let time = moment(this.tenantPlatformBills.time);
       //获取租户数量
       //获取租户数量
       getTenantPlatformBills({
       getTenantPlatformBills({
         time: time.format("yyyy-MM-DD HH:mm:ss")
         time: time.format("yyyy-MM-DD HH:mm:ss")
       }).then(res => {
       }).then(res => {
+        //清空内容
+        this.tenantPlatformBills.option.xAxis[0].data = [];
+        this.tenantPlatformBills.option.series[0].data = [];
+
         //获取某月总天数
         //获取某月总天数
         const day = time.format("yyyy-MM") === moment(new Date()).format("yyyy-MM") ? Number(moment(new Date()).format("DD"))
         const day = time.format("yyyy-MM") === moment(new Date()).format("yyyy-MM") ? Number(moment(new Date()).format("DD"))
           : new Date(time.format("yyyy"), time.format("MM"), 0).getDate();
           : new Date(time.format("yyyy"), time.format("MM"), 0).getDate();
         for (let i = 0; i < day; i++) {
         for (let i = 0; i < day; i++) {
           //添加日期X坐标
           //添加日期X坐标
           const date = time.format("yyyy-MM-DD");
           const date = time.format("yyyy-MM-DD");
-
           this.tenantPlatformBills.option.xAxis[0].data.push(date);
           this.tenantPlatformBills.option.xAxis[0].data.push(date);
-
+          //添加金额Y坐标
           let fee = 0;
           let fee = 0;
           res.data.data.forEach(ele => {
           res.data.data.forEach(ele => {
             if (ele.time === date) {
             if (ele.time === date) {
@@ -258,12 +298,19 @@ export default {
           //加上一天
           //加上一天
           time.add(1, 'days');
           time.add(1, 'days');
         }
         }
-        this.tenantPlatformBills.dom = echarts.init(this.$refs.tenantPlatformBills);
-        this.tenantPlatformBills.dom.setOption(this.tenantPlatformBills.option);
+        //第一次渲染
+        if (this.tenantPlatformBills.dom === null) {
+          this.tenantPlatformBills.dom = echarts.init(this.$refs.tenantPlatformBills);
+          this.tenantPlatformBills.dom.setOption(this.tenantPlatformBills.option);
 
 
-        window.onresize = () => {
-          this.tenantPlatformBills.dom.resize()
-        };
+          window.onresize = () => {
+            this.tenantPlatformBills.dom.resize()
+          };
+        } else { //第二次渲染
+          this.tenantPlatformBills.dom.clear();
+          this.tenantPlatformBills.dom = echarts.init(this.$refs.tenantPlatformBills);
+          this.tenantPlatformBills.dom.setOption(this.tenantPlatformBills.option);
+        }
       });
       });
     },
     },
   }
   }