Commit adcc93e2 authored by xd's avatar xd

后台管理系统修改

parent bf1133fb
...@@ -20,12 +20,12 @@ export default [ ...@@ -20,12 +20,12 @@ export default [
path: '/in/contact', path: '/in/contact',
title: '通讯录管理', title: '通讯录管理',
icon: '' icon: ''
}, }
{ // {
path: '/active/mode', // path: '/active/mode',
title: '活动模版管理', // title: '活动模版管理',
icon: '' // icon: ''
}, // },
/* { /* {
path: '/task/main', path: '/task/main',
title: '任务管理', title: '任务管理',
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleAddCancel" size="small">取 消</el-button> <el-button @click="handleAddCancel" size="small">取 消</el-button>
<el-button type="primary" @click="handleAddFinish" size="small">确 定</el-button> <el-button type="primary" @click="handleAddFinish('addStore')" size="small">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<div></div> <div></div>
...@@ -208,18 +208,24 @@ export default { ...@@ -208,18 +208,24 @@ export default {
handleAddCancel() { handleAddCancel() {
this.$emit("handleAddCancel") this.$emit("handleAddCancel")
}, },
handleAddFinish() { handleAddFinish(formName) {
const clerkIds = this.addForm.clerkId+"" this.$refs[formName].validate((valid) => {
if (valid) {
const clerkIds = this.addForm.clerkId + ""
let data = Object.assign(this.addForm,{ clerkIds }) let data = Object.assign(this.addForm,{ clerkIds })
delete data.clerkId delete data.clerkId
addGroup(data).then(res => { addGroup(data).then(res => {
if(res.data.isSuccessful == 0) { if(res.data.isSuccessful == 0) {
console.log(1);
this.$message.error(res.data.msg) this.$message.error(res.data.msg)
}else{ }else{
this.$emit("handleAddFinish") this.$emit("handleAddFinish")
} }
}) })
} else {
return false;
}
});
// console.log(addGroup) // console.log(addGroup)
}, },
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleEditCancel" size="small">取 消</el-button> <el-button @click="handleEditCancel" size="small">取 消</el-button>
<el-button type="primary" @click="handleEditFinish" size="small">确 定</el-button> <el-button type="primary" @click="handleEditFinish('addStore')" size="small">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<div></div> <div></div>
...@@ -232,7 +232,9 @@ export default { ...@@ -232,7 +232,9 @@ export default {
handleEditCancel() { handleEditCancel() {
this.$emit("handleEditCancel") this.$emit("handleEditCancel")
}, },
handleEditFinish() { handleEditFinish(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
const clerkIds = this.addForm.clerkId+"" const clerkIds = this.addForm.clerkId+""
let data = Object.assign(this.addForm,{ clerkIds }) let data = Object.assign(this.addForm,{ clerkIds })
delete data.clerkId delete data.clerkId
...@@ -240,9 +242,16 @@ export default { ...@@ -240,9 +242,16 @@ export default {
if(res.result == 'success') { if(res.result == 'success') {
this.$emit("handleEditFinish") this.$emit("handleEditFinish")
}else { }else {
this.$success.err('修改失败') this.$message.error('修改失败')
} }
}) })
} else {
return false;
}
});
}, },
// 获取所有人员 // 获取所有人员
......
...@@ -136,8 +136,8 @@ export default { ...@@ -136,8 +136,8 @@ export default {
// 具体需要传递的数据请自行修改代码 // 具体需要传递的数据请自行修改代码
this.login({ this.login({
loginName: this.formLogin.username, loginName: this.formLogin.username,
loginPwd: md5(this.formLogin.password) // loginPwd: md5(this.formLogin.password)
// loginPwd: this.formLogin.password loginPwd: this.formLogin.password
}).then(() => { }).then(() => {
// 重定向对象不存在则返回顶层路径 // 重定向对象不存在则返回顶层路径
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment