Commit c6d2ba77 authored by cat's avatar cat

印刷权限控制

parent 4d705d9f
...@@ -22,3 +22,10 @@ export function addYsList(data) { ...@@ -22,3 +22,10 @@ export function addYsList(data) {
} }
}) })
} }
// 逻辑删除印刷接口
export function deleteYs(id) {
return request({
url: '/wbwarehouseys/deleteLogical/' + id,
method: 'delete'
})
}
...@@ -82,13 +82,21 @@ ...@@ -82,13 +82,21 @@
<el-table-column label="操作" class-name="small-padding fixed-width" width="200px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.appstatus === '0'" v-if="scope.row.appstatus === '0' && username === 'admin'"
size="mini" size="mini"
type="text" type="text"
style="color: #49cec9" style="color: #49cec9"
@click="handle(scope.row)" @click="handle(scope.row)"
>处理 >处理
</el-button> </el-button>
<el-button
v-if="username === 'admin'"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- size="mini"--> <!-- size="mini"-->
<!-- type="text"--> <!-- type="text"-->
...@@ -414,12 +422,14 @@ import { ...@@ -414,12 +422,14 @@ import {
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { getDictData, getEquipment } from '@/api/equipment/application' import { getDictData, getEquipment } from '@/api/equipment/application'
import { addUser, updateUser } from '@/api/system/user' import { addUser, updateUser } from '@/api/system/user'
import { addYsList, getYsList } from '@/api/equipment/printingCheck' import { addYsList, deleteYs, getYsList } from '@/api/equipment/printingCheck'
export default { export default {
name: 'Draw', name: 'Draw',
data() { data() {
return { return {
// 用户
username: this.$store.state.user.name,
// 印刷列表 // 印刷列表
ysList: [], ysList: [],
// 表单校验 // 表单校验
...@@ -1021,16 +1031,16 @@ export default { ...@@ -1021,16 +1031,16 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.businessId const id = row.businessId
this.$confirm('是否确认操作?', '提示', { this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(res => { }).then(res => {
deleteLogical(id).then(res => { deleteYs(id).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('操作成功') this.$message.success('删除成功')
this.queryParams.page = 1 this.queryParams.page = 1
this.getList() this.getYsList()
} }
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment