浏览代码

version 0.1.0 ready

zhangjie 4 年之前
父节点
当前提交
cc19777d11
共有 31 个文件被更改,包括 2 次插入2912 次删除
  1. 1 1
      README.md
  2. 二进制
      public/img-review/001.jpg
  3. 二进制
      public/img-review/002.jpg
  4. 二进制
      public/img-review/003.jpg
  5. 二进制
      public/img-review/004.jpg
  6. 二进制
      public/img-review/005.jpg
  7. 二进制
      public/img-review/006.jpg
  8. 二进制
      public/img-review/007.jpg
  9. 二进制
      public/img-review/008.jpg
  10. 0 96
      src/components/CollectUserSelect.vue
  11. 0 110
      src/components/SubjectSelect.vue
  12. 0 96
      src/components/WorkSelect.vue
  13. 0 268
      src/components/common/CalendarMemo/CalendarMemo.vue
  14. 0 2
      src/components/common/CalendarMemo/index.js
  15. 0 50
      src/components/common/CalendarMemo/intro.md
  16. 0 190
      src/components/common/TransferTree/TransferTree.vue
  17. 0 2
      src/components/common/TransferTree/index.js
  18. 0 104
      src/components/common/TransferTree/intro.md
  19. 0 65
      src/components/common/TransferTree/list.vue
  20. 0 40
      src/components/common/TransferTree/operation.vue
  21. 0 285
      src/components/common/TreeList/TreeList.vue
  22. 0 337
      src/components/common/TreeList/assist.js
  23. 0 79
      src/components/common/TreeList/collapse-transition.js
  24. 0 34
      src/components/common/TreeList/emitter.js
  25. 0 2
      src/components/common/TreeList/index.js
  26. 0 133
      src/components/common/TreeList/intro.md
  27. 0 261
      src/components/common/TreeList/node.vue
  28. 0 17
      src/components/common/TreeList/render.js
  29. 0 355
      src/constants/apiTempData.js
  30. 0 385
      src/constants/chartOptions.js
  31. 1 0
      vue.config.js

+ 1 - 1
README.md

@@ -1,4 +1,4 @@
-# msyj-admin
+# msyj-admin 新版美术阅卷阅卷端前端系统
 
 
 ## 项目操作
 ## 项目操作
 
 

二进制
public/img-review/001.jpg


二进制
public/img-review/002.jpg


二进制
public/img-review/003.jpg


二进制
public/img-review/004.jpg


二进制
public/img-review/005.jpg


二进制
public/img-review/006.jpg


二进制
public/img-review/007.jpg


二进制
public/img-review/008.jpg


+ 0 - 96
src/components/CollectUserSelect.vue

@@ -1,96 +0,0 @@
-<template>
-  <Select
-    class="collect-user-select"
-    v-model="selectId"
-    style="width: 100%;"
-    @on-change="selected"
-    label-in-value
-    :size="size"
-    :placeholder="placeholder"
-    :clearable="clearable"
-    :disabled="disabled"
-  >
-    <Option v-for="item in dataList" :key="item.id" :value="item.id">{{
-      item.name
-    }}</Option>
-  </Select>
-</template>
-
-<script>
-import { collectUserList } from "@/modules/admin/api";
-
-export default {
-  name: "collect-user-select",
-  props: {
-    value: {
-      type: [String, Number]
-    },
-    size: {
-      type: String,
-      default: "large",
-      validator(value) {
-        return ["small", "large", "default"].indexOf(value) !== -1;
-      }
-    },
-    setDefault: {
-      type: Boolean,
-      default: false
-    },
-    placeholder: {
-      type: String,
-      default: "请选择考试"
-    },
-    clearable: {
-      type: Boolean,
-      default: false
-    },
-    disabled: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      loading: false,
-      dataList: []
-    };
-  },
-  computed: {
-    selectId: {
-      get() {
-        return this.value;
-      },
-      set(selectId) {
-        this.$emit("input", selectId || "");
-      }
-    }
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    async search() {
-      const data = await collectUserList(this.specialtyId);
-      this.dataList = data.map(item => {
-        return {
-          id: item.id,
-          name: item.name
-        };
-      });
-
-      if (this.setDefault) {
-        this.selectId = this.dataList[0] && this.dataList[0].id;
-        const val = {
-          value: (this.dataList[0] && this.dataList[0].id) || "",
-          label: (this.dataList[0] && this.dataList[0].name) || ""
-        };
-        this.$emit("on-change", val);
-        this.$emit("on-set");
-      }
-    },
-    selected(val) {
-      this.$emit("on-change", val);
-    }
-  }
-};
-</script>

+ 0 - 110
src/components/SubjectSelect.vue

@@ -1,110 +0,0 @@
-<template>
-  <Select
-    class="subject-select"
-    v-model="selectId"
-    style="width: 100%;"
-    @on-change="selected"
-    label-in-value
-    :size="size"
-    :placeholder="placeholder"
-    :clearable="clearable"
-    :disabled="disabled"
-  >
-    <Option v-for="item in dataList" :key="item.id" :value="item.id">{{
-      item.name
-    }}</Option>
-  </Select>
-</template>
-
-<script>
-import { subjectList } from "@/modules/admin/api";
-
-export default {
-  name: "subject-select",
-  props: {
-    value: {
-      type: [String, Number]
-    },
-    size: {
-      type: String,
-      default: "large",
-      validator(value) {
-        return ["small", "large", "default"].indexOf(value) !== -1;
-      }
-    },
-    workId: {
-      type: [String, Number],
-      required: true
-    },
-    setDefault: {
-      type: Boolean,
-      default: false
-    },
-    placeholder: {
-      type: String,
-      default: "请选择考试"
-    },
-    clearable: {
-      type: Boolean,
-      default: false
-    },
-    disabled: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      loading: false,
-      dataList: []
-    };
-  },
-  watch: {
-    workId(val, oldval) {
-      if (val !== oldval) this.search();
-    }
-  },
-  computed: {
-    selectId: {
-      get() {
-        return this.value;
-      },
-      set(selectId) {
-        this.$emit("input", selectId || "");
-      }
-    }
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    async search() {
-      if (!this.workId) {
-        this.dataList = [];
-        this.selectId = "";
-        return;
-      }
-      const data = await subjectList(this.workId);
-      this.dataList = data.map(item => {
-        return {
-          id: item.id,
-          name: item.name
-        };
-      });
-
-      if (this.setDefault) {
-        this.selectId = this.dataList[0] && this.dataList[0].id;
-        const val = {
-          value: (this.dataList[0] && this.dataList[0].id) || "",
-          label: (this.dataList[0] && this.dataList[0].name) || ""
-        };
-        this.$emit("on-change", val);
-        this.$emit("on-set");
-      }
-    },
-    selected(val) {
-      this.$emit("on-change", val);
-    }
-  }
-};
-</script>

+ 0 - 96
src/components/WorkSelect.vue

@@ -1,96 +0,0 @@
-<template>
-  <Select
-    class="work-select"
-    v-model="selectId"
-    style="width: 100%;"
-    @on-change="selected"
-    label-in-value
-    :size="size"
-    :placeholder="placeholder"
-    :clearable="clearable"
-    :disabled="disabled"
-  >
-    <Option v-for="item in dataList" :key="item.id" :value="item.id">{{
-      item.name
-    }}</Option>
-  </Select>
-</template>
-
-<script>
-import { workList } from "@/modules/admin/api";
-
-export default {
-  name: "work-select",
-  props: {
-    value: {
-      type: [String, Number]
-    },
-    size: {
-      type: String,
-      default: "large",
-      validator(value) {
-        return ["small", "large", "default"].indexOf(value) !== -1;
-      }
-    },
-    setDefault: {
-      type: Boolean,
-      default: false
-    },
-    placeholder: {
-      type: String,
-      default: "请选择考试"
-    },
-    clearable: {
-      type: Boolean,
-      default: false
-    },
-    disabled: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      loading: false,
-      dataList: []
-    };
-  },
-  computed: {
-    selectId: {
-      get() {
-        return this.value;
-      },
-      set(selectId) {
-        this.$emit("input", selectId || "");
-      }
-    }
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    async search() {
-      const data = await workList(this.specialtyId);
-      this.dataList = data.map(item => {
-        return {
-          id: item.id,
-          name: item.name
-        };
-      });
-
-      if (this.setDefault) {
-        this.selectId = this.dataList[0] && this.dataList[0].id;
-        const val = {
-          value: (this.dataList[0] && this.dataList[0].id) || "",
-          label: (this.dataList[0] && this.dataList[0].name) || ""
-        };
-        this.$emit("on-change", val);
-        this.$emit("on-set");
-      }
-    },
-    selected(val) {
-      this.$emit("on-change", val);
-    }
-  }
-};
-</script>

+ 0 - 268
src/components/common/CalendarMemo/CalendarMemo.vue

@@ -1,268 +0,0 @@
-<template>
-  <div :class="prefixCls">
-    <div :class="[prefixCls + '-header']">
-      <span @click="changeYear(-1)"
-        ><Icon type="ios-arrow-dropleft"></Icon
-      ></span>
-      <span @click="changMonth(-1)"><Icon type="ios-arrow-back"></Icon></span>
-      <span @click="changeYear(1)"
-        ><Icon type="ios-arrow-dropright"></Icon
-      ></span>
-      <span @click="changMonth(1)"><Icon type="ios-arrow-forward"></Icon></span>
-      <div :class="[prefixCls + '-title']">{{ headerTitle }}</div>
-    </div>
-    <div :class="[prefixCls + '-cells']">
-      <div :class="[prefixCls + '-cells-header']">
-        <span
-          v-for="(item, index) in headerDays"
-          :class="[prefixCls + '-cell']"
-          :key="index"
-          ><em>{{ item }}</em></span
-        >
-      </div>
-      <div :class="[prefixCls + '-cells-body']">
-        <span
-          v-for="(cell, index) in cells"
-          :key="index"
-          :class="getCellCls(cell)"
-          @click="handleClick(cell)"
-        >
-          <em>{{ cell.desc }}</em>
-        </span>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import jsCalendar from "js-calendar";
-
-const prefixCls = "ivu-calendar-memo";
-const weekDays = ["一", "二", "三", "四", "五", "六", "日"];
-
-const clearHours = function(time) {
-  const cloneDate = new Date(time);
-  cloneDate.setHours(0, 0, 0, 0);
-  return cloneDate.getTime();
-};
-
-export default {
-  name: "calendar-memo",
-  props: {
-    weekStartDay: {
-      type: [Number, String],
-      default: 1,
-      validator(val) {
-        return [0, 1].indexOf(parseInt(val)) > -1;
-      }
-    },
-    disabledDates: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    memoDates: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    onDateClick: {
-      type: Function,
-      default() {
-        return {};
-      }
-    }
-  },
-  data() {
-    return {
-      prefixCls: prefixCls,
-      curDate: {
-        year: "",
-        month: ""
-      }
-    };
-  },
-  mounted() {
-    let date = new Date();
-    this.curDate = {
-      year: date.getFullYear(),
-      month: date.getMonth()
-    };
-  },
-  computed: {
-    headerTitle() {
-      return `${this.curDate.year} 年 ${this.curDate.month + 1} 月`;
-    },
-    headerDays() {
-      let translatedDays = [...weekDays];
-      if (!this.weekStartDay) {
-        let last = translatedDays.pop();
-        translatedDays.unshift(last);
-      }
-      return translatedDays;
-    },
-    calendar() {
-      return new jsCalendar.Generator({
-        onlyDays: true,
-        weekStart: parseInt(this.weekStartDay)
-      });
-    },
-    cells() {
-      const today = clearHours(new Date());
-      return this.calendar(this.curDate.year, this.curDate.month, cell => {
-        const time = cell.date && clearHours(cell.date);
-        return {
-          ...cell,
-          type: time === today ? "today" : cell.type,
-          actived: this.checkActived(cell.date),
-          disabled: this.checkDisabled(cell.date)
-        };
-      }).cells;
-    }
-  },
-  methods: {
-    getCellCls(cell) {
-      return [
-        `${prefixCls}-cell`,
-        {
-          [`${prefixCls}-cell-actived`]: cell.actived,
-          [`${prefixCls}-cell-disabled`]: cell.disabled,
-          [`${prefixCls}-cell-today`]: cell.type === "today",
-          [`${prefixCls}-cell-prev-month`]: cell.type === "prevMonth",
-          [`${prefixCls}-cell-next-month`]: cell.type === "nextMonth"
-        }
-      ];
-    },
-    checkDisabled(time) {
-      if (!time) return false;
-      if (!this.disabledDates.length) return false;
-      let temp = time.getTime();
-      return this.disabledDates.some(item => {
-        return new Date(item).getTime() === temp;
-      });
-    },
-    checkActived(time) {
-      if (!time) return false;
-      if (!this.memoDates.length) return false;
-      let temp = time.getTime();
-      return this.memoDates.some(item => {
-        return new Date(item).getTime() === temp;
-      });
-    },
-    changeYear(dir) {
-      this.curDate.year = this.curDate.year + dir;
-    },
-    changMonth(dir) {
-      let month = dir + this.curDate.month;
-      if (month > 11) {
-        this.curDate.year = this.curDate.year + 1;
-        this.curDate.month = month - 11;
-      } else if (month < 0) {
-        this.curDate.year = this.curDate.year - 1;
-        this.curDate.month = month + 11;
-      } else {
-        this.curDate.month = month;
-      }
-    },
-    handleClick(date) {
-      if (date.disabled) return;
-      this.onDateClick(date);
-    }
-  }
-};
-</script>
-
-<style lang="postcss">
-.ivu-calendar-memo {
-  min-width: 300px;
-  box-shadow: 0 0 1px #d0d0d0;
-}
-.ivu-calendar-memo-header {
-  height: 41px;
-  padding: 2px;
-  text-align: center;
-  border-bottom: 1px solid #e0e0e0;
-}
-.ivu-calendar-memo-header span {
-  display: block;
-  float: left;
-  width: 36px;
-  height: 36px;
-  line-height: 32px;
-  font-size: 20px;
-  color: #c5c8ce;
-  border-radius: 5px;
-  cursor: pointer;
-}
-.ivu-calendar-memo-header span:nth-of-type(3),
-.ivu-calendar-memo-header span:nth-of-type(4) {
-  float: right;
-}
-.ivu-calendar-memo-header span:hover {
-  color: #2d8cf0;
-  background: #e1f0fe;
-}
-.ivu-calendar-memo-title {
-  margin: 0 90px;
-  height: 36px;
-  line-height: 36px;
-}
-.ivu-calendar-memo-cells {
-  padding: 10px;
-}
-.ivu-calendar-memo-cells-header {
-  height: 40px;
-  color: #c5c8ce;
-}
-.ivu-calendar-memo-cells-body {
-  overflow: hidden;
-}
-.ivu-calendar-memo-cell {
-  float: left;
-  display: block;
-  position: relative;
-  width: 14.25%;
-  height: 40px;
-  padding: 2px;
-  cursor: pointer;
-}
-.ivu-calendar-memo-cell:hover em {
-  background: #e1f0fe;
-}
-.ivu-calendar-memo-cell em {
-  display: block;
-  height: 36px;
-  line-height: 34px;
-  border: 1px solid transparent;
-  text-align: center;
-  font-size: 16px;
-  border-radius: 5px;
-  transition: all 0.2s ease-in-out;
-}
-.ivu-calendar-memo-cell-actived::after {
-  content: "";
-  display: block;
-  position: absolute;
-  border: 5px solid #2d8cf0;
-  border-radius: 50%;
-  left: 50%;
-  top: 50%;
-  margin-top: -13px;
-  margin-left: 13px;
-}
-.ivu-calendar-memo-cell-disabled em {
-  cursor: not-allowed;
-  color: #c5c8ce !important;
-  background: #fff !important;
-  border-color: transparent !important;
-}
-.ivu-calendar-memo-cell-today em {
-  border-color: #5cadff;
-}
-.ivu-calendar-memo-cell-prev-month em,
-.ivu-calendar-memo-cell-next-month em {
-  color: #c5c8ce;
-}
-</style>

+ 0 - 2
src/components/common/CalendarMemo/index.js

@@ -1,2 +0,0 @@
-import CalendarMemo from "./CalendarMemo.vue";
-export default CalendarMemo;

+ 0 - 50
src/components/common/CalendarMemo/intro.md

@@ -1,50 +0,0 @@
-# CalendarMemo api
-
-## 实例
-
-```html
-<template>
-  <div class="demo">
-    <calendar-memo :memo-dates="memoInfos" :on-date-click="onDateClick"></calendar-memo>
-  </div>
-</template>
-
-<script>
-import CalendarMemo from "@/components/common/CalendarMemo";
-
-export default {
-  name: "demo",
-  components: {
-    CalendarMemo
-  },
-  data() {
-    return {
-      memoInfos: ["2018-08-15", "2018-08-31"]
-    };
-  }
-};
-</script>
-```
-
-## CalendarMemo props
-
-| 属性           | 说明                                                     | 类型           | 默认值 |
-| -------------- | -------------------------------------------------------- | -------------- | ------ |
-| week-start-day | 星期开始的日期,1:表示从星期一开始,0:表示从星期天开始 | Number, String | 1      |
-| disabled-dates | 不可点击的日期                                           | Array          | []     |
-| memo-dates     | 有备忘信息的日期                                         | Array          | []     |
-| on-date-click  | 当前日历中日期时的钩子,返回字段为 data-当前日期信息     | Function       | -      |
-
-
-## 点击日期返回的日期数据
-
-| 属性     | 说明                                                 | 类型    |
-| -------- | ---------------------------------------------------- | ------- |
-| date     | 日期对象                                             | Date    |
-| desc     | 日期中的天数                                         | Number  |
-| year     | 日期中的年份                                         | Number  |
-| week     | 日期中的星期数                                       | Number  |
-| format   | 是否选中子节点                                       | String  |
-| actived  | 日期是否有备忘                                       | Boolean |
-| disabled | 日期是否可操作                                       | Boolean |
-| type     | 日期的类别,monthDay(当月日期),nextMonth,prevMonth | String  |

+ 0 - 190
src/components/common/TransferTree/TransferTree.vue

