Эх сурвалжийг харах

fix:系统管理新增权限模块

刘恒 2 жил өмнө
parent
commit
0d4b15a14e

+ 50 - 1
src/components/tree/tree.vue

@@ -1,10 +1,18 @@
 <template>
   <div class="tree">
     <a-tree
+      v-if="treeData && treeData.length > 0"
       :tree-data="treeData"
       :title="'11'"
       :replaceFields="replaceFields"
       @select="onSelect"
+      :checkable="checkable"
+      @check="onCheck"
+      v-model="checkList"
+      :auto-expand-parent="autoExpandParent"
+      :expanded-keys="expandedKeys"
+      @expand="onExpand"
+      ref="tree"
     >
       <template slot="custom" slot-scope="item">
         <span>{{ item }}</span>
@@ -20,7 +28,14 @@ import { mapState } from "vuex";
 export default {
   name: "FormRow",
   //   mixins: [mixin],
-  props: {},
+  props: {
+    checkable: {
+      default: false,
+    },
+    // defaultCheckList: {
+    //   default: [],
+    // },
+  },
   data() {
     return {
       treeData: [],
@@ -29,15 +44,44 @@ export default {
         title: "name",
         key: "id",
       },
+      checkList: [],
+      autoExpandParent: true,
+      expandedKeys: [],
     };
   },
   computed: {
     ...mapState("setting", ["userInfo"]),
   },
+  watch: {},
+  created() {},
   mounted() {
     this.getMechanismTree();
   },
   methods: {
+    onExpand(expandedKeys) {
+      this.expandedKeys = expandedKeys;
+      //expandedKeys
+      this.autoExpandParent = true;
+    },
+    setExpandKys(item) {
+      this.$nextTick(() => {
+        // this.$refs.tree.expandedKeys = ["99D17"];
+        // this.$refs.tree.defaultExpandedKeys = ["99D17"];
+        // console.log(this.$refs.tree);
+        // this.expandedKeys = ["99D17"];
+        // this.checkList = ["99D17"];
+        this.$API.sysManage
+          .getUserItem({
+            userId: item.userId,
+          })
+          .then((res) => {
+            if (res.data.code === 200) {
+              this.expandedKeys = res.data.data.deptIds;
+              this.checkList = res.data.data.deptIds;
+            }
+          });
+      });
+    },
     getMechanismTree() {
       // console.log(this.userInfo);
       this.$API.mechanism
@@ -52,6 +96,11 @@ export default {
     onSelect(keys) {
       this.$emit("getList", keys[0]);
     },
+    onCheck(checkedKeys) {
+      this.$emit("checkTree", checkedKeys);
+
+      // this.checkedKeys = checkedKeys;
+    },
   },
 };
 </script>

+ 3 - 2
src/layouts/header/HeaderAvatar.vue

@@ -27,7 +27,7 @@ export default {
   name: "HeaderAvatar",
   data() {
     return {
-      process: process.env.VUE_APP_API_BASE_URL,
+      process: process.env.VUE_APP_BASE_URL,
     };
   },
   computed: {
@@ -38,7 +38,8 @@ export default {
     logout() {
       logout();
       // this.$router.push('/login')
-      window.location.href = "https://test.baoxianzhanggui.com/#/login";
+      // console.log(this.process);
+      window.location.href = this.process + "/#/login";
     },
   },
 };

+ 6 - 6
src/main.js

@@ -9,18 +9,18 @@ import store from './store'
 import 'animate.css/source/animate.css'
 import Plugins from '@/plugins'
 import { initI18n } from '@/utils/i18n'
-// import bootstrap from '@/bootstrap'
-// import 'moment/locale/zh-cn'
-// import Cookies from "js-cookie";
+import 'moment/locale/zh-cn';
 import '@/services'
-// import { api } from "@/services/index"
+
 Vue.use(router)
 Vue.config.devtools = true
-// const router = initRouter(store.state.setting.asyncRoutes)
+
 const i18n = initI18n('CN', 'US')
 import "normalize.css"
 import { setAuthorization } from "@/utils/request";
-Vue.use(Antd)
+Vue.use(Antd, {
+  locale: require('ant-design-vue/lib/locale-provider/zh_CN'),
+})
 Vue.config.productionTip = false
 Vue.use(Viser)
 Vue.use(Plugins)

+ 493 - 0
src/pages/business/agent.vue

@@ -0,0 +1,493 @@
+<template>
+  <div class="quote">
+    <div class="quote-tree" style="border-radius: 8px">
+      <div><h2>部门所属</h2></div>
+      <div>
+        <!-- <a-tree  :tree-data="treeData" /> -->
+        <tree @getList="getVerification"></tree>
+      </div>
+    </div>
+    <div class="back-line-main">
+      <div class="back-line-header">
+        <div class="back-line-header-title">
+          <h2>合计</h2>
+          <div>
+            <dl>
+              <dt><span>签单保费</span></dt>
+              <dd>
+                <span>{{ BigOrder.frameno }}</span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><span>签单保费总占比</span></dt>
+              <dd>
+                <span>{{ BigOrder.orderNumber || 0 }}</span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><span>交强险保费</span></dt>
+              <dd>
+                <span>
+                  {{
+                    BigOrder.closeRate
+                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
+                      : 0
+                  }}
+                </span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><span>车船税</span></dt>
+              <dd>
+                <span>
+                  {{
+                    BigOrder.closeRate
+                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
+                      : 0
+                  }}
+                </span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><span>商业保险费</span></dt>
+              <dd>
+                <span>
+                  {{
+                    BigOrder.closeRate
+                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
+                      : 0
+                  }}
+                </span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><span>非车保险费</span></dt>
+              <dd>
+                <span>
+                  {{
+                    BigOrder.closeRate
+                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
+                      : 0
+                  }}
+                </span>
+              </dd>
+            </dl>
+          </div>
+        </div>
+      </div>
+      <div style="background-color: #fff; margin-top: 15px">
+        <div class="table-title">
+          <h2>总报价</h2>
+          <div>
+            <span>时间筛选</span>
+            <a-range-picker
+              @change="onChangeTime"
+              v-model="formState.time"
+              value-format="YYYY-MM-DD"
+              style="margin-left: 10px"
+            >
+              <a-icon slot="suffixIcon" type="calendar" />
+            </a-range-picker>
+            <a-radio-group
+              default-value="0"
+              button-style="solid"
+              v-model="formState.dateType"
+              @change="getVerification()"
+              style="margin-left: 10px"
+            >
+              <a-radio-button
+                value="1"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近1月
+              </a-radio-button>
+              <a-radio-button
+                value="2"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近3月
+              </a-radio-button>
+              <a-radio-button
+                value="3"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近半年
+              </a-radio-button>
+            </a-radio-group>
+          </div>
+        </div>
+        <a-form
+          layout="inline"
+          :model="formState"
+          style="padding: 0 0 0 15px; box-sizing: border-box"
+        >
+          <a-form-item
+            label="业务员姓名"
+            :labelCol="{ span: 8 }"
+            :colon="false"
+          >
+            <a-input
+              placeholder="请输入业务员姓名"
+              v-model="formState.userName"
+              allowClear
+              style="width: 200px"
+            ></a-input>
+          </a-form-item>
+          <a-form-item
+            label="业务员工号"
+            :labelCol="{ span: 8 }"
+            :colon="false"
+          >
+            <a-input
+              placeholder="请输入业务员工号"
+              v-model="formState.userId"
+              style="width: 200px"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item
+            style="
+              flex: 1;
+              display: flex;
+              justify-content: flex-end;
+              padding-right: 15px;
+              box-sizing: border-box;
+              align-items: flex-end;
+            "
+          >
+            <a-button type="primary" @click="getList">查询</a-button>
+          </a-form-item>
+        </a-form>
+
+        <standard-table
+          bordered
+          :columns="columns"
+          :dataSource="tableList"
+          :pagination="pagination"
+          @clear="onClear"
+          @change="onChange"
+          :loading="loading"
+        >
+          <div slot="count" slot-scope="{ text }">
+            {{ text != "-" ? text + "次" : text }}
+          </div>
+          <div slot="rate" slot-scope="{ text }">
+            {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
+          </div>
+          <div slot="operation" slot-scope="{ text, record }">
+            <a-button type="link" @click="watchMessage({ text, record })"
+              >详情</a-button
+            >
+          </div>
+        </standard-table>
+      </div>
+    </div>
+  </div>
+</template>
+          
+  <script>
+import StandardTable from "@/components/table/StandardTable";
+// import mixin from "../../minins/mixin";
+import tree from "@/components/tree/tree";
+import moment from "moment";
+
+const columns = [
+  {
+    title: "姓名",
+    dataIndex: "licenseno",
+  },
+
+  {
+    title: "工号",
+    dataIndex: "frameno",
+    // scopedSlots: { customRender: "parterCompanyName" },
+  },
+
+  {
+    title: "签单保费",
+    dataIndex: "orderNumber",
+  },
+  {
+    title: "交强险保费",
+    dataIndex: "closeRate",
+  },
+  {
+    title: "车船税",
+    dataIndex: "namesimple",
+  },
+  {
+    title: "商业险保费",
+    dataIndex: "namesimple",
+  },
+  {
+    title: "非车险保费",
+    dataIndex: "namesimple",
+  },
+  {
+    title: "操作",
+    dataIndex: "operation",
+    scopedSlots: { customRender: "operation" },
+  },
+];
+
+export default {
+  components: {
+    StandardTable,
+    tree,
+  },
+  //   mixins: [mixin],
+  data() {
+    return {
+      formState: {
+        dateType: undefined,
+        time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
+        beginDate: moment().format("YYYY-MM-DD"),
+        endDate: moment().format("YYYY-MM-DD"),
+        licenseno: "",
+        userName: "",
+        mobile: "",
+        frameno: "",
+        userId: "",
+      },
+      backLinePersonnel: {},
+      columns: columns,
+      companyList: [],
+      tableList: [],
+      pagination: {
+        current: 1,
+        defaultPageSize: 10,
+        total: 0,
+        pagesize0ptions: ["10", "20", "30", "50", "100"],
+        hideOnSinglePage: false,
+        showQuickJumper: true, //
+        showSizeChanger: true, //是否可以改变pagesize
+        showTotal: (total) => `共 ${total} 条数据`,
+      },
+      loading: false,
+      wholeList: [],
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      storeList: [],
+      treeData: [
+        { title: "Expand to load", key: "0" },
+        { title: "Expand to load", key: "1" },
+        { title: "Tree Node", key: "2", isLeaf: true },
+      ],
+      BigOrder: {},
+    };
+  },
+  mounted() {
+    this.getVerification();
+    // setTimeout(() => {
+    // }, 1000);
+  },
+  methods: {
+    getList() {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
+      this.getVerification();
+    },
+    onChangeTime(val) {
+      // console.log(val);
+      this.formState.beginDate = val[0];
+      this.formState.endDate = val[1];
+      this.formState.dateType = undefined;
+      this.getVerification();
+    },
+    handleFinish() {
+      //
+    },
+    wholeHandleChange() {
+      this.getProvinceList(this.formState.whole);
+    },
+    provinceHandleChange() {
+      this.getCityList(this.formState.provinceId);
+    },
+    cityHandleChange() {
+      this.getAreaList(this.formState.cityId);
+    },
+    countyHandleChange() {
+      this.getStoreList(this.formState.countyId);
+    },
+
+    async getVerification() {
+      this.loading = true;
+
+      this.$API.quote
+        .getBigOrderList({
+          pageNum: this.pagination.current,
+          pageSize: this.pagination.defaultPageSize,
+          ...this.formState,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.loading = false;
+            this.tableList = res.data.data.content;
+            this.pagination = {
+              current: res.data.data.pageNum,
+              defaultPageSize: res.data.data.pageSize,
+              total: res.data.data.totalSize,
+            };
+          }
+        });
+      this.$API.quote
+        .getBigOrderMount({
+          // pageNum: this.pagination.current,
+          // pageSize: this.pagination.defaultPageSize,
+          ...this.formState,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            console.log(res);
+            this.BigOrder = { ...res.data.data };
+          }
+        });
+    },
+    onClear() {
+      this.$message.info("您清空了勾选的所有行");
+    },
+
+    onChange(pagination, filters, sorter, { currentDataSource }) {
+      // this.$message.info('表格状态改变了')
+      console.log(pagination, filters, sorter, { currentDataSource });
+      this.pagination = {
+        current: pagination.current,
+        defaultPageSize: pagination.pageSize,
+        total: pagination.total,
+      };
+      this.getVerification();
+    },
+  },
+};
+</script>
+  <style lang='less' scoped>
+.quote {
+  display: flex;
+  > div:first-child {
+    width: 20%;
+    background: #fff;
+    margin-right: 15px;
+  }
+  .quote-tree {
+    padding: 15px;
+    box-sizing: border-box;
+    //
+    > div:first-child {
+      border-bottom: 1px solid #f0f0f0;
+    }
+  }
+}
+.back-line-main {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  .back-line-header {
+    // padding: 15px;
+    box-sizing: border-box;
+    .back-line-header-title {
+      padding: 15px;
+      box-sizing: border-box;
+      background: #ffffff;
+      box-shadow: 0px 2px 8px 0px rgba(141, 149, 176, 0.15);
+      border-radius: 8px 8px 8px 8px;
+      border: 2px solid rgba(255, 255, 255, 0.2);
+      h2 {
+        margin: 0;
+      }
+      > div {
+        flex: 1;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        > dl {
+          flex: none;
+          width: 180px;
+          height: 80px;
+          display: flex;
+          //   align-items: center;
+          justify-content: space-between;
+          flex-direction: column;
+          padding: 10px;
+          box-sizing: border-box;
+          background: linear-gradient(
+            267deg,
+            rgba(42, 85, 229, 0.1) 0%,
+            rgba(42, 85, 229, 0) 100%
+          );
+          box-shadow: 0px 2px 8px 0px rgba(42, 85, 229, 0.1);
+          border-radius: 4px 4px 4px 4px;
+          border: 1px solid #ffffff;
+
+          > dd {
+            display: flex;
+            // align-items: center;
+            margin: 0;
+            font-family: PingFang SC, PingFang SC;
+            font-weight: 500;
+            font-size: 18px;
+            color: rgba(0, 0, 0, 0.85);
+            // padding-left: 15px;
+            box-sizing: border-box;
+          }
+        }
+      }
+      span {
+        display: block;
+        margin-right: 15px;
+      }
+      /deep/.ant-calendar-picker {
+        width: 300px;
+      }
+    }
+  }
+  > div {
+    // height: 152px;
+    // background: #fff;
+    .ant-form {
+      display: flex;
+      > .ant-form-item {
+        flex: none;
+        /deep/.ant-form-item-control-wrapper {
+          width: 100%;
+        }
+      }
+    }
+    .form-item-search {
+      // display: flex;
+      // justify-content: flex-end;
+      /deep/ .ant-form-item-control {
+        display: flex;
+        justify-content: flex-end;
+      }
+    }
+  }
+  .table-title {
+    padding: 15px 15px 0;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    h2 {
+      margin: 0;
+    }
+    > div {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+</style>

+ 460 - 0
src/pages/business/channel.vue

@@ -0,0 +1,460 @@
+<template>
+  <div class="quote">
+    <div class="quote-tree" style="border-radius: 8px">
+      <div><h2>部门所属</h2></div>
+      <div>
+        <!-- <a-tree  :tree-data="treeData" /> -->
+        <tree @getList="getVerification"></tree>
+      </div>
+    </div>
+    <div class="back-line-main">
+      <div class="back-line-header">
+        <div class="back-line-header-title">
+          <h2>合计</h2>
+          <div>
+            <dl>
+              <dt><img src="../../assets/img/car.png" alt="" /></dt>
+              <dd>
+                <span>车辆数</span>
+                <span>{{ BigOrder.frameno }}</span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><img src="../../assets/img/order.png" alt="" /></dt>
+              <dd>
+                <span>订单数数</span>
+                <span>{{ BigOrder.orderNumber || 0 }}</span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><img src="../../assets/img/orderMoney.png" alt="" /></dt>
+              <dd>
+                <span>成交率</span>
+                <span>
+                  {{
+                    BigOrder.closeRate
+                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
+                      : 0
+                  }}
+                </span>
+              </dd>
+            </dl>
+          </div>
+        </div>
+      </div>
+      <div style="background-color: #fff; margin-top: 15px">
+        <div class="table-title">
+          <h2>总报价</h2>
+          <div>
+            <span>时间筛选</span>
+            <a-range-picker
+              @change="onChangeTime"
+              v-model="formState.time"
+              value-format="YYYY-MM-DD"
+              style="margin-left: 10px"
+            >
+              <a-icon slot="suffixIcon" type="calendar" />
+            </a-range-picker>
+            <a-radio-group
+              default-value="0"
+              button-style="solid"
+              v-model="formState.dateType"
+              @change="getVerification()"
+              style="margin-left: 10px"
+            >
+              <a-radio-button
+                value="1"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近1月
+              </a-radio-button>
+              <a-radio-button
+                value="2"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近3月
+              </a-radio-button>
+              <a-radio-button
+                value="3"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近半年
+              </a-radio-button>
+            </a-radio-group>
+          </div>
+        </div>
+        <a-form
+          layout="inline"
+          :class="className"
+          :model="formState"
+          style="padding: 0 0 0 15px; box-sizing: border-box"
+        >
+          <a-form-item
+            label="业务员工号"
+            :labelCol="{ span: 8 }"
+            :colon="false"
+          >
+            <a-input
+              placeholder="请输入业务员工号"
+              v-model="formState.userId"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item
+            label="业务员姓名"
+            :labelCol="{ span: 8 }"
+            :colon="false"
+          >
+            <a-input
+              placeholder="请输入业务员姓名"
+              v-model="formState.userName"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item label="手机号" :labelCol="{ span: 5 }" :colon="false">
+            <a-input
+              placeholder="请输入手机号"
+              v-model="formState.mobile"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item label="车牌号" :labelCol="{ span: 5 }" :colon="false">
+            <a-input
+              placeholder="请输入车牌号"
+              v-model="formState.licenseno"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item label="车架号" :labelCol="{ span: 5 }" :colon="false">
+            <a-input
+              placeholder="请输入车架号"
+              v-model="formState.frameno"
+              allowClear
+            ></a-input>
+          </a-form-item>
+        </a-form>
+        <div
+          style="
+            display: flex;
+            justify-content: flex-end;
+            padding-right: 15px;
+            box-sizing: border-box;
+          "
+        >
+          <a-button type="primary" @click="getList">查询</a-button>
+        </div>
+        <standard-table
+          bordered
+          :columns="columns"
+          :dataSource="tableList"
+          :pagination="pagination"
+          @clear="onClear"
+          @change="onChange"
+          :loading="loading"
+        >
+          <div slot="count" slot-scope="{ text }">
+            {{ text != "-" ? text + "次" : text }}
+          </div>
+          <div slot="rate" slot-scope="{ text }">
+            {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
+          </div>
+        </standard-table>
+      </div>
+    </div>
+  </div>
+</template>
+          
+  <script>
+import StandardTable from "@/components/table/StandardTable";
+// import mixin from "../../minins/mixin";
+import tree from "@/components/tree/tree";
+import moment from "moment";
+
+const columns = [
+  {
+    title: "车牌号",
+    dataIndex: "licenseno",
+  },
+
+  {
+    title: "车架号",
+    dataIndex: "frameno",
+    // scopedSlots: { customRender: "parterCompanyName" },
+  },
+
+  {
+    title: "订单数量",
+    dataIndex: "orderNumber",
+  },
+  {
+    title: "成交率",
+    dataIndex: "closeRate",
+    scopedSlots: { customRender: "rate" },
+  },
+  {
+    title: "承保公司",
+    dataIndex: "namesimple",
+  },
+];
+
+export default {
+  components: {
+    StandardTable,
+    tree,
+  },
+  //   mixins: [mixin],
+  data() {
+    return {
+      formState: {
+        dateType: undefined,
+        time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
+        beginDate: moment().format("YYYY-MM-DD"),
+        endDate: moment().format("YYYY-MM-DD"),
+        licenseno: "",
+        userName: "",
+        mobile: "",
+        frameno: "",
+        userId: "",
+      },
+      backLinePersonnel: {},
+      columns: columns,
+      companyList: [],
+      tableList: [],
+      pagination: {
+        current: 1,
+        defaultPageSize: 10,
+        total: 0,
+        pagesize0ptions: ["10", "20", "30", "50", "100"],
+        hideOnSinglePage: false,
+        showQuickJumper: true, //
+        showSizeChanger: true, //是否可以改变pagesize
+        showTotal: (total) => `共 ${total} 条数据`,
+      },
+      loading: false,
+      wholeList: [],
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      storeList: [],
+      treeData: [
+        { title: "Expand to load", key: "0" },
+        { title: "Expand to load", key: "1" },
+        { title: "Tree Node", key: "2", isLeaf: true },
+      ],
+      BigOrder: {},
+    };
+  },
+  mounted() {
+    this.getVerification();
+    // setTimeout(() => {
+    // }, 1000);
+  },
+  methods: {
+    getList() {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
+      this.getVerification();
+    },
+    onChangeTime(val) {
+      // console.log(val);
+      this.formState.beginDate = val[0];
+      this.formState.endDate = val[1];
+      this.formState.dateType = undefined;
+      this.getVerification();
+    },
+    handleFinish() {
+      //
+    },
+    wholeHandleChange() {
+      this.getProvinceList(this.formState.whole);
+    },
+    provinceHandleChange() {
+      this.getCityList(this.formState.provinceId);
+    },
+    cityHandleChange() {
+      this.getAreaList(this.formState.cityId);
+    },
+    countyHandleChange() {
+      this.getStoreList(this.formState.countyId);
+    },
+
+    async getVerification() {
+      this.loading = true;
+
+      this.$API.quote
+        .getBigOrderList({
+          pageNum: this.pagination.current,
+          pageSize: this.pagination.defaultPageSize,
+          ...this.formState,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.loading = false;
+            this.tableList = res.data.data.content;
+            this.pagination = {
+              current: res.data.data.pageNum,
+              defaultPageSize: res.data.data.pageSize,
+              total: res.data.data.totalSize,
+            };
+          }
+        });
+      this.$API.quote
+        .getBigOrderMount({
+          // pageNum: this.pagination.current,
+          // pageSize: this.pagination.defaultPageSize,
+          ...this.formState,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            console.log(res);
+            this.BigOrder = { ...res.data.data };
+          }
+        });
+    },
+    onClear() {
+      this.$message.info("您清空了勾选的所有行");
+    },
+
+    onChange(pagination, filters, sorter, { currentDataSource }) {
+      // this.$message.info('表格状态改变了')
+      console.log(pagination, filters, sorter, { currentDataSource });
+      this.pagination = {
+        current: pagination.current,
+        defaultPageSize: pagination.pageSize,
+        total: pagination.total,
+      };
+      this.getVerification();
+    },
+  },
+};
+</script>
+  <style lang='less' scoped>
+.quote {
+  display: flex;
+  > div:first-child {
+    width: 20%;
+    background: #fff;
+    margin-right: 15px;
+  }
+  .quote-tree {
+    padding: 15px;
+    box-sizing: border-box;
+    //
+    > div:first-child {
+      border-bottom: 1px solid #f0f0f0;
+    }
+  }
+}
+.back-line-main {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  .back-line-header {
+    // padding: 15px;
+    box-sizing: border-box;
+    .back-line-header-title {
+      padding: 15px;
+      box-sizing: border-box;
+      background: #ffffff;
+      box-shadow: 0px 2px 8px 0px rgba(141, 149, 176, 0.15);
+      border-radius: 8px 8px 8px 8px;
+      border: 2px solid rgba(255, 255, 255, 0.2);
+      h2 {
+        margin: 0;
+      }
+      > div {
+        flex: 1;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        > dl {
+          flex: none;
+          width: 271px;
+          height: 61px;
+          display: flex;
+          align-items: center;
+          background: linear-gradient(
+            267deg,
+            rgba(42, 85, 229, 0.1) 0%,
+            rgba(42, 85, 229, 0) 100%
+          );
+          box-shadow: 0px 2px 8px 0px rgba(42, 85, 229, 0.1);
+          border-radius: 4px 4px 4px 4px;
+          border: 1px solid #ffffff;
+
+          img {
+            width: 44px;
+            height: auto;
+          }
+          > dd {
+            display: flex;
+            align-items: center;
+            margin: 0;
+            font-family: PingFang SC, PingFang SC;
+            font-weight: 500;
+            font-size: 18px;
+            color: rgba(0, 0, 0, 0.85);
+            padding-left: 15px;
+            box-sizing: border-box;
+          }
+        }
+      }
+      span {
+        display: block;
+        margin-right: 15px;
+      }
+      /deep/.ant-calendar-picker {
+        width: 300px;
+      }
+    }
+  }
+  > div {
+    // height: 152px;
+    // background: #fff;
+    .ant-form {
+      display: flex;
+      > .ant-form-item {
+        flex: 1;
+        /deep/.ant-form-item-control-wrapper {
+          width: 100%;
+        }
+      }
+    }
+    .form-item-search {
+      // display: flex;
+      // justify-content: flex-end;
+      /deep/ .ant-form-item-control {
+        display: flex;
+        justify-content: flex-end;
+      }
+    }
+  }
+  .table-title {
+    padding: 15px 15px 0;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    h2 {
+      margin: 0;
+    }
+    > div {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+</style>

+ 460 - 0
src/pages/business/sales.vue

@@ -0,0 +1,460 @@
+<template>
+  <div class="quote">
+    <div class="quote-tree" style="border-radius: 8px">
+      <div><h2>部门所属</h2></div>
+      <div>
+        <!-- <a-tree  :tree-data="treeData" /> -->
+        <tree @getList="getVerification"></tree>
+      </div>
+    </div>
+    <div class="back-line-main">
+      <div class="back-line-header">
+        <div class="back-line-header-title">
+          <h2>合计</h2>
+          <div>
+            <dl>
+              <dt><img src="../../assets/img/car.png" alt="" /></dt>
+              <dd>
+                <span>车辆数</span>
+                <span>{{ BigOrder.frameno }}</span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><img src="../../assets/img/order.png" alt="" /></dt>
+              <dd>
+                <span>订单数数</span>
+                <span>{{ BigOrder.orderNumber || 0 }}</span>
+              </dd>
+            </dl>
+            <dl>
+              <dt><img src="../../assets/img/orderMoney.png" alt="" /></dt>
+              <dd>
+                <span>成交率</span>
+                <span>
+                  {{
+                    BigOrder.closeRate
+                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
+                      : 0
+                  }}
+                </span>
+              </dd>
+            </dl>
+          </div>
+        </div>
+      </div>
+      <div style="background-color: #fff; margin-top: 15px">
+        <div class="table-title">
+          <h2>总报价</h2>
+          <div>
+            <span>时间筛选</span>
+            <a-range-picker
+              @change="onChangeTime"
+              v-model="formState.time"
+              value-format="YYYY-MM-DD"
+              style="margin-left: 10px"
+            >
+              <a-icon slot="suffixIcon" type="calendar" />
+            </a-range-picker>
+            <a-radio-group
+              default-value="0"
+              button-style="solid"
+              v-model="formState.dateType"
+              @change="getVerification()"
+              style="margin-left: 10px"
+            >
+              <a-radio-button
+                value="1"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近1月
+              </a-radio-button>
+              <a-radio-button
+                value="2"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近3月
+              </a-radio-button>
+              <a-radio-button
+                value="3"
+                @click="
+                  (formState.time = []),
+                    (formState.beginDate = ''),
+                    (formState.endDate = '')
+                "
+              >
+                近半年
+              </a-radio-button>
+            </a-radio-group>
+          </div>
+        </div>
+        <a-form
+          layout="inline"
+          :class="className"
+          :model="formState"
+          style="padding: 0 0 0 15px; box-sizing: border-box"
+        >
+          <a-form-item
+            label="业务员工号"
+            :labelCol="{ span: 8 }"
+            :colon="false"
+          >
+            <a-input
+              placeholder="请输入业务员工号"
+              v-model="formState.userId"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item
+            label="业务员姓名"
+            :labelCol="{ span: 8 }"
+            :colon="false"
+          >
+            <a-input
+              placeholder="请输入业务员姓名"
+              v-model="formState.userName"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item label="手机号" :labelCol="{ span: 5 }" :colon="false">
+            <a-input
+              placeholder="请输入手机号"
+              v-model="formState.mobile"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item label="车牌号" :labelCol="{ span: 5 }" :colon="false">
+            <a-input
+              placeholder="请输入车牌号"
+              v-model="formState.licenseno"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item label="车架号" :labelCol="{ span: 5 }" :colon="false">
+            <a-input
+              placeholder="请输入车架号"
+              v-model="formState.frameno"
+              allowClear
+            ></a-input>
+          </a-form-item>
+        </a-form>
+        <div
+          style="
+            display: flex;
+            justify-content: flex-end;
+            padding-right: 15px;
+            box-sizing: border-box;
+          "
+        >
+          <a-button type="primary" @click="getList">查询</a-button>
+        </div>
+        <standard-table
+          bordered
+          :columns="columns"
+          :dataSource="tableList"
+          :pagination="pagination"
+          @clear="onClear"
+          @change="onChange"
+          :loading="loading"
+        >
+          <div slot="count" slot-scope="{ text }">
+            {{ text != "-" ? text + "次" : text }}
+          </div>
+          <div slot="rate" slot-scope="{ text }">
+            {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
+          </div>
+        </standard-table>
+      </div>
+    </div>
+  </div>
+</template>
+          
+  <script>
+import StandardTable from "@/components/table/StandardTable";
+// import mixin from "../../minins/mixin";
+import tree from "@/components/tree/tree";
+import moment from "moment";
+
+const columns = [
+  {
+    title: "车牌号",
+    dataIndex: "licenseno",
+  },
+
+  {
+    title: "车架号",
+    dataIndex: "frameno",
+    // scopedSlots: { customRender: "parterCompanyName" },
+  },
+
+  {
+    title: "订单数量",
+    dataIndex: "orderNumber",
+  },
+  {
+    title: "成交率",
+    dataIndex: "closeRate",
+    scopedSlots: { customRender: "rate" },
+  },
+  {
+    title: "承保公司",
+    dataIndex: "namesimple",
+  },
+];
+
+export default {
+  components: {
+    StandardTable,
+    tree,
+  },
+  //   mixins: [mixin],
+  data() {
+    return {
+      formState: {
+        dateType: undefined,
+        time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
+        beginDate: moment().format("YYYY-MM-DD"),
+        endDate: moment().format("YYYY-MM-DD"),
+        licenseno: "",
+        userName: "",
+        mobile: "",
+        frameno: "",
+        userId: "",
+      },
+      backLinePersonnel: {},
+      columns: columns,
+      companyList: [],
+      tableList: [],
+      pagination: {
+        current: 1,
+        defaultPageSize: 10,
+        total: 0,
+        pagesize0ptions: ["10", "20", "30", "50", "100"],
+        hideOnSinglePage: false,
+        showQuickJumper: true, //
+        showSizeChanger: true, //是否可以改变pagesize
+        showTotal: (total) => `共 ${total} 条数据`,
+      },
+      loading: false,
+      wholeList: [],
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      storeList: [],
+      treeData: [
+        { title: "Expand to load", key: "0" },
+        { title: "Expand to load", key: "1" },
+        { title: "Tree Node", key: "2", isLeaf: true },
+      ],
+      BigOrder: {},
+    };
+  },
+  mounted() {
+    this.getVerification();
+    // setTimeout(() => {
+    // }, 1000);
+  },
+  methods: {
+    getList() {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
+      this.getVerification();
+    },
+    onChangeTime(val) {
+      // console.log(val);
+      this.formState.beginDate = val[0];
+      this.formState.endDate = val[1];
+      this.formState.dateType = undefined;
+      this.getVerification();
+    },
+    handleFinish() {
+      //
+    },
+    wholeHandleChange() {
+      this.getProvinceList(this.formState.whole);
+    },
+    provinceHandleChange() {
+      this.getCityList(this.formState.provinceId);
+    },
+    cityHandleChange() {
+      this.getAreaList(this.formState.cityId);
+    },
+    countyHandleChange() {
+      this.getStoreList(this.formState.countyId);
+    },
+
+    async getVerification() {
+      this.loading = true;
+
+      this.$API.quote
+        .getBigOrderList({
+          pageNum: this.pagination.current,
+          pageSize: this.pagination.defaultPageSize,
+          ...this.formState,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.loading = false;
+            this.tableList = res.data.data.content;
+            this.pagination = {
+              current: res.data.data.pageNum,
+              defaultPageSize: res.data.data.pageSize,
+              total: res.data.data.totalSize,
+            };
+          }
+        });
+      this.$API.quote
+        .getBigOrderMount({
+          // pageNum: this.pagination.current,
+          // pageSize: this.pagination.defaultPageSize,
+          ...this.formState,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            console.log(res);
+            this.BigOrder = { ...res.data.data };
+          }
+        });
+    },
+    onClear() {
+      this.$message.info("您清空了勾选的所有行");
+    },
+
+    onChange(pagination, filters, sorter, { currentDataSource }) {
+      // this.$message.info('表格状态改变了')
+      console.log(pagination, filters, sorter, { currentDataSource });
+      this.pagination = {
+        current: pagination.current,
+        defaultPageSize: pagination.pageSize,
+        total: pagination.total,
+      };
+      this.getVerification();
+    },
+  },
+};
+</script>
+  <style lang='less' scoped>
+.quote {
+  display: flex;
+  > div:first-child {
+    width: 20%;
+    background: #fff;
+    margin-right: 15px;
+  }
+  .quote-tree {
+    padding: 15px;
+    box-sizing: border-box;
+    //
+    > div:first-child {
+      border-bottom: 1px solid #f0f0f0;
+    }
+  }
+}
+.back-line-main {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  .back-line-header {
+    // padding: 15px;
+    box-sizing: border-box;
+    .back-line-header-title {
+      padding: 15px;
+      box-sizing: border-box;
+      background: #ffffff;
+      box-shadow: 0px 2px 8px 0px rgba(141, 149, 176, 0.15);
+      border-radius: 8px 8px 8px 8px;
+      border: 2px solid rgba(255, 255, 255, 0.2);
+      h2 {
+        margin: 0;
+      }
+      > div {
+        flex: 1;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        > dl {
+          flex: none;
+          width: 271px;
+          height: 61px;
+          display: flex;
+          align-items: center;
+          background: linear-gradient(
+            267deg,
+            rgba(42, 85, 229, 0.1) 0%,
+            rgba(42, 85, 229, 0) 100%
+          );
+          box-shadow: 0px 2px 8px 0px rgba(42, 85, 229, 0.1);
+          border-radius: 4px 4px 4px 4px;
+          border: 1px solid #ffffff;
+
+          img {
+            width: 44px;
+            height: auto;
+          }
+          > dd {
+            display: flex;
+            align-items: center;
+            margin: 0;
+            font-family: PingFang SC, PingFang SC;
+            font-weight: 500;
+            font-size: 18px;
+            color: rgba(0, 0, 0, 0.85);
+            padding-left: 15px;
+            box-sizing: border-box;
+          }
+        }
+      }
+      span {
+        display: block;
+        margin-right: 15px;
+      }
+      /deep/.ant-calendar-picker {
+        width: 300px;
+      }
+    }
+  }
+  > div {
+    // height: 152px;
+    // background: #fff;
+    .ant-form {
+      display: flex;
+      > .ant-form-item {
+        flex: 1;
+        /deep/.ant-form-item-control-wrapper {
+          width: 100%;
+        }
+      }
+    }
+    .form-item-search {
+      // display: flex;
+      // justify-content: flex-end;
+      /deep/ .ant-form-item-control {
+        display: flex;
+        justify-content: flex-end;
+      }
+    }
+  }
+  .table-title {
+    padding: 15px 15px 0;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    h2 {
+      margin: 0;
+    }
+    > div {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+</style>

+ 400 - 0
src/pages/sys/auth.vue

@@ -0,0 +1,400 @@
+<template>
+  <div class="menu">
+    <div class="menu-head">
+      <a-input
+        placeholder="接口地址"
+        style="width: 300px"
+        v-model="searchUrl"
+        allowClear
+      ></a-input>
+      <a-button type="primary" @click="searchList">查询</a-button>
+      <a-button type="primary" style="background: green" @click="addMenu"
+        >新增</a-button
+      >
+    </div>
+    <standard-table
+      :columns="columns"
+      :dataSource="tableList"
+      :pagination="pagination"
+      :loading="loading"
+      style="background: #fff"
+      :customRow="customRow"
+    >
+      <div
+        class="operation-list"
+        slot="operation"
+        slot-scope="{ text, record }"
+      >
+        <a-button type="primary" @click="editMenu({ text, record }, 'auth')"
+          >数据权限</a-button
+        >
+        <a-button type="danger" @click="delMenu({ text, record }, 'auth')"
+          >清空</a-button
+        >
+      </div>
+      <div slot="type" slot-scope="record">
+        <!-- {{ text }} -->
+        {{ record.customScriptFlag == 0 ? "否" : "是" }}
+      </div>
+      <div slot="permission" slot-scope="{ text }">
+        {{
+          authList
+            .map((v) => {
+              return v.id == text ? v.label : "";
+            })
+            .join("")
+        }}
+      </div>
+    </standard-table>
+
+    <a-modal
+      v-model="visible"
+      :title="title"
+      @ok="handleOk"
+      layout="inline"
+      width="50%"
+      :confirm-loading="confirmLoading"
+    >
+      <a-form :layout="formLayout">
+        <!-- 此处是数据权限 -->
+        <a-form-item label="接口地址" v-bind="formItemLayout">
+          <a-input placeholder="接口地址" v-model="authPermissions.url" />
+        </a-form-item>
+
+        <a-form-item label="是否自定义脚本" v-bind="formItemLayout">
+          <a-switch
+            checked-children="是"
+            un-checked-children="否"
+            v-model="authPermissions.customScriptFlag"
+          ></a-switch>
+          <!-- {{ authPermissions.customScriptFlag }} -->
+        </a-form-item>
+        <a-form-item
+          label="数据权限分类"
+          v-bind="formItemLayout"
+          v-show="!authPermissions.customScriptFlag"
+        >
+          <a-select v-model="authPermissions.dataPermissionId">
+            <a-select-option
+              v-for="item in authList"
+              :key="item.id"
+              :value="item.id"
+              >{{ item.label }}</a-select-option
+            >
+          </a-select>
+        </a-form-item>
+        <a-form-item
+          label="脚本"
+          v-bind="formItemLayout"
+          v-show="authPermissions.customScriptFlag"
+        >
+          <a-input
+            placeholder="脚本内容"
+            v-model="dataForm.icon"
+            type="textarea"
+          />
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+  
+  <script>
+import StandardTable from "@/components/table/StandardTable";
+
+const columns = [
+  {
+    title: "接口地址",
+    dataIndex: "url",
+    //
+  },
+
+  {
+    title: "是否自定义脚本",
+    dataIndex: "customScriptFlag",
+    scopedSlots: { customRender: "type" },
+  },
+  {
+    title: "数据权限分类",
+    dataIndex: "dataPermissionId",
+    scopedSlots: { customRender: "permission" },
+  },
+  {
+    title: "脚本内容",
+    dataIndex: "scriptContent",
+  },
+
+  {
+    title: "操作",
+    key: "operation",
+    scopedSlots: { customRender: "operation" },
+  },
+];
+
+export default {
+  components: {
+    StandardTable,
+  },
+  data() {
+    return {
+      visible: false,
+      confirmLoading: false,
+      title: "",
+      formLayout: "horizontal",
+      menuTypeList: ["目录", "菜单", "按钮"],
+      replaceFields: {
+        children: "children",
+        title: "name",
+        key: "id",
+      },
+      pagination: {
+        current: 1,
+        defaultPageSize: 10,
+        total: 0,
+        pagesize0ptions: ["10", "20", "30", "50", "100"],
+        hideOnSinglePage: false,
+        showQuickJumper: true, //
+        showSizeChanger: true, //是否可以改变pagesize
+        showTotal: (total) => `共 ${total} 条数据`,
+      },
+      dataForm: {
+        id: 0,
+        type: 1,
+        name: "",
+        parentId: 0,
+        parentName: "",
+        url: "",
+        perms: "",
+        orderNum: 0,
+        icon: "",
+      },
+      formItemLayout: {
+        labelCol: {
+          xs: { span: 5 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+      },
+      menuList: [],
+      columns,
+      tableList: [],
+      loading: false,
+      resetForm: {},
+      authType: false,
+      authList: [],
+      authPermissions: {
+        customScriptFlag: 0,
+        dataPermissionId: "",
+        id: undefined,
+        menuId: 0,
+        scriptContent: "",
+        url: "",
+      },
+      searchUrl: "",
+    };
+  },
+  created() {
+    this.getList();
+    this.resetForm = { ...this.authPermissions };
+    this.getAuthList();
+  },
+  mounted() {},
+  methods: {
+    searchList() {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
+      this.getList();
+    },
+    customRow(record, index) {
+      console.log(record, index);
+      return {
+        style: {
+          cursor: "move",
+        },
+        // 鼠标移入
+        onMouseenter: (event) => {
+          // 兼容IE
+          var ev = event || window.event;
+          ev.target.draggable = true;
+        },
+        // 开始拖拽
+        onDragstart: (event) => {
+          console.log(event);
+          // 兼容IE
+          var ev = event || window.event;
+          // 阻止冒泡
+          ev.stopPropagation();
+          // 得到源目标数据
+          this.sourceObj = record;
+        },
+        // 拖动元素经过的元素
+        onDragover: (event) => {
+          // 兼容 IE
+          var ev = event || window.event;
+          // 阻止默认行为
+          ev.preventDefault();
+        },
+        // 鼠标松开
+        onDrop: (event) => {
+          // 兼容IE
+          var ev = event || window.event;
+          // 阻止冒泡
+          ev.stopPropagation();
+          // 得到目标数据
+          this.targetObj = record;
+          console.log(this.sourceObj, this.targetObj);
+          const tempDta = this.data;
+          tempDta[this.targetObj.weight] = this.sourceObj;
+          tempDta[this.sourceObj.weight] = this.targetObj;
+          let weightList = [];
+          tempDta.forEach((item, index) => {
+            item.weight = index;
+            weightList.push({
+              id: item.id,
+              weight: index,
+            });
+          });
+          // this.handleWeightModify(weightList); // 更改顺序接口
+        },
+      };
+    },
+
+    getAuthList() {
+      this.$API.sysManage.getAuthModule("sjqx").then((res) => {
+        if (res.data.code === 200) {
+          this.authList = [...res.data.data];
+        }
+      });
+    },
+    delMenu(item) {
+      this.dataForm = { ...item.record };
+      let that = this;
+
+      this.$confirm({
+        title: "确认删除吗?",
+        onOk() {
+          that.$API.sysManage
+            .removeMenuAuth({ id: item.record.id })
+            .then((res) => {
+              if (res.data.code === 200) {
+                that.$message.success("操作成功");
+                that.getList();
+              }
+            });
+        },
+      });
+      // this.$API.sysManage.delMenuItem([{ id: item.record.id }]).then((res) => {
+      //   if (res.data.code === 200) {
+      //     this.getList();
+      //   }
+      // });
+    },
+    editMenu(item, type) {
+      this.title = "编辑";
+      this.visible = true;
+      this.dataForm = { ...item.record };
+
+      if (type) {
+        this.authType = true;
+        this.authPermissions.id = item.record.id;
+        this.$API.sysManage
+          .getMenuAuthItem({ id: item.record.id })
+          .then((res) => {
+            if (res.data.code === 200) {
+              this.authPermissions = { ...res.data.data };
+              this.authPermissions.dataPermissionId =
+                res.data.data.dataPermissionId * 1;
+            }
+          });
+      } else {
+        this.authType = false;
+      }
+    },
+    onSelect(val, { node }) {
+      this.dataForm.parentId = val[0];
+      this.dataForm.parentName = node.title;
+    },
+    getList() {
+      this.loading = true;
+      this.$API.sysManage
+        .getAuthList({
+          pageNum: this.pagination.current,
+          pageSize: this.pagination.defaultPageSize,
+          url: this.searchUrl,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.loading = false;
+
+            this.tableList = [...res.data.data.content];
+            this.pagination = {
+              current: res.data.data.pageNum,
+              defaultPageSize: res.data.data.pageSize,
+              total: res.data.data.totalSize,
+            };
+          }
+        });
+    },
+    addMenu() {
+      this.title = "新增";
+      this.visible = true;
+      this.authPermissions = { ...this.resetForm };
+    },
+    handleOk() {
+      //   this.visible = false;
+      // this.confirmLoading = true;
+
+      // console.log(this.authPermissions);
+      this.$API.sysManage
+        .setMenuAuth({
+          customScriptFlag: this.authPermissions.customScriptFlag ? 1 : 0,
+          dataPermissionId:
+            this.authPermissions.customScriptFlag == 0
+              ? this.authPermissions.dataPermissionId
+              : undefined,
+          id: this.authPermissions.id,
+          menuId: this.authPermissions.menuId,
+          scriptContent: this.authPermissions.customScriptFlag
+            ? this.authPermissions.scriptContent
+            : undefined,
+          url: this.authPermissions.url,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.$message.success("操作成功");
+            this.confirmLoading = false;
+            this.visible = false;
+            this.getList();
+          }
+        });
+    },
+  },
+};
+</script>
+  <style lang='less' scoped>
+.menu {
+  display: flex;
+  flex-direction: column;
+  background: #fff;
+  .menu-head {
+    display: flex;
+    background: #fff;
+    padding: 15px;
+    box-sizing: border-box;
+    button {
+      margin-left: 10px;
+    }
+  }
+  /deep/ .ant-form .ant-form-item {
+    display: flex !important;
+  }
+  .operation-list {
+    button {
+      margin-right: 10px;
+    }
+  }
+}
+</style>

+ 3 - 2
src/pages/sys/menu.vue

@@ -22,12 +22,12 @@
         <a-button type="primary" @click="editMenu({ text, record })"
           >编辑</a-button
         >
-        <a-button type="primary" @click="editMenu({ text, record }, 'auth')"
+        <!-- <a-button type="primary" @click="editMenu({ text, record }, 'auth')"
           >数据权限</a-button
         >
         <a-button type="danger" @click="delMenu({ text, record }, 'auth')"
           >清空</a-button
-        >
+        > -->
       </div>
     </a-table>
     <a-modal
@@ -457,6 +457,7 @@ export default {
 .menu {
   display: flex;
   flex-direction: column;
+  background: #fff;
   .menu-head {
     display: flex;
     button {

+ 252 - 0
src/pages/sys/permissionsAuth.vue

@@ -0,0 +1,252 @@
+<template>
+  <div class="menu">
+    <div class="menu-head">
+      <a-input
+        placeholder="名称"
+        style="width: 300px"
+        v-model="searchName"
+        allowClear
+      ></a-input>
+      <a-button type="primary" @click="searchList">查询</a-button>
+    </div>
+    <standard-table
+      bordered
+      :columns="columns"
+      :dataSource="tableList"
+      :pagination="pagination"
+      @change="onChange"
+      :loading="loading"
+    >
+      <div class="operation-list" slot="operation" slot-scope="record">
+        <a-button type="primary" @click="editMenu(record)">数据权限</a-button>
+      </div>
+    </standard-table>
+    <a-modal
+      v-model="visible"
+      :title="title"
+      @ok="handleOk"
+      layout="inline"
+      width="50%"
+      :confirm-loading="confirmLoading"
+    >
+      <a-form :layout="formLayout">
+        <tree :checkable="checkable" @checkTree="checkTree" ref="tree"></tree>
+      </a-form>
+    </a-modal>
+  </div>
+</template>
+    
+    <script>
+import StandardTable from "@/components/table/StandardTable";
+import tree from "@/components/tree/tree";
+const columns = [
+  {
+    title: "员工工号",
+    dataIndex: "userId",
+    //
+  },
+
+  {
+    title: "姓名",
+    dataIndex: "name",
+  },
+  {
+    title: "机构Id",
+    dataIndex: "deptId",
+  },
+  {
+    title: "机构名称",
+    dataIndex: "deptName",
+  },
+
+  {
+    title: "操作",
+    key: "operation",
+    scopedSlots: { customRender: "operation" },
+  },
+];
+
+export default {
+  components: {
+    StandardTable,
+    tree,
+  },
+  data() {
+    return {
+      visible: false,
+      confirmLoading: false,
+      title: "",
+      checkable: true,
+      formLayout: "horizontal",
+      menuTypeList: ["目录", "菜单", "按钮"],
+      replaceFields: {
+        children: "children",
+        title: "name",
+        key: "id",
+      },
+      dataForm: {
+        id: 0,
+        type: 1,
+        name: "",
+        parentId: 0,
+        parentName: "",
+        url: "",
+        perms: "",
+        orderNum: 0,
+        icon: "",
+      },
+      pagination: {
+        current: 1,
+        defaultPageSize: 10,
+        total: 0,
+        pagesize0ptions: ["10", "20", "30", "50", "100"],
+        hideOnSinglePage: false,
+        showQuickJumper: true, //
+        showSizeChanger: true, //是否可以改变pagesize
+      },
+      formItemLayout: {
+        labelCol: {
+          xs: { span: 5 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+      },
+      menuList: [],
+      columns,
+      tableList: [],
+      loading: false,
+      resetForm: {},
+      authType: false,
+      authList: [],
+      authPermissions: {
+        customScriptFlag: 0,
+        dataPermissionId: "",
+        id: undefined,
+        menuId: 0,
+        scriptContent: "",
+        url: "",
+      },
+      checkList: [],
+      defaultCheckList: [],
+      searchName: "",
+    };
+  },
+  created() {
+    this.getList();
+    this.resetForm = { ...this.dataForm };
+    this.getAuthList();
+  },
+  mounted() {},
+  methods: {
+    searchList() {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
+      this.getList();
+    },
+    checkTree(list) {
+      this.checkList = [...list];
+      //   console.log(list);
+    },
+    getAuthList() {
+      this.$API.sysManage.getAuthModule("sjqx").then((res) => {
+        if (res.data.code === 200) {
+          this.authList = [...res.data.data];
+        }
+      });
+    },
+
+    editMenu(item) {
+      //   this.defaultCheckList = [];
+      this.title = "数据权限配置";
+      this.visible = true;
+      this.dataForm = { ...item.record };
+      this.$nextTick(() => {
+        this.$refs.tree.setExpandKys(item.record);
+        // this.defaultCheckList = [""];
+      });
+      //   this.setExpandKys(item.record);
+    },
+    setExpandKys() {},
+    onChange(pagination) {
+      // this.$message.info('表格状态改变了')
+      // console.log(pagination, filters, sorter, { currentDataSource });
+      this.pagination = {
+        current: pagination.current,
+        defaultPageSize: pagination.pageSize,
+        total: pagination.total,
+      };
+      this.getList();
+    },
+    getList() {
+      this.loading = true;
+      this.$API.sysManage
+        .getUserList({
+          pageNum: this.pagination.current,
+          pageSize: this.pagination.defaultPageSize,
+          name: this.searchName,
+          agentFlag: 0,
+          roleId: "22",
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.loading = false;
+
+            this.tableList = [...res.data.data.records];
+            // this.pagination.current = res.data.data.pageNum;
+            // this.pagination.defaultPageSize = res.data.data.pageSize;
+            this.pagination.total = res.data.data.total;
+          }
+        });
+    },
+    // addMenu() {
+    //   this.title = "新增";
+    //   this.visible = true;
+    //   this.dataForm = { ...this.resetForm };
+    // },
+    handleOk() {
+      //   this.visible = false;
+      // this.confirmLoading = true;
+      //   console.log(this.dataForm, this.checkList);
+      this.$API.sysManage
+        .UserSetDeptAuth({
+          userId: this.dataForm.userId,
+          deptIds: this.checkList,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.$message.success("操作成功");
+            this.confirmLoading = false;
+            this.visible = false;
+            this.getList();
+          }
+        });
+    },
+  },
+};
+</script>
+    <style lang='less' scoped>
+.menu {
+  display: flex;
+  flex-direction: column;
+  background: #fff;
+  .menu-head {
+    display: flex;
+    padding: 15px;
+    box-sizing: border-box;
+    button {
+      margin-left: 15px;
+    }
+  }
+  /deep/ .ant-form .ant-form-item {
+    display: flex !important;
+  }
+  .operation-list {
+    button {
+      margin-right: 10px;
+    }
+  }
+}
+</style>

+ 7 - 0
src/pages/sys/roleConfig.vue

@@ -16,6 +16,7 @@
               v-model="formState.userName"
               style="width: 300px"
             ></a-input>
+            <a-button type="primary" @click="search">查询</a-button>
           </div>
         </div>
       </div>
@@ -148,6 +149,11 @@ export default {
     this.getRole();
   },
   methods: {
+    search() {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
+      this.getDeptList();
+    },
     getRole() {
       this.$API.sysManage
         .getRoleAll({
@@ -236,6 +242,7 @@ export default {
           pageSize: this.pagination.defaultPageSize,
           sysType: 2,
           deptId: id ? id : "",
+          name: this.formState.userName,
         })
         .then((res) => {
           if (res.data.code === 200) {

+ 2 - 2
src/services/api.js

@@ -6,11 +6,11 @@
 
 // const BASE_URL = '"https://test.baoxianzhanggui.com/web-api"'//测试服务器
 // const BASE_URL = '"https://test.baoxianzhanggui.com/web-api"'//正式服务器
-// const BASE_URL = '"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
+const BASE_URL = '"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
 // const BASE_URL= '"http://192.168.0.115:8080/"' //凯森
 // const BASE_URL= '"http://192.168.0.106:8080/"'//屈晨
 // const BASE_URL= '"http://192.168.0.253:8080/"'//田智
-const BASE_URL = 'http://192.168.0.42:8080'//武鸿鹏/
+// const BASE_URL = 'http://192.168.0.42:8080'//武鸿鹏/
 // const BASE_URL= '"http:///192.168.0.253:8080/"'//田智
 
 // const BASE_URL= '"http://192.168.1.101:8080/"'

+ 42 - 8
src/services/sysManage.js

@@ -53,24 +53,53 @@ export async function getAuthModule(data) {
     return request("/dict/findByLable?lable=" + data, METHOD.GET)
 }
 
+
+
+
+//根据用户id查询菜单树
+export async function findMenuListByUserId(data) {
+    return request("/kztMenu/findMenuListByUserId?userId=" + data.userId, METHOD.GET,)
+}
+
+//数据权限模块
+//获取用户列表信息
+export async function getUserList(data) {
+    return request("/user/findBackUserList", METHOD.POST, data)
+}
+//用户添加机构树权限
+export async function UserSetDeptAuth(data) {
+    return request("/kztUserDept/update", METHOD.PUT, data)
+}
+//获取单个用户信息
+export async function getUserItem(data) {
+    return request("/kztUserDept/getByUserId", METHOD.GET, data)
+}
+
+
+//接口访问权限配置
+//接口访问权限列表
+export async function getAuthList(data) {
+    return request("/kztDataPermission/queryPage", METHOD.POST, data)
+}
+
 //菜单添加权限
 export async function setMenuAuth(data) {
     return request("/kztDataPermission/saveOrUpdate", METHOD.POST, data)
 }
-
 //菜单权限查询
 export async function getMenuAuthItem(data) {
-    return request("/kztDataPermission/findByMenuId?menuId=" + data.menuId, METHOD.GET,)
+    return request("/kztDataPermission/findById?id=" + data.id, METHOD.GET,)
 }
 
 //菜单权限清空
 export async function removeMenuAuth(data) {
-    return request("/kztDataPermission/delete?menuId=" + data.menuId, METHOD.GET,)
-}
-//根据用户id查询菜单树
-export async function findMenuListByUserId(data) {
-    return request("/kztMenu/findMenuListByUserId?userId=" + data.userId, METHOD.GET,)
+    return request("/kztDataPermission/delete?id=" + data.id, METHOD.GET,)
 }
+// //获取单个用户信息
+// export async function getUserItem(data) {
+//     return request("/kztDataPermission/getByUserId", METHOD.GET, data)
+// }
+
 
 
 
@@ -94,7 +123,12 @@ export default {
     getAuthModule,
     setMenuAuth,
     getMenuAuthItem,
+    getAuthList,
     removeMenuAuth,
-    findMenuListByUserId
+    findMenuListByUserId,
+    getUserList,
+    UserSetDeptAuth,
+    getUserItem
+
 
 }

+ 4 - 1
src/utils/request.js

@@ -24,7 +24,8 @@ const AUTH_TYPE = {
 // http method
 const METHOD = {
   GET: 'get',
-  POST: 'post'
+  POST: 'post',
+  PUT: 'put',
 }
 /**
  * axios请求
@@ -40,6 +41,8 @@ async function request(url, method, params, config) {
       return axios.get(Url, { params, ...config })
     case METHOD.POST:
       return axios.post(Url, params, config)
+    case METHOD.PUT:
+      return axios.put(Url, params, config)
     default:
       return axios.get(Url, { params, ...config })
   }