-
+
+
+
+
+
-
+ class="el-timeline-item__node">
+
+
+
@@ -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;
}
diff --git a/src/views/auth/index.vue b/src/views/auth/index.vue
index 9ddf732..78bff10 100644
--- a/src/views/auth/index.vue
+++ b/src/views/auth/index.vue
@@ -1,8 +1,8 @@
-
-
+
+
{{ userParams.nickName }}
-
-
-
-
-
- 工号:
-
-
{{ userParams.workCode }}
-
-
-
-
{{ userParams.mobile }}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -94,7 +94,70 @@
-
+
+
+
+
+
+
+
+ {{ agentInfoForm.nickName }}
+
+
+
+
+
+ {{ agentUserList?.length !== 0 ? '更改' : '请选择' }}
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
@@ -113,8 +176,8 @@
- 提交
- 关闭
+ 提交
+ 关闭
@@ -126,18 +189,23 @@
import {ElNotification} from 'element-plus'
import {useTagsView} from '@/stores/tagsview.js'
import {getAuthInfo} from "@/api/login";
-import {editPassword, initPassword} from "@/api/auth/auth";
+import {editPassword, initPassword,getAgentInfo,editAgentInfo} from "@/api/auth/auth";
+import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
+const router = useRouter()
+const tagsViewStore = useTagsView()
const isInitPassword = ref(false);
+const agentUserList = ref([])
+const agentUserPickerRef = ref()
const userParams = ref({});
const passwordRef = ref();
-const router = useRouter()
+const agentInfoForm = ref({});
const userPassword = ref({
oldPassword: '',
newPassword: '',
confirmPassword: ''
});
-const tagsViewStore = useTagsView()
+
const validatePasswordComplexity = (rule, value, callback) => {
const reg = /^(?=.*[a-zA-Z])(?=.*\d).{1,9}$/; //密码必须是至少包含字母、数字,1-9位
if (!reg.test(value)) {
@@ -176,21 +244,90 @@ const rules = reactive({
}
],
})
+const disabledAgentEndTime = (time) => {
+ return time.getTime() <= new Date(agentInfoForm.value.agentStartTime)-1 * 24 * 3600 * 1000
+}
-const getInfo = async () => {
+const handleShowAgentDialog = () => {
+ agentUserPickerRef.value.showUserPicker()
+}
+
+const agentUserPickerOk = (userList) => {
+ console.info("🚀 ~method:userList -----", userList)
+ agentUserList.value = userList
+}
+const getUserInfo = async () => {
await getAuthInfo().then(res => {
- userParams.value = res.data.user
- isInitPassword.value = res.data.initPassword
+ if(res.code===1000){
+ userParams.value = res.data.user
+ isInitPassword.value = res.data.initPassword
+ }else {
+ ElNotification({
+ title: '提示',
+ message: res.msg,
+ type: 'error'
+ })
+ }
})
}
+const getUserAgentInfo = async () => {
+ await getAgentInfo().then(res => {
+ if(res.code===1000){
+ agentInfoForm.value=res.data
+ agentUserList.value=[
+ {
+ id:res.data.agentUserId,
+ name:res.data.agentNickName,
+ companyName:res.data.agentCompanyName,
+ }
+ ]
+ }else {
+ ElNotification({
+ title: '提示',
+ message: res.msg,
+ type: 'error'
+ })
+ }
+ })
+}
+localStorage.removeItem('originallySelectedList')
+
const belongToRole = (roles) => {
if (!roles) return;
return roles.map(item => item.roleName).join(',')
}
-
+const handleSubmitAgent=()=>{
+ let agentUserId=''
+ if(agentUserList.value&&agentUserList.value.length>0){
+ agentUserId=agentUserList.value[0]?.id
+ }else {
+ ElNotification({
+ title: '提示',
+ message: '请选择代理人!',
+ type: 'error'
+ })
+ return;
+ }
+ let agentParams={
+ agentUserId:agentUserId,
+ agentStartTime:agentInfoForm.value.agentStartTime,
+ agentEndTime:agentInfoForm.value.agentEndTime
+ }
+ console.info("🚀 ~method:agentParams -----", agentParams)
+ editAgentInfo(agentParams).then(res => {
+ ElNotification({
+ title: '提示',
+ message: res.msg,
+ type: res.code === 1000 ? 'success' : 'error'
+ })
+ if (res.code === 1000) {
+ getUserAgentInfo()
+ }
+ })
+}
// 修改密码
-const handleSubmit = async () => {
+const handleSubmitPassword = async () => {
if (isInitPassword.value) {
editPassword({
...userPassword.value
@@ -221,23 +358,28 @@ const handleSubmit = async () => {
}
}
// 关闭
-const close = () => {
+const closeIndividualCenter = () => {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push('/')
}
onMounted(() => {
- getInfo()
+ getUserInfo()
+ getUserAgentInfo()
})
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 16270ee..431a050 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -63,7 +63,7 @@
提交时间:
{{ item.submitTime }}
- 时间要求 {{ item.totalTime }}天
+