loulijun2021
2022-08-24 8be895639f0250ced67a4437e7ebf6854d054749
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
@@ -68,7 +68,12 @@
            prop="descr"
            label="缺陷描述"
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.descr">{{ row.descr }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="lm_user"
            label="创建人员"
@@ -100,7 +105,6 @@
      </div>
      <!--分页-->
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="form.page"
        :limit.sync="form.rows"
@@ -138,18 +142,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 +200,16 @@
        defectname: [
          { required: true, message: '请输入缺陷名称', trigger: ['blur', 'change'] }
        ]
      },
      title_value: '数据导入 / 缺陷定义',
      code: '18',
      shows: false
    }
  },
  watch: {
    shows() {
      if (!this.shows) {
        this.getDedectSearch()
      }
    }
  },
@@ -224,8 +243,13 @@
    search() {
      this.getDedectSearch()
    },
    // 导入按钮
    upload() {
      this.shows = true
      this.$refs.importPickerFunc.newDataFunc()
    },
    colos() {
      this.shows = false
    },
    // 重置
    reset() {