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

Merge branch 'dev' of http://10.87.10.227:4000/jzyd_yyds/soc_web into dev

luowei 2 жил өмнө
parent
commit
d6bafc8a70
35 өөрчлөгдсөн 1995 нэмэгдсэн , 119 устгасан
  1. 1 1
      .env.development
  2. 1 1
      .env.production
  3. 1 1
      .env.staging
  4. 1 0
      package.json
  5. 6 0
      src/assets/images/u29.svg
  6. 1 1
      src/assets/styles/element-variables.scss
  7. 4 3
      src/assets/styles/index.scss
  8. 48 0
      src/components/table/components/search.vue
  9. 36 0
      src/components/table/components/tab.vue
  10. 238 0
      src/components/table/gx.search.table.vue
  11. 122 0
      src/components/table/mix.search.js
  12. 223 0
      src/components/table/mix.table.select.js
  13. 273 0
      src/components/table/search.table.vue
  14. 237 0
      src/components/table/special.search.table.vue
  15. 33 0
      src/components/table/table.column.color.vue
  16. 21 0
      src/components/table/table.column.date.vue
  17. 36 0
      src/components/table/table.column.image.vue
  18. 3 1
      src/layout/components/Navbar.vue
  19. 2 2
      src/layout/components/Settings/index.vue
  20. 1 1
      src/permission.js
  21. 2 2
      src/settings.js
  22. 1 1
      src/store/modules/user.js
  23. 1 1
      src/utils/request.js
  24. 11 0
      src/views/business/checkManager/api.js
  25. 193 0
      src/views/business/checkManager/dialog.edit.vue
  26. 182 0
      src/views/business/checkManager/index-last.vue
  27. 176 0
      src/views/business/checkManager/index.vue
  28. 15 3
      src/views/business/checkNote/index.vue
  29. 14 6
      src/views/login.vue
  30. 22 22
      src/views/system/dept/index.vue
  31. 51 46
      src/views/system/user/index.vue
  32. 9 8
      src/views/system/user/profile/index.vue
  33. 10 2
      src/views/system/user/profile/userAvatar.vue
  34. 3 2
      src/views/tool/build/index.vue
  35. 17 15
      vue.config.js

+ 1 - 1
.env.development

@@ -5,7 +5,7 @@ VUE_APP_TITLE = 移动安全保卫管理平台(开发)
 ENV = 'development'
 
 # 开发环境
-VUE_APP_BASE_API = '/dev-api'
+VUE_APP_BASE_API = 'http://10.87.10.55:8081/'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 1
.env.production

@@ -5,4 +5,4 @@ VUE_APP_TITLE = 移动安全保卫管理平台项目
 ENV = 'production'
 
 # 生产环境
-VUE_APP_BASE_API = 'http://10.87.10.49:8080/'
+VUE_APP_BASE_API = 'http://localhost:8080/'

+ 1 - 1
.env.staging

@@ -7,4 +7,4 @@ NODE_ENV = production
 ENV = 'staging'
 
 # 测试环境
-VUE_APP_BASE_API = 'http://localhost:8080/'
+VUE_APP_BASE_API = 'http://10.87.10.55:8080/'

+ 1 - 0
package.json

@@ -3,6 +3,7 @@
   "version": "3.6.2",
   "description": "若依管理系统",
   "author": "若依",
