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