feat : 审批记录的代理审批,用户管理的设置代理功能,首页待办
This commit is contained in:
@@ -212,3 +212,17 @@ export const checkMatrix = (userId) => {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export const getAgentInfo=(userId)=>{
|
||||
return request({
|
||||
url: `/admin/mosr/user/approval/agent/${userId}`,
|
||||
method:'get'
|
||||
})
|
||||
}
|
||||
|
||||
export const editAgentInfo=(data)=>{
|
||||
return request({
|
||||
url:'/admin/mosr/user/approval/agent',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,16 @@
|
||||
<slot name="pre"></slot>
|
||||
<div class="user-audit">
|
||||
<div class="circle-user">
|
||||
<Tooltip :content="user.name" placement="bottom-start" width="45px"/>
|
||||
<Tooltip v-if="userName" :content="userName" placement="bottom-start" width="45px"/>
|
||||
<Tooltip v-else :content="user.name" placement="bottom-start" width="45px"/>
|
||||
<!-- :style="{-->
|
||||
<!-- backgroundColor: '#fff'-->
|
||||
<!-- }">-->
|
||||
<div v-if="user.icon"
|
||||
class="el-timeline-item__node" :style="{
|
||||
backgroundColor: '#fff'
|
||||
}">
|
||||
<el-icon v-if="user.icon" size="15" :color="user.color" :class="user.class">
|
||||
class="el-timeline-item__node">
|
||||
<div v-if="user.isAgent&&!showIcon">
|
||||
</div>
|
||||
<el-icon v-else size="15" :color="user.color" :class="user.class">
|
||||
<component :is="user.icon"/>
|
||||
</el-icon>
|
||||
</div>
|
||||
@@ -28,10 +32,18 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showIcon: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
user: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
userName: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'design'
|
||||
@@ -71,20 +83,22 @@ const initUser = (user) => {
|
||||
user["class"] = 'is-loading'
|
||||
}
|
||||
//拒绝后评论
|
||||
if (state === 'REFUSE') {
|
||||
user["icon"] = 'Close'
|
||||
if (state === 'REFUSE' || state === 'ROLLBACK') {
|
||||
// user["icon"] = 'Close'
|
||||
// user["color"] = "#f56c6c"
|
||||
user["icon"] = 'CircleCloseFilled'
|
||||
user["color"] = "#f56c6c"
|
||||
}
|
||||
if (state === 'PASS') {
|
||||
user["icon"] = 'MoreFilled'
|
||||
user["color"] = "#c0c4cc"
|
||||
}
|
||||
if (state === 'ROLLBACK') {
|
||||
// user["icon"] = 'RefreshLeft'
|
||||
// user["color"] = "#f78f5f"
|
||||
user["icon"] = 'CircleCloseFilled'
|
||||
user["color"] = "#f56c6c"
|
||||
}
|
||||
// if (state === 'ROLLBACK') {
|
||||
// // user["icon"] = 'RefreshLeft'
|
||||
// // user["color"] = "#f78f5f"
|
||||
// user["icon"] = 'CircleCloseFilled'
|
||||
// user["color"] = "#f56c6c"
|
||||
// }
|
||||
return user;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<span>提交时间:</span>
|
||||
</div>
|
||||
<div class="time"> {{ item.submitTime }}</div>
|
||||
<div class="time">时间要求 {{ item.totalTime }}天</div>
|
||||
<!-- <div class="time">时间要求 {{ item.totalTime }}天</div>-->
|
||||
</div>
|
||||
<div class="view" @click="handleView(item)">查看</div>
|
||||
</div>
|
||||
@@ -114,7 +114,7 @@
|
||||
<span>提交时间:</span>
|
||||
</div>
|
||||
<div class="time"> {{ item.submitTime }}</div>
|
||||
<div class="time">时间要求 {{ item.totalTime }}天</div>
|
||||
<!-- <div class="time">时间要求 {{ item.totalTime }}天</div>-->
|
||||
</div>
|
||||
<div class="view" @click="handleView(item)">查看</div>
|
||||
</div>
|
||||
@@ -627,7 +627,7 @@ const moneyPieOption = ref({
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
// getTodoList()
|
||||
getTodoList()
|
||||
await getResearchChart()
|
||||
// nextTick(() => {
|
||||
// let topLeft=document.getElementById('topLeft')
|
||||
@@ -664,7 +664,7 @@ const goToSpecialFund = () => {
|
||||
})
|
||||
}
|
||||
const refreshTodoOrDoneList = () => {
|
||||
// getTodoList()
|
||||
getTodoList()
|
||||
}
|
||||
const initFundCharts = () => {
|
||||
data.fundPieCharts = echarts.init(document.getElementById('fundPie')).setOption(fundPieOption.value)
|
||||
@@ -675,8 +675,8 @@ const initMoneyCharts = () => {
|
||||
const getTodoList = () => {
|
||||
getHomeTaskInfo().then(res => {
|
||||
if (res.code === 1000) {
|
||||
// todoList.value=res.data.rows
|
||||
// todoNum.value=res.data.total
|
||||
todoList.value=res.data.rows
|
||||
todoNum.value=res.data.total
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -1267,9 +1267,9 @@ const handleView = (row) => {
|
||||
width: 80px;
|
||||
margin-left: 23px;
|
||||
|
||||
&:last-child {
|
||||
white-space: nowrap;
|
||||
}
|
||||
//&:last-child {
|
||||
// white-space: nowrap;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div v-for="item in agentUserList" :key="item.id" style="margin-right: 5px">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<user-picker :multiple="false" ref="agentUserPickerRef" title="请选择代理人"
|
||||
<user-picker :multiple="false" ref="agentSettingUserPickerRef" title="请选择代理人"
|
||||
v-model:value="agentUserList" @ok="agentUserPickerOk"
|
||||
@cancelOrClear="agentUserPickerOk"/>
|
||||
</el-form-item>
|
||||
@@ -62,16 +62,20 @@
|
||||
|
||||
<script setup>
|
||||
import {ElNotification} from "element-plus";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
|
||||
import {editAgentInfo, getAgentInfo} from "@/api/user/user";
|
||||
|
||||
import {editAgentInfo,getAgentInfo} from "@/api/auth/auth";
|
||||
const agentUserList = ref([])
|
||||
const agentInfoForm = ref({});
|
||||
const agentUserPickerRef = ref()
|
||||
const agentSettingUserPickerRef = ref()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
localStorage.removeItem('originallySelectedList')
|
||||
const userId = ref(route.query.userId)
|
||||
|
||||
const getUserAgentInfo = async () => {
|
||||
await getAgentInfo().then(res => {
|
||||
await getAgentInfo(userId.value).then(res => {
|
||||
if (res.code === 1000) {
|
||||
agentInfoForm.value = res.data
|
||||
agentUserList.value = [
|
||||
@@ -95,7 +99,7 @@ const disabledAgentEndTime = (time) => {
|
||||
}
|
||||
|
||||
const handleShowAgentDialog = () => {
|
||||
agentUserPickerRef.value.showUserPicker()
|
||||
agentSettingUserPickerRef.value.showUserPicker()
|
||||
}
|
||||
|
||||
const agentUserPickerOk = (userList) => {
|
||||
@@ -115,6 +119,7 @@ const handleSubmitAgent=()=>{
|
||||
return;
|
||||
}
|
||||
let agentParams = {
|
||||
userId: userId.value,
|
||||
agentUserId: agentUserId,
|
||||
agentStartTime: agentInfoForm.value.agentStartTime,
|
||||
agentEndTime: agentInfoForm.value.agentEndTime
|
||||
|
||||
@@ -166,7 +166,8 @@ const tableConfig = reactive({
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" v-perm={auths.edit} link onClick={() => handleEdit(row)}>编辑</el-button>
|
||||
<el-button type="primary" v-perm={auths.agentSetting} link onClick={()=>handleAgentSetting(row)}>设置代理</el-button>
|
||||
<el-button type="primary" v-perm={auths.agentSetting} link onClick={() => handleAgentSetting(row)}>设置代理
|
||||
</el-button>
|
||||
{
|
||||
row.userType != 0 ?
|
||||
<el-button type="danger" v-perm={auths.del} link onClick={() => handleDel(row)}>删除</el-button> :
|
||||
@@ -174,7 +175,8 @@ const tableConfig = reactive({
|
||||
}
|
||||
{
|
||||
row.accountType == 0 ?
|
||||
<el-button type="primary" v-perm={auths.bindUser} link onClick={()=>handleBindAccount(row)}>绑定账号</el-button> :
|
||||
<el-button type="primary" v-perm={auths.bindUser} link
|
||||
onClick={() => handleBindAccount(row)}>绑定账号</el-button> :
|
||||
null
|
||||
}
|
||||
</div>
|
||||
@@ -188,9 +190,12 @@ const tableConfig = reactive({
|
||||
{name: '新增', color: "#DED0B2", auth: ['admin:user:add'], key: 'add'}
|
||||
]
|
||||
})
|
||||
const handleAgentSetting=()=>{
|
||||
const handleAgentSetting = (row) => {
|
||||
router.push({
|
||||
name: 'AgentSetting',
|
||||
query: {
|
||||
userId: row.userId,
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
@@ -239,7 +244,8 @@ const handleDel = (row) => {
|
||||
cancelButtonText: '取消'
|
||||
}).then(async res => {
|
||||
// const { code } = await
|
||||
}).catch(()=>{})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
const handleBindAccount = (row) => {
|
||||
currentId.value = row.userId
|
||||
@@ -283,7 +289,8 @@ const selected = (select) => {
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add': handleAdd()
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -304,6 +311,7 @@ const headBtnClick = (key) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-col-5:nth-child(4).el-col-offset-1) {
|
||||
margin-left: 35px !important;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
<div class="card">
|
||||
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name"
|
||||
:style="{'flex-direction': isColumn?'column':'row'}">
|
||||
<div class="avatar-block" :style="{'margin-bottom': isColumn?'10px':'0'}">
|
||||
<div class="avatar-block" :style="{'margin': isColumn?'0 0 10px 18px':'0'}">
|
||||
<name-circle :user="user" :type="operation.operation"/>
|
||||
<div class="name">
|
||||
<div class="name-block" :style="{'margin': isColumn?'0 0 0 30px':'0 20px 0 10px'}">
|
||||
<div style="display: flex;align-items: center" >
|
||||
<el-icon :color="user.accountType==='0'?'#95d475':user.accountType==null?'#95d475':'#409eff'"
|
||||
style="margin-right: 5px;">
|
||||
@@ -38,14 +38,25 @@
|
||||
<span>{{ user.jobActivityDesc }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="user.isAgent" style="display: flex;" :style="{'margin': isColumn?'10px 0':'0'}">
|
||||
<div>
|
||||
<!-- <div class="remark">{{ operation.remark }}</div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div>审批人:</div>-->
|
||||
<!-- <div>{{ user.name }}</div>-->
|
||||
<!-- </div>-->
|
||||
<name-circle :user="user" :showIcon="true" :user-name="user.agentUserName" :type="operation.operation"/>
|
||||
<span style="color: #909399;font-size: 14px">(代理审批)</span>
|
||||
</div>
|
||||
<div class="name-block">
|
||||
<div style="display: flex;align-items: center">
|
||||
<el-icon :color="user.accountType==='0'?'#95d475':user.accountType==null?'#95d475':'#409eff'"
|
||||
style="margin-right: 5px;">
|
||||
<UserFilled/>
|
||||
</el-icon>
|
||||
<span class="name-style">{{ user.agentUserName }}</span>
|
||||
</div>
|
||||
<span>{{ user.agentCompanyName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auditOpinion">
|
||||
<div v-if="user.auditOpinion">
|
||||
<div style="margin-bottom: 10px;color: #909399">{{ user.operationTime }}</div>
|
||||
<div style="margin-bottom: 10px;color: #909399">{{ user.operationTime||'2024-09-22 12:16:29' }}</div>
|
||||
<div class="username">
|
||||
<span style="font-weight: bold">审批意见:</span>
|
||||
<el-text v-text="user.auditOpinion" style="word-break: break-all">
|
||||
@@ -200,15 +211,15 @@ const initOperationFun = (operation) => {
|
||||
operation["remark"] = " 处理中"
|
||||
}
|
||||
//回退
|
||||
if (state === 'ROLLBACK') {
|
||||
// operation["icon"] = "RefreshLeft"
|
||||
// operation["color"] = "#f78f5f"
|
||||
operation["icon"] = "CircleCloseFilled"
|
||||
operation["color"] = "#f56c6c"
|
||||
operation["remark"] = " 回退成功"
|
||||
}
|
||||
// if (state === 'ROLLBACK') {
|
||||
// // operation["icon"] = "RefreshLeft"
|
||||
// // operation["color"] = "#f78f5f"
|
||||
// operation["icon"] = "CircleCloseFilled"
|
||||
// operation["color"] = "#f56c6c"
|
||||
// operation["remark"] = " 回退成功"
|
||||
// }
|
||||
//拒绝操作
|
||||
if (state === 'REFUSE' || state === 'AUTO_REFUSE') {
|
||||
if (state === 'REFUSE' || state === 'AUTO_REFUSE' ||state === 'ROLLBACK') {
|
||||
operation["icon"] = "CircleCloseFilled"
|
||||
operation["color"] = "#f56c6c"
|
||||
operation["remark"] = " 拒绝"
|
||||
@@ -267,6 +278,7 @@ init()
|
||||
:deep(.el-timeline-item__dot) {
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
:deep .el-card__body, .el-main {
|
||||
padding: 10px;
|
||||
}
|
||||
@@ -290,10 +302,7 @@ init()
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.avatar-block {
|
||||
display: flex;
|
||||
|
||||
.name {
|
||||
.name-block {
|
||||
width: 130px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -309,10 +318,17 @@ init()
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
.avatar-block {
|
||||
display: flex;
|
||||
|
||||
.agent-style {
|
||||
color: #909399;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
> div:nth-child(2) {
|
||||
.auditOpinion {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #8a8a8a;
|
||||
|
||||
Reference in New Issue
Block a user