131 lines
3.3 KiB
JavaScript
131 lines
3.3 KiB
JavaScript
import {
|
|
observable,
|
|
action
|
|
} from 'mobx';
|
|
import * as mobx from 'mobx';
|
|
import * as API from '../apis/rankscheme'; // 引入API接口文件
|
|
import {
|
|
WeaForm
|
|
} from 'comsMobx';
|
|
import {
|
|
WeaTableNew
|
|
} from 'comsMobx';
|
|
import {
|
|
Modal,
|
|
message,
|
|
} from 'antd'
|
|
import {
|
|
i18n
|
|
} from '../public/i18n';
|
|
|
|
const toJS = mobx.toJS;
|
|
const {
|
|
TableStore
|
|
} = WeaTableNew;
|
|
|
|
export class RankSchemeStore {
|
|
@observable tableStore = new TableStore();
|
|
@observable topMenu = []
|
|
@observable rightMenu = [];
|
|
@observable isEdit = true;
|
|
@observable isPanelShow = true; //高级搜索面板
|
|
@observable form2 = new WeaForm();
|
|
@observable schemeName = '';
|
|
@observable conditionNum = 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@action
|
|
getTableInfo() {
|
|
let params = { ...this.form2.getFormParams()};
|
|
this.tableStore = new TableStore();
|
|
this.tableStore.getDatas("de13a6ef-76e4-40d2-b9ff-01d8a37e7dfe_0638F7675486BD6B43E8CA8FD921E4EB", 1);
|
|
// Api.getSearchList(params).then(res => {
|
|
// if (res.api_status) {
|
|
// res.sessionkey && this.tableStore.getDatas("de13a6ef-76e4-40d2-b9ff-01d8a37e7dfe_0638F7675486BD6B43E8CA8FD921E4EB", 1);
|
|
// } else {
|
|
// message.warning(data.message);
|
|
// }
|
|
// }, error => {
|
|
// message.warning(error.message);
|
|
// })
|
|
|
|
}
|
|
|
|
|
|
@action
|
|
getHasRight() {
|
|
this.topMenu = [
|
|
{
|
|
"isBatch": "1",
|
|
"isTop": "1",
|
|
"menuFun": "new",
|
|
"menuIcon": "icon-coms-New-Flow",
|
|
"menuName": "新建",
|
|
"type": "BTN_Addnew"
|
|
},
|
|
{
|
|
"isBatch": "1",
|
|
"isTop": "1",
|
|
"menuFun": "import",
|
|
"menuIcon": "icon-coms-leading-in",
|
|
"menuName": "导入",
|
|
"type": "BTN_Import"
|
|
},
|
|
{
|
|
"isBatch": "1",
|
|
"isTop": "1",
|
|
"menuFun": "batchDelete",
|
|
"menuIcon": "icon-coms-Batch-delete",
|
|
"menuName": "批量删除",
|
|
"type": "BTN_BatchDelete"
|
|
}
|
|
];
|
|
this.rightMenu = [
|
|
{
|
|
"isBatch": "0",
|
|
"isTop": "1",
|
|
"menuFun": "new",
|
|
"menuIcon": "icon-coms-New-Flow",
|
|
"menuName": "新建",
|
|
"type": "BTN_Addnew"
|
|
},
|
|
{
|
|
"isBatch": "0",
|
|
"isTop": "1",
|
|
"menuFun": "import",
|
|
"menuIcon": "icon-coms-leading-in",
|
|
"menuName": "导入",
|
|
"type": "BTN_Import"
|
|
},
|
|
{
|
|
"isBatch": "0",
|
|
"isTop": "0",
|
|
"menuFun": "log",
|
|
"menuIcon": "icon-coms-Print-log",
|
|
"menuName": "日志",
|
|
"type": "BTN_log"
|
|
},
|
|
{
|
|
"isBatch": "0",
|
|
"isTop": "0",
|
|
"menuFun": "custom",
|
|
"menuIcon": "icon-coms-task-list",
|
|
"menuName": "显示列定制",
|
|
"type": "BTN_COLUMN"
|
|
}
|
|
]
|
|
}
|
|
|
|
setPanelStatus(bool) {
|
|
this.isPanelShow = bool;
|
|
}
|
|
|
|
setSchemeName(val) {
|
|
this.schemeName = val;
|
|
}
|
|
|
|
} |