|
@@ -294,14 +294,17 @@ export default {
|
|
console.log('添加');
|
|
console.log('添加');
|
|
},
|
|
},
|
|
// 修改handleEdit
|
|
// 修改handleEdit
|
|
- async toEdit({ data }) {
|
|
|
|
|
|
+ async handleEdit1(data) {
|
|
if (data.role == '6') {
|
|
if (data.role == '6') {
|
|
|
|
+ // console.log();
|
|
const res = await this.exportuserFetch(data.uid);
|
|
const res = await this.exportuserFetch(data.uid);
|
|
|
|
+ console.log(res);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$set(this, `form`, res.data);
|
|
this.$set(this, `form`, res.data);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
const res = await this.fetch(data.uid);
|
|
const res = await this.fetch(data.uid);
|
|
|
|
+ console.log(res);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$set(this, `form`, res.data);
|
|
this.$set(this, `form`, res.data);
|
|
}
|
|
}
|
|
@@ -311,7 +314,6 @@ export default {
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
async handleSave() {
|
|
async handleSave() {
|
|
- // console.log(this.form);
|
|
|
|
let data = this.form;
|
|
let data = this.form;
|
|
if (data.role == '4' || data.role == '5') {
|
|
if (data.role == '4' || data.role == '5') {
|
|
data.id = data.uid;
|
|
data.id = data.uid;
|
|
@@ -336,7 +338,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
- toDelete() {},
|
|
|
|
|
|
+ // handleDelete() {},
|
|
// 取消
|
|
// 取消
|
|
handleClose() {
|
|
handleClose() {
|
|
this.dialog = false;
|
|
this.dialog = false;
|
|
@@ -351,29 +353,44 @@ export default {
|
|
this.$set(this.form, `is_qy`, val);
|
|
this.$set(this.form, `is_qy`, val);
|
|
},
|
|
},
|
|
// 审核
|
|
// 审核
|
|
- handleEdit1(data) {
|
|
|
|
- // console.log(data);
|
|
|
|
- this.$set(this, `form`, data);
|
|
|
|
- this.dialog = true;
|
|
|
|
- },
|
|
|
|
|
|
+ // async handleEdit1(data) {
|
|
|
|
+ // const res = await this.exportuserFetch(data.uid);
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // this.$set(this, `form`, data);
|
|
|
|
+ // this.dialog = true;
|
|
|
|
+ // },
|
|
async handleDelete(id) {
|
|
async handleDelete(id) {
|
|
- this.$confirm('您确定要删除此信息吗?', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- .then(async () => {
|
|
|
|
- const res = await this.delete(id);
|
|
|
|
- if (this.$checkRes(res)) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '删除信息成功',
|
|
|
|
- type: 'success',
|
|
|
|
- });
|
|
|
|
- this.search();
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- .catch(() => {});
|
|
|
|
|
|
+ const res = await this.delete(id);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '删除信息成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ });
|
|
|
|
+ this.search();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
+ //删除
|
|
|
|
+ // async handleDelete(id) {
|
|
|
|
+ // console.log(this.form);
|
|
|
|
+ // console.log('-----------');
|
|
|
|
+ // this.$confirm('您确定要删除此信息吗?', '提示', {
|
|
|
|
+ // confirmButtonText: '确定',
|
|
|
|
+ // cancelButtonText: '取消',
|
|
|
|
+ // type: 'warning',
|
|
|
|
+ // })
|
|
|
|
+ // .then(async () => {
|
|
|
|
+ // const res = await this.delete(id);
|
|
|
|
+ // console.log(this.form);
|
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: '删除信息成功',
|
|
|
|
+ // type: 'success',
|
|
|
|
+ // });
|
|
|
|
+ // this.search();
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // .catch(() => {});
|
|
|
|
+ // },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|