Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 6 days ago
parent
commit
9e1eeb1555
  1. 29
      src/views/reportforms/OrderAllTime.vue
  2. 157
      src/views/system/user.vue

29
src/views/reportforms/OrderAllTime.vue

@ -323,10 +323,8 @@ const onLoad = async (params = {}) => {
} }
if ( if (
getObjType(submitData.timeArr) !== 'array' || (getObjType(submitData.timeArr) !== 'array' || submitData.timeArr.length === 0) &&
submitData.timeArr.length === 0 || (getObjType(submitData.openTime) !== 'array' || submitData.openTime.length === 0)
getObjType(submitData.openTime) !== 'array' ||
submitData.openTime.length === 0
) { ) {
details.data = []; details.data = [];
return ElMessage.warning('请选择时间'); return ElMessage.warning('请选择时间');
@ -511,7 +509,28 @@ const ExportData = async () => {
const end = new Date(submitData.endTimeStr).getTime(); const end = new Date(submitData.endTimeStr).getTime();
if (end - start + 1000 * 60 * 60 * 24 > 1000 * 60 * 60 * 24 * 31) if (end - start + 1000 * 60 * 60 * 24 > 1000 * 60 * 60 * 24 * 31)
return ElMessage.warning('时间不能大于31天'); return ElMessage.warning('工厂推送时间不能大于31天');
}
//
// if ()openTime
if (getObjType(submitData.openTime) === 'array' && submitData.openTime.length > 0) {
submitData.openTimeStartStr = submitData.openTime[0];
submitData.openTimeEndStr = submitData.openTime[1];
const start = new Date(submitData.openTimeStartStr).getTime();
const end = new Date(submitData.openTimeEndStr).getTime();
if (end - start + 1000 * 60 * 60 * 24 > 1000 * 60 * 60 * 24 * 31)
return ElMessage.warning('开单时间不能大于31天');
}
if (
(getObjType(submitData.timeArr) !== 'array' || submitData.timeArr.length === 0) &&
(getObjType(submitData.openTime) !== 'array' || submitData.openTime.length === 0)
) {
details.data = [];
return ElMessage.warning('请选择时间');
} }
delete submitData.timeArr; delete submitData.timeArr;

157
src/views/system/user.vue

@ -11,51 +11,17 @@
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<basic-container> <basic-container>
<avue-crud <avue-crud :option="option" v-model:search="search" :table-loading="loading" :data="data" ref="crud"
:option="option" v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
v-model:search="search" :before-open="beforeOpen" v-model:page="page" @search-change="searchChange" @search-reset="searchReset"
:table-loading="loading" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
:data="data" @refresh-change="refreshChange" @on-load="onLoad">
ref="crud"
v-model="form"
:permission="permissionList"
@row-del="rowDel"
@row-update="rowUpdate"
@row-save="rowSave"
:before-open="beforeOpen"
v-model:page="page"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left> <template #menu-left>
<el-button <el-button type="danger" plain icon="el-icon-delete" v-if="permission.user_delete" @click="handleDelete">
type="danger"
plain
icon="el-icon-delete"
v-if="permission.user_delete"
@click="handleDelete"
>
</el-button> </el-button>
<el-button <el-button type="info" plain v-if="permission.user_role" icon="el-icon-user" @click="handleGrant">角色配置
type="info"
plain
v-if="permission.user_role"
icon="el-icon-user"
@click="handleGrant"
>角色配置
</el-button> </el-button>
<el-button <el-button type="info" plain v-if="permission.user_reset" icon="el-icon-refresh" @click="handleReset">密码重置
type="info"
plain
v-if="permission.user_reset"
icon="el-icon-refresh"
@click="handleReset"
>密码重置
</el-button> </el-button>
<!-- <el-button <!-- <el-button
type="info" type="info"
@ -65,29 +31,14 @@
@click="handlePlatform" @click="handlePlatform"
>平台配置 >平台配置
</el-button> --> </el-button> -->
<el-button <el-button type="info" plain v-if="userInfo.role_name.includes('admin')" icon="el-icon-coordinate"
type="info" @click="handleLock">账号解封
plain
v-if="userInfo.role_name.includes('admin')"
icon="el-icon-coordinate"
@click="handleLock"
>账号解封
</el-button> </el-button>
<el-button <el-button type="warning" plain v-if="userInfo.role_name.includes('admin')" icon="el-icon-upload"
type="warning" @click="handleImport">导入
plain
v-if="userInfo.role_name.includes('admin')"
icon="el-icon-upload"
@click="handleImport"
>导入
</el-button> </el-button>
<el-button <el-button type="warning" plain v-if="userInfo.role_name.includes('admin')" icon="el-icon-download"
type="warning" @click="handleExport">导出
plain
v-if="userInfo.role_name.includes('admin')"
icon="el-icon-download"
@click="handleExport"
>导出
</el-button> </el-button>
</template> </template>
<template #tenantName="{ row }"> <template #tenantName="{ row }">
@ -104,16 +55,8 @@
</template> </template>
</avue-crud> </avue-crud>
<el-dialog title="用户角色配置" append-to-body v-model="roleBox" width="345px"> <el-dialog title="用户角色配置" append-to-body v-model="roleBox" width="345px">
<el-tree <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id" ref="treeRole"
:data="roleGrantList" :default-checked-keys="roleTreeObj" :props="props">
show-checkbox
check-strictly
default-expand-all
node-key="id"
ref="treeRole"
:default-checked-keys="roleTreeObj"
:props="props"
>
</el-tree> </el-tree>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
@ -132,24 +75,12 @@
</avue-form> </avue-form>
</el-dialog> </el-dialog>
<el-dialog title="用户平台配置" append-to-body v-model="platformBox"> <el-dialog title="用户平台配置" append-to-body v-model="platformBox">
<avue-crud <avue-crud :option="platformOption" :table-loading="platformLoading" :data="platformData" ref="platformCrud"
:option="platformOption" v-model="platformForm" :before-open="platformBeforeOpen" v-model:page="platformPage"
:table-loading="platformLoading" :permission="platformPermissionList" @row-update="platformRowUpdate" @search-change="platformSearchChange"
:data="platformData" @search-reset="platformSearchReset" @selection-change="platformSelectionChange"
ref="platformCrud" @current-change="platformCurrentChange" @size-change="platformSizeChange"
v-model="platformForm" @refresh-change="platformRefreshChange" @on-load="platformOnLoad">
:before-open="platformBeforeOpen"
v-model:page="platformPage"
:permission="platformPermissionList"
@row-update="platformRowUpdate"
@search-change="platformSearchChange"
@search-reset="platformSearchReset"
@selection-change="platformSelectionChange"
@current-change="platformCurrentChange"
@size-change="platformSizeChange"
@refresh-change="platformRefreshChange"
@on-load="platformOnLoad"
>
<template #tenantName="{ row }"> <template #tenantName="{ row }">
<el-tag>{{ row.tenantName }}</el-tag> <el-tag>{{ row.tenantName }}</el-tag>
</template> </template>
@ -314,6 +245,23 @@ export default {
slot: true, slot: true,
display: false, display: false,
}, },
{
label: '账号状态',
type: 'select',
slot: true,
display: false,
prop: 'isDeleted',
dicData: [
{
label: '启用',
value: 0
},
{
label: '禁用',
value: 1
}
]
},
{ {
label: '用户平台', label: '用户平台',
type: 'select', type: 'select',
@ -711,7 +659,7 @@ export default {
}, },
}, },
computed: { computed: {
...mapGetters(['userInfo', 'permission']), ...mapGetters(['userInfo', 'permission']),
// //
permissionList() { permissionList() {
return { return {
@ -957,8 +905,7 @@ export default {
}).then(() => { }).then(() => {
NProgress.start(); NProgress.start();
exportBlob( exportBlob(
`/blade-system/user/export-user?${ `/blade-system/user/export-user?${this.website.tokenHeader
this.website.tokenHeader
}=${getToken()}&account=${account}&realName=${realName}` }=${getToken()}&account=${account}&realName=${realName}`
).then(res => { ).then(res => {
downloadXls(res.data, `用户数据表${this.$dayjs().format('YYYY-MM-DD')}.xlsx`); downloadXls(res.data, `用户数据表${this.$dayjs().format('YYYY-MM-DD')}.xlsx`);
@ -1099,19 +1046,23 @@ export default {
</style> </style>
<style scoped lang='scss'> <style scoped lang='scss'>
:deep(.no-print){ :deep(.no-print) {
margin-left:auto; margin-left: auto;
.el-button{
margin-right:0 .el-button {
margin-right: 0
} }
} }
:deep(.avue-form__row){
max-width:300px!important; :deep(.avue-form__row) {
max-width: 300px !important;
} }
:deep(.el-form-item__label){
width:auto !important; :deep(.el-form-item__label) {
width: auto !important;
} }
:deep(.el-row){
:deep(.el-row) {
flex-direction: row !important; flex-direction: row !important;
} }
</style> </style>

Loading…
Cancel
Save