This commit is contained in:
parent
69e9f881da
commit
c3126a8ec1
|
@ -427,10 +427,3 @@ export function batch_repair_ack(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDicts(dictType) {
|
|
||||||
return request({
|
|
||||||
url: '/api/sysdict/get_dict',
|
|
||||||
method: 'post',
|
|
||||||
data: {dict_code:Array.isArray(dictType)?dictType:[dictType]}
|
|
||||||
})
|
|
||||||
}
|
|
11
dict/Dict.js
11
dict/Dict.js
|
@ -1,8 +1,7 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { mergeRecursive } from "./../utils/ruoyi";
|
import { mergeRecursive } from "./../utils/ruoyi";
|
||||||
import DictMeta from './DictMeta'
|
import DictMeta from './DictMeta';
|
||||||
import DictData from './DictData'
|
import DictData from './DictData';
|
||||||
import { getDicts as getDicts } from './../api/InventoryManagement';
|
|
||||||
import request from './../utils/request';
|
import request from './../utils/request';
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,15 +175,17 @@ export default class Dict {
|
||||||
return this.loadDict(this, dictMeta,this.apiurl)
|
return this.loadDict(this, dictMeta,this.apiurl)
|
||||||
}
|
}
|
||||||
getRequest(options) {
|
getRequest(options) {
|
||||||
|
console.log(this.apiurl,"getRequest")
|
||||||
return request({
|
return request({
|
||||||
url: this.apiurl||"/api/sysdict/get_dict",
|
url: this.apiurl||"/api/sysdict/get_dict",
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {dict_code:Array.isArray(options)?options:[options]}
|
data: {dict_code:Array.isArray(options)?options:[options]}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
loadDict(dict, dictMeta,apiurl) {
|
loadDict(dict, dictMeta) {
|
||||||
|
console.log(this.apiurl,"getRequest")
|
||||||
return request({
|
return request({
|
||||||
url: apiurl||"/api/sysdict/get_dict",
|
url: this.apiurl||"/api/sysdict/get_dict",
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {dict_code:Array.isArray(dictMeta)?options:[dictMeta]}
|
data: {dict_code:Array.isArray(dictMeta)?options:[dictMeta]}
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
|
8
index.js
8
index.js
|
@ -14,9 +14,7 @@ import Tablepagination from "./commontable/tablepagination.vue";
|
||||||
import Tabletabs from "./commontable/tabletabs.vue";
|
import Tabletabs from "./commontable/tabletabs.vue";
|
||||||
import Configuration from "./commontable/configuration/index.vue";
|
import Configuration from "./commontable/configuration/index.vue";
|
||||||
import commont from "./commont";
|
import commont from "./commont";
|
||||||
import DataDict from './dict'
|
import DataDict from './dict';
|
||||||
//查询字典的方法(获取数据的接口)
|
|
||||||
import { getDicts as getDicts } from './api/InventoryManagement';
|
|
||||||
|
|
||||||
const componentarr = [
|
const componentarr = [
|
||||||
appTitle,
|
appTitle,
|
||||||
|
@ -49,10 +47,6 @@ const install = function (Vue) {
|
||||||
//labelField 和 valueField 是用于指定数据字典项中标签和值的字段名
|
//labelField 和 valueField 是用于指定数据字典项中标签和值的字段名
|
||||||
labelField: 'dictLabel',
|
labelField: 'dictLabel',
|
||||||
valueField: 'dictValue',
|
valueField: 'dictValue',
|
||||||
//这个函数用来请求数据字典的数据,调用 getDicts() 函数,并使用传入的 dictMeta.type 来获取相应类型的数据字典
|
|
||||||
// request(dictMeta) {
|
|
||||||
// return getDicts(dictMeta.type).then(res => res.datas)
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "erp-element-ui",
|
"name": "erp-element-ui",
|
||||||
"version": "1.0.46",
|
"version": "1.0.47",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue