liuyg
2022-02-16 3806719a6663dfbafd8424380e7b7c33684606bd
+对表格默认按钮的恢复,只取消保安员管理的默认按钮
8 files modified
241 ■■■■ changed files
src/store/modules/control.js 8 ●●●● patch | view | raw | blame | history
src/views/dispatch/dispatch.vue 2 ●●● patch | view | raw | blame | history
src/views/dispatch/dispatchChildoperableSee.vue 1 ●●●● patch | view | raw | blame | history
src/views/people/expression.vue 2 ●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 4 ●●●● patch | view | raw | blame | history
src/views/talk/talk.vue 2 ●●● patch | view | raw | blame | history
src/views/trainExam/examStatistics.vue 135 ●●●● patch | view | raw | blame | history
vue.config.js 87 ●●●● patch | view | raw | blame | history
src/store/modules/control.js
@@ -16,10 +16,10 @@
      columnBtn: false,
      searchShowBtn: false,
      filterBtn: false,
      addBtn: false,
      editBtn: false,
      viewBtn: false,
      delBtn: false,
      // addBtn: false,
      // editBtn: false,
      // viewBtn: false,
      // delBtn: false,
      searchIndex: 6, //收缩展示数量
      searchIcon: true, //搜索是否收缩
      height: window.screen.height //初始高度
