|
@@ -13,11 +13,10 @@
|
|
|
@click="showExecutor = true; hideKeyboard()">
|
|
|
<u-input v-model="formData.executor" placeholder="请选择" :disabled="isview" />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="动火台账状态" prop="workStatus" :required="true"
|
|
|
- v-if="isview">
|
|
|
- <u-input v-model="formData.workStatus" placeholder="请选择" :disabled="isview" />
|
|
|
- <!-- @click="showSex = true; hideKeyboard()" -->
|
|
|
-
|
|
|
+ <u-form-item label="动火台账状态" prop="workStatus" :required="true" v-if="isview">
|
|
|
+ <u-input v-model="formData.workStatus" placeholder="请选择" :disabled="isview" />
|
|
|
+ <!-- @click="showSex = true; hideKeyboard()" -->
|
|
|
+
|
|
|
</u-form-item>
|
|
|
<picker mode="date" :value="dateTime" @change="bindDateChange" :disabled="isview">
|
|
|
<view class="datatime-street">
|
|
@@ -63,8 +62,8 @@
|
|
|
<u-button v-if="isedit" @click="submit('customForm')" type="primary" shape="circle" size="large"
|
|
|
color="#4CB2B6" text="确认修改" style="width:200px">
|
|
|
</u-button>
|
|
|
- <u-button v-else-if="!isedit&&!isview" @click="submit('customForm')" type="primary" shape="circle" size="large"
|
|
|
- color="#4CB2B6" text="确认新增" style="width:200px">
|
|
|
+ <u-button v-else-if="!isedit&&!isview" @click="submit('customForm')" type="primary" shape="circle"
|
|
|
+ size="large" color="#4CB2B6" text="确认新增" style="width:200px">
|
|
|
</u-button>
|
|
|
<u-button v-else-if="isview" @click="submit('customForm')" type="primary" shape="circle" size="large"
|
|
|
color="#4CB2B6" text="返回" style="width:200px">
|
|
@@ -73,11 +72,11 @@
|
|
|
<u-action-sheet :show="showSex" :actions="actionsSex" title="请选择动火台账状态" @close="showSex = false"
|
|
|
@select="sexSelect">
|
|
|
</u-action-sheet>
|
|
|
- <u-action-sheet :show="showExecutor" :actions="actionsExecutor" class="popups" title="请选择动火作业执行人" @close="showExecutor = false"
|
|
|
- @select="clickExecutor">
|
|
|
+ <u-action-sheet :show="showExecutor" :actions="actionsExecutor" class="popups" title="请选择动火作业执行人"
|
|
|
+ @close="showExecutor = false" @select="clickExecutor">
|
|
|
</u-action-sheet>
|
|
|
- <u-action-sheet :show="showOrg" :actions="orgaction" title="请选择单位" class="org-choice popups" @close="showOrg = false"
|
|
|
- @select="orgSelect"></u-action-sheet>
|
|
|
+ <u-action-sheet :show="showOrg" :actions="orgaction" title="请选择单位" class="org-choice popups"
|
|
|
+ @close="showOrg = false" @select="orgSelect"></u-action-sheet>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -105,7 +104,7 @@
|
|
|
screenHeight: this.$screenHeight,
|
|
|
wheight: '',
|
|
|
showExecutor: false, //动火台账执行人
|
|
|
- actionsExecutor:[],
|
|
|
+ actionsExecutor: [],
|
|
|
formData: {
|
|
|
orgName: '',
|
|
|
orgId: '',
|
|
@@ -156,7 +155,7 @@
|
|
|
dateTime: '',
|
|
|
showSex: false,
|
|
|
actionsSex: getDictDatas(DICT_TYPE.FIRE_WORK_STATUS), //性别
|
|
|
- workStatus:getDictDatas(DICT_TYPE.FIRE_WORK_STATUS),//台账状态
|
|
|
+ workStatus: getDictDatas(DICT_TYPE.FIRE_WORK_STATUS), //台账状态
|
|
|
orgaction: [], //单位
|
|
|
showOrg: false
|
|
|
}
|
|
@@ -200,14 +199,12 @@
|
|
|
pageSize: 100,
|
|
|
orgIds: arrOrg,
|
|
|
}).then(response => {
|
|
|
- console.log(response, 'sdsdsd');
|
|
|
this.actionsExecutor = response.data ? response.data.list : []
|
|
|
this.actionsExecutor.map(i => {
|
|
|
i.name = i.empName
|
|
|
})
|
|
|
|
|
|
});
|
|
|
- console.log(this.isedit, 'ffffffff', this.isview);
|
|
|
},
|
|
|
methods: {
|
|
|
clickExecutor(e) { //动火台账执行人
|
|
@@ -220,7 +217,6 @@
|
|
|
// 移出图片函数
|
|
|
async deleteFile(e) {
|
|
|
this.formData.attId = [];
|
|
|
- // console.log('移除了:');
|
|
|
},
|
|
|
selectFile(e) {
|
|
|
let promises = [];
|
|
@@ -254,29 +250,28 @@
|
|
|
id: this.parentId
|
|
|
}).then(response => {
|
|
|
this.formData = response.data
|
|
|
- this.workStatus.map(i=>{
|
|
|
- if(this.formData.workStatus==i.value)
|
|
|
- this.formData.workStatus=i.label
|
|
|
+ this.workStatus.map(i => {
|
|
|
+ if (this.formData.workStatus == i.value)
|
|
|
+ this.formData.workStatus = i.label
|
|
|
})
|
|
|
- console.log(response, 'response')
|
|
|
})
|
|
|
},
|
|
|
bindDateChange(e) {
|
|
|
this.formData.workBegin = e.detail.value
|
|
|
},
|
|
|
bindDateChange2(e) {
|
|
|
- console.log(e.detail, '3');
|
|
|
this.formData.workEnd = e.detail.value
|
|
|
},
|
|
|
submit(ref) {
|
|
|
const end = new Date(this.formData.workEnd).getTime()
|
|
|
const start = new Date(this.formData.workBegin).getTime()
|
|
|
if (start > end) {
|
|
|
- console.log(start,end,'000000000000');
|
|
|
return this.$modal.msg('结束时间不能小于开始时间')
|
|
|
- }
|
|
|
+ }
|
|
|
this.$refs[ref].validate().then(res => {
|
|
|
- this.formData.att = this.formData.attId? this.formData.attId.join('') :this.formData.att
|
|
|
+
|
|
|
+ this.formData.att = this.formData.attId.length > 0 && this.formData.attId[0] ? this.formData
|
|
|
+ .attId[0] : this.formData.att
|
|
|
if (this.isedit) {
|
|
|
fireWorkUpdate(JSON.stringify(this.formData)).then(res => {
|
|
|
this.$modal.msg('修改成功')
|
|
@@ -298,7 +293,6 @@
|
|
|
}
|
|
|
|
|
|
}).catch(err => {
|
|
|
- console.log(err);
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -350,13 +344,15 @@
|
|
|
font-size: 30rpx;
|
|
|
background-color: #4cb2b6;
|
|
|
}
|
|
|
- .popups{
|
|
|
+
|
|
|
+ .popups {
|
|
|
/deep/.u-action-sheet {
|
|
|
overflow-y: auto;
|
|
|
height: 1000rpx;
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.example {
|
|
|
overflow-y: auto;
|
|
|
}
|