|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<el-dialog :visible.sync="fillFormDialog" title="填报" width="800px" @close="closeDialogFillForm" class="form-style">
|
|
<el-dialog :visible.sync="fillFormDialog" title="填报" width="800px" @close="closeDialogFillForm" class="form-style">
|
|
<div style="padding:20px 30px;">
|
|
<div style="padding:20px 30px;">
|
|
- <el-form>
|
|
|
|
|
|
+ <el-form ref="form" :model="form" :rules="rules">
|
|
<el-form-item label="任务名称" prop="jobName" class="xinzengRw">
|
|
<el-form-item label="任务名称" prop="jobName" class="xinzengRw">
|
|
<el-input style="width: 80%" v-model="form.jobName" placeholder="请输入任务名称"/>
|
|
<el-input style="width: 80%" v-model="form.jobName" placeholder="请输入任务名称"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -12,8 +12,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
- <el-form-item label="说明" label-width="68px" prop="describe" class="xinzengRw">
|
|
|
|
- <el-input v-model="form.describe" placeholder="请输入材料说明" maxlength = "255"/>
|
|
|
|
|
|
+ <el-form-item label="说明" label-width="68px" prop="describe" class="xinzengRw">
|
|
|
|
+ <el-input v-model="form.describe" placeholder="请输入材料说明" maxlength="255"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -34,9 +34,14 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
form: {},
|
|
form: {},
|
|
|
|
+ rules: {
|
|
|
|
+ describe: [
|
|
|
|
+ {required: true, message: "说明不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
fileType: ['pdf', 'jpg', 'jpeg', 'png'],
|
|
fileType: ['pdf', 'jpg', 'jpeg', 'png'],
|
|
limit: 1,
|
|
limit: 1,
|
|
- isShowTip:false,
|
|
|
|
|
|
+ isShowTip: false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
@@ -63,41 +68,45 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- methods:{
|
|
|
|
|
|
+ methods: {
|
|
/** 设置文件名 */
|
|
/** 设置文件名 */
|
|
- setFileName(fileName){
|
|
|
|
|
|
+ setFileName(fileName) {
|
|
this.form.attachName = fileName;
|
|
this.form.attachName = fileName;
|
|
},
|
|
},
|
|
/** 移除文件名 */
|
|
/** 移除文件名 */
|
|
- removeFile(){
|
|
|
|
|
|
+ removeFile() {
|
|
this.form.attachPath = null;
|
|
this.form.attachPath = null;
|
|
this.form.attachName = null;
|
|
this.form.attachName = null;
|
|
},
|
|
},
|
|
/** 关闭填报弹窗 */
|
|
/** 关闭填报弹窗 */
|
|
- closeDialogFillForm(){
|
|
|
|
|
|
+ closeDialogFillForm() {
|
|
this.fillFormDialog = false
|
|
this.fillFormDialog = false
|
|
},
|
|
},
|
|
/** 填报提交事件 */
|
|
/** 填报提交事件 */
|
|
submitFormFill() {
|
|
submitFormFill() {
|
|
- recordFillForm(this.form).then(res=>{
|
|
|
|
- this.fillFormDialog = false
|
|
|
|
- this.$modal.msgSuccess("填报成功");
|
|
|
|
- this.$emit("get-list")
|
|
|
|
- })
|
|
|
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ recordFillForm(this.form).then(res => {
|
|
|
|
+ this.fillFormDialog = false
|
|
|
|
+ this.$modal.msgSuccess("填报成功");
|
|
|
|
+ this.$emit("get-list")
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
fillFormRecordId: {
|
|
fillFormRecordId: {
|
|
handler(newVal) {
|
|
handler(newVal) {
|
|
if (newVal) {
|
|
if (newVal) {
|
|
- this.form.recordId=newVal
|
|
|
|
|
|
+ this.form.recordId = newVal
|
|
}
|
|
}
|
|
},
|
|
},
|
|
immediate: true,
|
|
immediate: true,
|
|
},
|
|
},
|
|
- fillFormRecordName:{
|
|
|
|
- handler(newVal){
|
|
|
|
- if(newVal){
|
|
|
|
|
|
+ fillFormRecordName: {
|
|
|
|
+ handler(newVal) {
|
|
|
|
+ if (newVal) {
|
|
this.form.jobName = newVal
|
|
this.form.jobName = newVal
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -112,10 +121,12 @@ export default {
|
|
width: 670px !important;
|
|
width: 670px !important;
|
|
border-radius: 0px;
|
|
border-radius: 0px;
|
|
}
|
|
}
|
|
-.xinzeng .el-form-item--medium .el-form-item__label {
|
|
|
|
|
|
+
|
|
|
|
+.xinzeng .el-form-item--medium .el-form-item__label {
|
|
width: 130px !important;
|
|
width: 130px !important;
|
|
}
|
|
}
|
|
-.tbfj .el-form-item__label{
|
|
|
|
|
|
+
|
|
|
|
+.tbfj .el-form-item__label {
|
|
width: 68px !important;
|
|
width: 68px !important;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|