代码调整

This commit is contained in:
joylink_cuiweidong 2022-12-08 11:14:32 +08:00
parent 14f0113b3b
commit 6e986d51bb
2 changed files with 10 additions and 12 deletions

View File

@ -8,9 +8,9 @@
<script>
import { getCompanyListPaging, deleteCompany, getCompanyQrCode } from '@/api/company';
import { getAllBackProjectConfig} from '@/api/projectConfig';
import EditCompany from './add';
import QrCode from '@/components/QrCode';
import { ProjectList } from '@/scripts/ProjectConfig';
export default {
name: 'CompanyManage',
components: {
@ -96,9 +96,15 @@ export default {
};
},
created() {
ProjectList.forEach(elem => {
// this.projectMap[elem.value.toUpperCase()] = elem.label;
this.projectListNew.push({value: elem.value.toUpperCase(), label: elem.label});
getAllBackProjectConfig().then(res=>{
const response = res.data || [];
const projectList = [];
response.forEach(elem => {
projectList.push({value: elem.code, label: elem.name});
});
this.projectListNew = projectList;
}).catch(() => {
this.$message.error('获取项目列表失败');
});
},
methods: {

View File

@ -60,14 +60,6 @@ export default {
],
description: [
{ required: true, message: '请输入项目描述', trigger: 'blur' }
],
mapId: [
{ required: true, message: '请选择实训室关联地图', trigger: 'blur' },
{ required: true, message: '请选择实训室关联地图', trigger: 'change' }
],
functionId: [
{ required: true, message: '请选择实训室关联功能', trigger: 'blur' },
{ required: true, message: '请选择实训室关联功能', trigger: 'change' }
]
};
return crules;