src/views/dispatch/dispatch.vue
@@ -212,7 +212,7 @@
        menuWidth: 160,
        align: "center",
        selection: true,
        menu: false,
        // menu: false,
        ...this.$store.state.control.clearOtherBut,
        column: [
          {
src/views/dispatch/dispatchChildoperableSee.vue
@@ -70,7 +70,6 @@
        editBtnText: "变更派遣",
        // addBtn: false,
        // menuWidth: 160,
        menu: false,
        align: "center",
        selection: true,
        ...this.$store.state.control.clearOtherBut,
src/views/people/expression.vue
@@ -55,7 +55,7 @@
      data1: [],
      option1: {
        card: true,
        menu: false,
        // menu: false,
        addBtn: false,
        height: "auto",
        widtd: "auto",
src/views/securityGuard/securityGuard.vue
@@ -910,6 +910,10 @@
        dialogClickModal: false,
        column: securityFormPageColumn,
        ...this.$store.state.control.clearOtherBut,
        addBtn: false,
        editBtn: false,
        viewBtn: false,
        delBtn: false,
        group: [
          {
            label: "基础信息",
src/views/talk/talk.vue
@@ -87,7 +87,7 @@
        index: true,
        viewBtn: true,
        selection: true,
        menu: false,
        // menu: false,
        dialogClickModal: false,
        ...this.$store.state.control.clearOtherBut,
        column: [
src/views/trainExam/examStatistics.vue
@@ -1,8 +1,4 @@
/*
 * @Author: zhongrj
 * @Date: 2022-01-18
 * menu-name 考试统计查询
 */
/* * @Author: zhongrj * @Date: 2022-01-18 * menu-name 考试统计查询 */
<template>
  <el-row class="morpheus-box-paper">
    <el-col :span="24">
@@ -10,7 +6,7 @@
        <div
          :class="[
            'exam-card-body',
            $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
            $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : ''
          ]"
        >
          <avue-crud
@@ -80,7 +76,14 @@
      size="60%"
    >
      <div style="position: absolute;top: 3.5rem;left: 1rem;">
          <el-button type="warning" icon="el-icon-download" plain size="mini" @click="exportExamInfo">导出</el-button>
        <el-button
          type="warning"
          icon="el-icon-download"
          plain
          size="mini"
          @click="exportExamInfo"
          >导出</el-button
        >
      </div>
      <div style="height: 40%">
        <!-- <avue-crud
@@ -143,11 +146,7 @@
            </el-table-column>
            <el-table-column prop="ycnum" label="审查异常人数" align="center">
            </el-table-column>
            <el-table-column
              prop="qknum"
              label="缺考人数"
              align="center"
            >
            <el-table-column prop="qknum" label="缺考人数" align="center">
            </el-table-column>
            <el-table-column
              prop="absentProportion"
@@ -206,7 +205,11 @@
            </el-table-column>
            <el-table-column prop="allGrade" label="平均分" align="center">
            </el-table-column>
            <el-table-column prop="qualified" label="考试成绩状态" align="center">
            <el-table-column
              prop="qualified"
              label="考试成绩状态"
              align="center"
            >
              <template slot-scope="scope">
                {{
                  scope.row.qualified == 0
@@ -243,7 +246,7 @@
<script>
import {
  getExamStatistics,
  getExamInfoByExamId,
  getExamInfoByExamId
} from "@/api/examapi/examination";
import { mapGetters } from "vuex";
import Qs from "qs";
@@ -252,7 +255,7 @@
import Legend from "@/components/liu-legend/Legend";
export default {
  components: {
    Legend,
    Legend
  },
  data() {
    return {
@@ -294,7 +297,7 @@
            search: true,
            searchSpan: 5,
            searchLabelWidth: 110,
            overHidden: true,
            overHidden: true
            // width:180,
          },
          {
@@ -310,49 +313,49 @@
              {
                required: true,
                message: "请选择考试时间",
                trigger: "blur",
              },
            ],
                trigger: "blur"
              }
            ]
          },
          {
            label: "考试时间",
            prop: "startTime",
            type: "datetime",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd"
          },
          {
            label: "报名人数",
            prop: "znum",
            prop: "znum"
          },
          {
            label: "机考人数",
            prop: "yknum",
            prop: "yknum"
          },
          {
            label: "纸质考试人数",
            prop: "zznum",
            prop: "zznum"
          },
          {
            label: "缺考人数",
            prop: "qknum",
            prop: "qknum"
          },
          {
            label: "审查异常人数",
            prop: "ycnum",
            prop: "ycnum"
          },
          {
            label: "已取消考试人数",
            prop: "qxnum",
          },
        ],
            prop: "qxnum"
          }
        ]
      },
      option: {
        // 操作栏多余按钮去除
        delBtn: false,
        editBtn: false,
        addBtn: false,
        menu: false,
        menu: true,
        //合计
        showSummary: true,
        viewBtn: false,
@@ -372,67 +375,67 @@
            // search:true,
            // searchSpan:5,
            searchLabelWidth: 110,
            overHidden: true,
            overHidden: true
          },
          {
            label: "报名人数",
            prop: "znum",
            prop: "znum"
          },
          {
            label: "审查异常人数",
            prop: "ycnum",
            prop: "ycnum"
          },
          {
            label: "缺考/纸质考试人数",
            prop: "qknum",
            prop: "qknum"
          },
          {
            label: "缺考/纸质占比(%)",
            prop: "absentProportion",
            prop: "absentProportion"
          },
          {
            label: "及格人数",
            prop: "yknum",
            prop: "yknum"
          },
          {
            label: "及格人数占比(%)",
            prop: "qualifiedProportion",
          },
            prop: "qualifiedProportion"
          }
        ],
        sumColumnList: [
          {
            label: "合计:",
            name: "deptName",
            name: "deptName"
          },
          {
            name: "znum",
            type: "sum",
            type: "sum"
          },
          {
            name: "ycnum",
            type: "sum",
            type: "sum"
          },
          {
            name: "qknum",
            type: "sum",
            type: "sum"
          },
          {
            name: "absentProportion",
            type: "avg",
            type: "avg"
          },
          {
            name: "yknum",
            type: "sum",
            type: "sum"
          },
          {
            name: "qualifiedProportion",
            type: "avg",
            type: "avg"
          },
          {
            name: "znum",
            type: "sum",
          },
        ],
            type: "sum"
          }
        ]
      },
      questionBankSearch: {},
      search: {},