+  "private": true,
   "license": "MIT",
   "private": true,
   "scripts": {

+ 6 - 0
src/assets/images/u29.svg

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="25px" height="30px" xmlns="http://www.w3.org/2000/svg">
+  <g transform="matrix(1 0 0 1 -1687 -23 )">
+    <path d="M 24.833984375 21.689453125  C 24.9446614583333 22.6725260416667  25 23.7174479166667  25 24.82421875  C 25 26.2434895833333  24.5930989583333 27.4609375  23.779296875 28.4765625  C 22.9654947916667 29.4921875  21.9856770833333 30  20.83984375 30  L 4.16015625 30  C 3.01432291666667 30  2.03450520833333 29.4921875  1.220703125 28.4765625  C 0.406901041666667 27.4609375  0 26.2434895833333  0 24.82421875  C 0 23.7174479166667  0.0553385416666668 22.6725260416667  0.166015625 21.689453125  C 0.276692708333333 20.7063802083333  0.481770833333333 19.716796875  0.78125 18.720703125  C 1.08072916666667 17.724609375  1.46158854166667 16.8717447916667  1.923828125 16.162109375  C 2.38606770833333 15.4524739583333  2.998046875 14.873046875  3.759765625 14.423828125  C 4.521484375 13.974609375  5.39713541666667 13.75  6.38671875 13.75  C 8.09244791666667 15.4166666666667  10.1302083333333 16.25  12.5 16.25  C 14.8697916666667 16.25  16.9075520833333 15.4166666666667  18.61328125 13.75  C 19.6028645833333 13.75  20.478515625 13.974609375  21.240234375 14.423828125  C 22.001953125 14.873046875  22.6139322916667 15.4524739583333  23.076171875 16.162109375  C 23.5384114583333 16.8717447916667  23.9192708333333 17.724609375  24.21875 18.720703125  C 24.5182291666667 19.716796875  24.7233072916667 20.7063802083333  24.833984375 21.689453125  Z M 17.802734375 2.197265625  C 19.267578125 3.662109375  20 5.4296875  20 7.5  C 20 9.5703125  19.267578125 11.337890625  17.802734375 12.802734375  C 16.337890625 14.267578125  14.5703125 15  12.5 15  C 10.4296875 15  8.662109375 14.267578125  7.197265625 12.802734375  C 5.732421875 11.337890625  5 9.5703125  5 7.5  C 5 5.4296875  5.732421875 3.662109375  7.197265625 2.197265625  C 8.662109375 0.732421875  10.4296875 0  12.5 0  C 14.5703125 0  16.337890625 0.732421875  17.802734375 2.197265625  Z " fill-rule="nonzero" fill="#959595" stroke="none" transform="matrix(1 0 0 1 1687 23 )" />
+  </g>
+</svg>

+ 1 - 1
src/assets/styles/element-variables.scss

@@ -4,7 +4,7 @@
 **/
 
 /* theme color */
-$--color-primary: #1890ff;
+$--color-primary: #4F9BAA;
 $--color-success: #13ce66;
 $--color-warning: #ffba00;
 $--color-danger: #ff4949;

+ 4 - 3
src/assets/styles/index.scss

@@ -14,7 +14,8 @@ body {
 }
 
 label {
-  font-weight: 700;
+  font-weight: 500;
+  color:#333;
 }
 
 html {
@@ -122,8 +123,8 @@ aside {
 //main-container全局样式
 .app-container {
   padding: 20px;
-  //height: calc(100vh - 86px);
-  //overflow: auto;
+  height: calc(100vh - 86px);
+  overflow: auto;
 }
 
 .components-container {

+ 48 - 0
src/components/table/components/search.vue

@@ -0,0 +1,48 @@
+<template>
+  <el-form
+    class="mb-4 search-container"
+    ref="form"
+    size="small"
+    :inline="true"
+    label-suffix=":"
+    v-show="$slots.default"
+  >
+    <slot></slot>
+    <!-- <el-form-item style="float:right">
+      <slot name="searchs-right"></slot>
+      <el-button type="primary" class="add-btn" @click="$emit('search')">搜索</el-button>
+      <el-button class="add-btn" @click="$emit('reset')">重置</el-button>
+    </el-form-item>-->
+    <div class="clearfix"></div>
+  </el-form>
+</template>
+<script lang="ts">
+export default {
+  components: {},
+  data() {
+    return {};
+  },
+  computed: {},
+  watch: {},
+  props: {},
+  methods: {
+    resetFields() {
+      this.$refs.$form.resetFields();
+    }
+  },
+  mounted() {}
+};
+</script>
+<style lang="scss">
+.k-search-table .search-container {
+  //
+  .el-input {
+    width: 200px;
+  }
+
+  //
+  .el-form-item {
+    // margin-bottom: 0;
+  }
+}
+</style>

+ 36 - 0
src/components/table/components/tab.vue

@@ -0,0 +1,36 @@
+<template>
+  <el-tabs v-model="tabValue" v-if="!!tabName">
+    <el-tab-pane v-for="(ti) in tabItems" :key="ti.value" :label="ti.label"></el-tab-pane>
+  </el-tabs>
+</template>
+<script>
+export default {
+  components: {},
+  data() {
+    return {
+      tabValue: 0
+    };
+  },
+  computed: {},
+  watch: {
+    tabValue(index) {
+      this.$emit("change", { [this.tabName]: this.tabItems[index].value });
+    }
+  },
+  props: {
+    tabName: {},
+    tabItems: {
+      default() {
+        return [];
+      }
+    }
+  },
+  methods: {},
+  mounted() {}
+};
+</script>
+<style lang="scss">
+.k-search-table {
+
+}
+</style>

+ 238 - 0
src/components/table/gx.search.table.vue

@@ -0,0 +1,238 @@
+<template>
+  <div class="p-4 k-search-table">
+    <!--  -->
+    <search ref="$form"
+            v-bind="$attrs"
+            @search="onSearch"
+            @reset="onReset">
+      <slot name="searchs"></slot>
+    </search>
+
+    <!-- tab -->
+    <tab v-bind="$attrs"
+         @change="onTabChange"></tab>
+
+    <!-- 按钮 -->
+    <el-row v-if="$slots['buttons'] || urlExport"
+            class="mb-4 button-container">
+      <el-col :span="24">
+        <slot name="buttons"></slot>
+        <el-button v-if="urlExport"
+                   type="success"
+                   @click="onExport">导出数据</el-button>
+      </el-col>
+    </el-row>
+
+    <!--  -->
+    <el-table ref="$table"
+              class="w-full"
+              :default-expand-all="expand"
+              @sort-change="onSort"
+              v-if="$slots['columns']"
+              :data="dataList"
+              max-height="400"
+              border
+              stripe
+              :row-key="rowKey"
+              :show-summary="false"
+              :summary-method="getSummaries"
+              :row-class-name="onTableRowClassName">
+      <!-- 不用element的, 不好控制要调用方法 -->
+      <el-table-column v-if="select"
+                       width="45px">
+        <template slot="header"
+                  slot-scope="scope">
+          <el-checkbox v-show="showSelectAll"
+                       v-model="selectAll">{{
+                        scope.o
+                    }}</el-checkbox>
+        </template>
+        <template slot-scope="r">
+          <el-checkbox v-model="r.row[selectField]"
+                       @change="onSelect(r.row)"></el-checkbox>
+        </template>
+      </el-table-column>
+      <!--  -->
+      <slot name="columns"></slot>
+    </el-table>
+
+    <!--  -->
+    <el-pagination v-if="pageable && $slots['columns']"
+                   class="mt-4 pagination"
+                   @current-change="onPageChange"
+                   @size-change="onSizeChange"
+                   :page-size.sync="pageSize"
+                   :current-page.sync="pageIndex"
+                   layout="total, sizes, prev, pager, next, jumper"
+                   :total="total"></el-pagination>
+
+    <div class="clearfix"></div>
+  </div>
+</template>
+
+<script>
+import Search from './components/search'
+import Tab from './components/tab'
+import Sortable from 'sortablejs'
+
+import MixSearch from './mix.search'
+import MixTableSelect from './mix.table.select'
+
+const pageCache = {}
+
+export default {
+  inheritAttrs: false,
+  mixins: [MixSearch, MixTableSelect],
+  components: {
+    Tab,
+    Search,
+  },
+  data() {
+    return {}
+  },
+  props: {
+    expand: {},
+    drag: {
+      default: false,
+    },
+    rowKey: {
+      default: 'id',
+    },
+    showSummary: {
+      default: false,
+    },
+    searchData: {
+      default: false,
+    },
+    data: {
+      type: Array,
+      default: function () {
+        return []
+      },
+    },
+  },
+  model: {
+    prop: 'data',
+    event: 'cc',
+  },
+  computed: {},
+  watch: {
+    dataList() {
+      this.$emit('cc', this.dataList)
+    },
+  },
+  methods: {
+    redrag() {
+      if (!this.drag) {
+        return
+      }
+      const el = this.$el.querySelectorAll(
+        '.el-table__body-wrapper > table > tbody'
+      )[0]
+      this.sortable = Sortable.create(el, {
+        ghostClass: 'sortable-ghost',
+        setData: function (dataTransfer) {
+          dataTransfer.setData('Text', '')
+        },
+        onEnd: (evt) => {
+          this.$emit('drag', {
+            newIndex: evt.newIndex,
+            oldIndex: evt.oldIndex,
+          })
+        },
+      })
+    },
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+          return
+        }
+        const values = data.map((item) =>
+          // Number(item[column.property])
+
+          {
+            return item[column.property]
+          }
+        )
+        if (!values.every((value) => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr)
+            if (!isNaN(value)) {
+              return prev + curr
+            } else {
+              return prev
+            }
+          }, 0)
+          sums[index] += ''
+        } else {
+          sums[index] = 'N/A'
+        }
+      })
+
+      return sums
+    },
+    onTabChange({ name, value }) {
+      this.$set(this.searchData, name, value)
+    },
+    onFilter(kv) {
+      this.$emit('filter', kv)
+    },
+    onReset() {
+      this.$refs.$form.resetFields()
+      this.$emit('reset')
+    },
+    onSearch() {
+      this.search()
+    },
+    onTableRowClassName(row, index) {
+      if (index === 1) {
+        return 'info-row'
+      } else if (index === 3) {
+        return 'positive-row'
+      }
+      return ''
+    },
+  },
+  created() {},
+  mounted() {
+    if (this.url && !this.manual) {
+      this.load(this.searchData)
+    }
+  },
+}
+</script>
+<style lang="less">
+.k-search-table {
+  width: calc(100% - 1px);
+
+  //   height: 837px;
+  overflow: auto;
+  //
+  .el-table .info-row {
+    background: #c9e5f5;
+  }
+  .el-table .positive-row {
+    background: #e2f0e4;
+  }
+
+  //
+  .el-pagination {
+    float: right;
+  }
+  .el-pagination__sizes {
+    .el-input__inner {
+      height: 28px;
+    }
+  }
+
+  //
+  .sortable-ghost {
+    opacity: 0.8;
+    color: #fff !important;
+    background: #42b983 !important;
+  }
+}
+</style>

+ 122 - 0
src/components/table/mix.search.js

@@ -0,0 +1,122 @@
+import { debounce } from "lodash";
+
+//
+export default {
+  data() {
+    return {
+      dataList: [],
+      total: 0,
+      pageIndex: 0,
+      pageSize: 10,
+    };
+  },
+  props: {
+    //请求地址
+    url: {},
+    urlExport: {},
+    //请求参数
+    searchData: {},
+    //是否手动查询
+    manual: {
+      type: Boolean,
+      default: false,
+    },
+    //是否分页
+    pageable: {
+      type: Boolean,
+      default: true,
+    },
+    beforeSearchCheck: {
+      type: Function,
+      default: function(callback) {
+        //   console.info("beforeSearchCheck default function")
+        return true;
+      },
+    },
+  },
+  watch: {
+    url: "search",
+    pageSize: "search",
+    searchData: {
+      deep: true,
+      handler: debounce(
+        function() {
+          this.search();
+        },
+        300,
+        { leading: true }
+      ),
+    },
+  },
+  methods: {
+    /**
+     * 重新搜索
+     */
+    search() {
+      let checkResult = this.beforeSearchCheck(this.searchData);
+      // console.info("search" ,checkResult)
+      if (!checkResult) return;
+      this.pageIndex = 1;
+      this.load(this.searchData);
+    },
+
+    /**
+     * 重新刷新当页
+     */
+    refresh() {
+      this.load(this.searchData);
+    },
+
+    /**
+     * 请求数据
+     * @param params
+     */
+    async load(params) {
+      params = params || {};
+      params.page = this.pageIndex >= 1 ? this.pageIndex - 1 : this.pageIndex;
+      params.size = this.pageSize;
+      console.log(params);
+      const data = await this.$api.post(this.url, params);
+      // this.selectItemList=[];
+      // this.selectItemList=[];
+      // this.$emit("select", []);
+      // this.$emit("select-all", []);
+      // this.$emit("handleSelectionChange", []);
+      this.$emit("load", data);
+      if (data.length) {
+        this.dataList = this.checkSelect(data);
+        this.total = data.length;
+      } else {
+        this.dataList = this.checkSelect(data.content);
+        this.total = data.totalElements;
+      }
+      this.$emit("totalCount", this.total);
+    },
+
+    /**
+     * 页数变动
+     * @param page
+     */
+    onPageChange(page) {
+      this.pageIndex = page;
+      this.load(this.searchData);
+    },
+
+    /**
+     * 分页大小变动
+     * @param s
+     */
+    onSizeChange(s) {
+      this.size = s;
+      this.pageIndex = 1;
+      this.search();
+    },
+
+    /**
+     * 排序
+     */
+    onSort({ prop, order }) {
+      this.$set(this.searchData, "sortList", [{ column: prop, desc: order }]);
+    },
+  },
+};

+ 223 - 0
src/components/table/mix.table.select.js

