|
|
|
@ -252,6 +252,60 @@
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传视频文件,且不超过50M</div>
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传视频文件,且不超过50M</div>
|
|
|
|
</el-upload>
|
|
|
|
</el-upload>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<!-- 步骤一视频 -->
|
|
|
|
|
|
|
|
<el-form-item label="步骤一视频" prop="stepOneVideo" v-if="form.instrumentModel == 'FR200' && form.modeType == 'moistureTest'" label-width="100px">
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
ref = "stepOneVideo"
|
|
|
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
|
|
|
:action="upload.url"
|
|
|
|
|
|
|
|
:before-upload="limitVideFileType"
|
|
|
|
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
|
|
|
|
:on-remove="handleRemoveStepOneVideo"
|
|
|
|
|
|
|
|
:on-success="handleFileSuccessStepOneVideo"
|
|
|
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
|
|
|
:file-list="stepOneVideoFileList"
|
|
|
|
|
|
|
|
accept=".mp4,.avi,.mov,.rmvb,.rm,.flv,.3gp"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传视频文件,且不超过50M</div>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<!-- 步骤二视频 -->
|
|
|
|
|
|
|
|
<el-form-item label="步骤二视频" prop="stepTwoVideo" v-if="form.instrumentModel == 'FR200' && form.modeType == 'moistureTest'" label-width="100px">
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
ref = "stepTwoVideo"
|
|
|
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
|
|
|
:action="upload.url"
|
|
|
|
|
|
|
|
:before-upload="limitVideFileType"
|
|
|
|
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
|
|
|
|
:on-remove="handleRemoveStepTwoVideo"
|
|
|
|
|
|
|
|
:on-success="handleFileSuccessStepTwoVideo"
|
|
|
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
|
|
|
:file-list="stepTwoVideoFileList"
|
|
|
|
|
|
|
|
accept=".mp4,.avi,.mov,.rmvb,.rm,.flv,.3gp"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传视频文件,且不超过50M</div>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<!-- 步骤三视频 -->
|
|
|
|
|
|
|
|
<el-form-item label="步骤三视频" prop="stepThreeVideo" v-if="form.instrumentModel == 'FR200' && form.modeType == 'moistureTest'" label-width="100px">
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
ref = "stepThreeVideo"
|
|
|
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
|
|
|
:action="upload.url"
|
|
|
|
|
|
|
|
:before-upload="limitVideFileType"
|
|
|
|
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
|
|
|
|
:on-remove="handleRemoveStepThreeVideo"
|
|
|
|
|
|
|
|
:on-success="handleFileSuccessStepThreeVideo"
|
|
|
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
|
|
|
:file-list="stepThreeVideoFileList"
|
|
|
|
|
|
|
|
accept=".mp4,.avi,.mov,.rmvb,.rm,.flv,.3gp"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传视频文件,且不超过50M</div>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item v-if="form.instrumentType == 2" label="弹出视频窗" prop="openSource" label-width="100px">
|
|
|
|
<el-form-item v-if="form.instrumentType == 2" label="弹出视频窗" prop="openSource" label-width="100px">
|
|
|
|
<el-button type="primary" @click="showOpenSource">添加弹窗</el-button>
|
|
|
|
<el-button type="primary" @click="showOpenSource">添加弹窗</el-button>
|
|
|
|
<el-table :data="openSourceData" style="width: 100%" max-height="250">
|
|
|
|
<el-table :data="openSourceData" style="width: 100%" max-height="250">
|
|
|
|
@ -523,6 +577,12 @@ export default {
|
|
|
|
// 封面list
|
|
|
|
// 封面list
|
|
|
|
fileList: [],
|
|
|
|
fileList: [],
|
|
|
|
bannerList:[],
|
|
|
|
bannerList:[],
|
|
|
|
|
|
|
|
// 步骤一视频
|
|
|
|
|
|
|
|
stepOneVideoFileList:[],
|
|
|
|
|
|
|
|
// 步骤二视频
|
|
|
|
|
|
|
|
stepTwoVideoFileList:[],
|
|
|
|
|
|
|
|
// 步骤三视频
|
|
|
|
|
|
|
|
stepThreeVideoFileList:[],
|
|
|
|
// 上传参数
|
|
|
|
// 上传参数
|
|
|
|
upload: {
|
|
|
|
upload: {
|
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
|
@ -591,7 +651,16 @@ export default {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
modeTime: [
|
|
|
|
modeTime: [
|
|
|
|
{ required: true, message: "模式时长不能为空", trigger: "blur" }
|
|
|
|
{ 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: [],
|
|
|
|
technologyArrayMode: [],
|
|
|
|
technologyInfo: null,
|
|
|
|
technologyInfo: null,
|
|
|
|
effectContent: null,
|
|
|
|
effectContent: null,
|
|
|
|
|
|
|
|
stepOneVideo: null,
|
|
|
|
|
|
|
|
stepTwoVideo: null,
|
|
|
|
|
|
|
|
stepThreeVideo: null,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
this.bannerList = [];
|
|
|
|
this.bannerList = [];
|
|
|
|
@ -704,6 +776,9 @@ export default {
|
|
|
|
this.title = "添加模式";
|
|
|
|
this.title = "添加模式";
|
|
|
|
this.form.instrumentType = 1;
|
|
|
|
this.form.instrumentType = 1;
|
|
|
|
this.openSourceData = [];
|
|
|
|
this.openSourceData = [];
|
|
|
|
|
|
|
|
this.stepOneVideoFileList = [];
|
|
|
|
|
|
|
|
this.stepTwoVideoFileList = [];
|
|
|
|
|
|
|
|
this.stepThreeVideoFileList = [];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
handleUpdate(row) {
|
|
|
|
@ -711,6 +786,9 @@ export default {
|
|
|
|
const id = row.id || this.ids
|
|
|
|
const id = row.id || this.ids
|
|
|
|
this.bannerList = [];
|
|
|
|
this.bannerList = [];
|
|
|
|
this.fileList = [];
|
|
|
|
this.fileList = [];
|
|
|
|
|
|
|
|
this.stepOneVideoFileList = [];
|
|
|
|
|
|
|
|
this.stepTwoVideoFileList = [];
|
|
|
|
|
|
|
|
this.stepThreeVideoFileList = [];
|
|
|
|
getMode(id).then(response => {
|
|
|
|
getMode(id).then(response => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data;
|
|
|
|
this.form.modeType = String(this.form.modeType)
|
|
|
|
this.form.modeType = String(this.form.modeType)
|
|
|
|
@ -742,6 +820,25 @@ export default {
|
|
|
|
if(this.form.technologyInfo) {
|
|
|
|
if(this.form.technologyInfo) {
|
|
|
|
this.form.technologyArrayMode = this.form.technologyInfo.split(",");
|
|
|
|
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) {
|
|
|
|
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.form.technologyInfo = this.form.technologyArrayMode.join(",");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
@ -902,6 +999,21 @@ export default {
|
|
|
|
// console.log('调用了删除')
|
|
|
|
// console.log('调用了删除')
|
|
|
|
this.bannerList = [];
|
|
|
|
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) {
|
|
|
|
handlePreview(file) {
|
|
|
|
console.log(file);
|
|
|
|
console.log(file);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -983,6 +1095,40 @@ export default {
|
|
|
|
this.form.modeVideo = response.data.url;
|
|
|
|
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) {
|
|
|
|
handleBannerFileSuccess(response, file, fileList, item) {
|
|
|
|
console.log('上传后的结果==>',JSON.stringify(response))
|
|
|
|
console.log('上传后的结果==>',JSON.stringify(response))
|
|
|
|
|