|
@@ -81,7 +81,7 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="addNodeInfo(scope.row)"
|
|
|
v-hasPermi="['zdsz:engineeringInfrastructure:add']"
|
|
|
- >填写节点信息
|
|
|
+ >修改节点信息
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -545,48 +545,22 @@ export default {
|
|
|
enginName: [
|
|
|
{ required: true, message: "工程名称不能为空" ,trigger: 'blur'}
|
|
|
],
|
|
|
- supervisionUnit: [
|
|
|
- { required: true, message: "监理单位不能为空" ,trigger: 'blur'}
|
|
|
- ],
|
|
|
- district: [
|
|
|
- { required: true, message: "现场负责人不能为空" ,trigger: 'blur'}
|
|
|
- ],
|
|
|
- supervisionPhone: [
|
|
|
- { required: true, message: "建立联系电话不能为空" ,trigger: 'blur'}
|
|
|
- ],
|
|
|
- constructUnit: [
|
|
|
- { required: true, message: "建筑单位不能为空" ,trigger: 'blur'}
|
|
|
- ],
|
|
|
- areaId: [
|
|
|
- { required: true, message: "设计负责人不能为空" ,trigger: 'blur'}
|
|
|
- ],
|
|
|
- plannedDuration: [
|
|
|
- { required: true, message: "设计单位不能为空" ,trigger: 'blur'}
|
|
|
- ],
|
|
|
- designPhone: [
|
|
|
- { required: true, message: "联系方式不能为空" ,trigger: 'blur'}
|
|
|
- ],
|
|
|
- supervisionHead: [
|
|
|
- { required: true, message: "监理负责人不能为空" ,trigger: 'blur'}
|
|
|
- ],
|
|
|
constructUnit: [
|
|
|
- { required: true, message: "建设单位不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "建设单位不能为空" ,trigger: 'blur'}
|
|
|
],
|
|
|
- unitId: [
|
|
|
- { required: true, message: "单元不能为空", trigger: "change" }
|
|
|
+ startTime: [
|
|
|
+ { required: true, message: "开工时间不能为空", trigger: "change" }
|
|
|
],
|
|
|
- houseId: [
|
|
|
- { required: true, message: "房间不能为空", trigger: "change" }
|
|
|
+ completedTime: [
|
|
|
+ { required: true, message: "竣工时间不能为空", trigger: "change" }
|
|
|
],
|
|
|
- type: [
|
|
|
- { required: false, message: "类型不能为空", trigger: "change" }
|
|
|
+ plannedDuration: [
|
|
|
+ { required: true, message: "计划工期不能为空", trigger: "blur" }
|
|
|
],
|
|
|
- isQualified: [
|
|
|
- { required: true, message: "安检是否合格不能为空", trigger: "blur" }
|
|
|
+ enginContent: [
|
|
|
+ { required: true, message: "工程内容不能为空", trigger: "blur" }
|
|
|
],
|
|
|
- // enginContent: [
|
|
|
- // { required: false, message: "备注不能为空", trigger: "blur" }
|
|
|
- // ],
|
|
|
+
|
|
|
},
|
|
|
// 节点规则校验
|
|
|
nodeRules:{
|
|
@@ -812,7 +786,7 @@ export default {
|
|
|
onClose(){
|
|
|
console.log(this.currentCheckList)
|
|
|
this.currentCheckList = []
|
|
|
- this.$refs.nodeForm.resetFields()
|
|
|
+ this.$refs['form'].resetFields()
|
|
|
},
|
|
|
closeToSucceed(){
|
|
|
this.open = false;
|
|
@@ -878,27 +852,35 @@ export default {
|
|
|
delete nodeItem.zEngiineeringPhotoBoList
|
|
|
nodeCollection.push(nodeItem)
|
|
|
})
|
|
|
- this.queryParams.files = this.$refs['obsFileUpload'].fileList;
|
|
|
this.queryParams.zEngineeringNodeBoList = nodeCollection
|
|
|
console.log('queryParams',this.queryParams)
|
|
|
if (this.title == '修改基建工程') {
|
|
|
- let param = this.queryParams
|
|
|
- delete param.zEngineeringNodeBo
|
|
|
- putEngineeringInfrastructure(param).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: '添加成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.open = false
|
|
|
- console.log('选中节点集合', this.currentCheckList)
|
|
|
- this.currentCheckList = []
|
|
|
- this.getList()
|
|
|
- // this.$emit('closeToSucceed')
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.queryParams.files = this.$refs['obsFileUpload'].fileList;
|
|
|
+ if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
|
|
|
+ this.$message.warning('必须上传文件!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let param = this.queryParams
|
|
|
+ delete param.zEngineeringNodeBo
|
|
|
+ putEngineeringInfrastructure(param).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: '添加成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.open = false
|
|
|
+ console.log('选中节点集合', this.currentCheckList)
|
|
|
+ this.currentCheckList = []
|
|
|
+ this.getList()
|
|
|
+ // this.$emit('closeToSucceed')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
} else if(this.enginNodeStatus == '添加用料'){
|
|
|
- // delete this.queryParams.id
|
|
|
+ this.queryParams.files = this.$refs['obsFileUpload'].fileList;
|
|
|
addEngineeringInfrastructure(this.queryParams).then(res => {
|
|
|
if(res.code == 200){
|
|
|
this.$message({
|
|
@@ -908,22 +890,33 @@ export default {
|
|
|
this.open = false
|
|
|
console.log('选中节点集合',this.currentCheckList)
|
|
|
this.currentCheckList = []
|
|
|
+ this.getList()
|
|
|
// this.$emit('closeToSucceed')
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- addEngineeringInfrastructure(this.queryParams).then(res => {
|
|
|
- if(res.code == 200){
|
|
|
- this.$message({
|
|
|
- message: '新增成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.open = false
|
|
|
- console.log('选中节点集合',this.currentCheckList)
|
|
|
- this.currentCheckList = []
|
|
|
- // this.$emit('closeToSucceed')
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.queryParams.files = this.$refs['obsFileUpload'].fileList;
|
|
|
+ if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
|
|
|
+ this.$message.warning('必须上传文件!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ addEngineeringInfrastructure(this.queryParams).then(res => {
|
|
|
+ if(res.code == 200){
|
|
|
+ this.$message({
|
|
|
+ message: '新增成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.open = false
|
|
|
+ console.log('选中节点集合',this.currentCheckList)
|
|
|
+ this.currentCheckList = []
|
|
|
+ this.getList()
|
|
|
+ // this.$emit('closeToSucceed')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
return
|
|
|
getDictList({enginType:['engineering_infrastructure']}).then(res => {
|