|
@@ -7,12 +7,12 @@
|
|
|
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
|
|
+ <el-form :model="searchParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
|
|
<el-form-item label="工程名称" prop="enginName">
|
|
|
- <el-input v-model="queryParams.enginName" placeholder="请输入建筑工程名称" maxlength="20"></el-input>
|
|
|
+ <el-input v-model="searchParams.enginName" placeholder="请输入建筑工程名称" maxlength="20"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工程分类" prop="enginClassification" v-if="engineeType">
|
|
|
- <el-select v-model="queryParams.enginClassification" placeholder="请选择工程分类">
|
|
|
+ <el-select v-model="searchParams.enginClassification" placeholder="请选择工程分类">
|
|
|
<el-option
|
|
|
v-for="e in dict.type.engin_classification"
|
|
|
:key="e.value"
|
|
@@ -87,12 +87,17 @@
|
|
|
>修改
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['zdsz:engineeringIndustry:remove']"
|
|
|
- >删除
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ @click="updateviewSource(scope.row)"
|
|
|
+ >修改节点信息
|
|
|
+ </el-button>
|
|
|
+ <el-button type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ @click="addzEngineeringMaterBo(scope.row)"
|
|
|
+ >新增用料信息
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -108,11 +113,13 @@
|
|
|
@click="viewSource(scope.row)"
|
|
|
>历史
|
|
|
</el-button>
|
|
|
- <el-button type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- @click="addzEngineeringMaterBo(scope.row)"
|
|
|
- >新增用料信息
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['zdsz:engineeringIndustry:remove']"
|
|
|
+ >删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -287,8 +294,10 @@
|
|
|
</el-dialog>
|
|
|
<ConstructionDetails
|
|
|
ref="ConstructionDetails"
|
|
|
+ :status="status"
|
|
|
:currentCollapses="currentCollapses"
|
|
|
@updateNodeOption = "updateNodeOption"
|
|
|
+ enginType="工业工程"
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -334,6 +343,7 @@ export default {
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
+ status:null,
|
|
|
// 非单个禁用
|
|
|
single: true,
|
|
|
// 非多个禁用
|
|
@@ -468,6 +478,10 @@ export default {
|
|
|
{required: true, message: "图片不能为空", trigger: ['change', 'blur'], validator: validatePicPass}
|
|
|
],
|
|
|
},
|
|
|
+ searchParams:{
|
|
|
+ enginName:null, // 工程名称
|
|
|
+ enginClassification:null, // 工程分类
|
|
|
+ },
|
|
|
currentType: null, // 附件组件类型 put修改 add新增
|
|
|
};
|
|
|
},
|
|
@@ -481,9 +495,9 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
// 手动渲染
|
|
|
- setInterval(() => {
|
|
|
- this.$forceUpdate()
|
|
|
- }, 500)
|
|
|
+ // setInterval(() => {
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // }, 500)
|
|
|
},
|
|
|
methods: {
|
|
|
validateState(rule, value, callback) {
|
|
@@ -522,10 +536,15 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
updateNodeOption(value){
|
|
|
- UpdateEngineeIndustry(value).then(res => {
|
|
|
+ console.log(this.form);
|
|
|
+ console.log(value)
|
|
|
+ this.form.files = this.form.pics
|
|
|
+ UpdateEngineeIndustry(this.form).then(res => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
- this.getList();
|
|
|
+
|
|
|
+ this.$refs.ConstructionDetails.dialogVisible = false
|
|
|
})
|
|
|
+ this.getList();
|
|
|
},
|
|
|
// 根据所选材质获取对应规格
|
|
|
getEnginSpecificationsList(item, index) {
|
|
@@ -579,7 +598,7 @@ export default {
|
|
|
//新增用料信息
|
|
|
addzEngineeringMaterialBo() {
|
|
|
this.zEngineeringMaterialBo.push({
|
|
|
- // materialQuality: '', // 用料材质
|
|
|
+ materialQuality: '', // 用料材质
|
|
|
specifications: '', // 用料规格
|
|
|
number: '' // 用料数量
|
|
|
})
|
|
@@ -614,12 +633,22 @@ export default {
|
|
|
viewSource(e) {
|
|
|
this.currentId = e.id
|
|
|
this.$refs.ConstructionDetails.open(_, this.form.type)
|
|
|
+ this.status = 'read-only'
|
|
|
+ },
|
|
|
+ // 历史查询
|
|
|
+ updateviewSource(e) {
|
|
|
+ this.currentId = e.id
|
|
|
+ this.$refs.ConstructionDetails.open(_, this.form.type)
|
|
|
+ this.status = 'put'
|
|
|
},
|
|
|
viewNodeSource(e) {
|
|
|
+ console.log(e)
|
|
|
// todo: 获取数据
|
|
|
QueryEngineeIndustry({
|
|
|
id: this.currentId
|
|
|
}).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.form = res.data
|
|
|
try {
|
|
|
this.currentCollapses = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList
|
|
|
} catch (error) {
|
|
@@ -644,16 +673,14 @@ export default {
|
|
|
this.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
|
|
|
},
|
|
|
/** 查询市政工程|工业工程列表 */
|
|
|
- getList() {
|
|
|
+ getList(val) {
|
|
|
this.loading = true;
|
|
|
let enginType = this.form.zEngineeringNodeBo.type;
|
|
|
// 获取材质
|
|
|
getEnginMaterialQualityList({enginType}).then(res => {
|
|
|
this.materialQualityList = res.data
|
|
|
});
|
|
|
- getEngineeIndustryList({
|
|
|
- type: this.form.type
|
|
|
- }).then(res => {
|
|
|
+ getEngineeIndustryList(val || {}).then(res => {
|
|
|
this.comprehensiveList = res.rows;
|
|
|
this.total = res.total;
|
|
|
this.loading = false;
|
|
@@ -682,7 +709,7 @@ export default {
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.getList(this.searchParams);
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|