|
@@ -54,14 +54,20 @@
|
|
|
@click="updateMoney(scope.row)"
|
|
@click="updateMoney(scope.row)"
|
|
|
>设置红包金额</el-button>
|
|
>设置红包金额</el-button>
|
|
|
|
|
|
|
|
- <el-button size="mini"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ @click="openFeishuManualDialog(scope.row)"
|
|
|
|
|
+ >飞书链接</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <el-button size="mini"
|
|
|
type="text" @click="openTagDialog(scope.row)">
|
|
type="text" @click="openTagDialog(scope.row)">
|
|
|
绑定看课标签
|
|
绑定看课标签
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button size="mini"
|
|
<el-button size="mini"
|
|
|
type="text" v-if="projectFrom === 'hzyy'" @click="openDialog(scope.row)">
|
|
type="text" v-if="projectFrom === 'hzyy'" @click="openDialog(scope.row)">
|
|
|
复制看课链接
|
|
复制看课链接
|
|
|
- </el-button>
|
|
|
|
|
|
|
+ </el-button> -->
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -99,7 +105,6 @@
|
|
|
@close="resetRoomForm"
|
|
@close="resetRoomForm"
|
|
|
append-to-body>
|
|
append-to-body>
|
|
|
<el-form :model="roomLinkForm" label-width="120px">
|
|
<el-form :model="roomLinkForm" label-width="120px">
|
|
|
- <!-- 新增下拉框 -->
|
|
|
|
|
<el-form-item label="销售企微选择">
|
|
<el-form-item label="销售企微选择">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="roomLinkForm.qwUserId"
|
|
v-model="roomLinkForm.qwUserId"
|
|
@@ -120,6 +125,35 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ :visible.sync="feishuManualOpen"
|
|
|
|
|
+ :title="'飞书链接 - ' + (feishuManualRow ? feishuManualRow.title : '')"
|
|
|
|
|
+ width="560px"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="feishu-manual-single">
|
|
|
|
|
+ <el-input :value="feishuManualLink || ''" readonly placeholder="点击生成获取飞书链接" size="small"/>
|
|
|
|
|
+ <div class="feishu-manual-actions">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="!feishuManualLink"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :loading="feishuLinkLoading"
|
|
|
|
|
+ @click="handleGenerateFeishuLink"
|
|
|
|
|
+ >生成</el-button>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <el-button size="mini" type="text" @click="copyLink(feishuManualLink)">复制</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ :loading="feishuLinkLoading"
|
|
|
|
|
+ @click="handleRegenerateFeishuLink"
|
|
|
|
|
+ >重新生成</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<AutoTagDialog
|
|
<AutoTagDialog
|
|
|
:visible.sync="tagDialogVisible"
|
|
:visible.sync="tagDialogVisible"
|
|
|
:title="tagDialogTitle"
|
|
:title="tagDialogTitle"
|
|
@@ -133,7 +167,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import {getVideoListByCourseId, updatePacketMoney, updateUserCourseVideoUpdate} from "@/api/course/userCourseVideo";
|
|
import {getVideoListByCourseId, updatePacketMoney, updateUserCourseVideoUpdate} from "@/api/course/userCourseVideo";
|
|
|
import userCourseVideoDetails from '../../components/course/userCourseVideoDetails.vue';
|
|
import userCourseVideoDetails from '../../components/course/userCourseVideoDetails.vue';
|
|
|
-import {createLinkUrl, createRoomLinkUrl, queryQwIds} from "@/api/course/sopCourseLink";
|
|
|
|
|
|
|
+import {createLinkUrl, createRoomLinkUrl, createFeishuLinkUrl, queryQwIds} from "@/api/course/sopCourseLink";
|
|
|
import AutoTagDialog from "@/views/components/tag/AutoTagDialog.vue";
|
|
import AutoTagDialog from "@/views/components/tag/AutoTagDialog.vue";
|
|
|
import {addTag, updateTag} from "@/api/tag/api";
|
|
import {addTag, updateTag} from "@/api/tag/api";
|
|
|
|
|
|
|
@@ -183,6 +217,10 @@ export default {
|
|
|
title:null,
|
|
title:null,
|
|
|
},
|
|
},
|
|
|
dialogVisible: false, // 控制弹框显示
|
|
dialogVisible: false, // 控制弹框显示
|
|
|
|
|
+ feishuManualOpen: false,
|
|
|
|
|
+ feishuManualRow: null,
|
|
|
|
|
+ feishuManualLink: '',
|
|
|
|
|
+ feishuLinkLoading: false,
|
|
|
//短链
|
|
//短链
|
|
|
sortLink:'',
|
|
sortLink:'',
|
|
|
//课题
|
|
//课题
|
|
@@ -294,7 +332,7 @@ export default {
|
|
|
this.tagGroups = [];
|
|
this.tagGroups = [];
|
|
|
this.tagsInGroup = [];
|
|
this.tagsInGroup = [];
|
|
|
},
|
|
},
|
|
|
- // 打开弹框
|
|
|
|
|
|
|
+ // 打开弹框(复制看课链接)
|
|
|
openDialog(row) {
|
|
openDialog(row) {
|
|
|
if (!this.fetchingQwIds) {
|
|
if (!this.fetchingQwIds) {
|
|
|
this.fetchingQwIds = true;
|
|
this.fetchingQwIds = true;
|
|
@@ -304,20 +342,50 @@ export default {
|
|
|
}
|
|
}
|
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
this.fetchingQwIds = false;
|
|
this.fetchingQwIds = false;
|
|
|
- // 在请求完成后再显示弹框
|
|
|
|
|
this.showDialog(row);
|
|
this.showDialog(row);
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- // 如果已经在请求中,直接显示弹框
|
|
|
|
|
this.showDialog(row);
|
|
this.showDialog(row);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ openFeishuManualDialog(row) {
|
|
|
|
|
+ this.feishuManualRow = row;
|
|
|
|
|
+ this.feishuManualLink = '';
|
|
|
|
|
+ this.feishuManualOpen = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ handleGenerateFeishuLink() {
|
|
|
|
|
+ this.generateFeishuLink();
|
|
|
|
|
+ },
|
|
|
|
|
+ handleRegenerateFeishuLink() {
|
|
|
|
|
+ this.$confirm('将生成新的飞书链接,确认继续?', '提示', { type: 'warning' })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.generateFeishuLink();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ generateFeishuLink() {
|
|
|
|
|
+ if (!this.feishuManualRow || this.feishuLinkLoading) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.feishuLinkLoading = true;
|
|
|
|
|
+ createFeishuLinkUrl({
|
|
|
|
|
+ courseId: this.feishuManualRow.courseId,
|
|
|
|
|
+ videoId: this.feishuManualRow.videoId,
|
|
|
|
|
+ title: this.feishuManualRow.title
|
|
|
|
|
+ }).then(response => {
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
|
+ this.feishuManualLink = response.link;
|
|
|
|
|
+ this.msgSuccess('生成成功');
|
|
|
|
|
+ }
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ this.feishuLinkLoading = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
// 新增方法:显示弹框
|
|
// 新增方法:显示弹框
|
|
|
showDialog(row) {
|
|
showDialog(row) {
|
|
|
this.roomLinkForm.courseId = row.courseId;
|
|
this.roomLinkForm.courseId = row.courseId;
|
|
|
this.roomLinkForm.videoId = row.videoId;
|
|
this.roomLinkForm.videoId = row.videoId;
|
|
|
this.roomLinkForm.title = row.title;
|
|
this.roomLinkForm.title = row.title;
|
|
|
-
|
|
|
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
|
},
|
|
},
|
|
|
// 确认按钮操作
|
|
// 确认按钮操作
|
|
@@ -326,24 +394,17 @@ export default {
|
|
|
this.$message.error("请选择销售企微!");
|
|
this.$message.error("请选择销售企微!");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- // 获取选中的用户信息
|
|
|
|
|
const selectedUser = this.qwUserList.find(user => user.id === this.roomLinkForm.qwUserId);
|
|
const selectedUser = this.qwUserList.find(user => user.id === this.roomLinkForm.qwUserId);
|
|
|
if (selectedUser) {
|
|
if (selectedUser) {
|
|
|
- // 将用户信息填充到表单中
|
|
|
|
|
this.roomLinkForm.qwUserName = selectedUser.qwUserName;
|
|
this.roomLinkForm.qwUserName = selectedUser.qwUserName;
|
|
|
this.roomLinkForm.corpId = selectedUser.corpId;
|
|
this.roomLinkForm.corpId = selectedUser.corpId;
|
|
|
- console.log(this.roomLinkForm);
|
|
|
|
|
- // 调用创建链接的API
|
|
|
|
|
createRoomLinkUrl(this.roomLinkForm).then(response => {
|
|
createRoomLinkUrl(this.roomLinkForm).then(response => {
|
|
|
if (response.code === 200){
|
|
if (response.code === 200){
|
|
|
this.msgSuccess("创建成功");
|
|
this.msgSuccess("创建成功");
|
|
|
this.copyLink(response.link);
|
|
this.copyLink(response.link);
|
|
|
- console.log(response.link);
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // 关闭弹框
|
|
|
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
|
},
|
|
},
|
|
|
// 重置表单
|
|
// 重置表单
|
|
@@ -360,7 +421,7 @@ export default {
|
|
|
courseId:null,
|
|
courseId:null,
|
|
|
videoId:null,
|
|
videoId:null,
|
|
|
qwUserId:null,
|
|
qwUserId:null,
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
handleCreateLink(){
|
|
handleCreateLink(){
|
|
|
createLinkUrl(this.linkForm).then(response => {
|
|
createLinkUrl(this.linkForm).then(response => {
|
|
@@ -545,4 +606,11 @@ export default {
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .feishu-manual-single .el-input {
|
|
|
|
|
+ margin-bottom: 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .feishu-manual-actions {
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|