bug修复
This commit is contained in:
parent
1338b7ef8b
commit
0d656175d5
|
|
@ -0,0 +1,175 @@
|
|||
<template>
|
||||
<div class="file-list">
|
||||
<div v-if="items.length === 0" class="no-files">
|
||||
<img src="../../assets/file/no_file.png" alt="文件图标" />
|
||||
</div>
|
||||
<div v-for="(item, index) in items" :key="index" class="file-item">
|
||||
<div class="file-icon" @click="handView(item)" :title="item.fileName" style="cursor: pointer">
|
||||
<img v-if="getIconPaths(item.fileName) === 'word.png'" src="@/assets/file/word.png" alt="文件图标" />
|
||||
<img v-else-if="getIconPaths(item.fileName) === 'excel.png'" src="@/assets/file/excel.png" alt="文件图标" />
|
||||
<img v-else-if="getIconPaths(item.fileName) === 'pdf.png'" src="@/assets/file/pdf.png" alt="文件图标" />
|
||||
<img v-else-if="getIconPaths(item.fileName) === 'txt.png'" src="@/assets/file/txt.png" alt="文件图标" />
|
||||
<img v-else-if="getIconPaths(item.fileName) === 'ppt.png'" src="@/assets/file/ppt.png" alt="文件图标" />
|
||||
<img v-else-if="getIconPaths(item.fileName) === 'png'" :src="`${lookFile + item.filePath}`" alt="文件图标" />
|
||||
</div>
|
||||
<div class="file-details">
|
||||
<div class="file-name" :title="item.fileName">
|
||||
{{
|
||||
item.fileName.length > 8
|
||||
? item.fileName.substring(0, 8) + '....' + item.fileName.split('.').pop().toLowerCase()
|
||||
: item.fileName
|
||||
}}
|
||||
<div class="file-info">
|
||||
<div class="file-size">{{ (item.fileSize / 1024).toFixed(2) + 'Kb' }}</div>
|
||||
<div class="file-time">{{ item.createTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="文件预览"
|
||||
:visible.sync="viewOpen"
|
||||
v-if="viewOpen"
|
||||
width="90%"
|
||||
append-to-body
|
||||
@closed="onCloseFileDialog"
|
||||
>
|
||||
<div style="width: 100%; height: 720px">
|
||||
<div>
|
||||
<bns-kkFile-preview :items="filePreview" v-on:fillInComments="handleFillInComments"></bns-kkFile-preview>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import bnsKkFilePreview from '@/components/pro-tabs/bns-kkFile-preview.vue'
|
||||
import { getIconPath } from '@/utils/commonMethod'
|
||||
import { lookFaceFile } from '@/utils/bonus'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'bns-kkFile-preview': bnsKkFilePreview,
|
||||
},
|
||||
props: {
|
||||
items: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return {
|
||||
label: '',
|
||||
}
|
||||
},
|
||||
},
|
||||
// 是否显示意见输入框 如是审核时则展示
|
||||
isShowOptions: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 接收其他 taps 传递的意见
|
||||
opinionValueOther: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
opinionValueOther: {
|
||||
handler(newValue) {
|
||||
this.opinionValue = newValue
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewOpen: false,
|
||||
filePreview: {
|
||||
filePreviewUrl: '',
|
||||
fileName: '',
|
||||
showDownloadButton: false,
|
||||
},
|
||||
iconSrc: '',
|
||||
lookFile: '',
|
||||
opinionValue: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.lookFile = lookFaceFile()
|
||||
},
|
||||
methods: {
|
||||
getIconPaths(fileName) {
|
||||
return getIconPath(fileName)
|
||||
},
|
||||
handView(item) {
|
||||
//打开一个组件预览文件
|
||||
this.viewOpen = true
|
||||
this.filePreview = {
|
||||
filePreviewUrl: item.filePath,
|
||||
fileName: item.fileName,
|
||||
}
|
||||
},
|
||||
handleFillInComments: function (e) {
|
||||
console.log('handleFillInComments', e)
|
||||
},
|
||||
|
||||
// 弹框关闭时触发
|
||||
onCloseFileDialog() {
|
||||
// 触发自定义事件传递意见框的值
|
||||
this.$emit('onCloseFileDialog', this.opinionValue)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.file-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap; /* 让文件列表自动换行 */
|
||||
margin-left: 2%;
|
||||
}
|
||||
|
||||
.file-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 10px; /* 控制文件项之间的间距 */
|
||||
/*width: calc(20% - 20px); /* 每行显示两列,计算间距 */
|
||||
}
|
||||
|
||||
.file-icon img {
|
||||
margin-top: 5px;
|
||||
width: 100px; /* 调整图标大小 */
|
||||
height: 100px;
|
||||
margin-right: 10px; /* 图标和详细信息之间的间距 */
|
||||
}
|
||||
|
||||
.file-details {
|
||||
width: 160px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.file-name {
|
||||
width: 160px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.file-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.file-size {
|
||||
}
|
||||
.file-time {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.no-files {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -26,7 +26,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="文件预览" :visible.sync="viewOpen" width="90%" append-to-body @closed="onCloseFileDialog">
|
||||
<el-dialog
|
||||
title="文件预览"
|
||||
:visible.sync="viewOpen"
|
||||
v-if="viewOpen"
|
||||
width="90%"
|
||||
append-to-body
|
||||
@closed="onCloseFileDialog"
|
||||
>
|
||||
<div style="width: 100%; height: 720px">
|
||||
<el-row>
|
||||
<el-col :span="!isShowOptions ? 24 : 18">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<el-tabs v-model="activeName" @tab-click="handleClick" style="padding: 10px">
|
||||
<el-tab-pane label="人员信息" name="first">
|
||||
<div class="app-container">
|
||||
<el-form ref="elForm" size="medium" label-width="100px" disabled>
|
||||
<el-form ref="elForm" size="medium" label-width="100px">
|
||||
<!-- <el-row type="flex" justify="start" align="top" :gutter="gutterValue" v-show="items.auditType === '出场'">
|
||||
<el-col :span="11">
|
||||
<el-form-item label-width="120px" label="出场原因" prop="">
|
||||
|
|
@ -20,25 +20,25 @@
|
|||
<el-row type="flex" justify="start" align="top" :gutter="gutterValue">
|
||||
<el-col :span="11">
|
||||
<el-form-item label-width="120px" label="姓名">
|
||||
<el-input v-model="items.data.name" clearable :style="{ width: '100%' }" />
|
||||
<el-input v-model="items.data.name" clearable :style="{ width: '100%' }" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label-width="120px" label="性别">
|
||||
<el-input v-model="items.data.sex" clearable :style="{ width: '100%' }" />
|
||||
<el-input v-model="items.data.sex" clearable :style="{ width: '100%' }" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="start" align="top" :gutter="gutterValue">
|
||||
<el-col :span="11">
|
||||
<el-form-item label-width="120px" label="年龄">
|
||||
<el-input v-model="items.data.age" clearable :style="{ width: '100%' }" />
|
||||
<el-input v-model="items.data.age" clearable :style="{ width: '100%' }" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="11">
|
||||
<el-form-item label-width="120px" label="身份证号码" prop="idCard">
|
||||
<el-input v-model="items.data.idCard" clearable :style="{ width: '100%' }" />
|
||||
<el-input v-model="items.data.idCard" clearable :style="{ width: '100%' }" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -46,12 +46,12 @@
|
|||
<el-row type="flex" justify="start" align="top" :gutter="gutterValue">
|
||||
<el-col :span="11">
|
||||
<el-form-item label-width="120px" label="联系方式">
|
||||
<el-input v-model="items.data.phone" clearable :style="{ width: '100%' }" />
|
||||
<el-input v-model="items.data.phone" clearable :style="{ width: '100%' }" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label-width="120px" label="岗位">
|
||||
<el-input v-model="items.data.postName" clearable :style="{ width: '100%' }" />
|
||||
<el-input v-model="items.data.postName" clearable :style="{ width: '100%' }" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -151,7 +151,8 @@
|
|||
</el-tabs>
|
||||
</template>
|
||||
<script>
|
||||
import bnsFileListTabs from '@/components/pro-tabs/bns-file-list-tabs.vue'
|
||||
// import bnsFileListTabs from '@/components/pro-tabs/bns-file-list-tabs.vue'
|
||||
import bnsFileListTabs from '@/components/pro-tabs/bns-file-list-tabs-new.vue'
|
||||
import BnsTimelineTabs from '@/components/pro-tabs/bns-timeline-tabs.vue'
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ export const dynamicRoutes = [
|
|||
path: '/project/admission-request-auth',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['add:supervisor:person'],
|
||||
permissions: ['system:addPersonnel:query'],
|
||||
children: [
|
||||
{
|
||||
path: 'addPersonnel/:data(.*)',
|
||||
|
|
@ -415,7 +415,7 @@ export const dynamicRoutes = [
|
|||
{
|
||||
path: 'addPersonnel/:data(.*)',
|
||||
component: () => import('@/views/pro/supervisorPersonManage/addPersonnel.vue'),
|
||||
meta: { title: '人员入场申请管理', activeMenu: '/project/supervisor-person-manage/admissionRequest' },
|
||||
meta: { title: '人员出场申请管理', activeMenu: '/project/supervisor-person-manage/admissionRequest' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -529,6 +529,23 @@ export const dynamicRoutes = [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/project/supervisorPersonManage',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:subPersonApply:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'exit-personApproval/:data(.*)',
|
||||
component: () => import('@/views/pro/cons/subManagement/approval/supervisorApproval-exit.vue'),
|
||||
name: 'supervisorPersonManage-exit',
|
||||
meta: {
|
||||
title: '人员审批',
|
||||
activeMenu: '/project/project_approval_during_construction/pro/supervisor/exit',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/system/person-approval-auth',
|
||||
component: Layout,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form v-show="showSearch" :model="queryParams" ref="queryForm" size="small" inline>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-form-item label="关键字---" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@
|
|||
v-hasPermi="['system:subPersonApply:list']"
|
||||
@click="handleApprove(scope.row)"
|
||||
>
|
||||
审批
|
||||
审批---
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click="handleView(scope.row)" v-else>查看</el-button>
|
||||
<el-button size="mini" type="text" @click="handleAuditRecord(scope.row)">审核记录</el-button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,177 @@
|
|||
<template>
|
||||
<div>
|
||||
<bns-person-approval-tabs
|
||||
:items="formData"
|
||||
v-on:pass="approval"
|
||||
v-on:turnDown="turnDown"
|
||||
v-on:finalInstance="finalInstance"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getMyToDoNum, getParams, hideSensitiveInfo } from '@/utils/bonus'
|
||||
// import BnsPersonApprovalTabs from '@/components/pro-tabs/bns-person-approval-tabs.vue'
|
||||
import BnsPersonApprovalTabs from '@/components/pro-tabs/bns-supervisor-person-approval-tabs'
|
||||
import { getSubPersonnelDetails } from '@/api/pro/outsourcingPro'
|
||||
import { submitPersonApproval } from '@/api/pro/subManagement/subList'
|
||||
import BnsTimelineTabs from '@/components/pro-tabs/bns-timeline-tabs.vue'
|
||||
|
||||
import { listSupervisorPersonById } from '@/api/pro/outsourcingPro'
|
||||
|
||||
import { approvalHistory } from '@/api/terminalEquipment/deviceInformation'
|
||||
import { decryptCBC } from '@/utils/aescbc'
|
||||
export default {
|
||||
components: {
|
||||
BnsTimelineTabs,
|
||||
BnsPersonApprovalTabs,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
paramsData: undefined,
|
||||
formData: {
|
||||
data: {},
|
||||
auditType: '入场',
|
||||
approvalInfo: [],
|
||||
finalCheck: '0',
|
||||
showType: 2,
|
||||
isExamine: true,
|
||||
btnShow: true, //需要根据按钮判断true false 查看false 审核true
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const params = this.$route.params && this.$route.params.data
|
||||
this.paramsData = JSON.parse(decryptCBC(params))
|
||||
console.log('paramsData==' + JSON.stringify(this.paramsData))
|
||||
this.getDetails()
|
||||
this.approvalHistory()
|
||||
},
|
||||
methods: {
|
||||
getParams,
|
||||
approvalHistory() {
|
||||
console.log('this.paramsData.taskId:' + this.paramsData.taskId)
|
||||
approvalHistory({ taskId: this.paramsData.taskId }).then(res => {
|
||||
this.formData.approvalInfo = res.data
|
||||
})
|
||||
},
|
||||
getMyToDoNum,
|
||||
approval(e) {
|
||||
console.log('tongg')
|
||||
console.log(JSON.stringify(e))
|
||||
const param = {
|
||||
reason: e,
|
||||
...this.paramsData,
|
||||
agree: '1',
|
||||
}
|
||||
submitPersonApproval(param).then(response => {
|
||||
this.getMyToDoNum()
|
||||
console.log('responseresponseresponse', JSON.stringify(response))
|
||||
if (response.code === 200) {
|
||||
this.$message({
|
||||
message: '审核成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.$tab.closePage()
|
||||
} else {
|
||||
this.$message({
|
||||
message: response.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDetails() {
|
||||
// const params = {
|
||||
// ...this.getParams(),
|
||||
// uuid: this.paramsData.uuid,
|
||||
// }
|
||||
// getSubPersonnelDetails(params).then(response => {
|
||||
// this.formData.data = response.data
|
||||
|
||||
// console.log('response.data详情数据', response.data)
|
||||
// this.formData.data.phone = hideSensitiveInfo(response.data.phone)
|
||||
// this.formData.data.idCard = hideSensitiveInfo(response.data.idCard)
|
||||
// this.formData.finalCheck = this.paramsData.finalCheck
|
||||
// this.formData.showType = this.paramsData.showType
|
||||
// this.formData.isExamine = this.paramsData.isExamine
|
||||
// this.formData.btnShow = this.paramsData.btnShow
|
||||
// this.formData.auditType = this.paramsData.auditType
|
||||
// console.log('this.formData.data==' + JSON.stringify(this.formData))
|
||||
// this.loading = false
|
||||
// })
|
||||
|
||||
const params = {
|
||||
id: this.paramsData.id,
|
||||
proId: this.paramsData.proId,
|
||||
uuid: this.paramsData.uuid,
|
||||
supUuid: this.paramsData.supUuid,
|
||||
}
|
||||
listSupervisorPersonById(params).then(response => {
|
||||
console.log('详情---', response)
|
||||
this.formData.data = response.data
|
||||
this.formData.showType = this.paramsData.showType
|
||||
this.formData.isExamine = this.paramsData.isExamine
|
||||
this.formData.btnShow = this.paramsData.btnShow
|
||||
})
|
||||
},
|
||||
finalInstance(e) {
|
||||
console.log('终审按钮点击')
|
||||
console.log(JSON.stringify(e))
|
||||
|
||||
console.log('回退按钮点击')
|
||||
console.log('butongtongg')
|
||||
const param = {
|
||||
reason: e,
|
||||
...this.paramsData,
|
||||
agree: '3',
|
||||
}
|
||||
console.log('param', JSON.stringify(param))
|
||||
submitPersonApproval(param).then(response => {
|
||||
this.getMyToDoNum()
|
||||
console.log('responseresponseresponse', JSON.stringify(response))
|
||||
if (response.code === 200) {
|
||||
this.$message({
|
||||
message: '终审成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.$tab.closePage()
|
||||
} else {
|
||||
this.$message({
|
||||
message: response.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
turnDown(e) {
|
||||
console.log('回退按钮点击')
|
||||
console.log('butongtongg')
|
||||
const param = {
|
||||
...e,
|
||||
...this.paramsData,
|
||||
agree: '2',
|
||||
}
|
||||
console.log('param', JSON.stringify(param))
|
||||
submitPersonApproval(param).then(response => {
|
||||
this.getMyToDoNum()
|
||||
console.log('responseresponseresponse', JSON.stringify(response))
|
||||
if (response.code === 200) {
|
||||
this.$message({
|
||||
message: '退回通过成功',
|
||||
type: 'success',
|
||||
})
|
||||
this.$tab.closePage()
|
||||
} else {
|
||||
this.$message({
|
||||
message: response.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -425,7 +425,7 @@ export default {
|
|||
console.log('审核--')
|
||||
|
||||
this.$router.push(
|
||||
'/project/supervisorPersonManage/personApproval/' +
|
||||
'/project/supervisorPersonManage/exit-personApproval/' +
|
||||
encryptCBC(
|
||||
JSON.stringify({
|
||||
uuid: row.uuid,
|
||||
|
|
@ -439,7 +439,7 @@ export default {
|
|||
showType: 2,
|
||||
isExamine: true,
|
||||
btnShow: true,
|
||||
// finalCheck: row.finalCheck,
|
||||
finalCheck: 0,
|
||||
})
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue