项目前端配置 添加 关联地图 设备功能
This commit is contained in:
parent
08dbe1c7b4
commit
879719ed4b
@ -80,8 +80,10 @@
|
|||||||
import QCode from '@/assets/erCode.jpg';
|
import QCode from '@/assets/erCode.jpg';
|
||||||
import md5 from 'js-md5';
|
import md5 from 'js-md5';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
// getLoginWmurl, checkLoginStatus, getLoginInfo,
|
import { getToken } from '@/utils/auth';
|
||||||
import { getOrgList, selectOrgnization } from '@/api/login';
|
// getLoginWmurl, checkLoginStatus,
|
||||||
|
import { getOrgList, selectOrgnization, getLoginInfo } from '@/api/login';
|
||||||
|
import { createSimulation } from '@/api/simulation';
|
||||||
export default {
|
export default {
|
||||||
name:'NormalLogin',
|
name:'NormalLogin',
|
||||||
props: {
|
props: {
|
||||||
@ -97,12 +99,6 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// syncLogin:{
|
|
||||||
// type: Boolean,
|
|
||||||
// default: () => {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const validateName = (rule, value, callback) => {
|
const validateName = (rule, value, callback) => {
|
||||||
@ -139,6 +135,14 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
type() {
|
||||||
|
return this.$route.query.type;
|
||||||
|
},
|
||||||
|
projectDevice() {
|
||||||
|
return this.$route.query.projectDevice;
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'project': function(val) {
|
'project': function(val) {
|
||||||
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
|
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
|
||||||
@ -217,10 +221,48 @@ export default {
|
|||||||
handleLoginSucessRoute() {
|
handleLoginSucessRoute() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.tipsMsg = '';
|
this.tipsMsg = '';
|
||||||
// path: '/trainingPlatform',
|
let path = '';
|
||||||
const path = '/simulation/simulationIndex';
|
if (this.projectDevice) {
|
||||||
// if()
|
const params = {
|
||||||
this.$router.push({ path: path });
|
projectDevice:this.$route.query.projectDevice,
|
||||||
|
type: this.$route.query.type
|
||||||
|
};
|
||||||
|
this.judgeOtherPage(params);
|
||||||
|
} else {
|
||||||
|
path = '/simulation/simulationIndex';
|
||||||
|
this.$router.push({ path: path });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
judgeOtherPage(params) {
|
||||||
|
// itemMap: {DEFAULT_MEMBER: '1'}type: "METRO"
|
||||||
|
getLoginInfo(getToken()).then(res => {
|
||||||
|
debugger;
|
||||||
|
createSimulation().then(resp => {
|
||||||
|
let query = {
|
||||||
|
group: res.data.group,
|
||||||
|
mapId: resp.data.map.id,
|
||||||
|
lineCode: resp.data.map.lineCode,
|
||||||
|
project: this.project
|
||||||
|
};
|
||||||
|
query = Object.assign(query, params);
|
||||||
|
this.$router.push({ path: `/display/demon`, query: query });
|
||||||
|
});
|
||||||
|
// lineCode: resp.data.map.lineCode,
|
||||||
|
// group: res.data.group,
|
||||||
|
// prdType: resp.data.prodType,
|
||||||
|
// mapId: resp.data.map.id,
|
||||||
|
// goodsId: '',
|
||||||
|
// try: '0',
|
||||||
|
// project: this.project
|
||||||
|
// const query = {
|
||||||
|
// group: resp.data.group,
|
||||||
|
// mapId: resp.data.map.id,
|
||||||
|
// lineCode: resp.data.map.lineCode,
|
||||||
|
// projectDevice: this.$route.query.projectDevice,
|
||||||
|
// type: this.$route.query.type
|
||||||
|
// };
|
||||||
|
// path = '';
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 登陆
|
// 登陆
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
|
@ -65,6 +65,20 @@
|
|||||||
<el-form-item label="文件地址:" prop="ossUrl" class="inlineBlock">
|
<el-form-item label="文件地址:" prop="ossUrl" class="inlineBlock">
|
||||||
<el-input v-model="formModel.ossUrl" style="width: 210px;" size="small" />
|
<el-input v-model="formModel.ossUrl" style="width: 210px;" size="small" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="是否包含设备:" prop="containDevice" class="inlineBlock">
|
||||||
|
<el-switch v-model="formModel.containDevice" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="formModel.containDevice" label="设备关联地图:" prop="deviceRelatedMap" class="inlineBlock" style="margin-left:170px">
|
||||||
|
<el-select v-model="formModel.deviceRelatedMap" filterable placeholder="请选择" size="small" style="width: 210px;" @change="getRelatedFunctionList">
|
||||||
|
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="formModel.containDevice" label="设备关联功能:" prop="deviceRelatedFunction">
|
||||||
|
<el-select v-model="formModel.deviceRelatedFunction" filterable placeholder="请选择" size="small" style="width: 210px;">
|
||||||
|
<el-option v-for="item in functionList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
@ -73,7 +87,9 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import {queryMapListByUser} from '@/api/jmap/map';
|
||||||
import { updateFrontProjectConfig, getUploadUrl } from '@/api/projectConfig';
|
import { updateFrontProjectConfig, getUploadUrl } from '@/api/projectConfig';
|
||||||
|
import { queryMapFunctionList } from '@/api/trainingPlatform';
|
||||||
export default {
|
export default {
|
||||||
name:'FrontProjectConfig',
|
name:'FrontProjectConfig',
|
||||||
data() {
|
data() {
|
||||||
@ -82,6 +98,8 @@ export default {
|
|||||||
loginProLogoImg:'',
|
loginProLogoImg:'',
|
||||||
row:null,
|
row:null,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
mapList:[],
|
||||||
|
functionList:[],
|
||||||
formModel:{
|
formModel:{
|
||||||
loginProtitle:'', // 登录页项目名称
|
loginProtitle:'', // 登录页项目名称
|
||||||
loginOrgTitle:'', // 登录页机构名称
|
loginOrgTitle:'', // 登录页机构名称
|
||||||
@ -105,7 +123,11 @@ export default {
|
|||||||
judgeRoute:'', // 跳转路径
|
judgeRoute:'', // 跳转路径
|
||||||
baseApiUrl:'', // api链接
|
baseApiUrl:'', // api链接
|
||||||
baseSite:'', // 当前域名
|
baseSite:'', // 当前域名
|
||||||
ossUrl:'' // 文件oss地址
|
ossUrl:'', // 文件oss地址
|
||||||
|
|
||||||
|
containDevice:false, // 是否包含设备
|
||||||
|
deviceRelatedMap:'', // 设备关联地图
|
||||||
|
deviceRelatedFunction:'' // 设备关联功能
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -132,6 +154,14 @@ export default {
|
|||||||
return '修改前端配置';
|
return '修改前端配置';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
queryMapListByUser().then(resp => {
|
||||||
|
this.mapList = resp.data;
|
||||||
|
}).catch(e => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$message.error('获取地图列表失败!');
|
||||||
|
});
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
doShow(row) {
|
doShow(row) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
@ -266,6 +296,14 @@ export default {
|
|||||||
// 参数:directory:MINIO文件夹
|
// 参数:directory:MINIO文件夹
|
||||||
// fileName:存储文件名
|
// fileName:存储文件名
|
||||||
// method:生成链接的请求方式
|
// method:生成链接的请求方式
|
||||||
|
},
|
||||||
|
getRelatedFunctionList(mapId) {
|
||||||
|
queryMapFunctionList({mapId: mapId}).then(resp => {
|
||||||
|
this.functionList = resp.data;
|
||||||
|
console.log(resp);
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('获取地图功能列表失败!');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user