xiaoxin преди 1 година
родител
ревизия
ac01db3940
променени са 3 файла, в които са добавени 333 реда и са изтрити 117 реда
  1. 36 0
      src/components/Form/index.vue
  2. 271 109
      src/components/Home/index.vue
  3. 26 8
      vue.config.js

+ 36 - 0
src/components/Form/index.vue

@@ -56,6 +56,22 @@
         show-overflow-tooltip
         show-overflow-tooltip
       >
       >
       </el-table-column>
       </el-table-column>
+
+      <el-table-column
+        prop="daysOfcardManHourInHuangjiahu"
+        label="黄家湖下午累计工时异常天数"
+        width="220"
+        align="center"
+      >
+      </el-table-column>
+      <el-table-column
+        prop="recondOfcardManHourInHuangjiahu"
+        label="黄家湖下午累计工时异常记录"
+        width="220"
+        align="center"
+      >
+      </el-table-column>
+
       <el-table-column
       <el-table-column
         prop="sumAttendanceInHuangjiahu"
         prop="sumAttendanceInHuangjiahu"
         label="黄家湖总出勤天数"
         label="黄家湖总出勤天数"
@@ -78,6 +94,7 @@
         show-overflow-tooltip
         show-overflow-tooltip
       >
       >
       </el-table-column>
       </el-table-column>
+
       <el-table-column
       <el-table-column
         prop="recondOfcardShortageInMoxuanhu"
         prop="recondOfcardShortageInMoxuanhu"
         label="墨轩湖缺卡记录"
         label="墨轩湖缺卡记录"
@@ -86,6 +103,25 @@
         show-overflow-tooltip
         show-overflow-tooltip
       >
       >
       </el-table-column>
       </el-table-column>
+
+      <el-table-column
+        prop="daysOfcardManHourInMoxuanhu"
+        label="墨轩湖下午累计工时异常天数"
+        width="220"
+        align="center"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+
+      <el-table-column
+        prop="recondOfcardManHourInMoxuanhu"
+        label="墨轩湖下午累计工时异常记录"
+        width="220"
+        align="center"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+
       <el-table-column
       <el-table-column
         prop="sumAttendanceInMoxuanhu"
         prop="sumAttendanceInMoxuanhu"
         label="墨轩湖总出勤天数"
         label="墨轩湖总出勤天数"

+ 271 - 109
src/components/Home/index.vue

@@ -94,7 +94,7 @@
       </div>
       </div>
 
 
       <!-- 弹窗区域 -->
       <!-- 弹窗区域 -->
-      <el-drawer :visible.sync="drawer" :with-header="false" size="20%">
+      <el-drawer :visible.sync="drawer" :with-header="false" size="25%">
         <div class="drawer_title">设置</div>
         <div class="drawer_title">设置</div>
 
 
         <div class="drawer_body">
         <div class="drawer_body">
@@ -112,58 +112,59 @@
               <div>设置规则</div>
               <div>设置规则</div>
               <el-button type="primary" @click="handleAdd">添加</el-button>
               <el-button type="primary" @click="handleAdd">添加</el-button>
             </div>
             </div>
