升级jianhujs版本到3.0.72

调整请求代码
This commit is contained in:
jam committed 2022-10-14 15:17:55 +08:00
1 parent e1812351ed
commit b9c93647dc
5 files changed
+15 -21

No files matched your search

+2 -2
View File
@@ -177,7 +177,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',
@@ -188,7 +188,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]);
+2 -8
View File
@@ -199,9 +199,6 @@ new Vue({
*/ */
async getTaskHistoryList() { async getTaskHistoryList() {
const { const {
data: {
appData: {
resultData: {
taskHistoryList, taskHistoryList,
taskStepperList, taskStepperList,
taskTpl, taskTpl,
@@ -209,10 +206,7 @@ new Vue({
nextLineList, nextLineList,
step, step,
currentNode currentNode
} } = (await window.jianghuAxios({
}
}
} = await window.jianghuAxios({
data: { data: {
appData: { appData: {
pageId: 'taskHistoryManagement', pageId: 'taskHistoryManagement',
@@ -220,7 +214,7 @@ new Vue({
actionData: {taskId: this.taskId}, actionData: {taskId: this.taskId},
} }
} }
}); })).data.appData.resultData;
this.taskHistoryList = taskHistoryList; this.taskHistoryList = taskHistoryList;
this.taskTpl = taskTpl; this.taskTpl = taskTpl;
this.taskStepperList = taskStepperList; this.taskStepperList = taskStepperList;
+8 -8
View File
@@ -170,7 +170,7 @@ new Vue({
* 获取表格数据 * 获取表格数据
*/ */
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',
@@ -179,7 +179,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}
}) })
@@ -188,7 +188,7 @@ new Vue({
* 获取表格数据 * 获取表格数据
*/ */
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',
@@ -197,7 +197,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}
}); });
@@ -213,7 +213,7 @@ new Vue({
const _this = this; const _this = this;
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',
@@ -221,7 +221,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 {
@@ -249,7 +249,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',
@@ -257,7 +257,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("新增数据成功");
+2 -2
View File
@@ -119,7 +119,7 @@ new Vue({
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: 'workflowManagement', pageId: 'workflowManagement',
@@ -130,7 +130,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) : [];
+1 -1
View File
@@ -8,7 +8,7 @@
"framework": "@jianghujs/jianghu" "framework": "@jianghujs/jianghu"
}, },
"dependencies": { "dependencies": {
"@jianghujs/jianghu": "3.0.65", "@jianghujs/jianghu": "3.0.72",
"dayjs": "^1.11.4", "dayjs": "^1.11.4",
"egg": "^2.15.1", "egg": "^2.15.1",
"egg-scripts": "^2.11.0" "egg-scripts": "^2.11.0"