提交 ab0b5594 编写于 作者: changdi.hao's avatar changdi.hao

Merge branch 'dev-circle-live-20200814' into 'release'

圈子五期  codereviewer 张平

圈子五期  codereviewer 张平

See merge request !207
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
"node-sass": "^4.9.2", "node-sass": "^4.9.2",
"pdfh5": "^1.3.9", "pdfh5": "^1.3.9",
"qrcode": "^1.3.3", "qrcode": "^1.3.3",
"qrcodejs2": "^0.0.2",
"showdown": "^1.6.4", "showdown": "^1.6.4",
"sortablejs": "^1.10.0-rc3", "sortablejs": "^1.10.0-rc3",
"video.js": "^7.8.2", "video.js": "^7.8.2",
......
...@@ -67,7 +67,8 @@ ...@@ -67,7 +67,8 @@
<span class="word-num">{{(formData.introduce).replace(/\s+/g,"").length}}/40</span> <span class="word-num">{{(formData.introduce).replace(/\s+/g,"").length}}/40</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="内容发布权限" prop="dynamicFlag"> <el-form-item label="话题发布权限" prop="dynamicFlag">
<el-select <el-select
v-model="formData.dynamicFlag" v-model="formData.dynamicFlag"
@change="returnTypeData('dynamicFlag')" @change="returnTypeData('dynamicFlag')"
...@@ -82,6 +83,10 @@ ...@@ -82,6 +83,10 @@
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
<el-tooltip class="item" effect="dark" content="若选择管理员可发布,则只有管理员才能在小圈内发布话题" placement="top">
<!--<span class="el-icon-info"></span>-->
<i class="el-icon-info" style="color: #449284;"></i>
</el-tooltip>
</el-form-item> </el-form-item>
<el-dialog <el-dialog
...@@ -245,7 +250,7 @@ ...@@ -245,7 +250,7 @@
const isPNG = file.type === "image/png"; const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size; const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (!isJPG && !isPNG) { if (!isJPG && !isPNG) {
vm.$message.error("图片格式不符合规范,请根据规范上传图片"); vm.$message.error("图片必须是jpegpng格式,同时长宽尺寸和图片大小需符合要求");
// return; // return;
} }
// if (!isLt2M) { // if (!isLt2M) {
...@@ -262,7 +267,7 @@ ...@@ -262,7 +267,7 @@
let _this = this; let _this = this;
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) { // if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
if (_this.width < fileLimit.width || _this.height < fileLimit.height) { if (_this.width < fileLimit.width || _this.height < fileLimit.height) {
vm.$message.error("图片尺寸不符合规范,请根据规范上传图片"); vm.$message.error("图片必须是jpegpng格式,同时长宽尺寸和图片大小需符合要求");
return; return;
} }
else if(_this.width > fileLimit.width || _this.height > fileLimit.height){ else if(_this.width > fileLimit.width || _this.height > fileLimit.height){
......
...@@ -25,12 +25,39 @@ export const getRangeList = (params) => { ...@@ -25,12 +25,39 @@ export const getRangeList = (params) => {
}) })
}; };
export const getCircleSettingList = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/app/${params.circleId}/list`),
method: 'get',
description: '查看生态圈应用配置',
})
};
export const saveCircleSetting = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/app/save`),
method: 'post',
data: params,
description: '保存生态圈应用配置',
})
};
export const downloadSigninfo = (params) => {
return fetch({
headers,
url: getBaseUrl(`rtc/liveAdmin/download/signInfo/${params.rtcId}`),
method: 'get',
description: '下载签到信息表'
})
};
export const updateRangeStatus = (params) => { export const updateRangeStatus = (params) => {
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`circle/circle/change/${params.id}/status/to/${params.status}`), url: getBaseUrl(`circle/circle/change/${params.id}/status/to/${params.status}`),
method: 'get', method: 'get',
// params: params,
description: '查询单个直播', description: '查询单个直播',
}) })
}; };
...@@ -40,7 +67,6 @@ export const getRtcInfo = (params) => { ...@@ -40,7 +67,6 @@ export const getRtcInfo = (params) => {
headers, headers,
url: getBaseUrl(`rtc/liveAdmin/${params.rtcId}`), url: getBaseUrl(`rtc/liveAdmin/${params.rtcId}`),
method: 'get', method: 'get',
// params: params,
description: '查询单个直播', description: '查询单个直播',
}) })
}; };
...@@ -51,7 +77,6 @@ export const getPlayback = (params) => { ...@@ -51,7 +77,6 @@ export const getPlayback = (params) => {
headers, headers,
url: getBaseUrl(`rtc/liveAdmin/playback/${params.rtcId}`), url: getBaseUrl(`rtc/liveAdmin/playback/${params.rtcId}`),
method: 'get', method: 'get',
// params: params,
description: '查询回放信息', description: '查询回放信息',
}) })
}; };
......
...@@ -82,6 +82,40 @@ ...@@ -82,6 +82,40 @@
</el-form-item> </el-form-item>
<el-form-item label="是否签到" class="required-label">
<el-radio-group v-model="formData.isSign" size="small" @change="changeSign">
<el-radio :label="0" :disabled="styleEditFlag">不签到</el-radio>
<el-radio :label="1" :disabled="styleEditFlag">签到</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="签到时间" v-if="signFlag">
<el-col :span="9">
<el-input
type="number"
:min="1"
:max="1000"
size="small"
v-model="formData.signMinute"
placeholder="开播后超过此时长无法签到"
style="width:70%;"
:disabled="styleEditFlag"
@blur="resetSignMinute"
></el-input>
<span></span>
<el-tooltip class="item" effect="dark" content="若不设置此时长,则直播全程可签到" placement="top">
<!--<span class="el-icon-info"></span>-->
<i class="el-icon-info" style="color: #449284;"></i>
</el-tooltip>
</el-col>
</el-form-item>
<!-- <el-form-item label="直播开始通知">-->
<!-- <el-checkbox size="small" v-model="checked" :disabled="styleEditFlag">App通知</el-checkbox>-->
<!-- </el-form-item>-->
<el-form-item label="直播中人数显示规则" prop="streamType"> <el-form-item label="直播中人数显示规则" prop="streamType">
<el-radio-group v-model="formData.countRule" size="small"> <el-radio-group v-model="formData.countRule" size="small">
...@@ -614,8 +648,13 @@ ...@@ -614,8 +648,13 @@
tabs: [{ tabs: [{
name: "", name: "",
contents: [] contents: []
}] }],
isSign: 0,
signMinute: "",
isAppPush: 0
}, },
checked: false,
signFlag: false,
tabFlag: "0", tabFlag: "0",
backgroundImageIdTemp: '', backgroundImageIdTemp: '',
backgroundImageUrlTemp: "", backgroundImageUrlTemp: "",
...@@ -681,6 +720,13 @@ ...@@ -681,6 +720,13 @@
required: true, message: "请选择直播方式", trigger: 'blur' required: true, message: "请选择直播方式", trigger: 'blur'
}], }],
// signMinute: [{
// min: 1,
// max: 1000,
// message: "不能输入0",
// trigger: "blur"
// }],
scope:[ scope:[
{required: true} {required: true}
], ],
...@@ -996,7 +1042,7 @@ ...@@ -996,7 +1042,7 @@
const isPNG = file.type === "image/png"; const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size; const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (!isJPG && !isPNG) { if (!isJPG && !isPNG) {
vm.$message.error("图片格式不符合规范,请根据规范上传图片"); vm.$message.error("图片必须是jpegpng格式,同时长宽尺寸和图片大小需符合要求");
return; return;
} }
// if (!isLt2M) { // if (!isLt2M) {
...@@ -1024,7 +1070,7 @@ ...@@ -1024,7 +1070,7 @@
// 图片大小不正常,则进行裁剪 // 图片大小不正常,则进行裁剪
// 直播简介,简介要求750*(高度<3000) // 直播简介,简介要求750*(高度<3000)
if((vm.cropperIndex == 10 || vm.cropperIndex == 40) && (_this.width < fileLimit.width || _this.height > fileLimit.height)) { if((vm.cropperIndex == 10 || vm.cropperIndex == 40) && (_this.width < fileLimit.width || _this.height > fileLimit.height)) {
vm.$message.error("图片尺寸不符合规范,请根据规范上传图片"); vm.$message.error("图片必须是jpegpng格式,同时长宽尺寸和图片大小需符合要求");
return return
} }
// else if(vm.cropperIndex == 10 && (_this.width > fileLimit.width || _this.height > fileLimit.height)){ // else if(vm.cropperIndex == 10 && (_this.width > fileLimit.width || _this.height > fileLimit.height)){
...@@ -1034,7 +1080,7 @@ ...@@ -1034,7 +1080,7 @@
// return; // return;
// } // }
if(vm.cropperIndex != 10 && vm.cropperIndex != 40 && (_this.width < fileLimit.width || _this.height < fileLimit.height)) { if(vm.cropperIndex != 10 && vm.cropperIndex != 40 && (_this.width < fileLimit.width || _this.height < fileLimit.height)) {
vm.$message.error("图片尺寸不符合规范,请根据规范上传图片"); vm.$message.error("图片必须是jpegpng格式,同时长宽尺寸和图片大小需符合要求");
return; return;
} }
// 图片大小不正常,则进行裁剪 // 图片大小不正常,则进行裁剪
...@@ -1264,6 +1310,17 @@ ...@@ -1264,6 +1310,17 @@
}, },
// 直播方式
changeSign(){
if(this.formData.isSign == 1){
this.signFlag = true;
}
else {
this.signFlag = false;
}
},
// 是否公开 // 是否公开
changeScope(value){ changeScope(value){
...@@ -1563,6 +1620,15 @@ ...@@ -1563,6 +1620,15 @@
this.setbgImage(); this.setbgImage();
} }
this.changeSign();
// this.checked = this.formData.isAppPush == 1 ? true: false;
if(this.formData.signMinute == 0 || this.formData.signMinute == undefined){
this.formData.signMinute = "";
}
this.formData.scope = String(this.formData.scope); this.formData.scope = String(this.formData.scope);
this.formData.countRule = String(this.formData.countRule); this.formData.countRule = String(this.formData.countRule);
this.formData.antiScreenCap = String(this.formData.antiScreenCap); this.formData.antiScreenCap = String(this.formData.antiScreenCap);
...@@ -1650,6 +1716,12 @@ ...@@ -1650,6 +1716,12 @@
} }
} }
// this.formData.isAppPush = this.checked == true ? 1: 0;
if(this.formData.signMinute == "" || this.formData.signMinute == undefined){
this.formData.signMinute = 0;
}
// this.formData.rtcIntroduces[0].content = this.formData.textContent; // this.formData.rtcIntroduces[0].content = this.formData.textContent;
// 直播简介图片版 // 直播简介图片版
// this.formData.rtcIntroduces[1].type = 2; // this.formData.rtcIntroduces[1].type = 2;
...@@ -1814,7 +1886,17 @@ ...@@ -1814,7 +1886,17 @@
this.formData.tabs[0].name = ""; this.formData.tabs[0].name = "";
this.formData.tabs[0].contents = []; this.formData.tabs[0].contents = [];
} }
},
resetSignMinute(){
if(this.formData.signMinute == 0){
this.formData.signMinute = "";
}
else if(this.formData.signMinute > 1000){
this.formData.signMinute = 1000;
}
} }
}, },
} }
</script> </script>
...@@ -1958,4 +2040,11 @@ ...@@ -1958,4 +2040,11 @@
height: 100px; height: 100px;
float: left; float: left;
} }
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #449284;
border-color: #449284;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #449284;
}
</style> </style>
...@@ -115,6 +115,11 @@ ...@@ -115,6 +115,11 @@
> >
<el-table :data="dialogStatisticsData" align="center"> <el-table :data="dialogStatisticsData" align="center">
<el-table-column property="peopleNum" label="观看人数" align="center"></el-table-column> <el-table-column property="peopleNum" label="观看人数" align="center"></el-table-column>
<el-table-column property="signNum" v-if="isSign == 1" label="签到人数" align="center">
<template slot-scope="scope">
<el-link @click="downlodExcel()">{{ scope.row.signNum }}</el-link>
</template>
</el-table-column>
<el-table-column property="liveDuration" label="直播时长(分钟)" align="center"></el-table-column> <el-table-column property="liveDuration" label="直播时长(分钟)" align="center"></el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
...@@ -151,7 +156,12 @@ ...@@ -151,7 +156,12 @@
<div class="href_style">观众链接 {{audienceUrl}}</div> <div class="href_style">观众链接 {{audienceUrl}}</div>
<el-col class="href_outer_border"> <el-col class="href_outer_border">
<el-link type="primary" @click="copyTxt(3)" size="small" class="href_button_style">复制</el-link> <el-link type="primary" @click="copyTxt(3)" size="small" class="href_button_style">复制</el-link>
<el-link type="primary">|</el-link>
<el-link type="primary" @click="previewQrcode()" size="small">预览二维码</el-link>
</el-col> </el-col>
<!--<el-col class="href_outer_border">-->
<!--<el-link type="primary" @click="previewQrcode(3)" size="small" class="href_button_style">预览二维码</el-link>-->
<!--</el-col>-->
</div> </div>
</el-dialog> </el-dialog>
...@@ -238,6 +248,15 @@ ...@@ -238,6 +248,15 @@
</div> </div>
</el-dialog>
<!--预览二维码-->
<el-dialog
title="预览"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose">
<div id="qrcode" class="qrcode-wrap"></div>
<span slot="footer" class="dialog-footer"></span>
</el-dialog> </el-dialog>
<!--<el-dialog--> <!--<el-dialog-->
<!--title="关闭回放"--> <!--title="关闭回放"-->
...@@ -267,14 +286,19 @@ import DownloadJS from "@/utils/download/download4"; ...@@ -267,14 +286,19 @@ import DownloadJS from "@/utils/download/download4";
let vm = null; let vm = null;
import BreadCrumb from "@/components/breadcrumb.vue"; import BreadCrumb from "@/components/breadcrumb.vue";
import { getPlayback, postPlayback, updateLiveStatus } from "../../utils/yqrange/yqrangeApi"; import { getPlayback, postPlayback, updateLiveStatus, downloadSigninfo } from "../../utils/yqrange/yqrangeApi";
import { doUpload, getFilePath, unsubscribe } from "../../utils/qiniu-util"; import { doUpload, getFilePath, unsubscribe } from "../../utils/qiniu-util";
import QRCode from "qrcodejs2"
import ElLink from "element-ui/packages/link/src/main";
export default { export default {
components: { components: {
BreadCrumb ElLink,
BreadCrumb,
QRCode
}, },
data() { data() {
return { return {
rtcId: null,
curmbFirst: "云鹊小圈", curmbFirst: "云鹊小圈",
curmbSecond: "直播管理", curmbSecond: "直播管理",
dialogStatisticsVisible: false, dialogStatisticsVisible: false,
...@@ -322,8 +346,9 @@ export default { ...@@ -322,8 +346,9 @@ export default {
], ],
dialogStatisticsData: [ dialogStatisticsData: [
{ {
peopleNum: 234, peopleNum: 0,
liveDuration: "38分钟" liveDuration: "",
signNum: 0
} }
], ],
liveScope: 1, liveScope: 1,
...@@ -361,6 +386,10 @@ export default { ...@@ -361,6 +386,10 @@ export default {
streamType: 1, streamType: 1,
downloadSuccessStatus: 1, downloadSuccessStatus: 1,
videoSize: 0, videoSize: 0,
link: '',//预览的链接
qrcodeBox: null,
dialogVisible: false,
isSign: 0, // 是否签到
}; };
}, },
created() { created() {
...@@ -903,14 +932,12 @@ export default { ...@@ -903,14 +932,12 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
//数据统计 //数据统计
countLive(row) { countLive(row) {
this.rtcId = row.rtcId;
this.isSign = row.isSign;
this.dialogStatisticsVisible = true; this.dialogStatisticsVisible = true;
console.log("getStatisticsData() : this.circleId = " + this.circleId); console.log("getStatisticsData() : this.circleId = " + this.circleId);
vm.GET("rtc/liveAdmin/data/" + row.rtcId, "").then(res => { vm.GET("rtc/liveAdmin/data/" + row.rtcId, "").then(res => {
...@@ -918,7 +945,8 @@ export default { ...@@ -918,7 +945,8 @@ export default {
let listData = []; let listData = [];
let obj = { let obj = {
peopleNum: res.data.viewedPersonTime, peopleNum: res.data.viewedPersonTime,
liveDuration: res.data.liveDuration liveDuration: res.data.liveDuration,
signNum: res.data.signNum
}; };
listData.push(obj); listData.push(obj);
this.dialogStatisticsData = listData; this.dialogStatisticsData = listData;
...@@ -1019,7 +1047,8 @@ export default { ...@@ -1019,7 +1047,8 @@ export default {
createTime: res.data.pageContents[i].createdTime, createTime: res.data.pageContents[i].createdTime,
startTime: res.data.pageContents[i].openTime, startTime: res.data.pageContents[i].openTime,
endTime: res.data.pageContents[i].endTime, endTime: res.data.pageContents[i].endTime,
rtcId: res.data.pageContents[i].id rtcId: res.data.pageContents[i].id,
isSign: res.data.pageContents[i].isSign
}; };
listData.push(obj); listData.push(obj);
} }
...@@ -1071,6 +1100,88 @@ export default { ...@@ -1071,6 +1100,88 @@ export default {
message: "分享链接已复制,快分享给好友吧" message: "分享链接已复制,快分享给好友吧"
}); });
}, },
//预览二维码
previewQrcode() {
vm.link = this.audienceUrl;
vm.dialogVisible = true;
vm.$nextTick ( () => {
vm.qrcode();
})
},
// 生成二维码
qrcode () {
if (vm.qrcodeBox) {
vm.qrcodeBox.makeCode(vm.link);
return;
}
vm.qrcodeBox = new QRCode('qrcode', {
width: 400,
height: 400,
text: vm.link, // 二维码内容
// render: 'canvas' , // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
// background: '#f0f', // 背景色
// foreground: '#ff0' // 前景色
})
},
// 关闭预览弹框
handleClose() {
vm.dialogVisible = false;
},
downlodExcel(){
let params = {
rtcId: this.rtcId
// rtcId: 372
};
downloadSigninfo(params).then((res) => {
// vm.GET(`rtc/liveAdmin/download/signInfo/` + params.rtcId, { responseType: 'blob' }).then((res) => {
closeLoading(this);
// const aLink = document.createElement("a");
// let blob = new Blob([res], {type: "application/vnd.ms-excel;charset=utf-8"});
// // let downloadUrl = URL.createObjectURL(blob);
// // window.location.href = downloadUrl;
// aLink.href = URL.createObjectURL(blob);
// aLink.setAttribute('download', '123' + '.xlsx'); // 设置下载文件名称
// aLink.click();
// this.$refs.loadElement.appendChild(aLink);
// setTimeout(() => {
// window.open(downloadUrl);
// }, 500);
if(res.code == "000000") {
this.downloadExcelFile(res.data);
this.$message.success("下载成功");
// vm.getLiveList("", "");
} else {
this.$message.error("下载失败,请重试");
}
}).catch((error) => {
this.$message.error("请重试");
})
},
/* 文件下载*/
downloadExcelFile(base64) {
let a = document.createElement('a');
vm.uploadHref = 'data:application/xls;base64,' + base64;
a.setAttribute('href',vm.uploadHref);
a.setAttribute('download','签到人数统计' + new Date().getTime() + '.xlsx');
// if (flag && flag == 2) {
// a.setAttribute('download',vm.exportFileName);
// } else {
// a.setAttribute('download',vm.uploadFileName);
// }
a.click();
},
jumpUrl(type) { jumpUrl(type) {
var url; var url;
if (type == 1) { if (type == 1) {
...@@ -1258,4 +1369,9 @@ export default { ...@@ -1258,4 +1369,9 @@ export default {
.hidden-input { .hidden-input {
height: 0; height: 0;
} }
.qrcode-wrap {
width: 400px;
height: 400px;
margin: 0 auto;
}
</style> </style>
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
<el-button @click="roleManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">成员管理</el-button> <el-button @click="roleManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">成员管理</el-button>
<el-button @click="editRange(scope.row)" type="text" size="small">编辑</el-button> <el-button @click="editRange(scope.row)" type="text" size="small">编辑</el-button>
<el-button @click="deleteRange(scope.row)" type="text" size="small" v-if="showAllFlag && scope.row.status != 0">解散圈子</el-button> <el-button @click="deleteRange(scope.row)" type="text" size="small" v-if="showAllFlag && scope.row.status != 0">解散圈子</el-button>
<el-button @click="setting(scope.row)" type="text" size="small" v-if="scope.row.status != 0 && showNewFlag">应用配置</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -77,13 +78,72 @@ ...@@ -77,13 +78,72 @@
:total="totalRows" :total="totalRows"
></el-pagination> ></el-pagination>
</div> </div>
<el-dialog
title="应用配置"
:visible.sync="dialogSettingVisible"
width="500px"
:close-on-click-modal="false"
@close="handleSettingClose"
center>
<el-form ref="settingForm" :model="settingForm"
label-width="150px"
label-suffix=":"
class="basic-form">
<div v-for="(item, index) in settingForm.settingData" :key="index">
<el-form-item :label="item.appTagName">
<el-radio-group size="small" v-model="item.showOff">
<el-radio :label="1">开启</el-radio>
<el-radio :label="0">关闭</el-radio>
</el-radio-group>
</el-form-item>
</div>
<!--<el-form-item label="直播">-->
<!--<el-radio-group size="small">-->
<!--<el-radio label="1">开启</el-radio>-->
<!--<el-radio label="0">关闭</el-radio>-->
<!--</el-radio-group>-->
<!--</el-form-item>-->
<!--<el-form-item label="继教课程">-->
<!--<el-radio-group size="small">-->
<!--<el-radio label="1">开启</el-radio>-->
<!--<el-radio label="0">关闭</el-radio>-->
<!--</el-radio-group>-->
<!--</el-form-item>-->
<!--<el-form-item label="职称培训">-->
<!--<el-radio-group size="small">-->
<!--<el-radio label="1">开启</el-radio>-->
<!--<el-radio label="0">关闭</el-radio>-->
<!--</el-radio-group>-->
<!--</el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: right;">
<el-button type="primary" @click="save" center>保存</el-button>
</div>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue"; import BreadCrumb from "@/components/breadcrumb.vue";
import { getRangeList,updateRangeStatus} from "../../utils/yqrange/yqrangeApi"; import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting} from "../../utils/yqrange/yqrangeApi";
export default { export default {
components: { components: {
BreadCrumb BreadCrumb
...@@ -103,7 +163,12 @@ export default { ...@@ -103,7 +163,12 @@ export default {
pageSize: 10, pageSize: 10,
}, },
totalRows: 0, totalRows: 0,
tableData: [] tableData: [],
dialogSettingVisible: false,
settingForm:{
circleId: null,
settingData: []
}
} }
}, },
created() { created() {
...@@ -128,7 +193,10 @@ export default { ...@@ -128,7 +193,10 @@ export default {
// 外部用户 // 外部用户
else if(idType == "2"){ else if(idType == "2"){
this.showAllFlag = false; this.showAllFlag = false;
this.getUserAuth(); setTimeout(() => {
this.getUserAuth();
},1500)
} }
}, },
...@@ -192,7 +260,7 @@ export default { ...@@ -192,7 +260,7 @@ export default {
}, },
//上线 //上线
publishRange(row) { publishRange(row) {
this.$confirm(`确定上线“${row.name}”吗?`, '', { this.$confirm(`上线后圈子成员将收到入圈消息提醒(每天最多提醒一次),确定上线“${row.name}”吗?`, '', {
confirmButtonText: '上线', confirmButtonText: '上线',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
...@@ -302,6 +370,73 @@ export default { ...@@ -302,6 +370,73 @@ export default {
// cancel // cancel
}); });
}, },
// 应用配置
setting(row){
this.dialogSettingVisible = true;
this.settingForm.circleId = row.id;
let params = {
circleId: this.settingForm.circleId
// circleId: 22
}
getCircleSettingList(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.settingForm.settingData = res.data;
} else {
this.settingForm.settingData = [];
}
if(this.settingForm.settingData == [] || this.settingForm.settingData.length == 0){
this.settingForm.settingData = [{
appTag: 1,
showOff: 1
},
{
appTag: 2,
showOff: 1
},
{
appTag: 3,
showOff: 1
},
{
appTag: 4,
showOff: 1
}];
}
for(let i = 0; i < this.settingForm.settingData.length; i++){
if(this.settingForm.settingData[i].appTag == 1){
this.settingForm.settingData[i].appTagName = "教培"
}
else if(this.settingForm.settingData[i].appTag == 2){
this.settingForm.settingData[i].appTagName = "直播"
}
else if(this.settingForm.settingData[i].appTag == 3){
this.settingForm.settingData[i].appTagName = "继教课程"
}
else if(this.settingForm.settingData[i].appTag == 4){
this.settingForm.settingData[i].appTagName = "职称培训"
}
}
}).catch((error) => {
this.$message.error("请重试");
})
},
// 关闭
handleSettingClose(){
this.dialogSettingVisible = false;
},
handleSizeChange(val) { handleSizeChange(val) {
this.searchForm.pageSize = val; this.searchForm.pageSize = val;
this.search(); this.search();
...@@ -310,6 +445,29 @@ export default { ...@@ -310,6 +445,29 @@ export default {
this.searchForm.pageNo = val; this.searchForm.pageNo = val;
this.searchList(); this.searchList();
}, },
// 保存
save(){
let params = {
apps: this.settingForm.settingData,
circleId: this.settingForm.circleId
}
saveCircleSetting(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.$message.success("保存成功!");
this.dialogSettingVisible = false;
}
}).catch((error) => {
this.$message.error("请重试");
})
}
}, },
} }
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册