提交 8033ed7e 编写于 作者: vino's avatar vino

Merge remote-tracking branch 'origin/dev-circle-nine-20201231' into dev-circle-nine-20201231

......@@ -238,7 +238,7 @@
created() {
vm = this;
vm.getCircleList();//可以放在自组件优化
vm.getModuleData();
},
data() {
let checkProjectStr = (rule, value, callback) => {
......@@ -359,6 +359,7 @@
// 获取模块下拉数据
getModuleData() {
getModuleData().then(function (res) {
if(res.code == "000000") {
vm.moduleArray = JSON.parse(JSON.stringify(res.data));
......@@ -648,6 +649,7 @@
closeLoading(vm);
if (res.code == "000000") {
vm.circleList = res.data
vm.getModuleData();
}
}).catch(err => {
this.$message.error('请求失败');
......
......@@ -32,7 +32,24 @@ export const getActivityInfoReq = (activityId) => {
description: '专区活动列表与搜索',
})
};
export const removeActivity = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/sso/activity/remove`),
method: 'delete',
data: params,
description: '后台管理--专区活动删除',
})
};
export const updateActivityStatus = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/sso/activity/deploy`),
method: 'post',
data: params,
description: '后台管理--专区活动上下线',
})
};
export const getActivityDocList = (params) => {
......
......@@ -512,6 +512,14 @@ const vueFilter = {
return '-'
}
},
//活动发布状态 1 已经发布 2未发布
activityStatus:(value) => {
if (value == 1) {
return '已发布'
}else if (value == 2) {
return '未发布'
}
},
liveStatusFilter: (value) => {
if (value == 1) {
return '预告'
......
......@@ -60,11 +60,11 @@
</el-row>
</el-form>
<el-table :data="tableData" class="item-table" style="width: 100%;margin-top: 10px;">
<el-table-column prop="id" label="活动ID" min-width="100" align="center"></el-table-column>
<el-table-column prop="name" label="后台标题" min-width="100" align="center"></el-table-column>
<el-table-column prop="name" label="前台主标题" min-width="100" align="center"></el-table-column>
<el-table-column prop="name" label="创建者" min-width="100" align="center"></el-table-column>
<el-table-column prop="name" label="最后修改" min-width="100" align="center"></el-table-column>
<el-table-column prop="activityId" label="活动ID" min-width="100" align="center"></el-table-column>
<el-table-column prop="titleManager" label="后台标题" min-width="100" align="center"></el-table-column>
<el-table-column prop="titleViewMain" label="前台主标题" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdName" label="创建者" min-width="100" align="center"></el-table-column>
<el-table-column prop="modifiedName" label="最后修改" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createdTime | liveDateFilter }}</span>
......@@ -72,28 +72,23 @@
</el-table-column>
<el-table-column prop="status" label="状态" min-width="100" align="center">
<template slot-scope="scope">
<!--<span>{{ scope.row.status | rangeStatus }}</span>-->
<span v-if="scope.row.status == 10 || scope.row.status == 40" style="color: #FAAD14">{{ scope.row.status | rangeStatus }}</span>
<span v-if="scope.row.status == 30" style="color: #1890FF">{{ scope.row.status | rangeStatus }}</span>
<span v-if="scope.row.status == 0 || scope.row.status == 50" style="color: #c7c8c9">{{ scope.row.status | rangeStatus }}</span>
<span>{{ scope.row.status | activityStatus }}</span>
</template>
</el-table-column>
<el-table-column prop="numberOfPeople" label="活动成员数" min-width="100" align="center"></el-table-column>
<el-table-column prop="doctorCount" label="活动成员数" min-width="100" align="center"></el-table-column>
<el-table-column label="操作" min-width="370" align="center">
<template slot-scope="scope">
<div v-if="scope.row.status != 50">
<el-button @click="publishRange(scope.row)" v-if="scope.row.status != 30 && scope.row.status != 0" type="text" size="small">发布</el-button>
<el-button @click="unPublishRange(scope.row)" v-if="scope.row.status == 30 && scope.row.status != 0" type="text" size="small">下线</el-button>
<!--<el-button @click="liveManage(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="deleteActivity(scope.row)" type="text" size="small">删除</el-button>
<el-button @click="publishRange(scope.row)" v-if="scope.row.status == 2" type="text" size="small">发布</el-button>
<el-button @click="unPublishRange(scope.row)" v-if="scope.row.status == 1" type="text" size="small">下线</el-button>
<el-button @click="activityManage(scope.row)" type="text" size="small">活动成员管理</el-button>
<!--<el-button @click="setting(scope.row)" type="text" size="small" v-if="scope.row.status != 0 && showNewFlag">应用配置</el-button>-->
<el-button @click="rangeManage(scope.row)" type="text" size="small" v-if="scope.row.status != 0">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
......@@ -163,7 +158,7 @@
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { updateRangeStatus, getCircleSettingList, saveCircleSetting} from "../../utils/yqrange/yqrangeApi";
import { getActivityList} from '@/utils/activitymanagement/activitymanagementApi';
import { getActivityList,removeActivity,updateActivityStatus} from '@/utils/activitymanagement/activitymanagementApi';
import ElTabPane from "element-ui/packages/tabs/src/tab-pane";
import RangeApply from "./range-apply";
export default {
......@@ -290,7 +285,7 @@ export default {
getActivityList(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.tableData = res.data.circleList;
this.tableData = res.data.activityModelList;
this.totalRows = res.data.count;
} else {
this.tableData = [];
......@@ -303,7 +298,24 @@ export default {
this.$message.error("请重试");
})
},
//删除活动
removeActivity(activityId){
let params = {
activityId: activityId,
}
openLoading(this);
removeActivity(params).then((res) => {
closeLoading(this);
if(res.code == "000000"){
this.$message.success("删除成功");
this.searchList();
}
}).catch((error) => {
this.$message.error("请重试");
}
)
},
resetForm() {
this.searchForm.name = "";
this.searchForm.createdTime = "";
......@@ -317,57 +329,48 @@ export default {
path: `/create-activity?enterType=${enterType}`
})
},
//上线
//发布
publishRange(row) {
this.$confirm(`上线后圈子成员将收到入圈消息提醒(每天最多提醒一次),确定上线“${row.name}”吗?`, '', {
confirmButtonText: '上线',
cancelButtonText: '取消',
type: 'warning',
customClass: 'range-make-box',
}).then(() => {
// confirm
this.updateStatus(row.id, "30");
}).catch(() => {
// cancel
// this.$message.error("上线失败");
});
this.updateStatus(row.activityId, 1);
},
//下线
unPublishRange(row) {
this.$confirm(`确定下线“${row.name}”吗?`, '', {
var content = '';
if (row.doctorCount == 0){
content = '确认要下线该活动吗?'
}else if (row.doctorCount > 0){
content = '该活动的' + row.doctorCount + '个成员将无法参与活动,确认下线吗?'
}
this.$confirm(`${content}`, '', {
confirmButtonText: '下线',
cancelButtonText: '取消',
type: 'warning',
customClass: 'range-make-box',
}).then(() => {
this.updateStatus(row.id, "40");
this.updateStatus(row.activityId, 2);
// confirm
}).catch(() => {
// cancel
});
},
// 更新圈子状态(上线,下线)
// 更新活动状态(上线,下线)
updateStatus(id, status){
let params = {"id": id, "status": status};
updateRangeStatus(params).then((res) => {
let params = {"activityId": id, "deployFlag": status};
updateActivityStatus(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
if(status == "40"){
if(status == 2){
this.$message.success("下线成功");
} else if(status == "30") {
this.$message.success("上线成功");
}else if(status == "50") {
this.$message.success("解散成功");
} else if(status == 1) {
this.$message.success("发布成功!");
}
this.searchList();
} else {
if(status == "40"){
if(status == 2){
this.$message.error("下线失败,请重试");
} else if(status == "30") {
this.$message.error("上线失败,请重试");
}else if(status == "50") {
this.$message.error("解散失败,请重试");
} else if(status == 1) {
this.$message.error("发布失败,请重试");
}
......@@ -377,28 +380,35 @@ export default {
// message: error,
// type: 'error'
// });
if(status == "40"){
if(status == 2){
this.$message.error("下线失败,请重试");
} else if(status == "30") {
this.$message.error("上线失败,请重试");
}else if(status == "50") {
this.$message.error("解散失败,请重试");
} else if(status == 1) {
this.$message.error("发布失败,请重试");
}
})
},
rangeManage(row) {
this.$router.push({
path: '/range-manage',
query: {
id: row.id,
name: row.name,
activeName: 'first',
roleType: row.roleId,
deleteActivity(row) {
var content = '';
if (row.doctorCount == 0){
content = '确认要删除该活动吗?'
}else if (row.doctorCount > 0){
content = '该活动的' + row.doctorCount + '个成员将无法参与活动,确认删除吗?'
}
})
this.$confirm(`${content}`, '', {
confirmButtonText: '删除',
cancelButtonText: '取消',
type: 'warning',
customClass: 'range-make-box',
}).then(() => {
removeActivity(row.activityId);
// confirm
}).catch(() => {
// cancel
});
},
//直播管理
......@@ -419,7 +429,7 @@ export default {
this.$router.push({
path: `/create-activity?enterType`,
query:{
id:row.id,
id:row.activityId,
enterType:enterType,
roleType: row.roleId
}
......@@ -446,8 +456,8 @@ export default {
this.$router.push({
path: '/activity-member',
query: {
id: row.id,
name: row.name,
id: row.activityId,
name: row.titleViewMain,
activeName: 'first',
}
})
......
......@@ -77,7 +77,7 @@
this.enterType = enterType;
this.roleType = roleType;
if(this.enterType != null && this.roleType != null){
if(this.enterType == 2){
this.curmbSecond = "编辑活动"
}
......@@ -117,10 +117,7 @@
//完成
complete() {
// if(this.$refs.org.selectionList == null || this.$refs.org.selectionList == ""){
// this.$message.warning('请选择机构');
// return;
// }
console.log(this.formData.id);
let req = {
circleId: this.formData.id,
......@@ -168,18 +165,9 @@
},
//更新活动信息
commitActivityInfo() {
let req = vm.formData;
console.log("commitActivityInfo() : name = " + req.titleManager + ", headUrl = " + req.listImage
+ ", coverUrl = " + req.introImage)
vm.POST("circle/sso/activity/save", req).then(res => {
if (res.code == "000000") {
// console.log(res);
// console.log(this.$refs);
// vm.formData.id = res.data;
// // this.active = 1;
// this.stepData = [false, true];
this.$message.success('保存成功');
const _this = this;
setTimeout(function () {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册