feat: api请求按路由分割
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"tailwindCSS.experimental.configFile": "src/assets/style/index.css",
|
||||||
|
"tailwindCSS.includeLanguages": {
|
||||||
|
"vue": "html",
|
||||||
|
"vue-html": "html"
|
||||||
|
},
|
||||||
|
"editor.quickSuggestions": {
|
||||||
|
"other": true,
|
||||||
|
"comments": false,
|
||||||
|
"strings": true
|
||||||
|
},
|
||||||
|
"css.validate": true,
|
||||||
|
"tailwindCSS.emmetCompletions": true
|
||||||
|
}
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
import axios from 'axios';
|
|
||||||
import {
|
|
||||||
AllProjectListRes,
|
|
||||||
ProjectListRes,
|
|
||||||
CreateProjectParam,
|
|
||||||
ProjectDetailRes,
|
|
||||||
TopBuildingTagsRes,
|
|
||||||
} from '@/types/business';
|
|
||||||
import {
|
|
||||||
ProjectPaginationParams,
|
|
||||||
CommonCityRes,
|
|
||||||
PaginationParams,
|
|
||||||
} from '@/types/comm';
|
|
||||||
import { HttpResponse } from './interceptor';
|
|
||||||
// import type { RouteRecordNormalized } from 'vue-router';
|
|
||||||
// import { UserState } from '@/store/modules/user/types';
|
|
||||||
|
|
||||||
export interface ProjectRecord {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 全部项目列表(包含楼栋)
|
|
||||||
export function getAllProjectList(): Promise<AllProjectListRes> {
|
|
||||||
return axios.get(`project/getProjectBuildingList`);
|
|
||||||
}
|
|
||||||
// 项目列表(分页)
|
|
||||||
export function getProjectList(
|
|
||||||
params: ProjectPaginationParams
|
|
||||||
): Promise<ProjectListRes> {
|
|
||||||
return axios.post('project/getProjectList', params);
|
|
||||||
}
|
|
||||||
// 创建项目
|
|
||||||
export function createProject(
|
|
||||||
params: CreateProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post('project/createProject', params);
|
|
||||||
}
|
|
||||||
// 项目信息
|
|
||||||
export function getProjectDetail(id: number): Promise<ProjectDetailRes> {
|
|
||||||
return axios.get(`project/getProject?id=${id}`);
|
|
||||||
}
|
|
||||||
// 更新项目
|
|
||||||
export function updateProject(
|
|
||||||
params: CreateProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post('project/updateProject', params);
|
|
||||||
}
|
|
||||||
// 全部项目的城市列表
|
|
||||||
export function getProjectCityList(): Promise<CommonCityRes> {
|
|
||||||
return axios.get(`project/getCityList`);
|
|
||||||
}
|
|
||||||
// 删除项目
|
|
||||||
export function delProject(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`project/delProject?id=${id}`);
|
|
||||||
}
|
|
||||||
// ------------- 空间管理 -------------
|
|
||||||
// 创建房源
|
|
||||||
export function createRoom(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('rooms/createRoom', params);
|
|
||||||
}
|
|
||||||
// 房源列表(分页)
|
|
||||||
export function getRoomList(params: PaginationParams): Promise<HttpResponse> {
|
|
||||||
return axios.post('rooms/getRoomList', params);
|
|
||||||
}
|
|
||||||
// 更新房源
|
|
||||||
export function updateRoom(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('rooms/updateRoom', params);
|
|
||||||
}
|
|
||||||
// 删除房源
|
|
||||||
export function delRoom(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`rooms/delRoom?id=${id}`);
|
|
||||||
}
|
|
||||||
// 房源详情
|
|
||||||
export function getRoom(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`rooms/getRoom?id=${id}`);
|
|
||||||
}
|
|
||||||
// 修改房源状态 status:1招商 2保留 3下架 4在租
|
|
||||||
export function changeRoomStatus(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('rooms/changeRoomStatus', params);
|
|
||||||
}
|
|
||||||
// 房源获取头部楼栋tags
|
|
||||||
export function getTopBuildingTagsByProjectId(
|
|
||||||
id: number
|
|
||||||
): Promise<TopBuildingTagsRes> {
|
|
||||||
return axios.get(`roomOver/getTopBuildingTags?project_id=${id}`);
|
|
||||||
}
|
|
||||||
// 房源剖视-数据统计
|
|
||||||
export function getStatisticsData(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('roomOver/getStatisticsData', params);
|
|
||||||
}
|
|
||||||
// 房源剖视-房源列表
|
|
||||||
export function getRoomOverList(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('roomOver/getRoomList', params);
|
|
||||||
}
|
|
||||||
// 房源图谱列表
|
|
||||||
export function getRoomsGraphList(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('roomsGraph/getRoomList', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------- 租客管理 -------------
|
|
||||||
//创建租客
|
|
||||||
export function createTenant(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('tenants/createTenant', params);
|
|
||||||
}
|
|
||||||
// 租客列表(分页)
|
|
||||||
export function getTenantList(params: PaginationParams): Promise<HttpResponse> {
|
|
||||||
return axios.post('tenants/getTenantList', params);
|
|
||||||
}
|
|
||||||
// 更新租客信息
|
|
||||||
export function updateTenant(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('tenants/updateTenant', params);
|
|
||||||
}
|
|
||||||
// 删除租客
|
|
||||||
export function delTenant(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`tenants/delTenant?id=${id}`);
|
|
||||||
}
|
|
||||||
// 租客详情
|
|
||||||
export function getTenantDetail(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`tenants/getTenant?id=${id}`);
|
|
||||||
}
|
|
||||||
// 租客归档
|
|
||||||
export function filingTenant(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('tenants/filingTenant', params);
|
|
||||||
}
|
|
||||||
// 租客下拉列表(不分页)
|
|
||||||
export function getTenantAllList(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post('tenants/getTenantAllList', params);
|
|
||||||
}
|
|
||||||
// 租客归档列表(分页)
|
|
||||||
export function getTenantFilingList(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post('tenants/getTenantFilingList', params);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,279 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import {
|
||||||
|
SettingContractNumbeRes,
|
||||||
|
CreateCodeSettingParam,
|
||||||
|
DisableUserParam,
|
||||||
|
CreateTermSettingParam,
|
||||||
|
SettingContractTermListRes,
|
||||||
|
SettingContractTermInfo,
|
||||||
|
SettingContractTemplateListRes,
|
||||||
|
CreateTemplateSettingParam,
|
||||||
|
ContractWordFormParam,
|
||||||
|
ContractWordSettingListRes,
|
||||||
|
SettingContractFileInfoRes,
|
||||||
|
} from '@/types/setting';
|
||||||
|
import { PaginationParams } from '@/types/comm';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
|
// ==================== 合同设置 API (contractSetting 路由) ====================
|
||||||
|
// 合同设置-合同编号设置-全部启用列表
|
||||||
|
export function getAllCodeSettingList(): Promise<SettingContractNumbeRes> {
|
||||||
|
return axios.get(`contractSetting/getAllCodeSettingList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同编号设置-新增
|
||||||
|
export function createCodeSetting(
|
||||||
|
params: CreateCodeSettingParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/createCodeSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同编号设置-编辑
|
||||||
|
export function updateCodeSetting(
|
||||||
|
params: CreateCodeSettingParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/updateCodeSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同编号设置-删除
|
||||||
|
export function delCodeSetting(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`contractSetting/delCodeSetting?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同编号设置-单个详情
|
||||||
|
export function getCodeSettingFromId(
|
||||||
|
id: number
|
||||||
|
): Promise<SettingContractNumbeRes> {
|
||||||
|
return axios.get(`contractSetting/getCodeSetting?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同编号设置-启用/禁用
|
||||||
|
export function disableCodeSetting(
|
||||||
|
params: DisableUserParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/disableCodeSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同编号设置-列表(带分页)
|
||||||
|
export function getCodeSettingList(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<SettingContractNumbeRes> {
|
||||||
|
return axios.post(`contractSetting/getCodeSettingList`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同条款设置-全部启用列表
|
||||||
|
export function getAllTermsSettingList(): Promise<any> {
|
||||||
|
return axios.get(`contractSetting/getAllTermsSettingList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同条款设置-新增
|
||||||
|
export function createTermsSetting(
|
||||||
|
params: CreateTermSettingParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/createTermsSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同条款设置-编辑
|
||||||
|
export function updateTermsSetting(
|
||||||
|
params: CreateTermSettingParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/updateTermsSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同条款设置-删除
|
||||||
|
export function delTermsSetting(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`contractSetting/delTermsSetting?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同条款设置-单个条款配置详情
|
||||||
|
export function getTermsSettingFromId(
|
||||||
|
id: number
|
||||||
|
): Promise<SettingContractTermInfo> {
|
||||||
|
return axios.get(`contractSetting/getTermsSetting?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同条款设置-单个条款数据详情
|
||||||
|
export function getTermsDataFromId(params: any): Promise<any> {
|
||||||
|
return axios.post(`contractSetting/getTerm`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同条款设置-启用/禁用
|
||||||
|
export function disableTermsSetting(
|
||||||
|
params: DisableUserParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/disableTermsSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同条款设置-列表(带分页)
|
||||||
|
export function getTermsSettingList(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<SettingContractTermListRes> {
|
||||||
|
return axios.post(`contractSetting/getTermsSettingList`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同模板管理-全部启用列表
|
||||||
|
export function getAllTemplateSettingList(): Promise<SettingContractNumbeRes> {
|
||||||
|
return axios.get(`contractSetting/getAllTemplateSettingList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同模板管理-新增
|
||||||
|
export function createTemplateSetting(
|
||||||
|
params: CreateTemplateSettingParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/createTemplateSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同模板管理-编辑
|
||||||
|
export function updateTemplateSetting(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/saveTemplateSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同模板管理-删除
|
||||||
|
export function delTemplateSetting(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`contractSetting/delTemplateSetting?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同模板管理-单个详情
|
||||||
|
export function getTemplateSettingFromId(id: number): Promise<any> {
|
||||||
|
return axios.get(`contractSetting/getTemplateSetting?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同模板管理-启用/禁用
|
||||||
|
export function disableTemplateSetting(
|
||||||
|
params: DisableUserParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/disableTemplateSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同模板管理-列表(带分页)
|
||||||
|
export function getTemplateSettingList(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<SettingContractTemplateListRes> {
|
||||||
|
return axios.post(`contractSetting/getTemplateSettingList`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同文档模板管理-全部启用列表
|
||||||
|
export function getAllWordSettingList(): Promise<ContractWordSettingListRes> {
|
||||||
|
return axios.get(`contractSetting/getAllWordSettingList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同文档模板管理-新增
|
||||||
|
export function createWordSetting(
|
||||||
|
params: ContractWordFormParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/createWordSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同文档模板管理-编辑(更新)
|
||||||
|
export function updateWordSetting(
|
||||||
|
params: ContractWordFormParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/updateWordSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同文档模板管理-删除
|
||||||
|
export function delWordSetting(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`contractSetting/delWordSetting?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同文档模板管理-单个详情
|
||||||
|
export function getWordSettingFromId(
|
||||||
|
id: number
|
||||||
|
): Promise<SettingContractFileInfoRes> {
|
||||||
|
return axios.get(`contractSetting/getWordSetting?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同文档模板管理-启用/禁用
|
||||||
|
export function disableWordSetting(
|
||||||
|
params: DisableUserParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`contractSetting/disableWordSetting`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-合同文档模板管理-列表(带分页)
|
||||||
|
export function getWordSettingList(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<ContractWordSettingListRes> {
|
||||||
|
return axios.post(`contractSetting/getWordSettingList`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取合同占位符列表
|
||||||
|
export function getContractPlaceholderList(params: any): Promise<any> {
|
||||||
|
// type 类型:1租赁,2物业
|
||||||
|
return axios.post(`contractSetting/getPlaceholderList`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 合同管理 API (contracts 路由) ====================
|
||||||
|
// 合同管理-头部数据列表
|
||||||
|
export function getContractsListTopData(type: number): Promise<any> {
|
||||||
|
return axios.post(`contracts/getListTopData`, type);
|
||||||
|
}
|
||||||
|
// 合同管理-列表
|
||||||
|
export interface ContractPaginationParams extends PaginationParams {
|
||||||
|
type?: number;
|
||||||
|
}
|
||||||
|
export function getContractsList(
|
||||||
|
params: ContractPaginationParams
|
||||||
|
): Promise<any> {
|
||||||
|
return axios.post(`contracts/getList`, params);
|
||||||
|
}
|
||||||
|
// 合同管理-草稿合同列表
|
||||||
|
export function getDraftList(type: number): Promise<any> {
|
||||||
|
return axios.get(`contracts/getDraftList?type=${type}`);
|
||||||
|
}
|
||||||
|
// 合同管理-编辑合同详情
|
||||||
|
export function getEditDetail(id: number): Promise<any> {
|
||||||
|
return axios.get(`contracts/getEditDetail?id=${id}`);
|
||||||
|
}
|
||||||
|
// 合同管理-编辑合同标签详情
|
||||||
|
export function getEditTagDetail(params: any): Promise<any> {
|
||||||
|
return axios.post(`contracts/getEditTagDetail`, params);
|
||||||
|
}
|
||||||
|
// 合同管理-合同详情
|
||||||
|
export function getContractDetail(id: number): Promise<any> {
|
||||||
|
return axios.get(`contracts/getDetail?id=${id}`);
|
||||||
|
}
|
||||||
|
// 合同管理-标签详情
|
||||||
|
export function getTagDetail(params: any): Promise<any> {
|
||||||
|
return axios.post(`contracts/getTagDetail`, params);
|
||||||
|
}
|
||||||
|
// 合同管理-保存合同
|
||||||
|
export function saveContracts(params: any): Promise<any> {
|
||||||
|
return axios.post(`contracts/save`, params);
|
||||||
|
}
|
||||||
|
// 合同管理-禁用/启用合同
|
||||||
|
export function disableContracts(params: any): Promise<any> {
|
||||||
|
return axios.post(`contracts/disable`, params);
|
||||||
|
}
|
||||||
|
// 合同管理-删除合同
|
||||||
|
export function delContract(id: number): Promise<any> {
|
||||||
|
return axios.get(`contracts/del?id=${id}`);
|
||||||
|
}
|
||||||
|
// 合同管理-提交审批
|
||||||
|
export function approvalContract(id: number): Promise<any> {
|
||||||
|
return axios.get(`contracts/approval?id=${id}`);
|
||||||
|
}
|
||||||
|
// 合同管理-归档
|
||||||
|
export function filingContract(id: number): Promise<any> {
|
||||||
|
return axios.get(`contracts/filing?id=${id}`);
|
||||||
|
}
|
||||||
|
// 合同管理-生成合同
|
||||||
|
export function createContracts(params: any): Promise<any> {
|
||||||
|
return axios.post(`contracts/createWord`, params);
|
||||||
|
}
|
||||||
|
// 合同管理-合同文件上传
|
||||||
|
export function uploadFileContracts(params: any): Promise<any> {
|
||||||
|
return axios.post(`contracts/uploadFile`, params);
|
||||||
|
}
|
||||||
|
// 合同管理-合同文件更新
|
||||||
|
export function updateFileContracts(params: any): Promise<any> {
|
||||||
|
return axios.post(`contracts/updateFile`, params);
|
||||||
|
}
|
||||||
|
// 合同管理-取消审批
|
||||||
|
export function cancelApprovalContract(id: number): Promise<any> {
|
||||||
|
return axios.get(`contracts/cancelApproval?id=${id}`);
|
||||||
|
}
|
||||||
|
// 合同归档-列表
|
||||||
|
export function getFilingContractList(params: any): Promise<any> {
|
||||||
|
return axios.post(`contracts/getFilingList`, params);
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import {
|
||||||
|
DepartmentFormParams,
|
||||||
|
DepartmentFormRes,
|
||||||
|
DepartmentListRes,
|
||||||
|
DepartmentDetailRes,
|
||||||
|
} from '@/types/setting';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
|
// ==================== 部门相关 API ====================
|
||||||
|
export function createDepartment(
|
||||||
|
params: DepartmentFormParams
|
||||||
|
): Promise<DepartmentFormRes> {
|
||||||
|
return axios.post('/department/createDepartment', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateDepartment(
|
||||||
|
params: DepartmentFormParams
|
||||||
|
): Promise<DepartmentFormRes> {
|
||||||
|
return axios.post('/department/updateDepartment', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDepartmentList(): Promise<DepartmentListRes> {
|
||||||
|
return axios.get('/department/getDepartmentList');
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDepartmentDetail(id: number): Promise<DepartmentDetailRes> {
|
||||||
|
return axios.get(`/department/getDepartment?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function departmentSetUp(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`/department/setUp?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function departmentSetDown(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`/department/setDown?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delDepartment(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`/department/delDepartment?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存部门项目数据
|
||||||
|
export function saveDataPermission(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('/department/saveDataPermission', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取部门项目数据
|
||||||
|
export function getDataPermission(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`/department/getDataPermission?id=${id}`);
|
||||||
|
}
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import {
|
||||||
|
SettingProjectTypeListRes,
|
||||||
|
SettingProjectTypeRes,
|
||||||
|
SettingProjectProvinceRes,
|
||||||
|
DictionaryForm,
|
||||||
|
CheckProjectParam,
|
||||||
|
SettingRoomTagsRes,
|
||||||
|
SettingRoomTagRes,
|
||||||
|
SettingTenantDictionaryRes,
|
||||||
|
} from '@/types/setting';
|
||||||
|
import { TenantDictionaryType } from '@/types/comm';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
|
// ==================== 数据字典 API (dictionary 路由) ====================
|
||||||
|
// 数据字典-项目管理-全部项目类型列表
|
||||||
|
export function getAllProjectTypeList(): Promise<SettingProjectTypeListRes> {
|
||||||
|
return axios.get('dictionary/getAllProjectTypeList');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-单个项目类型信息
|
||||||
|
export function getProjectTypeById(id: number): Promise<SettingProjectTypeRes> {
|
||||||
|
return axios.get(`dictionary/getProjectType?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-项目地址列表
|
||||||
|
export function getProvinceList(): Promise<SettingProjectProvinceRes> {
|
||||||
|
return axios.get(`dictionary/getProvinceList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-创建项目类型
|
||||||
|
export function createProjectType(
|
||||||
|
params: DictionaryForm
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/createProjectType`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-更新项目类型信息
|
||||||
|
export function updateProjectType(
|
||||||
|
params: DictionaryForm
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/updateProjectType`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-删除项目类型
|
||||||
|
export function delProjectType(id: number): Promise<SettingProjectProvinceRes> {
|
||||||
|
return axios.get(`dictionary/delProjectType?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-启用/禁用项目类型(单个)
|
||||||
|
export function checkProjectType(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkProjectType`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-启用/禁用项目类型(全选)
|
||||||
|
export function checkAllProjectType(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkAllProjectType`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-启用/禁用省份(单个)
|
||||||
|
export function checkProvince(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkProvince`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-启用/禁用省份(全选)
|
||||||
|
export function checkAllProvince(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkAllProvince`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-空间管理-全部房源标签列表
|
||||||
|
export function getRoomTagList(): Promise<SettingRoomTagsRes> {
|
||||||
|
return axios.get(`dictionary/getRoomTagList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-项目管理-单个房源标签信息
|
||||||
|
export function getRoomTagById(id: number): Promise<SettingRoomTagRes> {
|
||||||
|
return axios.get(`dictionary/getRoomTag?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-空间管理-创建房源标签
|
||||||
|
export function createRoomTag(params: DictionaryForm): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/createRoomTag`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-空间管理-更新房源标签
|
||||||
|
export function updateRoomTag(params: DictionaryForm): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/updateRoomTag`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-空间管理-删除房源标签
|
||||||
|
export function delRoomTag(id: number): Promise<SettingProjectProvinceRes> {
|
||||||
|
return axios.get(`dictionary/delRoomTag?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-空间管理-禁用/启用 房源标签(单个)
|
||||||
|
export function checkRoomTag(params: CheckProjectParam): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkRoomTag`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-空间管理-禁用/启用 房源标签(全选)
|
||||||
|
export function checkAllRoomTag(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkAllRoomTag`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-租客管理-全部租客标签列表(包含所有类型标签)
|
||||||
|
export function getAllTenantDictionaryList(): Promise<SettingTenantDictionaryRes> {
|
||||||
|
return axios.get(`dictionary/getAllTenantDictionaryList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-租客管理-单个租客标签信息
|
||||||
|
export function getTenantDictionary(
|
||||||
|
id: number,
|
||||||
|
type: TenantDictionaryType
|
||||||
|
): Promise<SettingRoomTagsRes> {
|
||||||
|
return axios.get(`dictionary/getTenantDictionary?id=${id}&type=${type}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-租客管理-创建租客标签
|
||||||
|
export function createTenantDictionary(
|
||||||
|
params: DictionaryForm
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/createTenantDictionary`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-租客管理-更新租客标签
|
||||||
|
export function updateTenantDictionary(
|
||||||
|
params: DictionaryForm
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/updateTenantDictionary`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-租客管理-删除租客标签
|
||||||
|
export function delTenantDictionary(
|
||||||
|
id: number,
|
||||||
|
type: TenantDictionaryType
|
||||||
|
): Promise<SettingRoomTagsRes> {
|
||||||
|
return axios.get(`dictionary/delTenantDictionary?id=${id}&type=${type}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-租客管理-禁用/启用 租客标签(单个)
|
||||||
|
export function checkTenantDictionary(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkTenantDictionary`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-租客管理-禁用/启用 租客标签(全选)
|
||||||
|
export function checkAllTenantDictionary(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkAllTenantDictionary`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-租客管理--已启用列表(type:1租客类型,2租客来源,3租客行业分类,4租客企业规模)
|
||||||
|
export function getTenantDictionaryListByType(
|
||||||
|
type: TenantDictionaryType
|
||||||
|
): Promise<SettingRoomTagsRes> {
|
||||||
|
return axios.get(`dictionary/getTenantDictionaryList?type=${type}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同标签列表(已勾选)
|
||||||
|
export function getContractTagsList(): Promise<any> {
|
||||||
|
return axios.get(`dictionary/getContractTagsList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-合同管理-合同标签列表(全部)
|
||||||
|
export function getAllContractTagsList(): Promise<any> {
|
||||||
|
return axios.get(`dictionary/getAllContractTagsList`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-合同管理-创建合同标签
|
||||||
|
export function createContractTags(
|
||||||
|
params: DictionaryForm
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/createContractTags`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-合同管理-更新合同标签
|
||||||
|
export function updateContractTags(
|
||||||
|
params: DictionaryForm
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/updateContractTags`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-合同管理-删除合同标签
|
||||||
|
export function delContractTags(
|
||||||
|
id: number
|
||||||
|
): Promise<SettingProjectProvinceRes> {
|
||||||
|
return axios.get(`dictionary/delContractTags?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-合同管理-禁用/启用 合同标签(单个)
|
||||||
|
export function checkContractTags(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkContractTags`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-合同管理-禁用/启用 合同标签(全选)
|
||||||
|
export function checkAllContractTags(
|
||||||
|
params: CheckProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post(`dictionary/checkAllContractTags`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据字典-合同管理-单个合同标签信息
|
||||||
|
export function getContractTags(
|
||||||
|
id: number
|
||||||
|
): Promise<SettingProjectProvinceRes> {
|
||||||
|
return axios.get(`dictionary/getContractTags?id=${id}`);
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import {
|
||||||
|
FeeManagementListRes,
|
||||||
|
CreateFeeParams,
|
||||||
|
FeeManagementDetailRes,
|
||||||
|
FeeSelectListParams,
|
||||||
|
DisableUserParam,
|
||||||
|
} from '@/types/setting';
|
||||||
|
import { PaginationParams } from '@/types/comm';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
|
// ==================== 财务设置 API (financeSetting 路由) ====================
|
||||||
|
// 合同设置-财务设置-全部列表(带分页)
|
||||||
|
export function getFeeList(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<FeeManagementListRes> {
|
||||||
|
return axios.post(`financeSetting/getFeeList`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-财务设置-新增
|
||||||
|
export function createFee(params: CreateFeeParams): Promise<HttpResponse> {
|
||||||
|
return axios.post(`financeSetting/createFee`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-财务设置-编辑
|
||||||
|
export function updateFee(params: CreateFeeParams): Promise<HttpResponse> {
|
||||||
|
return axios.post(`financeSetting/updateFee`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-财务设置-删除
|
||||||
|
export function delFee(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`financeSetting/delFee?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-财务设置-单个详情
|
||||||
|
export function getFeeFromId(id: number): Promise<FeeManagementDetailRes> {
|
||||||
|
return axios.get(`financeSetting/getFee?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-财务设置-启用/禁用
|
||||||
|
export function disableFee(params: DisableUserParam): Promise<HttpResponse> {
|
||||||
|
return axios.post(`financeSetting/disableFee`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-财务设置-获取下拉列表
|
||||||
|
export function getUseFeeList(
|
||||||
|
params: FeeSelectListParams
|
||||||
|
): Promise<FeeManagementListRes> {
|
||||||
|
return axios.post(`financeSetting/getUseFeeList`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同设置-流水账户管理--获取下拉列表
|
||||||
|
export function getUseTurnoverAccountList(params: any): Promise<any> {
|
||||||
|
return axios.get(`financeSetting/getUseTurnoverAccountList`, params);
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import {
|
||||||
|
AllProjectListRes,
|
||||||
|
ProjectListRes,
|
||||||
|
CreateProjectParam,
|
||||||
|
ProjectDetailRes,
|
||||||
|
} from '@/types/business';
|
||||||
|
import { ProjectPaginationParams, CommonCityRes } from '@/types/comm';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
|
export interface ProjectRecord {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 项目相关 API (project 路由) ====================
|
||||||
|
// 全部项目列表(包含楼栋)
|
||||||
|
export function getAllProjectList(): Promise<AllProjectListRes> {
|
||||||
|
return axios.get(`project/getProjectBuildingList`);
|
||||||
|
}
|
||||||
|
// 项目列表(分页)
|
||||||
|
export function getProjectList(
|
||||||
|
params: ProjectPaginationParams
|
||||||
|
): Promise<ProjectListRes> {
|
||||||
|
return axios.post('project/getProjectList', params);
|
||||||
|
}
|
||||||
|
// 创建项目
|
||||||
|
export function createProject(
|
||||||
|
params: CreateProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post('project/createProject', params);
|
||||||
|
}
|
||||||
|
// 项目信息
|
||||||
|
export function getProjectDetail(id: number): Promise<ProjectDetailRes> {
|
||||||
|
return axios.get(`project/getProject?id=${id}`);
|
||||||
|
}
|
||||||
|
// 更新项目
|
||||||
|
export function updateProject(
|
||||||
|
params: CreateProjectParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post('project/updateProject', params);
|
||||||
|
}
|
||||||
|
// 全部项目的城市列表
|
||||||
|
export function getProjectCityList(): Promise<CommonCityRes> {
|
||||||
|
return axios.get(`project/getCityList`);
|
||||||
|
}
|
||||||
|
// 删除项目
|
||||||
|
export function delProject(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`project/delProject?id=${id}`);
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import {
|
||||||
|
AllUserListRes,
|
||||||
|
RoleListRes,
|
||||||
|
RoleFormParam,
|
||||||
|
PermissionRes,
|
||||||
|
RolePermissionRes,
|
||||||
|
SaveRolePermissionParam,
|
||||||
|
UpdateUserRoleParam,
|
||||||
|
} from '@/types/setting';
|
||||||
|
import { PaginationParams } from '@/types/comm';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
|
// ==================== 角色相关 API ====================
|
||||||
|
export function getRoleList(): Promise<RoleListRes> {
|
||||||
|
return axios.get('/role/getRoleList');
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createRole(params: RoleFormParam): Promise<HttpResponse> {
|
||||||
|
return axios.post('/role/createRole', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateRole(params: RoleFormParam): Promise<HttpResponse> {
|
||||||
|
return axios.post('/role/updateRole', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delRole(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`/role/delRole?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPermissionList(): Promise<PermissionRes> {
|
||||||
|
return axios.get('/role/getPermissionList');
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRolePermission(id: number): Promise<RolePermissionRes> {
|
||||||
|
return axios.get(`/role/getRolePermission?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveRolePermission(
|
||||||
|
params: SaveRolePermissionParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post('/role/saveRolePermission', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 角色下的用户列表
|
||||||
|
export function getUserListFromRole(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<AllUserListRes> {
|
||||||
|
return axios.post('/role/getUserList', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateUserRole(
|
||||||
|
params: UpdateUserRoleParam
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post('/role/updateUserRole', params);
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import { TopBuildingTagsRes } from '@/types/business';
|
||||||
|
import { PaginationParams } from '@/types/comm';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
|
// ==================== 空间管理 - rooms 路由 ====================
|
||||||
|
// 创建房源
|
||||||
|
export function createRoom(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('rooms/createRoom', params);
|
||||||
|
}
|
||||||
|
// 房源列表(分页)
|
||||||
|
export function getRoomList(params: PaginationParams): Promise<HttpResponse> {
|
||||||
|
return axios.post('rooms/getRoomList', params);
|
||||||
|
}
|
||||||
|
// 更新房源
|
||||||
|
export function updateRoom(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('rooms/updateRoom', params);
|
||||||
|
}
|
||||||
|
// 删除房源
|
||||||
|
export function delRoom(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`rooms/delRoom?id=${id}`);
|
||||||
|
}
|
||||||
|
// 房源详情
|
||||||
|
export function getRoom(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`rooms/getRoom?id=${id}`);
|
||||||
|
}
|
||||||
|
// 修改房源状态 status:1招商 2保留 3下架 4在租
|
||||||
|
export function changeRoomStatus(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('rooms/changeRoomStatus', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 空间管理 - roomOver 路由 ====================
|
||||||
|
// 房源获取头部楼栋tags
|
||||||
|
export function getTopBuildingTagsByProjectId(
|
||||||
|
id: number
|
||||||
|
): Promise<TopBuildingTagsRes> {
|
||||||
|
return axios.get(`roomOver/getTopBuildingTags?project_id=${id}`);
|
||||||
|
}
|
||||||
|
// 房源剖视-数据统计
|
||||||
|
export function getStatisticsData(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('roomOver/getStatisticsData', params);
|
||||||
|
}
|
||||||
|
// 房源剖视-房源列表
|
||||||
|
export function getRoomOverList(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('roomOver/getRoomList', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 空间管理 - roomsGraph 路由 ====================
|
||||||
|
// 房源图谱列表
|
||||||
|
export function getRoomsGraphList(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('roomsGraph/getRoomList', params);
|
||||||
|
}
|
||||||
+4
-543
@@ -1,570 +1,31 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import {
|
import {
|
||||||
DepartmentFormParams,
|
|
||||||
DepartmentFormRes,
|
|
||||||
DepartmentListRes,
|
|
||||||
DepartmentDetailRes,
|
|
||||||
AllUserListRes,
|
|
||||||
FormUserItem,
|
|
||||||
UserInfoRes,
|
|
||||||
DisableUserParam,
|
|
||||||
RoleListRes,
|
|
||||||
RoleFormParam,
|
|
||||||
PermissionRes,
|
|
||||||
RolePermissionRes,
|
|
||||||
SaveRolePermissionParam,
|
|
||||||
UpdateUserRoleParam,
|
|
||||||
SafeInfoRes,
|
SafeInfoRes,
|
||||||
SafeParams,
|
SafeParams,
|
||||||
SettingProjectRes,
|
SettingProjectRes,
|
||||||
SettingProjectParam,
|
SettingProjectParam,
|
||||||
SettingProjectTypeListRes,
|
|
||||||
SettingProjectTypeRes,
|
|
||||||
SettingProjectProvinceRes,
|
|
||||||
DictionaryForm,
|
|
||||||
CheckProjectParam,
|
|
||||||
SettingRoomTagsRes,
|
|
||||||
SettingRoomTagRes,
|
|
||||||
SettingTenantDictionaryRes,
|
|
||||||
SettingContractNumbeRes,
|
|
||||||
CreateCodeSettingParam,
|
|
||||||
FeeManagementListRes,
|
|
||||||
CreateFeeParams,
|
|
||||||
FeeManagementDetailRes,
|
|
||||||
FeeSelectListParams,
|
|
||||||
CreateTermSettingParam,
|
|
||||||
SettingContractTermListRes,
|
|
||||||
SettingContractTermInfo,
|
|
||||||
SettingContractTemplateListRes,
|
|
||||||
CreateTemplateSettingParam,
|
|
||||||
ContractWordFormParam,
|
|
||||||
ContractWordSettingListRes,
|
|
||||||
SettingContractFileInfoRes,
|
|
||||||
} from '@/types/setting';
|
} from '@/types/setting';
|
||||||
import { PaginationParams, TenantDictionaryType } from '@/types/comm';
|
|
||||||
import { HttpResponse } from './interceptor';
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
// ==================== 部门相关 API ====================
|
// ==================== 系统设置相关 API (setting 路由) ====================
|
||||||
export function createDepartment(
|
|
||||||
params: DepartmentFormParams
|
|
||||||
): Promise<DepartmentFormRes> {
|
|
||||||
return axios.post('/department/createDepartment', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function updateDepartment(
|
|
||||||
params: DepartmentFormParams
|
|
||||||
): Promise<DepartmentFormRes> {
|
|
||||||
return axios.post('/department/updateDepartment', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getDepartmentList(): Promise<DepartmentListRes> {
|
|
||||||
return axios.get('/department/getDepartmentList');
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getDepartmentDetail(id: number): Promise<DepartmentDetailRes> {
|
|
||||||
return axios.get(`/department/getDepartment?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function departmentSetUp(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`/department/setUp?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function departmentSetDown(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`/department/setDown?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function delDepartment(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`/department/delDepartment?id=${id}`);
|
|
||||||
}
|
|
||||||
// 保存部门项目数据
|
|
||||||
export function saveDataPermission(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post('/department/saveDataPermission', params);
|
|
||||||
}
|
|
||||||
// 获取部门项目数据
|
|
||||||
export function getDataPermission(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`/department/getDataPermission?id=${id}`);
|
|
||||||
}
|
|
||||||
// ==================== 用户相关 API ====================
|
|
||||||
export function getAllUserList(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<AllUserListRes> {
|
|
||||||
return axios.post('/user/getAllUserList', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getUserList(params: PaginationParams): Promise<AllUserListRes> {
|
|
||||||
return axios.post('/user/getUserList', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function createUser(params: FormUserItem): Promise<HttpResponse> {
|
|
||||||
return axios.post('/user/createUser', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function updateUser(params: FormUserItem): Promise<HttpResponse> {
|
|
||||||
return axios.post('/user/updateUser', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getUserInfo(id: number): Promise<UserInfoRes> {
|
|
||||||
return axios.get(`/user/getUser?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function delUser(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`/user/delUser?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function disableUser(params: DisableUserParam): Promise<HttpResponse> {
|
|
||||||
return axios.post('/user/disableUser', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 角色相关 API ====================
|
|
||||||
export function getRoleList(): Promise<RoleListRes> {
|
|
||||||
return axios.get('/role/getRoleList');
|
|
||||||
}
|
|
||||||
|
|
||||||
export function createRole(params: RoleFormParam): Promise<HttpResponse> {
|
|
||||||
return axios.post('/role/createRole', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function updateRole(params: RoleFormParam): Promise<HttpResponse> {
|
|
||||||
return axios.post('/role/updateRole', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function delRole(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`/role/delRole?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getPermissionList(): Promise<PermissionRes> {
|
|
||||||
return axios.get('/role/getPermissionList');
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getRolePermission(id: number): Promise<RolePermissionRes> {
|
|
||||||
return axios.get(`role/getRolePermission?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function saveRolePermission(
|
|
||||||
params: SaveRolePermissionParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post('role/saveRolePermission', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 角色下的用户列表
|
|
||||||
export function getUserListFromRole(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<AllUserListRes> {
|
|
||||||
return axios.post('role/getUserList', params);
|
|
||||||
}
|
|
||||||
// 角色下的用户列表
|
|
||||||
export function updateUserRole(
|
|
||||||
params: UpdateUserRoleParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post('role/updateUserRole', params);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 系统设置相关 API ====================
|
|
||||||
// 通用设置-安全设置信息
|
// 通用设置-安全设置信息
|
||||||
export function getSafeSettingInfo(): Promise<SafeInfoRes> {
|
export function getSafeSettingInfo(): Promise<SafeInfoRes> {
|
||||||
return axios.get('setting/getSafeSetting');
|
return axios.get('setting/getSafeSetting');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 通用设置-安全设置信息保存
|
// 通用设置-安全设置信息保存
|
||||||
export function saveSafeSetting(params: SafeParams): Promise<HttpResponse> {
|
export function saveSafeSetting(params: SafeParams): Promise<HttpResponse> {
|
||||||
return axios.post('setting/saveSafeSetting', params);
|
return axios.post('setting/saveSafeSetting', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 项目设置信息
|
// 项目设置信息
|
||||||
export function getProjectSetting(): Promise<SettingProjectRes> {
|
export function getProjectSetting(): Promise<SettingProjectRes> {
|
||||||
return axios.get('setting/getProjectSetting');
|
return axios.get('setting/getProjectSetting');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 项目设置信息保存
|
// 项目设置信息保存
|
||||||
export function saveProjectSetting(
|
export function saveProjectSetting(
|
||||||
params: SettingProjectParam
|
params: SettingProjectParam
|
||||||
): Promise<HttpResponse> {
|
): Promise<HttpResponse> {
|
||||||
return axios.post('setting/saveProjectSetting', params);
|
return axios.post('setting/saveProjectSetting', params);
|
||||||
}
|
}
|
||||||
// 数据字典-项目管理-全部项目类型列表
|
|
||||||
export function getAllProjectTypeList(): Promise<SettingProjectTypeListRes> {
|
|
||||||
return axios.get('dictionary/getAllProjectTypeList');
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-单个项目类型信息
|
|
||||||
export function getProjectTypeById(id: number): Promise<SettingProjectTypeRes> {
|
|
||||||
return axios.get(`dictionary/getProjectType?id=${id}`);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-项目地址列表
|
|
||||||
export function getProvinceList(): Promise<SettingProjectProvinceRes> {
|
|
||||||
return axios.get(`dictionary/getProvinceList`);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-创建项目类型
|
|
||||||
export function createProjectType(
|
|
||||||
params: DictionaryForm
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/createProjectType`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-更新项目类型信息
|
|
||||||
export function updateProjectType(
|
|
||||||
params: DictionaryForm
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/updateProjectType`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-删除项目类型
|
|
||||||
export function delProjectType(id: number): Promise<SettingProjectProvinceRes> {
|
|
||||||
return axios.get(`dictionary/delProjectType?id=${id}`);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-启用/禁用项目类型(单个)
|
|
||||||
export function checkProjectType(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkProjectType`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-启用/禁用项目类型(全选)
|
|
||||||
export function checkAllProjectType(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkAllProjectType`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-启用/禁用省份(单个)
|
|
||||||
export function checkProvince(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkProvince`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-启用/禁用省份(全选)
|
|
||||||
export function checkAllProvince(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkAllProvince`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-空间管理-全部房源标签列表
|
|
||||||
export function getRoomTagList(): Promise<SettingRoomTagsRes> {
|
|
||||||
return axios.get(`dictionary/getRoomTagList`);
|
|
||||||
}
|
|
||||||
// 数据字典-项目管理-单个房源标签信息
|
|
||||||
export function getRoomTagById(id: number): Promise<SettingRoomTagRes> {
|
|
||||||
return axios.get(`dictionary/getRoomTag?id=${id}`);
|
|
||||||
}
|
|
||||||
// 数据字典-空间管理-创建房源标签
|
|
||||||
export function createRoomTag(params: DictionaryForm): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/createRoomTag`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-空间管理-更新房源标签
|
|
||||||
export function updateRoomTag(params: DictionaryForm): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/updateRoomTag`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-空间管理-删除房源标签
|
|
||||||
export function delRoomTag(id: number): Promise<SettingProjectProvinceRes> {
|
|
||||||
return axios.get(`dictionary/delRoomTag?id=${id}`);
|
|
||||||
}
|
|
||||||
// 数据字典-空间管理-禁用/启用 房源标签(单个)
|
|
||||||
export function checkRoomTag(params: CheckProjectParam): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkRoomTag`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-空间管理-禁用/启用 房源标签(全选)
|
|
||||||
export function checkAllRoomTag(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkAllRoomTag`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-租客管理-全部租客标签列表(包含所有类型标签)
|
|
||||||
export function getAllTenantDictionaryList(): Promise<SettingTenantDictionaryRes> {
|
|
||||||
return axios.get(`dictionary/getAllTenantDictionaryList`);
|
|
||||||
}
|
|
||||||
// 数据字典-租客管理-单个租客标签信息
|
|
||||||
export function getTenantDictionary(
|
|
||||||
id: number,
|
|
||||||
type: TenantDictionaryType
|
|
||||||
): Promise<SettingRoomTagsRes> {
|
|
||||||
return axios.get(`dictionary/getTenantDictionary?id=${id}&type=${type}`);
|
|
||||||
}
|
|
||||||
// 数据字典-租客管理-创建租客标签
|
|
||||||
export function createTenantDictionary(
|
|
||||||
params: DictionaryForm
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/createTenantDictionary`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-租客管理-更新租客标签
|
|
||||||
export function updateTenantDictionary(
|
|
||||||
params: DictionaryForm
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/updateTenantDictionary`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-租客管理-删除租客标签
|
|
||||||
export function delTenantDictionary(
|
|
||||||
id: number,
|
|
||||||
type: TenantDictionaryType
|
|
||||||
): Promise<SettingRoomTagsRes> {
|
|
||||||
return axios.get(`dictionary/delTenantDictionary?id=${id}&type=${type}`);
|
|
||||||
}
|
|
||||||
// 数据字典-租客管理-禁用/启用 租客标签(单个)
|
|
||||||
export function checkTenantDictionary(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkTenantDictionary`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-租客管理-禁用/启用 租客标签(全选)
|
|
||||||
export function checkAllTenantDictionary(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkAllTenantDictionary`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-租客管理--已启用列表(type:1租客类型,2租客来源,3租客行业分类,4租客企业规模)
|
|
||||||
export function getTenantDictionaryListByType(
|
|
||||||
type: TenantDictionaryType
|
|
||||||
): Promise<SettingRoomTagsRes> {
|
|
||||||
return axios.get(`dictionary/getTenantDictionaryList?type=${type}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同编号设置-全部启用列表
|
|
||||||
export function getAllCodeSettingList(): Promise<SettingContractNumbeRes> {
|
|
||||||
return axios.get(`contractSetting/getAllCodeSettingList`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同编号设置-新增
|
|
||||||
export function createCodeSetting(
|
|
||||||
params: CreateCodeSettingParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/createCodeSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同编号设置-编辑
|
|
||||||
export function updateCodeSetting(
|
|
||||||
params: CreateCodeSettingParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/updateCodeSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同编号设置-删除
|
|
||||||
export function delCodeSetting(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`contractSetting/delCodeSetting?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同编号设置-单个详情
|
|
||||||
export function getCodeSettingFromId(
|
|
||||||
id: number
|
|
||||||
): Promise<SettingContractNumbeRes> {
|
|
||||||
return axios.get(`contractSetting/getCodeSetting?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同编号设置-启用/禁用
|
|
||||||
export function disableCodeSetting(
|
|
||||||
params: DisableUserParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/disableCodeSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同编号设置-列表(带分页)
|
|
||||||
export function getCodeSettingList(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<SettingContractNumbeRes> {
|
|
||||||
return axios.post(`contractSetting/getCodeSettingList`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同条款设置-全部启用列表
|
|
||||||
export function getAllTermsSettingList(): Promise<any> {
|
|
||||||
return axios.get(`contractSetting/getAllTermsSettingList`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同条款设置-新增
|
|
||||||
export function createTermsSetting(
|
|
||||||
params: CreateTermSettingParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/createTermsSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同条款设置-编辑
|
|
||||||
export function updateTermsSetting(
|
|
||||||
params: CreateTermSettingParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/updateTermsSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同条款设置-删除
|
|
||||||
export function delTermsSetting(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`contractSetting/delTermsSetting?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同条款设置-单个条款配置详情
|
|
||||||
export function getTermsSettingFromId(
|
|
||||||
id: number
|
|
||||||
): Promise<SettingContractTermInfo> {
|
|
||||||
return axios.get(`contractSetting/getTermsSetting?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同条款设置-单个条款数据详情
|
|
||||||
export function getTermsDataFromId(params: any): Promise<any> {
|
|
||||||
return axios.post(`contractSetting/getTerm`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同条款设置-启用/禁用
|
|
||||||
export function disableTermsSetting(
|
|
||||||
params: DisableUserParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/disableTermsSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同条款设置-列表(带分页)
|
|
||||||
export function getTermsSettingList(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<SettingContractTermListRes> {
|
|
||||||
return axios.post(`contractSetting/getTermsSettingList`, params);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 合同设置-财务设置-全部列表(带分页)
|
|
||||||
export function getFeeList(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<FeeManagementListRes> {
|
|
||||||
return axios.post(`financeSetting/getFeeList`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-财务设置-新增
|
|
||||||
export function createFee(params: CreateFeeParams): Promise<HttpResponse> {
|
|
||||||
return axios.post(`financeSetting/createFee`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-财务设置-编辑
|
|
||||||
export function updateFee(params: CreateFeeParams): Promise<HttpResponse> {
|
|
||||||
return axios.post(`financeSetting/updateFee`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-财务设置-删除
|
|
||||||
export function delFee(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`financeSetting/delFee?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-财务设置-单个详情
|
|
||||||
export function getFeeFromId(id: number): Promise<FeeManagementDetailRes> {
|
|
||||||
return axios.get(`financeSetting/getFee?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-财务设置-启用/禁用
|
|
||||||
export function disableFee(params: DisableUserParam): Promise<HttpResponse> {
|
|
||||||
return axios.post(`financeSetting/disableFee`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-财务设置-获取下拉列表
|
|
||||||
export function getUseFeeList(
|
|
||||||
params: FeeSelectListParams
|
|
||||||
): Promise<FeeManagementListRes> {
|
|
||||||
return axios.post(`financeSetting/getUseFeeList`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-流水账户管理--获取下拉列表
|
|
||||||
export function getUseTurnoverAccountList(params: any): Promise<any> {
|
|
||||||
return axios.get(`financeSetting/getUseTurnoverAccountList`, params);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 合同设置-合同模板管理-全部启用列表
|
|
||||||
export function getAllTemplateSettingList(): Promise<SettingContractNumbeRes> {
|
|
||||||
return axios.get(`contractSetting/getAllTemplateSettingList`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同模板管理-新增
|
|
||||||
export function createTemplateSetting(
|
|
||||||
params: CreateTemplateSettingParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/createTemplateSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同模板管理-编辑
|
|
||||||
export function updateTemplateSetting(params: any): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/saveTemplateSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同模板管理-删除
|
|
||||||
export function delTemplateSetting(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`contractSetting/delTemplateSetting?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同模板管理-单个详情
|
|
||||||
export function getTemplateSettingFromId(id: number): Promise<any> {
|
|
||||||
return axios.get(`contractSetting/getTemplateSetting?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同模板管理-启用/禁用
|
|
||||||
export function disableTemplateSetting(
|
|
||||||
params: DisableUserParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/disableTemplateSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同模板管理-列表(带分页)
|
|
||||||
export function getTemplateSettingList(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<SettingContractTemplateListRes> {
|
|
||||||
return axios.post(`contractSetting/getTemplateSettingList`, params);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 合同设置-合同文档模板管理-全部启用列表
|
|
||||||
export function getAllWordSettingList(): Promise<ContractWordSettingListRes> {
|
|
||||||
return axios.get(`contractSetting/getAllWordSettingList`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同文档模板管理-新增
|
|
||||||
export function createWordSetting(
|
|
||||||
params: ContractWordFormParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/createWordSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同文档模板管理-编辑(更新)
|
|
||||||
export function updateWordSetting(
|
|
||||||
params: ContractWordFormParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/updateWordSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同文档模板管理-删除
|
|
||||||
export function delWordSetting(id: number): Promise<HttpResponse> {
|
|
||||||
return axios.get(`contractSetting/delWordSetting?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同文档模板管理-单个详情
|
|
||||||
export function getWordSettingFromId(
|
|
||||||
id: number
|
|
||||||
): Promise<SettingContractFileInfoRes> {
|
|
||||||
return axios.get(`contractSetting/getWordSetting?id=${id}`);
|
|
||||||
}
|
|
||||||
// 合同设置-合同文档模板管理-启用/禁用
|
|
||||||
export function disableWordSetting(
|
|
||||||
params: DisableUserParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`contractSetting/disableWordSetting`, params);
|
|
||||||
}
|
|
||||||
// 合同设置-合同文档模板管理-列表(带分页)
|
|
||||||
export function getWordSettingList(
|
|
||||||
params: PaginationParams
|
|
||||||
): Promise<ContractWordSettingListRes> {
|
|
||||||
return axios.post(`contractSetting/getWordSettingList`, params);
|
|
||||||
}
|
|
||||||
// 合同标签列表(已勾选)
|
|
||||||
export function getContractTagsList(): Promise<any> {
|
|
||||||
return axios.get(`dictionary/getContractTagsList`);
|
|
||||||
}
|
|
||||||
// 数据字典-合同管理-合同标签列表(全部)
|
|
||||||
export function getAllContractTagsList(): Promise<any> {
|
|
||||||
return axios.get(`dictionary/getAllContractTagsList`);
|
|
||||||
}
|
|
||||||
// 数据字典-合同管理-创建合同标签
|
|
||||||
export function createContractTags(
|
|
||||||
params: DictionaryForm
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/createContractTags`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-合同管理-更新合同标签
|
|
||||||
export function updateContractTags(
|
|
||||||
params: DictionaryForm
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/updateContractTags`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-合同管理-删除合同标签
|
|
||||||
export function delContractTags(
|
|
||||||
id: number
|
|
||||||
): Promise<SettingProjectProvinceRes> {
|
|
||||||
return axios.get(`dictionary/delContractTags?id=${id}`);
|
|
||||||
}
|
|
||||||
// 数据字典-合同管理-禁用/启用 合同标签(单个)
|
|
||||||
export function checkContractTags(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkContractTags`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-合同管理-禁用/启用 合同标签(全选)
|
|
||||||
export function checkAllContractTags(
|
|
||||||
params: CheckProjectParam
|
|
||||||
): Promise<HttpResponse> {
|
|
||||||
return axios.post(`dictionary/checkAllContractTags`, params);
|
|
||||||
}
|
|
||||||
// 数据字典-合同管理-单个合同标签信息
|
|
||||||
export function getContractTags(
|
|
||||||
id: number
|
|
||||||
): Promise<SettingProjectProvinceRes> {
|
|
||||||
return axios.get(`dictionary/getContractTags?id=${id}`);
|
|
||||||
}
|
|
||||||
// 系统配置-流程设置-流程设置列表
|
|
||||||
// 类型:1审批流,2工作流
|
|
||||||
export function getWorkflowsList(type: number): Promise<any> {
|
|
||||||
return axios.get(`workflows/getList?type=${type}`);
|
|
||||||
}
|
|
||||||
// 创建流程
|
|
||||||
export function createWorkflows(params: any): Promise<any> {
|
|
||||||
return axios.post(`workflows/create`, params);
|
|
||||||
}
|
|
||||||
// 保存流程
|
|
||||||
export function saveWorkflows(params: any): Promise<any> {
|
|
||||||
return axios.post(`workflows/save`, params);
|
|
||||||
}
|
|
||||||
// 审批流详情
|
|
||||||
export function getWorkflowsDetail(id: number): Promise<any> {
|
|
||||||
return axios.get(`workflows/getDetail?id=${id}`);
|
|
||||||
}
|
|
||||||
// 审批流启用禁用
|
|
||||||
export function toggleWorkflowsDisable(params: any): Promise<any> {
|
|
||||||
return axios.post('workflows/disable', params);
|
|
||||||
}
|
|
||||||
// 删除审批流
|
|
||||||
export function delWorkflows(id: number): Promise<any> {
|
|
||||||
return axios.get(`workflows/del?id=${id}`);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import { PaginationParams } from '@/types/comm';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
|
// ==================== 租客管理 API (tenants 路由) ====================
|
||||||
|
// 创建租客
|
||||||
|
export function createTenant(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('tenants/createTenant', params);
|
||||||
|
}
|
||||||
|
// 租客列表(分页)
|
||||||
|
export function getTenantList(params: PaginationParams): Promise<HttpResponse> {
|
||||||
|
return axios.post('tenants/getTenantList', params);
|
||||||
|
}
|
||||||
|
// 更新租客信息
|
||||||
|
export function updateTenant(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('tenants/updateTenant', params);
|
||||||
|
}
|
||||||
|
// 删除租客
|
||||||
|
export function delTenant(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`tenants/delTenant?id=${id}`);
|
||||||
|
}
|
||||||
|
// 租客详情
|
||||||
|
export function getTenantDetail(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`tenants/getTenant?id=${id}`);
|
||||||
|
}
|
||||||
|
// 租客归档
|
||||||
|
export function filingTenant(params: any): Promise<HttpResponse> {
|
||||||
|
return axios.post('tenants/filingTenant', params);
|
||||||
|
}
|
||||||
|
// 租客下拉列表(不分页)
|
||||||
|
export function getTenantAllList(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post('tenants/getTenantAllList', params);
|
||||||
|
}
|
||||||
|
// 租客归档列表(分页)
|
||||||
|
export function getTenantFilingList(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<HttpResponse> {
|
||||||
|
return axios.post('tenants/getTenantFilingList', params);
|
||||||
|
}
|
||||||
+37
-3
@@ -1,6 +1,13 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import type { RouteRecordNormalized } from 'vue-router';
|
|
||||||
import { UserPermission } from '@/types/api';
|
import { UserPermission } from '@/types/api';
|
||||||
|
import {
|
||||||
|
AllUserListRes,
|
||||||
|
FormUserItem,
|
||||||
|
UserInfoRes,
|
||||||
|
DisableUserParam,
|
||||||
|
} from '@/types/setting';
|
||||||
|
import { PaginationParams } from '@/types/comm';
|
||||||
|
import { HttpResponse } from './interceptor';
|
||||||
|
|
||||||
export interface LoginData {
|
export interface LoginData {
|
||||||
username: string;
|
username: string;
|
||||||
@@ -61,6 +68,33 @@ export function getUserInfo() {
|
|||||||
return axios.get<UserState>('/auth/profile');
|
return axios.get<UserState>('/auth/profile');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMenuList() {
|
// ==================== 用户管理 API (user 路由) ====================
|
||||||
return axios.post<RouteRecordNormalized[]>('/api/user/menu');
|
export function getAllUserList(
|
||||||
|
params: PaginationParams
|
||||||
|
): Promise<AllUserListRes> {
|
||||||
|
return axios.post('/user/getAllUserList', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getUserList(params: PaginationParams): Promise<AllUserListRes> {
|
||||||
|
return axios.post('/user/getUserList', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createUser(params: FormUserItem): Promise<HttpResponse> {
|
||||||
|
return axios.post('/user/createUser', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateUser(params: FormUserItem): Promise<HttpResponse> {
|
||||||
|
return axios.post('/user/updateUser', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getUserById(id: number): Promise<UserInfoRes> {
|
||||||
|
return axios.get(`/user/getUser?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delUser(id: number): Promise<HttpResponse> {
|
||||||
|
return axios.get(`/user/delUser?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function disableUser(params: DisableUserParam): Promise<HttpResponse> {
|
||||||
|
return axios.post('/user/disableUser', params);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
// ==================== 流程设置 API (workflows 路由) ====================
|
||||||
|
// 系统配置-流程设置-流程设置列表
|
||||||
|
// 类型:1审批流,2工作流
|
||||||
|
export function getWorkflowsList(type: number): Promise<any> {
|
||||||
|
return axios.get(`workflows/getList?type=${type}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建流程
|
||||||
|
export function createWorkflows(params: any): Promise<any> {
|
||||||
|
return axios.post(`workflows/create`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存流程
|
||||||
|
export function saveWorkflows(params: any): Promise<any> {
|
||||||
|
return axios.post(`workflows/save`, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审批流详情
|
||||||
|
export function getWorkflowsDetail(id: number): Promise<any> {
|
||||||
|
return axios.get(`workflows/getDetail?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审批流启用禁用
|
||||||
|
export function toggleWorkflowsDisable(params: any): Promise<any> {
|
||||||
|
return axios.post('workflows/disable', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除审批流
|
||||||
|
export function delWorkflows(id: number): Promise<any> {
|
||||||
|
return axios.get(`workflows/del?id=${id}`);
|
||||||
|
}
|
||||||
@@ -1,20 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- Arco a-upload 只认 #upload-button 插槽作为触发区,需把自定义内容传入该插槽 -->
|
||||||
<a-upload
|
<a-upload
|
||||||
draggable
|
draggable
|
||||||
:accept="accept"
|
:accept="accept"
|
||||||
|
:disabled="disabled"
|
||||||
:custom-request="customRequest"
|
:custom-request="customRequest"
|
||||||
:multiple="maxCount > 1"
|
:multiple="maxCount > 1"
|
||||||
:limit="maxCount"
|
:limit="maxCount"
|
||||||
|
:show-file-list="showFileList"
|
||||||
|
:show-upload-button="showUploadButtonConfig"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
>
|
>
|
||||||
<div style="padding: 20px; text-align: center">
|
<template #upload-button>
|
||||||
<icon-upload style="font-size: 32px; color: #666" />
|
<!-- 插槽 trigger:可传入自定义触发内容(如按钮),不传则使用下方默认拖拽区 -->
|
||||||
<div style="margin-top: 8px">
|
<slot name="trigger">
|
||||||
<p>点击或拖拽文件到此处上传</p>
|
<div style="padding: 20px; text-align: center">
|
||||||
<p v-if="accept">支持的格式:{{ accept }}</p>
|
<icon-upload style="font-size: 32px; color: #666" />
|
||||||
<p>最大支持 {{ maxSizeText }}</p>
|
<div style="margin-top: 8px">
|
||||||
</div>
|
<p>点击或拖拽文件到此处上传</p>
|
||||||
</div>
|
<p v-if="accept">支持的格式:{{ accept }}</p>
|
||||||
|
<p>最大支持 {{ maxSizeText }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</template>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -30,14 +39,24 @@
|
|||||||
objectKey: string;
|
objectKey: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = withDefaults(
|
||||||
objectKeys: string[];
|
defineProps<{
|
||||||
signedPutURL: string[];
|
objectKeys?: string[];
|
||||||
uploadType: UploadType;
|
signedPutURL?: string[];
|
||||||
maxSize?: number; // 单位字节
|
uploadType: UploadType;
|
||||||
maxCount?: number;
|
maxSize?: number; // 单位字节
|
||||||
accept?: string; // 限制类型,例如 "application/pdf" 或 ".doc,.docx,.xls" 或 "application/pdf,.docx"
|
maxCount?: number;
|
||||||
}>();
|
accept?: string; // 限制类型,例如 "application/pdf" 或 ".doc,.docx,.xls" 或 "application/pdf,.docx"
|
||||||
|
showFileList?: boolean;
|
||||||
|
disabled?: boolean;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
objectKeys: () => [],
|
||||||
|
signedPutURL: () => [],
|
||||||
|
showFileList: true,
|
||||||
|
disabled: false,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:objectKeys', value: string[]): void;
|
(e: 'update:objectKeys', value: string[]): void;
|
||||||
@@ -51,6 +70,10 @@
|
|||||||
|
|
||||||
const maxCount = props.maxCount ?? 1;
|
const maxCount = props.maxCount ?? 1;
|
||||||
const accept = props.accept ?? '*/*'; // 默认支持所有文件
|
const accept = props.accept ?? '*/*'; // 默认支持所有文件
|
||||||
|
// 达到 limit 后仍显示上传按钮,方便替换文件(Arco 默认会隐藏)
|
||||||
|
const showUploadButtonConfig = computed(() =>
|
||||||
|
maxCount > 0 ? { showOnExceedLimit: true } : true
|
||||||
|
);
|
||||||
const maxSizeText = computed(() => {
|
const maxSizeText = computed(() => {
|
||||||
const size = props.maxSize || 10 * 1024 * 1024;
|
const size = props.maxSize || 10 * 1024 * 1024;
|
||||||
return `${Math.round(size / 1024 / 1024)}MB`;
|
return `${Math.round(size / 1024 / 1024)}MB`;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { getDepartmentList, getDepartmentDetail } from '@/api/setting';
|
import { getDepartmentList, getDepartmentDetail } from '@/api/department';
|
||||||
import { DepartmentItem } from '@/types/setting';
|
import { DepartmentItem } from '@/types/setting';
|
||||||
|
|
||||||
export default function useDepartmentList(autoFetch = true) {
|
export default function useDepartmentList(autoFetch = true) {
|
||||||
@@ -40,8 +40,8 @@ export default function useDepartmentList(autoFetch = true) {
|
|||||||
);
|
);
|
||||||
departmentListData.value = fetchDepartmentList;
|
departmentListData.value = fetchDepartmentList;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error('获取部门列表失败:', error);
|
// 获取部门列表失败,静默处理
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -52,8 +52,7 @@ export default function useDepartmentList(autoFetch = true) {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error('获取部门详情失败:', error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { Notification } from '@arco-design/web-vue';
|
|
||||||
import type { NotificationReturn } from '@arco-design/web-vue/es/notification/interface';
|
|
||||||
import type { RouteRecordRaw } from 'vue-router';
|
import type { RouteRecordRaw } from 'vue-router';
|
||||||
import defaultSettings from '@/config/settings.json';
|
import defaultSettings from '@/config/settings.json';
|
||||||
import { getMenuList } from '@/api/user';
|
|
||||||
import { AppState } from './types';
|
import { AppState } from './types';
|
||||||
|
|
||||||
const useAppStore = defineStore('app', {
|
const useAppStore = defineStore('app', {
|
||||||
@@ -42,7 +39,7 @@ const useAppStore = defineStore('app', {
|
|||||||
actions: {
|
actions: {
|
||||||
// Update app settings
|
// Update app settings
|
||||||
updateSettings(partial: Partial<AppState>) {
|
updateSettings(partial: Partial<AppState>) {
|
||||||
// @ts-ignore-next-line
|
// @ts-expect-error pinia $patch typing with partial
|
||||||
this.$patch(partial);
|
this.$patch(partial);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -62,30 +59,6 @@ const useAppStore = defineStore('app', {
|
|||||||
toggleMenu(value: boolean) {
|
toggleMenu(value: boolean) {
|
||||||
this.hideMenu = value;
|
this.hideMenu = value;
|
||||||
},
|
},
|
||||||
async fetchServerMenuConfig() {
|
|
||||||
let notifyInstance: NotificationReturn | null = null;
|
|
||||||
try {
|
|
||||||
notifyInstance = Notification.info({
|
|
||||||
id: 'menuNotice', // Keep the instance id the same
|
|
||||||
content: 'loading',
|
|
||||||
closable: true,
|
|
||||||
});
|
|
||||||
const { data } = await getMenuList();
|
|
||||||
this.serverMenu = data;
|
|
||||||
notifyInstance = Notification.success({
|
|
||||||
id: 'menuNotice',
|
|
||||||
content: 'success',
|
|
||||||
closable: true,
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
notifyInstance = Notification.error({
|
|
||||||
id: 'menuNotice',
|
|
||||||
content: 'error',
|
|
||||||
closable: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clearServerMenu() {
|
clearServerMenu() {
|
||||||
this.serverMenu = [];
|
this.serverMenu = [];
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -185,11 +185,11 @@
|
|||||||
getCityListByProvinceId,
|
getCityListByProvinceId,
|
||||||
getDistrictListByCityId,
|
getDistrictListByCityId,
|
||||||
} from '@/api/common';
|
} from '@/api/common';
|
||||||
import { createProject, updateProject } from '@/api/business';
|
import { createProject, updateProject } from '@/api/project';
|
||||||
import { CreateProjectParam } from '@/types/business';
|
import { CreateProjectParam } from '@/types/business';
|
||||||
import { projectTypeInfo } from '@/types/setting';
|
import { projectTypeInfo } from '@/types/setting';
|
||||||
import ImageUpload from '@/components/common/ImageUpload.vue';
|
import ImageUpload from '@/components/common/ImageUpload.vue';
|
||||||
import { getAllProjectTypeList } from '@/api/setting';
|
import { getAllProjectTypeList } from '@/api/dictionary';
|
||||||
import draggable from 'vuedraggable';
|
import draggable from 'vuedraggable';
|
||||||
import { generateRandomId } from '@/utils';
|
import { generateRandomId } from '@/utils';
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch, onMounted, computed } from 'vue';
|
import { ref, watch, onMounted, computed } from 'vue';
|
||||||
import { getAllProjectTypeList } from '@/api/setting';
|
import { getAllProjectTypeList } from '@/api/dictionary';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|||||||
@@ -119,8 +119,8 @@
|
|||||||
import type { TableColumnData } from '@arco-design/web-vue';
|
import type { TableColumnData } from '@arco-design/web-vue';
|
||||||
import useDataTable from '@/composables/useDataTable';
|
import useDataTable from '@/composables/useDataTable';
|
||||||
import { ProjectItem } from '@/types/business';
|
import { ProjectItem } from '@/types/business';
|
||||||
import { getProjectList, getProjectDetail, delProject } from '@/api/business';
|
import { getProjectList, getProjectDetail, delProject } from '@/api/project';
|
||||||
import { getAllProjectTypeList } from '@/api/setting';
|
import { getAllProjectTypeList } from '@/api/dictionary';
|
||||||
import { ProjectPaginationParams } from '@/types/comm';
|
import { ProjectPaginationParams } from '@/types/comm';
|
||||||
import projectFormDrawer from './drawer/project-form-drawer.vue';
|
import projectFormDrawer from './drawer/project-form-drawer.vue';
|
||||||
import projectInfoDrawer from './drawer/project-info-drawer.vue';
|
import projectInfoDrawer from './drawer/project-info-drawer.vue';
|
||||||
|
|||||||
@@ -179,8 +179,8 @@
|
|||||||
getAllBuildingIdNameList,
|
getAllBuildingIdNameList,
|
||||||
getAllFloorIdNameList,
|
getAllFloorIdNameList,
|
||||||
} from '@/api/common';
|
} from '@/api/common';
|
||||||
import { getRoomTagList } from '@/api/setting';
|
import { getRoomTagList } from '@/api/dictionary';
|
||||||
import { createRoom, updateRoom } from '@/api/business';
|
import { createRoom, updateRoom } from '@/api/room';
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
isEdit: boolean;
|
isEdit: boolean;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<p>
|
<p>
|
||||||
{{
|
{{
|
||||||
`${detailInfo?.name} -
|
`${detailInfo?.name} -
|
||||||
${detailInfo?.projectName}${detailInfo?.buildingName}${detailInfo?.floorName}`
|
${detailInfo?.projectName}${detailInfo?.buildingName}${detailInfo?.floorName}`
|
||||||
}}
|
}}
|
||||||
</p>
|
</p>
|
||||||
<div class="mt-[10px]">
|
<div class="mt-[10px]">
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<icon-edit />
|
<icon-edit />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('edit') }}
|
{{ $t('edit') }}
|
||||||
</a-button> -->
|
</a-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-[20px]">
|
<div class="mt-[20px]">
|
||||||
<a-tabs v-model:active-key="currentTab" class="">
|
<a-tabs v-model:active-key="currentTab">
|
||||||
<a-tab-pane key="1">
|
<a-tab-pane key="1">
|
||||||
<template #title> <icon-calendar /> 基本信息 </template>
|
<template #title> <icon-calendar /> 基本信息 </template>
|
||||||
<a-alert type="warning">房源空置 xx 天</a-alert>
|
<a-alert type="warning">房源空置 xx 天</a-alert>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch, computed, onMounted, nextTick } from 'vue';
|
import { ref, watch, computed, onMounted, nextTick } from 'vue';
|
||||||
import { HOUSE_STATUS } from '@/constants';
|
import { HOUSE_STATUS } from '@/constants';
|
||||||
import { getRoomTagList } from '@/api/setting';
|
import { getRoomTagList } from '@/api/dictionary';
|
||||||
|
|
||||||
// 特殊值用于表示"所有"选项(使用负数避免与真实ID冲突)
|
// 特殊值用于表示"所有"选项(使用负数避免与真实ID冲突)
|
||||||
const ALL_BUILDING_ID = -1;
|
const ALL_BUILDING_ID = -1;
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import type { TableColumnData } from '@arco-design/web-vue';
|
import type { TableColumnData } from '@arco-design/web-vue';
|
||||||
import useDataTable from '@/composables/useDataTable';
|
import useDataTable from '@/composables/useDataTable';
|
||||||
import { getRoomsGraphList, getRoom, delRoom } from '@/api/business';
|
import { getRoomsGraphList, getRoom, delRoom } from '@/api/room';
|
||||||
import { ProjectPaginationParams } from '@/types/comm';
|
import { ProjectPaginationParams } from '@/types/comm';
|
||||||
import houseFormDrawer from '../drawer/house-form-drawer.vue';
|
import houseFormDrawer from '../drawer/house-form-drawer.vue';
|
||||||
import houseInfoDrawer from '../drawer/house-info-drawer.vue';
|
import houseInfoDrawer from '../drawer/house-info-drawer.vue';
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import type { TableColumnData } from '@arco-design/web-vue';
|
import type { TableColumnData } from '@arco-design/web-vue';
|
||||||
import useDataTable from '@/composables/useDataTable';
|
import useDataTable from '@/composables/useDataTable';
|
||||||
import { getRoomList, getRoom, delRoom } from '@/api/business';
|
import { getRoomList, getRoom, delRoom } from '@/api/room';
|
||||||
import { ProjectPaginationParams } from '@/types/comm';
|
import { ProjectPaginationParams } from '@/types/comm';
|
||||||
import houseFormDrawer from '../drawer/house-form-drawer.vue';
|
import houseFormDrawer from '../drawer/house-form-drawer.vue';
|
||||||
import houseInfoDrawer from '../drawer/house-info-drawer.vue';
|
import houseInfoDrawer from '../drawer/house-info-drawer.vue';
|
||||||
|
|||||||
@@ -189,7 +189,7 @@
|
|||||||
import HouseViewFilterDrawer from './house-view-filter-drawer.vue';
|
import HouseViewFilterDrawer from './house-view-filter-drawer.vue';
|
||||||
import HouseInfoDrawer from '@/views/business/space/drawer/house-info-drawer.vue';
|
import HouseInfoDrawer from '@/views/business/space/drawer/house-info-drawer.vue';
|
||||||
import HouseFormDrawer from '@/views/business/space/drawer/house-form-drawer.vue';
|
import HouseFormDrawer from '@/views/business/space/drawer/house-form-drawer.vue';
|
||||||
import { getRoom } from '@/api/business';
|
import { getRoom } from '@/api/room';
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch, computed, onMounted, nextTick } from 'vue';
|
import { ref, watch, computed, onMounted, nextTick } from 'vue';
|
||||||
import { HOUSE_STATUS } from '@/constants';
|
import { HOUSE_STATUS } from '@/constants';
|
||||||
import { getRoomTagList } from '@/api/setting';
|
import { getRoomTagList } from '@/api/dictionary';
|
||||||
|
|
||||||
// 特殊值用于表示"所有"选项(使用负数避免与真实ID冲突)
|
// 特殊值用于表示"所有"选项(使用负数避免与真实ID冲突)
|
||||||
const ALL_BUILDING_ID = -1;
|
const ALL_BUILDING_ID = -1;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
getTopBuildingTagsByProjectId,
|
getTopBuildingTagsByProjectId,
|
||||||
getStatisticsData,
|
getStatisticsData,
|
||||||
getRoomOverList,
|
getRoomOverList,
|
||||||
} from '@/api/business';
|
} from '@/api/room';
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import type { BuildingTag } from '@/types/business';
|
import type { BuildingTag } from '@/types/business';
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
INVOICE_TYPES,
|
INVOICE_TYPES,
|
||||||
VALIDATION_RULES,
|
VALIDATION_RULES,
|
||||||
} from '@/constants';
|
} from '@/constants';
|
||||||
import { createTenant, updateTenant } from '@/api/business';
|
import { createTenant, updateTenant } from '@/api/tenants';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
>
|
>
|
||||||
<template #filingType="{ record }">
|
<template #filingType="{ record }">
|
||||||
<a-tag :color="getFilingTypeColor(record?.filingType)">
|
<a-tag :color="getFilingTypeColor(record?.filingType)">
|
||||||
{{ record?.filingTypeName || '-' }}
|
{{ record?.filingName || '-' }}
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #creditScore="{ record }">
|
<template #creditScore="{ record }">
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import type { TableColumnData } from '@arco-design/web-vue';
|
import type { TableColumnData } from '@arco-design/web-vue';
|
||||||
import useDataTable from '@/composables/useDataTable';
|
import useDataTable from '@/composables/useDataTable';
|
||||||
import { getTenantFilingList, getTenantDetail } from '@/api/business';
|
import { getTenantFilingList, getTenantDetail } from '@/api/tenants';
|
||||||
import { ProjectPaginationParams } from '@/types/comm';
|
import { ProjectPaginationParams } from '@/types/comm';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { TENANT_FILING_TYPE_MAP } from '@/constants';
|
import { TENANT_FILING_TYPE_MAP } from '@/constants';
|
||||||
@@ -166,8 +166,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '归档原因',
|
title: '归档原因',
|
||||||
dataIndex: 'filingTypeName',
|
dataIndex: 'filingName',
|
||||||
key: 'filingTypeName',
|
key: 'filingName',
|
||||||
slotName: 'filingType',
|
slotName: 'filingType',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
key: 'creditScore',
|
key: 'creditScore',
|
||||||
slotName: 'creditScore',
|
slotName: 'creditScore',
|
||||||
},
|
},
|
||||||
{ title: '操作', key: 'operate', slotName: 'operate', width: 200 },
|
{ title: '操作', key: 'operate', slotName: 'operate', width: 120 },
|
||||||
];
|
];
|
||||||
|
|
||||||
const queryParams = ref<ProjectPaginationParams>({
|
const queryParams = ref<ProjectPaginationParams>({
|
||||||
|
|||||||
@@ -132,9 +132,12 @@
|
|||||||
@ok="handleFilingConfirm"
|
@ok="handleFilingConfirm"
|
||||||
@cancel="handleFilingCancel"
|
@cancel="handleFilingCancel"
|
||||||
>
|
>
|
||||||
<a-form layout="vertical">
|
<a-form :model="filingForm" layout="vertical">
|
||||||
<a-form-item label="请选择归档原因" required>
|
<a-form-item label="请选择归档原因" field="filingType" required>
|
||||||
<a-select v-model="filingType" placeholder="请选择归档原因">
|
<a-select
|
||||||
|
v-model="filingForm.filingType"
|
||||||
|
placeholder="请选择归档原因"
|
||||||
|
>
|
||||||
<a-option
|
<a-option
|
||||||
v-for="item in TENANT_FILING_TYPES"
|
v-for="item in TENANT_FILING_TYPES"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -160,7 +163,7 @@
|
|||||||
getTenantDetail,
|
getTenantDetail,
|
||||||
delTenant,
|
delTenant,
|
||||||
filingTenant,
|
filingTenant,
|
||||||
} from '@/api/business';
|
} from '@/api/tenants';
|
||||||
import { ProjectPaginationParams } from '@/types/comm';
|
import { ProjectPaginationParams } from '@/types/comm';
|
||||||
import { Message, Modal } from '@arco-design/web-vue';
|
import { Message, Modal } from '@arco-design/web-vue';
|
||||||
import { TENANT_FILING_TYPES } from '@/constants';
|
import { TENANT_FILING_TYPES } from '@/constants';
|
||||||
@@ -174,7 +177,7 @@
|
|||||||
const showListFilterDrawer = ref<boolean>(false);
|
const showListFilterDrawer = ref<boolean>(false);
|
||||||
const showFilingModal = ref<boolean>(false);
|
const showFilingModal = ref<boolean>(false);
|
||||||
const currentTenantId = ref<number | null>(null);
|
const currentTenantId = ref<number | null>(null);
|
||||||
const filingType = ref<number | undefined>(undefined);
|
const filingForm = ref<{ filingType?: number }>({ filingType: undefined });
|
||||||
// 保存的筛选状态
|
// 保存的筛选状态
|
||||||
const savedFilterState = ref<{
|
const savedFilterState = ref<{
|
||||||
tenantType: number | null;
|
tenantType: number | null;
|
||||||
@@ -432,13 +435,13 @@
|
|||||||
// 归档租客
|
// 归档租客
|
||||||
const handleFilingTenant = (id: number) => {
|
const handleFilingTenant = (id: number) => {
|
||||||
currentTenantId.value = id;
|
currentTenantId.value = id;
|
||||||
filingType.value = undefined;
|
filingForm.value.filingType = undefined;
|
||||||
showFilingModal.value = true;
|
showFilingModal.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 确认归档
|
// 确认归档
|
||||||
const handleFilingConfirm = async () => {
|
const handleFilingConfirm = async () => {
|
||||||
if (!filingType.value) {
|
if (!filingForm.value.filingType) {
|
||||||
Message.warning('请选择归档原因');
|
Message.warning('请选择归档原因');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -450,13 +453,13 @@
|
|||||||
try {
|
try {
|
||||||
const { code, message } = await filingTenant({
|
const { code, message } = await filingTenant({
|
||||||
id: currentTenantId.value,
|
id: currentTenantId.value,
|
||||||
filingType: filingType.value,
|
filingType: filingForm.value.filingType,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
Message.success(message || '归档成功');
|
Message.success(message || '归档成功');
|
||||||
showFilingModal.value = false;
|
showFilingModal.value = false;
|
||||||
filingType.value = undefined;
|
filingForm.value.filingType = undefined;
|
||||||
currentTenantId.value = null;
|
currentTenantId.value = null;
|
||||||
// 重新加载列表数据
|
// 重新加载列表数据
|
||||||
await getTenantListData();
|
await getTenantListData();
|
||||||
@@ -471,7 +474,7 @@
|
|||||||
// 取消归档
|
// 取消归档
|
||||||
const handleFilingCancel = () => {
|
const handleFilingCancel = () => {
|
||||||
showFilingModal.value = false;
|
showFilingModal.value = false;
|
||||||
filingType.value = undefined;
|
filingForm.value.filingType = undefined;
|
||||||
currentTenantId.value = null;
|
currentTenantId.value = null;
|
||||||
};
|
};
|
||||||
const getTagsColor = (status) => {
|
const getTagsColor = (status) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Breadcrumb
|
<Breadcrumb
|
||||||
:items="['menu.setting', 'menu.setting.system', 'setting.contract']"
|
:items="['menu.setting', 'menu.setting.system', 'setting.contract']"
|
||||||
/>
|
/>
|
||||||
<a-card class="full_height">
|
<a-card>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col
|
<a-col
|
||||||
v-if="contractFileInfo && Object.keys(contractFileInfo).length"
|
v-if="contractFileInfo && Object.keys(contractFileInfo).length"
|
||||||
@@ -13,18 +13,84 @@
|
|||||||
<div
|
<div
|
||||||
class="mt-[24px] rounded-[6px] border-solid border-[#efefef] border-[1px] px-[12px] py-[20px]"
|
class="mt-[24px] rounded-[6px] border-solid border-[#efefef] border-[1px] px-[12px] py-[20px]"
|
||||||
>
|
>
|
||||||
<h4 class="text-[16px] font-bold">{{ contractFileInfo?.name }}</h4>
|
<div class="flex items-center">
|
||||||
|
<p class="text-[16px] font-bold mr-[10px]">{{
|
||||||
|
contractFileInfo?.name
|
||||||
|
}}</p>
|
||||||
|
<p class="cursor-pointer px-[5px]" @click="openEditModal"
|
||||||
|
><icon-edit
|
||||||
|
/></p>
|
||||||
|
</div>
|
||||||
<p class="text-[14px] mt-[12px]"
|
<p class="text-[14px] mt-[12px]"
|
||||||
><span class="mr-[5px] text-[#101010]">适用范围</span
|
><span class="mr-[5px] text-[#101010]">适用范围</span
|
||||||
>立思广州分公司</p
|
>{{ departmentName }}</p
|
||||||
>
|
>
|
||||||
<p class="text-[14px] mt-[4px]"
|
<p class="text-[14px] mt-[4px]"
|
||||||
><span class="mr-[5px] text-[#101010]">适用项目</span
|
><span class="mr-[5px] text-[#101010]">适用项目</span
|
||||||
>星河商务中心</p
|
>{{ projectNames }}</p
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="editModalVisible"
|
||||||
|
title="编辑合同文档模板信息"
|
||||||
|
unmount-on-close
|
||||||
|
@ok="confirmEditModal"
|
||||||
|
@cancel="editModalVisible = false"
|
||||||
|
>
|
||||||
|
<a-form
|
||||||
|
ref="editFormRef"
|
||||||
|
:model="editForm"
|
||||||
|
:rules="editFormRules"
|
||||||
|
layout="vertical"
|
||||||
|
auto-label-width
|
||||||
|
>
|
||||||
|
<a-form-item label="模板名称" field="name" required>
|
||||||
|
<a-input
|
||||||
|
v-model="editForm.name"
|
||||||
|
placeholder="请输入合同模板名称"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="适用范围" field="departmentId" required>
|
||||||
|
<a-tree-select
|
||||||
|
v-model="editForm.departmentId"
|
||||||
|
:data="departmentListData"
|
||||||
|
:field-names="{
|
||||||
|
key: 'id',
|
||||||
|
title: 'name',
|
||||||
|
children: 'children',
|
||||||
|
}"
|
||||||
|
placeholder="请选择适用范围"
|
||||||
|
allow-clear
|
||||||
|
@change="onEditDepartmentChange"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="适用项目" field="projects" required>
|
||||||
|
<a-select
|
||||||
|
v-model="editForm.projects"
|
||||||
|
multiple
|
||||||
|
:disabled="!editForm.departmentId"
|
||||||
|
placeholder="请选择适用项目"
|
||||||
|
>
|
||||||
|
<a-option
|
||||||
|
v-for="item in editDeptProjectList"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</a-modal>
|
||||||
<div class="flex items-center mt-[24px]">
|
<div class="flex items-center mt-[24px]">
|
||||||
<a-input-search class="w-[256px] h-[30px]" placeholder="搜索名称" />
|
<a-input-search
|
||||||
|
v-model="contractPlaceholderListParams.keyword"
|
||||||
|
class="w-[256px] h-[30px]"
|
||||||
|
placeholder="搜索名称"
|
||||||
|
allow-clear
|
||||||
|
@search="handlePlaceholderSearch"
|
||||||
|
@press-enter="handlePlaceholderSearch"
|
||||||
|
/>
|
||||||
<div
|
<div
|
||||||
class="flex items-center border-[1px] border-solid border-[#165DFF] px-[4px] py-[6px] ml-[10px]"
|
class="flex items-center border-[1px] border-solid border-[#165DFF] px-[4px] py-[6px] ml-[10px]"
|
||||||
>
|
>
|
||||||
@@ -32,20 +98,51 @@
|
|||||||
<p class="ml-[5px] text-[#165DFF]">AI助手</p>
|
<p class="ml-[5px] text-[#165DFF]">AI助手</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-tabs default-active-key="1" class="mt-[10px]">
|
<a-tabs
|
||||||
<a-tab-pane key="1" title="租赁条款"> 租赁条款 </a-tab-pane>
|
v-model:active-key="contractPlaceholderListParams.type"
|
||||||
<a-tab-pane key="2" title="物业条款"> w物业条款 </a-tab-pane>
|
class="mt-[10px]"
|
||||||
|
>
|
||||||
|
<a-tab-pane
|
||||||
|
v-for="tab in placeholderTabs"
|
||||||
|
:key="tab.key"
|
||||||
|
class="cursor-pointer"
|
||||||
|
:title="tab.title"
|
||||||
|
>
|
||||||
|
<a-descriptions bordered :column="1">
|
||||||
|
<a-descriptions-item
|
||||||
|
v-for="item in contractPlaceholderList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
>
|
||||||
|
{{ item.keyword }}
|
||||||
|
</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="17">
|
<a-col :span="17">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<a-button>
|
<FileUpload
|
||||||
<template #icon>
|
v-model:object-keys="uploadObjectKeys"
|
||||||
<icon-upload />
|
v-model:signed-put-u-r-l="uploadSignedPutURL"
|
||||||
|
:max-count="1"
|
||||||
|
:upload-type="1"
|
||||||
|
accept=".doc,.docx"
|
||||||
|
:show-file-list="false"
|
||||||
|
:disabled="!contractFileInfo?.id"
|
||||||
|
@upload-success="onUploadSuccess"
|
||||||
|
@upload-error="onUploadError"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<a-button :disabled="!contractFileInfo?.id">
|
||||||
|
<template #icon>
|
||||||
|
<icon-upload />
|
||||||
|
</template>
|
||||||
|
上传文档
|
||||||
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
上传文档
|
</FileUpload>
|
||||||
</a-button>
|
|
||||||
<a-button class="ml-[10px]">
|
<a-button class="ml-[10px]">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon-cloud-download />
|
<icon-cloud-download />
|
||||||
@@ -54,8 +151,8 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<p>2025-09-10 00:25:30更新</p>
|
<p>{{ contractFileInfo?.updatedAt }}更新</p>
|
||||||
<a-button type="primary" class="ml-[10px]">
|
<a-button type="primary" class="ml-[10px]" @click="handleSave">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon-storage />
|
<icon-storage />
|
||||||
</template>
|
</template>
|
||||||
@@ -65,14 +162,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- OnlyOffice 文档编辑器 -->
|
<!-- OnlyOffice 文档编辑器 -->
|
||||||
<div class="onlyoffice-wrapper">
|
<div class="onlyoffice-wrapper">
|
||||||
<!-- <OnlyOfficeEditor v-if="contractFileInfo?.url" :document-url="contractFileInfo.url"
|
<OnlyOfficeEditor
|
||||||
:document-title="contractFileInfo.name || '合同文档'"
|
v-if="contractFileInfo?.url"
|
||||||
:document-type="getDocumentType(contractFileInfo.url)" :height="'600px'" :editable="true"
|
:document-url="contractFileInfo.url"
|
||||||
:mode="'edit'" @ready="onEditorReady" @error="onEditorError" @save="onDocumentSave"
|
:document-title="contractFileInfo?.name || '合同文档'"
|
||||||
@close="onEditorClose" />
|
:document-type="getDocumentType(contractFileInfo.url)"
|
||||||
<div v-else class="no-document">
|
height="600px"
|
||||||
<a-empty description="暂无文档内容" />
|
:editable="true"
|
||||||
</div> -->
|
mode="edit"
|
||||||
|
@ready="onEditorReady"
|
||||||
|
@error="onEditorError"
|
||||||
|
@save="onDocumentSave"
|
||||||
|
@close="onEditorClose"
|
||||||
|
/>
|
||||||
|
<div v-else class="no-document">
|
||||||
|
<a-empty
|
||||||
|
:description="
|
||||||
|
contractFileInfo
|
||||||
|
? '暂无文档内容,请上传文档'
|
||||||
|
: '请先选择左侧合同模板'
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -80,13 +191,136 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref, reactive, computed, watch } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { getWordSettingFromId } from '@/api/setting';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { CreateFileSettingParam } from '@/types/setting';
|
import {
|
||||||
|
getWordSettingFromId,
|
||||||
|
getContractPlaceholderList,
|
||||||
|
updateWordSetting,
|
||||||
|
} from '@/api/contracts';
|
||||||
|
import { getDepartmentList } from '@/api/department';
|
||||||
|
import { getDeptProjectListFromDeptId } from '@/api/common';
|
||||||
|
import { CreateFileSettingParam, DepartmentItem } from '@/types/setting';
|
||||||
|
import FileUpload from '@/components/common/FileUpload.vue';
|
||||||
|
|
||||||
const contractFileInfo = ref<CreateFileSettingParam | null>(null);
|
const contractFileInfo = ref<CreateFileSettingParam | null>(null);
|
||||||
|
const contractPlaceholderListParams = ref({ keyword: '', type: 1 });
|
||||||
|
|
||||||
|
const placeholderTabs = [
|
||||||
|
{ key: 1, title: '租赁条款' },
|
||||||
|
{ key: 2, title: '物业条款' },
|
||||||
|
];
|
||||||
|
const contractPlaceholderList = ref<any[]>([]);
|
||||||
|
const placeholderListLoading = ref(false);
|
||||||
|
// 占位符列表按 tab type 缓存:1 租赁条款,2 物业条款
|
||||||
|
const placeholderListCache = ref<Record<number, any[]>>({});
|
||||||
|
const uploadObjectKeys = ref<string[]>([]);
|
||||||
|
const uploadSignedPutURL = ref<string[]>([]);
|
||||||
|
|
||||||
|
// 编辑弹窗:仅改本地,不请求接口
|
||||||
|
const editModalVisible = ref(false);
|
||||||
|
const editFormRef = ref<FormInstance>();
|
||||||
|
const departmentListData = ref<DepartmentItem[]>([]);
|
||||||
|
const editDeptProjectList = ref<{ id: number; name: string }[]>([]);
|
||||||
|
const editForm = reactive<{
|
||||||
|
name: string;
|
||||||
|
departmentId: number | null;
|
||||||
|
projects: number[];
|
||||||
|
}>({
|
||||||
|
name: '',
|
||||||
|
departmentId: null,
|
||||||
|
projects: [],
|
||||||
|
});
|
||||||
|
const editFormRules = {
|
||||||
|
name: [{ required: true, message: '请输入合同模板名称' }],
|
||||||
|
departmentId: [{ required: true, message: '请选择适用范围' }],
|
||||||
|
projects: [
|
||||||
|
{ required: true, message: '请选择适用项目', type: 'array', min: 1 },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const departmentName = computed(() => {
|
||||||
|
if (!contractFileInfo.value?.departmentId) return '-';
|
||||||
|
const find = (list: DepartmentItem[], id: number): string | undefined => {
|
||||||
|
for (const item of list) {
|
||||||
|
if (item.id === id) return item.name;
|
||||||
|
if (item.children?.length) {
|
||||||
|
const n = find(item.children, id);
|
||||||
|
if (n) return n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
find(departmentListData.value, contractFileInfo.value.departmentId) ?? '-'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 适用项目展示:有则用顿号拼接名称,无则显示 -
|
||||||
|
const projectNames = computed(() => {
|
||||||
|
const list = contractFileInfo.value?.projects;
|
||||||
|
if (!list || !Array.isArray(list) || list.length === 0) return '-';
|
||||||
|
const names = list
|
||||||
|
.map((i: any) => (i?.name != null ? String(i.name).trim() : ''))
|
||||||
|
.filter(Boolean);
|
||||||
|
return names.length > 0 ? names.join('、') : '-';
|
||||||
|
});
|
||||||
|
|
||||||
|
const openEditModal = () => {
|
||||||
|
if (!contractFileInfo.value) return;
|
||||||
|
editForm.name = contractFileInfo.value.name ?? '';
|
||||||
|
editForm.departmentId = contractFileInfo.value.departmentId ?? null;
|
||||||
|
editForm.projects = (contractFileInfo.value.projects || []).map((p: any) =>
|
||||||
|
typeof p === 'object' && p?.id != null ? p.id : p
|
||||||
|
);
|
||||||
|
editModalVisible.value = true;
|
||||||
|
if (editForm.departmentId) {
|
||||||
|
getDeptProjectListFromDeptId(editForm.departmentId).then(
|
||||||
|
({ code, data }) => {
|
||||||
|
if (code === 200)
|
||||||
|
editDeptProjectList.value = data?.deptProjectList ?? [];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
editDeptProjectList.value = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const onEditDepartmentChange = (id: number | undefined) => {
|
||||||
|
editForm.projects = [];
|
||||||
|
if (!id) {
|
||||||
|
editDeptProjectList.value = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getDeptProjectListFromDeptId(id).then(({ code, data }) => {
|
||||||
|
if (code === 200) editDeptProjectList.value = data?.deptProjectList ?? [];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const confirmEditModal = async () => {
|
||||||
|
try {
|
||||||
|
await editFormRef.value?.validate();
|
||||||
|
} catch {
|
||||||
|
return false; // 校验失败时不关闭弹窗
|
||||||
|
}
|
||||||
|
if (!contractFileInfo.value) return false;
|
||||||
|
contractFileInfo.value.name = editForm.name.trim();
|
||||||
|
contractFileInfo.value.departmentId = editForm.departmentId;
|
||||||
|
contractFileInfo.value.projects = editForm.projects.map((id) => ({
|
||||||
|
id,
|
||||||
|
name: editDeptProjectList.value.find((p) => p.id === id)?.name ?? '',
|
||||||
|
})) as any;
|
||||||
|
editModalVisible.value = false;
|
||||||
|
Message.success('请点击保存按钮提交更新');
|
||||||
|
};
|
||||||
|
|
||||||
|
const getDepartmentListData = async () => {
|
||||||
|
const { code, data } = await getDepartmentList();
|
||||||
|
if (code === 200) departmentListData.value = data?.departmentList ?? [];
|
||||||
|
};
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
// 获取文档数据
|
// 获取文档数据
|
||||||
@@ -96,16 +330,17 @@
|
|||||||
if (code === 200 && data) {
|
if (code === 200 && data) {
|
||||||
const { contractWordSetting } = data;
|
const { contractWordSetting } = data;
|
||||||
contractFileInfo.value = contractWordSetting || null;
|
contractFileInfo.value = contractWordSetting || null;
|
||||||
contractFileInfo.value.url =
|
// contractFileInfo.value.url =
|
||||||
'http://oss.kola.work/documents%2F20250910%2F%E5%90%88%E5%90%8C%E6%A8%A1%E7%89%88.docx?Expires=1757479342&OSSAccessKeyId=LTAI5tDDNxXnZq7QcpZEf6hR&Signature=ydBzbF2yCyRWZ0G52s%2FPr%2BFIUzo%3D';
|
// 'http://oss.kola.work/documents%2F20250910%2F%E5%90%88%E5%90%8C%E6%A8%A1%E7%89%88.docx?Expires=1757479342&OSSAccessKeyId=LTAI5tDDNxXnZq7QcpZEf6hR&Signature=ydBzbF2yCyRWZ0G52s%2FPr%2BFIUzo%3D';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 根据文件 URL 获取文档类型
|
// 根据文件 URL 获取文档类型(兼容带 ? 的签名链接)
|
||||||
const getDocumentType = (url: string): 'word' | 'excel' | 'powerpoint' => {
|
const getDocumentType = (url: string): 'word' | 'excel' | 'powerpoint' => {
|
||||||
if (!url) return 'word';
|
if (!url) return 'word';
|
||||||
|
|
||||||
const extension = url.toLowerCase().split('.').pop();
|
const pathWithoutQuery = url.split('?')[0];
|
||||||
|
const extension = pathWithoutQuery.toLowerCase().split('.').pop() || '';
|
||||||
switch (extension) {
|
switch (extension) {
|
||||||
case 'xlsx':
|
case 'xlsx':
|
||||||
case 'xls':
|
case 'xls':
|
||||||
@@ -142,8 +377,92 @@
|
|||||||
Message.info('编辑器已关闭');
|
Message.info('编辑器已关闭');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 上传成功:仅更新本地 url,不请求接口(统一由保存按钮提交)
|
||||||
|
const onUploadSuccess = (payload: {
|
||||||
|
objectKey: string;
|
||||||
|
signedPutURL: string;
|
||||||
|
}) => {
|
||||||
|
if (!contractFileInfo.value?.id) return;
|
||||||
|
contractFileInfo.value.url = payload.signedPutURL;
|
||||||
|
Message.success('文档已上传,请点击保存按钮提交到服务器');
|
||||||
|
};
|
||||||
|
|
||||||
|
const onUploadError = () => {
|
||||||
|
Message.error('上传失败,请重试');
|
||||||
|
};
|
||||||
|
|
||||||
|
// 占位符搜索:按当前关键词重新拉取列表
|
||||||
|
const handlePlaceholderSearch = () => {
|
||||||
|
getContractPlaceholderListData();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取合同占位符列表(type: 1 租赁,2 物业),请求成功后写入缓存
|
||||||
|
const getContractPlaceholderListData = async () => {
|
||||||
|
const { type, keyword } = contractPlaceholderListParams.value;
|
||||||
|
placeholderListLoading.value = true;
|
||||||
|
try {
|
||||||
|
const { code, data } = await getContractPlaceholderList({
|
||||||
|
type,
|
||||||
|
keyword,
|
||||||
|
});
|
||||||
|
const list = code === 200 ? data?.placeholderList ?? [] : [];
|
||||||
|
contractPlaceholderList.value = list;
|
||||||
|
placeholderListCache.value[type] = [...list];
|
||||||
|
} catch (e) {
|
||||||
|
Message.error('获取占位符列表失败');
|
||||||
|
contractPlaceholderList.value = [];
|
||||||
|
} finally {
|
||||||
|
placeholderListLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 切换 tab:有缓存则用缓存,无则请求并写入缓存(immediate 负责首屏请求)
|
||||||
|
watch(
|
||||||
|
() => contractPlaceholderListParams.value.type,
|
||||||
|
(newType) => {
|
||||||
|
const cached = placeholderListCache.value[newType];
|
||||||
|
if (cached !== undefined) {
|
||||||
|
contractPlaceholderList.value = cached;
|
||||||
|
} else {
|
||||||
|
getContractPlaceholderListData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
|
|
||||||
|
// 保存按钮:统一调用更新接口
|
||||||
|
const handleSave = async () => {
|
||||||
|
if (!contractFileInfo.value?.id) {
|
||||||
|
Message.warning('请先选择合同模板');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const departmentId = contractFileInfo.value.departmentId ?? 0;
|
||||||
|
const projects = (contractFileInfo.value.projects || []).map((p: any) =>
|
||||||
|
typeof p === 'object' && p?.id != null ? p.id : p
|
||||||
|
);
|
||||||
|
const url = contractFileInfo.value.url ?? '';
|
||||||
|
const params = {
|
||||||
|
id: contractFileInfo.value.id,
|
||||||
|
name: contractFileInfo.value.name,
|
||||||
|
departmentId,
|
||||||
|
projects,
|
||||||
|
url,
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
const { code, message } = await updateWordSetting(params);
|
||||||
|
if (code === 200) {
|
||||||
|
Message.success(message || '保存成功');
|
||||||
|
} else {
|
||||||
|
Message.error(message || '保存失败');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
Message.error('保存失败');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getWordSettingFromIdData();
|
getWordSettingFromIdData();
|
||||||
|
getDepartmentListData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -152,7 +471,6 @@
|
|||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
border: 1px solid #e5e6eb;
|
border: 1px solid #e5e6eb;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
overflow: hidden;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,28 +480,7 @@
|
|||||||
background: #f7f8fa;
|
background: #f7f8fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.system-setting-contract-file {
|
/* .system-setting-contract-file {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
overflow: hidden;
|
} */
|
||||||
}
|
|
||||||
|
|
||||||
.full_height {
|
|
||||||
height: calc(100vh - 120px);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.arco-card-body) {
|
|
||||||
height: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.arco-row) {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.arco-col) {
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -64,8 +64,8 @@
|
|||||||
delWordSetting,
|
delWordSetting,
|
||||||
getWordSettingList,
|
getWordSettingList,
|
||||||
disableWordSetting,
|
disableWordSetting,
|
||||||
getDepartmentList,
|
} from '@/api/contracts';
|
||||||
} from '@/api/setting';
|
import { getDepartmentList } from '@/api/department';
|
||||||
import { ContractWordItem, DepartmentItem } from '@/types/setting';
|
import { ContractWordItem, DepartmentItem } from '@/types/setting';
|
||||||
import { UserStatus } from '@/types/comm';
|
import { UserStatus } from '@/types/comm';
|
||||||
import { camelToSnake } from '@/utils/caseConvert';
|
import { camelToSnake } from '@/utils/caseConvert';
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
getCodeSettingFromId,
|
getCodeSettingFromId,
|
||||||
disableCodeSetting,
|
disableCodeSetting,
|
||||||
delCodeSetting,
|
delCodeSetting,
|
||||||
} from '@/api/setting';
|
} from '@/api/contracts';
|
||||||
import { ContractTermInfo } from '@/types/setting';
|
import { ContractTermInfo } from '@/types/setting';
|
||||||
import { UserStatus } from '@/types/comm';
|
import { UserStatus } from '@/types/comm';
|
||||||
import { camelToSnake } from '@/utils/caseConvert';
|
import { camelToSnake } from '@/utils/caseConvert';
|
||||||
|
|||||||
@@ -256,13 +256,13 @@
|
|||||||
import {
|
import {
|
||||||
getTemplateSettingFromId,
|
getTemplateSettingFromId,
|
||||||
getTermsSettingFromId,
|
getTermsSettingFromId,
|
||||||
getDepartmentList,
|
|
||||||
getAllCodeSettingList,
|
getAllCodeSettingList,
|
||||||
getContractTagsList,
|
getContractTagsList,
|
||||||
updateTemplateSetting,
|
updateTemplateSetting,
|
||||||
getAllTermsSettingList,
|
getAllTermsSettingList,
|
||||||
getTermsDataFromId,
|
getTermsDataFromId,
|
||||||
} from '@/api/setting';
|
} from '@/api/contracts';
|
||||||
|
import { getDepartmentList } from '@/api/department';
|
||||||
import contractTemplateForm from './modal/contract-template-form.vue';
|
import contractTemplateForm from './modal/contract-template-form.vue';
|
||||||
import { DepartmentItem } from '@/types/setting';
|
import { DepartmentItem } from '@/types/setting';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
|
|||||||
@@ -63,9 +63,9 @@
|
|||||||
import {
|
import {
|
||||||
delTemplateSetting,
|
delTemplateSetting,
|
||||||
getTemplateSettingList,
|
getTemplateSettingList,
|
||||||
getDepartmentList,
|
|
||||||
disableTemplateSetting,
|
disableTemplateSetting,
|
||||||
} from '@/api/setting';
|
} from '@/api/contracts';
|
||||||
|
import { getDepartmentList } from '@/api/department';
|
||||||
import { ContractTemplateSettingItem, DepartmentItem } from '@/types/setting';
|
import { ContractTemplateSettingItem, DepartmentItem } from '@/types/setting';
|
||||||
import { UserStatus } from '@/types/comm';
|
import { UserStatus } from '@/types/comm';
|
||||||
import contractTemplateForm from './modal/contract-template-form.vue';
|
import contractTemplateForm from './modal/contract-template-form.vue';
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
getTermsSettingFromId,
|
getTermsSettingFromId,
|
||||||
disableTermsSetting,
|
disableTermsSetting,
|
||||||
delTermsSetting,
|
delTermsSetting,
|
||||||
} from '@/api/setting';
|
} from '@/api/contracts';
|
||||||
import { TermSettingItem } from '@/types/setting';
|
import { TermSettingItem } from '@/types/setting';
|
||||||
import { UserStatus } from '@/types/comm';
|
import { UserStatus } from '@/types/comm';
|
||||||
import contractNumberFormDrawer from './drawer/contract-terms-form-drawer.vue';
|
import contractNumberFormDrawer from './drawer/contract-terms-form-drawer.vue';
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
import { ref, watch, reactive, computed } from 'vue';
|
import { ref, watch, reactive, computed } from 'vue';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { createCodeSetting, updateCodeSetting } from '@/api/setting';
|
import { createCodeSetting, updateCodeSetting } from '@/api/contracts';
|
||||||
// import { CreateCodeSettingParam } from '@/types/setting'
|
// import { CreateCodeSettingParam } from '@/types/setting'
|
||||||
import draggable from 'vuedraggable';
|
import draggable from 'vuedraggable';
|
||||||
|
|
||||||
|
|||||||
@@ -102,11 +102,8 @@
|
|||||||
import { ref, watch, reactive, onMounted } from 'vue';
|
import { ref, watch, reactive, onMounted } from 'vue';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import {
|
import { createTermsSetting, updateTermsSetting } from '@/api/contracts';
|
||||||
createTermsSetting,
|
import { getUseFeeList } from '@/api/finance-setting';
|
||||||
updateTermsSetting,
|
|
||||||
getUseFeeList,
|
|
||||||
} from '@/api/setting';
|
|
||||||
import { feeTypeList, financeFeeFeriodicityList } from '@/utils/constant';
|
import { feeTypeList, financeFeeFeriodicityList } from '@/utils/constant';
|
||||||
import { CreateTermSettingParam, FeeManagement } from '@/types/setting';
|
import { CreateTermSettingParam, FeeManagement } from '@/types/setting';
|
||||||
import { FeeManagementType } from '@/types/comm';
|
import { FeeManagementType } from '@/types/comm';
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { createWordSetting, updateWordSetting } from '@/api/setting';
|
import { createWordSetting, updateWordSetting } from '@/api/contracts';
|
||||||
import { DepartmentItem } from '@/types/setting';
|
import { DepartmentItem } from '@/types/setting';
|
||||||
import { getDeptProjectListFromDeptId } from '@/api/common';
|
import { getDeptProjectListFromDeptId } from '@/api/common';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
|||||||
@@ -34,7 +34,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { createTemplateSetting, updateTemplateSetting } from '@/api/setting';
|
import {
|
||||||
|
createTemplateSetting,
|
||||||
|
updateTemplateSetting,
|
||||||
|
} from '@/api/contracts';
|
||||||
import { DepartmentItem, CreateTemplateSettingParam } from '@/types/setting';
|
import { DepartmentItem, CreateTemplateSettingParam } from '@/types/setting';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import rentSettingDrawer from '../drawer/rent-setting-drawer.vue';
|
import rentSettingDrawer from '../drawer/rent-setting-drawer.vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { getUseTurnoverAccountList } from '@/api/setting';
|
import { getUseTurnoverAccountList } from '@/api/finance-setting';
|
||||||
const isShowDrawer = ref<boolean>(false);
|
const isShowDrawer = ref<boolean>(false);
|
||||||
// 与抽屉保持一致的默认表单,用于初始回显与编辑回填
|
// 与抽屉保持一致的默认表单,用于初始回显与编辑回填
|
||||||
const defaultForm: any = {
|
const defaultForm: any = {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
createContractTags,
|
createContractTags,
|
||||||
updateContractTags,
|
updateContractTags,
|
||||||
delContractTags,
|
delContractTags,
|
||||||
} from '@/api/setting';
|
} from '@/api/dictionary';
|
||||||
import { ProjectTypeChecked } from '@/types/comm';
|
import { ProjectTypeChecked } from '@/types/comm';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
createProjectType,
|
createProjectType,
|
||||||
updateProjectType,
|
updateProjectType,
|
||||||
delProjectType,
|
delProjectType,
|
||||||
} from '@/api/setting';
|
} from '@/api/dictionary';
|
||||||
import { projectTypeInfo, ProvinceItem } from '@/types/setting';
|
import { projectTypeInfo, ProvinceItem } from '@/types/setting';
|
||||||
import { ProjectTypeChecked } from '@/types/comm';
|
import { ProjectTypeChecked } from '@/types/comm';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
createRoomTag,
|
createRoomTag,
|
||||||
updateRoomTag,
|
updateRoomTag,
|
||||||
delRoomTag,
|
delRoomTag,
|
||||||
} from '@/api/setting';
|
} from '@/api/dictionary';
|
||||||
import { projectTypeInfo } from '@/types/setting';
|
import { projectTypeInfo } from '@/types/setting';
|
||||||
import { ProjectTypeChecked } from '@/types/comm';
|
import { ProjectTypeChecked } from '@/types/comm';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
|
|||||||
@@ -202,7 +202,7 @@
|
|||||||
createTenantDictionary,
|
createTenantDictionary,
|
||||||
updateTenantDictionary,
|
updateTenantDictionary,
|
||||||
delTenantDictionary,
|
delTenantDictionary,
|
||||||
} from '@/api/setting';
|
} from '@/api/dictionary';
|
||||||
import { ProjectTypeChecked, TenantDictionaryType } from '@/types/comm';
|
import { ProjectTypeChecked, TenantDictionaryType } from '@/types/comm';
|
||||||
import { projectTypeInfo } from '@/types/setting';
|
import { projectTypeInfo } from '@/types/setting';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
import { ref, watch, reactive } from 'vue';
|
import { ref, watch, reactive } from 'vue';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { createFee, updateFee } from '@/api/setting';
|
import { createFee, updateFee } from '@/api/finance-setting';
|
||||||
import { CreateFeeParams } from '@/types/setting';
|
import { CreateFeeParams } from '@/types/setting';
|
||||||
import { feeTypeList } from '@/utils/constant';
|
import { feeTypeList } from '@/utils/constant';
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
import useDataTable from '@/composables/useDataTable';
|
import useDataTable from '@/composables/useDataTable';
|
||||||
import type { TableColumnData } from '@arco-design/web-vue';
|
import type { TableColumnData } from '@arco-design/web-vue';
|
||||||
import { getFeeList, disableFee, delFee } from '@/api/setting';
|
import { getFeeList, disableFee, delFee } from '@/api/finance-setting';
|
||||||
import { FeeManagement } from '@/types/setting';
|
import { FeeManagement } from '@/types/setting';
|
||||||
import { FeeType, UserStatus } from '@/types/comm';
|
import { FeeType, UserStatus } from '@/types/comm';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { getFeeFromId } from '@/api/setting';
|
import { getFeeFromId } from '@/api/finance-setting';
|
||||||
import feeManagementTable from './fee-management-table.vue';
|
import feeManagementTable from './fee-management-table.vue';
|
||||||
import feeManagementDrawer from './drawer/fee-management-drawer.vue';
|
import feeManagementDrawer from './drawer/fee-management-drawer.vue';
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { createDepartment, updateDepartment } from '@/api/setting';
|
import { createDepartment, updateDepartment } from '@/api/department';
|
||||||
import { DepartmentItem, UserList } from '@/types/setting';
|
import { DepartmentItem, UserList } from '@/types/setting';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
// Props & Emits
|
// Props & Emits
|
||||||
|
|||||||
@@ -129,15 +129,15 @@
|
|||||||
import { ref, watch, onMounted } from 'vue';
|
import { ref, watch, onMounted } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import useDepartmentList from '@/composables/useDepartmentList';
|
import useDepartmentList from '@/composables/useDepartmentList';
|
||||||
|
import { getAllUserList } from '@/api/user';
|
||||||
import {
|
import {
|
||||||
getAllUserList,
|
|
||||||
departmentSetUp,
|
departmentSetUp,
|
||||||
departmentSetDown,
|
departmentSetDown,
|
||||||
delDepartment,
|
delDepartment,
|
||||||
saveDataPermission,
|
saveDataPermission,
|
||||||
} from '@/api/setting';
|
} from '@/api/department';
|
||||||
import { DepartmentItem, UserList } from '@/types/setting';
|
import { DepartmentItem, UserList } from '@/types/setting';
|
||||||
import { getAllProjectList } from '@/api/business';
|
import { getAllProjectList } from '@/api/project';
|
||||||
import { debounce } from '@/utils';
|
import { debounce } from '@/utils';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import departmentFormModal from './components/department-form-modal.vue';
|
import departmentFormModal from './components/department-form-modal.vue';
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
import { ref, watch, reactive } from 'vue';
|
import { ref, watch, reactive } from 'vue';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { createWorkflows } from '@/api/setting';
|
import { createWorkflows } from '@/api/workflows';
|
||||||
import { getAllProjectIdNameList, getWorkflowsTypeList } from '@/api/common';
|
import { getAllProjectIdNameList, getWorkflowsTypeList } from '@/api/common';
|
||||||
const allProjetList = ref<any>([]);
|
const allProjetList = ref<any>([]);
|
||||||
const isLoading = ref<boolean>(false);
|
const isLoading = ref<boolean>(false);
|
||||||
|
|||||||
@@ -215,7 +215,7 @@
|
|||||||
saveWorkflows,
|
saveWorkflows,
|
||||||
toggleWorkflowsDisable,
|
toggleWorkflowsDisable,
|
||||||
delWorkflows,
|
delWorkflows,
|
||||||
} from '@/api/setting';
|
} from '@/api/workflows';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import addApproval from './components/add-approval.vue';
|
import addApproval from './components/add-approval.vue';
|
||||||
import StartNode from './components/custom-nodes/StartNode.vue';
|
import StartNode from './components/custom-nodes/StartNode.vue';
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { updateUserRole } from '@/api/setting';
|
import { updateUserRole } from '@/api/role';
|
||||||
import { UpdateUserRoleParam, RoleItem } from '@/types/setting';
|
import { UpdateUserRoleParam, RoleItem } from '@/types/setting';
|
||||||
|
|
||||||
const isLoading = ref<boolean>(false);
|
const isLoading = ref<boolean>(false);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import { getRolePermission } from '@/api/setting';
|
import { getRolePermission } from '@/api/role';
|
||||||
import PermissionNode from './permission-node.vue';
|
import PermissionNode from './permission-node.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { updateRole, createRole } from '@/api/setting';
|
import { updateRole, createRole } from '@/api/role';
|
||||||
import { RoleFormParam, RoleItem } from '@/types/setting';
|
import { RoleFormParam, RoleItem } from '@/types/setting';
|
||||||
|
|
||||||
const isLoading = ref<boolean>(false);
|
const isLoading = ref<boolean>(false);
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
import { ref, watch, reactive } from 'vue';
|
import { ref, watch, reactive } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import type { FormInstance } from '@arco-design/web-vue';
|
import type { FormInstance } from '@arco-design/web-vue';
|
||||||
import { createUser, updateUser } from '@/api/setting';
|
import { createUser, updateUser } from '@/api/user';
|
||||||
import { DepartmentItem, RoleItem, FormUserItem } from '@/types/setting';
|
import { DepartmentItem, RoleItem, FormUserItem } from '@/types/setting';
|
||||||
|
|
||||||
const isLoading = ref<boolean>(false);
|
const isLoading = ref<boolean>(false);
|
||||||
|
|||||||
@@ -119,13 +119,8 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import type { TableColumnData } from '@arco-design/web-vue';
|
import type { TableColumnData } from '@arco-design/web-vue';
|
||||||
import {
|
import { getUserList, getUserById, disableUser, delUser } from '@/api/user';
|
||||||
getUserList,
|
import { getRoleList } from '@/api/role';
|
||||||
getRoleList,
|
|
||||||
getUserInfo,
|
|
||||||
disableUser,
|
|
||||||
delUser,
|
|
||||||
} from '@/api/setting';
|
|
||||||
import { UserList, RoleItem, FormUserItem } from '@/types/setting';
|
import { UserList, RoleItem, FormUserItem } from '@/types/setting';
|
||||||
import { UserStatus } from '@/types/comm';
|
import { UserStatus } from '@/types/comm';
|
||||||
import useDepartmentList from '@/composables/useDepartmentList';
|
import useDepartmentList from '@/composables/useDepartmentList';
|
||||||
@@ -310,7 +305,7 @@
|
|||||||
};
|
};
|
||||||
const getUserInfoData = async (id: number) => {
|
const getUserInfoData = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
const { code, data } = await getUserInfo(id);
|
const { code, data } = await getUserById(id);
|
||||||
if (code === 200) userInfo.value = data?.user;
|
if (code === 200) userInfo.value = data?.user;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 处理错误
|
// 处理错误
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
saveRolePermission,
|
saveRolePermission,
|
||||||
getPermissionList,
|
getPermissionList,
|
||||||
getUserListFromRole,
|
getUserListFromRole,
|
||||||
} from '@/api/setting';
|
} from '@/api/role';
|
||||||
import { UserList, RoleItem } from '@/types/setting';
|
import { UserList, RoleItem } from '@/types/setting';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
|||||||
Reference in New Issue
Block a user