|
@@ -785,10 +785,10 @@ export default defineComponent(
|
|
|
mounted() {
|
|
|
const id = history.state.params?.id;
|
|
|
const op = history.state.params?.op;
|
|
|
- if (op == 1) {
|
|
|
+ if (op == 1 || id == null) {
|
|
|
this.operationType = "add"
|
|
|
}
|
|
|
- if (op == 2) {
|
|
|
+ if (op == 2 || id != null) {
|
|
|
this.operationType = "edit"
|
|
|
}
|
|
|
this.loadData(id);
|