提交 1b2e5eb5 authored 作者: wangjialong209's avatar wangjialong209

统计数据

上级 a8e19621
......@@ -243,6 +243,8 @@ export function get_image_path(id) {
/**
* 烟草等级
* */
......@@ -409,3 +411,58 @@ export function get_test_results_detail(id) {
method: 'get',
})
}
/**
* 统计板块
*
* */
//获取试题统计结果
export function get_test_results_count(data) {
return request({
url: `/api/test_results_count`,
method: 'post',
data
})
}
//批阅试题列表-分页
export function get_read_over_list(params) {
return request({
url: `/api/read_over`,
method: 'get',
params
})
}
//批阅试题列表-保存(和统计参数一致)
export function save_read_over_data(data) {
return request({
url: `/api/read_over`,
method: 'post',
data
})
}
//批阅试题列表-详情
export function get_read_over_detail(id) {
return request({
url: `/api/read_over/${id}`,
method: 'get',
})
}
//批阅试题列表-修改(状态设置)
export function updata_read_over(id, data) {
return request({
url: `/api/read_over/${id}`,
method: 'put',
data
})
}
//批阅试题列表-删除
export function delete_read_over(id) {
return request({
url: `/api/read_over/${id}`,
method: 'delete',
})
}
<!-- -->
<template>
<div class="chart_container" :id="chart_id"></div>
</template>
<script>
export default {
props: ['chart_data', 'chart_id'],
data() {
return {
};
},
components: {},
computed: {},
created() {
},
mounted() {
this.initChart();
},
methods: {
initChart() {
let series = this.changData(this.chart_data);
let legend_data = this.chart_data.labers.map(item => {
return item.key
})
let dom = document.getElementById(`${this.chart_id}`);
let myChart = this.$echarts.init(dom, null, {
renderer: 'canvas',
useDirtyRect: false
});
let option;
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
// data: ['Forest', 'Steppe', 'Desert', 'Wetland']
data: legend_data
},
toolbox: {
show: false,
orient: 'vertical',
left: 'right',
top: 'center',
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
magicType: { show: true, type: ['line', 'bar', 'stack'] },
restore: { show: true },
saveAsImage: { show: true }
}
},
xAxis: [
{
type: 'category',
axisTick: { show: false },
// data: ['2012', '2013', '2014', '2015', '2016']
data: this.chart_data.keys
}
],
yAxis: [
{
type: 'value'
}
],
// series: [
// {
// name: 'Forest',
// type: 'bar',
// barGap: 0,
// // label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [320, 332, 301, 334, 390]
// },
// {
// name: 'Steppe',
// type: 'bar',
// // label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [220, 182, 191, 234, 290]
// },
// {
// name: 'Desert',
// type: 'bar',
// // label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [150, 232, 201, 154, 190]
// },
// {
// name: 'Wetland',
// type: 'bar',
// // label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [98, 77, 101, 99, 40]
// }
// ]
series: series
};
if (option && typeof option === 'object') {
myChart.setOption(option);
}
window.addEventListener('resize', myChart.resize);
},
//处理数据
changData(data) {
let list = [];
data.labers.forEach((item, index) => {
let obj = {
name: item.key,
type: 'bar',
barGap: 0,
emphasis: {
focus: 'series'
},
data: []
}
data.keys.forEach(element => {
obj.data.push(data.raw_data[element][item.key]);
});
list.push(obj)
});
return list
},
}
}
</script>
<style scoped>
.chart_container {
width: 100%;
height: 100%;
}
</style>
<!-- -->
<template>
<div class="chart_container" :id="chart_id"></div>
</template>
<script>
export default {
props: ['chart_data', 'chart_id'],
data() {
return {
};
},
components: {},
computed: {},
mounted() {
this.initChart();
},
methods: {
initChart() {
let dom = document.getElementById(`${this.chart_id}`);
let myChart = this.$echarts.init(dom, null, {
renderer: 'canvas',
useDirtyRect: false
});
let app = {};
let option;
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: true,
areaStyle: {}
},
{
data: [1290, 1330, 1320, 820, 932, 901, 934,],
type: 'line',
smooth: true,
areaStyle: {}
},
]
};
if (option && typeof option === 'object') {
myChart.setOption(option);
}
window.addEventListener('resize', myChart.resize);
},
}
}
</script>
<style scoped>
.chart_container {
width: 100%;
height: 100%;
}
</style>
<!--
* @Author: czj
* @Date: 2023-03-21 10:14:46
* @Description:
* @FilePath: \AdministrationHome\src\components\AnalyseModule\components\SimpleTable.vue
-->
<!-- -->
<template>
<div class="container_box">
<table class="table_box">
<!-- <tr>
<th v-for="(e, i) in labers" :key="i">{{ e.label }}</th>
</tr> -->
<tr v-for="(item, index) in table_data.labers" :key="index">
<th>{{ item.label }}</th>
<th>{{ table_data.data[item.key] }}</th>
<th></th>
</tr>
</table>
</div>
</template>
<script>
export default {
props: ['table_data',],
data() {
return {
};
},
components: {},
computed: {},
created() {
},
mounted() { },
methods: {}
}
</script>
<style lang="scss" scoped>
.container_box {
width: 100%;
height: 100%;
}
.table_box {
width: 100%;
min-height: 100%;
text-align: center;
font-size: 14px;
border-top: 1px solid #E4E7ED;
border-left: 1px solid #E4E7ED;
border-collapse: collapse;
th,
td {
margin: 0;
padding: 0;
font-size: 14px;
border-bottom: 1px solid #E4E7ED;
border-right: 1px solid #E4E7ED;
}
th {
color: #909399;
}
td {
color: #303133;
}
}
</style>
<!--
* @Author: czj
* @Date: 2023-03-21 10:14:46
* @Description:
* @FilePath: \AdministrationHome\src\components\AnalyseModule\components\table.vue
-->
<!-- -->
<template>
<div class="container_box">
<table class="table_box">
<tr>
<th v-for="(e, i) in labers" :key="i">{{ e.label }}</th>
</tr>
<tr v-for="(item, index) in table_data" :key="index">
<td v-for="(e, i) in labers" :key="i">
<div v-if="e.key == 'distribute'">
<div v-if="item['distribute'].length > 3">
<el-popover placement="right" title="标题" width="200" trigger="click">
<div v-for="(h, key, j) in item['distribute']" :key="j">
{{ key }}({{ item['distribute'][key] }}人)
</div>
<el-button slot="reference" type="text" size="mini">...</el-button>
</el-popover>
</div>
<div v-else>
<div v-for="(h, key, j) in item['distribute']" :key="j">
{{ key }}({{ item['distribute'][key] }}人)
</div>
</div>
</div>
<div v-else>{{ item[e.key] }}</div>
</td>
</tr>
</table>
</div>
</template>
<script>
export default {
props: ['table_data', 'labers'],
data() {
return {
};
},
components: {},
computed: {},
mounted() { },
methods: {}
}
</script>
<style lang="scss" scoped>
.container_box {
width: 100%;
height: 100%;
}
.table_box {
width: 100%;
// min-height: 100%;
text-align: center;
font-size: 14px;
border-top: 1px solid #E4E7ED;
border-left: 1px solid #E4E7ED;
border-collapse: collapse;
th,
td {
margin: 0;
padding: 0;
font-size: 14px;
border-bottom: 1px solid #E4E7ED;
border-right: 1px solid #E4E7ED;
}
th {
padding: 15px 0;
color: #909399;
}
td {
padding: 5px 0;
color: #303133;
}
}
</style>
<!--
* @Author: czj
* @Date: 2023-03-20 16:02:07
* @Description:
* @FilePath: \AdministrationHome\src\components\AnalyseModule\index.vue
-->
<!--
* @Author: czj
* @Date: 2023-03-20 16:02:07
* @Description:
* @FilePath: \AdministrationHome\src\components\AnalyseModule\index.vue
-->
<!-- -->
<template>
<div class="analyse_container" :style="{ '--color': original_data.color }">
<div class="header_box">
<el-row>
<el-col :span="12">
<div class="title_box" :title="original_data.title"> {{ original_data.title }}</div>
</el-col>
<el-col :span="12" style="text-align: right;">
<el-checkbox v-if="original_data.is_show" v-model="original_data.is_show.value" @change="changeSelect">{{
original_data.is_show.value ? '显示' : '隐藏'
}}</el-checkbox>
</el-col>
</el-row>
</div>
<div class="content_container" v-if="original_data.type == 'table'">
<Table :table_data="original_data.list" :labers="original_data.labers"></Table>
</div>
<div class="content_container" v-if="false">
<line-chart :chart_data="original_data.data" :chart_id="original_data.chart_id"></line-chart>
</div>
<div class="content_container" v-if="original_data.type == 'bar'">
<bar-chart
:chart_data="{ raw_data: original_data.raw_data, keys: original_data.keys, labers: original_data.labers }"
:chart_id="original_data.chart_id"></bar-chart>
</div>
<div class="content_container" v-if="original_data.type == 'simple_table'">
<simple-table :table_data="original_data"></simple-table>
</div>
</div>
</template>
<script>
import Table from './components/table';
import LineChart from './components/LineChart.vue';
import BarChart from './components/BarChart.vue';
import SimpleTable from './components/SimpleTable.vue';
export default {
props: ['module_data'],
data() {
return {
original_data: {},
};
},
components: { Table, LineChart, BarChart, SimpleTable },
computed: {},
created() {
this.original_data = { ...this.module_data };
},
mounted() {
},
methods: {
//选择框监听
changeSelect() {
this.$emit('changeSelect', this.original_data.is_show);
},
}
}
</script>
<style lang="scss" scoped>
.analyse_container {
border-radius: 6px;
border: 1px solid var(--color);
overflow: hidden;
.header_box {
height: 40px;
line-height: 40px;
background-color: var(--color);
padding: 0 10px;
color: #fff;
font-size: 14px;
}
.content_container {
width: 100%;
height: 285px;
margin: 0;
padding: 0;
overflow-y: auto;
}
}
.title_box {
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
white-space: nowrap; // 默认不换行;
}
</style>
<!--
* @Author: czj
* @Date: 2023-03-08 15:31:58
* @Description:
* @FilePath: \AdministrationHome\src\components\ExaminationHeader\succinct.vue
-->
<!-- -->
<template>
<div>
<el-row>
<el-col :span="12">
<div>
<el-button type="text" icon="el-icon-arrow-left" size="mini" class="back_btn" @click="back">返回</el-button>
<h2 class="title_box">
<div v-if="Array.isArray(info_data.title)">
<span>{{ info_data.title[0] }}</span>
<el-popover placement="bottom" title="多个标题" width="200" trigger="hover">
<div>
<el-tag type="info" v-for="(item, index) in info_data.title" :key="index"
style="margin-bottom: 10px;">{{ item }}</el-tag>
</div>
<el-button slot="reference" type="text">...</el-button>
</el-popover>
</div>
<div v-else>
{{ info_data.title }}
</div>
</h2>
</div>
</el-col>
<el-col :span="12" style="text-align: right;">
<el-button type="primary" v-for="(item, index) in info_data.right_buttons" :key="index" :icon="item.icon"
@click="btnClick(item.event)">
{{ item.text }}
</el-button>
</el-col>
</el-row>
</div>
</template>
<script>
import { secondsToMinutes } from '@/utils/tool';
export default {
props: ['examination_questions'],
data() {
return {
info_data: {},
strong_keys: ['user_name', 'score'],
};
},
components: {},
computed: {},
created() {
this.info_data = { ...this.examination_questions };
console.log('头部接受到的数据');
console.log(this.examination_questions);
},
mounted() { },
methods: {
back() {
this.$router.go(-1);
},
seconds_to_minutes(str) {
if (str) {
return secondsToMinutes(str)
} else {
return '暂无'
}
},
btnClick(val) {
this.$emit('btnClick', val);
},
}
}
</script>
<style lang="scss" scoped>
.back_btn {
/* font-size: 16px; */
color: #303133;
border-right: 1px solid #DCDFE6;
padding: 3px 10px 3px 0;
border-radius: none;
}
.title_box {
display: inline-block;
vertical-align: middle;
margin: 0 20px;
}
.person_attribute_box {
display: inline-block;
vertical-align: middle;
margin-right: 50px;
font-size: 14px;
.label {
color: #303133;
vertical-align: middle;
margin-right: 12px;
}
.value {
color: #606266;
vertical-align: middle;
}
.strong {
color: #000;
font-size: 20px;
font-weight: 800;
}
}
</style>
......@@ -7,7 +7,7 @@
<!-- -->
<template>
<div>
<img src="/image/log.svg" alt="" class="object_logo">
<img src="/image/log.svg" alt="" class="object_logo" @click="toHomePage">
</div>
</template>
......@@ -24,7 +24,11 @@ export default {
mounted() { },
methods: {}
methods: {
toHomePage() {
this.$router.push('/dashboard');
},
}
}
</script>
......@@ -32,5 +36,6 @@ export default {
.object_logo {
width: 95px;
height: 30px;
cursor: pointer;
}
</style>
......@@ -27,10 +27,15 @@ import './utils/error-log' // error log
import * as filters from './filters' // global filters
import { Aesencrypt, Aesdecrypt, removeProperty, handleParams } from '@/utils/cryptoJS';
import echarts from 'echarts';
//加密方法
Vue.prototype.$Aesencrypt = Aesencrypt;//加密
Vue.prototype.$Aesdecrypt = Aesdecrypt;//揭秘
Vue.prototype.$removeProperty = removeProperty;//清除空值
Vue.prototype.$handleParams = handleParams;//封装机密格式的参数
//全局echarts
Vue.prototype.$echarts = echarts
/**
......
......@@ -707,10 +707,11 @@ aside a:hover {
position: absolute;
left: 0;
top: 0;
bottom: -5px;
width: 300px;
height: 750px;
background-color: #fff;
box-sizing: border-box;
overflow-y: auto;
}
.crumbs_box {
......@@ -775,3 +776,5 @@ aside a:hover {
margin-left: 8px;
margin-top: -3px;
}
/* 选框颜色 */
差异被折叠。
......@@ -242,11 +242,12 @@ aside {
position: absolute;
left: 0;
top: 0;
bottom: -5px;
width: 300px;
height: 750px;
background-color: #fff;
box-sizing: border-box;
// padding: 15px;
overflow-y: auto;
}
}
......@@ -319,3 +320,5 @@ aside {
margin-left: 8px;
margin-top: -3px;
}
/* 选框颜色 */
......@@ -52,3 +52,8 @@ export function secondsToMinutes(s) {
let result = `${padTo2Digits(minutes)}分${padTo2Digits(seconds)}秒`;
return result
}
//两个数,求百分比
export function toPercent(num, total) {
return (Math.round(num / total * 10000) / 100.00 + "%");// 小数点后两位百分比
}
......@@ -462,7 +462,8 @@ $light_gray: #eee;
}
.content_body_right {
width: 400px;
min-width: 350px;
max-width: 350px;
box-sizing: border-box;
padding: 40px;
background-color: #fff;
......
......@@ -17,7 +17,7 @@
<table-head :head_data="head_data" @search="searchEvent" @change="searchChange" @resetting="resetting"
@btnClick="btnClick"></table-head>
<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="600">
<el-table-column prop="id" label="编号" width="80">
</el-table-column>
<el-table-column prop="name" label="烟草产地">
......@@ -355,9 +355,10 @@ export default {
}
.right_container {
/* position: absolute;
left: 320px;
top: 0; */
// position: absolute;
// left: 0;
// top: 0;
// bottom: 0;
margin-left: 320px;
width: 80%;
height: 100%;
......
差异被折叠。
<template>
<div class="module_container">
<div class="card_container">
<el-card class="box-card">
<table-head :head_data="head_data" @search="searchEvent" @resetting="resetting" @btnClick="btnClick"></table-head>
<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_remark" label="创建备注"></el-table-column>
<el-table-column prop="auditor_user.name" 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="remarks" label="备注"></el-table-column>
<el-table-column prop="status" label="状态" width="80">
<template slot-scope="scope">
<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 == 3" type="danger">撤销发布</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button size="mini" type="text" style="color: #000;" @click="toDetail(scope.row)">详情</el-button>
<el-button size="mini" type="text" style="color: #000;"
@click="updateInformation(scope.row)">编辑</el-button>
<el-button size="mini" type="text" style="color: #F56C6C;"
@click="deleteInformation(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div style="text-align: right;">
<el-pagination @current-change="handleCurrentChange" :current-page.sync="request_params.page"
:page-size="request_params.limit" layout="total, prev, pager, next" :total="request_params.total">
</el-pagination>
</div>
</el-card>
</div>
<el-dialog :title="is_updata_type == 'add' ? '新增' : '修改'" :visible.sync="is_dialogVisible" width="500px"
:before-close="handleClose" :close-on-click-modal="false">
<div>
<el-form label-width="80px">
<el-form-item label="状态">
<el-radio-group v-model="detailed_information.status">
<el-radio :label="'1'">
<el-tag type="success">批阅完成</el-tag>
</el-radio>
<el-radio :label="'2'">
<el-tag type="success">审核通过</el-tag>
</el-radio>
<el-radio :label="'3'">
<el-tag type="danger">撤销发布</el-tag>
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="detailed_information.remarks">
</el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="submitData">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import TableHead from '@/components/TableHead/index';
import { get_student_list, add_student, delete_student, updat_student, get_student_detail, download_student_info, upload_student_info } from '@/api/student';
import { get_read_over_list, updata_read_over, delete_read_over } from '@/api/student';
const standard_template = {
status: null,
remarks: null,
}
export default {
data() {
return {
IP: process.env.VUE_APP_BASE_API,
//头部按钮
head_data: {
search_placeholder: "",
right_buttons: [
// {
// text: '新增',
// icon: 'el-icon-document-add',
// event: 'add',
// }
],
},
//初始化请求参数
request_params: {
val: '',
page: 1,
limit: 10,
total: null,
},
is_loading: false,
tableData: [],
is_dialogVisible: false,
is_updata_type: 'add',
//详细信息
detailed_information: {},
};
},
components: { TableHead },
computed: {},
mounted() {
this.init()
},
methods: {
searchEvent(val) {
this.request_params.val = val;
this.getListData();
},
resetting(val) {
this.request_params.val = '';
this.getListData();
},
btnClick(val) {
if (val == 'add') this.addInformation();
},
init() {
this.getListData();
},
//取消
handleClose() {
this.is_dialogVisible = false;
},
//提交
submitData() {
console.log('提交');
//updata_read_over
if (this.is_updata_type == 'add') {
} else {
let id = this.detailed_information.id;
let data = this.$removeProperty({
status: this.detailed_information.status,
remarks: this.detailed_information.remarks,
});
updata_read_over(id, data).then(res => {
console.log('修改');
console.log(res);
if (res.code == 200) {
this.is_dialogVisible = false;
this.init();
}
})
}
},
//获取列表数据
getListData() {
let params = this.$removeProperty(this.request_params);
this.is_loading = true;
get_read_over_list(params).then(res => {
console.log('列表数据');
console.log(res);
this.tableData = res.data || [];
this.request_params.total = res.total;
this.is_loading = false;
})
},
//分页
handleCurrentChange(val) {
this.request_params.page = val;
this.getListData();
},
//新增信息
addInformation() {
this.is_updata_type = 'add';
this.detailed_information = { ...standard_template };
this.is_dialogVisible = true;
},
//修改信息
updateInformation(item) {
this.is_updata_type = 'edit';
let id = item.id;
//获取详情
this.detailed_information = { ...item };
this.is_dialogVisible = true;
},
//删除
deleteInformation(item) {
let id = item.id;
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delete_read_over(id).then(res => {
if (res.code == 200) {
this.$message.success(res.message);
this.init();
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
//跳转详情
toDetail(item) {
let id = item.id;
this.$router.push({
path: '/student/display_board_detail',
query: { id: id }
})
}
},
}
</script>
<style lang="scss" scoped></style>
......@@ -5,7 +5,9 @@
<el-card class="box-card">
<table-head :head_data="head_data" @search="searchEvent" @resetting="resetting" @btnClick="btnClick"></table-head>
<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"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="id" label="编号" width="50">
</el-table-column>
<el-table-column prop="title" label="考试标题">
......@@ -48,16 +50,10 @@
<template slot-scope="scope">
<el-button size="mini" type="text" style="color: #000;" v-if="scope.row.status != '6'"
@click="updateInformation(scope.row)">修改</el-button>
<!-- <el-button size="mini" type="text" style="color: #000;" @click="commentJump(scope.row)">配置</el-button> -->
<el-button size="mini" type="text" style="color: #000;" title="试题复制"
@click="examinationQuestionsCopy(scope.row)">复制</el-button>
<el-button v-if="scope.row.status != '6'" size="mini" type="text" style="color: #000;margin-right: 15px;"
@click="createAnswerCard(scope.row)" title="生成答题卡">下载</el-button>
<!-- <el-button v-if="scope.row.status == '1'" size="mini" type="text" style="color: #000;"
@click="examinationQuestionsPublish(scope.row)" title="试题发布">发布</el-button>
<el-button v-if="scope.row.status != '6'" size="mini" type="text" style="color: #F56C6C;"
@click="deleteInformation(scope.row)">停用</el-button> -->
<el-popover placement="right" width="160">
<div>
<el-radio-group v-model="status_params.status">
......@@ -74,6 +70,9 @@
</div>
<el-button slot="reference" type="text" size="mini" @click="setStatusParams(scope.row)">设置状态</el-button>
</el-popover>
<el-button type="text" size="mini" style="color: #000;margin-left: 15px;"
@click="comment(scope.row)">批阅</el-button>
</template>
</el-table-column>
</el-table>
......@@ -86,7 +85,7 @@
</el-card>
</div>
<el-dialog :title="is_updata_type == 'add' ? '新增考试' : '修改考试'" :visible.sync="is_dialogVisible" width="60%"
<el-dialog :title="is_updata_type == 'add' ? '新增考试' : '修改考试'" :visible.sync="is_dialogVisible" width="900px"
:before-close="handleClose">
<div>
<el-form label-width="100px">
......@@ -222,7 +221,7 @@ export default {
event: 'add',
},
{
text: '总评',
text: '批阅',
icon: 'el-icon-data-analysis',
event: 'analysis',
},
......@@ -248,7 +247,6 @@ export default {
//详细信息
detailed_information: {},
//预约
is_reservation: false,
//全部学生
......@@ -262,20 +260,23 @@ export default {
},
//批量预约文件
batch_reservation_file: {},
is_popover_show: false,
status_params: {
id: null,
status: null,
},
//多选ids
select_ids: [],
};
},
components: { TableHead },
computed: {},
created() {
localStorage.removeItem("examination_questions_ids");
},
mounted() {
this.init()
},
......@@ -298,6 +299,7 @@ export default {
console.log(val);
if (val == 'add') this.addInformation();
if (val == 'reservation') this.reservationFun();
if (val == 'analysis') this.comment(null);
},
init() {
......@@ -442,7 +444,6 @@ export default {
const { id, status } = data;
this.status_params = { id, status };
},
//修改状态
updataExaminationQuestionsStatus() {
let id = this.status_params.id;
......@@ -458,10 +459,7 @@ export default {
}
})
},
//预约点击
//is_reservation
reservationFun() {
//获取全部试题
get_examination_questions_all().then(res => {
......@@ -509,7 +507,29 @@ export default {
this.$message.warning('请选择试题!');
}
},
//表格多选监听
handleSelectionChange(val) {
console.log('val');
console.log(val);
this.select_ids = val.map(e => {
return e.id;
})
},
//行 点评 点击
comment(item) {
if (item) {
let ids = [item.id];
localStorage.setItem('examination_questions_ids', ids);
this.$router.push({ path: '/student/examination_questions_comment', })
} else {
if (this.select_ids.length > 0) {
localStorage.setItem('examination_questions_ids', this.select_ids);
this.$router.push({ path: '/student/examination_questions_comment', })
} else {
this.$message.warning('请选择数据!');
}
}
},
},
......
......@@ -116,7 +116,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="证件号">
<el-input v-model="detailed_information.idcard" placeholder="证件号" type="number"
<el-input v-model="detailed_information.idcard" placeholder="证件号"
:disabled="is_updata_type == 'view'"></el-input>
</el-form-item>
</el-col>
......@@ -153,14 +153,20 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注">
<el-input v-model="detailed_information.remark" placeholder="备注" type="textarea" :rows="2"
<el-form-item label="密码">
<el-input v-model="detailed_information.password" placeholder="密码"
:disabled="is_updata_type == 'view'"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="备注">
<el-input v-model="detailed_information.remark" placeholder="备注" type="textarea" :rows="2"
:disabled="is_updata_type == 'view'"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="简介">
<el-input v-model="detailed_information.brief_introduction" placeholder="简介" type="textarea" :rows="2"
:disabled="is_updata_type == 'view'"></el-input>
......@@ -183,6 +189,7 @@ import { get_province_list, get_student_list, add_student, delete_student, updat
import { exportText } from '@/utils/tool.js';
const standard_template = {
name: "",
password: '',
sex: null,
age: null,
native_place: null,
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论