Przeglądaj źródła

修改已开发完的需求上传

plg 8 miesięcy temu
rodzic
commit
c945ec8349

+ 3 - 1
src/components/ChannelRegister.vue

@@ -124,10 +124,11 @@
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="cancle">取 消</el-button>
+        <el-button type="info" round @click="cancle">取 消</el-button>
         <el-button
           v-show="isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >确 定</el-button
@@ -135,6 +136,7 @@
         <el-button
           v-show="!isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >修 改</el-button

+ 2 - 2
src/components/ContractChannelPoster.vue

@@ -7,8 +7,8 @@
       </div>
 
       <span slot="footer" class="dialog-footer">
-        <el-button @click="downLoadImage">下载</el-button>
-        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+        <el-button type="info" round @click="downLoadImage" >下载</el-button>
+        <el-button type="primary" round @click="dialogVisible = false">确 定</el-button>
       </span>
     </el-dialog>
   </div>

+ 4 - 1
src/components/ContractChannelRegister.vue

@@ -84,10 +84,11 @@
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="cancle">取 消</el-button>
+        <el-button type="info" round @click="cancle">取 消</el-button>
         <el-button
           v-show="isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >确 定</el-button
@@ -95,6 +96,7 @@
         <el-button
           v-show="!isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >修 改</el-button
@@ -167,6 +169,7 @@ export default {
         background:'',
         //海报
         poster:'',
+        isDelete:'0'
       },
       isView: true,
       rules: {

+ 2 - 2
src/components/ContractPoster.vue

@@ -6,8 +6,8 @@
       </div>
 
       <span slot="footer" class="dialog-footer">
-        <el-button @click="downLoadImage">下载</el-button>
-        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+        <el-button type="info" round @click="downLoadImage">下载</el-button>
+        <el-button type="primary" round @click="dialogVisible = false">确 定</el-button>
       </span>
     </el-dialog>
   </div>

+ 2 - 1
src/components/ContractRegister.vue

@@ -172,7 +172,7 @@
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="cancle">取 消</el-button>
+        <el-button type="info"  round @click="cancle">取 消</el-button>
         <el-button
           v-show="isView"
           type="primary"
@@ -183,6 +183,7 @@
         <el-button
           v-show="!isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >修 改</el-button

+ 2 - 2
src/components/ContractTopUp.vue

@@ -11,8 +11,8 @@
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="cancle('ruleForm')">取 消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')">提 交</el-button>
+        <el-button type="info" round @click="cancle('ruleForm')">取 消</el-button>
+        <el-button type="primary" round @click="submitForm('ruleForm')">提 交</el-button>
       </span>
     </el-dialog>
   </div>

+ 379 - 0
src/components/PriceRegister.vue

@@ -0,0 +1,379 @@
+<template>
+  <div>
+    <el-dialog
+      :title="isView ? '价格新增' : '价格编辑'"
+      :visible.sync="dialogVisible"
+      :before-close="cancle"
+      width="60%"
+    >
+      <el-form
+        :inline="true"
+        :model="ruleForm"
+        :rules="rules"
+        ref="ruleForm"
+        label-width="120px"
+        class="demo-ruleForm"
+      >
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="标题" prop="title">
+              <el-input
+                v-model="ruleForm.title"
+                class="inputCom"
+                placeholder="请输入标题"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="价格" prop="price">
+              <el-input-number
+                v-model="ruleForm.price"
+                class="inputCom"
+                placeholder="请输入价格"
+              ></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="次数起始(包含)" prop="beginNum">
+              <el-input-number
+                v-model="ruleForm.beginNum"
+                class="inputCom"
+                placeholder="请输入次数起始"
+              ></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="次数结束(包含)" prop="endNum">
+              <el-input-number
+                v-model="ruleForm.endNum"
+                class="inputCom"
+                placeholder="请输入次数结束"
+              ></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="状态" prop="status">
+              <el-select v-model="ruleForm.status" placeholder="请选择状态">
+                <el-option
+                  :label="item.name"
+                  :value="item.state"
+                  v-for="item in stateList"
+                  :key="item.state"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="渠道级别" prop="channelLevel ">
+              <el-select v-model="ruleForm.channelLevel" placeholder="请选择渠道级别">
+                <el-option
+                  :label="item.name"
+                  :value="item.level"
+                  v-for="item in channelLevelList"
+                  :key="item.level"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="cancle" round>取 消</el-button>
+        <el-button
+          v-show="isView"
+          type="primary"
+          round
+          :disabled="disableFlag"
+          @click="submitCom"
+          >确 定</el-button
+        >
+        <el-button
+          v-show="!isView"
+          type="primary"
+          round
+          :disabled="disableFlag"
+          @click="submitCom"
+          >修 改</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+// import { oSessionStorage } from "../../utils/utils";
+import { oSessionStorage } from "../utils/utils";
+import { basePath } from "../utils/http";
+import md5 from "md5";
+export default {
+  data() {
+    var validatePass = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("请输入密码"));
+      } else if (value.length < 6) {
+        callback(new Error("密码至少6位"));
+      } else {
+        callback();
+      }
+    };
+    var validatePhone = (rule, value, callback) => {
+      let myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
+      if (value === "") {
+        callback(new Error("请输入手机号"));
+      } else if (!myreg.test(value)) {
+        callback(new Error("请输入正确格式"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      action: "",
+      disableFlag: false,
+      phoneFlag: false,
+      flag: 3,
+      dialogVisible: false,
+      //渠道列表
+      stateList: [
+        { name: "已停用", state: "1" },
+        { name: "生效中", state: "0" },
+      ],
+      //渠道级别
+      channelLevelList: [
+        { name: "级别1", level: "1" },
+        { name: "级别2", level: "2" },
+      ],
+      ruleForm: {
+        id: "",
+        //标题
+        title: "",
+        //价格
+        price: "",
+        //起始次数
+        beginNum: "",
+        //结束次数
+        endNum: "",
+        //状态
+        status: "",
+        //渠道级别
+        channelLevel: "",
+      },
+      isView: true,
+      rules: {
+        title: [{ required: true, message: "请输入标题", trigger: "blur" }],
+        price: [{ required: true, message: "请输入价格", trigger: "blur" }],
+        beginNum: [{ required: true, message: "请输入起始次数", trigger: "blur" }],
+        endNum: [{ required: true, message: "请输入结束次数", trigger: "blur" }],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
+      },
+    };
+  },
+  mounted() {
+    let userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    this.ruleForm.parentCode = userInfo.invitationCode;
+    this.action = basePath + "/file/customUpload";
+    //获取到router 传输过来的信息
+    this.ruleForm.channelId = this.$route.query.channelId;
+
+    //获取渠道信息
+
+    // this.ruleForm.type = "3";
+  },
+  methods: {
+    beforeAvatarUpload(file) {
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
+      if (fileType !== ".jpg" && fileType !== ".jpeg" && fileType !== ".png") {
+        // alert("请上传jpg、jpge或png的图片!");
+        this.$message.error("请上传jpg、jpge或png的图片!");
+        return false;
+      }
+      return true;
+    },
+    //handleAvatarSuccess
+    //上传成功后的回调
+    handleAvatarSuccess(data) {
+      if (data.code == 200) {
+        this.ruleForm.avatar = basePath + "/file/show?filePath=" + data.data;
+        console.log(basePath + "/file/show?filePath=" + data.data);
+      } else {
+        //失败
+      }
+    },
+    phoneCheck() {
+      //判断是否重复
+      this.$http.get(`v1/system/checkPhone/${this.ruleForm.phone}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          if (res.data) {
+            this.phoneFlag = true;
+          } else {
+            this.phoneFlag = false;
+            // this.$toast.success({ message: "手机号重复" });
+            this.$message.warning("手机号重复");
+          }
+        } else {
+          // this.$toast.fail({ message: res.msg });
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    timeChange(val) {
+      if (val !== null) {
+        //根据时间得到格式化的数据
+        this.ruleForm.birthDate = this.formatterTime(val);
+      }
+    },
+    formatterTime(val) {
+      let date = new Date(val);
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      month = this.formatterMon(month);
+      let day = date.getDate();
+      day = this.formatterMon(day);
+      return year + "-" + month + "-" + day;
+    },
+    formatterMon(val) {
+      if (val < 10) {
+        return "0" + val;
+      } else {
+        return val;
+      }
+    },
+    open(val) {
+      this.dialogVisible = true;
+      this.isView = val;
+
+      this.$nextTick(() => {
+        this.$refs["ruleForm"].clearValidate();
+      });
+    },
+    edit(val) {
+      this.dialogVisible = true;
+      this.isView = false;
+      this.ruleForm.id = val.id;
+      this.ruleForm.title = val.title;
+      this.ruleForm.price = val.price;
+      this.ruleForm.beginNum = val.beginNum;
+      this.ruleForm.endNum = val.endNum;
+      this.ruleForm.status = val.status;
+      this.ruleForm.channelLevel = val.channelLevel;
+      console.log(val.channelLevel)
+    },
+    cancle() {
+      //清空表单
+
+      this.ruleForm.id = "";
+      this.ruleForm.title = "";
+      this.ruleForm.price = "";
+      this.ruleForm.beginNum = "";
+      this.ruleForm.endNum = "";
+      this.ruleForm.status = "";
+      this.ruleForm.channelLevel = "";
+      this.$refs["ruleForm"].clearValidate();
+      this.dialogVisible = false;
+    },
+    submitCom() {
+      this.$refs["ruleForm"].validate((valid) => {
+        if (valid) {
+          //判断是编辑还是新增
+          if (this.isView) {
+            this.register();
+          } else {
+            this.editUserFun();
+          }
+
+          //都校验通过后可以触发注册接口了
+          //调用方法进行入参
+        }
+      });
+    },
+    register() {
+      let that = this;
+      this.$http.post(
+        `/price/save`,
+        {
+          title: this.ruleForm.title,
+          price: this.ruleForm.price,
+          beginNum: this.ruleForm.beginNum,
+          endNum: this.ruleForm.endNum,
+          status : this.ruleForm.status ,
+          channelLevel: this.ruleForm.channelLevel,
+          // ...this.ruleForm, //解构对象
+        },
+        (res) => {
+          this.disableFlag = false;
+          if (res && res.code == 200) {
+            this.dialogVisible = false;
+            this.$message.success(res.msg);
+            // this.$toast.success({ message: "成功" });
+            //调用父组件的查询方法
+            that.$emit("search");
+          } else {
+            // this.$toast.fail({ message: res.msg });
+            this.$message.error(res.msg);
+          }
+          //清空缓存
+          this.cancle();
+        }
+      );
+    },
+    editUserFun() {
+      let that = this;
+      this.$http.post(
+        `/price/update`,
+        {
+          ...this.ruleForm,
+          // ...this.ruleForm, //解构对象
+        },
+        (res) => {
+          this.disableFlag = false;
+          if (res && res.code == 200) {
+            this.dialogVisible = false;
+            // this.$toast.success({ message: "成功" });
+            //调用父组件的查询方法
+            that.$emit("search");
+            this.$message.success("修改成功");
+          } else {
+            // this.$toast.fail({ message: res.msg });
+            this.$message.error(res.msg);
+          }
+          //清空缓存
+          this.cancle();
+        }
+      );
+    },
+  },
+};
+</script>
+<style scoped>
+.inputCom {
+  width: 200px;
+}
+
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+  border: 1px solid;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>

+ 3 - 1
src/components/Register.vue

@@ -51,10 +51,11 @@
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="cancle">取 消</el-button>
+        <el-button type="info" round @click="cancle">取 消</el-button>
         <el-button
           v-show="isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >确 定</el-button
@@ -62,6 +63,7 @@
         <el-button
           v-show="!isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >修 改</el-button

+ 3 - 1
src/components/StaffRegister.vue

@@ -96,10 +96,11 @@
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="cancle">取 消</el-button>
+        <el-button @click="cancle" round>取 消</el-button>
         <el-button
           v-show="isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >确 定</el-button
@@ -107,6 +108,7 @@
         <el-button
           v-show="!isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >修 改</el-button

+ 158 - 139
src/router/router.js

@@ -1,151 +1,170 @@
-
 //按功能模块配置路由
 
 //聊天路由
 export const routerList = [
-    {
-        path: "/manage",
-        name: "manage",
-        component: () => import('../views/manage/manageMain'),
-        redirect: "/manage/adminHome",
-        meta: {
-            unKeepAlive: true, // 需要被缓存
-        },
-        children: [
-            {
-                path: "adminHome",
-                name: "adminHome",
-                component: () => import('../views/manage/adminHome'),
-            },
-            {
-                path: "userManage",
-                name: "userManage",
-                component: () => import('../views/manage/userManage'),
-            },
-            {
-                path: "userManage",
-                name: "userManage",
-                component: () => import('../views/manage/userManage'),
-            },
-            {
-                path: "roleManage",
-                name: "roleManage",
-                component: () => import('../views/manage/roleManage'),
-            },
-            //渠道信息、、签约详情
-            {
-                path: "channelInfo",
-                name: "channelInfo",
-                component: () => import('../views/manage/channelInfo/channelInfo'),
-            },
-             //渠道信息、、订单结算
-             {
-                path: "orderSettlement",
-                name: "orderSettlement",
-                component: () => import('../views/manage/channelInfo/orderSettlement'),
-            },
-            //渠道管理 、、渠道信息
-            {
-                path: "channelManagement",
-                name: "channelManagement",
-                component: () => import('../views/manage/channelManagement/channelManagement'),
-            },
-            {
-                path: "contract",
-                name: "contract",
-                component: () => import('../views/manage/channelManagement/contract'),
-            },
-            
-            //员工管理
-            {
-                path: "staff",
-                name: "staff",
-                component: () => import('../views/manage/channelManagement/staff'),
-            },
-
-
-
-            {
-                path: "agencyUserManage",
-                name: "agencyUserManage",
-                component: () => import('../views/manage/agencyUserManage'),
-            },
-            {
-                path: "doctorUserManage",
-                name: "doctorUserManage",
-                component: () => import('../views/manage/doctorUserManage'),
-            },
-            {
-                path: "userRecord",
-                name: "userRecord",
-                component: () => import('../views/manage/userRecord'),
-            },
-            {
-                path: "userRecord/detail",
-                name: "userRecordDetail",
-                component: () => import('../views/manage/userRecordDetail'),
-            },
-            {
-                path: "gameRecord",
-                name: "gameRecord",
-                component: () => import('../views/manage/gameRecord'),
-            },
-            {
-                path: "gameRecord/detail",
-                name: "gameRecordDetail",
-                component: () => import('../views/manage/gameRecordDetail'),
-            },
-
-        ],
+  {
+    path: "/manage",
+    name: "manage",
+    component: () => import("../views/manage/manageMain"),
+    redirect: "/manage/adminHome",
+    meta: {
+      unKeepAlive: true, // 需要被缓存
     },
+    children: [
+      {
+        path: "adminHome",
+        name: "adminHome",
+        component: () => import("../views/manage/adminHome"),
+      },
+      {
+        path: "userManage",
+        name: "userManage",
+        component: () => import("../views/manage/userManage"),
+      },
+      {
+        path: "userManage",
+        name: "userManage",
+        component: () => import("../views/manage/userManage"),
+      },
+      {
+        path: "roleManage",
+        name: "roleManage",
+        component: () => import("../views/manage/roleManage"),
+      },
+      //渠道信息、、签约详情
+      {
+        path: "channelInfo",
+        name: "channelInfo",
+        component: () => import("../views/manage/channelInfo/channelInfo"),
+      },
+      //渠道信息、、订单结算
+      {
+        path: "orderSettlement",
+        name: "orderSettlement",
+        component: () => import("../views/manage/channelInfo/orderSettlement"),
+      },
+      //渠道信息、、邀请链接
+      {
+        path: "invite",
+        name: "invite",
+        component: () => import("../views/manage/channelInfo/invite"),
+      },
+      //渠道信息、、邀请链接、、查看记录
+      {
+        path: "recordList",
+        name: "recordList",
+        component: () => import("../views/manage/channelInfo/recordList"),
+      },
+      //渠道信息、、报告记录
+      {
+        path: "recordListAll",
+        name: "recordListAll",
+        component: () => import("../views/manage/channelInfo/recordListAll"),
+      },
+      //渠道管理 、、渠道信息
+      {
+        path: "channelManagement",
+        name: "channelManagement",
+        component: () =>
+          import("../views/manage/channelManagement/channelManagement"),
+      },
+      {
+        path: "contract",
+        name: "contract",
+        component: () => import("../views/manage/channelManagement/contract"),
+      },
+      //财税报告、、价格接口
+      {
+        path: "interfacePrice",
+        name: "interfacePrice",
+        component: () => import("../views/manage/interfacePrice/interfacePrice.vue"),
+      },
 
+      //员工管理
+      {
+        path: "staff",
+        name: "staff",
+        component: () => import("../views/manage/channelManagement/staff"),
+      },
 
+      {
+        path: "agencyUserManage",
+        name: "agencyUserManage",
+        component: () => import("../views/manage/agencyUserManage"),
+      },
+      {
+        path: "doctorUserManage",
+        name: "doctorUserManage",
+        component: () => import("../views/manage/doctorUserManage"),
+      },
+      {
+        path: "userRecord",
+        name: "userRecord",
+        component: () => import("../views/manage/userRecord"),
+      },
+      {
+        path: "userRecord/detail",
+        name: "userRecordDetail",
+        component: () => import("../views/manage/userRecordDetail"),
+      },
+      {
+        path: "gameRecord",
+        name: "gameRecord",
+        component: () => import("../views/manage/gameRecord"),
+      },
+      {
+        path: "gameRecord/detail",
+        name: "gameRecordDetail",
+        component: () => import("../views/manage/gameRecordDetail"),
+      },
+    ],
+  },
 ];
 export const routers = [
-    ...routerList,
-    //登录
-    // {
-    //     path: '/',
-    //     component: () => import('../views/login.vue'),
-    //     name: 'login',
-    //     meta: {
-    //         headShow: false, // true显示,false隐藏
-    //         headLeft: false, // true显示,false隐藏
-    //         headTitle: "",
-    //         unKeepAlive: true,       //是否不被缓存, true:不需要keepalive;false:需要keepalive
-    //     }
-    // },
-    //新登录页
-    {
-        path: '/',
-        component: () => import('../views/loginNew.vue'),
-        name: 'loginNew',
-        meta: {
-            headShow: false, // true显示,false隐藏
-            headLeft: false, // true显示,false隐藏
-            headTitle: "",
-            unKeepAlive: true,       //是否不被缓存, true:不需要keepalive;false:需要keepalive
-        }
-    },
-    //新注册页面
-    {
-        path: '/logon',
-        component: () => import('../views/logon.vue'),
-        name: 'logon',
-        meta: {
-            headShow: false, // true显示,false隐藏
-            headLeft: false, // true显示,false隐藏
-            headTitle: "",
-            unKeepAlive: true,       //是否不被缓存, true:不需要keepalive;false:需要keepalive
-        }
+  ...routerList,
+  //登录
+  // {
+  //     path: '/',
+  //     component: () => import('../views/login.vue'),
+  //     name: 'login',
+  //     meta: {
+  //         headShow: false, // true显示,false隐藏
+  //         headLeft: false, // true显示,false隐藏
+  //         headTitle: "",
+  //         unKeepAlive: true,       //是否不被缓存, true:不需要keepalive;false:需要keepalive
+  //     }
+  // },
+  //新登录页
+  {
+    path: "/",
+    component: () => import("../views/loginNew.vue"),
+    name: "loginNew",
+    meta: {
+      headShow: false, // true显示,false隐藏
+      headLeft: false, // true显示,false隐藏
+      headTitle: "",
+      unKeepAlive: true, //是否不被缓存, true:不需要keepalive;false:需要keepalive
     },
-    {
-        path: '/404',
-        component: () => import('../views/404.vue'),
-        name: '错误页面',
+  },
+  //新注册页面
+  {
+    path: "/logon",
+    component: () => import("../views/logon.vue"),
+    name: "logon",
+    meta: {
+      headShow: false, // true显示,false隐藏
+      headLeft: false, // true显示,false隐藏
+      headTitle: "",
+      unKeepAlive: true, //是否不被缓存, true:不需要keepalive;false:需要keepalive
     },
-    {
-        path: '*',
-        redirect: { path: '/404' }
-    }
+  },
+  {
+    path: "/404",
+    component: () => import("../views/404.vue"),
+    name: "错误页面",
+  },
+  {
+    path: "*",
+    redirect: { path: "/404" },
+  },
 ];

+ 54 - 6
src/styles/public.css

@@ -196,33 +196,66 @@
   color: #57acbb;
 }
 
+/*新增按钮颜色*/
+
+.el-button--info{
+  border-color:#00CF75;
+  color:white;
+  background-color: transparent;
+  
+}
+
+.el-button--info:focus, .el-button--info:hover{
+  border-color: #00CF75;
+  color:white;
+  background-color: transparent;
+  
+}
+
+/* 清空按钮颜色  */
+
+.el-button--info{
+  border-color: #104FFF;
+  color:#104FFF;
+  background-color: transparent;
+  
+}
+
+.el-button--info:focus, .el-button--info:hover{
+  border-color: #104FFF;
+  color:#104FFF;
+  background-color: transparent;
+  
+}
+
 /* 按钮主题色统一处理 2022-03-10 by sxy */
 .el-button--primary {
+  
   color: #fff;
-  background-color: #57acbb;
+  background-color: #104FFF;
   border-color: #57acbb;
 }
 
 .el-button--primary:focus,
 .el-button--primary:hover {
-  background: #59bbcc;
+  background: #104FFF;
   border-color: #59bbcc;
   color: #FFF;
 }
 
 /* 分页更换主题色 */
 .el-pagination.is-background .el-pager li:not(.disabled).active {
-  background-color: #57acbb;
+  background-color: #104FFF;
   color: #FFF;
 }
 
 .el-pagination.is-background .el-pager li:not(.disabled):hover {
-  color: #57acbb;
+  color: #104FFF;
 }
 
 .el-pagination.is-background .el-pager li:not(.disabled):hover {
   color: #ffffff;
-  background-color: #57acbb;
+  background-color: #104FFF;
 }
 
 /* 认知任务结果显示公共样式 */
@@ -301,7 +334,7 @@
 .el-input__inner {
   background-color: #FFF;
   background-image: none;
-  border-radius: 4px;
+  border-radius: 30px;
   border: 1px solid #DCDFE6;
   box-sizing: border-box;
   color: #606266;
@@ -317,4 +350,19 @@
 .el-color-picker__icon, .el-input, .el-textarea {
   display: inline-block;
   width:200px;
+}
+/*修改计数器的圆角  */
+.el-input-number__decrease {
+  left: 1px;
+  /* border-radius: 4px 0 0 4px; */
+  border-right: 1px solid #DCDFE6;
+  border-radius: 30px;
+}
+.el-input-number__increase {
+  right: 1px;
+  border-radius: 30px;
+  border-left: 1px solid #DCDFE6;
+}
+.add_class{
+  margin-left: auto !important;
 }

+ 1 - 18
src/utils/http.js

@@ -80,7 +80,7 @@ axios.interceptors.request.use(
     config.headers.Authorization = oSessionStorage.getItem("token")
       ? `Bearer ${oSessionStorage.getItem("token")}`
       : "";
-
+   console.log(config.headers.Authorization)
     return config;
   },
   function (error) {
@@ -184,23 +184,6 @@ const http = {
           Message.error(res.data.msg);
         }
       }
-
-      // if (res.data.code == 200) {
-      //     if (sucessCallBack) {
-      //         sucessCallBack(res.data);
-      //     }
-      // } else if(res.data.code == 2001){
-      //     if (sucessCallBack) {
-      //         sucessCallBack(res.data);
-      //     }
-      // }else {
-      //     if (errCallBack) {
-      //         errCallBack(res.data);
-      //     } else {
-      //         // Toast(res.data.msg);
-      //         Message.error(res.data.msg);
-      //     }
-      // }
     });
   },
   delete: (url, data, sucessCallBack, errCallBack) => {

+ 1 - 2
src/views/manage/channelInfo/channelInfo.vue

@@ -86,7 +86,7 @@
           >
           </el-table-column>
           <el-table-column prop="remarks" label="备注" align="center" width="">
-        </el-table-column>
+          </el-table-column>
           <!-- <el-table-column
             prop="selfPage"
             label="自定义首尾页"
@@ -167,7 +167,6 @@
     <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>

+ 546 - 0
src/views/manage/channelInfo/invite.vue

@@ -0,0 +1,546 @@
+<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
+              >&nbsp;&nbsp;&nbsp;&nbsp;
+              <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="staffName" label="员工" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="title" label="标题" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="orderNo"
+            label="订单号"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column prop="effectiveDays" label="有效期:天" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="times"
+            label="次数"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column prop="amount" 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="createDate" label="生成时间" align="center" 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="viewRecord(scope.row)"
+                v-if="scope.row.state != 0"
+                type="text"
+                size="small"
+                >查看记录</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.staffName }}
+              </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.title }}
+              </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.orderNo }}
+              </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.effectiveDays }}
+              </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.times }}
+              </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.amount }}
+              </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 == "1" ? "已完成" : "待使用" }}
+              </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.createDate }}
+              </div>
+            </div>
+          </el-col>
+  
+        </el-row>
+      </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";
+export default {
+  name: "channelManagement",
+  components: {
+    ContractChannelRegister: contractChannelRegister,
+    ContractPoster: contractPoster,
+  },
+  data() {
+    return {
+      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;
+    this.getChannel();
+    //判断是超级管理员吗
+    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.$route.query.invitationCode) {
+      this.invitationCode = this.$route.query.invitationCode;
+      this.type = this.$route.query.type;
+    }
+    if (!this.userInfo) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+    this.searchTarget();
+  },
+  methods: {
+    //查看记录
+    viewRecord(row){
+        debugger;
+        this.$router.push({path:'/manage/recordList',query:{id:row.id}})
+
+    },
+    //充值次数
+    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 "是";
+      }
+    },
+    //获取渠道信息
+    getChannel() {
+      this.$http.get(`/channel/findAll`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          //将值赋值给list
+          this.channelList = res.data;
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //员工管理
+    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 "未使用";
+      } else {
+        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);
+    },
+    viewUser(row) {
+      this.detailObj = row;
+      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(`/link/find`, data, (res) => {
+        // 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>

+ 528 - 0
src/views/manage/channelInfo/recordList.vue

@@ -0,0 +1,528 @@
+<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
+                >&nbsp;&nbsp;&nbsp;&nbsp;
+                <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 '../../../'
+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 = {
+        pageNum: this.pageNum,
+        pageSize: this.pageSize,
+        linkId: this.linkId,
+      };
+      this.$http.post(`/report/find`, data, (res) => {
+        // 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>

+ 537 - 0
src/views/manage/channelInfo/recordListAll.vue

@@ -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
+                >&nbsp;&nbsp;&nbsp;&nbsp;
+                <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>

+ 5 - 9
src/views/manage/channelManagement/channelManagement.vue

@@ -7,19 +7,14 @@
             <span>公司名称:</span>
             <el-input v-model="name" clearable placeholder="请输入公司名称"></el-input
             >&nbsp;&nbsp;&nbsp;&nbsp;
-            <el-button type="primary" icon="el-icon-search" @click="searchTarget"
+            <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
               >搜索</el-button
             >
-            <el-button type="primary" icon="el-icon-delete-solid" @click="clearSearch"
+            <el-button type="info" round icon="el-icon-delete-solid" @click="clearSearch"
               >清空</el-button
             >
-          </div>
-        </el-col>
-      </el-row>
-      <el-row  style="display:flex" class="add_user_class">
-        <el-col :span="24">
-          <div class="search-head">
-            <el-button type="primary" icon="el-icon-plus" @click="addUser"
+            
+            <el-button type="success" class="add_class"   round icon="el-icon-plus" @click="addUser"
               >新增</el-button
             >
           </div>
@@ -491,4 +486,5 @@ export default {
   padding-left: 10px;
   flex: 3;
 }
+
 </style>

+ 3 - 9
src/views/manage/channelManagement/contract.vue

@@ -13,19 +13,13 @@
                 :key="item.id"
               ></el-option> </el-select
             >&nbsp;&nbsp;&nbsp;&nbsp;
-            <el-button type="primary" icon="el-icon-search" @click="searchTarget"
+            <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
               >搜索</el-button
             >
-            <el-button type="primary" icon="el-icon-delete-solid" @click="clearSearch"
+            <el-button type="info" round 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 type="success" class="add_class" round icon="el-icon-plus" @click="addUser"
               >新增</el-button
             >
           </div>

+ 2 - 2
src/views/manage/channelManagement/staff.vue

@@ -14,10 +14,10 @@
       <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 type="primary" round icon="el-icon-plus" @click="addUser"
               >新增</el-button
             >
-            <el-button type="primary" icon="el-icon-back" @click="goBack"
+            <el-button type="primary" round icon="el-icon-back" @click="goBack"
               >返回</el-button
             >
           </div>

+ 453 - 0
src/views/manage/interfacePrice/interfacePrice.vue

@@ -0,0 +1,453 @@
+<template>
+  <div class="record-warp">
+    <div class="record-main">
+      <el-row>
+        <!-- <el-col :span="24">
+            <div class="search-head">
+              <span>公司名称:</span>
+              <el-input v-model="name" clearable placeholder="请输入公司名称"></el-input>&nbsp;&nbsp;&nbsp;&nbsp;
+              <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="success" round icon="el-icon-plus" @click="addPrice"
+              >新增</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="name" label="姓名" align="center" width=""  show-overflow-tooltip>
+              </el-table-column> -->
+          <el-table-column prop="title" label="标题" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="price" label="价格" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="beginNum" label="次数起始" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="endNum" label="次数结束" align="center" width="">
+          </el-table-column>
+          、
+          <el-table-column
+            prop="channelLevel"
+            label="渠道级别"
+            align="center"
+            :formatter="formatterLevel"
+            width=""
+          >
+          </el-table-column>
+
+          <el-table-column
+            prop="status"
+            label="状态"
+            align="center"
+            :formatter="formatterState"
+            width=""
+          >
+          </el-table-column>
+          <!-- <el-table-column
+              prop="isDelete"
+              label="删除状态"
+              align="center"
+              :formatter="formatterIsDelete"
+              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)" type="text" size="small"
+                >查看</el-button
+              >
+              <el-button type="text" size="small" @click="editUser(scope.row)"
+                >编辑</el-button
+              >
+
+              <el-popconfirm
+                title="确定删除吗?"
+                placement="top"
+                @confirm="deletePrice(scope.$index, scope.row)"
+              >
+                <el-button
+                  size="small"
+                  style="margin-left: 10px"
+                  type="text"
+                  slot="reference"
+                  >删除</el-button
+                >
+              </el-popconfirm>
+            </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>
+    <PriceRegister ref="register" @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.title }}
+              </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.price }}
+              </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.beginNum  }}
+              </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.endNum  }}
+              </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 == "1" ? "生效中" : "已停用" }}
+              </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.channelLevel  == "1" ? "级别1" : "级别2" }}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { oSessionStorage } from "../../../utils/utils";
+import priceRegister from "../../../components/PriceRegister.vue";
+export default {
+  name: "channelManagement",
+  components: {
+    PriceRegister: priceRegister,
+  },
+  data() {
+    return {
+      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: {},
+    };
+  },
+  created() {},
+  mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+
+    this.view.channelId = this.$route.query.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.$route.query.invitationCode) {
+      this.invitationCode = this.$route.query.invitationCode;
+      this.type = this.$route.query.type;
+    }
+    if (!this.userInfo) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+    this.searchTarget();
+  },
+  methods: {
+    formatterLevel(row) {
+      if (row.channelLevel == "1") {
+        return "级别1";
+      } else if (row.channelLevel == "2") {
+        return "级别2";
+      }
+    },
+    goBack() {
+      this.$router.go(-1);
+    },
+    //格式化状态
+    formatterIsDelete(row) {
+      if (row.isDelete == "0") {
+        return "正常";
+      } else if (row.isDelete == "1") {
+        return "已删除";
+      } else {
+        return "";
+      }
+    },
+    //格式化状态
+    formatterState(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);
+    },
+    viewUser(row) {
+      this.detailObj = row;
+      this.centerDialogVisible = true;
+    },
+    addPrice() {
+      this.addRegisterPrice(true);
+    },
+    clearSearch() {
+      this.name = "";
+      this.userName = "";
+      this.searchTarget();
+    },
+    formatterRole(val) {
+      if (val.type == "1") {
+        return "超级管理员";
+      } else {
+        return "渠道用户";
+      }
+    },
+
+    forma(val) {
+      if (val.gender == "0") {
+        return "男";
+      } else {
+        return "女";
+      }
+    },
+    addRegisterPrice(val) {
+      this.$refs.register.open(val);
+    },
+    editRegisterUser(val) {
+      this.$refs.register.edit(val);
+    },
+    deletePrice(index, row) {
+      this.$http.post(`/price/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 =``
+      this.$http.get(`/price/find/${this.pageNum}/${this.pageSize}`, {}, (res) => {
+        // console.log(res,'用户测试记录')
+        if (res && res.code == 200) {
+          this.tableData = res.data.content;
+          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;
+  display: flex;
+}
+
+.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>

+ 58 - 38
src/views/manage/manageMain.vue

@@ -50,9 +50,9 @@
               :default-active="activeIndex"
               class="el-menu-demo"
               mode="horizontal"
-              background-color="#57ACBB"
-              text-color="#fff"
-              active-text-color="#fff"
+              background-color="transparent"
+              text-color="#000"
+              active-text-color="#000"
             >
               <el-submenu index="2" class="rightExit">
                 <template slot="title" :size="size" :src="circleUrl">{{
@@ -262,20 +262,22 @@ export default {
               path: "/manage/orderSettlement",
               showItem: true,
             },
-            // {
-            //   id: "03",
-            //   name: "邀请链接",
-            //   icon: "el-icon-user-solid",
-            //   path: "/manage/agencyUserManage",
-            //   showItem: true,
-            // },
-            // {
-            //   id: "04",
-            //   name: "报告记录",
-            //   icon: "el-icon-user-solid",
-            //   path: "/manage/agencyUserManage",
-            //   showItem: true,
-            // },
+            {
+              id: "03",
+              name: "邀请链接",
+              icon: "el-icon-user-solid",
+              parentName: "渠道信息",
+              path: "/manage/invite",
+              showItem: true,
+            },
+            {
+              id: "04",
+              name: "报告记录",
+              icon: "el-icon-user-solid",
+              parentName: "渠道信息",
+              path: "/manage/recordListAll",
+              showItem: true,
+            },
           ],
         },
         {
@@ -303,33 +305,37 @@ export default {
             },
           ],
         },
-        /*  
-          {
+        {
             id: '2',
             name: "财税报告",
             icon: "el-icon-user-solid",
-            path: "/manage/doctorUserManage",
+            path: "2",
             showItem: true,
             child:[{
                 id: '21',
                 name: "接口价格",
                 icon: "el-icon-user-solid",
-                path: "/manage/agencyUserManage",
-                showItem: true,
-              },{
-                id: '22',
-                name: "产品定价",
-                icon: "el-icon-user-solid",
-                path: "/manage/agencyUserManage",
+                path: "/manage/interfacePrice",
+                parentName: "渠道管理",
                 showItem: true,
-              },{
-                id: '23',
-                name: "报告记录",
-                icon: "el-icon-user-solid",
-                path: "/manage/agencyUserManage",
-                showItem: true,
-              },]
+              },
+              // {
+              //   id: '22',
+              //   name: "产品定价",
+              //   icon: "el-icon-user-solid",
+              //   path: "/manage/agencyUserManage",
+              //   showItem: true,
+              // },{
+              //   id: '23',
+              //   name: "报告记录",
+              //   icon: "el-icon-user-solid",
+              //   path: "/manage/agencyUserManage",
+              //   showItem: true,
+              // }
+            ]
           },
+        /*  
+        
           {
             id: '3',
             name: "订单管理",
@@ -582,6 +588,9 @@ export default {
 </script>
 >
 <style>
+.el-menu--popup {
+  /* min-width:100px */
+}
 .el-submenu__title:hover {
   background-color: #80a1ff;
 }
@@ -600,6 +609,9 @@ export default {
   font-size: 12px;
   color: #909399;
 }
+.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, .el-menu--horizontal>.el-submenu .el-submenu__title:hover {
+    background-color: transparent !important;
+}
 </style>
 <style lang="less" scoped>
 .el-menu-vertical-demo:not(.el-menu--collapse) {
@@ -608,7 +620,7 @@ export default {
 }
 
 .shadow-menu {
-  box-shadow: 0 4px 12px 2px rgba(0, 0, 0, 0.1);
+  // box-shadow: 0 4px 12px 2px rgba(0, 0, 0, 0.1);
 }
 
 #app {
@@ -639,6 +651,12 @@ export default {
   color: #ffffff;
   font-size: 1rem;
 }
+.el-menu--horizontal {
+  // position: absolute;
+  // top: 60px;
+  // z-index: 2003;
+  // left: 975px !important;
+}
 
 /*.el-menu--horizontal > .el-submenu {*/
 /*float: right;*/
@@ -704,7 +722,8 @@ export default {
 }
 
 .admin-header-content {
-  background: #57acbb;
+  // background: #57acbb;
+  background: transparent;
   height: 100% !important;
   display: flex;
   flex-direction: row;
@@ -753,8 +772,9 @@ export default {
   border-bottom: none !important;
 }
 
+
 /deep/.el-menu--horizontal > .el-submenu .el-submenu__icon-arrow {
-  color: #fff;
+  color: #161616;
 }
 
 .el-menu.el-menu--horizontal {
@@ -799,7 +819,7 @@ export default {
     border-radius: 50%;
     width: 5px;
     height: 5px;
-    margin-right:10px
+    margin-right: 10px;
   }
 }
 </style>

+ 4 - 3
src/views/manage/userManage.vue

@@ -8,15 +8,16 @@
             <el-input v-model="name" clearable placeholder="请输入用户名"></el-input>&nbsp;&nbsp;&nbsp;&nbsp;
             <span>用户昵称:</span>
             <el-input v-model="userName" clearable placeholder="请输入用户昵称"></el-input>&nbsp;&nbsp;
-            <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>
+            <el-button type="primary" round icon="el-icon-search" @click="searchTarget">搜索</el-button>
+            <el-button type="info" round icon="el-icon-delete-solid" @click="clearSearch">清空</el-button>
+            <el-button type="success" round class="add_class" icon="el-icon-plus" @click="addUser">新增用户</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>