mirror of
https://github.com/1024-lab/smart-admin.git
synced 2026-06-02 03:55:59 +00:00
v3.18.0 【新增】新增消息管理;【新增】完善企业demo;【新增】完善相关数据权限;【新增】菜单管理下级功能
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
@@ -18,7 +18,7 @@
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-base</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
@@ -51,6 +51,8 @@ public class AdminSwaggerTagConst extends SwaggerTagConst {
|
||||
|
||||
public static final String SYSTEM_POSITION = "系统-职务管理";
|
||||
|
||||
public static final String SYSTEM_MESSAGE = "系统-消息";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.lab1024.sa.admin.module.business.oa.bank;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -35,24 +36,28 @@ public class BankController {
|
||||
|
||||
@Operation(summary = "分页查询银行信息 @author 善逸")
|
||||
@PostMapping("/oa/bank/page/query")
|
||||
@SaCheckPermission("oa:bank:query")
|
||||
public ResponseDTO<PageResult<BankVO>> queryByPage(@RequestBody @Valid BankQueryForm queryForm) {
|
||||
return bankService.queryByPage(queryForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "根据企业ID查询银行信息列表 @author 善逸")
|
||||
@GetMapping("/oa/bank/query/list/{enterpriseId}")
|
||||
@SaCheckPermission("oa:bank:query")
|
||||
public ResponseDTO<List<BankVO>> queryList(@PathVariable Long enterpriseId) {
|
||||
return bankService.queryList(enterpriseId);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询银行信息详情 @author 善逸")
|
||||
@GetMapping("/oa/bank/get/{bankId}")
|
||||
@SaCheckPermission("oa:bank:query")
|
||||
public ResponseDTO<BankVO> getDetail(@PathVariable Long bankId) {
|
||||
return bankService.getDetail(bankId);
|
||||
}
|
||||
|
||||
@Operation(summary = "新建银行信息 @author 善逸")
|
||||
@PostMapping("/oa/bank/create")
|
||||
@SaCheckPermission("oa:bank:add")
|
||||
public ResponseDTO<String> createBank(@RequestBody @Valid BankCreateForm createVO) {
|
||||
RequestUser requestUser = SmartRequestUtil.getRequestUser();
|
||||
createVO.setCreateUserId(requestUser.getUserId());
|
||||
@@ -62,12 +67,14 @@ public class BankController {
|
||||
|
||||
@Operation(summary = "编辑银行信息 @author 善逸")
|
||||
@PostMapping("/oa/bank/update")
|
||||
@SaCheckPermission("oa:bank:update")
|
||||
public ResponseDTO<String> updateBank(@RequestBody @Valid BankUpdateForm updateVO) {
|
||||
return bankService.updateBank(updateVO);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除银行信息 @author 善逸")
|
||||
@GetMapping("/oa/bank/delete/{bankId}")
|
||||
@SaCheckPermission("oa:bank:delete")
|
||||
public ResponseDTO<String> deleteBank(@PathVariable Long bankId) {
|
||||
return bankService.deleteBank(bankId);
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ public class EnterpriseController {
|
||||
|
||||
@Operation(summary = "按照类型查询企业 @author 开云")
|
||||
@GetMapping("/oa/enterprise/query/list")
|
||||
@SaCheckPermission("oa:enterprise:query")
|
||||
public ResponseDTO<List<EnterpriseListVO>> queryList(@RequestParam(value = "type", required = false) Integer type) {
|
||||
return enterpriseService.queryList(type);
|
||||
}
|
||||
@@ -114,12 +115,14 @@ public class EnterpriseController {
|
||||
|
||||
@Operation(summary = "查询企业全部员工 @author 罗伊")
|
||||
@PostMapping("/oa/enterprise/employee/list")
|
||||
@SaCheckPermission("oa:enterprise:queryEmployee")
|
||||
public ResponseDTO<List<EnterpriseEmployeeVO>> employeeList(@RequestBody @Valid List<Long> enterpriseIdList) {
|
||||
return ResponseDTO.ok(enterpriseService.employeeList(enterpriseIdList));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询企业员工 @author 卓大")
|
||||
@PostMapping("/oa/enterprise/employee/queryPage")
|
||||
@SaCheckPermission("oa:enterprise:queryEmployee")
|
||||
public ResponseDTO<PageResult<EnterpriseEmployeeVO>> queryPageEmployeeList(@RequestBody @Valid EnterpriseEmployeeQueryForm queryForm) {
|
||||
return ResponseDTO.ok(enterpriseService.queryPageEmployeeList(queryForm));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.lab1024.sa.admin.module.business.oa.invoice;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -38,18 +39,21 @@ public class InvoiceController {
|
||||
|
||||
@Operation(summary = "分页查询发票信息 @author 善逸")
|
||||
@PostMapping("/oa/invoice/page/query")
|
||||
@SaCheckPermission("oa:invoice:query")
|
||||
public ResponseDTO<PageResult<InvoiceVO>> queryByPage(@RequestBody @Valid InvoiceQueryForm queryForm) {
|
||||
return invoiceService.queryByPage(queryForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询发票信息详情 @author 善逸")
|
||||
@GetMapping("/oa/invoice/get/{invoiceId}")
|
||||
@SaCheckPermission("oa:invoice:query")
|
||||
public ResponseDTO<InvoiceVO> getDetail(@PathVariable Long invoiceId) {
|
||||
return invoiceService.getDetail(invoiceId);
|
||||
}
|
||||
|
||||
@Operation(summary = "新建发票信息 @author 善逸")
|
||||
@PostMapping("/oa/invoice/create")
|
||||
@SaCheckPermission("oa:invoice:add")
|
||||
public ResponseDTO<String> createInvoice(@RequestBody @Valid InvoiceAddForm createVO) {
|
||||
RequestUser requestUser = SmartRequestUtil.getRequestUser();
|
||||
createVO.setCreateUserId(requestUser.getUserId());
|
||||
@@ -57,21 +61,24 @@ public class InvoiceController {
|
||||
return invoiceService.createInvoice(createVO);
|
||||
}
|
||||
|
||||
@OperateLog
|
||||
@Operation(summary = "编辑发票信息 @author 善逸")
|
||||
@PostMapping("/oa/invoice/update")
|
||||
@OperateLog
|
||||
@SaCheckPermission("oa:invoice:update")
|
||||
public ResponseDTO<String> updateInvoice(@RequestBody @Valid InvoiceUpdateForm updateVO) {
|
||||
return invoiceService.updateInvoice(updateVO);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除发票信息 @author 善逸")
|
||||
@GetMapping("/invoice/delete/{invoiceId}")
|
||||
@SaCheckPermission("oa:invoice:delete")
|
||||
public ResponseDTO<String> deleteInvoice(@PathVariable Long invoiceId) {
|
||||
return invoiceService.deleteInvoice(invoiceId);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询列表 @author lidoudou")
|
||||
@GetMapping("/oa/invoice/query/list/{enterpriseId}")
|
||||
@SaCheckPermission("oa:invoice:query")
|
||||
public ResponseDTO<List<InvoiceVO>> queryList(@PathVariable Long enterpriseId) {
|
||||
return invoiceService.queryList(enterpriseId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package net.lab1024.sa.admin.module.system.message;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
import net.lab1024.sa.base.common.domain.PageResult;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.base.common.domain.ValidateList;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageQueryForm;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageSendForm;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageVO;
|
||||
import net.lab1024.sa.base.module.support.message.service.MessageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 后管 消息路由
|
||||
*
|
||||
* @author: 卓大
|
||||
* @date: 2025/04/09 20:55
|
||||
*/
|
||||
@Tag(name = AdminSwaggerTagConst.System.SYSTEM_MESSAGE)
|
||||
@RestController
|
||||
public class AdminMessageController {
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
@Operation(summary = "通知消息-新建 @author 卓大")
|
||||
@PostMapping("/message/sendMessages")
|
||||
@SaCheckPermission("system:message:send")
|
||||
public ResponseDTO<String> sendMessages(@RequestBody @Valid ValidateList<MessageSendForm> messageList) {
|
||||
messageService.sendMessage(messageList);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "通知消息-分页查询 @author 卓大")
|
||||
@PostMapping("/message/query")
|
||||
@SaCheckPermission("system:message:query")
|
||||
public ResponseDTO<PageResult<MessageVO>> query(@RequestBody @Valid MessageQueryForm queryForm) {
|
||||
return ResponseDTO.ok(messageService.query(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "通知消息-删除 @author 卓大")
|
||||
@GetMapping("/message/delete/{messageId}")
|
||||
@SaCheckPermission("system:message:delete")
|
||||
public ResponseDTO<String> delete(@PathVariable Long messageId) {
|
||||
return messageService.delete(messageId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,43 +52,43 @@ public class AdminDictController extends SupportBaseController {
|
||||
|
||||
@Operation(summary = "分页查询 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/queryPage")
|
||||
@SaCheckPermission("dict:query")
|
||||
@SaCheckPermission("support:dict:query")
|
||||
public ResponseDTO<PageResult<DictVO>> queryPage(@RequestBody @Valid DictQueryForm queryForm) {
|
||||
return ResponseDTO.ok(dictService.queryPage(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/add")
|
||||
@SaCheckPermission("dict:add")
|
||||
@SaCheckPermission("support:dict:add")
|
||||
public ResponseDTO<String> add(@RequestBody @Valid DictAddForm addForm) {
|
||||
return dictService.add(addForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/update")
|
||||
@SaCheckPermission("dict:update")
|
||||
@SaCheckPermission("support:dict:update")
|
||||
public ResponseDTO<String> update(@RequestBody @Valid DictUpdateForm updateForm) {
|
||||
return dictService.update(updateForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 启用/禁用 @author 1024创新实验室-主任-卓大")
|
||||
@Operation(summary = "启用/禁用 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/updateDisabled/{dictId}")
|
||||
@SaCheckPermission("dictData:updateDisabled")
|
||||
@SaCheckPermission("support:dict:updateDisabled")
|
||||
public ResponseDTO<String> updateDisabled(@PathVariable Long dictId) {
|
||||
return dictService.updateDisabled(dictId);
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/batchDelete")
|
||||
@SaCheckPermission("dict:delete")
|
||||
@SaCheckPermission("support:dict:delete")
|
||||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Long> idList) {
|
||||
return dictService.batchDelete(idList);
|
||||
}
|
||||
|
||||
@Operation(summary = "单个删除 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/delete/{dictId}")
|
||||
@SaCheckPermission("dict:delete")
|
||||
public ResponseDTO<String> batchDelete(@PathVariable Long dictId) {
|
||||
@SaCheckPermission("support:dict:delete")
|
||||
public ResponseDTO<String> delete(@PathVariable Long dictId) {
|
||||
return dictService.delete(dictId);
|
||||
}
|
||||
|
||||
@@ -96,42 +96,42 @@ public class AdminDictController extends SupportBaseController {
|
||||
|
||||
@Operation(summary = "字典数据 分页查询 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/dictData/queryDictData/{dictId}")
|
||||
@SaCheckPermission("dictData:query")
|
||||
@SaCheckPermission("support:dictData:query")
|
||||
public ResponseDTO<List<DictDataVO>> queryDictData(@PathVariable Long dictId) {
|
||||
return ResponseDTO.ok(dictService.queryDictData(dictId));
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 启用/禁用 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/dictData/updateDisabled/{dictDataId}")
|
||||
@SaCheckPermission("dictData:updateDisabled")
|
||||
@SaCheckPermission("support:dictData:updateDisabled")
|
||||
public ResponseDTO<String> updateDictDataDisabled(@PathVariable Long dictDataId) {
|
||||
return dictService.updateDictDataDisabled(dictDataId);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 添加 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/dictData/add")
|
||||
@SaCheckPermission("dictData:add")
|
||||
@SaCheckPermission("support:dictData:add")
|
||||
public ResponseDTO<String> addDictData(@RequestBody @Valid DictDataAddForm addForm) {
|
||||
return dictService.addDictData(addForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 更新 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/dictData/update")
|
||||
@SaCheckPermission("dictData:update")
|
||||
@SaCheckPermission("support:dictData:update")
|
||||
public ResponseDTO<String> updateDictData(@RequestBody @Valid DictDataUpdateForm updateForm) {
|
||||
return dictService.updateDictData(updateForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 批量删除 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/dictData/batchDelete")
|
||||
@SaCheckPermission("dictData:delete")
|
||||
@SaCheckPermission("support:dictData:delete")
|
||||
public ResponseDTO<String> batchDeleteDictData(@RequestBody ValidateList<Long> idList) {
|
||||
return dictService.batchDeleteDictData(idList);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 单个删除 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/dictData/delete/{dictDataId}")
|
||||
@SaCheckPermission("dictData:delete")
|
||||
@SaCheckPermission("support:dictData:delete")
|
||||
public ResponseDTO<String> deleteDictData(@PathVariable Long dictDataId) {
|
||||
return dictService.deleteDictData(dictDataId);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
|
||||
@@ -36,9 +36,9 @@ public class MessageQueryForm extends PageParam {
|
||||
@Schema(description = "查询结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
@Schema(hidden = true)
|
||||
@Schema(description = "接收人")
|
||||
private Long receiverUserId;
|
||||
|
||||
@Schema(hidden = true)
|
||||
@Schema(description = "接收人类型")
|
||||
private Integer receiverUserType;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.Lists;
|
||||
import jakarta.annotation.Resource;
|
||||
import net.lab1024.sa.base.common.domain.PageResult;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.base.common.enumeration.UserTypeEnum;
|
||||
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
||||
import net.lab1024.sa.base.common.util.SmartPageUtil;
|
||||
@@ -105,4 +106,13 @@ public class MessageService {
|
||||
}).collect(Collectors.toList());
|
||||
messageManager.saveBatch(messageEntityList);
|
||||
}
|
||||
|
||||
// 删除消息
|
||||
public ResponseDTO<String> delete(Long messageId) {
|
||||
if(messageId == null){
|
||||
return ResponseDTO.userErrorParam();
|
||||
}
|
||||
messageDao.deleteById(messageId);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ spring:
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
username: lab1024@163.com
|
||||
password: 1024lab
|
||||
password: LAB1024LAB
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
@@ -18,7 +18,7 @@
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-base</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
@@ -51,6 +51,8 @@ public class AdminSwaggerTagConst extends SwaggerTagConst {
|
||||
|
||||
public static final String SYSTEM_POSITION = "系统-职务管理";
|
||||
|
||||
public static final String SYSTEM_MESSAGE = "系统-消息";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.lab1024.sa.admin.module.business.oa.bank;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
@@ -35,24 +36,28 @@ public class BankController {
|
||||
|
||||
@Operation(summary = "分页查询银行信息 @author 善逸")
|
||||
@PostMapping("/oa/bank/page/query")
|
||||
@SaCheckPermission("oa:bank:query")
|
||||
public ResponseDTO<PageResult<BankVO>> queryByPage(@RequestBody @Valid BankQueryForm queryForm) {
|
||||
return bankService.queryByPage(queryForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "根据企业ID查询银行信息列表 @author 善逸")
|
||||
@GetMapping("/oa/bank/query/list/{enterpriseId}")
|
||||
@SaCheckPermission("oa:bank:query")
|
||||
public ResponseDTO<List<BankVO>> queryList(@PathVariable Long enterpriseId) {
|
||||
return bankService.queryList(enterpriseId);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询银行信息详情 @author 善逸")
|
||||
@GetMapping("/oa/bank/get/{bankId}")
|
||||
@SaCheckPermission("oa:bank:query")
|
||||
public ResponseDTO<BankVO> getDetail(@PathVariable Long bankId) {
|
||||
return bankService.getDetail(bankId);
|
||||
}
|
||||
|
||||
@Operation(summary = "新建银行信息 @author 善逸")
|
||||
@PostMapping("/oa/bank/create")
|
||||
@SaCheckPermission("oa:bank:add")
|
||||
public ResponseDTO<String> createBank(@RequestBody @Valid BankCreateForm createVO) {
|
||||
RequestUser requestUser = SmartRequestUtil.getRequestUser();
|
||||
createVO.setCreateUserId(requestUser.getUserId());
|
||||
@@ -62,12 +67,14 @@ public class BankController {
|
||||
|
||||
@Operation(summary = "编辑银行信息 @author 善逸")
|
||||
@PostMapping("/oa/bank/update")
|
||||
@SaCheckPermission("oa:bank:update")
|
||||
public ResponseDTO<String> updateBank(@RequestBody @Valid BankUpdateForm updateVO) {
|
||||
return bankService.updateBank(updateVO);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除银行信息 @author 善逸")
|
||||
@GetMapping("/oa/bank/delete/{bankId}")
|
||||
@SaCheckPermission("oa:bank:delete")
|
||||
public ResponseDTO<String> deleteBank(@PathVariable Long bankId) {
|
||||
return bankService.deleteBank(bankId);
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ public class EnterpriseController {
|
||||
|
||||
@Operation(summary = "按照类型查询企业 @author 开云")
|
||||
@GetMapping("/oa/enterprise/query/list")
|
||||
@SaCheckPermission("oa:enterprise:query")
|
||||
public ResponseDTO<List<EnterpriseListVO>> queryList(@RequestParam(value = "type", required = false) Integer type) {
|
||||
return enterpriseService.queryList(type);
|
||||
}
|
||||
@@ -114,12 +115,14 @@ public class EnterpriseController {
|
||||
|
||||
@Operation(summary = "查询企业全部员工 @author 罗伊")
|
||||
@PostMapping("/oa/enterprise/employee/list")
|
||||
@SaCheckPermission("oa:enterprise:queryEmployee")
|
||||
public ResponseDTO<List<EnterpriseEmployeeVO>> employeeList(@RequestBody @Valid List<Long> enterpriseIdList) {
|
||||
return ResponseDTO.ok(enterpriseService.employeeList(enterpriseIdList));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询企业员工 @author 卓大")
|
||||
@PostMapping("/oa/enterprise/employee/queryPage")
|
||||
@SaCheckPermission("oa:enterprise:queryEmployee")
|
||||
public ResponseDTO<PageResult<EnterpriseEmployeeVO>> queryPageEmployeeList(@RequestBody @Valid EnterpriseEmployeeQueryForm queryForm) {
|
||||
return ResponseDTO.ok(enterpriseService.queryPageEmployeeList(queryForm));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.lab1024.sa.admin.module.business.oa.invoice;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -38,18 +39,21 @@ public class InvoiceController {
|
||||
|
||||
@Operation(summary = "分页查询发票信息 @author 善逸")
|
||||
@PostMapping("/oa/invoice/page/query")
|
||||
@SaCheckPermission("oa:invoice:query")
|
||||
public ResponseDTO<PageResult<InvoiceVO>> queryByPage(@RequestBody @Valid InvoiceQueryForm queryForm) {
|
||||
return invoiceService.queryByPage(queryForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询发票信息详情 @author 善逸")
|
||||
@GetMapping("/oa/invoice/get/{invoiceId}")
|
||||
@SaCheckPermission("oa:invoice:query")
|
||||
public ResponseDTO<InvoiceVO> getDetail(@PathVariable Long invoiceId) {
|
||||
return invoiceService.getDetail(invoiceId);
|
||||
}
|
||||
|
||||
@Operation(summary = "新建发票信息 @author 善逸")
|
||||
@PostMapping("/oa/invoice/create")
|
||||
@SaCheckPermission("oa:invoice:add")
|
||||
public ResponseDTO<String> createInvoice(@RequestBody @Valid InvoiceAddForm createVO) {
|
||||
RequestUser requestUser = SmartRequestUtil.getRequestUser();
|
||||
createVO.setCreateUserId(requestUser.getUserId());
|
||||
@@ -57,21 +61,24 @@ public class InvoiceController {
|
||||
return invoiceService.createInvoice(createVO);
|
||||
}
|
||||
|
||||
@OperateLog
|
||||
@Operation(summary = "编辑发票信息 @author 善逸")
|
||||
@PostMapping("/oa/invoice/update")
|
||||
@OperateLog
|
||||
@SaCheckPermission("oa:invoice:update")
|
||||
public ResponseDTO<String> updateInvoice(@RequestBody @Valid InvoiceUpdateForm updateVO) {
|
||||
return invoiceService.updateInvoice(updateVO);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除发票信息 @author 善逸")
|
||||
@GetMapping("/invoice/delete/{invoiceId}")
|
||||
@SaCheckPermission("oa:invoice:delete")
|
||||
public ResponseDTO<String> deleteInvoice(@PathVariable Long invoiceId) {
|
||||
return invoiceService.deleteInvoice(invoiceId);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询列表 @author lidoudou")
|
||||
@GetMapping("/oa/invoice/query/list/{enterpriseId}")
|
||||
@SaCheckPermission("oa:invoice:query")
|
||||
public ResponseDTO<List<InvoiceVO>> queryList(@PathVariable Long enterpriseId) {
|
||||
return invoiceService.queryList(enterpriseId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package net.lab1024.sa.admin.module.system.message;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
import net.lab1024.sa.base.common.domain.PageResult;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.base.common.domain.ValidateList;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageQueryForm;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageSendForm;
|
||||
import net.lab1024.sa.base.module.support.message.domain.MessageVO;
|
||||
import net.lab1024.sa.base.module.support.message.service.MessageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 后管 消息路由
|
||||
*
|
||||
* @author: 卓大
|
||||
* @date: 2025/04/09 20:55
|
||||
*/
|
||||
@Tag(name = AdminSwaggerTagConst.System.SYSTEM_MESSAGE)
|
||||
@RestController
|
||||
public class AdminMessageController {
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
@Operation(summary = "通知消息-新建 @author 卓大")
|
||||
@PostMapping("/message/sendMessages")
|
||||
@SaCheckPermission("system:message:send")
|
||||
public ResponseDTO<String> sendMessages(@RequestBody @Valid ValidateList<MessageSendForm> messageList) {
|
||||
messageService.sendMessage(messageList);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "通知消息-分页查询 @author 卓大")
|
||||
@PostMapping("/message/query")
|
||||
@SaCheckPermission("system:message:query")
|
||||
public ResponseDTO<PageResult<MessageVO>> query(@RequestBody @Valid MessageQueryForm queryForm) {
|
||||
return ResponseDTO.ok(messageService.query(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "通知消息-删除 @author 卓大")
|
||||
@GetMapping("/message/delete/{messageId}")
|
||||
@SaCheckPermission("system:message:delete")
|
||||
public ResponseDTO<String> delete(@PathVariable Long messageId) {
|
||||
return messageService.delete(messageId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,43 +52,43 @@ public class AdminDictController extends SupportBaseController {
|
||||
|
||||
@Operation(summary = "分页查询 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/queryPage")
|
||||
@SaCheckPermission("dict:query")
|
||||
@SaCheckPermission("support:dict:query")
|
||||
public ResponseDTO<PageResult<DictVO>> queryPage(@RequestBody @Valid DictQueryForm queryForm) {
|
||||
return ResponseDTO.ok(dictService.queryPage(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/add")
|
||||
@SaCheckPermission("dict:add")
|
||||
@SaCheckPermission("support:dict:add")
|
||||
public ResponseDTO<String> add(@RequestBody @Valid DictAddForm addForm) {
|
||||
return dictService.add(addForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/update")
|
||||
@SaCheckPermission("dict:update")
|
||||
@SaCheckPermission("support:dict:update")
|
||||
public ResponseDTO<String> update(@RequestBody @Valid DictUpdateForm updateForm) {
|
||||
return dictService.update(updateForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 启用/禁用 @author 1024创新实验室-主任-卓大")
|
||||
@Operation(summary = "启用/禁用 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/updateDisabled/{dictId}")
|
||||
@SaCheckPermission("dictData:updateDisabled")
|
||||
@SaCheckPermission("support:dict:updateDisabled")
|
||||
public ResponseDTO<String> updateDisabled(@PathVariable Long dictId) {
|
||||
return dictService.updateDisabled(dictId);
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/batchDelete")
|
||||
@SaCheckPermission("dict:delete")
|
||||
@SaCheckPermission("support:dict:delete")
|
||||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Long> idList) {
|
||||
return dictService.batchDelete(idList);
|
||||
}
|
||||
|
||||
@Operation(summary = "单个删除 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/delete/{dictId}")
|
||||
@SaCheckPermission("dict:delete")
|
||||
public ResponseDTO<String> batchDelete(@PathVariable Long dictId) {
|
||||
@SaCheckPermission("support:dict:delete")
|
||||
public ResponseDTO<String> delete(@PathVariable Long dictId) {
|
||||
return dictService.delete(dictId);
|
||||
}
|
||||
|
||||
@@ -96,42 +96,42 @@ public class AdminDictController extends SupportBaseController {
|
||||
|
||||
@Operation(summary = "字典数据 分页查询 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/dictData/queryDictData/{dictId}")
|
||||
@SaCheckPermission("dictData:query")
|
||||
@SaCheckPermission("support:dictData:query")
|
||||
public ResponseDTO<List<DictDataVO>> queryDictData(@PathVariable Long dictId) {
|
||||
return ResponseDTO.ok(dictService.queryDictData(dictId));
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 启用/禁用 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/dictData/updateDisabled/{dictDataId}")
|
||||
@SaCheckPermission("dictData:updateDisabled")
|
||||
@SaCheckPermission("support:dictData:updateDisabled")
|
||||
public ResponseDTO<String> updateDictDataDisabled(@PathVariable Long dictDataId) {
|
||||
return dictService.updateDictDataDisabled(dictDataId);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 添加 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/dictData/add")
|
||||
@SaCheckPermission("dictData:add")
|
||||
@SaCheckPermission("support:dictData:add")
|
||||
public ResponseDTO<String> addDictData(@RequestBody @Valid DictDataAddForm addForm) {
|
||||
return dictService.addDictData(addForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 更新 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/dictData/update")
|
||||
@SaCheckPermission("dictData:update")
|
||||
@SaCheckPermission("support:dictData:update")
|
||||
public ResponseDTO<String> updateDictData(@RequestBody @Valid DictDataUpdateForm updateForm) {
|
||||
return dictService.updateDictData(updateForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 批量删除 @author 1024创新实验室-主任-卓大")
|
||||
@PostMapping("/dict/dictData/batchDelete")
|
||||
@SaCheckPermission("dictData:delete")
|
||||
@SaCheckPermission("support:dictData:delete")
|
||||
public ResponseDTO<String> batchDeleteDictData(@RequestBody ValidateList<Long> idList) {
|
||||
return dictService.batchDeleteDictData(idList);
|
||||
}
|
||||
|
||||
@Operation(summary = "字典数据 单个删除 @author 1024创新实验室-主任-卓大")
|
||||
@GetMapping("/dict/dictData/delete/{dictDataId}")
|
||||
@SaCheckPermission("dictData:delete")
|
||||
@SaCheckPermission("support:dictData:delete")
|
||||
public ResponseDTO<String> deleteDictData(@PathVariable Long dictDataId) {
|
||||
return dictService.deleteDictData(dictDataId);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>net.1024lab</groupId>
|
||||
<groupId>net.lab1024</groupId>
|
||||
<artifactId>sa-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
|
||||
@@ -36,9 +36,9 @@ public class MessageQueryForm extends PageParam {
|
||||
@Schema(description = "查询结束时间")
|
||||
private LocalDate endDate;
|
||||
|
||||
@Schema(hidden = true)
|
||||
@Schema(description = "接收人")
|
||||
private Long receiverUserId;
|
||||
|
||||
@Schema(hidden = true)
|
||||
@Schema(description = "接收人类型")
|
||||
private Integer receiverUserType;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package net.lab1024.sa.base.module.support.message.domain;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.lab1024.sa.base.common.enumeration.UserTypeEnum;
|
||||
import net.lab1024.sa.base.module.support.message.constant.MessageTemplateEnum;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -25,6 +28,10 @@ public class MessageTemplateSendForm {
|
||||
@NotNull(message = "接收者id不能为空")
|
||||
private Long receiverUserId;
|
||||
|
||||
@Schema(description = "接收者id")
|
||||
@NotEmpty(message = "接收者id不能为空")
|
||||
private List<Long> receiverUserIdList;
|
||||
|
||||
/**
|
||||
* 相关业务id | 可选
|
||||
* 用于跳转具体业务
|
||||
|
||||
@@ -3,6 +3,7 @@ package net.lab1024.sa.base.module.support.message.service;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.Lists;
|
||||
import net.lab1024.sa.base.common.domain.PageResult;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.base.common.enumeration.UserTypeEnum;
|
||||
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
||||
import net.lab1024.sa.base.common.util.SmartPageUtil;
|
||||
@@ -105,4 +106,13 @@ public class MessageService {
|
||||
}).collect(Collectors.toList());
|
||||
messageManager.saveBatch(messageEntityList);
|
||||
}
|
||||
|
||||
// 删除消息
|
||||
public ResponseDTO<String> delete(Long messageId) {
|
||||
if(messageId == null){
|
||||
return ResponseDTO.userErrorParam();
|
||||
}
|
||||
messageDao.deleteById(messageId);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
@@ -90,9 +90,7 @@
|
||||
return text;
|
||||
}
|
||||
}
|
||||
window.addEventListener('resize',_.throttle(()=>{
|
||||
window.location.reload()
|
||||
},1000));
|
||||
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
:deep(.ant-table-column-sorters) {
|
||||
|
||||
@@ -13,4 +13,19 @@ export const messageApi = {
|
||||
updateReadFlag: (messageId) => {
|
||||
return getRequest(`/support/message/read/${messageId}`);
|
||||
},
|
||||
|
||||
//通知消息-分页查询 @author 卓大
|
||||
queryAdminMessage: (param) => {
|
||||
return postRequest('/message/query', param);
|
||||
},
|
||||
|
||||
//通知消息-新建 @author 卓大
|
||||
sendMessages: (param) => {
|
||||
return postRequest('/message/sendMessages', param);
|
||||
},
|
||||
|
||||
//通知消息-删除 @author 卓大
|
||||
deleteMessage: (messageId) => {
|
||||
return getRequest(`/message/delete/${messageId}`);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -61,11 +61,6 @@
|
||||
type: Number,
|
||||
require: true,
|
||||
},
|
||||
//如果开启表格scroll,需要传递 scroll标识,由于main.js中设置的全局默认的表格高度,所以scroll默认值设置为true
|
||||
scroll: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
@@ -79,7 +74,13 @@
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(value) => {
|
||||
newColumn = value;
|
||||
newColumn.forEach(item=>{
|
||||
value.forEach(itemNewColumns=>{
|
||||
if(item.dataIndex==itemNewColumns.dataIndex){
|
||||
Object.assign(item,itemNewColumns)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
@@ -179,7 +180,7 @@
|
||||
|
||||
const smartTableColumnModal = ref();
|
||||
function showModal() {
|
||||
smartTableColumnModal.value.show(newColumn, props.tableId,props.scroll);
|
||||
smartTableColumnModal.value.show(newColumn, props.tableId);
|
||||
}
|
||||
|
||||
// 将弹窗修改的列数据,赋值给原表格 列数组
|
||||
@@ -193,6 +194,13 @@
|
||||
obj = mergeColumn(_.cloneDeep(newColumn), changeColumnArray);
|
||||
}
|
||||
const newColumns = obj.newColumns;
|
||||
newColumn.forEach(item=>{
|
||||
obj.newColumns.forEach(itemNewColumns=>{
|
||||
if(item.dataIndex==itemNewColumns.dataIndex){
|
||||
Object.assign(item,itemNewColumns)
|
||||
}
|
||||
})
|
||||
})
|
||||
emit(
|
||||
'update:modelValue',
|
||||
newColumns.filter((e) => e.showFlag)
|
||||
|
||||
@@ -93,11 +93,9 @@
|
||||
// ---------------- 显示 / 隐藏 --------------------
|
||||
let tableId = null;
|
||||
const visible = ref(false);
|
||||
const scroll = ref(true);
|
||||
//显示
|
||||
function show(columns, showTableId,scrollFlag) {
|
||||
function show(columns, showTableId) {
|
||||
tableId = showTableId;
|
||||
scroll.value = scrollFlag;
|
||||
visible.value = true;
|
||||
getUserTableColumns(tableId, _.cloneDeep(columns));
|
||||
}
|
||||
@@ -183,12 +181,7 @@
|
||||
if (newIndex === oldIndex) {
|
||||
return;
|
||||
}
|
||||
// 如果表格开启scroll会多一个虚拟列,所以要减1
|
||||
if(scroll.value){
|
||||
moveTableData(oldIndex-1, newIndex-1);
|
||||
}else{
|
||||
moveTableData(oldIndex, newIndex);
|
||||
}
|
||||
moveTableData(oldIndex, newIndex);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export const appDefaultConfig = {
|
||||
pageWidth: '99%',
|
||||
// 圆角
|
||||
borderRadius: 6,
|
||||
// 展开模式
|
||||
// 菜单展开模式
|
||||
flatPattern: true,
|
||||
// 标签页
|
||||
pageTagFlag: true,
|
||||
|
||||
@@ -40,7 +40,7 @@ export const TABLE_ID_CONST = {
|
||||
SYSTEM: {
|
||||
EMPLOYEE: systemInitTableId + 1, //员工
|
||||
MENU: systemInitTableId + 2, //菜单
|
||||
POSITION:systemInitTableId + 3, //职位
|
||||
POSITION: systemInitTableId + 3, //职位
|
||||
},
|
||||
/**
|
||||
* 支撑
|
||||
@@ -56,5 +56,6 @@ export const TABLE_ID_CONST = {
|
||||
HELP_DOC: supportInitTableId + 8, //帮助文档
|
||||
JOB: supportInitTableId + 9, //Job
|
||||
JOB_LOG: supportInitTableId + 10, //JobLog
|
||||
MAIL: supportInitTableId + 11,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ export const MENU_TYPE_ENUM = {
|
||||
},
|
||||
POINTS: {
|
||||
value: 3,
|
||||
desc: '按钮',
|
||||
desc: '功能点',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
'setting.border.radius': '页面圆角',
|
||||
'setting.page.width': '页面宽度',
|
||||
'setting.bread': '面包屑',
|
||||
'setting.flatPattern': '展开模式',
|
||||
'setting.flatPattern': '菜单展开模式',
|
||||
'setting.pagetag': '标签页',
|
||||
'setting.pagetag.style': '标签页样式',
|
||||
'setting.footer': '页脚',
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
<a-radio-button value="chrome">Chrome</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.flatPattern')">
|
||||
<a-switch @change="changeFlatPattern" v-model:checked="formState.flatPattern" checked-children="单个" un-checked-children="多个" />
|
||||
<a-form-item :label="$t('setting.flatPattern')" v-if="formState.layout === LAYOUT_ENUM.SIDE.value">
|
||||
<a-switch @change="changeFlatPattern" v-model:checked="formState.flatPattern" checked-children="多个" un-checked-children="单个" />
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.pagetag')">
|
||||
<a-switch @change="changePageTagFlag" v-model:checked="formState.pageTagFlag" checked-children="显示" un-checked-children="隐藏" />
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:url="item.meta.frameUrl"
|
||||
/>
|
||||
<!--非iframe使用router-view-->
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name !== e.name)">
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name !== e.name)" style="height: 100%;" class="admin-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="keepAliveIncludes">
|
||||
<component :is="Component" :key="route.name" />
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:url="item.meta.frameUrl"
|
||||
/>
|
||||
<!--非iframe使用router-view-->
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name != e.name)" style="height: 100%;">
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name != e.name)" style="height: 100%;" class="admin-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="keepAliveIncludes">
|
||||
<component :is="Component" :key="route.name" />
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:url="item.meta.frameUrl"
|
||||
/>
|
||||
<!--非iframe使用router-view-->
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name != e.name)">
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name != e.name)" style="height: 100%;" class="admin-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="keepAliveIncludes">
|
||||
<component :is="Component" :key="route.name" />
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
|
||||
<!--非iframe使用router-view-->
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name !== e.name)">
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name !== e.name)" :style="{height: contentBoxHeight+'px'}" class="admin-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="keepAliveIncludes">
|
||||
<component :is="Component" :key="route.name" />
|
||||
@@ -84,6 +84,8 @@
|
||||
const breadCrumbFlag = computed(() => useAppConfigStore().$state.breadCrumbFlag);
|
||||
// 页面宽度
|
||||
const pageWidth = computed(() => useAppConfigStore().$state.pageWidth);
|
||||
|
||||
let contentBoxHeight=ref()
|
||||
// 多余高度
|
||||
const dueHeight = computed(() => {
|
||||
if (fullScreenFlag.value) {
|
||||
@@ -104,6 +106,14 @@
|
||||
return due;
|
||||
});
|
||||
|
||||
watch(() => dueHeight.value, () => {
|
||||
let dom=document.querySelector('.admin-layout-content')
|
||||
contentBoxHeight.value=dom.offsetHeight - 20 - dueHeight.value.split('px')[0]
|
||||
});
|
||||
onMounted(() => {
|
||||
let dom=document.querySelector('.admin-layout-content')
|
||||
contentBoxHeight.value=dom.offsetHeight - 20 - dueHeight.value.split('px')[0]
|
||||
});
|
||||
//页面初始化的时候加载水印
|
||||
onMounted(() => {
|
||||
if (watermarkFlag.value) {
|
||||
|
||||
@@ -20,7 +20,7 @@ const privilege = (value) => {
|
||||
if (!userPointsList) {
|
||||
return false;
|
||||
}
|
||||
return _.some(userPointsList, ['apiPerms', value]);
|
||||
return _.some(userPointsList, ['webPerms', value]);
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
rowKey="goodsId"
|
||||
:scroll="{ x: 1000,y: yHeight }"
|
||||
:scroll="{ x: 1000, y: yHeight }"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:showSorterTooltip="false"
|
||||
@@ -110,8 +110,6 @@
|
||||
@change="onChange"
|
||||
@resizeColumn="handleResizeColumn"
|
||||
>
|
||||
<!-- main.js中有全局表格高度配置,也可单独配置 -->
|
||||
<!-- :scroll="{ y: 300 }" -->
|
||||
<template #headerCell="{ column }">
|
||||
<SmartHeaderCell v-model:value="queryForm[column.filterOptions?.key || column.dataIndex]" :column="column" @change="queryData" />
|
||||
</template>
|
||||
@@ -205,7 +203,6 @@
|
||||
import SmartHeaderCell from '/@/components/support/table-header-cell/index.vue';
|
||||
import { DICT_CODE_ENUM } from '/@/constants/support/dict-const.js';
|
||||
import DictLabel from '/@/components/support/dict-label/index.vue';
|
||||
import { onBeforeMount } from 'vue';
|
||||
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
|
||||
@@ -499,15 +496,31 @@ import { onBeforeMount } from 'vue';
|
||||
return str.replace(/([A-Z])/g, '_$1').toLowerCase();
|
||||
}
|
||||
|
||||
const dueHeight=ref(0)
|
||||
const yHeight=ref(0)
|
||||
// 动态设置表格高度
|
||||
const yHeight = ref(0);
|
||||
onMounted(() => {
|
||||
let doc = document.querySelector('.ant-form');
|
||||
let btn = document.querySelector('.smart-table-btn-block');
|
||||
let tableCell = document.querySelector('.ant-table-cell');
|
||||
let page = document.querySelector('.smart-query-table-page');
|
||||
let box = document.querySelector('.ant-layout-content>div');
|
||||
dueHeight.value = doc.offsetHeight+10+24+btn.offsetHeight+15+tableCell.offsetHeight+page.offsetHeight+20
|
||||
yHeight.value=box.offsetHeight-dueHeight.value
|
||||
resetGetHeight();
|
||||
});
|
||||
function resetGetHeight() {
|
||||
// 搜索部分高度
|
||||
let doc = document.querySelector('.ant-form');
|
||||
// 按钮部分高度
|
||||
let btn = document.querySelector('.smart-table-btn-block');
|
||||
// 表格头高度
|
||||
let tableCell = document.querySelector('.ant-table-cell');
|
||||
// 分页高度
|
||||
let page = document.querySelector('.smart-query-table-page');
|
||||
// 内容区总高度
|
||||
let box = document.querySelector('.admin-content');
|
||||
setTimeout(() => {
|
||||
let dueHeight = doc.offsetHeight + 10 + 24 + btn.offsetHeight + 15 + tableCell.offsetHeight + page.offsetHeight + 20;
|
||||
yHeight.value = box.offsetHeight - dueHeight;
|
||||
}, 100);
|
||||
}
|
||||
window.addEventListener(
|
||||
'resize',
|
||||
_.throttle(() => {
|
||||
resetGetHeight();
|
||||
}, 1000)
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</a-button>
|
||||
</a-button-group>
|
||||
|
||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20">
|
||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20" v-if="$privilege('oa:bank:add')">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -60,8 +60,8 @@
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="addOrUpdate(record)" type="link">编辑</a-button>
|
||||
<a-button @click="confirmDelete(record.bankId)" danger type="link">删除</a-button>
|
||||
<a-button @click="addOrUpdate(record)" type="link" v-if="$privilege('oa:bank:update')">编辑</a-button>
|
||||
<a-button @click="confirmDelete(record.bankId)" danger type="link" v-if="$privilege('oa:bank:delete')">删除</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<a-modal :open="visible" :title="form.bankId ? '编辑' : '添加'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
|
||||
<a-modal :open="visible" :title="form.bankId ? '编辑' : '添加'" :width="700" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 19 }">
|
||||
<a-form-item label="开户银行" name="bankName">
|
||||
<a-input v-model:value="form.bankName" placeholder="请输入开户银行" />
|
||||
</a-form-item>
|
||||
|
||||
@@ -16,50 +16,59 @@
|
||||
<a-button class="button-style" type="primary" @click="onSearch">搜索</a-button>
|
||||
<a-button class="button-style" type="default" @click="resetQueryEmployee">重置</a-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a-button class="button-style" type="primary" @click="addEmployee" v-privilege="'oa:enterprise:addEmployee'"> 添加员工 </a-button>
|
||||
<a-button class="button-style" type="primary" danger @click="batchDelete" v-privilege="'oa:enterprise:deleteEmployee'"> 批量移除 </a-button>
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
:loading="tableLoading"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
:pagination="false"
|
||||
rowKey="employeeId"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
size="small"
|
||||
bordered
|
||||
>
|
||||
<template #bodyCell="{ text, record, index, column }">
|
||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||
<a-tag :color="text ? 'error' : 'processing'">{{ text ? '禁用' : '启用' }}</a-tag>
|
||||
<a-card size="small" :bordered="false" :hoverable="false">
|
||||
<a-row justify="end">
|
||||
<TableOperator
|
||||
class="smart-margin-bottom5"
|
||||
v-model="columns"
|
||||
:tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_EMPLOYEE"
|
||||
:refresh="queryEmployee"
|
||||
/>
|
||||
</a-row>
|
||||
<a-table
|
||||
:loading="tableLoading"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
:pagination="false"
|
||||
rowKey="employeeId"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
size="small"
|
||||
bordered
|
||||
>
|
||||
<template #bodyCell="{ text, record, column }">
|
||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||
<a-tag :color="text ? 'error' : 'processing'">{{ text ? '禁用' : '启用' }}</a-tag>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'gender'">
|
||||
<span>{{ $smartEnumPlugin.getDescByValue('GENDER_ENUM', text) }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operate'">
|
||||
<a-button type="link" @click="deleteEmployee(record.employeeId)" v-privilege="'oa:enterprise:deleteEmployee'">移除</a-button>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'gender'">
|
||||
<span>{{ $smartEnumPlugin.getDescByValue('GENDER_ENUM', text) }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operate'">
|
||||
<a @click="deleteEmployee(record.employeeId)" v-privilege="'oa:enterprise:deleteEmployee'">移除</a>
|
||||
</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="queryEmployee"
|
||||
@showSizeChange="queryEmployee"
|
||||
:show-total="showTableTotal"
|
||||
/>
|
||||
</div>
|
||||
<EmployeeTableSelectModal ref="selectEmployeeModal" @selectData="selectData" />
|
||||
</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="queryEmployee"
|
||||
@showSizeChange="queryEmployee"
|
||||
:show-total="showTableTotal"
|
||||
/>
|
||||
</div>
|
||||
<EmployeeTableSelectModal ref="selectEmployeeModal" @selectData="selectData" />
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@@ -72,6 +81,8 @@
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, showTableTotal } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
|
||||
const props = defineProps({
|
||||
enterpriseId: {
|
||||
@@ -112,7 +123,8 @@
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operate',
|
||||
width: 60,
|
||||
width: 90,
|
||||
align: 'center',
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -271,7 +283,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 20px 0;
|
||||
padding: 10px 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.button-style {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</a-button>
|
||||
</a-button-group>
|
||||
|
||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20">
|
||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20" v-if="$privilege('oa:invoice:add')">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -51,14 +51,14 @@
|
||||
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_INVOICE" :refresh="ajaxQuery" />
|
||||
</a-row>
|
||||
<a-table :scroll="{ x: 1300 }" size="small" :dataSource="tableData" :columns="columns" rowKey="invoiceId" :pagination="false" bordered>
|
||||
<template #bodyCell="{ text, record, index, column }">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||
{{ record.disabledFlag ? '禁用' : '启用' }}
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="addOrUpdate(record)" type="link">编辑</a-button>
|
||||
<a-button @click="confirmDelete(record.invoiceId)" type="link" danger>删除</a-button>
|
||||
<a-button @click="addOrUpdate(record)" type="link" v-if="$privilege('oa:invoice:update')">编辑</a-button>
|
||||
<a-button @click="confirmDelete(record.invoiceId)" type="link" danger v-if="$privilege('oa:invoice:delete')">删除</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<a-modal :open="visible" :title="form.invoiceId ? '编辑' : '添加'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
|
||||
<a-modal :open="visible" :title="form.invoiceId ? '编辑' : '添加'" :width="700" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 19 }">
|
||||
<a-form-item label="开票抬头" name="invoiceHeads">
|
||||
<a-input v-model:value="form.invoiceHeads" placeholder="请输入开票抬头" />
|
||||
</a-form-item>
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<a-modal :open="visible" title="添加" :width="700" forceRender ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 6 }">
|
||||
<a-modal
|
||||
:open="visible"
|
||||
:title="form.enterpriseId ? '编辑' : '添加'"
|
||||
:width="700"
|
||||
forceRender
|
||||
ok-text="确认"
|
||||
cancel-text="取消"
|
||||
@ok="onSubmit"
|
||||
@cancel="onClose"
|
||||
>
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
|
||||
<a-form-item label="企业名称" name="enterpriseName">
|
||||
<a-input v-model:value="form.enterpriseName" placeholder="请输入企业名称" />
|
||||
</a-form-item>
|
||||
|
||||
@@ -30,15 +30,19 @@
|
||||
</div>
|
||||
</a-page-header>
|
||||
</div>
|
||||
<a-card class="smart-margin-top10" size="small">
|
||||
<a-card
|
||||
class="smart-margin-top10"
|
||||
size="small"
|
||||
v-if="$privilege('oa:enterprise:queryEmployee') || $privilege('oa:bank:query') || $privilege('oa:invoice:query')"
|
||||
>
|
||||
<a-tabs>
|
||||
<a-tab-pane key="employee" tab="员工信息">
|
||||
<a-tab-pane key="employee" tab="员工信息" v-if="$privilege('oa:enterprise:queryEmployee')">
|
||||
<EmployeeList :enterpriseId="enterpriseId" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="bank" tab="银行信息">
|
||||
<a-tab-pane key="bank" tab="银行信息" v-if="$privilege('oa:bank:query')">
|
||||
<BankList :enterpriseId="enterpriseId" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="invoice" tab="发票信息">
|
||||
<a-tab-pane key="invoice" tab="发票信息" v-if="$privilege('oa:invoice:query')">
|
||||
<InvoiceList :enterpriseId="enterpriseId" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="dataTracer" tab="变更记录">
|
||||
|
||||
@@ -75,7 +75,9 @@
|
||||
{{ text ? '禁用' : '启用' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'enterpriseName'">
|
||||
<a @click="detail(record.enterpriseId)">{{ record.enterpriseName }}</a>
|
||||
<a-button type="link" @click="detail(record.enterpriseId)" :disabled="!$privilege('oa:enterprise:detail')">
|
||||
{{ record.enterpriseName }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'type'">
|
||||
<span>{{ $smartEnumPlugin.getDescByValue('ENTERPRISE_TYPE_ENUM', text) }}</span>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<a-table
|
||||
size="small"
|
||||
:scroll="{ x: 1000 }"
|
||||
:scroll="{ y: 800 }"
|
||||
:loading="tableLoading"
|
||||
bordered
|
||||
:dataSource="tableData"
|
||||
|
||||
@@ -178,8 +178,8 @@
|
||||
chosenClass: 'smart-ghost-class', //设置选中样式类名
|
||||
handle: '.handle',
|
||||
onEnd: ({ oldIndex, newIndex }) => {
|
||||
const oldRow = tableData.value.splice(oldIndex, 1)[0];
|
||||
tableData.value.splice(newIndex, 0, oldRow);
|
||||
const oldRow = tableData.value.splice(oldIndex - 1, 1)[0];
|
||||
tableData.value.splice(newIndex - 1, 0, oldRow);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
-->
|
||||
<template>
|
||||
<a-modal :open="visible" :title="form.dictDataId ? '编辑字典值' : '添加字典值'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<br/>
|
||||
<br />
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }">
|
||||
<a-form-item label="字典项名称" name="dataLabel">
|
||||
<a-input v-model:value="form.dataLabel" placeholder="请输入 字典项名称" />
|
||||
@@ -21,7 +21,7 @@
|
||||
<a-input-number style="width: 100%" v-model:value="form.sortOrder" :min="0" :max="1000" />
|
||||
</a-form-item>
|
||||
<a-form-item label="备注" name="remark">
|
||||
<textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none"></textarea>
|
||||
<a-textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
@@ -33,14 +33,20 @@
|
||||
|
||||
<a-row class="smart-table-btn-block">
|
||||
<div class="smart-table-operate-block">
|
||||
<a-button @click="addOrUpdateData" type="primary">
|
||||
<a-button @click="addOrUpdateData" type="primary" v-privilege="'support:dictData:add'">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
新建
|
||||
</a-button>
|
||||
|
||||
<a-button @click="confirmBatchDelete" type="primary" danger :disabled="selectedRowKeyList.length === 0">
|
||||
<a-button
|
||||
@click="confirmBatchDelete"
|
||||
type="primary"
|
||||
danger
|
||||
:disabled="selectedRowKeyList.length === 0"
|
||||
v-privilege="'support:dictData:delete'"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
</template>
|
||||
@@ -69,7 +75,7 @@
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<a-button @click="addOrUpdateData(record)" type="link">编辑</a-button>
|
||||
<a-button @click="addOrUpdateData(record)" type="link" v-privilege="'support:dictData:update'">编辑</a-button>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
-->
|
||||
<template>
|
||||
<a-modal :open="visible" :title="form.dictId ? '编辑字典' : '添加字典'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<br/>
|
||||
<br />
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }">
|
||||
<a-form-item label="字典编码" name="dictCode">
|
||||
<a-input v-model:value="form.dictCode" placeholder="请输入编码" />
|
||||
@@ -19,7 +19,7 @@
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="备注" name="remark">
|
||||
<textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none"></textarea>
|
||||
<a-textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
@@ -45,13 +45,7 @@
|
||||
新建
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
@click="confirmBatchDelete"
|
||||
v-privilege="'support:dict:batchDelete'"
|
||||
type="primary"
|
||||
danger
|
||||
:disabled="selectedRowKeyList.length === 0"
|
||||
>
|
||||
<a-button @click="confirmBatchDelete" v-privilege="'support:dict:delete'" type="primary" danger :disabled="selectedRowKeyList.length === 0">
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
</template>
|
||||
@@ -87,7 +81,7 @@
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="addOrUpdateDict(record)" v-privilege="'support:dict:edit'" type="link">编辑</a-button>
|
||||
<a-button @click="addOrUpdateDict(record)" v-privilege="'support:dict:update'" type="link">编辑</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<a-modal v-model:open="visible" title="推送人" width="1100px" ok-text="确定" cancel-text="取消" @ok="onSubmit" @cancel="onClose" :zIndex="9999">
|
||||
<a-form class="smart-query-form">
|
||||
<a-row class="smart-query-form-row">
|
||||
<a-form-item label="关键词搜索" class="smart-query-form-item">
|
||||
<a-input v-model:value="queryParam.searchWord" :style="{ width: '250px' }" placeholder="请输入姓名" @change="selectSearchWord" />
|
||||
</a-form-item>
|
||||
<a-form-item class="smart-query-form-item">
|
||||
<a-button type="primary" @click="searchQuery">
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
查询
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
<a-form-item class="smart-query-form-item">
|
||||
<a-button @click="searchReset">
|
||||
<template #icon>
|
||||
<ReloadOutlined />
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-table
|
||||
rowKey="employeeId"
|
||||
:loading="tableLoading"
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKeyList,
|
||||
onChange: onSelectChange,
|
||||
}"
|
||||
>
|
||||
</a-table>
|
||||
<div class="smart-query-table-page">
|
||||
<a-pagination
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
show-less-items
|
||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||
:defaultPageSize="queryParam.pageSize"
|
||||
v-model:current="queryParam.pageNum"
|
||||
v-model:pageSize="queryParam.pageSize"
|
||||
:total="total"
|
||||
@change="queryList"
|
||||
@showSizeChange="queryList"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
/>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/src/lib/smart-sentry';
|
||||
import { SmartLoading } from '/src/components/framework/smart-loading';
|
||||
import SmartEnumSelect from '/src/components/framework/smart-enum-select/index.vue';
|
||||
import { employeeApi } from '/@/api/system/employee-api';
|
||||
// ---------------查询条件----------------
|
||||
const queryParamState = {
|
||||
searchWord: null,
|
||||
keyword: null,
|
||||
pageNum: 1,
|
||||
pageSize: PAGE_SIZE,
|
||||
};
|
||||
|
||||
const classId = ref();
|
||||
const queryParam = reactive({ ...queryParamState });
|
||||
const tableData = ref([]);
|
||||
let tableLoading = ref(false);
|
||||
const total = ref(0);
|
||||
|
||||
// 搜索
|
||||
function searchQuery() {
|
||||
queryList();
|
||||
}
|
||||
|
||||
// 弹窗打开
|
||||
const visible = ref(false);
|
||||
// 重置
|
||||
function searchReset() {
|
||||
Object.assign(queryParam, queryParamState);
|
||||
queryList();
|
||||
}
|
||||
function showModal(receiverIdList) {
|
||||
selectedRowKeyList.value = receiverIdList;
|
||||
queryList();
|
||||
visible.value = true;
|
||||
}
|
||||
function selectSearchWord(e) {
|
||||
queryParam.keyword = queryParam.searchWord;
|
||||
}
|
||||
const columns = [
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'actualName',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
dataIndex: 'phone',
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
// ----------查询------------
|
||||
async function queryList() {
|
||||
try {
|
||||
tableLoading.value = true;
|
||||
let res = await employeeApi.queryEmployee(queryParam);
|
||||
const list = res.data.list;
|
||||
total.value = res.data.total;
|
||||
tableData.value = list;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 选择成绩表
|
||||
const selectedRowKeyList = ref([]);
|
||||
const selectedRowsList = ref([]);
|
||||
function onSelectChange(keyArray, selectedRows) {
|
||||
selectedRowKeyList.value = keyArray;
|
||||
selectedRowsList.value = selectedRows;
|
||||
}
|
||||
|
||||
// 弹窗管理
|
||||
function onClose() {
|
||||
visible.value = false;
|
||||
let nameList = selectedRowsList.value.map((item) => item.actualName);
|
||||
emit('reloadList', selectedRowKeyList.value, nameList);
|
||||
}
|
||||
const emit = defineEmits(['reloadList']);
|
||||
|
||||
// 提交
|
||||
function onSubmit() {
|
||||
try {
|
||||
onClose();
|
||||
} catch (error) {
|
||||
smartSentry.captureError(error);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<a-modal title="添加" :width="700" :open="visibleFlag" @cancel="onClose" :maskClosable="false" :destroyOnClose="true">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }">
|
||||
<a-form-item label="标题" name="title">
|
||||
<a-input style="width: 100%" v-model:value="form.title" placeholder="标题" />
|
||||
</a-form-item>
|
||||
<a-form-item label="接收人" name="receiverUserIdList">
|
||||
<a-button @click="selectReceiver" type="primary"> 选择接收人 </a-button>
|
||||
<div>{{ nameListString }}</div>
|
||||
</a-form-item>
|
||||
<a-form-item label="消息类型" name="messageType">
|
||||
<SmartEnumSelect width="100%" v-model:value="form.messageType" placeholder="请选择类型" enum-name="MESSAGE_TYPE_ENUM" />
|
||||
</a-form-item>
|
||||
<a-form-item label="推送内容" name="content">
|
||||
<a-textarea style="width: 100%" v-model:value="form.content" placeholder="推送内容" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button @click="onClose">取消</a-button>
|
||||
<a-button type="primary" @click="onSubmit">保存</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-modal>
|
||||
<MessageReceiverModal ref="receiverModalRef" @reloadList="addReceiverIdList" />
|
||||
</template>
|
||||
<script setup>
|
||||
import { nextTick, reactive, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/src/components/framework/smart-loading';
|
||||
import { smartSentry } from '/src/lib/smart-sentry';
|
||||
import SmartEnumSelect from '/src/components/framework/smart-enum-select/index.vue';
|
||||
import MessageReceiverModal from './message-receiver-modal.vue';
|
||||
import { USER_TYPE_ENUM } from '/src/constants/common-const.js';
|
||||
import { messageApi } from '/@/api/support/message-api.js';
|
||||
// ------------------------ 事件 ------------------------
|
||||
|
||||
const emits = defineEmits(['reloadList']);
|
||||
|
||||
// ------------------------ 显示与隐藏 ------------------------
|
||||
// 是否显示
|
||||
const visibleFlag = ref(false);
|
||||
|
||||
function show(rowData) {
|
||||
Object.assign(form, formDefault);
|
||||
nameListString.value = null;
|
||||
visibleFlag.value = true;
|
||||
nextTick(() => {
|
||||
formRef.value.clearValidate();
|
||||
});
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
Object.assign(form, formDefault);
|
||||
visibleFlag.value = false;
|
||||
}
|
||||
|
||||
// ------------------------ 表单 ------------------------
|
||||
|
||||
// 组件ref
|
||||
const formRef = ref();
|
||||
|
||||
const formDefault = {
|
||||
title: undefined,
|
||||
receiverUserIdList: null,
|
||||
content: null,
|
||||
messageType: null,
|
||||
receiverUserType: USER_TYPE_ENUM.ADMIN_EMPLOYEE.value,
|
||||
};
|
||||
|
||||
let form = reactive({ ...formDefault });
|
||||
|
||||
const rules = {
|
||||
title: [{ required: true, message: '标题 必填' }],
|
||||
content: [{ required: true, message: '推送内容 必填' }],
|
||||
receiverUserIdList: [{ required: true, message: '推送人 必填' }],
|
||||
messageType: [{ required: true, message: '消息类型 必填' }],
|
||||
};
|
||||
|
||||
const nameListString = ref();
|
||||
function addReceiverIdList(idList, nameList) {
|
||||
form.receiverUserIdList = idList;
|
||||
nameListString.value = nameList.join(',');
|
||||
}
|
||||
|
||||
const receiverModalRef = ref();
|
||||
function selectReceiver() {
|
||||
receiverModalRef.value.showModal(form.receiverUserIdList);
|
||||
}
|
||||
|
||||
// 点击确定,验证表单
|
||||
async function onSubmit() {
|
||||
try {
|
||||
await formRef.value.validateFields();
|
||||
save();
|
||||
} catch (err) {
|
||||
message.error('参数验证错误,请仔细填写表单数据!');
|
||||
}
|
||||
}
|
||||
|
||||
// 新建、编辑API
|
||||
async function save() {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
let messageList = [];
|
||||
for (const userId of form.receiverUserIdList) {
|
||||
messageList.push({
|
||||
title: form.title,
|
||||
receiverUserId: userId,
|
||||
content: form.content,
|
||||
messageType: form.messageType,
|
||||
receiverUserType: USER_TYPE_ENUM.ADMIN_EMPLOYEE.value,
|
||||
});
|
||||
}
|
||||
await messageApi.sendMessages(messageList);
|
||||
message.success('操作成功');
|
||||
emits('reloadList');
|
||||
onClose();
|
||||
} catch (err) {
|
||||
smartSentry.captureError(err);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<!---------- 查询表单form begin ----------->
|
||||
<a-form class="smart-query-form">
|
||||
<a-row class="smart-query-form-row">
|
||||
<a-form-item label="关键词" class="smart-query-form-item">
|
||||
<a-input style="width: 150px" v-model:value="queryForm.searchWord" placeholder="关键词" />
|
||||
</a-form-item>
|
||||
<a-form-item label="类型" class="smart-query-form-item">
|
||||
<smart-enum-select style="width: 150px" v-model:value="queryForm.messageType" placeholder="消息类型" enum-name="MESSAGE_TYPE_ENUM" />
|
||||
</a-form-item>
|
||||
<a-form-item label="是否已读" class="smart-query-form-item">
|
||||
<SmartEnumSelect width="120px" enum-name="FLAG_NUMBER_ENUM" v-model:value="queryForm.readFlag" />
|
||||
</a-form-item>
|
||||
<a-form-item label="创建时间" class="smart-query-form-item">
|
||||
<a-range-picker v-model:value="queryForm.createTime" style="width: 200px" @change="onChangeCreateTime" />
|
||||
</a-form-item>
|
||||
<a-form-item class="smart-query-form-item">
|
||||
<a-button type="primary" @click="searchQuery">
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button @click="resetQuery" class="smart-margin-left10">
|
||||
<template #icon>
|
||||
<ReloadOutlined />
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<!---------- 查询表单form end ----------->
|
||||
|
||||
<a-card size="small" :bordered="false" :hoverable="true">
|
||||
<!---------- 表格操作行 begin ----------->
|
||||
<a-row class="smart-table-btn-block">
|
||||
<div class="smart-table-operate-block">
|
||||
<a-button @click="showForm" type="primary">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
发送消息
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="smart-table-setting-block">
|
||||
<TableOperator v-model="columns" :tableId="TABLE_ID_CONST.SUPPORT.MAIL" :refresh="queryData" />
|
||||
</div>
|
||||
</a-row>
|
||||
<!---------- 表格操作行 end ----------->
|
||||
|
||||
<!---------- 表格 begin ----------->
|
||||
<a-table size="small" :dataSource="tableData" :columns="columns" rowKey="telephoneId" bordered :loading="tableLoading" :pagination="false">
|
||||
<template #bodyCell="{ record, column, text }">
|
||||
<template v-if="column.dataIndex === 'readFlag'">
|
||||
{{ text ? '已读' : '未读' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'messageType'">
|
||||
{{ $smartEnumPlugin.getDescByValue('MESSAGE_TYPE_ENUM', text) }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="onDelete(record)" danger type="link">删除</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
<!---------- 表格 end ----------->
|
||||
|
||||
<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="queryData"
|
||||
@showSizeChange="queryData"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<MessageSendForm ref="formRef" @reloadList="queryData" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { messageApi } from '/@/api/support/message-api';
|
||||
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import MessageSendForm from './components/message-send-form.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: '消息类型',
|
||||
dataIndex: 'messageType',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '消息标题',
|
||||
dataIndex: 'title',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '消息内容',
|
||||
dataIndex: 'content',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '接收人ID',
|
||||
dataIndex: 'receiverUserId',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '已读',
|
||||
dataIndex: 'readFlag',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: '已读时间',
|
||||
dataIndex: 'readTime',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
fixed: 'right',
|
||||
width: 60,
|
||||
},
|
||||
]);
|
||||
|
||||
// ---------------------------- 查询数据表单和方法 ----------------------------
|
||||
|
||||
const queryFormState = {
|
||||
searchWord: undefined, //关键词
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
createTime: [],
|
||||
readFlag: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
messageType: null,
|
||||
};
|
||||
function onChangeCreateTime(dates, dateStrings) {
|
||||
queryForm.startDate = dateStrings[0];
|
||||
queryForm.endDate = dateStrings[1];
|
||||
}
|
||||
// 查询表单form
|
||||
const queryForm = reactive({ ...queryFormState });
|
||||
// 表格加载loading
|
||||
const tableLoading = ref(false);
|
||||
// 表格数据
|
||||
const tableData = ref([]);
|
||||
// 总数
|
||||
const total = ref(0);
|
||||
|
||||
// 重置查询条件
|
||||
function resetQuery() {
|
||||
let pageSize = queryForm.pageSize;
|
||||
Object.assign(queryForm, queryFormState);
|
||||
queryForm.pageSize = pageSize;
|
||||
queryData();
|
||||
}
|
||||
|
||||
function searchQuery() {
|
||||
queryForm.pageNum = 1;
|
||||
queryData();
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
async function queryData() {
|
||||
tableLoading.value = true;
|
||||
try {
|
||||
let queryResult = await messageApi.queryAdminMessage(queryForm);
|
||||
tableData.value = queryResult.data.list;
|
||||
total.value = queryResult.data.total;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(queryData);
|
||||
|
||||
// ---------------------------- 添加/修改 ----------------------------
|
||||
const formRef = ref();
|
||||
|
||||
function showForm(data) {
|
||||
formRef.value.show(data);
|
||||
}
|
||||
|
||||
//确认删除
|
||||
function onDelete(data) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要删除选吗?',
|
||||
okText: '删除',
|
||||
okType: 'danger',
|
||||
onOk() {
|
||||
requestDelete(data);
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {},
|
||||
});
|
||||
}
|
||||
|
||||
async function requestDelete(data) {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
await messageApi.deleteMessage(data.messageId);
|
||||
message.success('删除成功');
|
||||
queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -15,8 +15,9 @@
|
||||
:open="visible"
|
||||
:width="600"
|
||||
@close="onClose"
|
||||
destroyOnClose
|
||||
>
|
||||
<a-form ref="formRef" :labelCol="{ span: labelColSpan }" :labelWrap="true" :model="form" :rules="rules">
|
||||
<a-form ref="formRef" :labelCol="{ span: 5 }" :labelWrap="true" :model="form" :rules="rules">
|
||||
<a-form-item label="菜单类型" name="menuType">
|
||||
<a-radio-group v-model:value="form.menuType" button-style="solid">
|
||||
<a-radio-button v-for="item in MENU_TYPE_ENUM" :key="item.value" :value="item.value">
|
||||
@@ -61,11 +62,17 @@
|
||||
<a-switch v-model:checked="form.visibleFlag" checked-children="显示" un-checked-children="不显示" />
|
||||
</a-form-item>
|
||||
<a-form-item label="禁用状态" name="disabledFlag">
|
||||
<a-switch v-model:checked="form.disabledFlag" :checkedValue="false" :unCheckedValue="true" checked-children="启用" un-checked-children="禁用" />
|
||||
<a-switch
|
||||
v-model:checked="form.disabledFlag"
|
||||
:checkedValue="false"
|
||||
:unCheckedValue="true"
|
||||
checked-children="启用"
|
||||
un-checked-children="禁用"
|
||||
/>
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- 目录 菜单 end -->
|
||||
<!-- 按钮 start -->
|
||||
<!-- 功能点 start -->
|
||||
<template v-if="form.menuType === MENU_TYPE_ENUM.POINTS.value">
|
||||
<a-form-item label="功能点名称" name="menuName">
|
||||
<a-input v-model:value="form.menuName" placeholder="请输入功能点名称" />
|
||||
@@ -74,7 +81,13 @@
|
||||
<MenuTreeSelect ref="contextMenuTreeSelect" v-model:value="form.contextMenuId" />
|
||||
</a-form-item>
|
||||
<a-form-item label="功能点状态" name="funcDisabledFlag">
|
||||
<a-switch v-model:checked="form.disabledFlag" :checkedValue="false" :unCheckedValue="true" checked-children="启用" un-checked-children="禁用" />
|
||||
<a-switch
|
||||
v-model:checked="form.disabledFlag"
|
||||
:checkedValue="false"
|
||||
:unCheckedValue="true"
|
||||
checked-children="启用"
|
||||
un-checked-children="禁用"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="权限类型" name="permsType">
|
||||
<a-radio-group v-model:value="form.permsType">
|
||||
@@ -90,7 +103,7 @@
|
||||
<a-input v-model:value="form.apiPerms" placeholder="请输入后端权限" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- 按钮 end -->
|
||||
<!-- 功能点 end -->
|
||||
<a-form-item label="排序" name="sort" help="值越小越靠前">
|
||||
<a-input-number v-model:value="form.sort" :min="0" placeholder="请输入排序" style="width: 100px" />
|
||||
</a-form-item>
|
||||
@@ -105,7 +118,7 @@
|
||||
<script setup>
|
||||
import { message } from 'ant-design-vue';
|
||||
import _ from 'lodash';
|
||||
import { computed, nextTick, reactive, ref } from 'vue';
|
||||
import { nextTick, reactive, ref } from 'vue';
|
||||
import MenuTreeSelect from './menu-tree-select.vue';
|
||||
import { menuApi } from '/@/api/system/menu-api';
|
||||
import IconSelect from '/@/components/framework/icon-select/index.vue';
|
||||
@@ -122,13 +135,6 @@
|
||||
// 是否展示抽屉
|
||||
const visible = ref(false);
|
||||
|
||||
const labelColSpan = computed(() => {
|
||||
if (form.menuType === MENU_TYPE_ENUM.POINTS.value) {
|
||||
return 6;
|
||||
}
|
||||
return 4;
|
||||
});
|
||||
|
||||
const contextMenuTreeSelect = ref();
|
||||
const parentMenuTreeSelect = ref();
|
||||
|
||||
@@ -178,7 +184,7 @@
|
||||
apiPerms: undefined,
|
||||
sort: undefined,
|
||||
visibleFlag: true,
|
||||
cacheFlag: true,
|
||||
cacheFlag: false,
|
||||
component: undefined,
|
||||
contextMenuId: undefined,
|
||||
disabledFlag: false,
|
||||
@@ -196,6 +202,9 @@
|
||||
formRef.value.resetFields();
|
||||
form.menuType = menuType;
|
||||
form.parentId = parentId;
|
||||
if (form.menuType === MENU_TYPE_ENUM.POINTS.value) {
|
||||
form.contextMenuId = parentId;
|
||||
}
|
||||
// 移除最后一个:后面的内容
|
||||
if (webPerms && webPerms.lastIndexOf(':')) {
|
||||
form.webPerms = webPerms.substring(0, webPerms.lastIndexOf(':') + 1);
|
||||
|
||||
@@ -13,12 +13,13 @@ export const columns = ref([
|
||||
title: '名称',
|
||||
dataIndex: 'menuName',
|
||||
key: 'ID',
|
||||
width: 200,
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'menuType',
|
||||
width: 80,
|
||||
width: 100,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: '图标',
|
||||
@@ -53,6 +54,7 @@ export const columns = ref([
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operate',
|
||||
width: 100,
|
||||
width: 170,
|
||||
align: "center"
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<a-table
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
size="small"
|
||||
:scroll="{ x: 1000 }"
|
||||
:scroll="{ y: 800 }"
|
||||
:defaultExpandAllRows="true"
|
||||
:dataSource="tableData"
|
||||
bordered
|
||||
@@ -132,6 +132,15 @@
|
||||
|
||||
<template v-if="column.dataIndex === 'operate'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button
|
||||
v-if="record.menuType !== MENU_TYPE_ENUM.POINTS.value"
|
||||
v-privilege="'system:menu:update'"
|
||||
type="link"
|
||||
size="small"
|
||||
@click="showAddSub(record)"
|
||||
>
|
||||
添加下级
|
||||
</a-button>
|
||||
<a-button v-privilege="'system:menu:update'" type="link" size="small" @click="showDrawer(record)">编辑</a-button>
|
||||
<a-button v-privilege="'system:menu:batchDelete'" danger type="link" @click="singleDelete(record)">删除</a-button>
|
||||
</div>
|
||||
@@ -157,6 +166,7 @@
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
import { MENU_TYPE_ENUM } from '/@/constants/system/menu-const';
|
||||
|
||||
// ------------------------ 表格渲染 ------------------------
|
||||
const menuTypeColorArray = ['red', 'blue', 'orange', 'green'];
|
||||
@@ -256,4 +266,13 @@
|
||||
function showDrawer(rowData) {
|
||||
menuOperateModal.value.showDrawer(rowData);
|
||||
}
|
||||
|
||||
function showAddSub(rowData) {
|
||||
const subData = {
|
||||
parentId: rowData.menuId,
|
||||
menuType: rowData.menuType === MENU_TYPE_ENUM.CATALOG.value ? MENU_TYPE_ENUM.MENU.value : MENU_TYPE_ENUM.POINTS.value,
|
||||
contextMenuId: rowData.menuType === MENU_TYPE_ENUM.MENU.value ? rowData.menuId : undefined,
|
||||
};
|
||||
menuOperateModal.value.showDrawer(subData);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -91,9 +91,6 @@
|
||||
return text;
|
||||
}
|
||||
}
|
||||
window.addEventListener('resize',_.throttle(()=>{
|
||||
window.location.reload()
|
||||
},1000));
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
:deep(.ant-table-column-sorters) {
|
||||
|
||||
@@ -13,4 +13,19 @@ export const messageApi = {
|
||||
updateReadFlag: (messageId) => {
|
||||
return getRequest(`/support/message/read/${messageId}`);
|
||||
},
|
||||
|
||||
//通知消息-分页查询 @author 卓大
|
||||
queryAdminMessage: (param) => {
|
||||
return postRequest('/message/query', param);
|
||||
},
|
||||
|
||||
//通知消息-新建 @author 卓大
|
||||
sendMessages: (param) => {
|
||||
return postRequest('/message/sendMessages', param);
|
||||
},
|
||||
|
||||
//通知消息-删除 @author 卓大
|
||||
deleteMessage: (messageId) => {
|
||||
return getRequest(`/message/delete/${messageId}`);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -61,11 +61,6 @@
|
||||
type: Number,
|
||||
require: true,
|
||||
},
|
||||
//如果开启表格scroll,需要传递 scroll标识,由于main.js中设置的全局默认的表格高度,所以scroll默认值设置为true
|
||||
scroll: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
@@ -79,7 +74,13 @@
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(value) => {
|
||||
newColumn = value;
|
||||
newColumn.forEach(item=>{
|
||||
value.forEach(itemNewColumns=>{
|
||||
if(item.dataIndex==itemNewColumns.dataIndex){
|
||||
Object.assign(item,itemNewColumns)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
@@ -179,7 +180,7 @@
|
||||
|
||||
const smartTableColumnModal = ref();
|
||||
function showModal() {
|
||||
smartTableColumnModal.value.show(newColumn, props.tableId,props.scroll);
|
||||
smartTableColumnModal.value.show(newColumn, props.tableId);
|
||||
}
|
||||
|
||||
// 将弹窗修改的列数据,赋值给原表格 列数组
|
||||
@@ -193,6 +194,13 @@
|
||||
obj = mergeColumn(_.cloneDeep(newColumn), changeColumnArray);
|
||||
}
|
||||
const newColumns = obj.newColumns;
|
||||
newColumn.forEach(item=>{
|
||||
obj.newColumns.forEach(itemNewColumns=>{
|
||||
if(item.dataIndex==itemNewColumns.dataIndex){
|
||||
Object.assign(item,itemNewColumns)
|
||||
}
|
||||
})
|
||||
})
|
||||
emit(
|
||||
'update:modelValue',
|
||||
newColumns.filter((e) => e.showFlag)
|
||||
|
||||
@@ -93,11 +93,9 @@
|
||||
// ---------------- 显示 / 隐藏 --------------------
|
||||
let tableId = null;
|
||||
const visible = ref(false);
|
||||
const scroll = ref(true);
|
||||
//显示
|
||||
function show(columns, showTableId,scrollFlag) {
|
||||
function show(columns, showTableId) {
|
||||
tableId = showTableId;
|
||||
scroll.value = scrollFlag;
|
||||
visible.value = true;
|
||||
getUserTableColumns(tableId, _.cloneDeep(columns));
|
||||
}
|
||||
@@ -183,12 +181,7 @@
|
||||
if (newIndex === oldIndex) {
|
||||
return;
|
||||
}
|
||||
// 如果表格开启scroll会多一个虚拟列,所以要减1
|
||||
if(scroll.value){
|
||||
moveTableData(oldIndex-1, newIndex-1);
|
||||
}else{
|
||||
moveTableData(oldIndex, newIndex);
|
||||
}
|
||||
moveTableData(oldIndex, newIndex);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export const appDefaultConfig: AppConfig = {
|
||||
pageWidth: '99%',
|
||||
// 圆角
|
||||
borderRadius: 6,
|
||||
// 展开模式
|
||||
// 菜单展开模式
|
||||
flatPattern: true,
|
||||
// 标签页
|
||||
pageTagFlag: true,
|
||||
|
||||
@@ -40,7 +40,7 @@ export const TABLE_ID_CONST = {
|
||||
SYSTEM: {
|
||||
EMPLOYEE: systemInitTableId + 1, //员工
|
||||
MENU: systemInitTableId + 2, //菜单
|
||||
POSITION:systemInitTableId + 3, //职位
|
||||
POSITION: systemInitTableId + 3, //职位
|
||||
},
|
||||
/**
|
||||
* 支撑
|
||||
@@ -56,5 +56,6 @@ export const TABLE_ID_CONST = {
|
||||
HELP_DOC: supportInitTableId + 8, //帮助文档
|
||||
JOB: supportInitTableId + 9, //Job
|
||||
JOB_LOG: supportInitTableId + 10, //JobLog
|
||||
MAIL: supportInitTableId + 11,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ export const MENU_TYPE_ENUM: SmartEnum<number> = {
|
||||
},
|
||||
POINTS: {
|
||||
value: 3,
|
||||
desc: '按钮',
|
||||
desc: '功能点',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
'setting.border.radius': '页面圆角',
|
||||
'setting.page.width': '页面宽度',
|
||||
'setting.bread': '面包屑',
|
||||
'setting.flatPattern': '展开模式',
|
||||
'setting.flatPattern': '菜单展开模式',
|
||||
'setting.pagetag': '标签页',
|
||||
'setting.pagetag.style': '标签页样式',
|
||||
'setting.footer': '页脚',
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
<a-radio-button value="chrome">Chrome</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.flatPattern')">
|
||||
<a-switch @change="changeFlatPattern" v-model:checked="formState.flatPattern" checked-children="单个" un-checked-children="多个" />
|
||||
<a-form-item :label="$t('setting.flatPattern')" v-if="formState.layout === LAYOUT_ENUM.SIDE.value">
|
||||
<a-switch @change="changeFlatPattern" v-model:checked="formState.flatPattern" checked-children="多个" un-checked-children="单个" />
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.pagetag')">
|
||||
<a-switch @change="changePageTagFlag" v-model:checked="formState.pageTagFlag" checked-children="显示" un-checked-children="隐藏" />
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:url="item.meta.frameUrl"
|
||||
/>
|
||||
<!--非iframe使用router-view-->
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name !== e.name)">
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name !== e.name)" style="height: 100%;" class="admin-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="keepAliveIncludes">
|
||||
<component :is="Component" :key="route.name" />
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:url="item.meta.frameUrl"
|
||||
/>
|
||||
<!--非iframe使用router-view-->
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name != e.name)" style="height: 100%;">
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name != e.name)" style="height: 100%;" class="admin-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="keepAliveIncludes">
|
||||
<component :is="Component" :key="route.name" />
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:url="item.meta.frameUrl"
|
||||
/>
|
||||
<!--非iframe使用router-view-->
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name != e.name)">
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name != e.name)" style="height: 100%;" class="admin-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="keepAliveIncludes">
|
||||
<component :is="Component" :key="route.name" />
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
|
||||
<!--非iframe使用router-view-->
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name !== e.name)">
|
||||
<div v-show="!iframeNotKeepAlivePageFlag && keepAliveIframePages.every((e) => route.name !== e.name)" :style="{height: contentBoxHeight+'px'}" class="admin-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive :include="keepAliveIncludes">
|
||||
<component :is="Component" :key="route.name" />
|
||||
@@ -84,6 +84,8 @@
|
||||
const breadCrumbFlag = computed(() => useAppConfigStore().$state.breadCrumbFlag);
|
||||
// 页面宽度
|
||||
const pageWidth = computed(() => useAppConfigStore().$state.pageWidth);
|
||||
|
||||
let contentBoxHeight=ref()
|
||||
// 多余高度
|
||||
const dueHeight = computed(() => {
|
||||
if (fullScreenFlag.value) {
|
||||
@@ -104,6 +106,14 @@
|
||||
return due;
|
||||
});
|
||||
|
||||
watch(() => dueHeight.value, () => {
|
||||
let dom=document.querySelector('.admin-layout-content')
|
||||
contentBoxHeight.value=dom.offsetHeight - 20 - dueHeight.value.split('px')[0]
|
||||
});
|
||||
onMounted(() => {
|
||||
let dom=document.querySelector('.admin-layout-content')
|
||||
contentBoxHeight.value=dom.offsetHeight - 20 - dueHeight.value.split('px')[0]
|
||||
});
|
||||
//页面初始化的时候加载水印
|
||||
onMounted(() => {
|
||||
if (watermarkFlag.value) {
|
||||
|
||||
@@ -21,7 +21,7 @@ const privilege = (value: string) => {
|
||||
if (!userPointsList) {
|
||||
return false;
|
||||
}
|
||||
return _.some(userPointsList, ['apiPerms', value]);
|
||||
return _.some(userPointsList, ['webPerms', value]);
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
rowKey="goodsId"
|
||||
:scroll="{ x: 1000,y: yHeight }"
|
||||
:scroll="{ x: 1000, y: yHeight }"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:showSorterTooltip="false"
|
||||
@@ -495,15 +495,32 @@
|
||||
function camelToUnderscore(str) {
|
||||
return str.replace(/([A-Z])/g, '_$1').toLowerCase();
|
||||
}
|
||||
const dueHeight=ref(0)
|
||||
const yHeight=ref(0)
|
||||
|
||||
// 动态设置表格高度
|
||||
const yHeight = ref(0);
|
||||
onMounted(() => {
|
||||
let doc = document.querySelector('.ant-form');
|
||||
let btn = document.querySelector('.smart-table-btn-block');
|
||||
let tableCell = document.querySelector('.ant-table-cell');
|
||||
let page = document.querySelector('.smart-query-table-page');
|
||||
let box = document.querySelector('.ant-layout-content>div');
|
||||
dueHeight.value = doc.offsetHeight+10+24+btn.offsetHeight+15+tableCell.offsetHeight+page.offsetHeight+20
|
||||
yHeight.value=box.offsetHeight-dueHeight.value
|
||||
resetGetHeight();
|
||||
});
|
||||
function resetGetHeight() {
|
||||
// 搜索部分高度
|
||||
let doc = document.querySelector('.ant-form');
|
||||
// 按钮部分高度
|
||||
let btn = document.querySelector('.smart-table-btn-block');
|
||||
// 表格头高度
|
||||
let tableCell = document.querySelector('.ant-table-cell');
|
||||
// 分页高度
|
||||
let page = document.querySelector('.smart-query-table-page');
|
||||
// 内容区总高度
|
||||
let box = document.querySelector('.admin-content');
|
||||
setTimeout(() => {
|
||||
let dueHeight = doc.offsetHeight + 10 + 24 + btn.offsetHeight + 15 + tableCell.offsetHeight + page.offsetHeight + 20;
|
||||
yHeight.value = box.offsetHeight - dueHeight;
|
||||
}, 100);
|
||||
}
|
||||
window.addEventListener(
|
||||
'resize',
|
||||
_.throttle(() => {
|
||||
resetGetHeight();
|
||||
}, 1000)
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</a-button>
|
||||
</a-button-group>
|
||||
|
||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20">
|
||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20" v-if="$privilege('oa:bank:add')">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -60,8 +60,8 @@
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="addOrUpdate(record)" type="link">编辑</a-button>
|
||||
<a-button @click="confirmDelete(record.bankId)" danger type="link">删除</a-button>
|
||||
<a-button @click="addOrUpdate(record)" type="link" v-if="$privilege('oa:bank:update')">编辑</a-button>
|
||||
<a-button @click="confirmDelete(record.bankId)" danger type="link" v-if="$privilege('oa:bank:delete')">删除</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<a-modal :open="visible" :title="form.bankId ? '编辑' : '添加'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
|
||||
<a-modal :open="visible" :title="form.bankId ? '编辑' : '添加'" :width="700" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 19 }">
|
||||
<a-form-item label="开户银行" name="bankName">
|
||||
<a-input v-model:value="form.bankName" placeholder="请输入开户银行" />
|
||||
</a-form-item>
|
||||
|
||||
@@ -16,50 +16,59 @@
|
||||
<a-button class="button-style" type="primary" @click="onSearch">搜索</a-button>
|
||||
<a-button class="button-style" type="default" @click="resetQueryEmployee">重置</a-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a-button class="button-style" type="primary" @click="addEmployee" v-privilege="'oa:enterprise:addEmployee'"> 添加员工 </a-button>
|
||||
<a-button class="button-style" type="primary" danger @click="batchDelete" v-privilege="'oa:enterprise:deleteEmployee'"> 批量移除 </a-button>
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
:loading="tableLoading"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
:pagination="false"
|
||||
rowKey="employeeId"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
size="small"
|
||||
bordered
|
||||
>
|
||||
<template #bodyCell="{ text, record, index, column }">
|
||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||
<a-tag :color="text ? 'error' : 'processing'">{{ text ? '禁用' : '启用' }}</a-tag>
|
||||
<a-card size="small" :bordered="false" :hoverable="false">
|
||||
<a-row justify="end">
|
||||
<TableOperator
|
||||
class="smart-margin-bottom5"
|
||||
v-model="columns"
|
||||
:tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_EMPLOYEE"
|
||||
:refresh="queryEmployee"
|
||||
/>
|
||||
</a-row>
|
||||
<a-table
|
||||
:loading="tableLoading"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
:pagination="false"
|
||||
rowKey="employeeId"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
size="small"
|
||||
bordered
|
||||
>
|
||||
<template #bodyCell="{ text, record, column }">
|
||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||
<a-tag :color="text ? 'error' : 'processing'">{{ text ? '禁用' : '启用' }}</a-tag>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'gender'">
|
||||
<span>{{ $smartEnumPlugin.getDescByValue('GENDER_ENUM', text) }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operate'">
|
||||
<a-button type="link" @click="deleteEmployee(record.employeeId)" v-privilege="'oa:enterprise:deleteEmployee'">移除</a-button>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'gender'">
|
||||
<span>{{ $smartEnumPlugin.getDescByValue('GENDER_ENUM', text) }}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operate'">
|
||||
<a @click="deleteEmployee(record.employeeId)" v-privilege="'oa:enterprise:deleteEmployee'">移除</a>
|
||||
</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="queryEmployee"
|
||||
@showSizeChange="queryEmployee"
|
||||
:show-total="showTableTotal"
|
||||
/>
|
||||
</div>
|
||||
<EmployeeTableSelectModal ref="selectEmployeeModal" @selectData="selectData" />
|
||||
</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="queryEmployee"
|
||||
@showSizeChange="queryEmployee"
|
||||
:show-total="showTableTotal"
|
||||
/>
|
||||
</div>
|
||||
<EmployeeTableSelectModal ref="selectEmployeeModal" @selectData="selectData" />
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -72,6 +81,8 @@
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, showTableTotal } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
|
||||
const props = defineProps({
|
||||
enterpriseId: {
|
||||
@@ -112,7 +123,8 @@
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operate',
|
||||
width: 60,
|
||||
width: 90,
|
||||
align: 'center',
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -271,7 +283,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 20px 0;
|
||||
padding: 10px 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.button-style {
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
</a-button>
|
||||
</a-button-group>
|
||||
|
||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20">
|
||||
|
||||
<a-button @click="addOrUpdate()" type="primary" class="smart-margin-left20" v-if="$privilege('oa:invoice:add')">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
@@ -51,14 +52,14 @@
|
||||
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.BUSINESS.OA.ENTERPRISE_INVOICE" :refresh="ajaxQuery" />
|
||||
</a-row>
|
||||
<a-table :scroll="{ x: 1300 }" size="small" :dataSource="tableData" :columns="columns" rowKey="invoiceId" :pagination="false" bordered>
|
||||
<template #bodyCell="{ text, record, index, column }">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||
{{ record.disabledFlag ? '禁用' : '启用' }}
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="addOrUpdate(record)" type="link">编辑</a-button>
|
||||
<a-button @click="confirmDelete(record.invoiceId)" type="link" danger>删除</a-button>
|
||||
<a-button @click="addOrUpdate(record)" type="link" v-if="$privilege('oa:invoice:update')">编辑</a-button>
|
||||
<a-button @click="confirmDelete(record.invoiceId)" type="link" danger v-if="$privilege('oa:invoice:delete')">删除</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<a-modal :open="visible" :title="form.invoiceId ? '编辑' : '添加'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
|
||||
<a-modal :open="visible" :title="form.invoiceId ? '编辑' : '添加'" :width="700" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 19 }">
|
||||
<a-form-item label="开票抬头" name="invoiceHeads">
|
||||
<a-input v-model:value="form.invoiceHeads" placeholder="请输入开票抬头" />
|
||||
</a-form-item>
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<a-modal :open="visible" title="添加" :width="700" forceRender ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 6 }">
|
||||
<a-modal
|
||||
:open="visible"
|
||||
:title="form.enterpriseId ? '编辑' : '添加'"
|
||||
:width="700"
|
||||
forceRender
|
||||
ok-text="确认"
|
||||
cancel-text="取消"
|
||||
@ok="onSubmit"
|
||||
@cancel="onClose"
|
||||
>
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
|
||||
<a-form-item label="企业名称" name="enterpriseName">
|
||||
<a-input v-model:value="form.enterpriseName" placeholder="请输入企业名称" />
|
||||
</a-form-item>
|
||||
|
||||
@@ -30,15 +30,19 @@
|
||||
</div>
|
||||
</a-page-header>
|
||||
</div>
|
||||
<a-card class="smart-margin-top10" size="small">
|
||||
<a-card
|
||||
class="smart-margin-top10"
|
||||
size="small"
|
||||
v-if="$privilege('oa:enterprise:queryEmployee') || $privilege('oa:bank:query') || $privilege('oa:invoice:query')"
|
||||
>
|
||||
<a-tabs>
|
||||
<a-tab-pane key="employee" tab="员工信息">
|
||||
<a-tab-pane key="employee" tab="员工信息" v-if="$privilege('oa:enterprise:queryEmployee')">
|
||||
<EmployeeList :enterpriseId="enterpriseId" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="bank" tab="银行信息">
|
||||
<a-tab-pane key="bank" tab="银行信息" v-if="$privilege('oa:bank:query')">
|
||||
<BankList :enterpriseId="enterpriseId" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="invoice" tab="发票信息">
|
||||
<a-tab-pane key="invoice" tab="发票信息" v-if="$privilege('oa:invoice:query')">
|
||||
<InvoiceList :enterpriseId="enterpriseId" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="dataTracer" tab="变更记录">
|
||||
|
||||
@@ -75,7 +75,9 @@
|
||||
{{ text ? '禁用' : '启用' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'enterpriseName'">
|
||||
<a @click="detail(record.enterpriseId)">{{ record.enterpriseName }}</a>
|
||||
<a-button type="link" @click="detail(record.enterpriseId)" :disabled="!$privilege('oa:enterprise:detail')">
|
||||
{{ record.enterpriseName }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'type'">
|
||||
<span>{{ $smartEnumPlugin.getDescByValue('ENTERPRISE_TYPE_ENUM', text) }}</span>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<a-table
|
||||
size="small"
|
||||
:scroll="{ x: 1000 }"
|
||||
:scroll="{ y: 800 }"
|
||||
:loading="tableLoading"
|
||||
bordered
|
||||
:dataSource="tableData"
|
||||
|
||||
@@ -178,8 +178,8 @@
|
||||
chosenClass: 'smart-ghost-class', //设置选中样式类名
|
||||
handle: '.handle',
|
||||
onEnd: ({ oldIndex, newIndex }) => {
|
||||
const oldRow = tableData.value.splice(oldIndex, 1)[0];
|
||||
tableData.value.splice(newIndex, 0, oldRow);
|
||||
const oldRow = tableData.value.splice(oldIndex - 1, 1)[0];
|
||||
tableData.value.splice(newIndex - 1, 0, oldRow);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
-->
|
||||
<template>
|
||||
<a-modal :open="visible" :title="form.dictDataId ? '编辑字典值' : '添加字典值'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<br/>
|
||||
<br />
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }">
|
||||
<a-form-item label="字典项名称" name="dataLabel">
|
||||
<a-input v-model:value="form.dataLabel" placeholder="请输入 字典项名称" />
|
||||
@@ -21,7 +21,7 @@
|
||||
<a-input-number style="width: 100%" v-model:value="form.sortOrder" :min="0" :max="1000" />
|
||||
</a-form-item>
|
||||
<a-form-item label="备注" name="remark">
|
||||
<textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none"></textarea>
|
||||
<a-textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
@@ -33,14 +33,20 @@
|
||||
|
||||
<a-row class="smart-table-btn-block">
|
||||
<div class="smart-table-operate-block">
|
||||
<a-button @click="addOrUpdateData" type="primary">
|
||||
<a-button @click="addOrUpdateData" type="primary" v-privilege="'support:dictData:add'">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
新建
|
||||
</a-button>
|
||||
|
||||
<a-button @click="confirmBatchDelete" type="primary" danger :disabled="selectedRowKeyList.length === 0">
|
||||
<a-button
|
||||
@click="confirmBatchDelete"
|
||||
type="primary"
|
||||
danger
|
||||
:disabled="selectedRowKeyList.length === 0"
|
||||
v-privilege="'support:dictData:delete'"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
</template>
|
||||
@@ -69,7 +75,7 @@
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<a-button @click="addOrUpdateData(record)" type="link">编辑</a-button>
|
||||
<a-button @click="addOrUpdateData(record)" type="link" v-privilege="'support:dictData:update'">编辑</a-button>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
-->
|
||||
<template>
|
||||
<a-modal :open="visible" :title="form.dictId ? '编辑字典' : '添加字典'" ok-text="确认" cancel-text="取消" @ok="onSubmit" @cancel="onClose">
|
||||
<br/>
|
||||
<br />
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }">
|
||||
<a-form-item label="字典编码" name="dictCode">
|
||||
<a-input v-model:value="form.dictCode" placeholder="请输入编码" />
|
||||
@@ -19,7 +19,7 @@
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="备注" name="remark">
|
||||
<textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none"></textarea>
|
||||
<a-textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none"/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<a-button
|
||||
@click="confirmBatchDelete"
|
||||
v-privilege="'support:dict:batchDelete'"
|
||||
v-privilege="'support:dict:delete'"
|
||||
type="primary"
|
||||
danger
|
||||
:disabled="selectedRowKeyList.length === 0"
|
||||
@@ -87,7 +87,7 @@
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="addOrUpdateDict(record)" v-privilege="'support:dict:edit'" type="link">编辑</a-button>
|
||||
<a-button @click="addOrUpdateDict(record)" v-privilege="'support:dict:update'" type="link">编辑</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<a-modal v-model:open="visible" title="推送人" width="1100px" ok-text="确定" cancel-text="取消" @ok="onSubmit" @cancel="onClose" :zIndex="9999">
|
||||
<a-form class="smart-query-form">
|
||||
<a-row class="smart-query-form-row">
|
||||
<a-form-item label="关键词搜索" class="smart-query-form-item">
|
||||
<a-input v-model:value="queryParam.searchWord" :style="{ width: '250px' }" placeholder="请输入姓名" @change="selectSearchWord" />
|
||||
</a-form-item>
|
||||
<a-form-item class="smart-query-form-item">
|
||||
<a-button type="primary" @click="searchQuery">
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
查询
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
<a-form-item class="smart-query-form-item">
|
||||
<a-button @click="searchReset">
|
||||
<template #icon>
|
||||
<ReloadOutlined />
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-table
|
||||
rowKey="employeeId"
|
||||
:loading="tableLoading"
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
bordered
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKeyList,
|
||||
onChange: onSelectChange,
|
||||
}"
|
||||
>
|
||||
</a-table>
|
||||
<div class="smart-query-table-page">
|
||||
<a-pagination
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
show-less-items
|
||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||
:defaultPageSize="queryParam.pageSize"
|
||||
v-model:current="queryParam.pageNum"
|
||||
v-model:pageSize="queryParam.pageSize"
|
||||
:total="total"
|
||||
@change="queryList"
|
||||
@showSizeChange="queryList"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
/>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/src/lib/smart-sentry';
|
||||
import { SmartLoading } from '/src/components/framework/smart-loading';
|
||||
import SmartEnumSelect from '/src/components/framework/smart-enum-select/index.vue';
|
||||
import { employeeApi } from '/@/api/system/employee-api';
|
||||
// ---------------查询条件----------------
|
||||
const queryParamState = {
|
||||
searchWord: null,
|
||||
keyword: null,
|
||||
pageNum: 1,
|
||||
pageSize: PAGE_SIZE,
|
||||
};
|
||||
|
||||
const classId = ref();
|
||||
const queryParam = reactive({ ...queryParamState });
|
||||
const tableData = ref([]);
|
||||
let tableLoading = ref(false);
|
||||
const total = ref(0);
|
||||
|
||||
// 搜索
|
||||
function searchQuery() {
|
||||
queryList();
|
||||
}
|
||||
|
||||
// 弹窗打开
|
||||
const visible = ref(false);
|
||||
// 重置
|
||||
function searchReset() {
|
||||
Object.assign(queryParam, queryParamState);
|
||||
queryList();
|
||||
}
|
||||
function showModal(receiverIdList) {
|
||||
selectedRowKeyList.value = receiverIdList;
|
||||
queryList();
|
||||
visible.value = true;
|
||||
}
|
||||
function selectSearchWord(e) {
|
||||
queryParam.keyword = queryParam.searchWord;
|
||||
}
|
||||
const columns = [
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'actualName',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
dataIndex: 'phone',
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
// ----------查询------------
|
||||
async function queryList() {
|
||||
try {
|
||||
tableLoading.value = true;
|
||||
let res = await employeeApi.queryEmployee(queryParam);
|
||||
const list = res.data.list;
|
||||
total.value = res.data.total;
|
||||
tableData.value = list;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 选择成绩表
|
||||
const selectedRowKeyList = ref([]);
|
||||
const selectedRowsList = ref([]);
|
||||
function onSelectChange(keyArray, selectedRows) {
|
||||
selectedRowKeyList.value = keyArray;
|
||||
selectedRowsList.value = selectedRows;
|
||||
}
|
||||
|
||||
// 弹窗管理
|
||||
function onClose() {
|
||||
visible.value = false;
|
||||
let nameList = selectedRowsList.value.map((item) => item.actualName);
|
||||
emit('reloadList', selectedRowKeyList.value, nameList);
|
||||
}
|
||||
const emit = defineEmits(['reloadList']);
|
||||
|
||||
// 提交
|
||||
function onSubmit() {
|
||||
try {
|
||||
onClose();
|
||||
} catch (error) {
|
||||
smartSentry.captureError(error);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<a-modal title="添加" :width="700" :open="visibleFlag" @cancel="onClose" :maskClosable="false" :destroyOnClose="true">
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }">
|
||||
<a-form-item label="标题" name="title">
|
||||
<a-input style="width: 100%" v-model:value="form.title" placeholder="标题" />
|
||||
</a-form-item>
|
||||
<a-form-item label="接收人" name="receiverUserIdList">
|
||||
<a-button @click="selectReceiver" type="primary"> 选择接收人 </a-button>
|
||||
<div>{{ nameListString }}</div>
|
||||
</a-form-item>
|
||||
<a-form-item label="消息类型" name="messageType">
|
||||
<SmartEnumSelect width="100%" v-model:value="form.messageType" placeholder="请选择类型" enum-name="MESSAGE_TYPE_ENUM" />
|
||||
</a-form-item>
|
||||
<a-form-item label="推送内容" name="content">
|
||||
<a-textarea style="width: 100%" v-model:value="form.content" placeholder="推送内容" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button @click="onClose">取消</a-button>
|
||||
<a-button type="primary" @click="onSubmit">保存</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-modal>
|
||||
<MessageReceiverModal ref="receiverModalRef" @reloadList="addReceiverIdList" />
|
||||
</template>
|
||||
<script setup>
|
||||
import { nextTick, reactive, ref } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/src/components/framework/smart-loading';
|
||||
import { smartSentry } from '/src/lib/smart-sentry';
|
||||
import SmartEnumSelect from '/src/components/framework/smart-enum-select/index.vue';
|
||||
import MessageReceiverModal from './message-receiver-modal.vue';
|
||||
import { USER_TYPE_ENUM } from '/src/constants/common-const.js';
|
||||
import { messageApi } from '/@/api/support/message-api.js';
|
||||
// ------------------------ 事件 ------------------------
|
||||
|
||||
const emits = defineEmits(['reloadList']);
|
||||
|
||||
// ------------------------ 显示与隐藏 ------------------------
|
||||
// 是否显示
|
||||
const visibleFlag = ref(false);
|
||||
|
||||
function show(rowData) {
|
||||
Object.assign(form, formDefault);
|
||||
nameListString.value = null;
|
||||
visibleFlag.value = true;
|
||||
nextTick(() => {
|
||||
formRef.value.clearValidate();
|
||||
});
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
Object.assign(form, formDefault);
|
||||
visibleFlag.value = false;
|
||||
}
|
||||
|
||||
// ------------------------ 表单 ------------------------
|
||||
|
||||
// 组件ref
|
||||
const formRef = ref();
|
||||
|
||||
const formDefault = {
|
||||
title: undefined,
|
||||
receiverUserIdList: null,
|
||||
content: null,
|
||||
messageType: null,
|
||||
receiverUserType: USER_TYPE_ENUM.ADMIN_EMPLOYEE.value,
|
||||
};
|
||||
|
||||
let form = reactive({ ...formDefault });
|
||||
|
||||
const rules = {
|
||||
title: [{ required: true, message: '标题 必填' }],
|
||||
content: [{ required: true, message: '推送内容 必填' }],
|
||||
receiverUserIdList: [{ required: true, message: '推送人 必填' }],
|
||||
messageType: [{ required: true, message: '消息类型 必填' }],
|
||||
};
|
||||
|
||||
const nameListString = ref();
|
||||
function addReceiverIdList(idList, nameList) {
|
||||
form.receiverUserIdList = idList;
|
||||
nameListString.value = nameList.join(',');
|
||||
}
|
||||
|
||||
const receiverModalRef = ref();
|
||||
function selectReceiver() {
|
||||
receiverModalRef.value.showModal(form.receiverUserIdList);
|
||||
}
|
||||
|
||||
// 点击确定,验证表单
|
||||
async function onSubmit() {
|
||||
try {
|
||||
await formRef.value.validateFields();
|
||||
save();
|
||||
} catch (err) {
|
||||
message.error('参数验证错误,请仔细填写表单数据!');
|
||||
}
|
||||
}
|
||||
|
||||
// 新建、编辑API
|
||||
async function save() {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
let messageList = [];
|
||||
for (const userId of form.receiverUserIdList) {
|
||||
messageList.push({
|
||||
title: form.title,
|
||||
receiverUserId: userId,
|
||||
content: form.content,
|
||||
messageType: form.messageType,
|
||||
receiverUserType: USER_TYPE_ENUM.ADMIN_EMPLOYEE.value,
|
||||
});
|
||||
}
|
||||
await messageApi.sendMessages(messageList);
|
||||
message.success('操作成功');
|
||||
emits('reloadList');
|
||||
onClose();
|
||||
} catch (err) {
|
||||
smartSentry.captureError(err);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<!---------- 查询表单form begin ----------->
|
||||
<a-form class="smart-query-form">
|
||||
<a-row class="smart-query-form-row">
|
||||
<a-form-item label="关键词" class="smart-query-form-item">
|
||||
<a-input style="width: 150px" v-model:value="queryForm.searchWord" placeholder="关键词" />
|
||||
</a-form-item>
|
||||
<a-form-item label="类型" class="smart-query-form-item">
|
||||
<smart-enum-select style="width: 150px" v-model:value="queryForm.messageType" placeholder="消息类型" enum-name="MESSAGE_TYPE_ENUM" />
|
||||
</a-form-item>
|
||||
<a-form-item label="是否已读" class="smart-query-form-item">
|
||||
<SmartEnumSelect width="120px" enum-name="FLAG_NUMBER_ENUM" v-model:value="queryForm.readFlag" />
|
||||
</a-form-item>
|
||||
<a-form-item label="创建时间" class="smart-query-form-item">
|
||||
<a-range-picker v-model:value="queryForm.createTime" style="width: 200px" @change="onChangeCreateTime" />
|
||||
</a-form-item>
|
||||
<a-form-item class="smart-query-form-item">
|
||||
<a-button type="primary" @click="searchQuery">
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button @click="resetQuery" class="smart-margin-left10">
|
||||
<template #icon>
|
||||
<ReloadOutlined />
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<!---------- 查询表单form end ----------->
|
||||
|
||||
<a-card size="small" :bordered="false" :hoverable="true">
|
||||
<!---------- 表格操作行 begin ----------->
|
||||
<a-row class="smart-table-btn-block">
|
||||
<div class="smart-table-operate-block">
|
||||
<a-button @click="showForm" type="primary">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
发送消息
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="smart-table-setting-block">
|
||||
<TableOperator v-model="columns" :tableId="TABLE_ID_CONST.SUPPORT.MAIL" :refresh="queryData" />
|
||||
</div>
|
||||
</a-row>
|
||||
<!---------- 表格操作行 end ----------->
|
||||
|
||||
<!---------- 表格 begin ----------->
|
||||
<a-table size="small" :dataSource="tableData" :columns="columns" rowKey="telephoneId" bordered :loading="tableLoading" :pagination="false">
|
||||
<template #bodyCell="{ record, column, text }">
|
||||
<template v-if="column.dataIndex === 'readFlag'">
|
||||
{{ text ? '已读' : '未读' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'messageType'">
|
||||
{{ $smartEnumPlugin.getDescByValue('MESSAGE_TYPE_ENUM', text) }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="onDelete(record)" danger type="link">删除</a-button>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
<!---------- 表格 end ----------->
|
||||
|
||||
<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="queryData"
|
||||
@showSizeChange="queryData"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<MessageSendForm ref="formRef" @reloadList="queryData" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { messageApi } from '/@/api/support/message-api';
|
||||
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import MessageSendForm from './components/message-send-form.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: '消息类型',
|
||||
dataIndex: 'messageType',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '消息标题',
|
||||
dataIndex: 'title',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '消息内容',
|
||||
dataIndex: 'content',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '接收人ID',
|
||||
dataIndex: 'receiverUserId',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '已读',
|
||||
dataIndex: 'readFlag',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: '已读时间',
|
||||
dataIndex: 'readTime',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
fixed: 'right',
|
||||
width: 60,
|
||||
},
|
||||
]);
|
||||
|
||||
// ---------------------------- 查询数据表单和方法 ----------------------------
|
||||
|
||||
const queryFormState = {
|
||||
searchWord: undefined, //关键词
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
createTime: [],
|
||||
readFlag: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
messageType: null,
|
||||
};
|
||||
function onChangeCreateTime(dates, dateStrings) {
|
||||
queryForm.startDate = dateStrings[0];
|
||||
queryForm.endDate = dateStrings[1];
|
||||
}
|
||||
// 查询表单form
|
||||
const queryForm = reactive({ ...queryFormState });
|
||||
// 表格加载loading
|
||||
const tableLoading = ref(false);
|
||||
// 表格数据
|
||||
const tableData = ref([]);
|
||||
// 总数
|
||||
const total = ref(0);
|
||||
|
||||
// 重置查询条件
|
||||
function resetQuery() {
|
||||
let pageSize = queryForm.pageSize;
|
||||
Object.assign(queryForm, queryFormState);
|
||||
queryForm.pageSize = pageSize;
|
||||
queryData();
|
||||
}
|
||||
|
||||
function searchQuery() {
|
||||
queryForm.pageNum = 1;
|
||||
queryData();
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
async function queryData() {
|
||||
tableLoading.value = true;
|
||||
try {
|
||||
let queryResult = await messageApi.queryAdminMessage(queryForm);
|
||||
tableData.value = queryResult.data.list;
|
||||
total.value = queryResult.data.total;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(queryData);
|
||||
|
||||
// ---------------------------- 添加/修改 ----------------------------
|
||||
const formRef = ref();
|
||||
|
||||
function showForm(data) {
|
||||
formRef.value.show(data);
|
||||
}
|
||||
|
||||
//确认删除
|
||||
function onDelete(data) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要删除选吗?',
|
||||
okText: '删除',
|
||||
okType: 'danger',
|
||||
onOk() {
|
||||
requestDelete(data);
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {},
|
||||
});
|
||||
}
|
||||
|
||||
async function requestDelete(data) {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
await messageApi.deleteMessage(data.messageId);
|
||||
message.success('删除成功');
|
||||
queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -15,6 +15,7 @@
|
||||
:open="visible"
|
||||
:width="600"
|
||||
@close="onClose"
|
||||
destroyOnClose
|
||||
>
|
||||
<a-form ref="formRef" :labelCol="{ span: labelColSpan }" :labelWrap="true" :model="form" :rules="rules">
|
||||
<a-form-item label="菜单类型" name="menuType">
|
||||
@@ -65,7 +66,7 @@
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- 目录 菜单 end -->
|
||||
<!-- 按钮 start -->
|
||||
<!-- 功能点 start -->
|
||||
<template v-if="form.menuType === MENU_TYPE_ENUM.POINTS.value">
|
||||
<a-form-item label="功能点名称" name="menuName">
|
||||
<a-input v-model:value="form.menuName" placeholder="请输入功能点名称" />
|
||||
@@ -90,7 +91,7 @@
|
||||
<a-input v-model:value="form.apiPerms" placeholder="请输入后端权限" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- 按钮 end -->
|
||||
<!-- 功能点 end -->
|
||||
<a-form-item label="排序" name="sort" help="值越小越靠前">
|
||||
<a-input-number v-model:value="form.sort" :min="0" placeholder="请输入排序" style="width: 100px" />
|
||||
</a-form-item>
|
||||
|
||||
@@ -13,12 +13,13 @@ export const columns = ref([
|
||||
title: '名称',
|
||||
dataIndex: 'menuName',
|
||||
key: 'ID',
|
||||
width: 200,
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'menuType',
|
||||
width: 80,
|
||||
width: 100,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: '图标',
|
||||
@@ -53,6 +54,7 @@ export const columns = ref([
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operate',
|
||||
width: 100,
|
||||
width: 170,
|
||||
align: "center"
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<a-table
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
size="small"
|
||||
:scroll="{ x: 1000 }"
|
||||
:scroll="{ y: 800 }"
|
||||
:defaultExpandAllRows="true"
|
||||
:dataSource="tableData"
|
||||
bordered
|
||||
@@ -132,6 +132,15 @@
|
||||
|
||||
<template v-if="column.dataIndex === 'operate'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button
|
||||
v-if="record.menuType !== MENU_TYPE_ENUM.POINTS.value"
|
||||
v-privilege="'system:menu:update'"
|
||||
type="link"
|
||||
size="small"
|
||||
@click="showAddSub(record)"
|
||||
>
|
||||
添加下级
|
||||
</a-button>
|
||||
<a-button v-privilege="'system:menu:update'" type="link" size="small" @click="showDrawer(record)">编辑</a-button>
|
||||
<a-button v-privilege="'system:menu:batchDelete'" danger type="link" @click="singleDelete(record)">删除</a-button>
|
||||
</div>
|
||||
@@ -157,6 +166,7 @@
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
|
||||
import { MENU_TYPE_ENUM } from '/@/constants/system/menu-const';
|
||||
|
||||
// ------------------------ 表格渲染 ------------------------
|
||||
const menuTypeColorArray = ['red', 'blue', 'orange', 'green'];
|
||||
@@ -256,4 +266,13 @@
|
||||
function showDrawer(rowData) {
|
||||
menuOperateModal.value.showDrawer(rowData);
|
||||
}
|
||||
|
||||
function showAddSub(rowData) {
|
||||
const subData = {
|
||||
parentId: rowData.menuId,
|
||||
menuType: rowData.menuType === MENU_TYPE_ENUM.CATALOG.value ? MENU_TYPE_ENUM.MENU.value : MENU_TYPE_ENUM.POINTS.value,
|
||||
contextMenuId: rowData.menuType === MENU_TYPE_ENUM.MENU.value ? rowData.menuId : undefined,
|
||||
};
|
||||
menuOperateModal.value.showDrawer(subData);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -37,4 +37,17 @@ export const loginApi = {
|
||||
getLoginInfo: () => {
|
||||
return getRequest('/login/getLoginInfo');
|
||||
},
|
||||
/**
|
||||
* 获取双因子登录标识 @author 卓大
|
||||
*/
|
||||
getTwoFactorLoginFlag: () => {
|
||||
return getRequest('/login/getTwoFactorLoginFlag');
|
||||
},
|
||||
/**
|
||||
* 获取邮箱登录验证码 @author 卓大
|
||||
*/
|
||||
sendLoginEmailCode: (loginName) => {
|
||||
return getRequest(`/login/sendEmailCode/${loginName}`);
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
@@ -19,6 +19,21 @@
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="input-view smart-margin-top10" v-if="emailCodeShowFlag">
|
||||
<image src="@/static/images/login/login-password.png"></image>
|
||||
<uni-easyinput
|
||||
class="input"
|
||||
placeholder="请输入邮箱验证码"
|
||||
:clearable="true"
|
||||
placeholderStyle="color:#CCCCCC"
|
||||
border="none"
|
||||
v-model="loginForm.emailCode"
|
||||
/>
|
||||
<button @click="sendSmsCode" class="code-btn" :disabled="emailCodeButtonDisabled">
|
||||
{{ emailCodeTips }}
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="input-view smart-margin-top10">
|
||||
<image src="@/static/images/login/login-password.png"></image>
|
||||
<uni-easyinput
|
||||
@@ -155,7 +170,54 @@
|
||||
}
|
||||
}
|
||||
|
||||
onShow(getCaptcha);
|
||||
const emailCodeShowFlag = ref(false);
|
||||
let emailCodeTips = ref('获取邮箱验证码');
|
||||
let emailCodeButtonDisabled = ref(false);
|
||||
// 定时器
|
||||
let countDownTimer = null;
|
||||
// 开始倒计时
|
||||
function runCountDown() {
|
||||
emailCodeButtonDisabled.value = true;
|
||||
let countDown = 60;
|
||||
emailCodeTips.value = `${countDown}秒后重新获取`;
|
||||
countDownTimer = setInterval(() => {
|
||||
if (countDown > 1) {
|
||||
countDown--;
|
||||
emailCodeTips.value = `${countDown}秒后重新获取`;
|
||||
} else {
|
||||
clearInterval(countDownTimer);
|
||||
emailCodeButtonDisabled.value = false;
|
||||
emailCodeTips.value = '获取验证码';
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
// 获取双因子登录标识
|
||||
async function getTwoFactorLoginFlag() {
|
||||
try {
|
||||
let result = await loginApi.getTwoFactorLoginFlag();
|
||||
emailCodeShowFlag.value = result.data;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
}
|
||||
}
|
||||
// 发送邮箱验证码
|
||||
async function sendSmsCode() {
|
||||
try {
|
||||
uni.showLoading();
|
||||
let result = await loginApi.sendLoginEmailCode(loginForm.loginName);
|
||||
message.success('验证码发送成功!请登录邮箱查看验证码~');
|
||||
runCountDown();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
uni.hideLoading();
|
||||
}
|
||||
}
|
||||
onShow(()=>{
|
||||
getCaptcha()
|
||||
getTwoFactorLoginFlag();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.bottom-view {
|
||||
@@ -294,4 +356,11 @@
|
||||
margin-bottom: 120rpx;
|
||||
align-self: flex-start;
|
||||
}
|
||||
.code-btn{
|
||||
width: 240rpx;
|
||||
font-size: 24rpx;
|
||||
margin-right: 20rpx;
|
||||
background-color: $main-color;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -531,7 +531,7 @@ CREATE TABLE `t_menu` (
|
||||
`update_user_id` bigint(0) NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
|
||||
PRIMARY KEY (`menu_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 252 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 268 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of t_menu
|
||||
@@ -593,10 +593,10 @@ INSERT INTO `t_menu` VALUES (154, '获取缓存key', 3, 133, NULL, NULL, NULL, 1
|
||||
INSERT INTO `t_menu` VALUES (156, '查看结果', 3, 117, NULL, NULL, NULL, 1, 'support:reload:result', 'support:reload:result', NULL, 117, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:17:23', 1, '2023-10-07 14:31:47');
|
||||
INSERT INTO `t_menu` VALUES (157, '单号生成', 3, 130, NULL, NULL, NULL, 1, 'support:serialNumber:generate', 'support:serialNumber:generate', NULL, 130, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:21:06', 1, '2023-10-07 18:22:46');
|
||||
INSERT INTO `t_menu` VALUES (158, '生成记录', 3, 130, NULL, NULL, NULL, 1, 'support:serialNumber:record', 'support:serialNumber:record', NULL, 130, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:21:34', 1, '2023-10-07 18:22:55');
|
||||
INSERT INTO `t_menu` VALUES (159, '新建', 3, 110, NULL, NULL, NULL, 1, 'support:dict:add', 'support:dict:add', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:23:51', 1, '2023-10-07 18:18:24');
|
||||
INSERT INTO `t_menu` VALUES (160, '编辑', 3, 110, NULL, NULL, NULL, 1, 'support:dict:edit', 'support:dict:edit', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:24:05', 1, '2023-10-07 18:19:17');
|
||||
INSERT INTO `t_menu` VALUES (161, '批量删除', 3, 110, NULL, NULL, NULL, 1, 'support:dict:delete', 'support:dict:delete', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:24:34', 1, '2023-10-07 18:19:39');
|
||||
INSERT INTO `t_menu` VALUES (162, '刷新缓存', 3, 110, NULL, NULL, NULL, 1, 'support:dict:refresh', 'support:dict:refresh', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:24:55', 1, '2023-10-07 18:18:37');
|
||||
INSERT INTO `t_menu` VALUES (159, '查询', 3, 110, NULL, NULL, NULL, 1, 'support:dict:query', 'support:dict:query', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:23:51', 1, '2025-04-08 19:42:25');
|
||||
INSERT INTO `t_menu` VALUES (160, '添加', 3, 110, NULL, NULL, NULL, 1, 'support:dict:add', 'support:dict:add', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:24:05', 1, '2025-04-08 19:43:02');
|
||||
INSERT INTO `t_menu` VALUES (161, '更新', 3, 110, NULL, NULL, NULL, 1, 'support:dict:update', 'support:dict:update', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:24:34', 1, '2025-04-08 19:43:34');
|
||||
INSERT INTO `t_menu` VALUES (162, '删除', 3, 110, NULL, NULL, NULL, 1, 'support:dict:delete', 'support:dict:delete', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:24:55', 1, '2025-04-08 19:43:52');
|
||||
INSERT INTO `t_menu` VALUES (163, '新建', 3, 109, NULL, NULL, NULL, 1, 'support:config:add', 'support:config:add', NULL, 109, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:26:56', 1, '2023-10-07 18:16:17');
|
||||
INSERT INTO `t_menu` VALUES (164, '编辑', 3, 109, NULL, NULL, NULL, 1, 'support:config:update', 'support:config:update', NULL, 109, 0, NULL, 0, 1, 0, 0, 1, '2022-10-15 23:27:07', 1, '2023-10-07 18:16:24');
|
||||
INSERT INTO `t_menu` VALUES (165, '查询', 3, 47, NULL, NULL, NULL, 1, 'goods:query', 'goods:query', NULL, 47, 0, NULL, 0, 1, 0, 0, 1, '2022-10-16 19:55:39', 1, '2023-10-07 13:58:28');
|
||||
@@ -657,6 +657,26 @@ INSERT INTO `t_menu` VALUES (233, 'knife4j文档', 2, 218, 4, '/knife4j', NULL,
|
||||
INSERT INTO `t_menu` VALUES (234, 'swagger文档', 2, 218, 5, '/swagger', 'http://localhost:1024/swagger-ui/index.html', 1, NULL, NULL, 'ApiOutlined', NULL, 1, 'http://localhost:1024/swagger-ui/index.html', 1, 1, 0, 0, 1, '2024-07-02 20:35:43', 1, '2024-07-08 13:49:26');
|
||||
INSERT INTO `t_menu` VALUES (250, '三级等保设置', 2, 213, 1, '/support/level3protect/level3-protect-config-index', '/support/level3protect/level3-protect-config-index.vue', 1, NULL, NULL, 'SafetyOutlined', NULL, 0, NULL, 1, 1, 0, 0, 44, '2024-08-13 11:41:02', 44, '2024-08-13 11:58:12');
|
||||
INSERT INTO `t_menu` VALUES (251, '敏感数据脱敏', 2, 213, 3, '/support/level3protect/data-masking-list', '/support/level3protect/data-masking-list.vue', 1, NULL, NULL, 'FileProtectOutlined', NULL, 0, NULL, 1, 1, 0, 0, 44, '2024-08-13 11:58:00', 44, '2024-08-13 11:59:49');
|
||||
INSERT INTO `t_menu` VALUES (252, '启用/禁用', 3, 110, NULL, NULL, NULL, 1, 'support:dict:updateDisabled', 'support:dict:updateDisabled', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:44:12', 1, '2025-04-08 19:46:03');
|
||||
INSERT INTO `t_menu` VALUES (253, '查询字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:query', 'support:dictData:query', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:46:47', NULL, '2025-04-08 19:46:47');
|
||||
INSERT INTO `t_menu` VALUES (254, '添加字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:add', 'support:dictData:add', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:48:00', NULL, '2025-04-08 19:48:00');
|
||||
INSERT INTO `t_menu` VALUES (255, '更新字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:update', 'support:dictData:update', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:48:19', NULL, '2025-04-08 19:48:19');
|
||||
INSERT INTO `t_menu` VALUES (256, '删除字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:delete', 'support:dictData:delete', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:48:38', NULL, '2025-04-08 19:48:38');
|
||||
INSERT INTO `t_menu` VALUES (257, '启用/禁用字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:updateDisabled', 'support:dictData:updateDisabled', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:48:57', NULL, '2025-04-08 19:48:57');
|
||||
INSERT INTO `t_menu` VALUES (258, '查询企业员工', 3, 145, NULL, NULL, NULL, 1, 'oa:enterprise:queryEmployee', 'oa:enterprise:queryEmployee', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:11:46', 75, '2025-04-08 21:12:24');
|
||||
INSERT INTO `t_menu` VALUES (259, '查询银行信息', 3, 145, NULL, NULL, NULL, 1, 'oa:bank:query', 'oa:bank:query', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:12:40', NULL, '2025-04-08 21:12:40');
|
||||
INSERT INTO `t_menu` VALUES (260, '查询发票信息', 3, 145, NULL, NULL, NULL, 1, 'oa:invoice:query', 'oa:invoice:query', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:12:56', NULL, '2025-04-08 21:12:56');
|
||||
INSERT INTO `t_menu` VALUES (261, '添加企业员工', 3, 145, NULL, NULL, NULL, 1, 'oa:enterprise:addEmployee', 'oa:enterprise:addEmployee', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:35:34', NULL, '2025-04-08 21:35:34');
|
||||
INSERT INTO `t_menu` VALUES (262, '删除企业员工', 3, 145, NULL, NULL, NULL, 1, 'oa:enterprise:deleteEmployee', 'oa:enterprise:deleteEmployee', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:40:17', NULL, '2025-04-08 21:40:17');
|
||||
INSERT INTO `t_menu` VALUES (263, '添加银行信息', 3, 145, NULL, NULL, NULL, 1, 'oa:bank:add', 'oa:bank:add', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:45:44', NULL, '2025-04-08 21:45:44');
|
||||
INSERT INTO `t_menu` VALUES (264, '更新银行信息', 3, 145, NULL, NULL, NULL, 1, 'oa:bank:update', 'oa:bank:update', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:02', NULL, '2025-04-08 21:46:02');
|
||||
INSERT INTO `t_menu` VALUES (265, '删除银行信息', 3, 145, NULL, NULL, NULL, 1, 'oa:bank:delete', 'oa:bank:delete', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:12', NULL, '2025-04-08 21:46:12');
|
||||
INSERT INTO `t_menu` VALUES (266, '添加发票信息', 3, 145, NULL, NULL, NULL, 1, 'oa:invoice:add', 'oa:invoice:add', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:30', NULL, '2025-04-08 21:46:30');
|
||||
INSERT INTO `t_menu` VALUES (267, '更新发票信息', 3, 145, NULL, NULL, NULL, 1, 'oa:invoice:update', 'oa:invoice:update', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:47', NULL, '2025-04-08 21:46:47');
|
||||
INSERT INTO `t_menu` VALUES (268, '删除发票信息', 3, 145, NULL, NULL, NULL, 1, 'oa:invoice:delete', 'oa:invoice:delete', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:59', NULL, '2025-04-08 21:46:59');
|
||||
INSERT INTO `t_menu` VALUES (300, '消息管理', 2, 50, 30, '/message', '/support/message/message-list.vue', 1, NULL, NULL, 'MailOutlined', NULL, 0, NULL, 0, 1, 0, 0, 1, '2025-04-09 14:30:04', 1, '2025-04-10 20:19:36');
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_message
|
||||
|
||||
21
sql/sql-update-log/v3.18.0.sql
Normal file
21
sql/sql-update-log/v3.18.0.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
INSERT INTO `t_menu` VALUES (252, '启用/禁用', 3, 110, NULL, NULL, NULL, 1, 'support:dict:updateDisabled', 'support:dict:updateDisabled', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:44:12', 1, '2025-04-08 19:46:03');
|
||||
INSERT INTO `t_menu` VALUES (253, '查询字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:query', 'support:dictData:query', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:46:47', NULL, '2025-04-08 19:46:47');
|
||||
INSERT INTO `t_menu` VALUES (254, '添加字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:add', 'support:dictData:add', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:48:00', NULL, '2025-04-08 19:48:00');
|
||||
INSERT INTO `t_menu` VALUES (255, '更新字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:update', 'support:dictData:update', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:48:19', NULL, '2025-04-08 19:48:19');
|
||||
INSERT INTO `t_menu` VALUES (256, '删除字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:delete', 'support:dictData:delete', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:48:38', NULL, '2025-04-08 19:48:38');
|
||||
INSERT INTO `t_menu` VALUES (257, '启用/禁用字典数据', 3, 110, NULL, NULL, NULL, 1, 'support:dictData:updateDisabled', 'support:dictData:updateDisabled', NULL, 110, 0, NULL, 0, 1, 0, 0, 1, '2025-04-08 19:48:57', NULL, '2025-04-08 19:48:57');
|
||||
|
||||
INSERT INTO `t_menu` VALUES (258, '查询企业员工', 3, 145, NULL, NULL, NULL, 1, 'oa:enterprise:queryEmployee', 'oa:enterprise:queryEmployee', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:11:46', 75, '2025-04-08 21:12:24');
|
||||
INSERT INTO `t_menu` VALUES (259, '查询银行信息', 3, 145, NULL, NULL, NULL, 1, 'oa:bank:query', 'oa:bank:query', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:12:40', NULL, '2025-04-08 21:12:40');
|
||||
INSERT INTO `t_menu` VALUES (260, '查询发票信息', 3, 145, NULL, NULL, NULL, 1, 'oa:invoice:query', 'oa:invoice:query', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:12:56', NULL, '2025-04-08 21:12:56');
|
||||
INSERT INTO `t_menu` VALUES (261, '添加企业员工', 3, 145, NULL, NULL, NULL, 1, 'oa:enterprise:addEmployee', 'oa:enterprise:addEmployee', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:35:34', NULL, '2025-04-08 21:35:34');
|
||||
INSERT INTO `t_menu` VALUES (262, '删除企业员工', 3, 145, NULL, NULL, NULL, 1, 'oa:enterprise:deleteEmployee', 'oa:enterprise:deleteEmployee', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:40:17', NULL, '2025-04-08 21:40:17');
|
||||
INSERT INTO `t_menu` VALUES (263, '添加银行信息', 3, 145, NULL, NULL, NULL, 1, 'oa:bank:add', 'oa:bank:add', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:45:44', NULL, '2025-04-08 21:45:44');
|
||||
INSERT INTO `t_menu` VALUES (264, '更新银行信息', 3, 145, NULL, NULL, NULL, 1, 'oa:bank:update', 'oa:bank:update', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:02', NULL, '2025-04-08 21:46:02');
|
||||
INSERT INTO `t_menu` VALUES (265, '删除银行信息', 3, 145, NULL, NULL, NULL, 1, 'oa:bank:delete', 'oa:bank:delete', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:12', NULL, '2025-04-08 21:46:12');
|
||||
INSERT INTO `t_menu` VALUES (266, '添加发票信息', 3, 145, NULL, NULL, NULL, 1, 'oa:invoice:add', 'oa:invoice:add', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:30', NULL, '2025-04-08 21:46:30');
|
||||
INSERT INTO `t_menu` VALUES (267, '更新发票信息', 3, 145, NULL, NULL, NULL, 1, 'oa:invoice:update', 'oa:invoice:update', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:47', NULL, '2025-04-08 21:46:47');
|
||||
INSERT INTO `t_menu` VALUES (268, '删除发票信息', 3, 145, NULL, NULL, NULL, 1, 'oa:invoice:delete', 'oa:invoice:delete', NULL, 145, 0, NULL, 0, 1, 0, 0, 75, '2025-04-08 21:46:59', NULL, '2025-04-08 21:46:59');
|
||||
|
||||
|
||||
INSERT INTO `t_menu` VALUES (300, '消息管理', 2, 50, 30, '/message', '/support/message/message-list.vue', 1, NULL, NULL, 'MailOutlined', NULL, 0, NULL, 0, 1, 0, 0, 1, '2025-04-09 14:30:04', 1, '2025-04-10 20:19:36');
|
||||
Reference in New Issue
Block a user