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