|
@@ -18,7 +18,7 @@
|
|
|
</div>
|
|
|
<el-button type="text" @click="dialogVisible2 = true">邀请成员</el-button>
|
|
|
<el-button type="text">成员</el-button>
|
|
|
- <el-button type="text" v-if="RoomInfo.userid == userid">解散房间</el-button>
|
|
|
+ <el-button type="text" v-if="RoomInfo.userid == userid" @click="dismiss">解散房间</el-button>
|
|
|
</div>
|
|
|
<div
|
|
|
v-for="(item,index) in data"
|
|
@@ -72,7 +72,7 @@
|
|
|
class="add_img"
|
|
|
:src="require('../../assets/grid/add.png')"
|
|
|
fit="cover"
|
|
|
- @click="check(index)"
|
|
|
+ @click="check(index,3)"
|
|
|
></el-image>
|
|
|
</div>
|
|
|
<el-dialog
|
|
@@ -300,6 +300,7 @@ export default {
|
|
|
this.$refs.invite4.innerHTML;
|
|
|
var clipboard = new Clipboard(".tag-read");
|
|
|
clipboard.on("success", (e) => {
|
|
|
+ this.$message.success("复制成功");
|
|
|
console.log("复制成功");
|
|
|
clipboard.destroy(); // 释放内存
|
|
|
});
|
|
@@ -355,7 +356,7 @@ export default {
|
|
|
},
|
|
|
check(index, type) {
|
|
|
this.gIndex = index;
|
|
|
- if (this.data[index].userid != this.userid && type != 2) {
|
|
|
+ if (this.data[index].userid != this.userid && type != 2 && type != 3) {
|
|
|
this.$message.error("你不是上传人无权限修改");
|
|
|
return;
|
|
|
}
|
|
@@ -409,6 +410,9 @@ export default {
|
|
|
this.$message.error("至少上传一个视频或者一张图片");
|
|
|
return;
|
|
|
}
|
|
|
+ if(!this.data[this.gIndex]){
|
|
|
+ this.data[this.gIndex] = {}
|
|
|
+ }
|
|
|
if (this.file.photo) {
|
|
|
this.data[this.gIndex].photo = this.file.photo;
|
|
|
} else {
|
|
@@ -673,6 +677,30 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ dismiss() {
|
|
|
+ this.$confirm("确定解散房间吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ id: this.RoomInfo.id,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "dismiss", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("解散成功");
|
|
|
+ this.$router.go(0);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
clearInterval(this.timer);
|