代码调整

This commit is contained in:
joylink_cuiweidong 2022-12-06 11:19:40 +08:00
parent 2edf28636f
commit 9c1a7e129f

View File

@ -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();
});