Browse Source

停更模块-活动管理列表 完成

cxmo 10 months ago
parent
commit
2a787a4316

+ 40 - 34
src/router/modules/stopUpdateRoutes.js

@@ -106,6 +106,46 @@ export default [
 					title:'报名管理'
 				}
 			},
+			{
+				path: "ficcActivityList",
+				name: 'ficcActivityList',
+				component: () => import('@/views/ficc_manage/activity/activityList.vue'),
+				hidden: false,
+				meta:{
+					title:'活动管理'
+				},
+				//进入前是否清除参数
+				beforeEnter(to, from, next) {
+					if (from.path != "/ficcActivityAdd" && from.path != "/ficcActivityEdit") {
+						sessionStorage.removeItem("ficcActivityList");
+					}
+					next();
+				},
+			},
+			{
+				path: 'ficcActivityAdd',
+				name: 'ficcActivityAdd',
+				component: () => import('@/views/ficc_manage/activity/addActivity.vue'),
+				hidden: false,
+				meta: {
+						title:'添加活动',
+						pathFrom: 'ficcActivityList',
+						pathName: '活动管理',
+						keepAlive: false
+					}
+			},
+			{
+				path: 'ficcActivityEdit',
+				name: 'ficcActivityEdit',
+				component: () => import('@/views/ficc_manage/activity/editActivity.vue'),
+				hidden: false,
+				meta: {
+					title:'编辑活动',
+					pathFrom: 'ficcActivityList',
+					pathName: '活动管理',
+					keepAlive: false
+				}
+			},
       //       {
 			// 	path:'ReportThsSend',
 			// 	component:()=> import('@/views/report_manage/pushSetting.vue'),
@@ -144,40 +184,6 @@ export default [
 			// 	name: '图库权限开通统计',
 			// 	hidden: false
 			// },
-      //       {
-			// 	path: "ficcActivityList",
-			// 	name: '活动管理',
-			// 	component: () => import('@/views/ficc_manage/activity/activityList.vue'),
-			// 	hidden: false,
-			// },
-			// {
-			// 	path: 'ficcActivityAdd',
-			// 	name: '添加活动',
-			// 	component: () => import('@/views/ficc_manage/activity/addActivity.vue'),
-			// 	hidden: false,
-			// 	meta: {
-			// 		pathFrom: 'ficcActivityList',
-			// 		pathName: '活动管理',
-			// 		keepAlive: false
-			// 	}
-			// },
-			// {
-			// 	path: 'ficcActivityEdit',
-			// 	name: '编辑活动',
-			// 	component: () => import('@/views/ficc_manage/activity/editActivity.vue'),
-			// 	hidden: false,
-			// 	meta: {
-			// 		pathFrom: 'ficcActivityList',
-			// 		pathName: '活动管理',
-			// 		keepAlive: false
-			// 	}
-			// },
-      //       {
-			// 	path: "ficcSignUpList",
-			// 	name: '报名管理',
-			// 	component: () => import('@/views/ficc_manage/signUp/signUpList.vue'),
-			// 	hidden: false,
-			// },
 			// {
 			// 	path:"enAuthManage",
 			// 	component: () => import('@/views/system_manage/enAuthManage.vue'),

+ 559 - 0
src/views/ficc_manage/activity/activityList.vue

@@ -0,0 +1,559 @@
+<script setup>
+import { ficcManageInterface } from "@/api/api";
+import { onBeforeRouteLeave, useRouter } from "vue-router"
+import { ref, reactive, computed } from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { Search } from '@element-plus/icons-vue'
+import moment from "moment";
+/**
+ * 活动时间格式化
+ * @param {2021-11-12T09:25:01+08:00} start 开始时间
+ * @param 2021-11-12T09:25:01+08:00 end 结束时间
+ * @returns 2020-06-04 15:30-16:30 星期一
+ */
+function formatActivityTimeRange(start, end) {
+    const week = moment(start).format("dddd");
+    const day = moment(start).format("YYYY-MM-DD");
+    const startTime = moment(start).format("HH:mm");
+    const endTime = moment(end).format("HH:mm");
+    return `${day} ${startTime}-${endTime} ${week}`;
+}
+function formatActivityTime(time) {
+    return moment(time).format("YYYY.MM.DD HH:mm:ss");
+}
+//离开前缓存页面状态
+onBeforeRouteLeave((to, from, next)=>{
+    let obj = {
+        searchVal: searchVal.value,
+        activityStatus: activityStatus.value,
+        publishStatus: publishStatus.value,
+        timeRange: timeRange.value,
+        page: page.value,
+        activeType: activeType.value,
+    };
+    sessionStorage.setItem("ficcActivityList", JSON.stringify(obj));
+    next();
+})
+let quanshiForm = reactive({
+    qsTime: 60,
+})
+const quanshiRules = reactive({
+    name: [
+        { required: true, message: '请输入会议时长', trigger: 'blur' },
+        { min: 30, max: 1200, message: '请输入会议时长', trigger: 'blur' }
+    ]
+})
+let searchVal = ref("")
+let activityStatus = ref(1)
+let typeList = ref([])
+let activeType = ref([])
+let publishStatus = ref("")
+let timeRange = ref([])
+let list = ref([])
+let page = ref(1)
+let pageSize = ref(10)
+let total = ref(0)
+
+let detailInfo = ref({})
+let showDetail = ref(false)
+let showDownLoadImg = ref(false)
+
+let downPosterList = ref([]) //需要下载的海报
+let quanshiEventCreateActivityId = ref(0)
+let quanshiEventCreateDialog = ref(false)
+let quanshiEventCreateCalcelDialog = ref(false)
+let isLoading = ref(false)
+function init() {
+    let obj = JSON.parse(sessionStorage.getItem("ficcActivityList")) || {};
+    searchVal.value = obj.searchVal || "";
+    activityStatus.value = obj.activityStatus || 1;
+    activeType.value = obj.activeType || [];
+    publishStatus.value = obj.publishStatus || "";
+    timeRange.value = obj.timeRange || [];
+    page.value = obj.page || 1;
+}
+init()
+// 获取活动分类
+async function getActivityTypeList() {
+    const res = await ficcManageInterface.activityTypeList();
+    if (res.Ret === 200) {
+        typeList.value = res.Data || [];
+    }
+}
+getActivityTypeList()
+
+// 获取活动列表
+async function getActivityList() {
+    let ids = []; //选择的分类
+    activeType.value.forEach((item) => {
+        ids.push(item[item.length - 1]);
+    });
+    const res = await ficcManageInterface.activityList({
+        Keyword: searchVal.value,
+        ActivityTypeIds: ids.join(","),
+        ActiveStatus: Number(activityStatus.value),
+        PublishStatus:
+            publishStatus.value === "" ? -1 : Number(publishStatus.value),
+        StartDate: timeRange.value?.[0]|| "",
+        EndDate: timeRange.value?.[1]|| "",
+        CurrentIndex: page.value,
+        PageSize: pageSize.value,
+    });
+    if (res.Ret === 200) {
+        list.value = res.Data.List || [];
+        total.value = res.Data.Paging.Totals||0;
+    }
+}
+getActivityList()
+
+//编辑活动
+const router = useRouter()
+function handleGoEditActivity(e) {
+    router.push({
+        path: "/ficcActivityEdit",
+        query: {
+            id: e.ActivityId,
+        },
+    });
+    sessionStorage.setItem("ficcActivityDetail", JSON.stringify(e));
+}
+// 发布活动
+function handlePublishActivity(e) {
+    ElMessageBox.confirm("确定发布该活动吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+    }).then(async () => {
+        const res = await ficcManageInterface.activityPublish({
+            ActivityId: Number(e.ActivityId),
+        });
+        if (res.Ret === 200) {
+            ElMessage.success("发布成功");
+            getActivityList();
+        }
+    });
+}
+// 取消发布活动
+function handleUnPublishActivity(e) {
+    ElMessageBox.confirm("确定取消发布该活动吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+    }).then(async () => {
+        const res = await ficcManageInterface.activityUnPublish({
+            ActivityId: Number(e.ActivityId),
+        });
+        if (res.Ret === 200) {
+            ElMessage.success("取消发布成功");
+            getActivityList();
+        }
+    });
+}
+// 删除活动
+function handleDelActivity(e) {
+    ElMessageBox.confirm("确定删除该活动吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+    }).then(async () => {
+        const res = await ficcManageInterface.activityDelete({
+            ActivityId: Number(e.ActivityId),
+        });
+        if (res.Ret === 200) {
+            ElMessage.success("删除成功");
+            getActivityList();
+        }
+    });
+}
+function handleShowDetail(e) {
+    detailInfo.value = e;
+    showDetail.value = true;
+}
+// 活动状态切换
+function handleActivityStatusChange(e) {
+    page.value = 1;
+    searchVal.value = "";
+    activityStatus.value = e;
+    activeType.value = [];
+    publishStatus.value = "";
+    timeRange.value= [];
+    getActivityList();
+}
+//筛选
+function handleTypeChange() {
+    page.value = 1;
+    getActivityList();
+}
+function handlePageChange(e) {
+    page.value = e;
+    getActivityList();
+}
+// 下载活动海报
+function handleDownLoadImg() {
+    if (detailInfo.value.PosterList.length == 1) {
+        downPosterList = detailInfo.value.PosterList;
+        downloadImg();
+    } else {
+        showDownLoadImg.value = true;
+    }
+}
+// 下载海报
+function downloadImg(name, url) {
+    // 方法二
+    downPosterList.value.forEach((item) => {
+        let img = new Image();
+        img.setAttribute("crossOrigin", "anonymous");
+        img.src = item.Url;
+        img.onload = () => {
+            let canvas = document.createElement("canvas");
+            canvas.width = img.width;
+            canvas.height = img.height;
+            let context = canvas.getContext("2d");
+            context.drawImage(img, 0, 0, img.width, img.height);
+            let dataURL = canvas.toDataURL("image/png", 1);
+            const a = document.createElement("a");
+            a.setAttribute("download", item.Name);
+            a.style.display = "none";
+            a.href = dataURL;
+            document.body.appendChild(a);
+            a.click();
+        };
+    });
+}
+//建会取消
+function quanshiEventCreateDialogClose() {
+    quanshiEventCreateActivityId.value = 0
+    quanshiForm.qsTime = 60
+    quanshiEventCreateDialog.value = false;
+}
+//建会保存
+function quanshiEventCreate(e) {
+    if (Number(quanshiForm.qsTime) <= 0) {
+        ElMessage.warning("建会时长必须大于0!");
+        return;
+    }
+    isLoading.value = true
+    ficcManageInterface.quanshiEventCreate({
+        ActivityId: quanshiEventCreateActivityId.value,
+        Time: Number(quanshiForm.qsTime),
+    }).then((result) => {
+        console.info(result.Ret)
+        if (result.Ret === 200) {
+            ElMessage.success(result.Msg);
+            getActivityList();
+            quanshiEventCreateDialog.value = false;
+            isLoading.value = false;
+        }
+    });
+}
+//取消建会弹框-取消按钮
+function quanshiEventCancelDialogCancel() {
+    quanshiEventCreateCalcelDialog.value = false;
+}
+//取消建会弹框-确定按钮
+function quanshiEventCancel(obj) {
+    isLoading.value = true
+    ficcManageInterface.quanshiEventCancel({
+        ActivityId: quanshiEventCreateActivityId.value
+    }).then((result) => {
+        if (result.Ret === 200) {
+            ElMessage.success(result.Msg);
+            getActivityList();
+            quanshiEventCreateCalcelDialog.value = false;
+            isLoading.value = false;
+        }
+    });
+}
+</script>
+<template>
+    <div class="ficc-activity-list-wrap">
+        <div class="top-wrap">
+            <el-button :type="activityStatus === 1 ? 'primary' : ''" @click="handleActivityStatusChange(1)">未开始
+            </el-button>
+            <el-button :type="activityStatus === 2 ? 'primary' : ''" @click="handleActivityStatusChange(2)">进行中
+            </el-button>
+            <el-button :type="activityStatus === 3 ? 'primary' : ''" @click="handleActivityStatusChange(3)">已结束
+            </el-button>
+            <el-button type="primary" style="float: right" @click="router.push('/ficcActivitySpeaker')">主讲人配置</el-button>
+            <el-button type="primary" style="float: right" @click="router.push('/ficcActivityAdd')">添加活动</el-button>
+        </div>
+        <div class="content-wrap">
+            <div class="select-wrap">
+                <el-cascader placeholder="请选择活动类别" v-model="activeType" :options="typeList" clearable
+                    :collapse-tags="true" :props="{
+                        value: 'ActivityTypeId',
+                        label: 'ActivityTypeName',
+                        children: 'ChildList',
+                        multiple: true,
+                    }" style="margin-right: 30px; min-width: 310px" @change="handleTypeChange">
+                </el-cascader>
+                <el-date-picker v-model="timeRange" type="daterange" range-separator="至" start-placeholder="活动开始日期"
+                    end-placeholder="活动结束日期" value-format="YYYY-MM-DD" @change="handleTypeChange"
+                    style="margin-right: 30px">
+                </el-date-picker>
+                <el-select @change="handleTypeChange" v-model="publishStatus" placeholder="发布状态" clearable="">
+                    <el-option label="已发布" value="1"></el-option>
+                    <el-option label="未发布" value="0"></el-option>
+                </el-select>
+                <el-input placeholder="请输入活动标题" v-model="searchVal" style="max-width: 400px; float: right"
+                    :prefix-icon="Search"
+                    @input="handleTypeChange" clearable>
+                </el-input>
+            </div>
+            <div class="list-wrap">
+                <el-table :data="list" border>
+                    <el-table-column key="活动标题" align="center" prop="ActivityName" label="活动标题">
+                        <template #default="scope">
+                            <span class="title" @click="handleShowDetail(scope.row)">{{
+                                    scope.row.ActivityName
+                            }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column key="活动类型" align="center" prop="FirstActivityTypeName" label="活动类型" width="200px">
+                    </el-table-column>
+                    <el-table-column key="活动类别" align="center" prop="ActivityTypeName" label="活动类别" width="200px">
+                    </el-table-column>
+                    <el-table-column key="活动时间" align="center" prop="StartTime" label="活动时间" width="250px">
+                        <template #default="scope">
+                            <span class="time">{{formatActivityTimeRange(scope.row.StartTime,scope.row.EndTime)}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column key="更新时间" align="center" prop="ModifyTime" label="更新时间" width="180px">
+                        <template #default="scope">
+                            <span class="time">{{formatActivityTime(scope.row.ModifyTime)}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column key="发布状态" align="center" prop="PublishStatus" label="发布状态" width="100px">
+                        <template #default="scope">
+                            <span class="time">{{
+                                    scope.row.PublishStatus === 0 ? "未发布" : "已发布"
+                            }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column key="操作" align="center" label="操作" width="250px">
+                        <template #default="scope">
+                            <div v-if="activityStatus == 2">--</div>
+                            <div v-else>
+                                <span class="opt-btn" v-if="scope.row.PublishStatus == 0 && activityStatus == 1"
+                                    @click="handlePublishActivity(scope.row)">发布</span>
+                                <span class="opt-btn" @click="handleGoEditActivity(scope.row)">编辑</span>
+                                <span class="opt-btn" v-if="scope.row.PublishStatus == 1 && activityStatus == 1"
+                                    @click="handleUnPublishActivity(scope.row)">取消发布</span>
+                                <span class="opt-btn" style="color: #ff4040"
+                                    v-if="activityStatus == 1 && scope.row.PublishStatus != 1"
+                                    @click="handleDelActivity(scope.row)">删除</span>
+                            </div>
+                        </template>
+                    </el-table-column>
+                    <template #empty>
+                        <div style="padding: 150px 0">暂无数据</div>
+                    </template>
+                </el-table>
+            </div>
+            <!-- 分页 -->
+            <el-pagination layout="total,prev,pager,next,jumper" background :current-page="page"
+                @current-change="handlePageChange" :page-size="pageSize" :total="total" class="pagination-wrap">
+            </el-pagination>
+        </div>
+
+        <!-- 详情弹窗 -->
+        <el-dialog :append-to-body="true" v-model="showDetail" width="600px" center>
+            <template #header>
+                <div>
+                    <img src="@/assets/img/ficc_activity/flag.png" alt="" width="16" height="16"
+                        style="vertical-align: middle" />
+                    <span style="vertical-align: middle">活动详情</span>
+                </div>
+            </template>
+            <div class="ficc-activity-detail-wrap">
+                <table class="table-wrap">
+                    <tr>
+                        <td class="table-item dark-item">
+                            {{ detailInfo.ActivityTypeName }}
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="table-item">活动名称:{{ detailInfo.ActivityName }}</td>
+                    </tr>
+                    <tr>
+                        <td class="table-item">
+                            活动时间:{{formatActivityTimeRange(detailInfo.StartTime,detailInfo.EndTime)}}
+                        </td>
+                    </tr>
+                    <tr v-if="detailInfo.City">
+                        <td class="table-item">
+                            活动地址:{{ detailInfo.City }}{{ detailInfo.Address }}
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="table-item">主讲人:{{ detailInfo.Speaker }}</td>
+                    </tr>
+                    <tr v-if="detailInfo.LimitPeopleNum">
+                        <td class="table-item">
+                            线下人数限制:{{ detailInfo.LimitPeopleNum }}
+                        </td>
+                    </tr>
+                    <tr v-if="detailInfo.MainlandTel">
+                        <td class="table-item">大陆拨入:{{ detailInfo.MainlandTel }}</td>
+                    </tr>
+                    <tr v-if="detailInfo.HongKongTel">
+                        <td class="table-item">香港拨入:{{ detailInfo.HongKongTel }}</td>
+                    </tr>
+                    <tr v-if="detailInfo.TaiwanTel">
+                        <td class="table-item">台湾拨入:{{ detailInfo.TaiwanTel }}</td>
+                    </tr>
+                    <tr v-if="detailInfo.SingaporeTel">
+                        <td class="table-item">
+                            新加坡拨入:{{ detailInfo.SingaporeTel }}
+                        </td>
+                    </tr>
+                    <tr v-if="detailInfo.AmericaTel">
+                        <td class="table-item">美国拨入:{{ detailInfo.AmericaTel }}</td>
+                    </tr>
+                    <tr v-if="detailInfo.ParticipationCode">
+                        <td class="table-item">
+                            拨入密码:{{ detailInfo.ParticipationCode }}
+                        </td>
+                    </tr>
+                    <tr v-if="detailInfo.LinkParticipants">
+                        <td class="table-item">
+                            网络参会:{{ detailInfo.LinkParticipants }}
+                        </td>
+                    </tr>
+                    <tr v-if="detailInfo.ReportLink">
+                        <td class="table-item">相关报告:{{ detailInfo.ReportName }}</td>
+                    </tr>
+                    <tr>
+                        <td class="table-item">主持人入会密码:{{ detailInfo.HostCode }}</td>
+                    </tr>
+                </table>
+                <div style="text-align: center; margin: 30px 0">
+                    <el-button type="primary" style="width: 150px" v-if="detailInfo.PosterList"
+                        @click="handleDownLoadImg">下载活动海报</el-button>
+                    <el-button type="primary" @click="showDetail = false" style="width: 150px">关闭</el-button>
+                </div>
+            </div>
+        </el-dialog>
+        <!-- 下载海报弹窗 -->
+        <el-dialog :append-to-body="true" v-model="showDownLoadImg" width="400px" title="下载活动海报"
+            center>
+            <div v-if="detailInfo.PosterList">
+                <el-checkbox-group v-model="downPosterList">
+                    <el-checkbox style="display: block; margin: 5px 0" v-for="item in detailInfo.PosterList"
+                        :key="item.Url" :label="item">{{ item.Name }}</el-checkbox>
+                </el-checkbox-group>
+            </div>
+            <div style="text-align: center; margin: 30px 0">
+                <el-button type="primary" plain @click="showDownLoadImg = false">取消</el-button>
+                <el-button type="primary" @click="downloadImg">确定</el-button>
+            </div>
+        </el-dialog>
+
+        <!-- 全时建会 -->
+        <el-dialog :append-to-body="true" v-model="quanshiEventCreateDialog" width="500px"
+            title="全时建会" center>
+            <el-form :model="quanshiForm" :rules="quanshiRules" ref="quanshiForm" label-width="130px">
+                <el-form-item label="会议时长(分钟)" prop="qsTime">
+                    <el-input v-model="quanshiForm.qsTime"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button @click="quanshiEventCreateDialogClose()">取消</el-button>
+                    <el-button type="primary" :loading="isLoading" @click="quanshiEventCreate(this)">确定</el-button>
+                </el-form-item>
+            </el-form>
+        </el-dialog>
+        <!-- 取消全时建会 -->
+        <el-dialog :append-to-body="true" v-model="quanshiEventCreateCalcelDialog" width="20%"
+            title="取消建会" center>
+            <h4 style="text-align:center">确定要取消该会议吗?</h4>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="quanshiEventCancelDialogCancel()">取消</el-button>
+                <el-button type="primary" :loading="isLoading" @click="quanshiEventCancel(this)">确定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+
+
+<style lang="scss" scoped>
+.ficc-activity-list-wrap {
+    div {
+        box-sizing: border-box;
+    }
+
+    .top-wrap {
+        background: #ffffff;
+        border: 1px solid #ececec;
+        border-radius: 4px;
+        padding: 20px 30px;
+
+        .el-button {
+            background-color: #ecf5ff;
+            border: 1px solid #b3d8ff;
+            color: #409eff;
+        }
+
+        .el-button--primary {
+            background-color: #409eff;
+            border: none;
+            color: #ffffff;
+        }
+    }
+
+    .content-wrap {
+        margin-top: 20px;
+        min-height: 70vh;
+        background: #ffffff;
+        border: 1px solid #ececec;
+        box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
+        border-radius: 4px;
+        padding: 30px;
+        padding-bottom: 65px;
+        position: relative;
+
+        .pagination-wrap {
+            position: absolute;
+            bottom: 24px;
+            right: 30px;
+        }
+    }
+
+    .list-wrap {
+        margin-top: 40px;
+
+        .title {
+            color: #409eff;
+            cursor: pointer;
+        }
+
+        .opt-btn {
+            cursor: pointer;
+            color: #409eff;
+            margin: 0 5px;
+        }
+    }
+}
+
+.ficc-activity-detail-wrap {
+    .table-wrap {
+        color: #666;
+        width: 100%;
+        // text-align: center;
+        border-top: 1px solid #dcdfe6;
+        border-left: 1px solid #dcdfe6;
+
+        .table-item {
+            padding: 14px 30px;
+            border-right: 1px solid #dcdfe6;
+            border-bottom: 1px solid #dcdfe6;
+            position: relative;
+        }
+
+        .dark-item {
+            background: #f0f2f5;
+            text-align: center;
+        }
+    }
+}
+</style>

+ 804 - 0
src/views/ficc_manage/activity/addActivity.vue

@@ -0,0 +1,804 @@
+<template>
+    <div class="ficc-add-activity-wrap">
+        <el-form ref="form" :model="formData" :rules="formRules">
+            <el-form-item label="活动类型" label-width="100px" style="display:inline-block;margin-right:20px" prop="firstTypeVal">
+                <el-select
+                    v-model="formData.firstTypeVal"
+                    placeholder="请选择活动类型"
+                    @change="firstTypeChange"
+                >
+                    <el-option
+                        v-for="item in typeList"
+                        :key="item.ActivityTypeId"
+                        :label="item.ActivityTypeName"
+                        :value="item.ActivityTypeId"
+                    >
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="活动类别" label-width="100px" style="display:inline-block;margin-right:20px" prop="childTypeVal">
+                <el-select
+                    v-model="formData.childTypeVal"
+                    no-data-text="请先选择活动类型"
+                    placeholder="请选择活动类别"
+                    @change="childTypeChange"
+                >
+                    <el-option
+                        v-for="item in childTypeList"
+                        :key="item.ActivityTypeId"
+                        :label="item.ActivityTypeName"
+                        :value="item.ActivityTypeId"
+                    >
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="活动时间" label-width="100px" style="display:inline-block" prop="time">
+                <el-date-picker
+                    v-model="formData.time"
+                    type="datetimerange"
+                    range-separator="至"
+                    start-placeholder="活动开始时间"
+                    end-placeholder="活动结束时间"
+                    :default-time="['15:30:00','16:00:00']"
+                    value-format="yyyy-MM-dd HH:mm:ss">
+                </el-date-picker>
+            </el-form-item>
+
+            <template v-if="formData.firstTypeVal&&formData.childTypeVal">
+            <el-form-item label="活动类别" label-width="100px" prop="ActivityTypeName" v-if="showActivityTypeName">
+                <el-input placeholder="请输入活动类别" v-model="formData.ActivityTypeName"></el-input>
+            </el-form-item>
+            <el-form-item label="活动标题" label-width="100px" prop="ActivityName">
+                <el-input placeholder="请输入活动标题" v-model="formData.ActivityName"></el-input>
+            </el-form-item>
+            <el-form-item :label="formData.firstTypeVal==2||formData.firstTypeVal==4?'主讲嘉宾':'主讲人'" label-width="100px" prop="Speaker">
+                <template v-if="showSelectSpeaker">
+                    <el-select 
+                        v-model="formData.Speaker" 
+                        placeholder="请选择主讲人" 
+                        style="width:100%"
+                        multiple
+                        filterable>
+                        <el-option
+                            v-for="item in speakerList"
+                            :key="item.SpeakerId"
+                            :label="item.SpeakerName"
+                            :value="item.SpeakerName"
+                        ></el-option>
+                    </el-select>
+                    <el-image 
+                        v-for="item in speakerAvatar"
+                        :key="item"
+                        style="width: 80px; height: 80px;margin-top:10px"
+                        :src="item" 
+                        :preview-src-list="[item]">
+                    </el-image>
+                </template>
+                
+                <el-input :placeholder="formData.firstTypeVal==2||formData.firstTypeVal==4?'请输入主讲嘉宾':'请输入主讲人'" v-model="formData.Speaker" v-else></el-input>
+            </el-form-item>
+
+            <el-form-item label="参会地址" label-width="100px" prop="address" v-if="showAddressOrLimitPeople">
+                <div style="display:flex;justify-content: space-between;">
+                    <el-select
+                        v-model="formData.City"
+                        placeholder="请选择城市"
+                        style="width:15%">
+                        <el-option 
+                            v-for="item in cityArr" 
+                            :key="item"
+                            :label="item"
+                            :value="item">
+                        </el-option>
+                    </el-select>
+                    <el-input style="width:84%;display:inline-block" placeholder="请输入详细地址" v-model="formData.Address"></el-input>
+                </div>
+                
+            </el-form-item>
+            <el-form-item label="参会人数" label-width="100px" prop="LimitPeopleNum" v-if="showAddressOrLimitPeople">
+                <el-input v-model="formData.LimitPeopleNum" placeholder="请输入线下参会人数限制"></el-input>
+            </el-form-item>
+            <el-form-item prop="Permission" v-if="showPermission">
+                <p>请选择参会权限(拥有以下任一勾选的权限,才可参会):</p>
+                <ul class="menu_lists">
+					<li v-for="item in PermissionList" :key="item.ClassifyName" class="menu_item">
+						<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
+						<el-checkbox-group  v-model="item.CheckList" @change="handleChecked(item)">
+							<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item">{{list.PermissionName}}</el-checkbox>
+						</el-checkbox-group>
+					</li>
+				</ul>
+            </el-form-item>
+            <template v-if="formData.firstTypeVal!=3">
+            <el-form-item label="大陆拨入号" label-width="100px" prop="MainlandTel">
+                <el-input placeholder="请输入大陆拨入号" v-model="formData.MainlandTel"></el-input>
+            </el-form-item>
+            <el-form-item label="香港拨入号" label-width="100px" prop="HongKongTel">
+                <el-input placeholder="请输入香港拨入号" v-model="formData.HongKongTel"></el-input>
+            </el-form-item>
+            <el-form-item label="台湾拨入号" label-width="100px" prop="TaiwanTel">
+                <el-input placeholder="请输入台湾拨入号" v-model="formData.TaiwanTel"></el-input>
+            </el-form-item>
+            <el-form-item label="新加坡拨入号" label-width="100px" prop="SingaporeTel">
+                <el-input placeholder="请输入新加坡拨入号" v-model="formData.SingaporeTel"></el-input>
+            </el-form-item>
+            <el-form-item label="美国拨入号" label-width="100px" prop="AmericaTel">
+                <el-input placeholder="请输入美国拨入号" v-model="formData.AmericaTel"></el-input>
+            </el-form-item>
+            <el-form-item label="拨入密码" label-width="100px" prop="ParticipationCode">
+                <el-input placeholder="请输入拨入密码" type="number" v-model="formData.ParticipationCode"></el-input>
+            </el-form-item>
+            </template>
+            <el-form-item label="参会链接" label-width="100px" prop="LinkParticipants" v-if="formData.firstTypeVal!=1">
+                <el-input placeholder="请输入参会链接" v-model="formData.LinkParticipants"></el-input>
+            </el-form-item>
+
+            <el-form-item label="报告链接" label-width="100px" prop="ReportLinkUrl" v-if="showSelectReportUrl">
+                <el-input placeholder="请选择报告链接" v-model="formData.ReportLink" readonly style="width:500px;margin-right:20px"></el-input>
+                <el-button type="primary" @click="handleShowSelectReport">选择报告</el-button>
+            </el-form-item>
+
+            <el-form-item label="活动海报" label-width="100px" prop="poster" v-if="showUploadPoster">
+                <el-upload
+                class="ficc-upload-wrap"
+                :action="baseApi+'/resource/image/upload'"
+                :on-remove="handlePosterRemove"
+                :on-success="handleUploadPosterSuccess"
+                accept="image/*"
+                :on-preview="handlePreImg"
+                multiple
+                :file-list="formData.Poster">
+                    <el-button type="primary">上传活动海报</el-button>
+                </el-upload>
+            </el-form-item>
+            
+            <div style="text-align:center;margin:30px 0">
+                <el-button type="primary" style="width:120px" @click="handleSubmit('save')">保存</el-button>
+                <el-button type="primary" style="width:120px" @click="handleSubmit('publish')">发布</el-button>
+                <el-button type="primary" plain style="width:120px" @click="handleSubmit('cancel')">取消</el-button>
+            </div>
+            </template>
+
+        </el-form>
+
+        <!-- 选择报告弹窗 -->
+        <el-dialog 
+            v-dialogDrag 
+            :append-to-body="true" 
+            :visible.sync="showSelectReport" 
+            width="50vw" 
+            title="选择报告"
+            center
+        >
+            <div class="ficc-activity-selectreport-wrap">
+                <div class="left-btn-box">
+                    <el-button 
+                        v-for="item in reportTypeList"
+                        :key="item.val"
+                        :type="selectReportTtype==item.val?'primary':''" 
+                        @click="handleReportTypeChange(item.val)">{{item.name}}</el-button>
+                </div>
+                <div class="right-box">
+                    <el-input v-model="searchReportVal" @input="handleSearchReportList" placeholder="标题关键字搜索" style="width:100%"></el-input>
+                    <el-table :data="reportList" border style="margin-top:20px">
+                        <el-table-column align="center" label="报告标题">
+                            <template slot-scope="scope">
+                                <div style="text-align:left">
+                                    <el-radio 
+                                        v-model="formData.ReportId" 
+                                        :label="scope.row.ResearchReportId"
+                                    ><span style="white-space: normal;">{{ scope.row.ResearchReportName }}</span></el-radio>
+                                </div>
+                            </template>
+                        </el-table-column>
+                        <el-table-column align="center" label="创建时间">
+                            <template slot-scope="scope">
+                                {{scope.row.CreatedTime}}
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                    <div style="text-align:center;margin:30px 0">
+                        <el-button type="primary" @click="handleSaveSelectReport">保存</el-button>
+                        <el-button type="primary" plain @click="showSelectReport=false">取消</el-button>
+                    </div>
+                </div>
+            </div>
+        </el-dialog>
+
+        <!-- 图片预览 -->
+		<el-image-viewer 
+		v-if="showPreImg" 
+        :on-close="closePreImg" 
+		:url-list="preImgList" />
+    </div>
+</template>
+
+<script>
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+import { ficcManageInterface,customInterence,resourceInterface,classifyTelList} from "@/api/api";
+export default {
+    components:{ElImageViewer},
+    computed:{
+        showActivityTypeName(){//是否显示手动输入活动类别
+            let flag=false
+            if(this.formData.childTypeVal==39
+                ||this.formData.childTypeVal==41
+                ||this.formData.firstTypeVal==4){
+                flag=true
+            }
+
+            return flag
+        },
+
+        showUploadPoster(){//显示上传活动海报
+            let flag=false
+            if(this.formData.firstTypeVal!=1){
+                flag=true
+            }
+
+            return flag
+        },
+
+        showSelectReportUrl(){//显示选择报告链接
+            let flag=false
+            if(this.formData.firstTypeVal!=2){
+                flag=true 
+            }
+
+            return flag 
+        },
+
+        showAddressOrLimitPeople(){//显示地址或着参会限制人数
+            let flag=false
+
+            if(this.formData.firstTypeVal==3||this.formData.firstTypeVal==4) flag=true
+            return flag 
+        },
+
+        showPermission(){//显示选择参会权限
+            let flag=false
+
+            if(this.formData.firstTypeVal==3) flag=true
+            return flag 
+
+        },
+
+        showSelectSpeaker(){//显示选择主讲人
+            let flag=false
+            if(this.formData.firstTypeVal==1||(this.formData.firstTypeVal==3&&this.formData.childTypeVal!=41)) flag=true
+            return flag 
+
+        },
+
+        speakerAvatar(){
+            if(this.formData.Speaker){
+                let img=this.formData.Speaker.map(item=>{
+                    let str=''
+                    this.speakerList.forEach(_item=>{
+                        if(_item.SpeakerName==item){
+                            str=_item.SpeakerHeadPic
+                        }
+                    })
+                    return str
+                })
+                return img
+            }
+        }
+    },
+    
+    data() {
+        return {
+            baseApi:process.env.API_ROOT,
+            typeList: [],
+            childTypeList: [],
+            speakerList:[],
+            
+            formData:{
+                firstTypeVal: "",
+                childTypeVal: "",
+                ActivityTypeName:'',//活动类别名称
+                time:[],
+                ActivityName:'',//活动标题
+                Speaker:'',
+                MainlandTel:'400-810-8228',
+                HongKongTel:'+852-30051355',//香港
+                TaiwanTel:'',
+                AmericaTel:'',
+                SingaporeTel:'65 6307-7689',//新加坡
+                ReportLink:'',//报告链接
+                ReportName:'',//报告名字
+                ReportId:'',//报告id
+                IsNewReport:0,//是否关联的是新报告 0否 1是
+                ParticipationCode:'',//拨号密码
+                Audios:[],//音频
+                Poster:[],//海报
+                LinkParticipants:"",//参会链接
+                City:'',//城市
+                Address:'',//详细地址
+                LimitPeopleNum:'',//限制人数
+                Permission:'',//选择的参会权限
+            },
+            formRules:{
+                firstTypeVal:[{required: true, message: "请选择活动类型", trigger: "change"}],
+                childTypeVal:[{required: true, message: "请选择活动类别", trigger: "change"}],
+                time:[{required: true, message: "请选择活动时间", trigger: "change"}],
+            },
+
+            showSelectReport:false,//显示选择报告弹窗
+            selectReportTtype:'',
+            reportTypeList:[
+                /* {name:"双周报",val:"new_two_week"},
+                {name:"月报",val:"month"},
+                {name:"数据点评",val:"other"},
+                {name:'周报',val:'new_week'},
+                {name:"晨报",val:"day"}, */
+            ],
+            reportList:[],
+            searchReportVal:'',//搜索报告的关键词
+
+            cityArr:['上海','北京','杭州','深圳'],
+            PermissionList:[],//权限数据
+
+            preImgList:[],
+            showPreImg:false,
+        };
+    },
+    created() {
+        this.getTypeList();
+        this.getSpeakerList()
+        this.getPermissionList()
+        this.getTelList()
+    },
+    methods: {
+
+        seleceSpeakerChange(e){
+            console.log(e);
+        },
+
+        //预览图片
+        handlePreImg(file){
+            this.preImgList=[file.response.Data.ResourceUrl]
+            this.showPreImg=true
+        },
+
+        closePreImg(){
+            this.showPreImg=false
+            this.preImgList=[]
+        },
+        
+        // 活动类型切换
+        firstTypeChange() {
+            this.formData.childTypeVal = "";
+            this.typeList.forEach((item) => {
+                if (item.ActivityTypeId == this.formData.firstTypeVal) {
+                    this.childTypeList = item.ChildList||[];
+                    this.formData.childTypeVal=this.childTypeList[0]?this.childTypeList[0].ActivityTypeId:''
+                }
+            });
+            this.initFormData()
+        },
+
+        // 活动类别切换
+        childTypeChange(){
+            this.initFormData()
+        },
+        
+        // 重置表单
+        initFormData(){
+            this.formData={
+                firstTypeVal:this.formData.firstTypeVal,
+                childTypeVal:this.formData.childTypeVal,
+                ActivityTypeName:'',//活动类别名称
+                time:[],
+                ActivityName:'',//活动标题
+                Speaker:'',
+                MainlandTel:'400-810-8228',
+                HongKongTel:'+852-30051355',
+                TaiwanTel:'',
+                AmericaTel:'',
+                SingaporeTel:'65 6307-7689',
+                ReportLink:'',//报告链接
+                ReportName:'',//报告名字
+                ReportId:'',//报告id
+                IsNewReport:0,
+                ParticipationCode:'',//拨号密码
+                Audios:[],//音频
+                Poster:[],//海报
+                LinkParticipants:"",//参会链接
+                City:'',//城市
+                Address:'',//详细地址
+                LimitPeopleNum:'',//限制人数
+                Permission:'',//选择的参会权限
+            }
+            // 分析师电话会初始化活动标题
+            if(this.formData.firstTypeVal==1){
+                this.childTypeList.forEach(item=>{
+                    if(item.ActivityTypeId==this.formData.childTypeVal){
+                        this.formData.ActivityName=item.ActivityTypeName+'电话会'
+                    }
+                })
+            }
+        },
+        
+        //获取活动类型
+        async getTypeList() {
+            const res = await ficcManageInterface.activityTypeList();
+            if (res.Ret === 200) {
+                this.typeList = res.Data || [];
+                this.formData.firstTypeVal=res.Data[0].ActivityTypeId
+                this.childTypeList=res.Data[0].ChildList
+                this.formData.childTypeVal=this.childTypeList[0].ActivityTypeId
+                this.formData.ActivityName=this.childTypeList[0].ActivityTypeName+'电话会'
+            }
+        },
+
+        // 点击弹出选择报告
+        handleShowSelectReport(){
+            this.showSelectReport=true
+            this.getReportList()
+        },
+
+        // 报告类别切换
+        handleReportTypeChange(e){
+            this.searchReportVal=''
+            this.selectReportTtype=e
+            this.getReportList()
+        },
+
+        // 关键词搜索报告
+        handleSearchReportList(){
+            this.getReportList()
+        },
+
+        // 获取报告列表
+        async getReportList(){
+          let reportType='',telClassifyId=0
+          //如果是其他电话会,拆分ReportType和ClassifyId
+          if(this.selectReportTtype.includes('_')){
+            const arr = this.selectReportTtype.split('_')
+            reportType = arr[0]
+            telClassifyId = Number(arr[1])
+          }
+            const res=await ficcManageInterface.activityReportList({
+                Keyword:this.searchReportVal,
+                ReportType:reportType.length?reportType:this.selectReportTtype,
+                ClassifyId:reportType.length?telClassifyId:0,
+                CurrentIndex: 1,
+                PageSize: 5,
+            })
+            if(res.Ret===200){
+                this.reportList=res.Data.List
+            }
+        },
+
+        // 保存选择的报告
+        handleSaveSelectReport(){
+            this.reportList.forEach(item=>{
+                if(item.ResearchReportId==this.formData.ReportId){
+                    this.formData.ReportName=item.ResearchReportName
+                    this.formData.ReportLink=item.LinkUrl
+                    // 是否是新后台的报告
+                    if(this.selectReportTtype=='day'){
+                        this.formData.IsNewReport=0
+                    }else{
+                        this.formData.IsNewReport=1
+                    }
+                }
+            })
+            this.showSelectReport=false
+        },
+
+        // 获取主讲人列表
+        async getSpeakerList(){
+            const res=await ficcManageInterface.activitySpeakerList({
+                PageSize:10000,
+                CurrentIndex:1,
+            })
+            if(res.Ret===200){
+                this.speakerList=res.Data.List||[]
+            }
+        },
+
+        // 获取基本权限列表
+        async getPermissionList(){
+            const res=await customInterence.authList({CompanyType:'ficc'})
+            if(res.Ret===200){
+                let newArr = [];
+				res.Data.List.length&&res.Data.List.forEach(item => {
+					let obj = {
+						checkAll:false,
+						isIndeterminate:false,
+						...item,
+                        CheckList:[]
+					}
+					newArr.push(obj)
+				})
+				this.PermissionList = newArr;
+            }
+        },
+        /* 选择全选或取消全选 */
+		handleCheckAll(item) {
+			// 取到所有的子菜单id
+			let ids = item.Items.map(item =>{
+				return item.ChartPermissionId
+			})
+			item.CheckList = item.checkAll ? ids : [];	
+        	item.isIndeterminate = false;
+		},
+		/* 复选框組选中时 */
+		handleChecked(item) {
+			let len = item.CheckList.length;
+			item.checkAll = len === item.Items.length;
+			item.isIndeterminate = len > 0 && len < item.Items.length;
+		},
+
+        // 海报上传成功回调
+        handleUploadPosterSuccess(response, file, fileList){
+            this.formData.Poster=fileList.map(item=>{
+                if(typeof item.response === 'string'){
+                    item.response=this.$parseData(item.response)
+                }
+                return {name:item.response.Data.ResourceName,...item}
+            })
+        },
+        // 删除上传的海报
+        handlePosterRemove(file,fileList){
+            this.formData.Poster=fileList
+        },
+        // 音频上传成功回调
+        handleUploadAudioSuccess(response, file, fileList){
+            this.formData.Audios=fileList.map(item=>{
+                return {name:item.response.Data.ResourceName,...item}
+            })
+        },
+        // 删除上传的音频
+        handleAudioRemove(file,fileList){
+            this.formData.Audios=fileList
+        },
+
+        // 提交
+        handleSubmit(e){
+            if(e==='cancel'){
+                this.$router.go(-1)
+                return
+            }
+            this.$refs.form.validate(async (valid)=>{
+                if(valid){
+
+                    let params={
+                        ActivityName:this.formData.ActivityName,
+                        ActivityTypeId:this.formData.childTypeVal,
+                        ActivityTypeName:this.formData.ActivityTypeName,
+                        Address:this.formData.Address,
+                        AmericaTel:this.formData.AmericaTel,
+                        City:this.formData.City,
+                        EndTime:this.formData.time[1],
+                        HongKongTel:this.formData.HongKongTel,
+                        IsLimitPeople:this.formData.LimitPeopleNum?1:0,//是否限制人数 1是,0否
+                        LimitPeopleNum:Number(this.formData.LimitPeopleNum),
+                        LinkParticipants:this.formData.LinkParticipants,
+                        MainlandTel:this.formData.MainlandTel,
+                        ParticipationCode:this.formData.ParticipationCode,
+                        PermissionIdList:[],//选择的权限
+                        PosterList:[],//海报数据
+                        PublishStatus:e==='save'?0:1,//不发布(保存):0; 发布:1
+                        Remarks:'',
+                        ReportLink:this.formData.ReportLink,//报告链接
+                        ReportName:this.formData.ReportName,//报告标题
+                        ReportId:this.formData.ReportId||0,//报告id
+                        IsNewReport:this.formData.IsNewReport,
+                        SingaporeTel:this.formData.SingaporeTel,
+                        Speaker:this.formData.Speaker.join(','),
+                        SpeakerBackgroundPic:'',
+                        SpeakerHeadPic:'',
+                        StartTime:this.formData.time[0],
+                        TaiwanTel:this.formData.TaiwanTel
+                    }
+
+                    if(this.showSelectSpeaker){//如果是选择的主讲人 则找出对应的背景图和头像
+                        let SpeakerBackgroundPicArr=[]
+                        let SpeakerHeadPicArr=[]
+                        this.formData.Speaker.forEach(item=>{
+                            this.speakerList.forEach(_item=>{
+                                if(_item.SpeakerName===item){
+                                    SpeakerBackgroundPicArr.push(_item.SpeakerBackgroundPic)
+                                    SpeakerHeadPicArr.push(_item.SpeakerHeadPic)
+                                }
+                            })
+                        })
+                        params.SpeakerBackgroundPic=SpeakerBackgroundPicArr.join(',')
+                        params.SpeakerHeadPic=SpeakerHeadPicArr.join(',')
+                        // this.speakerList.forEach(item=>{
+                        //     if(item.SpeakerName===params.Speaker){
+                        //         params.SpeakerBackgroundPic=item.SpeakerBackgroundPic
+                        //         params.SpeakerHeadPic=item.SpeakerHeadPic
+                        //     }
+                        // })
+                    }
+
+                    if(this.showPermission){// 选择的权限
+                        this.PermissionList.forEach(item=>{
+                            params.PermissionIdList.push(...item.CheckList)
+                        })
+                    }
+
+                    if(this.showUploadPoster){//上传的海报
+                        params.PosterList=this.formData.Poster.map(item=>{
+                            return {Name:item.name,Url:item.response.Data.ResourceUrl}
+                        })
+                    }
+
+                    if(!this.showActivityTypeName){//不是手动输入的活动类别
+                        this.childTypeList.forEach(item=>{
+                            if(item.ActivityTypeId==params.ActivityTypeId){
+                                params.ActivityTypeName=item.ActivityTypeName
+                            }
+                        })
+                    }
+                    
+                    // 校验
+                    if(this.showActivityTypeName&&!params.ActivityTypeName){
+                        this.$message.warning('请填写活动类别')
+                        return
+                    }
+                    if(!params.StartTime||!params.EndTime){
+                        this.$message.warning('请选择活动时间')
+                        return
+                    }
+                    if(!params.ActivityName){
+                        this.$message.warning('请填写活动标题')
+                        return
+                    }
+                    if(!params.Speaker){
+                        if(this.showSelectSpeaker){
+                            this.$message.warning('请选择主讲人')
+                        }else{
+                            if(this.formData.firstTypeVal==2||this.formData.firstTypeVal==4){
+                                this.$message.warning('请填写主讲嘉宾')
+                            }else{
+                                this.$message.warning('请填写主讲人')
+                            }
+                        }
+                        return
+                    }
+                    if(this.showUploadPoster&&params.PublishStatus==1){
+                        if(params.PosterList.length==0){
+                            this.$message.warning('请上传活动海报')
+                            return
+                        }
+                    }
+                    if(this.showAddressOrLimitPeople&&(!params.City||!params.Address)){
+                        this.$message.warning('请填写活动地址')
+                        return
+                    }
+                    if(this.showAddressOrLimitPeople&&!params.LimitPeopleNum){
+                        this.$message.warning('参会人数必须大于0')
+                        return
+                    }
+                    // 校验时间
+                    if((new Date(params.EndTime).getTime()-new Date(params.StartTime).getTime())<1000*60*30){
+                        this.$message.warning('活动时长不得小于半小时')
+                        return 
+                    }
+                    if(this.showPermission&&params.PermissionIdList.length<=0){
+                        this.$message.warning('请选择参会权限')
+                        return 
+                    }
+
+                    // console.log(params);
+                    const res=await ficcManageInterface.activityAdd(params)
+                    if(res.Ret===200){
+                        if(e==='save'){
+                            this.$message.success('保存成功')
+                        }else{
+                            this.$message.success('发布成功')
+                        }
+                        setTimeout(() => {
+                            this.$router.go(-1)
+                        }, 1000);
+                    }
+
+
+                }else{
+                    this.$message.warning('请完善表单项')
+                }
+            })
+        },
+        async getTelList(){
+          const res = await classifyTelList()
+          if(res.Ret===200){
+            const data = res.Data||[]
+            //其他电话会报告
+            this.reportTypeList = data.map(item=>{
+              return {name:item.ClassifyName,val:'tel_'+item.Id}
+            })
+            //晨报和周报
+            this.reportTypeList = this.reportTypeList.concat([{name:'晨报',val:'day'},{name:'周报',val:'week'}])
+            this.selectReportTtype = this.reportTypeList[0].val
+          }
+        },
+    },
+};
+</script>
+
+
+<style lang="scss">
+.ficc-upload-wrap{
+    display: flex;
+    .el-upload-list{
+        margin-left: 30px;
+        display: flex;
+        flex-wrap: wrap;
+        align-items: center;
+        flex: 1;
+        .el-upload-list__item{
+            min-width: 200px;
+            max-width: 300px;
+            margin-right: 10px;
+            &:first-child{
+                margin-top: 5px;
+            }
+        }
+    }
+}
+</style>
+<style lang="scss" scoped>
+.ficc-add-activity-wrap {
+    div {
+        box-sizing: border-box;
+    }
+    min-height: 80vh;
+    background: #ffffff;
+    border: 1px solid #ececec;
+    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
+    border-radius: 4px;
+    padding: 30px;
+    .menu_lists {
+		padding: 40px 18px;
+		border: 1px dashed #AAB4CC;
+		border-radius: 4px;
+		.menu_item {
+			display: flex;
+			// align-items: center;
+			margin-bottom: 40px;
+			&:last-child {
+				margin-bottom: 0;
+			}
+			.list_item {
+				margin-right: 30px;
+				&:last-child {
+					margin-right: 0;
+				}
+			}
+		}
+	}
+}
+.ficc-activity-selectreport-wrap{
+    display: flex;
+    .left-btn-box{
+        .el-button{
+            background-color:#ECF5FF;
+            border: 1px solid #B3D8FF;
+            color:#409EFF;
+            display: block;
+            margin-left: 0;
+            margin-bottom: 20px;
+            width: 90px;
+            white-space: normal;
+            padding: 12px 16px;
+        }
+        .el-button--primary{
+            background-color:#409EFF;
+            border:none;
+            color: #FFFFFF;
+        }
+    }
+    .right-box{
+        flex: 1;
+        margin-left: 30px;
+        .el-radio{
+            display: flex;
+        }
+    }
+}
+</style>

+ 863 - 0
src/views/ficc_manage/activity/editActivity.vue

@@ -0,0 +1,863 @@
+<template>
+    <div class="ficc-add-activity-wrap">
+        <el-form ref="form" :model="formData" :rules="formRules">
+            <el-form-item label="活动类型" label-width="100px" disabled style="display:inline-block;margin-right:20px" prop="firstTypeVal">
+                <el-select
+                    v-model="formData.firstTypeVal"
+                    placeholder="请选择活动类型"
+                    @change="firstTypeChange"
+                    disabled
+                >
+                    <el-option
+                        v-for="item in typeList"
+                        :key="item.ActivityTypeId"
+                        :label="item.ActivityTypeName"
+                        :value="item.ActivityTypeId"
+                    >
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="活动类别" label-width="100px" disabled style="display:inline-block;margin-right:20px" prop="childTypeVal">
+                <el-select
+                    v-model="formData.childTypeVal"
+                    no-data-text="请先选择活动类型"
+                    placeholder="请选择活动类别"
+                    @change="childTypeChange"
+                    disabled
+                >
+                    <el-option
+                        v-for="item in childTypeList"
+                        :key="item.ActivityTypeId"
+                        :label="item.ActivityTypeName"
+                        :value="item.ActivityTypeId"
+                    >
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="活动时间" label-width="100px" style="display:inline-block" prop="time">
+                <el-date-picker
+                    v-model="formData.time"
+                    type="datetimerange"
+                    range-separator="至"
+                    start-placeholder="活动开始时间"
+                    end-placeholder="活动结束时间"
+                    :default-time="['15:30:00','16:00:00']"
+                    value-format="yyyy-MM-dd HH:mm:ss">
+                </el-date-picker>
+            </el-form-item>
+
+            <template v-if="formData.firstTypeVal&&formData.childTypeVal">
+            <el-form-item label="活动类别" label-width="100px" prop="ActivityTypeName" v-if="showActivityTypeName">
+                <el-input placeholder="请输入活动类别" v-model="formData.ActivityTypeName"></el-input>
+            </el-form-item>
+            <el-form-item label="活动标题" label-width="100px" prop="ActivityName">
+                <el-input placeholder="请输入活动标题" v-model="formData.ActivityName"></el-input>
+            </el-form-item>
+            <el-form-item :label="formData.firstTypeVal==2||formData.firstTypeVal==4?'主讲嘉宾':'主讲人'" label-width="100px" prop="Speaker">
+                <template v-if="showSelectSpeaker">
+                    <el-select 
+                        v-model="formData.Speaker" 
+                        placeholder="请选择主讲人" 
+                        style="width:100%"
+                        multiple
+                        filterable>
+                        <el-option
+                            v-for="item in speakerList"
+                            :key="item.SpeakerId"
+                            :label="item.SpeakerName"
+                            :value="item.SpeakerName"
+                        ></el-option>
+                    </el-select>
+                    <el-image 
+                        v-for="item in speakerAvatar"
+                        :key="item"
+                        style="width: 80px; height: 80px;margin-top:10px"
+                        :src="item" 
+                        :preview-src-list="[item]">
+                    </el-image>
+                </template>
+                <el-input :placeholder="formData.firstTypeVal==2||formData.firstTypeVal==4?'请输入主讲嘉宾':'请输入主讲人'" v-model="formData.Speaker" v-else></el-input>
+            </el-form-item>
+
+            <el-form-item label="参会地址" label-width="100px" prop="address" v-if="showAddressOrLimitPeople">
+                <div style="display:flex;justify-content: space-between;">
+                    <el-select
+                        v-model="formData.City"
+                        placeholder="请选择城市"
+                        style="width:15%">
+                        <el-option 
+                            v-for="item in cityArr" 
+                            :key="item"
+                            :label="item"
+                            :value="item">
+                        </el-option>
+                    </el-select>
+                    <el-input style="width:84%;display:inline-block" placeholder="请输入详细地址" v-model="formData.Address"></el-input>
+                </div>
+                
+            </el-form-item>
+            <el-form-item label="参会人数" label-width="100px" prop="LimitPeopleNum" v-if="showAddressOrLimitPeople">
+                <el-input v-model="formData.LimitPeopleNum" placeholder="请输入线下参会人数限制"></el-input>
+            </el-form-item>
+            <el-form-item prop="Permission" v-if="showPermission">
+                <p>请选择参会权限(拥有以下任一勾选的权限,才可参会):</p>
+                <ul class="menu_lists">
+					<li v-for="item in PermissionList" :key="item.ClassifyName" class="menu_item">
+						<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAll(item)" style="marginRight:30px;fontWeight:bold;minWidth:90px;">{{item.ClassifyName+':'}}</el-checkbox>
+						<el-checkbox-group v-model="item.CheckList" @change="handleChecked(item)">
+							<el-checkbox v-for="list in item.Items" :label="list.ChartPermissionId" :key="list.ChartPermissionId" class="list_item">{{list.PermissionName}}</el-checkbox>
+						</el-checkbox-group>
+					</li>
+				</ul>
+            </el-form-item>
+            <template v-if="formData.firstTypeVal!=3">
+            <el-form-item label="大陆拨入号" label-width="100px" prop="MainlandTel">
+                <el-input placeholder="请输入大陆拨入号" v-model="formData.MainlandTel"></el-input>
+            </el-form-item>
+            <el-form-item label="香港拨入号" label-width="100px" prop="HongKongTel">
+                <el-input placeholder="请输入香港拨入号" v-model="formData.HongKongTel"></el-input>
+            </el-form-item>
+            <el-form-item label="台湾拨入号" label-width="100px" prop="TaiwanTel">
+                <el-input placeholder="请输入台湾拨入号" v-model="formData.TaiwanTel"></el-input>
+            </el-form-item>
+            <el-form-item label="新加坡拨入号" label-width="100px" prop="SingaporeTel">
+                <el-input placeholder="请输入新加坡拨入号" v-model="formData.SingaporeTel"></el-input>
+            </el-form-item>
+            <el-form-item label="美国拨入号" label-width="100px" prop="AmericaTel">
+                <el-input placeholder="请输入美国拨入号" v-model="formData.AmericaTel"></el-input>
+            </el-form-item>
+            <el-form-item label="拨入密码" label-width="100px" prop="ParticipationCode">
+                <el-input placeholder="请输入拨入密码" type="number" v-model="formData.ParticipationCode"></el-input>
+            </el-form-item>
+            </template>
+
+            <el-form-item label="参会链接" label-width="100px" prop="LinkParticipants" v-if="formData.firstTypeVal!=1">
+                <el-input placeholder="请输入参会链接" v-model="formData.LinkParticipants"></el-input>
+            </el-form-item>
+
+            <el-form-item label="报告链接" label-width="100px" prop="ReportLinkUrl" v-if="showSelectReportUrl">
+                <el-input placeholder="请选择报告链接" v-model="formData.ReportLink" readonly style="width:500px;margin-right:20px"></el-input>
+                <el-button type="primary" @click="handleShowSelectReport">选择报告</el-button>
+            </el-form-item>
+
+            <el-form-item label="活动海报" label-width="100px" prop="poster" v-if="showUploadPoster">
+                <el-upload
+                class="ficc-upload-wrap"
+                :action="baseApi+'/resource/image/upload'"
+                :on-remove="handlePosterRemove"
+                :on-success="handleUploadPosterSuccess"
+                accept="image/*"
+                :on-preview="handlePreImg"
+                multiple
+                :file-list="formData.Poster">
+                    <el-button type="primary">上传活动海报</el-button>
+                </el-upload>
+            </el-form-item>
+
+            <el-form-item label="会议音频" label-width="100px" prop="Audios">
+                <el-upload
+                class="ficc-upload-wrap"
+                :action="baseApi+'/resource/voice/upload'"
+                :on-remove="handleAudioRemove"
+                :on-success="handleUploadAudioSuccess"
+                :before-upload="handleAudioBeforeUpload"
+                accept="audio/*"
+                multiple
+                :file-list="formData.Audios">
+                    <el-button type="primary">上传会议音频</el-button>
+                </el-upload>
+            </el-form-item>
+            
+            <div style="text-align:center;margin:30px 0">
+                <el-button type="primary" style="width:120px" @click="handleSubmit('save')">保存</el-button>
+                <el-button type="primary" style="width:120px" @click="handleSubmit('publish')" v-if="PublishStatus!=1">发布</el-button>
+                <el-button type="primary" plain style="width:120px" @click="handleSubmit('cancel')">取消</el-button>
+            </div>
+            </template>
+
+        </el-form>
+
+        <!-- 选择报告弹窗 -->
+        <el-dialog 
+            v-dialogDrag 
+            :append-to-body="true" 
+            :visible.sync="showSelectReport" 
+            width="50vw" 
+            title="选择报告"
+            center
+        >
+            <div class="ficc-activity-selectreport-wrap">
+                <div class="left-btn-box">
+                    <el-button 
+                        v-for="item in reportTypeList"
+                        :key="item.val"
+                        :type="selectReportTtype==item.val?'primary':''" 
+                        @click="handleReportTypeChange(item.val)">{{item.name}}</el-button>
+                </div>
+                <div class="right-box">
+                    <el-input v-model="searchReportVal" @input="handleSearchReportList" placeholder="标题关键字搜索" style="width:100%"></el-input>
+                    <el-table :data="reportList" border style="margin-top:20px">
+                        <el-table-column align="center" label="报告标题">
+                            <template slot-scope="scope">
+                                <div style="text-align:left">
+                                    <el-radio v-model="formData.ReportId" :label="scope.row.ResearchReportId">
+                                        <span style="white-space: normal;">{{ scope.row.ResearchReportName }}</span>
+                                    </el-radio>
+                                </div>
+                            </template>
+                        </el-table-column>
+                        <el-table-column align="center" label="创建时间">
+                            <template slot-scope="scope">
+                                {{scope.row.CreatedTime}}
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                    <div style="text-align:center;margin:30px 0">
+                        <el-button type="primary" @click="handleSaveSelectReport">保存</el-button>
+                        <el-button type="primary" plain @click="showSelectReport=false">取消</el-button>
+                    </div>
+                </div>
+            </div>
+        </el-dialog>
+
+        <!-- 图片预览弹窗 -->
+        <el-image-viewer 
+		v-if="showPreImg" 
+        :on-close="closePreImg" 
+		:url-list="preImgList" />
+    </div>
+</template>
+
+<script>
+import moment from 'moment'
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+import { ficcManageInterface,customInterence,resourceInterface,classifyTelList } from "@/api/api";
+import { isArray } from 'highcharts';
+export default {
+    components:{ElImageViewer},
+    computed:{
+        showActivityTypeName(){//是否显示手动输入活动类别
+            let flag=false
+            if(this.formData.childTypeVal==39
+                ||this.formData.childTypeVal==41
+                ||this.formData.firstTypeVal==4){
+                flag=true
+            }
+
+            return flag
+        },
+
+        showUploadPoster(){//显示上传活动海报
+            let flag=false
+            if(this.formData.firstTypeVal!=1){
+                flag=true
+            }
+
+            return flag
+        },
+
+        showSelectReportUrl(){//显示选择报告链接
+            let flag=false
+            if(this.formData.firstTypeVal!=2){
+                flag=true 
+            }
+
+            return flag 
+        },
+
+        showAddressOrLimitPeople(){//显示地址或着参会限制人数
+            let flag=false
+
+            if(this.formData.firstTypeVal==3||this.formData.firstTypeVal==4) flag=true
+            return flag 
+        },
+
+        showPermission(){//显示选择参会权限
+            let flag=false
+
+            if(this.formData.firstTypeVal==3) flag=true
+            return flag 
+
+        },
+
+        showSelectSpeaker(){//显示选择主讲人
+            let flag=false
+            if(this.formData.firstTypeVal==1||(this.formData.firstTypeVal==3&&this.formData.childTypeVal!=41)) flag=true
+            return flag 
+
+        },
+
+        speakerAvatar(){
+            if(this.formData.Speaker){
+                let img=this.formData.Speaker.map(item=>{
+                    let str=''
+                    this.speakerList.forEach(_item=>{
+                        if(_item.SpeakerName==item){
+                            str=_item.SpeakerHeadPic
+                        }
+                    })
+                    return str
+                })
+                return img
+            }
+        }
+    },
+    beforeRouteLeave(to, from, next){
+        // 清除session 
+        sessionStorage.removeItem('ficcActivityDetail')
+        next()
+    },
+    data() {
+        return {
+            PublishStatus:0,//发布状态
+            baseApi:process.env.API_ROOT,
+            typeList: [],
+            childTypeList: [],
+            speakerList:[],
+            
+            formData:{
+                firstTypeVal: "",
+                childTypeVal: "",
+                ActivityTypeName:'',//活动类别名称
+                time:[],
+                ActivityName:'',//活动标题
+                Speaker:[],
+                MainlandTel:'',
+                HongKongTel:'',
+                TaiwanTel:'',
+                AmericaTel:'',
+                SingaporeTel:'',
+                ReportLink:'',//报告链接
+                ReportName:'',//报告名字
+                ReportId:'',//报告id
+                IsNewReport:0,//是否关联的是新报告 0否 1是
+                ParticipationCode:'',//拨号密码
+                Audios:[],//音频
+                Poster:[],//海报
+                LinkParticipants:"",//参会链接
+                City:'',//城市
+                Address:'',//详细地址
+                LimitPeopleNum:'',//限制人数
+                Permission:[],//选择的参会权限
+            },
+            formRules:{
+                firstTypeVal:[{required: true, message: "请选择活动类型", trigger: "change"}],
+                childTypeVal:[{required: true, message: "请选择活动类别", trigger: "change"}],
+                time:[{required: true, message: "请选择活动时间", trigger: "change"}],
+
+            },
+
+            showSelectReport:false,//显示选择报告弹窗
+            selectReportTtype:'',
+            reportTypeList:[
+               /*  {name:"双周报",val:"new_two_week"},
+                {name:"月报",val:"month"},
+                {name:"点评",val:"other"},
+                // {name:"周报",val:"week"},
+                {name:'周报',val:'new_week'},
+                {name:"晨报",val:"day"}, */
+            ],
+            reportList:[],
+            searchReportVal:'',//搜索报告的关键词
+
+            cityArr:['上海','北京','杭州','深圳'],
+            PermissionList:[],//权限数据
+
+            preImgUrl:'',
+            showPreImg:false,
+        };
+    },
+    created() {
+        this.getTypeList();
+        this.getSpeakerList()
+        this.getTelList()
+    },
+    methods: {
+
+        // 上传音频大小控制
+        handleAudioBeforeUpload(e){
+            if(e.size>200*1024*1024){
+                this.$message.warning('音频大小不得大于200M')
+                return false
+            }else{
+                return true
+            }
+        },
+
+
+        //预览图片
+        handlePreImg(file){
+            this.preImgList=[file.url]
+            this.showPreImg=true
+        },
+
+        closePreImg(){
+            this.showPreImg=false
+            this.preImgList=[]
+        },
+
+        // 初始化数据
+        initData(){
+            let obj=JSON.parse(sessionStorage.getItem('ficcActivityDetail'))
+            console.log(obj);
+            this.PublishStatus=obj.PublishStatus
+            this.formData.firstTypeVal=obj.FirstActivityTypeId
+            this.typeList.forEach((item) => {
+                if (item.ActivityTypeId == this.formData.firstTypeVal) {
+                    this.childTypeList = item.ChildList;
+                }
+            });
+
+            this.formData.childTypeVal=obj.ActivityTypeId
+            this.formData.ActivityTypeName=obj.ActivityTypeName
+            this.formData.time=[moment(obj.StartTime).format('YYYY-MM-DD HH:mm:ss'),moment(obj.EndTime).format('YYYY-MM-DD HH:mm:ss')]
+            this.formData.ActivityName=obj.ActivityName
+            this.formData.Speaker=obj.Speaker.split(',')
+            this.formData.MainlandTel=obj.MainlandTel
+            this.formData.HongKongTel=obj.HongKongTel
+            this.formData.TaiwanTel=obj.TaiwanTel
+            this.formData.AmericaTel=obj.AmericaTel
+            this.formData.SingaporeTel=obj.SingaporeTel
+            this.formData.ReportLink=obj.ReportLink
+            this.formData.ReportName=obj.ReportName
+            this.formData.ReportId=obj.ReportId
+            this.formData.IsNewReport=Number(obj.IsNewReport)
+            this.formData.ParticipationCode=obj.ParticipationCode
+            this.formData.Audios=obj.VoiceList&&obj.VoiceList.map(item=>{
+                return {name:item.VoiceName,PlaySeconds:item.VoicePlaySeconds,url:item.VoiceUrl}
+            })||[]
+            this.formData.Poster=obj.PosterList&&obj.PosterList.map(item=>{
+                return {name:item.Name,url:item.Url}
+            })||[]
+            this.formData.LinkParticipants=obj.LinkParticipants
+            this.formData.City=obj.City
+            this.formData.Address=obj.Address
+            this.formData.LimitPeopleNum=obj.LimitPeopleNum
+            this.formData.Permission=obj.PermissionList&&obj.PermissionList.map(item=>item.PermissionId)
+        },
+        
+        //获取活动类型
+        async getTypeList() {
+            const res = await ficcManageInterface.activityTypeList();
+            if (res.Ret === 200) {
+                this.typeList = res.Data || [];
+                this.initData()
+                if(this.formData.firstTypeVal==3){
+                    this.getPermissionList()
+                }
+            }
+        },
+
+        // 点击弹出选择报告
+        handleShowSelectReport(){
+            this.showSelectReport=true
+            this.getReportList()
+        },
+
+        // 报告类别切换
+        handleReportTypeChange(e){
+            this.searchReportVal=''
+            this.selectReportTtype=e
+            this.getReportList()
+        },
+
+        // 关键词搜索报告
+        handleSearchReportList(){
+            this.getReportList()
+        },
+
+        // 获取报告列表
+        async getReportList(){
+          let reportType='',telClassifyId=0
+          //如果是其他电话会,拆分ReportType和ClassifyId
+          if(this.selectReportTtype.includes('_')){
+            const arr = this.selectReportTtype.split('_')
+            reportType = arr[0]
+            telClassifyId = Number(arr[1])
+          }
+          const res=await ficcManageInterface.activityReportList({
+              Keyword:this.searchReportVal,
+              ReportType:reportType.length?reportType:this.selectReportTtype,
+              ClassifyId:reportType.length?telClassifyId:0,
+              CurrentIndex: 1,
+              PageSize: 5,
+          })
+          if(res.Ret===200){
+              this.reportList=res.Data.List
+          }
+        },
+
+        // 保存选择的报告
+        handleSaveSelectReport(){
+            this.reportList.forEach(item=>{
+                if(item.ResearchReportId==this.formData.ReportId){
+                    this.formData.ReportName=item.ResearchReportName
+                    this.formData.ReportLink=item.LinkUrl
+                    // 是否是新后台的报告
+                    if(this.selectReportTtype=='day'){
+                        this.formData.IsNewReport=0
+                    }else{
+                        this.formData.IsNewReport=1
+                    }
+                }
+            })
+            this.showSelectReport=false
+        },
+
+        // 获取主讲人列表
+        async getSpeakerList(){
+            const res=await ficcManageInterface.activitySpeakerList({
+                PageSize:10000,
+                CurrentIndex:1,
+            })
+            if(res.Ret===200){
+                this.speakerList=res.Data.List||[]
+            }
+        },
+
+        // 获取基本权限列表
+        async getPermissionList(){
+            const res=await customInterence.authList({CompanyType:'ficc'})
+            if(res.Ret===200){
+                let newArr = [];
+				res.Data.List.length&&res.Data.List.forEach(item => {
+					let obj = {
+						checkAll:false,
+						isIndeterminate:false,
+						...item,
+                        CheckList:[]
+					}
+                    if(this.formData.Permission&&this.formData.Permission.length>0){
+                        obj.Items.forEach((e) => {
+                            let flag = this.formData.Permission.indexOf(e.ChartPermissionId);
+                            if (flag != -1) {
+                                obj.CheckList.push(e.ChartPermissionId);
+                            }
+                        });
+                        if (obj.CheckList.length === obj.Items.length) {
+                            obj.checkAll = true;
+                        } else {
+                            if(obj.CheckList.length>0){
+                                obj.isIndeterminate=true
+                            }
+                            obj.checkAll = false;
+                        }
+                    }
+                    
+					newArr.push(obj)
+				})
+				this.PermissionList = newArr;
+            }
+        },
+        /* 选择全选或取消全选 */
+		handleCheckAll(item) {
+			// 取到所有的子菜单id
+			let ids = item.Items.map(item =>{
+				return item.ChartPermissionId
+			})
+			item.CheckList = item.checkAll ? ids : [];	
+        	item.isIndeterminate = false;
+		},
+		/* 复选框組选中时 */
+		handleChecked(item) {
+			let len = item.CheckList.length;
+			item.checkAll = len === item.Items.length;
+			item.isIndeterminate = len > 0 && len < item.Items.length;
+		},
+
+        // 海报上传成功回调
+        handleUploadPosterSuccess(response, file, fileList){
+            let arr=[]
+            fileList.forEach(item=>{
+                if(typeof item.response === 'string'){
+                    item.response=this.$parseData(item.response)
+                }
+                if(item.response){
+                    if(item.response.Ret===200){
+                        arr.push({
+                            name:item.response.Data.ResourceName,
+                            url:item.response.Data.ResourceUrl
+                        })
+                    }
+                }else{
+                    arr.push({...item})
+                }
+            })
+            this.formData.Poster=arr
+        },
+        // 删除上传的海报
+        handlePosterRemove(file,fileList){
+            this.formData.Poster=fileList
+        },
+        // 音频上传成功回调
+        handleUploadAudioSuccess(response, file, fileList){
+            let arr=[]
+            fileList.forEach(item=>{
+                if(typeof item.response === 'string'){
+                    item.response=this.$parseData(item.response)
+                }
+                if(item.response){
+                    if(item.response.Ret===200){
+                        arr.push({
+                            name:item.response.Data.ResourceName,
+                            PlaySeconds:item.response.Data.PlaySeconds,
+                            url:item.response.Data.ResourceUrl
+                        })
+                    }
+                }else{
+                    arr.push({...item})
+                }
+            })
+            this.formData.Audios=arr
+        },
+        
+        // 删除上传的音频
+        handleAudioRemove(file,fileList){
+            this.formData.Audios=fileList
+        },
+
+        // 提交
+        handleSubmit(e){
+            if(e==='cancel'){
+                this.$router.go(-1)
+                return
+            }
+            this.$refs.form.validate(async (valid)=>{
+                if(valid){
+
+                    let params={
+                        ActivityId:Number(this.$route.query.id),
+                        ActivityName:this.formData.ActivityName,
+                        ActivityTypeId:this.formData.childTypeVal,
+                        ActivityTypeName:this.formData.ActivityTypeName,
+                        Address:this.formData.Address,
+                        AmericaTel:this.formData.AmericaTel,
+                        City:this.formData.City,
+                        EndTime:this.formData.time[1],
+                        HongKongTel:this.formData.HongKongTel,
+                        IsLimitPeople:this.formData.LimitPeopleNum?1:0,//是否限制人数 1是,0否
+                        LimitPeopleNum:Number(this.formData.LimitPeopleNum),
+                        LinkParticipants:this.formData.LinkParticipants,
+                        MainlandTel:this.formData.MainlandTel,
+                        ParticipationCode:this.formData.ParticipationCode,
+                        PermissionIdList:[],//选择的权限
+                        PosterList:[],//海报数据
+                        PublishStatus:e==='save'?0:1,//不发布(保存):0; 发布:1
+                        Remarks:'',
+                        ReportLink:this.formData.ReportLink,//报告链接
+                        ReportName:this.formData.ReportName,//报告标题
+                        ReportId:this.formData.ReportId||0,//报告id
+                        IsNewReport:this.formData.IsNewReport,
+                        SingaporeTel:this.formData.SingaporeTel,
+                        Speaker:this.formData.Speaker.join(','),
+                        SpeakerBackgroundPic:'',
+                        SpeakerHeadPic:'',
+                        StartTime:this.formData.time[0],
+                        TaiwanTel:this.formData.TaiwanTel,
+                        VoiceList:[],//音频数据
+                    }
+
+                    if(this.showSelectSpeaker){//如果是选择的主讲人 则找出对应的背景图和头像
+                        let SpeakerBackgroundPicArr=[]
+                        let SpeakerHeadPicArr=[]
+                        this.formData.Speaker.forEach(item=>{
+                            this.speakerList.forEach(_item=>{
+                                if(_item.SpeakerName===item){
+                                    SpeakerBackgroundPicArr.push(_item.SpeakerBackgroundPic)
+                                    SpeakerHeadPicArr.push(_item.SpeakerHeadPic)
+                                }
+                            })
+                        })
+                        params.SpeakerBackgroundPic=SpeakerBackgroundPicArr.join(',')
+                        params.SpeakerHeadPic=SpeakerHeadPicArr.join(',')
+                        // this.speakerList.forEach(item=>{
+                        //     if(item.SpeakerName===params.Speaker){
+                        //         params.SpeakerBackgroundPic=item.SpeakerBackgroundPic
+                        //         params.SpeakerHeadPic=item.SpeakerHeadPic
+                        //     }
+                        // })
+                    }
+
+                    if(this.showPermission){// 选择的权限
+                        this.PermissionList.forEach(item=>{
+                            params.PermissionIdList.push(...item.CheckList)
+                        })
+                    }
+
+                    if(this.showUploadPoster){//上传的海报
+                        params.PosterList=this.formData.Poster.map(item=>{
+                            return {Name:item.name,Url:item.url}
+                        })
+                    }
+
+                    if(!this.showActivityTypeName){//不是手动输入的活动类别
+                        this.childTypeList.forEach(item=>{
+                            if(item.ActivityTypeId==params.ActivityTypeId){
+                                params.ActivityTypeName=item.ActivityTypeName
+                            }
+                        })
+                    }
+
+                    // 处理音频
+                    params.VoiceList=this.formData.Audios.map(item=>{
+                        return {
+                                Name:item.name,
+                                PlaySeconds:item.PlaySeconds.toString(),
+                                Url:item.url
+                            }
+                    })
+
+                    if(!params.StartTime||!params.EndTime){
+                        this.$message.warning('请选择活动时间')
+                        return
+                    }
+                    if(!params.ActivityName){
+                        this.$message.warning('请填写活动标题')
+                        return
+                    }
+                    if(!params.Speaker){
+                        if(this.showSelectSpeaker){
+                            this.$message.warning('请选择主讲人')
+                        }else{
+                            if(this.formData.firstTypeVal==2||this.formData.firstTypeVal==4){
+                                this.$message.warning('请填写主讲嘉宾')
+                            }else{
+                                this.$message.warning('请填写主讲人')
+                            }
+                        }
+                        return
+                    }
+                    // 校验时间
+                    if((new Date(params.EndTime).getTime()-new Date(params.StartTime).getTime())<1000*60*30){
+                        this.$message.warning('活动时长不得小于半小时')
+                        return 
+                    }
+                    if(this.showUploadPoster&&params.PublishStatus==1){
+                        if(params.PosterList.length==0){
+                            this.$message.warning('请上传活动海报')
+                            return
+                        }
+                    }
+                    if(this.showPermission&&params.PermissionIdList.length<=0){
+                        this.$message.warning('请选择参会权限')
+                        return 
+                    }
+
+                    console.log(params);
+                    const res=await ficcManageInterface.activityEdit(params)
+                    if(res.Ret===200){
+                        if(e==='save'){
+                            this.$message.success('保存成功')
+                        }else{
+                            this.$message.success('发布成功')
+                        }
+                        setTimeout(() => {
+                            this.$router.go(-1)
+                        }, 1000);
+                        
+                    }
+
+
+                }else{
+                    this.$message.warning('请完善表单项')
+                }
+            })
+        },
+        async getTelList(){
+          const res = await classifyTelList()
+          if(res.Ret===200){
+            const data = res.Data||[]
+            //其他电话会报告
+            this.reportTypeList = data.map(item=>{
+              return {name:item.ClassifyName,val:'tel_'+item.Id}
+            })
+            //晨报和周报
+            this.reportTypeList = this.reportTypeList.concat([{name:'晨报',val:'day'},{name:'周报',val:'week'}])
+            this.selectReportTtype = this.reportTypeList[0].val
+          }
+        },
+    },
+};
+</script>
+
+
+<style lang="scss">
+.ficc-upload-wrap{
+    display: flex;
+    .el-upload-list{
+        margin-left: 30px;
+        display: flex;
+        flex-wrap: wrap;
+        align-items: center;
+        flex: 1;
+        .el-upload-list__item{
+            min-width: 200px;
+            max-width: 300px;
+            margin-right: 10px;
+            &:first-child{
+                margin-top: 5px;
+            }
+        }
+    }
+}
+</style>
+<style lang="scss" scoped>
+.ficc-add-activity-wrap {
+    div {
+        box-sizing: border-box;
+    }
+    min-height: 80vh;
+    background: #ffffff;
+    border: 1px solid #ececec;
+    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
+    border-radius: 4px;
+    padding: 30px;
+    .menu_lists {
+		padding: 40px 18px;
+		border: 1px dashed #AAB4CC;
+		border-radius: 4px;
+		.menu_item {
+			display: flex;
+			// align-items: center;
+			margin-bottom: 40px;
+			&:last-child {
+				margin-bottom: 0;
+			}
+			.list_item {
+				margin-right: 30px;
+				&:last-child {
+					margin-right: 0;
+				}
+			}
+		}
+	}
+}
+.ficc-activity-selectreport-wrap{
+    display: flex;
+    .left-btn-box{
+        .el-button{
+            background-color:#ECF5FF;
+            border: 1px solid #B3D8FF;
+            color:#409EFF;
+            display: block;
+            margin-left: 0;
+            margin-bottom: 20px;
+            width: 90px;
+            white-space: normal;
+            padding: 12px 16px;
+        }
+        .el-button--primary{
+            background-color:#409EFF;
+            border:none;
+            color: #FFFFFF;
+        }
+    }
+    .right-box{
+        flex: 1;
+        margin-left: 30px;
+        .el-radio{
+            display: flex;
+        }
+    }
+}
+</style>