|
@@ -193,7 +193,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工程分类" prop="enginClassification" v-if="form.type === '1'">
|
|
|
- <el-select v-model="form.enginClassification" placeholder="请选择工程分类" style="width: 100%">
|
|
|
+ <el-select v-model="form.enginClassification" placeholder="请选择工程分类" multiple style="width: 100%">
|
|
|
<el-option
|
|
|
v-for="e in dict.type.engin_classification"
|
|
|
:key="e.value"
|
|
@@ -329,6 +329,7 @@ import {
|
|
|
putEngineeEngineeIndustry,
|
|
|
QueryEngineeIndustry, UpdateEngineeIndustry
|
|
|
} from '@/api/zdsz/engineeringIndustry'
|
|
|
+import {getDicts} from "@/api/system/dict/data";
|
|
|
import EngineePipe from '@/components/EngineePipe'
|
|
|
import {validPhoneMobile} from '@/api/rules'
|
|
|
import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
|
|
@@ -407,7 +408,7 @@ export default {
|
|
|
supervisionUnit: '', // 监理单位
|
|
|
supervisionHead: '', // 监理负责人
|
|
|
supervisionPhone: '', // 监理联系电话
|
|
|
- enginClassification: '', // 工程分类
|
|
|
+ enginClassification: [], // 工程分类
|
|
|
zEngineeringNodeBo: { // 工程节点
|
|
|
type: '', // 节点类型
|
|
|
zEngineeringInfoBo: { // 施工信息
|
|
@@ -444,44 +445,18 @@ export default {
|
|
|
specificationsList: [], // 用料规格List
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
- sceneHead: [
|
|
|
- {required: true, message: "现场负责人不能为空", trigger: 'blur'}
|
|
|
- ],
|
|
|
enginName: [
|
|
|
{required: true, message: "工程名称不能为空", trigger: 'blur'}
|
|
|
],
|
|
|
enginClassification: [
|
|
|
{required: true, message: "工程分类不能为空", trigger: 'blur'}
|
|
|
],
|
|
|
- supervisionUnit: [
|
|
|
- {required: true, message: "监理单位不能为空", trigger: 'blur'}
|
|
|
- ],
|
|
|
enginType: [
|
|
|
{required: true, message: "工程类型不能为空", trigger: 'blur'}
|
|
|
],
|
|
|
- supervisionPhone: [
|
|
|
- {required: true, message: "监理联系电话不能为空", trigger: 'blur'},
|
|
|
- {validator: validPhoneMobile, trigger: 'blur'}
|
|
|
- ],
|
|
|
constructUnit: [
|
|
|
{required: true, message: "建筑单位不能为空", trigger: 'blur'}
|
|
|
],
|
|
|
- projectHead: [
|
|
|
- {required: true, message: "项目负责人不能为空", trigger: 'blur'}
|
|
|
- ],
|
|
|
- designHead: [
|
|
|
- {required: true, message: "设计负责人不能为空", trigger: 'blur'}
|
|
|
- ],
|
|
|
- designUnit: [
|
|
|
- {required: true, message: "设计单位不能为空", trigger: 'blur'}
|
|
|
- ],
|
|
|
- designPhone: [
|
|
|
- {required: true, message: "联系方式不能为空", trigger: 'blur'},
|
|
|
- {validator: validPhoneMobile, trigger: 'blur'}
|
|
|
- ],
|
|
|
- supervisionHead: [
|
|
|
- {required: true, message: "监理负责人不能为空", trigger: 'blur'}
|
|
|
- ],
|
|
|
type: [
|
|
|
{required: false, message: "类型不能为空", trigger: "blur"}
|
|
|
],
|
|
@@ -620,6 +595,9 @@ export default {
|
|
|
if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == null) {
|
|
|
valid = false;
|
|
|
}
|
|
|
+ if (this.form.enginClassification != [] && this.form.enginClassification.length>0) {
|
|
|
+ this.form.enginClassification = this.form.enginClassification.join(',');
|
|
|
+ }
|
|
|
if (valid) {
|
|
|
this.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
|
|
|
this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
|
|
@@ -692,10 +670,30 @@ export default {
|
|
|
},
|
|
|
// 历史查询
|
|
|
viewSource(e) {
|
|
|
- console.log(e)
|
|
|
+ console.log('历史查询', e)
|
|
|
this.currentId = e.id
|
|
|
- this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
|
|
|
- this.status = 'read-only'
|
|
|
+ let val = e.enginType + "_" + e.enginClassification
|
|
|
+ val = 'municipal_engineering_node'
|
|
|
+ // alert(val)
|
|
|
+ getDicts(val).then(res => {
|
|
|
+ let dict = []
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ dict.push({
|
|
|
+ "label": res.data[i].dictLabel,
|
|
|
+ "value": res.data[i].dictValue,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 市政工程功能已完成 工业工程请根据自己需求酌情修改此处代码
|
|
|
+ this.$refs.ConstructionDetails.open(this.form.type==2?dict:[
|
|
|
+ {
|
|
|
+ value: "历史数据",
|
|
|
+ label: "历史数据"
|
|
|
+ }
|
|
|
+ ], this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
|
|
|
+ this.status = 'read-only'
|
|
|
+ })
|
|
|
+ // this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
|
|
|
+ // this.status = 'read-only'
|
|
|
},
|
|
|
// 历史查询
|
|
|
updateviewSource(e) {
|
|
@@ -704,10 +702,13 @@ export default {
|
|
|
this.status = 'put'
|
|
|
},
|
|
|
viewNodeSource(e) {
|
|
|
- console.log(e)
|
|
|
+ // alert('type='+e)
|
|
|
+ if(!e)return
|
|
|
+ console.log('todo: 获取数据', e)
|
|
|
// todo: 获取数据
|
|
|
QueryEngineeIndustry({
|
|
|
- id: this.currentId
|
|
|
+ id: this.currentId,
|
|
|
+ type: e
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
|
this.form = res.data
|
|
@@ -807,7 +808,7 @@ export default {
|
|
|
this.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ this.form.enginClassification = this.form.enginClassification.split(",");
|
|
|
|
|
|
this.title = (this.form.type === '1' ? "修改工业工程" : "修改市政工程");
|
|
|
this.currentType = 'put'
|
|
@@ -822,7 +823,9 @@ export default {
|
|
|
this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
|
|
|
this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
|
|
|
}
|
|
|
-
|
|
|
+ if (this.form.enginClassification != [] && this.form.enginClassification.length>0) {
|
|
|
+ this.form.enginClassification = this.form.enginClassification.join(',');
|
|
|
+ }
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
this.form.files = this.$refs.obsFileUpload.fileList;
|