From cc41746818af3b619167947ecb4401ccdfbec2d8 Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期二, 31 三月 2026 10:40:47 +0800
Subject: [PATCH] 修改搜索
---
ui/admin-ui3/src/views/system/user/index.vue | 100 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 98 insertions(+), 2 deletions(-)
diff --git a/ui/admin-ui3/src/views/system/user/index.vue b/ui/admin-ui3/src/views/system/user/index.vue
index 33249f5..955a820 100644
--- a/ui/admin-ui3/src/views/system/user/index.vue
+++ b/ui/admin-ui3/src/views/system/user/index.vue
@@ -19,7 +19,7 @@
:page="page"
:permission="permissionList"
:before-open="beforeOpen"
- v-model="form"
+ v-model="form" v-model:search="queryParams"
ref="crudRef"
@row-update="rowUpdate"
@row-save="rowSave"
@@ -85,6 +85,10 @@
<el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"
>鍒嗛厤瑙掕壊</el-dropdown-item>
</div>
+ <div v-hasPermi="['system:user:edit']">
+ <el-dropdown-item command="handleUnlock" icon="Unlock"
+ >瑙i攣</el-dropdown-item>
+ </div>
</el-dropdown-menu>
</template>
</el-dropdown>
@@ -142,7 +146,7 @@
listUser,
updateUser,
deptTreeSelect,
- resetUserPwd, changeUserStatus, importTemplateApi
+ resetUserPwd, changeUserStatus, importTemplateApi,unLockUser
} from "@/api/system/user";
import useCurrentInstance from "@/utils/useCurrentInstance";
import {computed, reactive, ref, toRefs} from "vue";
@@ -155,6 +159,7 @@
import {useRouter} from "vue-router";
import {getToken} from "@/utils/auth";
import {getConfigKey} from "@/api/system/config";
+import {getTmsDriver, listTmsDriver} from "@/api/tms/tmsDriver";
const {proxy} = useCurrentInstance();
@@ -303,6 +308,83 @@
label: '澶囨敞', hide: true,
type: 'textarea', minRows: 3, maxRows: 5, span: 24
},
+ isDriver: {
+ label: '鏄惁鍙告満璐﹀彿', search: true,value:'1',
+ dataType: 'string',
+ labelWidth:120,minWidth:110,searchLabelWidth:110,
+ type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is',
+ rules:[
+ {required: true, message: "璇烽�夋嫨鏄惁鍙告満璐﹀彿", trigger: "blur"},
+ ],
+ change:({value}:{value:any})=>{
+ console.log(value)
+ if (value == 0){
+ option.value.column.driverId.display = true;
+ }else{
+ option.value.column.driverId.display = false;
+ }
+ }
+ },
+ driverId: {
+ label: '鍏宠仈椹鹃┒鍛�',labelWidth:120,
+ display: false,hide:true,dataType:'string',
+ rules: [
+ {
+ required: true,
+ message: "涓婚┚椹跺憳涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
+ type: 'table', suffixIcon: 'search',dataType: 'string',
+ children: {
+ border: true,
+ searchMenuSpan: 5,
+ column: {
+ vehicleProviderName: {
+ label: '杞﹁締鏈嶅姟鍟�', minWidth: 130,
+ search: true,
+ },
+ driverName: {
+ label: '椹鹃┒鍛樺鍚�', minWidth: 120,
+ search: true,
+ },
+ licenseType: {
+ label: '鍑嗛┚杞﹀瀷', minWidth: 120,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type',
+ search: true,
+ },
+ },
+
+ },
+ props: {
+ label: 'driverName',
+ value: 'id'
+ },
+ onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
+ if (value) {
+ let id = value;
+ if (Array.isArray(value)) {
+ id = value[0]
+ }
+ getTmsDriver(id).then(res => {
+ return callback(res.data || {})
+ })
+ } else {
+ listTmsDriver({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
+ return callback({
+ total: res.total,
+ data: res.rows || [],
+ })
+ })
+ }
+
+ }
+
+
+ },
+ driverName: {
+ label: '鍏宠仈椹鹃┒鍛�', hide: false,display:false,minWidth:110,
+ search:true,searchLabelWidth:100,
+ },
}
})
@@ -390,6 +472,9 @@
case "handleAuthRole":
handleAuthRole(row);
break;
+ case "handleUnlock":
+ handleUnlock(row);
+ break;
default:
break;
}
@@ -456,6 +541,17 @@
});
}
+function handleUnlock(row:UserI) {
+ if (!row.userId){
+ return
+ }
+ proxy.$modal.confirm(`纭瑕佽В閿�"${row.userName}"鐢ㄦ埛鍚�?`).then(function () {
+ return unLockUser(row.userName);
+ }).then(() => {
+ proxy.$modal.msgSuccess( "瑙i攣鎴愬姛");
+ })
+}
+
const getConfig = ()=>{
getConfigKey("sys.user.initPassword").then(res=>{
initPassword.value = res.msg;
--
Gitblit v1.8.0