Commit e629acb5 authored by 姬鋆屾's avatar 姬鋆屾

parent 77a2011b
......@@ -625,7 +625,10 @@ export default {
pageInfo() {
const urls = {
// 操作所需的url地址,和url同路径
list: this.$route.path,
list:
this.$route.path.indexOf("/attendance/stat/list") == 0
? "/attendance/stat/listExt"
: this.$route.path,
edit: this.$route.path.replace("/list", "/edit"),
save: this.$route.path.replace("/list", "/save"),
del: this.$route.path.replace("/list", "/delete"),
......
......@@ -87,8 +87,8 @@ export default {
},
mixins: [table],
created() {
this.query.startTime = getFirstDay();
this.query.endTime = getLastDay();
this.query.summaryTimeStart = getFirstDay();
this.query.summaryTimeEnd = getLastDay();
this.initalArr = this.config.columns;
},
methods: {
......@@ -102,7 +102,10 @@ export default {
}
},
afterRender(data) {
this.addColumn = getdiffdate(this.query.startTime, this.query.endTime);
this.addColumn = getdiffdate(
this.query.summaryTimeStart,
this.query.summaryTimeEnd
);
// 动态处理
let addobjArr = [];
this.addColumn.map((item, index) => {
......@@ -110,7 +113,10 @@ export default {
label: item + "(" + getMyDay(new Date(item)) + ")",
prop: "attendanceStaffStatEntities",
formatter: (row) => {
if (row.attendanceStaffStatEntities.length > 0) {
if (
row.attendanceStaffStatEntities &&
row.attendanceStaffStatEntities.length > 0
) {
return this.handleArr(row.attendanceStaffStatEntities, item);
} else {
return "-";
......@@ -123,8 +129,12 @@ export default {
this.$forceUpdate();
},
beforeRender(row) {
console.log(row.data);
row.data.forEach((element) => {
if (element.attendanceStaffStatEntities.length > 0) {
if (
element.attendanceStaffStatEntities &&
element.attendanceStaffStatEntities.length > 0
) {
element.attendanceStaffStatEntities.forEach((item1) => {
item1.createTime = timestampToTime(item1.createTime, 3);
});
......@@ -190,26 +200,26 @@ export default {
label: "全部部门",
fuzzy: false,
},
// {
// name: "groupId",
// type: "select",
// label: "全部考勤组",
// fuzzy: false,
// },
// {
// name: "classId",
// type: "select",
// label: "全部班次",
// fuzzy: false,
// },
{
name: "groupId",
type: "select",
label: "全部考勤组",
fuzzy: false,
},
{
name: "classId",
type: "select",
label: "全部班次",
fuzzy: false,
},
{
name: "startTime",
name: "summaryTimeStart",
type: "date",
label: "考勤开始时间",
fuzzy: false,
},
{
name: "endTime",
name: "summaryTimeEnd",
type: "date",
label: "考勤结束时间",
fuzzy: false,
......
......@@ -17,9 +17,9 @@ module.exports = {
hot: true,//自动保存
proxy: {
'/attendance': {
//target: 'http://192.168.0.98:11039',
target: 'http://192.168.0.98:11039',
// target: 'http://112.19.80.237:11039',
target: 'http://localhost:17500',
// target: 'http://localhost:17500',
changeOrigin: true,
secure: false,
cookieDomainRewrite: 'localhost',
......
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