Merge remote-tracking branch 'origin/ljj' into lt
This commit is contained in:
55
public/image/convert_tif.bat
Normal file
55
public/image/convert_tif.bat
Normal file
@ -0,0 +1,55 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
REM 源文件
|
||||
set SRC=odm_orthophoto.tif
|
||||
|
||||
REM 中间文件:去掩膜 + 保留 4 波段
|
||||
set TMP1=tmp_nomask.tif
|
||||
|
||||
REM 中间文件:gdalwarp 处理透明通道
|
||||
set TMP2=tmp_nomask_alpha.tif
|
||||
|
||||
REM 最终输出文件(性能优化:缩放 + 压缩)
|
||||
set FINAL=clean_no_mask_optimized.tif
|
||||
|
||||
REM 配置参数
|
||||
REM -tr 0.25x 分辨率控制(0.25 倍像素,或者每个像素大小扩大4倍),视你项目需要可调
|
||||
REM -co 压缩参数:LZW 是无损压缩方式,TILED=YES 支持分块加载
|
||||
REM -r average 使用平均值重采样可保持图像质量
|
||||
|
||||
echo [1/4] gdal_translate:去除掩膜并保留RGBA四波段...
|
||||
gdal_translate -b 1 -b 2 -b 3 -b 4 -mask none -co PHOTOMETRIC=RGB -co ALPHA=YES %SRC% %TMP1%
|
||||
if errorlevel 1 (
|
||||
echo ❌ gdal_translate 失败
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [2/4] gdalwarp:强制生成 Alpha 通道...
|
||||
gdalwarp -dstalpha %TMP1% %TMP2%
|
||||
if errorlevel 1 (
|
||||
echo ❌ gdalwarp 失败
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [3/4] gdalwarp:降采样并启用压缩优化...
|
||||
gdalwarp ^
|
||||
-r average ^
|
||||
-tr 2 2 ^
|
||||
-co COMPRESS=LZW ^
|
||||
-co TILED=YES ^
|
||||
-co PHOTOMETRIC=RGB ^
|
||||
-co ALPHA=YES ^
|
||||
%TMP2% %FINAL%
|
||||
if errorlevel 1 (
|
||||
echo ❌ gdalwarp 压缩优化失败
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [4/4] 清理临时文件...
|
||||
del %TMP1%
|
||||
del %TMP2%
|
||||
|
||||
echo ✅ 完成!优化后的 GeoTIFF 已生成:%FINAL%
|
||||
endlocal
|
||||
pause
|
@ -121,3 +121,10 @@ export const logisticsDetial = (id) => {
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export const getDetailBASE = (id) => {
|
||||
return request({
|
||||
url: '/cailiaoshebei/purchaseDoc/pic/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
@ -174,3 +174,15 @@ export const getChildProject = (id: string | number): AxiosPromise<childProjectQ
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传项目文件
|
||||
* @param data
|
||||
*/
|
||||
export const uploadProjectFile = (data: any) => {
|
||||
return request({
|
||||
url: '/project/project/save/tender/file',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
@ -8,6 +8,7 @@ export interface ProjectVO {
|
||||
* 项目名称
|
||||
*/
|
||||
projectName: string;
|
||||
tenderFiles: string;
|
||||
|
||||
/**
|
||||
* 项目简称
|
||||
@ -128,10 +129,10 @@ export interface locationType {
|
||||
projectSite: string;
|
||||
}
|
||||
|
||||
export interface childProjectQuery{
|
||||
projectName:string;
|
||||
pid:string;
|
||||
id?:string
|
||||
export interface childProjectQuery {
|
||||
projectName: string;
|
||||
pid: string;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
export interface ProjectForm extends BaseEntity {
|
||||
|
@ -315,6 +315,11 @@ const uploadedSuccessfully = (res: any) => {
|
||||
fileList.value = [];
|
||||
emit('update:modelValue', ''); // 同步到外部 v-model
|
||||
}
|
||||
// if (props.autoUpload && props.limit === fileList.value.length) {
|
||||
// fileUploadRef.value?.clearFiles();
|
||||
// fileList.value = [];
|
||||
// emit('update:modelValue', ''); // 同步到外部 v-model
|
||||
// }
|
||||
props.onUploadSuccess?.(fileList.value, res);
|
||||
};
|
||||
|
||||
|
@ -304,7 +304,6 @@ const emits = defineEmits(['submitCallback', 'cancelCallback']);
|
||||
const handleCompleteTask = async () => {
|
||||
form.value.taskId = taskId.value;
|
||||
form.value.variables = props.taskVariables;
|
||||
|
||||
let verify = false;
|
||||
if (buttonObj.value.pop && nestNodeList.value && nestNodeList.value.length > 0) {
|
||||
nestNodeList.value.forEach((e) => {
|
||||
|
@ -293,4 +293,17 @@ const handleAddApp = (row) => {
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
});
|
||||
</script>
|
||||
|
@ -510,6 +510,10 @@ const submitForm = async () => {
|
||||
try {
|
||||
// 1. 基础表单验证
|
||||
await leaveFormRef.value.validate();
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> origin/ljj
|
||||
// 2. 提交前二次校验:「专业+人员」组合唯一性
|
||||
let hasDuplicate = false;
|
||||
const allKeys: string[] = [];
|
||||
@ -567,6 +571,10 @@ const submitForm = async () => {
|
||||
)
|
||||
]
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> origin/ljj
|
||||
// 4. 数据处理(保持原有逻辑不变)
|
||||
const arr = [];
|
||||
userList.value.forEach((item) => {
|
||||
|
@ -121,10 +121,14 @@
|
||||
<el-button size="small" type="text">查看详情</el-button>
|
||||
</template>
|
||||
<div class="space-y-2 text-sm">
|
||||
<p><span class="font-medium">采购备注:</span>{{ scope.row.cgRemark || '-' }}</p>
|
||||
<p><span class="font-medium">到货备注:</span>{{ scope.row.dhRemark || '-' }}</p>
|
||||
<p><span class="font-medium">供应商备注:</span>{{ scope.row.gysRemark || '-' }}</p>
|
||||
<p><span class="font-medium">结算备注:</span>{{ scope.row.jsRemark || '-' }}</p>
|
||||
<p><span class="font-medium">采购备注:</span>{{ scope.row.cgRemark || '-' }}
|
||||
</p>
|
||||
<p><span class="font-medium">到货备注:</span>{{ scope.row.dhRemark || '-' }}
|
||||
</p>
|
||||
<p><span class="font-medium">供应商备注:</span>{{ scope.row.gysRemark || '-'
|
||||
}}</p>
|
||||
<p><span class="font-medium">结算备注:</span>{{ scope.row.jsRemark || '-' }}
|
||||
</p>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
@ -153,15 +157,8 @@
|
||||
<div class="text-gray-500 text-sm">
|
||||
共 {{ total }} 条记录,当前显示第 {{ (currentPage - 1) * pageSize + 1 }} 至 {{ Math.min(currentPage * pageSize, total) }} 条
|
||||
</div>
|
||||
<el-dialog
|
||||
v-model="dialogVisible2"
|
||||
:title="dialogType2 === 'addSon' ? '新增采购信息' : '编辑采购信息'"
|
||||
:width="dialogWidth"
|
||||
:fullscreen="isFullscreen"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="handleClose"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-dialog v-model="dialogVisible2" :title="dialogType2 === 'addSon' ? '新增采购信息' : '编辑采购信息'" :width="dialogWidth"
|
||||
:fullscreen="isFullscreen" :close-on-click-modal="false" :before-close="handleClose" destroy-on-close>
|
||||
<!-- 表单内容 -->
|
||||
<el-form ref="formRef" :model="form" :rules="formRules" label-width="140px" class="space-y-4">
|
||||
<!-- 第一行 -->
|
||||
@ -173,12 +170,8 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系单下达时间" prop="issuanceTime">
|
||||
<el-date-picker
|
||||
v-model="form.issuanceTime"
|
||||
type="datetime"
|
||||
placeholder="选择联系单下达时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="form.issuanceTime" type="datetime" placeholder="选择联系单下达时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -192,12 +185,8 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="要求到货时间" prop="requireDelivery">
|
||||
<el-date-picker
|
||||
v-model="form.requireDelivery"
|
||||
type="datetime"
|
||||
placeholder="选择要求到货时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="form.requireDelivery" type="datetime" placeholder="选择要求到货时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -211,12 +200,8 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划到货时间" prop="scheduledDelivery">
|
||||
<el-date-picker
|
||||
v-model="form.scheduledDelivery"
|
||||
type="datetime"
|
||||
placeholder="选择计划到货时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="form.scheduledDelivery" type="datetime" placeholder="选择计划到货时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -230,12 +215,8 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实际到货时间" prop="actualDelivery">
|
||||
<el-date-picker
|
||||
v-model="form.actualDelivery"
|
||||
type="datetime"
|
||||
placeholder="选择实际到货时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="form.actualDelivery" type="datetime" placeholder="选择实际到货时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -258,12 +239,8 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="验收移交时间" prop="acceptanceCheck">
|
||||
<el-date-picker
|
||||
v-model="form.acceptanceCheck"
|
||||
type="datetime"
|
||||
placeholder="选择验收移交时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="form.acceptanceCheck" type="datetime" placeholder="选择验收移交时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -341,7 +318,8 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="到货要求" prop="deliveryRequirements">
|
||||
<el-input v-model="form.deliveryRequirements" placeholder="请输入到货要求" type="textarea" rows="3"></el-input>
|
||||
<el-input v-model="form.deliveryRequirements" placeholder="请输入到货要求" type="textarea"
|
||||
rows="3"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -360,7 +338,8 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商备注" prop="gysRemark">
|
||||
<el-input v-model="form.gysRemark" placeholder="请输入供应商备注" type="textarea" rows="4"></el-input>
|
||||
<el-input v-model="form.gysRemark" placeholder="请输入供应商备注" type="textarea"
|
||||
rows="4"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -377,20 +356,23 @@
|
||||
<!-- 底部按钮 -->
|
||||
<template #footer>
|
||||
<div class="flex justify-end gap-3">
|
||||
<el-button @click="handleCancel" class="transition-all duration-200"> 取消 </el-button>
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading" class="transition-all duration-200">
|
||||
<el-button @click="handleCancel" class="transition-all duration-200">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading"
|
||||
class="transition-all duration-200">
|
||||
{{ dialogType2 === 'addSon' ? '新增' : '保存' }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, toRaw, getCurrentInstance } from 'vue';
|
||||
import { materialsUsageDetails, materialsSonAdd, materialsSonDel, materialsSonEdit } from '@/api/materials/usageMaterials/index';
|
||||
import { routerRename } from '@/api/air';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogVisible2 = ref(false);
|
||||
const dialogType2 = ref('addSon'); // add 或 edit
|
||||
@ -554,17 +536,14 @@ const handleSubmit = async () => {
|
||||
};
|
||||
const materialsUsageDetails1 = () => {
|
||||
loading.value = true;
|
||||
materialsUsageDetails({ physicalsupplyId: routeParams.value.id })
|
||||
.then((res) => {
|
||||
tableData.value = res.rows;
|
||||
})
|
||||
.catch(() => {
|
||||
materialsUsageDetails({ physicalsupplyId: routeParams.value.id }).then(res => {
|
||||
tableData.value = res.rows
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
}).finally(() => {
|
||||
loading.value = false;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
}
|
||||
// 格式化日期
|
||||
const formatDate = (dateString) => {
|
||||
if (!dateString) return '-';
|
||||
|
@ -149,6 +149,9 @@
|
||||
|
||||
<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-button link type="primary" icon="upload" @click="handleUpload(scope.row)" v-hasPermi="['project:project:saveTenderFile']"
|
||||
>招标文件上传
|
||||
</el-button>
|
||||
</el-space>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -190,9 +193,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="项目类别" prop="projectCategory" label-width="100px">
|
||||
<el-select v-model="form.projectCategory" placeholder="请选择项目类别" clearable>
|
||||
<el-option v-for="dict in project_category_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
<el-form-item label="项目阶段" prop="projectStage" label-width="100px">
|
||||
<el-select v-model="form.projectStage" placeholder="请选择项目类别" clearable>
|
||||
<el-option v-for="dict in project_stage" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -359,6 +362,15 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog title="上传文件" v-model="fileVisble" width="400">
|
||||
<file-upload v-model="fileForm.tenderFiles" :limit="10" :file-type="['pdf']" :file-size="50" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button v-loading="buttonLoading" type="primary" @click="uploadSubmit"> 提交</el-button>
|
||||
<el-button @click="fileVisble = false">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -370,7 +382,7 @@ import {
|
||||
addProjectPilePoint,
|
||||
addProjectSquare,
|
||||
delProject,
|
||||
getChildProject,
|
||||
uploadProjectFile,
|
||||
getProject,
|
||||
listProject,
|
||||
updateProject
|
||||
@ -378,8 +390,8 @@ import {
|
||||
import { ProjectForm, ProjectQuery, ProjectVO, childProjectQuery, locationType } from '@/api/project/project/types';
|
||||
import amap from '@/components/amap/index.vue';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { sys_normal_disable, project_category_type, project_type } = toRefs<any>(
|
||||
proxy?.useDict('sys_normal_disable', 'project_category_type', 'project_type')
|
||||
const { sys_normal_disable, project_category_type, project_type, project_stage } = toRefs<any>(
|
||||
proxy?.useDict('sys_normal_disable', 'project_category_type', 'project_type', 'project_stage')
|
||||
);
|
||||
const projectList = ref<ProjectVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
@ -408,6 +420,11 @@ const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
const fileVisble = ref(false);
|
||||
const fileForm = ref({
|
||||
id: '',
|
||||
tenderFiles: ''
|
||||
});
|
||||
const jsonData = ref(null);
|
||||
const fullscreenLoading = ref(false);
|
||||
|
||||
@ -521,48 +538,6 @@ const setPoi = (location: locationType) => {
|
||||
const setCheckedNodes = (nodeList: any) => {
|
||||
nodes.value = nodeList;
|
||||
};
|
||||
//上传节点
|
||||
// const addFacilities = async () => {
|
||||
// if (!layerType.value) {
|
||||
// return proxy?.$modal.msgError('请选择图层类型');
|
||||
// }
|
||||
// if (!nodes.value.length) {
|
||||
// return proxy?.$modal.msgError('请选择需要上传的图层');
|
||||
// }
|
||||
// const data = {
|
||||
// projectId: projectId.value,
|
||||
// nameGeoJson: null,
|
||||
// locationGeoJson: null,
|
||||
// pointGeoJson: null
|
||||
// };
|
||||
// loading.value = true;
|
||||
// if (layerType.value == 1) {
|
||||
// if (nodes.value[0].option == '名称') {
|
||||
// data.nameGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// data.locationGeoJson = jsonData.value[nodes.value[1].location.index];
|
||||
// } else {
|
||||
// data.nameGeoJson = jsonData.value[nodes.value[1].location.index];
|
||||
// data.locationGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// }
|
||||
// await addProjectFacilities(data);
|
||||
// await proxy?.$modal.msgSuccess('添加成功');
|
||||
// } else if (layerType.value == 2) {
|
||||
// data.pointGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// await addProjectPilePoint(data);
|
||||
// await proxy?.$modal.msgSuccess('添加成功');
|
||||
// } else if (layerType.value == 3) {
|
||||
// if (nodes.value[0].option == '名称') {
|
||||
// data.nameGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// data.locationGeoJson = jsonData.value[nodes.value[1].location.index];
|
||||
// } else {
|
||||
// data.nameGeoJson = jsonData.value[nodes.value[1].location.index];
|
||||
// data.locationGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// }
|
||||
// await addProjectSquare(data);
|
||||
// await proxy?.$modal.msgSuccess('添加成功');
|
||||
// }
|
||||
// loading.value = false;
|
||||
// };
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
@ -643,6 +618,24 @@ const submitForm = () => {
|
||||
});
|
||||
};
|
||||
|
||||
/** 上传文件 */
|
||||
const handleUpload = async (row?: ProjectVO) => {
|
||||
fileForm.value.id = row.id;
|
||||
fileForm.value.tenderFiles = row.tenderFiles;
|
||||
|
||||
fileVisble.value = true;
|
||||
};
|
||||
|
||||
const uploadSubmit = async () => {
|
||||
if (!fileForm.value.tenderFiles) return proxy.$modal.msgError('请上传文件');
|
||||
let res = await uploadProjectFile(fileForm.value);
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('上传成功');
|
||||
fileVisble.value = false;
|
||||
await getList();
|
||||
}
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: ProjectVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
|
Reference in New Issue
Block a user