|
|
@@ -4,9 +4,9 @@ |
|
|
|
<l-customform v-if="ready" :initFormValue="current" :editMode="editMode" :scheme="scheme" ref="form" /> |
|
|
|
|
|
|
|
<!-- 操作区按钮 --> |
|
|
|
<view v-if="ready" class="padding bg-white margin-tb"> |
|
|
|
<view v-if="ready&&editMode" class="padding bg-white margin-tb"> |
|
|
|
<l-button v-if="editMode" @click="action('save')" size="lg" color="green" class="block" block>提交保存</l-button> |
|
|
|
<l-button v-else @click="action('edit')" size="lg" color="orange" class="block" block>编辑本页</l-button> |
|
|
|
<!-- <l-button v-else @click="action('edit')" size="lg" color="orange" class="block" block>编辑本页</l-button> |
|
|
|
<l-button |
|
|
|
v-if="mode !== 'create' && editMode" |
|
|
|
@click="action('reset')" |
|
|
@@ -26,7 +26,7 @@ |
|
|
|
block |
|
|
|
> |
|
|
|
删除 |
|
|
|
</l-button> |
|
|
|
</l-button> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@@ -111,7 +111,10 @@ export default { |
|
|
|
this.LOADING('正在提交…') |
|
|
|
const formValue = this.$refs.form.getFormValue() |
|
|
|
const postData = await this.getPostData(formValue, this.scheme) |
|
|
|
|
|
|
|
postData[0].schemeInfoId = this.schemeId |
|
|
|
// let formData = JSON.parse(postData[0].formData) |
|
|
|
// if(!formData[this.IDKey]) formData[this.IDKey] = this.GUID() |
|
|
|
// postData[0].formData = JSON.stringify(formData) |
|
|
|
this.HTTP_POST('learun/adms/form/save', postData, '表单提交保存失败').then(success => { |
|
|
|
this.HIDE_LOADING() |
|
|
|
if (!success) { |
|
|
@@ -123,6 +126,9 @@ export default { |
|
|
|
this.mode = 'view' |
|
|
|
this.editMode = false |
|
|
|
this.TOAST('提交保存成功', 'success') |
|
|
|
setTimeout(()=>{ |
|
|
|
this.NAV_BACK() |
|
|
|
},600) |
|
|
|
}) |
|
|
|
return |
|
|
|
|
|
|
|