调整
This commit is contained in:
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
VITE_APP_NAME=后台管理系统
|
VITE_APP_NAME=后台管理系统
|
||||||
VITE_API_URL=http://127.0.0.1:10051/api
|
VITE_API_URL=http://127.0.0.1:10051/api
|
||||||
#VITE_API_URL=https://sifa-api.wsdns.cn/api
|
#VITE_API_URL=https://yxe-api.gxwebsoft.com/api
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
VITE_APP_NAME=后台管理系统
|
VITE_APP_NAME=后台管理系统
|
||||||
VITE_API_URL=https://sifa-api.wsdns.cn/api
|
VITE_API_URL=https://yxe-api.gxwebsoft.com/api
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
"@bytemd/plugin-highlight": "^1.17.4",
|
"@bytemd/plugin-highlight": "^1.17.4",
|
||||||
"@bytemd/plugin-highlight-ssr": "^1.20.2",
|
"@bytemd/plugin-highlight-ssr": "^1.20.2",
|
||||||
"@kjgl77/datav-vue3": "^1.7.3",
|
"@kjgl77/datav-vue3": "^1.7.3",
|
||||||
|
"@tsparticles/slim": "^3.9.1",
|
||||||
|
"@tsparticles/vue3": "^3.0.1",
|
||||||
"@types/file-saver": "^2.0.7",
|
"@types/file-saver": "^2.0.7",
|
||||||
"@vue-office/docx": "^1.6.3",
|
"@vue-office/docx": "^1.6.3",
|
||||||
"@vue-office/excel": "^1.7.14",
|
"@vue-office/excel": "^1.7.14",
|
||||||
@@ -41,6 +43,7 @@
|
|||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
"jsbarcode": "^3.11.5",
|
"jsbarcode": "^3.11.5",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
|
"md5": "^2.3.0",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export interface LawFeedback {
|
|
||||||
//
|
|
||||||
id?: number;
|
|
||||||
//
|
|
||||||
userId?: number;
|
|
||||||
//
|
|
||||||
title?: string;
|
|
||||||
//
|
|
||||||
company?: string;
|
|
||||||
//
|
|
||||||
address?: string;
|
|
||||||
//
|
|
||||||
date?: string;
|
|
||||||
//
|
|
||||||
pics?: string;
|
|
||||||
//
|
|
||||||
video?: string;
|
|
||||||
//
|
|
||||||
content?: string;
|
|
||||||
// 是否删除, 0否, 1是
|
|
||||||
deleted?: number;
|
|
||||||
// 租户id
|
|
||||||
tenantId?: number;
|
|
||||||
// 创建时间
|
|
||||||
createTime?: string;
|
|
||||||
// 修改时间
|
|
||||||
updateTime?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜索条件
|
|
||||||
*/
|
|
||||||
export interface LawFeedbackParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
keywords?: string;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 法律计算器配置
|
|
||||||
*/
|
|
||||||
export interface LawLegalCalConfig {
|
|
||||||
//
|
|
||||||
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 LawLegalCalConfigParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
keywords?: string;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 法律计算器配置
|
|
||||||
*/
|
|
||||||
export interface LawLegalCalType {
|
|
||||||
//
|
|
||||||
id?: number;
|
|
||||||
//
|
|
||||||
icon?: string;
|
|
||||||
//
|
|
||||||
title?: string;
|
|
||||||
// 类型
|
|
||||||
sortNumber?: number;
|
|
||||||
//
|
|
||||||
userId?: number;
|
|
||||||
// 是否删除, 0否, 1是
|
|
||||||
deleted?: number;
|
|
||||||
// 租户id
|
|
||||||
tenantId?: number;
|
|
||||||
// 创建时间
|
|
||||||
createTime?: string;
|
|
||||||
// 修改时间
|
|
||||||
updateTime?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 法律计算器配置搜索条件
|
|
||||||
*/
|
|
||||||
export interface LawLegalCalTypeParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
keywords?: string;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户填写法律文书内容
|
|
||||||
*/
|
|
||||||
export interface LawLegalDocContent {
|
|
||||||
//
|
|
||||||
id?: number;
|
|
||||||
//
|
|
||||||
groupId?: number;
|
|
||||||
//
|
|
||||||
content?: string;
|
|
||||||
//
|
|
||||||
userId?: number;
|
|
||||||
// 是否删除, 0否, 1是
|
|
||||||
deleted?: number;
|
|
||||||
// 租户id
|
|
||||||
tenantId?: number;
|
|
||||||
// 创建时间
|
|
||||||
createTime?: string;
|
|
||||||
// 修改时间
|
|
||||||
updateTime?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户填写法律文书内容搜索条件
|
|
||||||
*/
|
|
||||||
export interface LawLegalDocContentParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
keywords?: string;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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,31 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户填写企业法制体检内容
|
|
||||||
*/
|
|
||||||
export interface LawLegalOrgCheckContent {
|
|
||||||
//
|
|
||||||
id?: number;
|
|
||||||
//
|
|
||||||
groupId?: number;
|
|
||||||
//
|
|
||||||
content?: string;
|
|
||||||
//
|
|
||||||
userId?: number;
|
|
||||||
// 是否删除, 0否, 1是
|
|
||||||
deleted?: number;
|
|
||||||
// 租户id
|
|
||||||
tenantId?: number;
|
|
||||||
// 创建时间
|
|
||||||
createTime?: string;
|
|
||||||
// 修改时间
|
|
||||||
updateTime?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户填写企业法制体检内容搜索条件
|
|
||||||
*/
|
|
||||||
export interface LawLegalOrgCheckContentParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
keywords?: string;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公证配置
|
|
||||||
*/
|
|
||||||
export interface LawNotaryConfig {
|
|
||||||
//
|
|
||||||
id?: number;
|
|
||||||
//
|
|
||||||
title?: string;
|
|
||||||
// 配置
|
|
||||||
configList?: string;
|
|
||||||
//
|
|
||||||
userId?: number;
|
|
||||||
// 是否删除, 0否, 1是
|
|
||||||
deleted?: number;
|
|
||||||
// 租户id
|
|
||||||
tenantId?: number;
|
|
||||||
// 创建时间
|
|
||||||
createTime?: string;
|
|
||||||
// 修改时间
|
|
||||||
updateTime?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公证配置搜索条件
|
|
||||||
*/
|
|
||||||
export interface LawNotaryConfigParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
keywords?: string;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { LawOrg, LawOrgParam } 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',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询机构列表
|
|
||||||
*/
|
|
||||||
export async function listLawOrg(params?: LawOrgParam) {
|
|
||||||
const res = await request.get<ApiResult<LawOrg[]>>(
|
|
||||||
MODULES_API_URL + '/law/law-org',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加机构
|
|
||||||
*/
|
|
||||||
export async function addLawOrg(data: LawOrg) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
MODULES_API_URL + '/law/law-org',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改机构
|
|
||||||
*/
|
|
||||||
export async function updateLawOrg(data: LawOrg) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
MODULES_API_URL + '/law/law-org',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除机构
|
|
||||||
*/
|
|
||||||
export async function removeLawOrg(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
MODULES_API_URL + '/law/law-org/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除机构
|
|
||||||
*/
|
|
||||||
export async function removeBatchLawOrg(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
MODULES_API_URL + '/law/law-org/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据id查询机构
|
|
||||||
*/
|
|
||||||
export async function getLawOrg(id: number) {
|
|
||||||
const res = await request.get<ApiResult<LawOrg>>(
|
|
||||||
MODULES_API_URL + '/law/law-org/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -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,106 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
|
||||||
import type { LawOrgPeople, LawOrgPeopleParam } 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',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询列表
|
|
||||||
*/
|
|
||||||
export async function listLawOrgPeople(params?: LawOrgPeopleParam) {
|
|
||||||
const res = await request.get<ApiResult<LawOrgPeople[]>>(
|
|
||||||
MODULES_API_URL + '/law/law-org-people',
|
|
||||||
{
|
|
||||||
params
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*/
|
|
||||||
export async function addLawOrgPeople(data: LawOrgPeople) {
|
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
|
||||||
MODULES_API_URL + '/law/law-org-people',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改
|
|
||||||
*/
|
|
||||||
export async function updateLawOrgPeople(data: LawOrgPeople) {
|
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
|
||||||
MODULES_API_URL + '/law/law-org-people',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
export async function removeLawOrgPeople(id?: number) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
MODULES_API_URL + '/law/law-org-people/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*/
|
|
||||||
export async function removeBatchLawOrgPeople(data: (number | undefined)[]) {
|
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
|
||||||
MODULES_API_URL + '/law/law-org-people/batch',
|
|
||||||
{
|
|
||||||
data
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
|
||||||
return res.data.message;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据id查询
|
|
||||||
*/
|
|
||||||
export async function getLawOrgPeople(id: number) {
|
|
||||||
const res = await request.get<ApiResult<LawOrgPeople>>(
|
|
||||||
MODULES_API_URL + '/law/law-org-people/' + id
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
|
||||||
return res.data.data;
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.data.message));
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import type { PageParam } from '@/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export interface LawOrgPeople {
|
|
||||||
//
|
|
||||||
id?: number;
|
|
||||||
//
|
|
||||||
orgId?: number;
|
|
||||||
//
|
|
||||||
name?: string;
|
|
||||||
//
|
|
||||||
phone?: string;
|
|
||||||
//
|
|
||||||
position?: string;
|
|
||||||
//
|
|
||||||
type?: string;
|
|
||||||
//
|
|
||||||
userId?: number;
|
|
||||||
// 是否删除, 0否, 1是
|
|
||||||
deleted?: number;
|
|
||||||
// 租户id
|
|
||||||
tenantId?: number;
|
|
||||||
// 创建时间
|
|
||||||
createTime?: string;
|
|
||||||
// 修改时间
|
|
||||||
updateTime?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜索条件
|
|
||||||
*/
|
|
||||||
export interface LawOrgPeopleParam extends PageParam {
|
|
||||||
id?: number;
|
|
||||||
keywords?: string;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type {
|
||||||
|
Goods,
|
||||||
|
GoodsImportExcelParam,
|
||||||
|
GoodsImportResult,
|
||||||
|
GoodsParam
|
||||||
|
} from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
export async function getCount(params: GoodsParam) {
|
||||||
|
const res = await request.get(MODULES_API_URL + '/shop/goods/data', {
|
||||||
|
params
|
||||||
|
});
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询商品记录表
|
||||||
|
*/
|
||||||
|
export async function pageGoods(params: GoodsParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<Goods>>>(
|
||||||
|
MODULES_API_URL + '/shop/goods/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品记录表列表
|
||||||
|
*/
|
||||||
|
export async function listGoods(params?: GoodsParam) {
|
||||||
|
const res = await request.get<ApiResult<Goods[]>>(
|
||||||
|
MODULES_API_URL + '/shop/goods',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加商品记录表
|
||||||
|
*/
|
||||||
|
export async function addGoods(data: Goods) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/goods',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品记录表
|
||||||
|
*/
|
||||||
|
export async function updateGoods(data: Goods) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/goods',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品记录表
|
||||||
|
*/
|
||||||
|
export async function removeGoods(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/goods/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除商品记录表
|
||||||
|
*/
|
||||||
|
export async function removeBatchGoods(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/goods/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询商品记录表
|
||||||
|
*/
|
||||||
|
export async function getGoods(id: number) {
|
||||||
|
const res = await request.get<ApiResult<Goods>>(
|
||||||
|
MODULES_API_URL + '/shop/goods/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量导入商品(Excel)
|
||||||
|
*/
|
||||||
|
export async function importGoodsExcel(params: GoodsImportExcelParam) {
|
||||||
|
const res = await request.post<ApiResult<GoodsImportResult>>(
|
||||||
|
MODULES_API_URL + '/shop/goods/import-excel',
|
||||||
|
{},
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
const err: any = new Error(res.data.message);
|
||||||
|
err.data = res.data.data;
|
||||||
|
return Promise.reject(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量导入商品(Excel) - 直接上传文件
|
||||||
|
*/
|
||||||
|
export async function importGoodsExcelFile(
|
||||||
|
file: File,
|
||||||
|
params: GoodsImportExcelParam
|
||||||
|
) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
Object.entries(params ?? {}).forEach(([key, value]) => {
|
||||||
|
if (value === undefined || value === null || key === 'path') return;
|
||||||
|
formData.append(key, String(value));
|
||||||
|
});
|
||||||
|
const res = await request.post<ApiResult<GoodsImportResult>>(
|
||||||
|
MODULES_API_URL + '/shop/goods/import',
|
||||||
|
formData,
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
const err: any = new Error(res.data.message);
|
||||||
|
err.data = res.data.data;
|
||||||
|
return Promise.reject(err);
|
||||||
|
}
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
import { GoodsSpec } from '@/api/shop/goodsSpec/model';
|
||||||
|
import { GoodsSku } from '@/api/shop/goodsSku/model';
|
||||||
|
import { GoodsRoleCommission } from '@/api/shop/goodsRoleCommission/model';
|
||||||
|
|
||||||
|
export interface GoodsCount {
|
||||||
|
totalNum: number;
|
||||||
|
totalNum2: number;
|
||||||
|
totalNum3: number;
|
||||||
|
totalNum4: number;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 商品记录表
|
||||||
|
*/
|
||||||
|
export interface Goods {
|
||||||
|
// 自增ID
|
||||||
|
goodsId?: number;
|
||||||
|
// 类型 1实物商品 2虚拟商品
|
||||||
|
type?: number;
|
||||||
|
// 商品编码
|
||||||
|
code?: string;
|
||||||
|
// 商品标题
|
||||||
|
goodsName?: string;
|
||||||
|
// 商品封面图
|
||||||
|
image?: string;
|
||||||
|
video?: string;
|
||||||
|
// 商品详情
|
||||||
|
content?: string;
|
||||||
|
canExpress?: number;
|
||||||
|
// 商品分类
|
||||||
|
category?: string;
|
||||||
|
// 商品分类ID
|
||||||
|
categoryId?: number;
|
||||||
|
parentName?: string;
|
||||||
|
categoryName?: string;
|
||||||
|
// 一级分类
|
||||||
|
// categoryParent?: string;
|
||||||
|
// 二级分类
|
||||||
|
// categoryChildren?: string;
|
||||||
|
// 商品规格 0单规格 1多规格
|
||||||
|
specs?: number;
|
||||||
|
commissionRole?: number;
|
||||||
|
// 货架
|
||||||
|
position?: string;
|
||||||
|
// 进货价
|
||||||
|
buyingPrice?: string;
|
||||||
|
// 商品价格
|
||||||
|
price?: string;
|
||||||
|
originPrice?: string;
|
||||||
|
// 销售价格
|
||||||
|
salePrice?: string;
|
||||||
|
chainStorePrice?: string;
|
||||||
|
chainStoreRate?: string;
|
||||||
|
memberStoreRate?: string;
|
||||||
|
memberMarketRate?: string;
|
||||||
|
memberStoreCommission?: string;
|
||||||
|
shareIncome?: string;
|
||||||
|
supplierCommission?: string;
|
||||||
|
coopCommission?: string;
|
||||||
|
memberStorePrice?: string;
|
||||||
|
memberMarketPrice?: string;
|
||||||
|
// 经销商价格
|
||||||
|
dealerPrice?: string;
|
||||||
|
// 有赠品
|
||||||
|
buyingGift?: boolean;
|
||||||
|
// 有赠品
|
||||||
|
priceGift?: boolean;
|
||||||
|
// 有赠品
|
||||||
|
dealerGift?: boolean;
|
||||||
|
buyingGiftNum?: number;
|
||||||
|
priceGiftNum?: number;
|
||||||
|
priceGiftName?: string;
|
||||||
|
dealerGiftNum?: number;
|
||||||
|
// 库存计算方式(10下单减库存 20付款减库存)
|
||||||
|
deductStockType?: number;
|
||||||
|
// 封面图
|
||||||
|
files?: string;
|
||||||
|
// 销量
|
||||||
|
sales?: number;
|
||||||
|
isNew?: number;
|
||||||
|
// 库存
|
||||||
|
stock?: number;
|
||||||
|
// 商品重量
|
||||||
|
goodsWeight?: number;
|
||||||
|
// 消费赚取积分
|
||||||
|
gainIntegral?: number;
|
||||||
|
// 推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 商户ID
|
||||||
|
merchantId?: number;
|
||||||
|
// 商户名称
|
||||||
|
merchantName?: string;
|
||||||
|
supplierMerchantId?: number;
|
||||||
|
supplierName?: string;
|
||||||
|
// 状态(0:未上架,1:上架)
|
||||||
|
isShow?: number;
|
||||||
|
// 状态, 0上架 1待上架 2待审核 3审核不通过
|
||||||
|
status?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
// 显示规格名
|
||||||
|
specName?: string;
|
||||||
|
// 商品规格
|
||||||
|
goodsSpecs?: GoodsSpec[];
|
||||||
|
goodsRoleCommission?: GoodsRoleCommission[];
|
||||||
|
// 商品sku列表
|
||||||
|
goodsSkus?: GoodsSku[];
|
||||||
|
// 单位名称
|
||||||
|
unitName?: string;
|
||||||
|
expressTemplateId?: number;
|
||||||
|
canUseDate?: string;
|
||||||
|
ensureTag?: string;
|
||||||
|
expiredDay?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BathSet {
|
||||||
|
price?: number;
|
||||||
|
salePrice?: number;
|
||||||
|
stock?: number;
|
||||||
|
skuNo?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品记录表搜索条件
|
||||||
|
*/
|
||||||
|
export interface GoodsParam extends PageParam {
|
||||||
|
parentId?: number;
|
||||||
|
categoryId?: number;
|
||||||
|
goodsId?: number;
|
||||||
|
goodsName?: string;
|
||||||
|
isShow?: number;
|
||||||
|
stock?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GoodsImportResult {
|
||||||
|
excelPath?: string;
|
||||||
|
sheetName?: string;
|
||||||
|
totalRows: number;
|
||||||
|
inserted: number;
|
||||||
|
skippedExists: number;
|
||||||
|
goods?: Goods[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GoodsImportExcelParam {
|
||||||
|
path?: string;
|
||||||
|
sheetName?: string;
|
||||||
|
skipExisting?: boolean;
|
||||||
|
createCategory?: boolean;
|
||||||
|
merchantId?: number;
|
||||||
|
defaultIsShow?: number;
|
||||||
|
defaultStock?: number;
|
||||||
|
/**
|
||||||
|
* Excel 中未提供轮播图(files)时的默认值(通常为 JSON 字符串,如 "[]"/"[{...}]")
|
||||||
|
*/
|
||||||
|
defaultFiles?: string;
|
||||||
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { LawNotaryList, LawNotaryListParam } from './model';
|
import type { GoodsCategory, GoodsCategoryParam } from './model';
|
||||||
import { MODULES_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询公证列表
|
* 分页查询商品分类
|
||||||
*/
|
*/
|
||||||
export async function pageLawNotaryList(params: LawNotaryListParam) {
|
export async function pageGoodsCategory(params: GoodsCategoryParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<LawNotaryList>>>(
|
const res = await request.get<ApiResult<PageResult<GoodsCategory>>>(
|
||||||
MODULES_API_URL + '/law/law-notary-list/page',
|
MODULES_API_URL + '/shop/goods-category/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -20,11 +20,11 @@ export async function pageLawNotaryList(params: LawNotaryListParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询公证列表列表
|
* 查询商品分类列表
|
||||||
*/
|
*/
|
||||||
export async function listLawNotaryList(params?: LawNotaryListParam) {
|
export async function listGoodsCategory(params?: GoodsCategoryParam) {
|
||||||
const res = await request.get<ApiResult<LawNotaryList[]>>(
|
const res = await request.get<ApiResult<GoodsCategory[]>>(
|
||||||
MODULES_API_URL + '/law/law-notary-list',
|
MODULES_API_URL + '/shop/goods-category',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -36,11 +36,11 @@ export async function listLawNotaryList(params?: LawNotaryListParam) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加公证列表
|
* 添加商品分类
|
||||||
*/
|
*/
|
||||||
export async function addLawNotaryList(data: LawNotaryList) {
|
export async function addGoodsCategory(data: GoodsCategory) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/law/law-notary-list',
|
MODULES_API_URL + '/shop/goods-category',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -50,11 +50,11 @@ export async function addLawNotaryList(data: LawNotaryList) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改公证列表
|
* 修改商品分类
|
||||||
*/
|
*/
|
||||||
export async function updateLawNotaryList(data: LawNotaryList) {
|
export async function updateGoodsCategory(data: GoodsCategory) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/law/law-notary-list',
|
MODULES_API_URL + '/shop/goods-category',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -64,11 +64,11 @@ export async function updateLawNotaryList(data: LawNotaryList) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除公证列表
|
* 删除商品分类
|
||||||
*/
|
*/
|
||||||
export async function removeLawNotaryList(id?: number) {
|
export async function removeGoodsCategory(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/law/law-notary-list/' + id
|
MODULES_API_URL + '/shop/goods-category/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -77,11 +77,11 @@ export async function removeLawNotaryList(id?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除公证列表
|
* 批量删除商品分类
|
||||||
*/
|
*/
|
||||||
export async function removeBatchLawNotaryList(data: (number | undefined)[]) {
|
export async function removeBatchGoodsCategory(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/law/law-notary-list/batch',
|
MODULES_API_URL + '/shop/goods-category/batch',
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -93,11 +93,11 @@ export async function removeBatchLawNotaryList(data: (number | undefined)[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询公证列表
|
* 根据id查询商品分类
|
||||||
*/
|
*/
|
||||||
export async function getLawNotaryList(id: number) {
|
export async function getGoodsCategory(id: number) {
|
||||||
const res = await request.get<ApiResult<LawNotaryList>>(
|
const res = await request.get<ApiResult<GoodsCategory>>(
|
||||||
MODULES_API_URL + '/law/law-notary-list/' + id
|
MODULES_API_URL + '/shop/goods-category/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类
|
||||||
|
*/
|
||||||
|
export interface GoodsCategory {
|
||||||
|
// 商品分类ID
|
||||||
|
categoryId?: number;
|
||||||
|
// 分类标识
|
||||||
|
categoryCode?: string;
|
||||||
|
// 分类名称
|
||||||
|
title?: string;
|
||||||
|
// 类型 0列表 1单页 2外链
|
||||||
|
type?: number;
|
||||||
|
// 分类图片
|
||||||
|
image?: string;
|
||||||
|
// 上级分类ID
|
||||||
|
parentId?: number;
|
||||||
|
// 路由/链接地址
|
||||||
|
path?: string;
|
||||||
|
// 组件路径
|
||||||
|
component?: string;
|
||||||
|
// 绑定的页面
|
||||||
|
pageId?: number;
|
||||||
|
// 用户ID
|
||||||
|
userId?: number;
|
||||||
|
// 商品数量
|
||||||
|
count?: number;
|
||||||
|
// 排序(数字越小越靠前)
|
||||||
|
sortNumber?: number;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
|
||||||
|
hide?: number;
|
||||||
|
// 是否推荐
|
||||||
|
recommend?: number;
|
||||||
|
// 是否显示在首页
|
||||||
|
showIndex?: number;
|
||||||
|
// 状态, 0正常, 1禁用
|
||||||
|
status?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 注册时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
key?: number;
|
||||||
|
value?: number;
|
||||||
|
label?: string;
|
||||||
|
// 子菜单
|
||||||
|
children?: GoodsCategory[];
|
||||||
|
// 商铺ID
|
||||||
|
merchantId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类搜索条件
|
||||||
|
*/
|
||||||
|
export interface GoodsCategoryParam extends PageParam {
|
||||||
|
categoryId?: number;
|
||||||
|
parentId?: number;
|
||||||
|
type?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { Order, OrderParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageOrder(params: OrderParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<Order>>>(
|
||||||
|
MODULES_API_URL + '/shop/order/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listOrder(params?: OrderParam) {
|
||||||
|
const res = await request.get<ApiResult<Order[]>>(
|
||||||
|
MODULES_API_URL + '/shop/order',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addOrder(data: Order) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/order',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateOrder(data: Order) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/order',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeOrder(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/order/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchOrder(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/order/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getOrder(id: number) {
|
||||||
|
const res = await request.get<ApiResult<Order>>(
|
||||||
|
MODULES_API_URL + '/shop/order/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getData() {
|
||||||
|
const res = await request.post<ApiResult<any>>(
|
||||||
|
MODULES_API_URL + '/shop/order/data-for-admin'
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function exportSupplierSheet() {
|
||||||
|
const res = await request.post<ApiResult<any>>(
|
||||||
|
MODULES_API_URL + '/shop/order/export-for-supplier'
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function exportSupplierCashSheet() {
|
||||||
|
const res = await request.post<ApiResult<any>>(
|
||||||
|
MODULES_API_URL + '/shop/order/export-for-cash'
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
import { OrderInfo } from '@/api/shop/orderInfo/model';
|
||||||
|
import { OrderDelivery } from '@/api/shop/orderDelivery/model';
|
||||||
|
import { OrderGoods } from '@/api/shop/orderGoods/model';
|
||||||
|
import { Merchant } from '@/api/shop/merchant/model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface Order {
|
||||||
|
//
|
||||||
|
orderId?: number;
|
||||||
|
// 订单类型,0商城订单 1预定订单 2会员卡
|
||||||
|
type?: number;
|
||||||
|
// 订单号
|
||||||
|
orderNo?: string;
|
||||||
|
// 下单渠道,0小程序预定 1俱乐部训练场 3活动订场
|
||||||
|
channel?: number;
|
||||||
|
// 微信支付订单号
|
||||||
|
transactionId?: string;
|
||||||
|
// 微信退款订单号
|
||||||
|
refundOrder?: string;
|
||||||
|
// 场馆id用于权限判断
|
||||||
|
merchantId?: number;
|
||||||
|
// 商户名称
|
||||||
|
merchantName?: string;
|
||||||
|
// 商户编号
|
||||||
|
merchantCode?: string;
|
||||||
|
couponId?: number;
|
||||||
|
cardId?: number;
|
||||||
|
confirmId?: number;
|
||||||
|
icCard?: string;
|
||||||
|
userId?: number;
|
||||||
|
// 用户id
|
||||||
|
uid?: number;
|
||||||
|
// 使用的优惠券id
|
||||||
|
cid?: number;
|
||||||
|
// 使用的会员卡id
|
||||||
|
vid?: number;
|
||||||
|
// 关联管理员id
|
||||||
|
aid?: number;
|
||||||
|
// 核销管理员id
|
||||||
|
adminId?: number;
|
||||||
|
// IC卡号
|
||||||
|
code?: string;
|
||||||
|
// 真实姓名
|
||||||
|
name?: string;
|
||||||
|
realName?: string;
|
||||||
|
// 手机号码
|
||||||
|
phone?: string;
|
||||||
|
// 订单总额
|
||||||
|
totalPrice?: string;
|
||||||
|
// 减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
|
||||||
|
reducePrice?: string;
|
||||||
|
// 实际付款
|
||||||
|
payPrice?: string;
|
||||||
|
// 用于统计
|
||||||
|
price?: string;
|
||||||
|
// 价钱,用于积分赠送
|
||||||
|
money?: string;
|
||||||
|
// 退款金额
|
||||||
|
refundMoney?: string;
|
||||||
|
// 教练价格
|
||||||
|
coachPrice?: string;
|
||||||
|
// 教练id
|
||||||
|
coachId?: number;
|
||||||
|
// 1微信支付,2积分,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡
|
||||||
|
payType?: number;
|
||||||
|
// 1已付款,2未付款
|
||||||
|
payStatus?: number;
|
||||||
|
// 1已完成,2未使用,3已取消,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款
|
||||||
|
orderStatus?: number;
|
||||||
|
// 优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡
|
||||||
|
couponType?: string;
|
||||||
|
// 二维码地址,保存订单号,支付成功后才生成
|
||||||
|
qrcode?: string;
|
||||||
|
// 优惠说明
|
||||||
|
couponDesc?: string;
|
||||||
|
// vip月卡年卡、ic月卡年卡回退次数
|
||||||
|
returnNum?: number;
|
||||||
|
// vip充值回退金额
|
||||||
|
returnMoney?: string;
|
||||||
|
// 预约详情开始时间数组
|
||||||
|
startTime?: string;
|
||||||
|
// 是否已开具发票:1已开发票,2未开发票,3不能开具发票
|
||||||
|
isInvoice?: string;
|
||||||
|
// 下单时间
|
||||||
|
createTime?: number;
|
||||||
|
//
|
||||||
|
updateTime?: number;
|
||||||
|
// 付款时间
|
||||||
|
payTime?: number;
|
||||||
|
deliveryType?: number;
|
||||||
|
// 退款时间
|
||||||
|
refundTime?: number;
|
||||||
|
// 申请退款时间
|
||||||
|
refundApplyTime?: number;
|
||||||
|
// 过期时间
|
||||||
|
expirationTime?: string;
|
||||||
|
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
||||||
|
checkBill?: number;
|
||||||
|
isSettled?: boolean;
|
||||||
|
version?: string;
|
||||||
|
// 备注
|
||||||
|
comments?: string;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
selfTakeMerchantId?: number;
|
||||||
|
selfTakeMerchantName?: string;
|
||||||
|
expressMerchantId?: number;
|
||||||
|
expressMerchantName?: string;
|
||||||
|
sendStartTime?: string;
|
||||||
|
sendEndTime?: string;
|
||||||
|
hasTakeGift?: number;
|
||||||
|
selfTakeMerchant?: Merchant;
|
||||||
|
merchant?: Merchant;
|
||||||
|
orderInfo?: OrderInfo[];
|
||||||
|
orderGoods?: OrderGoods[];
|
||||||
|
orderDelivery?: OrderDelivery;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface OrderParam extends PageParam {
|
||||||
|
orderId?: number;
|
||||||
|
type?: number;
|
||||||
|
payStatus?: string;
|
||||||
|
week?: number;
|
||||||
|
payType?: string;
|
||||||
|
isInvoice?: string;
|
||||||
|
orderStatus?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { LawFeedback, LawFeedbackParam } from './model';
|
import type { OrderGoods, OrderGoodsParam } from './model';
|
||||||
import { MODULES_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
export async function pageLawFeedback(params: LawFeedbackParam) {
|
export async function pageOrderGoods(params: OrderGoodsParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<LawFeedback>>>(
|
const res = await request.get<ApiResult<PageResult<OrderGoods>>>(
|
||||||
MODULES_API_URL + '/law/law-feedback/page',
|
MODULES_API_URL + '/shop/order-goods/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -22,9 +22,9 @@ export async function pageLawFeedback(params: LawFeedbackParam) {
|
|||||||
/**
|
/**
|
||||||
* 查询列表
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
export async function listLawFeedback(params?: LawFeedbackParam) {
|
export async function listOrderGoods(params?: OrderGoodsParam) {
|
||||||
const res = await request.get<ApiResult<LawFeedback[]>>(
|
const res = await request.get<ApiResult<OrderGoods[]>>(
|
||||||
MODULES_API_URL + '/law/law-feedback',
|
MODULES_API_URL + '/shop/order-goods',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
@@ -38,9 +38,9 @@ export async function listLawFeedback(params?: LawFeedbackParam) {
|
|||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*/
|
*/
|
||||||
export async function addLawFeedback(data: LawFeedback) {
|
export async function addOrderGoods(data: OrderGoods) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/law/law-feedback',
|
MODULES_API_URL + '/shop/order-goods',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -52,9 +52,9 @@ export async function addLawFeedback(data: LawFeedback) {
|
|||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
export async function updateLawFeedback(data: LawFeedback) {
|
export async function updateOrderGoods(data: OrderGoods) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/law/law-feedback',
|
MODULES_API_URL + '/shop/order-goods',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -66,9 +66,9 @@ export async function updateLawFeedback(data: LawFeedback) {
|
|||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
export async function removeLawFeedback(id?: number) {
|
export async function removeOrderGoods(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/law/law-feedback/' + id
|
MODULES_API_URL + '/shop/order-goods/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -79,9 +79,9 @@ export async function removeLawFeedback(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*/
|
*/
|
||||||
export async function removeBatchLawFeedback(data: (number | undefined)[]) {
|
export async function removeBatchOrderGoods(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/law/law-feedback/batch',
|
MODULES_API_URL + '/shop/order-goods/batch',
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
@@ -95,9 +95,9 @@ export async function removeBatchLawFeedback(data: (number | undefined)[]) {
|
|||||||
/**
|
/**
|
||||||
* 根据id查询
|
* 根据id查询
|
||||||
*/
|
*/
|
||||||
export async function getLawFeedback(id: number) {
|
export async function getOrderGoods(id: number) {
|
||||||
const res = await request.get<ApiResult<LawFeedback>>(
|
const res = await request.get<ApiResult<OrderGoods>>(
|
||||||
MODULES_API_URL + '/law/law-feedback/' + id
|
MODULES_API_URL + '/shop/order-goods/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface OrderGoods {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 关联订单表id
|
||||||
|
oid?: number;
|
||||||
|
// 关联场馆id
|
||||||
|
sid?: number;
|
||||||
|
// 关联场地id
|
||||||
|
fid?: number;
|
||||||
|
// 场馆
|
||||||
|
siteName?: string;
|
||||||
|
// 场地
|
||||||
|
fieldName?: string;
|
||||||
|
// 预约时间段
|
||||||
|
dateTime?: string;
|
||||||
|
// 单价
|
||||||
|
price?: string;
|
||||||
|
// 儿童价
|
||||||
|
childrenPrice?: string;
|
||||||
|
// 成人人数
|
||||||
|
adultNum?: string;
|
||||||
|
// 儿童人数
|
||||||
|
childrenNum?: string;
|
||||||
|
// 1已付款,2未付款,3无需付款或占用状态
|
||||||
|
payStatus?: string;
|
||||||
|
// 是否免费:1免费、2收费
|
||||||
|
isFree?: string;
|
||||||
|
// 是否支持儿童票:1支持,2不支持
|
||||||
|
isChildren?: string;
|
||||||
|
// 预订类型:1全场,2半场
|
||||||
|
type?: string;
|
||||||
|
// 组合数据:日期+时间段+场馆id+场地id
|
||||||
|
mergeData?: string;
|
||||||
|
// 开场时间
|
||||||
|
startTime?: number;
|
||||||
|
// 下单时间
|
||||||
|
orderTime?: number;
|
||||||
|
// 毫秒时间戳
|
||||||
|
timeFlag?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface OrderGoodsParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
orderId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { ShopUserBalanceLog, ShopUserBalanceLogParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询用户在商家中的余额
|
||||||
|
*/
|
||||||
|
export async function pageShopUserBalanceLog(params: ShopUserBalanceLogParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<ShopUserBalanceLog>>>(
|
||||||
|
MODULES_API_URL + '/shop/user-balance-log/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户在商家中的余额列表
|
||||||
|
*/
|
||||||
|
export async function listShopUserBalanceLog(params?: ShopUserBalanceLogParam) {
|
||||||
|
const res = await request.get<ApiResult<ShopUserBalanceLog[]>>(
|
||||||
|
MODULES_API_URL + '/shop/user-balance-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 addShopUserBalanceLog(data: ShopUserBalanceLog) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/user-balance-log',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户在商家中的余额
|
||||||
|
*/
|
||||||
|
export async function updateShopUserBalanceLog(data: ShopUserBalanceLog) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/user-balance-log',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户在商家中的余额
|
||||||
|
*/
|
||||||
|
export async function removeShopUserBalanceLog(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/user-balance-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户在商家中的余额
|
||||||
|
*/
|
||||||
|
export async function removeBatchShopUserBalanceLog(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/user-balance-log/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询用户在商家中的余额
|
||||||
|
*/
|
||||||
|
export async function getShopUserBalanceLog(id: number) {
|
||||||
|
const res = await request.get<ApiResult<ShopUserBalanceLog>>(
|
||||||
|
MODULES_API_URL + '/shop/user-balance-log/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出商家余额明细
|
||||||
|
*/
|
||||||
|
export async function exportShopUserBalanceLog(
|
||||||
|
params?: ShopUserBalanceLogParam
|
||||||
|
) {
|
||||||
|
const res = await request.post<ApiResult<FileRecord>>(
|
||||||
|
MODULES_API_URL + '/shop/user-balance-log/export',
|
||||||
|
params
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商家余额明细
|
||||||
|
*/
|
||||||
|
export interface ShopUserBalanceLog {
|
||||||
|
logId?: number;
|
||||||
|
userId?: number;
|
||||||
|
nickname?: string;
|
||||||
|
phone?: string;
|
||||||
|
toUserId?: number;
|
||||||
|
toUserNickname?: string;
|
||||||
|
toUserPhone?: string;
|
||||||
|
orderNo?: string;
|
||||||
|
orderNo2?: string;
|
||||||
|
scene?: number;
|
||||||
|
money?: string;
|
||||||
|
describe?: string;
|
||||||
|
remark?: string;
|
||||||
|
sortNumber?: number;
|
||||||
|
comments?: string;
|
||||||
|
status?: number;
|
||||||
|
deleted?: number;
|
||||||
|
tenantId?: number;
|
||||||
|
createTime?: string;
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户在商家中的余额搜索条件
|
||||||
|
*/
|
||||||
|
export interface ShopUserBalanceLogParam extends PageParam {
|
||||||
|
logId?: number;
|
||||||
|
userId?: number;
|
||||||
|
scene?: number;
|
||||||
|
createTimeStart?: string;
|
||||||
|
createTimeEnd?: string;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import type { ApiResult, PageResult } from "@/api";
|
import type { ApiResult, PageResult } from "@/api";
|
||||||
import type { FileRecord, FileRecordParam } from "./model";
|
import type { FileRecord, FileRecordParam } from "./model";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import md5 from "md5";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件
|
* 上传文件
|
||||||
@@ -18,6 +20,30 @@ export async function uploadFile(file: File) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function uploadFileToOss(file: File) {
|
||||||
|
const { data } = await request.get<ApiResult<any>>(
|
||||||
|
"/oss/getPostSignatureForOssUpload"
|
||||||
|
);
|
||||||
|
console.log(data)
|
||||||
|
const suffix = file.name.substring(file.name.lastIndexOf("."));
|
||||||
|
const key = dayjs().format('YYYYMMDD') + '/' + md5(dayjs().unix()) + suffix;
|
||||||
|
let formData = new FormData();
|
||||||
|
formData.append("success_action_status", "200");
|
||||||
|
formData.append("policy", data.data.policy);
|
||||||
|
formData.append("x-oss-signature", data.data.signature);
|
||||||
|
formData.append("x-oss-signature-version", "OSS4-HMAC-SHA256");
|
||||||
|
formData.append("x-oss-credential", data.data.x_oss_credential);
|
||||||
|
formData.append("x-oss-date", data.data.x_oss_date);
|
||||||
|
formData.append("x-oss-security-token", data.data.security_token);
|
||||||
|
formData.append("key", key);
|
||||||
|
formData.append("file", file); // file 必须为最后一个表单域
|
||||||
|
await request.post<ApiResult<any>>(
|
||||||
|
"https://yaodongxiao.oss-cn-guangzhou.aliyuncs.com",
|
||||||
|
formData
|
||||||
|
);
|
||||||
|
return {url: `https://yaodongxiao.oss-cn-guangzhou.aliyuncs.com/${key}`}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传 base64 文件
|
* 上传 base64 文件
|
||||||
* @param base64 文件数据
|
* @param base64 文件数据
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import request from "@/utils/request";
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from "@/api";
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { User, UserParam } from "./model";
|
import type { User, UserParam } from './model';
|
||||||
|
import type { FileRecord } from '@/api/system/file/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询用户
|
* 分页查询用户
|
||||||
*/
|
*/
|
||||||
export async function pageUsers(params: UserParam) {
|
export async function pageUsers(params: UserParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<User>>>(
|
const res = await request.get<ApiResult<PageResult<User>>>(
|
||||||
"/system/user/page",
|
'/system/user/page',
|
||||||
{ params }
|
{ params }
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -20,7 +21,7 @@ export async function pageUsers(params: UserParam) {
|
|||||||
* 查询用户列表
|
* 查询用户列表
|
||||||
*/
|
*/
|
||||||
export async function listUsers(params?: UserParam) {
|
export async function listUsers(params?: UserParam) {
|
||||||
const res = await request.get<ApiResult<User[]>>("/system/user", {
|
const res = await request.get<ApiResult<User[]>>('/system/user', {
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
@@ -33,7 +34,7 @@ export async function listUsers(params?: UserParam) {
|
|||||||
* 查询用户列表
|
* 查询用户列表
|
||||||
*/
|
*/
|
||||||
export async function getStaffs(params?: UserParam) {
|
export async function getStaffs(params?: UserParam) {
|
||||||
const res = await request.get<ApiResult<User[]>>("/system/user", {
|
const res = await request.get<ApiResult<User[]>>('/system/user', {
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
@@ -46,7 +47,7 @@ export async function getStaffs(params?: UserParam) {
|
|||||||
* 查询用户列表
|
* 查询用户列表
|
||||||
*/
|
*/
|
||||||
export async function getCompanyList(params?: UserParam) {
|
export async function getCompanyList(params?: UserParam) {
|
||||||
const res = await request.get<ApiResult<User[]>>("/system/user", {
|
const res = await request.get<ApiResult<User[]>>('/system/user', {
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
@@ -59,7 +60,7 @@ export async function getCompanyList(params?: UserParam) {
|
|||||||
* 根据id查询用户
|
* 根据id查询用户
|
||||||
*/
|
*/
|
||||||
export async function getUser(id: number) {
|
export async function getUser(id: number) {
|
||||||
const res = await request.get<ApiResult<User>>("/system/user/" + id);
|
const res = await request.get<ApiResult<User>>('/system/user/' + id);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -70,7 +71,7 @@ export async function getUser(id: number) {
|
|||||||
* 添加用户
|
* 添加用户
|
||||||
*/
|
*/
|
||||||
export async function addUser(data: User) {
|
export async function addUser(data: User) {
|
||||||
const res = await request.post<ApiResult<unknown>>("/system/user", data);
|
const res = await request.post<ApiResult<unknown>>('/system/user', data);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
}
|
}
|
||||||
@@ -81,7 +82,7 @@ export async function addUser(data: User) {
|
|||||||
* 修改用户
|
* 修改用户
|
||||||
*/
|
*/
|
||||||
export async function updateUser(data: User) {
|
export async function updateUser(data: User) {
|
||||||
const res = await request.put<ApiResult<unknown>>("/system/user", data);
|
const res = await request.put<ApiResult<unknown>>('/system/user', data);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
}
|
}
|
||||||
@@ -92,7 +93,7 @@ export async function updateUser(data: User) {
|
|||||||
* 删除用户
|
* 删除用户
|
||||||
*/
|
*/
|
||||||
export async function removeUser(id?: number) {
|
export async function removeUser(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>("/system/user/" + id);
|
const res = await request.delete<ApiResult<unknown>>('/system/user/' + id);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
}
|
}
|
||||||
@@ -103,7 +104,7 @@ export async function removeUser(id?: number) {
|
|||||||
* 批量删除用户
|
* 批量删除用户
|
||||||
*/
|
*/
|
||||||
export async function removeUsers(data: (number | undefined)[]) {
|
export async function removeUsers(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>("/system/user/batch", {
|
const res = await request.delete<ApiResult<unknown>>('/system/user/batch', {
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -115,10 +116,10 @@ export async function removeUsers(data: (number | undefined)[]) {
|
|||||||
/**
|
/**
|
||||||
* 修改用户状态
|
* 修改用户状态
|
||||||
*/
|
*/
|
||||||
export async function updateUserStatus(userId?: number, status?: number) {
|
export async function updateUserCanAuth(userId?: number, canAuth?: number) {
|
||||||
const res = await request.put<ApiResult<unknown>>("/system/user/status", {
|
const res = await request.put<ApiResult<unknown>>('/system/user', {
|
||||||
userId,
|
userId,
|
||||||
status
|
canAuth
|
||||||
});
|
});
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
@@ -129,8 +130,8 @@ export async function updateUserStatus(userId?: number, status?: number) {
|
|||||||
/**
|
/**
|
||||||
* 重置用户密码
|
* 重置用户密码
|
||||||
*/
|
*/
|
||||||
export async function updateUserPassword(userId?: number, password = "123456") {
|
export async function updateUserPassword(userId?: number, password = '123456') {
|
||||||
const res = await request.put<ApiResult<unknown>>("/system/user/password", {
|
const res = await request.put<ApiResult<unknown>>('/system/user/password', {
|
||||||
userId,
|
userId,
|
||||||
password
|
password
|
||||||
});
|
});
|
||||||
@@ -145,7 +146,7 @@ export async function updateUserPassword(userId?: number, password = "123456") {
|
|||||||
*/
|
*/
|
||||||
export async function importUsers(file: File, userLevel: number) {
|
export async function importUsers(file: File, userLevel: number) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", file);
|
formData.append('file', file);
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
`/system/user/import/${userLevel}`,
|
`/system/user/import/${userLevel}`,
|
||||||
formData
|
formData
|
||||||
@@ -156,6 +157,20 @@ export async function importUsers(file: File, userLevel: number) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出用户
|
||||||
|
*/
|
||||||
|
export async function exportUsers(params?: UserParam) {
|
||||||
|
const res = await request.post<ApiResult<FileRecord>>(
|
||||||
|
'/system/user/export',
|
||||||
|
params
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查用户是否存在
|
* 检查用户是否存在
|
||||||
*/
|
*/
|
||||||
@@ -164,7 +179,7 @@ export async function checkExistence(
|
|||||||
value: string,
|
value: string,
|
||||||
id?: number
|
id?: number
|
||||||
) {
|
) {
|
||||||
const res = await request.get<ApiResult<unknown>>("/system/user/existence", {
|
const res = await request.get<ApiResult<unknown>>('/system/user/existence', {
|
||||||
params: { field, value, id }
|
params: { field, value, id }
|
||||||
});
|
});
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
@@ -178,7 +193,7 @@ export async function checkExistence(
|
|||||||
*/
|
*/
|
||||||
export async function countUserBalance(params?: UserParam) {
|
export async function countUserBalance(params?: UserParam) {
|
||||||
const res = await request.get<ApiResult<unknown>>(
|
const res = await request.get<ApiResult<unknown>>(
|
||||||
"/system/user/countUserBalance",
|
'/system/user/countUserBalance',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type { PageParam } from "@/api";
|
|||||||
import type { Role } from "../../role/model";
|
import type { Role } from "../../role/model";
|
||||||
import type { Menu } from "../../menu/model";
|
import type { Menu } from "../../menu/model";
|
||||||
import { Company } from "@/api/system/company/model";
|
import { Company } from "@/api/system/company/model";
|
||||||
import { VivoBindStoreList } from "@/api/vivo/bindStoreList/model";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户
|
* 用户
|
||||||
@@ -40,6 +39,8 @@ export interface User {
|
|||||||
organizationId?: number;
|
organizationId?: number;
|
||||||
// 用户等级
|
// 用户等级
|
||||||
userLevel: number;
|
userLevel: number;
|
||||||
|
// 用户分组
|
||||||
|
userGroup?: string;
|
||||||
// 状态, 0正常, 1冻结
|
// 状态, 0正常, 1冻结
|
||||||
status?: number;
|
status?: number;
|
||||||
// 性别名称
|
// 性别名称
|
||||||
@@ -78,16 +79,19 @@ export interface User {
|
|||||||
realName?: string;
|
realName?: string;
|
||||||
companyName?: string;
|
companyName?: string;
|
||||||
idCard?: string;
|
idCard?: string;
|
||||||
|
idCardFront?: string;
|
||||||
|
idCardBack?: string;
|
||||||
|
qualification?: string;
|
||||||
comments?: string;
|
comments?: string;
|
||||||
vkAccount?: string;
|
vkAccount?: string;
|
||||||
storeId?: number;
|
storeId?: number;
|
||||||
|
canAuth?: number;
|
||||||
|
authStatus?: number;
|
||||||
storeName?: string;
|
storeName?: string;
|
||||||
fixStoreId?: number;
|
fixStoreId?: number;
|
||||||
fixStoreName?: string;
|
fixStoreName?: string;
|
||||||
secondAreaName?: string;
|
secondAreaName?: string;
|
||||||
cityId?: number;
|
cityId?: number;
|
||||||
retailerName?: string;
|
|
||||||
bindStoreList: VivoBindStoreList[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,6 +107,7 @@ export interface UserParam extends PageParam {
|
|||||||
sex?: string;
|
sex?: string;
|
||||||
phone?: string;
|
phone?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
|
authStatus?: number;
|
||||||
organizationId?: number;
|
organizationId?: number;
|
||||||
parentId?: number;
|
parentId?: number;
|
||||||
sexName?: string;
|
sexName?: string;
|
||||||
@@ -110,6 +115,7 @@ export interface UserParam extends PageParam {
|
|||||||
roleId?: string;
|
roleId?: string;
|
||||||
isStaff?: boolean;
|
isStaff?: boolean;
|
||||||
userLevel?: number;
|
userLevel?: number;
|
||||||
|
userGroup?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const USER_LEVEL_LIST = ['', '区域代理', '总售后', '零售商店长', '导购', '售后', '散户', '编外合作伙伴', '售后店长']
|
export const USER_LEVEL_LIST = ['', '区域代理', '总售后', '零售商店长', '导购', '售后', '散户', '编外合作伙伴', '售后店长']
|
||||||
|
|||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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));
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 398 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 65 KiB |
@@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
"particles": {
|
||||||
|
"number": {
|
||||||
|
"value": 80,
|
||||||
|
"density": {
|
||||||
|
"enable": true,
|
||||||
|
"value_area": 800
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color": {
|
||||||
|
"value": "#ffffff"
|
||||||
|
},
|
||||||
|
"shape": {
|
||||||
|
"type": "circle",
|
||||||
|
"stroke": {
|
||||||
|
"width": 0,
|
||||||
|
"color": "#000000"
|
||||||
|
},
|
||||||
|
"polygon": {
|
||||||
|
"nb_sides": 5
|
||||||
|
},
|
||||||
|
"image": {
|
||||||
|
"src": "img/github.svg",
|
||||||
|
"width": 100,
|
||||||
|
"height": 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"opacity": {
|
||||||
|
"value": 0.5,
|
||||||
|
"random": false,
|
||||||
|
"anim": {
|
||||||
|
"enable": false,
|
||||||
|
"speed": 1,
|
||||||
|
"opacity_min": 0.1,
|
||||||
|
"sync": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"value": 3,
|
||||||
|
"random": true,
|
||||||
|
"anim": {
|
||||||
|
"enable": false,
|
||||||
|
"speed": 40,
|
||||||
|
"size_min": 0.1,
|
||||||
|
"sync": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"line_linked": {
|
||||||
|
"enable": true,
|
||||||
|
"distance": 150,
|
||||||
|
"color": "#ffffff",
|
||||||
|
"opacity": 1,
|
||||||
|
"width": 1
|
||||||
|
},
|
||||||
|
"move": {
|
||||||
|
"enable": true,
|
||||||
|
"speed": 2,
|
||||||
|
"direction": "none",
|
||||||
|
"random": true,
|
||||||
|
"straight": false,
|
||||||
|
"out_mode": "out",
|
||||||
|
"bounce": false,
|
||||||
|
"attract": {
|
||||||
|
"enable": false,
|
||||||
|
"rotateX": 600,
|
||||||
|
"rotateY": 1200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"interactivity": {
|
||||||
|
"detect_on": "canvas",
|
||||||
|
"events": {
|
||||||
|
"onhover": {
|
||||||
|
"enable": true,
|
||||||
|
"mode": "repulse"
|
||||||
|
},
|
||||||
|
"onclick": {
|
||||||
|
"enable": true,
|
||||||
|
"mode": "push"
|
||||||
|
},
|
||||||
|
"resize": true
|
||||||
|
},
|
||||||
|
"modes": {
|
||||||
|
"grab": {
|
||||||
|
"distance": 400,
|
||||||
|
"line_linked": {
|
||||||
|
"opacity": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bubble": {
|
||||||
|
"distance": 400,
|
||||||
|
"size": 40,
|
||||||
|
"duration": 2,
|
||||||
|
"opacity": 8,
|
||||||
|
"speed": 3
|
||||||
|
},
|
||||||
|
"repulse": {
|
||||||
|
"distance": 200,
|
||||||
|
"duration": 0.4
|
||||||
|
},
|
||||||
|
"push": {
|
||||||
|
"particles_nb": 4
|
||||||
|
},
|
||||||
|
"remove": {
|
||||||
|
"particles_nb": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"retina_detect": true
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<!-- router-view 结合 keep-alive 组件 -->
|
<!-- router-view 结合 keep-alive 组件 -->
|
||||||
<template>
|
<template>
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component, route }">
|
||||||
<transition :name="transitionName" mode="out-in" appear>
|
<transition :name="transitionName" mode="out-in" appear>
|
||||||
<keep-alive :include="keepAliveInclude">
|
<keep-alive :include="keepAliveInclude">
|
||||||
<component :is="Component" />
|
<component :is="Component" :key="route.fullPath" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</transition>
|
</transition>
|
||||||
</router-view>
|
</router-view>
|
||||||
|
|||||||
@@ -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>
|
|
||||||
@@ -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>
|
|
||||||
@@ -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>
|
|
||||||
@@ -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>
|
|
||||||
@@ -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>
|
|
||||||
@@ -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>
|
|
||||||
@@ -16,17 +16,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { UploadOutlined } from '@ant-design/icons-vue';
|
import { UploadOutlined } from "@ant-design/icons-vue";
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from "ant-design-vue";
|
||||||
import { uploadFile } from '@/api/system/file';
|
import { uploadFileToOss } from "@/api/system/file";
|
||||||
import { messageLoading } from 'ele-admin-pro';
|
import { messageLoading } from "ele-admin-pro";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:value', value: string): void;
|
(e: "update:value", value: string): void;
|
||||||
(e: 'blur'): void;
|
(e: "blur"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
withDefaults(
|
withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
value?: string;
|
value?: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
@@ -37,51 +37,51 @@
|
|||||||
showUploadList?: boolean;
|
showUploadList?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
placeholder: '请选择上传文件',
|
placeholder: "请选择上传文件",
|
||||||
buttonText: '上传文件',
|
buttonText: "上传文件",
|
||||||
showUploadList: false
|
showUploadList: false
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// 已上传数据
|
// 已上传数据
|
||||||
// const images = ref<ItemType[]>([]);
|
// const images = ref<ItemType[]>([]);
|
||||||
//
|
//
|
||||||
// const onChange = (type) => {
|
// const onChange = (type) => {
|
||||||
// console.log(type, '>>>>>');
|
// console.log(type, '>>>>>');
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
const onUpload = (item) => {
|
const onUpload = (item) => {
|
||||||
const { file } = item;
|
const { file } = item;
|
||||||
if (file.size / 1024 / 1024 > 100) {
|
if (file.size / 1024 / 1024 > 100) {
|
||||||
message.error('大小不能超过 100MB');
|
message.error("大小不能超过 100MB");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const hide = messageLoading({
|
const hide = messageLoading({
|
||||||
content: '上传中..',
|
content: "上传中..",
|
||||||
duration: 0,
|
duration: 0,
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
uploadFile(file)
|
uploadFileToOss(file)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
hide();
|
hide();
|
||||||
console.log(data, '上传文件成功!');
|
console.log(data, "上传文件成功!");
|
||||||
emit('update:value', String(data.url));
|
emit("update:value", String(data.url));
|
||||||
message.success('上传成功');
|
message.success("上传成功");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
message.error(e.message);
|
message.error(e.message);
|
||||||
hide();
|
hide();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// /* 更新选中数据 */
|
// /* 更新选中数据 */
|
||||||
// const updateValue = (value: string) => {
|
// const updateValue = (value: string) => {
|
||||||
// console.log(value, '更新选中数据');
|
// console.log(value, '更新选中数据');
|
||||||
// emit('update:value', value + '更新选中数据');
|
// emit('update:value', value + '更新选中数据');
|
||||||
// };
|
// };
|
||||||
/* 失去焦点 */
|
/* 失去焦点 */
|
||||||
// const onBlur = () => {
|
// const onBlur = () => {
|
||||||
// emit('blur');
|
// emit('blur');
|
||||||
// };
|
// };
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+93
-6
@@ -48,9 +48,9 @@
|
|||||||
<!-- 路由出口 -->
|
<!-- 路由出口 -->
|
||||||
<router-layout />
|
<router-layout />
|
||||||
<!-- logo 图标 -->
|
<!-- logo 图标 -->
|
||||||
<!-- <template #logo>-->
|
<!-- <template #logo>-->
|
||||||
<!-- <img :src="logo" alt="logo" />-->
|
<!-- <img :src="logo" alt="logo" />-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- 顶栏右侧区域 -->
|
<!-- 顶栏右侧区域 -->
|
||||||
<template #right>
|
<template #right>
|
||||||
<header-tools :fullscreen="fullscreen" @fullscreen="onFullscreen" />
|
<header-tools :fullscreen="fullscreen" @fullscreen="onFullscreen" />
|
||||||
@@ -97,8 +97,9 @@
|
|||||||
HOME_PATH,
|
HOME_PATH,
|
||||||
LAYOUT_PATH,
|
LAYOUT_PATH,
|
||||||
REDIRECT_PATH,
|
REDIRECT_PATH,
|
||||||
I18N_ENABLE, FILE_SERVER
|
I18N_ENABLE,
|
||||||
} from "@/config/setting";
|
FILE_SERVER
|
||||||
|
} from '@/config/setting';
|
||||||
import {
|
import {
|
||||||
addPageTab,
|
addPageTab,
|
||||||
removePageTab,
|
removePageTab,
|
||||||
@@ -118,7 +119,7 @@
|
|||||||
|
|
||||||
// 项目名
|
// 项目名
|
||||||
// const projectName = ref(import.meta.env.VITE_APP_NAME as string);
|
// const projectName = ref(import.meta.env.VITE_APP_NAME as string);
|
||||||
const projectName = ref('贵港市公共法律服务微平台');
|
const projectName = ref('管理后台');
|
||||||
// 企业信息
|
// 企业信息
|
||||||
const tenantName = localStorage.getItem('tenantName');
|
const tenantName = localStorage.getItem('tenantName');
|
||||||
const companyLogo = localStorage.getItem('CompanyLogo');
|
const companyLogo = localStorage.getItem('CompanyLogo');
|
||||||
@@ -272,6 +273,92 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
@sidebar-width-custom: 240px;
|
||||||
|
@sidebar-collapse-width-custom: 48px;
|
||||||
|
@sidebar-nav-width-custom: 80px;
|
||||||
|
|
||||||
|
.ele-admin-layout {
|
||||||
|
&:not(.ele-admin-collapse) {
|
||||||
|
&:not(.ele-admin-side-mix) {
|
||||||
|
.ele-admin-logo,
|
||||||
|
.ele-admin-sidebar {
|
||||||
|
width: @sidebar-width-custom;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ele-admin-sidebar + .ele-admin-body {
|
||||||
|
width: calc(100% - @sidebar-width-custom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ele-admin-side-mix {
|
||||||
|
.ele-admin-sidebar-nav + .ele-admin-sidebar {
|
||||||
|
width: calc(@sidebar-width-custom - @sidebar-collapse-width-custom);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ele-admin-sidebar + .ele-admin-body {
|
||||||
|
width: calc(
|
||||||
|
100% - @sidebar-width-custom + @sidebar-collapse-width-custom -
|
||||||
|
@sidebar-nav-width-custom
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ele-admin-fixed-header {
|
||||||
|
&:not(.ele-admin-side-mix) {
|
||||||
|
.ele-admin-sidebar + .ele-admin-body .ele-admin-tabs {
|
||||||
|
left: @sidebar-width-custom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ele-admin-side-mix {
|
||||||
|
&:not(.ele-admin-collapse) {
|
||||||
|
.ele-admin-sidebar + .ele-admin-body .ele-admin-tabs {
|
||||||
|
left: calc(
|
||||||
|
@sidebar-width-custom - @sidebar-collapse-width-custom +
|
||||||
|
@sidebar-nav-width-custom
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ele-admin-nav-collapse:not(.ele-admin-collapse) {
|
||||||
|
.ele-admin-sidebar + .ele-admin-body .ele-admin-tabs {
|
||||||
|
left: @sidebar-width-custom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ele-admin-fixed-sidebar {
|
||||||
|
&:not(.ele-admin-side-mix) {
|
||||||
|
.ele-admin-header,
|
||||||
|
.ele-admin-sidebar + .ele-admin-body,
|
||||||
|
.ele-admin-sidebar-nav + .ele-admin-body {
|
||||||
|
padding-left: @sidebar-width-custom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ele-admin-side-mix {
|
||||||
|
&:not(.ele-admin-collapse) {
|
||||||
|
&.ele-admin-fixed-header {
|
||||||
|
.ele-admin-sidebar + .ele-admin-body {
|
||||||
|
padding-left: calc(
|
||||||
|
@sidebar-width-custom - @sidebar-collapse-width-custom +
|
||||||
|
@sidebar-nav-width-custom
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ele-admin-nav-collapse {
|
||||||
|
.ele-admin-sidebar + .ele-admin-body {
|
||||||
|
padding-left: @sidebar-width-custom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 侧栏菜单徽章样式,定位在右侧垂直居中并调小尺寸
|
// 侧栏菜单徽章样式,定位在右侧垂直居中并调小尺寸
|
||||||
.ele-menu-badge {
|
.ele-menu-badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
+8
-1
@@ -9,6 +9,9 @@ import VueTianditu from "vue-tianditu"
|
|||||||
import "vue-tianditu/lib/style.css";
|
import "vue-tianditu/lib/style.css";
|
||||||
import vue3TreeOrg from 'vue3-tree-org';
|
import vue3TreeOrg from 'vue3-tree-org';
|
||||||
import "vue3-tree-org/lib/vue3-tree-org.css";
|
import "vue3-tree-org/lib/vue3-tree-org.css";
|
||||||
|
import Particles from "@tsparticles/vue3";
|
||||||
|
import { loadSlim } from "@tsparticles/slim";
|
||||||
|
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
app.use(VueTianditu, {
|
app.use(VueTianditu, {
|
||||||
@@ -20,5 +23,9 @@ app.use(router);
|
|||||||
app.use(permission);
|
app.use(permission);
|
||||||
app.use(i18n);
|
app.use(i18n);
|
||||||
app.use(vue3TreeOrg);
|
app.use(vue3TreeOrg);
|
||||||
|
app.use(Particles, {
|
||||||
|
init: async engine => {
|
||||||
|
await loadSlim(engine);
|
||||||
|
},
|
||||||
|
});
|
||||||
app.mount('#app');
|
app.mount('#app');
|
||||||
|
|||||||
@@ -123,3 +123,11 @@
|
|||||||
margin-left: .5rem;
|
margin-left: .5rem;
|
||||||
margin-right: .5rem;
|
margin-right: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ele-pro-table .ant-pagination-options-size-changer.ant-select {
|
||||||
|
min-width: 110px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ele-pro-table .ant-pagination-options-size-changer.ant-select .ant-select-selector {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ service.interceptors.request.use(
|
|||||||
config.params.sign = getSign(config.params);
|
config.params.sign = getSign(config.params);
|
||||||
}
|
}
|
||||||
if (config.data) {
|
if (config.data) {
|
||||||
config.data.tenantId = 10049;
|
config.data.tenantId = 10325;
|
||||||
config.data.sign = getSign(config.data);
|
config.data.sign = getSign(config.data);
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
<a-form-item label="文章标题" name="title">
|
<a-form-item label="文章标题" name="title">
|
||||||
<a-input
|
<a-input
|
||||||
allow-clear
|
allow-clear
|
||||||
:maxlength="20"
|
|
||||||
placeholder="请输入文章标题"
|
placeholder="请输入文章标题"
|
||||||
v-model:value="form.title"
|
v-model:value="form.title"
|
||||||
/>
|
/>
|
||||||
@@ -56,10 +55,8 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="文章来源" name="source">
|
<a-form-item label="简介" name="source">
|
||||||
<source-select
|
<a-input v-model:value="form.source" />
|
||||||
v-model:value="form.source"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="展现方式" name="showType">
|
<a-form-item label="展现方式" name="showType">
|
||||||
<a-radio-group v-model:value="form.showType">
|
<a-radio-group v-model:value="form.showType">
|
||||||
@@ -267,7 +264,7 @@ const onUpload = (item) => {
|
|||||||
url: data.url,
|
url: data.url,
|
||||||
status: "done"
|
status: "done"
|
||||||
});
|
});
|
||||||
form.image = data.path;
|
form.image = data.url;
|
||||||
message.success("上传成功");
|
message.success("上传成功");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
@@ -421,7 +418,7 @@ watch(
|
|||||||
if (props.data.image) {
|
if (props.data.image) {
|
||||||
images.value.push({
|
images.value.push({
|
||||||
uid: 1,
|
uid: 1,
|
||||||
url: FILE_THUMBNAIL + props.data.image,
|
url: props.data.image,
|
||||||
status: "done"
|
status: "done"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<a-image
|
<a-image
|
||||||
:width="45"
|
:width="45"
|
||||||
v-if="record.image"
|
v-if="record.image"
|
||||||
:src="FILE_THUMBNAIL + record.image"
|
:src="record.image"
|
||||||
:preview="false"
|
:preview="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -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>
|
|
||||||
@@ -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>
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
<!-- 目录选择下拉框 -->
|
|
||||||
<template>
|
|
||||||
<a-tree-select
|
|
||||||
allow-clear
|
|
||||||
tree-default-expand-all
|
|
||||||
:placeholder="placeholder"
|
|
||||||
:value="value || undefined"
|
|
||||||
:tree-data="data"
|
|
||||||
:dropdown-style="{ maxHeight: '360px', overflow: 'auto' }"
|
|
||||||
@update:value="updateValue"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import type { Goods } from '@/api/goods/model';
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
|
||||||
(e: 'update:value', value?: number): void;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
withDefaults(
|
|
||||||
defineProps<{
|
|
||||||
// 选中的数据(v-modal)
|
|
||||||
value?: number;
|
|
||||||
// 提示信息
|
|
||||||
placeholder?: string;
|
|
||||||
// 文章分类
|
|
||||||
data: Goods[];
|
|
||||||
}>(),
|
|
||||||
{
|
|
||||||
placeholder: '请选择上级分类'
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
/* 更新选中数据 */
|
|
||||||
const updateValue = (value?: number) => {
|
|
||||||
emit('update:value', value);
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,45 +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 { getDictionaryOptions } from '@/utils/common';
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
|
||||||
(e: 'update:value', value: string): void;
|
|
||||||
(e: 'blur'): void;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
withDefaults(
|
|
||||||
defineProps<{
|
|
||||||
value?: string;
|
|
||||||
placeholder?: string;
|
|
||||||
}>(),
|
|
||||||
{
|
|
||||||
placeholder: '请选择服务器配置'
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// 字典数据
|
|
||||||
const data = getDictionaryOptions('serverConfiguration');
|
|
||||||
|
|
||||||
/* 更新选中数据 */
|
|
||||||
const updateValue = (value: string) => {
|
|
||||||
emit('update:value', value);
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 失去焦点 */
|
|
||||||
const onBlur = () => {
|
|
||||||
emit('blur');
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user