浏览代码

新增员工导入

wucl 2 年之前
父节点
当前提交
b7e225a84b
共有 2 个文件被更改,包括 30 次插入1 次删除
  1. 1 1
      src/views/home/index.vue
  2. 29 0
      src/views/staff/list.vue

+ 1 - 1
src/views/home/index.vue

@@ -22,7 +22,7 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button divided @click.native="logout">取 消</el-button>
+        <el-button @click="dialogFormVisible = false">暂不修改</el-button>
         <el-button type="primary" @click="savePass('dialogForm')">修 改</el-button>
       </div>
     </el-dialog>

+ 29 - 0
src/views/staff/list.vue

@@ -60,6 +60,32 @@
         >重置
         </el-button>
       </template>
+      <template slot="right">
+        <PermissionButton
+          menu-code="_views_user_template"
+          class-name="filter-item"
+          round
+          icon="el-icon-download"
+          name="下载模板"
+          @click="handleDownload"
+        />
+        <PermissionButton
+          menu-code="_views_user_import"
+          class-name="filter-item"
+          round
+          type="text"
+          name=""
+          style="padding: 0; margin-bottom: 10px"
+        >
+          <excelImport
+            ref="uploadControl"
+            flag="user/importExcel"
+            :style-type="1"
+            title="导入"
+            @fath="getList"
+          />
+        </PermissionButton>
+      </template>
       <parentTable
         v-loading="listLoading"
         :data="pageData.records"
@@ -172,6 +198,9 @@
       that.getList()
     },
     methods: {
+      handleDownload(url) {
+        this.$utils.exportUtil('/user/download/importTemplate', {}, '模板下载')
+      },
       resetSearch() {
         this.listQuery = {
           current: 1,