修改
This commit is contained in:
parent
bfa6f73975
commit
7e0de5976a
@ -184,6 +184,15 @@ export function getTemplateByCode(code:any) {
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @description: 获取打印地址
|
||||
*/
|
||||
export function getUserDocument(userId:any) {
|
||||
return http.request({
|
||||
url: '/user/document/'+userId,
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @description: 城市列表
|
||||
*/
|
||||
|
@ -126,6 +126,7 @@
|
||||
v-if="getProps.showSubmitButton"
|
||||
v-bind="getSubmitBtnOptions"
|
||||
@click="handleSubmit"
|
||||
icon="Search"
|
||||
:loading="loadingSub"
|
||||
>{{ getProps.submitButtonText }}</el-button
|
||||
>
|
||||
|
@ -24,7 +24,7 @@ interface Props {
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
modelValue: () => ({}),
|
||||
layout: 'total, prev,sizes, pager, next, jumper'
|
||||
layout: 'total,sizes,prev, pager, next, jumper'
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
@ -12,78 +12,24 @@
|
||||
</el-badge>
|
||||
</template>
|
||||
<el-tabs v-model="activeName" class="my-tabs" @tab-click="handleClick" :stretch="true">
|
||||
<el-tab-pane label="通知(1)" name="notice">
|
||||
<el-tab-pane v-for="(item,index) in messageTypeList" :key="index" :label="item.name" :name="item.value">
|
||||
</el-tab-pane>
|
||||
<ul class="mx-3">
|
||||
<li class="flex items-center py-3 border-line" v-for="i in 3" :key="i">
|
||||
<el-avatar
|
||||
class="flex-shrink-0"
|
||||
:size="40"
|
||||
:src="`https://img.naiveadmin.com/assets/avatar/avatar-4.jpg`"
|
||||
/>
|
||||
<li class="flex items-center py-3 border-line" v-for="(item,index) in messageList" :key="index">
|
||||
<dl class="min-w-0 ml-3">
|
||||
<dt class="mb-1 text-sm truncate"
|
||||
>约翰.维尔逊回复了你的邮件约翰.维尔逊回复了你的邮件</dt
|
||||
>
|
||||
<dd class="text-xs c-gray">2022-01-08 14:33:18</dd>
|
||||
<dt class="mb-1 text-sm truncate">{{item.title}}</dt>
|
||||
<dd class="text-xs c-gray">{{item.createTime}}</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="mt-4 mb-1 text-center"
|
||||
><el-link href="javascript:;" :underline="false" class="link"
|
||||
><el-icon class="mr-2"><delete /></el-icon>清空通知</el-link
|
||||
></div
|
||||
>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="关注(2)" name="follow">
|
||||
<ul class="mx-3">
|
||||
<li class="flex items-center py-3 border-line" v-for="i in 3" :key="i">
|
||||
<el-avatar
|
||||
class="flex-shrink-0"
|
||||
:size="40"
|
||||
:src="`https://img.naiveadmin.com/assets/avatar/avatar-5.jpg`"
|
||||
/>
|
||||
<dl class="min-w-0 ml-3">
|
||||
<dt class="mb-1 text-sm truncate">约翰.维尔逊关注了你</dt>
|
||||
<dd class="text-xs c-gray">2022-01-08</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="mt-4 mb-1 text-center"
|
||||
><el-link href="link" :underline="false" class="link"
|
||||
><el-icon class="mr-2"><delete /></el-icon>清空关注</el-link
|
||||
></div
|
||||
>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="待办(3)" name="needto">
|
||||
<ul class="mx-3">
|
||||
<li class="flex items-center justify-between py-3 border-line">
|
||||
<dl class="min-w-0 ml-3">
|
||||
<dt class="mb-1 text-sm truncate">技术部约翰.维尔逊申请离职</dt>
|
||||
<dd class="text-xs c-gray">请在24小时之前完成</dd>
|
||||
</dl>
|
||||
<div class="flex-none"><el-tag type="danger">即将超时</el-tag></div>
|
||||
</li>
|
||||
<li class="flex items-center justify-between py-3 border-line">
|
||||
<dl class="min-w-0 ml-3">
|
||||
<dt class="mb-1 text-sm truncate">统计年后人员和物资</dt>
|
||||
<dd class="text-xs c-gray">请在2021-08-31号之前完成</dd>
|
||||
</dl>
|
||||
<div class="flex-none"><el-tag type="success">进行中</el-tag></div>
|
||||
</li>
|
||||
<li class="flex items-center justify-between py-3 border-line">
|
||||
<dl class="min-w-0 ml-3">
|
||||
<dt class="mb-1 text-sm truncate">回访上月全部客户</dt>
|
||||
<dd class="text-xs c-gray">请在2021-08-28号之前完成</dd>
|
||||
</dl>
|
||||
<div class="flex-none"><el-tag type="warning">未开始</el-tag></div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="mt-4 mb-1 text-center"
|
||||
><el-link href="link" :underline="false" class="link"
|
||||
><el-icon class="mr-2"><delete /></el-icon>清空待办</el-link
|
||||
></div
|
||||
>
|
||||
</el-tab-pane>
|
||||
<div class="flex items-center justify-between mt-4 mb-1">
|
||||
<el-link href="javascript:;" :underline="false" class="link">
|
||||
<el-icon class="mr-2"><delete /></el-icon>清空通知
|
||||
</el-link>
|
||||
<el-link href="javascript:;" :underline="false" class="link" @click="router.push('/dashboard/message')">
|
||||
<el-icon class="mr-2"><MoreFilled /></el-icon>查看更多
|
||||
</el-link>
|
||||
</div>
|
||||
</el-tabs>
|
||||
</el-popover>
|
||||
<template v-else>
|
||||
@ -92,15 +38,43 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref,onMounted } from 'vue';
|
||||
import { Bell, Delete } from '@element-plus/icons-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { getMessageProfile,setRead } from '@/api/dashboard/message';
|
||||
const router = useRouter();
|
||||
const messageTypeList = ref([
|
||||
{
|
||||
name:'系统通知',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
name:'用户私信',
|
||||
value:2
|
||||
},
|
||||
{
|
||||
name:'代办事项',
|
||||
value:3
|
||||
},
|
||||
])
|
||||
|
||||
const badgeValue = ref(28);
|
||||
const activeName = ref('notice');
|
||||
const activeName = ref(1);
|
||||
const messageList = ref([])
|
||||
|
||||
const handleClick = (tab: string, event: Event) => {
|
||||
console.log(tab, event);
|
||||
const handleClick = async (tab: string, event: Event) => {
|
||||
activeName.value = tab.props.name
|
||||
const res = await getMessageProfile({type:activeName.value,pageNo:1,pageSize:10})
|
||||
messageList.value = res.records?res.records:[]
|
||||
// messageList.value =result
|
||||
// let item = messageTypeList.value.find((item,index)=>item.value==activeName.value)
|
||||
// item.number = result.number
|
||||
};
|
||||
onMounted(async ()=>{
|
||||
const res = await getMessageProfile({type:activeName.value,pageNo:1,pageSize:10})
|
||||
messageList.value = res.records?res.records:[]
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
@ -11,9 +11,9 @@
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button type="primary" @click="reloadTable"> 查询 </el-button>
|
||||
<el-button type="primary" @click="handleAdd">新建</el-button>
|
||||
<el-button type="danger" :disabled="!selectionData.length"@click="handleDelete()">删除</el-button>
|
||||
<el-button type="primary" icon="Search" @click="reloadTable"> 查询 </el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd">新建</el-button>
|
||||
<el-button type="danger" icon="Delete" :disabled="!selectionData.length"@click="handleDelete()">删除</el-button>
|
||||
</el-space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="4" style="text-align: right;">
|
||||
<el-button type="primary" @click="pager.page=1;loadDataTable()"> 查询 </el-button>
|
||||
<el-button type="primary" icon="Search" @click="pager.page=1;loadDataTable()"> 查询 </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin-top:15px;">
|
||||
@ -30,7 +30,7 @@
|
||||
<span class="t1">{{ item.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<pagination style="justify-content: flex-end" class="mt-10 flex" @change="loadDataTable" v-model="pager" layout="total, jumper">
|
||||
<pagination style="justify-content: flex-end" class="mt-10 flex" @change="loadDataTable" v-model="pager" layout="total, prev, pager, next">
|
||||
</pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
@ -11,9 +11,9 @@
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button type="primary" @click="reloadTable"> 查询 </el-button>
|
||||
<el-button type="primary" @click="handleAdd">新建</el-button>
|
||||
<el-button type="danger" :disabled="!selectionData.length"@click="handleDelete()">删除</el-button>
|
||||
<el-button type="primary" icon="Search" @click="reloadTable"> 查询 </el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd">新建</el-button>
|
||||
<el-button type="danger" icon="Delete" :disabled="!selectionData.length"@click="handleDelete()">删除</el-button>
|
||||
</el-space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<PageWrapper>
|
||||
<el-row :gutter="10" class="mt-3">
|
||||
<el-col :xs="24" :sm="24" :md="7" :lg="7" :xl="7" class="mb-4">
|
||||
<el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6" class="mb-4">
|
||||
<el-card shadow="hover" class="border-0">
|
||||
<template #header>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-col :span="10">
|
||||
<el-input type="text" v-model="params.name" clearable placeholder="请输入字典名称">
|
||||
<template #prefix>
|
||||
<el-icon class="el-input__icon">
|
||||
@ -14,12 +14,12 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="4" style="text-align: right;">
|
||||
<el-button type="primary" @click="pager.page=1;loadDataTable()"> 查询 </el-button>
|
||||
<el-col :span="14" style="text-align: right;">
|
||||
<el-button type="primary" icon="Search" @click="pager.page=1;loadDataTable()">查询</el-button>
|
||||
<el-button type="primary" icon="RefreshRight" @click="dictRefresh" style="margin-left:8px;"
|
||||
v-perm="['sys:dict:cache']">刷新缓存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-button type="primary" icon="RefreshRight" @click="dictRefresh" style="margin-top:15px;"
|
||||
v-perm="['sys:dict:cache']">刷新缓存</el-button>
|
||||
<div style="margin-top:15px;">
|
||||
<el-button type="primary" icon="Plus" @click="addDict" v-perm="['sys:dict:add']">新建</el-button>
|
||||
<el-button type="warning" icon="Edit" @click="handleEdit" v-perm="['sys:dict:edit']">编辑</el-button>
|
||||
@ -33,11 +33,11 @@
|
||||
<span class="t1">{{ item.name }}<span class="t2">({{ item.code }})</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<pagination style="justify-content: flex-end" class="mt-10 flex" @change="loadDataTable" v-model="pager" layout="total, jumper">
|
||||
<pagination style="justify-content: flex-end" class="mt-10 flex" @change="loadDataTable" v-model="pager" layout="total, prev, pager, next">
|
||||
</pagination>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="17" :lg="17" :xl="17" class="mb-4">
|
||||
<el-col :xs="24" :sm="24" :md="18" :lg="18" :xl="18" class="mb-4">
|
||||
<el-card shadow="hover" class="mb-4 border-0 proCard">
|
||||
<dictItem :dictId="dictId" v-if="dictItemShow"></dictItem>
|
||||
</el-card>
|
||||
@ -69,7 +69,7 @@ const pager = ref({
|
||||
size: 10,
|
||||
count: dictDataList.value.length
|
||||
});
|
||||
const fwbHeight = document.body.clientHeight - 440
|
||||
const fwbHeight = document.body.clientHeight - 395
|
||||
|
||||
//新建字典
|
||||
const addDict = async () => {
|
||||
|
@ -93,11 +93,12 @@
|
||||
import { ColProps } from 'element-plus';
|
||||
import { TableAction } from '@/components/Table';
|
||||
import { useForm } from '@/components/Form/index';
|
||||
import { getUserList,userDelete,userBatchDelete,userExport,resetPwd } from '@/api/system/user';
|
||||
import { getUserList,userDelete,userBatchDelete,userExport,resetPwd,getUserDocument } from '@/api/system/user';
|
||||
import {message,confirm} from "@/utils/auth";
|
||||
import { columns } from './columns';
|
||||
import { schemas } from './querySchemas';
|
||||
import {downloadByData} from '@/utils/file/download';
|
||||
import printJS from 'print-js';
|
||||
const userId = ref(0);
|
||||
const tableRef = ref();
|
||||
const editVisible = ref(false)
|
||||
@ -116,7 +117,7 @@
|
||||
|
||||
|
||||
const actionColumn = reactive({
|
||||
width:300,
|
||||
width:360,
|
||||
label: '操作',
|
||||
prop: 'action',
|
||||
fixed: 'right',
|
||||
@ -145,6 +146,12 @@
|
||||
onClick: handleResetPassWord.bind(null, record),
|
||||
auth:['sys:user:resetPwd']
|
||||
},
|
||||
{
|
||||
label: '打印',
|
||||
type: 'primary',
|
||||
icon:'Printer',
|
||||
onClick: handlePrint.bind(null, record),
|
||||
},
|
||||
],
|
||||
// dropDownActions: [
|
||||
// {
|
||||
@ -194,6 +201,15 @@
|
||||
message("删除成功");
|
||||
reloadTable()
|
||||
}
|
||||
const handlePrint = async(record: Recordable)=>{
|
||||
const res = await getUserDocument(record.row.id)
|
||||
printJS({
|
||||
printable:res.fileUrl,
|
||||
type: 'pdf',
|
||||
showModal:true
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function handleSubmit(values: Recordable) {
|
||||
handleReset()
|
||||
|
Loading…
Reference in New Issue
Block a user