修改展示
This commit is contained in:
@ -95,4 +95,10 @@ public class BusMachineryDetailVo implements Serializable {
|
||||
@ExcelProperty(value = "机械主键id")
|
||||
private Long machineryId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import org.dromara.machinery.domain.BusMachinery;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@ -66,5 +67,10 @@ public class BusMachineryVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import org.dromara.materials.domain.BusCompany;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@ -64,5 +64,10 @@ public class BusCompanyVo implements Serializable {
|
||||
@ExcelProperty(value = "资质情况")
|
||||
private String qualification;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -114,5 +114,10 @@ public class BusMaterialsInventoryVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import org.dromara.materials.domain.BusMaterials;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@ -99,5 +100,10 @@ public class BusMaterialsVo implements Serializable {
|
||||
@ExcelDictFormat(readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import org.dromara.project.domain.BusConstructionUser;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@ -238,5 +239,10 @@ public class BusConstructionUserVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import org.dromara.project.domain.BusContractor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@ -73,5 +74,10 @@ public class BusContractorVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import org.dromara.project.domain.BusProjectTeamMember;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@ -69,5 +70,10 @@ public class BusProjectTeamMemberVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -61,5 +61,10 @@ public class BusProjectTeamVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import org.dromara.project.domain.BusProject;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@ -156,4 +157,10 @@ public class BusProjectVo implements Serializable {
|
||||
@ExcelDictFormat(readConverterExp = "1=显示,2=隐藏")
|
||||
private String showHidden;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import org.dromara.project.domain.BusUserProjectRelevancy;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@ -48,4 +49,10 @@ public class BusUserProjectRelevancyVo implements Serializable {
|
||||
@ExcelProperty(value = "项目详情")
|
||||
private BusProjectVo project;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
BusProject project = new BusProject();
|
||||
BeanUtils.copyProperties(dto, project);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(project);
|
||||
validEntityBeforeSave(project, true);
|
||||
// 写入数据库
|
||||
boolean save = this.save(project);
|
||||
if (!save) {
|
||||
@ -136,7 +136,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
BusProject project = new BusProject();
|
||||
BeanUtils.copyProperties(req, project);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(project);
|
||||
validEntityBeforeSave(project, false);
|
||||
// 权限校验
|
||||
validPermission(project);
|
||||
// 判断是否存在
|
||||
@ -151,11 +151,14 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusProject entity) {
|
||||
private void validEntityBeforeSave(BusProject entity, Boolean create) {
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
String projectName = entity.getProjectName();
|
||||
if (StringUtils.isBlank(projectName)) {
|
||||
throw new ServiceException("项目名称不能为空", HttpStatus.BAD_REQUEST);
|
||||
// 新增项目参数验证
|
||||
if (create) {
|
||||
if (StringUtils.isBlank(projectName)) {
|
||||
throw new ServiceException("项目名称不能为空", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,11 @@ export interface MachineryVO {
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MachineryForm extends BaseEntity {
|
||||
|
@ -55,6 +55,11 @@ export interface MachineryDetailVO {
|
||||
* 机械主键id
|
||||
*/
|
||||
machineryId: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MachineryDetailForm extends BaseEntity {
|
||||
|
@ -28,6 +28,11 @@ export interface CompanyVO {
|
||||
* 资质情况
|
||||
*/
|
||||
qualification: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface CompanyForm extends BaseEntity {
|
||||
|
@ -60,6 +60,11 @@ export interface MaterialsVO {
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MaterialsForm extends BaseEntity {
|
||||
|
@ -70,6 +70,11 @@ export interface MaterialsInventoryVO {
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MaterialsInventoryForm extends BaseEntity {
|
||||
|
@ -176,6 +176,11 @@ export interface ConstructionUserVO {
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ConstructionUserForm extends BaseEntity {
|
||||
|
@ -38,6 +38,11 @@ export interface ContractorVO {
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ContractorForm extends BaseEntity {
|
||||
|
@ -108,6 +108,11 @@ export interface ProjectVO {
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
isDelete: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ProjectForm extends BaseEntity {
|
||||
|
@ -20,6 +20,11 @@ export interface ProjectRelevancyVO {
|
||||
* 项目详情
|
||||
*/
|
||||
project: ProjectVO;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ProjectRelevancyForm extends BaseEntity {
|
||||
|
@ -23,6 +23,11 @@ export interface ProjectTeamVO {
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ProjectTeamForm extends BaseEntity {
|
||||
|
@ -28,6 +28,11 @@ export interface ProjectTeamMemberVO {
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ProjectTeamMemberForm extends BaseEntity {
|
||||
|
@ -12,7 +12,7 @@ export function listOss(query: OssQuery): AxiosPromise<OssVO[]> {
|
||||
}
|
||||
|
||||
// 查询OSS对象基于id串
|
||||
export function listByIds(ossId: string | number): AxiosPromise<OssVO[]> {
|
||||
export function listByIds(ossId: string | number | string[]): AxiosPromise<OssVO[]> {
|
||||
return request({
|
||||
url: '/resource/oss/listByIds/' + ossId,
|
||||
method: 'get'
|
||||
|
@ -55,6 +55,7 @@
|
||||
<el-table-column label="数量" align="center" prop="number" />
|
||||
<el-table-column label="负责人" align="center" prop="principal" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-space wrap>
|
||||
|
@ -56,6 +56,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="资质情况" align="center" prop="qualification" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-space wrap>
|
||||
|
@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-descriptions v-loading="loading" :column="2">
|
||||
<el-descriptions-item label="材料名称">{{ materialsDetail?.materialsName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商">{{ materialsDetail?.companyVo?.companyName }}</el-descriptions-item>
|
||||
<div :key="item.value" v-for="item in materials_file_type">
|
||||
<el-descriptions-item :span="2" :label="item.label">
|
||||
<div v-if="ossIdMap?.[item.value] && ossMap?.[ossIdMap[item.value]]">
|
||||
<a :href="ossMap[ossIdMap[item.value]]?.url" target="_blank">
|
||||
{{ ossMap[ossIdMap[item.value]]?.originalName }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</div>
|
||||
<el-descriptions-item label="规格型号">{{ materialsDetail?.typeSpecificationName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="使用部位">{{ materialsDetail?.usePart }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计量单位">{{ materialsDetail?.weightId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预计量">{{ materialsDetail?.quantityCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态" v-if="materialsDetail?.status === '0'">正常</el-descriptions-item>
|
||||
<el-descriptions-item label="状态" v-if="materialsDetail?.status === '1'">停用</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ materialsDetail?.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getMaterials } from '@/api/materials/materials';
|
||||
import { MaterialsVO } from '@/api/materials/materials/types';
|
||||
import { listByIds } from '@/api/system/oss';
|
||||
import { OssVO } from '@/api/system/oss/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { materials_file_type } = toRefs<any>(proxy?.useDict('materials_file_type'));
|
||||
|
||||
interface Props {
|
||||
materialsId?: string | number;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
const loading = ref<boolean>(false);
|
||||
const materialsDetail = ref<MaterialsVO>();
|
||||
const ossIdMap = ref<Record<string, string>>({});
|
||||
const ossMap = ref<Record<string, OssVO>>({}); // 存储 ossId -> 对象映射
|
||||
const getMaterialsDetail = async () => {
|
||||
loading.value = true;
|
||||
const res = await getMaterials(props.materialsId);
|
||||
if (res.data && res.code === 200) {
|
||||
materialsDetail.value = res.data;
|
||||
ossIdMap.value = res.data.fileOssMap;
|
||||
// 获取 value 列表
|
||||
if (res.data.fileOssMap) {
|
||||
const values = Object.values(res.data.fileOssMap);
|
||||
const ossRes = await listByIds(values);
|
||||
ossMap.value = Object.fromEntries(ossRes.data.map((item) => [item.ossId, item]));
|
||||
}
|
||||
}
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getMaterialsDetail();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.materialsId,
|
||||
(newId, oldId) => {
|
||||
if (newId !== oldId) {
|
||||
getMaterialsDetail();
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
@ -64,9 +64,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220">
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="320">
|
||||
<template #default="scope">
|
||||
<el-space wrap>
|
||||
<el-space>
|
||||
<el-button link type="primary" icon="View" @click="handleShowDrawer(scope.row)" v-hasPermi="['materials:materials:query']">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materials:edit']"> 修改 </el-button>
|
||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['materials:materials:remove']">
|
||||
删除
|
||||
@ -130,6 +134,9 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
<materials-inventory-add-dialog :materials-id="currentMaterialsId" :project-id="currentProject.id" ref="dialogRef" />
|
||||
<el-drawer title="材料详情" v-model="showDetailDrawer" :size="'40%'">
|
||||
<materials-detail-drawer :materials-id="currentMaterialsId" />
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -141,6 +148,7 @@ import MaterialsInventoryTable from '@/views/materials/materials/component/Mater
|
||||
import MaterialsInventoryAddDialog from '@/views/materials/materials/component/MaterialsInventoryAddDialog.vue';
|
||||
import { listCompany } from '@/api/materials/company';
|
||||
import { CompanyVO } from '@/api/materials/company/types';
|
||||
import MaterialsDetailDrawer from '@/views/materials/materials/component/MaterialsDetailDrawer.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { sys_normal_disable, materials_file_type } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'materials_file_type'));
|
||||
@ -257,6 +265,13 @@ const handleSelectionChange = (selection: MaterialsVO[]) => {
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 展开材料详情抽屉操作 */
|
||||
const showDetailDrawer = ref<boolean>(false);
|
||||
const handleShowDrawer = (row?: MaterialsVO) => {
|
||||
currentMaterialsId.value = row.id;
|
||||
showDetailDrawer.value = true;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
|
@ -48,6 +48,7 @@
|
||||
<el-table-column label="管理人" align="center" prop="custodian" />
|
||||
<el-table-column label="管理人联系电话" align="center" prop="custodianPhone" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-space wrap>
|
||||
|
@ -47,7 +47,6 @@
|
||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="项目简称" align="center" prop="shortName" />
|
||||
<!-- <el-table-column label="父项目id" align="center" prop="pId" /> -->
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
@ -64,13 +63,15 @@
|
||||
<el-table-column label="负责人电话" align="center" prop="principalPhone" />
|
||||
<el-table-column label="实际容量" align="center" prop="actual" />
|
||||
<el-table-column label="计划容量" align="center" prop="plan" />
|
||||
<el-table-column label="开工时间" align="center" prop="onStreamTime" />
|
||||
<el-table-column label="开工时间" align="center" prop="onStreamTime" width="120" />
|
||||
<el-table-column label="打卡范围" align="center" prop="punchRange" />
|
||||
<el-table-column label="设计总量" align="center" prop="designTotal" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="260">
|
||||
<template #default="scope">
|
||||
<el-space>
|
||||
<el-button link type="primary" icon="FolderOpened" @click="handleShowUpload(scope.row)">导入安全协议书 </el-button>
|
||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:project:edit']">修改 </el-button>
|
||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:project:remove']">删除 </el-button>
|
||||
</el-space>
|
||||
@ -105,7 +106,7 @@
|
||||
<el-input v-model="form.plan" placeholder="请输入计划容量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开工时间" prop="onStreamTime">
|
||||
<el-input v-model="form.onStreamTime" placeholder="请输入开工时间" />
|
||||
<el-date-picker clearable v-model="form.onStreamTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择开工时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="打卡范围" prop="punchRange">
|
||||
<el-input v-model="form.punchRange" placeholder="请输入打卡范围" />
|
||||
@ -127,6 +128,15 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="uploadVisible" title="上传安全协议书" width="400">
|
||||
<file-upload v-model="fileUploadParam.securityAgreement" :limit="1" :file-type="['pdf']" :file-size="50" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button v-loading="buttonLoading" type="primary" @click="updateProjectFile"> 提交</el-button>
|
||||
<el-button @click="uploadVisible = false">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -269,6 +279,27 @@ const handleUpdate = async (row?: ProjectVO) => {
|
||||
dialog.title = '修改项目';
|
||||
};
|
||||
|
||||
/** 上传安全协议书按钮操作 */
|
||||
const uploadVisible = ref<boolean>(false);
|
||||
const fileUploadParam = ref({
|
||||
id: undefined,
|
||||
securityAgreement: undefined
|
||||
});
|
||||
const handleShowUpload = (row?: ProjectVO) => {
|
||||
fileUploadParam.value.securityAgreement = row.securityAgreement;
|
||||
fileUploadParam.value.id = row.id;
|
||||
uploadVisible.value = true;
|
||||
};
|
||||
|
||||
const updateProjectFile = async () => {
|
||||
buttonLoading.value = true;
|
||||
await updateProject(fileUploadParam.value);
|
||||
proxy?.$modal.msgSuccess('上传成功');
|
||||
buttonLoading.value = false;
|
||||
uploadVisible.value = false;
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
projectFormRef.value?.validate(async (valid: boolean) => {
|
||||
|
@ -36,11 +36,11 @@ const getProjectList = async () => {
|
||||
console.error('获取项目列表失败:', error);
|
||||
}
|
||||
};
|
||||
const getUserProjects = async (s: string = '') => {
|
||||
const getUserProjects = async () => {
|
||||
if (!props.userId) return;
|
||||
try {
|
||||
const res = await listUserProjects({ userId: props.userId });
|
||||
selectedProjects.value = Array.isArray(res.rows) ? res.rows.map((item: ProjectRelevancyVO) => item.projectId) : [];s
|
||||
selectedProjects.value = Array.isArray(res.rows) ? res.rows.map((item: ProjectRelevancyVO) => item.projectId) : [];
|
||||
} catch (error) {
|
||||
console.error('获取用户关联的项目失败:', error);
|
||||
selectedProjects.value = []; // 请求失败时清空列表
|
||||
|
@ -49,6 +49,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-space wrap>
|
||||
@ -116,7 +117,8 @@ const currentRow = ref<ProjectTeamVO>({
|
||||
projectId: undefined,
|
||||
teamName: undefined,
|
||||
isClockIn: undefined,
|
||||
remark: undefined
|
||||
remark: undefined,
|
||||
ProjectTeamVO: undefined
|
||||
});
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
|
Reference in New Issue
Block a user