Merge branch 'test_eg2d' of git.code.tencent.com:lian-cbtc/jl-client into yly_eg2d

This commit is contained in:
yuan 2021-07-14 09:22:04 +08:00
commit c59b0930a3
8 changed files with 256 additions and 15 deletions

View File

@ -18,7 +18,7 @@
},
"dependencies": {
"axios": "^0.21.1",
"bjjl-engine-2d": "^1.0.15",
"bjjl-engine-2d": "^1.0.17",
"echarts": "^4.7.0",
"element-ui": "^2.12.0",
"file-saver": "^1.3.3",
@ -36,7 +36,7 @@
"sessionstorage": "^0.1.0",
"stompjs": "^2.3.3",
"storejs": "^1.0.25",
"three": "^0.130.0",
"three": "^0.130.1",
"video.js": "^7.8.4",
"vue": "^2.6.10",
"vue-i18n": "^8.12.0",

View File

@ -100,5 +100,6 @@ export default {
publishISCSManage:'publish ISCS Manage',
voiceTraining: 'Voice Training',
mapGroup: 'Map Group',
drawingMange:'Drawing Mange'
drawingMange:'Drawing Mange',
newDraw: 'New Draw'
};

View File

@ -104,5 +104,6 @@ export default {
publishISCSManage:'发布ISCS管理',
voiceTraining: '语音训练',
mapGroup: '地图分组',
drawingMange:'图纸管理'
drawingMange:'图纸管理',
newDraw: '新版绘制'
};

View File

@ -188,6 +188,8 @@ const ThirdLogin = () => import('@/views/thirdLogin');
const UserModelDesign = () => import('@/views/userModelDesign/draftList');
const UserModelEdit = () => import('@/views/userModelDesign/edit');
const NewDrawList = () => import('@/views/newDraw/list');
const NewDrawEdit = () => import('@/views/newDraw/edit');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
@ -1291,13 +1293,27 @@ export const asyncRouter = [
meta: {
i18n: 'router.userModelDesign',
roles: [admin]
},
}
},
{
path: 'usermodel/:id/edit',
name: 'userModelEdit',
component: UserModelEdit,
hidden: true
},
{
path: 'newdraw',
component: NewDrawList,
meta: {
i18n: 'router.newDraw',
roles: [admin]
}
},
{
path: 'newdraw/:id/edit',
name: 'newDrawEdit',
component: NewDrawEdit,
hidden: true
}
]
},

View File