@@ -1,190 +0,0 @@
-<template>
-  <div class="transfer-tree">
-    <div :class="prefixCls">
-      <transfer-list
-        :prefixCls="prefixCls + '-list'"
-        :data="leftData"
-        :listStyle="listStyle"
-        :title="localeTitles[0]"
-        :notFoundText="notFoundText"
-        @selected="leftSelected"
-        ref="left"
-      ></transfer-list>
-
-      <transfer-operation
-        :prefixCls="prefixCls"
-        :operations="operations"
-        :leftActive="leftValidKeysCount > 0"
-        :rightActive="rightValidKeysCount > 0"
-      ></transfer-operation>
-
-      <transfer-list
-        :prefixCls="prefixCls + '-list'"
-        :data="rightData"
-        :listStyle="listStyle"
-        :title="localeTitles[1]"
-        :notFoundText="notFoundText"
-        @selected="rightSelected"
-        ref="right"
-      ></transfer-list>
-    </div>
-  </div>
-</template>
-
-<script>
-import TransferList from "./list.vue";
-import TransferOperation from "./operation.vue";
-
-const prefixCls = "ivu-transfer";
-
-export default {
-  name: "transfer-tree",
-  components: {
-    TransferList,
-    TransferOperation
-  },
-  props: {
-    data: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    targetKeys: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    listStyle: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    titles: {
-      type: Array
-    },
-    operations: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    notFoundText: {
-      type: String
-    }
-  },
-  data() {
-    return {
-      prefixCls,
-      leftData: [],
-      rightData: [],
-      selectedTitles: [],
-      leftCheckedKeys: [],
-      rightCheckedKeys: [],
-      leftValidKeysCount: 0,
-      rightValidKeysCount: 0,
-      selectedKeys: []
-    };
-  },
-  computed: {
-    classes() {
-      return [`${prefixCls}`];
-    },
-    localeTitles() {
-      if (this.titles === undefined) {
-        return ["源列表", "目标列表"];
-      } else {
-        return this.titles;
-      }
-    }
-  },
-  mounted() {
-    this.selectedKeys = [...this.targetKeys];
-    this.updateData();
-  },
-  methods: {
-    leftSelected(count) {
-      this.leftValidKeysCount = count;
-    },
-    rightSelected(count) {
-      this.rightValidKeysCount = count;
-    },
-    updateData() {
-      this.selectedTitles = [];
-      let [leftData, rightData] = this.splitData(this.data);
-      this.leftData = leftData;
-      this.rightData = rightData;
-    },
-    splitData(data) {
-      let leftData = [];
-      let rightData = [];
-
-      data.forEach(item => {
-        if (item.children) {
-          let [leftChildren, rightChildren] = this.splitData(item.children);
-          if (leftChildren.length) {
-            let newitem = { ...item };
-            newitem.children = leftChildren;
-            leftData.push(newitem);
-          }
-          if (rightChildren.length) {
-            let newitem = { ...item };
-            newitem.children = rightChildren;
-            rightData.push(newitem);
-          }
-        } else {
-          let newitem = { ...item };
-          if (this.selectedKeys.indexOf(item.key) === -1) {
-            leftData.push(newitem);
-          } else {
-            rightData.push(newitem);
-            this.selectedTitles.push(newitem.title);
-          }
-        }
-      });
-      return [leftData, rightData];
-    },
-    moveTo(direction) {
-      let opposite = direction === "left" ? "right" : "left";
-      let moveItems = this.$refs[opposite].selected;
-      let moveKeys = this.getSelectKeys(moveItems);
-      this.selectedKeys = this.updateSelectedKeys(
-        this.selectedKeys,
-        direction,
-        moveKeys
-      );
-      this.updateData();
-      this.$refs[opposite].select([]);
-      this.$emit("on-change", {
-        selectedKeys: this.selectedKeys,
-        direction,
-        moveKeys,
-        selectedTitles: this.selectedTitles
-      });
-    },
-    getSelectKeys(moveItems) {
-      let keys = [];
-      moveItems.map(item => {
-        if (!item.children) {
-          keys.push(item.key);
-        }
-      });
-      return keys;
-    },
-    updateSelectedKeys(selectedKeys, direction, moveKeys) {
-      let newSelectedKeys = [...selectedKeys];
-      if (direction === "left") {
-        moveKeys.forEach(item => {
-          let ind = newSelectedKeys.indexOf(item);
-          newSelectedKeys.splice(ind, 1);
-        });
-      } else {
-        newSelectedKeys = newSelectedKeys.concat(moveKeys);
-      }
-      return newSelectedKeys;
-    }
-  }
-};
-</script>

+ 0 - 2
src/components/common/TransferTree/index.js

@@ -1,2 +0,0 @@
-import TransferTree from "./TransferTree.vue";
-export default TransferTree;

+ 0 - 104
src/components/common/TransferTree/intro.md

@@ -1,104 +0,0 @@
-## TransferTree api
-
-> 注意:
-> 本组件只提交最下一级元素的key值。
-
-## 实例
-
-```html
-<template>
-  <div class="demo">
-    <transfer-tree 
-      :data="list" 
-      :targetKeys="targetKeys"
-      @on-change="changeKeys"
-      ></transfer-tree>
-  </div>
-</template>
-
-<script>
-import TransferTree from "@/components/common/TransferTree";
-
-const list = [];
-for (let i = 0; i < 3; i++) {
-  let parent = {
-    title: "parent " + i,
-    key: "p-" + i,
-    expand: true,
-    selected: false,
-    children: []
-  };
-
-  for (let j = 0; j < 5; j++) {
-    let child = {
-      title: "child-" + i + "-" + j,
-      key: "child-" + i + "-" + j,
-      // disabled: Math.random() > 0.5
-    };
-    parent.children.push(child);
-  }
-  list.push(parent);
-}
-
-const targetKeys = ["child-0-2", "child-0-3", "child-1-0", "child-1-1"];
-
-export default {
-  class:"demo",
-  data() {
-    return {
-      list,
-      targetKeys
-    };
-  },
-  methods: {
-    changeKeys({selectedKeys, direction, moveKeys, selectedTitles}) {
-      console.log(selectedKeys, direction, moveKeys, selectedTitles);
-    }
-  }
-};
-</script>
-```
-
-
-## TransferTree props
-
-| 属性           | 说明                                                                | 类型   | 默认值                 |
-| -------------- | ------------------------------------------------------------------- | ------ | ---------------------- |
-| data           | 数据源,其中的数据将会被渲染到左边一栏中,targetKeys 中指定的除外。 | Array  | []                     |
-| targetKeys     | 已经选中的data中最小一级元素的key值集合,这些元素会显示在右侧框中   | Array  | []                     |
-| list-style     | 两个穿梭框的自定义样式                                              | Object | {}                     |
-| titles         | 标题集合,顺序从左至右                                              | Array  | ['源列表', '目的列表'] |
-| operations     | 操作文案集合,顺序从上至下                                          | Array  | []                     |
-| not-found-text | 当列表为空时显示的内容                                              | String | 列表为空               |
-
-## TransferTree events
-| 事件名    | 说明                           | 返回值                                                                                |
-| --------- | ------------------------------ | ------------------------------------------------------------------------------------- |
-| on-change | 选项在两栏之间转移时的回调函数 | 返回一个包含四个属性的对象,分别是:selectedKeys, direction, moveKeys, selectedTitles |
-
-- on-change 返回数据说明
-
-| 名称           | 说明                                    | 类型   |
-| -------------- | --------------------------------------- | ------ |
-| selectedKeys   | 当前右侧tree中存在的最小元素key值数组   | Array  |
-| direction      | 当前操作的方向                          | String |
-| moveKeys       | 当前操作元素的key值数组                 | Array  |
-| selectedTitles | 当前右侧tree中存在的最小元素title值数组 | Array  |
-
-## children
-
-- data数据中children元素的数据结构
-
-| 属性            | 说明                                   | 类型     | 默认值 |
-| --------------- | -------------------------------------- | -------- | ------ |
-| title           | 元素在tree中显示的标题                 | String   | -      |
-| key             | 元素的key值                            | String   | -      |
-| expand          | 是否展开直子节点                       | Boolean  | false  |
-| disabled        | 禁掉响应                               | Boolean  | false  |
-| disableCheckbox | 禁掉 checkbox                          | Boolean  | false  |
-| selected        | 是否选中子节点                         | Boolean  | false  |
-| checked         | 是否勾选(如果勾选,子节点也会全部勾选) | Boolean  | false  |
-| children        | 子节点属性数组                         | Array    | -      |
-| render          | 自定义当前节点渲染内容,见示例         | Function | -      |
-
-

+ 0 - 65
src/components/common/TransferTree/list.vue

@@ -1,65 +0,0 @@
-<template>
-  <div :class="classes" :style="listStyle">
-    <div :class="prefixCls + '-header'">
-      <span :class="prefixCls + '-header-title'">{{ title }}</span>
-    </div>
-    <div :class="bodyClasses">
-      <div :class="prefixCls + '-content'" style="padding: 5px;">
-        <Tree
-          :data="data"
-          :empty-text="notFoundText"
-          show-checkbox
-          multiple
-          @on-check-change="select"
-        >
-        </Tree>
-      </div>
-    </div>
-    <div :class="prefixCls + '-footer'" v-if="showFooter"><slot></slot></div>
-  </div>
-</template>
-<script>
-export default {
-  name: "transfer-list",
-  props: {
-    prefixCls: String,
-    data: Array,
-    listStyle: Object,
-    title: [String, Number],
-    notFoundText: String
-  },
-  data() {
-    return {
-      selected: [],
-      showFooter: true
-    };
-  },
-  computed: {
-    classes() {
-      return [
-        `${this.prefixCls}`,
-        {
-          [`${this.prefixCls}-with-footer`]: this.showFooter
-        }
-      ];
-    },
-    bodyClasses() {
-      return [
-        `${this.prefixCls}-body`,
-        {
-          [`${this.prefixCls}-body-with-footer`]: this.showFooter
-        }
-      ];
-    }
-  },
-  methods: {
-    select(selected) {
-      this.selected = selected;
-      this.$emit("selected", selected.length);
-    }
-  },
-  mounted() {
-    this.showFooter = this.$slots.default !== undefined;
-  }
-};
-</script>

+ 0 - 40
src/components/common/TransferTree/operation.vue

@@ -1,40 +0,0 @@
-<template>
-  <div :class="prefixCls + '-operation'">
-    <Button
-      type="primary"
-      size="small"
-      :disabled="!rightActive"
-      @click.native="moveToLeft"
-    >
-      <Icon type="ios-arrow-back" size="16" /> {{ operations[0] }}
-    </Button>
-    <Button
-      type="primary"
-      size="small"
-      :disabled="!leftActive"
-      @click.native="moveToRight"
-    >
-      {{ operations[1] }} <Icon type="ios-arrow-forward" size="16" />
-    </Button>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "transfer-operation",
-  props: {
-    prefixCls: String,
-    operations: Array,
-    leftActive: Boolean,
-    rightActive: Boolean
-  },
-  methods: {
-    moveToLeft() {
-      this.$parent.moveTo("left");
-    },
-    moveToRight() {
-      this.$parent.moveTo("right");
-    }
-  }
-};
-</script>

