From ee414c03a6779745ea6e11693cf6f3f61690f399 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 23 四月 2024 19:23:41 +0800
Subject: [PATCH] 考勤管理的导入接口联调+考勤管理的下载模版的接口联调

---
 src/components/common/uploadImportBtn.vue                             |  518 +++++++++++++++++++++++++++++++++++++++
 /dev/null                                                             |   40 ---
 src/api/employeeSalary/attendanceManage.js                            |    8 
 src/assets/style/index.scss                                           |    3 
 src/views/employeeSalary/attendanceManage/index.vue                   |   17 +
 src/views/employeeSalary/attendanceManage/components/ImportDialog.vue |  157 ++++++++++++
 6 files changed, 701 insertions(+), 42 deletions(-)

diff --git a/package.json b/package.json
deleted file mode 100644
index 306b480..0000000
--- a/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
-  "name": "crm-web",
-  "version": "0.1.0",
-  "private": true,
-  "scripts": {
-    "serve": "vue-cli-service serve",
-    "build": "vue-cli-service build",
-    "lint": "vue-cli-service lint"
-  },
-  "dependencies": {
-    "axios": "^1.4.0",
-    "core-js": "^3.8.3",
-    "docx-preview": "^0.1.18",
-    "downloadjs": "^1.4.7",
-    "element-ui": "^2.15.13",
-    "faker": "^5.5.3",
-    "lodash": "^4.17.21",
-    "vue": "^2.6.14",
-    "vue-router": "^3.5.1",
-    "vuex": "^3.6.2"
-  },
-  "devDependencies": {
-    "@babel/core": "^7.12.16",
-    "@babel/eslint-parser": "^7.12.16",
-    "@vue/cli-plugin-babel": "~5.0.0",
-    "@vue/cli-plugin-eslint": "~5.0.0",
-    "@vue/cli-plugin-router": "~5.0.0",
-    "@vue/cli-plugin-vuex": "~5.0.0",
-    "@vue/cli-service": "~5.0.0",
-    "eslint": "^7.32.0",
-    "eslint-plugin-vue": "^8.0.3",
-    "lint-staged": "^11.1.2",
-    "sass": "^1.32.7",
-    "sass-loader": "^12.0.0",
-    "vue-template-compiler": "^2.6.14"
-  },
-  "gitHooks": {
-    "pre-commit": "lint-staged"
-  }
-}
diff --git a/src/api/employeeSalary/attendanceManage.js b/src/api/employeeSalary/attendanceManage.js
index 4cd1c33..3724d3e 100644
--- a/src/api/employeeSalary/attendanceManage.js
+++ b/src/api/employeeSalary/attendanceManage.js
@@ -24,6 +24,14 @@
     data
   })
 }
