|
@@ -194,12 +194,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<div style="text-align: center">
|
|
<div style="text-align: center">
|
|
- <el-button type="primary" @click="doAddRule" v-if="isCreate"
|
|
|
|
- >确 定</el-button
|
|
|
|
- >
|
|
|
|
- <el-button type="primary" @click="doEditRule" v-if="!isCreate"
|
|
|
|
- >确 定</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" @click="doSaveRule">确 定</el-button>
|
|
<el-button @click="loginRuleDialogClose">取 消</el-button>
|
|
<el-button @click="loginRuleDialogClose">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -294,18 +289,23 @@ export default {
|
|
loginRuleDialogClose() {
|
|
loginRuleDialogClose() {
|
|
this.loginRuleDialog = false;
|
|
this.loginRuleDialog = false;
|
|
},
|
|
},
|
|
- doAddRule() {
|
|
|
|
|
|
+ doSaveRule() {
|
|
this.$refs.loginRuleForm.validate(valid => {
|
|
this.$refs.loginRuleForm.validate(valid => {
|
|
if (!valid) {
|
|
if (!valid) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- // this.loginRuleDialogClose();
|
|
|
|
|
|
+ let url = CORE_API + "/sys/xlogin/rule/save";
|
|
|
|
+ this.$http.post(url, this.loginRuleForm).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "保存成功"
|
|
|
|
+ });
|
|
|
|
+ this.doSearch();
|
|
|
|
+ this.loginRuleDialogClose();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- doEditRule() {
|
|
|
|
- this.loginRuleDialogClose();
|
|
|
|
- },
|
|
|
|
doDeleteRule(row) {
|
|
doDeleteRule(row) {
|
|
this.$confirm("确认删除?", "提示", {
|
|
this.$confirm("确认删除?", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|