Merge branch 'develop' into nice_dev
# Conflicts: # src/modules/11_discipline/router.ts
This commit is contained in:
commit
5b210fca60
26 changed files with 4121 additions and 648 deletions
|
|
@ -1,9 +1,12 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
import type { DataOption } from "../interface/index/Main";
|
||||
|
||||
export const useComplainstDataStore = defineStore("complainst", () => {
|
||||
const rows = ref<any>([])
|
||||
const optionListName = ref<any>([])
|
||||
const optionListName = ref<any>([{}])
|
||||
|
||||
|
||||
function fectComplainst(data: any) {
|
||||
let datalist = data.map((e: any) => ({
|
||||
|
|
@ -19,13 +22,57 @@ export const useComplainstDataStore = defineStore("complainst", () => {
|
|||
}
|
||||
|
||||
function selectComplainantTpye(list: any) {
|
||||
console.log(list);
|
||||
optionListName.value = list
|
||||
}
|
||||
|
||||
const complainantoptionsMain = ref<DataOption[]>()
|
||||
const complainantoptions = ref<DataOption[]>()
|
||||
const agencytoptionsMain = ref<DataOption[]>()
|
||||
const agencytoptions = ref<DataOption[]>()
|
||||
function fectOptioin(complainantoptions: any, agencytoptions: any) {
|
||||
complainantoptionsMain.value = complainantoptions
|
||||
agencytoptionsMain.value = agencytoptions
|
||||
|
||||
}
|
||||
function filterSelector(val: any, update: Function, type: string) {
|
||||
console.log(val, type);
|
||||
let data: DataOption[] | undefined = undefined;
|
||||
let filter: DataOption[] | undefined = undefined;
|
||||
if (type == "filtercomplainantType") {
|
||||
data = complainantoptionsMain.value
|
||||
} else if (type == "filteragencytoptions") {
|
||||
data = agencytoptionsMain.value
|
||||
}
|
||||
if (val == "") {
|
||||
update(() => {
|
||||
filter = data;
|
||||
});
|
||||
} else {
|
||||
update(() => {
|
||||
if (data) {
|
||||
filter = data.filter(
|
||||
(e) => e.name.search(val) !== -1
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (filter) {
|
||||
if (type == "filtercomplainantType") {
|
||||
complainantoptions.value = filter
|
||||
} else if (type = "filteragencytoptions") {
|
||||
agencytoptions.value = filter
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return {
|
||||
rows,
|
||||
optionListName,
|
||||
fectComplainst,
|
||||
selectComplainantTpye
|
||||
selectComplainantTpye,
|
||||
filterSelector,
|
||||
fectOptioin,
|
||||
complainantoptions,
|
||||
agencytoptions,
|
||||
}
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue