|
@@ -1372,69 +1372,78 @@ export default {
|
|
|
this.nodeDetailVisible = false
|
|
|
},
|
|
|
toNodeDetail() {
|
|
|
- let nodeCollection = []
|
|
|
- // 收集节点信息
|
|
|
- this.currentCheckList.forEach((e, idx) => {
|
|
|
- let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
|
|
|
- // console.log(nodeItem)
|
|
|
- nodeCollection.push(nodeItem)
|
|
|
- })
|
|
|
- this.queryParams.zEngineeringNodeBoList = nodeCollection
|
|
|
- if (this.enginNodeStatus == '修改') {
|
|
|
- putEngineeringCivil(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')
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (this.enginNodeStatus == '添加用料') {
|
|
|
- addEngineeringCivil(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')
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (this.enginNodeStatus == '添加用料') {
|
|
|
- addEngineeringCivil(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')
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- addEngineeringCivil(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){
|
|
|
+ let nodeCollection = []
|
|
|
+ // 收集节点信息
|
|
|
+ this.currentCheckList.forEach((e, idx) => {
|
|
|
+ let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
|
|
|
+ // console.log(nodeItem)
|
|
|
+ nodeCollection.push(nodeItem)
|
|
|
+ })
|
|
|
+ this.queryParams.zEngineeringNodeBoList = nodeCollection
|
|
|
+ if (this.enginNodeStatus == '修改') {
|
|
|
+ putEngineeringCivil(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')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.enginNodeStatus == '添加用料') {
|
|
|
+ addEngineeringCivil(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')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.enginNodeStatus == '添加用料') {
|
|
|
+ addEngineeringCivil(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')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ addEngineeringCivil(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')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ this.$message.error(`请完善信息!`);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
return
|
|
|
getDictList({enginType: ['new_built', 'old_renovation']}).then(res => {
|