loulijun2021
2022-09-01 99a010f21d278498bafd248217c584e101db2d8f
src/views/sbgl/djbw.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div class="bodyTopButtonGroup">
      <div class="bodyTopButtonGroup" style="justify-content: space-between">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button icon="el-icon-download" @click="upload">导入</el-button>
      </div>
@@ -71,6 +71,7 @@
          <el-table-column
            prop="RowNum"
            width="50"
            fixed
            label="序号"
          />
          <el-table-column
@@ -86,16 +87,28 @@
          <el-table-column
            prop="description"
            label="点检要求"
            show-tooltip-when-overflow
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.description">{{ row.description }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="isscan"
            label="选择扫码"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.isscan==='Y'">是</div>
              <div v-if="row.isscan==='N'">否</div>
              <div v-if="row.isscan==='Y'">
                <svg-icon icon-class="circleYes" style="margin-right: 2px" />
                是
              </div>
              <div v-if="row.isscan==='N'">
                <svg-icon icon-class="circleNo" style="margin-right: 2px" />
                否
              </div>
            </template>
          </el-table-column>
          <el-table-column
@@ -142,7 +155,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getDeviceCheckItemSearch"
      />
@@ -207,7 +220,14 @@
    </el-dialog>
    <!--导入组件-->
    <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
    <import-picker
      ref="importPickerFunc"
      class="importPickerClass"
      :shows.sync="shows"
      :title="title_value"
      :colos="colos"
      :code="code"
    />
  </div>
</template>
@@ -268,7 +288,7 @@
        checkitemname: '', // 设备点检部位名称
        checkitemdescr: '', // 设备点检部位要求
        cycle: 'D', // 设备点检部位周期
        isqrcode: 'Y', // 是否扫码
        isqrcode: 'N', // 是否扫码
        OperType: '' // 操作类型
      },
      operation: '',
@@ -334,7 +354,7 @@
    reset() {
      this.form.checkitemcode = ''
      this.form.checkitemname = ''
      this.form.checkitemdescr = ''
      this.form.checkdescr = ''
      this.form.isqrcode = ''
      this.form.cycle = ''
      this.getDeviceCheckItemSearch()
@@ -353,7 +373,7 @@
      this.$nextTick(() => {
        this.dialogForm.id = row.id
        this.dialogForm.cycle = row.cycle
        this.dialogForm.isscan = row.isqrcode
        this.dialogForm.isqrcode = row.isscan
        this.dialogForm.checkitemcode = row.code
        this.dialogForm.checkitemname = row.name
        this.dialogForm.checkitemdescr = row.description
@@ -369,6 +389,9 @@
        DeleteDeviceCheckItem({ checkitemcode: row.code }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            if (this.form.page > 1 && this.tableData.length === 1) {
              this.form.page--
            }
            this.getDeviceCheckItemSearch()
          }
        })
@@ -383,7 +406,7 @@
      this.dialogForm.checkitemname = ''
      this.dialogForm.checkitemdescr = ''
      this.dialogForm.cycle = 'D'
      this.dialogForm.isqrcode = 'Y'
      this.dialogForm.isqrcode = 'N'
      this.$refs.dialogForm.clearValidate()
    },
    // 对话框取消