@@ -0,0 +1,223 @@
+import { unionBy,unionWith, remove as _remove, cloneDeep } from "lodash";
+
+export default {
+    data() {
+        return {
+            selectItemList: []
+        };
+    },
+    props: {
+        select: {
+            type: Boolean,
+            default: false
+        },
+        // 如果需要选择, 提供选择的字段名
+        selectField: {
+            default: "selected"
+        },
+        // 选择限制
+        selectLimit: {
+            default: 0
+        },
+        // 默认选中的去重字段
+        selectUnionKey: {
+            default: "id"
+        },
+        // 默认选中的去重字段是多个时使用该字段
+        multipleSelectUnionKey: {
+            default() {
+                return ["id"];
+            }
+        },
+        // 默认选中哪些
+        selectDefault: {
+            default() {
+                return [];
+            }
+        }
+    },
+    watch: {
+        selectDefault: {
+            immediate: true,
+            handler(v) {
+                this.selectItemList = cloneDeep(v || []);
+                this.dataList.forEach((item) => {
+                    const isS =
+                        this.selectItemList.filter((v) => {
+                            if (this.multipleSelectUnionKey.length > 1) {
+                                let result = true;
+                                this.multipleSelectUnionKey.forEach(e => {
+                                    result = result && v[e] == item[e]
+                                });
+                                return result;
+                            }
+                            else {
+                                return v[this.selectUnionKey] == item[this.selectUnionKey]
+                            }
+                        }).length != 0;
+                    item[this.selectField] = isS;
+                });
+            }
+        }
+    },
+    computed: {
+        // 全选
+        selectAll: {
+            get() {
+                return this.dataList.length != 0 && this.dataList.filter((v) => !v[this.selectField]).length == 0;
+            },
+            set(check) {
+                this.onSelectAll(check);
+            }
+        },
+        //是否可以显示全选
+        showSelectAll() {
+            return this.selectLimit == 0 || this.selectLimit >= this.dataList.length;
+        },
+        //已选中的长度
+        selectLength() {
+            return this.selectItemsList.length;
+        }
+    },
+    methods: {
+        /**
+         * 把数据转换成已选择
+         */
+        checkSelect(dataList) {
+            if (!this.select) return dataList;
+            // debugger
+            const newData = dataList.map((item) => {
+                const isS =
+                    this.selectItemList.filter((v) => {
+                        if (this.multipleSelectUnionKey.length > 1) {
+                            let result = true;
+                            this.multipleSelectUnionKey.forEach(e => {
+                                if(v[e] != item[e])
+                                {
+                                    result=false;
+                                }
+                            });
+                            return result;
+                        }
+                        else {
+                            return v[this.selectUnionKey] == item[this.selectUnionKey]
+                        }
+                        // v[this.selectUnionKey] == item[this.selectUnionKey]
+                    }).length != 0;
+                return {
+                    ...item,
+                    [this.selectField]: isS
+                };
+            });
+            return newData;
+        },
+        /**
+         * 非选中剔除
+         * @param {*} item
+         */
+        onUnSelectItem(item) {
+            item[this.selectField] = false;
+            _remove(this.selectItemList, (v) => {
+                if (this.multipleSelectUnionKey.length > 1) {
+                    let result = true;
+                    this.multipleSelectUnionKey.forEach(e => {
+                        if(v[e] != item[e])
+                        {
+                            result=false;
+                        }
+                    });
+                    return result;
+                }
+                else {
+                    return v[this.selectUnionKey] == item[this.selectUnionKey]
+                }
+                // return v[this.selectUnionKey] == item[this.selectUnionKey];
+            });
+        },
+        /**
+         * 选中项目
+         * @param {*} item
+         */
+        onSelectItem(item) {
+            item[this.selectField] = true;
+            this.selectItemList = unionWith(this.selectItemList, [item], this.comparator);
+        },
+        /**
+         *
+         */
+        onSelectEmit() {
+            this.$emit("select", cloneDeep(this.selectItemList));
+        },
+        /**
+         * 全部选中
+         */
+        onSelectAll(isSelect) {
+            // 非选中不管
+            if (!isSelect) {
+                this.dataList.forEach(this.onUnSelectItem);
+                this.onSelectEmit();
+                return;
+            }
+            // 判断数目, 需要和已选择的一起判断
+            if (
+                this.selectLimit != 0 &&
+                unionWith(this.dataList, this.selectDefault, this.comparator).length > this.selectLimit
+            ) {
+                this.onError(`最多选择${this.selectLimit}项数据`);
+                return;
+            }
+            this.dataList.forEach(this.onSelectItem);
+            this.onSelectEmit();
+        },
+        comparator(arrVal, othVal)
+        {
+            if(!arrVal || !othVal) return false;
+            if (this.multipleSelectUnionKey.length > 1) {
+                let result = true;
+                this.multipleSelectUnionKey.forEach(e => {
+                    if(arrVal[e] != othVal[e])
+                    {
+                        result=false;
+                    }
+                });
+                return result;
+            }
+            else {
+                return arrVal[this.selectUnionKey] == othVal[this.selectUnionKey]
+            }
+        },
+        /**
+         * 选中操作
+         * @param {*} row
+         */
+        onSelect(row) {
+            // 如果是非选中, 不管
+            const isSelect = row[this.selectField];
+            if (!isSelect) {
+                this.onUnSelectItem(row);
+                this.onSelectEmit();
+                return;
+            }
+            switch (this.selectLimit) {
+                // 只能选1个, 那么别的全部干掉
+                case 1:
+                    this.dataList.forEach(this.onUnSelectItem);
+                    this.onSelectItem(row);
+                    break;
+                // 任意就不管了
+                case 0:
+                    this.onSelectItem(row);
+                    break;
+                // 有限制的话
+                default:
+                    if (this.selectLength > this.selectLimit) {
+                        this.onUnSelectItem(row);
+                        this.onError(`最多选择${this.selectLimit}项数据`);
+                        return;
+                    }
+                    break;
+            }
+            this.onSelectEmit();
+        }
+    }
+};

+ 273 - 0
src/components/table/search.table.vue

