保存进度!
This commit is contained in:
@@ -33,7 +33,10 @@ Copyright © CPIC All rights reserved
|
||||
<span>发布、修订年份</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input v-model.lazy.number.trim="ui.newRegulatory.release_year" />
|
||||
<el-input
|
||||
ref="releaseYear"
|
||||
v-model.lazy.number.trim="ui.newRegulatory.release_year"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
@@ -42,6 +45,7 @@ Copyright © CPIC All rights reserved
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-input
|
||||
ref="comment"
|
||||
v-model.lazy.trim="ui.newRegulatory.comment"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
@@ -259,6 +263,9 @@ export default {
|
||||
});
|
||||
|
||||
const regulatoryName = ref<any>( null );
|
||||
const departmentName = ref<any>( null );
|
||||
const releaseYear = ref<any>( null );
|
||||
const comment = ref<any>( null );
|
||||
|
||||
|
||||
const render: Render = function ( response: AddNewRegulatoryResponse ) :void
|
||||
@@ -411,7 +418,7 @@ export default {
|
||||
|
||||
const onBeforeUpload = ( uploadFile: UploadFile ): boolean =>
|
||||
{
|
||||
let result = true;
|
||||
const result = true;
|
||||
|
||||
console.log( "上传的文件名", uploadFile.name );
|
||||
|
||||
@@ -431,11 +438,40 @@ export default {
|
||||
console.log( "制度对象:", ui.newRegulatory );
|
||||
|
||||
// 防御验证
|
||||
if ( ui.newRegulatory.department_name.length === 0 )
|
||||
if ( ui.newRegulatory.regulatory_name.length === 0 )
|
||||
{
|
||||
ElMessage.error( "制度名称为空!" );
|
||||
ElMessage.error( "制度名称名称不能为空!" );
|
||||
console.log( regulatoryName );
|
||||
regulatoryName.value.focus();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ui.newRegulatory.department_name.length === 0 )
|
||||
{
|
||||
ElMessage.error( "部门名称不能为空!" );
|
||||
console.log( regulatoryName );
|
||||
departmentName.value.focus();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ui.newRegulatory.release_year.length === 0 )
|
||||
{
|
||||
ElMessage.error( "发布年份不能为空!" );
|
||||
|
||||
releaseYear.value.focus();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ui.newRegulatory.regulatory_files.length === 0 )
|
||||
{
|
||||
ElMessage.error( "没有上传相关制度文件!" );
|
||||
|
||||
console.log( ui.newRegulatory.regulatory_files );
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user