@ -4,7 +4,7 @@ export function getBaseUrl() {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
BASE_API = 'http://192.168.3.250:9000'; // 旭强 有线
BASE_API = 'http://192.168.2.175:9000'; // 旭强 有线
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康

View File

@ -0,0 +1,57 @@
<template>
<div style="width: 100%;height: 100%;">
<jl-picture-builder ref="jlPictureBuilder" :model="model" :compose-map="composeMap" />
<div style="height: 300px;background: #fff;z-index: 999;position: absolute;top: 70px;padding: 5px;left: 5px;">
<template v-for="item in modelList">
<el-button :key="item.code" size="mini" @click="addModel(item)">{{ item.name }}</el-button>
</template>
</div>
</div>
</template>
<script>
import { getModelList } from '@/api/management/model';
import { deepAssign } from '@/utils/index';
export default {
name: 'Edit',
data() {
return {
composeMap: {},
model: [],
modelList: []
};
},
mounted() {
getModelList().then(res=>{
this.modelList = res.data;
// this.modelList.forEach(item => {
// this.composeMap[item.code] = item;
// });
});
},
methods: {
addModel(model) {
if (!this.composeMap[model.code]) {
this.composeMap[model.code] = JSON.parse(model.jsonData);
}
const addModel = {
code: this.getUID(model.code),
position: [100, 100],
type: model.code,
rotation: 0,
scale: [1, 1]
};
this.model.push(addModel);
this.$refs.jlPictureBuilder.update([{model: addModel, action:{order:'&Add', shapeType: 'Compose'}}]);
},
getUID (type, base = 0) {
return [(type || ''), base++, Math.random().toFixed(5)].join('_');
}
}
};
</script>
<style scoped>
</style>

166
src/views/newDraw/list.vue Normal file
View File

@ -0,0 +1,166 @@
<template>
<div class="container">
<QueryListPage :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-button @click="getList">queryPublishedModel</el-button>
</div>
</template>
<script>
import { getModelDraftList, publishModelDraft, deleteModelDraft, getModelList } from '@/api/management/model';
export default {
name: 'UserModelDesign',
data() {
return {
dialogs: {
createShow: false,
createMode: ''
},
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '80px',
reset: true,
queryObject: {
code: {
type: 'text',
label: '地图编号'
},
name: {
type: 'text',
label: '地图名称'
}
}
},
queryList: {
query: this.queryModelDraftList,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '地图编号',
prop: 'code'
},
{
title: '地图名称',
prop: 'name'
},
{
title: '创建时间',
prop: 'createTime'
},
{
title: '修改时间',
prop: 'updateTime'
},
{
type: 'button',
title: this.$t('global.operate'),
width: '350',
buttons: [
// {
// name: this.$t('global.edit'),
// handleClick: this.handleEdit
// },
{
name: '绘图',
handleClick: this.handleDraw
}
// {
// name: '',
// handleClick: this.handlePublish,
// type: 'success'
// },
// {
// name: this.$t('global.delete'),
// handleClick: this.handleDelete,
// type: 'danger'
// }
]
}
]
// actions: [{ text: this.$t('global.add'), handler: this.handleCreate }]
},
pubdModel: ''
};
},
methods: {
getList() {
getModelList().then(res=>{
console.log(res.data);
});
},
queryModelDraftList(params) {
return getModelDraftList(params);
},
handleCreate() {
this.$refs.createDialog.show('create');
},
closeCreate(e) {
this.reloadTable();
},
handleEdit(index, data) {
this.$refs.createDialog.show('edit', data);
},
handleDelete(idx, data) {
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true
})
.then(
() => {
deleteModelDraft(data.id).then(() => {
this.reloadTable();
});
},
() => {}
)
.catch(e => {
this.$message(e);
});
},
handleDraw(idx, data) {
this.$router.push({ path: `newdraw/${data.id}/edit` });
},
handlePublish(idx, data) {
this.$confirm('确认发布?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true
})
.then(
() => {
publishModelDraft(data.id).then(() => {
this.reloadTable();
});
},
() => {}
)
.catch(e => {
this.$message(e);
});
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style lang="scss" scoped>
.container {
padding: 20px;
}
</style>

View File

@ -1,16 +1,16 @@
<template>
<jl-model-builder @save="onSave" :composeName="name" :model="model" :id="id" :type="type" />
<jl-model-builder :id="id" :compose-name="name" :model="model" :type="type" @save="onSave" />
</template>
<script>
import { updateModelDraftData, getModelDraftData } from "@/api/management/model";
import { updateModelDraftData, getModelDraftData } from '@/api/management/model';
export default {
name: "editModel",
name: 'EditModel',
data() {
return {
name: "",
id: "",
type: "",
name: '',
id: '',
type: '',
model: {}
};
},
@ -23,7 +23,7 @@ export default {
getModelDraftData(this.id).then(res => {
const data = res.data;
this.name = data.name;
this.type = data.type || "";
this.type = data.type || '';
this.model = data.jsonData ? JSON.parse(data.jsonData) : {};
});
},
@ -36,10 +36,10 @@ export default {
};
updateModelDraftData(data)
.then(resp => {
this.$message("保存成功");
this.$message('保存成功');
})
.catch(e => {
this.$message("error", e);
this.$message('error', e);
});
}
}