@@ -0,0 +1,273 @@
+<template>
+  <div class="p-4 k-search-table">
+    <!--  -->
+    <search ref="$form"
+            v-bind="$attrs"
+            @reset="onReset"
+            @search="onSearch">
+      <slot name="searchs"></slot>
+    </search>
+
+    <!-- tab -->
+    <tab v-bind="$attrs"
+         @change="onTabChange"></tab>
+
+    <!-- 按钮 -->
+    <el-row v-if="$slots['buttons'] || urlExport"
+            class="mb-4 button-container">
+      <el-col :span="24">
+        <slot name="buttons"></slot>
+        <el-button v-if="urlExport"
+                   type="success"
+                   @click="onExport">导出数据
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <!--  -->
+    <el-table v-if="$slots['columns']"
+              ref="$table"
+              :data="dataList"
+              :default-expand-all="expand"
+              :height="tableHeight"
+              :row-class-name="onTableRowClassName"
+              :row-key="rowKey"
+              :show-summary="false"
+              :span-method="spanMethod"
+              :summary-method="getSummaries"
+              border
+              class="w-full"
+              stripe
+              @select="onSelects"
+              @sort-change="onSort"
+              @select-all="onSelectss"
+              @selection-change="handleSelectionChange">
+      <!-- 不用element的, 不好控制要调用方法 -->
+      <el-table-column v-if="select" width="45"><!--宽度不能再调小,否则表格不对齐-->
+        <template slot="header"
+                  slot-scope="scope">
+          <el-checkbox v-show="showSelectAll" v-model="selectAll">
+            {{scope.o }}
+          </el-checkbox>
+        </template>
+        <template slot-scope="r">
+          <el-checkbox v-model="r.row[selectField]" @change="onSelect(r.row)"></el-checkbox>
+        </template>
+      </el-table-column>
+      <!--  -->
+      <slot name="columns"></slot>
+    </el-table>
+
+    <!--  -->
+    <el-pagination v-if="pageable && $slots['columns']"
+                   :current-page.sync="pageIndex"
+                   :page-size.sync="pageSize"
+                   :total="total"
+                   class="mt-4 pagination"
+                   layout="total, sizes, prev, pager, next, jumper"
+                   @current-change="onPageChange"
+                   @size-change="onSizeChange"></el-pagination>
+
+    <div class="clearfix"></div>
+    <div v-if="$slots['content']" class="mb-4">
+      <slot name="content"></slot>
+    </div>
+  </div>
+</template>
+
+<script>
+import Search from './components/search'
+import Tab from './components/tab'
+import Sortable from 'sortablejs'
+
+import MixSearch from './mix.search'
+import MixTableSelect from './mix.table.select'
+
+const pageCache = {}
+
+export default {
+  inheritAttrs: false,
+  mixins: [MixSearch, MixTableSelect],
+  components: {
+    Tab,
+    Search,
+  },
+  data() {
+    return {}
+  },
+  props: {
+    expand: {},
+    drag: {
+      default: false,
+    },
+    rowKey: {
+      default: 'id',
+    },
+    showSummary: {
+      default: false,
+    },
+    searchData: {
+      default: false,
+    },
+    showData: {
+      default: false,
+    },
+    tableHeight: {
+      default: 525
+    },
+    data: {
+      type: Array,
+      default: function () {
+        return []
+      },
+    },
+    spanMethod: {
+      type: Function,
+      default: function ({row, column, rowIndex, columnIndex}) {
+        return [1, 1];
+      },
+    }
+  },
+  model: {
+    prop: 'data',
+    event: 'cc',
+  },
+  computed: {},
+  watch: {
+    dataList() {
+      this.$emit('cc', this.dataList)
+    },
+  },
+  methods: {
+    redrag() {
+      if (!this.drag) {
+        return
+      }
+      const el = this.$el.querySelectorAll(
+        '.el-table__body-wrapper > table > tbody'
+      )[0]
+      this.sortable = Sortable.create(el, {
+        ghostClass: 'sortable-ghost',
+        setData: function (dataTransfer) {
+          dataTransfer.setData('Text', '')
+        },
+        onEnd: (evt) => {
+          this.$emit('drag', {
+            newIndex: evt.newIndex,
+            oldIndex: evt.oldIndex,
+          })
+        },
+      })
+    },
+    getSummaries(param) {
+      const {columns, data} = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+          return
+        }
+        const values = data.map((item) =>
+            // Number(item[column.property])
+
+          {
+            return item[column.property]
+          }
+        )
+        if (!values.every((value) => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr)
+            if (!isNaN(value)) {
+              return prev + curr
+            } else {
+              return prev
+            }
+          }, 0)
+          sums[index] += ''
+        } else {
+          sums[index] = 'N/A'
+        }
+      })
+
+      return sums
+    },
+    onSelects(selection, row) {
+      this.$emit('select', selection)
+    },
+    onSelectss(selection) {
+      this.$emit('select-all', selection)
+    },
+    handleSelectionChange(selection) {
+      this.$emit('handleSelectionChange', selection)
+    },
+    onTabChange({name, value}) {
+      this.$set(this.searchData, name, value)
+    },
+    onFilter(kv) {
+      this.$emit('filter', kv)
+    },
+    onReset() {
+      this.$refs.$form.resetFields()
+      this.$emit('reset')
+    },
+    onSearch() {
+      this.search()
+    },
+    onTableRowClassName(row, index) {
+      if (index === 1) {
+        return 'info-row'
+      } else if (index === 3) {
+        return 'positive-row'
+      }
+      return ''
+    },
+    ClearTableData() {
+      this.dataList = [];
+      this.total = 0;
+    }
+  },
+  created() {
+  },
+  mounted() {
+    if (this.url && !this.manual) {
+      this.load(this.searchData)
+    }
+  },
+}
+</script>
+<style lang="scss" scoped>
+.k-search-table {
+  width: calc(100% - 1px);
+  //   height: 837px;
+  overflow: auto;
+  //
+  .el-table .info-row {
+    background: #c9e5f5;
+  }
+
+  .el-table .positive-row {
+    background: #e2f0e4;
+  }
+
+  .el-table {
+  }
+
+  //
+  .el-pagination {
+    float: right;
+  }
+
+  .el-pagination__sizes {
+    .el-input__inner {
+      height: 28px;
+    }
+  }
+
+  //
+  .sortable-ghost {
+    opacity: 0.8;
+    color: #fff !important;
+    background: #42b983 !important;
+  }
+}
+</style>

+ 237 - 0
src/components/table/special.search.table.vue

@@ -0,0 +1,237 @@
+<template>
+  <div class="p-4 k-search-table">
+    <!--  -->
+    <search ref="$form"
+            v-bind="$attrs"
+            @search="onSearch"
+            @reset="onReset">
+      <slot name="searchs"></slot>
+    </search>
+
+    <!-- tab -->
+    <tab v-bind="$attrs"
+         @change="onTabChange"></tab>
+
+    <!-- 按钮 -->
+    <el-row v-if="$slots['buttons'] || urlExport"
+            class="mb-4 button-container">
+      <el-col :span="24">
+        <slot name="buttons"></slot>
+        <el-button v-if="urlExport"
+                   type="success"
+                   @click="onExport">导出数据</el-button>
+      </el-col>
+    </el-row>
+
+    <!--  -->
+    <el-table ref="$table"
+              class="w-full"
+              :default-expand-all="expand"
+              @sort-change="onSort"
+              v-if="$slots['columns']"
+              :data="dataList"
+              border
+              stripe
+              height="625"
+              :row-key="rowKey"
+              :show-summary="false"
+              :summary-method="getSummaries"
+              :row-class-name="onTableRowClassName">
+      <!-- 不用element的, 不好控制要调用方法 -->
+      <el-table-column v-if="select"
+                       width="36px">
+        <template slot="header"
+                  slot-scope="scope">
+          <el-checkbox v-show="showSelectAll"
+                       v-model="selectAll">{{
+                        scope.o
+                    }}</el-checkbox>
+        </template>
+        <template slot-scope="r">
+          <el-checkbox v-model="r.row[selectField]"
+                       @change="onSelect(r.row)"></el-checkbox>
+        </template>
+      </el-table-column>
+      <!--  -->
+      <slot name="columns"></slot>
+    </el-table>
+
+    <!--  -->
+    <el-pagination v-if="pageable && $slots['columns']"
+                   class="mt-4 pagination"
+                   @current-change="onPageChange"
+                   @size-change="onSizeChange"
+                   :page-size.sync="pageSize"
+                   layout="total, sizes, prev, pager, next, jumper"
+                   :total="total"></el-pagination>
+
+    <div class="clearfix"></div>
+  </div>
+</template>
+
+<script>
+import Search from './components/search'
+import Tab from './components/tab'
+import Sortable from 'sortablejs'
+
+import MixSearch from './mix.search'
+import MixTableSelect from './mix.table.select'
+
+const pageCache = {}
+
+export default {
+  inheritAttrs: false,
+  mixins: [MixSearch, MixTableSelect],
+  components: {
+    Tab,
+    Search,
+  },
+  data() {
+    return {}
+  },
+  props: {
+    expand: {},
+    drag: {
+      default: false,
+    },
+    rowKey: {
+      default: 'id',
+    },
+    showSummary: {
+      default: false,
+    },
+    searchData: {
+      default: false,
+    },
+    data: {
+      type: Array,
+      default: function () {
+        return []
+      },
+    },
+  },
+  model: {
+    prop: 'data',
+    event: 'cc',
+  },
+  computed: {},
+  watch: {
+    dataList() {
+      this.$emit('cc', this.dataList)
+    },
+  },
+  methods: {
+    redrag() {
+      if (!this.drag) {
+        return
+      }
+      const el = this.$el.querySelectorAll(
+        '.el-table__body-wrapper > table > tbody'
+      )[0]
+      this.sortable = Sortable.create(el, {
+        ghostClass: 'sortable-ghost',
+        setData: function (dataTransfer) {
+          dataTransfer.setData('Text', '')
+        },
+        onEnd: (evt) => {
+          this.$emit('drag', {
+            newIndex: evt.newIndex,
+            oldIndex: evt.oldIndex,
+          })
+        },
+      })
+    },
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计'
+          return
+        }
+        const values = data.map((item) =>
+          // Number(item[column.property])
+
+          {
+            return item[column.property]
+          }
+        )
+        if (!values.every((value) => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr)
+            if (!isNaN(value)) {
+              return prev + curr
+            } else {
+              return prev
+            }
+          }, 0)
+          sums[index] += ''
+        } else {
+          sums[index] = 'N/A'
+        }
+      })
+
+      return sums
+    },
+    onTabChange({ name, value }) {
+      this.$set(this.searchData, name, value)
+    },
+    onFilter(kv) {
+      this.$emit('filter', kv)
+    },
+    onReset() {
+      this.$refs.$form.resetFields()
+      this.$emit('reset')
+    },
+    onSearch() {
+      this.search()
+    },
+    onTableRowClassName(row, index) {
+      if (index === 1) {
+        return 'info-row'
+      } else if (index === 3) {
+        return 'positive-row'
+      }
+      return ''
+    },
+  },
+  created() {},
+  mounted() {
+    if (this.url && !this.manual) {
+      this.load(this.searchData)
+    }
+  },
+}
+</script>
+<style lang="less" scoped>
+.k-search-table {
+  width: calc(100% - 1px);
+  //   height: 837px;
+  overflow: auto;
+  //
+  .el-table .info-row {
+    background: #c9e5f5;
+  }
+  .el-table .positive-row {
+    background: #e2f0e4;
+  }
+  .el-table {
+  }
+  //
+  .el-pagination {
+    float: right;
+  }
+  .el-pagination__sizes {
+    .el-input__inner {
+      height: 28px;
+    }
+  }
+
+  //
+  .sortable-ghost {
+    opacity: 0.8;
+    color: #fff !important;
+    background: #42b983 !important;
+  }
+}
+</style>

