flx: 暂存
This commit is contained in:
parent
1d18ca5b2a
commit
b0b54cb6ab
@ -181,3 +181,6 @@ export const getBigDangerRecognizeDetailPageApi = data => get('xmgl/bigDangerRec
|
||||
export const saveByTypeBigDangerRecognizeDetailApi = data => post('xmgl/bigDangerRecognizeDetail/saveByType', data);
|
||||
// 删除危大清单辨识详情信息
|
||||
export const deleteBigDangerRecognizeDetailApi = data => post('xmgl/bigDangerRecognizeDetail/delete', data);
|
||||
|
||||
// 列表查询危大工程类别信息
|
||||
export const getBigDangerTypeListApi = data => post('xmgl/bigDangerType/list', data);
|
||||
@ -2237,12 +2237,31 @@ export default {
|
||||
this.addGroupDialog = true;
|
||||
this.addGroupForm = JSON.parse(JSON.stringify(item));
|
||||
this.$nextTick(() => {
|
||||
if (this.addGroupForm.parentObj) {
|
||||
this.selectVal = JSON.parse(this.addGroupForm.parentObj).groupName;
|
||||
const find = this.findNodeById(this.videoTreeData, item.parentId);
|
||||
if(find) {
|
||||
this.selectVal = find.groupName;
|
||||
this.$refs.groupTree.setCurrentKey(this.addGroupForm.parentId);
|
||||
}
|
||||
// if (this.addGroupForm.parentObj) {
|
||||
// this.selectVal = JSON.parse(this.addGroupForm.parentObj).groupName;
|
||||
// this.$refs.groupTree.setCurrentKey(this.addGroupForm.parentId);
|
||||
// }
|
||||
});
|
||||
},
|
||||
findNodeById(node, id) {
|
||||
const find = node.find((item) => item.id === id);
|
||||
if (find) {
|
||||
return find;
|
||||
}
|
||||
for (let child of node) {
|
||||
if (child.children && child.children.length > 0) {
|
||||
const found = this.findNodeById(child.children, id);
|
||||
if (found) return found;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
deleteGroupFn(item) {
|
||||
// 确定删除分组
|
||||
this.$confirm(
|
||||
@ -2607,17 +2626,23 @@ export default {
|
||||
? obj.enterpriseIds.split(",")
|
||||
: [];
|
||||
this.$nextTick(() => {
|
||||
if (this.currentVideoTypeDetail.parentObj) {
|
||||
this.selectFormVal = JSON.parse(
|
||||
this.currentVideoTypeDetail.parentObj
|
||||
).groupName;
|
||||
this.selectFormTreeData = JSON.parse(
|
||||
this.currentVideoTypeDetail.parentObj
|
||||
);
|
||||
this.$refs.groupFormTree.setCurrentKey(
|
||||
this.currentVideoTypeDetail.parentId
|
||||
);
|
||||
const find = this.findNodeById(this.videoTreeData, obj.groupId);
|
||||
if(find) {
|
||||
this.selectFormVal = find.groupName;
|
||||
this.$refs.groupTree.setCurrentKey(this.currentVideoTypeDetail.groupId);
|
||||
}
|
||||
|
||||
// if (this.currentVideoTypeDetail.parentObj) {
|
||||
// this.selectFormVal = JSON.parse(
|
||||
// this.currentVideoTypeDetail.parentObj
|
||||
// ).groupName;
|
||||
// this.selectFormTreeData = JSON.parse(
|
||||
// this.currentVideoTypeDetail.parentObj
|
||||
// );
|
||||
// this.$refs.groupFormTree.setCurrentKey(
|
||||
// this.currentVideoTypeDetail.parentId
|
||||
// );
|
||||
// }
|
||||
});
|
||||
console.log("编辑内容", obj);
|
||||
},
|
||||
|
||||
@ -78,8 +78,8 @@
|
||||
style="width: 100%"
|
||||
row-key="id"
|
||||
class="tables"
|
||||
height="calc(100% - 64px - 56px - 16px)"
|
||||
max-height="calc(100% - 64px - 116px - 16px)"
|
||||
height="calc(100% - 64px - 56px)"
|
||||
max-height="calc(100% - 64px - 56px)"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
|
||||
@ -15,7 +15,12 @@
|
||||
<p>危大工程辨识</p>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="saveBtn" size="medium" type="primary">
|
||||
<el-button
|
||||
v-if="dynamicType != 'detail'"
|
||||
@click="saveBtn"
|
||||
size="medium"
|
||||
type="primary"
|
||||
>
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
@ -24,13 +29,16 @@
|
||||
<div class="header_title">
|
||||
<div class="radio-group">
|
||||
<el-radio-group
|
||||
@change="handleQuery"
|
||||
size="medium"
|
||||
border
|
||||
v-model="queryParams.controlListType"
|
||||
v-model="queryParams.recognizeConclusion"
|
||||
>
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button :label="2"
|
||||
>已辨识出危大工程({{ 0 }})</el-radio-button
|
||||
<el-radio-button :label="1"
|
||||
>已辨识出危大工程({{
|
||||
riskListDetailInfo.recognizedBigDangerNum || 0
|
||||
}})</el-radio-button
|
||||
>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
@ -41,13 +49,17 @@
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="是否超危" prop="dangerType">
|
||||
<el-radio-group v-model="queryParams.dangerType">
|
||||
<el-radio-group
|
||||
@change="handleQuery"
|
||||
v-model="queryParams.dangerType"
|
||||
>
|
||||
<el-radio :label="2">是</el-radio>
|
||||
<el-radio :label="1">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="施工专业" prop="projectClassify">
|
||||
<el-select
|
||||
@change="getBigDangerTypeDetailList"
|
||||
v-model="queryParams.projectClassify"
|
||||
clearable
|
||||
filterable
|
||||
@ -69,7 +81,7 @@
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bigDangerModuleList"
|
||||
v-for="item in bigDangerTypeList"
|
||||
:key="item.id"
|
||||
:label="item.title"
|
||||
:value="item.id"
|
||||
@ -93,8 +105,8 @@
|
||||
row-key="id"
|
||||
:height="500"
|
||||
>
|
||||
<el-table-column align="center" type="selection" width="55">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" type="selection" width="55">
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="typeName"
|
||||
@ -107,7 +119,7 @@
|
||||
></el-table-column>
|
||||
<el-table-column align="center" prop="dangerType" label="是否超危">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #f76c6c" v-if="scope.row.dangerType === 1"
|
||||
<span style="color: #f76c6c" v-if="scope.row.dangerType === 2"
|
||||
>是</span
|
||||
>
|
||||
<span v-else>否</span>
|
||||
@ -150,6 +162,7 @@
|
||||
<div v-else>
|
||||
<el-select
|
||||
v-model="scope.row.recognizeConclusion"
|
||||
@change="handleChange(scope.row)"
|
||||
size="medium"
|
||||
clearable
|
||||
filterable
|
||||
@ -188,6 +201,7 @@
|
||||
<div v-else>
|
||||
<el-date-picker
|
||||
v-model="scope.row.identificationTime"
|
||||
@change="handleChange(scope.row)"
|
||||
size="medium"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
@ -232,15 +246,7 @@
|
||||
ref="multipleTable"
|
||||
:data="itemDetailsData"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="55"
|
||||
v-if="$route.path.indexOf('/project/') == -1"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- 分类 -->
|
||||
<el-table-column
|
||||
prop="controlTypeName"
|
||||
@ -331,6 +337,7 @@ import {
|
||||
getBigDangerRecognizeDetailPageApi,
|
||||
saveByTypeBigDangerRecognizeDetailApi,
|
||||
selectBigDangerTypeControlContentApi,
|
||||
getBigDangerTypeListApi,
|
||||
} from "@/assets/js/api/dangerousBigProject";
|
||||
import { getDictionaryItemApi } from "@/assets/js/api/companyDiagram";
|
||||
import CatalogueLibraryDetail from "@/views/projectFront/dangerousBigProject/newCheckTable/catalogueLibraryDetail.vue";
|
||||
@ -372,9 +379,12 @@ export default {
|
||||
projectClassify: "",
|
||||
engineeringTypeId: "",
|
||||
dangerType: 2,
|
||||
controlListType: "",
|
||||
recognizeConclusion: "",
|
||||
},
|
||||
bindControlDialog: false,
|
||||
bigDangerTypeList: [],
|
||||
itemDetailsData: [],
|
||||
selectionList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -407,11 +417,21 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getBigDangerTypeDetailList() {
|
||||
getBigDangerTypeListApi({
|
||||
projectSn: this.projectSn,
|
||||
}).then((res) => {
|
||||
if (res.result.length > 0) {
|
||||
this.bigDangerTypeList = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
getBigDangerRecognizeDetailPage() {
|
||||
getBigDangerRecognizeDetailPageApi({
|
||||
pageNo: this.queryParams.pageNo,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
dangerType: this.queryParams.dangerType,
|
||||
recognizeConclusion: this.queryParams.recognizeConclusion,
|
||||
projectClassify: this.riskListDetailInfo.projectClassify
|
||||
? this.riskListDetailInfo.projectClassify
|
||||
: this.queryParams.projectClassify,
|
||||
@ -440,42 +460,36 @@ export default {
|
||||
this.queryParams.engineeringTypeId = "";
|
||||
this.handleQuery();
|
||||
},
|
||||
saveBtn() {
|
||||
let catalogModuleList = [];
|
||||
if (this.dynamicType == "add") {
|
||||
catalogModuleList = this.$refs.multipleTable.selection.map((item) => {
|
||||
return {
|
||||
describeId: item.describeId,
|
||||
planBuildBeginDate:
|
||||
item.identificationTime.length > 0
|
||||
? item.identificationTime[0]
|
||||
: "",
|
||||
planBuildEndDate:
|
||||
item.identificationTime.length > 0
|
||||
? item.identificationTime[1]
|
||||
: "",
|
||||
recognizeConclusion: item.recognizeConclusion,
|
||||
};
|
||||
});
|
||||
handleChange(row) {
|
||||
const findIndex = this.selectionList.findIndex(
|
||||
(item) => item.id == row.id
|
||||
);
|
||||
if (findIndex == -1) {
|
||||
this.selectionList.push(row);
|
||||
} else {
|
||||
catalogModuleList = this.dataList.map((item) => {
|
||||
return {
|
||||
describeId: item.describeId,
|
||||
planBuildBeginDate:
|
||||
item.identificationTime.length > 0
|
||||
? item.identificationTime[0]
|
||||
: "",
|
||||
planBuildEndDate:
|
||||
item.identificationTime.length > 0
|
||||
? item.identificationTime[1]
|
||||
: "",
|
||||
recognizeConclusion: item.recognizeConclusion,
|
||||
};
|
||||
});
|
||||
this.selectionList.splice(findIndex, 1, row);
|
||||
}
|
||||
},
|
||||
saveBtn() {
|
||||
let catalogModuleList = this.selectionList.map((item) => {
|
||||
return {
|
||||
detailId: item.id,
|
||||
describeId: item.describeId,
|
||||
planBuildBeginDate:
|
||||
item.identificationTime.length > 0
|
||||
? item.identificationTime[0]
|
||||
: "",
|
||||
planBuildEndDate:
|
||||
item.identificationTime.length > 0
|
||||
? item.identificationTime[1]
|
||||
: "",
|
||||
recognizeConclusion: item.recognizeConclusion,
|
||||
};
|
||||
});
|
||||
|
||||
saveByTypeBigDangerRecognizeDetailApi({
|
||||
detailList: catalogModuleList,
|
||||
projectClassify: this.queryParams.projectClassify,
|
||||
recognizeId: this.riskListDetailInfo.id,
|
||||
projectSn: this.projectSn,
|
||||
}).then((res) => {
|
||||
@ -510,6 +524,7 @@ export default {
|
||||
.catch(() => {});
|
||||
},
|
||||
sendValue() {
|
||||
this.selectionList = [];
|
||||
// this.safetyRiskDetailShow = true;
|
||||
this.$emit("updateValue", false);
|
||||
},
|
||||
@ -518,8 +533,8 @@ export default {
|
||||
riskListDetailInfo: {
|
||||
handler(val, oldVal) {
|
||||
if (this.riskListDetailInfo.projectClassify) {
|
||||
this.queryParams.projectClassify =
|
||||
this.riskListDetailInfo.projectClassify;
|
||||
this.queryParams.projectClassify =
|
||||
this.riskListDetailInfo.projectClassify;
|
||||
}
|
||||
this.getBigDangerRecognizeDetailPage();
|
||||
},
|
||||
@ -532,6 +547,10 @@ export default {
|
||||
<style lang="less" scoped>
|
||||
.tables {
|
||||
min-height: initial;
|
||||
.el-select {
|
||||
width: 92px !important;
|
||||
height: 34px;
|
||||
}
|
||||
}
|
||||
.checkPoint {
|
||||
box-sizing: border-box;
|
||||
|
||||
@ -1130,6 +1130,7 @@ export default {
|
||||
loadList() {
|
||||
let param = {
|
||||
sn: this.$store.state.userInfo.headquartersSn,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
projectClassify: this.riskListForm.projectClassify,
|
||||
name: this.riskListForm.nodeName,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user