diff --git a/src/api/common.js b/src/api/common.js
index 1bc9425..0e5fd6e 100644
--- a/src/api/common.js
+++ b/src/api/common.js
@@ -6,7 +6,7 @@ import request from '@/utils/request'
export function getCompanySelectListAPI() {
return request({
url: '/bmw/company/listAll',
- method: 'get',
+ method: 'GET',
})
}
@@ -14,7 +14,7 @@ export function getCompanySelectListAPI() {
export function getMainProjectListAllAPI() {
return request({
url: '/bmw/mainProject/listAll',
- method: 'get',
+ method: 'GET',
})
}
@@ -22,7 +22,7 @@ export function getMainProjectListAllAPI() {
export function getSubCompanySelectListAPI() {
return request({
url: '/bmw/subCompany/listAll',
- method: 'get',
+ method: 'GET',
})
}
@@ -30,7 +30,7 @@ export function getSubCompanySelectListAPI() {
export function getLotProjectSelectListAPI() {
return request({
url: '/bmw/pmProject/listAll',
- method: 'get',
+ method: 'GET',
})
}
@@ -56,3 +56,30 @@ export const getPostTypeSelectListAPI = () => {
method: 'GET',
})
}
+
+// 获取标段工程下拉列表 ----- 携带查询条件的
+export function getLotProjectSelectListByConditionAPI(data) {
+ return request({
+ url: '/bmw/pmProject/listAll',
+ method: 'GET',
+ params: data,
+ })
+}
+
+// 获取分包商下拉列表 ----- 携带查询条件的
+export const getSubSelectListByConditionAPI = (data) => {
+ return request({
+ url: '/bmw/pmSub/listAll',
+ method: 'GET',
+ params: data,
+ })
+}
+
+// 获取班组下拉列表 ----- 携带查询条件的
+export const getTeamSelectListByConditionAPI = (data) => {
+ return request({
+ url: '/bmw/pmSubTeam/listAll',
+ method: 'GET',
+ params: data,
+ })
+}
diff --git a/src/api/construction-person/attendance-manage/attendance-count.js b/src/api/construction-person/attendance-manage/attendance-count.js
index c60cf28..753ac59 100644
--- a/src/api/construction-person/attendance-manage/attendance-count.js
+++ b/src/api/construction-person/attendance-manage/attendance-count.js
@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 获取考勤统计列表
export const getAttendanceCountListAPI = (data) => {
return request({
- url: '/bmw/pmAttDevice/list',
+ url: '/bmw/workerLight/getSubComAttList',
method: 'GET',
params: data,
})
@@ -11,7 +11,7 @@ export const getAttendanceCountListAPI = (data) => {
// 获取工程列表
export const getProjectListAPI = (data) => {
return request({
- url: '/bmw/pmAttDevice/list',
+ url: '/bmw/workerLight/getProAttList',
method: 'GET',
params: data,
})
@@ -19,7 +19,7 @@ export const getProjectListAPI = (data) => {
// 获取分包班组列表
export const getSubTeamListAPI = (data) => {
return request({
- url: '/bmw/pmAttDevice/list',
+ url: '/bmw/workerLight/getTeamAttList',
method: 'GET',
params: data,
})
@@ -35,7 +35,7 @@ export const getSevenDaysNoAttendanceListAPI = (data) => {
// 获取人员列表
export const getPersonListAPI = (data) => {
return request({
- url: '/bmw/pmAttDevice/list',
+ url: '/bmw/workerLight/getWorkerAttList',
method: 'GET',
params: data,
})
@@ -43,7 +43,7 @@ export const getPersonListAPI = (data) => {
// 获取考勤详情列表
export const getAttendanceDetailsListAPI = (data) => {
return request({
- url: '/bmw/pmAttDevice/list',
+ url: '/bmw/workerLight/getWorkerAttListById',
method: 'GET',
params: data,
})
diff --git a/src/components/TableModel/index.vue b/src/components/TableModel/index.vue
index 210dc90..aca6a45 100644
--- a/src/components/TableModel/index.vue
+++ b/src/components/TableModel/index.vue
@@ -68,15 +68,15 @@
/>
@@ -328,7 +328,7 @@ export default {
// 操作列最小宽度
dynamicWidth: 0,
idCount: 1,
- typeList: [],
+ typeList: [], // 日期查询条件
}
},
@@ -364,17 +364,22 @@ export default {
this.queryParams.time &&
this.queryParams.time.length !== 0
) {
- this.queryParams.startTime = this.queryParams.time[0]
- this.queryParams.endTime = this.queryParams.time[1]
+ this.queryParams[this.typeList[0]] =
+ this.queryParams.time[0]
+ this.queryParams[this.typeList[1]] =
+ this.queryParams.time[1]
}
+
+ const params = { ...this.queryParams }
+ delete params.time
console.log(
`%c🔍 列表查询入参 %c`,
'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
'',
- this.queryParams,
+ params,
)
this.loading = true
- const res = await this.requestApi(this.queryParams)
+ const res = await this.requestApi(params)
if (res.code === 200) {
this.tableList = res.rows
this.total = res.total
@@ -397,9 +402,12 @@ export default {
if (this.typeList.length > 0) {
this.queryParams[this.typeList[0]] = ''
this.queryParams[this.typeList[1]] = ''
+ } else {
+ this.queryParams[this.typeList] = ''
}
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
+ this.queryParams.time = []
this.getTableList()
},
/** 级联选择 */
diff --git a/src/views/basic-manage/project-manage/all-project/index.vue b/src/views/basic-manage/project-manage/all-project/index.vue
index c5da3b8..d1823f4 100644
--- a/src/views/basic-manage/project-manage/all-project/index.vue
+++ b/src/views/basic-manage/project-manage/all-project/index.vue
@@ -46,7 +46,7 @@
type="primary"
v-if="data.proStatus !== '' && data.proStatus !== null"
>
- {{ projectStatusList[data.proStatus] || '' }}
+ {{ initProStatus(data.proStatus) }}
-
@@ -236,21 +236,10 @@ export default {
// 子项目(标段工程)概况
lotProjectList: [],
-
- projectStatusList: {
- 0: '在建',
- 1: '停工',
- 2: '筹建',
- 3: '遗留收尾',
- 4: '完工',
- '': '',
- },
}
},
- created() {
- this.projectStatusList = this.dict.type.project_status
- },
+ created() {},
methods: {
// 导出按钮
@@ -369,14 +358,14 @@ export default {
return data || ''
},
- initProStatus(data) {
- if (typeof data === 'string') {
+ initProStatus(status) {
+ if (typeof status === 'string') {
return this.dict.type.project_status.find(
- (item) => item.value == data,
+ (item) => item.value == status,
).label
}
- return data || ''
+ return status || ''
},
},
}
diff --git a/src/views/construction-person/attendance-manage/attendance-count/attendance-details.vue b/src/views/construction-person/attendance-manage/attendance-count/attendance-details.vue
index ed828ab..0b80bd5 100644
--- a/src/views/construction-person/attendance-manage/attendance-count/attendance-details.vue
+++ b/src/views/construction-person/attendance-manage/attendance-count/attendance-details.vue
@@ -9,16 +9,19 @@
label-width="auto"
:model="queryParams"
>
-
-
+
+
+
+
+
+ >
+
+
+
+ 未考勤
+
+
+ 已考勤
+
+
+ 不在场
+
+
+
+ {{ row[item.t_props] || '-' }}
+
+
+
@@ -84,63 +116,59 @@ export default {
components: {
AttendanceCalendar,
},
+ props: {
+ teamId: {
+ type: [String, Number],
+ default: '',
+ },
+ proId: {
+ type: [String, Number],
+ default: '',
+ },
+ idNumber: {
+ type: [String, Number],
+ default: '',
+ },
+ },
data() {
return {
queryParams: {
timeRange: [
- {
- date: '2025-01-01',
- status: '正常',
- time: '08:00:00',
- proName: '工程1',
- checkInMachineName: '考勤机1',
- },
- {
- date: '2025-01-01',
- status: '正常',
- time: '08:00:00',
- proName: '工程1',
- checkInMachineName: '考勤机1',
- },
- {
- date: '2025-01-01',
- status: '正常',
- time: '08:00:00',
- proName: '工程1',
- checkInMachineName: '考勤机1',
- },
- ],
- tableColumns: [
- {
- t_label: '考勤日期',
- t_props: 'date',
- },
- {
- t_label: '考勤状态',
- t_props: 'status',
- },
- {
- t_label: '时间',
- t_props: 'time',
- },
- {
- t_label: '工程名称',
- t_props: 'proName',
- },
- {
- t_label: '考勤机名称',
- t_props: 'checkInMachineName',
- },
+ new Date().toISOString().split('T')[0],
+ new Date().toISOString().split('T')[0],
],
},
-
attendanceList: [],
+ tableColumns: [
+ {
+ t_label: '考勤日期',
+ t_props: 'einDay',
+ },
+ {
+ t_label: '考勤状态',
+ t_props: 'isAtt',
+ slot: true,
+ },
+ {
+ t_label: '时间',
+ t_props: 'attTime',
+ },
+ {
+ t_label: '工程名称',
+ t_props: 'proName',
+ },
+ {
+ t_label: '考勤机名称',
+ t_props: 'deviceName',
+ },
+ ],
}
},
methods: {
// 查询
handleQuery() {
console.log('查询')
+ this.getAttendanceDetailsListData()
},
// 重置
resetQuery() {
@@ -153,8 +181,15 @@ export default {
// 获取考勤详情列表
async getAttendanceDetailsListData() {
- const res = await getAttendanceDetailsListAPI(this.queryParams)
- console.log(res)
+ const params = {
+ teamId: this.teamId,
+ proId: this.proId,
+ idNumber: this.idNumber,
+ startDate: this.queryParams.timeRange[0],
+ endDate: this.queryParams.timeRange[1],
+ }
+ const { rows: res } = await getAttendanceDetailsListAPI(params)
+ this.attendanceList = res
},
},
diff --git a/src/views/construction-person/attendance-manage/attendance-count/config.js b/src/views/construction-person/attendance-manage/attendance-count/config.js
index ec2065c..7d69763 100644
--- a/src/views/construction-person/attendance-manage/attendance-count/config.js
+++ b/src/views/construction-person/attendance-manage/attendance-count/config.js
@@ -1,22 +1,21 @@
export const formLabel = [
{
- f_label: '分公司',
- f_model: 'subComId',
- f_type: 'sel',
+ f_type: 'date',
+ f_label: '日期',
isShow: false, // 是否展示label
- f_selList: [],
+ f_model: 'startDate',
},
]
export const columnsList = [
{ t_label: '分公司', t_slot: 'subComName' },
- { t_props: 'orgName', t_label: '在建工程数量' },
- { t_props: 'proName', t_label: '完工工程数量' },
- { t_slot: 'proType', t_label: '筹建工程数量' },
- { t_props: 'volLevel', t_label: '分包数量' },
- { t_props: 'proAddress', t_label: '班组数量' },
- { t_slot: 'proStatus', t_label: '在场人数' },
- { t_slot: 'proStatus', t_label: '考勤人数' },
+ { t_props: 'buildProNum', t_label: '在建工程数量' },
+ { t_props: 'completedProNum', t_label: '完工工程数量' },
+ { t_props: 'preProNum', t_label: '筹建工程数量' },
+ { t_props: 'subNum', t_label: '分包数量' },
+ { t_props: 'teamNum', t_label: '班组数量' },
+ { t_props: 'einNum', t_label: '在场人数' },
+ { t_props: 'attNum', t_label: '考勤人数' },
]
export const dialogConfig = {
@@ -31,31 +30,41 @@ export const dialogConfig = {
export const projectFormLabel = [
{
f_label: '工程名称',
- f_model: 'subComId',
+ f_model: 'proName',
f_type: 'ipt',
isShow: false, // 是否展示label
},
{
f_label: '工程状态',
- f_model: 'subComId',
- f_type: 'ipt',
+ f_model: 'proStatus',
+ f_type: 'sel',
isShow: false, // 是否展示label
+ f_selList: [
+ {
+ label: '在建',
+ value: 1,
+ },
+ {
+ label: '完工',
+ value: 2,
+ },
+ ],
},
{
f_label: '日期',
- f_model: 'subComId',
- f_type: 'ipt',
+ f_model: 'startDate',
+ f_type: 'date',
isShow: false, // 是否展示label
},
]
export const projectColumnsList = [
- { t_label: '工程名称', t_slot: 'projectName' },
+ { t_slot: 'proName', t_label: '工程名称' },
{ t_props: 'orgName', t_label: '工程状态' },
- { t_props: 'proName', t_label: '分包数量' },
- { t_slot: 'proType', t_label: '班组数量' },
- { t_props: 'volLevel', t_label: '在场人数' },
- { t_props: 'proAddress', t_label: '考勤人数' },
+ { t_props: 'subNum', t_label: '分包数量' },
+ { t_slot: 'teamNum', t_label: '班组数量' },
+ { t_props: 'einNum', t_label: '在场人数' },
+ { t_props: 'attNum', t_label: '考勤人数' },
]
export const projectDialogConfig = {
@@ -70,33 +79,32 @@ export const projectDialogConfig = {
export const subTeamFormLabel = [
{
f_label: '姓名',
- f_model: 'subComId',
+ f_model: 'name',
f_type: 'ipt',
isShow: false, // 是否展示label
},
{
f_label: '人员身份证',
- f_model: 'subComId',
+ f_model: 'idNumber',
f_type: 'ipt',
isShow: false, // 是否展示label
},
{
f_label: '日期',
- f_model: 'subComId',
- f_type: 'ipt',
+ f_model: 'startDate',
+ f_type: 'date',
isShow: false, // 是否展示label
},
]
export const subTeamColumnsList = [
- { t_label: '工程名称' },
+ { t_props: 'proName', t_label: '工程名称' },
{ t_props: 'orgName', t_label: '分包名称' },
- { t_props: 'proName', t_label: '班组名称', t_slot: 'teamName' },
+ { t_slot: 'teamName', t_label: '班组名称' },
{ t_slot: 'proType', t_label: '班组状态' },
- { t_props: 'volLevel', t_label: '在场人数' },
- { t_props: 'proAddress', t_label: '考勤人数' },
+ { t_props: 'einNum', t_label: '在场人数' },
+ { t_props: 'attNum', t_label: '考勤人数' },
{
- t_props: 'proAddress',
t_label: '连续七天未打卡',
t_slot: 'noAttendance',
},
@@ -114,33 +122,34 @@ export const subTeamDialogConfig = {
export const personFormLabel = [
{
f_label: '姓名',
- f_model: 'subComId',
- f_type: 'ipt',
- isShow: false, // 是否展示label
- },
- {
- f_label: '日期',
- f_model: 'subComId',
+ f_model: 'name',
f_type: 'ipt',
isShow: false, // 是否展示label
},
{
f_label: '状态',
- f_model: 'subComId',
+ f_model: 'status',
f_type: 'ipt',
isShow: false, // 是否展示label
},
+ {
+ f_label: '日期',
+ f_model: 'time',
+ f_type: 'dateRange',
+ dateType: ['startDate', 'endDate'],
+ isShow: false, // 是否展示label
+ },
]
export const personColumnsList = [
- { t_label: '姓名', t_slot: 'userName' },
- { t_props: 'orgName', t_label: '身份证' },
- { t_props: 'proName', t_label: '联系方式' },
- { t_slot: 'proType', t_label: '工种' },
- { t_props: 'volLevel', t_label: '所属分包' },
- { t_props: 'proAddress', t_label: '考勤天数' },
+ { t_label: '姓名', t_slot: 'name' },
+ { t_props: 'idNumber', t_label: '身份证' },
+ { t_props: 'phone', t_label: '联系方式' },
+ { t_props: 'postName', t_label: '工种' },
+ { t_props: 'subName', t_label: '所属分包' },
+ { t_props: 'attDay', t_label: '考勤天数' },
{
- t_props: 'proAddress',
+ t_props: 'notAttNum',
t_label: '缺勤天数',
},
]
@@ -148,7 +157,7 @@ export const personColumnsList = [
export const personDialogConfig = {
outerVisible: false,
outerTitle: '考勤详情',
- outerWidth: '80%',
+ outerWidth: '90%',
minHeight: '90vh',
maxHeight: '90vh',
}
diff --git a/src/views/construction-person/attendance-manage/attendance-count/index.vue b/src/views/construction-person/attendance-manage/attendance-count/index.vue
index 2decb34..9ed81fc 100644
--- a/src/views/construction-person/attendance-manage/attendance-count/index.vue
+++ b/src/views/construction-person/attendance-manage/attendance-count/index.vue
@@ -3,9 +3,10 @@
@@ -22,7 +23,7 @@
@closeDialogOuter="handleCloseDialogOuter"
>
-
+
@@ -37,12 +38,10 @@ import { getAttendanceCountListAPI } from '@/api/construction-person/attendance-
export default {
name: 'AttendanceCount',
-
components: {
TableModel,
DialogModel,
ProjectTable,
- getAttendanceCountListAPI,
},
data() {
@@ -51,8 +50,11 @@ export default {
formLabel,
columnsList,
dialogConfig,
- editFormData: {},
- getLotLotProjectListAPI,
+ subComId: '',
+ getAttendanceCountListAPI,
+ sendParams: {
+ startDate: new Date().toISOString().split('T')[0], // 默认查询当天
+ },
}
},
methods: {
@@ -63,6 +65,7 @@ export default {
// 点击分公司 弹出工程弹框
onHandleCheckSubCom(data) {
+ this.subComId = data.subComId
this.dialogConfig.outerVisible = true
},
},
diff --git a/src/views/construction-person/attendance-manage/attendance-count/person-table.vue b/src/views/construction-person/attendance-manage/attendance-count/person-table.vue
index 8bb0741..40a9e2a 100644
--- a/src/views/construction-person/attendance-manage/attendance-count/person-table.vue
+++ b/src/views/construction-person/attendance-manage/attendance-count/person-table.vue
@@ -2,27 +2,40 @@
-
-
+
+
- {{ data.userName }}
+ {{ data.name }}
+
@@ -32,6 +45,7 @@
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import SubTeamTable from './sub-team-table'
+import AttendanceDetails from './attendance-details'
import { getPersonListAPI } from '@/api/construction-person/attendance-manage/attendance-count'
import {
personFormLabel,
@@ -41,10 +55,21 @@ import {
export default {
name: 'PersonTable',
+ props: {
+ teamId: {
+ type: [String, Number],
+ default: '',
+ },
+ proId: {
+ type: [String, Number],
+ default: '',
+ },
+ },
components: {
TableModel,
DialogModel,
SubTeamTable,
+ AttendanceDetails,
},
data() {
@@ -53,17 +78,19 @@ export default {
personColumnsList,
personDialogConfig,
getPersonListAPI,
+ idNumber: '',
}
},
methods: {
// 关闭弹框
handleCloseDialogOuter() {
- this.dialogConfig.outerVisible = false
+ this.personDialogConfig.outerVisible = false
},
// 点击人员姓名 弹出考勤详情
onHandleCheckPerson(data) {
- this.dialogConfig.outerVisible = true
+ this.idNumber = data.idNumber
+ this.personDialogConfig.outerVisible = true
},
},
}
diff --git a/src/views/construction-person/attendance-manage/attendance-count/project-table.vue b/src/views/construction-person/attendance-manage/attendance-count/project-table.vue
index 9f24747..4d24f6b 100644
--- a/src/views/construction-person/attendance-manage/attendance-count/project-table.vue
+++ b/src/views/construction-person/attendance-manage/attendance-count/project-table.vue
@@ -2,17 +2,21 @@
-
+
- {{ data.projectName }}
+ {{ data.proName }}
@@ -23,7 +27,7 @@
>
-
+
@@ -42,11 +46,16 @@ import {
export default {
name: 'ProjectTable',
+ props: {
+ subComId: {
+ type: [String, Number],
+ default: '',
+ },
+ },
components: {
TableModel,
DialogModel,
SubTeamTable,
- getProjectListAPI,
},
data() {
@@ -54,17 +63,20 @@ export default {
projectFormLabel,
projectColumnsList,
projectDialogConfig,
+ getProjectListAPI,
+ proId: '',
}
},
methods: {
// 关闭弹框
handleCloseDialogOuter() {
- this.dialogConfig.outerVisible = false
+ this.projectDialogConfig.outerVisible = false
},
// 点击工程 弹出分包班组弹框
onHandleCheckProject(data) {
- this.dialogConfig.outerVisible = true
+ this.proId = data.proId
+ this.projectDialogConfig.outerVisible = true
},
},
}
diff --git a/src/views/construction-person/attendance-manage/attendance-count/sub-team-table.vue b/src/views/construction-person/attendance-manage/attendance-count/sub-team-table.vue
index 6d6fe51..7f55dea 100644
--- a/src/views/construction-person/attendance-manage/attendance-count/sub-team-table.vue
+++ b/src/views/construction-person/attendance-manage/attendance-count/sub-team-table.vue
@@ -2,17 +2,21 @@
- {{ data.teamName }}
+ {{ data.teamName || '-' }}
@@ -21,20 +25,22 @@
class="cursor-blue"
@click="onHandleCheckNoAttendance(data)"
>
- {{ data.noAttendance }}
+ {{ data.notAttNum || '-' }}
+
+
@@ -44,6 +50,7 @@
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import SvenNoAttendance from './sven-no-attendance'
+import PersonTable from './person-table'
import { getSubTeamListAPI } from '@/api/construction-person/attendance-manage/attendance-count'
import {
subTeamFormLabel,
@@ -53,10 +60,16 @@ import {
export default {
name: 'SubTeamTable',
+ props: {
+ proId: {
+ type: [String, Number],
+ default: '',
+ },
+ },
components: {
TableModel,
DialogModel,
- ProjectTable,
+ PersonTable,
SvenNoAttendance,
},
@@ -66,24 +79,26 @@ export default {
subTeamColumnsList,
subTeamDialogConfig,
getSubTeamListAPI,
+ teamId: '',
}
},
methods: {
// 关闭弹框
handleCloseDialogOuter() {
- this.dialogConfig.outerVisible = false
+ this.subTeamDialogConfig.outerVisible = false
},
// 点击班组名称 打开人员弹框
onHandleCheckTeam(data) {
- this.dialogConfig.outerTitle = '人员'
- this.dialogConfig.outerVisible = true
+ this.teamId = data.teamId
+ this.subTeamDialogConfig.outerTitle = '人员'
+ this.subTeamDialogConfig.outerVisible = true
},
// 点击7天未打卡 打开连续7天未打卡弹框
onHandleCheckNoAttendance(data) {
- this.dialogConfig.outerTitle = '连续七天未打卡'
- this.dialogConfig.outerVisible = true
+ this.subTeamDialogConfig.outerTitle = '连续七天未打卡'
+ this.subTeamDialogConfig.outerVisible = true
},
},
}
diff --git a/src/views/construction-person/attendance-manage/attendance-count/sven-no-attendance.vue b/src/views/construction-person/attendance-manage/attendance-count/sven-no-attendance.vue
index 72b1132..6cb2f5e 100644
--- a/src/views/construction-person/attendance-manage/attendance-count/sven-no-attendance.vue
+++ b/src/views/construction-person/attendance-manage/attendance-count/sven-no-attendance.vue
@@ -15,6 +15,7 @@
diff --git a/src/views/construction-person/entry-and-exit-manage/person-exit/index.vue b/src/views/construction-person/entry-and-exit-manage/person-exit/index.vue
index f810a32..c86969b 100644
--- a/src/views/construction-person/entry-and-exit-manage/person-exit/index.vue
+++ b/src/views/construction-person/entry-and-exit-manage/person-exit/index.vue
@@ -278,7 +278,7 @@ export default {
this.formLabel[4].f_selList = postTypeList.map((item) => {
return {
label: item.postName,
- value: item.postId,
+ value: item.id,
}
})
this.formLabel[5].f_selList = subList.map((item) => {
diff --git a/src/views/construction-person/red-green-light-mange/red-and-green-count/project-list.vue b/src/views/construction-person/red-green-light-mange/red-and-green-count/project-list.vue
index 7bff33f..d7a5a69 100644
--- a/src/views/construction-person/red-green-light-mange/red-and-green-count/project-list.vue
+++ b/src/views/construction-person/red-green-light-mange/red-and-green-count/project-list.vue
@@ -6,7 +6,6 @@
:showRightTools="false"
ref="projectListTableRef"
:columnsList="columnsList"
- :testTableList="testTableList"
:sendParams="{
subComId: subComId,
}"
@@ -33,12 +32,28 @@
:showRightTools="false"
ref="projectListTableRef"
:columnsList="columnsList_1"
- :testTableList="testTableList"
:sendParams="{
proId: proId,
}"
:request-api="getRedAndGreenCountPersonListAPI"
- />
+ >
+
+
+ 黄灯
+
+
+ 绿灯
+
+
+
@@ -51,6 +66,11 @@ import {
getRedAndGreenCountProjectListAPI,
getRedAndGreenCountPersonListAPI,
} from '@/api/construction-person/red-green-light-mange/red-and-green-count'
+
+import {
+ getTeamSelectListCommonFun,
+ getSubSelectListCommonFun,
+} from '@/utils/getCommonData'
export default {
name: 'ProjectList',
props: {
@@ -83,20 +103,6 @@ export default {
{ t_props: 'yellowNum', t_label: '黄灯人数' },
{ t_props: 'greenNum', t_label: '绿灯人数' },
],
- testTableList: [
- {
- proName: '工程1',
- onSiteCount: '6',
- yellowCount: '12',
- greenCount: '23',
- },
- {
- proName: '工程1',
- onSiteCount: '20',
- yellowCount: '10',
- greenCount: '10',
- },
- ],
dialogConfig: {
outerTitle: '人员',
@@ -109,42 +115,54 @@ export default {
formLabel_1: [
{
f_label: '姓名',
- f_model: 'proName',
+ f_model: 'name',
f_type: 'ipt',
f_width: '180px',
isShow: false, // 是否展示label
},
{
f_label: '分包',
- f_model: 'proName',
- f_type: 'ipt',
+ f_model: 'subId',
+ f_type: 'sel',
f_width: '180px',
isShow: false, // 是否展示label
+ f_selList: [],
},
{
f_label: '班组',
- f_model: 'proName',
- f_type: 'ipt',
+ f_model: 'teamId',
+ f_type: 'sel',
f_width: '180px',
isShow: false, // 是否展示label
+ f_selList: [],
},
{
f_label: '状态',
- f_model: 'proName',
- f_type: 'ipt',
+ f_model: 'lightStatus',
+ f_type: 'sel',
f_width: '180px',
isShow: false, // 是否展示label
+ f_selList: [
+ {
+ label: '黄灯',
+ value: 1,
+ },
+ {
+ label: '绿灯',
+ value: 2,
+ },
+ ],
},
],
columnsList_1: [
- { t_slot: 'proName', t_label: '姓名' },
- { t_props: 'onSiteCount', t_label: '身份证' },
- { t_props: 'yellowCount', t_label: '联系方式' },
- { t_props: 'greenCount', t_label: '工种' },
- { t_props: 'greenCount', t_label: '所属工程' },
- { t_props: 'greenCount', t_label: '所属分包' },
- { t_props: 'greenCount', t_label: '所属班组' },
- { t_props: 'greenCount', t_label: '状态' },
+ { t_props: 'name', t_label: '姓名' },
+ { t_props: 'idNumber', t_label: '身份证' },
+ { t_props: 'phone', t_label: '联系方式' },
+ { t_props: 'postName', t_label: '工种' },
+ { t_props: 'proName', t_label: '所属工程' },
+ { t_props: 'subName', t_label: '所属分包' },
+ { t_props: 'teamName', t_label: '所属班组' },
+ { t_slot: 'lightStatus', t_label: '状态' },
],
}
},
@@ -160,7 +178,22 @@ export default {
this.dialogConfig.outerVisible = false
},
},
+
+ async created() {
+ const subList = await getSubSelectListCommonFun()
+ this.formLabel_1[1].f_selList = subList.map((item) => {
+ return {
+ label: item.subName,
+ value: item.id,
+ }
+ })
+ const teamList = await getTeamSelectListCommonFun()
+ this.formLabel_1[2].f_selList = teamList.map((item) => {
+ return {
+ label: item.teamName,
+ value: item.id,
+ }
+ })
+ },
}
-
-