Ver Fonte

工序列表 导入修改

jingshuyong há 11 meses atrás
pai
commit
50eaf89e75

+ 45 - 27
src/api/system/file/index.js

@@ -63,47 +63,57 @@ export async function getFile(params, fileName) {
  * 下载模板
  */
 export async function downLoadTemplate() {
-  const res = await request.post('/main/user/downLoadTemplate',{}, {
-    responseType: 'blob'
-  });
-  console.log(res.data,'***********');
+  const res = await request.post(
+    '/main/user/downLoadTemplate',
+    {},
+    {
+      responseType: 'blob'
+    }
+  );
+  console.log(res.data, '***********');
   download(res.data, '员工档案导入模板.xlsx');
-
 }
 /**
  * 下载模板
  */
-export async function downLoadTemplateNew(url,fileName) {
-  const res = await request.post(url,{}, {
-    responseType: 'blob'
-  });
-  console.log(res.data,'***********');
+export async function downLoadTemplateNew(url, fileName) {
+  const res = await request.post(
+    url,
+    {},
+    {
+      responseType: 'blob'
+    }
+  );
+  console.log(res.data, '***********');
   download(res.data, fileName);
-
 }
 
-
 export async function downLoadScript() {
   // 发送请求,下载模板
-  const res = await request.post('/main/file/downLoadScript',{}, {
-    responseType: 'blob'
-  });
+  const res = await request.post(
+    '/main/file/downLoadScript',
+    {},
+    {
+      responseType: 'blob'
+    }
+  );
 
   download(res.data, '脚本文件.zip');
-
 }
 
 export async function downLoadFiexs() {
   // 发送请求,下载模板
-  const res = await request.post('/main/file/downLoadCourse',{}, {
-    responseType: 'blob'
-  });
+  const res = await request.post(
+    '/main/file/downLoadCourse',
+    {},
+    {
+      responseType: 'blob'
+    }
+  );
 
   download(res.data, 'CS配置教程.docx');
-
 }
 
-
 /**
  * 删除文件
  */
@@ -147,20 +157,28 @@ export async function importBatch(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
+// 通用上传接口
+export async function commUpload(data) {
+  const formData = new FormData();
+  data.multiPartFiles.forEach((item, index) => {
+    formData.append(`multiPartFiles`, item);
+  });
+  const res = await request.post(`${data.url}`, formData);
+  if (res.data.code === '0') {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 // 导入pbom
 export async function importPBom(data) {
   const formData = new FormData();
   data.multiPartFiles.forEach((item, index) => {
     formData.append(`multiPartFiles`, item);
   });
-  const res = await request.post(
-    `/main/bomCategory/importPBom`,
-    formData
-  );
+  const res = await request.post(`/main/bomCategory/importPBom`, formData);
   if (res.data.code === '0') {
     return res.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
-
-

+ 152 - 0
src/components/upload/comm-dialog.vue

@@ -0,0 +1,152 @@
+<template>
+  <!-- 上传 -->
+  <el-dialog title="导入文件上传" :visible.sync="dialogVisible" width="40%">
+    <el-form label-width="110px" class="zw-criterion" >
+      <el-form-item label="选择文件">
+        <el-upload
+          class="avatar-uploader"
+          action="#"
+          :show-file-list="false"
+          :http-request="handlSuccess"
+          :before-upload="beforeUpload"
+          :multiple="true"
+        >
+          <el-button icon="el-icon-plus" size="small" type="primary"
+            >文件上传</el-button
+          >
+          <div slot="tip" class="el-upload__tip" v-if="fileUrl">
+            只能上传excel文件,点击
+            <el-link
+              type="primary"
+              :underline="false"
+              :disabled="loading"
+              @click="downLoadTemplate()"
+            >
+              下载模板</el-link
+            >
+          </div>
+        </el-upload>
+      </el-form-item>
+      <el-form-item label="上传列表">
+        <div class="imgs-box">
+          <p v-for="(item, index) in attaments" :key="index" class="imgs-p">
+            <span> {{ item.name }}</span>
+            <el-link @click="delFileList(index)" type="primary">删除</el-link>
+          </p>
+        </div>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">关 闭</el-button>
+      <el-button
+        size="small"
+        @click="upload"
+        type="primary"
+        :loading="loadingBtn"
+        >上 传</el-button
+      >
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import { commUpload } from '@/api/system/file/index.js';
+  // import { download1 } from '@/utils/file';
+  import { downLoadTemplateNew } from '@/api/system/file/index.js';
+  export default {
+    props: {
+      // eslint-disable-next-line vue/require-prop-type-constructor
+      fileUrl: '', // 下载的地址
+      fileName: '', // 下载的名称
+      apiUrl: '' // 提交的地址
+    },
+    //注册组件
+    data() {
+      return {
+        dialogVisible: false,
+        attaments: [], //上传文件
+        file: '',
+        loadingBtn: false,
+        loading: false
+      };
+    },
+
+    created() {},
+    methods: {
+      open() {
+        this.attaments = [];
+        // this.module = '';
+        this.dialogVisible = true;
+      },
+      //删除附件
+      delFileList(index) {
+        this.attaments.splice(index, 1);
+      },
+      //上传限制
+      beforeUpload(file) {
+        const isLt10M = file.size / 1024 / 1024 < 10;
+        if (!isLt10M) {
+          this.$message.error('导入单文件大小不能超过 10MB!');
+        }
+        return isLt10M;
+      },
+      //图片上传
+      handlSuccess(param) {
+        this.file = param.file;
+        this.attaments.push(param.file);
+      },
+      // 文件上传
+      async upload() {
+        if (this.attaments.length == 0) {
+          return this.$message.warning('文件不能为空!');
+        }
+        // this.module = this.$props.defModule;
+        this.loadingBtn = true;
+        try {
+          await commUpload({
+            url: this.apiUrl,
+            multiPartFiles: this.attaments
+          });
+          this.$message.success('操作成功!');
+          this.dialogVisible = false;
+          this.$emit('success');
+        } finally {
+          this.loadingBtn = false;
+        }
+      },
+      //下载模板
+      downLoadTemplate() {
+        console.log(1234)
+        this.loading = true;
+        try {
+          downLoadTemplateNew(this.fileUrl, this.fileName);
+        }finally {
+          this.loading = false;
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss">
+  .zw-table-header {
+    float: right;
+  }
+
+  .imgs-box .imgs-p {
+    height: 30px;
+    background: #f0f3f3;
+    line-height: 30px;
+    width: 372px;
+    margin-bottom: 5px;
+    padding: 0 10px;
+    display: flex;
+    justify-content: space-between;
+  }
+  .zw-criterion-normal {
+    padding: 20px 0 0 0;
+  }
+  .el-main {
+    overflow: hidden;
+  }
+</style>

+ 330 - 282
src/views/technology/production/index.vue

@@ -4,20 +4,37 @@
       <!-- 搜索表单 -->
       <!-- <user-search @search="reload" /> -->
       <seek-page :seekList="seekList" @search="reload"></seek-page>
- 
 
       <!-- 数据表格 -->
-      <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :selection.sync="selection" row-key="id" :pageSize="this.$store.state.tablePageSize" @columns-change="handleColumnChange"
-      :cache-key="cacheKeyUrl">
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        :selection.sync="selection"
+        row-key="id"
+        :pageSize="this.$store.state.tablePageSize"
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
+      >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
-          <el-button size="small" type="primary" icon="el-icon-plus" class="ele-btn-icon" @click="openEdit()"
-          v-if="$hasPermission('main:producetask:save')"
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            @click="openEdit()"
+            v-if="$hasPermission('main:producetask:save')"
           >
             新建
           </el-button>
-          <el-button size="small" type="danger" icon="el-icon-delete" class="ele-btn-icon" @click="removeBatch"
-          v-if="$hasPermission('main:producetask:delete')"
+          <el-button
+            size="small"
+            type="danger"
+            icon="el-icon-delete"
+            class="ele-btn-icon"
+            @click="removeBatch"
+            v-if="$hasPermission('main:producetask:delete')"
           >
             删除
           </el-button>
@@ -49,9 +66,12 @@
 
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="openEdit(row)"
-          v-if="$hasPermission('main:producetask:update')"
-          
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="openEdit(row)"
+            v-if="$hasPermission('main:producetask:update')"
           >
             修改
           </el-link>
@@ -59,8 +79,11 @@
             配置工艺参数
           </el-link> -->
 
-          <el-popconfirm class="ele-action" title="确定要删除当前工序吗?" @confirm="remove(row)"
-          v-if="$hasPermission('main:producetask:delete')"
+          <el-popconfirm
+            class="ele-action"
+            title="确定要删除当前工序吗?"
+            @confirm="remove(row)"
+            v-if="$hasPermission('main:producetask:delete')"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
@@ -72,300 +95,325 @@
       </ele-pro-table>
     </el-card>
     <!-- 编辑弹窗 -->
-    <user-edit :visible.sync="showEdit" :data="current" :controlList="controlList" @done="reload" ref="userEdit"
-      :typeList="typeList" />
+    <user-edit
+      :visible.sync="showEdit"
+      :data="current"
+      :controlList="controlList"
+      @done="reload"
+      ref="userEdit"
+      :typeList="typeList"
+    />
     <!-- 配置工艺参数 -->
-    <user-setting :visible.sync="showSetting" :data="current" ref="userSetting" />
+    <user-setting
+      :visible.sync="showSetting"
+      :data="current"
+      ref="userSetting"
+    />
 
-    <SampleParam v-if="sampleShow" :taskId="taskId" @close="close"></SampleParam>
+    <SampleParam
+      v-if="sampleShow"
+      :taskId="taskId"
+      @close="close"
+    ></SampleParam>
 
-    <importDialog :defModule="moudleName" ref="importDialogRef" @success="reload" />
+    <importDialog
+      fileName="工艺_工序导入模板"
+      apiUrl="/main/producetask/importExcel"
+      fileUrl="/main/producetask/downLoadTemplate"
+      ref="importDialogRef"
+      @success="reload"
+    />
   </div>
 </template>
 
 <script>
-import tabMixins from '@/mixins/tableColumnsMixin';
-import UserSearch from './components/user-search.vue';
-import UserEdit from './components/user-edit.vue';
-import UserSetting from './components/user-setting.vue';
-import SampleParam from './components/sampleParam.vue'
-import producetask from '@/api/technology/production';
-import control from '@/api/technology/control';
-import importDialog from "@/components/upload/import-dialog.vue";
-import work from '@/api/technology/work';
-
-export default {
-  name: 'technologyProduction',
-  mixins:[tabMixins],
-  components: {
-    UserSearch,
-    UserEdit,
-    UserSetting,
-    SampleParam,
-    importDialog
-  },
-  data() {
-    return {
-      moudleName : "mainProduceTask",
-      // 表格列配置
-      columns: [
-
-        {
-          columnKey: 'selection',
-          type: 'selection',
-          width: 45,
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          prop: 'sort',
-          label: '排序',
-          align: 'center',
-        },
-        {
-          prop: 'code',
-          label: '工序编码',
-          // sortable: 'custom',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 110
-        },
-        {
-          slot: 'name',
-          label: '工序名称',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 110
-        },
-
-        {
-          slot: 'type',
-          label: '工序类型',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 110
-        },
-        {
-          align: 'center',
-          prop: 'controlName',
-          label: '工序控制码',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'workCenterName',
-          label: '所属工作中心',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
+  import tabMixins from '@/mixins/tableColumnsMixin';
+  import UserSearch from './components/user-search.vue';
+  import UserEdit from './components/user-edit.vue';
+  import UserSetting from './components/user-setting.vue';
+  import SampleParam from './components/sampleParam.vue';
+  import producetask from '@/api/technology/production';
+  import control from '@/api/technology/control';
+  import importDialog from '@/components/upload/comm-dialog.vue';
+  import work from '@/api/technology/work';
 
-        
-
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 260,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true
-        }
-      ],
-      // 表格选中数据
-      selection: [],
-      // 当前编辑数据
-      current: null,
-      // 是否显示编辑弹窗
-      showEdit: false,
-      // 是否显示参数弹窗
-      showSetting: false,
-      controlList: [],
+  export default {
+    name: 'technologyProduction',
+    mixins: [tabMixins],
+    components: {
+      UserSearch,
+      UserEdit,
+      UserSetting,
+      SampleParam,
+      importDialog
+    },
+    data() {
+      return {
+        moudleName: 'mainProduceTask',
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            prop: 'sort',
+            label: '排序',
+            align: 'center'
+          },
+          {
+            prop: 'code',
+            label: '工序编码',
+            // sortable: 'custom',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            slot: 'name',
+            label: '工序名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
 
-      typeList: [
-        {
-          value: 1,
-          label: '普通工序'
-        },
-        // {
-        //   value: 2,
-        //   label: '抽样质检'
-        // },
-        
-        {
-          value: 3,
-          label: '抽样质检'
-        }, 
-        {
-          value: 4,
-          label: '包装工序'
-        },
-        {
-          value: 6,
-          label: '质检工序'
-        },
-        {
-          value: 7,
-          label: '生产准备'
-        },
-      ],
+          {
+            slot: 'type',
+            label: '工序类型',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            align: 'center',
+            prop: 'controlName',
+            label: '工序控制码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'workCenterName',
+            label: '所属工作中心',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
 
-      sampleShow: false,
-      taskId: null,
-      cacheKeyUrl: 'abfad404-technology-production',
-      controlListNewList: [], //给公共组件使用
-      workCenterList:[], //工作中心列表
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 260,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
+        // 表格选中数据
+        selection: [],
+        // 当前编辑数据
+        current: null,
+        // 是否显示编辑弹窗
+        showEdit: false,
+        // 是否显示参数弹窗
+        showSetting: false,
+        controlList: [],
 
-    };
-  },
-  computed: {
-    seekList() {
-      return [
-        {
-          label: "工序编码:",
-          value: "code",
-          type: "input",
-          placeholder: '',
-        },
-        {
-          label: "工序名称:",
-          value: "name",
-          type: "input",
-          placeholder: '',
-        },
-        {
-          label: "控制码:",
-          value: "controlId",
-          type: "select",
-          placeholder: '',
-          planList: this.controlListNewList
-        },
-        {
-          label: "工序类型:",
-          value: "type",
-          type: "select",
-          placeholder: '',
-          planList: this.typeList
-        },
-        {
-          label: "工作中心:",
-          value: "workCenterId",
-          type: "select",
-          placeholder: '',
-          planList: this.workCenterList
-        },
-      ]
-    }
-  },
-  created() {
-    this.getControlList()
-    this.getListWorkCenter()
-  },
-  methods: {
+        typeList: [
+          {
+            value: 1,
+            label: '普通工序'
+          },
+          // {
+          //   value: 2,
+          //   label: '抽样质检'
+          // },
 
-    typeLabel(type) {
-      return this.typeList.find(m => m.value == type) && this.typeList.find(m => m.value == type).label
-    },
+          {
+            value: 3,
+            label: '抽样质检'
+          },
+          {
+            value: 4,
+            label: '包装工序'
+          },
+          {
+            value: 6,
+            label: '质检工序'
+          },
+          {
+            value: 7,
+            label: '生产准备'
+          }
+        ],
 
-    /*配置工艺参数 */
-    openSetting(row) {
-      this.current = row;
-      this.showSetting = true;
-    },
-    /* 表格数据源 */
-    async datasource({ page, limit, where, order }) {
-      const res = await producetask.list({
-        ...where,
-        ...order,
-        pageNum: page,
-        size: limit
-      });
-      return res;
+        sampleShow: false,
+        taskId: null,
+        cacheKeyUrl: 'abfad404-technology-production',
+        controlListNewList: [], //给公共组件使用
+        workCenterList: [] //工作中心列表
+      };
     },
-
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({ page: 1, where: where });
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工序编码:',
+            value: 'code',
+            type: 'input',
+            placeholder: ''
+          },
+          {
+            label: '工序名称:',
+            value: 'name',
+            type: 'input',
+            placeholder: ''
+          },
+          {
+            label: '控制码:',
+            value: 'controlId',
+            type: 'select',
+            placeholder: '',
+            planList: this.controlListNewList
+          },
+          {
+            label: '工序类型:',
+            value: 'type',
+            type: 'select',
+            placeholder: '',
+            planList: this.typeList
+          },
+          {
+            label: '工作中心:',
+            value: 'workCenterId',
+            type: 'select',
+            placeholder: '',
+            planList: this.workCenterList
+          }
+        ];
+      }
     },
-    /* 打开编辑弹窗 */
-    openEdit(row) {
-      this.getControlList()
-      this.current = row;
-      this.showEdit = true;
-      this.$refs.userEdit.$refs.form &&
-        this.$refs.userEdit.$refs.form.clearValidate();
+    created() {
+      this.getControlList();
+      this.getListWorkCenter();
     },
+    methods: {
+      typeLabel(type) {
+        return (
+          this.typeList.find((m) => m.value == type) &&
+          this.typeList.find((m) => m.value == type).label
+        );
+      },
 
-    getControlList() {
-      const params = {
-        pageNum: 1, size: -1
-      }
-      control.list().then(res => {
-        this.controlList = res.list;
-        this.controlListNewList = res.list.map(m => ({ label: m.name, value: m.id }));
-      })
-    },
+      /*配置工艺参数 */
+      openSetting(row) {
+        this.current = row;
+        this.showSetting = true;
+      },
+      /* 表格数据源 */
+      async datasource({ page, limit, where, order }) {
+        const res = await producetask.list({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit
+        });
+        return res;
+      },
 
-    /* 删除 */
-    remove(row) {
-      const loading = this.$loading({ lock: true });
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
+      /* 打开编辑弹窗 */
+      openEdit(row) {
+        this.getControlList();
+        this.current = row;
+        this.showEdit = true;
+        this.$refs.userEdit.$refs.form &&
+          this.$refs.userEdit.$refs.form.clearValidate();
+      },
 
-      producetask
-        .delete([row.id])
-        .then((msg) => {
-          loading.close();
-          this.$message.success('删除' + msg);
-          this.reload();
-        })
-        .catch((e) => {
-          loading.close();
-          // this.$message.error(e.message);
+      getControlList() {
+        const params = {
+          pageNum: 1,
+          size: -1
+        };
+        control.list().then((res) => {
+          this.controlList = res.list;
+          this.controlListNewList = res.list.map((m) => ({
+            label: m.name,
+            value: m.id
+          }));
         });
-    },
-    /* 批量删除 */
-    removeBatch() {
-      if (!this.selection.length) {
-        this.$message.error('请至少选择一条数据');
-        return;
-      }
-      this.$confirm('确定要删除选中的工序吗?', '提示', {
-        type: 'warning'
-      })
-        .then(() => {
-          const loading = this.$loading({ lock: true });
-          producetask
-            .delete(this.selection.map((d) => d.id))
-            .then((msg) => {
-              loading.close();
-              this.$message.success('删除' + msg);
-              this.reload();
-            })
-            .catch((e) => {
-              loading.close();
-              // this.$message.error(e.message);
-            });
+      },
+
+      /* 删除 */
+      remove(row) {
+        const loading = this.$loading({ lock: true });
+
+        producetask
+          .delete([row.id])
+          .then((msg) => {
+            loading.close();
+            this.$message.success('删除' + msg);
+            this.reload();
+          })
+          .catch((e) => {
+            loading.close();
+            // this.$message.error(e.message);
+          });
+      },
+      /* 批量删除 */
+      removeBatch() {
+        if (!this.selection.length) {
+          this.$message.error('请至少选择一条数据');
+          return;
+        }
+        this.$confirm('确定要删除选中的工序吗?', '提示', {
+          type: 'warning'
         })
-        .catch(() => { });
-    },
+          .then(() => {
+            const loading = this.$loading({ lock: true });
+            producetask
+              .delete(this.selection.map((d) => d.id))
+              .then((msg) => {
+                loading.close();
+                this.$message.success('删除' + msg);
+                this.reload();
+              })
+              .catch((e) => {
+                loading.close();
+                // this.$message.error(e.message);
+              });
+          })
+          .catch(() => {});
+      },
 
-    sampleParam(row) {
-      this.taskId = row.id
-      this.sampleShow = true
-    },
+      sampleParam(row) {
+        this.taskId = row.id;
+        this.sampleShow = true;
+      },
 
-    close(done) {
-        this.sampleShow = false
-    },
-    uploadFile () {
-      this.$refs.importDialogRef.open();
-    },
+      close(done) {
+        this.sampleShow = false;
+      },
+      uploadFile() {
+        this.$refs.importDialogRef.open();
+      },
 
-    // 获取工作中心
-    getListWorkCenter() {
+      // 获取工作中心
+      getListWorkCenter() {
         work.list({ pageNum: 1, size: -1 }).then((res) => {
-          this.workCenterList = res.list.map((m) => ({ label: m.name, value: m.id }));
+          this.workCenterList = res.list.map((m) => ({
+            label: m.name,
+            value: m.id
+          }));
         });
-      },
-  }
-};
+      }
+    }
+  };
 </script>

+ 3 - 7
src/views/technology/stepManagement/index.vue

@@ -33,7 +33,6 @@
             class="ele-btn-icon"
             @click="removeBatch"
             v-if="$hasPermission('main:categoryparam:delete')"
-
             plain
           >
             删除
@@ -56,7 +55,6 @@
             class="ele-btn-icon"
             plain
             v-if="$hasPermission('main:stepManagement:update')"
-
             @click="uploadFile()"
           >
             导入
@@ -90,7 +88,6 @@
             icon="el-icon-edit"
             @click="openEdit(row)"
             v-if="$hasPermission('main:stepManagement:update')"
-
           >
             修改
           </el-link>
@@ -108,7 +105,6 @@
             title="确定要删除当前工步吗?"
             @confirm="remove(row)"
             v-if="$hasPermission('main:stepManagement:delete')"
-
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
@@ -136,9 +132,9 @@
     ></SampleParam>
 
     <importDialog
-      :defModule="moduleName"
       ref="importDialogRef"
-      :fileUrl="'/main/producestep/downLoadTemplate'"
+      apiUrl="/main/producestep/importExcel"
+      fileUrl="/main/producestep/downLoadTemplate"
       fileName="工艺_工步导入模板"
       @success="reload"
     />
@@ -153,7 +149,7 @@
   import SampleParam from './components/sampleParam.vue';
   import stepManagement from '@/api/technology/stepManagement';
   import control from '@/api/technology/control';
-  import importDialog from '@/components/upload/import-dialogNew.vue';
+  import importDialog from '@/components/upload/comm-dialog.vue';
 
   export default {
     name: 'technologyProduction',