|
@@ -4,6 +4,21 @@
|
|
|
<view class="uni-list">
|
|
|
<view class="container">
|
|
|
<view>
|
|
|
+ 工程周期
|
|
|
+ </view>
|
|
|
+ <view v-if="this.isEmpty(this.projectValue.dictValue)" style="margin-top: 10;"
|
|
|
+ @click="pickerShow('gczq')">
|
|
|
+ <span style="color: darkgray;">请选择工程周期</span>
|
|
|
+ </view>
|
|
|
+ <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gczq')">
|
|
|
+ <span style="color: black;">{{projectValue.dictLabel}}</span>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="uni-list">
|
|
|
+ <view class="container">
|
|
|
+ <view>
|
|
|
行政区
|
|
|
</view>
|
|
|
<view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
|
|
@@ -76,7 +91,7 @@
|
|
|
<view class="container">
|
|
|
|
|
|
<view class="title">是否按照施工图纸施工</view>
|
|
|
- <switch style="transform: scale(0.6,0.6);" @change="switch2Change" />
|
|
|
+ <switch style="transform: scale(0.6,0.6);" @change="switchChange" checked="isChick" />
|
|
|
|
|
|
</view>
|
|
|
|
|
@@ -112,29 +127,27 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
+ <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
|
|
|
+ <view class="container" style="color: gainsboro;">*请上传照片</view>
|
|
|
+ <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
|
|
|
+ <image src="/static/images/chooseimg.png" mode=""
|
|
|
+ style="width: 190rpx; height: 190rpx; margin: 0 12rpx;; " @click="chooseimage()"></image>
|
|
|
+ <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
|
|
|
+ <view>
|
|
|
+ <image :src="item" mode="" style="width: 190rpx; height: 190rpx; margin: 0 12rpx;"
|
|
|
+ @click="showPhoto(index)">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
|
|
|
- <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
|
|
|
- <view class="container" style="color: gainsboro;">*请上传照片</view>
|
|
|
- <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
|
|
|
- <image src="/static/images/chooseimg.png" mode=""
|
|
|
- style="width: 190rpx; height: 190rpx; margin: 0 12rpx;; " @click="chooseimage()"></image>
|
|
|
- <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
|
|
|
- <view>
|
|
|
- <image :src="item" mode="" style="width: 190rpx; height: 190rpx; margin: 0 12rpx;"
|
|
|
- @click="showPhoto(index)">
|
|
|
- </image>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view @click="remove(index)"
|
|
|
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
|
|
|
- <u-icon name="close" color="#FFFFFF" size="35"></u-icon>
|
|
|
- </view>
|
|
|
+ <view @click="remove(index)"
|
|
|
+ style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
|
|
|
+ <u-icon name="close" color="#FFFFFF" size="35"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
<view class="action-btn">
|
|
|
<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
|
|
|
</view>
|
|
@@ -153,6 +166,7 @@
|
|
|
getBuildingList,
|
|
|
getUnitList,
|
|
|
getHousesList,
|
|
|
+ addTearOldPipe,
|
|
|
} from '@/api/common'
|
|
|
import {
|
|
|
getToken
|
|
@@ -176,6 +190,7 @@
|
|
|
imgArr: [],
|
|
|
XQValue: {},
|
|
|
XZQValue: {},
|
|
|
+ projectValue: {},
|
|
|
LevelValue: {},
|
|
|
LDValue: {},
|
|
|
DYValue: {},
|
|
@@ -186,7 +201,8 @@
|
|
|
DYList: '',
|
|
|
FJList: '',
|
|
|
progress: 0, //上传图片进度百分比
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+ isCheck: true //是否按照施工图纸施工
|
|
|
|
|
|
|
|
|
}
|
|
@@ -308,15 +324,24 @@
|
|
|
//腐蚀等级
|
|
|
getDicts("corrosion_level").then(response => {
|
|
|
console.log(response)
|
|
|
- this.dictOptions = response;
|
|
|
+ this.dictOptions = response.data;
|
|
|
});
|
|
|
|
|
|
- }
|
|
|
- if (e == 'xzq') { //行政区
|
|
|
+ } else if (e == 'gczq') { //工程周期
|
|
|
this.openDict = true;
|
|
|
- getDicts("district").then(response => {
|
|
|
- this.dictOptions = response;
|
|
|
+ getDicts("engin_cycle").then(response => {
|
|
|
+ this.dictOptions = response.data;
|
|
|
});
|
|
|
+ } else if (e == 'xzq') { //行政区
|
|
|
+ if (this.isEmpty(this.projectValue.dictValue)) {
|
|
|
+ this.$modal.msg('请选择工程周期')
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.openDict = true;
|
|
|
+ getDicts("district").then(response => {
|
|
|
+ this.dictOptions = response.data;
|
|
|
+ });
|
|
|
+ }
|
|
|
//this.selectList = this.dictOptions;
|
|
|
|
|
|
} else if (e == 'xq') { //小区
|
|
@@ -358,21 +383,25 @@
|
|
|
},
|
|
|
|
|
|
|
|
|
- switch2Change(e) {
|
|
|
+ switchChange(e) {
|
|
|
console.log('switch2 发生 change 事件,携带值为', e.detail.value)
|
|
|
+ this.isCheck = e.detail.value;
|
|
|
},
|
|
|
changeSelectDict(item, index) {
|
|
|
this.openDict = false;
|
|
|
- if (this.type == 'xzq') {
|
|
|
+ if (this.type == 'gczq') {
|
|
|
+ this.projectValue = item
|
|
|
+
|
|
|
+ } else if (this.type == 'xzq') {
|
|
|
this.XZQValue = item;
|
|
|
|
|
|
//根据行政区id获取小区数据
|
|
|
- this.XQValue.name = ''; //重置小区数据
|
|
|
- this.LDValue.name = ''; //重置楼栋数据
|
|
|
- this.DYValue.name = ''; //重置单元数据
|
|
|
- this.FJValue.name = ''; //重置房间数据
|
|
|
+ this.XQValue = ''; //重置小区数据
|
|
|
+ this.LDValue = ''; //重置楼栋数据
|
|
|
+ this.DYValue = ''; //重置单元数据
|
|
|
+ this.FJValue = ''; //重置房间数据
|
|
|
getAreaList(item.dictValue).then(res => {
|
|
|
- this.XQList = res;
|
|
|
+ this.XQList = res.data;
|
|
|
})
|
|
|
} else {
|
|
|
this.LevelValue = item;
|
|
@@ -386,28 +415,28 @@
|
|
|
if (this.type == 'xq') {
|
|
|
this.XQValue = item;
|
|
|
//根据小区id 获取楼栋数据
|
|
|
- this.LDValue.name = ''; //重置楼栋数据
|
|
|
- this.DYValue.name = ''; //重置单元数据
|
|
|
- this.FJValue.name = ''; //重置房间数据
|
|
|
+ this.LDValue = ''; //重置楼栋数据
|
|
|
+ this.DYValue = ''; //重置单元数据
|
|
|
+ this.FJValue = ''; //重置房间数据
|
|
|
getBuildingList(item.id).then(res => {
|
|
|
- this.LDList = res
|
|
|
+ this.LDList = res.data
|
|
|
// console.log("楼栋=", res)
|
|
|
})
|
|
|
} else if (this.type == 'ld') {
|
|
|
this.LDValue = item;
|
|
|
//根据楼栋ID 获取单元数据
|
|
|
- this.DYValue.name = ''; //重置单元数据
|
|
|
- this.FJValue.name = ''; //重置房间数据
|
|
|
+ this.DYValue = ''; //重置单元数据
|
|
|
+ this.FJValue = ''; //重置房间数据
|
|
|
getUnitList(item.id).then(res => {
|
|
|
- this.DYList = res
|
|
|
+ this.DYList = res.data
|
|
|
// console.log("单元=", res)
|
|
|
})
|
|
|
} else if (this.type == 'dy') {
|
|
|
this.DYValue = item;
|
|
|
//根据单元数据 获取房间数据
|
|
|
- this.FJValue.name = ''; //重置房间数据
|
|
|
+ this.FJValue = ''; //重置房间数据
|
|
|
getHousesList(item.id).then(res => {
|
|
|
- this.FJList = res
|
|
|
+ this.FJList = res.data
|
|
|
// console.log("房间=", res)
|
|
|
})
|
|
|
} else if (this.type == 'fj') {
|
|
@@ -425,7 +454,9 @@
|
|
|
},
|
|
|
//提交数据
|
|
|
submit() {
|
|
|
- if (this.isEmpty(this.XZQValue.dictValue)) {
|
|
|
+ if (this.isEmpty(this.projectValue.dictValue)) {
|
|
|
+ this.$modal.msg("请选择工程周期")
|
|
|
+ } else if (this.isEmpty(this.XZQValue.dictValue)) {
|
|
|
this.$modal.msg("请选择行政区")
|
|
|
} else if (this.isEmpty(this.XQValue.id)) {
|
|
|
this.$modal.msg("请选择小区")
|
|
@@ -435,10 +466,43 @@
|
|
|
this.$modal.msg("请选择单元")
|
|
|
} else if (this.isEmpty(this.FJValue.id)) {
|
|
|
this.$modal.msg("请选择房间")
|
|
|
+ } else if (this.isEmpty(this.LevelValue.dictValue)) {
|
|
|
+ this.$modal.msg("请选择腐蚀等级")
|
|
|
} else if (this.imgArr.length <= 0) {
|
|
|
this.$modal.msg('请上传照片')
|
|
|
} else if (this.loading == false) {
|
|
|
this.$modal.msg('照片未上传完毕,无法提交!')
|
|
|
+ } else {
|
|
|
+ //提交
|
|
|
+ let param = {
|
|
|
+ district: this.XZQValue.dictValue,
|
|
|
+ areaId: this.XQValue.id,
|
|
|
+ buildingId: this.LDValue.id,
|
|
|
+ unitId: this.DYValue.id,
|
|
|
+ houseId: this.FJValue.id,
|
|
|
+ enginType: 'old_renovation', //写死
|
|
|
+ enginClassification: 'indoor_engineering', //写死
|
|
|
+ enginCycle: this.projectValue.dictValue, //工程周期
|
|
|
+ zEngineeringNodeBo: {
|
|
|
+ type: "dismantling_old_pipes",
|
|
|
+ zEngineeringInfoBo: {
|
|
|
+ constructAccordingDrawings: this.isCheck, //是否按图纸施工
|
|
|
+ zEngiineeringPhotoBoList: this.imgArr, //照片集合
|
|
|
+ zEngineeringMaterialBo: [{
|
|
|
+ corrosionLevel: this.LevelValue.dictValue
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ addTearOldPipe(param).then(res => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ this.$modal.msg(res.msg)
|
|
|
+ uni.navigateBack();
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|