|
|
|
@ -1,7 +1,7 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<card-container>
|
|
|
|
<card-container>
|
|
|
|
<vxe-toolbar>
|
|
|
|
<vxe-toolbar export print ref="toolbar">
|
|
|
|
<template #buttons>
|
|
|
|
<template #buttons>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
icon="el-icon-plus"
|
|
|
|
icon="el-icon-plus"
|
|
|
|
@ -76,21 +76,8 @@
|
|
|
|
field="room_id"
|
|
|
|
field="room_id"
|
|
|
|
width="180"
|
|
|
|
width="180"
|
|
|
|
title="会议室"
|
|
|
|
title="会议室"
|
|
|
|
:edit-render="{}"
|
|
|
|
:edit-render="{ name: 'select', options: rooms, optionProps: { value: 'id', label: 'name' } }"
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #edit="{ row }">
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
|
|
v-model="row.room_id"
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in rooms"
|
|
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
|
|
:value="item.id"
|
|
|
|
|
|
|
|
:label="item.name"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
</vxe-column>
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
field="content"
|
|
|
|
field="content"
|
|
|
|
@ -99,15 +86,25 @@
|
|
|
|
:edit-render="{ name: 'input', attrs: { type: 'text' } }"
|
|
|
|
:edit-render="{ name: 'input', attrs: { type: 'text' } }"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<vxe-column
|
|
|
|
<vxe-column
|
|
|
|
field="user_ids"
|
|
|
|
field="users"
|
|
|
|
width="220"
|
|
|
|
width="220"
|
|
|
|
title="参会用户"
|
|
|
|
title="参会用户"
|
|
|
|
|
|
|
|
:formatter="({ cellValue }) => (cellValue && cellValue instanceof Array) ? cellValue.map(i => i.name).toString() : ''"
|
|
|
|
:edit-render="{}"
|
|
|
|
:edit-render="{}"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #edit="{ row }">
|
|
|
|
<template #edit="{ row }">
|
|
|
|
<user-picker v-model="row.user_ids" multiple style="width: 100%;" />
|
|
|
|
<user-picker v-model="row.user_ids" multiple style="width: 100%;" />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</vxe-column>
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
<vxe-column field="files_details" title="附件" min-width="180" header-align="center" align="left" :edit-render="{}">
|
|
|
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
|
|
|
|
<vxe-upload v-model="row.files_details" readonly progress-text="{percent}%" :more-config="{ maxCount: 1, layout: 'horizontal' }" :show-button-text="false" />
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template #edit="{ row }">
|
|
|
|
|
|
|
|
<vxe-upload v-model="row.files_details" progress-text="{percent}%" :more-config="{ maxCount: 1, layout: 'horizontal' }" :limit-size="20" :show-button-text="false" :upload-method="({file}) => uploadMethod(file, row)" />
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
<vxe-column field="meeting_status" title="审核状态" align="center" :formatter="({ cellValue }) => ['待审核','通过','未通过'][cellValue]" width="100" />
|
|
|
|
<vxe-column field="operate" title="操作" min-width="220">
|
|
|
|
<vxe-column field="operate" title="操作" min-width="220">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<template v-if="isActiveStatus(row)">
|
|
|
|
<template v-if="isActiveStatus(row)">
|
|
|
|
@ -123,7 +120,7 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<template v-else>
|
|
|
|
<el-button size="small" type="primary" @click=""
|
|
|
|
<el-button size="small" type="primary" @click="examine(row)"
|
|
|
|
>审核</el-button
|
|
|
|
>审核</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button size="small" type="warning" @click="editRowEvent(row)"
|
|
|
|
<el-button size="small" type="warning" @click="editRowEvent(row)"
|
|
|
|
@ -165,6 +162,7 @@
|
|
|
|
<add-meeting
|
|
|
|
<add-meeting
|
|
|
|
ref="AddMeeting"
|
|
|
|
ref="AddMeeting"
|
|
|
|
:rooms="rooms"
|
|
|
|
:rooms="rooms"
|
|
|
|
|
|
|
|
:type="isShowType"
|
|
|
|
:is-show.sync="isShowAdd"
|
|
|
|
:is-show.sync="isShowAdd"
|
|
|
|
@refresh="getList"
|
|
|
|
@refresh="getList"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
@ -177,6 +175,8 @@ import { destroy, index, save } from "@/api/meeting";
|
|
|
|
import { index as meetingRoomIndex } from "@/api/meetingRoom";
|
|
|
|
import { index as meetingRoomIndex } from "@/api/meetingRoom";
|
|
|
|
import AddMeeting from "./components/AddMeeting.vue";
|
|
|
|
import AddMeeting from "./components/AddMeeting.vue";
|
|
|
|
import UserPicker from "@/components/UserPicker/index.vue";
|
|
|
|
import UserPicker from "@/components/UserPicker/index.vue";
|
|
|
|
|
|
|
|
import axios from "axios";
|
|
|
|
|
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
@ -185,13 +185,16 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
examineKey: 0,
|
|
|
|
isShowAdd: false,
|
|
|
|
isShowAdd: false,
|
|
|
|
|
|
|
|
isShowType: 'add',
|
|
|
|
rooms: [],
|
|
|
|
rooms: [],
|
|
|
|
|
|
|
|
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
select: {
|
|
|
|
select: {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
page_size: 20,
|
|
|
|
page_size: 20,
|
|
|
|
|
|
|
|
show_relation: ['users']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
allAlign: null,
|
|
|
|
allAlign: null,
|
|
|
|
@ -208,6 +211,7 @@ export default {
|
|
|
|
meeting_status: "",
|
|
|
|
meeting_status: "",
|
|
|
|
files: [],
|
|
|
|
files: [],
|
|
|
|
user_ids: [],
|
|
|
|
user_ids: [],
|
|
|
|
|
|
|
|
files_details: []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -224,7 +228,40 @@ export default {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
this.getRooms();
|
|
|
|
this.getRooms();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
this.bindToolbar()
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
uploadMethod(file, row) {
|
|
|
|
|
|
|
|
const formData = new FormData()
|
|
|
|
|
|
|
|
formData.append('file', file)
|
|
|
|
|
|
|
|
return axios.post(process.env.VUE_APP_UPLOAD_API, formData, {
|
|
|
|
|
|
|
|
headers: {
|
|
|
|
|
|
|
|
Authorization: `Bearer ${getToken()}`,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
|
|
|
if (response.status === 200 && !response.data.code) {
|
|
|
|
|
|
|
|
if (!(this.form['files_details'] instanceof Array)) {
|
|
|
|
|
|
|
|
this.form['files_details'] = []
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.form['files_details'].push({
|
|
|
|
|
|
|
|
response: response.data.data,
|
|
|
|
|
|
|
|
name: response.data.data.original_name,
|
|
|
|
|
|
|
|
url: response.data.data.url
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error("上传失败")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
bindToolbar() {
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
if (this.$refs["table"] && this.$refs["toolbar"]) {
|
|
|
|
|
|
|
|
this.$refs["table"].connect(this.$refs["toolbar"]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
editRowEvent(row) {
|
|
|
|
editRowEvent(row) {
|
|
|
|
if (this.$refs["table"]) {
|
|
|
|
if (this.$refs["table"]) {
|
|
|
|
this.$refs["table"].setEditRow(row);
|
|
|
|
this.$refs["table"].setEditRow(row);
|
|
|
|
@ -279,10 +316,8 @@ export default {
|
|
|
|
for (const key in form) {
|
|
|
|
for (const key in form) {
|
|
|
|
form[key] = row[key];
|
|
|
|
form[key] = row[key];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!form.password) {
|
|
|
|
|
|
|
|
delete form.password;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
form['files'] = this.form['files_details'].map(i => i.response?.id)
|
|
|
|
await save(form);
|
|
|
|
await save(form);
|
|
|
|
await this.getList();
|
|
|
|
await this.getList();
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
@ -314,6 +349,12 @@ export default {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async examine(row) {
|
|
|
|
|
|
|
|
this.isShowType = 'examine'
|
|
|
|
|
|
|
|
this.$refs['AddMeeting'].getDetail(row)
|
|
|
|
|
|
|
|
this.isShowAdd = true
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|