loulijun2021
2022-08-12 8ddce4804fcc5c71793b6328bb8601e33fad8a66
src/views/zlgl/qxdy.vue
@@ -4,7 +4,7 @@
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
        <el-button icon="el-icon-download" @click="upload">导入</el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
@@ -138,18 +138,23 @@
        </div>
      </span>
    </el-dialog>
    <!--导入组件-->
    <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateDedect, DedectSearch, DeleteDedect } from '@/api/zlgl'
import ImportPicker from '@/components/ImportPicker'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
  name: 'QXDY',
  components: {
    Pagination
    Pagination, ImportPicker
  },
  data() {
    const validateName = (rule, value, callback) => {
@@ -191,6 +196,16 @@
        defectname: [
          { required: true, message: '请输入缺陷名称', trigger: ['blur', 'change'] }
        ]
      },
      title_value: '数据导入 / 缺陷定义',
      code: '18',
      shows: false
    }
  },
  watch: {
    shows() {
      if (!this.shows) {
        this.getDedectSearch()
      }
    }
  },
@@ -224,8 +239,13 @@
    search() {
      this.getDedectSearch()
    },
    // 导入按钮
    upload() {
      this.shows = true
      this.$refs.importPickerFunc.newDataFunc()
    },
    colos() {
      this.shows = false
    },
    // 重置
    reset() {