Commit 3c2ce6e6 authored by 姬鋆屾's avatar 姬鋆屾

pref:代码优化

parent 44037b97
...@@ -15,38 +15,6 @@ export default { ...@@ -15,38 +15,6 @@ export default {
dialogShow, dialogShow,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
renderTable(tableData) {
return (
<el-table stripe data={tableData} class="total-table">
{this.columnSet.map((item) => this.renderTableColumn(item))}
</el-table>
);
},
renderTableColumn(options) {
return (
<el-table-column
prop={options.prop}
label={options.label}
width={options.width}
align="center"
></el-table-column>
);
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.dialogform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.dialogform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.dialogform.view(row);
},
},
data() { data() {
return { return {
/** 子表列元素 */ /** 子表列元素 */
...@@ -143,5 +111,39 @@ export default { ...@@ -143,5 +111,39 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
// 处理表格数据
renderTable(tableData) {
return (
<el-table stripe data={tableData} class="total-table">
{this.columnSet.map((item) => this.renderTableColumn(item))}
</el-table>
);
},
// 处理表头
renderTableColumn(options) {
return (
<el-table-column
prop={options.prop}
label={options.label}
width={options.width}
align="center"
></el-table-column>
);
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.dialogform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.dialogform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.dialogform.view(row);
},
},
}; };
</script> </script>
...@@ -20,56 +20,9 @@ export default { ...@@ -20,56 +20,9 @@ export default {
groupTemplate, groupTemplate,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
renderTable(tableData) {
return (
<el-table stripe data={tableData} class="total-table">
{this.columnSet.map((item) => this.renderTableColumn(item))}
</el-table>
);
},
renderTableColumn(options) {
return (
<el-table-column
prop={options.prop}
label={options.label}
width={options.width}
></el-table-column>
);
},
/** 重写新增方法 */
toAdd(row) {
this.isshow = false;
this.$refs.groupTemplate.add(row);
// this.$router.push(
// {
// path:'/attendance/group/view'
// }
// )
},
/** 重写编辑方法 */
toEdit(row) {
this.isshow = false;
this.$refs.groupTemplate.edit(row);
// this.$router.push(
// {
// path:'/attendance/group/view'
// }
// )
},
/** 重写查看方法 */
toView(row) {
this.isshow = false;
this.$refs.groupTemplate.view(row);
},
okFn(val) {
this.getData();
this.isshow = val;
},
},
data() { data() {
return { return {
// 是否展示表格
isshow: true, isshow: true,
/** 子表列元素 */ /** 子表列元素 */
columnSet: [ columnSet: [
...@@ -160,6 +113,56 @@ export default { ...@@ -160,6 +113,56 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
// 处理表格数据
renderTable(tableData) {
return (
<el-table stripe data={tableData} class="total-table">
{this.columnSet.map((item) => this.renderTableColumn(item))}
</el-table>
);
},
// 处理表头数据
renderTableColumn(options) {
return (
<el-table-column
prop={options.prop}
label={options.label}
width={options.width}
></el-table-column>
);
},
/** 重写新增方法 */
toAdd(row) {
this.isshow = false;
this.$refs.groupTemplate.add(row);
// this.$router.push(
// {
// path:'/attendance/group/view'
// }
// )
},
/** 重写编辑方法 */
toEdit(row) {
this.isshow = false;
this.$refs.groupTemplate.edit(row);
// this.$router.push(
// {
// path:'/attendance/group/view'
// }
// )
},
/** 重写查看方法 */
toView(row) {
this.isshow = false;
this.$refs.groupTemplate.view(row);
},
okFn(val) {
this.getData();
this.isshow = val;
},
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -28,47 +28,11 @@ export default { ...@@ -28,47 +28,11 @@ export default {
drawerAudit, drawerAudit,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
audit(row) {
//todo 审核页面进行审核
this.$refs.drawerform.edit(row);
// this.$refs.draweraudit.view(row);
},
doExport() {
this.isExport = true;
this.$download(
"/attendance/leave/record/exportExcel",
{
idList: this.selection,
name: this.$route.query["name"],
startTimeEnd: this.query.startTimeEnd,
startTimeStart: this.query.startTimeStart,
},
{ type: "excel", name: "请假记录" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
},
data() { data() {
return { return {
// 导出按钮加载状态
isExport: false, isExport: false,
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -231,5 +195,43 @@ export default { ...@@ -231,5 +195,43 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
audit(row) {
//todo 审核页面进行审核
this.$refs.drawerform.edit(row);
// this.$refs.draweraudit.view(row);
},
doExport() {
this.isExport = true;
this.$download(
"/attendance/leave/record/exportExcel",
{
idList: this.selection,
name: this.$route.query["name"],
startTimeEnd: this.query.startTimeEnd,
startTimeStart: this.query.startTimeStart,
},
{ type: "excel", name: "请假记录" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
},
}; };
</script> </script>
...@@ -54,118 +54,15 @@ export default { ...@@ -54,118 +54,15 @@ export default {
drawerShow, drawerShow,
}, },
mixins: [table], mixins: [table],
created() {
this.query.errorDateTimeStart = getFirstDay();
this.query.errorDateTimeEnd = getLastDay();
},
methods: {
countDown() {
if (this.percent == 95) {
let params = {};
for (let value of this.config.search) {
if (this.query[value.name]) {
params[value.name] = this.query[value.name];
}
}
if (this.selection.length > 0) {
params["idList"] = this.selection;
}
let that = this;
this.$download(
"/attendance/record/error/exportExcel",
{
...params,
},
{ type: "excel", name: "异常处理" }
)
.then(() => {
this.percent = 100;
this.progress = false;
that.isExport = false;
})
.catch((error) => {
this.isExport = false;
this.progress = false;
this.$message.error(error.message);
});
return;
} else {
this.percent = this.percent + 1;
let that = this;
setTimeout(function() {
that.countDown();
}, 100);
}
},
/** 导出Excel */
doExport() {
if (this.isExport == true) {
this.$message.info("数据正在导出中,请勿重复点击!");
return false;
}
this.isExport = true;
this.progress = true;
this.percent = 0;
this.countDown();
},
/** 重写新增方法 */
// toAdd(row) {
// this.$refs.dialogform.add(row);
// },
// /** 重写编辑方法 */
// toEdit(row) {
// this.$refs.dialogform.edit(row);
// },
// /** 重写查看方法 */
// toView(row) {
// this.$refs.dialogform.view(row);
// },
morehandle() {
let arr = this.tableData.data.filter((item) => {
if (this.selection.includes(item.id) && item.processStatus == 0) {
return item;
}
});
this.$nextTick(() => {
this.selection = arr.map((item) => item.id);
});
if (arr.length < 1) {
this.$message.error("请至少选择一条处理");
return;
}
this.$refs.drawerShow.edit(arr[0], arr);
},
// 处理
handle(err) {
console.log(err);
this.$refs.drawerShow.edit(err, []);
},
// 撤销
reCancle(err) {
console.log(err);
this.currentParams = err;
this.dialogVisible = true;
},
resetError() {
this.$post("attendance/record/error/revokeError", {
id: this.currentParams.id,
}).then((res) => {
if (res.code == 1) {
this.dialogVisible = false;
this.getData();
}
});
},
},
data() { data() {
return { return {
// 进度展示值
percent: 0, percent: 0,
// 导出按钮加载状态
isExport: false, isExport: false,
// 是否显示进度条
progress: false, progress: false,
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -325,6 +222,115 @@ export default { ...@@ -325,6 +222,115 @@ export default {
currentParams: {}, currentParams: {},
}; };
}, },
created() {
this.query.errorDateTimeStart = getFirstDay();
this.query.errorDateTimeEnd = getLastDay();
},
methods: {
// 倒计时
countDown() {
if (this.percent == 95) {
let params = {};
for (let value of this.config.search) {
if (this.query[value.name]) {
params[value.name] = this.query[value.name];
}
}
if (this.selection.length > 0) {
params["idList"] = this.selection;
}
let that = this;
this.$download(
"/attendance/record/error/exportExcel",
{
...params,
},
{ type: "excel", name: "异常处理" }
)
.then(() => {
this.percent = 100;
this.progress = false;
that.isExport = false;
})
.catch((error) => {
this.isExport = false;
this.progress = false;
this.$message.error(error.message);
});
return;
} else {
this.percent = this.percent + 1;
let that = this;
setTimeout(function () {
that.countDown();
}, 100);
}
},
/** 导出Excel */
doExport() {
if (this.isExport == true) {
this.$message.info("数据正在导出中,请勿重复点击!");
return false;
}
this.isExport = true;
this.progress = true;
this.percent = 0;
this.countDown();
},
/** 重写新增方法 */
// toAdd(row) {
// this.$refs.dialogform.add(row);
// },
// /** 重写编辑方法 */
// toEdit(row) {
// this.$refs.dialogform.edit(row);
// },
// /** 重写查看方法 */
// toView(row) {
// this.$refs.dialogform.view(row);
// },
// 处理选择项
morehandle() {
let arr = this.tableData.data.filter((item) => {
if (this.selection.includes(item.id) && item.processStatus == 0) {
return item;
}
});
this.$nextTick(() => {
this.selection = arr.map((item) => item.id);
});
if (arr.length < 1) {
this.$message.error("请至少选择一条处理");
return;
}
this.$refs.drawerShow.edit(arr[0], arr);
},
// 处理
handle(err) {
console.log(err);
this.$refs.drawerShow.edit(err, []);
},
// 撤销
reCancle(err) {
console.log(err);
this.currentParams = err;
this.dialogVisible = true;
},
// 重置
resetError() {
this.$post("attendance/record/error/revokeError", {
id: this.currentParams.id,
}).then((res) => {
if (res.code == 1) {
this.dialogVisible = false;
this.getData();
}
});
},
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
:show-close="false" :show-close="false"
> >
<div class="fresh_box"> <div class="fresh_box">
<div class="title_box" style="margin-bottom: 20px;"> <div class="title_box" style="margin-bottom: 20px">
仅支持手动更新近90天的打卡数据,请选择需要更新的时间段: 仅支持手动更新近90天的打卡数据,请选择需要更新的时间段:
</div> </div>
<el-date-picker <el-date-picker
...@@ -185,6 +185,144 @@ export default { ...@@ -185,6 +185,144 @@ export default {
dialogShow, dialogShow,
}, },
mixins: [table], mixins: [table],
data() {
return {
// 日期筛选项
pickerOptions0: {
disabledDate(time) {
let curDate = new Date().getTime();
let three = 90 * 24 * 3600 * 1000;
let threeMonths = curDate - three;
return time.getTime() > Date.now() || time.getTime() < threeMonths;
},
},
// 日期绑定值
freshDate: "",
// 提交加载状态
submitLoad: false,
// 按钮加载状态
btnLoading: false,
// 手动更新加载状态
btnFreshLoading: false,
// 是否显示弹窗
dialogOpen: false,
// 是否展示按钮
showBtn: false,
// 是否展示进度
progress: false,
// 导出按钮加载状态
isExport: false,
// 导出进度绑定值
percent: 0,
// 上传接口配置
upload: {
headers: {
Authorization: window.sessionStorage.getItem("token") || "",
},
// 是否显示弹出层(员工关怀信息导入)
open: false,
// 弹出层标题(员工关怀信息导入)
title: "导入员工关怀信息数据",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url:
process.env.VUE_APP_API_BASE_URL +
"/attendance/attendance/record/hik/importData",
},
// 表格配置项
config: {
isshowTabPane: true,
search: [
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: true,
},
{
name: "workNum",
type: "text",
label: "工号",
fuzzy: false,
},
// {
// name: "deptId",
// type: "select",
// label: "所属部门",
// fuzzy: false
// },
// {
// name: "attendanceGroupId",
// type: "select",
// label: "所属考勤组",
// fuzzy: false
// },
// {
// name: "shiftsId",
// type: "select",
// label: "班次",
// fuzzy: false
// },
{
name: "attendanceDateStart",
type: "date",
label: "考勤开始时间",
fuzzy: false,
},
{
name: "attendanceDateEnd",
type: "date",
label: "考勤结束时间",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 },
{ label: "员工姓名", prop: "staffName" },
{ label: "工号", prop: "workNum" },
{
label: "大厅",
prop: "salaName",
formatter: this.formatter,
show: true,
},
{
label: "部门",
prop: "deptName",
formatter: this.formatter,
show: true,
},
// {label: "考勤组", prop: "attendanceGroupName"},
// {label: "职位", prop: "positionName"},
// {label: "班次", prop: "shiftsName"},
{
label: "考勤时间",
prop: "attendanceDate",
formatter: this.formatterDate,
},
{ label: "考勤点名称", prop: "attendanceAddress" },
{ label: "事件源", prop: "eventSource" },
// {
// label: "操作",
// width: 240,
// formatter: row => {
// return (
// <table-buttons noAdd noDel noEdit noView row={row}
// onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
// )
// }
// }
],
},
drawerhistory: false,
exportList: [],
baseUrl: process.env.VUE_APP_API_BASE_URL + "/",
};
},
created() { created() {
this.query.attendanceDateStart = timestampToTime(new Date(), 3); this.query.attendanceDateStart = timestampToTime(new Date(), 3);
this.query.attendanceDateEnd = timestampToTime(new Date(), 3); this.query.attendanceDateEnd = timestampToTime(new Date(), 3);
...@@ -343,7 +481,7 @@ export default { ...@@ -343,7 +481,7 @@ export default {
} else { } else {
this.percent = this.percent + 1; this.percent = this.percent + 1;
let that = this; let that = this;
setTimeout(function() { setTimeout(function () {
that.countDown(); that.countDown();
}, 100); }, 100);
} }
...@@ -374,132 +512,6 @@ export default { ...@@ -374,132 +512,6 @@ export default {
}, },
afterRender(data) {}, afterRender(data) {},
}, },
data() {
return {
pickerOptions0: {
disabledDate(time) {
let curDate = new Date().getTime();
let three = 90 * 24 * 3600 * 1000;
let threeMonths = curDate - three;
return time.getTime() > Date.now() || time.getTime() < threeMonths;
},
},
freshDate: "",
submitLoad: false,
btnLoading: false,
btnFreshLoading: false,
dialogOpen: false,
showBtn: false,
progress: false,
isExport: false,
percent: 0,
upload: {
headers: {
Authorization: window.sessionStorage.getItem("token") || "",
},
// 是否显示弹出层(员工关怀信息导入)
open: false,
// 弹出层标题(员工关怀信息导入)
title: "导入员工关怀信息数据",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url:
process.env.VUE_APP_API_BASE_URL +
"/attendance/attendance/record/hik/importData",
},
config: {
isshowTabPane: true,
search: [
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: true,
},
{
name: "workNum",
type: "text",
label: "工号",
fuzzy: false,
},
// {
// name: "deptId",
// type: "select",
// label: "所属部门",
// fuzzy: false
// },
// {
// name: "attendanceGroupId",
// type: "select",
// label: "所属考勤组",
// fuzzy: false
// },
// {
// name: "shiftsId",
// type: "select",
// label: "班次",
// fuzzy: false
// },
{
name: "attendanceDateStart",
type: "date",
label: "考勤开始时间",
fuzzy: false,
},
{
name: "attendanceDateEnd",
type: "date",
label: "考勤结束时间",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 },
{ label: "员工姓名", prop: "staffName" },
{ label: "工号", prop: "workNum" },
{
label: "大厅",
prop: "salaName",
formatter: this.formatter,
show: true,
},
{
label: "部门",
prop: "deptName",
formatter: this.formatter,
show: true,
},
// {label: "考勤组", prop: "attendanceGroupName"},
// {label: "职位", prop: "positionName"},
// {label: "班次", prop: "shiftsName"},
{
label: "考勤时间",
prop: "attendanceDate",
formatter: this.formatterDate,
},
{ label: "考勤点名称", prop: "attendanceAddress" },
{ label: "事件源", prop: "eventSource" },
// {
// label: "操作",
// width: 240,
// formatter: row => {
// return (
// <table-buttons noAdd noDel noEdit noView row={row}
// onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
// )
// }
// }
],
},
drawerhistory: false,
exportList: [],
baseUrl: process.env.VUE_APP_API_BASE_URL + "/",
};
},
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="mt20" style="text-align:right"> <div class="mt20" style="text-align: right">
<el-button @click="handleCancel(1)">取消</el-button> <el-button @click="handleCancel(1)">取消</el-button>
<el-button type="primary" @click="handleSubmit(1)">确定</el-button> <el-button type="primary" @click="handleSubmit(1)">确定</el-button>
</div> </div>
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="mt20" style="text-align:right"> <div class="mt20" style="text-align: right">
<el-button @click="handleCancel(2)">取消</el-button> <el-button @click="handleCancel(2)">取消</el-button>
<el-button type="primary" @click="handleSubmit(2)">确定</el-button> <el-button type="primary" @click="handleSubmit(2)">确定</el-button>
</div> </div>
...@@ -232,6 +232,238 @@ export default { ...@@ -232,6 +232,238 @@ export default {
TabPane, TabPane,
}, },
mixins: [table], mixins: [table],
data() {
return {
// 导出按钮加载状态
isExport: false,
// 动态新增列表
addColumn: [],
// 是否显示进度
progress: false,
// 进度展示绑定值
percent: 0,
// 上传配置项
upload: {
// 是否显示弹出层(员工关怀信息导入)
open: false,
// 弹出层标题(员工关怀信息导入)
title: "每日打卡记录",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url: "/attendance/record/importData",
},
/** 子表列元素 */
columnSet: [
{ prop: "shiftsName", label: "班次名称", width: 150, show: true },
{
prop: "goWorkDate",
label: "上班打卡时间",
width: 100,
formatter: this.formatterDate,
show: true,
},
{
prop: "goWorkResult",
label: "上班打卡结果",
width: 100,
formatter: this.formatterString,
show: true,
},
{
prop: "offWorkDate",
label: "下班打卡时间",
width: 100,
formatter: this.formatterDate,
show: true,
},
{
prop: "offWorkResult",
label: "下班打卡结果",
width: 100,
formatter: this.formatterString,
show: true,
},
],
// 表格配置项
config: {
showType: "tableSelect",
search: [
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: true,
},
// {
// name: "workNum",
// type: "text",
// label: "员工工号",
// fuzzy: true,
// },
// {
// name: "phone",
// type: "text",
// label: "手机号",
// fuzzy: true,
// },
{
name: "salaId",
type: "selectSalaId",
label: "大厅",
fuzzy: false,
},
{
name: "deptId",
type: "selectDeptId",
label: "部门",
fuzzy: false,
},
{
name: "groupId",
type: "select",
label: "所属考勤组",
fuzzy: false,
},
{
name: "classId",
type: "select",
label: "班次",
fuzzy: false,
},
// {
// name: "punchResult",
// type: "select",
// label: "打卡结果",
// fuzzy: false,
// },
{
name: "attendanceDateStart",
type: "date",
label: "考勤开始时间",
fuzzy: false,
},
{
name: "attendanceDateEnd",
type: "date",
label: "考勤结束时间",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 60, show: true },
{ type: "index", label: "序号", width: 50, show: true },
{
label: "打卡日期",
prop: "attendanceDate",
formatter: this.formatterDateOnly,
show: true,
},
{ label: "员工姓名", prop: "staffName", show: true },
{ label: "员工工号", prop: "workNum", show: true },
{
label: "考勤组",
prop: "attendanceGroupName",
show: true,
},
{
label: "大厅",
prop: "salaName",
formatter: this.formatter,
show: true,
},
{
label: "部门",
prop: "deptName",
formatter: this.formatter,
show: true,
},
{ label: "职位", prop: "positionName", show: true },
{
label: "班次",
prop: "classId",
formatter: this.formatter,
show: true,
},
// {
// label: "签到结果",
// prop: "signInResult",
// formatter: this.formatter,
// show: true,
// },
// {
// label: "签退结果",
// prop: "signOutResult",
// formatter: this.formatter,
// show: true,
// },
// {
// label: "打卡结果",
// prop: "punchResult",
// formatter: this.formatter,
// show: true,
// },
// {
// label: "考勤类型",
// prop: "attendType",
// formatter: this.formatter,
// show: true,
// },
// {
// label: "考勤打卡记录详细信息",
// width: 120,
// prop: "subColumns",
// show: true,
// formatter: (row) => {
// let widthsize = this.columnSet.reduce((pre, cur) => {
// return pre + Number(cur.width);
// }, 50);
// return (
// <el-popover placement="right" width={widthsize} trigger="click">
// {this.renderTable(row.attendanceRecordDetailList)}
// <el-button type="text" slot="reference">
// 详细
// </el-button>
// </el-popover>
// );
// },
// },
// {
// label: "操作",
// width: 240,
// formatter: row => {
// return (
// <table-buttons noAdd noEdit noView noDel
// row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
// );
// }
// }
],
},
// 是否显示历史
drawerhistory: false,
// 是否显示弹窗
isdialog: false,
// 设置列表
setcolum: [],
// 选中列表
checkList: [],
// 是否显示设置弹窗
setDialog: false,
// 选中项列表
checkTableList: [],
//导出记录
exportList: [],
baseUrl: process.env.VUE_APP_API_BASE_URL + "/",
initalArr: [],
// 绑定对象值
attendStatInfo: {},
};
},
computed: { computed: {
thirdList() { thirdList() {
if (!this.$store.state.CurrentThirdArr) return []; if (!this.$store.state.CurrentThirdArr) return [];
...@@ -241,6 +473,7 @@ export default { ...@@ -241,6 +473,7 @@ export default {
return this.$store.state.ThirdPath; return this.$store.state.ThirdPath;
}, },
}, },
created() { created() {
this.$post("/attendance/record/stat", {}).then((res) => { this.$post("/attendance/record/stat", {}).then((res) => {
if (res.code === 1) { if (res.code === 1) {
...@@ -341,7 +574,7 @@ export default { ...@@ -341,7 +574,7 @@ export default {
return "-"; return "-";
} }
}, },
// 该表状态
changeStatus(item) { changeStatus(item) {
this.$set(item, "islook", !item.islook); this.$set(item, "islook", !item.islook);
}, },
...@@ -399,6 +632,7 @@ export default { ...@@ -399,6 +632,7 @@ export default {
submitFileForm() { submitFileForm() {
this.$refs.upload.submit(); this.$refs.upload.submit();
}, },
// 导出倒计时操作
countDown() { countDown() {
if (this.percent == 95) { if (this.percent == 95) {
let params = {}; let params = {};
...@@ -437,7 +671,7 @@ export default { ...@@ -437,7 +671,7 @@ export default {
} else { } else {
this.percent = this.percent + 1; this.percent = this.percent + 1;
let that = this; let that = this;
setTimeout(function() { setTimeout(function () {
that.countDown(); that.countDown();
}, 100); }, 100);
} }
...@@ -469,6 +703,7 @@ export default { ...@@ -469,6 +703,7 @@ export default {
this.countDown(); this.countDown();
} }
}, },
// 检验日期格式
checkDate(startTime, endTime, compDay) { checkDate(startTime, endTime, compDay) {
if (startTime == "" || startTime == null || startTime == undefined) { if (startTime == "" || startTime == null || startTime == undefined) {
this.$message.error("开始时间为空,请检查!"); this.$message.error("开始时间为空,请检查!");
...@@ -492,6 +727,7 @@ export default { ...@@ -492,6 +727,7 @@ export default {
// } // }
return false; return false;
}, },
// 表格设置弹窗操作
setdialog(i) { setdialog(i) {
if (i == 1) { if (i == 1) {
this.isdialog = true; this.isdialog = true;
...@@ -511,6 +747,7 @@ export default { ...@@ -511,6 +747,7 @@ export default {
}); });
} }
}, },
// 处理渲染表格数据
renderTable(tableData) { renderTable(tableData) {
return ( return (
<el-table stripe data={tableData} class="total-table"> <el-table stripe data={tableData} class="total-table">
...@@ -518,6 +755,7 @@ export default { ...@@ -518,6 +755,7 @@ export default {
</el-table> </el-table>
); );
}, },
// 处理表格表头项
renderTableColumn(options) { renderTableColumn(options) {
return ( return (
<el-table-column <el-table-column
...@@ -540,6 +778,7 @@ export default { ...@@ -540,6 +778,7 @@ export default {
toView(row) { toView(row) {
this.$refs.drawerform.view(row); this.$refs.drawerform.view(row);
}, },
// 切换点击事件
handleClick(key) { handleClick(key) {
console.log(key); console.log(key);
this.$store.commit("setThirdPath", key); this.$store.commit("setThirdPath", key);
...@@ -548,225 +787,6 @@ export default { ...@@ -548,225 +787,6 @@ export default {
}); });
}, },
}, },
data() {
return {
isExport: false,
// 动态新增列表
addColumn: [],
progress: false,
percent: 0,
upload: {
// 是否显示弹出层(员工关怀信息导入)
open: false,
// 弹出层标题(员工关怀信息导入)
title: "每日打卡记录",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 上传的地址
url: "/attendance/record/importData",
},
/** 子表列元素 */
columnSet: [
{ prop: "shiftsName", label: "班次名称", width: 150, show: true },
{
prop: "goWorkDate",
label: "上班打卡时间",
width: 100,
formatter: this.formatterDate,
show: true,
},
{
prop: "goWorkResult",
label: "上班打卡结果",
width: 100,
formatter: this.formatterString,
show: true,
},
{
prop: "offWorkDate",
label: "下班打卡时间",
width: 100,
formatter: this.formatterDate,
show: true,
},
{
prop: "offWorkResult",
label: "下班打卡结果",
width: 100,
formatter: this.formatterString,
show: true,
},
],
config: {
showType: "tableSelect",
search: [
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: true,
},
// {
// name: "workNum",
// type: "text",
// label: "员工工号",
// fuzzy: true,
// },
// {
// name: "phone",
// type: "text",
// label: "手机号",
// fuzzy: true,
// },
{
name: "salaId",
type: "selectSalaId",
label: "大厅",
fuzzy: false,
},
{
name: "deptId",
type: "selectDeptId",
label: "部门",
fuzzy: false,
},
{
name: "groupId",
type: "select",
label: "所属考勤组",
fuzzy: false,
},
{
name: "classId",
type: "select",
label: "班次",
fuzzy: false,
},
// {
// name: "punchResult",
// type: "select",
// label: "打卡结果",
// fuzzy: false,
// },
{
name: "attendanceDateStart",
type: "date",
label: "考勤开始时间",
fuzzy: false,
},
{
name: "attendanceDateEnd",
type: "date",
label: "考勤结束时间",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 60, show: true },
{ type: "index", label: "序号", width: 50, show: true },
{
label: "打卡日期",
prop: "attendanceDate",
formatter: this.formatterDateOnly,
show: true,
},
{ label: "员工姓名", prop: "staffName", show: true },
{ label: "员工工号", prop: "workNum", show: true },
{
label: "考勤组",
prop: "attendanceGroupName",
show: true,
},
{
label: "大厅",
prop: "salaName",
formatter: this.formatter,
show: true,
},
{
label: "部门",
prop: "deptName",
formatter: this.formatter,
show: true,
},
{ label: "职位", prop: "positionName", show: true },
{
label: "班次",
prop: "classId",
formatter: this.formatter,
show: true,
},
// {
// label: "签到结果",
// prop: "signInResult",
// formatter: this.formatter,
// show: true,
// },
// {
// label: "签退结果",
// prop: "signOutResult",
// formatter: this.formatter,
// show: true,
// },
// {
// label: "打卡结果",
// prop: "punchResult",
// formatter: this.formatter,
// show: true,
// },
// {
// label: "考勤类型",
// prop: "attendType",
// formatter: this.formatter,
// show: true,
// },
// {
// label: "考勤打卡记录详细信息",
// width: 120,
// prop: "subColumns",
// show: true,
// formatter: (row) => {
// let widthsize = this.columnSet.reduce((pre, cur) => {
// return pre + Number(cur.width);
// }, 50);
// return (
// <el-popover placement="right" width={widthsize} trigger="click">
// {this.renderTable(row.attendanceRecordDetailList)}
// <el-button type="text" slot="reference">
// 详细
// </el-button>
// </el-popover>
// );
// },
// },
// {
// label: "操作",
// width: 240,
// formatter: row => {
// return (
// <table-buttons noAdd noEdit noView noDel
// row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
// );
// }
// }
],
},
drawerhistory: false,
isdialog: false,
setcolum: [],
checkList: [],
setDialog: false,
checkTableList: [],
exportList: [], //导出记录
baseUrl: process.env.VUE_APP_API_BASE_URL + "/",
initalArr: [],
attendStatInfo: {},
};
},
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
......
...@@ -16,23 +16,9 @@ export default { ...@@ -16,23 +16,9 @@ export default {
dialogShow, dialogShow,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.dialogform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.dialogform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.dialogform.view(row);
},
},
data() { data() {
return { return {
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -78,5 +64,20 @@ export default { ...@@ -78,5 +64,20 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.dialogform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.dialogform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.dialogform.view(row);
},
},
}; };
</script> </script>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="mt20" style="text-align:right"> <div class="mt20" style="text-align: right">
<el-button @click="handleCancel(1)">取消</el-button> <el-button @click="handleCancel(1)">取消</el-button>
<el-button type="primary" @click="handleSubmit(1)">确定</el-button> <el-button type="primary" @click="handleSubmit(1)">确定</el-button>
</div> </div>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="mt20" style="text-align:right"> <div class="mt20" style="text-align: right">
<el-button @click="handleCancel(2)">取消</el-button> <el-button @click="handleCancel(2)">取消</el-button>
<el-button type="primary" @click="handleSubmit(2)">确定</el-button> <el-button type="primary" @click="handleSubmit(2)">确定</el-button>
</div> </div>
...@@ -120,9 +120,7 @@ ...@@ -120,9 +120,7 @@
<div>打卡记录汇总</div> <div>打卡记录汇总</div>
<el-button type="text">导出成功</el-button> <el-button type="text">导出成功</el-button>
</div> </div>
<div class="times"> <div class="times">导出时间:2020-08-13</div>
导出时间:2020-08-13
</div>
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
...@@ -137,7 +135,7 @@ ...@@ -137,7 +135,7 @@
:show-close="false" :show-close="false"
> >
<div class="fresh_box" v-if="showContent"> <div class="fresh_box" v-if="showContent">
<div class="title_box" style="margin-bottom: 20px;"> <div class="title_box" style="margin-bottom: 20px">
仅支持手动更新前一天及当日的打卡数据,请选择需要更新的时间段: 仅支持手动更新前一天及当日的打卡数据,请选择需要更新的时间段:
</div> </div>
<el-date-picker <el-date-picker
...@@ -154,23 +152,23 @@ ...@@ -154,23 +152,23 @@
<div class="fresh_box" v-else> <div class="fresh_box" v-else>
<div <div
class="title_box" class="title_box"
style="margin-bottom: 20px;line-height: 30px;" style="margin-bottom: 20px; line-height: 30px"
v-if="showTip" v-if="showTip"
> >
请确认是否开始进行{{ 请确认是否开始进行{{
freshDate[0] + "" + freshDate[1] freshDate[0] + "" + freshDate[1]
}}的考勤数据重新汇总;此过程预计需要 }}的考勤数据重新汇总;此过程预计需要
<span style="color:#ff0000 ;">10</span> 分钟左右,请勿关闭或刷新页面 <span style="color: #ff0000">10</span> 分钟左右,请勿关闭或刷新页面
</div> </div>
<div <div
class="title_box" class="title_box"
style="margin-bottom: 20px;line-height: 30px;" style="margin-bottom: 20px; line-height: 30px"
v-else v-else
> >
正在进行{{ 正在进行{{
freshDate[0] + "" + freshDate[1] freshDate[0] + "" + freshDate[1]
}}的考勤数据重新汇总;此过程预计还需要 }}的考勤数据重新汇总;此过程预计还需要
<span style="color:#ff0000 ;">{{ restTime }}</span> <span style="color: #ff0000">{{ restTime }}</span>
分钟左右,请勿关闭或刷新页面 分钟左右,请勿关闭或刷新页面
</div> </div>
</div> </div>
...@@ -211,6 +209,253 @@ export default { ...@@ -211,6 +209,253 @@ export default {
dialogShow, dialogShow,
}, },
mixins: [table], mixins: [table],
data() {
return {
showTip: true,
showContent: true,
endTime: "",
restTime: "10",
pickerOptions0: {
disabledDate(v) {
let limitDate =
v.getTime() < new Date().getTime() - 2 * 86400000 ||
v.getTime() > Date.now();
return limitDate;
7;
},
},
freshDate: "",
submitLoad: false,
btnFreshLoading: false,
dialogOpen: false,
showBtn: true,
isExport: false,
config: {
showType: "tableSelect",
isshowTabPane: true,
height: "680px",
search: [
{
name: "salaId",
type: "selectSalaId",
label: "大厅",
fuzzy: false,
},
{
name: "deptId",
type: "selectDeptId",
label: "部门",
fuzzy: false,
},
// {
// name: "groupId",
// type: "select",
// label: "全部考勤组",
// fuzzy: false,
// },
// {
// name: "classId",
// type: "select",
// label: "全部班次",
// fuzzy: false,
// },
{
name: "summaryTimeStart",
type: "date",
label: "考勤开始时间",
fuzzy: false,
},
{
name: "summaryTimeEnd",
type: "date",
label: "考勤结束时间",
fuzzy: false,
},
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: true,
},
],
columns: [
{ type: "selection", width: 60, fixed: "left", show: true },
{
type: "index",
label: "序号",
width: 50,
fixed: "left",
show: true,
},
{
label: "窗口类别",
prop: "windowCategory",
fixed: "left",
width: 100,
formatter: this.formatter,
show: true,
},
{
label: "员工姓名",
prop: "staffName",
fixed: "left",
width: 100,
show: true,
},
{
label: "大厅",
prop: "salaName",
formatter: this.formatter,
show: true,
},
{
label: "部门",
prop: "deptName",
formatter: this.formatter,
show: true,
},
{
label: "应到",
prop: "workDays",
formatter: this.formatter,
show: true,
},
{
label: "实到",
prop: "goTimes",
formatter: (row) => {
return row.goTimes == 0 ? 0 : row.goTimes ? row.goTimes : "--";
},
show: true,
},
{
label: "出勤率%",
prop: "attendanceRate",
formatter: (row) => {
return row.attendanceRate
? (Number(row.attendanceRate) * 100).toFixed(2) + "%"
: "--";
},
show: true,
},
{
label: "缺卡次数",
prop: "morningTimes",
formatter: this.formatter,
show: true,
},
// {
// label: "上午缺卡次数",
// prop: "morningTimes",
// formatter: this.formatter,
// },
// {
// label: "下午缺卡次数",
// prop: "afternoonTimes",
// formatter: this.formatter,
// },
{ label: "回单位(天)", prop: "backToUnit", show: true },
{ label: "因公请假(天)", prop: "onDutyLeave", show: true },
{ label: "外出勘验(天)", prop: "outOfOffice", show: true },
{ label: "值班补班(天)", prop: "shiftCompensation", show: true },
{ label: "体检(天)", prop: "physicalExamination", show: true },
{ label: "隔离(天)", prop: "quarantine", show: true },
{
label: "因公外出(与窗口工作无关/天)",
prop: "businessTrip",
show: true,
width: 140,
},
{ label: "公休(天)", prop: "publicHoliday", show: true },
{ label: "病假(天)", prop: "sickLeave", show: true },
{ label: "丧假(天)", prop: "funeralLeave", show: true },
{ label: "婚假(天)", prop: "marriageLeave", show: true },
{ label: "育儿假(天)", prop: "childRearingLeave", show: true },
{
label: "产假(陪护假/天)",
prop: "maternityLeave",
show: true,
width: 140,
},
{
label: "调回单位(或离职/天)",
prop: "transferBack",
show: true,
width: 140,
},
{ label: "探亲假(天)", prop: "homeLeave", show: true },
{ label: "事假(天)", prop: "personalLeave", show: true },
{ label: "旷工(天)", prop: "absenteeismDays", show: true },
{ label: "其他(天)", prop: "otherDays", show: true },
{
label: "未按规定打卡(含忘记打卡)",
prop: "nonCompliancePunch",
show: true,
width: 140,
},
{ label: "迟到(次)", prop: "lateTimes", show: true },
{ label: "上网耍手机(次)", prop: "surfingMobileTimes", show: true },
{ label: "溜班/早退(次)", prop: "overtimeTimes", show: true },
{ label: "空岗(次)", prop: "vacancy", show: true },
{
label: "未规范着装(次)",
prop: "nonStandardDressTimes",
show: true,
},
{
label: "无故缺席会议(次)",
prop: "unexcusedMeetingAbsence",
show: true,
width: 140,
},
{ label: "会议早退", prop: "earlyLeaveMeeting", show: true },
],
},
// 设置表头
setcolum: [],
// 是否展示弹窗
isdialog: false,
// 是否展示设置弹窗
setDialog: false,
// 表格选中列表
checkTableList: [],
// 列表绑定值
checkList: [],
// 是否展示历史记录
drawerhistory: false,
// 动态新增列表
addColumn: [],
initalArr: [],
};
},
created() { created() {
this.query.summaryTimeStart = getFirstDay(); this.query.summaryTimeStart = getFirstDay();
this.query.summaryTimeEnd = getLastDay(); this.query.summaryTimeEnd = getLastDay();
...@@ -243,11 +488,12 @@ export default { ...@@ -243,11 +488,12 @@ export default {
this.getData(); this.getData();
return; return;
} }
setTimeout(function() { setTimeout(function () {
that.countdown(); that.countdown();
}, 1000); }, 1000);
} }
}, },
// 手动更新操作
submitFresh() { submitFresh() {
console.log(this.freshDate); console.log(this.freshDate);
if (this.freshDate) { if (this.freshDate) {
...@@ -278,6 +524,7 @@ export default { ...@@ -278,6 +524,7 @@ export default {
this.$message.error("请选择时间范围!"); this.$message.error("请选择时间范围!");
} }
}, },
// 取消手动更新
cancleFresh() { cancleFresh() {
this.dialogOpen = false; this.dialogOpen = false;
this.btnFreshLoading = false; this.btnFreshLoading = false;
...@@ -378,9 +625,11 @@ export default { ...@@ -378,9 +625,11 @@ export default {
return "--"; return "--";
} }
}, },
// 重置表格
restTable() { restTable() {
this.getTable(); this.getTable();
}, },
// 获取数据后处理
afterRender(data) { afterRender(data) {
this.addColumn = getdiffdate( this.addColumn = getdiffdate(
this.query.summaryTimeStart, this.query.summaryTimeStart,
...@@ -417,6 +666,7 @@ export default { ...@@ -417,6 +666,7 @@ export default {
this.$refs.layoutTable.showType = "tableSelect"; this.$refs.layoutTable.showType = "tableSelect";
this.$forceUpdate(); this.$forceUpdate();
}, },
// 获取数据前处理
beforeRender(row) { beforeRender(row) {
this.tableData.dict = row.dict; this.tableData.dict = row.dict;
row.data.forEach((element) => { row.data.forEach((element) => {
...@@ -500,6 +750,7 @@ export default { ...@@ -500,6 +750,7 @@ export default {
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
//表格设置弹窗
setdialog(i) { setdialog(i) {
if (i == 1) { if (i == 1) {
this.isdialog = true; this.isdialog = true;
...@@ -524,6 +775,7 @@ export default { ...@@ -524,6 +775,7 @@ export default {
}); });
} }
}, },
//查看历史记录
lookexportHis() { lookexportHis() {
this.drawerhistory = true; this.drawerhistory = true;
}, },
...@@ -560,247 +812,6 @@ export default { ...@@ -560,247 +812,6 @@ export default {
}); });
}, },
}, },
data() {
return {
showTip: true,
showContent: true,
endTime: "",
restTime: "10",
pickerOptions0: {
disabledDate(v) {
let limitDate =
v.getTime() < new Date().getTime() - 2 * 86400000 ||
v.getTime() > Date.now();
return limitDate;
7;
},
},
freshDate: "",
submitLoad: false,
btnFreshLoading: false,
dialogOpen: false,
showBtn: true,
isExport: false,
config: {
showType: "tableSelect",
isshowTabPane: true,
height: "680px",
search: [
{
name: "salaId",
type: "selectSalaId",
label: "大厅",
fuzzy: false,
},
{
name: "deptId",
type: "selectDeptId",
label: "部门",
fuzzy: false,
},
// {
// name: "groupId",
// type: "select",
// label: "全部考勤组",
// fuzzy: false,
// },
// {
// name: "classId",
// type: "select",
// label: "全部班次",
// fuzzy: false,
// },
{
name: "summaryTimeStart",
type: "date",
label: "考勤开始时间",
fuzzy: false,
},
{
name: "summaryTimeEnd",
type: "date",
label: "考勤结束时间",
fuzzy: false,
},
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: true,
},
],
columns: [
{ type: "selection", width: 60, fixed: "left", show: true },
{
type: "index",
label: "序号",
width: 50,
fixed: "left",
show: true,
},
{
label: "窗口类别",
prop: "windowCategory",
fixed: "left",
width: 100,
formatter: this.formatter,
show: true,
},
{
label: "员工姓名",
prop: "staffName",
fixed: "left",
width: 100,
show: true,
},
{
label: "大厅",
prop: "salaName",
formatter: this.formatter,
show: true,
},
{
label: "部门",
prop: "deptName",
formatter: this.formatter,
show: true,
},
{
label: "应到",
prop: "workDays",
formatter: this.formatter,
show: true,
},
{
label: "实到",
prop: "goTimes",
formatter: (row) => {
return row.goTimes == 0 ? 0 : row.goTimes ? row.goTimes : "--";
},
show: true,
},
{
label: "出勤率%",
prop: "attendanceRate",
formatter: (row) => {
return row.attendanceRate
? (Number(row.attendanceRate) * 100).toFixed(2) + "%"
: "--";
},
show: true,
},
{
label: "缺卡次数",
prop: "morningTimes",
formatter: this.formatter,
show: true,
},
// {
// label: "上午缺卡次数",
// prop: "morningTimes",
// formatter: this.formatter,
// },
// {
// label: "下午缺卡次数",
// prop: "afternoonTimes",
// formatter: this.formatter,
// },
{ label: "回单位(天)", prop: "backToUnit", show: true },
{ label: "因公请假(天)", prop: "onDutyLeave", show: true },
{ label: "外出勘验(天)", prop: "outOfOffice", show: true },
{ label: "值班补班(天)", prop: "shiftCompensation", show: true },
{ label: "体检(天)", prop: "physicalExamination", show: true },
{ label: "隔离(天)", prop: "quarantine", show: true },
{
label: "因公外出(与窗口工作无关/天)",
prop: "businessTrip",
show: true,
width: 140,
},
{ label: "公休(天)", prop: "publicHoliday", show: true },
{ label: "病假(天)", prop: "sickLeave", show: true },
{ label: "丧假(天)", prop: "funeralLeave", show: true },
{ label: "婚假(天)", prop: "marriageLeave", show: true },
{ label: "育儿假(天)", prop: "childRearingLeave", show: true },
{
label: "产假(陪护假/天)",
prop: "maternityLeave",
show: true,
width: 140,
},
{
label: "调回单位(或离职/天)",
prop: "transferBack",
show: true,
width: 140,
},
{ label: "探亲假(天)", prop: "homeLeave", show: true },
{ label: "事假(天)", prop: "personalLeave", show: true },
{ label: "旷工(天)", prop: "absenteeismDays", show: true },
{ label: "其他(天)", prop: "otherDays", show: true },
{
label: "未按规定打卡(含忘记打卡)",
prop: "nonCompliancePunch",
show: true,
width: 140,
},
{ label: "迟到(次)", prop: "lateTimes", show: true },
{ label: "上网耍手机(次)", prop: "surfingMobileTimes", show: true },
{ label: "溜班/早退(次)", prop: "overtimeTimes", show: true },
{ label: "空岗(次)", prop: "vacancy", show: true },
{
label: "未规范着装(次)",
prop: "nonStandardDressTimes",
show: true,
},
{
label: "无故缺席会议(次)",
prop: "unexcusedMeetingAbsence",
show: true,
width: 140,
},
{ label: "会议早退", prop: "earlyLeaveMeeting", show: true },
],
},
setcolum: [],
isdialog: false,
setDialog: false,
checkTableList: [],
checkList: [],
drawerhistory: false,
// 动态新增列表
addColumn: [],
initalArr: [],
};
},
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:disabled="isExport" :disabled="isExport"
size="mini" size="mini"
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px;" style="margin-left: 10px"
>导出</el-button >导出</el-button
> >
</LayoutTable> </LayoutTable>
...@@ -25,45 +25,9 @@ export default { ...@@ -25,45 +25,9 @@ export default {
drawerShow, drawerShow,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
// 导出
doExport() {
this.isExport = true;
let params = {};
for (let value of this.config.search) {
if (this.query[value.name]) {
params[value.name] = this.query[value.name];
}
}
if (this.selection.length > 0) {
params["idList"] = this.selection;
}
this.$download(
"/attendance/vacation/balance/exportExcel",
{
...params,
},
{ type: "excel", name: "员工假期余额" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 查看不同类型假期记录 */
handleCountDays(row, column, val) {
this.$refs.drawerform.view({
type: this.util_formatter("AllHolidays", column.property),
staffId: row.staffId,
id: row.id,
val,
});
},
},
data() { data() {
return { return {
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -153,5 +117,42 @@ export default { ...@@ -153,5 +117,42 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
// 导出
doExport() {
this.isExport = true;
let params = {};
for (let value of this.config.search) {
if (this.query[value.name]) {
params[value.name] = this.query[value.name];
}
}
if (this.selection.length > 0) {
params["idList"] = this.selection;
}
this.$download(
"/attendance/vacation/balance/exportExcel",
{
...params,
},
{ type: "excel", name: "员工假期余额" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 查看不同类型假期记录 */
handleCountDays(row, column, val) {
this.$refs.drawerform.view({
type: this.util_formatter("AllHolidays", column.property),
staffId: row.staffId,
id: row.id,
val,
});
},
},
}; };
</script> </script>
...@@ -71,86 +71,6 @@ export default { ...@@ -71,86 +71,6 @@ export default {
drawerShow, drawerShow,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "考勤绩效记录核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/attend/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/attend/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "考勤绩效记录核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
data() { data() {
return { return {
// 用户导入参数 // 用户导入参数
...@@ -166,7 +86,9 @@ export default { ...@@ -166,7 +86,9 @@ export default {
// 上传的地址 // 上传的地址
url: "/attendance/check/attend/record/importData", url: "/attendance/check/attend/record/importData",
}, },
// 导出加载状态
isExport: false, isExport: false,
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -346,5 +268,86 @@ export default { ...@@ -346,5 +268,86 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
// 图片凭证点击操作
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "考勤绩效记录核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/attend/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/attend/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "考勤绩效记录核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
}; };
</script> </script>
...@@ -71,86 +71,6 @@ export default { ...@@ -71,86 +71,6 @@ export default {
drawerShow, drawerShow,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "评价绩效投诉核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/complain/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/complain/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "评价绩效投诉核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
data() { data() {
return { return {
// 用户导入参数 // 用户导入参数
...@@ -166,8 +86,9 @@ export default { ...@@ -166,8 +86,9 @@ export default {
// 上传的地址 // 上传的地址
url: "/m/check/complain/record/importData", url: "/m/check/complain/record/importData",
}, },
// 导出按钮加载项
isExport: false, isExport: false,
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -358,5 +279,86 @@ export default { ...@@ -358,5 +279,86 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
// 图片凭证点击事件
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "评价绩效投诉核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/complain/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/complain/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "评价绩效投诉核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
}; };
</script> </script>
...@@ -72,86 +72,6 @@ export default { ...@@ -72,86 +72,6 @@ export default {
drawerShow, drawerShow,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "效能绩效核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/effect/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/effect/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "效能绩效核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
data() { data() {
return { return {
// 用户导入参数 // 用户导入参数
...@@ -167,7 +87,9 @@ export default { ...@@ -167,7 +87,9 @@ export default {
// 上传的地址 // 上传的地址
url: "/m/check/effect/record/importData", url: "/m/check/effect/record/importData",
}, },
// 导出按钮加载状态
isExport: false, isExport: false,
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -366,5 +288,86 @@ export default { ...@@ -366,5 +288,86 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
// 图片凭证点击操作
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "效能绩效核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/effect/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/effect/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "效能绩效核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
}; };
</script> </script>
...@@ -71,86 +71,6 @@ export default { ...@@ -71,86 +71,6 @@ export default {
drawerShow, drawerShow,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "办件绩效核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/gowork/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/gowork/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "办件绩效核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
data() { data() {
return { return {
// 用户导入参数 // 用户导入参数
...@@ -166,8 +86,9 @@ export default { ...@@ -166,8 +86,9 @@ export default {
// 上传的地址 // 上传的地址
url: "/m/check/gowork/record/importData", url: "/m/check/gowork/record/importData",
}, },
// 导出按钮加载状态
isExport: false, isExport: false,
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -330,5 +251,86 @@ export default { ...@@ -330,5 +251,86 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
// 图片凭证点击操作
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "办件绩效核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/gowork/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/gowork/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "办件绩效核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
}; };
</script> </script>
...@@ -71,86 +71,6 @@ export default { ...@@ -71,86 +71,6 @@ export default {
drawerShow, drawerShow,
}, },
mixins: [table], mixins: [table],
created() {},
methods: {
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "其它绩效核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/other/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/other/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "其他绩效核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
data() { data() {
return { return {
// 用户导入参数 // 用户导入参数
...@@ -166,7 +86,9 @@ export default { ...@@ -166,7 +86,9 @@ export default {
// 上传的地址 // 上传的地址
url: "/m/check/other/record/importData", url: "/m/check/other/record/importData",
}, },
// 导出按钮加载状态
isExport: false, isExport: false,
// 表格配置项
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -339,5 +261,86 @@ export default { ...@@ -339,5 +261,86 @@ export default {
}, },
}; };
}, },
created() {},
methods: {
// 图片凭证点击操作
handleCellClick(row, column, event, cell) {
if (column.label == "图片凭证") {
const suffix = `(bmp|jpg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp|jpeg)`;
const regular = new RegExp(`.*\.${suffix}`);
regular.test(row.filePaths);
if (!regular.test(row.filePaths)) {
downloadFile(row.filePaths, row.fileName);
}
}
},
/** 导入 */
handleImport() {
this.upload.title = "其它绩效核查信息导入";
this.upload.open = true;
},
/** 下载模板操作 */
downloadTemplate() {
this.isExport = true;
this.$download(
"/check/other/record/downloadTemplate",
{},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 文件上传中处理 */
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getData();
},
/** 提交上传文件 */
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出Excel */
doExport() {
this.isExport = true;
this.$download(
"/check/other/record/exportExcel",
{
...this.query,
page: 1,
size: -1,
},
{ type: "excel", name: "其他绩效核查信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
});
},
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row);
},
},
}; };
</script> </script>
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