|
@@ -284,6 +284,7 @@
|
|
|
v-model="content.videoUrl"
|
|
v-model="content.videoUrl"
|
|
|
class="avatar-uploader"
|
|
class="avatar-uploader"
|
|
|
:action="uploadUrl"
|
|
:action="uploadUrl"
|
|
|
|
|
+ :headers="uploadHeaders"
|
|
|
:show-file-list="false"
|
|
:show-file-list="false"
|
|
|
:on-success="(res, file) => handleSuccessVideo(res, file, content)"
|
|
:on-success="(res, file) => handleSuccessVideo(res, file, content)"
|
|
|
:before-upload="beforeUploadVideo"
|
|
:before-upload="beforeUploadVideo"
|
|
@@ -813,11 +814,12 @@ import {courseList, videoList} from "@/api/app/course";
|
|
|
import { getPackageOptions,} from "@/api/app/pkg";
|
|
import { getPackageOptions,} from "@/api/app/pkg";
|
|
|
import { groupSendMessage, } from '@/api/app/userLogs'
|
|
import { groupSendMessage, } from '@/api/app/userLogs'
|
|
|
// import { getLiveOptions,} from "@/api/app/live";
|
|
// import { getLiveOptions,} from "@/api/app/live";
|
|
|
-import { getMedicinesOptions, } from "@/api/app/medicines";
|
|
|
|
|
-import { getProductOptions, } from "@/api/app/product";
|
|
|
|
|
-import { getShortVideoOptions, } from "@/api/app/shortVideo";
|
|
|
|
|
|
|
+// import { getMedicinesOptions, } from "@/api/app/medicines";
|
|
|
|
|
+// import { getProductOptions, } from "@/api/app/product";
|
|
|
|
|
+// import { getShortVideoOptions, } from "@/api/app/shortVideo";
|
|
|
import { getArticleOptions } from "@/api/app/article";
|
|
import { getArticleOptions } from "@/api/app/article";
|
|
|
import { getOpenClassVideoOptions, } from "@/api/app/openClassVideo";
|
|
import { getOpenClassVideoOptions, } from "@/api/app/openClassVideo";
|
|
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "sendMsgOpenTool",
|
|
name: "sendMsgOpenTool",
|
|
@@ -826,6 +828,9 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
uploadUrl: process.env.VUE_APP_BASE_API + "/app/common/uploadOSS2",
|
|
uploadUrl: process.env.VUE_APP_BASE_API + "/app/common/uploadOSS2",
|
|
|
uploadUrlByVoice: process.env.VUE_APP_BASE_API + "/app/common/uploadOSSByHOOKVoice",
|
|
uploadUrlByVoice: process.env.VUE_APP_BASE_API + "/app/common/uploadOSSByHOOKVoice",
|
|
|
|
|
+ uploadHeaders: {
|
|
|
|
|
+ Authorization: "Bearer " + getToken(),
|
|
|
|
|
+ },
|
|
|
// 遮罩层
|
|
// 遮罩层
|
|
|
loading: false,
|
|
loading: false,
|
|
|
courseLoading: false,
|
|
courseLoading: false,
|
|
@@ -881,8 +886,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
async created() {
|
|
async created() {
|
|
|
|
|
+ const disabledContentTypes = ['21', '22', '23', '24'];
|
|
|
this.getDicts("app_sop_plugin_settingType").then(response => {
|
|
this.getDicts("app_sop_plugin_settingType").then(response => {
|
|
|
- this.sysQwSopAiContentType = response.data;
|
|
|
|
|
|
|
+ this.sysQwSopAiContentType = response.data.filter(
|
|
|
|
|
+ item => !disabledContentTypes.includes(String(item.dictValue))
|
|
|
|
|
+ );
|
|
|
|
|
+ // this.sysQwSopAiContentType = response.data;
|
|
|
});
|
|
});
|
|
|
this.getDicts("app_sop_watch_status").then(response => {
|
|
this.getDicts("app_sop_watch_status").then(response => {
|
|
|
this.sysFsSopWatchStatus = response.data;
|
|
this.sysFsSopWatchStatus = response.data;
|
|
@@ -890,30 +899,45 @@ export default {
|
|
|
const [
|
|
const [
|
|
|
courseInfo,
|
|
courseInfo,
|
|
|
defaultPkg,
|
|
defaultPkg,
|
|
|
- defaultLive,
|
|
|
|
|
- defaultProduct,
|
|
|
|
|
- defaultMedicines,
|
|
|
|
|
- defaultShortVideo,
|
|
|
|
|
defaultArticle,
|
|
defaultArticle,
|
|
|
defaultOpenClassVideo,
|
|
defaultOpenClassVideo,
|
|
|
] = await Promise.all([
|
|
] = await Promise.all([
|
|
|
courseList(),
|
|
courseList(),
|
|
|
this.getPkgList(null, null),
|
|
this.getPkgList(null, null),
|
|
|
- this.getLiveList(),
|
|
|
|
|
- this.getProductList(null, null),
|
|
|
|
|
- this.getMedicinesList(null, null),
|
|
|
|
|
- this.getShortVideoList(null, null),
|
|
|
|
|
this.getArticleList(null, null),
|
|
this.getArticleList(null, null),
|
|
|
this.getOpenClassVideoList(null, null),
|
|
this.getOpenClassVideoList(null, null),
|
|
|
]);
|
|
]);
|
|
|
this.courseList = courseInfo.list;
|
|
this.courseList = courseInfo.list;
|
|
|
this.pkgList = defaultPkg.data;
|
|
this.pkgList = defaultPkg.data;
|
|
|
- this.liveList = defaultLive.data;
|
|
|
|
|
- this.productList = defaultProduct.data;
|
|
|
|
|
- this.medicinesList = defaultMedicines.data;
|
|
|
|
|
- this.shortVideoList = defaultShortVideo.data;
|
|
|
|
|
this.articleList = defaultArticle.data;
|
|
this.articleList = defaultArticle.data;
|
|
|
this.openClassVideoList = defaultOpenClassVideo.data;
|
|
this.openClassVideoList = defaultOpenClassVideo.data;
|
|
|
|
|
+ // const [
|
|
|
|
|
+ // courseInfo,
|
|
|
|
|
+ // defaultPkg,
|
|
|
|
|
+ // defaultLive,
|
|
|
|
|
+ // defaultProduct,
|
|
|
|
|
+ // defaultMedicines,
|
|
|
|
|
+ // defaultShortVideo,
|
|
|
|
|
+ // defaultArticle,
|
|
|
|
|
+ // defaultOpenClassVideo,
|
|
|
|
|
+ // ] = await Promise.all([
|
|
|
|
|
+ // courseList(),
|
|
|
|
|
+ // this.getPkgList(null, null),
|
|
|
|
|
+ // this.getLiveList(),
|
|
|
|
|
+ // this.getProductList(null, null),
|
|
|
|
|
+ // this.getMedicinesList(null, null),
|
|
|
|
|
+ // this.getShortVideoList(null, null),
|
|
|
|
|
+ // this.getArticleList(null, null),
|
|
|
|
|
+ // this.getOpenClassVideoList(null, null),
|
|
|
|
|
+ // ]);
|
|
|
|
|
+ // this.courseList = courseInfo.list;
|
|
|
|
|
+ // this.pkgList = defaultPkg.data;
|
|
|
|
|
+ // this.liveList = defaultLive.data;
|
|
|
|
|
+ // this.productList = defaultProduct.data;
|
|
|
|
|
+ // this.medicinesList = defaultMedicines.data;
|
|
|
|
|
+ // this.shortVideoList = defaultShortVideo.data;
|
|
|
|
|
+ // this.articleList = defaultArticle.data;
|
|
|
|
|
+ // this.openClassVideoList = defaultOpenClassVideo.data;
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
visible: {
|
|
visible: {
|
|
@@ -1294,7 +1318,8 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
beforeUploadVideo(file){
|
|
beforeUploadVideo(file){
|
|
|
const isLt30M = file.size / 1024 / 1024 < 10;
|
|
const isLt30M = file.size / 1024 / 1024 < 10;
|
|
|
- const isMP4 = file.type === 'video/mp4';
|
|
|
|
|
|
|
+ const fileName = (file.name || '').toLowerCase();
|
|
|
|
|
+ const isMP4 = file.type === 'video/mp4' || fileName.endsWith('.mp4');
|
|
|
if (!isMP4) {
|
|
if (!isMP4) {
|
|
|
this.$message.error('仅支持上传 MP4 格式的视频文件!');
|
|
this.$message.error('仅支持上传 MP4 格式的视频文件!');
|
|
|
return false;
|
|
return false;
|
|
@@ -1480,51 +1505,51 @@ export default {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- //民品
|
|
|
|
|
- else if(item.contentType == 22) {
|
|
|
|
|
- if (!item.productId) {
|
|
|
|
|
- this.$set(item, 'meta', {
|
|
|
|
|
- productLoading: false,
|
|
|
|
|
- productList: this.productList,
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- let productList = await this.getProductList(null, item.productId);
|
|
|
|
|
- this.$set(item, 'meta', {
|
|
|
|
|
- productLoading: false,
|
|
|
|
|
- productList: productList.data,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- //药品
|
|
|
|
|
- else if(item.contentType == 23) {
|
|
|
|
|
- if (!item.medicinesId) {
|
|
|
|
|
- this.$set(item, 'meta', {
|
|
|
|
|
- medicinesLoading: false,
|
|
|
|
|
- medicinesList: this.medicinesList,
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- let medicinesList = await this.getMedicinesList(null, item.medicinesId);
|
|
|
|
|
- this.$set(item, 'meta', {
|
|
|
|
|
- medicinesLoading: false,
|
|
|
|
|
- medicinesList: medicinesList.data,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- //短视频
|
|
|
|
|
- else if(item.contentType == 24) {
|
|
|
|
|
- if (!item.shortVideoId) {
|
|
|
|
|
- this.$set(item, 'meta', {
|
|
|
|
|
- shortVideoLoading: false,
|
|
|
|
|
- shortVideoList: this.shortVideoList,
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- let shortVideoList = await this.getShortVideoList(null, item.shortVideoId);
|
|
|
|
|
- this.$set(item, 'meta', {
|
|
|
|
|
- shortVideoLoading: false,
|
|
|
|
|
- shortVideoList: shortVideoList.data,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // //民品
|
|
|
|
|
+ // else if(item.contentType == 22) {
|
|
|
|
|
+ // if (!item.productId) {
|
|
|
|
|
+ // this.$set(item, 'meta', {
|
|
|
|
|
+ // productLoading: false,
|
|
|
|
|
+ // productList: this.productList,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // let productList = await this.getProductList(null, item.productId);
|
|
|
|
|
+ // this.$set(item, 'meta', {
|
|
|
|
|
+ // productLoading: false,
|
|
|
|
|
+ // productList: productList.data,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // //药品
|
|
|
|
|
+ // else if(item.contentType == 23) {
|
|
|
|
|
+ // if (!item.medicinesId) {
|
|
|
|
|
+ // this.$set(item, 'meta', {
|
|
|
|
|
+ // medicinesLoading: false,
|
|
|
|
|
+ // medicinesList: this.medicinesList,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // let medicinesList = await this.getMedicinesList(null, item.medicinesId);
|
|
|
|
|
+ // this.$set(item, 'meta', {
|
|
|
|
|
+ // medicinesLoading: false,
|
|
|
|
|
+ // medicinesList: medicinesList.data,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // //短视频
|
|
|
|
|
+ // else if(item.contentType == 24) {
|
|
|
|
|
+ // if (!item.shortVideoId) {
|
|
|
|
|
+ // this.$set(item, 'meta', {
|
|
|
|
|
+ // shortVideoLoading: false,
|
|
|
|
|
+ // shortVideoList: this.shortVideoList,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // let shortVideoList = await this.getShortVideoList(null, item.shortVideoId);
|
|
|
|
|
+ // this.$set(item, 'meta', {
|
|
|
|
|
+ // shortVideoLoading: false,
|
|
|
|
|
+ // shortVideoList: shortVideoList.data,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
//文章
|
|
//文章
|
|
|
else if(item.contentType == 25) {
|
|
else if(item.contentType == 25) {
|
|
|
if (!item.articleId) {
|
|
if (!item.articleId) {
|
|
@@ -1605,18 +1630,18 @@ export default {
|
|
|
if ([20].includes(Number(dcs.contentType)) && this.isEmpty(dcs.packageId)) {
|
|
if ([20].includes(Number(dcs.contentType)) && this.isEmpty(dcs.packageId)) {
|
|
|
return this.$message.error("疗法不能为空");
|
|
return this.$message.error("疗法不能为空");
|
|
|
}
|
|
}
|
|
|
- if ([21].includes(Number(dcs.contentType)) && this.isEmpty(dcs.liveId)) {
|
|
|
|
|
- return this.$message.error("直播间不能为空");
|
|
|
|
|
- }
|
|
|
|
|
- if ([22].includes(Number(dcs.contentType)) && this.isEmpty(dcs.productId)) {
|
|
|
|
|
- return this.$message.error("民品不能为空");
|
|
|
|
|
- }
|
|
|
|
|
- if ([23].includes(Number(dcs.contentType)) && this.isEmpty(dcs.medicinesId)) {
|
|
|
|
|
- return this.$message.error("药品不能为空");
|
|
|
|
|
- }
|
|
|
|
|
- if ([24].includes(Number(dcs.contentType)) && this.isEmpty(dcs.shortVideoId)) {
|
|
|
|
|
- return this.$message.error("短视频不能为空");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if ([21].includes(Number(dcs.contentType)) && this.isEmpty(dcs.liveId)) {
|
|
|
|
|
+ // return this.$message.error("直播间不能为空");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if ([22].includes(Number(dcs.contentType)) && this.isEmpty(dcs.productId)) {
|
|
|
|
|
+ // return this.$message.error("民品不能为空");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if ([23].includes(Number(dcs.contentType)) && this.isEmpty(dcs.medicinesId)) {
|
|
|
|
|
+ // return this.$message.error("药品不能为空");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if ([24].includes(Number(dcs.contentType)) && this.isEmpty(dcs.shortVideoId)) {
|
|
|
|
|
+ // return this.$message.error("短视频不能为空");
|
|
|
|
|
+ // }
|
|
|
if ([25].includes(Number(dcs.contentType)) && this.isEmpty(dcs.articleId)) {
|
|
if ([25].includes(Number(dcs.contentType)) && this.isEmpty(dcs.articleId)) {
|
|
|
return this.$message.error("文章不能为空");
|
|
return this.$message.error("文章不能为空");
|
|
|
}
|
|
}
|