fix: BUG修改

This commit is contained in:
kun 2023-10-11 09:02:18 +08:00
parent 63174cfee1
commit 02159e16b3
2 changed files with 29 additions and 16 deletions

View File

@ -143,11 +143,14 @@ onMounted(async () => {
if (res4.result && res4.result.length > 0) {
globalStore.systemConfigSubBg = res4.result[0].configValue;
}
await getengineering();
});
watch(
() => route.path,
n => {
console.log(route.path);
if (n != "/login" && globalStore.token && engList.value.length == 0) {
getengineering();
}
tabsShow.value = route.meta.showSidebar;
}
);

View File

@ -269,6 +269,8 @@ import {
queryConfigOperate
} from "@/api/modules/jxjview";
import { checkPhoneNumber } from "@/utils/eleValidate";
const selectRowType = ref();
const selectRowObj = ref();
const requestParams = ref();
const configMenu = ref([
{ label: "政务配置", value: 6 },
@ -555,9 +557,13 @@ const getAllModule = async (val: any, row: any) => {
}
requestParams.value = requestData; //
//
const { result = [] } = await queryAll({ styleType: form.value.moduleStyle, moduleType: requestData.moduleType });
const { result } = await queryAll({ styleType: form.value.moduleStyle, moduleType: requestData.moduleType });
// console.log("test", result);
datas.push(...result);
if (result) {
datas.push(...result);
} else {
datas.length = 0;
}
//
const res = await queryCheckedAll(requestData);
//
@ -609,6 +615,8 @@ const handleParamsCommand = (command: string | number | object, obj: any) => {
const handleCommand = (command: string | number | object, obj: any) => {
console.log(command);
console.log(obj);
selectRowType.value = command;
selectRowObj.value = obj;
form.value.moduleStyle = obj.moduleStyle;
getAllModule(command, obj);
checkAll.value = false;
@ -774,19 +782,21 @@ const saveItem = async (form: any) => {
const onRadio = async (val: number) => {
// console.log(val);
const res1 = await getGoverType({ styleType: val });
governmentSelectList.value = res1.result.government;
projectSelectList.value = res1.result.project;
companySelectList.value = res1.result.enterprise;
const res2 = await getGoverForm({ governmentSn: governmentSn.value });
governmentSelectList.value.concat(projectSelectList.value, companySelectList.value).forEach((itemA, indexA) => {
res2.result.forEach((itemB, indexB) => {
if (itemA.moduleId == itemB) {
// governmentSelectList.value[indexA].select = true;
itemA.select = true;
}
});
});
// const res1 = await getGoverType({ styleType: val });
// governmentSelectList.value = res1.result.government;
// projectSelectList.value = res1.result.project;
// companySelectList.value = res1.result.enterprise;
// const res2 = await getGoverForm({ governmentSn: governmentSn.value });
// governmentSelectList.value.concat(projectSelectList.value, companySelectList.value).forEach((itemA, indexA) => {
// res2.result.forEach((itemB, indexB) => {
// if (itemA.moduleId == itemB) {
// // governmentSelectList.value[indexA].select = true;
// itemA.select = true;
// }
// });
// });
form.value.moduleStyle = val;
getAllModule(selectRowType.value, selectRowObj.value);
};
watch(