更新
This commit is contained in:
@@ -59,12 +59,18 @@ export default {
|
|||||||
if (query !== "") {
|
if (query !== "") {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let params = {};
|
let params = {};
|
||||||
// if() {
|
if (
|
||||||
|
this.$utils
|
||||||
// }
|
.typeJudgment(this.config.autocompleteKey)
|
||||||
this.config.autocompleteKey
|
.includes("Object")
|
||||||
? (params[this.config.autocompleteKey] = query)
|
) {
|
||||||
: (params["queryTypeGet"] = query);
|
params[this.config.autocompleteKey.key] = query;
|
||||||
|
params["enableMark"] = this.config.autocompleteKey.enableMark;
|
||||||
|
} else {
|
||||||
|
this.config.autocompleteKey
|
||||||
|
? (params[this.config.autocompleteKey] = query)
|
||||||
|
: (params["queryTypeGet"] = query);
|
||||||
|
}
|
||||||
this.config.serveTarget(params).then((res) => {
|
this.config.serveTarget(params).then((res) => {
|
||||||
let timeInstance = setTimeout(() => {
|
let timeInstance = setTimeout(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
@@ -55,3 +55,8 @@ export function isLicensePlate(no) {
|
|||||||
export function cellStyle() {
|
export function cellStyle() {
|
||||||
return "text-align:center";
|
return "text-align:center";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function typeJudgment(object) {
|
||||||
|
let res = {}.__proto__.toString.call(object);
|
||||||
|
return res ? res : "";
|
||||||
|
}
|
||||||
|
|||||||
@@ -110,7 +110,10 @@ export default {
|
|||||||
refineryList: [],
|
refineryList: [],
|
||||||
configAutocomplete: {
|
configAutocomplete: {
|
||||||
serveTarget: refineryInfoServe.findByEntity,
|
serveTarget: refineryInfoServe.findByEntity,
|
||||||
autocompleteKey: "refineryName",
|
autocompleteKey: {
|
||||||
|
key: "refineryName",
|
||||||
|
enableMark: "ENABLE",
|
||||||
|
},
|
||||||
labelKey: "refineryName",
|
labelKey: "refineryName",
|
||||||
valueKey: "id",
|
valueKey: "id",
|
||||||
placeholder: "炼厂名称",
|
placeholder: "炼厂名称",
|
||||||
|
|||||||
Reference in New Issue
Block a user