+ 0 - 285
src/components/common/TreeList/TreeList.vue

@@ -1,285 +0,0 @@
-<template>
-  <div :class="comClasses">
-    <Tree-node
-      v-for="(item, i) in stateTree"
-      :key="i"
-      :data="item"
-      visible
-      :multiple="multiple"
-      :show-checkbox="showCheckbox"
-      :editable="editable"
-      :children-key="childrenKey"
-    >
-    </Tree-node>
-    <div :class="[prefixCls + '-empty']" v-if="!stateTree.length">
-      {{ emptyText }}
-    </div>
-  </div>
-</template>
-
-<script>
-import TreeNode from "./node.vue";
-import Emitter from "./emitter";
-
-const prefixCls = "ivu-tree";
-
-export default {
-  name: "TreeList",
-  mixins: [Emitter],
-  components: { TreeNode },
-  props: {
-    data: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    multiple: {
-      type: Boolean,
-      default: false
-    },
-    extroRender: {
-      type: Function,
-      default(node) {
-        return {};
-      }
-    },
-    editable: {
-      type: Boolean,
-      default: false
-    },
-    showCheckbox: {
-      type: Boolean,
-      default: false
-    },
-    emptyText: {
-      type: String,
-      default: "暂无数据"
-    },
-    childrenKey: {
-      type: String,
-      default: "children"
-    },
-    loadData: {
-      type: Function
-    },
-    render: {
-      type: Function
-    },
-    onNodeEdit: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onNodeAppend: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onNodeRemove: {
-      type: Function,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    comClasses() {
-      return [
-        `${prefixCls}`,
-        {
-          [`${prefixCls}-edit`]: this.editable
-        }
-      ];
-    }
-  },
-  data() {
-    return {
-      prefixCls: prefixCls,
-      stateTree: this.data,
-      flatState: []
-    };
-  },
-  watch: {
-    data: {
-      deep: true,
-      handler() {
-        this.stateTree = this.data;
-        this.flatState = this.compileFlatState();
-        this.rebuildTree();
-      }
-    }
-  },
-  methods: {
-    compileFlatState() {
-      // so we have always a relation parent/children of each node
-      const that = this;
-      let keyCounter = 0;
-      let childrenKey = this.childrenKey;
-      const flatTree = [];
-      function flattenChildren(node, parent) {
-        // 额外字段
-        let extroInfo = that.extroRender(node);
-        for (let key in extroInfo) {
-          node[key] = extroInfo[key];
-        }
-
-        node.nodeKey = keyCounter++;
-        flatTree[node.nodeKey] = { node: node, nodeKey: node.nodeKey };
-        if (typeof parent != "undefined") {
-          flatTree[node.nodeKey].parent = parent.nodeKey;
-          flatTree[parent.nodeKey][childrenKey].push(node.nodeKey);
-        }
-
-        if (node[childrenKey]) {
-          flatTree[node.nodeKey][childrenKey] = [];
-          node[childrenKey].forEach(child => flattenChildren(child, node));
-        }
-      }
-      this.stateTree.forEach(rootNode => {
-        flattenChildren(rootNode);
-      });
-      return flatTree;
-    },
-    updateTreeUp(nodeKey) {
-      const parentKey = this.flatState[nodeKey].parent;
-      if (typeof parentKey == "undefined") return;
-
-      const node = this.flatState[nodeKey].node;
-      const parent = this.flatState[parentKey].node;
-      if (
-        node.checked == parent.checked &&
-        node.indeterminate == parent.indeterminate
-      )
-        return; // no need to update upwards
-
-      if (node.checked == true) {
-        this.$set(
-          parent,
-          "checked",
-          parent[this.childrenKey].every(node => node.checked)
-        );
-        this.$set(parent, "indeterminate", !parent.checked);
-      } else {
-        this.$set(parent, "checked", false);
-        this.$set(
-          parent,
-          "indeterminate",
-          parent[this.childrenKey].some(
-            node => node.checked || node.indeterminate
-          )
-        );
-      }
-      this.updateTreeUp(parentKey);
-    },
-    rebuildTree() {
-      // only called when `data` prop changes
-      const checkedNodes = this.getCheckedNodes();
-      checkedNodes.forEach(node => {
-        this.updateTreeDown(node, { checked: true });
-        // propagate upwards
-        const parentKey = this.flatState[node.nodeKey].parent;
-        if (!parentKey && parentKey !== 0) return;
-        const parent = this.flatState[parentKey].node;
-        const childHasCheckSetter =
-          typeof node.checked != "undefined" && node.checked;
-        if (childHasCheckSetter && parent.checked != node.checked) {
-          this.updateTreeUp(node.nodeKey); // update tree upwards
-        }
-      });
-    },
-
-    getSelectedNodes() {
-      /* public API */
-      return this.flatState
-        .filter(obj => obj.node.selected)
-        .map(obj => obj.node);
-    },
-    getCheckedNodes() {
-      /* public API */
-      return this.flatState
-        .filter(obj => obj.node.checked)
-        .map(obj => obj.node);
-    },
-    updateTreeDown(node, changes = {}) {
-      for (let key in changes) {
-        this.$set(node, key, changes[key]);
-      }
-      if (node[this.childrenKey]) {
-        node[this.childrenKey].forEach(child => {
-          this.updateTreeDown(child, changes);
-        });
-      }
-    },
-    handleSelect(nodeKey) {
-      const node = this.flatState[nodeKey].node;
-      if (!this.multiple) {
-        // reset previously selected node
-        const currentSelectedKey = this.flatState.findIndex(
-          obj => obj.node.selected
-        );
-        if (currentSelectedKey >= 0 && currentSelectedKey !== nodeKey)
-          this.$set(this.flatState[currentSelectedKey].node, "selected", false);
-      }
-      this.$set(node, "selected", !node.selected);
-
-      this.$emit("on-select-change", this.getSelectedNodes());
-    },
-    handleCheck({ checked, nodeKey }) {
-      const node = this.flatState[nodeKey].node;
-      this.$set(node, "checked", checked);
-      this.$set(node, "indeterminate", false);
-
-      this.updateTreeUp(nodeKey); // propagate up
-      this.updateTreeDown(node, { checked, indeterminate: false }); // reset `indeterminate` when going down
-
-      this.$emit("on-check-change", this.getCheckedNodes());
-    },
-    handlerNodeEdit(nodeKey) {
-      const node = this.flatState[nodeKey];
-      this.onNodeEdit(node);
-    },
-    handlerNodeAppend(nodeKey) {
-      const node = this.flatState[nodeKey];
-      this.onNodeAppend(node);
-    },
-    handlerNodeRemove(nodeKey) {
-      const root = this.flatState;
-      const node = root[nodeKey];
-      this.onNodeRemove(root, node, () => {
-        if (node.parent || node.parent === 0) {
-          const parentKey = node.parent;
-          const parent = root.find(el => el.nodeKey === parentKey).node;
-          const index = parent.children.indexOf(node.node);
-          parent.children.splice(index, 1);
-        } else {
-          const index = this.stateTree.indexOf(node.node);
-          this.stateTree.splice(index, 1);
-        }
-      });
-    }
-  },
-  created() {
-    this.flatState = this.compileFlatState();
-    this.rebuildTree();
-  },
-  mounted() {
-    this.$on("on-check", this.handleCheck);
-    this.$on("on-selected", this.handleSelect);
-    this.$on("toggle-expand", node => this.$emit("on-toggle-expand", node));
-    if (this.editable) {
-      this.$on("node-edit", this.handlerNodeEdit);
-      this.$on("node-append", this.handlerNodeAppend);
-      this.$on("node-remove", this.handlerNodeRemove);
-    }
-  }
-};
-</script>
-
-<style>
-.ivu-tree.ivu-tree-edit ul li {
-  margin: 0 0 3px 0;
-}
-</style>

+ 0 - 337
src/components/common/TreeList/assist.js

@@ -1,337 +0,0 @@
-import Vue from "vue";
-const isServer = Vue.prototype.$isServer;
-// 判断参数是否是其中之一
-export function oneOf(value, validList) {
-  for (let i = 0; i < validList.length; i++) {
-    if (value === validList[i]) {
-      return true;
-    }
-  }
-  return false;
-}
-
-export function camelcaseToHyphen(str) {
-  return str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
-}
-
-// For Modal scrollBar hidden
-let cached;
-export function getScrollBarSize(fresh) {
-  if (isServer) return 0;
-  if (fresh || cached === undefined) {
-    const inner = document.createElement("div");
-    inner.style.width = "100%";
-    inner.style.height = "200px";
-
-    const outer = document.createElement("div");
-    const outerStyle = outer.style;
-
-    outerStyle.position = "absolute";
-    outerStyle.top = 0;
-    outerStyle.left = 0;
-    outerStyle.pointerEvents = "none";
-    outerStyle.visibility = "hidden";
-    outerStyle.width = "200px";
-    outerStyle.height = "150px";
-    outerStyle.overflow = "hidden";
-
-    outer.appendChild(inner);
-
-    document.body.appendChild(outer);
-
-    const widthContained = inner.offsetWidth;
-    outer.style.overflow = "scroll";
-    let widthScroll = inner.offsetWidth;
-
-    if (widthContained === widthScroll) {
-      widthScroll = outer.clientWidth;
-    }
-
-    document.body.removeChild(outer);
-
-    cached = widthContained - widthScroll;
-  }
-  return cached;
-}
-
-// watch DOM change
-export const MutationObserver = isServer
-  ? false
-  : window.MutationObserver ||
-    window.WebKitMutationObserver ||
-    window.MozMutationObserver ||
-    false;
-
-// const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
-// const MOZ_HACK_REGEXP = /^moz([A-Z])/;
-
-// function camelCase(name) {
-//   return name
-//     .replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
-//       return offset ? letter.toUpperCase() : letter;
-//     })
-//     .replace(MOZ_HACK_REGEXP, "Moz$1");
-// }
-// getStyle
-// export function getStyle(element, styleName) {
-//   if (!element || !styleName) return null;
-//   styleName = camelCase(styleName);
-//   if (styleName === "float") {
-//     styleName = "cssFloat";
-//   }
-//   try {
-//     const computed = document.defaultView.getComputedStyle(element, "");
-//     return element.style[styleName] || computed ? computed[styleName] : null;
-//   } catch (e) {
-//     return element.style[styleName];
-//   }
-// }
-
-// firstUpperCase
-function firstUpperCase(str) {
-  return str.toString()[0].toUpperCase() + str.toString().slice(1);
-}
-export { firstUpperCase };
-
-// Warn
-export function warnProp(component, prop, correctType, wrongType) {
-  correctType = firstUpperCase(correctType);
-  wrongType = firstUpperCase(wrongType);
-  console.error(
-    `[iView warn]: Invalid prop: type check failed for prop ${prop}. Expected ${correctType}, got ${wrongType}. (found in component: ${component})`
-  ); // eslint-disable-line
-}
-
-function typeOf(obj) {
-  const toString = Object.prototype.toString;
-  const map = {
-    "[object Boolean]": "boolean",
-    "[object Number]": "number",
-    "[object String]": "string",
-    "[object Function]": "function",
-    "[object Array]": "array",
-    "[object Date]": "date",
-    "[object RegExp]": "regExp",
-    "[object Undefined]": "undefined",
-    "[object Null]": "null",
-    "[object Object]": "object"
-  };
-  return map[toString.call(obj)];
-}
-
-// deepCopy
-function deepCopy(data) {
-  const t = typeOf(data);
-  let o;
-
-  if (t === "array") {
-    o = [];
-  } else if (t === "object") {
-    o = {};
-  } else {
-    return data;
-  }
-
-  if (t === "array") {
-    for (let i = 0; i < data.length; i++) {
-      o.push(deepCopy(data[i]));
-    }
-  } else if (t === "object") {
-    for (let i in data) {
-      o[i] = deepCopy(data[i]);
-    }
-  }
-  return o;
-}
-
-export { deepCopy };
-
-// scrollTop animation
-export function scrollTop(el, from = 0, to, duration = 500) {
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame =
-      window.webkitRequestAnimationFrame ||
-      window.mozRequestAnimationFrame ||
-      window.msRequestAnimationFrame ||
-      function(callback) {
-        return window.setTimeout(callback, 1000 / 60);
-      };
-  }
-  const difference = Math.abs(from - to);
-  const step = Math.ceil((difference / duration) * 50);
-
-  function scroll(start, end, step) {
-    if (start === end) return;
-
-    let d = start + step > end ? end : start + step;
-    if (start > end) {
-      d = start - step < end ? end : start - step;
-    }
-
-    if (el === window) {
-      window.scrollTo(d, d);
-    } else {
-      el.scrollTop = d;
-    }
-    window.requestAnimationFrame(() => scroll(d, end, step));
-  }
-  scroll(from, to, step);
-}
-
-// Find components upward
-function findComponentUpward(context, componentName, componentNames) {
-  if (typeof componentName === "string") {
-    componentNames = [componentName];
-  } else {
-    componentNames = componentName;
-  }
-
-  let parent = context.$parent;
-  let name = parent.$options.name;
-  while (parent && (!name || componentNames.indexOf(name) < 0)) {
-    parent = parent.$parent;
-    if (parent) name = parent.$options.name;
-  }
-  return parent;
-}
-export { findComponentUpward };
-
-// Find component downward
-export function findComponentDownward(context, componentName) {
-  const childrens = context.$children;
-  let children = null;
-
-  if (childrens.length) {
-    for (const child of childrens) {
-      const name = child.$options.name;
-      if (name === componentName) {
-        children = child;
-        break;
-      } else {
-        children = findComponentDownward(child, componentName);
-        if (children) break;
-      }
-    }
-  }
-  return children;
-}
-
-// Find components downward
-export function findComponentsDownward(context, componentName) {
-  return context.$children.reduce((components, child) => {
-    if (child.$options.name === componentName) components.push(child);
-    const foundChilds = findComponentsDownward(child, componentName);
-    return components.concat(foundChilds);
-  }, []);
-}
-
-// Find components upward
-export function findComponentsUpward(context, componentName) {
-  let parents = [];
-  const parent = context.$parent;
-  if (parent) {
-    if (parent.$options.name === componentName) parents.push(parent);
-    return parents.concat(findComponentsUpward(parent, componentName));
-  } else {
-    return [];
-  }
-}
-
-// Find brothers components
-export function findBrothersComponents(
-  context,
-  componentName,
-  exceptMe = true
-) {
-  let res = context.$parent.$children.filter(item => {
-    return item.$options.name === componentName;
-  });
-  let index = res.findIndex(item => item._uid === context._uid);
-  if (exceptMe) res.splice(index, 1);
-  return res;
-}
-
-/* istanbul ignore next */
-const trim = function(string) {
-  return (string || "").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, "");
-};
-
-/* istanbul ignore next */
-export function hasClass(el, cls) {
-  if (!el || !cls) return false;
-  if (cls.indexOf(" ") !== -1)
-    throw new Error("className should not contain space.");
-  if (el.classList) {
-    return el.classList.contains(cls);
-  } else {
-    return (" " + el.className + " ").indexOf(" " + cls + " ") > -1;
-  }
-}
-
-/* istanbul ignore next */
-export function addClass(el, cls) {
-  if (!el) return;
-  let curClass = el.className;
-  const classes = (cls || "").split(" ");
-
-  for (let i = 0, j = classes.length; i < j; i++) {
-    const clsName = classes[i];
-    if (!clsName) continue;
-
-    if (el.classList) {
-      el.classList.add(clsName);
-    } else {
-      if (!hasClass(el, clsName)) {
-        curClass += " " + clsName;
-      }
-    }
-  }
-  if (!el.classList) {
-    el.className = curClass;
-  }
-}
-
-/* istanbul ignore next */
-export function removeClass(el, cls) {
-  if (!el || !cls) return;
-  const classes = cls.split(" ");
-  let curClass = " " + el.className + " ";
-
-  for (let i = 0, j = classes.length; i < j; i++) {
-    const clsName = classes[i];
-    if (!clsName) continue;
-
-    if (el.classList) {
-      el.classList.remove(clsName);
-    } else {
-      if (hasClass(el, clsName)) {
-        curClass = curClass.replace(" " + clsName + " ", " ");
-      }
-    }
-  }
-  if (!el.classList) {
-    el.className = trim(curClass);
-  }
-}
-
-export const dimensionMap = {
-  xs: "480px",
-  sm: "768px",
-  md: "992px",
-  lg: "1200px",
-  xl: "1600px"
-};
-
-export function setMatchMedia() {
-  if (typeof window !== "undefined") {
-    const matchMediaPolyfill = mediaQuery => {
-      return {
-        media: mediaQuery,
-        matches: false,
-        on() {},
-        off() {}
-      };
-    };
-    window.matchMedia = window.matchMedia || matchMediaPolyfill;
-  }
-}

+ 0 - 79
src/components/common/TreeList/collapse-transition.js

@@ -1,79 +0,0 @@
-// Thanks to https://github.com/ElemeFE/element/blob/dev/src/transitions/collapse-transition.js
-
-import { addClass, removeClass } from "./assist";
-
-const Transition = {
-  beforeEnter(el) {
-    addClass(el, "collapse-transition");
-    if (!el.dataset) el.dataset = {};
-
-    el.dataset.oldPaddingTop = el.style.paddingTop;
-    el.dataset.oldPaddingBottom = el.style.paddingBottom;
-
-    el.style.height = "0";
-    el.style.paddingTop = 0;
-    el.style.paddingBottom = 0;
-  },
-
-  enter(el) {
-    el.dataset.oldOverflow = el.style.overflow;
-    if (el.scrollHeight !== 0) {
-      el.style.height = el.scrollHeight + "px";
-      el.style.paddingTop = el.dataset.oldPaddingTop;
-      el.style.paddingBottom = el.dataset.oldPaddingBottom;
-    } else {
-      el.style.height = "";
-      el.style.paddingTop = el.dataset.oldPaddingTop;
-      el.style.paddingBottom = el.dataset.oldPaddingBottom;
-    }
-
-    el.style.overflow = "hidden";
-  },
-
-  afterEnter(el) {
-    // for safari: remove class then reset height is necessary
-    removeClass(el, "collapse-transition");
-    el.style.height = "";
-    el.style.overflow = el.dataset.oldOverflow;
-  },
-
-  beforeLeave(el) {
-    if (!el.dataset) el.dataset = {};
-    el.dataset.oldPaddingTop = el.style.paddingTop;
-    el.dataset.oldPaddingBottom = el.style.paddingBottom;
-    el.dataset.oldOverflow = el.style.overflow;
-
-    el.style.height = el.scrollHeight + "px";
-    el.style.overflow = "hidden";
-  },
-
-  leave(el) {
-    if (el.scrollHeight !== 0) {
-      // for safari: add class after set height, or it will jump to zero height suddenly, weired
-      addClass(el, "collapse-transition");
-      el.style.height = 0;
-      el.style.paddingTop = 0;
-      el.style.paddingBottom = 0;
-    }
-  },
-
-  afterLeave(el) {
-    removeClass(el, "collapse-transition");
-    el.style.height = "";
-    el.style.overflow = el.dataset.oldOverflow;
-    el.style.paddingTop = el.dataset.oldPaddingTop;
-    el.style.paddingBottom = el.dataset.oldPaddingBottom;
-  }
-};
-
-export default {
-  name: "CollapseTransition",
-  functional: true,
-  render(h, { children }) {
-    const data = {
-      on: Transition
-    };
-
-    return h("transition", data, children);
-  }
-};

+ 0 - 34
src/components/common/TreeList/emitter.js

@@ -1,34 +0,0 @@
-function broadcast(componentName, eventName, params) {
-  this.$children.forEach(child => {
-    const name = child.$options.name;
-
-    if (name === componentName) {
-      child.$emit.apply(child, [eventName].concat(params));
-    } else {
-      // todo 如果 params 是空数组,接收到的会是 undefined
-      broadcast.apply(child, [componentName, eventName].concat([params]));
-    }
-  });
-}
-export default {
-  methods: {
-    dispatch(componentName, eventName, params) {
-      let parent = this.$parent || this.$root;
-      let name = parent.$options.name;
-
-      while (parent && (!name || name !== componentName)) {
-        parent = parent.$parent;
-
-        if (parent) {
-          name = parent.$options.name;
-        }
-      }
-      if (parent) {
-        parent.$emit.apply(parent, [eventName].concat(params));
-      }
-    },
-    broadcast(componentName, eventName, params) {
-      broadcast.call(this, componentName, eventName, params);
-    }
-  }
-};

+ 0 - 2
src/components/common/TreeList/index.js

@@ -1,2 +0,0 @@
-import TreeList from "./TreeList.vue";
-export default TreeList;

+ 0 - 133
src/components/common/TreeList/intro.md

@@ -1,133 +0,0 @@
-# TreeList api
-
-## 实例
-
-```html
-<template>
-  <div class="demo">
-    <tree-list 
-      :data="treeData"
-      :extro-render="extroRender"
-      :on-node-edit="nodeEdit" 
-      :on-node-append="nodeAppend" 
-      :on-node-remove="nodeRemove"
-      @on-select-change="nodeSelect" 
-      editable>
-    </tree-list>
-  </div>
-</template>
-
-<script>
-import TreeList from "@/components/common/TreeList";
-
-export default {
-  name: "demo",
-  components: {
-    TreeList
-  },
-  data() {
-    return {
-      dataList: [
-        {
-          title: "parent 1",
-          id: "1",
-          expand: true,
-          children: [
-            {
-              title: "parent 1-1",
-              id: "1-1",
-              expand: true,
-              children: [
-                {
-                  title: "leaf 1-1-1",
-                  id: "1-1-1"
-                },
-                {
-                  title: "leaf 1-1-2",
-                  id: "1-1-2"
-                }
-              ]
-            },
-            {
-              title: "parent 1-2",
-              id: "1-2",
-              expand: true,
-              children: [
-                {
-                  title: "leaf 1-2-1",
-                  id: "1-2-1"
-                },
-                {
-                  title: "leaf 1-2-2",
-                  id: "1-2-2"
-                }
-              ]
-            }
-          ]
-        }
-      ]
-    };
-  },
-  methods: {
-    extroRender(node) {
-      return {
-        name: node.id + "-" + node.title
-      };
-    },
-    nodeSelect(nodes) {
-      console.log(nodes);
-    },
-    nodeEdit(node) {
-      console.log(this.treeData);
-      console.log(node);
-    },
-    nodeAppend(node) {
-      if (!node.node.children) node.node.children = [];
-      node.node.children.push({
-        name: "新增001",
-        title: "新增001",
-        description: "",
-        radioUrl: ""
-      });
-      console.log(this.treeData);
-    },
-    nodeRemove(root, node, callback) {
-      this.$Modal.confirm({
-        title: "删除确认",
-        content: "确定要删除当前节点吗?",
-        onOk: () => {
-          callback();
-        }
-      });
-      console.log(node);
-    }
-  }
-};
-</script>
-```
-
-## TreeList props
-
-在Tree组件的props基础上新增如下prop:
-
-| 属性           | 说明                                                                                          | 类型     | 默认值 |
-| -------------- | --------------------------------------------------------------------------------------------- | -------- | ------ |
-| editable       | 节点是否可编辑                                                                                | Boolean  | false  |
-| extro-render   | 额外字段的信息的解析函数                                                                      | Function | {}     |
-| on-node-append | 当前结点向下添加数据时的钩子,返回字段为 node-当前节点数据                                    | Function | -      |
-| on-node-edit   | 当前结点向下添加数据时的钩子,返回字段为 node-当前节点数据                                    | Function | -      |
-| on-node-remove | 当前结点向下添加数据时的钩子,返回字段为 root, node, callback,执行callback会自动删除当前节点 | Function | -      |
-
-**注意:**
-- extro-render:会在现有node字段信息基础上新增新定义的字段信息,如果原node中已用改字段,则会覆盖原node中的字段信息。
-
-## TreeList events
-
-与Tree保持一致
-
-
-#### tips
-
-- root 信息
-  
-  当前树形结构数据一维节点对象数组,数组中节点对象顺序为树形结构节点从上到下依次顺序。

+ 0 - 261
src/components/common/TreeList/node.vue

@@ -1,261 +0,0 @@
-<template>
-  <collapse-transition>
-    <ul :class="classes">
-      <li>
-        <div :class="headClasses">
-          <span :class="arrowClasses" @click="handleExpand">
-            <Icon v-if="showArrow" type="md-arrow-dropright" />
-            <Icon
-              v-if="showLoading"
-              type="ios-loading"
-              class="ivu-load-loop"
-            ></Icon>
-          </span>
-          <Checkbox
-            v-if="showCheckbox"
-            :value="data.checked"
-            :indeterminate="data.indeterminate"
-            :disabled="data.disabled || data.disableCheckbox"
-            @click.native.prevent="handleCheck"
-          ></Checkbox>
-          <Render
-            v-if="data.render"
-            :render="data.render"
-            :data="data"
-            :node="node"
-          ></Render>
-          <Render
-            v-else-if="isParentRender"
-            :render="parentRender"
-            :data="data"
-            :node="node"
-          ></Render>
-          <span v-else :class="titleClasses" @click="handleSelect">{{
-            data.title
-          }}</span>
-          <div :class="editClasses" v-if="editable">
-            <Button size="small" icon="md-add" @click="nodeAppend"></Button>
-            <Button size="small" icon="md-create" @click="nodeEdit"></Button>
-            <Button size="small" icon="ios-trash" @click="nodeRemove"></Button>
-          </div>
-        </div>
-        <template v-if="data.expand">
-          <Tree-node
-            v-for="(item, i) in children"
-            :key="i"
-            :data="item"
-            :multiple="multiple"
-            :show-checkbox="showCheckbox"
-            :editable="editable"
-            :children-key="childrenKey"
-          >
-          </Tree-node>
-        </template>
-      </li>
-    </ul>
-  </collapse-transition>
-</template>
-<script>
-import Render from "./render";
-import Emitter from "./emitter";
-import CollapseTransition from "./collapse-transition";
-
-const prefixCls = "ivu-tree";
-
-// Find components upward
-function findComponentUpward(context, componentName, componentNames) {
-  if (typeof componentName === "string") {
-    componentNames = [componentName];
-  } else {
-    componentNames = componentName;
-  }
-
-  let parent = context.$parent;
-  let name = parent.$options.name;
-  while (parent && (!name || componentNames.indexOf(name) < 0)) {
-    parent = parent.$parent;
-    if (parent) name = parent.$options.name;
-  }
-  return parent;
-}
-
-export default {
-  name: "TreeNode",
-  mixins: [Emitter],
-  components: { CollapseTransition, Render },
-  props: {
-    data: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    multiple: {
-      type: Boolean,
-      default: false
-    },
-    childrenKey: {
-      type: String,
-      default: "children"
-    },
-    showCheckbox: {
-      type: Boolean,
-      default: false
-    },
-    editable: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      prefixCls: prefixCls
-    };
-  },
-  computed: {
-    classes() {
-      return [`${prefixCls}-children`];
-    },
-    selectedCls() {
-      return [
-        {
-          [`${prefixCls}-node-selected`]: this.data.selected
-        }
-      ];
-    },
-    headClasses() {
-      return [
-        `${prefixCls}-li-head`,
-        {
-          [`${this.prefixCls}-li-head-edit`]: this.editable
-        }
-      ];
-    },
-    arrowClasses() {
-      return [
-        `${prefixCls}-arrow`,
-        {
-          [`${prefixCls}-arrow-disabled`]: this.data.disabled,
-          [`${prefixCls}-arrow-open`]: this.data.expand
-        }
-      ];
-    },
-    titleClasses() {
-      return [
-        `${prefixCls}-title`,
-        {
-          [`${prefixCls}-title-selected`]: this.data.selected
-        }
-      ];
-    },
-    editClasses() {
-      return [`${prefixCls}-edit-btns`];
-    },
-    showArrow() {
-      return (
-        (this.data[this.childrenKey] && this.data[this.childrenKey].length) ||
-        ("loading" in this.data && !this.data.loading)
-      );
-    },
-    showLoading() {
-      return "loading" in this.data && this.data.loading;
-    },
-    isParentRender() {
-      const Tree = findComponentUpward(this, "TreeList");
-      return Tree && Tree.render;
-    },
-    parentRender() {
-      const Tree = findComponentUpward(this, "TreeList");
-      if (Tree && Tree.render) {
-        return Tree.render;
-      } else {
-        return null;
-      }
-    },
-    node() {
-      const Tree = findComponentUpward(this, "TreeList");
-      if (Tree) {
-        // 将所有的 node(即flatState)和当前 node 都传递
-        return [
-          Tree.flatState,
-          Tree.flatState.find(item => item.nodeKey === this.data.nodeKey)
-        ];
-      } else {
-        return [];
-      }
-    },
-    children() {
-      return this.data[this.childrenKey];
-    }
-  },
-  methods: {
-    handleExpand() {
-      const item = this.data;
-      if (item.disabled) return;
-
-      // async loading
-      if (item[this.childrenKey].length === 0) {
-        const tree = findComponentUpward(this, "TreeList");
-        if (tree && tree.loadData) {
-          this.$set(this.data, "loading", true);
-          tree.loadData(item, children => {
-            this.$set(this.data, "loading", false);
-            if (children.length) {
-              this.$set(this.data, this.childrenKey, children);
-              this.$nextTick(() => this.handleExpand());
-            }
-          });
-          return;
-        }
-      }
-
-      if (item[this.childrenKey] && item[this.childrenKey].length) {
-        this.$set(this.data, "expand", !this.data.expand);
-        this.dispatch("TreeList", "toggle-expand", this.data);
-      }
-    },
-    handleSelect() {
-      if (this.data.disabled) return;
-      this.dispatch("TreeList", "on-selected", this.data.nodeKey);
-    },
-    handleCheck() {
-      if (this.data.disabled) return;
-      const changes = {
-        checked: !this.data.checked && !this.data.indeterminate,
-        nodeKey: this.data.nodeKey
-      };
-      this.dispatch("TreeList", "on-check", changes);
-    },
-    nodeAppend() {
-      this.dispatch("TreeList", "node-append", this.data.nodeKey);
-    },
-    nodeEdit() {
-      this.dispatch("TreeList", "node-edit", this.data.nodeKey);
-    },
-    nodeRemove() {
-      this.dispatch("TreeList", "node-remove", this.data.nodeKey);
-      // todo
-    }
-  }
-};
-</script>
-
-<style>
-.ivu-tree-edit-btns {
-  float: right;
-  margin-right: -100px;
-}
-.ivu-tree-edit-btns > button {
-  margin-left: 5px;
-}
-.ivu-tree-li-head {
-  height: 26px;
-  line-height: 26px;
-}
-.ivu-tree-li-head-edit:hover {
-  background: #f0faff;
-}
-.ivu-tree-li-head-edit {
-  margin-right: 100px;
-}
-</style>

