From 34c22c101322c159611d8bc523b59830f2df318d Mon Sep 17 00:00:00 2001
From: "382696293@qq.com" <382696293@qq.com>
Date: Fri, 15 Mar 2024 14:11:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=AE=A1=E7=90=86=EF=BC=8CFR?=
=?UTF-8?q?200=20=E6=96=B0=E5=A2=9E=E6=AD=A5=E9=AA=A4=E4=B8=80=E8=A7=86?=
=?UTF-8?q?=E9=A2=91=EF=BC=8C=E6=AD=A5=E9=AA=A4=E4=BA=8C=E8=A7=86=E9=A2=91?=
=?UTF-8?q?=EF=BC=8C=E6=AD=A5=E9=AA=A4=E4=B8=89=E8=A7=86=E9=A2=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/core/domain/entity/WxMode.java | 30 ++++
.../main/resources/mapper/WxModeMapper.xml | 25 ++-
flossom-ui/src/views/system/mode/index.vue | 150 +++++++++++++++++-
3 files changed, 198 insertions(+), 7 deletions(-)
diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxMode.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxMode.java
index 234f0a8..0b3e4c7 100644
--- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxMode.java
+++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxMode.java
@@ -111,6 +111,12 @@ public class WxMode extends BaseEntity
private Integer isNew;
+ private String stepOneVideo;
+
+ private String stepTwoVideo;
+
+ private String stepThreeVideo;
+
public void setId(Long id)
{
@@ -336,6 +342,30 @@ public class WxMode extends BaseEntity
this.effectContent = effectContent;
}
+ public String getStepOneVideo() {
+ return stepOneVideo;
+ }
+
+ public void setStepOneVideo(String stepOneVideo) {
+ this.stepOneVideo = stepOneVideo;
+ }
+
+ public String getStepTwoVideo() {
+ return stepTwoVideo;
+ }
+
+ public void setStepTwoVideo(String stepTwoVideo) {
+ this.stepTwoVideo = stepTwoVideo;
+ }
+
+ public String getStepThreeVideo() {
+ return stepThreeVideo;
+ }
+
+ public void setStepThreeVideo(String stepThreeVideo) {
+ this.stepThreeVideo = stepThreeVideo;
+ }
+
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxModeMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxModeMapper.xml
index cfb18fa..3f80bb7 100644
--- a/flossom-common/flossom-common-core/src/main/resources/mapper/WxModeMapper.xml
+++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxModeMapper.xml
@@ -28,6 +28,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
@@ -35,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select id, instrument_type, instrument_model, mode_name, mode_desc, mode_banner, mode_video, mode_type, mode_class, is_cabin_mode, is_custom_mode, mode_time, preparation_video, began_video, pause_video, status, create_by, create_time, update_by, update_time, remark, technology_info, effect_content from wx_mode
+ select id, instrument_type, instrument_model, mode_name, mode_desc, mode_banner, mode_video, mode_type, mode_class, is_cabin_mode, is_custom_mode, mode_time, preparation_video, began_video, pause_video, status, create_by, create_time, update_by, update_time, remark, technology_info, effect_content, step_one_video, step_two_video, step_three_video from wx_mode
@@ -101,8 +107,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_by,
update_time,
remark,
- technology_info
- effect_content
+ technology_info,
+ effect_content,
+ step_one_video,
+ step_two_video,
+ step_three_video,
#{instrumentType},
@@ -125,8 +134,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{updateBy},
#{updateTime},
#{remark},
- #{technologyInfo}
- #{effectContent}
+ #{technologyInfo},
+ #{effectContent},
+ #{stepOneVideo},
+ #{stepTwoVideo},
+ #{stepThreeVideo},
@@ -155,6 +167,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
remark = #{remark},
technology_info = #{technologyInfo},
effect_content = #{effectContent},
+ step_one_video = #{stepOneVideo},
+ step_two_video = #{stepTwoVideo},
+ step_three_video = #{stepThreeVideo},
where id = #{id}
diff --git a/flossom-ui/src/views/system/mode/index.vue b/flossom-ui/src/views/system/mode/index.vue
index b39bbb7..da2268f 100644
--- a/flossom-ui/src/views/system/mode/index.vue
+++ b/flossom-ui/src/views/system/mode/index.vue
@@ -252,6 +252,60 @@
只能上传视频文件,且不超过50M
+
+
+
+ 点击上传
+ 只能上传视频文件,且不超过50M
+
+
+
+
+
+ 点击上传
+ 只能上传视频文件,且不超过50M
+
+
+
+
+
+ 点击上传
+ 只能上传视频文件,且不超过50M
+
+
添加弹窗
@@ -523,6 +577,12 @@ export default {
// 封面list
fileList: [],
bannerList:[],
+ // 步骤一视频
+ stepOneVideoFileList:[],
+ // 步骤二视频
+ stepTwoVideoFileList:[],
+ // 步骤三视频
+ stepThreeVideoFileList:[],
// 上传参数
upload: {
// 是否显示弹出层(用户导入)
@@ -591,7 +651,16 @@ export default {
],
modeTime: [
{ required: true, message: "模式时长不能为空", trigger: "blur" }
- ]
+ ],
+ stepOneVideo: [
+ { required: true, message: "步骤一视频不能为空", trigger: "blur" }
+ ],
+ stepTwoVideo: [
+ { required: true, message: "步骤二视频不能为空", trigger: "blur" }
+ ],
+ stepThreeVideo: [
+ { required: true, message: "步骤三视频不能为空", trigger: "blur" }
+ ],
}
};
},
@@ -674,6 +743,9 @@ export default {
technologyArrayMode: [],
technologyInfo: null,
effectContent: null,
+ stepOneVideo: null,
+ stepTwoVideo: null,
+ stepThreeVideo: null,
};
this.resetForm("form");
this.bannerList = [];
@@ -704,6 +776,9 @@ export default {
this.title = "添加模式";
this.form.instrumentType = 1;
this.openSourceData = [];
+ this.stepOneVideoFileList = [];
+ this.stepTwoVideoFileList = [];
+ this.stepThreeVideoFileList = [];
},
/** 修改按钮操作 */
handleUpdate(row) {
@@ -711,6 +786,9 @@ export default {
const id = row.id || this.ids
this.bannerList = [];
this.fileList = [];
+ this.stepOneVideoFileList = [];
+ this.stepTwoVideoFileList = [];
+ this.stepThreeVideoFileList = [];
getMode(id).then(response => {
this.form = response.data;
this.form.modeType = String(this.form.modeType)
@@ -742,6 +820,25 @@ export default {
if(this.form.technologyInfo) {
this.form.technologyArrayMode = this.form.technologyInfo.split(",");
}
+ // FR200仪器水分测试步骤视频清理
+ if(this.form.stepOneVideo != null) {
+ this.stepOneVideoFileList.push({
+ name: this.handleFileInfo(this.form.stepOneVideo),
+ url: this.form.stepOneVideo
+ })
+ }
+ if(this.form.stepTwoVideo != null) {
+ this.stepTwoVideoFileList.push({
+ name: this.handleFileInfo(this.form.stepTwoVideo),
+ url: this.form.stepTwoVideo
+ })
+ }
+ if(this.form.stepThreeVideo != null) {
+ this.stepThreeVideoFileList.push({
+ name: this.handleFileInfo(this.form.stepThreeVideo),
+ url: this.form.stepThreeVideo
+ })
+ }
});
},
handleFileInfo(url) {
@@ -847,7 +944,7 @@ export default {
}
}
// 使用技术
- if(this.form.technologyArrayMode.length > 0) {
+ if(this.form.technologyArrayMode!=null &&this.form.technologyArrayMode.length > 0) {
this.form.technologyInfo = this.form.technologyArrayMode.join(",");
}
this.$refs["form"].validate(valid => {
@@ -902,6 +999,21 @@ export default {
// console.log('调用了删除')
this.bannerList = [];
},
+ handleRemoveStepOneVideo(file, fileList) {
+ this.$refs.stepOneVideo.clearFiles();
+ this.stepOneVideoFileList = [];
+ this.form.stepOneVideo = null;
+ },
+ handleRemoveStepTwoVideo(file, fileList) {
+ this.$refs.stepTwoVideo.clearFiles();
+ this.stepTwoVideoFileList = [];
+ this.form.stepTwoVideo = null;
+ },
+ handleRemoveStepThreeVideo(file, fileList) {
+ this.$refs.stepThreeVideo.clearFiles();
+ this.stepThreeVideoFileList = [];
+ this.form.stepThreeVideo = null;
+ },
handlePreview(file) {
console.log(file);
},
@@ -983,6 +1095,40 @@ export default {
this.form.modeVideo = response.data.url;
}
},
+ // 步骤一视频
+ handleFileSuccessStepOneVideo(response, file, fileList, item) {
+ console.log('上传后的结果==>',JSON.stringify(response))
+ if(response.code == '200') {
+ this.stepOneVideoFileList = [];
+ this.stepOneVideoFileList.push({
+ name: response.data.name,
+ url: response.data.url,
+ })
+ this.form.stepOneVideo = response.data.url;
+ }
+ },
+ handleFileSuccessStepTwoVideo(response, file, fileList, item) {
+ console.log('上传后的结果==>',JSON.stringify(response))
+ if(response.code == '200') {
+ this.stepTwoVideoFileList = [];
+ this.stepTwoVideoFileList.push({
+ name: response.data.name,
+ url: response.data.url,
+ })
+ this.form.stepTwoVideo = response.data.url;
+ }
+ },
+ handleFileSuccessStepThreeVideo(response, file, fileList, item) {
+ console.log('上传后的结果==>',JSON.stringify(response))
+ if(response.code == '200') {
+ this.stepThreeVideoFileList = [];
+ this.stepThreeVideoFileList.push({
+ name: response.data.name,
+ url: response.data.url,
+ })
+ this.form.stepThreeVideo = response.data.url;
+ }
+ },
// 封面上传成功处理
handleBannerFileSuccess(response, file, fileList, item) {
console.log('上传后的结果==>',JSON.stringify(response))