提交 dec782ac authored 作者: wangjialong209's avatar wangjialong209

功能完善

上级 1b2e5eb5
......@@ -35,6 +35,7 @@ export default {
});
let option;
option = {
color: ['#cd9f50', '#47afa0', '#bcdfdc'],
tooltip: {
trigger: 'axis',
axisPointer: {
......@@ -43,7 +44,13 @@ export default {
},
legend: {
// data: ['Forest', 'Steppe', 'Desert', 'Wetland']
data: legend_data
// data: legend_data,
formatter: (name) => {
let objs = this.chart_data.labers.filter(itme => {
return itme.key == name;
})
return objs[0].label
}
},
toolbox: {
show: false,
......
......@@ -27,7 +27,14 @@
{{ key }}({{ item['distribute'][key] }}人)
</div>
</div>
</div>
<div v-else-if="Array.isArray(item[e.key])">
<el-popover placement="right" width="200" trigger="click" v-if="item[e.key].length > 0">
<div v-for="(h, j) in item[e.key]" :key="j">
{{ h }}
</div>
<el-button slot="reference" type="text" size="mini">...</el-button>
</el-popover>
</div>
<div v-else>{{ item[e.key] }}</div>
</td>
......
......@@ -18,6 +18,10 @@
<div class="person_attribute_box" v-for="(item, index) in data_keys" :key="index"
v-show="info_data[item.key] != undefined">
<span v-if="item.key == 'duration'">
<span class="label">{{ item.label }}</span>
<span>{{ info_data[item.key] }}分钟</span>
</span>
<span v-else-if="item.key == 'answer_duration'">
<span class="label">{{ item.label }}</span>
<span class="label">{{ seconds_to_minutes(info_data[item.key]) }}</span>
</span>
......@@ -43,6 +47,7 @@ export default {
{ label: '用户名', key: 'user_name' },
{ label: '成绩', key: 'score' },
{ label: '考试时长', key: 'duration' },
{ label: '考试时长', key: 'answer_duration' },
],
strong_keys: ['user_name', 'score'],
......
......@@ -9,11 +9,15 @@
<div>
<el-row :gutter="20">
<el-col :span="9">
<span>搜索:</span>
<el-input placeholder="输入名称" class="search_box" v-model="search_val"
:placeholder="!head_data.search_placeholder ? '搜索' : head_data.search_placeholder" @change="searchChange"></el-input>
<el-button type="warning" size="small" @click="search">搜索</el-button>
<el-button size="small" @click="resetting">重置</el-button>
<div v-if="head_data.is_search_show">
<span>搜索:</span>
<el-input placeholder="输入名称" class="search_box" v-model="search_val"
:placeholder="!head_data.search_placeholder ? '搜索' : head_data.search_placeholder"
@change="searchChange"></el-input>
<el-button type="warning" size="small" @click="search">搜索</el-button>
<el-button size="small" @click="resetting">重置</el-button>
</div>
<div v-else style="opacity: 0;pointer-events: none;">暂无</div>
</el-col>
<el-col :span="15" style="text-align: right;">
<span v-for="(item, index) in head_data.right_buttons" :key="index" style="margin: 0 8px;">
......@@ -51,7 +55,7 @@ export default {
search() {
this.$emit('search', this.search_val);
},
searchChange(){
searchChange() {
this.$emit('change', this.search_val);
},
resetting() {
......
......@@ -75,6 +75,7 @@ export default {
IP: process.env.VUE_APP_BASE_API,
//头部按钮
head_data: {
is_search_show: true,
search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -60,6 +60,7 @@ export default {
return {
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -107,6 +107,7 @@ export default {
IP: process.env.VUE_APP_BASE_API,
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -148,6 +148,7 @@ export default {
is_loading: false,
//头部数据
head_data: {
is_search_show: true,
title: '测试体贴',
right_buttons: [
// {
......
......@@ -7,10 +7,28 @@
<div class="table_container">
<el-table v-loading="is_loading" :data="tableData" style="width: 100%;margin-bottom: 20px;" height="650">
<el-table-column prop="id" label="编号" width="50"></el-table-column>
<!-- <el-table-column prop="remarks" label="备注"></el-table-column> -->
<el-table-column prop="found_user.name" label="创建人" width="110"></el-table-column>
<el-table-column prop="found_user.name" label="题目名称" width="180">
<template slot-scope="scope">
<!-- <div v-if="(changeReviewContent(scope.row.review_content)).length > 1">
<el-popover placement="right" title="多个标题" width="200" trigger="hover">
<div>
<el-tag type="info" v-for="(item, index) in changeReviewContent(scope.row.review_content)"
:key="index" style="margin-bottom: 10px;">{{ item }}</el-tag>
</div>
<el-button slot="reference" type="text">...</el-button>
</el-popover>
</div>
<div v-else-if="(changeReviewContent(scope.row.review_content)).length == 1">{{
(changeReviewContent(scope.row.review_content))[0] }}</div>
<div v-else>暂无...</div> -->
<div v-for="(item, index) in scope.row.examination_questions" :key="index">
{{ item.title }}
</div>
</template>
</el-table-column>
<el-table-column prop="found_user.name" label="创建人" width="90"></el-table-column>
<el-table-column prop="found_remark" label="创建备注"></el-table-column>
<el-table-column prop="auditor_user.name" label="审核人"></el-table-column>
<el-table-column prop="auditor_user.name" label="审核人" width="90"></el-table-column>
<el-table-column prop="release_date" label="发布日期"></el-table-column>
<el-table-column prop="created_at" label="创建时间"></el-table-column>
<el-table-column prop="remarks" label="备注"></el-table-column>
......@@ -87,6 +105,7 @@ export default {
IP: process.env.VUE_APP_BASE_API,
//头部按钮
head_data: {
is_search_show: true,
search_placeholder: "",
right_buttons: [
// {
......@@ -225,7 +244,18 @@ export default {
path: '/student/display_board_detail',
query: { id: id }
})
}
},
//试题列表
changeReviewContent(data) {
let datas = JSON.parse(data);
console.log(datas);
if (datas.EyeStability) {
return datas.EyeStability.title || [];
} else {
return [];
}
},
},
}
......
......@@ -163,6 +163,7 @@ export default {
is_loading: false,
//头部数据
head_data: {
is_search_show: true,
title: null,
right_buttons: [
{
......
......@@ -9,6 +9,12 @@
<el-card class="box-card">
<table-head :head_data="head_data" @search="searchEvent" @resetting="resetting" @btnClick="btnClick"
@upload="uploadTestQuestions"></table-head>
<!-- <div>
<el-button v-for="(item, index) in head_data.right_buttons" :key="index" type="primary" :icon="item.icon"
@click="resetting(item.event)">
{{ item.text }}
</el-button>
</div> -->
<div class="table_container">
<el-table v-loading="is_loading" :data="table_list" style="width: 100%;margin-bottom: 20px;" height="500">
<el-table-column prop="id" label="编号" width="50">
......@@ -109,6 +115,7 @@ export default {
examination_questions_id: null,//试题id
//头部按钮
head_data: {
is_search_show: false,
search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -17,9 +17,9 @@
}}</el-button>
</template>
</el-table-column>
<el-table-column prop="remarks" label="开考备注">
<el-table-column prop="remarks" label="考试提示">
<template slot-scope="scope">
<div class="remark_box" :title="scope.row.remarks">{{ scope.row.remarks }}</div>
<div class="remark_box" :title="scope.row.opening_tip">{{ scope.row.opening_tip }}</div>
</template>
</el-table-column>
<el-table-column prop="begin_date" label="考试时间">
......@@ -213,6 +213,7 @@ export default {
IP: process.env.VUE_APP_BASE_API,
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -212,6 +212,7 @@ export default {
IP: process.env.VUE_APP_BASE_API,
//头部按钮
head_data: {
is_search_show: true,
search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -41,7 +41,8 @@
<template slot-scope="scope">
<div>
<el-tag v-if="scope.row.status == 1" type="success">预约完成</el-tag>
<el-tag v-if="scope.row.status == 2" type="success">考试完成</el-tag>
<el-tag v-if="scope.row.status == 2" type="success"
style="background-color: #b4d7c6;border-color: #71b7a0;color: #038D6E;">考试完成</el-tag>
<el-tag v-if="scope.row.status == 3" type="success">已发布</el-tag>
<el-tag v-if="scope.row.status == 4" type="info">取消</el-tag>
<el-tag v-if="scope.row.status == 6" type="danger">失效</el-tag>
......@@ -99,6 +100,7 @@ export default {
IP: process.env.VUE_APP_BASE_API,
//头部按钮
head_data: {
is_search_show: true,
search_placeholder: "学员姓名/手机号",
right_buttons: [
// {
......
......@@ -111,6 +111,7 @@ export default {
return {
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -128,6 +128,7 @@ export default {
return {
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -123,6 +123,7 @@ export default {
return {
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -70,6 +70,7 @@ export default {
return {
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -160,6 +160,7 @@ export default {
return {
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
......@@ -85,6 +85,7 @@ export default {
return {
//头部按钮
head_data: {
is_search_show: true,
// search_placeholder: "学员姓名/手机号",
right_buttons: [
{
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论