|
|
@@ -123,7 +123,8 @@ export default {
|
|
|
createTime: resData.createDate,
|
|
|
dataSources: dataSources,
|
|
|
relationColumns: relationColumns,
|
|
|
- editMode: currentUser.code === resData.createId + ''
|
|
|
+ editMode: currentUser.code === resData.createId + '',
|
|
|
+ filters: JSON.parse((resData.filters|| "[]"))
|
|
|
}
|
|
|
|
|
|
let fields = [];
|
|
|
@@ -147,13 +148,14 @@ export default {
|
|
|
*remoteAdd(action, { select, call, put }) {
|
|
|
try {
|
|
|
const dashboardDesigner = yield select(state => state.present.dashboardDesigner);
|
|
|
- const { name, items, thumbnail, relationColumns } = dashboardDesigner;
|
|
|
+ const { name, items, thumbnail, relationColumns, filters } = dashboardDesigner;
|
|
|
let body = {
|
|
|
bdName: name,
|
|
|
bdNote: '',
|
|
|
bdConfiguration: JSON.stringify(items),
|
|
|
thumbnail: thumbnail,
|
|
|
relationColumns: JSON.stringify(relationColumns),
|
|
|
+ filters: JSON.stringify(filters) || ''
|
|
|
}
|
|
|
console.log('新增看板', body);
|
|
|
const res = yield call(service.fetch, {
|
|
|
@@ -175,13 +177,14 @@ export default {
|
|
|
*remoteQucikAdd(action, { select, call, put }) {
|
|
|
try {
|
|
|
const dashboardDesigner = yield select(state => state.present.dashboardDesigner);
|
|
|
- const { name, items, thumbnail, description, relationColumns } = dashboardDesigner;
|
|
|
+ const { name, items, thumbnail, description, relationColumns, filters } = dashboardDesigner;
|
|
|
let body = {
|
|
|
bdName: name,
|
|
|
bdNote: description,
|
|
|
bdConfiguration: JSON.stringify(items),
|
|
|
thumbnail: thumbnail,
|
|
|
- relationColumns: JSON.stringify(relationColumns)
|
|
|
+ relationColumns: JSON.stringify(relationColumns),
|
|
|
+ filters: JSON.stringify(filters) || ""
|
|
|
}
|
|
|
console.log('快速新增看板', body);
|
|
|
const res = yield call(service.fetch, {
|
|
|
@@ -203,7 +206,7 @@ export default {
|
|
|
*remoteModify(action, { select, call, put }) {
|
|
|
try {
|
|
|
const dashboardDesigner = yield select(state => state.present.dashboardDesigner);
|
|
|
- const { code, name, items, thumbnail, description, relationColumns } = dashboardDesigner;
|
|
|
+ const { code, name, items, thumbnail, description, relationColumns, filters } = dashboardDesigner;
|
|
|
let body = {
|
|
|
id: code,
|
|
|
bdName: name,
|
|
|
@@ -211,6 +214,7 @@ export default {
|
|
|
bdConfiguration: JSON.stringify(items.map(item => ({ ...item, chartOption: null }))),
|
|
|
thumbnail: thumbnail,
|
|
|
relationColumns: JSON.stringify(relationColumns),
|
|
|
+ filters: JSON.stringify(filters) || ""
|
|
|
}
|
|
|
const res = yield call(service.fetch, {
|
|
|
url: URLS.DASHBOARD_UPDATE,
|