mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2026-02-08 02:34:27 +08:00
@@ -11,17 +11,17 @@
|
||||
<a-card style="margin-bottom: 15px" size="small">
|
||||
<a-descriptions :title="noticeDetail.title" :column="4" size="small">
|
||||
<template #extra>
|
||||
<a-button v-if="!noticeDetail.publishFlag" type="primary" size="small" @click="onEdit">编辑</a-button>
|
||||
<a-button type="primary" size="small" @click="onEdit">编辑</a-button>
|
||||
</template>
|
||||
<a-descriptions-item label="分类">{{ noticeDetail.noticeTypeName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="文号">{{ noticeDetail.documentNumber }}</a-descriptions-item>
|
||||
<a-descriptions-item label="文号">{{ noticeDetail.documentNumber ? noticeDetail.documentNumber : '无' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="来源">{{ noticeDetail.source }}</a-descriptions-item>
|
||||
<a-descriptions-item label="作者">{{ noticeDetail.author }}</a-descriptions-item>
|
||||
<a-descriptions-item label="页面浏览量">{{ noticeDetail.pageViewCount }}</a-descriptions-item>
|
||||
<a-descriptions-item label="用户浏览量">{{ noticeDetail.userViewCount }}</a-descriptions-item>
|
||||
<a-descriptions-item label="创建时间">{{ noticeDetail.createTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="发布时间">{{ noticeDetail.publishTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="定时发布">{{ noticeDetail.publishFlag ? '已发布' : '待发布' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="发布状态">{{ noticeDetail.publishFlag ? '已发布' : '待发布' }}</a-descriptions-item>
|
||||
<a-descriptions-item label="删除状态">{{ noticeDetail.deletedFlag ? '已删除' : '未删除' }}</a-descriptions-item>
|
||||
<a-descriptions-item v-if="!$lodash.isEmpty(noticeDetail.attachment)" label="附件">
|
||||
<div class="file-list">
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</a-button-group>
|
||||
</a-form-item>
|
||||
</a-row>
|
||||
<a-row class="smart-query-form-row"> </a-row>
|
||||
<a-row class="smart-query-form-row" />
|
||||
</a-form>
|
||||
|
||||
<a-card size="small" :bordered="false">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="创建人" class="smart-query-form-item">
|
||||
<a-input style="width: 100px" v-model:value="queryForm.createUserId" placeholder="创建人" />
|
||||
<a-input style="width: 100px" v-model:value="queryForm.createUserName" placeholder="创建人" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="是否删除" class="smart-query-form-item">
|
||||
@@ -91,6 +91,9 @@
|
||||
<template v-if="column.dataIndex === 'title'">
|
||||
<a @click="toDetail(record.noticeId)">{{ text }}</a>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'documentNumber'">
|
||||
{{ text ? text : '无' }}
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'allVisibleFlag'"> {{ text ? '全部可见' : '部分可见' }} </template>
|
||||
<template v-else-if="column.dataIndex === 'publishFlag'">
|
||||
{{ text ? '已发布' : '待发布' }}
|
||||
@@ -145,7 +148,7 @@
|
||||
noticeTypeId: undefined, //分类
|
||||
keywords: '', //标题、作者、来源
|
||||
documentNumber: '', //文号
|
||||
createUserId: undefined, //创建人
|
||||
createUserName: undefined, //创建人
|
||||
deletedFlag: undefined, //删除标识
|
||||
createTimeBegin: null, //创建-开始时间
|
||||
createTimeEnd: null, //创建-截止时间
|
||||
@@ -195,7 +198,7 @@
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '发布',
|
||||
title: '发布状态',
|
||||
dataIndex: 'publishFlag',
|
||||
width: 80,
|
||||
},
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
function setData(tableColumns, config) {
|
||||
//------------- 更新基础信息 -----------------
|
||||
if (config.insertAndUpdate) {
|
||||
formData.isSupportInsertAndUpdate = config.insertAndUpdate.isSupportInsertAndUpdate ? config.insertAndUpdate.isSupportInsertAndUpdate : true;
|
||||
formData.isSupportInsertAndUpdate = config.insertAndUpdate.isSupportInsertAndUpdate;
|
||||
formData.pageType = config.insertAndUpdate.pageType;
|
||||
formData.width = config.insertAndUpdate.width;
|
||||
formData.countPerLine = config.insertAndUpdate.countPerLine;
|
||||
|
||||
@@ -107,7 +107,8 @@
|
||||
<template v-if="column.dataIndex === 'enabledFlag'">
|
||||
<a-switch
|
||||
v-model:checked="record.enabledFlag"
|
||||
checked-children="已启用" un-checked-children="已禁用"
|
||||
checked-children="已启用"
|
||||
un-checked-children="已禁用"
|
||||
@change="(checked) => handleEnabledUpdate(checked, record)"
|
||||
:loading="record.enabledLoading"
|
||||
/>
|
||||
@@ -117,31 +118,31 @@
|
||||
<a-button v-privilege="'support:job:update'" @click="openUpdateModal(record)" type="link">编辑</a-button>
|
||||
<a-button v-privilege="'support:job:execute'" type="link" @click="openExecuteModal(record)">执行</a-button>
|
||||
<a-button v-privilege="'support:job:log:query'" @click="openJobLogModal(record.jobId, record.jobName)" type="link">记录</a-button>
|
||||
<a-button danger v-privilege="'support:job:log:delete'" @click="confirmDelete(record.jobId, record.jobName)" type="link">删除</a-button>
|
||||
<a-button danger v-privilege="'support:job:log:delete'" @click="confirmDelete(record.jobId, record.jobName)" type="link"
|
||||
>删除</a-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="smart-query-table-page">
|
||||
<a-pagination
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
show-less-items
|
||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||
:defaultPageSize="queryForm.pageSize"
|
||||
v-model:current="queryForm.pageNum"
|
||||
v-model:pageSize="queryForm.pageSize"
|
||||
:total="total"
|
||||
@change="queryJobList"
|
||||
@showSizeChange="queryJobList"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
show-less-items
|
||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||
:defaultPageSize="queryForm.pageSize"
|
||||
v-model:current="queryForm.pageNum"
|
||||
v-model:pageSize="queryForm.pageSize"
|
||||
:total="total"
|
||||
@change="queryJobList"
|
||||
@showSizeChange="queryJobList"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
/>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="已删除任务"><DeletedJobList /></a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
|
||||
</a-card>
|
||||
|
||||
<!-- 表单操作 -->
|
||||
@@ -152,7 +153,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {message, Modal} from 'ant-design-vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { jobApi } from '/@/api/support/job-api';
|
||||
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
@@ -163,7 +164,7 @@
|
||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
|
||||
import JobFormModal from './components/job-form-modal.vue';
|
||||
import JobLogListModal from './components/job-log-list-modal.vue';
|
||||
import {SmartLoading} from "/@/components/framework/smart-loading/index.js";
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -241,6 +242,8 @@
|
||||
},
|
||||
]);
|
||||
|
||||
const activeKey = ref('1');
|
||||
|
||||
// ---------------- 查询数据 -----------------------
|
||||
|
||||
const queryFormState = {
|
||||
@@ -333,7 +336,7 @@
|
||||
|
||||
// ------------------------------------ 删除操作 -------------------------------------
|
||||
|
||||
function confirmDelete(jobId, jobName){
|
||||
function confirmDelete(jobId, jobName) {
|
||||
Modal.confirm({
|
||||
title: '警告',
|
||||
content: `确定要删除【${jobName}】任务吗?`,
|
||||
@@ -347,15 +350,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteJob(jobId){
|
||||
try{
|
||||
async function deleteJob(jobId) {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
await jobApi.deleteJob(jobId);
|
||||
message.success('删除成功!');
|
||||
queryJobList();
|
||||
}catch (e){
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
}finally {
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,16 @@
|
||||
<a-form-item label="登录账号" name="loginName">
|
||||
<a-input class="form-item" v-model:value.trim="form.loginName" placeholder="请输入登录账号" disabled />
|
||||
</a-form-item>
|
||||
<a-form-item label="部门" name="departmentId">
|
||||
<DepartmentTreeSelect
|
||||
class="form-item"
|
||||
ref="departmentTreeSelect"
|
||||
width="100%"
|
||||
:init="false"
|
||||
v-model:value="form.departmentId"
|
||||
disabled
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="员工名称" name="actualName">
|
||||
<a-input class="form-item" v-model:value.trim="form.actualName" placeholder="请输入员工名称" />
|
||||
</a-form-item>
|
||||
@@ -20,8 +30,11 @@
|
||||
<a-form-item label="手机号码" name="phone">
|
||||
<a-input class="form-item" v-model:value.trim="form.phone" placeholder="请输入手机号码" />
|
||||
</a-form-item>
|
||||
<a-form-item label="部门" name="departmentId">
|
||||
<DepartmentTreeSelect class="form-item" ref="departmentTreeSelect" width="100%" :init="false" v-model:value="form.departmentId" />
|
||||
<a-form-item label="邮箱" name="email">
|
||||
<a-input v-model:value.trim="form.email" placeholder="请输入邮箱" />
|
||||
</a-form-item>
|
||||
<a-form-item label="职务" name="positionId">
|
||||
<PositionSelect v-model:value="form.positionId" placeholder="请选择职务" />
|
||||
</a-form-item>
|
||||
<a-form-item label="备注" name="remark">
|
||||
<a-textarea class="form-item" v-model:value="form.remark" placeholder="请输入备注" :rows="4" />
|
||||
@@ -65,6 +78,7 @@
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { regular } from '/@/constants/regular-const.js';
|
||||
import DepartmentTreeSelect from '/@/components/system/department-tree-select/index.vue';
|
||||
import PositionSelect from '/@/components/system/position-select/index.vue';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import { loginApi } from '/@/api/system/login-api.js';
|
||||
import { useUserStore } from '/@/store/modules/system/user.js';
|
||||
@@ -93,10 +107,12 @@
|
||||
phone: '',
|
||||
// 部门id
|
||||
departmentId: undefined,
|
||||
// 是否启用
|
||||
disabledFlag: undefined,
|
||||
// 邮箱
|
||||
email: undefined,
|
||||
// 职务级别
|
||||
positionId: undefined,
|
||||
// 是否禁用
|
||||
disabledFlag: undefined,
|
||||
// 备注
|
||||
remark: '',
|
||||
};
|
||||
@@ -111,7 +127,7 @@
|
||||
{ pattern: regular.phone, message: '请输入正确的手机号码', trigger: 'blur' },
|
||||
],
|
||||
gender: [{ required: true, message: '性别不能为空' }],
|
||||
departmentId: [{ required: true, message: '部门不能为空' }],
|
||||
email: [{ required: true, message: '请输入邮箱' }],
|
||||
};
|
||||
// 头像地址
|
||||
let avatarUrl = ref();
|
||||
@@ -128,12 +144,13 @@
|
||||
form.employeeId = data.employeeId;
|
||||
form.loginName = data.loginName;
|
||||
form.actualName = data.actualName;
|
||||
form.email = data.email;
|
||||
form.gender = data.gender;
|
||||
form.phone = data.phone;
|
||||
form.departmentId = data.departmentId;
|
||||
form.disabledFlag = data.disabledFlag;
|
||||
form.email = data.email;
|
||||
form.positionId = data.positionId;
|
||||
form.remark = data.remark;
|
||||
form.disabledFlag = data.disabledFlag;
|
||||
// 头像展示
|
||||
avatarUrl.value = data.avatar;
|
||||
} catch (e) {
|
||||
@@ -187,7 +204,7 @@
|
||||
async function updateEmployee() {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
await employeeApi.updateByLogin(form);
|
||||
await employeeApi.updateCenter(form);
|
||||
message.success('更新成功');
|
||||
// 重新获取详情,刷新整体缓存
|
||||
await getLoginInfo();
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
phone: undefined,
|
||||
roleIdList: undefined,
|
||||
positionId: undefined,
|
||||
email: undefined,
|
||||
};
|
||||
|
||||
let form = reactive(_.cloneDeep(formDefault));
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
let props = defineProps({
|
||||
tree: {
|
||||
type: Array,
|
||||
default: [],
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
defineEmits(['update:value']);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
const props = defineProps({
|
||||
tree: {
|
||||
type: Array,
|
||||
default: [],
|
||||
default: () => [],
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
const props = defineProps({
|
||||
tree: {
|
||||
type: Array,
|
||||
default: [],
|
||||
default: () => [],
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
|
||||
Reference in New Issue
Block a user