Commit 5c255758 authored by 黄奎's avatar 黄奎

页面修改

parent 3ad78b8d
......@@ -531,10 +531,14 @@ export function GetAssessmentTypeList(data) {
})
}
/**
* 获取教师考核分页列表
* @param {*} data
*/
export function queryTeacherAssessmentPage(data) {
return request({
url: '/TeacherAssessment/GetTeacherAssessmentPage',
method: 'post',
data
})
}
<style>
.Sysuser_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
height: 28px !important;
}
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col-2 Sysuser_Date q-mr-lg">
<q-field filled dense>
<template v-slot:control>
<el-date-picker v-model="queryDate" style="width:100%" value-format="yyyy-MM" @change="refreshPage()"
size="mini" type="month" placeholder="选择年月">
</el-date-picker>
</template>
</q-field>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top>
<div class="col-2 q-table__title">类型配置</div>
<div class="col-2 q-table__title">教师月度考核列表</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增" @click="goAssessTable()" />
</div>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<template v-for="(col,cIndex) in props.cols">
<q-td v-if="col.name == 'TypeName'" :key="cIndex">{{ col.value }}</q-td>
<q-td v-else-if="col.name == 'SubtypeList'" :key="cIndex">
<div v-for="(item,sIndex) in col.value" :key="sIndex">
<div class="border-bottom">
{{item.SubTypeName}}
</div>
</div>
</q-td>
<q-td style="width:100px;" v-else-if="col.name == 'Id'" :key="cIndex">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="AddMsg(props.row)" />
<q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs" label="删除"
@click="delConsult(props.row.Id)" />
<template v-slot:body-cell-OptionId="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="详情" />
</q-td>
</template>
</q-tr>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:bottom></template>
</q-table>
</div>
<assess-form v-if="isShowAssess" :save-obj="objOption" @close="getClose()" @success="getRefresh"></assess-form>
</div>
</template>
<script>
import {
queryAssessmentTypeList,
RemoveAssessmentType
queryTeacherAssessmentPage
} from '../../api/teacher/index';
import assessForm from '../../components/teacher/assess-form'
export default {
meta: {
title: "教师考评配置"
title: "教师月度考评"
},
components: {
assessForm
},
data() {
return {
loading: false,
msg: {
rowsPerPage: 1000,
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
YearStr: "",
MonthStr: "",
TeacherAccountId: "",
},
queryDate: '', //查询月份
columns: [{
name: "TypeName",
label: "类别",
field: "TypeName",
name: "TeacherName",
label: "教师",
field: "TeacherName",
align: "left"
},
{
name: "YearStr",
label: "年份",
field: "YearStr",
align: "left"
},
{
name: "MonthStr",
label: "月份",
field: "MonthStr",
align: "left"
},
{
name: "TeacherScore",
label: "教学主管打分",
field: "TeacherScore",
align: "left"
},
{
name: "SubtypeList",
label: "内容",
field: "SubtypeList",
name: "JiaoWuScore",
label: "教务主管打分",
field: "JiaoWuScore",
align: "left"
},
{
name: 'Id',
name: "TotalScore",
label: "总分",
field: "TotalScore",
align: "left"
},
{
name: 'OptionId',
label: '操作',
field: row => row.Id
}
],
dataList: [],
pageCount: 0,
objOption: null,
isShowAssess: false
}
},
created() {
let today = new Date();
this.msg.YearStr = today.getFullYear().toString();
this.msg.MonthStr = (today.getMonth() + 1).toString();
this.queryDate = this.msg.YearStr + '-' + this.msg.MonthStr;
if (this.$route.query) {
}
},
mounted() {
this.getAssessmentTypeList()
this.getTeacherAssessmentPage()
},
methods: {
getAssessmentTypeList() {
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getTeacherAssessmentPage()
},
getTeacherAssessmentPage() {
this.loading = true;
queryAssessmentTypeList(this.msg).then(res => {
queryTeacherAssessmentPage(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data;
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
},
//新增修改
AddMsg(obj) {
if (obj) {
this.objOption = obj
} else {
this.objOption = null
}
this.isShowAssess = true;
},
getClose() {
this.isShowAssess = false;
},
getRefresh() {
this.getAssessmentTypeList();
},
//删除数据
delConsult(Id) {
let that = this;
this.$q.dialog({
title: "提示",
message: '是否删除该配置?',
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
let msg = {
Id: Id
}
RemoveAssessmentType(msg).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据删除成功!',
position: 'top'
})
that.getAssessmentTypeList();
//刷新页面
refreshPage() {
if (this.queryDate) {
this.msg.YearStr = this.queryDate.split('-')[0];
this.msg.MonthStr = this.queryDate.split('-')[1];
}
})
});
this.getTeacherAssessmentPage();
},
//跳转考核表
goAssessTable(){
goAssessTable() {
this.OpenNewUrl('/teacher/jobEvaluation', {
});
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment