Browse Source

mis文件上传

chenminghua 2 years ago
parent
commit
b795bbe741
3 changed files with 81 additions and 0 deletions
  1. 7 0
      src/router/index.js
  2. 5 0
      src/views/layout/Menu.vue
  3. 69 0
      src/views/report/misimport.vue

+ 7 - 0
src/router/index.js

@@ -713,6 +713,13 @@ const routes = [{
 	component: () =>
 		import( /* webpackChunkName: "xhscyb" */ "../views/report/xhscyb.vue"),
 },
+//mis日报导入功能
+{
+	path: "/others/misimport",
+	name: "misimport",
+	component: () =>
+		import("../views/report/misimport.vue"),
+},
 {
 	path: "/others/fdczzdy",
 	name: "fdczzdy",

+ 5 - 0
src/views/layout/Menu.vue

@@ -836,6 +836,11 @@ export default {
                   icon: "svg-matrix",
                   path: "/others/xhscyb",
                 },
+                {
+                  text: "MIS日报导入",
+                  icon: "svg-matrix",
+                  path: "/others/misimport",
+                },
               ],
             },
             {

+ 69 - 0
src/views/report/misimport.vue

@@ -0,0 +1,69 @@
+<template>
+  <div>
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">开始日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="datevalue"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            >
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="query-actions">
+          <button class="btn green" @click="handleSearch">查询</button>
+        </div>
+        <div class="query-actions">
+          <el-upload
+            class="upload-demo"
+            action=""
+            :on-preview="handlePreview"
+            :on-remove="handleRemove"
+            :before-remove="beforeRemove"
+            :on-exceed="handleExceed"
+            :auto-upload="true"
+            :limit="1"
+            accept=".xls,.xlsx"
+            :file-list="fileList"
+          >
+            // accept 接受上传的文件类型
+            <button class="btn green" @click="importExecl">数据导入</button>
+          </el-upload>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      fileList: [],
+    };
+  },
+  created() {},
+  methods: {
+    handleSearch() {},
+    importExecl() {
+
+    },
+    // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+    handleChange(file, fileList) {
+      this.fileList.push(file.raw);
+    },
+    // 文件超出个数限制时的钩子
+    handleExceed(file, fileList) {
+      return this.$message.warning("一次只能上传一个文件");
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>