-            <div class="h_time">
-              <el-card
-                class="card"
-                shadow="hover"
-                v-for="item in timeList"
-                :key="item.id"
-              >
-                <div class="card_title">
-                  <span v-if="item.isShow">{{ item.clockName }}</span>
-                  <input
-                    v-focus
-                    v-else
-                    v-model="item.clockName"
-                    @blur="handleTitleSave(item)"
-                  />
-                  <div class="icon" @click="handleTitleEdit(item)"></div>
-                </div>
-                <div class="card_count">
-                  <span>设置次数</span>
-                  <el-input-number
-                    size="mini"
-                    v-model="item.count"
-                    :min="1"
-                  ></el-input-number>
-                </div>
-                <div class="card_time">
-                  <el-time-select
-                    placeholder="起始时间"
-                    size="mini"
-                    v-model="item.startTime"
-                    :picker-options="{
-                      start: '00:00',
-                      step: '00:05',
-                      end: '24:00',
-                    }"
-                  >
-                  </el-time-select>
-                  <el-time-select
-                    placeholder="结束时间"
-                    size="mini"
-                    v-model="item.endTime"
-                    :picker-options="{
-                      start: '00:00',
-                      step: '00:05',
-                      end: '24:00',
-                    }"
-                  >
-                  </el-time-select>
-                </div>
-                <div class="card_close" @click="handleCloseCard(item)"></div>
-              </el-card>
-            </div>
+
+            <el-card
+              class="card"
+              shadow="hover"
+              v-for="item in timeList"
+              :key="item.id"
+            >
+              <div class="card_title">
+                <span v-if="item.isShow">{{ item.clockName }}</span>
+                <input
+                  v-focus
+                  v-else
+                  v-model="item.clockName"
+                  @blur="handleTitleSave(item)"
+                />
+                <div class="icon" @click="handleTitleEdit(item)"></div>
+              </div>
+              <div class="card_count">
+                <span>设置次数</span>
+                <el-input-number
+                  size="mini"
+                  v-model="item.count"
+                  :min="1"
+                ></el-input-number>
+              </div>
+              <div class="card_time">
+                <el-time-select
+                  placeholder="起始时间"
+                  size="mini"
+                  v-model="item.startTime"
+                  :picker-options="{
+                    start: '00:00',
+                    step: '00:05',
+                    end: '24:00',
+                  }"
+                >
+                </el-time-select>
+                &nbsp;-&nbsp;
+                <el-time-select
+                  placeholder="结束时间"
+                  size="mini"
+                  v-model="item.endTime"
+                  :picker-options="{
+                    start: '00:00',
+                    step: '00:05',
+                    end: '24:00',
+                  }"
+                >
+                </el-time-select>
+              </div>
+              <div class="card_close" @click="handleCloseCard(item, 1)"></div>
+            </el-card>
+
             <div class="h_foot">
             <div class="h_foot">
               <div>迟到规则</div>
               <div>迟到规则</div>
               <div>
               <div>
@@ -178,6 +179,48 @@
                 />分钟,早走{{ ruleObj.leaveEarlyOfWork }}分钟以上算早退
                 />分钟,早走{{ ruleObj.leaveEarlyOfWork }}分钟以上算早退
               </div>
               </div>
             </div>
             </div>
+
+            <div class="h_title">
+              <div>异常设置</div>
+              <el-button type="primary" @click="handleAdd2">添加</el-button>
+            </div>
+
+            <el-card
+              class="card2"
+              shadow="hover"
+              v-for="item in anomalyList"
+              :key="item.id"
+            >
+              <div class="card_time">
+                <el-time-select
+                  placeholder="起始时间"
+                  size="mini"
+                  v-model="item.startTime"
+                  :picker-options="{
+                    start: '00:00',
+                    step: '00:05',
+                    end: '24:00',
+                  }"
+                >
+                </el-time-select>
+                &nbsp;-&nbsp;
+                <el-time-select
+                  placeholder="结束时间"
+                  size="mini"
+                  v-model="item.endTime"
+                  :picker-options="{
+                    start: '00:00',
+                    step: '00:05',
+                    end: '24:00',
+                  }"
+                >
+                </el-time-select>
+              </div>
+              <div class="card_anomaly">
+                打卡时间不足<input v-model="item.duration" />分钟为异常
+              </div>
+              <div class="card_close" @click="handleCloseCard(item, 2)"></div>
+            </el-card>
           </div>
           </div>
         </div>
         </div>
 
 
@@ -240,6 +283,21 @@
           show-overflow-tooltip
           show-overflow-tooltip
         >
         >
         </el-table-column>
         </el-table-column>
+
+        <el-table-column
+          prop="daysOfcardManHourInHuangjiahu"
+          label="黄家湖下午累计工时异常天数"
+          width="220"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="recondOfcardManHourInHuangjiahu"
+          label="黄家湖下午累计工时异常记录"
+          width="220"
+          align="center"
+        >
+        </el-table-column>
         <el-table-column
         <el-table-column
           prop="sumAttendanceInHuangjiahu"
           prop="sumAttendanceInHuangjiahu"
           label="黄家湖总出勤天数"
           label="黄家湖总出勤天数"
