修改分页请求参数和响应
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MachineryForm, MachineryQuery, MachineryVO, PageMachinery } from '@/api/machinery/machinery/types';
|
||||
import { MachineryForm, MachineryQuery, MachineryVO } from '@/api/machinery/machinery/types';
|
||||
|
||||
/**
|
||||
* 查询机械列表
|
||||
@ -8,7 +8,7 @@ import { MachineryForm, MachineryQuery, MachineryVO, PageMachinery } from '@/api
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMachinery = (query?: MachineryQuery): AxiosPromise<PageMachinery> => {
|
||||
export const listMachinery = (query?: MachineryQuery): AxiosPromise<MachineryVO[]> => {
|
||||
return request({
|
||||
url: '/machinery/machinery/list',
|
||||
method: 'get',
|
||||
|
@ -72,7 +72,7 @@ export interface MachineryForm extends BaseEntity {
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface MachineryQuery extends PageRequest {
|
||||
export interface MachineryQuery extends PageQuery {
|
||||
/**
|
||||
* 机械名称
|
||||
*/
|
||||
@ -108,7 +108,3 @@ export interface MachineryQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageMachinery extends PageResponse {
|
||||
records?: MachineryVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MachineryDetailForm, MachineryDetailQuery, MachineryDetailVO, PageMachineryDetail } from '@/api/machinery/machineryDetail/types';
|
||||
import { MachineryDetailForm, MachineryDetailQuery, MachineryDetailVO } from '@/api/machinery/machineryDetail/types';
|
||||
|
||||
/**
|
||||
* 查询机械详情列表
|
||||
@ -8,7 +8,7 @@ import { MachineryDetailForm, MachineryDetailQuery, MachineryDetailVO, PageMachi
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMachineryDetail = (query?: MachineryDetailQuery): AxiosPromise<PageMachineryDetail> => {
|
||||
export const listMachineryDetail = (query?: MachineryDetailQuery): AxiosPromise<MachineryDetailVO[]> => {
|
||||
return request({
|
||||
url: '/machinery/machineryDetail/list',
|
||||
method: 'get',
|
||||
|
@ -109,7 +109,7 @@ export interface MachineryDetailForm extends BaseEntity {
|
||||
machineryId?: string | number;
|
||||
}
|
||||
|
||||
export interface MachineryDetailQuery extends PageRequest {
|
||||
export interface MachineryDetailQuery extends PageQuery {
|
||||
/**
|
||||
* 检验证编号
|
||||
*/
|
||||
@ -155,7 +155,3 @@ export interface MachineryDetailQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageMachineryDetail extends PageResponse {
|
||||
records?: MachineryDetailVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CompanyForm, CompanyQuery, CompanyVO, PageCompany } from '@/api/materials/company/types';
|
||||
import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/types';
|
||||
|
||||
/**
|
||||
* 查询公司列表
|
||||
@ -8,7 +8,7 @@ import { CompanyForm, CompanyQuery, CompanyVO, PageCompany } from '@/api/materia
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listCompany = (query?: CompanyQuery): AxiosPromise<PageCompany> => {
|
||||
export const listCompany = (query?: CompanyQuery): AxiosPromise<CompanyVO[]> => {
|
||||
return request({
|
||||
url: '/materials/company/list',
|
||||
method: 'get',
|
||||
|
@ -62,7 +62,7 @@ export interface CompanyForm extends BaseEntity {
|
||||
qualification?: string;
|
||||
}
|
||||
|
||||
export interface CompanyQuery extends PageRequest {
|
||||
export interface CompanyQuery extends PageQuery {
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@ -88,7 +88,3 @@ export interface CompanyQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageCompany extends PageResponse {
|
||||
records?: CompanyVO[];
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MaterialsForm, MaterialsQuery, MaterialsVO, PageMaterials } from '@/api/materials/materials/types';
|
||||
import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/materials/types';
|
||||
|
||||
/**
|
||||
* 查询材料名称列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const listMaterials = (query?: MaterialsQuery): AxiosPromise<PageMaterials> => {
|
||||
export const listMaterials = (query?: MaterialsQuery): AxiosPromise<MaterialsVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materials/list',
|
||||
method: 'get',
|
||||
|
@ -119,7 +119,7 @@ export interface MaterialsForm extends BaseEntity {
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface MaterialsQuery extends PageRequest {
|
||||
export interface MaterialsQuery extends PageQuery {
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
@ -170,7 +170,3 @@ export interface MaterialsQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageMaterials extends PageResponse {
|
||||
records?: MaterialsVO[];
|
||||
}
|
||||
|
@ -1,11 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import {
|
||||
MaterialsInventoryForm,
|
||||
MaterialsInventoryQuery,
|
||||
MaterialsInventoryVO,
|
||||
PageMaterialsInventory
|
||||
} from '@/api/materials/materialsInventory/types';
|
||||
import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types';
|
||||
|
||||
/**
|
||||
* 查询材料出/入库列表
|
||||
@ -13,7 +8,7 @@ import {
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise<PageMaterialsInventory> => {
|
||||
export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise<MaterialsInventoryVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory/list',
|
||||
method: 'get',
|
||||
|
@ -139,7 +139,7 @@ export interface MaterialsInventoryForm extends BaseEntity {
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface MaterialsInventoryQuery extends PageRequest {
|
||||
export interface MaterialsInventoryQuery extends PageQuery {
|
||||
/**
|
||||
* 材料id
|
||||
*/
|
||||
@ -205,7 +205,3 @@ export interface MaterialsInventoryQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageMaterialsInventory extends PageResponse {
|
||||
records?: MaterialsInventoryVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ConstructionUserVO, ConstructionUserForm, ConstructionUserQuery, PageConstructionUser } from '@/api/project/constructionUser/types';
|
||||
import { ConstructionUserForm, ConstructionUserQuery, ConstructionUserVO } from '@/api/project/constructionUser/types';
|
||||
|
||||
/**
|
||||
* 查询施工人员列表
|
||||
@ -8,7 +8,7 @@ import { ConstructionUserVO, ConstructionUserForm, ConstructionUserQuery, PageCo
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listConstructionUser = (query?: ConstructionUserQuery): AxiosPromise<PageConstructionUser> => {
|
||||
export const listConstructionUser = (query?: ConstructionUserQuery): AxiosPromise<ConstructionUserVO[]> => {
|
||||
return request({
|
||||
url: '/project/constructionUser/list',
|
||||
method: 'get',
|
||||
|
@ -340,7 +340,7 @@ export interface ConstructionUserForm extends BaseEntity {
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ConstructionUserQuery extends PageRequest {
|
||||
export interface ConstructionUserQuery extends PageQuery {
|
||||
/**
|
||||
* 微信id
|
||||
*/
|
||||
@ -476,7 +476,3 @@ export interface ConstructionUserQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageConstructionUser extends PageResponse {
|
||||
records?: ConstructionUserVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ContractorForm, ContractorQuery, ContractorVO, PageContractor } from '@/api/project/contractor/types';
|
||||
import { ContractorForm, ContractorQuery, ContractorVO } from '@/api/project/contractor/types';
|
||||
|
||||
/**
|
||||
* 查询分包单位列表
|
||||
@ -8,7 +8,7 @@ import { ContractorForm, ContractorQuery, ContractorVO, PageContractor } from '@
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listContractor = (query?: ContractorQuery): AxiosPromise<PageContractor> => {
|
||||
export const listContractor = (query?: ContractorQuery): AxiosPromise<ContractorVO[]> => {
|
||||
return request({
|
||||
url: '/project/contractor/list',
|
||||
method: 'get',
|
||||
|
@ -82,7 +82,7 @@ export interface ContractorForm extends BaseEntity {
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ContractorQuery extends PageRequest {
|
||||
export interface ContractorQuery extends PageQuery {
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@ -113,7 +113,3 @@ export interface ContractorQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageContractor extends PageResponse {
|
||||
records?: ContractorVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageProjectVo, ProjectForm, ProjectQuery, ProjectVO } from '@/api/project/project/types';
|
||||
import { ProjectForm, ProjectQuery, ProjectVO } from '@/api/project/project/types';
|
||||
|
||||
/**
|
||||
* 查询项目列表
|
||||
@ -8,7 +8,7 @@ import { PageProjectVo, ProjectForm, ProjectQuery, ProjectVO } from '@/api/proje
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProject = (query?: ProjectQuery): AxiosPromise<PageProjectVo> => {
|
||||
export const listProject = (query?: ProjectQuery): AxiosPromise<ProjectVO[]> => {
|
||||
return request({
|
||||
url: '/project/project/list',
|
||||
method: 'get',
|
||||
|
@ -222,7 +222,7 @@ export interface ProjectForm extends BaseEntity {
|
||||
isDelete?: number;
|
||||
}
|
||||
|
||||
export interface ProjectQuery extends PageRequest {
|
||||
export interface ProjectQuery extends PageQuery {
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ -328,7 +328,3 @@ export interface ProjectQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageProjectVo extends PageResponse {
|
||||
records?: ProjectVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageProjectRelevancy, ProjectRelevancyForm, ProjectRelevancyQuery, ProjectRelevancyVO } from '@/api/project/projectRelevancy/types';
|
||||
import { ProjectRelevancyForm, ProjectRelevancyQuery, ProjectRelevancyVO } from '@/api/project/projectRelevancy/types';
|
||||
|
||||
/**
|
||||
* 查询系统用户与项目关联列表
|
||||
@ -8,7 +8,7 @@ import { PageProjectRelevancy, ProjectRelevancyForm, ProjectRelevancyQuery, Proj
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectRelevancy = (query?: ProjectRelevancyQuery): AxiosPromise<PageProjectRelevancy> => {
|
||||
export const listProjectRelevancy = (query?: ProjectRelevancyQuery): AxiosPromise<ProjectRelevancyVO[]> => {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/login/page',
|
||||
method: 'get',
|
||||
|
@ -44,7 +44,7 @@ export interface ProjectRelevancyForm extends BaseEntity {
|
||||
deletedAt?: string;
|
||||
}
|
||||
|
||||
export interface ProjectRelevancyQuery extends PageRequest {
|
||||
export interface ProjectRelevancyQuery extends PageQuery {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ -65,7 +65,3 @@ export interface ProjectRelevancyQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageProjectRelevancy extends PageResponse {
|
||||
records?: ProjectRelevancyVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageProjectTeam, ProjectTeamForm, ProjectTeamQuery, ProjectTeamVO } from '@/api/project/projectTeam/types';
|
||||
import { ProjectTeamForm, ProjectTeamQuery, ProjectTeamVO } from '@/api/project/projectTeam/types';
|
||||
|
||||
/**
|
||||
* 查询项目班组列表
|
||||
@ -8,7 +8,7 @@ import { PageProjectTeam, ProjectTeamForm, ProjectTeamQuery, ProjectTeamVO } fro
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise<PageProjectTeam> => {
|
||||
export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise<ProjectTeamVO[]> => {
|
||||
return request({
|
||||
url: '/project/projectTeam/list',
|
||||
method: 'get',
|
||||
|
@ -52,7 +52,7 @@ export interface ProjectTeamForm extends BaseEntity {
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ProjectTeamQuery extends PageRequest {
|
||||
export interface ProjectTeamQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@ -73,7 +73,3 @@ export interface ProjectTeamQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageProjectTeam extends PageResponse {
|
||||
records?: ProjectTeamVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageProjectTeamMember, ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } from '@/api/project/projectTeamMember/types';
|
||||
import { ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } from '@/api/project/projectTeamMember/types';
|
||||
|
||||
/**
|
||||
* 查询项目班组下的成员列表
|
||||
@ -8,7 +8,7 @@ import { PageProjectTeamMember, ProjectTeamMemberForm, ProjectTeamMemberQuery, P
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise<PageProjectTeamMember> => {
|
||||
export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise<ProjectTeamMemberVO[]> => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember/list',
|
||||
method: 'get',
|
||||
|
@ -62,7 +62,7 @@ export interface ProjectTeamMemberForm extends BaseEntity {
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ProjectTeamMemberQuery extends PageRequest {
|
||||
export interface ProjectTeamMemberQuery extends PageQuery {
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
@ -93,7 +93,3 @@ export interface ProjectTeamMemberQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageProjectTeamMember extends PageResponse {
|
||||
records?: ProjectTeamMemberVO[];
|
||||
}
|
||||
|
16
src/types/global.d.ts
vendored
16
src/types/global.d.ts
vendored
@ -89,20 +89,8 @@ declare global {
|
||||
declare interface PageQuery {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
}
|
||||
|
||||
declare interface PageRequest {
|
||||
current: number;
|
||||
pageSize: number;
|
||||
sortField: string;
|
||||
sortOrder: string;
|
||||
}
|
||||
|
||||
declare interface PageResponse {
|
||||
total?: number;
|
||||
size?: number;
|
||||
current?: number;
|
||||
pages?: number;
|
||||
orderByColumn?: string;
|
||||
isAsc?: string;
|
||||
}
|
||||
|
||||
declare interface LayoutSetting {
|
||||
|
@ -35,7 +35,7 @@
|
||||
size="small"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.current"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
@ -120,10 +120,8 @@ const initFormData: MachineryDetailForm = {
|
||||
const data = reactive<PageData<MachineryDetailForm, MachineryDetailQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
checkoutNumber: undefined,
|
||||
checkoutUnit: undefined,
|
||||
checkoutDate: undefined,
|
||||
@ -148,8 +146,8 @@ const machineryDetailList = ref<MachineryDetailVO[]>([]);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMachineryDetail(queryParams.value);
|
||||
machineryDetailList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
machineryDetailList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改机械对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@ -143,10 +143,8 @@ const initFormData: MachineryForm = {
|
||||
const data = reactive<PageData<MachineryForm, MachineryQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
machineryName: undefined,
|
||||
machineryNumber: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
@ -165,8 +163,8 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMachinery(queryParams.value);
|
||||
machineryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
machineryList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -184,7 +182,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改公司对话框 -->
|
||||
|
||||
@ -133,10 +133,8 @@ const initFormData: CompanyForm = {
|
||||
const data = reactive<PageData<CompanyForm, CompanyQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
companyName: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
status: undefined,
|
||||
@ -154,8 +152,8 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listCompany(queryParams.value);
|
||||
companyList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
companyList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -173,7 +171,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
size="small"
|
||||
v-model:page="materialsSearchParams.current"
|
||||
v-model:page="materialsSearchParams.pageNum"
|
||||
v-model:limit="materialsSearchParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
@ -54,10 +54,8 @@ const loading = ref(true);
|
||||
const materialsSearchParams = reactive<MaterialsInventoryQuery>({
|
||||
materialsId: props.materialsId,
|
||||
projectId: props.projectId,
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend'
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
});
|
||||
const total = ref<number>(0);
|
||||
|
||||
@ -66,8 +64,8 @@ const materialsInventoryList = ref<MaterialsInventoryVO[]>([]);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMaterialsInventory({ ...materialsSearchParams });
|
||||
materialsInventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
materialsInventoryList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改材料名称对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@ -181,10 +181,8 @@ const initFormData: MaterialsForm = {
|
||||
const data = reactive<PageData<MaterialsForm, MaterialsQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
materialsName: undefined,
|
||||
companyId: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
@ -208,8 +206,8 @@ const companyOptions = ref([]);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMaterials(queryParams.value);
|
||||
materialsList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
materialsList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -217,13 +215,11 @@ const getList = async () => {
|
||||
const getCompanyList = async () => {
|
||||
loading.value = true;
|
||||
const companyRes = await listCompany({
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
projectId: currentProject.value.id
|
||||
});
|
||||
companyOptions.value = companyRes.data.records.map((company: CompanyVO) => ({
|
||||
companyOptions.value = companyRes.rows.map((company: CompanyVO) => ({
|
||||
value: company.id,
|
||||
label: company.companyName
|
||||
}));
|
||||
@ -244,7 +240,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
|
@ -92,14 +92,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改材料出/入库对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="materialsInventoryFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="材料名称" prop="materialsVo.materialsName">
|
||||
<el-input v-model="form.materialsVo.materialsName" placeholder="请输入材料名称" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="出入库状态" prop="outPut">
|
||||
<el-select v-model="form.outPut" clearable placeholder="请输入出入库状态">
|
||||
<el-option v-for="item in out_put_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
@ -197,10 +194,8 @@ const initFormData: MaterialsInventoryForm = {
|
||||
const data = reactive<PageData<MaterialsInventoryForm, MaterialsInventoryQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
materialsId: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
outPut: undefined,
|
||||
@ -227,10 +222,10 @@ const materialsOptions = ref([]);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listMaterialsInventory(queryParams.value);
|
||||
materialsInventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
materialsInventoryList.value = res.rows;
|
||||
total.value = res.total;
|
||||
const materialsMap = new Map();
|
||||
res.data.records.forEach((record: MaterialsInventoryVO) => {
|
||||
res.rows.forEach((record: MaterialsInventoryVO) => {
|
||||
const { id, materialsName } = record.materialsVo;
|
||||
if (!materialsMap.has(id)) {
|
||||
materialsMap.set(id, { id, materialsName });
|
||||
@ -254,7 +249,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
@ -271,13 +266,6 @@ const handleSelectionChange = (selection: MaterialsInventoryVO[]) => {
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加材料出/入库';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: MaterialsInventoryVO) => {
|
||||
reset();
|
||||
|
@ -111,7 +111,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改施工人员对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@ -276,10 +276,8 @@ const initFormData: ConstructionUserForm = {
|
||||
const data = reactive<PageData<ConstructionUserForm, ConstructionUserQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
openid: undefined,
|
||||
nickName: undefined,
|
||||
userName: undefined,
|
||||
@ -319,8 +317,8 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listConstructionUser(queryParams.value);
|
||||
constructionUserList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
constructionUserList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -330,12 +328,10 @@ const contractorOpt = ref();
|
||||
const getContractorList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listContractor({
|
||||
current: 1,
|
||||
pageSize: 20,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend'
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
});
|
||||
contractorOpt.value = res.data.records.map((contractor: ContractorVO) => ({
|
||||
contractorOpt.value = res.rows.map((contractor: ContractorVO) => ({
|
||||
value: contractor.id,
|
||||
label: contractor.name
|
||||
}));
|
||||
@ -348,13 +344,13 @@ const projectTeamOpt = ref([]);
|
||||
const getProjectTeamList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listProjectTeam({
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
orderByColumn: 'createTime',
|
||||
isAsc: 'desc',
|
||||
projectId: currentProject.value.id
|
||||
});
|
||||
projectTeamOpt.value = res.data.records.map((projectTeam: ProjectTeamVO) => ({
|
||||
projectTeamOpt.value = res.rows.map((projectTeam: ProjectTeamVO) => ({
|
||||
value: projectTeam.id,
|
||||
label: projectTeam.teamName
|
||||
}));
|
||||
@ -380,7 +376,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改分包单位对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@ -135,10 +135,10 @@ const initFormData: ContractorForm = {
|
||||
const data = reactive<PageData<ContractorForm, ContractorQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
orderByColumn: 'createTime',
|
||||
isAsc: 'desc',
|
||||
name: undefined,
|
||||
principal: undefined,
|
||||
principalPhone: undefined,
|
||||
@ -157,8 +157,8 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listContractor(queryParams.value);
|
||||
contractorList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
contractorList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -176,7 +176,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改项目对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@ -180,10 +180,8 @@ const initFormData: ProjectForm = {
|
||||
const data = reactive<PageData<ProjectForm, ProjectQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
projectName: undefined,
|
||||
shortName: undefined,
|
||||
pId: undefined,
|
||||
@ -220,8 +218,8 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listProject(queryParams.value);
|
||||
projectList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
projectList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
/** 取消按钮 */
|
||||
@ -237,7 +235,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
|
@ -22,13 +22,13 @@ const props = defineProps<{ userId: number | string }>();
|
||||
const allProjects = ref<{ key: number | string; label: string }[]>([]);
|
||||
|
||||
// **已关联的项目 ID 列表**
|
||||
const selectedProjects = ref<number[]>([]);
|
||||
const selectedProjects = ref<(number | string)[]>([]);
|
||||
|
||||
// **获取所有项目列表**
|
||||
const getProjectList = async () => {
|
||||
try {
|
||||
const res = await listProject();
|
||||
allProjects.value = res.data.records.map((project) => ({
|
||||
allProjects.value = res.rows.map((project) => ({
|
||||
key: project.id,
|
||||
label: project.projectName
|
||||
}));
|
||||
@ -36,15 +36,11 @@ const getProjectList = async () => {
|
||||
console.error('获取项目列表失败:', error);
|
||||
}
|
||||
};
|
||||
const getUserProjects = async () => {
|
||||
const getUserProjects = async (s: string = '') => {
|
||||
if (!props.userId) return;
|
||||
try {
|
||||
const res = await listUserProjects({ userId: props.userId });
|
||||
|
||||
// 修改这里,使用 res.records 而不是 res.rows
|
||||
selectedProjects.value = Array.isArray(res.data.records) ? res.data.records.map((item: ProjectRelevancyVO) => item.projectId) : [];
|
||||
|
||||
console.log('已加载用户关联项目:', selectedProjects.value);
|
||||
selectedProjects.value = Array.isArray(res.rows) ? res.rows.map((item: ProjectRelevancyVO) => item.projectId) : [];s
|
||||
} catch (error) {
|
||||
console.error('获取用户关联的项目失败:', error);
|
||||
selectedProjects.value = []; // 请求失败时清空列表
|
||||
|
@ -10,9 +10,6 @@
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入项目ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="删除时间" prop="deletedAt">-->
|
||||
<!-- <el-date-picker clearable v-model="queryParams.deletedAt" type="date" value-format="YYYY-MM-DD" placeholder="请选择删除时间" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@ -55,11 +52,6 @@
|
||||
<el-table-column prop="project.principal" label="负责人" width="120" />
|
||||
<el-table-column prop="project.principalPhone" label="联系电话" width="150" />
|
||||
<el-table-column prop="project.onStreamTime" label="上线时间" width="150" />
|
||||
<!-- <el-table-column label="删除时间" align="center" prop="deletedAt" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.deletedAt, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
@ -82,7 +74,7 @@
|
||||
<shuttle-frame :userId="selectedUserId" @close="shuttleVisible = false" />
|
||||
</el-dialog>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<!-- 添加或修改系统用户与项目关联对话框 -->
|
||||
@ -100,11 +92,6 @@
|
||||
<el-option v-for="project in projectList" :key="project.id" :label="project.projectName" :value="project.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="删除时间" prop="deletedAt">
|
||||
<el-date-picker clearable v-model="form.deletedAt" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择删除时间">
|
||||
</el-date-picker>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div v-if="selectedProject" style="padding: 0px 100px">
|
||||
<p><strong>项目名称:</strong> {{ selectedProject.projectName }}</p>
|
||||
@ -130,6 +117,7 @@ import { listUser } from '@/api/system/user';
|
||||
import { ProjectRelevancyForm, ProjectRelevancyQuery, ProjectRelevancyVO } from '@/api/project/projectRelevancy/types';
|
||||
import ShuttleFrame from './component/ShuttleFrame.vue';
|
||||
import { UserVO } from '@/api/system/user/types';
|
||||
import { ProjectVO } from '@/api/project/project/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
@ -159,10 +147,10 @@ const initFormData: ProjectRelevancyForm = {
|
||||
const data = reactive<PageData<ProjectRelevancyForm, ProjectRelevancyQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
orderByColumn: 'createTime',
|
||||
isAsc: 'desc',
|
||||
userId: undefined,
|
||||
projectId: undefined,
|
||||
deletedAt: undefined,
|
||||
@ -181,8 +169,8 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listProjectRelevancy(queryParams.value);
|
||||
projectRelevancyList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
projectRelevancyList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -200,7 +188,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
@ -280,11 +268,11 @@ const selectedProject = ref<any | null>(null);
|
||||
const getProjectList = async () => {
|
||||
try {
|
||||
const res = await listProject();
|
||||
const projectListData = res.data.records;
|
||||
const projectListData = res.rows;
|
||||
projectList.value = projectListData;
|
||||
|
||||
// 将项目详情存入 Map
|
||||
projectListData.forEach((project) => {
|
||||
projectListData.forEach((project: ProjectVO) => {
|
||||
projectItem.set(project.id, {
|
||||
projectName: project.projectName,
|
||||
type: project.type,
|
||||
|
@ -77,7 +77,7 @@
|
||||
size="small"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.current"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
@ -92,7 +92,7 @@
|
||||
size="small"
|
||||
v-show="userNotInTeamTotal > 0"
|
||||
:total="userNotInTeamTotal"
|
||||
v-model:page="userQueryParams.current"
|
||||
v-model:page="userQueryParams.pageNum"
|
||||
v-model:limit="userQueryParams.pageSize"
|
||||
@pagination="getUserListNotInTeam"
|
||||
/>
|
||||
@ -130,7 +130,7 @@ import {
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
import { listConstructionUser } from '@/api/project/constructionUser';
|
||||
import { ConstructionUserVO } from '@/api/project/constructionUser/types';
|
||||
import { ConstructionUserQuery, ConstructionUserVO } from '@/api/project/constructionUser/types';
|
||||
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
@ -152,10 +152,10 @@ const initFormData: ProjectTeamMemberForm = {
|
||||
const data = reactive<PageData<ProjectTeamMemberForm, ProjectTeamMemberQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
orderByColumn: 'createTime',
|
||||
isAsc: 'desc',
|
||||
projectId: currentProject.value.id
|
||||
},
|
||||
rules: {
|
||||
@ -181,8 +181,8 @@ const projectTeamMemberList = ref<ProjectTeamMemberVO[]>([]);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listProjectTeamMember({ ...queryParams.value, teamId: props.projectTeamVo.id });
|
||||
projectTeamMemberList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
projectTeamMemberList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -200,7 +200,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
@ -227,22 +227,22 @@ const handleAdd = () => {
|
||||
|
||||
const userNotInTeamOpt = ref();
|
||||
const userNotInTeamTotal = ref();
|
||||
const userQueryParams = ref({
|
||||
current: 1,
|
||||
const userQueryParams = ref<ConstructionUserQuery>({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend'
|
||||
orderByColumn: 'createTime',
|
||||
isAsc: 'desc'
|
||||
});
|
||||
|
||||
// 获取不在当前班组的成员
|
||||
const getUserListNotInTeam = async () => {
|
||||
loading.value = true;
|
||||
const res = await listConstructionUser({ ...userQueryParams.value, notTeamId: props.projectTeamVo.id });
|
||||
userNotInTeamOpt.value = res.data.records.map((user: ConstructionUserVO) => ({
|
||||
userNotInTeamOpt.value = res.rows.map((user: ConstructionUserVO) => ({
|
||||
value: user.id,
|
||||
label: user.userName
|
||||
}));
|
||||
userNotInTeamTotal.value = res.data.total;
|
||||
userNotInTeamTotal.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改项目班组对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@ -111,7 +111,6 @@ const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const userListVisible = ref();
|
||||
const currentRow = ref<ProjectTeamVO>({
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
@ -138,10 +137,10 @@ const initFormData: ProjectTeamForm = {
|
||||
const data = reactive<PageData<ProjectTeamForm, ProjectTeamQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
current: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
orderByColumn: 'createTime',
|
||||
isAsc: 'desc',
|
||||
projectId: currentProject.value.id,
|
||||
teamName: undefined,
|
||||
isClockIn: undefined,
|
||||
@ -159,8 +158,8 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listProjectTeam(queryParams.value);
|
||||
projectTeamList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
projectTeamList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
@ -178,7 +177,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1;
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user