代码调整

This commit is contained in:
joylink_cuiweidong 2023-01-31 15:24:36 +08:00
parent 7ed113aebb
commit 9968af2ecd

View File

@ -17,7 +17,7 @@ import EditConfigGateway from './editConfigGateway';
import EditConfig from './editConfig'; import EditConfig from './editConfig';
import EditConfigScreen from './editConfigScreen'; import EditConfigScreen from './editConfigScreen';
import EditConfigIbp from './editConfigIbp'; import EditConfigIbp from './editConfigIbp';
import { getSessionStorage } from '@/utils/auth'; import { getAllBackProjectConfig } from '@/api/projectConfig';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
export default { export default {
name: 'DeviceManage', name: 'DeviceManage',
@ -39,7 +39,8 @@ export default {
}, },
// projectCode:'', // projectCode:'',
deviceTypeList:ConstConfig.ConstSelect.projectDeviceTypeList, deviceTypeList:ConstConfig.ConstSelect.projectDeviceTypeList,
projectList: ConstConfig.ConstSelect.projectList, // ConstConfig.ConstSelect.projectList
projectList: [],
queryForm: { queryForm: {
labelWidth: '120px', labelWidth: '120px',
reset: true, reset: true,
@ -60,7 +61,7 @@ export default {
type: 'select', type: 'select',
label: '所属项目', label: '所属项目',
config: { config: {
data: ConstConfig.ConstSelect.projectList data: []
} }
} }
} }
@ -125,8 +126,17 @@ export default {
currentModel: {} currentModel: {}
}; };
}, },
created() { mounted() {
// this.projectCode = getSessionStorage('project') || ''; getAllBackProjectConfig().then(response => {
const projectList = [];
const data = response.data;
data.forEach(element => {
projectList.push({label:element.name, value: element.code});
});
this.projectList = projectList;
this.queryForm.queryObject.projectCode.config.data = projectList;
});
}, },
methods: { methods: {
beforeQuery(params) { beforeQuery(params) {