后台增加配置选择
parent
4c0425a73c
commit
26442645eb
|
|
@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<where>
|
<where>
|
||||||
<if test="comId != null "> and comId = #{comId}</if>
|
<if test="comId != null "> and comId = #{comId}</if>
|
||||||
<if test="projectId != null "> and projectId = #{projectId}</if>
|
<if test="projectId != null "> and projectId = #{projectId}</if>
|
||||||
|
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
|
||||||
<if test="subDeptId != null "> and sub_dept_id = #{subDeptId}</if>
|
<if test="subDeptId != null "> and sub_dept_id = #{subDeptId}</if>
|
||||||
<if test="userId != null "> and userId = #{userId}</if>
|
<if test="userId != null "> and userId = #{userId}</if>
|
||||||
<if test="userName != null and userName != ''"> and userName like concat('%', #{userName}, '%')</if>
|
<if test="userName != null and userName != ''"> and userName like concat('%', #{userName}, '%')</if>
|
||||||
|
|
@ -95,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from attendance_ubi_data ad
|
from attendance_ubi_data ad
|
||||||
<where>
|
<where>
|
||||||
<if test="projectId != null "> and ad.projectId = #{projectId}</if>
|
<if test="projectId != null "> and ad.projectId = #{projectId}</if>
|
||||||
|
<if test="cfgId != null "> and ad.cfg_id = #{cfgId}</if>
|
||||||
<if test="subDeptId != null "> and ad.sub_dept_id = #{subDeptId}</if>
|
<if test="subDeptId != null "> and ad.sub_dept_id = #{subDeptId}</if>
|
||||||
and date(ifNull(ad.`inTime`,ad.`outTime`)) <![CDATA[ >= ]]> date(#{inTime}) and date(ifNull(ad.`outTime`,ad.`inTime`)) <![CDATA[ < ]]> date(#{outTime})
|
and date(ifNull(ad.`inTime`,ad.`outTime`)) <![CDATA[ >= ]]> date(#{inTime}) and date(ifNull(ad.`outTime`,ad.`inTime`)) <![CDATA[ < ]]> date(#{outTime})
|
||||||
</where>
|
</where>
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,39 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container attendance-ubi-data">
|
<div class="app-container attendance-ubi-data">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
|
||||||
<el-form-item label="项目" prop="projectId">
|
<el-form-item label="项目" prop="projectId">
|
||||||
<el-select :disabled="data.currentPrjId != ''" style="width:192px;" v-model="queryParams.projectId" placeholder="请选择项目" clearable
|
<el-select :disabled="data.currentPrjId != ''" style="width:192px;" v-model="queryParams.projectId"
|
||||||
@change="()=>{handleQuery();projectChange();}">
|
placeholder="请选择项目" clearable @change="() => { handleQuery(); projectChange(); }">
|
||||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属单位" prop="subDeptId">
|
<el-form-item label="所属单位" prop="subDeptId">
|
||||||
<el-select v-model="queryParams.subDeptId" style="width:192px;" placeholder="请选择所属单位" clearable @change="()=>{handleQuery();subDeptChange();}">
|
<el-select v-model="queryParams.subDeptId" style="width:192px;" placeholder="请选择所属单位" clearable
|
||||||
|
@change="() => { handleQuery(); subDeptChange(); }">
|
||||||
<el-option v-for="(it) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
<el-option v-for="(it) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属工区" prop="workAreaAncestors" v-if="data.workAreaOptions && data.workAreaOptions.length>0">
|
<el-form-item label="考勤配置" prop="cfgId" v-if="data.cfgOptions.length > 0">
|
||||||
<el-tree-select v-model="queryParams.workAreaId" :data="data.workAreaOptions"
|
<el-select v-model="queryParams.cfgId" placeholder="请选择考勤配置" style="width: 200px;"
|
||||||
:props="{ value: 'id', label: 'title', children: 'children' }" value-key="id" placeholder="请选择工区"
|
@change="handleQuery">
|
||||||
clearable style="width: 240px" />
|
<el-option v-for="cfg in data.cfgOptions" :key="cfg.id" :label="cfg.cfgName" :value="cfg.id" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属工区" prop="workAreaAncestors" v-if="data.workAreaOptions && data.workAreaOptions.length > 0">
|
||||||
|
<el-tree-select v-model="queryParams.workAreaId" :data="data.workAreaOptions"
|
||||||
|
:props="{ value: 'id', label: 'title', children: 'children' }" value-key="id" placeholder="请选择工区" clearable
|
||||||
|
style="width: 240px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="姓名" prop="userName">
|
<el-form-item label="姓名" prop="userName">
|
||||||
<el-input v-model="queryParams.userName" placeholder="请输入姓名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.userName" placeholder="请输入姓名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item><el-form-item label="日期" prop="inTime">
|
</el-form-item><el-form-item label="日期" prop="inTime">
|
||||||
<el-date-picker clearable v-model="queryParams.inTime" type="date" value-format="YYYY-MM-DD" @change="handleQuery"
|
<el-date-picker clearable v-model="queryParams.inTime" type="date" value-format="YYYY-MM-DD"
|
||||||
placeholder="请选择日期">
|
@change="handleQuery" placeholder="请选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
|
@ -53,25 +60,28 @@
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="attendanceUbiDataList" @selection-change="handleSelectionChange" class="data-list">
|
<el-table v-loading="loading" :data="attendanceUbiDataList" @selection-change="handleSelectionChange"
|
||||||
|
class="data-list">
|
||||||
|
|
||||||
<el-table-column label="姓名" align="center" prop="userName" />
|
<el-table-column label="姓名" align="center" prop="userName" />
|
||||||
<el-table-column label="项目" align="center" prop="projectName" />
|
<el-table-column label="项目" align="center" prop="projectName" />
|
||||||
<el-table-column label="单位" align="center" prop="subDeptName" />
|
<el-table-column label="单位" align="center" prop="subDeptName" />
|
||||||
<el-table-column label="进场照片" align="center" prop="inPhoto">
|
<el-table-column label="进场照片" align="center" prop="inPhoto">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image v-if="scope.row.inPhoto" :src="scope.row.inPhoto" style="height:80px;" :preview-teleported="true" :preview-src-list="[scope.row.inPhoto]"></el-image>
|
<el-image v-if="scope.row.inPhoto" :src="scope.row.inPhoto" style="height:80px;" :preview-teleported="true"
|
||||||
|
:preview-src-list="[scope.row.inPhoto]"></el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="进场时间" align="center" prop="inTime" width="180">
|
<el-table-column label="进场时间" align="center" prop="inTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.inTime)}}</span>
|
<span>{{ parseTime(scope.row.inTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="离场照片" align="center" prop="outPhoto">
|
<el-table-column label="离场照片" align="center" prop="outPhoto">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image v-if="scope.row.outPhoto" :src="scope.row.outPhoto" style="height:80px;" :preview-teleported="true" :preview-src-list="[scope.row.outPhoto]"></el-image>
|
<el-image v-if="scope.row.outPhoto" :src="scope.row.outPhoto" style="height:80px;" :preview-teleported="true"
|
||||||
|
:preview-src-list="[scope.row.outPhoto]"></el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="离场时间" align="center" prop="outTime" width="180">
|
<el-table-column label="离场时间" align="center" prop="outTime" width="180">
|
||||||
|
|
@ -82,12 +92,12 @@
|
||||||
<el-table-column label="班组" align="center" prop="subDeptGroupName" />
|
<el-table-column label="班组" align="center" prop="subDeptGroupName" />
|
||||||
<el-table-column label="工种类型" align="center" prop="craftType">
|
<el-table-column label="工种类型" align="center" prop="craftType">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="pro_craft_type" :value="scope.row.craftType" class="dict-tag"/>
|
<dict-tag :options="pro_craft_type" :value="scope.row.craftType" class="dict-tag" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="工种岗位" align="center" prop="craftPost">
|
<el-table-column label="工种岗位" align="center" prop="craftPost">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" class="dict-tag"/>
|
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" class="dict-tag" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="false">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="false">
|
||||||
|
|
@ -100,8 +110,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||||
@pagination="getList" />
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
|
||||||
<!-- 添加或修改考勤管理对话框 -->
|
<!-- 添加或修改考勤管理对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||||
|
|
@ -122,7 +132,7 @@
|
||||||
<el-input v-model="form.subDeptGroup" placeholder="请输入班组编号(外键)" />
|
<el-input v-model="form.subDeptGroup" placeholder="请输入班组编号(外键)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="班组名称" prop="subDeptGroupName">
|
<el-form-item label="班组名称" prop="subDeptGroupName">
|
||||||
<el-input v-model="form.subDeptGroupName" placeholder="请输入班组名称" />
|
<el-input v-model="form.subDeptGroupName" placeholder="请输入班组名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工种岗位" prop="craftPost">
|
<el-form-item label="工种岗位" prop="craftPost">
|
||||||
<el-input v-model="form.craftPost" placeholder="请输入工种岗位" />
|
<el-input v-model="form.craftPost" placeholder="请输入工种岗位" />
|
||||||
|
|
@ -159,6 +169,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="AttendanceUbiData">
|
<script setup name="AttendanceUbiData">
|
||||||
|
import { listAttendance_cfg } from '@/api/manage/attendancecfg'
|
||||||
import { listAttendanceUbiData, getAttendanceUbiData, delAttendanceUbiData, addAttendanceUbiData, updateAttendanceUbiData } from "@/api/manage/attendanceUbiData";
|
import { listAttendanceUbiData, getAttendanceUbiData, delAttendanceUbiData, addAttendanceUbiData, updateAttendanceUbiData } from "@/api/manage/attendanceUbiData";
|
||||||
import { findMyProjectList } from "@/api/publics";
|
import { findMyProjectList } from "@/api/publics";
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
|
@ -166,7 +177,7 @@ import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts"
|
||||||
import { workAreaTree, transformTreeData } from '@/api/system/workAarea'
|
import { workAreaTree, transformTreeData } from '@/api/system/workAarea'
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const { pro_craft_type, pro_craft_post } = proxy.useDict( 'pro_craft_type', 'pro_craft_post');
|
const { pro_craft_type, pro_craft_post } = proxy.useDict('pro_craft_type', 'pro_craft_post');
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
|
@ -200,26 +211,28 @@ const data = reactive({
|
||||||
deviceNo: null,
|
deviceNo: null,
|
||||||
isDel: null,
|
isDel: null,
|
||||||
state: null,
|
state: null,
|
||||||
|
cfgId: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
},
|
},
|
||||||
projects:[],
|
projects: [],
|
||||||
subdepts:[],
|
subdepts: [],
|
||||||
currentPrjId: '',
|
currentPrjId: '',
|
||||||
// 工区树选项
|
// 工区树选项
|
||||||
workAreaOptions: [],
|
workAreaOptions: [],
|
||||||
|
cfgOptions: []
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
/*所属单位改变事件 */
|
/*所属单位改变事件 */
|
||||||
function subDeptChange(){
|
function subDeptChange() {
|
||||||
|
|
||||||
}
|
}
|
||||||
/*项目改变事件 */
|
/*项目改变事件 */
|
||||||
function projectChange(){
|
function projectChange() {
|
||||||
listProProjectInfoSubdepts({ projectId: queryParams.value.projectId, pageNum: 1, pageSize: 100 }).then(d => {
|
listProProjectInfoSubdepts({ projectId: queryParams.value.projectId, pageNum: 1, pageSize: 100 }).then(d => {
|
||||||
data.subdepts = d.rows || [];
|
data.subdepts = d.rows || [];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 查询项目列表 */
|
/** 查询项目列表 */
|
||||||
|
|
@ -281,10 +294,10 @@ function reset() {
|
||||||
|
|
||||||
/** 查询工区树结构 */
|
/** 查询工区树结构 */
|
||||||
function getWorkAreaTree() {
|
function getWorkAreaTree() {
|
||||||
workAreaTree(userStore.currentPrjId).then(response => {
|
workAreaTree(userStore.currentPrjId).then(response => {
|
||||||
// 转换数据格式以适配el-tree-select组件
|
// 转换数据格式以适配el-tree-select组件
|
||||||
data.workAreaOptions = transformTreeData(response.data);
|
data.workAreaOptions = transformTreeData(response.data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
|
@ -363,27 +376,37 @@ function handleExport() {
|
||||||
}, `attendanceUbiData_${new Date().getTime()}.xlsx`)
|
}, `attendanceUbiData_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|
||||||
queryParams.value.inTime= proxy.$dt(new Date()).format("YYYY-MM-DD");
|
queryParams.value.inTime = proxy.$dt(new Date()).format("YYYY-MM-DD");
|
||||||
getList();
|
/** 查询配置项列表 */
|
||||||
|
function getCfgList() {
|
||||||
|
listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => {
|
||||||
|
data.cfgOptions = response.rows || []
|
||||||
|
queryParams.value.cfgId = data.cfgOptions[0]?.id || null
|
||||||
|
getList()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getCfgList()
|
||||||
getProjectList();
|
getProjectList();
|
||||||
// 获取工区树数据
|
// 获取工区树数据
|
||||||
getWorkAreaTree();
|
getWorkAreaTree();
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.attendance-ubi-data{
|
.attendance-ubi-data {
|
||||||
.data-list{
|
.data-list {
|
||||||
.dict-tag{
|
.dict-tag {
|
||||||
|
|
||||||
*{
|
* {
|
||||||
font-family: none !important;
|
font-family: none !important;
|
||||||
color:#222;
|
color: #222;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.el-tag{
|
|
||||||
background: none;
|
.el-tag {
|
||||||
border: none;
|
background: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,12 @@
|
||||||
@change="() => { handleQuery(); }">
|
@change="() => { handleQuery(); }">
|
||||||
<el-option v-for="(it) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
<el-option v-for="(it) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="考勤配置" prop="cfgId" v-if="data.cfgOptions.length > 0">
|
||||||
|
<el-select v-model="queryParams.cfgId" placeholder="请选择考勤配置" style="width: 200px;" @change="handleQuery">
|
||||||
|
<el-option v-for="cfg in data.cfgOptions" :key="cfg.id" :label="cfg.cfgName"
|
||||||
|
:value="cfg.id" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="显示方式" prop="showType">
|
<el-form-item label="显示方式" prop="showType">
|
||||||
<el-select v-model="queryParams.showType" style="width:192px;" placeholder="请选择显示方式">
|
<el-select v-model="queryParams.showType" style="width:192px;" placeholder="请选择显示方式">
|
||||||
|
|
@ -69,7 +75,7 @@ import {statisticsAttendanceUbiData,statisticsExportAttendanceUbiData} from '@/a
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import attItem from './item.vue'
|
import attItem from './item.vue'
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
import { listAttendance_cfg } from '@/api/manage/attendancecfg'
|
||||||
const { pro_craft_type, pro_craft_post } = proxy.useDict( 'pro_craft_type', 'pro_craft_post');
|
const { pro_craft_type, pro_craft_post } = proxy.useDict( 'pro_craft_type', 'pro_craft_post');
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
@ -81,7 +87,8 @@ const data = reactive({
|
||||||
inTime: '',
|
inTime: '',
|
||||||
projectId: '',
|
projectId: '',
|
||||||
subDeptId: '',
|
subDeptId: '',
|
||||||
showType: '0'
|
showType: '0',
|
||||||
|
cfgId: '',
|
||||||
|
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
@ -94,6 +101,7 @@ const data = reactive({
|
||||||
total: 0,
|
total: 0,
|
||||||
tdDays:[],
|
tdDays:[],
|
||||||
elkey:0,
|
elkey:0,
|
||||||
|
cfgOptions: [],
|
||||||
});
|
});
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
|
@ -136,7 +144,8 @@ function getList() {
|
||||||
pageNum:queryParams.value.pageNum,
|
pageNum:queryParams.value.pageNum,
|
||||||
pageSize:queryParams.value.pageSize,
|
pageSize:queryParams.value.pageSize,
|
||||||
projectId:queryParams.value.projectId,
|
projectId:queryParams.value.projectId,
|
||||||
subDeptId:queryParams.value.subDeptId
|
subDeptId:queryParams.value.subDeptId,
|
||||||
|
cfgId:queryParams.value.cfgId,
|
||||||
}
|
}
|
||||||
let dt1=proxy.$dt(queryParams.value.inTime);
|
let dt1=proxy.$dt(queryParams.value.inTime);
|
||||||
let dt2=dt1.month(dt1.month()+1);
|
let dt2=dt1.month(dt1.month()+1);
|
||||||
|
|
@ -197,8 +206,19 @@ function resetQuery() {
|
||||||
handleQuery();
|
handleQuery();
|
||||||
}
|
}
|
||||||
queryParams.value.inTime = proxy.$dt(new Date()).format("YYYY-MM-DD");
|
queryParams.value.inTime = proxy.$dt(new Date()).format("YYYY-MM-DD");
|
||||||
|
|
||||||
|
/** 查询配置项列表 */
|
||||||
|
function getCfgList() {
|
||||||
|
listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => {
|
||||||
|
data.cfgOptions = response.rows || []
|
||||||
|
queryParams.value.cfgId = data.cfgOptions[0]?.id || null
|
||||||
|
handleQuery();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getProjectList();
|
getProjectList();
|
||||||
handleQuery();
|
getCfgList()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss"></style>
|
<style lang="scss"></style>
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="考勤配置" prop="cfgId" v-if="data.cfgOptions.length > 0">
|
<el-form-item label="考勤配置" prop="cfgId" v-if="data.cfgOptions.length > 0">
|
||||||
<el-select v-model="queryParams.cfgId" placeholder="请选择考勤配置" clearable style="width: 300px;">
|
<el-select v-model="queryParams.cfgId" placeholder="请选择考勤配置" style="width: 200px;" @change="handleQuery">
|
||||||
<el-option v-for="cfg in data.cfgOptions" :key="cfg.id" :label="cfg.cfgName"
|
<el-option v-for="cfg in data.cfgOptions" :key="cfg.id" :label="cfg.cfgName"
|
||||||
:value="cfg.id" />
|
:value="cfg.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -333,7 +333,6 @@ function handleAdd() {
|
||||||
form.value.projectId = userStore.currentPrjId
|
form.value.projectId = userStore.currentPrjId
|
||||||
form.value.projectName = userStore.currentProName
|
form.value.projectName = userStore.currentProName
|
||||||
form.value.source = ubi_device_source.value[0].value
|
form.value.source = ubi_device_source.value[0].value
|
||||||
getCfgList()
|
|
||||||
open.value = true
|
open.value = true
|
||||||
title.value = '添加宇泛的设备信息'
|
title.value = '添加宇泛的设备信息'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="考勤配置" prop="cfgId" v-if="data.cfgOptions.length > 0">
|
||||||
|
<el-select v-model="queryParams.cfgId" placeholder="请选择考勤配置" style="width: 200px;" @change="handleQuery">
|
||||||
|
<el-option v-for="cfg in data.cfgOptions" :key="cfg.id" :label="cfg.cfgName"
|
||||||
|
:value="cfg.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="用户名" prop="userName">
|
<el-form-item label="用户名" prop="userName">
|
||||||
<el-input v-model="queryParams.userName" placeholder="请输入用户名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.userName" placeholder="请输入用户名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -122,6 +129,7 @@
|
||||||
<script setup name="MobileAttendanceData">
|
<script setup name="MobileAttendanceData">
|
||||||
import { listMobileAttendanceData, getMobileAttendanceData, delMobileAttendanceData, addMobileAttendanceData, updateMobileAttendanceData } from "@/api/manage/mobileAttendanceData";
|
import { listMobileAttendanceData, getMobileAttendanceData, delMobileAttendanceData, addMobileAttendanceData, updateMobileAttendanceData } from "@/api/manage/mobileAttendanceData";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
|
import { listAttendance_cfg } from '@/api/manage/attendancecfg'
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const mobileAttendanceDataList = ref([]);
|
const mobileAttendanceDataList = ref([]);
|
||||||
|
|
@ -149,9 +157,11 @@ const data = reactive({
|
||||||
attImg: null,
|
attImg: null,
|
||||||
isDel: null,
|
isDel: null,
|
||||||
state: null,
|
state: null,
|
||||||
|
cfgId: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
}
|
},
|
||||||
|
cfgOptions: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
@ -279,5 +289,13 @@ function handleExport() {
|
||||||
}, `mobileAttendanceData_${new Date().getTime()}.xlsx`)
|
}, `mobileAttendanceData_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|
||||||
getList();
|
/** 查询配置项列表 */
|
||||||
|
function getCfgList() {
|
||||||
|
listAttendance_cfg({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(response => {
|
||||||
|
data.cfgOptions = response.rows || []
|
||||||
|
queryParams.value.cfgId = data.cfgOptions[0]?.id || null
|
||||||
|
getList()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getCfgList()
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue