|
|
@@ -264,6 +264,10 @@
|
|
|
:default-time="['00:00:00', '23:59:59']">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="完课时间" prop="finishTime">
|
|
|
+ <el-date-picker v-model="finishTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"
|
|
|
+ range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="finishTimeChange"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<!-- <el-form-item label="是否注册" prop="isVip">-->
|
|
|
<!-- <el-select-->
|
|
|
@@ -372,6 +376,11 @@
|
|
|
<el-table-column label="完课时间" align="center" prop="finishTime" />
|
|
|
<el-table-column label="营期时间" align="center" prop="campPeriodTime" />
|
|
|
<el-table-column label="进线时间" align="center" prop="qecCreateTime" />
|
|
|
+ <el-table-column label="沟通内容" show-overflow-tooltip align="center" prop="interflowContent" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="showInterflowContentFun(scope.row)" type="text" size="small">详情</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="是否领奖" align="center" prop="rewardType" >
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag
|
|
|
@@ -387,6 +396,7 @@
|
|
|
label="操作"
|
|
|
width="100">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button @click="editInterflowContentFun(scope.row)" type="text" size="small">修改沟通内容</el-button>
|
|
|
<el-button @click="openAnswerLogFun(scope.row)" type="text" size="small">答题记录</el-button>
|
|
|
<el-button @click="openRedLogFun(scope.row)" type="text" size="small">红包记录</el-button>
|
|
|
</template>
|
|
|
@@ -597,7 +607,55 @@
|
|
|
<el-button @click="resultDialogVisible = false">关闭</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <!-- 修改沟通内容弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ title="修改沟通内容"
|
|
|
+ :visible.sync="editContentDialogVisible"
|
|
|
+ width="500px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ ref="editContentForm"
|
|
|
+ :model="editContentForm"
|
|
|
+ :rules="editContentRules"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="沟通内容" prop="interflowContent">
|
|
|
+ <el-input
|
|
|
+ v-model="editContentForm.interflowContent"
|
|
|
+ type="textarea"
|
|
|
+ :rows="6"
|
|
|
+ placeholder="请输入沟通内容"
|
|
|
+ maxlength="500"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="editContentDialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitEditContent" :loading="editContentLoading">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 沟通内容详情弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ title="沟通内容详情"
|
|
|
+ :visible.sync="showContentDialogVisible"
|
|
|
+ width="500px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <div class="content-detail">
|
|
|
+ <div class="content-section">
|
|
|
+ <div class="content-text">
|
|
|
+ {{ showContentDetail || '暂无沟通内容' }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showContentDialogVisible = false">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -640,6 +698,7 @@ export default {
|
|
|
scheduleTime: [], // 改为数组
|
|
|
createTime: [], // 改为数组
|
|
|
updateTime: [], // 改为数组
|
|
|
+ finishTime:null,
|
|
|
qecCreateTime: [], // 改为数组
|
|
|
periodTime: [], // 改为数组
|
|
|
|
|
|
@@ -780,6 +839,8 @@ export default {
|
|
|
periodETime:null,
|
|
|
scheduleStartTime: null,
|
|
|
scheduleEndTime: null,
|
|
|
+ finishSTime:null,
|
|
|
+ finishETime:null,
|
|
|
sendType:process.env.VUE_APP_COURSE_DEFAULT,
|
|
|
isVip: null,
|
|
|
sopId: null, // sopId
|
|
|
@@ -809,6 +870,21 @@ export default {
|
|
|
pageSize: 10
|
|
|
},
|
|
|
qwUserOptionsLoading: false,
|
|
|
+
|
|
|
+ editContentDialogVisible: false, // 弹窗显示状态
|
|
|
+ editContentLoading: false, // 提交加载状态
|
|
|
+ editContentForm: {
|
|
|
+ logId: null,
|
|
|
+ interflowContent: ''
|
|
|
+ },
|
|
|
+ editContentRules: {
|
|
|
+ interflowContent: [
|
|
|
+ { required: true, message: '沟通内容不能为空', trigger: 'blur' },
|
|
|
+ { max: 500, message: '长度不能超过500个字符', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ showContentDialogVisible: false, // 详情弹窗显示状态
|
|
|
+ showContentDetail: '' // 沟通内容详情
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -1101,7 +1177,23 @@ export default {
|
|
|
this.queryParams.upETime = null;
|
|
|
}
|
|
|
},
|
|
|
+ finishTimeChange(finishTime){
|
|
|
+ if (finishTime && finishTime.length >= 2) {
|
|
|
+ if(!this.checkDateRangeLimit(finishTime)){
|
|
|
+ this.finishTime = null;
|
|
|
+ this.queryParams.finishSTime=null;
|
|
|
+ this.queryParams.finishETime=null;
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
+ this.queryParams.finishSTime = finishTime[0] || null;
|
|
|
+ this.queryParams.finishETime = finishTime[1] || null;
|
|
|
+ } else {
|
|
|
+ this.finishTime = [];
|
|
|
+ this.queryParams.finishSTime = null;
|
|
|
+ this.queryParams.finishETime = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
// 进线时间
|
|
|
qecCreateTimeChange(qecCreateTime) {
|
|
|
if (qecCreateTime && qecCreateTime.length >= 2) {
|
|
|
@@ -1219,8 +1311,9 @@ export default {
|
|
|
// xgb 看课数据量太大必须限制时间
|
|
|
if (this.isEmptyArray(this.createTimeText) &&
|
|
|
this.isEmptyArray(this.updateTimeText) &&
|
|
|
- this.isEmptyArray(this.scheduleTimeText)) {
|
|
|
- this.$message.warning('请选择创建时间或营期时间或最新更新时间');
|
|
|
+ this.isEmptyArray(this.scheduleTimeText) &&
|
|
|
+ this.isEmptyArray(this.finishTime)) {
|
|
|
+ this.$message.warning('请选择创建时间或营期时间或最新更新时间或完课时间');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1255,6 +1348,7 @@ export default {
|
|
|
externalUserName:null,
|
|
|
duration: null,
|
|
|
qwUserId: null,
|
|
|
+ finishTime:null,
|
|
|
companyUserId: null,
|
|
|
companyId: null,
|
|
|
courseId: null,
|
|
|
@@ -1292,8 +1386,9 @@ export default {
|
|
|
this.queryParams.scheduleStartTime = null;
|
|
|
this.queryParams.scheduleEndTime = null;
|
|
|
this.queryParams.sopId = null; // 重置SOP ID
|
|
|
-
|
|
|
-
|
|
|
+ this.queryParams.finishSTime = null;
|
|
|
+ this.queryParams.finishETime = null;
|
|
|
+ this.finishTime=null;
|
|
|
// 重置SOP搜索
|
|
|
this.handleSopClear();
|
|
|
|
|
|
@@ -1365,8 +1460,9 @@ export default {
|
|
|
// xgb 看课数据量太大必须限制时间
|
|
|
if (this.isEmptyArray(this.createTimeText) &&
|
|
|
this.isEmptyArray(this.updateTimeText) &&
|
|
|
- this.isEmptyArray(this.scheduleTimeText)) {
|
|
|
- this.$message.warning('请选择创建时间或营期时间或最新更新时间');
|
|
|
+ this.isEmptyArray(this.scheduleTimeText) &&
|
|
|
+ this.isEmptyArray(this.finishTime)) {
|
|
|
+ this.$message.warning('请选择创建时间或营期时间或最新更新时间或完课时间');
|
|
|
return;
|
|
|
}
|
|
|
const queryParams = this.queryParams;
|
|
|
@@ -1382,7 +1478,66 @@ export default {
|
|
|
this.exportLoading = false;
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 修改沟通内容
|
|
|
+ * @param row 当前行数据
|
|
|
+ */
|
|
|
+ editInterflowContentFun(row) {
|
|
|
+ this.editContentForm = {
|
|
|
+ logId: row.logId,
|
|
|
+ interflowContent: row.interflowContent || ''
|
|
|
+ };
|
|
|
+
|
|
|
+ this.editContentDialogVisible = true;
|
|
|
+
|
|
|
+ // 清空表单验证
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.editContentForm) {
|
|
|
+ this.$refs.editContentForm.clearValidate();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 查看沟通内容详情
|
|
|
+ * @param row 当前行数据
|
|
|
+ */
|
|
|
+ showInterflowContentFun(row) {
|
|
|
+ console.log('查看沟通内容详情:', row.logId, row.interflowContent);
|
|
|
|
|
|
+ // 设置沟通内容详情
|
|
|
+ this.showContentDetail = row.interflowContent || '暂无沟通内容';
|
|
|
+
|
|
|
+ // 打开弹窗
|
|
|
+ this.showContentDialogVisible = true;
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 提交修改沟通内容
|
|
|
+ */
|
|
|
+ submitEditContent() {
|
|
|
+ this.$refs.editContentForm.validate(valid => {
|
|
|
+ if (!valid) return;
|
|
|
+
|
|
|
+ this.editContentLoading = true;
|
|
|
+
|
|
|
+ // 调用后端API更新沟通内容
|
|
|
+ updateCourseWatchLog({
|
|
|
+ logId: this.editContentForm.logId,
|
|
|
+ interflowContent: this.editContentForm.interflowContent
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ this.$message.success('修改成功');
|
|
|
+ this.editContentDialogVisible = false;
|
|
|
+ this.getList(); // 刷新列表
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ console.error('修改失败:', error);
|
|
|
+ this.$message.error('修改失败');
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.editContentLoading = false;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
openAnswerLogFun(row) {
|
|
|
this.openAnswerLog = true;
|
|
|
this.answerLogQueryParams.watchLogId = row.logId;
|
|
|
@@ -1752,4 +1907,39 @@ export default {
|
|
|
background: rgba(0, 0, 0, 0.2);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
+
|
|
|
+.content-detail {
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.content-section {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.content-text {
|
|
|
+ padding: 12px;
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ border-radius: 4px;
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
+ line-height: 1.6;
|
|
|
+ min-height: 100px;
|
|
|
+ max-height: 300px;
|
|
|
+ overflow-y: auto;
|
|
|
+ white-space: pre-wrap; /* 保留换行和空格 */
|
|
|
+ word-break: break-word; /* 自动换行 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 美化滚动条 */
|
|
|
+.content-text::-webkit-scrollbar {
|
|
|
+ width: 6px;
|
|
|
+}
|
|
|
+
|
|
|
+.content-text::-webkit-scrollbar-thumb {
|
|
|
+ background: #c0c4cc;
|
|
|
+ border-radius: 3px;
|
|
|
+}
|
|
|
+
|
|
|
+.content-text::-webkit-scrollbar-track {
|
|
|
+ background: #f5f7fa;
|
|
|
+}
|
|
|
</style>
|