|
@@ -15,42 +15,42 @@ export const helper = ResourceModule.helper({
|
|
|
},
|
|
|
|
|
|
createCompController() {
|
|
|
- const ctrl = new ComponentController();
|
|
|
+ const ctrl= new ComponentController();
|
|
|
ctrl.ListCtrl = new PageListController(this.config?.httpConfig);
|
|
|
- ctrl.ListCtrl.setCrudPrefix("/frame");
|
|
|
+ ctrl.ListCtrl.setCrudPrefix("/frame")
|
|
|
ctrl.createComp = this.actions.createComp;
|
|
|
ctrl.onMenuClick = async (name, record) => {
|
|
|
- if (name == "delete") {
|
|
|
- await this.actions.deletePromotion(record);
|
|
|
- ctrl.ListCtrl.fresh();
|
|
|
+ if(name == "delete") {
|
|
|
+ await this.actions.deletePromotion(record);
|
|
|
+ ctrl.ListCtrl.fresh();
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
|
|
|
return ctrl;
|
|
|
},
|
|
|
|
|
|
- createSourceController(isSelectModel: boolean, selectType: string) {
|
|
|
- const { controls, actions } = this;
|
|
|
-
|
|
|
- const ctrl = new MaterialController();
|
|
|
- ctrl.imageCtrl = controls.materialImageListCtrl;
|
|
|
- ctrl.vidoeCtrl = controls.materialVideoListCtrl;
|
|
|
- ctrl.taskCtrl = controls.renderTaskListCtrl;
|
|
|
- ctrl.tplCtrl = controls.matTempListCtrl;
|
|
|
+ createSourceController() {
|
|
|
+ const {controls, actions} = this;
|
|
|
+
|
|
|
+ const ctrl = new MaterialController();
|
|
|
+ ctrl.imageCtrl = controls.materialImageListCtrl;
|
|
|
+ ctrl.vidoeCtrl = controls.materialVideoListCtrl;
|
|
|
+ ctrl.taskCtrl = controls.renderTaskListCtrl;
|
|
|
+ ctrl.tplCtrl = controls.matTempListCtrl;
|
|
|
|
|
|
- ctrl.onBtnClick = async function (name: string) {
|
|
|
- if (name == "upload") {
|
|
|
- const uploaded = await actions.uploadMaterial();
|
|
|
- ctrl.switchTab(uploaded.fileType, false);
|
|
|
- ctrl.getCurrControl().loadPage(1);
|
|
|
- return;
|
|
|
- }
|
|
|
- ctrl.showDialog(name);
|
|
|
- };
|
|
|
- ctrl.onItemClick = function (name, record) {
|
|
|
- if (name == "delete") return actions.deleteMaterial(record);
|
|
|
- return actions.downloadMaterial(record);
|
|
|
- };
|
|
|
- return ctrl;
|
|
|
- },
|
|
|
+ ctrl.onBtnClick = async function (name: string) {
|
|
|
+ if (name == "upload") {
|
|
|
+ const uploaded = await actions.uploadMaterial();
|
|
|
+ ctrl.switchTab(uploaded.fileType, false);
|
|
|
+ ctrl.getCurrControl().loadPage(1);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ ctrl.showDialog(name);
|
|
|
+ };
|
|
|
+ ctrl.onItemClick = function (name, record) {
|
|
|
+ if (name == "delete") return actions.deleteMaterial(record);
|
|
|
+ return actions.downloadMaterial(record);
|
|
|
+ };
|
|
|
+ return ctrl
|
|
|
+ }
|
|
|
});
|