doum
3 天以前 3c7399c25c0f35c8aa7cb6af1935e31d1a3f0102
admin/src/views/operation/device.vue
@@ -4,10 +4,13 @@
    <div class="mt20">
      <el-button type="primary" @click="handleEdit()" icon="el-icon-plus"
        v-permissions="['business:ywpatrolline:create']">新建</el-button>
      <el-button type="primary" v-permissions="['business:ywdevice:importExcel']"
        @click="$refs.deviceImport.open('设备批量导入')">批量导入</el-button>
    </div>
    <el-table v-loading="loading" :data="list" stripe>
      <el-table-column prop="code" label="设备编号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="name" label="设备名称" min-width="100" show-overflow-tooltip />
      <el-table-column prop="deviceNum" label="设备数量" min-width="90" show-overflow-tooltip />
      <el-table-column prop="categoryName" label="设备分类" min-width="100" show-overflow-tooltip />
      <el-table-column prop="modelNo" label="设备型号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="realName" label="管理员" min-width="100" show-overflow-tooltip />
@@ -21,7 +24,8 @@
      </el-table-column>
      <el-table-column label="操作" min-width="130" fixed="right">
        <template slot-scope="{row}">
          <el-button type="text" @click="handleDetail(row)" v-permissions="['business:category:update']">查看详情</el-button>
          <el-button type="text" @click="handleDetail(row)"
            v-permissions="['business:category:update']">查看详情</el-button>
          <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit"
            v-permissions="['business:category:update']">编辑</el-button>
          <el-button type="text" @click="handleDel(row)" icon="el-icon-delete"
@@ -34,6 +38,7 @@
    </div>
    <Edit v-if="showEdit" ref="EditRef" @success="getList" @close="showEdit = false" />
    <Detail ref="DetailRef" />
    <OperaDeviceImportWindow ref="deviceImport" @success="getList(1)" />
  </div>
</template>
@@ -42,13 +47,15 @@
import QueryForm from '@/components/common/QueryForm'
import Edit from './components/deviceEdit'
import Detail from './components/deviceDetail'
import OperaDeviceImportWindow from '@/components/business/OperaDeviceImportWindow'
import { fetchList, deleteById } from '@/api/Inspection/device'
export default {
  components: {
    Pagination,
    QueryForm,
    Edit,
    Detail
    Detail,
    OperaDeviceImportWindow
  },
  data() {
    return {
@@ -119,8 +126,6 @@
      this.$nextTick(() => {
        this.$refs.EditRef.isShowModal = true
        if (row && row.id) {
          console.log('---')
          this.$refs.EditRef.getDetail(row.id)
        }
      })
@@ -146,6 +151,7 @@
    },
    handleSizeChange(capacity) {
      this.pagination.pageSize = capacity
      this.getList()
    }
  }
}