修改
This commit is contained in:
parent
bfa6f73975
commit
7e0de5976a
@ -184,6 +184,15 @@ export function getTemplateByCode(code:any) {
|
|||||||
method: 'GET'
|
method: 'GET'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @description: 获取打印地址
|
||||||
|
*/
|
||||||
|
export function getUserDocument(userId:any) {
|
||||||
|
return http.request({
|
||||||
|
url: '/user/document/'+userId,
|
||||||
|
method: 'GET'
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description: 城市列表
|
* @description: 城市列表
|
||||||
*/
|
*/
|
||||||
|
@ -126,6 +126,7 @@
|
|||||||
v-if="getProps.showSubmitButton"
|
v-if="getProps.showSubmitButton"
|
||||||
v-bind="getSubmitBtnOptions"
|
v-bind="getSubmitBtnOptions"
|
||||||
@click="handleSubmit"
|
@click="handleSubmit"
|
||||||
|
icon="Search"
|
||||||
:loading="loadingSub"
|
:loading="loadingSub"
|
||||||
>{{ getProps.submitButtonText }}</el-button
|
>{{ getProps.submitButtonText }}</el-button
|
||||||
>
|
>
|
||||||
|
@ -24,7 +24,7 @@ interface Props {
|
|||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
modelValue: () => ({}),
|
modelValue: () => ({}),
|
||||||
layout: 'total, prev,sizes, pager, next, jumper'
|
layout: 'total,sizes,prev, pager, next, jumper'
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -12,78 +12,24 @@
|
|||||||
</el-badge>
|
</el-badge>
|
||||||
</template>
|
</template>
|
||||||
<el-tabs v-model="activeName" class="my-tabs" @tab-click="handleClick" :stretch="true">
|
<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">
|
||||||
<ul class="mx-3">
|
</el-tab-pane>
|
||||||
<li class="flex items-center py-3 border-line" v-for="i in 3" :key="i">
|
<ul class="mx-3">
|
||||||
<el-avatar
|
<li class="flex items-center py-3 border-line" v-for="(item,index) in messageList" :key="index">
|
||||||
class="flex-shrink-0"
|
|
||||||
:size="40"
|
|
||||||
:src="`https://img.naiveadmin.com/assets/avatar/avatar-4.jpg`"
|
|
||||||
/>
|
|
||||||
<dl class="min-w-0 ml-3">
|
<dl class="min-w-0 ml-3">
|
||||||
<dt class="mb-1 text-sm truncate"
|
<dt class="mb-1 text-sm truncate">{{item.title}}</dt>
|
||||||
>约翰.维尔逊回复了你的邮件约翰.维尔逊回复了你的邮件</dt
|
<dd class="text-xs c-gray">{{item.createTime}}</dd>
|
||||||
>
|
|
||||||
<dd class="text-xs c-gray">2022-01-08 14:33:18</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="mt-4 mb-1 text-center"
|
<div class="flex items-center justify-between mt-4 mb-1">
|
||||||
><el-link href="javascript:;" :underline="false" class="link"
|
<el-link href="javascript:;" :underline="false" class="link">
|
||||||
><el-icon class="mr-2"><delete /></el-icon>清空通知</el-link
|
<el-icon class="mr-2"><delete /></el-icon>清空通知
|
||||||
></div
|
</el-link>
|
||||||
>
|
<el-link href="javascript:;" :underline="false" class="link" @click="router.push('/dashboard/message')">
|
||||||
</el-tab-pane>
|
<el-icon class="mr-2"><MoreFilled /></el-icon>查看更多
|
||||||
<el-tab-pane label="关注(2)" name="follow">
|
</el-link>
|
||||||
<ul class="mx-3">
|
</div>
|
||||||
<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>
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@ -92,15 +38,43 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref,onMounted } from 'vue';
|
||||||
import { Bell, Delete } from '@element-plus/icons-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 badgeValue = ref(28);
|
||||||
const activeName = ref('notice');
|
const activeName = ref(1);
|
||||||
|
const messageList = ref([])
|
||||||
|
|
||||||
const handleClick = (tab: string, event: Event) => {
|
const handleClick = async (tab: string, event: Event) => {
|
||||||
console.log(tab, 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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button type="primary" @click="reloadTable"> 查询 </el-button>
|
<el-button type="primary" icon="Search" @click="reloadTable"> 查询 </el-button>
|
||||||
<el-button type="primary" @click="handleAdd">新建</el-button>
|
<el-button type="primary" icon="Plus" @click="handleAdd">新建</el-button>
|
||||||
<el-button type="danger" :disabled="!selectionData.length"@click="handleDelete()">删除</el-button>
|
<el-button type="danger" icon="Delete" :disabled="!selectionData.length"@click="handleDelete()">删除</el-button>
|
||||||
</el-space>
|
</el-space>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" style="text-align: right;">
|
<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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="margin-top:15px;">
|
<div style="margin-top:15px;">
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<span class="t1">{{ item.name }}</span>
|
<span class="t1">{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</pagination>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button type="primary" @click="reloadTable"> 查询 </el-button>
|
<el-button type="primary" icon="Search" @click="reloadTable"> 查询 </el-button>
|
||||||
<el-button type="primary" @click="handleAdd">新建</el-button>
|
<el-button type="primary" icon="Plus" @click="handleAdd">新建</el-button>
|
||||||
<el-button type="danger" :disabled="!selectionData.length"@click="handleDelete()">删除</el-button>
|
<el-button type="danger" icon="Delete" :disabled="!selectionData.length"@click="handleDelete()">删除</el-button>
|
||||||
</el-space>
|
</el-space>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<PageWrapper>
|
<PageWrapper>
|
||||||
<el-row :gutter="10" class="mt-3">
|
<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">
|
<el-card shadow="hover" class="border-0">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="20">
|
<el-col :span="10">
|
||||||
<el-input type="text" v-model="params.name" clearable placeholder="请输入字典名称">
|
<el-input type="text" v-model="params.name" clearable placeholder="请输入字典名称">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<el-icon class="el-input__icon">
|
<el-icon class="el-input__icon">
|
||||||
@ -14,12 +14,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" style="text-align: right;">
|
<el-col :span="14" 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-button type="primary" icon="RefreshRight" @click="dictRefresh" style="margin-left:8px;"
|
||||||
|
v-perm="['sys:dict:cache']">刷新缓存</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</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;">
|
<div style="margin-top:15px;">
|
||||||
<el-button type="primary" icon="Plus" @click="addDict" v-perm="['sys:dict:add']">新建</el-button>
|
<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>
|
<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>
|
<span class="t1">{{ item.name }}<span class="t2">({{ item.code }})</span></span>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</pagination>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</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">
|
<el-card shadow="hover" class="mb-4 border-0 proCard">
|
||||||
<dictItem :dictId="dictId" v-if="dictItemShow"></dictItem>
|
<dictItem :dictId="dictId" v-if="dictItemShow"></dictItem>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -69,7 +69,7 @@ const pager = ref({
|
|||||||
size: 10,
|
size: 10,
|
||||||
count: dictDataList.value.length
|
count: dictDataList.value.length
|
||||||
});
|
});
|
||||||
const fwbHeight = document.body.clientHeight - 440
|
const fwbHeight = document.body.clientHeight - 395
|
||||||
|
|
||||||
//新建字典
|
//新建字典
|
||||||
const addDict = async () => {
|
const addDict = async () => {
|
||||||
|
@ -93,11 +93,12 @@
|
|||||||
import { ColProps } from 'element-plus';
|
import { ColProps } from 'element-plus';
|
||||||
import { TableAction } from '@/components/Table';
|
import { TableAction } from '@/components/Table';
|
||||||
import { useForm } from '@/components/Form/index';
|
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 {message,confirm} from "@/utils/auth";
|
||||||
import { columns } from './columns';
|
import { columns } from './columns';
|
||||||
import { schemas } from './querySchemas';
|
import { schemas } from './querySchemas';
|
||||||
import {downloadByData} from '@/utils/file/download';
|
import {downloadByData} from '@/utils/file/download';
|
||||||
|
import printJS from 'print-js';
|
||||||
const userId = ref(0);
|
const userId = ref(0);
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const editVisible = ref(false)
|
const editVisible = ref(false)
|
||||||
@ -116,7 +117,7 @@
|
|||||||
|
|
||||||
|
|
||||||
const actionColumn = reactive({
|
const actionColumn = reactive({
|
||||||
width:300,
|
width:360,
|
||||||
label: '操作',
|
label: '操作',
|
||||||
prop: 'action',
|
prop: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@ -145,6 +146,12 @@
|
|||||||
onClick: handleResetPassWord.bind(null, record),
|
onClick: handleResetPassWord.bind(null, record),
|
||||||
auth:['sys:user:resetPwd']
|
auth:['sys:user:resetPwd']
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '打印',
|
||||||
|
type: 'primary',
|
||||||
|
icon:'Printer',
|
||||||
|
onClick: handlePrint.bind(null, record),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
// dropDownActions: [
|
// dropDownActions: [
|
||||||
// {
|
// {
|
||||||
@ -194,6 +201,15 @@
|
|||||||
message("删除成功");
|
message("删除成功");
|
||||||
reloadTable()
|
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) {
|
function handleSubmit(values: Recordable) {
|
||||||
handleReset()
|
handleReset()
|
||||||
|
Loading…
Reference in New Issue
Block a user