请求结果结构更新
This commit is contained in:
1 parent
c9c16e9d26
commit
bd8f8b97fa
4 files changed
+14
-14
No files matched your search
@@ -164,7 +164,7 @@
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value => !!value);
|
||||
const { data: { appData: { resultData: {rows} } } } = await window.jianghuAxios({
|
||||
const {rows} = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskCreateManagement',
|
||||
@@ -175,7 +175,7 @@
|
||||
orderBy: [{ column: 'operationAt', order: 'desc' }]
|
||||
}
|
||||
}
|
||||
});
|
||||
})).data.appData.resultData;
|
||||
rows.forEach(row => {
|
||||
if(row.workflowConfig) {
|
||||
row.workflowConfig = JSON.parse(row.workflowConfig).nodeList.map(item => [item.label, item.lineTypeList]);
|
||||
|
||||
@@ -96,7 +96,7 @@ new Vue({
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const {data: {appData: {resultData: {rows}}}} = await window.jianghuAxios({
|
||||
const {rows} = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskICreateManagement',
|
||||
@@ -106,7 +106,7 @@ new Vue({
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
});
|
||||
})).data.appData.resultData;
|
||||
|
||||
rows.forEach(row => {
|
||||
row.operationAt = dayjs(row.operationAt).format('YYYY-MM-DD HH:mm:ss');
|
||||
|
||||
@@ -167,7 +167,7 @@ new Vue({
|
||||
* 获取user数据
|
||||
*/
|
||||
async getUserList() {
|
||||
const {data: {appData: {resultData: {rows}}}} = await window.jianghuAxios({
|
||||
const {rows} = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -176,7 +176,7 @@ new Vue({
|
||||
where: {},
|
||||
}
|
||||
}
|
||||
});
|
||||
})).data.appData.resultData;
|
||||
this.constantCollection.userList = rows.map(e => {
|
||||
return {text: e.username, value: e.userId}
|
||||
})
|
||||
@@ -185,7 +185,7 @@ new Vue({
|
||||
* 获取group数据
|
||||
*/
|
||||
async getGroupList() {
|
||||
const {data: {appData: {resultData: {rows}}}} = await window.jianghuAxios({
|
||||
const {rows} = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -194,7 +194,7 @@ new Vue({
|
||||
where: {},
|
||||
}
|
||||
}
|
||||
});
|
||||
})).data.appData.resultData;
|
||||
this.constantCollection.groupList = rows.map(e => {
|
||||
return {text: e.groupName, value: e.groupId}
|
||||
});
|
||||
@@ -208,7 +208,7 @@ new Vue({
|
||||
async syncEditItem() {
|
||||
this.loading = true;
|
||||
this.dialogSaveInfoAction = 'updateItem';
|
||||
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||
const {rows} = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -216,7 +216,7 @@ new Vue({
|
||||
where: {id: this.editItem.id},
|
||||
}
|
||||
}
|
||||
});
|
||||
})).data.appData.resultData;
|
||||
if (!rows.length) {
|
||||
this.clearItemData();
|
||||
} else {
|
||||
@@ -243,7 +243,7 @@ new Vue({
|
||||
delete this.editItem.id;
|
||||
const item = this.buildEditItem();
|
||||
await window.vtoast.loading("新增数据");
|
||||
const { data: { appData: { resultData: { rows } } } } = await window.jianghuAxios({
|
||||
const {rows} = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -251,7 +251,7 @@ new Vue({
|
||||
actionData: item
|
||||
}
|
||||
}
|
||||
})
|
||||
})).data.appData.resultData;
|
||||
this.editItem.id = rows[0];
|
||||
history.pushState({}, '', `?id=${rows[0]}`);
|
||||
await window.vtoast.success("新增数据成功");
|
||||
|
||||
@@ -103,7 +103,7 @@ new Vue({
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const {data: {appData: {resultData: {rows}}}} = await window.jianghuAxios({
|
||||
const {rows} = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -111,7 +111,7 @@ new Vue({
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
});
|
||||
})).data.appData.resultData;
|
||||
for (const item of rows) {
|
||||
item.workflowConfig = item.workflowConfig ? JSON.parse(item.workflowConfig) : null;
|
||||
item.workflowForm = item.workflowForm ? JSON.parse(item.workflowForm) : [];
|
||||
|
||||
Reference in new issue
Block a user