20200622-zlp-1
首页-一日流程学习
This commit is contained in:
@ -9,6 +9,15 @@ export function listVideo(query) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询培训列表
|
||||
export function listScoreAndFree(id) {
|
||||
return request({
|
||||
url: '/benyi/video/listscoreandfree/'+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询培训详细
|
||||
export function getVideo(id) {
|
||||
return request({
|
||||
|
@ -24,20 +24,36 @@
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<div>
|
||||
<span>流程中所含任务</span>
|
||||
</div>
|
||||
<el-col :span="20" :xs="24" v-for="(item, index) in dayflowtaskList" :key="index" >
|
||||
<el-card :body-style="{ padding: '2px' }">
|
||||
<div class="to-detail">
|
||||
<el-tooltip effect="dark" :content="item.taskLable" placement="right">
|
||||
<div>
|
||||
<p class="info-title">{{item.taskLable}}</p>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<p class="info-title info-title-name">该任务所含标准个数:{{ item.standardCount }}</p>
|
||||
<div class="bottom">
|
||||
<time class="time">{{ parseTime(item.createtime) }}</time>
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{title}}</span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
导言
|
||||
<br />
|
||||
<label v-html="content"></label>
|
||||
</div>
|
||||
<div class="text item">
|
||||
目的
|
||||
<br />
|
||||
<label v-html="note"></label>
|
||||
</div>
|
||||
<div v-for="(item, index) in dayflowtaskList" :key="index" class="text item">
|
||||
{{item.taskLable}}
|
||||
<div
|
||||
v-for="(item_standard, index_standard) in (dayflowstandardList.filter(p=>p.taskCode==item.code))"
|
||||
:key="index_standard"
|
||||
class="text item"
|
||||
>{{item_standard.standardTitle}}
|
||||
<br/>解读
|
||||
<div
|
||||
v-for="(item_unscramble, index_unscramble) in (dayflowunscrambleList.filter(p=>p.standardId==item_standard.id))"
|
||||
:key="index_unscramble"
|
||||
class="text item"
|
||||
>{{item_unscramble.sort}}-{{item_unscramble.content}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@ -47,29 +63,31 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDetail, getDetail } from "@/api/benyi/dayflow/dayflowmanger";
|
||||
import { listDayflowtask } from "@/api/benyi/dayflow/dayflowtask";
|
||||
import { listStandard } from "@/api/benyi/dayflow/biaozhun/standard"
|
||||
import { treeselect } from "@/api/benyi/dayflow/dayflowmanger";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
import { listStandard } from "@/api/benyi/dayflow/biaozhun/standard";
|
||||
import { listUnscramble } from "@/api/benyi/dayflow/unscramble";
|
||||
import { treeselect, getDetail } from "@/api/benyi/dayflow/dayflowmanger";
|
||||
|
||||
export default {
|
||||
name: "Detail",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 一日流程名称
|
||||
name: undefined,
|
||||
// 一日流程id
|
||||
id: undefined,
|
||||
|
||||
//标题
|
||||
title: "一日流程",
|
||||
//导言
|
||||
content: undefined,
|
||||
//目的
|
||||
note: undefined,
|
||||
// 根据一日流程id查到的名下任务列表
|
||||
dayflowtaskList: [],
|
||||
// 根据任务查询到名下标准
|
||||
dayflowstandardList: [],
|
||||
//一日流程解读
|
||||
dayflowunscrambleList: [],
|
||||
// 树状显示类型
|
||||
treeOptions: [],
|
||||
// 树结构
|
||||
@ -79,8 +97,10 @@ export default {
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
detailId: undefined,
|
||||
taskCode: undefined,
|
||||
detailId: undefined
|
||||
},
|
||||
queryStandardParams: {
|
||||
taskCode: undefined
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -108,60 +128,45 @@ export default {
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.detailId = data.id;
|
||||
this.title = data.label;
|
||||
this.getTaskList();
|
||||
// console.log(this.dayflowtaskList[date.id])
|
||||
// this.getStandardList();
|
||||
},
|
||||
/** 查询一日流程任务列表 */
|
||||
getTaskList() {
|
||||
this.loading = true;
|
||||
listDayflowtask(this.queryParams).then(response => {
|
||||
this.dayflowtaskList = response.rows;
|
||||
// console.log(this.dayflowtaskList);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 查询任务标准列表 */
|
||||
// getStandardList() {
|
||||
// this.loading = true;
|
||||
// const taskCode = this.dayflowtaskList[this.id-1].code;
|
||||
// listStandard(taskCode).then(response => {
|
||||
// this.dayflowstandardList = response.rows;
|
||||
// console.log(this.dayflowstandardList);
|
||||
// this.loading = false;
|
||||
// });
|
||||
// },
|
||||
getDetail(this.queryParams.detailId).then(response => {
|
||||
this.content = response.data.content;
|
||||
this.note = response.data.note;
|
||||
});
|
||||
listStandard(null).then(response => {
|
||||
this.dayflowstandardList = response.rows;
|
||||
});
|
||||
listUnscramble(null).then(response => {
|
||||
this.dayflowunscrambleList = response.rows;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.time {
|
||||
line-height: 12px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
.text {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 13px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.to-detail {
|
||||
/*cursor: pointer;*/
|
||||
padding: 14px;
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.info-title {
|
||||
width: 100%; /*根据自己项目进行定义宽度*/
|
||||
overflow: hidden; /*设置超出的部分进行影藏*/
|
||||
text-overflow: ellipsis; /*设置超出部分使用省略号*/
|
||||
white-space: nowrap; /*设置为单行*/
|
||||
}
|
||||
|
||||
.info-title-name {
|
||||
font-size: 12px;
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
@ -85,6 +85,16 @@
|
||||
:formatter="typeFormat"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="所得平均分" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
title="点击我查看分数和评价"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="lookDetails(scope.row)"
|
||||
>{{ scope.row.avgscore }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createtime) }}</span>
|
||||
@ -182,12 +192,29 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改培训对话框 -->
|
||||
<el-dialog title="查看分数和评价详情页" :visible.sync="opendetail" width="800px">
|
||||
<el-table v-loading="loading" :data="scoreandfreeList">
|
||||
<el-table-column label="分数" align="center" prop="score" />
|
||||
<el-table-column label="评价" align="center" prop="content" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="detailtotal>0"
|
||||
:total="detailtotal"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getScoreAndFreeList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listVideo,
|
||||
listScoreAndFree,
|
||||
getVideo,
|
||||
delVideo,
|
||||
addVideo,
|
||||
@ -223,14 +250,20 @@ export default {
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
//详情总条数
|
||||
detailtotal: 0,
|
||||
// 培训表格数据
|
||||
videoList: [],
|
||||
// 培训表格数据
|
||||
scoreandfreeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
//讲师列表
|
||||
lecturerOptions: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
//详情页弹出层
|
||||
opendetail: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -378,10 +411,20 @@ export default {
|
||||
this.loading = true;
|
||||
listVideo(this.queryParams).then(response => {
|
||||
this.videoList = response.rows;
|
||||
//console.log(response.rows);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 查询分数和评价列表 */
|
||||
getScoreAndFreeList(id) {
|
||||
//this.loading = true;
|
||||
listScoreAndFree(id).then(response => {
|
||||
this.scoreandfreeList = response.rows;
|
||||
this.detailtotal = response.total;
|
||||
//this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@ -423,6 +466,12 @@ export default {
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/**查看平均分详情和评价 */
|
||||
lookDetails(row) {
|
||||
const id = row.id;
|
||||
this.opendetail = true;
|
||||
this.getScoreAndFreeList(id);
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.imageUrl = "";
|
||||
|
@ -148,6 +148,7 @@ export default {
|
||||
if (this.form.score == 0) {
|
||||
this.form.score = null;
|
||||
}
|
||||
this.form.content=this.form.content.trim();
|
||||
this.form.lecturerid = this.lecturerid;
|
||||
this.form.videoid = id;
|
||||
this.$refs["form"].validate(valid => {
|
||||
|
Reference in New Issue
Block a user