瀏覽代碼

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_companyUI

# Conflicts:
#	package.json
caoliqin 1 周之前
父節點
當前提交
1746ff2095

+ 23 - 0
.env.prod-bjczwh

@@ -0,0 +1,23 @@
+# 页面标题
+VUE_APP_TITLE =存在文化SCRM销售端
+# 公司名称
+VUE_APP_COMPANY_NAME =北京存在文化
+# ICP备案号
+VUE_APP_ICP_RECORD =京ICP备2024100370号-1
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/bjczwh.png
+
+# 生产环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 22 - 0
.env.prod-bjyjb

@@ -0,0 +1,22 @@
+# 页面标题
+VUE_APP_TITLE =医健宝SCRM销售端
+# 公司名称
+VUE_APP_COMPANY_NAME = 医健宝智慧(北京)医药科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =
+# ICP网站访问地址
+VUE_APP_ICP_URL =
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/bjyjb.jpg
+
+# 生产环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 22 - 0
.env.prod-cqxzt

@@ -0,0 +1,22 @@
+# 页面标题
+VUE_APP_TITLE =襄之棠SCRM销售端
+# 公司名称
+VUE_APP_COMPANY_NAME =重庆襄之棠大药房连锁有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =
+# ICP网站访问地址
+VUE_APP_ICP_URL =
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/cqxzt.png
+
+# 生产环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 4 - 0
package.json

@@ -27,7 +27,10 @@
     "build:prod-whhm": "vue-cli-service build --mode prod-whhm",
     "build:prod-drk": "vue-cli-service build --mode prod-drk",
     "build:prod-qdtst": "vue-cli-service build --mode prod-qdtst",
+    "build:prod-bjczwh": "vue-cli-service build --mode prod-bjczwh",
     "build:prod-jkj": "vue-cli-service build --mode prod-jkj",
+    "build:prod-cqxzt": "vue-cli-service build --mode prod-cqxzt",
+    "build:prod-bjyjb": "vue-cli-service build --mode prod-bjyjb",
     "build:prod-kyt": "vue-cli-service build --mode prod-kyt",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src",
@@ -95,6 +98,7 @@
     "vue-jsonp": "^2.1.0",
     "vue-meta": "^2.4.0",
     "vue-mobile-audio": "^0.1.3",
+    "vue-mobile-calendar": "^3.3.0",
     "vue-router": "3.0.2",
     "vue-splitpane": "1.0.4",
     "vue2-ace-editor": "0.0.15",

+ 27 - 0
src/api/company/companyApply.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 查询更换会员归属申请列表
+export function listApply(query) {
+  return request({
+    url: '/company/apply/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询更换会员归属申请详细
+export function getApply(id) {
+  return request({
+    url: '/company/apply/' + id,
+    method: 'get'
+  })
+}
+
+// 审核更换会员归属申请
+export function auditApply(data) {
+  return request({
+    url: '/company/apply/audit',
+    method: 'post',
+    data: data
+  })
+}

二進制
src/assets/logo/bjczwh.png


二進制
src/assets/logo/bjyjb.jpg


二進制
src/assets/logo/cqxzt.png


+ 404 - 0
src/views/company/companyApply/index.vue

@@ -0,0 +1,404 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="审核状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable size="small">
+          <el-option label="待审核" value="0" />
+          <el-option label="通过" value="1" />
+          <el-option label="拒绝" value="2" />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="applyList" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="ID" align="center" prop="id" />
+      <el-table-column label="原归属销售" align="center" prop="fromName" />
+      <el-table-column label="申请归属销售" align="center" prop="toName" />
+      <el-table-column label="审核状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.status === 0" type="warning">待审核</el-tag>
+          <el-tag v-if="scope.row.status === 1" type="success">通过</el-tag>
+          <el-tag v-if="scope.row.status === 2" type="danger">拒绝</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="申请人" align="center" prop="applyBy" />
+      <el-table-column label="申请时间" align="center" prop="applyTime"/>
+      <el-table-column label="审核人" align="center" prop="auditBy" />
+      <el-table-column label="审核时间" align="center" prop="auditTime" />
+      <el-table-column label="拒绝原因" align="center" prop="reason" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.status === 0"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleAudit(scope.row)"
+            v-hasPermi="['company:apply:audit']"
+          >审核</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDetails(scope.row)"
+            v-hasPermi="['company:apply:query']"
+          >详情</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 详情对话框 -->
+    <el-dialog
+      title="申请详情"
+      :visible.sync="detailsVisible"
+      width="50%"
+      :close-on-click-modal="false"
+      custom-class="apply-details-dialog"
+    >
+      <!-- 申请基本信息 -->
+      <div class="details-header">
+        <div class="info-item">
+          <span class="label">原归属销售:</span>
+          <span class="value">{{ selectedApply.fromName }}</span>
+        </div>
+        <div class="info-item">
+          <span class="label">申请归属销售:</span>
+          <span class="value">{{ selectedApply.toName }}</span>
+        </div>
+        <div class="info-item">
+          <span class="label">申请时间:</span>
+          <span class="value">{{ selectedApply.applyTime }}</span>
+        </div>
+        <div class="info-item">
+          <span class="label">审核状态:</span>
+          <el-tag :type="selectedApply.status === 0 ? 'warning' : selectedApply.status === 1 ? 'success' : 'danger'">
+            {{ selectedApply.status === 0 ? '待审核' : selectedApply.status === 1 ? '通过' : '拒绝' }}
+          </el-tag>
+        </div>
+      </div>
+
+      <!-- 用户列表 -->
+      <div class="details-content">
+        <div class="content-title">变更用户列表</div>
+        <el-table
+          :data="selectedUsers"
+          border
+          style="width: 100%"
+          :header-cell-style="{background:'#f5f7fa',color:'#606266'}"
+        >
+          <el-table-column prop="projectId" label="项目" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.projectId !== null">{{ getProjectLabel(scope.row.projectId) }}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column prop="userId" label="用户ID" align="center"></el-table-column>
+          <el-table-column prop="userName" label="姓名" align="center"></el-table-column>
+        </el-table>
+      </div>
+
+      <!-- 底部操作区 -->
+      <div class="details-footer">
+        <el-button @click="detailsVisible = false">关闭</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 审核对话框 -->
+    <el-dialog
+      title="审核申请"
+      :visible.sync="auditVisible"
+      width="40%"
+      :close-on-click-modal="false"
+      custom-class="audit-dialog"
+    >
+      <!-- 审核表单 -->
+      <el-form ref="auditForm" :model="auditForm" :rules="auditRules" label-width="100px">
+        <el-form-item label="原归属销售" prop="fromName">
+          <span>{{ auditForm.fromName }}</span>
+        </el-form-item>
+        <el-form-item label="申请归属销售" prop="toName">
+          <span>{{ auditForm.toName }}</span>
+        </el-form-item>
+        <el-form-item label="审核结果" prop="status">
+          <el-radio-group v-model="auditForm.status">
+            <el-radio :label="1">通过</el-radio>
+            <el-radio :label="2">拒绝</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item
+          label="拒绝原因"
+          prop="reason"
+          v-if="auditForm.status === 2"
+        >
+          <el-input
+            type="textarea"
+            v-model="auditForm.reason"
+            placeholder="请输入拒绝原因"
+            :rows="3"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+
+      <!-- 底部操作区 -->
+      <div class="audit-footer">
+        <el-button @click="auditVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitAudit" :loading="submitLoading">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listApply, getApply, auditApply } from "@/api/company/companyApply";
+
+export default {
+  name: "Apply",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 更换会员归属申请表格数据
+      applyList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        status: null
+      },
+      // 详情对话框
+      detailsVisible: false,
+      // 选中的用户
+      selectedUsers: [],
+      // 选中的申请
+      selectedApply: {},
+      // 审核对话框
+      auditVisible: false,
+      // 提交加载状态
+      submitLoading: false,
+      // 审核表单
+      auditForm: {
+        id: undefined,
+        status: 1,
+        reason: ''
+      },
+      // 审核表单校验规则
+      auditRules: {
+        status: [
+          { required: true, message: "请选择审核结果", trigger: "change" }
+        ],
+        reason: [
+          { required: true, message: "请输入拒绝原因", trigger: "blur" }
+        ]
+      },
+      projectOptions: [],
+    };
+  },
+  created() {
+    this.getDicts("sys_course_project").then(response => {
+      this.projectOptions = response.data;
+    });
+    this.getList();
+  },
+  methods: {
+    /** 查询更换会员归属申请列表 */
+    getList() {
+      this.loading = true;
+      listApply(this.queryParams).then(response => {
+        this.applyList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 详情按钮操作 */
+    handleDetails(row) {
+      this.detailsVisible = true;
+      this.selectedApply = row;
+      getApply(row.id).then(response => {
+        this.selectedUsers = response.data.users;
+      });
+    },
+    /** 审核按钮操作 */
+    handleAudit(row) {
+      this.auditVisible = true;
+      this.auditForm = {
+        id: row.id,
+        fromName: row.fromName,
+        toName: row.toName,
+        status: 1,
+        reason: ''
+      };
+    },
+    /** 提交审核 */
+    submitAudit() {
+      this.$refs["auditForm"].validate(valid => {
+        if (valid) {
+          // 如果选择通过,不需要填写原因
+          if (this.auditForm.status === 1) {
+            this.auditForm.reason = '';
+          }
+
+          this.submitLoading = true;
+          auditApply(this.auditForm).then(response => {
+            this.msgSuccess("审核成功");
+            this.auditVisible = false;
+            this.getList();
+          }).catch(error => {
+            this.msgError("审核失败:" + error);
+          }).finally(() => {
+            this.submitLoading = false;
+          });
+        }
+      });
+    },
+    /** 获取项目对应名称 */
+    getProjectLabel(projectId) {
+      return this.projectOptions.find(item => parseInt(item.dictValue) === projectId)?.dictLabel;
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+/* 详情弹窗样式 */
+.apply-details-dialog {
+  ::v-deep .el-dialog__body {
+    padding: 20px;
+  }
+
+  /* 头部信息样式 */
+  .details-header {
+    display: flex;
+    flex-wrap: wrap;
+    padding: 15px;
+    background-color: #f8f9fa;
+    border-radius: 4px;
+    margin-bottom: 20px;
+
+    .info-item {
+      width: 50%;
+      margin-bottom: 10px;
+      display: flex;
+      align-items: center;
+
+      .label {
+        color: #606266;
+        font-size: 14px;
+        width: 100px;
+        text-align: right;
+      }
+
+      .value {
+        color: #303133;
+        font-size: 14px;
+        margin-left: 10px;
+      }
+    }
+  }
+
+  /* 内容区域样式 */
+  .details-content {
+    .content-title {
+      font-size: 16px;
+      color: #303133;
+      font-weight: bold;
+      margin-bottom: 15px;
+      padding-left: 10px;
+      border-left: 3px solid #409EFF;
+    }
+  }
+
+  /* 底部样式 */
+  .details-footer {
+    margin-top: 20px;
+    text-align: right;
+    padding-top: 15px;
+    border-top: 1px solid #ebeef5;
+  }
+}
+
+/* 表格样式优化 */
+::v-deep .el-table {
+  .el-table__header-wrapper {
+    th {
+      background-color: #f5f7fa;
+      color: #606266;
+      font-weight: bold;
+    }
+  }
+
+  .el-table__body-wrapper {
+    tr:hover > td {
+      background-color: #f5f7fa;
+    }
+  }
+}
+
+/* 审核弹窗样式 */
+.audit-dialog {
+  ::v-deep .el-dialog__body {
+    padding: 20px;
+  }
+
+  /* 表单样式 */
+  .el-form {
+    padding: 20px 0;
+
+    .el-form-item {
+      margin-bottom: 20px;
+
+      span {
+        color: #606266;
+        font-size: 14px;
+      }
+    }
+  }
+
+  /* 底部样式 */
+  .audit-footer {
+    margin-top: 20px;
+    text-align: right;
+    padding-top: 15px;
+    border-top: 1px solid #ebeef5;
+  }
+}
+</style>

+ 173 - 61
src/views/course/courseWatchLog/deptWatchLog.vue

@@ -88,41 +88,71 @@
 <!--          @keyup.enter.native="handleQuery"-->
 <!--        />-->
 <!--      </el-form-item>-->
+      <!-- 营期时间 -->
       <el-form-item label="营期时间" prop="scheduleTime">
-        <el-date-picker
+        <el-input
+          v-model="scheduleTimeText"
+          placeholder="请选择营期时间"
+          readonly
+          @click.native="showScheduleCalendar = true"
+        />
+        <calendar
           v-model="scheduleTime"
-          type="daterange"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          @change="handleScheduleTimeChange">
-        </el-date-picker>
+          mode="during"
+          :show.sync="showScheduleCalendar"
+          @change="handleScheduleTimeChange"
+          :key="scheduleCalendarKey"
+        />
       </el-form-item>
+      <!-- 创建时间 -->
       <el-form-item label="创建时间" prop="createTime">
-        <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"
-                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="createChange"></el-date-picker>
+        <el-input
+          v-model="createTimeText"
+          placeholder="请选择创建时间"
+          readonly
+          @click.native="showCreateCalendar = true"
+        />
+        <calendar
+          v-model="createTime"
+          mode="during"
+          :show.sync="showCreateCalendar"
+          @change="createChange"
+          :key="createCalendarKey"
+        />
       </el-form-item>
+      <!-- 最新更新时间 -->
       <el-form-item label="最新更新时间" prop="updateTime">
-        <el-date-picker v-model="updateTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"
-                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="updateChange"></el-date-picker>
+        <el-input
+          v-model="updateTimeText"
+          placeholder="请选择更新时间"
+          readonly
+          @click.native="showUpdateCalendar = true"
+        />
+        <calendar
+          v-model="updateTime"
+          mode="during"
+          :show.sync="showUpdateCalendar"
+          @change="updateChange"
+          :key="updateCalendarKey"
+        />
       </el-form-item>
-      <el-form-item label="进线时间" prop="updateTime">
-        <el-date-picker
+      <!-- 进线时间 -->
+      <el-form-item label="进线时间" prop="qecCreateTime">
+        <el-input
+          v-model="qecCreateTimeText"
+          placeholder="请选择进线时间"
+          readonly
+          @click.native="showQecCalendar = true"
+        />
+        <calendar
           v-model="qecCreateTime"
-          size="small"
-          style="width: 220px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          mode="during"
+          :show.sync="showQecCalendar"
           @change="qecCreateTimeChange"
-          :picker-options="pickerOptions"
-        ></el-date-picker>
+          :key="qecCalendarKey"
+        />
       </el-form-item>
+
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -320,13 +350,39 @@ import {courseList, myListCourseRedPacketLog, videoList} from '@/api/course/cour
 import {myListLogs} from "@/api/course/courseAnswerlogs";
 import { getCompanyUserListLikeName } from "@/api/company/companyUser";
 import {getTask} from "@/api/common";
+import Vue from 'vue'
+import Calendar from 'vue-mobile-calendar'
+Vue.use(Calendar)
+
+
 export default {
   name: "CourseWatchLog",
   data() {
     return {
+      // 日历 key 控制刷新
+      scheduleCalendarKey: 0,
+      createCalendarKey: 0,
+      updateCalendarKey: 0,
+      qecCalendarKey: 0,
+
+      createTimeText: '',
+      scheduleTimeText: '',  // 新增
+      updateTimeText: '',    // 新增
+      qecCreateTimeText: '', // 新增
+
+      scheduleTime: [],  // 改为数组
+      createTime: [],    // 改为数组
+      updateTime: [],    // 改为数组
+      qecCreateTime: [], // 改为数组
+
+      // 控制日历显隐
+      showScheduleCalendar: false,
+      showCreateCalendar: false,
+      showUpdateCalendar: false,
+      showQecCalendar: false,
+
+
       activeName:"00",
-      createTime:null,
-      updateTime:null,
       courseLists:[],
       videoList:[],
       logTypeOptions:[],
@@ -371,7 +427,6 @@ export default {
         pageSize: 10,
       },
 
-      qecCreateTime:null,
       pickerOptions: {
         disabledDate(time) {
           // 获取6天前的日期(加上今天就是7天)
@@ -419,7 +474,6 @@ export default {
       // 表单校验
       rules: {
       },
-      scheduleTime: null,
       // 员工选项列表
       companyUserOptionsParams: {
         name: undefined,
@@ -441,6 +495,28 @@ export default {
     });
   },
   methods: {
+    // 重置日历组件
+    resetCalendars() {
+      this.scheduleTime = [];
+      this.createTime = [];
+      this.updateTime = [];
+      this.qecCreateTime = [];
+
+      this.scheduleTimeText = '';
+      this.createTimeText = '';
+      this.updateTimeText = '';
+      this.qecCreateTimeText = '';
+
+      // 强制刷新日历组件
+      this.scheduleCalendarKey++;
+      this.createCalendarKey++;
+      this.updateCalendarKey++;
+      this.qecCalendarKey++;
+    },
+    formatDateRange(dates) {
+      if (!dates || dates.length < 2) return '';
+      return dates.map(date => date.format('YYYY-MM-DD')).join(' ~ ');
+    },
     courseChange(row){
       this.queryParams.videoId=null;
       if(row === ''){
@@ -451,35 +527,7 @@ export default {
         this.videoList=response.list
       });
     },
-    createChange() {
-      if (this.createTime != null) {
-        this.queryParams.sTime = this.createTime[0];
-        this.queryParams.eTime = this.createTime[1];
-      } else {
-        this.queryParams.sTime = null;
-        this.queryParams.eTime = null;
-      }
-    },
-
-    updateChange(){
-      if (this.updateTime != null) {
-        this.queryParams.upSTime = this.updateTime[0];
-        this.queryParams.upETime = this.updateTime[1];
-      } else {
-        this.queryParams.upSTime = null;
-        this.queryParams.upETime = null;
-      }
-    },
 
-    qecCreateTimeChange(){
-      if (this.qecCreateTime != null) {
-        this.queryParams.qecSTime = this.qecCreateTime[0];
-        this.queryParams.qecETime = this.qecCreateTime[1];
-      } else {
-        this.queryParams.qecSTime = null;
-        this.queryParams.qecETime = null;
-      }
-    },
     handleClickX(tab,event){
       this.activeName=tab.name;
       if(tab.name=="00"){
@@ -669,15 +717,79 @@ export default {
       })
     },
 
-    handleScheduleTimeChange(val) {
-      if (val) {
-        this.queryParams.scheduleStartTime = val[0];
-        this.queryParams.scheduleEndTime = val[1];
+    // 营期时间
+    handleScheduleTimeChange(scheduleTime) {
+      if (scheduleTime && scheduleTime.length >= 2) {
+        this.scheduleTimeText = this.formatDateRange(scheduleTime);
+        this.queryParams.scheduleStartTime = scheduleTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.scheduleEndTime = scheduleTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
       } else {
+        this.scheduleTimeText = '';
         this.queryParams.scheduleStartTime = null;
         this.queryParams.scheduleEndTime = null;
       }
     },
+    // 创建时间
+    createChange(createTime) {
+      if (createTime && createTime.length >= 2) {
+        this.createTimeText = this.formatDateRange(createTime);
+        this.queryParams.sTime = createTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.eTime = createTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+      } else {
+        this.createTimeText = '';
+        this.queryParams.sTime = null;
+        this.queryParams.eTime = null;
+      }
+    },
+
+    // 更新时间
+    updateChange(updateTime) {
+      if (updateTime && updateTime.length >= 2) {
+        this.updateTimeText = this.formatDateRange(updateTime);
+        this.queryParams.upSTime = updateTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.upETime = updateTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+      } else {
+        this.updateTimeText = '';
+        this.queryParams.upSTime = null;
+        this.queryParams.upETime = null;
+      }
+    },
+
+    // 进线时间
+    qecCreateTimeChange(qecCreateTime) {
+      if (qecCreateTime && qecCreateTime.length >= 2) {
+        // 检查选择的日期范围是否超过7天(包括起始和结束日期)
+        const startDate = new Date(qecCreateTime[0]);
+        const endDate = new Date(qecCreateTime[1]);
+
+        // 设置时间为当天开始,避免时间部分影响计算
+        startDate.setHours(0, 0, 0, 0);
+        endDate.setHours(0, 0, 0, 0);
+
+        const timeDiff = Math.abs(endDate - startDate);
+        const diffDays = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
+
+        // 如果超过6天的范围(总共7天,包括起始日)
+        if (diffDays > 6) {
+          this.$message.error('进线时间选择范围不能超过7天');
+          // 清空选择
+          this.qecCreateTime = [];
+          this.qecCreateTimeText = '';
+          this.queryParams.qecSTime = null;
+          this.queryParams.qecETime = null;
+          this.qecCalendarKey++;
+          return;
+        }
+
+        this.qecCreateTimeText = this.formatDateRange(qecCreateTime);
+        this.queryParams.qecSTime = qecCreateTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.qecETime = qecCreateTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+      } else {
+        this.qecCreateTimeText = '';
+        this.queryParams.qecSTime = null;
+        this.queryParams.qecETime = null;
+      }
+    },
     /**
      * 根据名称模糊查询用户列表
      * @param query 参数

+ 173 - 60
src/views/course/courseWatchLog/index.vue

@@ -58,44 +58,69 @@
           />
         </el-select>
       </el-form-item>
+      <!-- 营期时间 -->
       <el-form-item label="营期时间" prop="scheduleTime">
-        <el-date-picker
+        <el-input
+          v-model="scheduleTimeText"
+          placeholder="请选择营期时间"
+          readonly
+          @click.native="showScheduleCalendar = true"
+        />
+        <calendar
           v-model="scheduleTime"
-          type="daterange"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          @change="handleScheduleTimeChange">
-        </el-date-picker>
+          mode="during"
+          :show.sync="showScheduleCalendar"
+          @change="handleScheduleTimeChange"
+          :key="scheduleCalendarKey"
+        />
       </el-form-item>
+      <!-- 创建时间 -->
       <el-form-item label="创建时间" prop="createTime">
-        <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"
-                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="createChange"></el-date-picker>
+        <el-input
+          v-model="createTimeText"
+          placeholder="请选择创建时间"
+          readonly
+          @click.native="showCreateCalendar = true"
+        />
+        <calendar
+          v-model="createTime"
+          mode="during"
+          :show.sync="showCreateCalendar"
+          @change="createChange"
+          :key="createCalendarKey"
+        />
       </el-form-item>
+      <!-- 最新更新时间 -->
       <el-form-item label="最新更新时间" prop="updateTime">
-        <el-date-picker v-model="updateTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"
-                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="updateChange"></el-date-picker>
+        <el-input
+          v-model="updateTimeText"
+          placeholder="请选择更新时间"
+          readonly
+          @click.native="showUpdateCalendar = true"
+        />
+        <calendar
+          v-model="updateTime"
+          mode="during"
+          :show.sync="showUpdateCalendar"
+          @change="updateChange"
+          :key="updateCalendarKey"
+        />
       </el-form-item>
-<!--      <el-form-item label="进线时间" prop="updateTime">-->
-<!--        <el-date-picker v-model="qecCreateTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"-->
-<!--                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="qecCreateTimeChange"></el-date-picker>-->
-<!--      </el-form-item>-->
-      <el-form-item label="进线时间" prop="updateTime">
-        <el-date-picker
+      <!-- 进线时间 -->
+      <el-form-item label="进线时间" prop="qecCreateTime">
+        <el-input
+          v-model="qecCreateTimeText"
+          placeholder="请选择进线时间"
+          readonly
+          @click.native="showQecCalendar = true"
+        />
+        <calendar
           v-model="qecCreateTime"
-          size="small"
-          style="width: 220px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          mode="during"
+          :show.sync="showQecCalendar"
           @change="qecCreateTimeChange"
-          :picker-options="pickerOptions"
-        ></el-date-picker>
+          :key="qecCalendarKey"
+        />
       </el-form-item>
 
       <el-form-item>
@@ -415,19 +440,41 @@ import {myListLogs} from "@/api/course/courseAnswerlogs";
 import {allListTagGroup} from "../../../api/qw/tagGroup";
 import {searchTags} from "../../../api/qw/tag";
 import {addTagByWatch, delTagByWatch} from "../../../api/qw/externalContact";
+import Vue from 'vue'
+import Calendar from 'vue-mobile-calendar'
+Vue.use(Calendar)
+
 export default {
   name: "CourseWatchLog",
   data() {
     return {
+      // 日历 key 控制刷新
+      scheduleCalendarKey: 0,
+      createCalendarKey: 0,
+      updateCalendarKey: 0,
+      qecCalendarKey: 0,
+
+      createTimeText: '',
+      scheduleTimeText: '',  // 新增
+      updateTimeText: '',    // 新增
+      qecCreateTimeText: '', // 新增
+
+      scheduleTime: [],  // 改为数组
+      createTime: [],    // 改为数组
+      updateTime: [],    // 改为数组
+      qecCreateTime: [], // 改为数组
+
+      // 控制日历显隐
+      showScheduleCalendar: false,
+      showCreateCalendar: false,
+      showUpdateCalendar: false,
+      showQecCalendar: false,
 
       resultDialogVisible: false,
       resultMessage: '',
       resultTitle:'',
 
       activeName:"2",
-      createTime:null,
-      updateTime:null,
-      qecCreateTime:null,
       pickerOptions: {
         disabledDate(time) {
           // 获取6天前的日期(加上今天就是7天)
@@ -548,7 +595,6 @@ export default {
       // 表单校验
       rules: {
       },
-      scheduleTime: null,
     };
   },
   created() {
@@ -561,6 +607,28 @@ export default {
     });
   },
   methods: {
+    // 重置日历组件
+    resetCalendars() {
+      this.scheduleTime = [];
+      this.createTime = [];
+      this.updateTime = [];
+      this.qecCreateTime = [];
+
+      this.scheduleTimeText = '';
+      this.createTimeText = '';
+      this.updateTimeText = '';
+      this.qecCreateTimeText = '';
+
+      // 强制刷新日历组件
+      this.scheduleCalendarKey++;
+      this.createCalendarKey++;
+      this.updateCalendarKey++;
+      this.qecCalendarKey++;
+    },
+    formatDateRange(dates) {
+      if (!dates || dates.length < 2) return '';
+      return dates.map(date => date.format('YYYY-MM-DD')).join(' ~ ');
+    },
     courseChange(row){
       this.queryParams.videoId=null;
       if(row === ''){
@@ -571,31 +639,78 @@ export default {
         this.videoList=response.list
       });
     },
-    createChange() {
-      if (this.createTime != null) {
-        this.queryParams.sTime = this.createTime[0];
-        this.queryParams.eTime = this.createTime[1];
+
+    // 营期时间
+    handleScheduleTimeChange(scheduleTime) {
+      if (scheduleTime && scheduleTime.length >= 2) {
+        this.scheduleTimeText = this.formatDateRange(scheduleTime);
+        this.queryParams.scheduleStartTime = scheduleTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.scheduleEndTime = scheduleTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+        console.log(this.queryParams.scheduleStartTime)
+        console.log(this.queryParams.scheduleEndTime)
       } else {
+        this.scheduleTimeText = '';
+        this.queryParams.scheduleStartTime = null;
+        this.queryParams.scheduleEndTime = null;
+      }
+    },
+    // 创建时间
+    createChange(createTime) {
+      if (createTime && createTime.length >= 2) {
+        this.createTimeText = this.formatDateRange(createTime);
+        this.queryParams.sTime = createTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.eTime = createTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+      } else {
+        this.createTimeText = '';
         this.queryParams.sTime = null;
         this.queryParams.eTime = null;
       }
     },
 
-    updateChange(){
-      if (this.updateTime != null) {
-        this.queryParams.upSTime = this.updateTime[0];
-        this.queryParams.upETime = this.updateTime[1];
+    // 更新时间
+    updateChange(updateTime) {
+      if (updateTime && updateTime.length >= 2) {
+        this.updateTimeText = this.formatDateRange(updateTime);
+        this.queryParams.upSTime = updateTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.upETime = updateTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
       } else {
+        this.updateTimeText = '';
         this.queryParams.upSTime = null;
         this.queryParams.upETime = null;
       }
     },
 
-    qecCreateTimeChange(){
-      if (this.qecCreateTime != null) {
-        this.queryParams.qecSTime = this.qecCreateTime[0];
-        this.queryParams.qecETime = this.qecCreateTime[1];
+    // 进线时间
+    qecCreateTimeChange(qecCreateTime) {
+      if (qecCreateTime && qecCreateTime.length >= 2) {
+        // 检查选择的日期范围是否超过7天(包括起始和结束日期)
+        const startDate = new Date(qecCreateTime[0]);
+        const endDate = new Date(qecCreateTime[1]);
+
+        // 设置时间为当天开始,避免时间部分影响计算
+        startDate.setHours(0, 0, 0, 0);
+        endDate.setHours(0, 0, 0, 0);
+
+        const timeDiff = Math.abs(endDate - startDate);
+        const diffDays = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
+
+        // 如果超过6天的范围(总共7天,包括起始日)
+        if (diffDays > 6) {
+          this.$message.error('进线时间选择范围不能超过7天');
+          // 清空选择
+          this.qecCreateTime = [];
+          this.qecCreateTimeText = '';
+          this.queryParams.qecSTime = null;
+          this.queryParams.qecETime = null;
+          this.qecCalendarKey++;
+          return;
+        }
+
+        this.qecCreateTimeText = this.formatDateRange(qecCreateTime);
+        this.queryParams.qecSTime = qecCreateTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.qecETime = qecCreateTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
       } else {
+        this.qecCreateTimeText = '';
         this.queryParams.qecSTime = null;
         this.queryParams.qecETime = null;
       }
@@ -646,10 +761,17 @@ export default {
         companyUserId: null,
         companyId: null,
         courseId: null,
+        sTime:null,
+        eTime:null,
+        upSTime:null,
+        upETime:null,
+        qecSTime:null,
+        qecETime:null,
         scheduleStartTime: null,
         scheduleEndTime: null,
       };
-      this.scheduleTime=null;
+      // 统一重置日历组件
+      this.resetCalendars();
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -660,8 +782,6 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
-      this.createTime = null;
-      this.qecCreateTime=null;
       this.queryParams.sTime = null;
       this.queryParams.eTime = null;
       this.queryParams.upSTime = null;
@@ -670,8 +790,10 @@ export default {
       this.queryParams.qecETime = null;
       this.queryParams.scheduleStartTime = null;
       this.queryParams.scheduleEndTime = null;
-      this.scheduleTime=null;
-      this.updateTime=null;
+
+      // 统一重置日历组件
+      this.resetCalendars();
+
       this.handleQuery();
     },
     // 多选框选中数据
@@ -774,16 +896,7 @@ export default {
         this.loadingRedLog = false;
       })
     },
-    
-    handleScheduleTimeChange(val) {
-      if (val) {
-        this.queryParams.scheduleStartTime = val[0];
-        this.queryParams.scheduleEndTime = val[1];
-      } else {
-        this.queryParams.scheduleStartTime = null;
-        this.queryParams.scheduleEndTime = null;
-      }
-    },
+
     handleSendTypeChange() {
       this.handleQuery(); // 重新查询列表
     },

+ 0 - 16
src/views/course/courseWatchLog/myCourseWatchLog.vue

@@ -83,7 +83,6 @@
           start-placeholder="开始日期"
           end-placeholder="结束日期"
           @change="qecCreateTimeChange"
-          :picker-options="pickerOptions"
         ></el-date-picker>
       </el-form-item>
       <el-form-item>
@@ -299,21 +298,6 @@ export default {
 
       createTime:null,
       qecCreateTime:null,
-      pickerOptions: {
-        disabledDate(time) {
-          // 获取6天前的日期(加上今天就是7天)
-          const sixDaysAgo = new Date();
-          sixDaysAgo.setDate(sixDaysAgo.getDate() - 6);
-          sixDaysAgo.setHours(0, 0, 0, 0);
-
-          // 获取明天的日期(不包括今天)
-          const tomorrow = new Date();
-          tomorrow.setDate(tomorrow.getDate() + 1);
-          tomorrow.setHours(0, 0, 0, 0);
-
-          return time.getTime() < sixDaysAgo.getTime() || time.getTime() >= tomorrow.getTime();
-        }
-      },
       courseLists:[],
       videoList:[],
       myQwUserList:[],

+ 181 - 70
src/views/course/courseWatchLog/watchLog.vue

@@ -79,42 +79,69 @@
           />
         </el-select>
       </el-form-item>
+      <!-- 营期时间 -->
       <el-form-item label="营期时间" prop="scheduleTime">
-        <el-date-picker
+        <el-input
+          v-model="scheduleTimeText"
+          placeholder="请选择营期时间"
+          readonly
+          @click.native="showScheduleCalendar = true"
+        />
+        <calendar
           v-model="scheduleTime"
-          type="daterange"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          @change="handleScheduleTimeChange">
-        </el-date-picker>
+          mode="during"
+          :show.sync="showScheduleCalendar"
+          @change="handleScheduleTimeChange"
+          :key="scheduleCalendarKey"
+        />
       </el-form-item>
+      <!-- 创建时间 -->
       <el-form-item label="创建时间" prop="createTime">
-        <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd"
-                        type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
-                        @change="createChange"></el-date-picker>
+        <el-input
+          v-model="createTimeText"
+          placeholder="请选择创建时间"
+          readonly
+          @click.native="showCreateCalendar = true"
+        />
+        <calendar
+          v-model="createTime"
+          mode="during"
+          :show.sync="showCreateCalendar"
+          @change="createChange"
+          :key="createCalendarKey"
+        />
       </el-form-item>
+      <!-- 最新更新时间 -->
       <el-form-item label="最新更新时间" prop="updateTime">
-        <el-date-picker v-model="updateTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"
-                        range-separator="-" start-placeholder="开始日期"
-                        end-placeholder="结束日期" @change="updateChange"></el-date-picker>
+        <el-input
+          v-model="updateTimeText"
+          placeholder="请选择更新时间"
+          readonly
+          @click.native="showUpdateCalendar = true"
+        />
+        <calendar
+          v-model="updateTime"
+          mode="during"
+          :show.sync="showUpdateCalendar"
+          @change="updateChange"
+          :key="updateCalendarKey"
+        />
       </el-form-item>
-      <el-form-item label="进线时间" prop="updateTime">
-        <el-date-picker
+      <!-- 进线时间 -->
+      <el-form-item label="进线时间" prop="qecCreateTime">
+        <el-input
+          v-model="qecCreateTimeText"
+          placeholder="请选择进线时间"
+          readonly
+          @click.native="showQecCalendar = true"
+        />
+        <calendar
           v-model="qecCreateTime"
-          size="small"
-          style="width: 220px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+          mode="during"
+          :show.sync="showQecCalendar"
           @change="qecCreateTimeChange"
-          :picker-options="pickerOptions"
-        ></el-date-picker>
+          :key="qecCalendarKey"
+        />
       </el-form-item>
 
       <el-form-item>
@@ -432,22 +459,41 @@ import {getMyQwUserList} from "@/api/qw/user";
 import {searchTags} from "../../../api/qw/tag";
 import {addTagByWatch, delTagByWatch} from "../../../api/qw/externalContact";
 import {allListTagGroup} from "../../../api/qw/tagGroup";
-
+import Vue from 'vue'
+import Calendar from 'vue-mobile-calendar'
+Vue.use(Calendar)
 
 export default {
   name: "CourseWatchLog",
   data() {
     return {
+      // 日历 key 控制刷新
+      scheduleCalendarKey: 0,
+      createCalendarKey: 0,
+      updateCalendarKey: 0,
+      qecCalendarKey: 0,
+
+      createTimeText: '',
+      scheduleTimeText: '',  // 新增
+      updateTimeText: '',    // 新增
+      qecCreateTimeText: '', // 新增
+
+      scheduleTime: [],  // 改为数组
+      createTime: [],    // 改为数组
+      updateTime: [],    // 改为数组
+      qecCreateTime: [], // 改为数组
+
+      // 控制日历显隐
+      showScheduleCalendar: false,
+      showCreateCalendar: false,
+      showUpdateCalendar: false,
+      showQecCalendar: false,
 
       resultDialogVisible: false,
       resultMessage: '',
       resultTitle:'',
 
       activeName:"2",
-      createTime: null,
-      updateTime:null,
-
-      qecCreateTime:null,
       pickerOptions: {
         disabledDate(time) {
           // 获取6天前的日期(加上今天就是7天)
@@ -475,7 +521,6 @@ export default {
       ids: [],
       // 非单个禁用
       single: true,
-      scheduleTime: null,
       // 非多个禁用
       multiple: true,
       // 显示搜索条件
@@ -589,6 +634,28 @@ export default {
     });
   },
   methods: {
+    // 重置日历组件
+    resetCalendars() {
+      this.scheduleTime = [];
+      this.createTime = [];
+      this.updateTime = [];
+      this.qecCreateTime = [];
+
+      this.scheduleTimeText = '';
+      this.createTimeText = '';
+      this.updateTimeText = '';
+      this.qecCreateTimeText = '';
+
+      // 强制刷新日历组件
+      this.scheduleCalendarKey++;
+      this.createCalendarKey++;
+      this.updateCalendarKey++;
+      this.qecCalendarKey++;
+    },
+    formatDateRange(dates) {
+      if (!dates || dates.length < 2) return '';
+      return dates.map(date => date.format('YYYY-MM-DD')).join(' ~ ');
+    },
     courseChange(row) {
       this.queryParams.videoId = null;
       if (row === '') {
@@ -608,34 +675,6 @@ export default {
       }
       this.getList();
     },
-    createChange() {
-      if (this.createTime != null) {
-        this.queryParams.sTime = this.createTime[0];
-        this.queryParams.eTime = this.createTime[1];
-      } else {
-        this.queryParams.sTime = null;
-        this.queryParams.eTime = null;
-      }
-    },
-    updateChange(){
-      if (this.updateTime != null) {
-        this.queryParams.upSTime = this.updateTime[0];
-        this.queryParams.upETime = this.updateTime[1];
-      } else {
-        this.queryParams.upSTime = null;
-        this.queryParams.upETime = null;
-      }
-    },
-
-    qecCreateTimeChange(){
-      if (this.qecCreateTime != null) {
-        this.queryParams.qecSTime = this.qecCreateTime[0];
-        this.queryParams.qecETime = this.qecCreateTime[1];
-      } else {
-        this.queryParams.qecSTime = null;
-        this.queryParams.qecETime = null;
-      }
-    },
 
     handleClickX(tab) {
       this.activeName=tab.name;
@@ -647,15 +686,81 @@ export default {
       this.getList()
     },
 
-    handleScheduleTimeChange(val) {
-      if (val) {
-        this.queryParams.scheduleStartTime = val[0];
-        this.queryParams.scheduleEndTime = val[1];
+    // 营期时间
+    handleScheduleTimeChange(scheduleTime) {
+      if (scheduleTime && scheduleTime.length >= 2) {
+        this.scheduleTimeText = this.formatDateRange(scheduleTime);
+        this.queryParams.scheduleStartTime = scheduleTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.scheduleEndTime = scheduleTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+        console.log(this.queryParams.scheduleStartTime)
+        console.log(this.queryParams.scheduleEndTime)
       } else {
+        this.scheduleTimeText = '';
         this.queryParams.scheduleStartTime = null;
         this.queryParams.scheduleEndTime = null;
       }
     },
+    // 创建时间
+    createChange(createTime) {
+      if (createTime && createTime.length >= 2) {
+        this.createTimeText = this.formatDateRange(createTime);
+        this.queryParams.sTime = createTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.eTime = createTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+      } else {
+        this.createTimeText = '';
+        this.queryParams.sTime = null;
+        this.queryParams.eTime = null;
+      }
+    },
+
+    // 更新时间
+    updateChange(updateTime) {
+      if (updateTime && updateTime.length >= 2) {
+        this.updateTimeText = this.formatDateRange(updateTime);
+        this.queryParams.upSTime = updateTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.upETime = updateTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+      } else {
+        this.updateTimeText = '';
+        this.queryParams.upSTime = null;
+        this.queryParams.upETime = null;
+      }
+    },
+
+    // 进线时间
+    qecCreateTimeChange(qecCreateTime) {
+      if (qecCreateTime && qecCreateTime.length >= 2) {
+        // 检查选择的日期范围是否超过7天(包括起始和结束日期)
+        const startDate = new Date(qecCreateTime[0]);
+        const endDate = new Date(qecCreateTime[1]);
+
+        // 设置时间为当天开始,避免时间部分影响计算
+        startDate.setHours(0, 0, 0, 0);
+        endDate.setHours(0, 0, 0, 0);
+
+        const timeDiff = Math.abs(endDate - startDate);
+        const diffDays = Math.ceil(timeDiff / (1000 * 60 * 60 * 24));
+
+        // 如果超过6天的范围(总共7天,包括起始日)
+        if (diffDays > 6) {
+          this.$message.error('进线时间选择范围不能超过7天');
+          // 清空选择
+          this.qecCreateTime = [];
+          this.qecCreateTimeText = '';
+          this.queryParams.qecSTime = null;
+          this.queryParams.qecETime = null;
+          this.qecCalendarKey++;
+          return;
+        }
+
+        this.qecCreateTimeText = this.formatDateRange(qecCreateTime);
+        this.queryParams.qecSTime = qecCreateTime.map(date => date.format('YYYY-MM-DD'))[0] || null;
+        this.queryParams.qecETime = qecCreateTime.map(date => date.format('YYYY-MM-DD'))[1] || null;
+      } else {
+        this.qecCreateTimeText = '';
+        this.queryParams.qecSTime = null;
+        this.queryParams.qecETime = null;
+      }
+    },
     /** 查询短链课程看课记录列表 */
     getList() {
       this.loading = true;
@@ -690,10 +795,17 @@ export default {
         companyUserId: null,
         companyId: null,
         courseId: null,
+        sTime:null,
+        eTime:null,
+        upSTime:null,
+        upETime:null,
+        qecSTime:null,
+        qecETime:null,
         scheduleStartTime: null,
         scheduleEndTime: null,
       };
-      this.scheduleTime=null;
+      // 统一重置日历组件
+      this.resetCalendars();
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -704,8 +816,6 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
-      this.createTime = null;
-      this.qecCreateTime=null;
       this.queryParams.sTime = null;
       this.queryParams.eTime = null;
       this.queryParams.upSTime = null;
@@ -714,8 +824,9 @@ export default {
       this.queryParams.qecETime = null;
       this.queryParams.scheduleStartTime = null;
       this.queryParams.scheduleEndTime = null;
-      this.scheduleTime=null;
-      this.updateTime=null;
+      // 统一重置日历组件
+      this.resetCalendars();
+
       this.handleQuery();
     },
     // 多选框选中数据

+ 52 - 77
src/views/member/list.vue

@@ -2,6 +2,26 @@
   <div class="app-container">
     <!-- Search Form -->
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="项目" prop="projectId">
+        <el-select  v-model="queryParams.projectId" placeholder="请选择项目" clearable size="small" >
+          <el-option
+            v-for="item in projectOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="会员ID" prop="userId">
+        <el-input
+          style="width: 200px"
+          v-model="queryParams.userId"
+          placeholder="请输入会员ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="昵称" prop="nickname">
         <el-input
           style="width: 200px"
@@ -74,19 +94,7 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <!-- 操作按钮区域 -->
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-d-arrow-right"
-          size="mini"
-          :disabled="multiple"
-          @click="handleTransfer"
-          v-hasPermi="['company:user:transfer']"
-        >转移</el-button>
-      </el-col>
-    </el-row>
+
     <!-- Tab Selection -->
     <!--    <el-tabs v-model="queryParams.tabValue" @tab-click="handleTabChange">-->
     <!--      <el-tab-pane label="全部" name="0"></el-tab-pane>-->
@@ -143,9 +151,14 @@
     </el-row>
 
     <!-- User Table -->
-    <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
+    <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange" border>
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="ID" align="center" prop="userId" />
+      <el-table-column label="项目" align="center" prop="projectId">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.projectId !== null">{{ getProjectLabel(scope.row.projectId) }}</el-tag>
+        </template>
+      </el-table-column>
       <el-table-column label="昵称" align="center" prop="nickname" />
       <el-table-column label="头像" align="center" width="80">
         <template slot-scope="scope">
@@ -180,12 +193,19 @@
       </el-table-column>
       <el-table-column label="标签" align="center" prop="tag" show-overflow-tooltip />
       <el-table-column label="最后看课时间" align="center" prop="lastWatchDate" width="160" />
-      <el-table-column label="停课天数" align="center" prop="stopWatchDays" />
+<!--      <el-table-column label="停课天数" align="center" prop="stopWatchDays" />-->
       <el-table-column label="注册时间" align="center" prop="createTime" width="160" />
       <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
       <el-table-column label="所属员工" align="center" prop="companyUserNickName" />
       <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['store:user:edit']"
+          >修改</el-button>
           <el-button
             size="mini"
             type="text"
@@ -286,35 +306,6 @@
       </div>
     </el-dialog>
 
-    <!-- 客户转移对话框 (可选,更复杂的转移逻辑可能需要) -->
-
-    <el-dialog title="客户转移" :visible.sync="openTransferDialog" width="500px" append-to-body>
-      <el-form ref="transferForm" :model="transferForm" label-width="100px" :rules="cusTransfer">
-        <el-alert
-          title="会经过总后台审核后才进行转移"
-          type="warning">
-        </el-alert>
-        <el-form-item label="转移至销售" prop="targetUserId">
-          <el-select v-model="transferForm.targetUserId" remote placeholder="请选择" filterable clearable>
-            <el-option
-              v-for="dict in companyUserList"
-              :key="`${dict.nickName} - ${dict.userName}`"
-              :label="`${dict.nickName} - ${dict.userName}`"
-              :value="dict.userId">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="转移原因" prop="content">
-          <el-input type="textarea" v-model="transferForm.content" placeholder="转移原因"></el-input>
-        </el-form-item>
-        <p>确定要转移选中的 <strong>{{ ids.length }}</strong> 个客户吗?</p>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="danger" @click="submitTransfer">提交申请</el-button>
-        <el-button @click="cancelTransfer">取 消</el-button>
-      </div>
-    </el-dialog>
-
     <el-drawer
         :with-header="false"
         size="75%"
@@ -327,7 +318,6 @@
 
 <script>
 import { listUser, getUser, addUser, updateUser, delUser, exportUser, auditUser } from "@/api/user/fsUser";
-import {transferUser} from "@/api/users/user";
 import {getUserList} from "@/api/company/companyUser";
 import userDetails from '@/views/store/components/userDetails.vue';
 export default {
@@ -336,7 +326,6 @@ export default {
   data() {
     return {
       show:{
-        
         open:false,
       },
       cusTransfer: {
@@ -389,7 +378,8 @@ export default {
         missCourseStatus: "0",
         continueMissCourseSort: "0",
         registerStartTime: null,
-        registerEndTime: null
+        registerEndTime: null,
+        projectId: null,
       },
       // 表单参数
       form: {},
@@ -405,7 +395,8 @@ export default {
         status: [
           { required: true, message: "状态不能为空", trigger: "change" }
         ]
-      }
+      },
+      projectOptions: []
     };
   },
   created() {
@@ -418,6 +409,9 @@ export default {
     this.getDicts("user_status").then(response => {
       this.statusOptions = response.data;
     });
+    this.getDicts("sys_course_project").then(response => {
+      this.projectOptions = response.data;
+    });
     this.getTagOptions();
     this.getSalesOptions();
   },
@@ -428,29 +422,6 @@ export default {
                  this.$refs.userDetails.getDetails(row.userId);
             }, 1);
      },
-    /** 提交转移按钮 (如果使用对话框) */
-
-    submitTransfer() {
-      this.$refs["transferForm"].validate(valid => {
-        if (valid) {
-          transferUser({
-            userIds: this.ids,
-            targetCompanyUserId: this.transferForm.targetUserId,
-            content: this.transferForm.content
-          }).then(response => {
-            if (response.code === 200) {
-              this.msgSuccess(response.msg);
-              this.openTransferDialog = false;
-              this.getList();
-            } else {
-              this.msgError(response.msg || "转移失败");
-            }
-          }).catch(() => {
-            this.msgError("转移请求失败");
-          });
-        }
-      });
-    },
     // 重置表单
     resetForm() {
       this.linkForm={
@@ -513,11 +484,11 @@ export default {
 
     /** 获取销售员工选项 */
     getSalesOptions() {
-      this.salesOptions = [
-        { userId: 1, nickName: "销售A" },
-        { userId: 2, nickName: "销售B" },
-        { userId: 3, nickName: "销售C" }
-      ];
+      getUserList().then(res=>{
+        if(res.code === 200) {
+          this.salesOptions = res.data
+        }
+      });
     },
 
     /** 获取看课状态类型 */
@@ -682,7 +653,11 @@ export default {
           }
         });
       }).catch(() => {});
-    }
+    },
+    /** 获取项目对应名称 */
+    getProjectLabel(projectId) {
+      return this.projectOptions.find(item => parseInt(item.dictValue) === projectId)?.dictLabel;
+    },
   }
 };
 </script>

+ 29 - 45
src/views/member/mylist.vue

@@ -2,6 +2,16 @@
   <div class="app-container">
     <!-- Search Form -->
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="项目" prop="projectId">
+        <el-select  v-model="queryParams.projectId" placeholder="请选择项目" clearable size="small" >
+          <el-option
+            v-for="item in projectOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item label="昵称" prop="nickname">
         <el-input
           style="width: 200px"
@@ -74,19 +84,7 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <!-- 操作按钮区域 -->
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-d-arrow-right"
-          size="mini"
-          :disabled="multiple"
-          @click="handleTransfer"
-          v-hasPermi="['company:user:transfer']"
-        >转移</el-button>
-      </el-col>
-    </el-row>
+
     <!-- Tab Selection -->
     <!--    <el-tabs v-model="queryParams.tabValue" @tab-click="handleTabChange">-->
     <!--      <el-tab-pane label="全部" name="0"></el-tab-pane>-->
@@ -143,9 +141,14 @@
     </el-row>
 
     <!-- User Table -->
-    <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
+    <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange" border>
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="ID" align="center" prop="userId" />
+      <el-table-column label="项目" align="center" prop="projectId">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.projectId !== null">{{ getProjectLabel(scope.row.projectId) }}</el-tag>
+        </template>
+      </el-table-column>
       <el-table-column label="昵称" align="center" prop="nickname" />
       <el-table-column label="头像" align="center" width="80">
         <template slot-scope="scope">
@@ -285,34 +288,6 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <!-- 客户转移对话框 (可选,更复杂的转移逻辑可能需要) -->
-
-    <el-dialog title="客户转移" :visible.sync="openTransferDialog" width="500px" append-to-body>
-      <el-form ref="transferForm" :model="transferForm" label-width="100px" :rules="cusTransfer">
-        <el-alert
-          title="会经过总后台审核后才进行转移"
-          type="warning">
-        </el-alert>
-        <el-form-item label="转移至销售" prop="targetUserId">
-          <el-select v-model="transferForm.targetUserId" remote placeholder="请选择" filterable clearable>
-            <el-option
-              v-for="dict in companyUserList"
-              :key="`${dict.nickName} - ${dict.userName}`"
-              :label="`${dict.nickName} - ${dict.userName}`"
-              :value="dict.userId">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="转移原因" prop="content">
-          <el-input type="textarea" v-model="transferForm.content" placeholder="转移原因"></el-input>
-        </el-form-item>
-        <p>确定要转移选中的 <strong>{{ ids.length }}</strong> 个客户吗?</p>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="danger" @click="submitTransfer">提交申请</el-button>
-        <el-button @click="cancelTransfer">取 消</el-button>
-      </div>
-    </el-dialog>
 
     <el-drawer
         :with-header="false"
@@ -387,7 +362,8 @@ export default {
         missCourseStatus: "0",
         continueMissCourseSort: "0",
         registerStartTime: null,
-        registerEndTime: null
+        registerEndTime: null,
+        projectId: null,
       },
       // 表单参数
       form: {},
@@ -403,7 +379,8 @@ export default {
         status: [
           { required: true, message: "状态不能为空", trigger: "change" }
         ]
-      }
+      },
+      projectOptions: []
     };
   },
   created() {
@@ -416,6 +393,9 @@ export default {
     this.getDicts("user_status").then(response => {
       this.statusOptions = response.data;
     });
+    this.getDicts("sys_course_project").then(response => {
+      this.projectOptions = response.data;
+    });
     this.getTagOptions();
     this.getSalesOptions();
   },
@@ -678,7 +658,11 @@ export default {
           }
         });
       }).catch(() => {});
-    }
+    },
+    /** 获取项目对应名称 */
+    getProjectLabel(projectId) {
+      return this.projectOptions.find(item => parseInt(item.dictValue) === projectId)?.dictLabel;
+    },
   }
 };
 </script>

