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

功能完善

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