|
@@ -5,9 +5,8 @@ import useDicts from "../hooks/use-dicts";
|
|
|
import useTable from "../hooks/use-table";
|
|
|
import useWatch from "../hooks/use-watch";
|
|
|
import useMethods from "../hooks/use-methods";
|
|
|
-const { add, remove } = useTable();
|
|
|
const { watchContractType } = useWatch();
|
|
|
-const { open, hide, submit, fetchCode, fetchRefer } = useMethods();
|
|
|
+
|
|
|
export default {
|
|
|
name: "AddDrawer",
|
|
|
dicts: useDicts(Column),
|
|
@@ -25,10 +24,12 @@ export default {
|
|
|
methods: {
|
|
|
//
|
|
|
async fetchRefer(prop, type, source) {
|
|
|
+ const { fetchRefer } = useMethods();
|
|
|
await fetchRefer({ _this: this, prop, type, source });
|
|
|
},
|
|
|
//
|
|
|
async open() {
|
|
|
+ const { open, fetchCode } = useMethods();
|
|
|
await open({ _this: this });
|
|
|
await fetchCode({ _this: this });
|
|
|
const {
|
|
@@ -50,18 +51,22 @@ export default {
|
|
|
},
|
|
|
//
|
|
|
async hide() {
|
|
|
+ const { hide } = useMethods();
|
|
|
await hide({ _this: this });
|
|
|
},
|
|
|
//
|
|
|
async useRowAdd(prop) {
|
|
|
+ const { add } = useTable();
|
|
|
await add({ _this: this, prop });
|
|
|
},
|
|
|
//
|
|
|
async useRowRemove(prop, scope) {
|
|
|
+ const { remove } = useTable();
|
|
|
await remove({ _this: this, prop, scope });
|
|
|
},
|
|
|
//
|
|
|
async useSubmit(prop) {
|
|
|
+ const { submit } = useMethods();
|
|
|
await submit({ _this: this, prop, type: "ADD" });
|
|
|
},
|
|
|
},
|