代码调整
This commit is contained in:
parent
2edf28636f
commit
9c1a7e129f
@ -28,7 +28,7 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {queryMapListByUser} from '@/api/jmap/map';
|
||||
import {queryMapListByUser, getMapListByProjectCode} from '@/api/jmap/map';
|
||||
import { saveBackProjectConfig, updateBackProjectConfig, checkBackProjectExist} from '@/api/projectConfig';
|
||||
import { queryMapFunctionList } from '@/api/trainingPlatform';
|
||||
export default {
|
||||
@ -87,16 +87,33 @@ export default {
|
||||
methods:{
|
||||
doShow(row) {
|
||||
this.dialogVisible = true;
|
||||
this.functionList = [];
|
||||
if (row) {
|
||||
this.formModel.id = row.id;
|
||||
this.formModel.code = row.code;
|
||||
this.formModel.name = row.name;
|
||||
this.formModel.description = row.description;
|
||||
if (row.code) {
|
||||
getMapListByProjectCode(row.code).then(resp => {
|
||||
this.mapList = resp.data;
|
||||
}).catch(e => {
|
||||
this.loading = false;
|
||||
this.$message.error('获取地图列表失败!');
|
||||
});
|
||||
}
|
||||
const mapId = row.mapId;
|
||||
this.formModel.mapId = mapId.toString();
|
||||
if (this.formModel.mapId) { this.getRelatedFunctionList(mapId); }
|
||||
this.formModel.functionId = row.functionId;
|
||||
} else {
|
||||
this.formModel = {
|
||||
id: '',
|
||||
code: '', // 项目编码
|
||||
name: '', // 项目名称
|
||||
description: '', // 描述
|
||||
mapId:'', // 实训室关联地图
|
||||
functionId:'' // 实训室关联功能
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.resetFields();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user