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

页面修改

parent 3ad78b8d
...@@ -531,10 +531,14 @@ export function GetAssessmentTypeList(data) { ...@@ -531,10 +531,14 @@ export function GetAssessmentTypeList(data) {
}) })
} }
/**
* 获取教师考核分页列表
* @param {*} data
*/
export function queryTeacherAssessmentPage(data) {
return request({
url: '/TeacherAssessment/GetTeacherAssessmentPage',
method: 'post',
data
})
}
<style> <style>
.Sysuser_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
height: 28px !important;
}
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="page-search row items-center"> <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>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns" class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name"> row-key="name">
<template v-slot:top> <template v-slot:top>
<div class="col-2 q-table__title">类型配置</div> <div class="col-2 q-table__title">教师月度考核列表</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增" @click="goAssessTable()" /> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增" @click="goAssessTable()" />
</div> </div>
</template> </template>
<template v-slot:body="props"> <template v-slot:body-cell-OptionId="props">
<q-tr :props="props"> <q-td :props="props">
<template v-for="(col,cIndex) in props.cols"> <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="详情" />
<q-td v-if="col.name == 'TypeName'" :key="cIndex">{{ col.value }}</q-td> </q-td>
<q-td v-else-if="col.name == 'SubtypeList'" :key="cIndex"> </template>
<div v-for="(item,sIndex) in col.value" :key="sIndex"> <template v-slot:bottom>
<div class="border-bottom"> <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
{{item.SubTypeName}} :input="true" @input="changePage" />
</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)" />
</q-td>
</template>
</q-tr>
</template> </template>
<template v-slot:bottom></template>
</q-table> </q-table>
</div> </div>
<assess-form v-if="isShowAssess" :save-obj="objOption" @close="getClose()" @success="getRefresh"></assess-form>
</div> </div>
</template> </template>
<script> <script>
import { import {
queryAssessmentTypeList, queryTeacherAssessmentPage
RemoveAssessmentType
} from '../../api/teacher/index'; } from '../../api/teacher/index';
import assessForm from '../../components/teacher/assess-form'
export default { export default {
meta: { meta: {
title: "教师考评配置" title: "教师月度考评"
}, },
components: { components: {
assessForm
}, },
data() { data() {
return { return {
loading: false, loading: false,
msg: { msg: {
rowsPerPage: 1000, pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
YearStr: "",
MonthStr: "",
TeacherAccountId: "",
}, },
queryDate: '', //查询月份
columns: [{ columns: [{
name: "TypeName", name: "TeacherName",
label: "类别", label: "教师",
field: "TypeName", field: "TeacherName",
align: "left"
},
{
name: "YearStr",
label: "年份",
field: "YearStr",
align: "left"
},
{
name: "MonthStr",
label: "月份",
field: "MonthStr",
align: "left" align: "left"
}, },
{ {
name: "SubtypeList", name: "TeacherScore",
label: "内容", label: "教学主管打分",
field: "SubtypeList", field: "TeacherScore",
align: "left" align: "left"
}, },
{ {
name: 'Id', name: "JiaoWuScore",
label: "教务主管打分",
field: "JiaoWuScore",
align: "left"
},
{
name: "TotalScore",
label: "总分",
field: "TotalScore",
align: "left"
},
{
name: 'OptionId',
label: '操作', label: '操作',
field: row => row.Id field: row => row.Id
} }
], ],
dataList: [], dataList: [],
pageCount: 0,
objOption: null, objOption: null,
isShowAssess: false
} }
}, },
created() { 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() { mounted() {
this.getAssessmentTypeList() this.getTeacherAssessmentPage()
}, },
methods: { methods: {
getAssessmentTypeList() { //翻页
changePage(val) {
this.msg.pageIndex = val;
this.getTeacherAssessmentPage()
},
getTeacherAssessmentPage() {
this.loading = true; this.loading = true;
queryAssessmentTypeList(this.msg).then(res => {
queryTeacherAssessmentPage(this.msg).then(res => {
this.loading = false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
} }
}) })
}, },
//新增修改 //刷新页面
AddMsg(obj) { refreshPage() {
if (obj) { if (this.queryDate) {
this.objOption = obj this.msg.YearStr = this.queryDate.split('-')[0];
} else { this.msg.MonthStr = this.queryDate.split('-')[1];
this.objOption = null
} }
this.isShowAssess = true; this.getTeacherAssessmentPage();
},
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();
}
})
});
}, },
//跳转考核表 //跳转考核表
goAssessTable(){ goAssessTable() {
this.OpenNewUrl('/teacher/jobEvaluation', { this.OpenNewUrl('/teacher/jobEvaluation', {
}); });
} }
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style>
</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