+ 0 - 17
src/components/common/TreeList/render.js

@@ -1,17 +0,0 @@
-export default {
-  name: "RenderCell",
-  functional: true,
-  props: {
-    render: Function,
-    data: Object,
-    node: Array
-  },
-  render: (h, ctx) => {
-    const params = {
-      root: ctx.props.node[0],
-      node: ctx.props.node[1],
-      data: ctx.props.data
-    };
-    return ctx.props.render(h, params);
-  }
-};

+ 0 - 355
src/constants/apiTempData.js

@@ -1,355 +0,0 @@
-export const papers = [
-  {
-    id: 869,
-    sn: "111280874",
-    examNumber: "1901130044",
-    level: "B",
-    score: null,
-    redoLevel: null,
-    updatedOn: 1574665102000,
-    url:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/734/1?random=676176fc-24cd-407a-a7bc-fabc49bd2dbc",
-    thumbSrc:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/734/2?random=d8d100c5-ac64-4b5a-a2fe-bce2dd8aed0f",
-    markByLeader: false,
-    markedLogic: false,
-    areaCode: "1",
-    inspectScore: null,
-    inspectLevel: null,
-    inspector: null,
-    sheetSrc: null,
-    stage: "LEVEL",
-    test: 0,
-    paperTest: 0,
-    markResults: [],
-    arbitrated: false,
-    rejected: false,
-    manual: false,
-    sample: false,
-    tagged: true,
-    missing: false
-  },
-  {
-    id: 870,
-    sn: "111501421",
-    examNumber: "1901130045",
-    level: "A",
-    score: null,
-    redoLevel: null,
-    updatedOn: 1574665113000,
-    url:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/733/1?random=e2966291-ffba-4b19-985d-0cad9ae1b75b",
-    thumbSrc:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/733/2?random=5d16ebc7-0e52-493c-93fa-4850db5e2632",
-    markByLeader: false,
-    markedLogic: false,
-    areaCode: "1",
-    inspectScore: null,
-    inspectLevel: null,
-    inspector: null,
-    sheetSrc: null,
-    stage: "LEVEL",
-    test: 0,
-    paperTest: 0,
-    markResults: [],
-    arbitrated: false,
-    rejected: false,
-    manual: false,
-    sample: false,
-    tagged: true,
-    missing: false
-  },
-  {
-    id: 871,
-    sn: "111563006",
-    examNumber: "1901130046",
-    level: "C",
-    score: null,
-    redoLevel: null,
-    updatedOn: 1574753749000,
-    url:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/731/1?random=b305c27c-76d0-4477-a1ef-c9b8554a4671",
-    thumbSrc:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/731/2?random=dd1a4e72-9314-4429-a5e8-dacfa5275397",
-    markByLeader: false,
-    markedLogic: false,
-    areaCode: "1",
-    inspectScore: null,
-    inspectLevel: null,
-    inspector: null,
-    sheetSrc: null,
-    stage: "LEVEL",
-    test: 0,
-    paperTest: 0,
-    markResults: [],
-    arbitrated: false,
-    rejected: false,
-    manual: false,
-    sample: false,
-    tagged: true,
-    missing: false
-  },
-  {
-    id: 867,
-    sn: "111572727",
-    examNumber: "1901040084",
-    level: "B",
-    score: null,
-    redoLevel: null,
-    updatedOn: 1574665550000,
-    url:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/736/1?random=d90a96e7-1d1a-426b-8428-b5c980589fe1",
-    thumbSrc:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/736/2?random=dc754e3b-7a92-4a59-a34c-e67a09253e7b",
-    markByLeader: false,
-    markedLogic: false,
-    areaCode: "1",
-    inspectScore: null,
-    inspectLevel: null,
-    inspector: null,
-    sheetSrc: null,
-    stage: "LEVEL",
-    test: 0,
-    paperTest: 0,
-    markResults: [],
-    arbitrated: false,
-    rejected: false,
-    manual: false,
-    sample: false,
-    tagged: false,
-    missing: false
-  },
-  {
-    id: 868,
-    sn: "111086411",
-    examNumber: "1901130043",
-    level: "E",
-    score: null,
-    redoLevel: null,
-    updatedOn: 1577325078000,
-    url:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/735/1?random=e6ea4c48-e2d0-470e-a0db-5e7642cad923",
-    thumbSrc:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/735/2?random=4ddc167d-8bb3-443d-8d5d-6a725fab9950",
-    markByLeader: false,
-    markedLogic: false,
-    areaCode: "1",
-    inspectScore: null,
-    inspectLevel: null,
-    inspector: null,
-    sheetSrc: null,
-    stage: "LEVEL",
-    test: 0,
-    paperTest: 0,
-    markResults: [],
-    arbitrated: false,
-    rejected: false,
-    manual: false,
-    sample: false,
-    tagged: true,
-    missing: false
-  },
-  {
-    id: 874,
-    sn: "111191877",
-    examNumber: "1901130054",
-    level: "F",
-    score: null,
-    redoLevel: null,
-    updatedOn: 1574836896000,
-    url:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/737/1?random=68a6e70f-8983-4445-82dd-f71499ad7441",
-    thumbSrc:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/737/2?random=33db53ee-04b2-4d46-89bc-7bf276d839e2",
-    markByLeader: false,
-    markedLogic: false,
-    areaCode: "1",
-    inspectScore: null,
-    inspectLevel: null,
-    inspector: null,
-    sheetSrc: null,
-    stage: "LEVEL",
-    test: 0,
-    paperTest: 0,
-    markResults: [],
-    arbitrated: false,
-    rejected: false,
-    manual: false,
-    sample: false,
-    tagged: false,
-    missing: false
-  },
-  {
-    id: 873,
-    sn: "111965173",
-    examNumber: "1901130053",
-    level: "B",
-    score: null,
-    redoLevel: null,
-    updatedOn: 1577325083000,
-    url:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/738/1?random=9f788228-2213-4a46-9461-b222e310950b",
-    thumbSrc:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/738/2?random=7adb5c94-b42a-4a50-8920-aaa88134b3f3",
-    markByLeader: false,
-    markedLogic: false,
-    areaCode: "1",
-    inspectScore: null,
-    inspectLevel: null,
-    inspector: null,
-    sheetSrc: null,
-    stage: "LEVEL",
-    test: 0,
-    paperTest: 0,
-    markResults: [],
-    arbitrated: false,
-    rejected: false,
-    manual: false,
-    sample: false,
-    tagged: false,
-    missing: false
-  },
-  {
-    id: 872,
-    sn: "111039763",
-    examNumber: "1901130047",
-    level: "H",
-    score: null,
-    redoLevel: null,
-    updatedOn: 1573718404000,
-    url:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/732/1?random=b1cdc3f5-8cae-4e8e-ba92-e1df640ba001",
-    thumbSrc:
-      "http://127.0.0.1:9000/api/file/image/download/31/1/732/2?random=32b1cb60-a0d5-4253-9fb6-03863a88e2b2",
-    markByLeader: true,
-    markedLogic: false,
-    areaCode: "1",
-    inspectScore: null,
-    inspectLevel: null,
-    inspector: null,
-    sheetSrc: null,
-    stage: "LEVEL",
-    test: 0,
-    paperTest: 0,
-    markResults: [],
-    arbitrated: false,
-    rejected: false,
-    manual: false,
-    sample: true,
-    tagged: false,
-    missing: false
-  }
-];
-
-export const levels = [
-  {
-    name: "A",
-    range: [0, 9],
-    gcount: 100,
-    gpercent: 1,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "B",
-    range: [10, 19],
-    gcount: 100,
-    gpercent: 3,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "C",
-    range: [20, 29],
-    gcount: 100,
-    gpercent: 8,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "D",
-    range: [30, 39],
-    gcount: 100,
-    gpercent: 15,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "E",
-    range: [40, 49],
-    gcount: 100,
-    gpercent: 24,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "F",
-    range: [50, 59],
-    gcount: 100,
-    gpercent: 30,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "G",
-    range: [60, 69],
-    gcount: 100,
-    gpercent: 24,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "H",
-    range: [70, 79],
-    gcount: 100,
-    gpercent: 15,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "I",
-    range: [80, 89],
-    gcount: 100,
-    gpercent: 8,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "J",
-    range: [90, 94],
-    gcount: 100,
-    gpercent: 3,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  },
-  {
-    name: "K",
-    range: [95, 99],
-    gcount: 100,
-    gpercent: 1,
-    pt: 12,
-    count: 100,
-    percent: 8.1,
-    kdpt: 10
-  }
-];

