班级考勤部分代码
This commit is contained in:
parent
c5b8288bd4
commit
0a5400379e
@ -16,18 +16,30 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
<el-button type="primary" plain size="mini" icon="el-icon-printer" @click="prints">打印</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
<div ref="printMe">
|
||||||
|
<h2 style="text-align:center;">儿童考勤表</h2>
|
||||||
|
<h4 style="text-align: left">
|
||||||
|
班级名称:{{ this.bjmc }}------
|
||||||
|
考勤月份:{{ this.month }}------
|
||||||
|
在册人数:{{ this.childcount }}人 ------
|
||||||
|
班长姓名:{{ this.jsmc }} ------
|
||||||
|
|
||||||
|
</h4>
|
||||||
<el-table v-loading="loading" style="width: 100%" border :data="tableData">
|
<el-table v-loading="loading" style="width: 100%" border :data="tableData">
|
||||||
<template v-for="(item,index) in tableHead">
|
<template v-for="(item,index) in tableHead">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:prop=" item.column_name==''?'day'+(item.sort+1) : item.column_name"
|
:prop=" item.column_name==''?'day'+(item.sort+1) : item.column_name"
|
||||||
|
:fixed="item.column_name!=''"
|
||||||
:label=" item.column_name==''?(item.sort+1)+'' : item.sort"
|
:label=" item.column_name==''?(item.sort+1)+'' : item.sort"
|
||||||
:key="index"
|
:key="index"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
@ -48,6 +60,12 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
month: "",
|
month: "",
|
||||||
|
// 班级名称
|
||||||
|
bjmc: "",
|
||||||
|
// 在册人数:班级学生总数
|
||||||
|
childcount: "",
|
||||||
|
// 班主任名称
|
||||||
|
jsmc: "",
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
@ -88,8 +106,8 @@ export default {
|
|||||||
],
|
],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
month: "",
|
month: ""
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -110,16 +128,17 @@ export default {
|
|||||||
if (this.queryParams.month == "") {
|
if (this.queryParams.month == "") {
|
||||||
this.queryParams.month = this.month;
|
this.queryParams.month = this.month;
|
||||||
}
|
}
|
||||||
await listDatetime(this.queryParams).then((response) => {
|
await listDatetime(this.queryParams).then(response => {
|
||||||
console.log(response.rows);
|
console.log(response.rows);
|
||||||
this.tableHead.push({
|
this.tableHead.push({
|
||||||
|
|
||||||
column_name: "name",
|
column_name: "name",
|
||||||
sort: "姓名",
|
sort: "姓名"
|
||||||
});
|
});
|
||||||
response.rows.forEach((res) => {
|
response.rows.forEach(res => {
|
||||||
this.tableHead.push({
|
this.tableHead.push({
|
||||||
column_name: "",
|
column_name: "",
|
||||||
sort: res.sort,
|
sort: res.sort
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -131,8 +150,11 @@ export default {
|
|||||||
if (this.queryParams.month == "") {
|
if (this.queryParams.month == "") {
|
||||||
this.queryParams.month = this.month;
|
this.queryParams.month = this.month;
|
||||||
}
|
}
|
||||||
listChildCheck(this.queryParams).then((response) => {
|
listChildCheck(this.queryParams).then(response => {
|
||||||
console.log(response.rows);
|
console.log(response.rows);
|
||||||
|
this.bjmc =response.rows[0].bjmc;
|
||||||
|
this.childcount = response.rows.length;
|
||||||
|
this.jsmc = response.rows[0].zbjsmc;
|
||||||
this.tableData = response.rows;
|
this.tableData = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -148,6 +170,11 @@ export default {
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
//打印
|
||||||
|
prints() {
|
||||||
|
//console.log(this.$refs.printMe);
|
||||||
|
this.$print(this.$refs.printMe);
|
||||||
},
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
@ -297,6 +297,8 @@ public class ByChild extends BaseEntity {
|
|||||||
private String day29;
|
private String day29;
|
||||||
private String day30;
|
private String day30;
|
||||||
private String day31;
|
private String day31;
|
||||||
|
private String bjmc;
|
||||||
|
private String zbjsmc;
|
||||||
|
|
||||||
public String getDay1() {
|
public String getDay1() {
|
||||||
return day1;
|
return day1;
|
||||||
@ -958,6 +960,8 @@ public class ByChild extends BaseEntity {
|
|||||||
.append("day29", getDay29())
|
.append("day29", getDay29())
|
||||||
.append("day30", getDay30())
|
.append("day30", getDay30())
|
||||||
.append("day31", getDay31())
|
.append("day31", getDay31())
|
||||||
|
.append("bjmc", getBjmc())
|
||||||
|
.append("zbjsmc", getZbjsmc())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -968,4 +972,21 @@ public class ByChild extends BaseEntity {
|
|||||||
public void setByChildContactpeople(ByChildContactpeople byChildContactpeople) {
|
public void setByChildContactpeople(ByChildContactpeople byChildContactpeople) {
|
||||||
this.byChildContactpeople = byChildContactpeople;
|
this.byChildContactpeople = byChildContactpeople;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBjmc() {
|
||||||
|
return bjmc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBjmc(String bjmc) {
|
||||||
|
this.bjmc = bjmc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getZbjsmc() {
|
||||||
|
return zbjsmc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZbjsmc(String zbjsmc) {
|
||||||
|
this.zbjsmc = zbjsmc;
|
||||||
|
}
|
||||||
}
|
}
|
@ -78,6 +78,8 @@
|
|||||||
<result property="day29" column="day29"/>
|
<result property="day29" column="day29"/>
|
||||||
<result property="day30" column="day30"/>
|
<result property="day30" column="day30"/>
|
||||||
<result property="day31" column="day31"/>
|
<result property="day31" column="day31"/>
|
||||||
|
<result property="bjmc" column="bjmc"/>
|
||||||
|
<result property="zbjsmc" column="zbjsmc"/>
|
||||||
<association property="byChildContactpeople" column="childid" javaType="ByChildContactpeople" resultMap="ByChildContactpeopleResult" />
|
<association property="byChildContactpeople" column="childid" javaType="ByChildContactpeople" resultMap="ByChildContactpeopleResult" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -413,6 +415,10 @@
|
|||||||
resultMap="ByChildResult">
|
resultMap="ByChildResult">
|
||||||
select c.id, c.classid, c.name,
|
select c.id, c.classid, c.name,
|
||||||
|
|
||||||
|
(select bjmc from by_class where bjbh=c.classid) as bjmc,
|
||||||
|
|
||||||
|
(select nick_name from sys_user where user_id in (select zbjs from by_class where bjbh=c.classid)) as zbjsmc,
|
||||||
|
|
||||||
(select (select dict_label from sys_dict_data
|
(select (select dict_label from sys_dict_data
|
||||||
where dict_type='sys_dm_cqzt' and dict_value= type)
|
where dict_type='sys_dm_cqzt' and dict_value= type)
|
||||||
from by_child_checkin_detail where childid=c.id
|
from by_child_checkin_detail where childid=c.id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user