+ 33 - 0
src/components/table/table.column.color.vue

@@ -0,0 +1,33 @@
+<template>
+  <el-table-column :prop="prop" :label="label">
+    <template slot-scope="{row}">
+      <span :class="color[row[prop]]">{{row[prop]}}</span>
+    </template>
+  </el-table-column>
+</template>
+<script>
+export default {
+  data() {
+    return {};
+  },
+  computed: {},
+  props: {
+    prop: {},
+    label: {},
+    color: {
+      default() {
+        return {
+          [true]: "text-green-500",
+          [false]: "text-red-500"
+        };
+      }
+    }
+  },
+  watch: {},
+  methods: {},
+  components: {},
+  mounted() {}
+};
+</script>
+<style lang="less">
+</style>

+ 21 - 0
src/components/table/table.column.date.vue

@@ -0,0 +1,21 @@
+<template>
+  <el-table-column :prop="prop" :label="label">
+    <template slot-scope="{row}">{{row[prop] | dateTime }}</template>
+  </el-table-column>
+</template>
+<script>
+export default {
+  data() {
+    return {};
+  },
+  computed: {},
+  props: {
+    prop: {},
+    label: {}
+  },
+  watch: {},
+  methods: {},
+  components: {},
+  mounted() {}
+};
+</script>

+ 36 - 0
src/components/table/table.column.image.vue

@@ -0,0 +1,36 @@
+<template>
+  <el-table-column :prop="prop" :label="label">
+    <template slot-scope="{row}">
+      <k-image :src="row[prop]" :style="imageStyle" fit="contain" referrer-policy="no-referrer" />
+    </template>
+  </el-table-column>
+</template>
+<script>
+export default {
+  data() {
+    return {};
+  },
+  computed: {
+    imageStyle() {
+      return {
+        width: `${this.width}px`,
+        height: `${this.height}px`
+      };
+    }
+  },
+  props: {
+    prop: {},
+    label: {},
+    width: {
+      default: "40"
+    },
+    height: {
+      default: "40"
+    }
+  },
+  watch: {},
+  methods: {},
+  components: {},
+  mounted() {}
+};
+</script>

+ 3 - 1
src/layout/components/Navbar.vue

