update 更改queue接口的名称
This commit is contained in:
@@ -128,8 +128,8 @@ export default {
|
|||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
this.$api
|
this.$api
|
||||||
.$queue([
|
.$queue([
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'code1' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'code1' }),
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'code2' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'code2' }),
|
||||||
])
|
])
|
||||||
.then(([code1, code2]) => {
|
.then(([code1, code2]) => {
|
||||||
this.codes.code1 = code1.data;
|
this.codes.code1 = code1.data;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ for (let key in urls) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
api[`${key}Wait`] = function (params = {}) {
|
api[`${key}Await`] = function (params = {}) {
|
||||||
if (method === 'post') {
|
if (method === 'post') {
|
||||||
return initInstance(options).post(url, params)
|
return initInstance(options).post(url, params)
|
||||||
} else {
|
} else {
|
||||||
@@ -106,7 +106,7 @@ for (let key in urls) {
|
|||||||
|
|
||||||
api[key] = function (params = {}) {
|
api[key] = function (params = {}) {
|
||||||
return new Promise((reslove, reject) => {
|
return new Promise((reslove, reject) => {
|
||||||
api[`${key}Wait`](params)
|
api[`${key}Await`](params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const { data } = res
|
const { data } = res
|
||||||
if (errerCodes.indexOf(data.code) >= 0) {
|
if (errerCodes.indexOf(data.code) >= 0) {
|
||||||
|
|||||||
@@ -128,8 +128,8 @@ export default {
|
|||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
this.$api
|
this.$api
|
||||||
.$queue([
|
.$queue([
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'code1' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'code1' }),
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'code2' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'code2' }),
|
||||||
])
|
])
|
||||||
.then(([code1, code2]) => {
|
.then(([code1, code2]) => {
|
||||||
this.codes.code1 = code1.data;
|
this.codes.code1 = code1.data;
|
||||||
|
|||||||
@@ -166,8 +166,8 @@ export default {
|
|||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
this.$api
|
this.$api
|
||||||
.$queue([
|
.$queue([
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'yes_or_no' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'yes_or_no' }),
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'common_status' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'common_status' }),
|
||||||
])
|
])
|
||||||
.then(([yesOrNo, commonStatus]) => {
|
.then(([yesOrNo, commonStatus]) => {
|
||||||
this.codes.find((p) => p.code === 'yes_or_no').values = yesOrNo.data;
|
this.codes.find((p) => p.code === 'yes_or_no').values = yesOrNo.data;
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ export default {
|
|||||||
* 如果不需要获取相应的字典数据,此方法内容可空
|
* 如果不需要获取相应的字典数据,此方法内容可空
|
||||||
*/
|
*/
|
||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
this.$api.$queue([this.$api.sysDictTypeDropDownWait({ code: 'common_status' })]).then(([commonStatus]) => {
|
this.$api.$queue([this.$api.sysDictTypeDropDownAwait({ code: 'common_status' })]).then(([commonStatus]) => {
|
||||||
this.codes.commonStatus = commonStatus.data;
|
this.codes.commonStatus = commonStatus.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ export default {
|
|||||||
* 加载字典数据时的必要方法
|
* 加载字典数据时的必要方法
|
||||||
*/
|
*/
|
||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
this.$api.$queue([this.$api.sysDictTypeDropDownWait({ code: 'op_type' })]).then(([commonStatus]) => {
|
this.$api.$queue([this.$api.sysDictTypeDropDownAwait({ code: 'op_type' })]).then(([commonStatus]) => {
|
||||||
this.codes.opTypeDict = commonStatus.data;
|
this.codes.opTypeDict = commonStatus.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ export default {
|
|||||||
* 加载字典数据时的必要方法
|
* 加载字典数据时的必要方法
|
||||||
*/
|
*/
|
||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
this.$api.$queue([this.$api.sysDictTypeDropDownWait({ code: 'vis_type' })]).then(([commonStatus]) => {
|
this.$api.$queue([this.$api.sysDictTypeDropDownAwait({ code: 'vis_type' })]).then(([commonStatus]) => {
|
||||||
this.codes.visTypeDict = commonStatus.data;
|
this.codes.visTypeDict = commonStatus.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -260,9 +260,9 @@ export default {
|
|||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
return this.$api
|
return this.$api
|
||||||
.$queue([
|
.$queue([
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'menu_type' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'menu_type' }),
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'menu_weight' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'menu_weight' }),
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'open_type' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'open_type' }),
|
||||||
])
|
])
|
||||||
.then(([menuType, menuWerght, openType]) => {
|
.then(([menuType, menuWerght, openType]) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -156,9 +156,9 @@ export default {
|
|||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
this.$api
|
this.$api
|
||||||
.$queue([
|
.$queue([
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'menu_type' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'menu_type' }),
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'menu_weight' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'menu_weight' }),
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'open_type' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'open_type' }),
|
||||||
])
|
])
|
||||||
.then(([menuType, menuWerght, openType]) => {
|
.then(([menuType, menuWerght, openType]) => {
|
||||||
this.codes.find((p) => p.code === 'menu_type').values = menuType.data;
|
this.codes.find((p) => p.code === 'menu_type').values = menuType.data;
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
return this.$api
|
return this.$api
|
||||||
.$queue([this.$api.sysDictTypeDropDownWait({ code: 'data_scope_type' })])
|
.$queue([this.$api.sysDictTypeDropDownAwait({ code: 'data_scope_type' })])
|
||||||
.then(([dataScopeType]) => {
|
.then(([dataScopeType]) => {
|
||||||
this.dataScopeTypeData = dataScopeType.data;
|
this.dataScopeTypeData = dataScopeType.data;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -218,8 +218,8 @@ export default {
|
|||||||
onLoadCodes() {
|
onLoadCodes() {
|
||||||
this.$api
|
this.$api
|
||||||
.$queue([
|
.$queue([
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'sex' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'sex' }),
|
||||||
this.$api.sysDictTypeDropDownWait({ code: 'common_status' }),
|
this.$api.sysDictTypeDropDownAwait({ code: 'common_status' }),
|
||||||
])
|
])
|
||||||
.then(([sex, commonStatus]) => {
|
.then(([sex, commonStatus]) => {
|
||||||
this.codes.find((p) => p.code === 'sex').values = sex.data;
|
this.codes.find((p) => p.code === 'sex').values = sex.data;
|
||||||
|
|||||||
Reference in New Issue
Block a user