+ 0 - 385
src/constants/chartOptions.js

@@ -1,385 +0,0 @@
-function getLineOption(datas, title) {
-  if (!datas.chartLabels.length) return;
-
-  return {
-    title: {
-      text: title,
-      left: 0
-    },
-    grid: {
-      top: "15%",
-      bottom: "18%"
-    },
-    tooltip: { show: true },
-    xAxis: {
-      type: "category",
-      data: datas.chartLabels,
-      axisLabel: {
-        fontSize: 14,
-        fontWeight: "bold"
-      },
-      axisTick: {
-        show: false
-      }
-    },
-    yAxis: {
-      type: "value",
-      splitLine: {
-        show: true,
-        lineStyle: {
-          color: "#e0e0e0"
-        }
-      },
-      axisLine: {
-        lineStyle: {
-          color: "#333"
-        }
-      },
-      axisLabel: {
-        fontSize: 14
-      },
-      axisTick: {
-        show: false
-      }
-    },
-    series: [
-      {
-        name: "数量",
-        type: "line",
-        smooth: true,
-        data: datas.chartData,
-        areaStyle: {
-          color: "#b23f3a",
-          opacity: 0.3
-        }
-      }
-    ]
-  };
-}
-
-function getPieOption(datas) {
-  if (!datas.chartLabels.length) return;
-  var seriesData = datas.chartLabels.map(function(item, index) {
-    return {
-      name: item,
-      value: datas.chartData[0][index]
-    };
-  });
-  return {
-    grid: {
-      top: "24%",
-      bottom: "10%"
-    },
-    tooltip: {
-      trigger: "item",
-      formatter: "{a} <br/>{b} : {c} ({d}%)"
-    },
-    legend: {
-      show: true,
-      itemGap: 20,
-      itemWidth: 20,
-      textStyle: {
-        fontSize: 16
-      }
-    },
-    series: [
-      {
-        name: "数量",
-        type: "pie",
-        radius: "70%",
-        data: seriesData,
-        label: {
-          show: false
-        },
-        itemStyle: {
-          emphasis: {
-            shadowBlur: 10,
-            shadowOffsetX: 0,
-            shadowColor: "rgba(0, 0, 0, 0.5)"
-          }
-        }
-      }
-    ]
-  };
-}
-
-function getBarOption(datas, title) {
-  if (!datas.names.length) return;
-  return {
-    title: {
-      text: title,
-      left: 0
-    },
-    grid: {
-      top: "15%",
-      bottom: "18%"
-    },
-    tooltip: {
-      show: true
-    },
-    xAxis: {
-      type: "category",
-      data: datas.names,
-      axisLabel: {
-        fontSize: 14,
-        fontWeight: "bold"
-      },
-      axisTick: {
-        show: false
-      }
-    },
-    yAxis: {
-      type: "value",
-      splitLine: {
-        show: true,
-        lineStyle: {
-          color: "#e0e0e0"
-        }
-      },
-      axisLine: {
-        lineStyle: {
-          color: "#333"
-        }
-      },
-      axisLabel: {
-        fontSize: 14
-      },
-      axisTick: {
-        show: false
-      }
-    },
-    series: [
-      {
-        name: "差值和",
-        type: "bar",
-        barWidth: 30,
-        data: datas.dataList,
-        label: {
-          show: true,
-          position: "top",
-          color: "#333",
-          fontWeight: 600
-        }
-      }
-    ]
-  };
-}
-
-function getBarGroupOption(datas, title) {
-  if (!datas.names.length) return;
-  var onePageMaxBarNum = 20;
-  var barNum = datas.names.length * datas.dataList.length;
-  var xAxis = datas.dataList.map(function(item) {
-    return item.name;
-  });
-  var series = datas.names.map(function(name, index) {
-    var data = datas.dataList.map(function(item) {
-      return item.data[index];
-    });
-    return {
-      name: name,
-      type: "bar",
-      data: data,
-      barMaxWidth: 30,
-      barMinHeight: 2
-      // label: {
-      //   show: true,
-      //   position: "top",
-      //   fontSize: 12,
-      //   color: "#333",
-      //   formatter: function(params) {
-      //     return params.value.toFixed(2) + "%";
-      //   }
-      // }
-    };
-  });
-
-  var options = {
-    title: {
-      text: title,
-      left: 0
-    },
-    grid: {
-      top: "15%",
-      bottom: "10%"
-    },
-    tooltip: {
-      show: true,
-      trigger: "axis",
-      axisPointer: {
-        type: "shadow"
-      },
-      formatter: function(params) {
-        var label = params[0].axisValueLabel;
-        var infos = params.map(function(item) {
-          return item.seriesName + ":" + item.value.toFixed(2) + "%";
-        });
-        infos.unshift(label);
-        return infos.join("<br/>");
-      }
-    },
-    legend: {
-      data: datas.names,
-      right: 0,
-      itemWidth: 14,
-      textStyle: {
-        fontSize: 16
-      }
-    },
-    xAxis: {
-      type: "category",
-      data: xAxis,
-      axisLabel: {
-        fontSize: 14,
-        fontWeight: "bold"
-      },
-      axisTick: {
-        show: false
-      }
-    },
-    yAxis: {
-      type: "value",
-      splitLine: {
-        show: false
-      },
-      axisLabel: {
-        fontSize: 14,
-        formatter: function(value, index) {
-          return value + "%";
-        }
-      },
-      axisTick: {
-        show: false
-      }
-    },
-    series: series
-  };
-
-  if (barNum > onePageMaxBarNum) {
-    var zoomInitRange = Math.floor((onePageMaxBarNum * 100) / barNum);
-    options.grid.bottom = "16%";
-    options.dataZoom = [
-      {
-        type: "inside",
-        start: 0,
-        end: zoomInitRange
-      },
-      {
-        type: "slider",
-        start: 0,
-        end: zoomInitRange
-      }
-    ];
-  }
-
-  return options;
-}
-
-function getLineGroupOption(datas, title) {
-  if (!datas.length) return;
-  var names = datas.map(function(item) {
-    return item.name;
-  });
-  var xaxis = datas[0].dataList.map(function(item, index) {
-    return index;
-  });
-
-  var series = datas.map(function(item) {
-    return {
-      name: item.name,
-      type: "line",
-      symbol: "circle",
-      smooth: true,
-      itemStyle: {
-        emphasis: {
-          color: "#333"
-        }
-      },
-      data: item.dataList.map(function(num) {
-        return num * num;
-      })
-    };
-  });
-  return {
-    title: {
-      text: title,
-      left: 0
-    },
-    grid: {
-      top: "15%",
-      bottom: "12%"
-    },
-    tooltip: {
-      show: true,
-      trigger: "axis",
-      axisPointer: {
-        type: "shadow"
-      },
-      formatter: function(params) {
-        var label = params[0].axisValueLabel;
-        var infos = params.map(function(item) {
-          return item.seriesName + ":" + Math.sqrt(item.value);
-        });
-        infos.unshift(label);
-        return infos.join("<br/>");
-      }
-    },
-    legend: {
-      data: names,
-      right: 0,
-      itemWidth: 14,
-      textStyle: {
-        fontSize: 16
-      }
-    },
-    xAxis: {
-      type: "category",
-      data: xaxis,
-      axisLabel: {
-        show: false,
-        fontSize: 14
-      },
-      axisTick: {
-        show: false
-      }
-    },
-    yAxis: {
-      type: "value",
-      interval: 1,
-      splitLine: {
-        show: false
-      },
-      axisLabel: {
-        fontSize: 14,
-        formatter: function(value) {
-          var num = Math.sqrt(value);
-          return num % 1 ? "" : parseInt(num);
-        }
-      },
-      axisTick: {
-        show: false
-      }
-    },
-    dataZoom: [
-      {
-        type: "inside",
-        start: 0,
-        end: 30
-      },
-      {
-        type: "slider",
-        start: 0,
-        end: 30
-      }
-    ],
-    series: series
-  };
-}
-
-export default {
-  getLineOption,
-  getPieOption,
-  getBarOption,
-  getBarGroupOption,
-  getLineGroupOption
-};

+ 1 - 0
vue.config.js

@@ -11,6 +11,7 @@ var proxy = process.env.NODE_ENV === "production" ? {} : devProxy;
 // 配置手册: https://cli.vuejs.org/zh/config/#vue-config-js
 // 配置手册: https://cli.vuejs.org/zh/config/#vue-config-js
 var config = {
 var config = {
   // publicPath: './',
   // publicPath: './',
+  productionSourceMap: false,
   devServer: {
   devServer: {
     port: 8076
     port: 8076
   },
   },