@@ -196,7 +196,9 @@ export default {
           cursor: pointer;
           width: 40px;
           height: 40px;
-          border-radius: 10px;
+          border-radius: 50%;
+          background-color: #fff;
+          padding:7px;
         }
 
         .el-icon-caret-bottom {

+ 2 - 2
src/layout/components/Settings/index.vue

@@ -38,7 +38,7 @@
         <el-divider/>
 
         <h3 class="drawer-title">系统布局配置</h3>
-      
+
         <div class="drawer-item">
           <span>开启 TopNav</span>
           <el-switch v-model="topNav" class="drawer-switch" />
@@ -226,7 +226,7 @@ export default {
           height: 100%;
           padding-top: 15px;
           padding-left: 24px;
-          color: #1890ff;
+          color: #4F9BAA;
           font-weight: 700;
           font-size: 14px;
         }

+ 1 - 1
src/permission.js

@@ -32,7 +32,7 @@ router.beforeEach((to, from, next) => {
           })
         }).catch(err => {
           console.log(err,'err')
-          next({ path: '/' })
+          next({ path: '/login' })
           // store.dispatch('LogOut').then(() => {
           //   Message.error(err)
           //   next({ path: '/' })

+ 2 - 2
src/settings.js

@@ -2,7 +2,7 @@ module.exports = {
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
    */
-  sideTheme: 'theme-dark',
+  sideTheme: 'theme-light',
 
   /**
    * 是否系统布局配置
@@ -22,7 +22,7 @@ module.exports = {
   /**
    * 是否固定头部
    */
-  fixedHeader: false,
+  fixedHeader: true,
 
   /**
    * 是否显示logo

+ 1 - 1
src/store/modules/user.js

@@ -58,7 +58,7 @@ const user = {
       return new Promise((resolve, reject) => {
         getInfo().then(res => {
           const user = res.user
-          const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.png") : user.avatar;
+          const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/u29.svg") : user.avatar;
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
             commit('SET_ROLES', res.roles)
             commit('SET_PERMISSIONS', res.permissions)

+ 1 - 1
src/utils/request.js

@@ -16,7 +16,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
-  baseURL: process.env.VUE_APP_BASE_API,
+  baseURL: process.env.NODE_ENV === 'development'? '/dev-api' : process.env.VUE_APP_BASE_API,
   // 超时
   timeout: 15000
 })

+ 11 - 0
src/views/business/checkManager/api.js

@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+
+// 获取树结构
+export function treeData(data) {
+  return request({
+    url: '/appRule/group',
+    method: 'post',
+    hideLoading:true,
+    data
+  })
+}

+ 193 - 0
src/views/business/checkManager/dialog.edit.vue

@@ -0,0 +1,193 @@
+<template>
+  <div class="rule-type">
+    <el-dialog :title="id ? '编辑规范' : '新增规范'" :visible.sync="isShow" width="40%">
+      <div class="page-body">
+        <el-form :model="formData" :rules="formDataRules" size="small" ref="form" label-position="right"
+          label-width="120px" label-prefix=":">
+          <el-form-item prop="id" label="规范名称:" hidden>
+            <el-input v-model="formData.id" clearable />
+          </el-form-item>
+
+          <el-form-item prop="ruleName" label="规范名称:">
+            <el-input v-model="formData.ruleName" :maxlength="50" name="ruleName" placeholder="请输入规范名称" clearable />
+          </el-form-item>
+
+          <el-form-item prop="ruleTypeId" label="规范类型:">
+            <k-select v-model="formData.ruleTypeId" url="/dict/find/dict" :params="{ dictCode: 'rule_type' }"
+              placeholder="请选择规范类型"></k-select>
+          </el-form-item>
+
+          <el-form-item prop="orgType" label="受检对象:">
+            <el-select prop="orgType" label="受检对象" v-model="formData.orgType" placeholder="请选择受检对象" clearable>
+              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item prop="ruleStatus" label="状态:">
+            <el-select prop="ruleStatus" label="状态" v-model="formData.ruleStatus" placeholder="请选择状态" clearable>
+              <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="remark" label="备注">
+            <el-input v-model="formData.remark" :maxlength="32" clearable />
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="onHide">取消</el-button>
+        <el-button type="primary" @click="onSubmit">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations } from "vuex";
+
+export default {
+  data() {
+    const params = this.$route.params;
+    return {
+      id: params ? params.id : null,
+      isShow: false,
+      formData: this.reset(),
+      formDataRules: {
+        ruleName: [{ required: true, message: "请输入规范名称" }],
+        ruleTypeId: [{ required: true, message: "请选择规范类型" }],
+        orgType: [{ required: true, message: "请选择受检对象" }],
+        ruleStatus: [{ required: true, message: "请选择状态" }],
+      },
+      statusOptions: [
+        {
+          value: 1,
+          label: "禁用",
+        },
+        {
+          value: 0,
+          label: "启用",
+        },
+      ],
+      options: [
+        {
+          label: "一级分行",
+          value: 0,
+        },
+        {
+          value: 1,
+          label: "二级分行",
+        },
+        {
+          value: 2,
+          label: "一级支行",
+        },
+        {
+          value: 3,
+          label: "营业网点",
+        },
+        {
+          value: 4,
+          label: "离行自助银行",
+        },
+        {
+          value: 5,
+          label: "金库",
+        },
+        {
+          value: 6,
+          label: "办公大楼",
+        },
+        {
+          value: 7,
+          label: "监控中心",
+        },
+        {
+          value: 8,
+          label: "园区",
+        },
+        {
+          value: 9,
+          label: "其他",
+        },
+        {
+          value: 10,
+          label: "现金中心",
+        },
+      ],
+    };
+  },
+  props: {},
+  watch: {},
+  computed: {
+    ...mapState([]),
+  },
+  methods: {
+    ...mapMutations([]),
+    reset() {
+      return {
+        id: null,
+        ruleName: null,
+        ruleTypeId: null,
+        orgType: null,
+        ruleStatus: null,
+        remark: null,
+      };
+    },
+    async refresh(id, other) {
+      this.formData = id ? await this.$api.app.getRule(id) : this.reset(other);
+    },
+    async show(id, other = {}) {
+      this.id = id;
+      await this.refresh(id, other);
+      this.isShow = true;
+    },
+
+    // 事件
+    onHide() {
+      this.isShow = false;
+    },
+    onSubmit() {
+      this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        let popMessage = false;
+        if (this.formData.id) {
+          popMessage = await this.$api.app.checkRuleType(this.formData.id, this.formData.ruleTypeId);
+          if (popMessage) {
+            this.$confirm('将同步更新检查项、检查内容的规范类型,点击确定继续?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'info'
+            }).then(async () => {
+              await this.$api.app.editRule(this.formData);
+              this.$emit("success");
+              this.onHide();
+            });
+          }
+        }
+
+        if (!popMessage) {
+          await this.$api.app.editRule(this.formData);
+          this.$emit("success");
+          this.onHide();
+        }
+      });
+    },
+
+    // 事件
+    //apimark//
+  },
+  mounted() { },
+  components: {},
+};
+</script>
+
+<style lang="scss">
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 182 - 0
src/views/business/checkManager/index-last.vue

@@ -0,0 +1,182 @@
+<template>
+  <div class="app-container">
+    <k-search-table
+      ref="st"
+      url="/appRule/page"
+      :search-data="search"
+      :manual="false"
+      :page="true"
+      :select="false"
+      :drag="false"
+    >
+      <!-- 搜索 -->
+      <template slot="searchs">
+        <el-form-item prop="ruleName" label="规范名称">
+          <el-input
+            v-model="search.ruleName"
+            :maxlength="50"
+            placeholder="请输入规范名称"
+            clearable
+          />
+        </el-form-item>
+        <el-form-item prop="ruleTypeId" label="规范类型">
+          <el-select
+            v-model="search.ruleTypeId"
+            url="/dict/find/dict"
+            :params="{ dictCode: 'rule_type' }"
+            placeholder="请选择规范类型"
+          ></el-select>
+        </el-form-item>
+
+        <el-form-item prop="orgType" label="受检对象">
+          <el-select
+            prop="orgType"
+            label="受检对象"
+            v-model="search.orgType"
+            placeholder="请选择受检对象"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </template>
+
+      <!-- 按钮 -->
+      <template slot="buttons">
+        <div style="margin-bottom: 20px;">
+          <el-button type="primary" size="mini" @click="onEdit()">新增 </el-button>
+        </div>
+        <!-- <k-btn-tip type="danger" @click="onDel()" class="ml-2">批量删除</k-btn-tip> -->
+      </template>
+
+      <!-- 表格 -->
+      <template slot="columns">
+        <!--        <el-table-column prop="id" label="序号"></el-table-column>-->
+        <el-table-column type="index" label="序号"></el-table-column>
+        <el-table-column prop="ruleName" label="规范名称"></el-table-column>
+        <el-table-column prop="ruleTypeName" label="规范类型"></el-table-column>
+        <el-table-column prop="orgTypeText" label="受检对象"></el-table-column>
+        <el-table-column prop="orgName" label="发布机构"></el-table-column>
+        <el-table-column prop="ruleStatus" label="状态">
+          <template slot-scope="r">
+            <span>{{ r.row.ruleStatus == 0 ? "启用" : "禁用" }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="remark" label="备注"></el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="r">
+            <el-button type="text" @click="onEdit(r.row.id)">编辑 </el-button>
+            <k-btn-tip type="text" @click="onDel(r.row.id)">删除 </k-btn-tip>
+          </template>
+        </el-table-column>
+      </template>
+    </k-search-table>
+
+    <!-- 编辑 -->
+    <dialog-edit ref="editDialog" @success="refresh(true)"></dialog-edit>
+  </div>
+</template>
+
+<script>
+import KSearchTable from '../../../components/table/search.table'
+import { mapState, mapMutations } from "vuex";
+import DialogEdit from "./dialog.edit";
+
+export default {
+  name: "ruletype",
+  components: {
+    KSearchTable,
+    DialogEdit,
+  },
+  data() {
+    const { params, query } = this.$route;
+    return {
+      isShow: false,
+      search: {
+        ruleName: null,
+        ruleTypeId: null,
+        orgType: null,
+        ...query,
+      },
+      options: [
+        {
+          label: "一级分行",
+          value: 0,
+        },
+        {
+          value: 1,
+          label: "二级分行",
+        },
+        {
+          value: 2,
+          label: "一级支行",
+        },
+        {
+          value: 3,
+          label: "营业网点",
+        },
+        {
+          value: 4,
+          label: "离行自助银行",
+        },
+        {
+          value: 5,
+          label: "金库",
+        },
+        {
+          value: 6,
+          label: "办公大楼",
+        },
+        {
+          value: 7,
+          label: "监控中心",
+        },
+        {
+          value: 8,
+          label: "园区",
+        },
+        {
+          value: 9,
+          label: "其他",
+        },{
+          value: 10,
+          label: "现金中心",
+        },
+      ],
+    };
+  },
+  props: {},
+  watch: {},
+  computed: {
+    //...mapState([]),
+  },
+  methods: {
+    //...mapMutations([]),
+    refresh(isCurrent) {
+      this.$refs.st[isCurrent ? "refresh" : "search"]();
+    },
+
+    //
+    onEdit(id, other = {}) {
+      this.$refs.editDialog.show(id, other);
+    },
+    async onDel(id) {
+      await this.$api.app.delRule(id);
+      this.refresh(true);
+    },
+    //apimark//
+  },
+  mounted() {},
+};
+</script>
+
+<style lang="scss">
+.brand {
+}
+</style>

+ 176 - 0
src/views/business/checkManager/index.vue

@@ -0,0 +1,176 @@
+<template>
+  <div class="app-container">
+    <!-- 搜索 -->
+    <el-form>
+      <el-form-item prop="ruleName" label="规范名称">
+        <el-input
+          v-model="search.ruleName"
+          :maxlength="50"
+          placeholder="请输入规范名称"
+          clearable
+        />
+      </el-form-item>
+      <el-form-item prop="ruleTypeId" label="规范类型">
+        <el-select
+          v-model="search.ruleTypeId"
+          url="/dict/find/dict"
+          :params="{ dictCode: 'rule_type' }"
+          placeholder="请选择规范类型"
+        ></el-select>
+      </el-form-item>
+
+      <el-form-item prop="orgType" label="受检对象">
+        <el-select
+          prop="orgType"
+          label="受检对象"
+          v-model="search.orgType"
+          placeholder="请选择受检对象"
+          clearable
+        >
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+
+
+
+    <!-- 按钮 -->
+
+      <div style="margin-bottom: 20px;">
+        <el-button type="primary" size="mini" @click="onEdit()">新增 </el-button>
+      </div>
+      <!-- <k-btn-tip type="danger" @click="onDel()" class="ml-2">批量删除</k-btn-tip> -->
+
+
+
+      <!--        <el-table-column prop="id" label="序号"></el-table-column>-->
+    <el-table>
+      <el-table-column type="index" label="序号"></el-table-column>
+      <el-table-column prop="ruleName" label="规范名称"></el-table-column>
+      <el-table-column prop="ruleTypeName" label="规范类型"></el-table-column>
+      <el-table-column prop="orgTypeText" label="受检对象"></el-table-column>
+      <el-table-column prop="orgName" label="发布机构"></el-table-column>
+      <el-table-column prop="ruleStatus" label="状态">
+        <template slot-scope="r">
+          <span>{{ r.row.ruleStatus == 0 ? "启用" : "禁用" }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="remark" label="备注"></el-table-column>
+      <el-table-column label="操作">
+        <template slot-scope="r">
+          <el-button type="text" @click="onEdit(r.row.id)">编辑 </el-button>
+          <k-btn-tip type="text" @click="onDel(r.row.id)">删除 </k-btn-tip>
+        </template>
+      </el-table-column>
+    </el-table>
+
+
+    <!-- 编辑 -->
+    <dialog-edit ref="editDialog" @success="refresh(true)"></dialog-edit>
+
+  </div>
+</template>
+
+<script>
+import KSearchTable from '../../../components/table/search.table'
+import { mapState, mapMutations } from "vuex";
+import DialogEdit from "./dialog.edit";
+
+export default {
+  name: "ruletype",
+  components: {
+    KSearchTable,
+    DialogEdit,
+  },
+  data() {
+    const { params, query } = this.$route;
+    return {
+      isShow: false,
+      search: {
+        ruleName: null,
+        ruleTypeId: null,
+        orgType: null,
+        ...query,
+      },
+      options: [
+        {
+          label: "一级分行",
+          value: 0,
+        },
+        {
+          value: 1,
+          label: "二级分行",
+        },
+        {
+          value: 2,
+          label: "一级支行",
+        },
+        {
+          value: 3,
+          label: "营业网点",
+        },
+        {
+          value: 4,
+          label: "离行自助银行",
+        },
+        {
+          value: 5,
+          label: "金库",
+        },
+        {
+          value: 6,
+          label: "办公大楼",
+        },
+        {
+          value: 7,
+          label: "监控中心",
+        },
+        {
+          value: 8,
+          label: "园区",
+        },
+        {
+          value: 9,
+          label: "其他",
+        },{
+          value: 10,
+          label: "现金中心",
+        },
+      ],
+    };
+  },
+  props: {},
+  watch: {},
+  computed: {
+    //...mapState([]),
+  },
+  methods: {
+    //...mapMutations([]),
+    refresh(isCurrent) {
+      this.$refs.st[isCurrent ? "refresh" : "search"]();
+    },
+
+    //
+    onEdit(id, other = {}) {
+      this.$refs.editDialog.show(id, other);
+    },
+    async onDel(id) {
+      await this.$api.app.delRule(id);
+      this.refresh(true);
+    },
+    //apimark//
+  },
+  mounted() {},
+};
+</script>
+
+<style lang="scss">
+.brand {
+}
+</style>

+ 15 - 3
src/views/business/checkNote/index.vue

@@ -1,10 +1,9 @@
-<!-- 动环设备管理 -->
 <template>
   <div class="app-container">
     <el-row :gutter="20">
       <!--部门数据-->
       <el-col :span="5" :xs="24">
-        <div class="head-container">
+        <div class="search-container">
           <el-input
             v-model="filterText"
             placeholder="请输入部门名称"
@@ -14,7 +13,7 @@
             style="margin-bottom: 20px"
           />
         </div>
-        <div class="head-container">
+        <div class="tree-container">
           <el-tree
             class="filter-tree"
             :data="treedata"
@@ -971,3 +970,16 @@ export default {
   },
 };
 </script>
+<style lang="scss">
+  .tree-container{
+    .el-tree-node>.el-tree-node__children{
+      overflow: visible!important; /* 添加横向滚动条*/
+    }
+  }
+</style>
+<style lang="scss" scoped>
+  .tree-container{
+    height: calc(100vh - 185px);
+    overflow: auto auto;
+  }
+</style>

+ 14 - 6
src/views/login.vue

@@ -1,8 +1,9 @@
 <template>
   <div class="login">
-    <p class="background-border"></p>
-    <img class="login-logo" src="../assets/images/login-logo.svg" alt="">
+    <div class="color-model"></div>
+    <div class="background-border"></div>
     <img class="login-text" src="../assets/images/login-text.svg" alt="">
+    <img class="login-logo" src="../assets/images/login-logo.svg" alt="">
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" label-width="80px">
       <h3 class="mini-title">欢迎登录</h3>
       <h3 class="title">移动安全保卫管理平台项目</h3>
@@ -76,7 +77,7 @@ export default {
     return {
       codeUrl: "",
       loginForm: {
-        username: "suntao",
+        username: "admin",
         password: "11111",
         rememberMe: false,
         code: "",
@@ -181,6 +182,12 @@ export default {
   background-size: cover;
   position: relative;
 }
+.color-model{
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  background-color: rgba(0, 140, 214, .5);
+}
 .background-border{
   position: absolute;
   width: 100%;
@@ -188,6 +195,7 @@ export default {
   background-color: #fff;
   opacity: .2;
   z-index:0;
+  display: flex;
 }
 .login-logo{
   position: absolute;
@@ -198,8 +206,8 @@ export default {
 }
 .login-text{
   position: absolute;
-  left: 381px;
-  top: 450px;
+  left:23%;
+  align-items: center;
   width: 510px;
   height: 190px;
 }
@@ -216,7 +224,7 @@ export default {
 }
 
 .login-form {
-  margin-right: 250px;
+  margin-right: 15%;
   border-radius: 6px;
   background: #ffffff;
   width: 544px;

+ 22 - 22
src/views/system/dept/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
-      <el-form-item label="部门名称" prop="deptName">
+      <el-form-item label="部门名称" prop="name">
         <el-input
-          v-model="queryParams.deptName"
+          v-model="queryParams.name"
           placeholder="请输入部门名称"
           clearable
           @keyup.enter.native="handleQuery"
@@ -52,13 +52,13 @@
       v-if="refreshTable"
       v-loading="loading"
       :data="deptList"
-      row-key="deptId"
+      row-key="id"
       :default-expand-all="isExpandAll"
       :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
     >
-      <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
-      <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
-      <el-table-column prop="status" label="状态" width="100">
+      <el-table-column prop="name" label="部门名称" width="260"></el-table-column>
+      <el-table-column prop="sort" label="排序" width="200"></el-table-column>
+      <el-table-column prop="isLock" label="状态" width="100">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
         </template>
@@ -108,20 +108,20 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="部门名称" prop="deptName">
-              <el-input v-model="form.deptName" placeholder="请输入部门名称" />
+            <el-form-item label="部门名称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入部门名称" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="显示排序" prop="orderNum">
-              <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
+            <el-form-item label="显示排序" prop="sort">
+              <el-input-number v-model="form.sort" controls-position="right" :min="0" />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="负责人" prop="leader">
-              <el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" />
+            <el-form-item label="负责人" prop="manager">
+              <el-input v-model="form.manager" placeholder="请输入负责人" maxlength="20" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -186,7 +186,7 @@ export default {
       refreshTable: true,
       // 查询参数
       queryParams: {
-        deptName: undefined,
+        name: undefined,
         status: undefined
       },
       // 表单参数
@@ -227,7 +227,7 @@ export default {
     getList() {
       this.loading = true;
       listDept(this.queryParams).then(response => {
-        this.deptList = this.handleTree(response.data, "deptId");
+        this.deptList = this.handleTree(response.data, "id");
         this.loading = false;
       });
     },
@@ -274,12 +274,12 @@ export default {
     handleAdd(row) {
       this.reset();
       if (row != undefined) {
-        this.form.parentId = row.deptId;
+        this.form.parentId = row.id;
       }
       this.open = true;
       this.title = "添加部门";
       listDept().then(response => {
-        this.deptOptions = this.handleTree(response.data, "deptId");
+        this.deptOptions = this.handleTree(response.data, "id");
       });
     },
     /** 展开/折叠操作 */
@@ -293,20 +293,20 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      getDept(row.deptId).then(response => {
+      getDept(row.id).then(response => {
         this.form = response.data;
         this.open = true;
         this.title = "修改部门";
       });
-      listDeptExcludeChild(row.deptId).then(response => {
-        this.deptOptions = this.handleTree(response.data, "deptId");
+      listDeptExcludeChild(row.id).then(response => {
+        this.deptOptions = this.handleTree(response.data, "id");
       });
     },
     /** 提交按钮 */
     submitForm: function() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          if (this.form.deptId != undefined) {
+          if (this.form.id != undefined) {
             updateDept(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
@@ -324,8 +324,8 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function() {
-        return delDept(row.deptId);
+      this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() {
+        return delDept(row.id);
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("删除成功");

+ 51 - 46
src/views/system/user/index.vue

@@ -21,7 +21,7 @@
             :filter-node-method="filterNode"
             ref="tree"
             node-key="id"
-            default-expand-all
+            :default-expanded-keys="[2283]"
             highlight-current
             @node-click="handleNodeClick"
           />
@@ -30,18 +30,18 @@
       <!--用户数据-->
       <el-col :span="20" :xs="24">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-          <el-form-item label="用户名称" prop="userName">
+          <el-form-item label="用户名称" prop="username">
             <el-input
-              v-model="queryParams.userName"
+              v-model="queryParams.username"
               placeholder="请输入用户名称"
               clearable
               style="width: 240px"
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-          <el-form-item label="手机号码" prop="phonenumber">
+          <el-form-item label="手机号码" prop="phone">
             <el-input
-              v-model="queryParams.phonenumber"
+              v-model="queryParams.phone"
               placeholder="请输入手机号码"
               clearable
               style="width: 240px"
@@ -138,12 +138,12 @@
 
         <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="50" align="center" />
-          <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
-          <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-          <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-          <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-          <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
-          <el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
+          <el-table-column label="用户编号" align="center" key="id" prop="id" v-if="columns[0].visible" />
+          <el-table-column label="用户名称" align="center" key="username" prop="username" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="用户昵称" align="center" key="name" prop="name" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="部门" align="center" key="orgName" prop="orgName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="手机号码" align="center" key="phone" prop="phone" v-if="columns[4].visible" width="120" />
+          <el-table-column label="状态" align="center" key="isLock" v-if="columns[5].visible">
             <template slot-scope="scope">
               <el-switch
                 v-model="scope.row.status"
@@ -207,36 +207,36 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="12">
-            <el-form-item label="用户昵称" prop="nickName">
-              <el-input v-model="form.nickName" placeholder="请输入用户昵称" maxlength="30" />
+            <el-form-item label="用户昵称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入用户昵称" maxlength="30" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+            <el-form-item label="归属部门" prop="orgId">
+              <treeselect v-model="form.orgId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="手机号码" prop="phonenumber">
-              <el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
+            <el-form-item label="手机号码" prop="phone">
+              <el-input v-model="form.phone" placeholder="请输入手机号码" maxlength="11" />
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <!-- <el-col :span="12">
             <el-form-item label="邮箱" prop="email">
-              <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
+              <el-input v-model="form.phone" placeholder="请输入邮箱" maxlength="50" />
             </el-form-item>
-          </el-col>
+          </el-col> -->
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
-              <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
+            <el-form-item v-if="form.id == undefined" label="用户名称" prop="name">
+              <el-input v-model="form.username" placeholder="请输入用户名称" maxlength="30" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
+            <el-form-item v-if="form.id == undefined" label="用户密码" prop="password">
               <el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/>
             </el-form-item>
           </el-col>
@@ -244,7 +244,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="用户性别">
-              <el-select v-model="form.sex" placeholder="请选择性别">
+              <el-select v-model="form.gender" placeholder="请选择性别">
                 <el-option
                   v-for="dict in dict.type.sys_user_sex"
                   :key="dict.value"
@@ -256,7 +256,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="状态">
-              <el-radio-group v-model="form.status">
+              <el-radio-group v-model="form.locked">
                 <el-radio
                   v-for="dict in dict.type.sys_normal_disable"
                   :key="dict.value"
@@ -266,10 +266,10 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
+        <!-- <el-row>
           <el-col :span="12">
             <el-form-item label="岗位">
-              <el-select v-model="form.postIds" multiple placeholder="请选择岗位">
+              <el-select v-model="form.orgId" multiple placeholder="请选择岗位">
                 <el-option
                   v-for="item in postOptions"
                   :key="item.postId"
@@ -293,7 +293,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-        </el-row>
+        </el-row> -->
         <el-row>
           <el-col :span="24">
             <el-form-item label="备注">
@@ -386,7 +386,7 @@ export default {
       form: {},
       defaultProps: {
         children: "children",
-        label: "label"
+        label: "name"
       },
       // 用户导入参数
       upload: {
@@ -407,8 +407,8 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        userName: undefined,
-        phonenumber: undefined,
+        username: undefined,
+        phone: undefined,
         status: undefined,
         deptId: undefined
       },
@@ -424,25 +424,25 @@ export default {
       ],
       // 表单校验
       rules: {
-        userName: [
+        username: [
           { required: true, message: "用户名称不能为空", trigger: "blur" },
           { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
         ],
-        nickName: [
+        name: [
           { required: true, message: "用户昵称不能为空", trigger: "blur" }
         ],
         password: [
           { required: true, message: "用户密码不能为空", trigger: "blur" },
           { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
         ],
-        email: [
-          {
-            type: "email",
-            message: "请输入正确的邮箱地址",
-            trigger: ["blur", "change"]
-          }
-        ],
-        phonenumber: [
+        // email: [
+        //   {
+        //     type: "email",
+        //     message: "请输入正确的邮箱地址",
+        //     trigger: ["blur", "change"]
+        //   }
+        // ],
+        phone: [
           {
             pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
             message: "请输入正确的手机号码",
@@ -469,6 +469,8 @@ export default {
     /** 查询用户列表 */
     getList() {
       this.loading = true;
+      console.log(111);
+      console.log(this.queryParams);
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           this.userList = response.rows;
           this.total = response.total;
@@ -485,11 +487,11 @@ export default {
     // 筛选节点
     filterNode(value, data) {
       if (!value) return true;
-      return data.label.indexOf(value) !== -1;
+      return data.name.indexOf(value) !== -1;
     },
     // 节点单击事件
     handleNodeClick(data) {
-      this.queryParams.deptId = data.id;
+      this.queryParams.orgId = data.id;
       this.handleQuery();
     },
     // 用户状态修改
@@ -516,7 +518,7 @@ export default {
         userName: undefined,
         nickName: undefined,
         password: undefined,
-        phonenumber: undefined,
+        phone: undefined,
         email: undefined,
         sex: undefined,
         status: "0",
@@ -571,9 +573,11 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      console.log(row);
       this.reset();
-      const userId = row.userId || this.ids;
+      const userId = row.id || this.ids;
       getUser(userId).then(response => {
+        console.log(response.data)
         this.form = response.data;
         this.postOptions = response.posts;
         this.roleOptions = response.roles;
@@ -625,7 +629,8 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const userIds = row.userId || this.ids;
+      console.log(row);
+      const userIds = row.id || this.ids;
       this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
         return delUser(userIds);
       }).then(() => {

+ 9 - 8
src/views/system/user/profile/index.vue

@@ -29,7 +29,7 @@
               </li>
               <li class="list-group-item">
                 <svg-icon icon-class="peoples" />所属角色
-                <div class="pull-right">{{ roleGroup }}</div>
+                <div class="pull-right">{{ roleGroup }} </div>
               </li>
               <li class="list-group-item">
                 <svg-icon icon-class="date" />创建日期
@@ -70,20 +70,21 @@ export default {
   data() {
     return {
       user: {},
-      roleGroup: {},
-      postGroup: {},
+      roleGroup: null,
+      postGroup: null,
       activeTab: "userinfo"
     };
   },
-  created() {
+  mounted() {
     this.getUser();
   },
   methods: {
     getUser() {
-      getUserProfile().then(response => {
-        this.user = response.data;
-        this.roleGroup = response.roleGroup;
-        this.postGroup = response.postGroup;
+      getUserProfile().then(res => {
+        if(!res.user) return;
+        this.user = res.data;
+        this.roleGroup = res.roleGroup;
+        this.postGroup = res.postGroup;
       });
     }
   }

+ 10 - 2
src/views/system/user/profile/userAvatar.vue

@@ -1,9 +1,12 @@
 <template>
-  <div>
-    <div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
+  <div class="no-model">
+    <div class="user-info-head" @click="editCropper()">
+      <img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" />
+    </div>
     <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened"  @close="closeDialog">
       <el-row>
         <el-col :xs="24" :md="12" :style="{height: '350px'}">
+
           <vue-cropper
             ref="cropper"
             :img="options.img"
@@ -161,6 +164,11 @@ export default {
 };
 </script>
 <style scoped lang="scss">
+/*禁用上传头像功能*/
+.no-model{
+  cursor:not-allowed;
+  pointer-events:none;
+}
 .user-info-head {
   position: relative;
   display: inline-block;

+ 3 - 2
src/views/tool/build/index.vue

@@ -371,6 +371,7 @@ export default {
 </script>
 
 <style lang='scss'>
+
 .editor-tabs{
   background: #121315;
   .el-tabs__header{
@@ -475,7 +476,7 @@ export default {
     margin-left: 6px;
   }
   .el-icon-plus{
-    color: #409EFF;
+    color: #4F9BAA;
   }
   .el-icon-delete{
     color: #157a0c;
@@ -495,7 +496,7 @@ export default {
 }
 
 $selectedColor: #f6f7ff;
-$lighterBlue: #409EFF;
+$lighterBlue: el-scrollbar__view;
 
 .container {
   position: relative;

+ 17 - 15
vue.config.js

@@ -34,11 +34,11 @@ module.exports = {
     open: false,
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
-      [process.env.VUE_APP_BASE_API]: {
-        target: `http://127.0.0.1:8080/`,
+      '/dev-api': {
+        target: process.env.VUE_APP_BASE_API,
         changeOrigin: true,
         pathRewrite: {
-          ['^' + process.env.VUE_APP_BASE_API]: ''
+          '/dev-api' : ''
         }
       },
     },
@@ -58,22 +58,24 @@ module.exports = {
         '@': resolve('src')
       }
     },
-    // plugins: [
-    //   // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
-    //   new CompressionPlugin({
-    //     cache: false,                   // 不启用文件缓存
-    //     test: /\.(js|css|html)?$/i,     // 压缩文件格式
-    //     filename: '[path].gz[query]',   // 压缩后的文件名
-    //     algorithm: 'gzip',              // 使用gzip压缩
-    //     minRatio: 0.8                   // 压缩率小于1才会压缩
-    //   })
-    // ],
-
+    plugins: [
+      // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
+      new CompressionPlugin({
+        cache: false,                   // 不启用文件缓存
+        test: /\.(js|css|html)?$/i,     // 压缩文件格式
+        filename: '[path].gz[query]',   // 压缩后的文件名
+        algorithm: 'gzip',              // 使用gzip压缩
+        minRatio: 0.8                   // 压缩率小于1才会压缩
+      })
+    ],
   },
   chainWebpack(config) {
     config.plugins.delete('preload') // TODO: need test
     config.plugins.delete('prefetch') // TODO: need test
-
+    config.optimization.minimizer('terser').tap((args) => {
+      args[0].terserOptions.compress.drop_console = true
+      return args
+    })
     // set svg-sprite-loader
     config.module
       .rule('svg')