Commit 96b197ec authored by 高宇's avatar 高宇

删除菜单

parent 05352b73
......@@ -75,8 +75,7 @@
</el-table-column>
<el-table-column label="pgx" prop="pgx">
<template slot-scope="scope">
<span v-if="scope.row.pgx === '001'">压缩</span>
<span v-if="scope.row.pgx === '002'">排水</span>
<span>{{replace(scope.row.pgx)}}</span>
</template>
</el-table-column>
<el-table-column label="pnumber" prop="pnumber">
......@@ -396,11 +395,12 @@ import {
checkPermission
} from '@/api/equipment/draw'
import { parseTime } from '@/utils'
import { getEquipment } from '@/api/equipment/application'
import {getDictData, getEquipment} from '@/api/equipment/application'
export default {
name: 'Draw',
data() {
return {
dictList: [],
number: '',
monthDate: false,
// 是否切换库
......@@ -511,8 +511,23 @@ export default {
},
created() {
this.getList()
this.getCodeDict()
},
methods: {
replace(value) {
return this.dictList.find(item => item.dictValue === value).dictLabel
},
getCodeDict() {
const obj = {
key: 'GX_CODE'
}
getDictData(obj).then(res => {
console.log('res', res)
if (res.code === 200 && res.data !== null) {
this.dictList = res.data
}
})
},
handleClose() {
this.openLogin = false
this.openHandle = true
......
......@@ -378,7 +378,7 @@
</div>
</el-dialog>
<el-dialog title="权限校验" :visible.sync="menu" width="500px" append-to-body :close-on-click-modal="false" @close="handlemenuClose">
<el-dialog title="权限验证" :visible.sync="menu" width="500px" append-to-body :close-on-click-modal="false" @close="handlemenuClose">
<div style="text-align: center">
<span style="font-size: 15px">您选择的设备入库日期较早,需要权限验证 </span>
</div>
......@@ -399,6 +399,7 @@
<el-form ref="form" :model="loginform" label-width="80px">
<el-form-item label="密码">
<el-input v-model="loginform.password" type="password" placeholder="请输入密码" />
<span v-if="errorPassword" style="font-size: 14px;color: red">密码错误,请重试</span>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleConfirm">确定</el-button>
......@@ -415,6 +416,7 @@ export default {
name: 'Draw',
data() {
return {
errorPassword: false,
isClose: false,
number: '',
menu: false,
......@@ -560,7 +562,10 @@ export default {
this.loadingDetail = false
this.openHandle = true
this.loginform.password = ''
if (!this.isClose) {
console.log('isClose',this.isClose)
if (this.isClose) {
this.radio1 = '1'
} else {
this.radio1 = '2'
}
},
......@@ -636,12 +641,14 @@ export default {
},
// 菜单权限验证确定
handleConfirm() {
this.isClose = false
const obj = {
passWord: this.loginform.password
}
checkPermission(obj).then(res => {
if (res.code === 200) {
this.isClose = true
this.errorPassword = false
this.openLogin = false
if (this.radio1 === '1') {
this.$message.success('已切换到设备库')
......@@ -672,16 +679,7 @@ export default {
})
} else if (res.code === null) {
this.isClose = false
this.$message.warning(res.message)
if (this.radio1 === '2') {
this.radio1 = '1'
} else {
this.radio1 = '2'
}
this.loadingDetail = false
this.openHandle = true
this.loginform.password = ''
this.openLogin = false
this.errorPassword = true
}
})
},
......@@ -904,6 +902,8 @@ export default {
},
// 登录
login() {
this.errorPassword = false
this.isClose = false
console.log('radio1', this.radio1)
if (this.radio1 === '1') {
this.title = '权限验证'
......
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