合并
This commit is contained in:
@ -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