yangys
2025-09-09 729b698b17d7468acbc6c495746a72c9150fdaeb
src/views/basesetting/machine.vue
@@ -35,9 +35,10 @@
                <el-button type="primary" plain size="default">导入</el-button>
              </el-upload> -->
              <el-button type="primary" plain @click="importAction">导入</el-button>
               <el-button type="primary" plain @click="downloadTemplate">下载模板
                        </el-button>
              <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleAdd">新增</el-button>
            </div>
          </template>
          <template #menu="scope">
            <el-button type="primary" text size="default" icon="el-icon-edit" @click.stop="handleEdit(scope.row, scope.index)">编辑</el-button>
@@ -158,6 +159,7 @@
        labelWidth: 120,
        emptyBtn: false,
        searchSpan: 8,
        searchEnter:true,
        column: [
          {
            label: '编号/名称',
@@ -345,7 +347,7 @@
            prop: 'sendDirExpiryHours',
            placeholder:"(小时)",
            max:24,
            min:1,
            min:0,
            type: 'number',
            span: 12,
          },
@@ -359,8 +361,8 @@
          {
            label: '回传目录保存时间',
            prop: 'receiveDirExpiryHours',
             max:24,
            min:1,
            max:24,
            min:0,
            placeholder:"(小时)",
            type: 'number',
            span: 12,
@@ -487,6 +489,15 @@
        });
      });
    },
    downloadTemplate() {
      NProgress.start();
      exportBlob(
          `/blade-mdm/machine/download-template`
      ).then(res => {
          downloadXls(res.data, `机床导入模版.xlsx`);
          NProgress.done();
      });
    },
    formSubmit(params, done) {
      var obj = {...params};
      if(params.status.length == 0) {
@@ -510,6 +521,8 @@
          this.$message({type: 'error',message: res.data.msg});
        }
        done();
      }).catch(e=>{
        done();
      });
    },
    handleView() {