视频接口优化,案例检索

This commit is contained in:
xiezhijun
2021-05-08 19:09:32 +08:00
parent d474e823c3
commit 8600f48740
26 changed files with 396 additions and 71 deletions

View File

@ -17,8 +17,7 @@
</el-form-item>-->
<el-form-item label="案例信息" prop="name">
<el-select
v-model="keywordArray"
multiple
v-model="queryParams.keyword"
filterable
allow-create
clearable
@ -150,12 +149,22 @@
></AutoHideMessage>
</template>
</el-table-column>
<el-table-column label="所属客户" align="center" prop="customerName" />
<el-table-column label="所属客户" align="center" prop="customerName">
<template slot-scope="scope">
<el-button
size="normal"
type="text"
@click="handleOnHealthSignClick(scope.row.customerId)"
title="点击查看用户详情"
>{{scope.row.customerName}}</el-button
>
</template>
</el-table-column>
<el-table-column label="文件" align="center">
<template slot-scope="scope">
<el-button
size="mini"
size="normal"
type="text"
@click="getFileListByCaseId(scope.row)"
>文件列表
@ -323,6 +332,9 @@
@dealCustomerId="dealCustomerId"
ref="selectCustomerRef"
></SelectCustomer>
<!-- 健康评估弹窗 -->
<PhysicalSignsDialog ref="physicalSignsDialogRef" />
</div>
</template>
@ -337,13 +349,16 @@ import {
getFileListByCaseId,
updateWxShow
} from "@/api/custom/customerCase";
import {
getCustomer
} from "@/api/custom/customer";
import DragUpload from "@/components/FileUpload/DragUpload";
import DragUploadEdit from "@/components/FileUpload/DragUploadEdit";
import SelectCustomer from "@/components/Customer/SelectCustomer";
import MuchFileDown from "@/components/FileDownload/MuchFileDown";
import AutoHideMessage from "@/components/AutoHideMessage";
import AutoHideInfo from "@/components/AutoHideInfo";
import PhysicalSignsDialog from "@/components/PhysicalSignsDialog";
export default {
name: "CustomerCase",
data() {
@ -398,6 +413,7 @@ export default {
AutoHideMessage: AutoHideMessage,
AutoHideInfo: AutoHideInfo,
DragUploadEdit: DragUploadEdit,
PhysicalSignsDialog
},
created() {
this.getList();
@ -409,7 +425,7 @@ export default {
/** 查询客户案例管理列表 */
getList() {
this.loading = true;
this.queryParams.keyword = this.keywordArray.join(",");
//this.queryParams.keyword = this.keywordArray.join(",");
listCustomerCase(this.queryParams).then((response) => {
this.customerCaseList = response.rows;
this.total = response.total;
@ -425,6 +441,14 @@ export default {
this.$refs["editUploadCaseFile"].uploadReset();
this.reset();
},
handleOnHealthSignClick(id) {
getCustomer(id).then((response) => {
if(response.code == 200){
this.$refs["physicalSignsDialogRef"].showDialog(response.data);
}
});
},
// 表单重置
reset() {
this.form = {

View File

@ -110,8 +110,16 @@
</el-image>
</template>
</el-table-column>
<el-table-column label="标题" align="center" prop="title" width="200"/>
<el-table-column label="描述" align="center" prop="description" />
<el-table-column label="标题" align="center" prop="title" width="200">
<template slot-scope="scope" >
<AutoHideMessage :data="scope.row.title == null ? '' : (scope.row.title+'')" :maxLength="20"></AutoHideMessage>
</template>
</el-table-column>
<el-table-column label="描述" align="center" prop="description" >
<template slot-scope="scope" >
<AutoHideMessage :data="scope.row.description == null ? '' : (scope.row.description+'')" :maxLength="100"></AutoHideMessage>
</template>
</el-table-column>
<!--<el-table-column label="标签" align="center" prop="tags" width="100"/>-->
<el-table-column label="分类" align="center" prop="cateName" width="100"/>
<el-table-column label="权限等级" align="center" prop="payLevelName" width="100"/>
@ -128,6 +136,13 @@
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="getVideoPlayUrl(scope.row.id)"
v-hasPermi="['custom:nutritionalVideo:query']"
>播放</el-button>
<el-button
size="mini"
type="text"
@ -229,11 +244,12 @@
</template>
<script>
import { listNutritionalVideo, getNutritionalVideo, delNutritionalVideo, addNutritionalVideo, updateNutritionalVideo, exportNutritionalVideo, updateWxShow } from "@/api/custom/nutritionalVideo";
import { listNutritionalVideo, getNutritionalVideo, delNutritionalVideo, addNutritionalVideo, updateNutritionalVideo, exportNutritionalVideo, updateWxShow,getVideoPlayUrlById } from "@/api/custom/nutritionalVideo";
import {getAllClassify } from "@/api/custom/videoClassify";
import UploadVideo from "@/components/UploadVideo";
import UploadFile from "@/components/FileUpload/UploadFile";
import VideoClassify from "../videoClassify";
import AutoHideMessage from "@/components/AutoHideMessage";
export default {
name: "NutritionalVideo",
data() {
@ -269,6 +285,15 @@
form: {},
// 表单校验
rules: {
title: [
{ required: true, message: "标题不能为空", trigger: "blur" },
],
cateId:[
{ required: true, message: "视频类别不能为空", trigger: "blur" },
],
payLevel:[
{ required: true, message: "视频权限不能为空", trigger: "blur" },
]
},
coverImageList:[],
//分类列表
@ -288,7 +313,7 @@
});
},
components: {
UploadVideo,UploadFile,VideoClassify
UploadVideo,UploadFile,VideoClassify,AutoHideMessage
},
methods: {
/** 查询营养视频列表 */
@ -372,6 +397,15 @@
this.title = "修改营养视频";
});
},
//获取播放地址
getVideoPlayUrl(id){
getVideoPlayUrlById(id).then(response => {
let url = response.data.playUrl;
if(url != undefined && url != null){
window.open(url, '_blank');
}
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {