作业编辑

This commit is contained in:
shijing 2023-04-06 13:17:30 +08:00
parent d39046d7f5
commit 5867223df7
2 changed files with 25 additions and 14 deletions

View File

@ -7,7 +7,7 @@
<text class="star">*</text>
<text>作业简介</text>
</view>
<textarea class="apply-reason-text" v-model="formData.name" maxlength="250" placeholder="请输入" />
<textarea class="apply-reason-text" :disabled="type==='editOpretion'" v-model="formData.name" maxlength="250" placeholder="请输入" />
</view>
<view class="form-info">
<view class="form-content ">
@ -16,7 +16,7 @@
<text class="form-left-text">具体地点</text>
</view>
<view class="form-right">
<input type="text" v-model="formData.place" maxlength="50" placeholder="请输入" />
<input type="text" :disabled="type==='editOpretion'" v-model="formData.place" maxlength="50" placeholder="请输入" />
</view>
</view>
<view class="form-item border-bottom">
@ -25,13 +25,15 @@
<text class="form-left-text">作业时间</text>
</view>
<view class="form-right form-date">
<view class="form-right form-date">
<text v-if="type==='editOpretion'">{{formData.start_time}}-{{formData.end_time}}</text>
<view class="form-right form-date" v-else>
<uni-datetime-picker
v-model="datetimerange"
type="datetimerange"
rangeSeparator="至"
:hide-second="true"
/>
:disabled="type==='editOpretion'"
v-model="datetimerange"
type="datetimerange"
rangeSeparator="至"
:hide-second="true"
/>
</view>
</view>
</view>
@ -41,18 +43,19 @@
<text class="form-left-text">生产状态</text>
</view>
<view class="form-right">
<uni-data-select v-model="formData.state_work" :localdata="stateRange">
<text v-if="type==='editOpretion'">{{formData.state_work}}</text>
<uni-data-select v-else v-model="formData.state_work" :localdata="stateRange" >
</uni-data-select>
</view>
</view>
<view class="form-item border-bottom">
<view class="form-left">
<text class="star">*</text>
<text class="form-left-text">作业区域</text>
</view>
<view class="form-right">
<uni-data-select v-model="formData.area" :localdata="range" @change="areaChange">
<text v-if="type==='editOpretion'">{{area_name}}</text>
<uni-data-select v-else v-model="formData.area" :localdata="range" @change="areaChange" >
</uni-data-select>
</view>
</view>
@ -138,6 +141,7 @@
dept_bus: '', //
coordinator: '', //
},
area_name:'',
dept_bus_name:'请选择业务部门',
dept_ter_name:'请选择属地部门',
dcoordinator_name:'请选择部门协调员',
@ -162,6 +166,7 @@
],
//
depRange: [],
type:'',
}
},
watch: {
@ -175,7 +180,7 @@
this.operationId = params.operationId;
this.type = params.type;
this.getOperation();
if(params.type==='edit'){
if(params.type==='edit'||params.type==='editOpretion'){
this.showBtns = true;
}else{
this.showBtns = false;
@ -272,6 +277,7 @@
that.formData.vchannel = res.vchannels[0]
}
that.operationName = res.name; //
that.area_name = res.area_.name; //
that.dept_ter_name = res.dept_ter_.name; //
that.dept_bus_name = res.dept_bus_.name; //
that.dcoordinator_name = res.coordinator_name; //

View File

@ -40,6 +40,10 @@
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
编辑
</view>
<view class="shenhezhong shenhe-status" @click="operationHandle(val,'editOpretion')" v-else-if="val.state!==50&&dataTypye==='isMy'">
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
编辑
</view>
<view class="shenhezhong shenhe-status" @click="operationDetail(val)" style="color: #15a306;">
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
查看
@ -48,10 +52,10 @@
<image src="../../../static/my/my_apply/return.png" mode=""></image>
删除
</view>
<view class="shenhezhong shenhe-status" @click="operationWarning(val)" style="color: orange;" v-if="val.state===30||val.state===40">
<!-- <view class="shenhezhong shenhe-status" @click="operationWarning(val)" style="color: orange;" v-if="val.state===30||val.state===40">
<image src="../../../static/my/my_apply/orange-time.png" mode=""></image>
新增违规
</view>
</view> -->
</view>
</view>
</view>
@ -85,6 +89,7 @@
},
onLoad() {
this.params.create_by = this.vuex_user.id;
console.log(this.vuex_user)
},
//
onReachBottom() {