feat:更改页面
This commit is contained in:
1 parent
b422df5b76
commit
44b2df144c
84 files changed
+11701
-2114
No files matched your search
@@ -2,7 +2,16 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('audit.auditName')" prop="auditName">
|
||||
<el-input :placeholder="t('audit.inputAuditNameTip')" v-model="state.queryForm.auditName" style="max-width: 180px" />
|
||||
</el-form-item>
|
||||
@@ -12,13 +21,7 @@
|
||||
<el-form-item :label="$t('audit.createBy')" prop="createBy">
|
||||
<el-input :placeholder="t('audit.inputCreateByTip')" v-model="state.queryForm.createBy" style="max-width: 180px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button formDialogRef icon="search" type="primary" @click="getDataList">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" formDialogRef @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
@@ -2,20 +2,23 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row class="ml10" v-show="showSearch">
|
||||
<el-form :inline="true" :model="state.queryForm" @keyup.enter="getDataList" ref="queryRef">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('client.clientId')" prop="clientId">
|
||||
<el-input :placeholder="$t('client.clientId')" style="max-width: 180px" v-model="state.queryForm.clientId" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('client.clientSecret')" prop="clientSecret">
|
||||
<el-input :placeholder="$t('client.clientSecret')" style="max-width: 180px" v-model="state.queryForm.clientSecret" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList" icon="search" type="primary">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
@@ -2,7 +2,16 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row class="ml10" v-show="showSearch">
|
||||
<el-form :inline="true" :model="state.queryForm" @keyup.enter="getDataList" ref="queryRef">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('i18n.name')" prop="name">
|
||||
<el-input :placeholder="t('i18n.inputKeyTip')" style="max-width: 180px" v-model="state.queryForm.name" />
|
||||
</el-form-item>
|
||||
@@ -12,21 +21,22 @@
|
||||
<el-form-item :label="$t('i18n.en')" prop="en">
|
||||
<el-input :placeholder="t('i18n.inputEnTip')" style="max-width: 180px" v-model="state.queryForm.en" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList" formDialogRef icon="search" type="primary">
|
||||
{{ $t('common.queryBtn') }}
|
||||
</el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">{{ $t('common.resetBtn') }} </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button @click="formDialogRef.openDialog()" class="ml10" formDialogRef icon="folder-add" type="primary" v-auth="'sys_i18n_add'">
|
||||
{{ $t('common.addBtn') }}
|
||||
<el-button
|
||||
@click="formDialogRef.openDialog()"
|
||||
class="ml10"
|
||||
formDialogRef
|
||||
icon="folder-add"
|
||||
type="primary"
|
||||
v-auth="'sys_i18n_add'"
|
||||
>
|
||||
{{ $t("common.addBtn") }}
|
||||
</el-button>
|
||||
<el-button plain @click="handleRefreshCache()" class="ml10" icon="refresh-left" type="primary">
|
||||
{{ $t('common.refreshCacheBtn') }}
|
||||
{{ $t("common.refreshCacheBtn") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="multiple"
|
||||
@@ -37,7 +47,7 @@
|
||||
type="primary"
|
||||
v-auth="'sys_i18n_del'"
|
||||
>
|
||||
{{ $t('common.delBtn') }}
|
||||
{{ $t("common.delBtn") }}
|
||||
</el-button>
|
||||
|
||||
<right-toolbar
|
||||
@@ -55,7 +65,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="sortChangeHandle"
|
||||
style="width: 100%"
|
||||
row-key="id"
|
||||
row-key="id"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
@@ -71,10 +81,10 @@
|
||||
<el-table-column :label="$t('common.action')" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" @click="formDialogRef.openDialog(scope.row.id)" text type="primary" v-auth="'sys_i18n_edit'"
|
||||
>{{ $t('common.editBtn') }}
|
||||
>{{ $t("common.editBtn") }}
|
||||
</el-button>
|
||||
<el-button icon="delete" @click="handleDelete([scope.row.id])" text type="primary" v-auth="'sys_i18n_del'">
|
||||
{{ $t('common.delBtn') }}
|
||||
{{ $t("common.delBtn") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -88,80 +98,80 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="systemSysI18n" setup>
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||
import { delObj, fetchList, refreshCache } from '/@/api/admin/i18n';
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { delObj, fetchList, refreshCache } from "/@/api/admin/i18n"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useI18n } from "vue-i18n"
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
const { t } = useI18n();
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
const { t } = useI18n()
|
||||
// 定义查询字典
|
||||
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref();
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref();
|
||||
const showSearch = ref(true);
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any;
|
||||
const multiple = ref(true);
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {
|
||||
name: '',
|
||||
zhCn: '',
|
||||
en: '',
|
||||
name: "",
|
||||
zhCn: "",
|
||||
en: "",
|
||||
},
|
||||
pageList: fetchList,
|
||||
descs: ['create_time'],
|
||||
});
|
||||
descs: ["create_time"],
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state);
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value.resetFields();
|
||||
queryRef.value.resetFields()
|
||||
// 清空排序规则
|
||||
state.queryForm!.descs = [];
|
||||
state.queryForm!.ascs = [];
|
||||
state.queryForm!.descs = []
|
||||
state.queryForm!.ascs = []
|
||||
// 清空多选
|
||||
selectObjs.value = [];
|
||||
getDataList();
|
||||
};
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
}
|
||||
const handleRefreshCache = () => {
|
||||
refreshCache().then(() => {
|
||||
useMessage().success('同步成功');
|
||||
});
|
||||
};
|
||||
useMessage().success("同步成功")
|
||||
})
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/admin/i18n/export', Object.assign(state.queryForm,{ids:selectObjs}), 'i18n.xlsx');
|
||||
};
|
||||
downBlobFile("/admin/i18n/export", Object.assign(state.queryForm, { ids: selectObjs }), "i18n.xlsx")
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
await useMessageBox().confirm(t('common.delConfirmText'));
|
||||
await useMessageBox().confirm(t("common.delConfirmText"))
|
||||
} catch {
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await delObj(ids);
|
||||
getDataList();
|
||||
useMessage().success(t('common.delSuccessText'));
|
||||
await delObj(ids)
|
||||
getDataList()
|
||||
useMessage().success(t("common.delSuccessText"))
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
useMessage().error(err.msg)
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
@@ -5,7 +5,16 @@
|
||||
<log-line-chart />
|
||||
|
||||
<el-row class="mt-4 ml10" v-show="showSearch">
|
||||
<el-form :inline="true" :model="state.queryForm" @keyup.enter="getDataList" ref="queryRef">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('syslog.logType')" prop="logType">
|
||||
<el-select :placeholder="$t('syslog.inputLogTypeTip')" clearable v-model="state.queryForm.logType">
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in log_type" />
|
||||
@@ -21,11 +30,7 @@
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList" icon="Search" type="primary">{{ $t("common.queryBtn") }}</el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
|
||||
@@ -2,7 +2,16 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row class="ml10" v-show="showSearch">
|
||||
<el-form :inline="true" :model="state.queryForm" ref="queryRef">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('param.publicName')" prop="publicName">
|
||||
<el-input :placeholder="$t('param.inputpublicNameTip')" style="max-width: 180px" v-model="state.queryForm.publicName" />
|
||||
</el-form-item>
|
||||
@@ -14,13 +23,7 @@
|
||||
<el-option :key="index" :label="item.label" :value="item.value" v-for="(item, index) in dict_type"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList" formDialogRef icon="search" type="primary">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button @click="resetQuery" formDialogRef icon="Refresh">{{ $t("common.resetBtn") }} </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
@@ -2,7 +2,16 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item label="敏感词" prop="sensitiveWord">
|
||||
<el-input placeholder="请输入敏感词" v-model="state.queryForm.sensitiveWord" />
|
||||
</el-form-item>
|
||||
@@ -11,11 +20,7 @@
|
||||
<el-radio :label="item.value" v-for="(item, index) in sensitive_type" border :key="index">{{ item.label }} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList"> 查询 </el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
@@ -2,19 +2,22 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="t('social.type')" class="ml2" prop="type">
|
||||
<el-select v-model="state.queryForm.type" :placeholder="t('social.inputTypeTip')">
|
||||
<el-option v-for="(item, index) in social_type" :key="index" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button formDialogRef icon="search" type="primary" @click="getDataList">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button formDialogRef icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
@@ -2,20 +2,23 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="t('area.pid')" prop="adcode">
|
||||
<china-area :type="3" :placeholder="t('area.inputPidByTip')" v-model="pid" :plus="true" @change="handleChange" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('area.name')" prop="name">
|
||||
<el-input :placeholder="t('area.inputNameByTip')" v-model="state.queryForm.name" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
@@ -1,90 +1,111 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-form-item style="width: 250px" label="用户" prop="userId">
|
||||
<select-user v-model="state.queryForm.userId" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="车牌号" prop="carNumber">
|
||||
<el-input v-model="state.queryForm.carNumber" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="车辆类型" prop="carType">
|
||||
<dict-select v-model="state.queryForm.carType" dict-code="car_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="是否启用" prop="enableStatus">
|
||||
<dict-select v-model="state.queryForm.enableStatus" dict-code="yes_no_type" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'admin_sysUserCar_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'admin_sysUserCar_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'admin_sysUserCar_export'" @exportExcel="exportExcel"
|
||||
class="ml10 mr20" style="float: right;" @queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="80" />
|
||||
<el-table-column prop="username" label="用户名" />
|
||||
<el-table-column prop="userDeptName" label="部门" />
|
||||
<el-table-column prop="carNumber" label="车牌号">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="primary">{{ row.carNumber }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="carType" label="车辆类型">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="car_type" :value="row.carType" />
|
||||
</template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item style="width: 250px" label="用户" prop="userId">
|
||||
<select-user v-model="state.queryForm.userId" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="车牌号" prop="carNumber">
|
||||
<el-input v-model="state.queryForm.carNumber" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="车辆类型" prop="carType">
|
||||
<dict-select v-model="state.queryForm.carType" dict-code="car_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="是否启用" prop="enableStatus">
|
||||
<dict-select v-model="state.queryForm.enableStatus" dict-code="yes_no_type" />
|
||||
</el-form-item>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'admin_sysUserCar_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'admin_sysUserCar_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'admin_sysUserCar_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="80" />
|
||||
<el-table-column prop="username" label="用户名" />
|
||||
<el-table-column prop="userDeptName" label="部门" />
|
||||
<el-table-column prop="carNumber" label="车牌号">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="primary">{{ row.carNumber }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="carType" label="车辆类型">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="car_type" :value="row.carType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="enableStatus" label="是否启用">
|
||||
<template #default="{ row }">
|
||||
<el-switch active-value="1" inactive-value="0" v-model="row.enableStatus" @change="enableStatusChange(row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'admin_sysUserCar_edit'" @click="formDialogRef.openDialog(scope.row.id)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button icon="delete" text type="primary" v-auth="'admin_sysUserCar_del'" @click="handleDelete([scope.row.id])"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="enableStatus" label="是否启用">
|
||||
<template #default="{ row }">
|
||||
<el-switch active-value="1" inactive-value="0" v-model="row.enableStatus"
|
||||
@change="enableStatusChange(row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'admin_sysUserCar_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'admin_sysUserCar_del'"
|
||||
@click="handleDelete([scope.row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
</div>
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemSysUserCar">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import * as sysUserCarApi from "/@/api/admin/sysUserCar";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import * as sysUserCarApi from "/@/api/admin/sysUserCar"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
// 定义查询字典
|
||||
const { car_type } = useDict("car_type")
|
||||
// 定义变量内容
|
||||
@@ -97,65 +118,58 @@ const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: sysUserCarApi.fetchList
|
||||
queryForm: {},
|
||||
pageList: sysUserCarApi.fetchList,
|
||||
})
|
||||
|
||||
// table hook
|
||||
const {
|
||||
getDataList,
|
||||
currentChangeHandle,
|
||||
sizeChangeHandle,
|
||||
sortChangeHandle,
|
||||
downBlobFile,
|
||||
tableStyle
|
||||
} = useTable(state)
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/admin/sysUserCar/export', Object.assign(state.queryForm, { ids: selectObjs }), 'sysUserCar.xlsx')
|
||||
downBlobFile("/admin/sysUserCar/export", Object.assign(state.queryForm, { ids: selectObjs }), "sysUserCar.xlsx")
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
await useMessageBox().confirm('此操作将永久删除');
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await useMessageBox().confirm("此操作将永久删除")
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await sysUserCarApi.delObjs(ids);
|
||||
getDataList();
|
||||
useMessage().success('删除成功');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
}
|
||||
};
|
||||
try {
|
||||
await sysUserCarApi.delObjs(ids)
|
||||
getDataList()
|
||||
useMessage().success("删除成功")
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg)
|
||||
}
|
||||
}
|
||||
|
||||
// 修改启用状态
|
||||
async function enableStatusChange(row: any) {
|
||||
try {
|
||||
await sysUserCarApi.putObj(row)
|
||||
getDataList()
|
||||
useMessage().success("操作成功")
|
||||
} catch (e) {
|
||||
useMessage().error("操作错误")
|
||||
}
|
||||
try {
|
||||
await sysUserCarApi.putObj(row)
|
||||
getDataList()
|
||||
useMessage().success("操作成功")
|
||||
} catch (e) {
|
||||
useMessage().error("操作错误")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -1,35 +1,46 @@
|
||||
<template>
|
||||
<el-dialog title="菜品统计" width="70%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="state.queryForm.name" placeholder="请输入姓名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label=" 手机号" prop="phone">
|
||||
<el-input v-model="state.queryForm.phone" placeholder="请输入手机号" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table height="450px" :data="state.dataList" v-loading="state.loading" border
|
||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||
:summary-method="getSummaries" :show-summary="true" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column label="用户名" prop="username" fixed="left" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="手机号" prop="phone" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="部门" prop="deptName" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="编制" min-width="80">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="user_staffing_type" :value="row.staffingType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="菜品统计" width="70%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<SearchPanel
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="state.queryForm.name" placeholder="请输入姓名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label=" 手机号" prop="phone">
|
||||
<el-input v-model="state.queryForm.phone" placeholder="请输入手机号" clearable />
|
||||
</el-form-item>
|
||||
</SearchPanel>
|
||||
<el-table
|
||||
height="450px"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
:summary-method="getSummaries"
|
||||
:show-summary="true"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column label="用户名" prop="username" fixed="left" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="手机号" prop="phone" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="部门" prop="deptName" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="编制" min-width="80">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="user_staffing_type" :value="row.staffingType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="staffing-total-table">
|
||||
@@ -50,11 +61,11 @@ const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
createdIsNeed: false,
|
||||
queryForm: {
|
||||
deptId: null
|
||||
},
|
||||
pageList: userApi.pageList,
|
||||
createdIsNeed: false,
|
||||
queryForm: {
|
||||
deptId: null,
|
||||
},
|
||||
pageList: userApi.pageList,
|
||||
})
|
||||
|
||||
// table hook
|
||||
@@ -62,53 +73,51 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, ta
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
queryRef.value?.resetFields()
|
||||
getDataList()
|
||||
queryRef.value?.resetFields()
|
||||
getDataList()
|
||||
}
|
||||
|
||||
|
||||
const openDialog = (row: any, query: any) => {
|
||||
console.log("row:", row);
|
||||
console.log("query:", query);
|
||||
state.queryForm.deptId = null
|
||||
console.log("row:", row)
|
||||
console.log("query:", query)
|
||||
state.queryForm.deptId = null
|
||||
|
||||
if (row && row.deptId) {
|
||||
state.queryForm.deptId = row.deptId
|
||||
}
|
||||
if (row && row.deptId) {
|
||||
state.queryForm.deptId = row.deptId
|
||||
}
|
||||
|
||||
getDataList()
|
||||
visible.value = true
|
||||
getDataList()
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["count", "totalPrice"]
|
||||
const totalRow = Array.from({ length: columns.length })
|
||||
totalRow[0] = "合计"
|
||||
columns.forEach((i: any, index: number) => {
|
||||
if (totalColumns.includes(i.property)) {
|
||||
const total = data
|
||||
.filter((v: any) => v[i.property] != null)
|
||||
.map((v: any) => Number(v[i.property]))
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
if (i.property.includes("Price")) {
|
||||
totalRow[index] = displayPrice(total)
|
||||
} else {
|
||||
totalRow[index] = total
|
||||
}
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["count", "totalPrice"]
|
||||
const totalRow = Array.from({ length: columns.length })
|
||||
totalRow[0] = "合计"
|
||||
columns.forEach((i: any, index: number) => {
|
||||
if (totalColumns.includes(i.property)) {
|
||||
const total = data
|
||||
.filter((v: any) => v[i.property] != null)
|
||||
.map((v: any) => Number(v[i.property]))
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
if (i.property.includes("Price")) {
|
||||
totalRow[index] = displayPrice(total)
|
||||
} else {
|
||||
totalRow[index] = total
|
||||
}
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
openDialog,
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
@@ -2,35 +2,46 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row shadow="hover" v-show="showSearch" class="ml10">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="filter">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="filter"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item prop="deptName" :label="$t('sysdept.name')">
|
||||
<el-input :placeholder="$t('sysdept.inputdeptNameTip')" style="max-width: 180px"
|
||||
v-model="state.queryForm.deptName"></el-input>
|
||||
<el-input :placeholder="$t('sysdept.inputdeptNameTip')" style="max-width: 180px" v-model="state.queryForm.deptName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="filter">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="top-right-btn" v-if="!defaultTreeViewRef"
|
||||
v-auth="'sys_dept_add'" @click="handleAdd">
|
||||
<el-button
|
||||
icon="folder-add"
|
||||
type="primary"
|
||||
class="top-right-btn"
|
||||
v-if="!defaultTreeViewRef"
|
||||
v-auth="'sys_dept_add'"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t("common.addBtn") }}
|
||||
</el-button>
|
||||
<el-button v-if="false" plain icon="upload-filled" type="primary" class="ml10"
|
||||
@click="excelUploadRef.show()">
|
||||
<el-button v-if="false" plain icon="upload-filled" type="primary" class="ml10" @click="excelUploadRef.show()">
|
||||
{{ $t("common.importBtn") }}
|
||||
</el-button>
|
||||
<el-button @click="handleExpand"> {{ $t("common.expandBtn") }}</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'sys_dept_add'" @exportExcel="exportExcel"
|
||||
class="ml10" style="float: right; margin-right: 20px" @queryTable="getDataList">
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'sys_dept_add'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10"
|
||||
style="float: right; margin-right: 20px"
|
||||
@queryTable="getDataList"
|
||||
>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('queryTree.view')" placement="top">
|
||||
<el-button v-if="!stores.userInfos.roleCodes.includes('DEPT_ADMIN')" circle icon="Grid"
|
||||
@click="handleView" />
|
||||
<el-button v-if="!stores.userInfos.roleCodes.includes('DEPT_ADMIN')" circle icon="Grid" @click="handleView" />
|
||||
</el-tooltip>
|
||||
</right-toolbar>
|
||||
</div>
|
||||
@@ -39,8 +50,13 @@
|
||||
<tree-view ref="treeViewRef" v-if="defaultTreeViewRef" />
|
||||
<table-view ref="tableViewRef" v-if="!defaultTreeViewRef" />
|
||||
|
||||
<upload-excel ref="excelUploadRef" :title="$t('sysdept.importTip')" url="/admin/dept/import"
|
||||
temp-url="/admin/sys-file/local/file/dept.xlsx" @refreshDataList="getDataList" />
|
||||
<upload-excel
|
||||
ref="excelUploadRef"
|
||||
:title="$t('sysdept.importTip')"
|
||||
url="/admin/dept/import"
|
||||
temp-url="/admin/sys-file/local/file/dept.xlsx"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -54,7 +70,7 @@ const TreeView = defineAsyncComponent(() => import("./tree-view.vue"))
|
||||
const TableView = defineAsyncComponent(() => import("./table-view.vue"))
|
||||
|
||||
const { t } = useI18n()
|
||||
const stores = useUserInfo();
|
||||
const stores = useUserInfo()
|
||||
|
||||
// 默认树视图展示
|
||||
const defaultTreeViewRef = ref(true)
|
||||
|
||||
@@ -2,37 +2,51 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch" class="ml10">
|
||||
<el-form :inline="true" :model="state.queryForm" ref="queryRef">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('sysmenu.name')" prop="menuName">
|
||||
<el-input :placeholder="$t('sysmenu.inputNameTip')" clearable style="max-width: 180px"
|
||||
v-model="state.queryForm.menuName" />
|
||||
<el-input :placeholder="$t('sysmenu.inputNameTip')" clearable style="max-width: 180px" v-model="state.queryForm.menuName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="query" class="ml10" icon="search" type="primary">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button @click="onOpenAddMenu" class="ml10" icon="folder-add" type="primary"
|
||||
v-auth="'sys_menu_add'">
|
||||
<el-button @click="onOpenAddMenu" class="ml10" icon="folder-add" type="primary" v-auth="'sys_menu_add'">
|
||||
{{ $t("common.addBtn") }}
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" class="ml10" style="float: right; margin-right: 20px"
|
||||
@queryTable="query"></right-toolbar>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
class="ml10"
|
||||
style="float: right; margin-right: 20px"
|
||||
@queryTable="query"
|
||||
></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table class="el-table" ref="tableRef" :data="tableList" row-key="id" style="width: 100%"
|
||||
v-loading="state.loading" border :header-cell-style="tableStyle?.headerCellStyle"
|
||||
:expand-row-keys="expandRowKeys" lazy :load="load"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" @expand-change="handleExpandChange">
|
||||
<el-table-column :label="$t('sysmenu.name')" fixed prop="name" align="left" show-overflow-tooltip
|
||||
min-width="200" />
|
||||
<el-table-column :label="$t('sysmenu.sortOrder')" prop="sortOrder" align="center"
|
||||
show-overflow-tooltip />
|
||||
<el-table
|
||||
class="el-table"
|
||||
ref="tableRef"
|
||||
:data="tableList"
|
||||
row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:header-cell-style="tableStyle?.headerCellStyle"
|
||||
:expand-row-keys="expandRowKeys"
|
||||
lazy
|
||||
:load="load"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
@expand-change="handleExpandChange"
|
||||
>
|
||||
<el-table-column :label="$t('sysmenu.name')" fixed prop="name" align="left" show-overflow-tooltip min-width="200" />
|
||||
<el-table-column :label="$t('sysmenu.sortOrder')" prop="sortOrder" align="center" show-overflow-tooltip />
|
||||
<el-table-column :label="$t('sysmenu.icon')" prop="icon" show-overflow-tooltip align="center">
|
||||
<template #default="scope">
|
||||
<SvgIcon :name="scope.row.meta.icon" />
|
||||
@@ -52,23 +66,26 @@
|
||||
<el-tag type="info" v-else>关闭</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('sysmenu.permission')" :show-overflow-tooltip="true" prop="permission"
|
||||
align="center" />
|
||||
<el-table-column :label="$t('sysmenu.permission')" :show-overflow-tooltip="true" prop="permission" align="center" />
|
||||
<el-table-column :label="$t('common.action')" show-overflow-tooltip width="250" align="center">
|
||||
<template #default="scope">
|
||||
<el-button icon="folder-add" @click="onOpenAddMenu('add', scope.row)" text type="primary"
|
||||
v-auth="'sys_menu_add'">
|
||||
<el-button icon="folder-add" @click="onOpenAddMenu('add', scope.row)" text type="primary" v-auth="'sys_menu_add'">
|
||||
{{ $t("common.addBtn") }}
|
||||
</el-button>
|
||||
<el-button icon="edit-pen" @click="onOpenEditMenu('edit', scope.row)" text type="primary"
|
||||
v-auth="'sys_menu_edit'">{{ $t("common.editBtn") }}
|
||||
<el-button icon="edit-pen" @click="onOpenEditMenu('edit', scope.row)" text type="primary" v-auth="'sys_menu_edit'"
|
||||
>{{ $t("common.editBtn") }}
|
||||
</el-button>
|
||||
|
||||
<el-tooltip icon="delete" :content="$t('sysmenu.deleteDisabledTip')"
|
||||
:disabled="!deleteMenuDisabled(scope.row)" placement="top">
|
||||
<el-tooltip icon="delete" :content="$t('sysmenu.deleteDisabledTip')" :disabled="!deleteMenuDisabled(scope.row)" placement="top">
|
||||
<span style="margin-left: 12px">
|
||||
<el-button icon="delete" :disabled="deleteMenuDisabled(scope.row)"
|
||||
@click="handleDelete(scope.row)" text type="primary" v-auth="'sys_menu_del'">
|
||||
<el-button
|
||||
icon="delete"
|
||||
:disabled="deleteMenuDisabled(scope.row)"
|
||||
@click="handleDelete(scope.row)"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'sys_menu_del'"
|
||||
>
|
||||
{{ $t("common.delBtn") }}
|
||||
</el-button>
|
||||
</span>
|
||||
@@ -211,7 +228,7 @@ const restoreExpandedRows = async () => {
|
||||
row.children = childrenList
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载子节点失败:', error)
|
||||
console.error("加载子节点失败:", error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +238,7 @@ const restoreExpandedRows = async () => {
|
||||
// 等待 DOM 更新,确保子节点渲染完成
|
||||
await nextTick()
|
||||
} catch (error) {
|
||||
console.error('展开节点失败:', error)
|
||||
console.error("展开节点失败:", error)
|
||||
}
|
||||
|
||||
// 如果有子节点,递归处理
|
||||
|
||||
@@ -2,17 +2,20 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row class="ml10" v-show="showSearch">
|
||||
<el-form :inline="true" :model="state.queryForm" @keyup.enter="getDataList" ref="queryRef">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('post.postName')" prop="postName">
|
||||
<el-input :placeholder="$t('post.inputpostNameTip')" style="max-width: 180px" v-model="state.queryForm.postName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList" icon="search" type="primary">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
@@ -2,17 +2,20 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row shadow="hover" v-show="showSearch" class="ml10">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('sysrole.roleName')" prop="roleName">
|
||||
<el-input :placeholder="$t('sysrole.inputRoleNameTip')" v-model="state.queryForm.roleName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
@@ -2,7 +2,16 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item style="width: 250px" label="调动用户" prop="userId">
|
||||
<select-user v-model="state.queryForm.userId" />
|
||||
</el-form-item>
|
||||
@@ -13,48 +22,61 @@
|
||||
<dict-select v-model="state.queryForm.isWalletTransaction" dict-code="yes_no_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="申请时间" prop="createTimeList">
|
||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange" />
|
||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="审核时间" prop="processTimeList">
|
||||
<el-date-picker v-model="state.queryForm.processTimeList" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange" />
|
||||
<el-date-picker v-model="state.queryForm.processTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="自动转账时间" prop="walletTransactionTimeList">
|
||||
<el-date-picker v-model="state.queryForm.walletTransactionTimeList"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||
<el-date-picker v-model="state.queryForm.walletTransactionTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'admin_sysUserTransaction_add'">
|
||||
<el-button
|
||||
icon="folder-add"
|
||||
type="primary"
|
||||
class="ml10"
|
||||
@click="formDialogRef.openDialog()"
|
||||
v-auth="'admin_sysUserTransaction_add'"
|
||||
>
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary"
|
||||
v-auth="'admin_sysUserTransaction_del'" @click="handleDelete(selectObjs)">
|
||||
<el-button
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'admin_sysUserTransaction_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="flex justify-between items-center">
|
||||
<el-tabs class="flex-1" v-model="activeName" @tab-click="handleClickTabItem">
|
||||
<el-tab-pane v-for="v in tabItems" :key="v.id" :label="v.label" :name="v.value" />
|
||||
</el-tabs>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'admin_sysUserTransaction_export'"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right"
|
||||
@queryTable="getDataList" />
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'admin_sysUserTransaction_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="80" />
|
||||
<el-table-column prop="applyUsername" label="申请人" />
|
||||
@@ -89,26 +111,47 @@
|
||||
<span v-else class="color-danger">未审核</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="250"
|
||||
v-auths="['admin_sysUserTransaction_edit', 'admin_sysUserTransaction_check', 'admin_sysUserTransaction_del']">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="250"
|
||||
v-auths="['admin_sysUserTransaction_edit', 'admin_sysUserTransaction_check', 'admin_sysUserTransaction_del']"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button icon="edit-pen" v-if="row.processStatus == 1" text type="primary"
|
||||
v-auth="'admin_sysUserTransaction_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||
<el-button
|
||||
icon="edit-pen"
|
||||
v-if="row.processStatus == 1"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'admin_sysUserTransaction_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="VideoPlay" v-if="row.processStatus == 1" text type="primary"
|
||||
v-auth="'admin_sysUserTransaction_check'" @click="deal(row)">
|
||||
<el-button
|
||||
icon="VideoPlay"
|
||||
v-if="row.processStatus == 1"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'admin_sysUserTransaction_check'"
|
||||
@click="deal(row)"
|
||||
>
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button icon="delete" v-if="row.processStatus == 1" text type="primary"
|
||||
v-auth="'admin_sysUserTransaction_del'" @click="handleDelete([row.id])">
|
||||
<el-button
|
||||
icon="delete"
|
||||
v-if="row.processStatus == 1"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'admin_sysUserTransaction_del'"
|
||||
@click="handleDelete([row.id])"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
<!-- 审批抽屉 -->
|
||||
<process-drawer ref="processDrawerRef" @task-submit-event="taskSubmitEvent" />
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<DraggableDepTree ref="draggableDepTreeRef" placeholder="请输入部门名称" :show-expand="true"
|
||||
@getSelectNode="handleGetSelectNode" switch-inactive-text="包含" switch-active-text="不包含"
|
||||
:defaultTreeWidth="20" :nodeClickable="false">
|
||||
<DraggableDepTree
|
||||
ref="draggableDepTreeRef"
|
||||
placeholder="请输入部门名称"
|
||||
:show-expand="true"
|
||||
@getSelectNode="handleGetSelectNode"
|
||||
switch-inactive-text="包含"
|
||||
switch-active-text="不包含"
|
||||
:defaultTreeWidth="20"
|
||||
:nodeClickable="false"
|
||||
>
|
||||
<template #default>
|
||||
<el-row v-show="showSearch">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item style="width: 250px" label="用户" prop="userId">
|
||||
<select-user v-model="state.queryForm.userId" clearable />
|
||||
</el-form-item>
|
||||
@@ -25,26 +41,35 @@
|
||||
<el-form-item style="width: 250px" label="编制情况" prop="staffingType">
|
||||
<dict-select v-model="state.queryForm.staffingType" dict-code="user_staffing_type" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button v-auth="'sys_user_add'" icon="folder-add" type="primary"
|
||||
@click="userDialogRef.openDialog()">新增</el-button>
|
||||
<el-button plain v-auth="'sys_user_export'" class="ml10" icon="upload-filled" type="primary"
|
||||
@click="excelUploadRef.show()">
|
||||
<el-button v-auth="'sys_user_add'" icon="folder-add" type="primary" @click="userDialogRef.openDialog()">新增</el-button>
|
||||
<el-button plain v-auth="'sys_user_export'" class="ml10" icon="upload-filled" type="primary" @click="excelUploadRef.show()">
|
||||
导入
|
||||
</el-button>
|
||||
<el-button plain v-auth="'sys_user_del'" :disabled="multiple" class="ml10" icon="Delete"
|
||||
type="primary" @click="handleDelete(selectObjs)">
|
||||
<el-button
|
||||
plain
|
||||
v-auth="'sys_user_del'"
|
||||
:disabled="multiple"
|
||||
class="ml10"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button plain v-auth="'sys_user_del'" v-if="activeName == '1'" :disabled="multiple"
|
||||
class="ml10" icon="VideoPlay" type="primary" @click="doBatchDeal">
|
||||
<el-button
|
||||
plain
|
||||
v-auth="'sys_user_del'"
|
||||
v-if="activeName == '1'"
|
||||
:disabled="multiple"
|
||||
class="ml10"
|
||||
icon="VideoPlay"
|
||||
type="primary"
|
||||
@click="doBatchDeal"
|
||||
>
|
||||
审批
|
||||
</el-button>
|
||||
<div class="flex justify-between items-center">
|
||||
@@ -52,15 +77,26 @@
|
||||
<el-tab-pane v-for="v in tabItems" :key="v.id" :label="v.label" :name="v.value" />
|
||||
</el-tabs>
|
||||
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'sys_user_export'"
|
||||
@exportExcel="exportExcel" @queryTable="getDataList" class="ml10"
|
||||
style="float: right" />
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'sys_user_export'"
|
||||
@exportExcel="exportExcel"
|
||||
@queryTable="getDataList"
|
||||
class="ml10"
|
||||
style="float: right"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table v-loading="state.loading" :data="state.dataList" @selection-change="handleSelectionChange"
|
||||
row-key="userId" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle">
|
||||
<el-table
|
||||
v-loading="state.loading"
|
||||
:data="state.dataList"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="userId"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column :selectable="handleSelectable" type="selection" width="40" />
|
||||
<el-table-column label="#" type="index" width="60" fixed="left" />
|
||||
<el-table-column label="用户名" prop="username" fixed="left" show-overflow-tooltip />
|
||||
@@ -69,9 +105,13 @@
|
||||
<el-table-column label="部门" prop="deptName" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="启用" show-overflow-tooltip min-width="150">
|
||||
<template #default="{ row }">
|
||||
<el-switch :disabled="!auth('sys_user_edit') || row.processStatus != '2'"
|
||||
v-model="row.lockFlag" @change="changeSwitch(row)" active-value="0"
|
||||
inactive-value="9"></el-switch>
|
||||
<el-switch
|
||||
:disabled="!auth('sys_user_edit') || row.processStatus != '2'"
|
||||
v-model="row.lockFlag"
|
||||
@change="changeSwitch(row)"
|
||||
active-value="0"
|
||||
inactive-value="9"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编制" min-width="80">
|
||||
@@ -81,8 +121,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="角色" show-overflow-tooltip min-width="150">
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(item, index) in scope.row.roleList" :key="index">
|
||||
{{ item.roleName }}</el-tag>
|
||||
<el-tag v-for="(item, index) in scope.row.roleList" :key="index"> {{ item.roleName }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人脸">
|
||||
@@ -92,44 +131,68 @@
|
||||
</el-table-column>
|
||||
<el-table-column v-if="false" label="全局人脸" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-switch :disabled="!auth('userFace_sysUserFace_global_face')" v-if="row.isGlobalFace"
|
||||
v-model="row.isGlobalFace" @change="changeGlobalFaceSwitch(row)" active-value="1"
|
||||
inactive-value="0" />
|
||||
<el-switch
|
||||
:disabled="!auth('userFace_sysUserFace_global_face')"
|
||||
v-if="row.isGlobalFace"
|
||||
v-model="row.isGlobalFace"
|
||||
@change="changeGlobalFaceSwitch(row)"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属商户" prop="merchantName" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column v-auths="['sys_user_edit', 'userFace_sysUserFace_view', 'sys_user_del']"
|
||||
label="操作" min-width="300" width="300" fixed="right">
|
||||
<el-table-column
|
||||
v-auths="['sys_user_edit', 'userFace_sysUserFace_view', 'sys_user_del']"
|
||||
label="操作"
|
||||
min-width="300"
|
||||
width="300"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; justify-content: center">
|
||||
<!-- 重置密码 -->
|
||||
<popover-input v-if="row.processStatus == '2'" v-model="inputPassword"
|
||||
@confirm="changePassword(row)">
|
||||
<popover-input v-if="row.processStatus == '2'" v-model="inputPassword" @confirm="changePassword(row)">
|
||||
<template #default>
|
||||
<el-button v-auth="'sys_user_edit'" icon="RefreshLeft" text type="primary"
|
||||
class="mr-4">密码</el-button>
|
||||
<el-button v-auth="'sys_user_edit'" icon="RefreshLeft" text type="primary" class="mr-4">密码</el-button>
|
||||
</template>
|
||||
</popover-input>
|
||||
<!-- 修改信息 -->
|
||||
<el-button v-if="row.processStatus == '2'" v-auth="'sys_user_edit'" icon="edit-pen"
|
||||
text type="primary" @click="userDialogRef.openDialog(row.userId)">
|
||||
<el-button
|
||||
v-if="row.processStatus == '2'"
|
||||
v-auth="'sys_user_edit'"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
@click="userDialogRef.openDialog(row.userId)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<!-- 人脸管理 -->
|
||||
<el-button v-if="row.processStatus == '2'" v-auth="'userFace_sysUserFace_view'"
|
||||
icon="User" text type="primary" @click="faceManageRef.openDialog(row.userId)">
|
||||
<el-button
|
||||
v-if="row.processStatus == '2'"
|
||||
v-auth="'userFace_sysUserFace_view'"
|
||||
icon="User"
|
||||
text
|
||||
type="primary"
|
||||
@click="faceManageRef.openDialog(row.userId)"
|
||||
>
|
||||
人脸管理
|
||||
</el-button>
|
||||
<el-button v-if="row.processStatus == 1" type="primary" size="small" link
|
||||
icon="VideoPlay" @click="deal(row)">
|
||||
<el-button v-if="row.processStatus == 1" type="primary" size="small" link icon="VideoPlay" @click="deal(row)">
|
||||
开始处理
|
||||
</el-button>
|
||||
<!-- 删除用户 -->
|
||||
<el-tooltip content="admin 不允许被删除" :disabled="row.userId !== '1'" placement="top">
|
||||
<span style="margin-left: 12px">
|
||||
<el-button icon="delete" v-auth="'sys_user_del'"
|
||||
:disabled="row.username === 'admin'" text type="primary"
|
||||
@click="handleDelete([row.userId])">
|
||||
<el-button
|
||||
icon="delete"
|
||||
v-auth="'sys_user_del'"
|
||||
:disabled="row.username === 'admin'"
|
||||
text
|
||||
type="primary"
|
||||
@click="handleDelete([row.userId])"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</span>
|
||||
@@ -138,16 +201,20 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-bind="state.pagination" @current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle" />
|
||||
<pagination v-bind="state.pagination" @current-change="currentChangeHandle" @size-change="sizeChangeHandle" />
|
||||
</template>
|
||||
</DraggableDepTree>
|
||||
</div>
|
||||
|
||||
<user-form ref="userDialogRef" @refresh="getDataList(false)" :deptId="state.queryForm.deptId" />
|
||||
<face-manage ref="faceManageRef" @refresh="getDataList(false)" />
|
||||
<upload-excel ref="excelUploadRef" title="用户导入" temp-url="/admin/sys-file/local/file/user.xlsx"
|
||||
url="/admin/user/import-face" @refreshDataList="getDataList" />
|
||||
<upload-excel
|
||||
ref="excelUploadRef"
|
||||
title="用户导入"
|
||||
temp-url="/admin/sys-file/local/file/user.xlsx"
|
||||
url="/admin/user/import-face"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
|
||||
<!-- 审批抽屉 -->
|
||||
<process-drawer ref="processDrawerRef" @task-submit-event="taskSubmitEvent" />
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<DraggableDepTree ref="draggableDepTreeRef" placeholder="请输入部门名称" :show-expand="true"
|
||||
@getSelectNode="handleGetSelectNode" switch-inactive-text="包含" switch-active-text="不包含"
|
||||
:defaultTreeWidth="20" :nodeClickable="false">
|
||||
<DraggableDepTree
|
||||
ref="draggableDepTreeRef"
|
||||
placeholder="请输入部门名称"
|
||||
:show-expand="true"
|
||||
@getSelectNode="handleGetSelectNode"
|
||||
switch-inactive-text="包含"
|
||||
switch-active-text="不包含"
|
||||
:defaultTreeWidth="20"
|
||||
:nodeClickable="false"
|
||||
>
|
||||
<template #default>
|
||||
<el-row v-show="showSearch">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item style="width: 250px" label="用户" prop="userId">
|
||||
<select-user v-model="state.queryForm.userId" clearable />
|
||||
</el-form-item>
|
||||
@@ -16,20 +32,31 @@
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="state.queryForm.phone" placeholder="请输入手机号" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button plain v-auth="'userFace_sysUserFace_del'" :disabled="multiple" class="ml10"
|
||||
icon="Delete" type="primary" @click="handleDelete(selectIds)">
|
||||
<el-button
|
||||
plain
|
||||
v-auth="'userFace_sysUserFace_del'"
|
||||
:disabled="multiple"
|
||||
class="ml10"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
@click="handleDelete(selectIds)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button plain v-auth="'sys_user_del'" v-if="activeName == '1'" :disabled="multiple"
|
||||
class="ml10" icon="VideoPlay" type="primary" @click="doBatchDeal">
|
||||
<el-button
|
||||
plain
|
||||
v-auth="'sys_user_del'"
|
||||
v-if="activeName == '1'"
|
||||
:disabled="multiple"
|
||||
class="ml10"
|
||||
icon="VideoPlay"
|
||||
type="primary"
|
||||
@click="doBatchDeal"
|
||||
>
|
||||
审批
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -37,9 +64,15 @@
|
||||
<el-tabs class="flex-1" v-model="activeName" @tab-click="handleClickTabItem">
|
||||
<el-tab-pane v-for="v in tabItems" :key="v.id" :label="v.label" :name="v.value" />
|
||||
</el-tabs>
|
||||
<el-table v-loading="state.loading" :data="state.dataList" row-key="userId"
|
||||
@selection-change="handleSelectionChange" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle">
|
||||
<el-table
|
||||
v-loading="state.loading"
|
||||
:data="state.dataList"
|
||||
row-key="userId"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column :selectable="handleSelectable" type="selection" width="40" />
|
||||
<el-table-column label="#" type="index" width="60" fixed="left" />
|
||||
<el-table-column label="姓名" prop="username" fixed="left" show-overflow-tooltip />
|
||||
@@ -59,17 +92,21 @@
|
||||
<el-table-column label="审核时间" prop="processTime" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column label="操作" min-width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" v-if="row.isCheckUser && row.processStatus != '2'"
|
||||
size="small" link icon="VideoPlay" @click="deal(row)">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="row.isCheckUser && row.processStatus != '2'"
|
||||
size="small"
|
||||
link
|
||||
icon="VideoPlay"
|
||||
@click="deal(row)"
|
||||
>
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_del'" link type="danger" icon="Delete"
|
||||
@click="delFace(row)">删除</el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_del'" link type="danger" icon="Delete" @click="delFace(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-bind="state.pagination" @current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle" />
|
||||
<pagination v-bind="state.pagination" @current-change="currentChangeHandle" @size-change="sizeChangeHandle" />
|
||||
</template>
|
||||
</DraggableDepTree>
|
||||
</div>
|
||||
|
||||
@@ -2,23 +2,35 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row class="ml10" v-show="showSearch">
|
||||
<el-form :inline="true" :model="state.queryForm" @keyup.enter="getDataList" ref="queryRef">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item :label="$t('systoken.username')" prop="username">
|
||||
<el-input :placeholder="$t('systoken.inputUsernameTip')" v-model="state.queryForm.username"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="username">
|
||||
<el-input :placeholder="$t('systoken.inputUsernameTip')" v-model="state.queryForm.userId"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList" icon="Search" type="primary">{{ $t('common.queryBtn') }} </el-button>
|
||||
<el-button @click="resetQuery" icon="Refresh">{{ $t('common.resetBtn') }}</el-button>
|
||||
<el-form-item label="用户id" prop="username">
|
||||
<el-input :placeholder="$t('systoken.inputUsernameTip')" v-model="state.queryForm.userId"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button :disabled="multiple" @click="handleDelete(selectObjs)" class="ml10" icon="Delete" type="primary" v-auth="'sys_user_del'">
|
||||
{{ $t('systoken.offlineBtn') }}
|
||||
<el-button
|
||||
:disabled="multiple"
|
||||
@click="handleDelete(selectObjs)"
|
||||
class="ml10"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'sys_user_del'"
|
||||
>
|
||||
{{ $t("systoken.offlineBtn") }}
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
@queryTable="getDataList"
|
||||
@@ -52,8 +64,15 @@
|
||||
<el-table-column :label="$t('systoken.expiresAt')" prop="expiresAt" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column :label="$t('common.action')" width="100">
|
||||
<template #default="scope">
|
||||
<el-button icon="delete" @click="handleDelete([scope.row.accessToken])" size="small" text type="primary" v-auth="'sys_user_del'">
|
||||
{{ $t('systoken.offlineBtn') }}
|
||||
<el-button
|
||||
icon="delete"
|
||||
@click="handleDelete([scope.row.accessToken])"
|
||||
size="small"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'sys_user_del'"
|
||||
>
|
||||
{{ $t("systoken.offlineBtn") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -65,62 +84,62 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||
import { delObj, fetchList } from '/@/api/admin/token';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||
import { Session } from '/@/utils/storage';
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { delObj, fetchList } from "/@/api/admin/token"
|
||||
import { useI18n } from "vue-i18n"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { Session } from "/@/utils/storage"
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t } = useI18n()
|
||||
// 定义变量内容
|
||||
const queryRef = ref();
|
||||
const showSearch = ref(true);
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
// 多选rows
|
||||
const selectObjs = ref([]) as any;
|
||||
const selectObjs = ref([]) as any
|
||||
// 是否可以多选
|
||||
const multiple = ref(true);
|
||||
const multiple = ref(true)
|
||||
|
||||
// table hook
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {
|
||||
username: '',
|
||||
userId: '',
|
||||
username: "",
|
||||
userId: "",
|
||||
},
|
||||
pageList: fetchList,
|
||||
});
|
||||
const { getDataList, currentChangeHandle, sortChangeHandle, sizeChangeHandle, tableStyle } = useTable(state);
|
||||
})
|
||||
const { getDataList, currentChangeHandle, sortChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
queryRef.value?.resetFields();
|
||||
getDataList();
|
||||
};
|
||||
queryRef.value?.resetFields()
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const handleSelectionChange = (objs: { accessToken: string }[]) => {
|
||||
selectObjs.value = objs.map(({ accessToken }) => accessToken);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
selectObjs.value = objs.map(({ accessToken }) => accessToken)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (accessTokens: string[]) => {
|
||||
try {
|
||||
await useMessageBox().confirm(t('systoken.offlineConfirmText'));
|
||||
await useMessageBox().confirm(t("systoken.offlineConfirmText"))
|
||||
} catch {
|
||||
return; // 取消删除则直接跳过此方法
|
||||
return // 取消删除则直接跳过此方法
|
||||
}
|
||||
|
||||
try {
|
||||
await delObj(accessTokens);
|
||||
getDataList();
|
||||
useMessage().success(t('systoken.offlineSuccessText'));
|
||||
await delObj(accessTokens)
|
||||
getDataList()
|
||||
useMessage().success(t("systoken.offlineSuccessText"))
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
useMessage().error(err.msg)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// 判断当前token 是否和登录token一致
|
||||
const filterOwnToken = (row: any) => {
|
||||
return Session.getToken() === row.accessToken;
|
||||
};
|
||||
return Session.getToken() === row.accessToken
|
||||
}
|
||||
</script>
|
||||
@@ -2,15 +2,20 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row>
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<SearchPanel
|
||||
v-show="showSearch"
|
||||
ref="queryRef"
|
||||
:model="state.queryForm"
|
||||
:loading="Boolean(state.loading)"
|
||||
:search-text="$t('common.queryBtn')"
|
||||
:reset-text="$t('common.resetBtn')"
|
||||
@search="getDataList"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<el-form-item label="手机号" prop="mobilePhone">
|
||||
<el-input placeholder="请输入手机号" v-model="state.queryForm.mobilePhone" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</SearchPanel>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
|
||||
Reference in new issue
Block a user