|
@@ -0,0 +1,537 @@
|
|
|
+<template>
|
|
|
+ <div class="record-warp">
|
|
|
+ <div class="record-main">
|
|
|
+ <!-- <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="search-head">
|
|
|
+ <span>渠道:</span>
|
|
|
+ <el-select v-model="channel" placeholder="请选择渠道">
|
|
|
+ <el-option
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ v-for="item in channelList"
|
|
|
+ :key="item.id"
|
|
|
+ ></el-option> </el-select
|
|
|
+ >
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="searchTarget"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" icon="el-icon-delete-solid" @click="clearSearch"
|
|
|
+ >清空</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row> -->
|
|
|
+ <!-- <el-row class="add_user_class">
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="search-head">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" @click="addUser"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row> -->
|
|
|
+
|
|
|
+ <div class="table-content">
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ :row-style="{ height: '0px' }"
|
|
|
+ :cell-style="{ padding: '5px' }"
|
|
|
+ >
|
|
|
+ <!-- <el-table-column prop="channelName" label="渠道" align="center" width="">
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column prop="companyName" label="公司名称" align="center" width="">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="tax" label="税号" align="center" width="">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="reportType"
|
|
|
+ label="报告类型"
|
|
|
+ :formatter="formatterReport"
|
|
|
+ align="center"
|
|
|
+ width=""
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createTime" label="生成时间" align="center" width="">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="status"
|
|
|
+ label="状态"
|
|
|
+ align="center"
|
|
|
+ :formatter="formatterStatus"
|
|
|
+ width=""
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <!-- <el-table-column
|
|
|
+ prop="selfPage"
|
|
|
+ label="自定义首尾页"
|
|
|
+ align="center"
|
|
|
+ :formatter="formatterSelfPage"
|
|
|
+ width=""
|
|
|
+ >
|
|
|
+ </el-table-column> -->
|
|
|
+ <!-- <el-table-column prop="isDelete" label="删除状态" align="center" :formatter="formatterDelete" width="">
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column label="操作" width="200px" align="center" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click="viewUser(scope.row)"
|
|
|
+ v-if="scope.row.state != 0"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="viewPDF(scope.row)"
|
|
|
+ v-if="scope.row.state != 0"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >查看PDF</el-button
|
|
|
+ >
|
|
|
+ <!-- <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ v-if="scope.row.state != 0"
|
|
|
+ @click="editUser(scope.row)"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ v-if="scope.row.state != 0"
|
|
|
+ @click="viewPoster(scope.row)"
|
|
|
+ >查看海报</el-button
|
|
|
+ > -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-pagination
|
|
|
+ small
|
|
|
+ background
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page.sync="pageNum"
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :page-size="pageSize"
|
|
|
+ :total="total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
|
|
|
+ </el-pagination> -->
|
|
|
+ </div>
|
|
|
+ <ContractChannelRegister ref="register" @search="searchTarget" />
|
|
|
+ <ContractPoster ref="poster" @search="searchTarget" />
|
|
|
+ <ContractTopUp ref="topUp" @search="searchTarget" />
|
|
|
+
|
|
|
+ <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
|
|
|
+ <div>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">公司名称</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ detailObj.companyName }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">税号</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ detailObj.tax }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">报告类型</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ detailObj.reportType }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">生成时间</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ detailObj.createTime }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">状态</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ detailObj.status == "0" ? "生成中" : "已完成" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="PDF预览" :visible.sync="viewPDFFlag" top="5vh" width="80%" center>
|
|
|
+ <div>
|
|
|
+ <embed width="100%" height=700px :src="pdfUrl">
|
|
|
+ </embed >
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { oSessionStorage } from "../../../utils/utils";
|
|
|
+import contractChannelRegister from "../../../components/ContractChannelRegister.vue";
|
|
|
+
|
|
|
+import contractPoster from "../../../components/ContractPoster.vue";
|
|
|
+import contractTopUp from "../../../components/ContractTopUp.vue";
|
|
|
+import { basePath } from "../../..//utils/http";
|
|
|
+export default {
|
|
|
+ name: "channelManagement",
|
|
|
+ components: {
|
|
|
+ ContractChannelRegister: contractChannelRegister,
|
|
|
+ ContractPoster: contractPoster,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ linkId: "",
|
|
|
+ pdfUrl:'',
|
|
|
+ viewPDFFlag:false,
|
|
|
+ centerDialogVisible: false,
|
|
|
+ editUserFlag: false,
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
+ value1: null,
|
|
|
+ total: 0,
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ keyword: "",
|
|
|
+ tableData: [],
|
|
|
+ userInfo: {}, //用户信息
|
|
|
+ userId: "", //用户id
|
|
|
+ name: "", //根据名称搜索
|
|
|
+ userName: "", //根据昵称搜索
|
|
|
+ hospitalOrDepartment: "", //医院科室
|
|
|
+
|
|
|
+ invitationCode: "",
|
|
|
+ roleType: "0",
|
|
|
+ type: 0,
|
|
|
+ view: {
|
|
|
+ name: "",
|
|
|
+ userName: "",
|
|
|
+ channelId: "",
|
|
|
+ role: "",
|
|
|
+ },
|
|
|
+ detailObj: {},
|
|
|
+ channel: "",
|
|
|
+ channelList: [{ name: "渠道天成", id: "1" }],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
|
|
|
+ console.log(this.userInfo);
|
|
|
+
|
|
|
+ if (this.userInfo.type == "1") {
|
|
|
+ this.channel = "";
|
|
|
+ } else if (this.userInfo.type == "0") {
|
|
|
+ this.channel = this.userInfo.channelId;
|
|
|
+ }
|
|
|
+ this.invitationCode = this.userInfo.invitationCode;
|
|
|
+
|
|
|
+ //判断是超级管理员吗
|
|
|
+ if (this.userInfo.roleType == "1") {
|
|
|
+ this.type = 0;
|
|
|
+ } else if (this.userInfo.roleType == "3") {
|
|
|
+ //如果登录的是代理用户
|
|
|
+ this.type = 4;
|
|
|
+ } else if (this.userInfo.roleType == "2") {
|
|
|
+ this.type = 5;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.userInfo) {
|
|
|
+ //如果用户信息不存在跳转登陆页
|
|
|
+ this.$router.push({ path: "/" });
|
|
|
+ }
|
|
|
+ this.linkId = this.$route.query.id;
|
|
|
+ this.searchTarget();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //报告类型
|
|
|
+ formatterReport(row) {
|
|
|
+ if (row.reportType == "1") {
|
|
|
+ return "邀约使用";
|
|
|
+ } else if (row.reportType == "2") {
|
|
|
+ return "渠道使用";
|
|
|
+ } else if (row.reportType == "3") {
|
|
|
+ return "公众号使用";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //充值次数
|
|
|
+ topUpCount(row) {
|
|
|
+ // console.log(this.$refs.topUp)
|
|
|
+ this.$refs.topUp.open(row.id);
|
|
|
+ },
|
|
|
+ //查看海报
|
|
|
+ viewPoster(row) {
|
|
|
+ this.$refs.poster.open(row);
|
|
|
+ },
|
|
|
+ //格式化自定义首尾页
|
|
|
+ formatterSelfPage(row) {
|
|
|
+ if (row.selfPage == "0") {
|
|
|
+ return "否";
|
|
|
+ } else {
|
|
|
+ return "是";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //员工管理
|
|
|
+ userManage(row) {
|
|
|
+ this.$router.push({ path: "/manage/staff", query: { channelId: row.id } });
|
|
|
+ },
|
|
|
+ //格式化状态
|
|
|
+ formatterStatus(row) {
|
|
|
+ if (row.status == "1") {
|
|
|
+ return "已生成";
|
|
|
+ } else if (row.status == "0") {
|
|
|
+ return "生成中";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ formatterDelete(row) {
|
|
|
+ if (row.isDelete == 0) {
|
|
|
+ return "正常";
|
|
|
+ } else {
|
|
|
+ return "已删除";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ resetUser(index, val) {
|
|
|
+ console.log(val);
|
|
|
+ this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
|
|
|
+ // this.$toast.success({message:'成功'});
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.searchTarget();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //重置密码
|
|
|
+ },
|
|
|
+ editUser(row) {
|
|
|
+ this.editRegisterUser(row);
|
|
|
+ },
|
|
|
+ viewPDF(val) {
|
|
|
+ this.pdfUrl= basePath+`/report/preview/${val.id}`
|
|
|
+ this.viewPDFFlag=true;
|
|
|
+ // this.$http.getImg(`/report/preview/${val.id}`, {}, (res) => {
|
|
|
+ // // this.$toast.success({message:'成功'});
|
|
|
+ // if (res && res.code == 200) {
|
|
|
+ // // this.$message.success("重置成功");
|
|
|
+ // // this.searchTarget();
|
|
|
+ // } else {
|
|
|
+ // this.$message.error(res.msg);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ viewUser(row) {
|
|
|
+ this.detailObj = row;
|
|
|
+
|
|
|
+ // if(row.reportType=='1'){
|
|
|
+ // return '邀约使用'
|
|
|
+ // }else if(row.reportType=='2'){
|
|
|
+ // return '渠道使用'
|
|
|
+ // }else if(row.reportType=='3'){
|
|
|
+ // return '公众号使用'
|
|
|
+ // }
|
|
|
+
|
|
|
+ if (this.detailObj.reportType == "1") {
|
|
|
+ this.detailObj.reportType = "邀约使用";
|
|
|
+ } else if (this.detailObj.reportType == "2") {
|
|
|
+ this.detailObj.reportType = "渠道使用";
|
|
|
+ } else if (this.detailObj.reportType == "3") {
|
|
|
+ this.detailObj.reportType = "公众号使用";
|
|
|
+ }
|
|
|
+ this.centerDialogVisible = true;
|
|
|
+ },
|
|
|
+ addUser() {
|
|
|
+ this.addRegisterUser(true);
|
|
|
+ },
|
|
|
+ clearSearch() {
|
|
|
+ this.channel = "";
|
|
|
+ this.searchTarget();
|
|
|
+ },
|
|
|
+ formatterRole(val) {
|
|
|
+ if (val.type == "1") {
|
|
|
+ return "超级管理员";
|
|
|
+ } else {
|
|
|
+ return "渠道用户";
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ forma(val) {
|
|
|
+ if (val.gender == "0") {
|
|
|
+ return "男";
|
|
|
+ } else {
|
|
|
+ return "女";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addRegisterUser(val) {
|
|
|
+ this.$refs.register.open(val);
|
|
|
+ },
|
|
|
+ editRegisterUser(val) {
|
|
|
+ this.$refs.register.edit(val);
|
|
|
+ },
|
|
|
+ deleteChannel(index, row) {
|
|
|
+ this.$http.delete(`/sign/delete/${row.id}`, {}, (res) => {
|
|
|
+ // this.$toast.success({message:'成功'});
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.searchTarget();
|
|
|
+ } else {
|
|
|
+ this.$message.error("删除失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.pageNum = val;
|
|
|
+ this.searchList();
|
|
|
+ },
|
|
|
+ //根据现有情况进行搜索
|
|
|
+ searchList() {
|
|
|
+ // let url =``
|
|
|
+
|
|
|
+ let data = {};
|
|
|
+ if (this.channel == "" || this.channel == null) {
|
|
|
+ data = {
|
|
|
+ pageNum: this.pageNum,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ data = {
|
|
|
+ pageNum: this.pageNum,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ channelId: this.channel,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ this.$http.post(`/report/findAll`, data, (res) => {
|
|
|
+ debugger;
|
|
|
+ // console.log(res,'用户测试记录')
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.tableData = res.data.content;
|
|
|
+ console.log(this.tableData);
|
|
|
+ this.total = res.data.totalElements;
|
|
|
+ } else {
|
|
|
+ // this.$toast.fail(res.msg);
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ searchTarget() {
|
|
|
+ this.pageNum = 1;
|
|
|
+ this.searchList();
|
|
|
+ },
|
|
|
+ //跳转首页
|
|
|
+ goHome() {
|
|
|
+ this.$router.push({ path: "/home" });
|
|
|
+ },
|
|
|
+ //跳转记录页
|
|
|
+ goRecord() {
|
|
|
+ this.$router.push({ path: "/record" });
|
|
|
+ },
|
|
|
+ //退出登陆
|
|
|
+ logout() {
|
|
|
+ oSessionStorage.removeItem("userInfo");
|
|
|
+ oSessionStorage.removeItem("token");
|
|
|
+ this.$router.push({ path: "/" });
|
|
|
+ },
|
|
|
+ //点击日历获取日期
|
|
|
+ getDate(param) {
|
|
|
+ // console.log(param,"日期。。。")
|
|
|
+ this.userRecord(param.dateStr);
|
|
|
+ },
|
|
|
+ //点击获取月出勤次数
|
|
|
+ getTimes(param) {
|
|
|
+ this.monthTimes = param;
|
|
|
+ },
|
|
|
+ // 用户测试记录显示
|
|
|
+ userRecord(date) {
|
|
|
+ this.$http.get(
|
|
|
+ `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
|
|
|
+ {},
|
|
|
+ (res) => {
|
|
|
+ // console.log(res,'用户测试记录')
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.listData = res.data;
|
|
|
+ } else {
|
|
|
+ this.$toast.fail(res.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+@import "../../../styles/theme.less";
|
|
|
+
|
|
|
+.record-warp {
|
|
|
+ width: 100%;
|
|
|
+ height: 80vh;
|
|
|
+ //background: url(../../assets/img/index/19.png) no-repeat center;
|
|
|
+ //background-size: 100% 100%;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .record-main {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow-y: auto;
|
|
|
+
|
|
|
+ .search-head {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .zc-title {
|
|
|
+ color: #606266;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .table-content {
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.add_user_class {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.user_out {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ align-items: center;
|
|
|
+ border: 1px solid #eeeeef;
|
|
|
+ line-height: 50px;
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.user_out_sub {
|
|
|
+ flex: 1;
|
|
|
+ background-color: #fafafa;
|
|
|
+ text-align: center;
|
|
|
+ // color:#ffffff
|
|
|
+}
|
|
|
+
|
|
|
+.user_out_subNext {
|
|
|
+ padding-left: 10px;
|
|
|
+ flex: 3;
|
|
|
+}
|
|
|
+</style>
|