代码调整
This commit is contained in:
parent
14f0113b3b
commit
6e986d51bb
@ -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: {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user