提交
This commit is contained in:
parent
7eadd35b32
commit
ba0639f63a
|
@ -2,17 +2,17 @@
|
|||
<el-form :model="queryParams" ref="queryRef" :inline="true" style="margin-top: 20px;">
|
||||
<el-row class="myRow">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="员工姓名" prop="userName">
|
||||
<el-form-item label="员工姓名">
|
||||
<el-input v-model="queryParams.userName" placeholder="请输入员工姓名" clearable style="width: 160px"
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="deptId">
|
||||
<el-form-item label="部门">
|
||||
<el-select v-model="queryParams.deptId" placeholder="请选择部门" clearable style="width: 160px">
|
||||
<el-option label="Zone one" value="shanghai" />
|
||||
<el-option label="Zone two" value="beijing" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="当前标签" prop="qualification">
|
||||
<el-form-item label="当前标签">
|
||||
<el-select v-model="queryParams.qualification" placeholder="请选择当前标签" clearable style="width: 160px">
|
||||
<el-option label="Zone one" value="shanghai" />
|
||||
<el-option label="Zone two" value="beijing" />
|
||||
|
@ -32,32 +32,37 @@
|
|||
</el-button>
|
||||
</div>
|
||||
<div class="borderLine"></div>
|
||||
<el-table :data="tableData" height="calc(100% - 226px)" style="width: 100%">
|
||||
<el-table v-loading="loading" :data="tableData" height="calc(100% - 226px)" style="width: 100%">
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="localityName" label="属地" />
|
||||
<el-table-column prop="departmentName" label="部门" />
|
||||
<el-table-column prop="officeName" label="科室" />
|
||||
<el-table-column prop="jobNumber" label="工号" />
|
||||
<el-table-column prop="name" label="员工姓名" />
|
||||
<el-table-column prop="curQualification" label="当前标签" />
|
||||
<el-table-column prop="objectiveQualification" label="申请标签" />
|
||||
<el-table-column prop="status" label="状态" width="120">
|
||||
<el-table-column prop="dependencyName" label="属地" width="180" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="deptName" label="部门" width="180" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="sectionName" label="科室" width="180" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="workNo" label="工号" width="130" />
|
||||
<el-table-column prop="userName" label="员工姓名" width="130" />
|
||||
<el-table-column prop="sourceLabelId" label="当前标签" width="130" />
|
||||
<el-table-column prop="labelId" label="申请标签" width="130" />
|
||||
<el-table-column prop="state" label="状态" width="120">
|
||||
<template #default="scope">
|
||||
<el-text v-if="scope.row.status == 0" type="info" class="infoinfoText">待审核</el-text>
|
||||
<el-text v-if="scope.row.status == 3" type="info" class="infoinfoText">待ESC审核</el-text>
|
||||
<el-text v-if="scope.row.status == 1" type="success" class="successText">通过</el-text>
|
||||
<el-text v-if="scope.row.status == 2" type="danger" class="dangerText">驳回</el-text>
|
||||
<el-text v-if="scope.row.state == 1" type="info" class="infoinfoText">待审核</el-text>
|
||||
<el-text v-if="scope.row.state == 2" type="success" class="successText">通过</el-text>
|
||||
<el-text v-if="scope.row.state == 9" type="danger" class="dangerText">驳回</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.status != 1">重新申请</el-button>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.status != 1" />
|
||||
<el-button type="primary" text class="deleteTextBtn">删除</el-button>
|
||||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state == 9"
|
||||
@click="handleReplay(scope.row)">重新申请</el-button>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 9" />
|
||||
<router-link :to="'/lable/viewDetail/' + scope.row.id" custom v-slot="{ href }">
|
||||
<a class="replayTextBtn" :href="href" target="_blank">查看</a>
|
||||
</router-link>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 1" />
|
||||
<el-button type="primary" text class="deleteTextBtn" v-if="scope.row.state == 1"
|
||||
@click="handleDetele(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -65,140 +70,121 @@
|
|||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import applyIcon from '@/assets/images/applyIcon.png'
|
||||
import { getcurrentUserPageList, deleteBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
import { deptTreeSelect, listUser } from "@/api/system/user"
|
||||
|
||||
const router = useRouter()
|
||||
const total = ref(16)
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { bus_label } = proxy.useDict("bus_label")
|
||||
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
userName: undefined,
|
||||
node: 0,
|
||||
userId: undefined,
|
||||
deptId: undefined,
|
||||
qualification: undefined
|
||||
qualificationId: undefined
|
||||
})
|
||||
const tableData = [
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 1
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 2
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 3
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 3
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 3
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 3
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 3
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 3
|
||||
},
|
||||
{
|
||||
localityName: 'XXX属地',
|
||||
departmentName: 'XXX部门',
|
||||
officeName: 'XXX科室',
|
||||
jobNumber: '3523213',
|
||||
name: '赵丽娟',
|
||||
curQualification: '-',
|
||||
objectiveQualification: 'SH',
|
||||
status: 3
|
||||
},
|
||||
]
|
||||
const loading = ref(true)
|
||||
const total = ref(0)
|
||||
const tableData = ref([])
|
||||
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
getAllUser();
|
||||
getDeptTree();
|
||||
getCurUserLablePageList();
|
||||
});
|
||||
|
||||
// 用户数据
|
||||
const allUsers = ref([])
|
||||
// 获取所有用户
|
||||
const getAllUser = () => {
|
||||
listUser({
|
||||
status: '0',
|
||||
pageNum: 1,
|
||||
pageSize: 5000
|
||||
}).then(res => {
|
||||
allUsers.value = res.rows
|
||||
})
|
||||
}
|
||||
// 部门数据
|
||||
const enabledDeptOptions = ref(undefined)
|
||||
// 获取部门数据
|
||||
const getDeptTree = () => {
|
||||
deptTreeSelect().then(res => {
|
||||
enabledDeptOptions.value = filterDisabledDept(JSON.parse(JSON.stringify(res.data)))
|
||||
})
|
||||
}
|
||||
/** 过滤禁用的部门 */
|
||||
const filterDisabledDept = (deptList) => {
|
||||
return deptList.filter(dept => {
|
||||
if (dept.disabled) {
|
||||
return false
|
||||
}
|
||||
if (dept.children && dept.children.length) {
|
||||
dept.children = filterDisabledDept(dept.children)
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
const getCurUserLablePageList = () => {
|
||||
loading.value = true
|
||||
getcurrentUserPageList(queryParams.value).then(res => {
|
||||
console.log('标签申请结果', res)
|
||||
if (res.code == 200) {
|
||||
tableData.value = res.data.list
|
||||
total.value = res.data.total
|
||||
}
|
||||
loading.value = false
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1
|
||||
getList()
|
||||
queryParams.value.pageIndex = 1
|
||||
getCurUserLablePageList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
dateRange.value = []
|
||||
proxy.resetForm("queryRef")
|
||||
queryParams.value.userId = undefined
|
||||
queryParams.value.deptId = undefined
|
||||
proxy.$refs.deptTreeRef.setCurrentKey(null)
|
||||
queryParams.value.qualificationId = undefined
|
||||
proxy.resetForm("queryRef")
|
||||
handleQuery()
|
||||
}
|
||||
const getList = () => {
|
||||
|
||||
}
|
||||
// 打开申请标签表单
|
||||
const handleOpenApplyForm = () => {
|
||||
router.push('/qualification/escTask/lableApplyForm')
|
||||
}
|
||||
|
||||
// 重新申请资质表单
|
||||
const handleReplay = (record) => {
|
||||
// router.push({
|
||||
// name: 'qualificationReApplyForm',
|
||||
// params: { Id: record.id, node: record.node } // 传递两个参数
|
||||
// });
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDetele = (record) => {
|
||||
const rowId = record.id
|
||||
proxy.$modal.confirm('是否确认删除该项数据项?').then(function () {
|
||||
return deleteBusUserLabel(rowId)
|
||||
}).then(() => {
|
||||
getCurUserLablePageList();
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => { })
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.myRow {
|
||||
|
|
|
@ -3,18 +3,18 @@
|
|||
<el-form :model="queryParams" ref="queryRef" :inline="true" style="margin-top: 20px;">
|
||||
<el-row class="myRow">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="员工姓名" prop="userName">
|
||||
<el-form-item label="员工姓名">
|
||||
<el-select v-model="queryParams.userId" filterable placeholder="请选择员工">
|
||||
<el-option v-for="item in allUsers" :key="item.userId"
|
||||
:label="`${item.nickName}(${item.dept?.deptName || '无部门'})`" :value="item.userId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="deptId">
|
||||
<el-form-item label="部门">
|
||||
<el-tree-select v-model="queryParams.deptId" :data="enabledDeptOptions"
|
||||
:props="{ value: 'id', label: 'label', children: 'children' }" value-key="id"
|
||||
placeholder="请选择部门" check-strictly style="width: 160px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目标资质" prop="qualificationId">
|
||||
<el-form-item label="目标资质">
|
||||
<el-select v-model="queryParams.qualificationId" placeholder="请选择目标资质" clearable
|
||||
style="width: 160px">
|
||||
<el-option v-for="dict in target_qualification" :key="dict.value" :label="dict.label"
|
||||
|
@ -173,8 +173,7 @@ const handleOpenApplyForm = () => {
|
|||
}
|
||||
|
||||
// 重新申请资质表单
|
||||
const handleReplay = (record) => {
|
||||
// router.push('/qualification/escTask/qualificationReApplyForm/' + record.id)
|
||||
const handleReplay = (record) => {
|
||||
router.push({
|
||||
name: 'qualificationReApplyForm',
|
||||
params: { Id: record.id, node: record.node } // 传递两个参数
|
||||
|
|
|
@ -73,9 +73,9 @@
|
|||
<el-form-item label="审批状态" label-position="top" class="myFormItemLable">
|
||||
<template v-if="detailForm.state">
|
||||
<el-text v-if="detailForm.state == 1 && detailForm.node == 0" type="info"
|
||||
class="infoinfoText">待审核</el-text>
|
||||
class="infoinfoText">待审核</el-text>
|
||||
<el-text v-if="detailForm.state == 1 && detailForm.node == 1" type="info"
|
||||
class="infoinfoText">待审核</el-text>
|
||||
class="infoinfoText">待审核</el-text>
|
||||
<el-text v-if="detailForm.state == 1 && detailForm.node == 2" type="info"
|
||||
class="infoinfoText">待培训中心审核</el-text>
|
||||
<el-text v-if="detailForm.state == 2" type="success"
|
||||
|
@ -89,10 +89,48 @@
|
|||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-form ref="beforeConditionInfoRef" label-position="top">
|
||||
<el-form ref="beforeConditionInfoRef" label-position="top">
|
||||
<div class="headerTitle">申请信息</div>
|
||||
<div class="applyFormContainer" v-if="detailForm.qualificationId">
|
||||
|
||||
<div class="applyFormContainer" v-if="detailForm.labelId">
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="qualificationName" label="资质名称" width="100" />
|
||||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
<template #default="scope">
|
||||
<el-image v-if="scope.row.certificateUrl"
|
||||
style="width: 70px; height: 44px;line-height: 50px;"
|
||||
:src="baseUrl + scope.row.certificateUrl" fit="fill" />
|
||||
<span v-else>请在"高压资质培训信息"上传资质证书</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="是否过期" width="120">
|
||||
<template #default="scope">
|
||||
<el-text v-if="scope.row.status == 1 && scope.row.certificateUrl" type="success"
|
||||
class="successText">正常</el-text>
|
||||
<el-text v-else-if="scope.row.status == 2 && scope.row.certificateUrl" type="danger"
|
||||
class="dangerText">过期</el-text>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="有效开始日期" width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.startTime"> {{
|
||||
moment(scope.row.startTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="expireTime" label="到期日期" width="130">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.expireFlag == 0">长期</span>
|
||||
<template v-else>
|
||||
<span v-if="scope.row.expireTime"> {{
|
||||
moment(scope.row.expireTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
<div class="headerTitle">审批记录</div>
|
||||
|
@ -123,18 +161,19 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord } from "@/api/labelManage/labelManage"
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useRouter } from 'vue-router'
|
||||
import moment from 'moment'
|
||||
|
||||
const route = useRoute()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const levelList = ref([
|
||||
{ title: '资质管理', path: '/qualification' },
|
||||
|
@ -143,7 +182,7 @@ const levelList = ref([
|
|||
])
|
||||
const { proxy } = getCurrentInstance()
|
||||
const data = reactive({
|
||||
detailForm: { },
|
||||
detailForm: {},
|
||||
ruleForm: {
|
||||
state: '',
|
||||
remark: ''
|
||||
|
@ -155,6 +194,7 @@ const data = reactive({
|
|||
})
|
||||
// 审批记录
|
||||
const tableData = ref([])
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
// 获取审批记录
|
||||
const getLabelApprovalRecord = (_id) => {
|
||||
var queryParamsRecord = {
|
||||
|
@ -180,33 +220,18 @@ onMounted(() => {
|
|||
} else {
|
||||
ruleForm.value.id = null
|
||||
}
|
||||
});
|
||||
});
|
||||
// 获取详情
|
||||
const getDetailInfo = (_id) => {
|
||||
const getDetailInfo = (_id) => {
|
||||
getBusUserLabelDetail(_id).then(res => {
|
||||
if (res.code == 200) {
|
||||
detailForm.value = res.data
|
||||
// detailForm.value = {
|
||||
// qualificationName: res.data.qualificationName,
|
||||
// sourceQualificationName: res.data.sourceQualificationName,
|
||||
// deptName: res.data.deptName,
|
||||
// sectionName: res.data.sectionName,
|
||||
// workNo: res.data.workNo,
|
||||
// userName: res.data.userName,
|
||||
// englishName: res.data.englishName,
|
||||
// dependencyName: res.data.dependencyName,
|
||||
// escUserName: res.data.escUserName,
|
||||
// createTime: res.data.createTime,
|
||||
// state: res.data.state,
|
||||
// node: res.data.node,
|
||||
// qualificationId: res.data.qualificationId,
|
||||
// }
|
||||
// beforeConditionInfo.value = JSON.parse(res.data.beforeCondition)
|
||||
tableData.value = res.data.userQualificationCertificateList
|
||||
console.log('标签详情', detailForm.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.app-main {
|
||||
|
|
Loading…
Reference in New Issue
Block a user