feat: 危大工程功能新增以及BUG修改
This commit is contained in:
parent
2776855fd3
commit
f34ec01284
@ -713,3 +713,82 @@ export const engineerMainDetails = (params: any) => {
|
|||||||
export const dangerousEngineerPage = (params: any) => {
|
export const dangerousEngineerPage = (params: any) => {
|
||||||
return http.post(BASEURL + `/project/dangerousEngineering/page`, params);
|
return http.post(BASEURL + `/project/dangerousEngineering/page`, params);
|
||||||
};
|
};
|
||||||
|
// 新增危大工程
|
||||||
|
export const dangerousEngineerAdd = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineering/add`, params);
|
||||||
|
};
|
||||||
|
// 删除危大工程
|
||||||
|
export const dangerousEngineerDelete = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineering/delete`, params);
|
||||||
|
};
|
||||||
|
// 根据id查询危大工程信息
|
||||||
|
export const dangerousEngineerDetails = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineering/queryById`, params);
|
||||||
|
};
|
||||||
|
// 专项施工方案列表
|
||||||
|
export const constructionSchemeList = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringProgramme/list`, params);
|
||||||
|
};
|
||||||
|
// 专项施工方案添加
|
||||||
|
export const constructionSchemeAdd = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringProgramme/add`, params);
|
||||||
|
};
|
||||||
|
// 专项施工方案删除
|
||||||
|
export const constructionSchemeDelete = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringProgramme/delete`, params);
|
||||||
|
};
|
||||||
|
// 专项施工方案附件信息
|
||||||
|
export const constructionSchemeFile = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringProgramme/queryAnnexFile`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 施工进度列表
|
||||||
|
export const constructionProgressList = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringProgress/list`, params);
|
||||||
|
};
|
||||||
|
// 施工进度添加
|
||||||
|
export const constructionProgressAdd = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringProgress/add`, params);
|
||||||
|
};
|
||||||
|
// 施工进度编辑
|
||||||
|
export const constructionProgressEdit = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringProgress/edit`, params);
|
||||||
|
};
|
||||||
|
// 施工进度删除
|
||||||
|
export const constructionProgressDelete = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringProgress/delete`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 现场巡视列表
|
||||||
|
export const localInspectList = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringInspect/list`, params);
|
||||||
|
};
|
||||||
|
// 现场巡视添加
|
||||||
|
export const localInspectAdd = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringInspect/add`, params);
|
||||||
|
};
|
||||||
|
// 现场巡视编辑
|
||||||
|
export const localInspectEdit = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringInspect/edit`, params);
|
||||||
|
};
|
||||||
|
// 现场巡视删除
|
||||||
|
export const localInspectDelete = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringInspect/delete`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 危大工程验收列表
|
||||||
|
export const engineerAcceptList = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringCheckAccept/list`, params);
|
||||||
|
};
|
||||||
|
// 危大工程验收添加
|
||||||
|
export const engineerAcceptAdd = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringCheckAccept/add`, params);
|
||||||
|
};
|
||||||
|
// 危大工程验收编辑
|
||||||
|
export const engineerAcceptEdit = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringCheckAccept/edit`, params);
|
||||||
|
};
|
||||||
|
// 危大工程验收删除
|
||||||
|
export const engineerAcceptDelete = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/project/dangerousEngineeringCheckAccept/delete`, params);
|
||||||
|
};
|
||||||
|
|||||||
@ -371,10 +371,10 @@ const onUpload = async (row: any, index: any) => {
|
|||||||
row.fileList.map(item => {
|
row.fileList.map(item => {
|
||||||
if (item.response) {
|
if (item.response) {
|
||||||
arr.push({
|
arr.push({
|
||||||
response: { ...item.response, url: item.response.fileUrl },
|
response: { ...item.response, url: item.response.url },
|
||||||
name: item.response.fileName,
|
name: item.response.originalFilename,
|
||||||
url: item.response.fileUrl,
|
url: item.response.url,
|
||||||
size: +item.response.fileSize,
|
size: +item.response.size,
|
||||||
type: item.response.contentType
|
type: item.response.contentType
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -140,6 +140,19 @@ const columns: ColumnProps[] = [
|
|||||||
{ label: "禁用", value: 2 }
|
{ label: "禁用", value: 2 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: "timeLimit",
|
||||||
|
label: "提交时间",
|
||||||
|
isShow: false,
|
||||||
|
search: {
|
||||||
|
el: "date-picker",
|
||||||
|
props: {
|
||||||
|
type: "daterange",
|
||||||
|
format: "YYYY-MM-DD",
|
||||||
|
valueFormat: "YYYY-MM-DD"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
||||||
];
|
];
|
||||||
// 备案新增完成
|
// 备案新增完成
|
||||||
@ -213,10 +226,10 @@ const transfrom = (arr: Array<any>) => {
|
|||||||
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
||||||
const getTableList = (params: any) => {
|
const getTableList = (params: any) => {
|
||||||
let newParams = JSON.parse(JSON.stringify(params));
|
let newParams = JSON.parse(JSON.stringify(params));
|
||||||
if (newParams.installTime) {
|
if (newParams.timeLimit) {
|
||||||
newParams.installTime_begin = newParams.installTime[0];
|
newParams.createTime_begin = newParams.timeLimit[0];
|
||||||
newParams.installTime_end = newParams.installTime[1];
|
newParams.createTime_end = newParams.timeLimit[1];
|
||||||
delete newParams.installTime;
|
delete newParams.timeLimit;
|
||||||
}
|
}
|
||||||
return hoistEquipPage(newParams);
|
return hoistEquipPage(newParams);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -148,7 +148,7 @@ const columns: ColumnProps[] = [
|
|||||||
label: "监理单位"
|
label: "监理单位"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "createBy",
|
prop: "createByName",
|
||||||
label: "填写人"
|
label: "填写人"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -115,7 +115,7 @@ const columns: ColumnProps[] = [
|
|||||||
label: "监理单位"
|
label: "监理单位"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "createBy",
|
prop: "createByName",
|
||||||
label: "填写人"
|
label: "填写人"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -78,7 +78,7 @@
|
|||||||
<div class="switch-box">
|
<div class="switch-box">
|
||||||
<el-switch v-model="formData.technicalDisclosureType" :active-value="2" :inactive-value="1" />
|
<el-switch v-model="formData.technicalDisclosureType" :active-value="2" :inactive-value="1" />
|
||||||
<span>未完成</span>
|
<span>未完成</span>
|
||||||
<el-button type="primary">点击上传</el-button>
|
<el-button type="primary" @click="onUpload('technicalDisclosureFile')">点击上传</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -87,7 +87,7 @@
|
|||||||
<div class="switch-box">
|
<div class="switch-box">
|
||||||
<el-switch v-model="formData.securityConstructionSchemeType" :active-value="2" :inactive-value="1" />
|
<el-switch v-model="formData.securityConstructionSchemeType" :active-value="2" :inactive-value="1" />
|
||||||
<span>未完成</span>
|
<span>未完成</span>
|
||||||
<el-button type="primary">点击上传</el-button>
|
<el-button type="primary" @click="onUpload('securityConstructionSchemeFile')">点击上传</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
<div class="switch-box">
|
<div class="switch-box">
|
||||||
<el-switch v-model="formData.specialConstructionSchemeType" :active-value="2" :inactive-value="1" />
|
<el-switch v-model="formData.specialConstructionSchemeType" :active-value="2" :inactive-value="1" />
|
||||||
<span>未完成</span>
|
<span>未完成</span>
|
||||||
<el-button type="primary">点击上传</el-button>
|
<el-button type="primary" @click="onUpload('specialConstructionSchemeFile')">点击上传</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -110,15 +110,18 @@
|
|||||||
<el-button type="primary" @click="confirm(formRef)"> 保存 </el-button>
|
<el-button type="primary" @click="confirm(formRef)"> 保存 </el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 附件上传 -->
|
||||||
|
<FilesUploadPlus v-model="showFilesUpload" @update:files="handlechange" :files="current.files" :reset="true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import type { FormInstance, UploadProps } from "element-plus";
|
import type { FormInstance } from "element-plus";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { submitMonthlyReport, engineerMainDetails } from "@/api/modules/project";
|
|
||||||
import { getDicList } from "@/api/modules/jxjview";
|
import { getDicList } from "@/api/modules/jxjview";
|
||||||
|
import FilesUploadPlus from "@/components/FilesUploadPlus/FilesUpload.vue";
|
||||||
|
import { dangerousEngineerAdd } from "@/api/modules/project";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
addVisible: Boolean,
|
addVisible: Boolean,
|
||||||
searchSn: String,
|
searchSn: String,
|
||||||
@ -126,6 +129,11 @@ const props = defineProps({
|
|||||||
relativeId: String
|
relativeId: String
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["update:addVisible", "confirm"]);
|
const emits = defineEmits(["update:addVisible", "confirm"]);
|
||||||
|
const documentDataKey = ref("");
|
||||||
|
const current = ref({
|
||||||
|
files: []
|
||||||
|
});
|
||||||
|
const showFilesUpload = ref(false);
|
||||||
const typeList = ref([]);
|
const typeList = ref([]);
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
engineeringName: [
|
engineeringName: [
|
||||||
@ -153,11 +161,55 @@ const rules = ref({
|
|||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
const formData = ref<any>({
|
const formData = ref<any>({
|
||||||
technicalDisclosureFile: "",
|
technicalDisclosureFile: [],
|
||||||
securityConstructionSchemeFile: "",
|
securityConstructionSchemeFile: [],
|
||||||
specialConstructionSchemeFile: ""
|
specialConstructionSchemeFile: []
|
||||||
});
|
});
|
||||||
const visible1 = ref(false);
|
const visible1 = ref(false);
|
||||||
|
// 附件上传改变
|
||||||
|
const handlechange = e => {
|
||||||
|
console.log(e);
|
||||||
|
current.value.files = e.map(item => {
|
||||||
|
item.label = current.value.dictLabel;
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
console.log(current.value.files);
|
||||||
|
formData.value[documentDataKey.value] = current.value.files;
|
||||||
|
};
|
||||||
|
// 上传附件按钮
|
||||||
|
const onUpload = async (key: any) => {
|
||||||
|
console.log(key);
|
||||||
|
showFilesUpload.value = true;
|
||||||
|
documentDataKey.value = key;
|
||||||
|
console.log(formData.value[key]);
|
||||||
|
if (formData.value[key].length > 0) {
|
||||||
|
let arr: any = [];
|
||||||
|
formData.value[key].map(item => {
|
||||||
|
if (item.response) {
|
||||||
|
arr.push({
|
||||||
|
response: { ...item.response, url: item.response.url },
|
||||||
|
name: item.response.originalFilename,
|
||||||
|
url: item.response.url,
|
||||||
|
size: +item.response.size,
|
||||||
|
type: item.response.contentType
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
arr.push({
|
||||||
|
response: { ...item, url: item.fileUrl },
|
||||||
|
name: item.fileName,
|
||||||
|
url: item.fileUrl,
|
||||||
|
size: +item.fileSize,
|
||||||
|
type: item.contentType
|
||||||
|
});
|
||||||
|
}
|
||||||
|
delete item.response;
|
||||||
|
});
|
||||||
|
current.value.files = arr;
|
||||||
|
console.log(current.value.files);
|
||||||
|
} else {
|
||||||
|
current.value.files = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
const getTypeDicMainList = async () => {
|
const getTypeDicMainList = async () => {
|
||||||
// 获取起重机械设备类型字典
|
// 获取起重机械设备类型字典
|
||||||
const { result } = await getDicList({ dictType: "dangerous_engineer_type" });
|
const { result } = await getDicList({ dictType: "dangerous_engineer_type" });
|
||||||
@ -176,8 +228,40 @@ const getTypeDicMainList = async () => {
|
|||||||
// 确定按钮触发
|
// 确定按钮触发
|
||||||
const confirm = async (formEl: FormInstance | undefined) => {
|
const confirm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
await formEl.validate((valid, fields) => {
|
await formEl.validate(async (valid, fields) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
console.log(formData.value);
|
||||||
|
let requestData = {
|
||||||
|
...formData.value,
|
||||||
|
technicalDisclosureFile: "",
|
||||||
|
securityConstructionSchemeFile: "",
|
||||||
|
specialConstructionSchemeFile: ""
|
||||||
|
};
|
||||||
|
if (props.activeValue == "eng") {
|
||||||
|
requestData.engineeringSn = props.searchSn;
|
||||||
|
} else if (props.activeValue == "project") {
|
||||||
|
requestData.projectSn = props.searchSn;
|
||||||
|
}
|
||||||
|
for (let i in requestData) {
|
||||||
|
if (i == "technicalDisclosureFile" || i == "securityConstructionSchemeFile" || i == "specialConstructionSchemeFile") {
|
||||||
|
let arr = [] as any;
|
||||||
|
formData.value[i].map(item => {
|
||||||
|
if (item.response) {
|
||||||
|
arr.push({
|
||||||
|
fileName: item.response.originalFilename,
|
||||||
|
fileUrl: item.response.url
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
requestData[i] = JSON.stringify(arr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const res = await dangerousEngineerAdd(requestData);
|
||||||
|
if (res.success) {
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
visible1.value = false;
|
||||||
|
emits("confirm");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("error submit!", fields);
|
console.log("error submit!", fields);
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@ -200,7 +284,14 @@ watch(
|
|||||||
if (n) {
|
if (n) {
|
||||||
getTypeDicMainList();
|
getTypeDicMainList();
|
||||||
fileList.value = [];
|
fileList.value = [];
|
||||||
formData.value = {};
|
formData.value = {
|
||||||
|
technicalDisclosureFile: [],
|
||||||
|
securityConstructionSchemeFile: [],
|
||||||
|
specialConstructionSchemeFile: []
|
||||||
|
};
|
||||||
|
setTimeout(function () {
|
||||||
|
formRef.value?.clearValidate();
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
visible1.value = n;
|
visible1.value = n;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,7 @@
|
|||||||
|
@mixin flex {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
.type-select {
|
.type-select {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(6, 1fr);
|
grid-template-columns: repeat(6, 1fr);
|
||||||
@ -12,10 +16,9 @@
|
|||||||
border-radius: 8px 8px 8px 8px;
|
border-radius: 8px 8px 8px 8px;
|
||||||
padding: 24px 0;
|
padding: 24px 0;
|
||||||
&-content {
|
&-content {
|
||||||
display: flex;
|
@include flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
|
||||||
> img {
|
> img {
|
||||||
width: 44px;
|
width: 44px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
@ -45,6 +48,32 @@
|
|||||||
.table-main {
|
.table-main {
|
||||||
height: calc(100% - 82px);
|
height: calc(100% - 82px);
|
||||||
}
|
}
|
||||||
|
.type-content {
|
||||||
|
@include flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
span {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
span:nth-child(1) {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
span:nth-child(2) {
|
||||||
|
color: #bbbbbb;
|
||||||
|
}
|
||||||
|
span:nth-child(3) {
|
||||||
|
display: inline-block;
|
||||||
|
width: 32px;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
text-align: center;
|
||||||
|
background: #e70000;
|
||||||
|
border-radius: 2px 2px 2px 2px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,8 +27,21 @@
|
|||||||
<template #formButton="scope">
|
<template #formButton="scope">
|
||||||
<el-button class="addButtonStyle" @click="handleAddItem">新增</el-button>
|
<el-button class="addButtonStyle" @click="handleAddItem">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
<template #type="{ row }">
|
||||||
|
<div class="type-content">
|
||||||
|
<span>{{ textTransform(row.type) }}</span>
|
||||||
|
<span>{{ row.typeDescribe }}</span>
|
||||||
|
<span v-if="row.dangerType == 1">超危</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #engineering="{ row }">
|
||||||
|
<div class="type-content">
|
||||||
|
<span>{{ row.engineeringName }}</span>
|
||||||
|
<span>{{ row.engineeringSurvey }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button type="danger" style="margin-right: 5px" link :icon="Delete" @click="deleteItem(row)">删除</el-button>
|
<el-button type="danger" style="margin-right: 5px" link :icon="Delete" @click.stop="deleteItem(row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</ProTable>
|
</ProTable>
|
||||||
</div>
|
</div>
|
||||||
@ -39,6 +52,13 @@
|
|||||||
:activeValue="activeValue"
|
:activeValue="activeValue"
|
||||||
@confirm="confirmAdd"
|
@confirm="confirmAdd"
|
||||||
></engineerAdd>
|
></engineerAdd>
|
||||||
|
<!-- 危大工程详情 -->
|
||||||
|
<engineerDetails
|
||||||
|
v-model:detailsVisible="detailsVisible"
|
||||||
|
:relativeId="relativeId"
|
||||||
|
:searchSn="searchSn"
|
||||||
|
:activeValue="activeValue"
|
||||||
|
></engineerDetails>
|
||||||
|
|
||||||
<!-- 侧边栏选择 -->
|
<!-- 侧边栏选择 -->
|
||||||
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
<engineeringEngDrawer v-model="engVisable" :active="activeValue" ref="engDrawer" :engList="engList" @select="tabsSelect">
|
||||||
@ -63,15 +83,17 @@ import { Delete } from "@element-plus/icons-vue";
|
|||||||
import { jxj_User } from "@/api/types";
|
import { jxj_User } from "@/api/types";
|
||||||
import { useHandleData } from "@/hooks/useHandleData";
|
import { useHandleData } from "@/hooks/useHandleData";
|
||||||
import engineerAdd from "./components/engineerAdd.vue";
|
import engineerAdd from "./components/engineerAdd.vue";
|
||||||
|
import engineerDetails from "./components/engineerDetails.vue";
|
||||||
import { getRelevanceList } from "@/api/modules/common";
|
import { getRelevanceList } from "@/api/modules/common";
|
||||||
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
import engineeringEngDrawer from "@/components/engineeringEngDrawer/index.vue";
|
||||||
import allEngineering from "@/components/allEngineering/index.vue";
|
import allEngineering from "@/components/allEngineering/index.vue";
|
||||||
import { monthlyReportPage, updateMonthlyReport, dangerousEngineerPage, getEngineeringName } from "@/api/modules/project";
|
import { dangerousEngineerPage, dangerousEngineerDelete, getEngineeringName } from "@/api/modules/project";
|
||||||
const activeValue = ref("eng");
|
const activeValue = ref("eng");
|
||||||
const engList = ref([]);
|
const engList = ref([]);
|
||||||
const engVisable = ref(false);
|
const engVisable = ref(false);
|
||||||
const searchSn = ref("");
|
const searchSn = ref("");
|
||||||
const addVisible = ref(false);
|
const addVisible = ref(false);
|
||||||
|
const detailsVisible = ref(false);
|
||||||
const relativeId = ref("");
|
const relativeId = ref("");
|
||||||
const statisticsOption = ref([
|
const statisticsOption = ref([
|
||||||
{
|
{
|
||||||
@ -112,7 +134,7 @@ const statisticsOption = ref([
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
const operateDialog = ref(false);
|
const operateDialog = ref(false);
|
||||||
const hoistEquipType = ref([]);
|
const typeList = ref([]);
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTable = ref();
|
const proTable = ref();
|
||||||
|
|
||||||
@ -125,7 +147,7 @@ const columns: ColumnProps[] = [
|
|||||||
search: { el: "input" }
|
search: { el: "input" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "model",
|
prop: "engineering",
|
||||||
label: "危大工程"
|
label: "危大工程"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -150,6 +172,21 @@ const columns: ColumnProps[] = [
|
|||||||
},
|
},
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 260 }
|
||||||
];
|
];
|
||||||
|
// 类别文本转换
|
||||||
|
const textTransform = (val: any) => {
|
||||||
|
let findItem: any = typeList.value.find(item => item.dictLabel == val);
|
||||||
|
return findItem?.dictValue;
|
||||||
|
};
|
||||||
|
const getTypeDicMainList = async () => {
|
||||||
|
// 获取起重机械设备类型字典
|
||||||
|
const { result } = await getDicList({ dictType: "dangerous_engineer_type" });
|
||||||
|
if (result.length > 0) {
|
||||||
|
typeList.value.length = 0;
|
||||||
|
typeList.value = result;
|
||||||
|
} else {
|
||||||
|
typeList.value.length = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
// 新增完成
|
// 新增完成
|
||||||
const confirmAdd = () => {
|
const confirmAdd = () => {
|
||||||
proTable.value.getTableList();
|
proTable.value.getTableList();
|
||||||
@ -158,28 +195,16 @@ const confirmAdd = () => {
|
|||||||
const handleAddItem = () => {
|
const handleAddItem = () => {
|
||||||
addVisible.value = true;
|
addVisible.value = true;
|
||||||
};
|
};
|
||||||
// 删除大项
|
// 删除表格数据
|
||||||
const deleteItem = async (params: jxj_User.ResUserList) => {
|
const deleteItem = async (params: jxj_User.ResUserList) => {
|
||||||
// await useHandleData(bigStoreDelete, { id: params.id }, `删除【${params.name}】`);
|
await useHandleData(dangerousEngineerDelete, { id: params.id }, `删除【${params.engineeringName}】`);
|
||||||
|
proTable.value.getTableList();
|
||||||
};
|
};
|
||||||
// 点击行查看详情
|
// 点击行查看详情
|
||||||
const rowClick = (row: any, column: ColumnProps) => {
|
const rowClick = (row: any, column: ColumnProps) => {
|
||||||
console.log("row", row, "column", column);
|
console.log("row", row, "column", column);
|
||||||
};
|
relativeId.value = row.id;
|
||||||
const getDicMainList = async () => {
|
detailsVisible.value = true;
|
||||||
// 获取学历字典
|
|
||||||
const { result } = await getDicList({ dictType: "hoist_equip_type" });
|
|
||||||
if (result.length > 0) {
|
|
||||||
let arr: any = [];
|
|
||||||
result.map(item => {
|
|
||||||
arr.push({
|
|
||||||
label: item.dictValue,
|
|
||||||
value: item.dictLabel
|
|
||||||
});
|
|
||||||
});
|
|
||||||
hoistEquipType.value.length = 0;
|
|
||||||
hoistEquipType.value.push(...arr);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
// 处理不同状态行不同颜色
|
// 处理不同状态行不同颜色
|
||||||
const tableRowClassName = ({ rowIndex }: { row: User.ResUserList; rowIndex: number }) => {
|
const tableRowClassName = ({ rowIndex }: { row: User.ResUserList; rowIndex: number }) => {
|
||||||
@ -203,10 +228,14 @@ const dataCallback = (data: any) => {
|
|||||||
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
||||||
const getTableList = (params: any) => {
|
const getTableList = (params: any) => {
|
||||||
let newParams = JSON.parse(JSON.stringify(params));
|
let newParams = JSON.parse(JSON.stringify(params));
|
||||||
if (newParams.timeLimit) {
|
if (searchSn.value) {
|
||||||
newParams.createTime_begin = newParams.timeLimit[0];
|
if (activeValue.value == "eng") {
|
||||||
newParams.createTime_end = newParams.timeLimit[1];
|
newParams.engineeringSn = searchSn.value;
|
||||||
delete newParams.timeLimit;
|
} else if (activeValue.value == "project") {
|
||||||
|
newParams.projectSn = searchSn.value;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return { result: { current: "1", pages: "1", records: [], size: "10", total: "0" } };
|
||||||
}
|
}
|
||||||
return dangerousEngineerPage(newParams);
|
return dangerousEngineerPage(newParams);
|
||||||
};
|
};
|
||||||
@ -252,7 +281,7 @@ const onUpdate = async row => {
|
|||||||
};
|
};
|
||||||
onMounted(() => {});
|
onMounted(() => {});
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getDicMainList();
|
await getTypeDicMainList();
|
||||||
await getengineering();
|
await getengineering();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -371,10 +371,10 @@ const onUpload = async (row: any, index: any) => {
|
|||||||
row.fileList.map(item => {
|
row.fileList.map(item => {
|
||||||
if (item.response) {
|
if (item.response) {
|
||||||
arr.push({
|
arr.push({
|
||||||
response: { ...item.response, url: item.response.fileUrl },
|
response: { ...item.response, url: item.response.url },
|
||||||
name: item.response.fileName,
|
name: item.response.originalFilename,
|
||||||
url: item.response.fileUrl,
|
url: item.response.url,
|
||||||
size: +item.response.fileSize,
|
size: +item.response.size,
|
||||||
type: item.response.contentType
|
type: item.response.contentType
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -400,6 +400,7 @@ const handlechange = e => {
|
|||||||
item.label = current.value.dictLabel;
|
item.label = current.value.dictLabel;
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
|
console.log(current.value.files);
|
||||||
documentData.value[documentDataIndex.value].fileList = current.value.files;
|
documentData.value[documentDataIndex.value].fileList = current.value.files;
|
||||||
};
|
};
|
||||||
// 单体工程名称转换;
|
// 单体工程名称转换;
|
||||||
|
|||||||
@ -150,7 +150,7 @@ const columns: ColumnProps[] = [
|
|||||||
label: "设计单位"
|
label: "设计单位"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "createBy",
|
prop: "createByName",
|
||||||
label: "填写人"
|
label: "填写人"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user