|
@@ -118,6 +118,10 @@
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['course:userCourseVideo:remove']">删除
|
|
v-hasPermi="['course:userCourseVideo:remove']">删除
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button size="mini"
|
|
|
|
|
+ type="text" v-if="projectFrom === 'myhk'" @click="openXsyDialog(scope.row)">
|
|
|
|
|
+ 复制参数
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -514,6 +518,29 @@
|
|
|
<el-button @click="cancelEditCoverForm">取 消</el-button>
|
|
<el-button @click="cancelEditCoverForm">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 销售易参数弹窗 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="复制销售易参数"
|
|
|
|
|
+ :visible.sync="xsyDialogVisible"
|
|
|
|
|
+ width="500px"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ >
|
|
|
|
|
+ <div style="margin-bottom: 20px;">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="xsyParams"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :rows="3"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ placeholder="参数将显示在这里"
|
|
|
|
|
+ class="xsy-textarea"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="xsyDialogVisible = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="copyXsyParams">复制参数</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -589,6 +616,7 @@ export default {
|
|
|
open: false,
|
|
open: false,
|
|
|
uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadOSS",
|
|
uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadOSS",
|
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
|
|
+ projectFrom:process.env.VUE_APP_PROJECT,
|
|
|
typeOptions: [],
|
|
typeOptions: [],
|
|
|
files: [],
|
|
files: [],
|
|
|
fileList: [],
|
|
fileList: [],
|
|
@@ -698,7 +726,10 @@ export default {
|
|
|
{required: true, message: "视频封面不能为空", trigger: "change"}
|
|
{required: true, message: "视频封面不能为空", trigger: "change"}
|
|
|
],
|
|
],
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ // 销售易弹窗
|
|
|
|
|
+ xsyDialogVisible: false,
|
|
|
|
|
+ xsyParams: '',
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -1445,6 +1476,56 @@ export default {
|
|
|
thumbnail: null,
|
|
thumbnail: null,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 复制销售易链接
|
|
|
|
|
+ openXsyDialog(row) {
|
|
|
|
|
+ // 构建JSON字符串
|
|
|
|
|
+ const courseData = {
|
|
|
|
|
+ videoId: row.videoId,
|
|
|
|
|
+ courseId: row.courseId,
|
|
|
|
|
+ companyId: 0
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ this.xsyParams = `pages_course/videoxsy?course=${JSON.stringify(courseData)}`;
|
|
|
|
|
+ this.xsyDialogVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ // 复制销售易参数
|
|
|
|
|
+ copyXsyParams() {
|
|
|
|
|
+ this.copyLink(this.xsyParams);
|
|
|
|
|
+ },
|
|
|
|
|
+ copyLink(url) {
|
|
|
|
|
+ const link = url;
|
|
|
|
|
+ // navigator clipboard 需要https等安全上下文
|
|
|
|
|
+ if (navigator.clipboard && window.isSecureContext) {
|
|
|
|
|
+ // navigator clipboard 向剪贴板写文本
|
|
|
|
|
+ navigator.clipboard.writeText(link).then(() => {
|
|
|
|
|
+ this.$message.success('链接已复制到剪贴板');
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // document.execCommand('copy') 向剪贴板写文本
|
|
|
|
|
+ let input = document.createElement('input')
|
|
|
|
|
+ input.style.position = 'fixed'
|
|
|
|
|
+ input.style.top = '-10000px'
|
|
|
|
|
+ input.style.zIndex = '-999'
|
|
|
|
|
+ document.body.appendChild(input)
|
|
|
|
|
+ input.value = link
|
|
|
|
|
+ input.focus()
|
|
|
|
|
+ input.select()
|
|
|
|
|
+ try {
|
|
|
|
|
+ let result = document.execCommand('copy')
|
|
|
|
|
+ document.body.removeChild(input)
|
|
|
|
|
+ if (!result || result === 'unsuccessful') {
|
|
|
|
|
+ this.$message.error('复制失败');
|
|
|
|
|
+ console.log('复制失败')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.success('链接已复制到剪贴板');
|
|
|
|
|
+ console.log('复制成功')
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ document.body.removeChild(input)
|
|
|
|
|
+ alert('当前浏览器不支持复制功能,请检查更新或更换其他浏览器操作')
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1455,6 +1536,10 @@ export default {
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
}
|
|
}
|
|
|
|
|
+.xsy-textarea >>> .el-textarea__inner {
|
|
|
|
|
+ background-color: #f5f5f5 !important;
|
|
|
|
|
+ resize: none !important;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|
|
|
<style>
|
|
<style>
|
|
|
.avatar-uploader .el-upload {
|
|
.avatar-uploader .el-upload {
|