|
|
@@ -4,12 +4,15 @@ import { permissionNames } from "@@/services/PermissionNames"
|
|
|
import { useCascaderAreaData } from "@@/config/area-data"
|
|
|
import { useCascaderIndustryData } from "@/core/config/industry-data"
|
|
|
import dayjs from "dayjs"
|
|
|
+import appStore from "@s"
|
|
|
const { am_alumnus_type } = useDict("am_alumnus_type")
|
|
|
|
|
|
const tableRef = ref()
|
|
|
const modalRef = ref()
|
|
|
const auditModalRef = ref()
|
|
|
const orgColumns = ref<any[]>([])
|
|
|
+const userId = computed(() => appStore.authStore.user.userId)
|
|
|
+
|
|
|
const yearColumns = computed(() => {
|
|
|
const cols: any = []
|
|
|
for (let i = new Date().getFullYear(); i >= 1950; i--) {
|
|
|
@@ -66,10 +69,10 @@ const opts = reactive({
|
|
|
{ field: "userId", name: "用户id", visible: false, width: 80 },
|
|
|
{ field: "name", name: "姓名", visible: true, isSort: true, width: 100 },
|
|
|
{ field: "gender", name: "性别", visible: true, isSort: true, width: 80 },
|
|
|
- { field: "birthday", name: "出生日期", visible: true, isSort: true, width: 100 },
|
|
|
- { field: "type", name: "校友身份", visible: true, isSort: true, width: 80 },
|
|
|
- { field: "enrolYear", name: "入学年份", visible: true, isSort: true, width: 80 },
|
|
|
- { field: "graduateYear", name: "毕业年份", visible: true, isSort: true, width: 80 },
|
|
|
+ // { field: "birthday", name: "出生日期", visible: true, isSort: true, width: 100 },
|
|
|
+ { field: "type", name: "校友身份", visible: true, isSort: true, width: 100 },
|
|
|
+ { field: "enrolYear", name: "入学年份", visible: true, isSort: true, width: 100 },
|
|
|
+ { field: "graduateYear", name: "毕业年份", visible: true, isSort: true, width: 100 },
|
|
|
{ field: "city", name: "所在地区", visible: true, isSort: true },
|
|
|
{ field: "amClass", name: "班级", visible: true, isSort: true, width: 80 },
|
|
|
{ field: "amPublic", name: "信息公开", visible: true, width: 100 },
|
|
|
@@ -510,6 +513,25 @@ function handleAudit(row: any) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+function handleResetPwd(row: any) {
|
|
|
+ message
|
|
|
+ .prompt('请输入"' + row.name + '"的新密码', "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ closeOnClickModal: false,
|
|
|
+ inputPattern: /^.{5,20}$/,
|
|
|
+ inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
|
|
|
+ })
|
|
|
+ .then(({ value }) => {
|
|
|
+ apis.system.userApi.resetUserPwd(row.userId, value).then(() => {
|
|
|
+ message.msgSuccess("修改成功,新密码是:" + value)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ //
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
/** 提交按钮 */
|
|
|
function submitForm() {
|
|
|
apis.amActivity.alumnusApi.addOrUpdateAlumnus(form.value).then(() => {
|
|
|
@@ -581,8 +603,8 @@ onMounted(init)
|
|
|
<span v-if="row.province">
|
|
|
{{ row.province }}
|
|
|
<span v-if="row.city">
|
|
|
- /{{ row.city }}
|
|
|
- <span v-if="row.district">/{{ row.district }}</span>
|
|
|
+ / {{ row.city }}
|
|
|
+ <span v-if="row.district">/ {{ row.district }}</span>
|
|
|
</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
@@ -590,39 +612,53 @@ onMounted(init)
|
|
|
<DictTag type="alumnus_audit_status" :value="row.auditStatus"></DictTag>
|
|
|
</template>
|
|
|
<template #actions="{ row }">
|
|
|
- <vb-tooltip v-if="row.auditStatus != 1" content="审核" placement="top">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- :type="row.auditStatus == 0 ? 'success' : 'danger'"
|
|
|
- @click="handleAudit(row)"
|
|
|
- v-hasPermission="permissionNames.AmActivityAlumnusAudit">
|
|
|
- <template #icon>
|
|
|
- <VbIcon icon-name="check-square" icon-type="duotone" class="fs-3"></VbIcon>
|
|
|
- </template>
|
|
|
- </el-button>
|
|
|
- </vb-tooltip>
|
|
|
- <vb-tooltip content="修改" placement="top">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="handleUpdate(row)"
|
|
|
- v-hasPermission="permissionNames.AmActivityAlumnusEdit">
|
|
|
- <template #icon>
|
|
|
- <VbIcon icon-name="notepad-edit" icon-type="duotone" class="fs-3"></VbIcon>
|
|
|
- </template>
|
|
|
- </el-button>
|
|
|
- </vb-tooltip>
|
|
|
- <vb-tooltip content="删除" placement="top">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="handleDelete([row])"
|
|
|
- v-hasPermission="permissionNames.AmActivityAlumnusRemove">
|
|
|
- <template #icon>
|
|
|
- <VbIcon icon-name="trash-square" icon-type="duotone" class="fs-3"></VbIcon>
|
|
|
- </template>
|
|
|
- </el-button>
|
|
|
- </vb-tooltip>
|
|
|
+ <span v-if="row.userId == userId" class="text-muted">-</span>
|
|
|
+ <template v-else>
|
|
|
+ <vb-tooltip v-if="row.auditStatus != 1" content="审核" placement="top">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ :type="row.auditStatus == 0 ? 'success' : 'danger'"
|
|
|
+ @click="handleAudit(row)"
|
|
|
+ v-hasPermission="permissionNames.AmActivityAlumnusAudit">
|
|
|
+ <template #icon>
|
|
|
+ <VbIcon icon-name="check-square" icon-type="duotone" class="fs-3"></VbIcon>
|
|
|
+ </template>
|
|
|
+ </el-button>
|
|
|
+ </vb-tooltip>
|
|
|
+ <vb-tooltip content="修改" placement="top">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="handleUpdate(row)"
|
|
|
+ v-hasPermission="permissionNames.AmActivityAlumnusEdit">
|
|
|
+ <template #icon>
|
|
|
+ <VbIcon icon-name="notepad-edit" icon-type="duotone" class="fs-3"></VbIcon>
|
|
|
+ </template>
|
|
|
+ </el-button>
|
|
|
+ </vb-tooltip>
|
|
|
+ <vb-tooltip content="删除" placement="top">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="handleDelete([row])"
|
|
|
+ v-hasPermission="permissionNames.AmActivityAlumnusRemove">
|
|
|
+ <template #icon>
|
|
|
+ <VbIcon icon-name="trash-square" icon-type="duotone" class="fs-3"></VbIcon>
|
|
|
+ </template>
|
|
|
+ </el-button>
|
|
|
+ </vb-tooltip>
|
|
|
+ <vb-tooltip content="重置密码" placement="top">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="handleResetPwd(row)"
|
|
|
+ v-hasPermission="permissionNames.SystemUserResetPwd">
|
|
|
+ <template #icon>
|
|
|
+ <VbIcon icon-name="key-square" icon-type="duotone" class="fs-3"></VbIcon>
|
|
|
+ </template>
|
|
|
+ </el-button>
|
|
|
+ </vb-tooltip>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</VbDataTable>
|
|
|
<VbModal
|