+ 2 - 2
src/views/qw/material/ImageUpload.vue

@@ -46,8 +46,8 @@ export default {
     },
     // 大小限制(MB)
     fileSize: {
-       type: Number,
-      default: 10,
+        type: Number,
+        default: 10,
     },
     // 文件类型, 例如['png', 'jpg', 'jpeg']
     fileType: {

+ 153 - 130
src/views/qw/material/index.vue

@@ -31,19 +31,19 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="发送次数" prop="sendCount">
-        <el-input
-          v-model="queryParams.sendCount"
-          placeholder="请输入发送次数"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+<!--      <el-form-item label="发送次数" prop="sendCount">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.sendCount"-->
+<!--          placeholder="请输入发送次数"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置/刷新页面/回到全部</el-button>
-        <el-button type="primary"  size="mini" @click="handleAdd()">添加素材</el-button>
+        <el-button type="primary"  size="mini" @click="handleAdd()" v-hasPermi="['qw:material:add']">添加素材</el-button>
       </el-form-item>
     </el-form>
 
@@ -102,14 +102,14 @@
                     </video>
                     <div v-else-if="scope.row.materialType == 'file'" class="file-link-container" style="width: 100%">
                       <el-link type="primary" :href="downloadUrl(scope.row.materialUrl)" download>
-                        下载文件
+                         {{scope.row.materialUrl}}
                       </el-link>
                     </div>
                   </template>
                 </el-table-column>
                 <el-table-column label="标题" align="center"  prop="title"/>
                 <el-table-column label="创建人" align="center"  prop="createName"/>
-                <el-table-column label="发送次数" align="center"  prop="sendCount"/>
+<!--                <el-table-column label="发送次数" align="center"  prop="sendCount"/>-->
                 <el-table-column label="隶属分组" align="center"  prop="materialGroupName"></el-table-column>
                 <el-table-column label="创建时间" align="center"  prop="createTime"/>
                 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -119,14 +119,14 @@
                       type="text"
                       icon="el-icon-edit"
                       @click="handleUpdate(scope.row)"
-                      v-hasPermi="['qw:tag:edit']"
+                      v-hasPermi="['qw:material:edit']"
                     >修改</el-button>
                     <el-button
                       size="mini"
                       type="text"
                       icon="el-icon-delete"
                       @click="handleDelete(scope.row)"
-                      v-hasPermi="['qw:tag:remove']"
+                      v-hasPermi="['qw:material:remove']"
                     >删除</el-button>
                   </template>
                 </el-table-column>
@@ -146,7 +146,7 @@
                   </el-table-column>
                   <el-table-column label="标题" align="center"  prop="title"/>
                   <el-table-column label="创建人" align="center"  prop="createName"/>
-                  <el-table-column label="发送次数" align="center"  prop="sendCount"/>
+<!--                  <el-table-column label="发送次数" align="center"  prop="sendCount"/>-->
                   <el-table-column label="隶属分组" align="center"  prop="materialGroupName"></el-table-column>
                   <el-table-column label="创建时间" align="center"  prop="createTime"/>
                   <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -156,14 +156,14 @@
                         type="text"
                         icon="el-icon-edit"
                         @click="handleUpdate(scope.row)"
-                        v-hasPermi="['qw:tag:edit']"
+                        v-hasPermi="['qw:material:edit']"
                       >修改</el-button>
                       <el-button
                         size="mini"
                         type="text"
                         icon="el-icon-delete"
                         @click="handleDelete(scope.row)"
-                        v-hasPermi="['qw:tag:remove']"
+                        v-hasPermi="['qw:material:remove']"
                       >删除</el-button>
                     </template>
                   </el-table-column>
@@ -199,7 +199,7 @@
                           type="text"
                           icon="el-icon-edit"
                           @click="handleUpdate(item)"
-                          v-hasPermi="['qw:tag:edit']"
+                          v-hasPermi="['qw:material:edit']"
                         >修改</el-button>
                         <el-button
                           class="button"
@@ -207,101 +207,102 @@
                           type="text"
                           icon="el-icon-delete"
                           @click="handleDelete(item)"
-                          v-hasPermi="['qw:tag:remove']"
+                          v-hasPermi="['qw:material:remove']"
                         >删除</el-button>
                       </div>
                     </div>
                   </el-card>
                 </div>
             </el-tab-pane>
-            <el-tab-pane label="图文" name="4">
-              <div style="display: flex;  flex-wrap: wrap; gap: 10px; ">
-                <el-card
-                  v-for="(item, index) in imagetextMaterialsList"
-                  :key="index">
-                  <el-image
-                    v-if="item.titleUrl"
-                    style="width: 200px; height: 180px"
-                    :src="item.titleUrl"
-                    fit="contain"
-                    @click="openImageViewer(item.titleUrl)"
-                  />
-                  <div v-else style="width: 200px; height: 180px; display: flex; justify-content: center; align-items: center; border: 1px solid #dcdcdc;">
-                    暂无标题图片
-                  </div>
-                  <div style="margin-top: 3%">
-                    <div style="  display: flex;flex-direction: column;width: 200px">
-                      <span>标题:{{ item.title }}</span>
-                      <div style="display: flex; flex-wrap: wrap; word-break: break-all;margin:3% 0">
-                        <span>链接:</span>
-                        <el-link :href="item.materialUrl" target="_blank">{{ item.materialUrl }}</el-link>
-                      </div>
-                      <span>创建人:{{item.createName}}</span>
-                      <time class="time" style="white-space: nowrap">时间:{{ item.createTime }}</time>
-                    </div>
-                    <div class="bottom clearfix">
-                      <el-button
-                        class="button"
-                        size="mini"
-                        type="text"
-                        icon="el-icon-edit"
-                        @click="handleUpdate(item)"
-                        v-hasPermi="['qw:tag:edit']"
-                      >修改</el-button>
-                      <el-button
-                        class="button"
-                        size="mini"
-                        type="text"
-                        icon="el-icon-delete"
-                        @click="handleDelete(item)"
-                        v-hasPermi="['qw:tag:remove']"
-                      >删除</el-button>
-                    </div>
-                  </div>
-                </el-card>
-              </div>
-            </el-tab-pane>
-            <el-tab-pane label="语音" name="5">
-              <div style="display: flex;  flex-wrap: wrap; gap: 10px; ">
-                <el-card
-                  v-for="(item, index) in voiceMaterialsList"
-                  :key="index">
-                  <!--                    style="width: 250px;height: 300px">-->
-                  <!--                    <div class="card-header">-->
-                  <!--                      <el-checkbox-->
-                  <!--                        :label="item.id"-->
-                  <!--                        @change="handleSelectionChange($event, item)"-->
-                  <!--                      ></el-checkbox>-->
-                  <!--                    </div>-->
-                  <audio  controls :src="item.materialUrl" style="width: 300px;height: 50px"/>
-                  <div>
-                    <div style="  display: flex;flex-direction: column;width: 200px">
-                      <span>标题:{{ item.title }}</span>
-                      <span>创建人:{{item.createName}}</span>
-                      <time class="time" style="white-space: nowrap">时间:{{ item.createTime }}</time>
-                    </div>
-                    <div class="bottom clearfix">
-                      <el-button
-                        class="button"
-                        size="mini"
-                        type="text"
-                        icon="el-icon-edit"
-                        @click="handleUpdate(item)"
-                        v-hasPermi="['qw:tag:edit']"
-                      >修改</el-button>
-                      <el-button
-                        class="button"
-                        size="mini"
-                        type="text"
-                        icon="el-icon-delete"
-                        @click="handleDelete(item)"
-                        v-hasPermi="['qw:tag:remove']"
-                      >删除</el-button>
-                    </div>
-                  </div>
-                </el-card>
-              </div>
-            </el-tab-pane>
+
+<!--            <el-tab-pane label="图文" name="4">-->
+<!--              <div style="display: flex;  flex-wrap: wrap; gap: 10px; ">-->
+<!--                <el-card-->
+<!--                  v-for="(item, index) in imagetextMaterialsList"-->
+<!--                  :key="index">-->
+<!--                  <el-image-->
+<!--                    v-if="item.titleUrl"-->
+<!--                    style="width: 200px; height: 180px"-->
+<!--                    :src="item.titleUrl"-->
+<!--                    fit="contain"-->
+<!--                    @click="openImageViewer(item.titleUrl)"-->
+<!--                  />-->
+<!--                  <div v-else style="width: 200px; height: 180px; display: flex; justify-content: center; align-items: center; border: 1px solid #dcdcdc;">-->
+<!--                    暂无标题图片-->
+<!--                  </div>-->
+<!--                  <div style="margin-top: 3%">-->
+<!--                    <div style="  display: flex;flex-direction: column;width: 200px">-->
+<!--                      <span>标题:{{ item.title }}</span>-->
+<!--                      <div style="display: flex; flex-wrap: wrap; word-break: break-all;margin:3% 0">-->
+<!--                        <span>链接:</span>-->
+<!--                        <el-link :href="item.materialUrl" target="_blank">{{ item.materialUrl }}</el-link>-->
+<!--                      </div>-->
+<!--                      <span>创建人:{{item.createName}}</span>-->
+<!--                      <time class="time" style="white-space: nowrap">时间:{{ item.createTime }}</time>-->
+<!--                    </div>-->
+<!--                    <div class="bottom clearfix">-->
+<!--                      <el-button-->
+<!--                        class="button"-->
+<!--                        size="mini"-->
+<!--                        type="text"-->
+<!--                        icon="el-icon-edit"-->
+<!--                        @click="handleUpdate(item)"-->
+<!--                        v-hasPermi="['qw:material:edit']"-->
+<!--                      >修改</el-button>-->
+<!--                      <el-button-->
+<!--                        class="button"-->
+<!--                        size="mini"-->
+<!--                        type="text"-->
+<!--                        icon="el-icon-delete"-->
+<!--                        @click="handleDelete(item)"-->
+<!--                        v-hasPermi="['qw:material:remove']"-->
+<!--                      >删除</el-button>-->
+<!--                    </div>-->
+<!--                  </div>-->
+<!--                </el-card>-->
+<!--              </div>-->
+<!--            </el-tab-pane>-->
+<!--            <el-tab-pane label="语音" name="5">-->
+<!--              <div style="display: flex;  flex-wrap: wrap; gap: 10px; ">-->
+<!--                <el-card-->
+<!--                  v-for="(item, index) in voiceMaterialsList"-->
+<!--                  :key="index">-->
+<!--                  &lt;!&ndash;                    style="width: 250px;height: 300px">&ndash;&gt;-->
+<!--                  &lt;!&ndash;                    <div class="card-header">&ndash;&gt;-->
+<!--                  &lt;!&ndash;                      <el-checkbox&ndash;&gt;-->
+<!--                  &lt;!&ndash;                        :label="item.id"&ndash;&gt;-->
+<!--                  &lt;!&ndash;                        @change="handleSelectionChange($event, item)"&ndash;&gt;-->
+<!--                  &lt;!&ndash;                      ></el-checkbox>&ndash;&gt;-->
+<!--                  &lt;!&ndash;                    </div>&ndash;&gt;-->
+<!--                  <audio  controls :src="item.materialUrl" style="width: 300px;height: 50px"/>-->
+<!--                  <div>-->
+<!--                    <div style="  display: flex;flex-direction: column;width: 200px">-->
+<!--                      <span>标题:{{ item.title }}</span>-->
+<!--                      <span>创建人:{{item.createName}}</span>-->
+<!--                      <time class="time" style="white-space: nowrap">时间:{{ item.createTime }}</time>-->
+<!--                    </div>-->
+<!--                    <div class="bottom clearfix">-->
+<!--                      <el-button-->
+<!--                        class="button"-->
+<!--                        size="mini"-->
+<!--                        type="text"-->
+<!--                        icon="el-icon-edit"-->
+<!--                        @click="handleUpdate(item)"-->
+<!--                        v-hasPermi="['qw:material:edit']"-->
+<!--                      >修改</el-button>-->
+<!--                      <el-button-->
+<!--                        class="button"-->
+<!--                        size="mini"-->
+<!--                        type="text"-->
+<!--                        icon="el-icon-delete"-->
+<!--                        @click="handleDelete(item)"-->
+<!--                        v-hasPermi="['qw:material:remove']"-->
+<!--                      >删除</el-button>-->
+<!--                    </div>-->
+<!--                  </div>-->
+<!--                </el-card>-->
+<!--              </div>-->
+<!--            </el-tab-pane>-->
             <el-tab-pane label="视频" name="6">
               <div style="display: flex;  flex-wrap: wrap; gap: 10px; ">
                 <el-card
@@ -331,7 +332,7 @@
                         type="text"
                         icon="el-icon-edit"
                         @click="handleUpdate(item)"
-                        v-hasPermi="['qw:tag:edit']"
+                        v-hasPermi="['qw:material:edit']"
                       >修改</el-button>
                       <el-button
                         class="button"
@@ -339,7 +340,7 @@
                         type="text"
                         icon="el-icon-delete"
                         @click="handleDelete(item)"
-                        v-hasPermi="['qw:tag:remove']"
+                        v-hasPermi="['qw:material:remove']"
                       >删除</el-button>
                     </div>
                   </div>
@@ -359,7 +360,7 @@
                   <!--                      ></el-checkbox>-->
                   <!--                    </div>-->
                   <el-link type="primary" :href="downloadUrl(item.materialUrl)" download>
-                    下载文件
+                    {{item.materialUrl}}
                   </el-link>
                   <div>
                     <div style="  display: flex;flex-direction: column;width: 200px">
@@ -374,7 +375,7 @@
                         type="text"
                         icon="el-icon-edit"
                         @click="handleUpdate(item)"
-                        v-hasPermi="['qw:tag:edit']"
+                        v-hasPermi="['qw:material:edit']"
                       >修改</el-button>
                       <el-button
                         class="button"
@@ -382,7 +383,7 @@
                         type="text"
                         icon="el-icon-delete"
                         @click="handleDelete(item)"
-                        v-hasPermi="['qw:tag:remove']"
+                        v-hasPermi="['qw:material:remove']"
                       >删除</el-button>
                     </div>
                   </div>
@@ -444,7 +445,7 @@
         </div>
         <div v-else-if="form.materialType=='image'">
           <el-form-item label="上传图片" prop="materialUrl">
-            <ImageUpload v-model="form.materialUrl" type="image" :num="10" :width="150" :height="150" />
+            <ImageUpload v-model="form.materialUrl" type="image" :num="1" :width="150" :height="150" />
           </el-form-item>
         </div>
         <div v-else-if="form.materialType=='imagetext'">
@@ -486,7 +487,7 @@
             </el-upload>
             <video v-if="form.materialUrl"
               :src="form.materialUrl"
-              controls style="width: 200px;height: 100px">
+              controls style="width: 300px;height: 200px">
             </video>
           </el-form-item>
         </div>
@@ -502,7 +503,7 @@
               <i class="el-icon-plus avatar-uploader-icon"></i>
             </el-upload>
             <el-link v-if="form.materialUrl" type="primary" :href="downloadUrl(form.materialUrl)" download>
-              下载文件
+              {{ form.materialUrl }}
             </el-link>
           </el-form-item>
         </div>
@@ -530,7 +531,7 @@ export default {
       dialogVisible: false,
       dialogImageUrl:null,
       //上传地址
-      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS2",
       myQwCompanyList:[],
       // 遮罩层
       loading: true,
@@ -581,7 +582,6 @@ export default {
         title: null,
         createName: null,
         sendCount: null,
-        corpId: null,
         groupType:"1",
       },
 
@@ -695,14 +695,14 @@ export default {
       }
     },
     beforeAvatarUploadVoice(file){
-      const isLt1M = file.size / 1024 / 1024 < 1;
+      const isLt1M = file.size / 1024 / 1024 < 2;
       if (!isLt1M) {
         this.$message.error('上传大小不能超过 2MB!');
       }
       return isLt1M;
     },
     beforeAvatarUploadVideo(file){
-      const isLt1M = file.size / 1024 / 1024 < 1;
+      const isLt1M = file.size / 1024 / 1024 < 10;
       if (!isLt1M) {
         this.$message.error('上传大小不能超过 10MB!');
       }
@@ -710,7 +710,7 @@ export default {
     },
 
     beforeAvatarUploadFile(file){
-      const isLt1M = file.size / 1024 / 1024 < 1;
+      const isLt1M = file.size / 1024 / 1024 < 20;
       if (!isLt1M) {
         this.$message.error('上传大小不能超过 20MB!');
       }
@@ -719,27 +719,28 @@ export default {
 
     //选择小板块方法
     handleClick(row){
-      switch (row.index) {
-        case '0':
+
+      switch (row.name) {
+        case '1':
           this.resetParam();
           this.getList();
           break;
-        case '1':
+        case '2':
           this.textMaterials();
           break;
-        case '2':
+        case '3':
           this.imageMaterials();
           break;
-        case '3':
+        case '4':
           this.imagetextMaterials()
           break;
-        case '4':
+        case '5':
           this.voiceMaterials();
           break;
-        case '5':
+        case '6':
           this.videoMaterials()
           break;
-        case '6':
+        case '7':
           this.fileMaterials()
           break;
         default:
@@ -865,16 +866,38 @@ export default {
         this.form.corpId=this.queryParams.corpId;
         if (valid) {
           if (this.form.materialId != null) {
+
+            this.open = false;
+            let loadingRock = this.$loading({
+              lock: true,
+              text: '正在执行中请稍后~!',
+              spinner: 'el-icon-loading',
+              background: 'rgba(0, 0, 0, 0.7)'
+            });
+
             updateMaterial(this.form).then(response => {
               this.msgSuccess("修改成功");
-              this.open = false;
               this.getList();
+            }).finally(res=>{
+              loadingRock.close();
             });
+
           } else {
+
+            this.open = false;
+            let loadingRock = this.$loading({
+              lock: true,
+              text: '正在执行中请稍后~~',
+              spinner: 'el-icon-loading',
+              background: 'rgba(0, 0, 0, 0.7)'
+            });
+
             addMaterial(this.form).then(response => {
               this.msgSuccess("新增成功");
-              this.open = false;
               this.getList();
+              loadingRock.close();
+            }).finally(res=>{
+              loadingRock.close();
             });
           }
         }

+ 6 - 1
src/views/qw/sopTemp/updateSopTemp.vue

@@ -1196,9 +1196,11 @@ export default {
 
     },
     addSetList(contentIndex, content) {
-
       if (this.form.sendType == 1) {
         for (let i = 0; i < content.length; i++) {
+          if (!content[i].setting) {
+            content[i].setting = []; // 初始化 setting 数组如果不存在
+          }
 
           if (content[i].setting.length > 9) {
             return this.$message.error("因为企微接口限制,企微模板一条消息只能设置最多~9个内容!!")
@@ -1215,6 +1217,9 @@ export default {
 
         }
       } else {
+        if (!content[contentIndex].setting) {
+          content[contentIndex].setting = []; // 初始化 setting 数组如果不存在
+        }
 
         const newSetting = {
           contentType: '1',

+ 24 - 21
src/views/users/user/darkRoom.vue

@@ -32,6 +32,7 @@
     <el-table  height="500" border v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="用户id" align="center" prop="userId" />
+      <el-table-column label="项目" align="center" prop="projectName" />
       <el-table-column label="用户昵称" align="center" prop="nickname" />
       <el-table-column label="用户头像" align="center" prop="avatar">
         <template slot-scope="scope">
@@ -44,25 +45,25 @@
         </template>
       </el-table-column>
       <el-table-column label="注册时间" align="center" prop="createTime" width="160px"/>
-      <el-table-column label="看课数量" align="center" prop="watchCourseCount" />
-      <el-table-column label="缺课数量" align="center" prop="missCourseCount" />
-      <el-table-column label="缺课状态" align="center" prop="missCourseStatus">
-        <template slot-scope="scope">
-          <el-tag effect="dark" type="danger"  v-if="scope.row.missCourseStatus === 1">已缺课</el-tag>
-          <el-tag effect="dark" type="success" v-else>未缺课</el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column label="参与营期数量" align="center" prop="partCourseCount" width="100px"/>
+<!--      <el-table-column label="看课数量" align="center" prop="watchCourseCount" />-->
+<!--      <el-table-column label="缺课数量" align="center" prop="missCourseCount" />-->
+<!--      <el-table-column label="缺课状态" align="center" prop="missCourseStatus">-->
+<!--        <template slot-scope="scope">-->
+<!--          <el-tag effect="dark" type="danger"  v-if="scope.row.missCourseStatus === 1">已缺课</el-tag>-->
+<!--          <el-tag effect="dark" type="success" v-else>未缺课</el-tag>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="参与营期数量" align="center" prop="partCourseCount" width="100px"/>-->
       <el-table-column label="最后一次看课时间" align="center" prop="lastWatchDate"  width="160px"/>
-      <el-table-column label="用户状态" align="center" prop="courseCountStatus">
-        <template slot-scope="scope">
-          <el-tag effect="dark" type="success" v-if="scope.row.courseCountStatus === 1">正常</el-tag>
-          <el-tag effect="dark" type="info"    v-else-if="scope.row.courseCountStatus === 2">停止</el-tag>
-          <el-tag effect="dark" type="danger"  v-else>未看</el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column label="停课天数" align="center" prop="stopWatchDays" />
-      <el-table-column label="完播时间" align="center" prop="completeWatchDate" width="160px"/>
+<!--      <el-table-column label="用户状态" align="center" prop="courseCountStatus">-->
+<!--        <template slot-scope="scope">-->
+<!--          <el-tag effect="dark" type="success" v-if="scope.row.courseCountStatus === 1">正常</el-tag>-->
+<!--          <el-tag effect="dark" type="info"    v-else-if="scope.row.courseCountStatus === 2">停止</el-tag>-->
+<!--          <el-tag effect="dark" type="danger"  v-else>未看</el-tag>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="停课天数" align="center" prop="stopWatchDays" />-->
+<!--      <el-table-column label="完播时间" align="center" prop="completeWatchDate" width="160px"/>-->
       <el-table-column label="标签名称" align="center" prop="tag" />
       <el-table-column label="所属销售名称" align="center" prop="companyUserNickName" width="120px"/>
       <el-table-column label="备注" align="center" prop="remark" />
@@ -114,8 +115,9 @@ export default {
         pageNum: 1,
         pageSize: 10,
         keyword: null,
-        isBlack: true
+        status: 2
       },
+      selectUser: []
     };
   },
   created() {
@@ -144,12 +146,13 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.userId)
+      this.selectedUser = selection.map(item => {return {userId: item.userId, projectId: item.projectId}})
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
     // 启用
     handleUpdate(row) {
-      enabledUsers([row.userId]).then(response => {
+      enabledUsers([{userId: row.userId, projectId: row.projectId}]).then(response => {
         if (response.code === 200) {
           this.msgSuccess("取消禁用成功");
           this.getList();
@@ -160,7 +163,7 @@ export default {
     },
     // 启用
     handleUpdateBatch() {
-      enabledUsers(this.ids).then(response => {
+      enabledUsers(this.selectedUser).then(response => {
         if (response.code === 200) {
           this.msgSuccess("取消禁用成功");
           this.getList();

+ 39 - 3
src/views/users/user/transfer.vue

@@ -12,6 +12,26 @@
           </el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="会员ID" prop="userId">
+        <el-input
+          style="width: 200px"
+          v-model="queryParams.userId"
+          placeholder="请输入会员ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="会员昵称" prop="nickname">
+        <el-input
+          style="width: 200px"
+          v-model="queryParams.nickname"
+          placeholder="请输入会员昵称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="手机号码" prop="phone">
         <el-input
           style="width: 220px"
@@ -47,6 +67,12 @@
     <el-table height="500" border v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="客户ID" align="center" prop="userId" />
+      <el-table-column label="项目" align="center" prop="projectId">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.projectId !== null">{{ getProjectLabel(scope.row.projectId) }}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="会员ID" align="center" prop="userId" />
       <el-table-column label="昵称" align="center" prop="nickname" />
       <el-table-column label="所属销售" align="center" prop="companyUserNickName" />
       <el-table-column label="手机号码" align="center" prop="phone" />
@@ -76,7 +102,7 @@
     <el-dialog title="客户转移" :visible.sync="openTransferDialog" width="500px" append-to-body>
       <el-form ref="transferForm" :model="transferForm" label-width="100px" :rules="cusTransfer">
         <el-alert
-          title="会经过总后台审核后才进行转移"
+          title="会自动通过审核"
           type="warning">
         </el-alert>
         <el-form-item label="转移至销售" prop="targetUserId">
@@ -135,9 +161,14 @@ export default {
         salesName: null,
         phoneNumber: null,
       },
+      projectOptions: [],
+      selectedUser: [],
     };
   },
   created() {
+    this.getDicts("sys_course_project").then(response => {
+      this.projectOptions = response.data;
+    });
     getUserList().then(res=>{
       if(res.code === 200) {
         this.companyUserList = res.data
@@ -184,6 +215,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.userId)
+      this.selectedUser = selection.map(item => {return {userId: item.userId, projectId: item.projectId}})
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -206,7 +238,7 @@ export default {
       this.$refs["transferForm"].validate(valid => {
         if (valid) {
           transferUser({
-            userIds: this.ids,
+            userIds: this.selectedUser,
             targetCompanyUserId: this.transferForm.targetUserId,
             content: this.transferForm.content
           }).then(response => {
@@ -240,7 +272,11 @@ export default {
           // 处理下载
           this.download(response.msg); // RuoYi 提供的下载方法
         }).catch(function() {});
-    }
+    },
+    /** 获取项目对应名称 */
+    getProjectLabel(projectId) {
+      return this.projectOptions.find(item => parseInt(item.dictValue) === projectId)?.dictLabel;
+    },
 
   }
 };

+ 15 - 2
src/views/users/user/transferLog.vue

@@ -153,6 +153,11 @@
         <el-form-item label="转移矩阵" prop="customerIds">
           <el-table :data="form.customerList" border>
             <el-table-column label="客户" align="center" prop="userName" />
+            <el-table-column label="项目" align="center" prop="projectId">
+              <template slot-scope="scope">
+                <el-tag v-if="scope.row.projectId !== null">{{ getProjectLabel(scope.row.projectId) }}</el-tag>
+              </template>
+            </el-table-column>
             <el-table-column label="转移前销售" align="center" prop="beforeCompanyUserName" />
             <el-table-column label="转移后销售" align="center" prop="afterCompanyUserName" />
           </el-table>
@@ -268,7 +273,8 @@ export default {
         updatedAt: [
           { required: true, message: "记录最后更新时间不能为空", trigger: "blur" }
         ]
-      }
+      },
+      projectOptions: [],
     };
   },
   created() {
@@ -278,6 +284,9 @@ export default {
     getDicts('transfer_approval_status').then(response => {
       this.approvalStatusList = response.data;
     })
+    this.getDicts("sys_course_project").then(response => {
+      this.projectOptions = response.data;
+    });
     getUserList().then(res=>{
       if(res.code === 200) {
         this.companyUserList = res.data
@@ -393,7 +402,11 @@ export default {
         }).then(response => {
           this.download(response.msg);
         }).catch(function() {});
-    }
+    },
+    /** 获取项目对应名称 */
+    getProjectLabel(projectId) {
+      return this.projectOptions.find(item => parseInt(item.dictValue) === projectId)?.dictLabel;
+    },
   }
 };
 </script>