@@ -445,24 +448,24 @@
        pageSize: 10,
        currentPage: 1,
        total: 16,
        ...this.$store.state.control.changePageSize,
        ...this.$store.state.control.changePageSize
      },
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
        total: 0
      },
      questionBankQuery: {},
      query: {},
      questionBankSelectionList: [],
      selectionList: [],
      selectionList: []
    };
  },
  mounted() {},
  computed: {
    ids() {
      let ids = [];
      this.questionBankSelectionList.forEach((ele) => {
      this.questionBankSelectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
@@ -473,27 +476,27 @@
        addBtn: this.vaildData(null, false),
        viewBtn: this.vaildData(null, false),
        delBtn: this.vaildData(null, false),
        editBtn: this.vaildData(null, false),
        editBtn: this.vaildData(null, false)
      };
    },
    }
  },
  watch: {},
  methods: {
    //导出考试统计数据
    exportExamInfo(){
    exportExamInfo() {
      this.$confirm("是否导出考试统计情况数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        type: "warning"
      }).then(() => {
        //获取查询条件
        var data = {
          companyName: this.companyName,
          examDate: this.startTime,
          trainUnitId: this.trainUnitId,
          examType: 2,
          examType: 2
        };
        console.log(data,11225111);
        console.log(data, 11225111);
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(
@@ -517,15 +520,15 @@
          return;
        }
        if (index === 5) {
          sums[index] = (sums[4]/sums[2]*100).toFixed(2);
          sums[index] = ((sums[4] / sums[2]) * 100).toFixed(2);
          return;
        }
        if (index === 7) {
          sums[index] = (sums[6]/sums[2]*100).toFixed(2);
          sums[index] = ((sums[6] / sums[2]) * 100).toFixed(2);
          return;
        }
        const values = data.map((item) => Number(item[column.property]));
        if (!values.every((value) => isNaN(value))) {
        const values = data.map(item => Number(item[column.property]));
        if (!values.every(value => isNaN(value))) {
          sums[index] = values.reduce((prev, curr) => {
            const value = Number(curr);
            if (!isNaN(value)) {
@@ -551,7 +554,7 @@
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.questionBankQuery)
      ).then((res) => {
      ).then(res => {
        const data = res.data.data;
        this.questionBankPage.total = data.total;
        this.questionBankData = data.records;
@@ -563,7 +566,7 @@
      params["startTime"] = this.startTime;
      params["trainUnitId"] = this.trainUnitId;
      getExamInfoByExamId(1, 20, Object.assign(params, this.query)).then(
        (res) => {
        res => {
          const data = res.data.data;
          this.data = data.records;
        }
@@ -577,7 +580,7 @@
      params["trainUnitId"] = this.trainUnitId;
      params["examType"] = 2;
      getList(page.currentPage, page.pageSize, Object.assign(params)).then(
        (res) => {
        res => {
          const data = res.data.data;
          that.page.total = data.total;
          that.dataDetail = data.records;
@@ -640,8 +643,8 @@
      this.title = row.schoolName + row.startTime + "考试情况";
      this.onLoad(this.page);
      this.onLoadDetail(this.page);
    },
  },
    }
  }
};
</script>
vue.config.js
@@ -1,44 +1,47 @@
module.exports = {
    //路径前缀
    publicPath: "/",
    lintOnSave: true,
    productionSourceMap: false,
    chainWebpack: (config) => {
        //忽略的打包文件
        config.externals({
            'vue': 'Vue',
            'vue-router': 'VueRouter',
            'vuex': 'Vuex',
            'axios': 'axios',
            'element-ui': 'ELEMENT',
        });
        const entry = config.entry('app');
        entry.add('babel-polyfill').end();
        entry.add('classlist-polyfill').end();
        entry.add('@/mock').end();
    },
    css: {
        extract: { ignoreOrder: true }
    },
    //开发模式反向代理配置,生产模式请使用Nginx部署并配置反向代理。
    devServer: {
        port: 1888,
        // disableHostCheck: true,
        proxy: {
            '/api': {
                // 本地服务接口地址
                target: 'http://localhost:81',
                // target: 'http://192.168.0.114:81',//钟日健W
                // target: 'http://localhost:81', //原W
                // target: 'http://192.168.0.108:81',//原W
                // target: 'http://192.168.0.107:81',//唐N
                // target: 'http://223.82.109.183:81',//唐N
                //远程演示服务地址,可用于直接启动项目
                ws: true,
                pathRewrite: {
                    '^/api': '/'
                }
            }
        }
  //路径前缀
  publicPath: "/",
  lintOnSave: true,
  productionSourceMap: false,
  chainWebpack: config => {
    //忽略的打包文件
    config.externals({
      vue: "Vue",
      "vue-router": "VueRouter",
      vuex: "Vuex",
      axios: "axios",
      "element-ui": "ELEMENT"
    });
    const entry = config.entry("app");
    entry.add("babel-polyfill").end();
    entry.add("classlist-polyfill").end();
    entry.add("@/mock").end();
  },
  css: {
    extract: {
      ignoreOrder: true
    }
};
  },
  //开发模式反向代理配置,生产模式请使用Nginx部署并配置反向代理。
  devServer: {
    port: 1888,
    // disableHostCheck: true,
    proxy: {
      "/api": {
        // 本地服务接口地址
        target: 'http://localhost:81',
        // target: 'http://192.168.0.114:81',//钟日健W
        // target: 'http://localhost:81', //原W
        // target: 'http://192.168.0.108:81',//原W
        // target: 'http://192.168.0.107:81',//唐N
        // target: 'http://223.82.109.183:81',//唐N
        // target: "http://223.82.109.183:2080/api",
        //远程演示服务地址,可用于直接启动项目
        ws: true,
        pathRewrite: {
          "^/api": "/"
        }
      }
    }
  }
};