|
@@ -3,6 +3,9 @@
|
|
<image src="/static/icon/background-from.png" mode="" class="background"></image>
|
|
<image src="/static/icon/background-from.png" mode="" class="background"></image>
|
|
<view class="project-content">
|
|
<view class="project-content">
|
|
<u-form labelPosition="left" :model="form" :rules="rules" ref="form">
|
|
<u-form labelPosition="left" :model="form" :rules="rules" ref="form">
|
|
|
|
+ <u-form-item label="工程名称" labelWidth="150" borderBottom ref="item1">
|
|
|
|
+ <u-input v-model="form.enginName" borderBottom placeholder="请输入工程名称" :disabled="type==1"></u-input>
|
|
|
|
+ </u-form-item>
|
|
<u-form-item label="接警时间" borderBottom ref="item1" labelWidth="150">
|
|
<u-form-item label="接警时间" borderBottom ref="item1" labelWidth="150">
|
|
<u-input v-model="form.repairTime" borderBottom placeholder="请选择接警时间" disabled
|
|
<u-input v-model="form.repairTime" borderBottom placeholder="请选择接警时间" disabled
|
|
@click="showtime=true&&type!=1"></u-input>
|
|
@click="showtime=true&&type!=1"></u-input>
|
|
@@ -29,6 +32,11 @@
|
|
<u-input v-model="form.repairContent" type="textarea" showWordLimit='255' borderBottom
|
|
<u-input v-model="form.repairContent" type="textarea" showWordLimit='255' borderBottom
|
|
:disabled="type==1" placeholder="请输入报修内容"></u-input>
|
|
:disabled="type==1" placeholder="请输入报修内容"></u-input>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
|
+ <u-form-item label="到达时间" labelWidth="150" borderBottom ref="item1">
|
|
|
|
+ <u-input v-model="form.arrivalTime" borderBottom disabled
|
|
|
|
+ @click="showtime4=true&&type!=1"></u-input>
|
|
|
|
+ <u-picker v-model="showtime4" mode="time" :params="params" @confirm="time4()"></u-picker>
|
|
|
|
+ </u-form-item>
|
|
<u-form-item label="损坏原因" labelWidth="150" borderBottom ref="item1">
|
|
<u-form-item label="损坏原因" labelWidth="150" borderBottom ref="item1">
|
|
<u-input v-model="causesOfFamageLabel" disabled @click=" causesOfFamageType = true;" v-if="type!=1"
|
|
<u-input v-model="causesOfFamageLabel" disabled @click=" causesOfFamageType = true;" v-if="type!=1"
|
|
borderBottom placeholder="请选择损坏原因"></u-input>
|
|
borderBottom placeholder="请选择损坏原因"></u-input>
|
|
@@ -38,6 +46,11 @@
|
|
value-name="dictValue" @confirm="causesOfFamage()" :value="form.causesOfFamage"></u-select>
|
|
value-name="dictValue" @confirm="causesOfFamage()" :value="form.causesOfFamage"></u-select>
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
|
+ <u-form-item label="施工管径" labelWidth="150" borderBottom ref="item1">
|
|
|
|
+ <u-input v-model="form.constructionPipeDiameter" borderBottom :disabled="type==1"
|
|
|
|
+ placeholder="请输入施工管径"></u-input>
|
|
|
|
+ </u-form-item>
|
|
|
|
+
|
|
<u-form-item label="管线压力" labelWidth="150" borderBottom ref="item1">
|
|
<u-form-item label="管线压力" labelWidth="150" borderBottom ref="item1">
|
|
<u-input v-model="pipelinePressureLabel" disabled @click=" pipelinePressureType= true;"
|
|
<u-input v-model="pipelinePressureLabel" disabled @click=" pipelinePressureType= true;"
|
|
v-if="type!=1" placeholder="请输入管线压力" borderBottom></u-input>
|
|
v-if="type!=1" placeholder="请输入管线压力" borderBottom></u-input>
|
|
@@ -55,8 +68,39 @@
|
|
placeholder="请输入使用材料"></u-input>
|
|
placeholder="请输入使用材料"></u-input>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
<u-form-item label="维修人" labelWidth="150" borderBottom ref="item1">
|
|
<u-form-item label="维修人" labelWidth="150" borderBottom ref="item1">
|
|
- <u-input v-model="form.maintenanceName" borderBottom :disabled="type==1"
|
|
|
|
- placeholder="请输入维修人"></u-input>
|
|
|
|
|
|
+ <u-input v-model="form.maintenanceName" borderBottom disabled
|
|
|
|
+ placeholder="请输入维修人" @click="workerModel=true&&type!=1"></u-input>
|
|
|
|
+ <!-- <u-select v-model="workerModel" :list="workerList" label-name="name"
|
|
|
|
+ value-name="id" @confirm="Worker()" :value="form.maintenanceName"></u-select> -->
|
|
|
|
+ <u-popup v-model="workerModel" style=
|
|
|
|
+ "height: 50% "mode="bottom">
|
|
|
|
+ <view>
|
|
|
|
+ <u-checkbox-group width="200px" @change="checkboxGroupChange">
|
|
|
|
+ <u-checkbox :customStyle="{marginBottom: '8px'}"
|
|
|
|
+ @change="checkboxChange"
|
|
|
|
+ v-model="item.checked"
|
|
|
|
+ v-for="(item, index) in workerList" :key="item.id"
|
|
|
|
+ :name="item.name"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ >{{item.name}}
|
|
|
|
+ </u-checkbox>
|
|
|
|
+ </u-checkbox-group>
|
|
|
|
+ <view style="display: flex;flex-direction: column;">
|
|
|
|
+ <u-button @click="workerCancel()">取消</u-button>
|
|
|
|
+ <u-button@click="workerButton()">确认</u-button>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </u-popup>
|
|
|
|
+ <u-icon slot="right" name="arrow-right"></u-icon>
|
|
|
|
+ </u-form-item>
|
|
|
|
+ <u-form-item label="施工时间" labelWidth="150" borderBottom ref="item1">
|
|
|
|
+ <u-input v-model="form.constructionTime" borderBottom disabled
|
|
|
|
+ @click="showtime3=true&&type!=1"></u-input>
|
|
|
|
+ <u-picker v-model="showtime3" mode="time" :params="params" @confirm="time3()"></u-picker>
|
|
|
|
+ </u-form-item>
|
|
|
|
+
|
|
|
|
+ <u-form-item label="现场领导" labelWidth="150" borderBottom ref="item1">
|
|
|
|
+ <u-input v-model="form.onSiteLeadership" borderBottom placeholder="请输入现场领导" :disabled="type==1"></u-input>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
<u-form-item label="完成时间" labelWidth="150" borderBottom ref="item1">
|
|
<u-form-item label="完成时间" labelWidth="150" borderBottom ref="item1">
|
|
<u-input v-model="form.maintenanceTime" borderBottom disabled
|
|
<u-input v-model="form.maintenanceTime" borderBottom disabled
|
|
@@ -114,6 +158,8 @@
|
|
causesOfFamageLabel: null,
|
|
causesOfFamageLabel: null,
|
|
pipelinePressureLabel: null,
|
|
pipelinePressureLabel: null,
|
|
showtime2: false,
|
|
showtime2: false,
|
|
|
|
+ showtime3: false,
|
|
|
|
+ showtime4: false,
|
|
headers: {
|
|
headers: {
|
|
MAuthorization: "wxBearer " + uni.getStorageSync('token')
|
|
MAuthorization: "wxBearer " + uni.getStorageSync('token')
|
|
},
|
|
},
|
|
@@ -133,7 +179,15 @@
|
|
typelist2: {},
|
|
typelist2: {},
|
|
labelList: {},
|
|
labelList: {},
|
|
type: 2,
|
|
type: 2,
|
|
- id: null
|
|
|
|
|
|
+ id: null,
|
|
|
|
+ createBy:null,
|
|
|
|
+ workerList:[],
|
|
|
|
+ workerModel:false,
|
|
|
|
+ WorkerList:[],
|
|
|
|
+ WorkerName:null,
|
|
|
|
+ userIdList:[],
|
|
|
|
+ maintenanceName:null
|
|
|
|
+
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad(e) {
|
|
onLoad(e) {
|
|
@@ -147,9 +201,33 @@
|
|
frontColor: '#ffffff',
|
|
frontColor: '#ffffff',
|
|
backgroundColor: '#2d95f4',
|
|
backgroundColor: '#2d95f4',
|
|
})
|
|
})
|
|
|
|
+ this.getUserName()
|
|
|
|
+ this.getWorker()
|
|
},
|
|
},
|
|
onShow() {},
|
|
onShow() {},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ checkboxGroupChange(val)
|
|
|
|
+ {
|
|
|
|
+ this.WorkerList=val
|
|
|
|
+ // this.maintenanceName=this.WorkerList.join(",")
|
|
|
|
+ // console.log(111,this.maintenanceName)
|
|
|
|
+ },
|
|
|
|
+ workerCancel()
|
|
|
|
+ {
|
|
|
|
+ this.WorkerList=[]
|
|
|
|
+ this.workerModel=false
|
|
|
|
+ },
|
|
|
|
+ workerButton()
|
|
|
|
+ {
|
|
|
|
+ this.form.maintenanceName=this.WorkerList.join(",")
|
|
|
|
+ console.log(111,this.form.maintenanceName)
|
|
|
|
+ this.workerModel=false
|
|
|
|
+ },
|
|
|
|
+ checkboxChange(val)
|
|
|
|
+ {
|
|
|
|
+ console.log(222,val)
|
|
|
|
+ },
|
|
|
|
+
|
|
getdictsysinfo() {
|
|
getdictsysinfo() {
|
|
let _this = this
|
|
let _this = this
|
|
service.getDictInfoList({
|
|
service.getDictInfoList({
|
|
@@ -224,6 +302,18 @@
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ Worker(val)
|
|
|
|
+ {
|
|
|
|
+ console.log(val)
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ getWorker()
|
|
|
|
+ {
|
|
|
|
+ service.getWorker().then(res=>{
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.workerList=res
|
|
|
|
+ })
|
|
|
|
+ },
|
|
time(e) {
|
|
time(e) {
|
|
console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
|
|
console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
|
|
this.form.repairTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
|
|
this.form.repairTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
|
|
@@ -232,6 +322,14 @@
|
|
console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
|
|
console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
|
|
this.form.maintenanceTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
|
|
this.form.maintenanceTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
|
|
},
|
|
},
|
|
|
|
+ time3(e) {
|
|
|
|
+ console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
|
|
|
|
+ this.form.constructionTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
|
|
|
|
+ },
|
|
|
|
+ time4(e) {
|
|
|
|
+ console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
|
|
|
|
+ this.form.arrivalTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
|
|
|
|
+ },
|
|
save() {
|
|
save() {
|
|
let _this = this
|
|
let _this = this
|
|
// this.form.unitId=this.unit
|
|
// this.form.unitId=this.unit
|
|
@@ -241,6 +339,8 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.form.photoList = this.imgArr
|
|
this.form.photoList = this.imgArr
|
|
|
|
+ this.form.userId=this.userId
|
|
|
|
+ this.form.createBy=this.userId
|
|
service.setemergencyRepair(this.form).then(res => {
|
|
service.setemergencyRepair(this.form).then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
_this.$UTILS.showPrompt('上报成功!')
|
|
_this.$UTILS.showPrompt('上报成功!')
|
|
@@ -251,6 +351,7 @@
|
|
// })
|
|
// })
|
|
// }, 2000)
|
|
// }, 2000)
|
|
this.form={}
|
|
this.form={}
|
|
|
|
+ this.maintenanceName=''
|
|
this.labelList.repair_type=''
|
|
this.labelList.repair_type=''
|
|
this.repairTypeLabel=''
|
|
this.repairTypeLabel=''
|
|
this.labelList.causes_of_damage=''
|
|
this.labelList.causes_of_damage=''
|
|
@@ -264,6 +365,12 @@
|
|
this.imgymxs=[]
|
|
this.imgymxs=[]
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getUserName(){
|
|
|
|
+ service.getUserName().then(res=>{
|
|
|
|
+ this.userId=res.id
|
|
|
|
+ this.createBy=res.name
|
|
|
|
+ })
|
|
|
|
+ },
|
|
repairType(e) {
|
|
repairType(e) {
|
|
console.log(e[0])
|
|
console.log(e[0])
|
|
this.form.repairType = e[0].value
|
|
this.form.repairType = e[0].value
|
|
@@ -299,7 +406,7 @@
|
|
console.log('图片')
|
|
console.log('图片')
|
|
let _this = this;
|
|
let _this = this;
|
|
uni.chooseImage({
|
|
uni.chooseImage({
|
|
- sourceType: ['camera'],
|
|
|
|
|
|
+ sourceType: ['camera','album'],
|
|
success(resp) {
|
|
success(resp) {
|
|
console.log('res--uni.chooseMedia', resp);
|
|
console.log('res--uni.chooseMedia', resp);
|
|
resp.tempFiles.forEach((item, index) => {
|
|
resp.tempFiles.forEach((item, index) => {
|