会议室审核加下载附件按钮和输入框报错

This commit is contained in:
zhangzhuliang 2022-09-02 11:06:11 +08:00
parent c3bc043228
commit 205cb756be
3 changed files with 29 additions and 10 deletions

View File

@ -2,7 +2,7 @@
<el-card shadow="never" class="roomBox"> <el-card shadow="never" class="roomBox">
<div class="roomExamineSearch"> <div class="roomExamineSearch">
<el-input <el-input
v-model="roomName" v-model="roomNameA"
style="width: 160px" style="width: 160px"
placeholder="请输入会议室名称" placeholder="请输入会议室名称"
></el-input> ></el-input>
@ -195,6 +195,17 @@
<el-input type="textarea" v-model="desc"></el-input> <el-input type="textarea" v-model="desc"></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="display: flex; margin-top: 20px">
<el-col :span="2">附件</el-col>
<el-col :span="16">
<el-button
v-if="file != ''"
size="mini"
@click="downloadTemplate(file)"
>下载</el-button
>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="No"> </el-button> <el-button @click="No"> </el-button>
<el-button type="primary" @click="ok"> </el-button> <el-button type="primary" @click="ok"> </el-button>
@ -233,8 +244,8 @@ export default {
num: '', num: '',
file: '', file: '',
name: '', name: '',
roomName: '',
creator: '', creator: '',
roomNameA: '',
} }
}, },
mounted() { mounted() {
@ -244,10 +255,9 @@ export default {
getSerach() { getSerach() {
this.$http this.$http
.get( .get(
`/bookMeeting/auditPage?page=${this.page}&limit=${this.limit}&roomName=${this.roomName}&state=${this.value}` `/bookMeeting/auditPage?page=${this.page}&limit=${this.limit}&roomName=${this.roomNameA}&state=${this.value}`
) )
.then(({ data: res }) => { .then(({ data: res }) => {
console.log(res, 7777777)
this.tableData = res.data.list this.tableData = res.data.list
this.total = res.data.total this.total = res.data.total
}) })
@ -276,10 +286,10 @@ export default {
this.creator = item.creator this.creator = item.creator
} else { } else {
this.dialogVisible = true this.dialogVisible = true
}
this.$http.get(`bookMeeting/${item.id}`).then(({ data: res }) => { this.$http.get(`bookMeeting/${item.id}`).then(({ data: res }) => {
this.file = res.data.file this.file = res.data.file
}) })
}
this.lookData = item this.lookData = item
}, },

View File

@ -228,7 +228,7 @@ export default {
ruleForm: { ruleForm: {
name: '', name: '',
num: '', num: '',
area: '', area: 0,
capacity: '', capacity: '',
pic: '', pic: '',
id: '', id: '',
@ -246,7 +246,7 @@ export default {
], ],
area: [ area: [
{ required: true, message: '请输入会议室面积', trigger: 'blur' }, { required: true, message: '请输入会议室面积', trigger: 'blur' },
{ min: 1, trigger: 'blur' }, { min: 1, type: 'number', trigger: 'blur' },
], ],
description: [ description: [
{ required: true, message: '请填写描述内容', trigger: 'blur' }, { required: true, message: '请填写描述内容', trigger: 'blur' },

View File

@ -809,6 +809,7 @@
dept: '', dept: '',
matter: '', matter: '',
file: '', file: '',
roomName: '',
}) })
const fileList = ref([]) const fileList = ref([])
const useForm = Form.useForm const useForm = Form.useForm
@ -838,7 +839,7 @@
phone: [ phone: [
{ {
required: true, required: true,
pattern: /^1[3|4|5|7|8][0-9]\d{8}$/, pattern: /^1[3|4|5|7|8|9][0-9]\d{8}$/,
message: '请输入正确的手机号', message: '请输入正确的手机号',
}, },
], ],
@ -1239,8 +1240,10 @@
} }
// //
const appointment = (item) => { const appointment = (item) => {
console.log(item, 8888888888)
dateId.value = item.id dateId.value = item.id
formState.roomId = item.id formState.roomId = item.id
formState.roomName = item.name
appointmentRoom.value = true appointmentRoom.value = true
} }
// //
@ -1297,6 +1300,12 @@
.then(() => { .then(() => {
setSubmit(formState).then(({ data: res }) => { setSubmit(formState).then(({ data: res }) => {
appointmentRoom.value = false appointmentRoom.value = false
rulesRef.bookDate = []
rulesRef.startTime = []
rulesRef.name = []
rulesRef.matter = []
rulesRef.phone = []
rulesRef.dept = []
formState.roomId = '' formState.roomId = ''
formState.bookDate = '' formState.bookDate = ''
formState.startTime = '' // formState.startTime = '' //