@@ -267,6 +325,23 @@
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
+          prop="daysOfcardManHourInMoxuanhu"
+          label="墨轩湖下午累计工时异常天数"
+          width="220"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+
+        <el-table-column
+          prop="recondOfcardManHourInMoxuanhu"
+          label="墨轩湖下午累计工时异常记录"
+          width="220"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
           prop="sumAttendanceInMoxuanhu"
           prop="sumAttendanceInMoxuanhu"
           label="墨轩湖总出勤天数"
           label="墨轩湖总出勤天数"
           width="140"
           width="140"
@@ -485,6 +560,15 @@ export default {
       excelList: [],
       excelList: [],
       // 变化标题数据
       // 变化标题数据
       TemHeader: [],
       TemHeader: [],
+      anomalyList: [],
+      // 异常设置添加的打卡对象
+      temObj2: {
+        startTime: "00:00",
+        endTime: "00:00",
+        duration: 0,
+        isShow: true,
+        campus: "黄家湖",
+      },
     };
     };
   },
   },
   mounted() {},
   mounted() {},
@@ -494,6 +578,7 @@ export default {
       let data = {
       let data = {
         campusTimeList: this.timeList,
         campusTimeList: this.timeList,
         lateClock: this.ruleObj,
         lateClock: this.ruleObj,
+        campusMixTimeList: this.anomalyList,
       };
       };
       // console.log(data);
       // console.log(data);
       let res = await this.$axios({
       let res = await this.$axios({
@@ -506,20 +591,28 @@ export default {
         this.$message.success("修改成功");
         this.$message.success("修改成功");
         this.getTimeData();
         this.getTimeData();
         this.getRule();
         this.getRule();
+        this.getRule2();
       } else {
       } else {
         this.$message.error(res.data.message);
         this.$message.error(res.data.message);
       }
       }
     },
     },
     // 删除卡片回调
     // 删除卡片回调
-    handleCloseCard(item) {
+    handleCloseCard(item, type) {
       this.$confirm("确定删除吗?", "提示", {
       this.$confirm("确定删除吗?", "提示", {
         type: "warning",
         type: "warning",
       })
       })
         .then(() => {
         .then(() => {
-          let index = this.timeList.findIndex(
-            (element) => element.id == item.id
-          );
-          this.timeList.splice(index, 1);
+          if (type == 1) {
+            let index = this.timeList.findIndex(
+              (element) => element.id == item.id
+            );
+            this.timeList.splice(index, 1);
+          } else if (type == 2) {
+            let index = this.anomalyList.findIndex(
+              (element) => element.id == item.id
+            );
+            this.anomalyList.splice(index, 1);
+          }
         })
         })
         .catch(() => {
         .catch(() => {
           this.$message.info("已取消删除");
           this.$message.info("已取消删除");
@@ -538,10 +631,16 @@ export default {
       this.temObj.campus = this.activeName;
       this.temObj.campus = this.activeName;
       this.timeList.push(this.temObj);
       this.timeList.push(this.temObj);
     },
     },
+    // 添加卡片回调
+    handleAdd2() {
+      this.temObj2.campus = this.activeName;
+      this.anomalyList.push(this.temObj2);
+    },
     // 切换校区回调
     // 切换校区回调
     handleClick() {
     handleClick() {
       this.getTimeData();
       this.getTimeData();
       this.getRule();
       this.getRule();
+      this.getRule2();
     },
     },
     // 获取打卡时间设置数据
     // 获取打卡时间设置数据
     async getTimeData() {
     async getTimeData() {
@@ -577,6 +676,22 @@ export default {
         this.$message.error(res.data.message);
         this.$message.error(res.data.message);
       }
       }
     },
     },
+    // 获取异常打卡规则数据
+    async getRule2() {
+      let params = {
+        campus: this.activeName,
+      };
+      let res = await this.$axios({
+        url: "/analysis/attendance/campus/queryCampusMixTime",
+        params,
+      });
+      // console.log(res.data);
+      if (res.data.code == 1) {
+        this.anomalyList = res.data.data;
+      } else {
+        this.$message.error(res.data.message);
+      }
+    },
     // 文件上传回调
     // 文件上传回调
     async handleUpload(file) {
     async handleUpload(file) {
       this.info = "上传中,请稍等";
       this.info = "上传中,请稍等";
@@ -652,7 +767,7 @@ export default {
           timeout: 10 * 60 * 1000,
           timeout: 10 * 60 * 1000,
         });
         });
         // console.log(res);
         // console.log(res);
-        if (res.data.success) {
+        if (res.data.code == 1) {
           this.excelList = res.data.data;
           this.excelList = res.data.data;
           this.parsePercentage = 100;
           this.parsePercentage = 100;
           clearInterval(this.timer);
           clearInterval(this.timer);
@@ -842,6 +957,7 @@ export default {
     handleSet() {
     handleSet() {
       this.getTimeData();
       this.getTimeData();
       this.getRule();
       this.getRule();
+      this.getRule2();
       this.drawer = true;
       this.drawer = true;
     },
     },
 
 
@@ -985,10 +1101,10 @@ export default {
           wch: 20, //H
           wch: 20, //H
         },
         },
         {
         {
-          wch: 8.11, //I
+          wch: 25, //I
         },
         },
         {
         {
-          wch: 8.11, //J
+          wch: 25, //J
         },
         },
         {
         {
           wch: 8.11, //K
           wch: 8.11, //K
@@ -1003,10 +1119,10 @@ export default {
           wch: 8.11, //N
           wch: 8.11, //N
         },
         },
         {
         {
-          wch: 23, //O
+          wch: 25, //O
         },
         },
         {
         {
-          wch: 8.11, //P
+          wch: 25, //P
         },
         },
         {
         {
           wch: 8.11, //Q
           wch: 8.11, //Q
@@ -1241,78 +1357,88 @@ export default {
       }
       }
     }
     }
     .drawer_title {
     .drawer_title {
-      flex: 1;
+      // flex: 1;
+      height: 60px;
       margin-left: 10px;
       margin-left: 10px;
       font-size: 20px;
       font-size: 20px;
       font-weight: bold;
       font-weight: bold;
       line-height: 200%;
       line-height: 200%;
     }
     }
     .drawer_body {
     .drawer_body {
-      flex: 15;
+      flex: 1;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+
       .huang {
       .huang {
-        display: flex;
-        flex-direction: column;
-        height: 720px;
+        flex: 1;
+        // display: flex;
+        // flex-wrap: wrap;
+        // flex-direction: column;
+        // height: 720px;
+        overflow-y: auto;
 
 
         .h_title {
         .h_title {
           display: flex;
           display: flex;
           align-items: center;
           align-items: center;
-          flex: 1;
+          height: 40px;
+
           div {
           div {
             font-size: 18px;
             font-size: 18px;
             margin: 0 20px;
             margin: 0 20px;
           }
           }
         }
         }
-        .h_time {
-          flex: 10;
-          overflow: auto;
 
 
-          .card {
-            position: relative;
-            margin: 10px 20px;
-            .card_title {
-              display: flex;
-              justify-content: center;
-              align-items: center;
-              margin: 5px 0;
-              font-weight: bold;
-              font-size: 17px;
-              .icon {
-                margin-left: 10px;
-                width: 20px;
-                height: 20px;
-                background: url(../../assets/edit.png) no-repeat center;
-                background-size: 80% 80%;
-                cursor: pointer;
-              }
-            }
-            .card_count {
-              margin: 20px 0;
-              display: flex;
-              justify-content: space-around;
-              align-items: center;
-            }
-            .card_time {
-              display: flex;
-              justify-content: center;
-              margin: 20px 0;
-            }
-            .card_close {
-              position: absolute;
-              top: 0;
-              right: 0;
+        .card {
+          position: relative;
+          margin: 10px 20px;
+          height: 150px;
+
+          .card_title {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin: 5px 0;
+            font-weight: bold;
+            font-size: 17px;
+            .icon {
+              margin-left: 10px;
               width: 20px;
               width: 20px;
               height: 20px;
               height: 20px;
-              background: url(../../assets/close.png) no-repeat center;
-              background-size: 50% 50%;
+              background: url(../../assets/edit.png) no-repeat center;
+              background-size: 80% 80%;
               cursor: pointer;
               cursor: pointer;
             }
             }
           }
           }
+          .card_count {
+            margin: 20px 0;
+            display: flex;
+            justify-content: space-around;
+            align-items: center;
+          }
+          .card_time {
+            display: flex;
+            justify-content: center;
+            margin: 20px 0;
+          }
+          .card_close {
+            position: absolute;
+            top: 0;
+            right: 0;
+            width: 20px;
+            height: 20px;
+            background: url(../../assets/close.png) no-repeat center;
+            background-size: 50% 50%;
+            cursor: pointer;
+          }
         }
         }
+
         .h_foot {
         .h_foot {
           display: flex;
           display: flex;
           flex-direction: column;
           flex-direction: column;
           flex: 3;
           flex: 3;
+          margin-bottom: 15px;
+
           div {
           div {
             flex: 1;
             flex: 1;
             margin: 10px;
             margin: 10px;
@@ -1324,10 +1450,46 @@ export default {
             }
             }
           }
           }
         }
         }
+
+        .card2 {
+          position: relative;
+          margin: 20px 20px;
+          height: 120px;
+
+          .card_time {
+            display: flex;
+            justify-content: center;
+            margin: 20px 0;
+          }
+
+          .card_anomaly {
+            display: flex;
+            justify-content: center;
+            margin: 20px 0;
+
+            input {
+              margin: 0 5px;
+              width: 30px;
+              height: 20px;
+              text-align: center;
+            }
+          }
+          .card_close {
+            position: absolute;
+            top: 0;
+            right: 0;
+            width: 20px;
+            height: 20px;
+            background: url(../../assets/close.png) no-repeat center;
+            background-size: 50% 50%;
+            cursor: pointer;
+          }
+        }
       }
       }
     }
     }
     .drawer_foot {
     .drawer_foot {
-      flex: 2;
+      // flex: 2;
+      height: 120px;
       text-align: center;
       text-align: center;
       border-top: 1px solid #000;
       border-top: 1px solid #000;
       .foot_button {
       .foot_button {

+ 26 - 8
vue.config.js

@@ -1,19 +1,37 @@
-const { defineConfig } = require('@vue/cli-service')
+const { defineConfig } = require("@vue/cli-service");
+
+const timeStamp = new Date().getTime();
+
 module.exports = defineConfig({
 module.exports = defineConfig({
   transpileDependencies: true,
   transpileDependencies: true,
   lintOnSave: false,
   lintOnSave: false,
-  assetsDir: 'static',
-  publicPath: '/analysis/attendanceH5/',
+  assetsDir: "static",
+  publicPath: "/analysis/attendanceH5/",
   devServer: {
   devServer: {
     // 跨域配置
     // 跨域配置
     proxy: {
     proxy: {
-      '/analysis': {
+      "/analysis": {
         // 线上地址
         // 线上地址
-        target: 'https://chtech.ncjti.edu.cn',
+        // target: 'https://chtech.ncjti.edu.cn',
         // 本地开发地址
         // 本地开发地址
-        // target: 'http://192.168.161.34:8087',
+        target: "http://192.168.161.225:8087",
         changeOrigin: true,
         changeOrigin: true,
-      }
+        pathRewrite: { "^/analysis": "" },
+      },
     },
     },
   },
   },
-})
+  configureWebpack: {
+    output: {
+      // 输出重构  打包编译后的 文件名称  【模块名称.版本号.js】
+      filename: `js/[name].${timeStamp}.js`,
+      chunkFilename: `js/[name].${timeStamp}.js`,
+    },
+  },
+  css: {
+    extract: {
+      // 修改打包后css文件名   // css打包文件,添加时间戳
+      filename: `css/[name].${timeStamp}.css`,
+      chunkFilename: `css/[name].${timeStamp}.css`,
+    },
+  },
+});