暂存
This commit is contained in:
@@ -4,7 +4,23 @@
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module ></public-module>
|
||||
<!-- <view class="title">{{pageName+pageType}}</view> -->
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<view class="input_box" v-if="!form.id && form.type != 2">
|
||||
<uni-forms-item label="" name="type" label-width="0">
|
||||
<text class="input_tit"><i>*</i>类型:</text>
|
||||
<view class="in" style="flex: 1; border: none;">
|
||||
<!-- {{modelLIst}} -->
|
||||
<uni-data-select placeholder="请选择类型"
|
||||
class="addType"
|
||||
v-model="form.type"
|
||||
:localdata="range"
|
||||
|
||||
placement="top"
|
||||
></uni-data-select>
|
||||
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<uni-forms-item label="" name="title" label-width="0">
|
||||
<text class="input_tit"><i>*</i>标题:</text>
|
||||
@@ -72,10 +88,22 @@
|
||||
img: '', //图片
|
||||
type: undefined, // 反馈类型
|
||||
},
|
||||
range:[
|
||||
{ value: '0', text: "班内作业",name:"班内作业"},
|
||||
{ value: '1', text: "班内医案" ,name:"班内医案"},
|
||||
],
|
||||
telError: false,
|
||||
relationError: false,
|
||||
relationErrorPattern:false,
|
||||
rules: {
|
||||
type: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请选择类型',
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
title: {
|
||||
rules: [{
|
||||
required: true,
|
||||
@@ -105,6 +133,11 @@
|
||||
this.pageType = e.type
|
||||
this.form.classId = e.classId
|
||||
this.form.type = e.type
|
||||
if(e.type){
|
||||
this.form.type = e.type
|
||||
}else{
|
||||
this.form.type = '0'
|
||||
}
|
||||
if(e.id){
|
||||
// this.form.renwuId = e.renwuId
|
||||
this.form.id = e.id
|
||||
@@ -120,6 +153,8 @@
|
||||
this.pageType = '医案'
|
||||
}else if( e.type == 2){
|
||||
this.pageType = '心得'
|
||||
}else{
|
||||
this.pageType = '作业'
|
||||
}
|
||||
console.log('收到的值', e);
|
||||
},
|
||||
@@ -219,11 +254,6 @@
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.form.validate().then(res => {
|
||||
// var _show = '1'
|
||||
// if(this.form.type == 2){
|
||||
// this.form.display == true ? _show = '1' : _show = '0'
|
||||
// }
|
||||
|
||||
if (this.fileList1.length > 0) {
|
||||
let _list = this.fileList1
|
||||
_list = _list.map(item => item.url)
|
||||
@@ -254,9 +284,10 @@
|
||||
icon:'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.$emit('refreshData');
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
})
|
||||
},1000)
|
||||
}).catch(e => {
|
||||
// console.log('表单错误信息:', err);
|
||||
|
||||
Reference in New Issue
Block a user