20260325稳定版

This commit is contained in:
2026-03-25 16:00:47 +08:00
parent 95d43746f6
commit 4d788ca727
203 changed files with 4818 additions and 19243 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
VITE_APP_NAME=后台管理系统
VITE_API_URL=http://127.0.0.1:10051/api
#VITE_API_URL=https://sifa-api.wsdns.cn/api
#VITE_API_URL=https://guoxue.gxwebsoft.com/api
+1 -1
View File
@@ -1,2 +1,2 @@
VITE_APP_NAME=后台管理系统
VITE_API_URL=https://sifa-api.wsdns.cn/api
VITE_API_URL=https://guoxue.gxwebsoft.com/api
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ArticleCollect, ArticleCollectParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageArticleCollect(params: ArticleCollectParam) {
const res = await request.get<ApiResult<PageResult<ArticleCollect>>>(
MODULES_API_URL + '/cms/article-collect/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listArticleCollect(params?: ArticleCollectParam) {
const res = await request.get<ApiResult<ArticleCollect[]>>(
MODULES_API_URL + '/cms/article-collect',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addArticleCollect(data: ArticleCollect) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-collect',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateArticleCollect(data: ArticleCollect) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-collect',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeArticleCollect(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-collect/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchArticleCollect(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-collect/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getArticleCollect(id: number) {
const res = await request.get<ApiResult<ArticleCollect>>(
MODULES_API_URL + '/cms/article-collect/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,31 +1,31 @@
import type { PageParam } from '@/api';
/**
* 公证配置
*
*/
export interface LawNotaryConfig {
export interface ArticleCollect {
//
id?: number;
//
title?: string;
// 配置
configList?: string;
articleId?: number;
//
userId?: number;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 公证配置搜索条件
* 搜索条件
*/
export interface LawNotaryConfigParam extends PageParam {
export interface ArticleCollectParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ArticleComment, ArticleCommentParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageArticleComment(params: ArticleCommentParam) {
const res = await request.get<ApiResult<PageResult<ArticleComment>>>(
MODULES_API_URL + '/cms/article-comment/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listArticleComment(params?: ArticleCommentParam) {
const res = await request.get<ApiResult<ArticleComment[]>>(
MODULES_API_URL + '/cms/article-comment',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addArticleComment(data: ArticleComment) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-comment',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateArticleComment(data: ArticleComment) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-comment',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeArticleComment(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-comment/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchArticleComment(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-comment/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getArticleComment(id: number) {
const res = await request.get<ApiResult<ArticleComment>>(
MODULES_API_URL + '/cms/article-comment/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -3,26 +3,22 @@ import type { PageParam } from '@/api';
/**
*
*/
export interface LawOrgPeople {
export interface ArticleComment {
//
id?: number;
//
orgId?: number;
//
name?: string;
//
phone?: string;
//
position?: string;
//
type?: string;
articleId?: number;
//
userId?: number;
//
content?: string;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
@@ -31,7 +27,7 @@ export interface LawOrgPeople {
/**
* 搜索条件
*/
export interface LawOrgPeopleParam extends PageParam {
export interface ArticleCommentParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Manuscript, ManuscriptParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询稿件
*/
export async function pageManuscript(params: ManuscriptParam) {
const res = await request.get<ApiResult<PageResult<Manuscript>>>(
MODULES_API_URL + '/cms/manuscript/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询稿件列表
*/
export async function listManuscript(params?: ManuscriptParam) {
const res = await request.get<ApiResult<Manuscript[]>>(
MODULES_API_URL + '/cms/manuscript',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加稿件
*/
export async function addManuscript(data: Manuscript) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/manuscript',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改稿件
*/
export async function updateManuscript(data: Manuscript) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/manuscript',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除稿件
*/
export async function removeManuscript(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/manuscript/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除稿件
*/
export async function removeBatchManuscript(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/manuscript/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询稿件
*/
export async function getManuscript(id: number) {
const res = await request.get<ApiResult<Manuscript>>(
MODULES_API_URL + '/cms/manuscript/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,19 +1,17 @@
import type { PageParam } from '@/api';
/**
* 法律计算器配置
* 稿件
*/
export interface LawLegalCalType {
export interface Manuscript {
//
id?: number;
//
icon?: string;
//
title?: string;
// 类型
sortNumber?: number;
//
userId?: number;
content?: string;
//
cover?: string;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
@@ -22,12 +20,18 @@ export interface LawLegalCalType {
createTime?: string;
// 修改时间
updateTime?: string;
//
userId?: number;
//
sortNumber?: number;
// 待审核
status?: string;
}
/**
* 法律计算器配置搜索条件
* 稿件搜索条件
*/
export interface LawLegalCalTypeParam extends PageParam {
export interface ManuscriptParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ArticleCollect, ArticleCollectParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageArticleCollect(params: ArticleCollectParam) {
const res = await request.get<ApiResult<PageResult<ArticleCollect>>>(
MODULES_API_URL + '/gx/article-collect/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listArticleCollect(params?: ArticleCollectParam) {
const res = await request.get<ApiResult<ArticleCollect[]>>(
MODULES_API_URL + '/gx/article-collect',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addArticleCollect(data: ArticleCollect) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/gx/article-collect',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateArticleCollect(data: ArticleCollect) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/gx/article-collect',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeArticleCollect(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/gx/article-collect/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchArticleCollect(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/gx/article-collect/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getArticleCollect(id: number) {
const res = await request.get<ApiResult<ArticleCollect>>(
MODULES_API_URL + '/gx/article-collect/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,31 +1,31 @@
import type { PageParam } from '@/api';
/**
* 用户填写法律文书内容
*
*/
export interface LawLegalDocContent {
export interface ArticleCollect {
//
id?: number;
//
groupId?: number;
//
content?: string;
articleId?: number;
//
userId?: number;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 用户填写法律文书内容搜索条件
* 搜索条件
*/
export interface LawLegalDocContentParam extends PageParam {
export interface ArticleCollectParam extends PageParam {
id?: number;
keywords?: string;
}
@@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawNotaryList, LawNotaryListParam } from './model';
import type { GxChatHistory, GxChatHistoryParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询公证列表
* 分页查询
*/
export async function pageLawNotaryList(params: LawNotaryListParam) {
const res = await request.get<ApiResult<PageResult<LawNotaryList>>>(
MODULES_API_URL + '/law/law-notary-list/page',
export async function pageGxChatHistory(params: GxChatHistoryParam) {
const res = await request.get<ApiResult<PageResult<GxChatHistory>>>(
MODULES_API_URL + '/gx/gx-chat-history/page',
{
params
}
@@ -20,11 +20,11 @@ export async function pageLawNotaryList(params: LawNotaryListParam) {
}
/**
* 查询公证列表列表
* 查询列表
*/
export async function listLawNotaryList(params?: LawNotaryListParam) {
const res = await request.get<ApiResult<LawNotaryList[]>>(
MODULES_API_URL + '/law/law-notary-list',
export async function listGxChatHistory(params?: GxChatHistoryParam) {
const res = await request.get<ApiResult<GxChatHistory[]>>(
MODULES_API_URL + '/gx/gx-chat-history',
{
params
}
@@ -36,11 +36,11 @@ export async function listLawNotaryList(params?: LawNotaryListParam) {
}
/**
* 添加公证列表
* 添加
*/
export async function addLawNotaryList(data: LawNotaryList) {
export async function addGxChatHistory(data: GxChatHistory) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-notary-list',
MODULES_API_URL + '/gx/gx-chat-history',
data
);
if (res.data.code === 0) {
@@ -50,11 +50,11 @@ export async function addLawNotaryList(data: LawNotaryList) {
}
/**
* 修改公证列表
* 修改
*/
export async function updateLawNotaryList(data: LawNotaryList) {
export async function updateGxChatHistory(data: GxChatHistory) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-notary-list',
MODULES_API_URL + '/gx/gx-chat-history',
data
);
if (res.data.code === 0) {
@@ -64,11 +64,11 @@ export async function updateLawNotaryList(data: LawNotaryList) {
}
/**
* 删除公证列表
* 删除
*/
export async function removeLawNotaryList(id?: number) {
export async function removeGxChatHistory(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-notary-list/' + id
MODULES_API_URL + '/gx/gx-chat-history/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -77,11 +77,11 @@ export async function removeLawNotaryList(id?: number) {
}
/**
* 批量删除公证列表
* 批量删除
*/
export async function removeBatchLawNotaryList(data: (number | undefined)[]) {
export async function removeBatchGxChatHistory(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-notary-list/batch',
MODULES_API_URL + '/gx/gx-chat-history/batch',
{
data
}
@@ -93,11 +93,11 @@ export async function removeBatchLawNotaryList(data: (number | undefined)[]) {
}
/**
* 根据id查询公证列表
* 根据id查询
*/
export async function getLawNotaryList(id: number) {
const res = await request.get<ApiResult<LawNotaryList>>(
MODULES_API_URL + '/law/law-notary-list/' + id
export async function getGxChatHistory(id: number) {
const res = await request.get<ApiResult<GxChatHistory>>(
MODULES_API_URL + '/gx/gx-chat-history/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
@@ -1,31 +1,39 @@
import type { PageParam } from '@/api';
/**
* 用户填写企业法制体检内容
*
*/
export interface LawLegalOrgCheckContent {
export interface GxChatHistory {
//
id?: number;
//
groupId?: number;
chatId?: number;
//
conversationId?: string;
//
userId?: number;
//
content?: string;
//
userId?: number;
reply?: string;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 商户编码
merchantCode?: string;
// 租户id
tenantId?: number;
// 创建时间
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 用户填写企业法制体检内容搜索条件
* 搜索条件
*/
export interface LawLegalOrgCheckContentParam extends PageParam {
export interface GxChatHistoryParam extends PageParam {
id?: number;
keywords?: string;
}
@@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawFeedback, LawFeedbackParam } from './model';
import type { GxChatList, GxChatListParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageLawFeedback(params: LawFeedbackParam) {
const res = await request.get<ApiResult<PageResult<LawFeedback>>>(
MODULES_API_URL + '/law/law-feedback/page',
export async function pageGxChatList(params: GxChatListParam) {
const res = await request.get<ApiResult<PageResult<GxChatList>>>(
MODULES_API_URL + '/gx/gx-chat-list/page',
{
params
}
@@ -22,9 +22,9 @@ export async function pageLawFeedback(params: LawFeedbackParam) {
/**
* 查询列表
*/
export async function listLawFeedback(params?: LawFeedbackParam) {
const res = await request.get<ApiResult<LawFeedback[]>>(
MODULES_API_URL + '/law/law-feedback',
export async function listGxChatList(params?: GxChatListParam) {
const res = await request.get<ApiResult<GxChatList[]>>(
MODULES_API_URL + '/gx/gx-chat-list',
{
params
}
@@ -38,9 +38,9 @@ export async function listLawFeedback(params?: LawFeedbackParam) {
/**
* 添加
*/
export async function addLawFeedback(data: LawFeedback) {
export async function addGxChatList(data: GxChatList) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-feedback',
MODULES_API_URL + '/gx/gx-chat-list',
data
);
if (res.data.code === 0) {
@@ -52,9 +52,9 @@ export async function addLawFeedback(data: LawFeedback) {
/**
* 修改
*/
export async function updateLawFeedback(data: LawFeedback) {
export async function updateGxChatList(data: GxChatList) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-feedback',
MODULES_API_URL + '/gx/gx-chat-list',
data
);
if (res.data.code === 0) {
@@ -66,9 +66,9 @@ export async function updateLawFeedback(data: LawFeedback) {
/**
* 删除
*/
export async function removeLawFeedback(id?: number) {
export async function removeGxChatList(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-feedback/' + id
MODULES_API_URL + '/gx/gx-chat-list/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -79,9 +79,9 @@ export async function removeLawFeedback(id?: number) {
/**
* 批量删除
*/
export async function removeBatchLawFeedback(data: (number | undefined)[]) {
export async function removeBatchGxChatList(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-feedback/batch',
MODULES_API_URL + '/gx/gx-chat-list/batch',
{
data
}
@@ -95,9 +95,9 @@ export async function removeBatchLawFeedback(data: (number | undefined)[]) {
/**
* 根据id查询
*/
export async function getLawFeedback(id: number) {
const res = await request.get<ApiResult<LawFeedback>>(
MODULES_API_URL + '/law/law-feedback/' + id
export async function getGxChatList(id: number) {
const res = await request.get<ApiResult<GxChatList>>(
MODULES_API_URL + '/gx/gx-chat-list/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
+31
View File
@@ -0,0 +1,31 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface GxChatList {
//
id?: number;
//
conversationId?: string;
//
uid?: number;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 搜索条件
*/
export interface GxChatListParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GxCoinLog, GxCoinLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询金币记录
*/
export async function pageGxCoinLog(params: GxCoinLogParam) {
const res = await request.get<ApiResult<PageResult<GxCoinLog>>>(
MODULES_API_URL + '/gx/gx-coin-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询金币记录列表
*/
export async function listGxCoinLog(params?: GxCoinLogParam) {
const res = await request.get<ApiResult<GxCoinLog[]>>(
MODULES_API_URL + '/gx/gx-coin-log',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加金币记录
*/
export async function addGxCoinLog(data: GxCoinLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/gx/gx-coin-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改金币记录
*/
export async function updateGxCoinLog(data: GxCoinLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/gx/gx-coin-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除金币记录
*/
export async function removeGxCoinLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/gx/gx-coin-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除金币记录
*/
export async function removeBatchGxCoinLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/gx/gx-coin-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询金币记录
*/
export async function getGxCoinLog(id: number) {
const res = await request.get<ApiResult<GxCoinLog>>(
MODULES_API_URL + '/gx/gx-coin-log/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+43
View File
@@ -0,0 +1,43 @@
import type { PageParam } from '@/api';
/**
* 金币记录
*/
export interface GxCoinLog {
//
id?: number;
//
orderNo?: string;
//
userId?: number;
// +/-
type?: string;
//
num?: number;
// 描述
desc?: string;
//
sortNumber?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
//
paidNo?: string;
// 0待支付 1已支付
status?: number;
}
/**
* 金币记录搜索条件
*/
export interface GxCoinLogParam extends PageParam {
id?: number;
// 用户id
userId?: number;
keywords?: string;
}
@@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawOrgPeople, LawOrgPeopleParam } from './model';
import type { GxFeedback, GxFeedbackParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageLawOrgPeople(params: LawOrgPeopleParam) {
const res = await request.get<ApiResult<PageResult<LawOrgPeople>>>(
MODULES_API_URL + '/law/law-org-people/page',
export async function pageGxFeedback(params: GxFeedbackParam) {
const res = await request.get<ApiResult<PageResult<GxFeedback>>>(
MODULES_API_URL + '/gx/gx-feedback/page',
{
params
}
@@ -22,9 +22,9 @@ export async function pageLawOrgPeople(params: LawOrgPeopleParam) {
/**
* 查询列表
*/
export async function listLawOrgPeople(params?: LawOrgPeopleParam) {
const res = await request.get<ApiResult<LawOrgPeople[]>>(
MODULES_API_URL + '/law/law-org-people',
export async function listGxFeedback(params?: GxFeedbackParam) {
const res = await request.get<ApiResult<GxFeedback[]>>(
MODULES_API_URL + '/gx/gx-feedback',
{
params
}
@@ -38,9 +38,9 @@ export async function listLawOrgPeople(params?: LawOrgPeopleParam) {
/**
* 添加
*/
export async function addLawOrgPeople(data: LawOrgPeople) {
export async function addGxFeedback(data: GxFeedback) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org-people',
MODULES_API_URL + '/gx/gx-feedback',
data
);
if (res.data.code === 0) {
@@ -52,9 +52,9 @@ export async function addLawOrgPeople(data: LawOrgPeople) {
/**
* 修改
*/
export async function updateLawOrgPeople(data: LawOrgPeople) {
export async function updateGxFeedback(data: GxFeedback) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org-people',
MODULES_API_URL + '/gx/gx-feedback',
data
);
if (res.data.code === 0) {
@@ -66,9 +66,9 @@ export async function updateLawOrgPeople(data: LawOrgPeople) {
/**
* 删除
*/
export async function removeLawOrgPeople(id?: number) {
export async function removeGxFeedback(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org-people/' + id
MODULES_API_URL + '/gx/gx-feedback/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -79,9 +79,9 @@ export async function removeLawOrgPeople(id?: number) {
/**
* 批量删除
*/
export async function removeBatchLawOrgPeople(data: (number | undefined)[]) {
export async function removeBatchGxFeedback(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org-people/batch',
MODULES_API_URL + '/gx/gx-feedback/batch',
{
data
}
@@ -95,9 +95,9 @@ export async function removeBatchLawOrgPeople(data: (number | undefined)[]) {
/**
* 根据id查询
*/
export async function getLawOrgPeople(id: number) {
const res = await request.get<ApiResult<LawOrgPeople>>(
MODULES_API_URL + '/law/law-org-people/' + id
export async function getGxFeedback(id: number) {
const res = await request.get<ApiResult<GxFeedback>>(
MODULES_API_URL + '/gx/gx-feedback/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
@@ -1,35 +1,37 @@
import type { PageParam } from '@/api';
/**
* 法律计算器配置
*
*/
export interface LawLegalCalConfig {
export interface GxFeedback {
//
id?: number;
// 功能体验
funcExp?: string;
// 咨询体验
advisoryExp?: string;
//
typeId?: number;
//
title?: string;
// 类型
type?: string;
// 内容
answer?: string;
comments?: string;
//
userId?: number;
//
sortNumber?: number;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 法律计算器配置搜索条件
* 搜索条件
*/
export interface LawLegalCalConfigParam extends PageParam {
export interface GxFeedbackParam extends PageParam {
id?: number;
keywords?: string;
}
+141
View File
@@ -0,0 +1,141 @@
import request from "@/utils/request";
import type { ApiResult, PageResult } from "@/api";
import type { GxRole, GxRoleParam } from "./model";
import { MODULES_API_URL } from "@/config/setting";
/**
* 分页查询
*/
export async function pageGxRole(params: GxRoleParam) {
const res = await request.get<ApiResult<PageResult<GxRole>>>(
MODULES_API_URL + "/gx/gx-role/page",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listGxRole(params?: GxRoleParam) {
const res = await request.get<ApiResult<GxRole[]>>(
MODULES_API_URL + "/gx/gx-role",
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addGxRole(data: GxRole) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + "/gx/gx-role",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateGxRole(data: GxRole) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + "/gx/gx-role",
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeGxRole(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + "/gx/gx-role/" + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchGxRole(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + "/gx/gx-role/batch",
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getGxRole(id: number) {
const res = await request.get<ApiResult<GxRole>>(
MODULES_API_URL + "/gx/gx-role/" + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
export interface VoiceMakeParam {
voice: string;
text: string;
emo?: string;
}
export type VoiceMakeResult =
| string
| {
url?: string;
audioUrl?: string;
src?: string;
path?: string;
};
/**
* 角色音色试听
*/
export async function makeVoice(params: VoiceMakeParam) {
const { voice, text, emo } = params;
const res = await request.post<ApiResult<VoiceMakeResult | undefined>>(
`${MODULES_API_URL}/voice/make`,
{
text,
content: text,
emo,
voice
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+41
View File
@@ -0,0 +1,41 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface GxRole {
//
id?: number;
// 角色名称
roleName?: string;
// 提示词
prompt?: string;
// 角色描述
roleDesc?: string;
// 角色头像
avatar?: string;
// 背景图片
bgImage?: string;
// 音色
voice?: string;
// 情绪
emo?: string;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 搜索条件
*/
export interface GxRoleParam extends PageParam {
id?: number;
keywords?: string;
}
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { GxSignLog, GxSignLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageGxSignLog(params: GxSignLogParam) {
const res = await request.get<ApiResult<PageResult<GxSignLog>>>(
MODULES_API_URL + '/gx/gx-sign-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listGxSignLog(params?: GxSignLogParam) {
const res = await request.get<ApiResult<GxSignLog[]>>(
MODULES_API_URL + '/gx/gx-sign-log',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addGxSignLog(data: GxSignLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/gx/gx-sign-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateGxSignLog(data: GxSignLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/gx/gx-sign-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeGxSignLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/gx/gx-sign-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchGxSignLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/gx/gx-sign-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getGxSignLog(id: number) {
const res = await request.get<ApiResult<GxSignLog>>(
MODULES_API_URL + '/gx/gx-sign-log/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -3,30 +3,22 @@ import type { PageParam } from '@/api';
/**
*
*/
export interface LawFeedback {
export interface GxSignLog {
//
id?: number;
//
userId?: number;
//
title?: string;
//
company?: string;
//
address?: string;
//
date?: string;
//
pics?: string;
//
video?: string;
//
content?: string;
sortNumber?: number;
// 状态, 0正常, 1冻结
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
// 注册时间
createTime?: string;
// 修改时间
updateTime?: string;
@@ -35,7 +27,7 @@ export interface LawFeedback {
/**
* 搜索条件
*/
export interface LawFeedbackParam extends PageParam {
export interface GxSignLogParam extends PageParam {
id?: number;
keywords?: string;
}
-116
View File
@@ -1,116 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalAid, LawLegalAidParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询法律援助申请
*/
export async function pageLawLegalAid(params: LawLegalAidParam) {
const res = await request.get<ApiResult<PageResult<LawLegalAid>>>(
MODULES_API_URL + '/law/law-legal-aid/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询法律援助申请列表
*/
export async function listLawLegalAid(params?: LawLegalAidParam) {
const res = await request.get<ApiResult<LawLegalAid[]>>(
MODULES_API_URL + '/law/law-legal-aid',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加法律援助申请
*/
export async function addLawLegalAid(data: LawLegalAid) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-aid',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改法律援助申请
*/
export async function updateLawLegalAid(data: LawLegalAid) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-aid',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除法律援助申请
*/
export async function removeLawLegalAid(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-aid/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除法律援助申请
*/
export async function removeBatchLawLegalAid(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-aid/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询法律援助申请
*/
export async function getLawLegalAid(id: number) {
const res = await request.get<ApiResult<LawLegalAid>>(
MODULES_API_URL + '/law/law-legal-aid/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
export async function lawLegalAidExport() {
const res = await request.post<ApiResult<LawLegalAid>>(
MODULES_API_URL + '/law/law-legal-aid/export'
);
if (res.data.code === 0) {
return res.data;
}
return Promise.reject(new Error(res.data.message));
}
-43
View File
@@ -1,43 +0,0 @@
import type { PageParam } from '@/api';
/**
* 法律援助申请
*/
export interface LawLegalAid {
//
id?: number;
//
userId?: number;
//
name?: string;
//
gender?: number;
//
phone?: string;
//
birthday?: string;
//
idCard?: string;
// 住所地址
liveAddress?: string;
// 户籍地址
householdAdderss?: string;
// 说明
content?: string;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 法律援助申请搜索条件
*/
export interface LawLegalAidParam extends PageParam {
id?: number;
keywords?: string;
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalAppraisal, LawLegalAppraisalParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询司法鉴定申请
*/
export async function pageLawLegalAppraisal(params: LawLegalAppraisalParam) {
const res = await request.get<ApiResult<PageResult<LawLegalAppraisal>>>(
MODULES_API_URL + '/law/law-legal-appraisal/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询司法鉴定申请列表
*/
export async function listLawLegalAppraisal(params?: LawLegalAppraisalParam) {
const res = await request.get<ApiResult<LawLegalAppraisal[]>>(
MODULES_API_URL + '/law/law-legal-appraisal',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加司法鉴定申请
*/
export async function addLawLegalAppraisal(data: LawLegalAppraisal) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-appraisal',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改司法鉴定申请
*/
export async function updateLawLegalAppraisal(data: LawLegalAppraisal) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-appraisal',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除司法鉴定申请
*/
export async function removeLawLegalAppraisal(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-appraisal/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除司法鉴定申请
*/
export async function removeBatchLawLegalAppraisal(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-appraisal/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询司法鉴定申请
*/
export async function getLawLegalAppraisal(id: number) {
const res = await request.get<ApiResult<LawLegalAppraisal>>(
MODULES_API_URL + '/law/law-legal-appraisal/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,47 +0,0 @@
import type { PageParam } from '@/api';
/**
* 司法鉴定申请
*/
export interface LawLegalAppraisal {
//
id?: number;
//
userId?: number;
//
name?: string;
//
gender?: number;
//
phone?: string;
//
birthday?: string;
//
idCard?: string;
// 住所地址
liveAddress?: string;
// 户籍地址
householdAddress?: string;
//
orgId?: number;
// 说明
content?: string;
// 详情
detail?: string;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 司法鉴定申请搜索条件
*/
export interface LawLegalAppraisalParam extends PageParam {
id?: number;
keywords?: string;
}
-116
View File
@@ -1,116 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalArbitrate, LawLegalArbitrateParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询法律仲裁申请
*/
export async function pageLawLegalArbitrate(params: LawLegalArbitrateParam) {
const res = await request.get<ApiResult<PageResult<LawLegalArbitrate>>>(
MODULES_API_URL + '/law/law-legal-arbitrate/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询法律仲裁申请列表
*/
export async function listLawLegalArbitrate(params?: LawLegalArbitrateParam) {
const res = await request.get<ApiResult<LawLegalArbitrate[]>>(
MODULES_API_URL + '/law/law-legal-arbitrate',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加法律仲裁申请
*/
export async function addLawLegalArbitrate(data: LawLegalArbitrate) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-arbitrate',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改法律仲裁申请
*/
export async function updateLawLegalArbitrate(data: LawLegalArbitrate) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-arbitrate',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除法律仲裁申请
*/
export async function removeLawLegalArbitrate(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-arbitrate/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除法律仲裁申请
*/
export async function removeBatchLawLegalArbitrate(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-arbitrate/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询法律仲裁申请
*/
export async function getLawLegalArbitrate(id: number) {
const res = await request.get<ApiResult<LawLegalArbitrate>>(
MODULES_API_URL + '/law/law-legal-arbitrate/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
export async function lawLegalArbitrateExport() {
const res = await request.post<ApiResult<LawLegalArbitrate>>(
MODULES_API_URL + '/law/law-legal-arbitrate/export'
);
if (res.data.code === 0) {
return res.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,57 +0,0 @@
import type { PageParam } from '@/api';
/**
* 法律仲裁申请
*/
export interface LawLegalArbitrate {
//
id?: number;
//
userId?: number;
//
name?: string;
//
gender?: number;
//
phone?: string;
//
birthday?: string;
//
idCard?: string;
// 住所地址
liveAddress?: string;
// 户籍地址
householdAddress?: string;
// 事实和理由
content?: string;
// 仲裁请求
requestContent?: string;
// 被申请人
beenName?: string;
// 被申请人地址
beenAddress?: string;
// 被申请人代码
beenCode?: string;
// 被申请人联系方式
beenPhone?: string;
// 法定代表人
beenLegalName?: string;
// 职位
beenLegalPosition?: string;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 法律仲裁申请搜索条件
*/
export interface LawLegalArbitrateParam extends PageParam {
id?: number;
keywords?: string;
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalCalConfig, LawLegalCalConfigParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询法律计算器配置
*/
export async function pageLawLegalCalConfig(params: LawLegalCalConfigParam) {
const res = await request.get<ApiResult<PageResult<LawLegalCalConfig>>>(
MODULES_API_URL + '/law/law-legal-cal-config/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询法律计算器配置列表
*/
export async function listLawLegalCalConfig(params?: LawLegalCalConfigParam) {
const res = await request.get<ApiResult<LawLegalCalConfig[]>>(
MODULES_API_URL + '/law/law-legal-cal-config',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加法律计算器配置
*/
export async function addLawLegalCalConfig(data: LawLegalCalConfig) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改法律计算器配置
*/
export async function updateLawLegalCalConfig(data: LawLegalCalConfig) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除法律计算器配置
*/
export async function removeLawLegalCalConfig(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-config/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除法律计算器配置
*/
export async function removeBatchLawLegalCalConfig(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-config/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询法律计算器配置
*/
export async function getLawLegalCalConfig(id: number) {
const res = await request.get<ApiResult<LawLegalCalConfig>>(
MODULES_API_URL + '/law/law-legal-cal-config/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalCalContent, LawLegalCalContentParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询用户填写法律计算器内容
*/
export async function pageLawLegalCalContent(params: LawLegalCalContentParam) {
const res = await request.get<ApiResult<PageResult<LawLegalCalContent>>>(
MODULES_API_URL + '/law/law-legal-cal-content/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询用户填写法律计算器内容列表
*/
export async function listLawLegalCalContent(params?: LawLegalCalContentParam) {
const res = await request.get<ApiResult<LawLegalCalContent[]>>(
MODULES_API_URL + '/law/law-legal-cal-content',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加用户填写法律计算器内容
*/
export async function addLawLegalCalContent(data: LawLegalCalContent) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-content',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改用户填写法律计算器内容
*/
export async function updateLawLegalCalContent(data: LawLegalCalContent) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-content',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除用户填写法律计算器内容
*/
export async function removeLawLegalCalContent(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-content/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除用户填写法律计算器内容
*/
export async function removeBatchLawLegalCalContent(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-content/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询用户填写法律计算器内容
*/
export async function getLawLegalCalContent(id: number) {
const res = await request.get<ApiResult<LawLegalCalContent>>(
MODULES_API_URL + '/law/law-legal-cal-content/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,31 +0,0 @@
import type { PageParam } from '@/api';
/**
* 用户填写法律计算器内容
*/
export interface LawLegalCalContent {
//
id?: number;
//
groupId?: number;
//
content?: string;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 用户填写法律计算器内容搜索条件
*/
export interface LawLegalCalContentParam extends PageParam {
id?: number;
keywords?: string;
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalCalType, LawLegalCalTypeParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询法律计算器配置
*/
export async function pageLawLegalCalType(params: LawLegalCalTypeParam) {
const res = await request.get<ApiResult<PageResult<LawLegalCalType>>>(
MODULES_API_URL + '/law/law-legal-cal-type/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询法律计算器配置列表
*/
export async function listLawLegalCalType(params?: LawLegalCalTypeParam) {
const res = await request.get<ApiResult<LawLegalCalType[]>>(
MODULES_API_URL + '/law/law-legal-cal-type',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加法律计算器配置
*/
export async function addLawLegalCalType(data: LawLegalCalType) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-type',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改法律计算器配置
*/
export async function updateLawLegalCalType(data: LawLegalCalType) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-type',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除法律计算器配置
*/
export async function removeLawLegalCalType(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-type/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除法律计算器配置
*/
export async function removeBatchLawLegalCalType(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-cal-type/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询法律计算器配置
*/
export async function getLawLegalCalType(id: number) {
const res = await request.get<ApiResult<LawLegalCalType>>(
MODULES_API_URL + '/law/law-legal-cal-type/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalDocConfig, LawLegalDocConfigParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询法律文书配置
*/
export async function pageLawLegalDocConfig(params: LawLegalDocConfigParam) {
const res = await request.get<ApiResult<PageResult<LawLegalDocConfig>>>(
MODULES_API_URL + '/law/law-legal-doc-config/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询法律文书配置列表
*/
export async function listLawLegalDocConfig(params?: LawLegalDocConfigParam) {
const res = await request.get<ApiResult<LawLegalDocConfig[]>>(
MODULES_API_URL + '/law/law-legal-doc-config',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加法律文书配置
*/
export async function addLawLegalDocConfig(data: LawLegalDocConfig) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改法律文书配置
*/
export async function updateLawLegalDocConfig(data: LawLegalDocConfig) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除法律文书配置
*/
export async function removeLawLegalDocConfig(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-config/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除法律文书配置
*/
export async function removeBatchLawLegalDocConfig(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-config/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询法律文书配置
*/
export async function getLawLegalDocConfig(id: number) {
const res = await request.get<ApiResult<LawLegalDocConfig>>(
MODULES_API_URL + '/law/law-legal-doc-config/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,35 +0,0 @@
import type { PageParam } from '@/api';
/**
* 法律文书配置
*/
export interface LawLegalDocConfig {
//
id?: number;
//
typeId?: number;
//
title?: string;
// 类型
type?: string;
// 内容
answer?: string;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 法律文书配置搜索条件
*/
export interface LawLegalDocConfigParam extends PageParam {
id?: number;
keywords?: string;
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalDocContent, LawLegalDocContentParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询用户填写法律文书内容
*/
export async function pageLawLegalDocContent(params: LawLegalDocContentParam) {
const res = await request.get<ApiResult<PageResult<LawLegalDocContent>>>(
MODULES_API_URL + '/law/law-legal-doc-content/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询用户填写法律文书内容列表
*/
export async function listLawLegalDocContent(params?: LawLegalDocContentParam) {
const res = await request.get<ApiResult<LawLegalDocContent[]>>(
MODULES_API_URL + '/law/law-legal-doc-content',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加用户填写法律文书内容
*/
export async function addLawLegalDocContent(data: LawLegalDocContent) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-content',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改用户填写法律文书内容
*/
export async function updateLawLegalDocContent(data: LawLegalDocContent) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-content',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除用户填写法律文书内容
*/
export async function removeLawLegalDocContent(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-content/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除用户填写法律文书内容
*/
export async function removeBatchLawLegalDocContent(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-content/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询用户填写法律文书内容
*/
export async function getLawLegalDocContent(id: number) {
const res = await request.get<ApiResult<LawLegalDocContent>>(
MODULES_API_URL + '/law/law-legal-doc-content/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalDocType, LawLegalDocTypeParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询法律文书配置
*/
export async function pageLawLegalDocType(params: LawLegalDocTypeParam) {
const res = await request.get<ApiResult<PageResult<LawLegalDocType>>>(
MODULES_API_URL + '/law/law-legal-doc-type/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询法律文书配置列表
*/
export async function listLawLegalDocType(params?: LawLegalDocTypeParam) {
const res = await request.get<ApiResult<LawLegalDocType[]>>(
MODULES_API_URL + '/law/law-legal-doc-type',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加法律文书配置
*/
export async function addLawLegalDocType(data: LawLegalDocType) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-type',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改法律文书配置
*/
export async function updateLawLegalDocType(data: LawLegalDocType) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-type',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除法律文书配置
*/
export async function removeLawLegalDocType(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-type/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除法律文书配置
*/
export async function removeBatchLawLegalDocType(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-doc-type/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询法律文书配置
*/
export async function getLawLegalDocType(id: number) {
const res = await request.get<ApiResult<LawLegalDocType>>(
MODULES_API_URL + '/law/law-legal-doc-type/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,36 +0,0 @@
import type { PageParam } from "@/api";
/**
* 法律文书配置
*/
export interface LawLegalDocType {
//
id?: number;
//
icon?: string;
//
title?: string;
topContent?: string;
extraContent?: string;
comment?: string;
// 类型
sortNumber?: number;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 法律文书配置搜索条件
*/
export interface LawLegalDocTypeParam extends PageParam {
id?: number;
keywords?: string;
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalOrgCheckConfig, LawLegalOrgCheckConfigParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询企业法制体检配置
*/
export async function pageLawLegalOrgCheckConfig(params: LawLegalOrgCheckConfigParam) {
const res = await request.get<ApiResult<PageResult<LawLegalOrgCheckConfig>>>(
MODULES_API_URL + '/law/law-legal-org-check-config/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询企业法制体检配置列表
*/
export async function listLawLegalOrgCheckConfig(params?: LawLegalOrgCheckConfigParam) {
const res = await request.get<ApiResult<LawLegalOrgCheckConfig[]>>(
MODULES_API_URL + '/law/law-legal-org-check-config',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加企业法制体检配置
*/
export async function addLawLegalOrgCheckConfig(data: LawLegalOrgCheckConfig) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改企业法制体检配置
*/
export async function updateLawLegalOrgCheckConfig(data: LawLegalOrgCheckConfig) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除企业法制体检配置
*/
export async function removeLawLegalOrgCheckConfig(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-config/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除企业法制体检配置
*/
export async function removeBatchLawLegalOrgCheckConfig(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-config/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询企业法制体检配置
*/
export async function getLawLegalOrgCheckConfig(id: number) {
const res = await request.get<ApiResult<LawLegalOrgCheckConfig>>(
MODULES_API_URL + '/law/law-legal-org-check-config/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,34 +0,0 @@
import type { PageParam } from '@/api';
/**
* 企业法制体检配置
*/
export interface LawLegalOrgCheckConfig {
//
id?: number;
typeId?: number;
//
title?: string;
// 类型
type?: string;
// 内容
answer?: string;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 企业法制体检配置搜索条件
*/
export interface LawLegalOrgCheckConfigParam extends PageParam {
id?: number;
keywords?: string;
}
@@ -1,119 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalOrgCheckConfigSuggest, LawLegalOrgCheckConfigSuggestParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询法律意见书配置
*/
export async function pageLawLegalOrgCheckConfigSuggest(params: LawLegalOrgCheckConfigSuggestParam) {
const res = await request.get<ApiResult<PageResult<LawLegalOrgCheckConfigSuggest>>>(
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询法律意见书配置列表
*/
export async function listLawLegalOrgCheckConfigSuggest(params?: LawLegalOrgCheckConfigSuggestParam) {
const res = await request.get<ApiResult<LawLegalOrgCheckConfigSuggest[]>>(
MODULES_API_URL + '/law/law-legal-org-check-config-suggest',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
export async function treeLawLegalOrgCheckConfigSuggest(params?: LawLegalOrgCheckConfigSuggestParam) {
const res = await request.get<ApiResult<LawLegalOrgCheckConfigSuggest[]>>(
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/tree',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加法律意见书配置
*/
export async function addLawLegalOrgCheckConfigSuggest(data: LawLegalOrgCheckConfigSuggest) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-config-suggest',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改法律意见书配置
*/
export async function updateLawLegalOrgCheckConfigSuggest(data: LawLegalOrgCheckConfigSuggest) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-config-suggest',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除法律意见书配置
*/
export async function removeLawLegalOrgCheckConfigSuggest(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除法律意见书配置
*/
export async function removeBatchLawLegalOrgCheckConfigSuggest(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询法律意见书配置
*/
export async function getLawLegalOrgCheckConfigSuggest(id: number) {
const res = await request.get<ApiResult<LawLegalOrgCheckConfigSuggest>>(
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,35 +0,0 @@
import type { PageParam } from '@/api';
/**
* 法律意见书配置
*/
export interface LawLegalOrgCheckConfigSuggest {
//
id?: number;
//
typeId?: number;
//
title?: string;
// 类型
type?: string;
// 内容
answer?: string;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 法律意见书配置搜索条件
*/
export interface LawLegalOrgCheckConfigSuggestParam extends PageParam {
id?: number;
keywords?: string;
}
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalOrgCheckContent, LawLegalOrgCheckContentParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询用户填写企业法制体检内容
*/
export async function pageLawLegalOrgCheckContent(params: LawLegalOrgCheckContentParam) {
const res = await request.get<ApiResult<PageResult<LawLegalOrgCheckContent>>>(
MODULES_API_URL + '/law/law-legal-org-check-content/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询用户填写企业法制体检内容列表
*/
export async function listLawLegalOrgCheckContent(params?: LawLegalOrgCheckContentParam) {
const res = await request.get<ApiResult<LawLegalOrgCheckContent[]>>(
MODULES_API_URL + '/law/law-legal-org-check-content',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加用户填写企业法制体检内容
*/
export async function addLawLegalOrgCheckContent(data: LawLegalOrgCheckContent) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-content',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改用户填写企业法制体检内容
*/
export async function updateLawLegalOrgCheckContent(data: LawLegalOrgCheckContent) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-content',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除用户填写企业法制体检内容
*/
export async function removeLawLegalOrgCheckContent(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-content/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除用户填写企业法制体检内容
*/
export async function removeBatchLawLegalOrgCheckContent(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-content/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询用户填写企业法制体检内容
*/
export async function getLawLegalOrgCheckContent(id: number) {
const res = await request.get<ApiResult<LawLegalOrgCheckContent>>(
MODULES_API_URL + '/law/law-legal-org-check-content/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalOrgCheckContentSuggest, LawLegalOrgCheckContentSuggestParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询用户填写法律意见书内容
*/
export async function pageLawLegalOrgCheckContentSuggest(params: LawLegalOrgCheckContentSuggestParam) {
const res = await request.get<ApiResult<PageResult<LawLegalOrgCheckContentSuggest>>>(
MODULES_API_URL + '/law/law-legal-org-check-content-suggest/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询用户填写法律意见书内容列表
*/
export async function listLawLegalOrgCheckContentSuggest(params?: LawLegalOrgCheckContentSuggestParam) {
const res = await request.get<ApiResult<LawLegalOrgCheckContentSuggest[]>>(
MODULES_API_URL + '/law/law-legal-org-check-content-suggest',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加用户填写法律意见书内容
*/
export async function addLawLegalOrgCheckContentSuggest(data: LawLegalOrgCheckContentSuggest) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-content-suggest',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改用户填写法律意见书内容
*/
export async function updateLawLegalOrgCheckContentSuggest(data: LawLegalOrgCheckContentSuggest) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-content-suggest',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除用户填写法律意见书内容
*/
export async function removeLawLegalOrgCheckContentSuggest(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-content-suggest/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除用户填写法律意见书内容
*/
export async function removeBatchLawLegalOrgCheckContentSuggest(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-content-suggest/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询用户填写法律意见书内容
*/
export async function getLawLegalOrgCheckContentSuggest(id: number) {
const res = await request.get<ApiResult<LawLegalOrgCheckContentSuggest>>(
MODULES_API_URL + '/law/law-legal-org-check-content-suggest/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,31 +0,0 @@
import type { PageParam } from '@/api';
/**
* 用户填写法律意见书内容
*/
export interface LawLegalOrgCheckContentSuggest {
//
id?: number;
//
groupId?: number;
//
content?: string;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 用户填写法律意见书内容搜索条件
*/
export interface LawLegalOrgCheckContentSuggestParam extends PageParam {
id?: number;
keywords?: string;
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalOrgCheckType, LawLegalOrgCheckTypeParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询企业法制体检配置
*/
export async function pageLawLegalOrgCheckType(params: LawLegalOrgCheckTypeParam) {
const res = await request.get<ApiResult<PageResult<LawLegalOrgCheckType>>>(
MODULES_API_URL + '/law/law-legal-org-check-type/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询企业法制体检配置列表
*/
export async function listLawLegalOrgCheckType(params?: LawLegalOrgCheckTypeParam) {
const res = await request.get<ApiResult<LawLegalOrgCheckType[]>>(
MODULES_API_URL + '/law/law-legal-org-check-type',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加企业法制体检配置
*/
export async function addLawLegalOrgCheckType(data: LawLegalOrgCheckType) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-type',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改企业法制体检配置
*/
export async function updateLawLegalOrgCheckType(data: LawLegalOrgCheckType) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-type',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除企业法制体检配置
*/
export async function removeLawLegalOrgCheckType(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-type/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除企业法制体检配置
*/
export async function removeBatchLawLegalOrgCheckType(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-type/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询企业法制体检配置
*/
export async function getLawLegalOrgCheckType(id: number) {
const res = await request.get<ApiResult<LawLegalOrgCheckType>>(
MODULES_API_URL + '/law/law-legal-org-check-type/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,35 +0,0 @@
import type { PageParam } from "@/api";
/**
* 企业法制体检配置
*/
export interface LawLegalOrgCheckType {
//
id?: number;
//
icon?: string;
//
title?: string;
content?: string;
scoreConfig?: string;
// 类型
sortNumber?: number;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 企业法制体检配置搜索条件
*/
export interface LawLegalOrgCheckTypeParam extends PageParam {
id?: number;
keywords?: string;
}
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawLegalOrgCheckTypeSuggest, LawLegalOrgCheckTypeSuggestParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询法律意见书配置
*/
export async function pageLawLegalOrgCheckTypeSuggest(params: LawLegalOrgCheckTypeSuggestParam) {
const res = await request.get<ApiResult<PageResult<LawLegalOrgCheckTypeSuggest>>>(
MODULES_API_URL + '/law/law-legal-org-check-type-suggest/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询法律意见书配置列表
*/
export async function listLawLegalOrgCheckTypeSuggest(params?: LawLegalOrgCheckTypeSuggestParam) {
const res = await request.get<ApiResult<LawLegalOrgCheckTypeSuggest[]>>(
MODULES_API_URL + '/law/law-legal-org-check-type-suggest',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加法律意见书配置
*/
export async function addLawLegalOrgCheckTypeSuggest(data: LawLegalOrgCheckTypeSuggest) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-type-suggest',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改法律意见书配置
*/
export async function updateLawLegalOrgCheckTypeSuggest(data: LawLegalOrgCheckTypeSuggest) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-type-suggest',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除法律意见书配置
*/
export async function removeLawLegalOrgCheckTypeSuggest(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-type-suggest/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除法律意见书配置
*/
export async function removeBatchLawLegalOrgCheckTypeSuggest(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-legal-org-check-type-suggest/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询法律意见书配置
*/
export async function getLawLegalOrgCheckTypeSuggest(id: number) {
const res = await request.get<ApiResult<LawLegalOrgCheckTypeSuggest>>(
MODULES_API_URL + '/law/law-legal-org-check-type-suggest/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -1,38 +0,0 @@
import type { PageParam } from "@/api";
/**
* 法律意见书配置
*/
export interface LawLegalOrgCheckTypeSuggest {
//
id?: number;
//
icon?: string;
//
title?: string;
tips?: string;
methods?: string;
urls?: string;
// 类型
sortNumber?: number;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
articleCateId?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
fileList?: string;
}
/**
* 法律意见书配置搜索条件
*/
export interface LawLegalOrgCheckTypeSuggestParam extends PageParam {
id?: number;
keywords?: string;
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawNotaryConfig, LawNotaryConfigParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询公证配置
*/
export async function pageLawNotaryConfig(params: LawNotaryConfigParam) {
const res = await request.get<ApiResult<PageResult<LawNotaryConfig>>>(
MODULES_API_URL + '/law/law-notary-config/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询公证配置列表
*/
export async function listLawNotaryConfig(params?: LawNotaryConfigParam) {
const res = await request.get<ApiResult<LawNotaryConfig[]>>(
MODULES_API_URL + '/law/law-notary-config',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加公证配置
*/
export async function addLawNotaryConfig(data: LawNotaryConfig) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-notary-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改公证配置
*/
export async function updateLawNotaryConfig(data: LawNotaryConfig) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-notary-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除公证配置
*/
export async function removeLawNotaryConfig(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-notary-config/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除公证配置
*/
export async function removeBatchLawNotaryConfig(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-notary-config/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询公证配置
*/
export async function getLawNotaryConfig(id: number) {
const res = await request.get<ApiResult<LawNotaryConfig>>(
MODULES_API_URL + '/law/law-notary-config/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
-41
View File
@@ -1,41 +0,0 @@
import type { PageParam } from '@/api';
/**
* 公证列表
*/
export interface LawNotaryList {
//
id?: number;
//
uid?: number;
//
nameList?: string;
// 公证事项
content?: string;
// 用途
usage?: string;
// 使用地
address?: string;
// 译文
translate?: string;
// 文件列表
fileList?: string;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 公证列表搜索条件
*/
export interface LawNotaryListParam extends PageParam {
id?: number;
keywords?: string;
}
-44
View File
@@ -1,44 +0,0 @@
import type { PageParam } from "@/api";
/**
* 机构
*/
export interface LawOrg {
//
id?: number;
//
title?: string;
phone?: string;
// 0律所 1基层法律服务所 2仲裁机构 3公证处
type?: number;
//
provinceId?: number;
//
cityId?: number;
//
areaId?: number;
//
lat?: string | number;
//
lng?: string | number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
province?: string;
city?: string;
region?: string;
}
/**
* 机构搜索条件
*/
export interface LawOrgParam extends PageParam {
id?: number;
keywords?: string;
type?: string;
}
-106
View File
@@ -1,106 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawOrgCheckLog, LawOrgCheckLogParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询企业法制检查报告
*/
export async function pageLawOrgCheckLog(params: LawOrgCheckLogParam) {
const res = await request.get<ApiResult<PageResult<LawOrgCheckLog>>>(
MODULES_API_URL + '/law/law-org-check-log/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询企业法制检查报告列表
*/
export async function listLawOrgCheckLog(params?: LawOrgCheckLogParam) {
const res = await request.get<ApiResult<LawOrgCheckLog[]>>(
MODULES_API_URL + '/law/law-org-check-log',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加企业法制检查报告
*/
export async function addLawOrgCheckLog(data: LawOrgCheckLog) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org-check-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改企业法制检查报告
*/
export async function updateLawOrgCheckLog(data: LawOrgCheckLog) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org-check-log',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除企业法制检查报告
*/
export async function removeLawOrgCheckLog(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org-check-log/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除企业法制检查报告
*/
export async function removeBatchLawOrgCheckLog(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org-check-log/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询企业法制检查报告
*/
export async function getLawOrgCheckLog(id: number) {
const res = await request.get<ApiResult<LawOrgCheckLog>>(
MODULES_API_URL + '/law/law-org-check-log/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
-41
View File
@@ -1,41 +0,0 @@
import type { PageParam } from '@/api';
/**
* 企业法制检查报告
*/
export interface LawOrgCheckLog {
//
id?: number;
//
companyName?: string;
// 检查单位
checkCompanyName?: string;
//
checkDate?: string;
//
type?: string;
// 本月检查次数
checkNum?: number;
//
comment?: string;
//
remark?: string;
//
userId?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
}
/**
* 企业法制检查报告搜索条件
*/
export interface LawOrgCheckLogParam extends PageParam {
id?: number;
keywords?: string;
}
@@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { LawOrg, LawOrgParam } from './model';
import type { SysArea, SysAreaParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询机构
* 分页查询
*/
export async function pageLawOrg(params: LawOrgParam) {
const res = await request.get<ApiResult<PageResult<LawOrg>>>(
MODULES_API_URL + '/law/law-org/page',
export async function pageSysArea(params: SysAreaParam) {
const res = await request.get<ApiResult<PageResult<SysArea>>>(
MODULES_API_URL + '/sys/sys-area/page',
{
params
}
@@ -20,11 +20,11 @@ export async function pageLawOrg(params: LawOrgParam) {
}
/**
* 查询机构列表
* 查询列表
*/
export async function listLawOrg(params?: LawOrgParam) {
const res = await request.get<ApiResult<LawOrg[]>>(
MODULES_API_URL + '/law/law-org',
export async function listSysArea(params?: SysAreaParam) {
const res = await request.get<ApiResult<SysArea[]>>(
MODULES_API_URL + '/sys/sys-area',
{
params
}
@@ -36,11 +36,11 @@ export async function listLawOrg(params?: LawOrgParam) {
}
/**
* 添加机构
* 添加
*/
export async function addLawOrg(data: LawOrg) {
export async function addSysArea(data: SysArea) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org',
MODULES_API_URL + '/sys/sys-area',
data
);
if (res.data.code === 0) {
@@ -50,11 +50,11 @@ export async function addLawOrg(data: LawOrg) {
}
/**
* 修改机构
* 修改
*/
export async function updateLawOrg(data: LawOrg) {
export async function updateSysArea(data: SysArea) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org',
MODULES_API_URL + '/sys/sys-area',
data
);
if (res.data.code === 0) {
@@ -64,11 +64,11 @@ export async function updateLawOrg(data: LawOrg) {
}
/**
* 删除机构
* 删除
*/
export async function removeLawOrg(id?: number) {
export async function removeSysArea(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org/' + id
MODULES_API_URL + '/sys/sys-area/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -77,11 +77,11 @@ export async function removeLawOrg(id?: number) {
}
/**
* 批量删除机构
* 批量删除
*/
export async function removeBatchLawOrg(data: (number | undefined)[]) {
export async function removeBatchSysArea(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/law/law-org/batch',
MODULES_API_URL + '/sys/sys-area/batch',
{
data
}
@@ -93,11 +93,11 @@ export async function removeBatchLawOrg(data: (number | undefined)[]) {
}
/**
* 根据id查询机构
* 根据id查询
*/
export async function getLawOrg(id: number) {
const res = await request.get<ApiResult<LawOrg>>(
MODULES_API_URL + '/law/law-org/' + id
export async function getSysArea(id: number) {
const res = await request.get<ApiResult<SysArea>>(
MODULES_API_URL + '/sys/sys-area/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
+25
View File
@@ -0,0 +1,25 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface SysArea {
//
id?: number;
//
name?: string;
//
fid?: number;
//
levelId?: number;
// 租户id
tenantId?: number;
}
/**
* 搜索条件
*/
export interface SysAreaParam extends PageParam {
id?: number;
keywords?: string;
}
-78
View File
@@ -1,78 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import { VivoAreaCode, VivoAreaCodeParam } from "./model";
/**
* 分页查询商品分类
*/
export async function pageVivoAreaCode(params: VivoAreaCodeParam) {
const res = await request.get<ApiResult<PageResult<VivoAreaCode>>>(
'/vivo/vivo-pay-code/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品分类列表
*/
export async function listVivoAreaCode(params?: VivoAreaCodeParam) {
const res = await request.get<ApiResult<VivoAreaCode[]>>('/vivo/vivo-pay-code', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商品分类
*/
export async function addVivoAreaCode(data: VivoAreaCode) {
const res = await request.post<ApiResult<unknown>>('/vivo/vivo-pay-code', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品分类
*/
export async function updateVivoAreaCode(data: VivoAreaCode) {
const res = await request.put<ApiResult<unknown>>('/vivo/vivo-pay-code', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品分类
*/
export async function removeVivoAreaCode(id?: number) {
const res = await request.delete<ApiResult<unknown>>('/vivo/vivo-pay-code/' + id);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品分类
*/
export async function removeBatchVivoAreaCode(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>('/vivo/vivo-pay-code/batch', {
data
});
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
-20
View File
@@ -1,20 +0,0 @@
import type { PageParam } from "@/api";
/**
* 商品分类
*/
export interface VivoAreaCode {
id: number;
cityId: number;
provinceId?: number;
cityName?: string;
remark?: string;
code: string;
userId?: number;
createTime?: string;
updateTime?: string;
}
export interface VivoAreaCodeParam extends PageParam {
keywords: string;
}
-18
View File
@@ -1,18 +0,0 @@
import type { PageParam } from "@/api";
import { VivoStore } from "@/api/vivo/store/model";
/**
* 商品分类
*/
export interface VivoBindStoreList {
id?: number;
userId?: number;
storeId?: number;
createTime?: string;
updateTime?: string;
store?: VivoStore;
}
export interface VivoBindStoreListParam extends PageParam {
userId: number;
}
-19
View File
@@ -1,19 +0,0 @@
import request from "@/utils/request";
import type { ApiResult } from "@/api";
import { VivoData, VivoDataParam } from "./model";
/**
* 分页查询商品分类
*/
export async function vivoDataReq(params?: VivoDataParam) {
const res = await request.post<ApiResult<VivoData>>(
"/vivo/data",
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
-16
View File
@@ -1,16 +0,0 @@
import type { PageParam } from "@/api";
export interface VivoData {
todayNum: number;
totalNum: number;
todayAmount: number;
totalAmount: number;
todayCommission: number;
totalCommission: number;
list: any[];
}
export interface VivoDataParam extends PageParam {
startTime?: string;
endTime?: string;
}
-78
View File
@@ -1,78 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import { VivoFixStore, VivoFixStoreParam } from "@/api/vivo/fixStore/model";
/**
* 分页查询商品分类
*/
export async function pageVivoFixStore(params: VivoFixStoreParam) {
const res = await request.get<ApiResult<PageResult<VivoFixStore>>>(
'/vivo/vivo-fix-store/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品分类列表
*/
export async function listVivoFixStore(params?: VivoFixStoreParam) {
const res = await request.get<ApiResult<VivoFixStore[]>>('/vivo/vivo-fix-store', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商品分类
*/
export async function addVivoFixStore(data: VivoFixStore) {
const res = await request.post<ApiResult<unknown>>('/vivo/vivo-fix-store', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品分类
*/
export async function updateVivoFixStore(data: VivoFixStore) {
const res = await request.put<ApiResult<unknown>>('/vivo/vivo-fix-store', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品分类
*/
export async function removeVivoFixStore(id?: number) {
const res = await request.delete<ApiResult<unknown>>('/vivo/vivo-fix-store/' + id);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品分类
*/
export async function removeBatchVivoFixStore(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>('/vivo/vivo-fix-store/batch', {
data
});
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
-25
View File
@@ -1,25 +0,0 @@
import type { PageParam } from "@/api";
/**
* 商品分类
*/
export interface VivoFixStore {
id: number;
name: string;
payeeCode: string;
phone: string;
longitude?: number;
latitude?: number;
province?: string;
city?: string;
region?: string;
address?: string;
userId?: number;
isShow: number;
createTime?: string;
updateTime?: string;
}
export interface VivoFixStoreParam extends PageParam {
keywords: string;
}
-78
View File
@@ -1,78 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import { PhoneModel, PhoneModelParam } from "@/api/vivo/phoneModel/model";
/**
* 分页查询商品分类
*/
export async function pagePhoneModel(params: PhoneModelParam) {
const res = await request.get<ApiResult<PageResult<PhoneModel>>>(
'/vivo/vivo-phone-model/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品分类列表
*/
export async function listPhoneModel(params?: PhoneModelParam) {
const res = await request.get<ApiResult<PhoneModel[]>>('/vivo/vivo-phone-model', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商品分类
*/
export async function addPhoneModel(data: PhoneModel) {
const res = await request.post<ApiResult<unknown>>('/vivo/vivo-phone-model', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品分类
*/
export async function updatePhoneModel(data: PhoneModel) {
const res = await request.put<ApiResult<unknown>>('/vivo/vivo-phone-model', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品分类
*/
export async function removePhoneModel(id?: number) {
const res = await request.delete<ApiResult<unknown>>('/vivo/vivo-phone-model/' + id);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品分类
*/
export async function removeBatchPhoneModel(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>('/vivo/vivo-phone-model/batch', {
data
});
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
-21
View File
@@ -1,21 +0,0 @@
import type { PageParam } from "@/api";
import { Category } from "@/api/goods/category/model";
/**
* 商品分类
*/
export interface PhoneModel {
id: number;
name: string;
cate: number;
brand: string;
code: string;
userId?: number;
createTime?: string;
updateTime?: string;
cateItem?: Category
}
export interface PhoneModelParam extends PageParam {
keywords: string;
}
-78
View File
@@ -1,78 +0,0 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import { VivoStore, VivoStoreParam } from "@/api/vivo/store/model";
/**
* 分页查询商品分类
*/
export async function pageVivoStore(params: VivoStoreParam) {
const res = await request.get<ApiResult<PageResult<VivoStore>>>(
'/vivo/vivo-store/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询商品分类列表
*/
export async function listVivoStore(params?: VivoStoreParam) {
const res = await request.get<ApiResult<VivoStore[]>>('/vivo/vivo-store', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加商品分类
*/
export async function addVivoStore(data: VivoStore) {
const res = await request.post<ApiResult<unknown>>('/vivo/vivo-store', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改商品分类
*/
export async function updateVivoStore(data: VivoStore) {
const res = await request.put<ApiResult<unknown>>('/vivo/vivo-store', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除商品分类
*/
export async function removeVivoStore(id?: number) {
const res = await request.delete<ApiResult<unknown>>('/vivo/vivo-store/' + id);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除商品分类
*/
export async function removeBatchVivoStore(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>('/vivo/vivo-store/batch', {
data
});
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
-26
View File
@@ -1,26 +0,0 @@
import type { PageParam } from "@/api";
import { User } from "@/api/system/user/model";
/**
* 商品分类
*/
export interface VivoStore {
id: number;
name: string;
code: string;
province?: string;
city?: string;
region?: string;
address?: string;
manager?: number;
userId?: number;
createTime?: string;
updateTime?: string;
managerUser?: User;
orgId?: number;
orgName?: string;
}
export interface VivoStoreParam extends PageParam {
keywords: string;
}
@@ -1,157 +0,0 @@
<template>
<ele-modal
:width="750"
:visible="visible"
:maskClosable="false"
:title="title"
:footer="null"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
>
<ele-pro-table
ref="tableRef"
row-key="customerId"
:datasource="datasource"
:columns="columns"
:customRow="customRow"
:pagination="false"
>
<template #toolbar>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'customerLogo'">
<a-image
v-if="record.customerAvatar"
:src="FILE_THUMBNAIL + record.customerAvatar"
:preview="false"
:width="45"
/>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a-button type="link">选择</a-button>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageCustomer } from '@/api/oa/customer';
import { FILE_THUMBNAIL } from '@/config/setting';
import { EleProTable } from 'ele-admin-pro';
import { Customer, CustomerParam } from '@/api/oa/customer/model';
import { pageAccessory } from '@/api/tower/accessory';
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 企业类型
customerType?: string;
// 修改回显的数据
data?: Customer | null;
}>();
const emit = defineEmits<{
(e: 'done', data: Customer): void;
(e: 'update:visible', visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
key: 'index',
width: 48,
align: 'center',
fixed: 'left',
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '配件编号',
dataIndex: 'accessoryNo'
},
{
title: '配件分类',
dataIndex: 'accessoryCategory'
},
{
title: '适用设备型号',
dataIndex: 'accessoryModel'
},
{
title: '配件规格',
dataIndex: 'accessorySpecs'
},
{
title: '操作',
key: 'action',
align: 'center'
}
]);
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
// where = {};
// 搜索条件
// if (searchText.value) {
// where.keywords = searchText.value;
// }
// if (props.customerType == 'empty') {
// where.emptyType = true;
// } else {
// where.customerType = props.customerType;
// }
// where.isStaff = true;
return pageAccessory({
...where,
...orders,
page,
limit
});
};
/* 搜索 */
const reload = (where?: CustomerParam) => {
tableRef?.value?.reload({ page: 1, where });
};
/* 自定义行属性 */
const customRow = (record: Customer) => {
return {
// 行点击事件
onClick: () => {
updateVisible(false);
emit('done', record);
}
};
};
</script>
<style lang="less"></style>
-61
View File
@@ -1,61 +0,0 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { Customer } from '@/api/oa/customer/model';
withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', Customer): void;
(e: 'clear'): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<Customer | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: Customer) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
emit('done', row);
};
</script>
@@ -1,153 +0,0 @@
<template>
<ele-modal
:width="750"
:visible="visible"
:maskClosable="false"
:title="title"
:footer="null"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
>
<ele-pro-table
ref="tableRef"
row-key="customerId"
:datasource="datasource"
:columns="columns"
:customRow="customRow"
:pagination="false"
>
<template #toolbar>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'customerLogo'">
<a-image
v-if="record.customerAvatar"
:src="FILE_THUMBNAIL + record.customerAvatar"
:preview="false"
:width="45"
/>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a-button type="link">选择</a-button>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageCustomer } from '@/api/oa/customer';
import { FILE_THUMBNAIL } from '@/config/setting';
import { EleProTable } from 'ele-admin-pro';
import { Customer, CustomerParam } from '@/api/oa/customer/model';
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 企业类型
customerType?: string;
// 修改回显的数据
data?: Customer | null;
}>();
const emit = defineEmits<{
(e: 'done', data: Customer): void;
(e: 'update:visible', visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
key: 'index',
width: 48,
align: 'center',
fixed: 'left',
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '企业名称',
dataIndex: 'customerName'
},
{
title: '企业类型',
dataIndex: 'customerType'
},
{
title: '企业LOGO',
dataIndex: 'customerLogo',
key: 'customerLogo'
},
{
title: '操作',
key: 'action',
align: 'center'
}
]);
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
where = {};
// 搜索条件
if (searchText.value) {
where.keywords = searchText.value;
}
if (props.customerType == 'empty') {
where.emptyType = true;
} else {
where.customerType = props.customerType;
}
where.isStaff = true;
return pageCustomer({
...where,
...orders,
page,
limit
});
};
/* 搜索 */
const reload = (where?: CustomerParam) => {
tableRef?.value?.reload({ page: 1, where });
};
/* 自定义行属性 */
const customRow = (record: Customer) => {
return {
// 行点击事件
onClick: () => {
updateVisible(false);
emit('done', record);
}
};
};
</script>
<style lang="less"></style>
-61
View File
@@ -1,61 +0,0 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { Customer } from '@/api/oa/customer/model';
withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', Customer): void;
(e: 'clear'): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<Customer | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: Customer) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
emit('done', row);
};
</script>
@@ -1,147 +0,0 @@
<template>
<ele-modal
:width="750"
:visible="visible"
:maskClosable="false"
:title="title"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
>
<ele-pro-table
ref="tableRef"
row-key="modelId"
:datasource="datasource"
:columns="columns"
:customRow="customRow"
:striped="true"
:pagination="false"
>
<template #toolbar>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-space>
<a-button type="link">选择</a-button>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from "vue";
import {
ColumnItem,
DatasourceFunction
} from "ele-admin-pro/es/ele-pro-table/types";
import { pageProject } from "@/api/tower/project";
import { FILE_THUMBNAIL } from "@/config/setting";
import { EleProTable } from "ele-admin-pro";
import { TowerModel, TowerModelParam } from "@/api/tower/model/model";
import { Contract, ContractParam } from "@/api/tower/contract/model";
import { pageContract } from "@/api/tower/contract";
import { message } from "ant-design-vue";
defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 修改回显的数据
data?: Contract | null;
selection?: Contract[];
}>();
const emit = defineEmits<{
(e: "done", data: Contract): void;
(e: "update:visible", visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit("update:visible", value);
};
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
key: "index",
width: 48,
align: "center",
fixed: "left",
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: "合同编号",
dataIndex: "contactNumber"
},
{
title: "项目名称",
dataIndex: "projectName"
},
{
title: "业务负责人",
dataIndex: "customerContact"
},
{
title: "签订日期",
dataIndex: "signDate"
},
{
title: "操作",
key: "action",
align: "center"
}
]);
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
// 搜索条件
if (searchText.value) {
where.keywords = searchText.value;
}
return pageContract({
...where,
...orders,
page,
limit
});
};
/* 搜索 */
const reload = (where?: ContractParam) => {
tableRef?.value?.reload({ page: 1, where });
};
/* 自定义行属性 */
const customRow = (record: Contract) => {
return {
// 行点击事件
onClick: () => {
updateVisible(false);
if (record.settleMethod === null || record.settleMethod === undefined) {
message.warning("请先设置合同结算方式");
return;
}
emit("done", record);
}
};
};
</script>
<style lang="less"></style>
@@ -1,65 +0,0 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { Contract } from "@/api/tower/contract/model";
const props = withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
index?: number;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', Contract): void;
(e: 'clear'): void;
(e: 'multiple', any): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<Contract | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: Contract) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
// 第几行
row.index = Number(props.index);
emit('done', row);
};
</script>
@@ -1,161 +0,0 @@
<template>
<ele-modal
width="50%"
:visible="visible"
:maskClosable="false"
:title="title"
:footer="null"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
>
<ele-pro-table
ref="tableRef"
row-key="companyId"
:datasource="datasource"
:columns="columns"
:customRow="customRow"
:pagination="false"
>
<template #toolbar>
<a-space>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
<a-checkbox v-model:checked="idleOnly" @change="reload">仅显示未绑定项目设备</a-checkbox>
</a-space>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-space>
<a-button type="link">选择</a-button>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from "vue";
import {
ColumnItem,
DatasourceFunction
} from "ele-admin-pro/es/ele-pro-table/types";
import { EleProTable } from "ele-admin-pro";
import { TowerEquipment, TowerEquipmentParam } from "@/api/tower/equipment/model";
import { pageTowerEquipment } from "@/api/tower/equipment";
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 修改回显的数据
data?: TowerEquipment | null;
}>();
const emit = defineEmits<{
(e: "done", data: TowerEquipment): void;
(e: "update:visible", visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit("update:visible", value);
};
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
title: "设备名称",
dataIndex: "name",
key: "name",
showSorterTooltip: false,
ellipsis: true
},
{
title: "设备型号",
dataIndex: "model",
showSorterTooltip: false,
ellipsis: true
},
{
title: "出场编号",
dataIndex: "factoryNo",
key: "factoryNo",
showSorterTooltip: false,
ellipsis: true
},
{
title: "设备编号",
dataIndex: "equipmentNo",
key: "equipmentNo",
showSorterTooltip: false,
ellipsis: true
},
{
title: "备案编号",
dataIndex: "filingNo",
key: "filingNo",
showSorterTooltip: false
},
{
title: "制造单位",
dataIndex: "manufactor",
key: "manufactor",
showSorterTooltip: false,
ellipsis: true
},
{
title: "操作",
key: "action",
align: "center"
}
]);
const idleOnly = ref<boolean>(false)
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
where = {};
// 搜索条件
if (searchText.value) {
where.keywords = searchText.value;
}
where.isStaff = true;
where.idleOnly = idleOnly.value;
return pageTowerEquipment({
...where,
...orders,
page,
limit
});
};
/* 搜索 */
const reload = (where?: TowerEquipmentParam) => {
tableRef?.value?.reload({ page: 1, where });
};
/* 自定义行属性 */
const customRow = (record: TowerEquipment) => {
return {
// 行点击事件
onClick: () => {
updateVisible(false);
emit("done", record);
}
};
};
</script>
<style lang="less"></style>
@@ -1,61 +0,0 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { Customer } from '@/api/oa/customer/model';
withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', Customer): void;
(e: 'clear'): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<Customer | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: Customer) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
emit('done', row);
};
</script>
@@ -1,57 +0,0 @@
<!-- 选择下拉框 -->
<template>
<a-select
show-search
optionFilterProp="label"
:options="data"
allow-clear
:value="value"
:placeholder="placeholder"
@update:value="updateValue"
@blur="onBlur"
/>
</template>
<script lang="ts" setup>
import { listCategory } from '@/api/goods/category';
import { ref } from 'vue';
import { Category } from '@/api/goods/category/model';
const emit = defineEmits<{
(e: 'update:value', value: string): void;
(e: 'blur'): void;
}>();
withDefaults(
defineProps<{
value?: string;
placeholder?: string;
dictCode?: string;
}>(),
{
placeholder: '请选择分类'
}
);
const data = ref<Category[]>([]);
// 字典数据
listCategory({ parentId: 0 }).then((list) => {
data.value = list.map((d) => {
return {
value: d.title,
label: d.title,
text: d.title
};
});
});
/* 更新选中数据 */
const updateValue = (value: string) => {
emit('update:value', value);
};
/* 失去焦点 */
const onBlur = () => {
emit('blur');
};
</script>
@@ -1,155 +0,0 @@
<template>
<ele-modal
:width="750"
:visible="visible"
:maskClosable="false"
:title="title"
:footer="null"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
>
<ele-pro-table
ref="tableRef"
row-key="companyId"
:datasource="datasource"
:columns="columns"
:customRow="customRow"
:pagination="false"
>
<template #toolbar>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'companyLogo'">
<a-image
v-if="record.companyLogo"
:src="FILE_THUMBNAIL + record.companyLogo"
:preview="false"
:width="45"
/>
</template>
<template v-if="column.key === 'companyType'">
<a-tag v-if="record.companyType === 10">企业</a-tag>
<a-tag v-if="record.companyType === 20">政府单位</a-tag>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a-button type="link">选择</a-button>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageCompany } from '@/api/system/company';
import { FILE_THUMBNAIL } from '@/config/setting';
import { EleProTable } from 'ele-admin-pro';
import { Company, CompanyParam } from '@/api/system/company/model';
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 企业类型
companyType?: string;
// 修改回显的数据
data?: Company | null;
}>();
const emit = defineEmits<{
(e: 'done', data: Company): void;
(e: 'update:visible', visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
title: 'ID',
dataIndex: 'id'
},
{
title: '设备名称',
dataIndex: 'equipment',
key: 'equipment',
showSorterTooltip: false,
ellipsis: true
},
{
title: '设备型号',
key: 'title',
showSorterTooltip: false,
ellipsis: true
},
{
title: '使用年限',
dataIndex: 'yearLife',
key: 'yearLife',
showSorterTooltip: false,
ellipsis: true
}
]);
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
where = {};
// 搜索条件
if (searchText.value) {
where.keywords = searchText.value;
}
if (props.companyType == 'empty') {
where.emptyType = true;
} else {
where.companyType = props.companyType;
}
where.isStaff = true;
return pageCompany({
...where,
...orders,
page,
limit
});
};
/* 搜索 */
const reload = (where?: CompanyParam) => {
tableRef?.value?.reload({ page: 1, where });
};
/* 自定义行属性 */
const customRow = (record: Company) => {
return {
// 行点击事件
onClick: () => {
updateVisible(false);
emit('done', record);
}
};
};
</script>
<style lang="less"></style>
-61
View File
@@ -1,61 +0,0 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { Customer } from '@/api/oa/customer/model';
withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', Customer): void;
(e: 'clear'): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<Customer | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: Customer) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
emit('done', row);
};
</script>
@@ -1,150 +0,0 @@
<template>
<ele-modal
:width="750"
:visible="visible"
:maskClosable="false"
:title="title"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
>
<ele-pro-table
ref="tableRef"
row-key="modelId"
:datasource="datasource"
:columns="columns"
:customRow="customRow"
:striped="true"
:pagination="false"
>
<template #toolbar>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'customerLogo'">
<a-image
v-if="record.customerAvatar"
:src="FILE_THUMBNAIL + record.customerAvatar"
:preview="false"
:width="45"
/>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a-button type="link">添加</a-button>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageTowerModel } from '@/api/tower/model';
import { FILE_THUMBNAIL } from '@/config/setting';
import { EleProTable } from 'ele-admin-pro';
import { TowerModel, TowerModelParam } from '@/api/tower/model/model';
import { pageTowerPlace } from "@/api/tower/param/place";
defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 修改回显的数据
data?: TowerModel | null;
selection?: TowerModel[];
}>();
const emit = defineEmits<{
(e: 'done', data: TowerModel): void;
(e: 'update:visible', visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
key: 'index',
title: '序号',
width: 48,
align: 'center',
fixed: 'left',
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '部位编号',
dataIndex: 'placeCode'
},
{
title: '设备类型',
dataIndex: 'equipmentType'
},
{
title: '部位名称',
dataIndex: 'name'
},
{
title: '部位类型',
dataIndex: 'type'
},
{
title: '操作',
key: 'action',
align: 'center'
}
]);
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
// 搜索条件
if (searchText.value) {
where.keywords = searchText.value;
}
return pageTowerPlace({
...where,
...orders,
page,
limit
});
};
/* 搜索 */
const reload = (where?: TowerModelParam) => {
tableRef?.value?.reload({ page: 1, where });
};
/* 自定义行属性 */
const customRow = (record: TowerModel) => {
return {
// 行点击事件
onClick: () => {
updateVisible(false);
emit('done', record);
}
};
};
</script>
<style lang="less"></style>
-65
View File
@@ -1,65 +0,0 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { TowerModel } from '@/api/tower/model/model';
const props = withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
index?: number;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', TowerModel): void;
(e: 'clear'): void;
(e: 'multiple', any): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<TowerModel | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: TowerModel) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
// 第几行
row.index = Number(props.index);
emit('done', row);
};
</script>
@@ -1,144 +0,0 @@
<template>
<ele-modal
:width="750"
:visible="visible"
:maskClosable="false"
:title="title"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
>
<ele-pro-table
ref="tableRef"
row-key="modelId"
:datasource="datasource"
:columns="columns"
:customRow="customRow"
:striped="true"
:pagination="false"
>
<template #toolbar>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'customerLogo'">
<a-image
v-if="record.customerAvatar"
:src="FILE_THUMBNAIL + record.customerAvatar"
:preview="false"
:width="45"
/>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a-button type="link">选择</a-button>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageTowerModel } from '@/api/tower/model';
import { FILE_THUMBNAIL } from '@/config/setting';
import { EleProTable } from 'ele-admin-pro';
import { TowerModel, TowerModelParam } from '@/api/tower/model/model';
defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 修改回显的数据
data?: TowerModel | null;
selection?: TowerModel[];
}>();
const emit = defineEmits<{
(e: 'done', data: TowerModel): void;
(e: 'update:visible', visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
key: 'index',
width: 48,
align: 'center',
fixed: 'left',
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '设备名称',
dataIndex: 'name'
},
{
title: '设备型号',
dataIndex: 'model'
},
{
title: '使用年限',
dataIndex: 'yearLife'
},
{
title: '操作',
key: 'action',
align: 'center'
}
]);
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
// 搜索条件
if (searchText.value) {
where.keywords = searchText.value;
}
return pageTowerModel({
...where,
...orders,
page,
limit
});
};
/* 搜索 */
const reload = (where?: TowerModelParam) => {
tableRef?.value?.reload({ page: 1, where });
};
/* 自定义行属性 */
const customRow = (record: TowerModel) => {
return {
// 行点击事件
onClick: () => {
updateVisible(false);
emit('done', record);
}
};
};
</script>
<style lang="less"></style>
-65
View File
@@ -1,65 +0,0 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { TowerModel } from '@/api/tower/model/model';
const props = withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
index?: number;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', TowerModel): void;
(e: 'clear'): void;
(e: 'multiple', any): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<TowerModel | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: TowerModel) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
// 第几行
row.index = Number(props.index);
emit('done', row);
};
</script>
@@ -1,143 +0,0 @@
<template>
<ele-modal
:width="750"
:visible="visible"
:maskClosable="false"
:title="title"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
@ok="onSelect"
>
<ele-pro-table
ref="tableRef"
row-key="modelId"
:datasource="datasource"
:columns="columns"
v-model:selection="selection"
:striped="true"
:pagination="false"
>
<template #toolbar>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
style="width: 200px"
@search="reload"
@pressEnter="reload"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'customerLogo'">
<a-image
v-if="record.customerAvatar"
:src="FILE_THUMBNAIL + record.customerAvatar"
:preview="false"
:width="45"
/>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a-button type="link">选择</a-button>
</a-space>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageTowerModel } from '@/api/tower/model';
import { FILE_THUMBNAIL } from '@/config/setting';
import { EleProTable } from 'ele-admin-pro';
import { TowerModel, TowerModelParam } from '@/api/tower/model/model';
defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
title?: string;
// 修改回显的数据
data?: TowerModel | null;
multiple?: boolean;
selection?: TowerModel[];
}>();
const emit = defineEmits<{
(e: 'done', data: TowerModel[]): void;
(e: 'update:visible', visible: boolean): void;
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 表格选中数据
const selection = ref<TowerModel[]>([]);
// 搜索内容
const searchText = ref(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
{
key: 'index',
width: 48,
align: 'center',
fixed: 'left',
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '设备名称',
dataIndex: 'name'
},
{
title: '设备型号',
dataIndex: 'model'
},
{
title: '使用年限',
dataIndex: 'yearLife'
},
{
title: '操作',
key: 'action',
align: 'center'
}
]);
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
// 搜索条件
if (searchText.value) {
where.keywords = searchText.value;
}
return pageTowerModel({
...where,
...orders,
page,
limit
});
};
const onSelect = () => {
updateVisible(false);
emit('done', selection.value);
};
/* 搜索 */
const reload = (where?: TowerModelParam) => {
selection.value = [];
tableRef?.value?.reload({ page: 1, where });
};
</script>
<style lang="less"></style>
@@ -1,62 +0,0 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { Customer } from '@/api/oa/customer/model';
withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', Customer): void;
(e: 'clear'): void;
(e: 'multiple', any): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<Customer | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: Customer) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
emit('done', row);
};
</script>
+1 -1
View File
@@ -118,7 +118,7 @@
// 项目名
// const projectName = ref(import.meta.env.VITE_APP_NAME as string);
const projectName = ref('贵港市公共法律服务微平台');
const projectName = ref('管理后台');
// 企业信息
const tenantName = localStorage.getItem('tenantName');
const companyLogo = localStorage.getItem('CompanyLogo');
@@ -29,7 +29,6 @@
<a-form-item label="文章标题" name="title">
<a-input
allow-clear
:maxlength="20"
placeholder="请输入文章标题"
v-model:value="form.title"
/>
@@ -56,10 +55,8 @@
/>
</div>
</a-form-item>
<a-form-item label="文章来源" name="source">
<source-select
v-model:value="form.source"
/>
<a-form-item label="简介" name="source">
<a-input v-model:value="form.source" />
</a-form-item>
<a-form-item label="展现方式" name="showType">
<a-radio-group v-model:value="form.showType">
@@ -267,7 +264,7 @@ const onUpload = (item) => {
url: data.url,
status: "done"
});
form.image = data.path;
form.image = data.url;
message.success("上传成功");
})
.catch((e) => {
@@ -421,7 +418,7 @@ watch(
if (props.data.image) {
images.value.push({
uid: 1,
url: FILE_THUMBNAIL + props.data.image,
url: props.data.image,
status: "done"
});
}
+1 -1
View File
@@ -32,7 +32,7 @@
<a-image
:width="45"
v-if="record.image"
:src="FILE_THUMBNAIL + record.image"
:src="record.image"
:preview="false"
/>
</template>
@@ -5,7 +5,7 @@
:visible="visible"
:maskClosable="false"
:maxable="maxable"
:title="isUpdate ? '编辑用户填写法律文书内容' : '添加用户填写法律文书内容'"
:title="isUpdate ? '编辑' : '添加'"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
@ok="save"
@@ -19,18 +19,11 @@
styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
"
>
<a-form-item label="" name="groupId">
<a-form-item label="" name="articleId">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.groupId"
/>
</a-form-item>
<a-form-item label="" name="content">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.content"
v-model:value="form.articleId"
/>
</a-form-item>
<a-form-item label="" name="userId">
@@ -40,6 +33,12 @@
v-model:value="form.userId"
/>
</a-form-item>
<a-form-item label="状态, 0正常, 1冻结" name="status">
<a-radio-group v-model:value="form.status">
<a-radio :value="1">显示</a-radio>
<a-radio :value="0">隐藏</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否删除, 0否, 1是" name="deleted">
<a-input
allow-clear
@@ -62,8 +61,8 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addLawLegalDocContent, updateLawLegalDocContent } from '@/api/law/lawLegalDocContent';
import { LawLegalDocContent } from '@/api/law/lawLegalDocContent/model';
import { addArticleCollect, updateArticleCollect } from '@/api/cms/articleCollect';
import { ArticleCollect } from '@/api/cms/articleCollect/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
import { FormInstance } from 'ant-design-vue/es/form';
@@ -80,7 +79,7 @@
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: LawLegalDocContent | null;
data?: ArticleCollect | null;
}>();
const emit = defineEmits<{
@@ -96,11 +95,11 @@
const formRef = ref<FormInstance | null>(null);
// 用户信息
const form = reactive<LawLegalDocContent>({
const form = reactive<ArticleCollect>({
id: undefined,
groupId: undefined,
content: undefined,
articleId: undefined,
userId: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
@@ -131,7 +130,7 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateLawLegalDocContent : addLawLegalDocContent;
const saveOrUpdate = isUpdate.value ? updateArticleCollect : addArticleCollect;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
+245
View File
@@ -0,0 +1,245 @@
<template>
<div class="page">
<div class="ele-body">
<a-card :bordered="false" :body-style="{ padding: '16px' }">
<ele-pro-table
ref="tableRef"
row-key="id"
:columns="columns"
:datasource="datasource"
:customRow="customRow"
tool-class="ele-toolbar-form"
class="sys-org-table"
>
<template #toolbar>
<search
@search="reload"
:selection="selection"
@add="openEdit"
@remove="removeBatch"
@batchMove="openMove"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'image'">
<a-image :src="record.image" :width="50" />
</template>
<template v-if="column.key === 'status'">
<a-tag v-if="record.status === 1" color="green">显示</a-tag>
<a-tag v-if="record.status === 0" color="red">隐藏</a-tag>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a @click="openEdit(record)">修改</a>
<a-divider type="vertical" />
<a-popconfirm
title="确定要删除此记录吗?"
@confirm="remove(record)"
>
<a class="ele-text-danger">删除</a>
</a-popconfirm>
</a-space>
</template>
</template>
</ele-pro-table>
</a-card>
<!-- 编辑弹窗 -->
<ArticleCollectEdit v-model:visible="showEdit" :data="current" @done="reload" />
</div>
</div>
</template>
<script lang="ts" setup>
import { createVNode, ref } from 'vue';
import { message, Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import type { EleProTable } from 'ele-admin-pro';
import { toDateString } from 'ele-admin-pro';
import type {
DatasourceFunction,
ColumnItem
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import ArticleCollectEdit from './components/articleCollectEdit.vue';
import { pageArticleCollect, removeArticleCollect, removeBatchArticleCollect } from '@/api/cms/articleCollect';
import type { ArticleCollect, ArticleCollectParam } from '@/api/cms/articleCollect/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格选中数据
const selection = ref<ArticleCollect[]>([]);
// 当前编辑数据
const current = ref<ArticleCollect | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 是否显示批量移动弹窗
const showMove = ref(false);
// 加载状态
const loading = ref(true);
// 表格数据源
const datasource: DatasourceFunction = ({
page,
limit,
where,
orders,
filters
}) => {
if (filters) {
where.status = filters.status;
}
return pageArticleCollect({
...where,
...orders,
page,
limit
});
};
// 表格列配置
const columns = ref<ColumnItem[]>([
{
title: '',
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
},
{
title: '',
dataIndex: 'articleId',
key: 'articleId',
align: 'center',
},
{
title: '',
dataIndex: 'userId',
key: 'userId',
align: 'center',
},
{
title: '状态, 0正常, 1冻结',
dataIndex: 'status',
key: 'status',
align: 'center',
},
{
title: '是否删除, 0否, 1是',
dataIndex: 'deleted',
key: 'deleted',
align: 'center',
},
{
title: '注册时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center',
sorter: true,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd')
},
{
title: '修改时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
},
{
title: '操作',
key: 'action',
width: 180,
fixed: 'right',
align: 'center',
hideInSetting: true
}
]);
/* 搜索 */
const reload = (where?: ArticleCollectParam) => {
selection.value = [];
tableRef?.value?.reload({ where: where });
};
/* 打开编辑弹窗 */
const openEdit = (row?: ArticleCollect) => {
current.value = row ?? null;
showEdit.value = true;
};
/* 打开批量移动弹窗 */
const openMove = () => {
showMove.value = true;
};
/* 删除单个 */
const remove = (row: ArticleCollect) => {
const hide = message.loading('请求中..', 0);
removeArticleCollect(row.id)
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
};
/* 批量删除 */
const removeBatch = () => {
if (!selection.value.length) {
message.error('请至少选择一条数据');
return;
}
Modal.confirm({
title: '提示',
content: '确定要删除选中的记录吗?',
icon: createVNode(ExclamationCircleOutlined),
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchArticleCollect(selection.value.map((d) => d.id))
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
}
});
};
/* 查询 */
const query = () => {
loading.value = true;
};
/* 自定义行属性 */
const customRow = (record: ArticleCollect) => {
return {
// 行点击事件
onClick: () => {
// console.log(record);
},
// 行双击事件
onDblclick: () => {
openEdit(record);
}
};
};
query();
</script>
<script lang="ts">
export default {
name: 'ArticleCollect'
};
</script>
<style lang="less" scoped></style>
@@ -5,7 +5,7 @@
:visible="visible"
:maskClosable="false"
:maxable="maxable"
:title="isUpdate ? '编辑用户填写法律计算器内容' : '添加用户填写法律计算器内容'"
:title="isUpdate ? '编辑' : '添加'"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
@ok="save"
@@ -19,11 +19,18 @@
styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
"
>
<a-form-item label="" name="groupId">
<a-form-item label="" name="articleId">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.groupId"
v-model:value="form.articleId"
/>
</a-form-item>
<a-form-item label="" name="userId">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.userId"
/>
</a-form-item>
<a-form-item label="" name="content">
@@ -33,12 +40,11 @@
v-model:value="form.content"
/>
</a-form-item>
<a-form-item label="" name="userId">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.userId"
/>
<a-form-item label="状态, 0正常, 1冻结" name="status">
<a-radio-group v-model:value="form.status">
<a-radio :value="1">显示</a-radio>
<a-radio :value="0">隐藏</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否删除, 0否, 1是" name="deleted">
<a-input
@@ -62,8 +68,8 @@
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addLawLegalCalContent, updateLawLegalCalContent } from '@/api/law/lawLegalCalContent';
import { LawLegalCalContent } from '@/api/law/lawLegalCalContent/model';
import { addArticleComment, updateArticleComment } from '@/api/cms/articleComment';
import { ArticleComment } from '@/api/cms/articleComment/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
import { FormInstance } from 'ant-design-vue/es/form';
@@ -80,7 +86,7 @@
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: LawLegalCalContent | null;
data?: ArticleComment | null;
}>();
const emit = defineEmits<{
@@ -96,11 +102,12 @@
const formRef = ref<FormInstance | null>(null);
// 用户信息
const form = reactive<LawLegalCalContent>({
const form = reactive<ArticleComment>({
id: undefined,
groupId: undefined,
content: undefined,
articleId: undefined,
userId: undefined,
content: undefined,
status: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
@@ -131,7 +138,7 @@
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateLawLegalCalContent : addLawLegalCalContent;
const saveOrUpdate = isUpdate.value ? updateArticleComment : addArticleComment;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
@@ -45,7 +45,7 @@
</a-card>
<!-- 编辑弹窗 -->
<LawLegalCalContentEdit v-model:visible="showEdit" :data="current" @done="reload" />
<ArticleCommentEdit v-model:visible="showEdit" :data="current" @done="reload" />
</div>
</div>
</template>
@@ -61,17 +61,17 @@
ColumnItem
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import LawLegalCalContentEdit from './components/lawLegalCalContentEdit.vue';
import { pageLawLegalCalContent, removeLawLegalCalContent, removeBatchLawLegalCalContent } from '@/api/law/lawLegalCalContent';
import type { LawLegalCalContent, LawLegalCalContentParam } from '@/api/law/lawLegalCalContent/model';
import ArticleCommentEdit from './components/articleCommentEdit.vue';
import { pageArticleComment, removeArticleComment, removeBatchArticleComment } from '@/api/cms/articleComment';
import type { ArticleComment, ArticleCommentParam } from '@/api/cms/articleComment/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格选中数据
const selection = ref<LawLegalCalContent[]>([]);
const selection = ref<ArticleComment[]>([]);
// 当前编辑数据
const current = ref<LawLegalCalContent | null>(null);
const current = ref<ArticleComment | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 是否显示批量移动弹窗
@@ -90,7 +90,7 @@
if (filters) {
where.status = filters.status;
}
return pageLawLegalCalContent({
return pageArticleComment({
...where,
...orders,
page,
@@ -109,14 +109,8 @@
},
{
title: '',
dataIndex: 'groupId',
key: 'groupId',
align: 'center',
},
{
title: '',
dataIndex: 'content',
key: 'content',
dataIndex: 'articleId',
key: 'articleId',
align: 'center',
},
{
@@ -125,6 +119,18 @@
key: 'userId',
align: 'center',
},
{
title: '',
dataIndex: 'content',
key: 'content',
align: 'center',
},
{
title: '状态, 0正常, 1冻结',
dataIndex: 'status',
key: 'status',
align: 'center',
},
{
title: '是否删除, 0否, 1是',
dataIndex: 'deleted',
@@ -132,7 +138,7 @@
align: 'center',
},
{
title: '创建时间',
title: '注册时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center',
@@ -157,13 +163,13 @@
]);
/* 搜索 */
const reload = (where?: LawLegalCalContentParam) => {
const reload = (where?: ArticleCommentParam) => {
selection.value = [];
tableRef?.value?.reload({ where: where });
};
/* 打开编辑弹窗 */
const openEdit = (row?: LawLegalCalContent) => {
const openEdit = (row?: ArticleComment) => {
current.value = row ?? null;
showEdit.value = true;
};
@@ -174,9 +180,9 @@
};
/* 删除单个 */
const remove = (row: LawLegalCalContent) => {
const remove = (row: ArticleComment) => {
const hide = message.loading('请求中..', 0);
removeLawLegalCalContent(row.id)
removeArticleComment(row.id)
.then((msg) => {
hide();
message.success(msg);
@@ -201,7 +207,7 @@
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchLawLegalCalContent(selection.value.map((d) => d.id))
removeBatchArticleComment(selection.value.map((d) => d.id))
.then((msg) => {
hide();
message.success(msg);
@@ -221,7 +227,7 @@
};
/* 自定义行属性 */
const customRow = (record: LawLegalCalContent) => {
const customRow = (record: ArticleComment) => {
return {
// 行点击事件
onClick: () => {
@@ -238,7 +244,7 @@
<script lang="ts">
export default {
name: 'LawLegalCalContent'
name: 'ArticleComment'
};
</script>
@@ -0,0 +1,191 @@
<!-- 编辑弹窗 -->
<template>
<ele-modal
:width="800"
:visible="visible"
:maskClosable="false"
:maxable="maxable"
:title="isUpdate ? '编辑稿件' : '添加稿件'"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
@ok="save"
>
<a-form
ref="formRef"
:model="form"
:rules="rules"
:label-col="styleResponsive ? { md: 4, sm: 5, xs: 24 } : { flex: '90px' }"
:wrapper-col="
styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
"
>
<a-form-item label="" name="title">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.title"
/>
</a-form-item>
<a-form-item label="" name="content">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.content"
/>
</a-form-item>
<a-form-item label="" name="cover">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.cover"
/>
</a-form-item>
<a-form-item label="是否删除, 0否, 1是" name="deleted">
<a-input
allow-clear
placeholder="请输入是否删除, 0否, 1是"
v-model:value="form.deleted"
/>
</a-form-item>
<a-form-item label="修改时间" name="updateTime">
<a-input
allow-clear
placeholder="请输入修改时间"
v-model:value="form.updateTime"
/>
</a-form-item>
<a-form-item label="" name="userId">
<a-input
allow-clear
placeholder="请输入"
v-model:value="form.userId"
/>
</a-form-item>
<a-form-item label="" name="sortNumber">
<a-input-number
:min="0"
:max="9999"
class="ele-fluid"
placeholder="请输入排序号"
v-model:value="form.sortNumber"
/>
</a-form-item>
<a-form-item label="待审核" name="status">
<a-radio-group v-model:value="form.status">
<a-radio :value="1">显示</a-radio>
<a-radio :value="0">隐藏</a-radio>
</a-radio-group>
</a-form-item>
</a-form>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject, uuid } from 'ele-admin-pro';
import { addManuscript, updateManuscript } from '@/api/cms/manuscript';
import { Manuscript } from '@/api/cms/manuscript/model';
import { useThemeStore } from '@/store/modules/theme';
import { storeToRefs } from 'pinia';
import { FormInstance } from 'ant-design-vue/es/form';
import { FileRecord } from '@/api/system/file/model';
// 是否是修改
const isUpdate = ref(false);
const useForm = Form.useForm;
// 是否开启响应式布局
const themeStore = useThemeStore();
const { styleResponsive } = storeToRefs(themeStore);
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: Manuscript | null;
}>();
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
// 提交状态
const loading = ref(false);
// 是否显示最大化切换按钮
const maxable = ref(true);
// 表格选中数据
const formRef = ref<FormInstance | null>(null);
// 用户信息
const form = reactive<Manuscript>({
id: undefined,
title: undefined,
content: undefined,
cover: undefined,
deleted: undefined,
tenantId: undefined,
createTime: undefined,
updateTime: undefined,
userId: undefined,
sortNumber: undefined,
status: undefined,
});
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 表单验证规则
const rules = reactive({
});
const { resetFields } = useForm(form, rules);
/* 保存编辑 */
const save = () => {
if (!formRef.value) {
return;
}
formRef.value
.validate()
.then(() => {
loading.value = true;
const formData = {
...form
};
const saveOrUpdate = isUpdate.value ? updateManuscript : addManuscript;
saveOrUpdate(formData)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
})
.catch(() => {});
};
watch(
() => props.visible,
(visible) => {
if (visible) {
if (props.data) {
assignObject(form, props.data);
isUpdate.value = true;
} else {
isUpdate.value = false;
}
} else {
resetFields();
}
},
{ immediate: true }
);
</script>
+263
View File
@@ -0,0 +1,263 @@
<template>
<div class="page">
<div class="ele-body">
<a-card :bordered="false" :body-style="{ padding: '16px' }">
<ele-pro-table
ref="tableRef"
row-key="id"
:columns="columns"
:datasource="datasource"
:customRow="customRow"
tool-class="ele-toolbar-form"
class="sys-org-table"
>
<template #toolbar>
<search
@search="reload"
:selection="selection"
@add="openEdit"
@remove="removeBatch"
@batchMove="openMove"
/>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'image'">
<a-image :src="record.image" :width="50" />
</template>
<template v-if="column.key === 'status'">
<a-tag v-if="record.status === 1" color="green">显示</a-tag>
<a-tag v-if="record.status === 0" color="red">隐藏</a-tag>
</template>
<template v-if="column.key === 'action'">
<a-space>
<a @click="openEdit(record)">修改</a>
<a-divider type="vertical" />
<a-popconfirm
title="确定要删除此记录吗?"
@confirm="remove(record)"
>
<a class="ele-text-danger">删除</a>
</a-popconfirm>
</a-space>
</template>
</template>
</ele-pro-table>
</a-card>
<!-- 编辑弹窗 -->
<ManuscriptEdit v-model:visible="showEdit" :data="current" @done="reload" />
</div>
</div>
</template>
<script lang="ts" setup>
import { createVNode, ref } from 'vue';
import { message, Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import type { EleProTable } from 'ele-admin-pro';
import { toDateString } from 'ele-admin-pro';
import type {
DatasourceFunction,
ColumnItem
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import ManuscriptEdit from './components/manuscriptEdit.vue';
import { pageManuscript, removeManuscript, removeBatchManuscript } from '@/api/cms/manuscript';
import type { Manuscript, ManuscriptParam } from '@/api/cms/manuscript/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格选中数据
const selection = ref<Manuscript[]>([]);
// 当前编辑数据
const current = ref<Manuscript | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 是否显示批量移动弹窗
const showMove = ref(false);
// 加载状态
const loading = ref(true);
// 表格数据源
const datasource: DatasourceFunction = ({
page,
limit,
where,
orders,
filters
}) => {
if (filters) {
where.status = filters.status;
}
return pageManuscript({
...where,
...orders,
page,
limit
});
};
// 表格列配置
const columns = ref<ColumnItem[]>([
{
title: '',
dataIndex: 'id',
key: 'id',
align: 'center',
width: 90,
},
{
title: '',
dataIndex: 'title',
key: 'title',
align: 'center',
},
{
title: '',
dataIndex: 'content',
key: 'content',
align: 'center',
},
{
title: '',
dataIndex: 'cover',
key: 'cover',
align: 'center',
},
{
title: '是否删除, 0否, 1是',
dataIndex: 'deleted',
key: 'deleted',
align: 'center',
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center',
sorter: true,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd')
},
{
title: '修改时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
},
{
title: '',
dataIndex: 'userId',
key: 'userId',
align: 'center',
},
{
title: '',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
},
{
title: '待审核',
dataIndex: 'status',
key: 'status',
align: 'center',
},
{
title: '操作',
key: 'action',
width: 180,
fixed: 'right',
align: 'center',
hideInSetting: true
}
]);
/* 搜索 */
const reload = (where?: ManuscriptParam) => {
selection.value = [];
tableRef?.value?.reload({ where: where });
};
/* 打开编辑弹窗 */
const openEdit = (row?: Manuscript) => {
current.value = row ?? null;
showEdit.value = true;
};
/* 打开批量移动弹窗 */
const openMove = () => {
showMove.value = true;
};
/* 删除单个 */
const remove = (row: Manuscript) => {
const hide = message.loading('请求中..', 0);
removeManuscript(row.id)
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
};
/* 批量删除 */
const removeBatch = () => {
if (!selection.value.length) {
message.error('请至少选择一条数据');
return;
}
Modal.confirm({
title: '提示',
content: '确定要删除选中的记录吗?',
icon: createVNode(ExclamationCircleOutlined),
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchManuscript(selection.value.map((d) => d.id))
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
}
});
};
/* 查询 */
const query = () => {
loading.value = true;
};
/* 自定义行属性 */
const customRow = (record: Manuscript) => {
return {
// 行点击事件
onClick: () => {
// console.log(record);
},
// 行双击事件
onDblclick: () => {
openEdit(record);
}
};
};
query();
</script>
<script lang="ts">
export default {
name: 'Manuscript'
};
</script>
<style lang="less" scoped></style>
@@ -1,300 +0,0 @@
<!-- 编辑弹窗 -->
<template>
<ele-modal
:width="740"
:visible="visible"
:confirm-loading="loading"
:title="isUpdate ? '修改分类' : '新建分类'"
:body-style="{ paddingBottom: '8px' }"
@update:visible="updateVisible"
@ok="save"
>
<a-form
ref="formRef"
:model="form"
:rules="rules"
:label-col="styleResponsive ? { md: 6, sm: 4, xs: 24 } : { flex: '90px' }"
:wrapper-col="
styleResponsive ? { md: 18, sm: 20, xs: 24 } : { flex: '1' }
"
>
<a-row :gutter="16">
<a-col
v-bind="styleResponsive ? { md: 12, sm: 24, xs: 24 } : { span: 12 }"
>
<a-form-item label="上级分类" name="parentId">
<a-tree-select
allow-clear
:tree-data="categoryList"
tree-default-expand-all
placeholder="请选择上级分类"
:value="form.parentId || undefined"
:dropdown-style="{ maxHeight: '360px', overflow: 'auto' }"
@update:value="(value?: number) => (form.parentId = value)"
/>
</a-form-item>
<a-form-item label="分类名称" name="title">
<a-input
allow-clear
placeholder="请输入分类名称"
v-model:value="form.title"
@pressEnter="save"
/>
</a-form-item>
</a-col>
<a-col
v-bind="styleResponsive ? { md: 12, sm: 24, xs: 24 } : { span: 12 }"
>
<a-form-item label="排序号" name="sortNumber">
<a-input-number
:min="0"
:max="99999"
class="ele-fluid"
placeholder="请输入排序号"
v-model:value="form.sortNumber"
/>
</a-form-item>
<a-form-item label="是否展示">
<a-switch
checked-children="是"
un-checked-children="否"
:checked="form.status === 0"
@update:checked="updateHideValue"
/>
</a-form-item>
</a-col>
</a-row>
<div style="margin-bottom: 22px">
<a-divider />
</div>
<a-row :gutter="16">
<a-col
v-bind="styleResponsive ? { md: 12, sm: 24, xs: 24 } : { span: 12 }"
>
<a-form-item label="索引图标" name="image">
<ele-image-upload
v-model:value="images"
:item-style="{ width: '45px', height: '45px' }"
:limit="1"
@upload="onUpload"
@remove="onClose"
/>
</a-form-item>
</a-col>
<a-col
v-bind="styleResponsive ? { md: 12, sm: 24, xs: 24 } : { span: 12 }"
>
<a-form-item
label="备注"
name="comments"
:label-col="
styleResponsive ? { md: 3, sm: 4, xs: 24 } : { flex: '90px' }
"
:wrapper-col="
styleResponsive ? { md: 21, sm: 20, xs: 24 } : { flex: '1' }
"
>
<a-textarea
:rows="4"
:maxlength="200"
placeholder="请输入备注信息"
v-model:value="form.comments"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { message } from 'ant-design-vue/es';
import type { FormInstance, Rule } from 'ant-design-vue/es/form';
import { storeToRefs } from 'pinia';
import { useThemeStore } from '@/store/modules/theme';
import useFormData from '@/utils/use-form-data';
import type { Category } from '@/api/goods/category/model';
import { addCategory, updateCategory } from '@/api/goods/category';
import { FILE_SERVER } from "@/config/setting";
import { ItemType } from "ele-admin-pro/es/ele-image-upload/types";
import { uploadFile } from "@/api/system/file";
import { LoginRecordParam } from "@/api/system/login-record/model";
// 是否开启响应式布局
const themeStore = useThemeStore();
const { styleResponsive } = storeToRefs(themeStore);
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: Category | null;
// 上级分类id
parentId?: number;
// 全部分类数据
categoryList: Category[];
}>();
// 表单数据
const { form, resetFields, assignFields } = useFormData<Category>({
title: '',
categoryId: undefined,
parentId: undefined,
image: '',
status: 0,
sortNumber: 100
});
//
const formRef = ref<FormInstance | null>(null);
// 是否是修改
const isUpdate = ref(false);
// 提交状态
const loading = ref(false);
// 已上传数据, 可赋初始值用于回显
const images = ref([]);
// 表单验证规则
const rules = reactive<Record<string, Rule[]>>({
title: [
{
required: true,
message: '请输入分类名称',
type: 'string',
trigger: 'blur'
}
],
sortNumber: [
{
required: true,
message: '请输入排序号',
type: 'number',
trigger: 'blur'
}
],
meta: [
{
type: 'string',
validator: async (_rule: Rule, value: string) => {
if (value) {
const msg = '请输入正确的JSON格式';
try {
const obj = JSON.parse(value);
if (typeof obj !== 'object' || obj === null) {
return Promise.reject(msg);
}
} catch (_e) {
return Promise.reject(msg);
}
}
return Promise.resolve();
},
trigger: 'blur'
}
]
});
// 上传文件
const onUpload = (d: ItemType) => {
uploadFile(<File>d.file)
.then((result) => {
form.image = result.path;
message.success('上传成功');
})
.catch((e) => {
message.error(e.message);
});
};
const onClose = () => {
form.image = ''
}
/* 保存编辑 */
const save = () => {
if (!formRef.value) {
return;
}
formRef.value
.validate()
.then(() => {
loading.value = true;
const categoryForm = {
...form,
parentId: form.parentId || 0
};
const saveOrUpdate = isUpdate.value ? updateCategory : addCategory;
saveOrUpdate(categoryForm)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
})
.catch(() => {});
};
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
const updateHideValue = (value: boolean) => {
form.status = value ? 0 : 1;
};
watch(
() => props.visible,
(visible) => {
if (visible) {
if (props.data) {
// 头像赋值
images.value = [];
if(props.data.image){
images.value.push({ uid:1, url: props.data.image, status: '' });
}
assignFields({
...props.data,
parentId:
props.data.parentId === 0 ? undefined : props.data.parentId
});
isUpdate.value = true;
} else {
form.parentId = props.parentId;
isUpdate.value = false;
}
} else {
resetFields();
formRef.value?.clearValidate();
}
}
);
</script>
<script lang="ts">
import * as icons from '@/layout/menu-icons';
export default {
components: icons,
data() {
return {
iconData: [
{
title: '已引入的图标',
icons: Object.keys(icons)
}
]
};
}
};
</script>
-281
View File
@@ -1,281 +0,0 @@
<template>
<div class="ele-body">
<a-card :bordered="false">
<!-- 表格 -->
<ele-pro-table
ref="tableRef"
row-key="categoryId"
:columns="columns"
:datasource="datasource"
:parse-data="parseData"
:need-page="false"
:expand-icon-column-index="1"
:expanded-row-keys="expandedRowKeys"
:scroll="{ x: 1200 }"
cache-key="proGoodsCategoryTable"
@done="onDone"
@expand="onExpand"
>
<template #toolbar>
<a-space>
<a-button type="primary" class="ele-btn-icon" @click="openEdit()">
<template #icon>
<plus-outlined />
</template>
<span>新建</span>
</a-button>
<a-button type="dashed" class="ele-btn-icon" @click="expandAll">
展开全部
</a-button>
<a-button type="dashed" class="ele-btn-icon" @click="foldAll">
折叠全部
</a-button>
<!-- 搜索表单 -->
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入搜索关键词"
@search="search"
@pressEnter="search"
/>
</a-space>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'menuType'">
<a-tag v-if="isExternalLink(record.path)" color="red">外链</a-tag>
<a-tag v-else-if="isExternalLink(record.component)" color="orange">
内链
</a-tag>
<a-tag v-else-if="isDirectory(record)" color="blue">目录</a-tag>
<a-tag v-else-if="record.menuType === 0" color="green">分类</a-tag>
<a-tag v-else-if="record.menuType === 1">按钮</a-tag>
</template>
<template v-else-if="column.key === 'title'">
<a-avatar
:size="20"
v-if="record.image"
shape="square"
:src="`${record.image}`"
/>
<a-tooltip :title="`分类ID:${record.categoryId}`">
<span>{{ record.title }}</span>
</a-tooltip>
</template>
<template v-if="column.key === 'status'">
<a-tag v-if="record.status === 0" color="green">显示</a-tag>
<a-tag v-if="record.status === 1" color="orange">隐藏</a-tag>
</template>
<template v-else-if="column.key === 'action'">
<a-space>
<a @click="openEdit(null, record.categoryId)">添加</a>
<a-divider type="vertical" />
<a @click="openEdit(record)">修改</a>
<a-divider type="vertical" />
<a-popconfirm
placement="topRight"
title="确定要删除此分类吗?"
@confirm="remove(record)"
>
<a class="ele-text-danger">删除</a>
</a-popconfirm>
</a-space>
</template>
</template>
</ele-pro-table>
</a-card>
<!-- 编辑弹窗 -->
<category-edit
v-model:visible="showEdit"
:data="current"
:parent-id="parentId"
:category-list="categoryData"
@done="reload"
/>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { message } from 'ant-design-vue/es';
import { PlusOutlined } from '@ant-design/icons-vue';
import type {
DatasourceFunction,
ColumnItem,
EleProTableDone
} from 'ele-admin-pro/es/ele-pro-table/types';
import {
messageLoading,
toDateString,
isExternalLink,
toTreeData,
eachTreeData
} from 'ele-admin-pro/es';
import type { EleProTable } from 'ele-admin-pro/es';
import CategoryEdit from './components/category-edit.vue';
import type { Category, CategoryParam } from '@/api/goods/category/model';
import { listCategory, removeCategory } from "@/api/goods/category";
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格列配置
const columns = ref<ColumnItem[]>([
{
key: 'index',
width: 48,
align: 'center',
fixed: 'left',
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '分类名称',
key: 'title',
showSorterTooltip: false,
ellipsis: true
},
{
title: '排序',
dataIndex: 'sortNumber',
sorter: true,
width: 180,
showSorterTooltip: false
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
sorter: true,
width: 180,
showSorterTooltip: false,
customRender: ({ text }) => ['显示', '隐藏'][text]
},
{
title: '创建时间',
dataIndex: 'createTime',
sorter: true,
showSorterTooltip: false,
ellipsis: true,
width: 180,
customRender: ({ text }) => toDateString(text)
},
{
title: '操作',
key: 'action',
width: 200,
align: 'center'
}
]);
// 当前编辑数据
const current = ref<Category | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 上级分类id
const parentId = ref<number>();
// 分类数据
const categoryData = ref<Category[]>([]);
// 表格展开的行
const expandedRowKeys = ref<number[]>([]);
// 表格数据源
const datasource: DatasourceFunction = ({ where }) => {
return listCategory({ ...where });
};
/* 数据转为树形结构 */
const parseData = (data: Category[]) => {
return toTreeData({
data: data.map((d) => {
return { ...d, key: d.categoryId, value: d.categoryId };
}),
idField: 'categoryId',
parentIdField: 'parentId'
});
};
/* 表格渲染完成回调 */
const onDone: EleProTableDone<Category> = ({ data }) => {
categoryData.value = data;
};
/* 刷新表格 */
const reload = (where?: CategoryParam) => {
tableRef?.value?.reload({ where });
};
/* 打开编辑弹窗 */
const openEdit = (row?: Category | null, id?: number) => {
current.value = row ?? null;
parentId.value = id;
showEdit.value = true;
};
const search = (searchText) => {
reload({ title: searchText });
};
/* 删除单个 */
const remove = (row: Category) => {
if (row.children?.length) {
message.error('请先删除子节点');
return;
}
const hide = messageLoading('请求中..', 0);
removeCategory(row.categoryId)
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
};
/* 展开全部 */
const expandAll = () => {
let keys: number[] = [];
eachTreeData(categoryData.value, (d) => {
if (d.children && d.children.length && d.categoryId) {
keys.push(d.categoryId);
}
});
expandedRowKeys.value = keys;
};
/* 折叠全部 */
const foldAll = () => {
expandedRowKeys.value = [];
};
/* 点击展开图标时触发 */
const onExpand = (expanded: boolean, record: Category) => {
if (expanded) {
expandedRowKeys.value = [
...expandedRowKeys.value,
record.categoryId as number
];
} else {
expandedRowKeys.value = expandedRowKeys.value.filter(
(d) => d !== record.categoryId
);
}
};
/* 判断是否是目录 */
const isDirectory = (d: Category) => {
return !!d.children?.length;
};
</script>
<script lang="ts">
export default {
name: 'Category'
};
</script>
@@ -1,158 +0,0 @@
<!-- 角色编辑弹窗 -->
<template>
<ele-modal
:width="460"
:visible="visible"
:confirm-loading="loading"
:title="isUpdate ? '修改角色' : '添加角色'"
:body-style="{ paddingBottom: '8px' }"
@update:visible="updateVisible"
@ok="save"
>
<a-form
ref="formRef"
:model="form"
:rules="rules"
:label-col="styleResponsive ? { md: 5, sm: 5, xs: 24 } : { flex: '90px' }"
:wrapper-col="
styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' }
"
>
<a-form-item label="角色名称" name="roleName">
<a-input
allow-clear
:maxlength="20"
placeholder="请输入角色名称"
v-model:value="form.roleName"
/>
</a-form-item>
<a-form-item label="角色标识" name="roleCode">
<a-input
allow-clear
:maxlength="20"
placeholder="请输入角色标识"
v-model:value="form.roleCode"
/>
</a-form-item>
<a-form-item label="备注">
<a-textarea
:rows="4"
:maxlength="200"
placeholder="请输入备注"
v-model:value="form.comments"
/>
</a-form-item>
</a-form>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { message } from 'ant-design-vue/es';
import type { FormInstance, Rule } from 'ant-design-vue/es/form';
import { storeToRefs } from 'pinia';
import { useThemeStore } from '@/store/modules/theme';
import useFormData from '@/utils/use-form-data';
import { addRole, updateRole } from '@/api/system/role';
import type { Role } from '@/api/system/role/model';
// 是否开启响应式布局
const themeStore = useThemeStore();
const { styleResponsive } = storeToRefs(themeStore);
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: Role | null;
}>();
//
const formRef = ref<FormInstance | null>(null);
// 是否是修改
const isUpdate = ref(false);
// 提交状态
const loading = ref(false);
// 表单数据
const { form, resetFields, assignFields } = useFormData<Role>({
roleId: undefined,
roleName: '',
roleCode: '',
comments: ''
});
// 表单验证规则
const rules = reactive<Record<string, Rule[]>>({
roleName: [
{
required: true,
message: '请输入角色名称',
type: 'string',
trigger: 'blur'
}
],
roleCode: [
{
required: true,
message: '请输入角色标识',
type: 'string',
trigger: 'blur'
}
]
});
/* 保存编辑 */
const save = () => {
if (!formRef.value) {
return;
}
formRef.value
.validate()
.then(() => {
loading.value = true;
const saveOrUpdate = isUpdate.value ? updateRole : addRole;
saveOrUpdate(form)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
})
.catch(() => {});
};
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
watch(
() => props.visible,
(visible) => {
if (visible) {
if (props.data) {
assignFields(props.data);
isUpdate.value = true;
} else {
isUpdate.value = false;
}
} else {
resetFields();
formRef.value?.clearValidate();
}
}
);
</script>
-245
View File
@@ -1,245 +0,0 @@
<template>
<div class="ele-body">
<a-card :bordered="false">
<!-- 表格 -->
<ele-pro-table
ref="tableRef"
row-key="commentId"
:columns="columns"
:datasource="datasource"
v-model:selection="selection"
:scroll="{ x: 800 }"
cache-key="proShopCommentTable"
>
<template #toolbar>
<a-space>
<!-- <a-button type="primary" class="ele-btn-icon" @click="openEdit()">-->
<!-- <template #icon>-->
<!-- <plus-outlined />-->
<!-- </template>-->
<!-- <span>新建</span>-->
<!-- </a-button>-->
<a-button
danger
type="primary"
class="ele-btn-icon"
@click="removeBatch"
>
<template #icon>
<delete-outlined />
</template>
<span>删除</span>
</a-button>
<a-radio-group :defaultValue="score" @change="handleTabs">
<a-radio-button :value="0">全部</a-radio-button>
<a-radio-button :value="10">好评</a-radio-button>
<a-radio-button :value="20">中评</a-radio-button>
<a-radio-button :value="30">差评</a-radio-button>
</a-radio-group>
<a-input-search
allow-clear
v-model:value="searchText"
placeholder="请输入关键词"
@search="reload"
@pressEnter="reload"
>
<template #addonBefore>
<a-select
v-model:value="type"
style="width: 100px; margin: -5px -12px"
>
<a-select-option value="goodsName">商品名称</a-select-option>
<a-select-option value="goodsCode">商品编码</a-select-option>
<a-select-option value="userId">用户ID</a-select-option>
</a-select>
</template>
</a-input-search>
</a-space>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-space>
<a @click="openEdit(record)">修改</a>
<a-divider type="vertical" />
<a-popconfirm
placement="topRight"
title="确定要删除此评价吗?"
@confirm="remove(record)"
>
<a class="ele-text-danger">删除</a>
</a-popconfirm>
</a-space>
</template>
</template>
</ele-pro-table>
</a-card>
<!-- 编辑弹窗 -->
<comment-edit v-model:visible="showEdit" :data="current" @done="reload" />
</div>
</template>
<script lang="ts" setup>
import { createVNode, ref } from 'vue';
import { message, Modal } from 'ant-design-vue/es';
import {
PlusOutlined,
DeleteOutlined,
ExclamationCircleOutlined
} from '@ant-design/icons-vue';
import type { EleProTable } from 'ele-admin-pro/es';
import type {
DatasourceFunction,
ColumnItem
} from 'ele-admin-pro/es/ele-pro-table/types';
import { messageLoading, toDateString } from 'ele-admin-pro/es';
import CommentEdit from './components/comment-edit.vue';
import {
pageComments,
removeComment,
removeComments
} from '@/api/goods/comment';
import type { Comment, CommentParam } from '@/api/goods/comment/model';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格列配置
const columns = ref<ColumnItem[]>([
{
key: 'index',
width: 48,
align: 'center',
fixed: 'left',
hideInSetting: true,
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '商品信息',
dataIndex: 'goods',
showSorterTooltip: false
},
{
title: '买家',
dataIndex: 'user',
showSorterTooltip: false
},
{
title: '评分',
dataIndex: 'score',
sorter: true,
showSorterTooltip: false
},
{
title: '评价内容',
dataIndex: 'content'
},
{
title: '图片评价',
dataIndex: 'isPicture'
},
{
title: '评价时间',
dataIndex: 'createTime',
sorter: true,
showSorterTooltip: false,
ellipsis: true,
customRender: ({ text }) => toDateString(text)
},
{
title: '操作',
key: 'action',
width: 200,
align: 'center'
}
]);
// 表格选中数据
const selection = ref<Comment[]>([]);
// 当前编辑数据
const current = ref<Comment | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
const type = ref('goodsName');
const searchText = ref('');
const score = ref(0);
const handleTabs = (e) => {
score.value = e.target.value;
};
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
if (type.value == 'goodsName') {
where.goodsName = searchText.value;
}
if (type.value == 'goodsCode') {
where.goodsCode = searchText.value;
}
if (type.value == 'userId') {
where.userId = searchText.value;
}
return pageComments({ ...where, ...orders, page, limit });
};
/* 搜索 */
const reload = (where?: CommentParam) => {
selection.value = [];
tableRef?.value?.reload({ page: 1, where });
};
/* 打开编辑弹窗 */
const openEdit = (row?: Comment) => {
current.value = row ?? null;
showEdit.value = true;
};
/* 删除单个 */
const remove = (row: Comment) => {
const hide = messageLoading('请求中..', 0);
removeComment(row.commentId)
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
};
/* 批量删除 */
const removeBatch = () => {
if (!selection.value.length) {
message.error('请至少选择一条数据');
return;
}
Modal.confirm({
title: '提示',
content: '确定要删除选中的评价吗?',
icon: createVNode(ExclamationCircleOutlined),
maskClosable: true,
onOk: () => {
const hide = messageLoading('请求中..', 0);
removeComments(selection.value.map((d) => d.commentId))
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
}
});
};
</script>
<script lang="ts">
export default {
name: 'ShopComment'
};
</script>
@@ -1,433 +0,0 @@
<template>
<div>
<a-form-item label="商品规格" :labelCol="labelCol" :wrapperCol="wrapperCol">
<div v-if="true" class="form-item-help" style="line-height: 36px">
<small>最多添加3个商品规格组,生成的SKU数量不能超出50个</small>
</div>
<!-- 规格组 -->
<div
class="spec-group"
>
<div class="spec-group-item clearfix">
<a-input
class="group-item-input"
:readOnly="isSpecLocked"
placeholder="请输入规格名称"
@change="onChangeSpecGroupIpt"
/>
<a
v-if="!isSpecLocked"
class="group-item-delete"
href="javascript:;"
@click="handleDeleteSpecGroup(index)"
>删除规格组</a
>
</div>
<div class="spec-value clearfix">
<div
class="spec-value-item"
>
<a-input
class="value-item-input"
:readOnly="isSpecLocked"
placeholder="请输入规格值"
@change="onChangeSpecValueIpt"
/>
<a-icon
v-if="!isSpecLocked"
class="icon-close"
theme="filled"
type="close-circle"
@click="handleDeleteSpecValue(index, idx)"
/>
</div>
<div v-if="!isSpecLocked" class="spec-value-add">
<a
class="group-item-delete"
href="javascript:;"
@click="handleAddSpecValue(index)"
>新增规格值</a
>
</div>
</div>
</div>
<!-- 添加规格按钮 -->
<a-button
v-if="!isSpecLocked && multiSpecData.specList.length < 3"
class="spec-group-add-btn"
icon="plus"
@click="handleAddSpecGroup"
>添加规格组</a-button
>
</a-form-item>
<a-form-item
v-show="multiSpecData.skuList.length"
label="SKU列表"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
<!-- 批量设置 -->
<div v-if="multiSpecData.skuList.length > 1" class="sku-batch">
<span class="title">批量设置:</span>
<a-input-number
placeholder="商品价格"
:min="0.01"
:precision="2"
/>
<a-input-number
placeholder="成本价格"
:min="0"
:precision="2"
/>
<a-input-number
placeholder="库存数量"
:min="0"
:precision="0"
/>
<a-input-number
placeholder="商品重量"
:min="0"
:precision="2"
/>
<a-input
placeholder="sku编码"
/>
<a-button @click="handleSkuBatch">立即设置</a-button>
</div>
<!-- sku列表table -->
<a-table
class="sku-list"
:columns="multiSpecData.skuColumns"
:dataSource="multiSpecData.skuList"
:scroll="{ x: true }"
:pagination="false"
bordered
>
<!-- 预览图 -->
<template #image="text, item">
<SelectImage
v-model="item.image_id"
:defaultList="item.image_id > 0 && item.image ? [item.image] : []"
:width="50"
/>
</template>
<!-- 商品价格 -->
<template #goods_price="text, item">
<a-input-number
v-model="item.goods_price"
size="small"
:min="0.01"
:precision="2"
/>
</template>
<!-- 成本价格 -->
<template #line_price="text, item">
<a-input-number
v-model="item.line_price"
size="small"
:min="0"
:precision="2"
/>
</template>
<!-- 库存数量 -->
<template #stock_num="text, item">
<a-input-number
v-model="item.stock_num"
size="small"
:min="0"
:precision="0"
/>
</template>
<!-- 商品重量 -->
<template #goods_weight="text, item">
<a-input-number
v-model="item.goods_weight"
size="small"
:min="0"
:precision="2"
/>
</template>
<!-- sku编码 -->
<template #goods_sku_no="text, item">
<a-input v-model="item.goods_sku_no" size="small" />
</template>
</a-table>
</a-form-item>
</div>
</template>
<script>
import PropTypes from 'ant-design-vue/es/_util/vue-types';
import MultiSpecModel from '@/common/model/goods/MultiSpec';
// import { SelectImage } from '@/components';
export default {
components: {
// SelectImage
},
props: {
// 默认的规格列表
defaultSpecList: PropTypes.array.def([]),
// 默认的SKU列表
defaultSkuList: PropTypes.array.def([]),
// 商品规格是否锁定(锁定状态下不允许编辑规格)
isSpecLocked: PropTypes.bool.def(false)
},
data() {
return {
// 标签布局属性
labelCol: { span: 3 },
// 输入框布局属性
wrapperCol: { span: 21 },
// 商品多规格模型
MultiSpecModel: new MultiSpecModel(),
// MultiSpecModel: Object,
multiSpecData: {
// 规格列表
specList: [],
// SKU列表
skuList: []
}
};
},
watch: {
defaultSpecList(val) {
if (val.length && this.MultiSpecModel.isEmpty()) {
this.getData();
}
}
},
// 初始化数据
created() {
// 获取规格及SKU信息
this.getData();
},
methods: {
// 获取规格及SKU信息(展示)
getData() {
const { defaultSpecList, defaultSkuList } = this;
this.multiSpecData = this.MultiSpecModel.getData(
defaultSpecList,
defaultSkuList
);
},
// 获取规格及SKU信息(表单提交)
getFromSpecData() {
return this.MultiSpecModel.getFromSpecData();
},
// 添加规格组
handleAddSpecGroup() {
if (this.checkSkuMaxNum()) {
this.MultiSpecModel.handleAddSpecGroup();
}
},
// 删除规格组
handleDeleteSpecGroup(groupIndex) {
const app = this;
const modal = this.$confirm({
title: '您确定要删除该规格组吗?',
content: '删除后不可恢复',
onOk() {
// 删除元素
app.MultiSpecModel.handleDeleteSpecGroup(groupIndex);
// 关闭对话框
modal.destroy();
}
});
},
// 新增规格值
handleAddSpecValue(groupIndex) {
if (this.checkSkuMaxNum()) {
this.MultiSpecModel.handleAddSpecValue(groupIndex);
}
},
// 删除规格值
handleDeleteSpecValue(groupIndex, valueIndex) {
const app = this;
const modal = this.$confirm({
title: '您确定要删除该规格值吗?',
content: '删除后不可恢复',
onOk() {
// 删除元素
app.MultiSpecModel.handleDeleteSpecValue(groupIndex, valueIndex);
// 关闭对话框
modal.destroy();
}
});
},
// 规格组输入框change事件
onChangeSpecGroupIpt() {
// 更新skuList
this.MultiSpecModel.onUpdate(true);
},
// 规格值输入框change事件
onChangeSpecValueIpt(event, itm) {
// 更新skuList
this.MultiSpecModel.onUpdate(true);
},
// 验证最大sku数量
checkSkuMaxNum() {
const skuList = this.multiSpecData.skuList;
if (skuList.length >= 50) {
this.$message.error(
`生成的sku列表数量不能大于50个,当前数量:${skuList.length}个`,
2.5
);
return false;
}
return true;
},
// 批量设置sku事件
handleSkuBatch() {
this.MultiSpecModel.handleSkuBatch();
},
// 验证多规格表单
verifyForm() {
if (!this.MultiSpecModel.verifyForm()) {
this.$message.error(this.MultiSpecModel.getError(), 2);
return false;
}
return true;
}
}
};
</script>
<style lang="less" scoped>
// 商品多规格
.spec-group {
width: 895px;
margin-bottom: 15px;
line-height: normal;
.ant-input {
height: 28px;
padding: 4px 11px;
font-size: @font-size-base;
line-height: 1.5;
&::placeholder {
font-size: @font-size-base;
}
}
.form-item-help {
line-height: 36px;
}
.spec-group-item {
background: #f4f5f9;
padding: 7px 12px;
line-height: 28px;
.group-item-input {
float: left;
width: 180px;
}
.group-item-delete {
font-size: 12px;
float: right;
}
}
.spec-value {
background: #fbfbfb;
padding: 8px 35px;
.spec-value-add,
.spec-value-item {
float: left;
margin-bottom: 6px;
margin-top: 6px;
}
.spec-value-add {
height: 28px;
line-height: 28px;
a {
font-size: 12px;
}
}
.spec-value-item {
position: relative;
margin-right: 20px;
.value-item-input {
width: 186px;
}
&:hover {
.icon-close {
display: block;
}
}
.icon-close {
display: none;
position: absolute;
top: -8px;
right: -8px;
cursor: pointer;
font-size: 16px;
color: #7d7d7d;
}
}
}
}
// 添加规格按钮
.spec-group-add-btn {
font-size: @font-size-base;
}
// 批量设置sku
.sku-batch {
line-height: 40px;
margin-bottom: 12px;
.title {
line-height: 28px;
margin-right: 15px;
font-size: @font-size-base;
}
/deep/.ant-input,
/deep/.ant-input-number {
width: 120px;
margin-right: 15px;
}
/deep/.ant-input {
width: 140px;
}
}
// sku列表
.sku-list {
width: 895px;
/deep/.ant-table-thead > tr > th,
/deep/.ant-table-tbody > tr > td {
white-space: nowrap;
}
/deep/.ant-table-tbody > tr > td {
padding: 12px 18px;
}
/deep/.ant-input-sm,
/deep/.ant-input-number-sm {
height: 28px;
}
/deep/.ant-input-number-sm input {
height: 26px;
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More