Browse Source

获取焦点

master
mch 2 years ago
parent
commit
441592aeea
  1. 23
      src/views/basic-dictionary/BirthPlace.vue
  2. 23
      src/views/basic-dictionary/GuideType.vue
  3. 7
      src/views/basic-dictionary/MedicalReportType.vue

23
src/views/basic-dictionary/BirthPlace.vue

@ -219,6 +219,7 @@ export default {
tableData: [],
isshow: true,
initTableData: [],
curRow: {},
};
},
created() {
@ -248,8 +249,9 @@ export default {
// console.log(res);
// });
this.form = row;
console.log(row);
this.curRow = { ...row };
console.log(this.curRow);
// this.form = row;
},
handleSizeChange(val) {
this.pages.MaxResultCount = val;
@ -266,6 +268,7 @@ export default {
},
//
delets(row) {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择删除的数据");
} else {
@ -339,6 +342,8 @@ export default {
});
},
toppings() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
@ -349,6 +354,7 @@ export default {
}
},
topping() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
@ -360,6 +366,7 @@ export default {
},
//
edit(row) {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
@ -378,10 +385,12 @@ export default {
displayName: this.form.displayName,
countryCode: this.form.countryCode,
}).then((res) => {
this.$message.success("新增成功");
this.form = {};
this.getlist();
this.dialogVisible = false;
if (res.code == 1) {
this.$message.success("新增成功");
this.form = {};
this.getlist();
this.dialogVisible = false;
}
});
} else if (this.form.displayName == "") {
this.$message.warning("请输入名称");
@ -408,8 +417,10 @@ export default {
}
});
},
//
add() {
this.form = { ...this.curRow };
this.dialogVisible = true;
this.title = 1;
this.form = {};

23
src/views/basic-dictionary/GuideType.vue

@ -165,7 +165,7 @@
:title="title == '1' ? '新增' : '修改'"
:visible.sync="dialogVisible"
width="75%"
:close-on-click-modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" :model="form" label-width="80px">
<el-row>
@ -235,7 +235,6 @@
</el-dialog>
<!-- 查看详情弹框 -->
<el-dialog
title="查询"
:visible.sync="detailspopup"
width="50%"
@ -356,6 +355,7 @@ export default {
displayName: "",
creatorName: "",
},
curRow: {},
dialogVisible: false,
title: "1", //
pages: {
@ -398,8 +398,10 @@ export default {
this.getlists();
},
rowick(row) {
this.form = row;
console.log(this.form);
this.curRow = { ...row };
//this.form = row;
console.log(this.curRow);
},
handleSizeChange(val) {
this.pages.MaxResultCount = val;
@ -645,6 +647,7 @@ export default {
},
//
setlow(row) {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
@ -656,6 +659,7 @@ export default {
},
//
topping(row) {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
@ -700,6 +704,7 @@ export default {
},
//
confirmdeltion(row) {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择删除的数据");
} else {
@ -730,6 +735,12 @@ export default {
this.dialogVisible = true;
this.form = {};
this.title = 1;
// if (this.title == 1) {
// this.form.displayName = "";
// this.form.id = "";
// this.form.creationTime = "";
// this.form.lastModificationTime = "";
// }
this.$nextTick(() => {
this.$refs.refinput.focus();
});
@ -737,11 +748,11 @@ export default {
},
//
editandmofin(row) {
if (this.form.id == undefined) {
if (this.curRow.id == undefined) {
this.$message.warning("请选择编辑的数据");
} else {
this.dialogVisible = true;
this.form = { ...this.curRow };
console.log(row);
this.title = 2;
guideid(this.form.id).then((res) => {

7
src/views/basic-dictionary/MedicalReportType.vue

@ -255,6 +255,7 @@ export default {
},
tableData: [],
initTableData: [],
curRow:{},
};
},
created() {
@ -282,7 +283,7 @@ export default {
rowick(row) {
querids(row.id).then((res) => {
console.log(res);
this.form = res.data;
this.curRow = { ...row };
});
console.log(row);
},
@ -354,6 +355,7 @@ export default {
},
//
setlow(row) {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
@ -366,6 +368,7 @@ export default {
},
//
topping() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
@ -377,6 +380,7 @@ export default {
},
//
deleteid() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
@ -400,6 +404,7 @@ export default {
},
//
editreport() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {

Loading…
Cancel
Save