|
|
@@ -18,12 +18,15 @@ Page({
|
|
|
data: {
|
|
|
// 查询条件
|
|
|
searchContent: [],
|
|
|
-
|
|
|
+ active: 0,
|
|
|
+ tagList: [{ title: "全部" }, { title: "在职" }, { title: "离职" }],
|
|
|
// 列表区(内容)
|
|
|
contentList: [
|
|
|
{ name: 'staffCode', title: '员工编码' },
|
|
|
{ name: 'staffPhone', title: '员工电话' },
|
|
|
- { name: 'orgName', title: '业务部门' }],
|
|
|
+ { name: 'orgName', title: '业务部门' },
|
|
|
+ { name: 'roleNames', title: '角色名称' },
|
|
|
+ ],
|
|
|
|
|
|
// 弹出按钮
|
|
|
buttonList: [
|
|
|
@@ -31,10 +34,21 @@ Page({
|
|
|
{ name: 'staffPurview', title: '范围权限' }],
|
|
|
|
|
|
totallength: 0, //视图下方提醒数量
|
|
|
-
|
|
|
// 路由
|
|
|
routeObjName: 'staff',
|
|
|
},
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 切换
|
|
|
+ */
|
|
|
+ onChangeTabs(e) {
|
|
|
+ let index = e.detail.detail.index
|
|
|
+ this.setData({
|
|
|
+ active: index,
|
|
|
+ })
|
|
|
+ // 默认查询
|
|
|
+ this.searchData();
|
|
|
+ },
|
|
|
/**
|
|
|
* @desc : 详细页面
|
|
|
* @date : 2024/2/1 15:49
|
|
|
@@ -88,6 +102,17 @@ Page({
|
|
|
return true;
|
|
|
},
|
|
|
|
|
|
+ /**
|
|
|
+ * @desc : 设置额外参数
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 姜永辉
|
|
|
+ */
|
|
|
+ setSearchParams(params) {
|
|
|
+ // 在职离职状态
|
|
|
+ params.hrStatus = (this.data.active == 0? null:this.data.active )
|
|
|
+ return params
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* @desc : 查询
|
|
|
* @date : 2024/2/1 15:49
|
|
|
@@ -102,24 +127,18 @@ Page({
|
|
|
* @date : 2024/2/1 15:49
|
|
|
* @author : 姜永辉
|
|
|
*/
|
|
|
- handleData(data) {
|
|
|
- // 员工的数量
|
|
|
+ handleSearchData(data) {
|
|
|
+ // 员工的数量
|
|
|
+ let tableData = this.data.tableData || []
|
|
|
+ tableData.forEach(it => {
|
|
|
+ if (it.hrStatus == 0) {
|
|
|
+ it.backgroundColor = 'red'
|
|
|
+ }
|
|
|
+ })
|
|
|
this.setData({
|
|
|
- totallength: data.length
|
|
|
+ tableData
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面加载
|
|
|
- */
|
|
|
- onLoad: function (options) {
|
|
|
- //按钮权限
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面显示
|
|
|
- */
|
|
|
- onShow: function () {
|
|
|
|
|
|
- },
|
|
|
})
|