+// 鑰冨嫟绠$悊 妯$増
+export function getTemplate(data) {
+  return request({
+    url: "/api-jl/v1/attendance/getTemplate",
+    method: "post",
+    data
+  })
+}
 // 鑰冨嫟绠$悊 鑾峰彇鍔犵彮瑙勫垯
 export function getAttendanceRule(data) {
   return request({
diff --git a/src/assets/style/index.scss b/src/assets/style/index.scss
index 0286b0c..d8f9581 100644
--- a/src/assets/style/index.scss
+++ b/src/assets/style/index.scss
@@ -150,6 +150,9 @@
 .font_weight_700{
   font-weight: 700;
 }
+.cursor_pinter{
+  cursor: pointer;
+}
 .btn-pager {
   display: flex;
   margin-top: 10px;
diff --git a/src/components/common/uploadImportBtn.vue b/src/components/common/uploadImportBtn.vue
new file mode 100644
index 0000000..dbf413c
--- /dev/null
+++ b/src/components/common/uploadImportBtn.vue
@@ -0,0 +1,518 @@
+<!--
+ 鏂囦欢鍚嶏細uploadImportBtn.vue
+ 浣滆�咃細銆堢増鏉冦��
+ 鎻忚堪锛氥�堟弿杩般��
+ 淇敼浜猴細鐜嬪
+ 淇敼鏃堕棿锛�2019/7/30 17:27
+ 淇敼鍐呭锛氥�堜慨鏀瑰唴瀹广��
+-->
+<template>
+  <div
+    class="upload-import-btn"
+    v-loading.fullscreen.lock="importFilesLoading"
+    element-loading-text="鎷煎懡鍔犺浇涓�"
+    element-loading-background="rgba(255, 255, 255, 0.5)"
+  >
+    <div>
+      <!--      accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"-->
+      <el-upload
+        v-model="uploadInformation.message"
+        ref="upload"
+        class="upload-demo"
+        :disabled="disabled"
+        :data="uploadData"
+        :action="importFileUrl()"
+        :on-preview="handlePreview"
+        :on-remove="handleRemove"
+        :on-change="handleChange"
+        :show-file-list="false"
+        :on-error="uploadError"
+        :auto-upload="false"
+      >
+        <!-- -->
+        <el-button
+          class=""
+          :disabled="disabled"
+          :size="importObj.sizeButton"
+          type="primary"
+          :icon="importObj.iconButton"
+        >
+          <span v-if="buttonText">{{ buttonText }}</span>
+          <span v-else>涓婁紶鏂囦欢</span>
+        </el-button>
+        <div v-if="importObj.tip" slot="tip">{{ importObj.tip }}</div>
+        <slot name="downButton" />
+      </el-upload>
+      <div class="oa-file-upload" v-if="isFileListShow && fileRefresh">
+        <ul v-show="fileList.length > 0" class="file-list">
+          <li v-for="(file, index) in fileList" :key="file.id">
+            <div class="left margin_left_5px;">
+              <i class="icon el-icon-document"></i>
+              <!-- <span class="file-suffix"
+                    :class="[file.suffix]">
+              </span>-->
+            </div>
+            <div class="middle">
+              <p :title="file.noticeFileName" class="name">
+                <span class="ellipsis">{{ file.fileName }}</span>
+                <span class="suffix">.{{ file.suffix }}</span>
+              </p>
+              <p class="size">{{ formatFileSize(file.size) }}</p>
+            </div>
+            <!--涓嬭浇鎸夐挳-->
+            <span class="icon delete" @click.stop="remove(index,true)">
+              <i class="el-icon-delete color_red"></i>
+            </span>
+          </li>
+        </ul>
+      </div>
+    </div>
+  </div>
+</template>
+ 
+<script>
+import { Message } from "element-ui";
+export default {
+  name: "uploadImportBtn",
+  components: {},
+  props: {
+    uploadInformation: {
+      type: [Object],
+      default: () => ({
+        message: "璁剧疆",
+        exportErrExcel: "",
+        importLinks: "",
+      }),
+    },
+    wranInfo: {
+      type: [Object],
+      default: () => ({
+        successDialogIconfont: false, //鎴愬姛鐨刬con
+        wranVisible: false,
+        content: "閿欒鍘熷洜",
+        successNumber: "",
+        callback: null,
+      }),
+    },
+    uploadErr: {
+      type: [Object],
+      default: () => ({
+        uploadErrNum: "",
+        successDialogIconfont: false,
+        uploadErrVisible: false,
+      }),
+    },
+    continueImport: {
+      type: [Boolean],
+    },
+ 
+    isFileListShow: {
+      type: [Boolean],
+      default: false,
+    },
+    // 鍙傛暟
+    name: {
+      type: [String],
+    },
+    uploadUser: {
+      type: [String],
+    },
+    disabled: {
+      type: [Boolean],
+      default: false,
+    },
+    queryId: {
+      type: [String, Number],
+    },
+    uploadId: {
+      type: [String],
+    },
+    importObj: {
+      type: [Object],
+      default: () => ({
+        size: 100,
+        suffix: "",
+        sizeButton: "medium",
+        iconButton: "el-icon-plus",
+        tip: "",
+        num: 0,
+      }),
+    },
+    buttonText: {
+      type: [String],
+      default: "",
+    },
+  },
+  data() {
+    return {
+      typeButton: {
+        choose: "cancel",
+      },
+      downLoadHttp: "",
+      uploadData: {
+        id: "",
+      },
+      // name: 'food.jpeg',   瑙勫畾涓婁紶鏂囦欢鍚�
+      fileList: [],
+      //鎺у埗鍔犺浇
+      importFilesLoading: false,
+      wranInfos: this.wranInfo,
+      uploadErrs: this.uploadErr,
+      fd: {},
+      number: 0,
+      fileListChangeData: [], //change鏃秄ileList
+      fileRefresh: true,
+    };
+  },
+  created() {},
+  watch: {
+    //寮规鍑虹幇鎭㈠fileList
+    continueImport(newVal) {
+      if (newVal) {
+        this.fileList = [];
+        this.$parent.$parent.continueImport = false;
+      }
+    },
+  },
+  computed: {},
+  methods: {
+    submitUpload() {
+      this.$refs.upload.submit();
+    },
+    //鏂囦欢澶у皬
+    formatFileSize(val) {
+      if (null == val || val == "") {
+        return "0 B";
+      }
+      let unitArr = new Array(
+        "B",
+        "KB",
+        "MB",
+        "GB",
+        "TB",
+        "PB",
+        "EB",
+        "ZB",
+        "YB"
+      );
+      let index = 0,
+        srcsize = parseFloat(val);
+      index = Math.floor(Math.log(srcsize) / Math.log(1024));
+      let size = srcsize / Math.pow(1024, index);
+      //  淇濈暀鐨勫皬鏁颁綅鏁�
+      size = size.toFixed(2);
+      return size + unitArr[index];
+    },
+    // 绉婚櫎鍑烘枃浠跺垪琛�
+    remove(index, val) {
+      if (!val) {
+        let filelist = JSON.parse(JSON.stringify(this.fileList));
+        for (let i in filelist) {
+          if (index == i) {
+            this.fileList.splice(i, 1);
+          }
+        }
+        this.$emit("remove", this.fileList);
+      } else {
+        this.$confirm("纭畾绉婚櫎" + this.fileList[index].name + "?", "", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+        })
+          .then(() => {
+            let filelist = JSON.parse(JSON.stringify(this.fileList));
+            for (let i in filelist) {
+              if (index == i) {
+                this.fileList.splice(i, 1);
+              }
+            }
+            this.$emit("remove", this.fileList);
+          })
+          .catch(() => {});
+      }
+    },
+    importFileUrl() {
+      //'璁剧疆涓婁紶鍦板潃'
+      return "";
+    },
+    handleRemove(file) {
+      console.log(file, "handeRemove");
+    },
+    handlePreview(file) {
+      console.log(file, "1111");
+    },
+    handleChange(file, fileListChange) {
+      if (this.fileList.length == 0) {
+        fileListChange = [];
+      }
+      //娉ㄨВ锛氳嫻鏋渁ir xls 鑾峰彇涓嶅埌file鐨則ype鍊�
+      // const suffixName=file.raw.name.split('.')[file.raw.name.split('.').length-1]=='xls';
+      // const isJPG = ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/vnd.ms-excel'].indexOf(file.raw.type) >-1||suffixName;
+      let isJPG = true;
+      let isLt3M;
+      if (this.name == "projectDoc") {
+        isJPG = true;
+        isLt3M = file.size / 1024 / 1024 < 100;
+      } else if (this.name == "order") {
+        isJPG =
+          file.raw.name.split(".")[file.raw.name.split(".").length - 1] ==
+          "Dwg";
+        isLt3M = file.size / 1024 / 1024 < 20;
+      } else if (this.importObj.suffix) {
+        isJPG =
+          file.raw.name.split(".")[file.raw.name.split(".").length - 1] ==
+          this.importObj.suffix;
+        isLt3M = file.size / 1024 / 1024 < this.importObj.size;
+      }
+      if (!isJPG) {
+        Message.warning("涓婁紶鏂囦欢鍙兘鏄�" + this.importObj.suffix + "鏍煎紡锛�");
+        return false;
+      } else if (!isLt3M) {
+        Message.warning(
+          "涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃 " + this.name == "projectDoc"
+            ? 100
+            : (this.name == "order" ? 20 : this.importObj.size) + "MB锛�"
+        );
+        return false;
+      } else if (isJPG && isLt3M) {
+        // this.number += 1;
+        let filelist = JSON.parse(JSON.stringify(file));
+        filelist.fileName = filelist.name.split(".")[0];
+        filelist.suffix = filelist.name.split(".")[1];
+        filelist.id = filelist.name + "*" + filelist.size + "*" + this.number;
+        if (this.importObj.num) {
+          if (fileListChange.length > this.importObj.num) {
+            Message.warning(
+              `褰撳墠闄愬埗閫夋嫨 ${this.importObj.num} 涓枃浠讹紝鍏遍�夋嫨浜� ${
+                this.fileList.length + 1
+              } 涓枃浠禶
+            );
+            return false;
+          }
+        }
+ 
+        // else if (this.fileList.length == 0) {
+        let fd = new FormData(); // 鍒涘缓form瀵硅薄
+        fd.append("file", file.raw); // file瀵硅薄鏄� beforeUpload鍙傛暟
+        fd.append("name", file.name); // file瀵硅薄鏄� beforeUpload鍙傛暟
+        if (this.name == "projectDoc") {
+          fd.append("projectID", this.queryId);
+          fd.append("uploadUser", this.uploadUser);
+          fd.append("uploadId", this.uploadId);
+        }
+        this.fd = fd;
+        this.fileRefresh = false;
+        this.$nextTick(() => {
+          this.fileList.push(filelist);
+          this.$set(this, "fileList", this.fileList);
+          this.fileRefresh = true;
+        });
+ 
+        this.confirmUpload(fd, file, {});
+        // }
+        return false;
+      }
+    },
+    confirmUpload(fd, file) {
+      this.importFilesLoading = true;
+        this.$emit("fileSuccess", fd, file);
+        this.importFilesLoading = false;
+    },
+    clearFiles() {
+      this.$refs.upload.clearFiles();
+    },
+    handleAvatarSuccess(res, file) {
+      // 瀵煎叆璁插笀绉垎 绉垎妯″潡涓嬬Н鍒嗙淮鎶�
+      if (
+        this.uploadInformation.message == "瀵煎叆璁插笀绉垎" ||
+        this.uploadInformation.message == "鎵归噺瀵煎叆绉垎"
+      ) {
+        this.traningPoint(res, file);
+      } else {
+        if (res.code == 200) {
+          this.$message.success("瀵煎叆鎴愬姛锛�");
+          this.$emit("fileSuccess");
+        } else {
+          this.$emit("fileError");
+        }
+        // else if (res.code == 70032 || res.code == '70032') {
+        //   this.uploadErrs.uploadErrNum = (res.data&&res.data.errSize) ? res.data.errSize : null;
+        //   this.uploadErrs.uploadErrVisible = true;
+        // }
+        //  else{
+        //    // this.clearFiles();
+        //    this.wranInfos.successDialogIconfont = false;
+        //    let ErrorMessage;
+        //    if (res.desc == '' || res.desc == '[]') {
+        //      ErrorMessage = '';
+        //    } else {
+        //      ErrorMessage = res.desc;
+        //    }
+        //    this.wranInfo.content = this.uploadInformation.message + '涓婁紶澶辫触,璇烽噸璇曪紒' + ErrorMessage;
+        //    this.wranInfos.wranVisible = true;
+        //  }
+      }
+    },
+    //璁插笀绉垎鐨勫鍏�
+    traningPoint(res) {
+      if (res.code == 200) {
+        if (res.data > 0) {
+          this.uploadErrs.uploadErrNum = res.data ? res.data : null;
+          this.uploadErrs.uploadErrVisible = true;
+        } else {
+          // this.fileList.push(res.data)
+          this.wranInfos.successDialogIconfont = true;
+          this.wranInfos.content =
+            this.uploadInformation.message + "涓婁紶鎴愬姛锛佹槸鍚﹁繑鍥炲垪琛ㄩ〉锛�";
+          if (res.data) {
+            this.wranInfos.successNumber = res.data.errSize
+              ? res.data.errSize
+              : "";
+          }
+          this.wranInfos.wranVisible = true;
+        }
+      } else {
+        // this.clearFiles();
+        this.wranInfos.successDialogIconfont = false;
+        // let ErrorMessage;
+        // if (res.desc == "" || res.desc == "[]") {
+          // ErrorMessage = "";
+        // } else {
+          // ErrorMessage = res.desc;
+        // }
+        // this.wranInfo.content =
+        // this.uploadInformation.message + "涓婁紶澶辫触,璇烽噸璇曪紒" + ErrorMessage;
+        // this.wranInfos.wranVisible = true;
+      }
+    },
+    uploadError() {
+      this.wranInfos.successDialogIconfont = false;
+      this.wranInfos.content =
+        this.uploadInformation.message + "涓婁紶澶辫触,璇烽噸璇曪紒";
+      this.wranInfos.wranVisible = true;
+    },
+    //鐐瑰嚮纭畾鎸夐挳杩斿洖鐩稿簲鐨勫垪琛ㄩ〉
+    confirmImport() {
+      this.wranInfos.wranVisible = false;
+      this.uploadErrs.uploadErrVisible = false;
+    },
+    //瀵煎叆澶辫触鏃朵笅杞藉け璐ユ暟鎹�
+    cancelErrorExcel() {
+      // this.clearFiles();
+      this.wranInfos.wranVisible = false;
+      this.uploadErrs.uploadErrVisible = false;
+    },
+    //瀵煎叆涓婁紶澶辫触鐨別xcel
+    exportErrorExcel() {
+      this.uploadErrs.uploadErrVisible = false;
+      this.wranInfos.wranVisible = false;
+      
+    },
+  },
+};
+</script>
+ 
+<style scoped>
+.choose-btn-icon {
+  margin-right: 5px;
+  font-size: 16px;
+}
+ 
+.oa-file-upload .file-list {
+  align-items: center;
+  flex-wrap: wrap;
+  margin: 0 0 15px 0;
+  overflow: hidden;
+}
+ 
+.oa-file-upload .file-list li {
+  min-width: 240px;
+  width:calc(100% - 20px);
+  height: 60px;
+  border: 1px solid #ddd;
+  background-color: #f5f5f5;
+  float: left;
+  align-items: center;
+  justify-content: space-between;
+  font-size: 14px;
+  color: #333;
+  margin: 20px 20px 0 0;
+  position: relative;
+  border-radius: 3px;
+}
+ 
+.oa-file-upload .file-list .left {
+  font-size: 26px;
+  color: #c1c1c1;
+  width: auto;
+  text-align: center;
+  line-height: 62px;
+  float: left;
+}
+ 
+.oa-file-upload .file-list .right {
+  width: 30px;
+  float: right;
+  cursor: pointer;
+  font-size: 26px;
+  line-height: 50px;
+}
+ 
+.oa-file-upload .file-list .middle {
+  min-width: 100px;
+  width: calc(100% - 80px);
+  padding: 0 5px;
+  line-height: 25px;
+  margin-top: 5px;
+  text-align: left;
+  position: relative;
+  float: left;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+ 
+.oa-file-upload .file-list p.name {
+  display: flex;
+  align-items: center;
+}
+ 
+.oa-file-upload .file-list p.name span.ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+ 
+.oa-file-upload .file-list p.name span.suffix {
+  white-space: nowrap;
+}
+ 
+.oa-file-upload .file-list .middle span.size {
+  position: absolute;
+  bottom: -5px;
+}
+ 
+.oa-file-upload .file-list span.delete {
+  position: absolute;
+  right: 12px;
+  top: 12px;
+  cursor: pointer;
+  font-size: 26px;
+  /* display: none; */
+}
+ 
+.oa-file-upload .file-list li:hover span.delete {
+  display: block;
+}
+ 
+.oa-file-upload .handle-btn button {
+  border: 0;
+}
+/*  涓婁紶鍓嶉潰鐨勫浘鏍�*/
+.file-suffix {
+  width: 40px;
+  height: 40px;
+  display: inline-block;
+  margin: 0 10px;
+  margin-top: 11px;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/employeeSalary/attendanceManage/components/ImportDialog.vue b/src/views/employeeSalary/attendanceManage/components/ImportDialog.vue
new file mode 100644
index 0000000..329f697
--- /dev/null
+++ b/src/views/employeeSalary/attendanceManage/components/ImportDialog.vue
@@ -0,0 +1,157 @@
+<template>
+  <el-dialog
+    :close-on-click-modal="false"
+    :visible.sync="isopen"
+    width="28rem"
+    class="add-event-dialog"
+    @close="shutdown"
+  >
+    <div slot="title" class="tac drawerHeader">{{ title }}</div>
+    <div class="dialog-content-box">
+      <el-form ref="form" :rules="rules" :model="form" label-width="110px">
+        <el-form-item label="涓婁紶鑰冨嫟锛�" prop="doc" class="down-box">
+          <uploadImportBtn
+            ref="mychild"
+            buttonText="涓婁紶"
+            name="processModel"
+            :isFileListShow="true"
+            :continueImport="continueImport"
+            :importObj="importObj"
+            @fileSuccess="fileSuccess"
+            @remove="remove"
+          >
+        </uploadImportBtn>
+        <span class="margin_left_20px cursor_pinter down-btn color_blue" @click="downHttpClick"><i class="el-icon-download"></i>涓嬭浇妯℃澘</span>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div slot="footer" class="dialog-footer tac">
+      <el-button @click="shutdown">鍙栨秷</el-button>
+
+      <el-button @click="onSubmit" type="primary">纭畾</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { attendanceInput,getTemplate } from "@/api/employeeSalary/attendanceManage.js"
+import uploadImportBtn from "@/components/common/uploadImportBtn";
+import FileSaver from 'file-saver'
+export default {
+  components: {
+    uploadImportBtn,
+  },
+  props: ["title"],
+  data() {
+    return {
+      form: {
+        doc: null,
+        doc2: null,
+      },
+      rules: {
+        doc: [{ required: true, message: "璇蜂笂浼�", trigger: "change" }],
+      },
+      isopen: false,
+      // 涓婁紶
+      continueImport: false, //鏄惁缁х画涓婁紶
+      continueImport2: false, //鏄惁缁х画涓婁紶
+
+      importObj: {
+        suffix: "xlsx",
+        size: 20,
+        num: 1,
+      },
+    };
+  },
+  mounted() {},
+  watch: {
+    isopen(val) {
+      if (val) {
+        this.form.doc = null;
+        this.form.doc2 = null;
+        this.$nextTick(()=>{
+          this.$refs.form.resetFields();
+        })
+      }
+    },
+  },
+  methods: {
+    //瀵煎叆鎴愬姛
+    fileSuccess(fd, file) {
+      this.continueImport = true;
+      this.form.doc = file;
+    },
+    shutdown() {
+      this.isopen = false;
+      this.$refs.mychild.remove(0);
+      this.$emit("fileSuccess", this.form);
+    },
+    remove(){
+      this.continueImport = false;
+      this.form.doc = null;
+      this.$refs.mychild.remove(0);
+    },
+    downHttpClick(){
+      getTemplate({category:13}).then(res=>{
+        if (res.code === 200) {
+          const fileUrl = res.data[0].fileUrl;
+          const downloadLink = document.createElement("a");
+          downloadLink.href = fileUrl;
+          downloadLink.download = "妯℃澘.excel";
+          document.body.appendChild(downloadLink);
+          downloadLink.click();
+          this.$message.success("妯℃澘涓嬭浇鎴愬姛!");
+        }
+      });
+    },
+    onSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          let fd = new FormData(); // 鍒涘缓form瀵硅薄
+          fd.append("file", this.form.doc.raw); // file瀵硅薄鏄� beforeUpload鍙傛暟
+          // fd.append('file2', this.form.doc2.raw)  // file瀵硅薄鏄� beforeUpload鍙傛暟
+
+          attendanceInput(fd).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("涓婁紶鎴愬姛锛�");
+              this.shutdown();
+            }
+          });
+        } else {
+          this.$message.error("璇蜂笂浼狅紒");
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+/* .title {
+  font-size: 13px;
+  line-height: 18px;
+  color: #2a78fb;
+} */
+.dialog-content-box {
+  height: 17rem;
+  min-height: 110px;
+  overflow: auto;
+}
+::v-deep .el-select-dropdown__wrap {
+  overflow: auto !important;
+}
+
+::v-deep .el-select-dropdown {
+  position: absolute !important;
+  top: 36px !important;
+  left: 0px !important;
+}
+.down-box{
+  position:relative;
+  .down-btn{
+    position:absolute;
+    left:90px;
+    top:0;
+  }
+}
+</style>
diff --git a/src/views/employeeSalary/attendanceManage/index.vue b/src/views/employeeSalary/attendanceManage/index.vue
index bc9c870..4187cec 100644
--- a/src/views/employeeSalary/attendanceManage/index.vue
+++ b/src/views/employeeSalary/attendanceManage/index.vue
@@ -42,6 +42,12 @@
         </div>
       </div>
     </div>
+    <ImportDialog
+      title="涓婁紶鏂囦欢"
+      ref="import"
+      @fileSuccess="fileSuccess"
+    >
+    </ImportDialog>
     <!-- 瑙勫垯璁剧疆 -->
     <RuleSettingDialog ref="RuleSettingDialog" :editRow="editRow"  @closeClick="getData" />
   </div>
@@ -51,13 +57,16 @@
 import { getAttendanceList, deleteAttendanceInfo } from "@/api/employeeSalary/attendanceManage.js"
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 import RuleSettingDialog from  "@/views/employeeSalary/attendanceManage/components/RuleSettingDialog"
+import ImportDialog from "@/views/employeeSalary/attendanceManage/components/ImportDialog";
+
 export default {
   name: "attendanceManage",
   props: {
   },
   mixins: [pageMixin],
   components: {
-    RuleSettingDialog
+    RuleSettingDialog,
+    ImportDialog
   },
   data() {
     return {
@@ -170,9 +179,13 @@
       this.pagerOptions.currPage = 1
       this.getData()
     },
+    //瀵煎叆鎴愬姛
+    fileSuccess() {
+       this.getData()
+    },
     // 瀵煎叆
     exportClick() {
-      
+      this.$refs.import.isopen=true;
     },
      // 鍚屾
      synchClick(){

--
Gitblit v1.8.0