|
@@ -23,8 +23,8 @@ export default {
|
23
|
23
|
return {
|
24
|
24
|
ruleForm: {
|
25
|
25
|
id: '',
|
26
|
|
- userName: '',
|
27
|
|
- loginName: '',
|
|
26
|
+ name: '',
|
|
27
|
+ tel: '',
|
28
|
28
|
remark: '',
|
29
|
29
|
pageNum: 1,
|
30
|
30
|
pageSize: 10,
|
|
@@ -51,31 +51,31 @@ export default {
|
51
|
51
|
}
|
52
|
52
|
},
|
53
|
53
|
mounted() {
|
54
|
|
- console.log('this.$route.query.id',this.$route.query.id)
|
55
|
|
- this.getOperateId(this.$route.query.id)
|
|
54
|
+ console.log('this.$route.query.id', this.$route.query.id)
|
|
55
|
+ this.getOperateId(this.$route.query.id)
|
56
|
56
|
},
|
57
|
57
|
methods: {
|
58
|
|
- getOperateId(id){
|
59
|
|
- this.ruleForm.id = id
|
60
|
|
- this.$store.dispatch('GetOperateId', this.ruleForm).then((res) => {
|
61
|
|
- this.ruleForm.name = res.data.name
|
62
|
|
- this.ruleForm.tel = res.data.tel
|
63
|
|
- this.ruleForm.remark = res.data.remark
|
|
58
|
+ getOperateId(id) {
|
|
59
|
+ this.ruleForm.id = id
|
|
60
|
+ this.$store.dispatch('GetOperateId', this.ruleForm).then((res) => {
|
|
61
|
+ this.ruleForm.name = res.data.name
|
|
62
|
+ this.ruleForm.tel = res.data.tel
|
|
63
|
+ this.ruleForm.remark = res.data.remark
|
64
|
64
|
}).catch(() => {
|
65
|
65
|
console.log('error getOperateId')
|
66
|
|
- })
|
|
66
|
+ })
|
67
|
67
|
},
|
68
|
|
- editPhone(){
|
69
|
|
- this.$store.dispatch('Phoneedit', this.ruleForm).then((res) => {
|
70
|
|
- if(res.code == '0'){
|
71
|
|
- this.$message({
|
72
|
|
- message: '修改成功',
|
73
|
|
- type: 'success'
|
74
|
|
- });
|
75
|
|
- this.$router.push({ name: 'phoneconfig-phoneconfigIndex'})
|
76
|
|
- }else{
|
77
|
|
- this.$message.error(res.message);
|
78
|
|
- }
|
|
68
|
+ editPhone() {
|
|
69
|
+ this.$store.dispatch('Phoneedit', this.ruleForm).then((res) => {
|
|
70
|
+ if (res.code === '0') {
|
|
71
|
+ this.$message({
|
|
72
|
+ message: '修改成功',
|
|
73
|
+ type: 'success'
|
|
74
|
+ })
|
|
75
|
+ this.$router.push({ name: 'phoneconfig-phoneconfigIndex' })
|
|
76
|
+ } else {
|
|
77
|
+ this.$message.error(res.message)
|
|
78
|
+ }
|
79
|
79
|
}).catch(() => {
|
80
|
80
|
console.log('error Phoneedit')
|
81
|
81
|
})
|