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