|
|
@ -55,7 +55,7 @@ export default { |
|
|
|
rules: { |
|
|
|
name: [ |
|
|
|
{ required: true, message: "请输入名称", trigger: "blur" }, |
|
|
|
{ max: 20, message: "名称最长为20个字符", trigger: "blur" }, |
|
|
|
{ max: 50, message: "名称最长为50个字符", trigger: "blur" }, |
|
|
|
], |
|
|
|
groupId: [{ required: true, message: "请选择小组", trigger: "change" }], |
|
|
|
doneTime: [ |
|
|
@ -292,6 +292,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleAddPro() { |
|
|
|
this.handleSearchDialogPro(); |
|
|
|
this.dialogVisible = true; |
|
|
|
}, |
|
|
|
// 检索 |
|
|
@ -325,6 +326,26 @@ export default { |
|
|
|
this.radioValue = ""; |
|
|
|
this.dialogVisible = false; |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleGoBack() { |
|
|
|
if (this.previewMode) { |
|
|
|
this.$router.go(-1); |
|
|
|
return; |
|
|
|
} |
|
|
|
// 二次确认返回是否保存数据 |
|
|
|
this.$confirm("是否保存信息", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.handleSubmit(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
// 取消返回 |
|
|
|
this.$router.go(-1); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getDicts("embankment_type").then((response) => { |
|
|
@ -364,6 +385,7 @@ export default { |
|
|
|
<el-input |
|
|
|
:disabled="previewMode" |
|
|
|
style="width: 240px" |
|
|
|
:maxLength="50" |
|
|
|
v-model="ruleForm.name" |
|
|
|
placeholder="请输入" |
|
|
|
/> |
|
|
@ -461,6 +483,7 @@ export default { |
|
|
|
:disabled="previewMode" |
|
|
|
type="textarea" |
|
|
|
:rows="5" |
|
|
|
:maxLength="500" |
|
|
|
placeholder=" 请输入" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
@ -574,7 +597,7 @@ export default { |
|
|
|
<el-button type="primary" @click="handleSubmit" v-if="!previewMode" |
|
|
|
>确认</el-button |
|
|
|
> |
|
|
|
<el-button @click="$router.go(-1)">返回</el-button> |
|
|
|
<el-button @click="handleGoBack">返回</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 添加堤防弹窗 --> |
|
|
|