Commit d66971a4 authored by 13841799530's avatar 13841799530

解润东

20220511
取消巡查接口联调
parent 706c7a6b
Pipeline #8312 passed with stage
in 5 minutes and 1 second
......@@ -38,6 +38,7 @@
:value="applyReason"
placeholder="请选择"
@click="showReason = true"
:rules="[{ required: true, message: '请选择申请原因' }]"
/>
<van-popup v-model="showReason" position="bottom">
<van-picker
......@@ -58,24 +59,23 @@
autosize
placeholder="请输入"
/>
</van-form>
<div class="operation-btn">
<van-button
<!-- <van-button
block
type="info"
plain
native-type="button"
style="border-radius: 5px; background-color: #f0f1f5; margin-bottom: 10px;"
@click="cancel"
>取消</van-button>
>取消</van-button> -->
<van-button
block
type="info"
native-type="submit"
style="border-radius: 5px;"
@click="save"
>提交</van-button>
</div>
</van-form>
</div>
</template>
......@@ -96,7 +96,9 @@ export default {
showReason: false,
columnsReason: ["今日请假", "今日外出、离岗", "今日调休"],
measures: "",
isShow: true
isShow: true,
content:'',
applyTime:this.util.timestampToTime(new Date(),'DT2',true)
};
},
methods: {
......@@ -112,31 +114,35 @@ export default {
this.applyReason = value;
},
onSubmit(values) {
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
console.log(values);
// this.$toast.loading({
// message: "提交中...",
// forbidClick: true,
// loadingType: "spinner",
// duration: 0,
// });
console.log(values)
this.$toast.loading({
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
if(this.radio=='1'){
this.content=this.applyReason
}else if(this.radio=='2'){
this.content=this.measures
}
postFun('patrol/cancel', {content:this.content,applyTime:this.applyTime})
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
},
save(){
// postReAdd(url, formdata)
// .then((res) => {
// this.$toast.clear();
// this.$toast.success({
// message: "提交成功",
// duration: 2000,
// });
// history.go(-1);
// })
// .catch(() => {
// this.$toast.clear();
// this.$toast.fail("提交失败,请稍后再试");
// });
// this.$toast.clear();
},
save(){},
cancel() {
this.$router.go(-1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment