Commit ff7452c4 authored by 高宇's avatar 高宇

删除菜单

parent d9a999ba
......@@ -337,7 +337,17 @@
</div>
</el-dialog>
<!-- 登录验证-->
<el-dialog title="菜单权限" :visible.sync="menu" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="menuform" label-width="80px">
<el-form-item label="密码">
<el-input v-model="menuform.passWord" type="password" placeholder="请输入权限菜单密码" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handlemenuConfirm">确定</el-button>
</el-form-item>
</el-form>
</el-dialog>
<!-- 菜单权限验证-->
<el-dialog :title="title" :visible.sync="openLogin" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="loginform" label-width="80px">
<el-form-item label="密码">
......@@ -358,6 +368,11 @@ export default {
name: 'Draw',
data() {
return {
menu: false,
menuform: {
},
monthDate: false,
// 是否切换库
isCheck: false,
loginform: {
......@@ -488,6 +503,41 @@ export default {
this.getList()
},
methods: {
handlemenuConfirm() {
const obj = {
passWord: this.menuform.passWord
}
checkPermission(obj).then(res => {
if (res.code === 200) {
console.log('canceList',this.canceList)
batchAddition(this.canceList).then(res => {
if (res.code === 200) {
this.loadingDetail = false
this.openHandle = false
this.radio1 = '2'
this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
}
})
this.menuform.password = ''
} else if (res.code === null) {
this.$message.warning(res.message)
this.loadingDetail = false
this.multipleSelection = false
this.monthDate = false
this.menu = false
}
})
},
// 判断时间范围 是否是一个月以内的的时间
isWithinLastMonth(dateToCheck) {
var currentDate = new Date() // 当前日期对象
var oneMonthAgo = new Date() // 一个月前的日期对象
oneMonthAgo.setMonth(currentDate.getMonth() - 1) // 将一个月前的日期设置为当前月份减1
return dateToCheck >= oneMonthAgo && dateToCheck <= currentDate
},
handlecanceClose() {
this.loadingDetail = false
this.openHandle = false
......@@ -584,6 +634,10 @@ export default {
this.canceList = []
this.multipleSelection.forEach(item => {
console.log('item', item)
if (!this.isWithinLastMonth(new Date(item.recycleDate))) {
this.monthDate = true
this.openHandle = false
}
const obj = {
applyId: this.applyId,
pn: item.pn,
......@@ -597,17 +651,23 @@ export default {
this.canceList.push(obj)
})
console.log('canceList', this.canceList)
batchAddition(this.canceList).then(res => {
if (res.code === 200) {
this.loadingDetail = false
this.openHandle = false
this.radio1 = '2'
this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
}
})
console.log('monthDate', this.monthDate)
if (this.monthDate) {
this.menu = true
}
if (!this.monthDate) {
batchAddition(this.canceList).then(res => {
if (res.code === 200) {
this.loadingDetail = false
this.openHandle = false
this.radio1 = '2'
this.isCheck = false
this.$message.success('操作成功')
this.queryParams.page = 1
this.getList()
}
})
}
}
},
/** 查询warehouse列表 */
......@@ -643,6 +703,7 @@ export default {
},
handle(row) {
console.log('row', row)
this.monthDate = false
this.applyId = row.businessId
this.pn = row.pn
this.ptype = row.ptype
......
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