refactor(qualityManagement): 移除权限校验指令简化按钮代码
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- :model属性用于表单验证使用 比如下面的el-form-item 的 prop属性用于对表单值进行验证操作 -->
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth" v-show="showSearch" @submit.native.prevent>
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth"
|
||||
v-show="showSearch" @submit.native.prevent>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -19,23 +20,22 @@
|
||||
<!-- 工具区域 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" v-hasPermi="['business:qcbackendbaseoutpackage:add']" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" :disabled="single" v-hasPermi="['business:qcbackendbaseoutpackage:edit']" plain icon="el-icon-edit" size="mini" @click="handleUpdate"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button type="success" :disabled="single" plain icon="el-icon-edit" size="mini"
|
||||
@click="handleUpdate">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:qcbackendbaseoutpackage:delete']" plain icon="el-icon-delete" size="mini" @click="handleDelete"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button type="danger" :disabled="multiple" plain icon="el-icon-delete" size="mini"
|
||||
@click="handleDelete">删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 数据区域 -->
|
||||
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange" @selection-change="handleSelectionChange">
|
||||
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="id" label="主键" align="center" />
|
||||
<el-table-column prop="name" label="对应箱标签名称" align="center" />
|
||||
@@ -45,26 +45,15 @@
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
v-hasPermi="['business:qcbackendbaseoutpackage:edit']"
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
title="编辑"
|
||||
@click="handleUpdate(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-hasPermi="['business:qcbackendbaseoutpackage:delete']"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
title="删除"
|
||||
@click="handleDelete(scope.row)"
|
||||
></el-button>
|
||||
<el-button size="mini" type="success" icon="el-icon-edit" title="编辑"
|
||||
@click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" title="删除"
|
||||
@click="handleDelete(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改质量后道外箱标签打印配置
|
||||
对话框 -->
|
||||
@@ -246,7 +235,7 @@ export default {
|
||||
this.handleQuery()
|
||||
this.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => { })
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
||||
Reference in New Issue
Block a user