BUG修改

This commit is contained in:
a0049873 2022-09-26 09:26:17 +08:00
parent 2688b764e5
commit 67e009d110
1 changed files with 37 additions and 37 deletions

View File

@ -231,7 +231,7 @@ export default {
area: 0, area: 0,
capacity: '', capacity: '',
pic: '', pic: '',
id: '', id: ''
}, },
limit: 10, limit: 10,
page: 1, page: 1,
@ -242,11 +242,11 @@ export default {
rules: { rules: {
name: [ name: [
{ required: true, message: '请输入会议室名称', trigger: 'blur' }, { required: true, message: '请输入会议室名称', trigger: 'blur' },
{ min: 1, trigger: 'blur' }, { min: 1, trigger: 'blur' }
], ],
area: [ area: [
{ required: true, message: '请输入会议室面积', trigger: 'blur' }, { required: true, message: '请输入会议室面积', trigger: 'blur' },
{ min: 1, type: 'number', trigger: 'blur' }, { min: 1, message: '请输入数字', type: 'number', trigger: 'blur' }
], ],
description: [ description: [
{ required: true, message: '请填写描述内容', trigger: 'blur' }, { required: true, message: '请填写描述内容', trigger: 'blur' },
@ -254,14 +254,14 @@ export default {
min: 1, min: 1,
max: 500, max: 500,
message: '长度在 1 到 500 个字符', message: '长度在 1 到 500 个字符',
trigger: 'blur', trigger: 'blur'
}, }
], ]
}, },
formLabelWidth: '120px', formLabelWidth: '120px',
checkImgSuccess: true, checkImgSuccess: true,
dialogVisible: false, dialogVisible: false,
flge: '', flge: ''
} }
}, },
mounted () { mounted () {
@ -337,9 +337,9 @@ export default {
}) })
} else if (i === 'edit') { } else if (i === 'edit') {
this.dialogFormVisible = false this.dialogFormVisible = false
this.$http.put(`/meeting`, this.ruleForm).then(({ data: res }) => { this.$http.put('/meeting', this.ruleForm).then(({ data: res }) => {
this.ruleForm = res.data this.ruleForm = res.data
let imgUrl = { name: res.data.name, url: res.data.pic } const imgUrl = { name: res.data.name, url: res.data.pic }
this.fileList.push(imgUrl) this.fileList.push(imgUrl)
}) })
} }
@ -373,7 +373,7 @@ export default {
this.flge = 'edit' this.flge = 'edit'
this.ruleForm = row this.ruleForm = row
if (row.pic != null) { if (row.pic != null) {
let imgUrl = { name: row.name, url: row.pic } const imgUrl = { name: row.name, url: row.pic }
this.fileList.push(imgUrl) this.fileList.push(imgUrl)
} else { } else {
this.fileList = [] this.fileList = []
@ -384,27 +384,27 @@ export default {
this.$confirm('此操作将永久删除该会议室, 是否继续?', '提示', { this.$confirm('此操作将永久删除该会议室, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
this.$http.put(`/meeting`, { delFlag: 1, id: row.id }).then(() => { this.$http.put('/meeting', { delFlag: 1, id: row.id }).then(() => {
this.queryData() this.queryData()
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!', message: '删除成功!'
}) })
}) })
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消删除', message: '已取消删除'
}) })
}) })
}, },
// //
outDialog() {}, outDialog () {}
}, }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">