diff --git a/.gitignore b/.gitignore
index 799d62889..83295a118 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@ src/utils/baseUrl.js*
*.njsproj
*.sln
debug.log
+.prettierrc
diff --git a/package.json b/package.json
index 3f772ab25..00f1aa413 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,8 @@
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
"dependencies": {
- "axios": "0.18.0",
+ "axios": "^0.21.1",
+ "bjjl-engine-2d": "^1.0.8",
"echarts": "^4.7.0",
"element-ui": "^2.12.0",
"file-saver": "^1.3.3",
@@ -35,7 +36,7 @@
"sessionstorage": "^0.1.0",
"stompjs": "^2.3.3",
"storejs": "^1.0.25",
- "three": "^0.107.0",
+ "three": "^0.130.0",
"video.js": "^7.8.4",
"vue": "^2.6.10",
"vue-i18n": "^8.12.0",
@@ -70,7 +71,7 @@
"eslint-plugin-vue": "5.2.2",
"file-loader": "^3.0.1",
"html-webpack-plugin": "3.2.0",
- "node-sass": "^4.9.0",
+ "node-sass": "^4.14.1",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
diff --git a/src/api/management/model.js b/src/api/management/model.js
new file mode 100644
index 000000000..7afa348c4
--- /dev/null
+++ b/src/api/management/model.js
@@ -0,0 +1,62 @@
+import request from '@/utils/request';
+
+/** 新建用户草稿2d模型*/
+export function createModelDraft(data) {
+ return request({
+ url: `draft/model2d/`,
+ method: 'post',
+ data
+ })
+}
+
+/** 分页查询用户2d模型草稿*/
+export function getModelDraftList(params) {
+ return request({
+ url: `draft/model2d/paging`,
+ method: 'get',
+ params
+ })
+}
+
+/** 更新2d模型基本信息 */
+export function updateModelDraftInfo(data) {
+ return request({
+ url: `/draft/model2d/${data.id}/basic`,
+ method: 'put',
+ data
+ })
+}
+
+/** 更新2d模型数据 */
+export function updateModelDraftData(data) {
+ return request({
+ url: `/draft/model2d/${data.id}/data`,
+ method: 'put',
+ data
+ })
+}
+
+/** 发布模型 */
+export function publishModelDraft(id) {
+ return request({
+ url: `/draft/model2d/${id}/publish`,
+ method: 'post'
+ })
+}
+
+/** 删除草稿模型 */
+export function deleteModelDraft(id) {
+ return request({
+ url: `/draft/model2d/${id}`,
+ method: 'delete'
+ })
+}
+
+
+
+
+
+
+
+
+
diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js
index 8d379f7bf..ef3f53d18 100644
--- a/src/i18n/langs/en/router.js
+++ b/src/i18n/langs/en/router.js
@@ -82,6 +82,7 @@ export default {
configLine: 'Line management',
deviceManage: 'Device management',
iscsDraw: 'Iscs Draw',
+ userModelDesign: 'Model Draw',
iscsSystem: 'Iscs System',
studentManage: 'Student manage',
examDetail: 'Exam detail',
diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js
index a8faa5bd5..45dc0dd7b 100644
--- a/src/i18n/langs/zh/router.js
+++ b/src/i18n/langs/zh/router.js
@@ -82,6 +82,7 @@ export default {
configLine: '线路管理',
deviceManage: '设备管理',
iscsDraw: 'Iscs绘制',
+ userModelDesign: '模型绘制',
iscsSystem: 'Iscs系统',
studentManage: '学生管理',
competitionManage: '竞赛管理',
diff --git a/src/main.js b/src/main.js
index 0e17c5626..cfe4c9f4a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -5,6 +5,7 @@ import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/styles/index.scss'; // global css
import 'quill/dist/quill.snow.css';
+import Engine2D from 'bjjl-engine-2d';
import LangStorage from '@/utils/lang';
import App from './App';
@@ -37,6 +38,7 @@ export const i18n = new VueI18n({
messages
});
Vue.use(ElementUI, {i18n: (key, value) => i18n.t(key, value)});
+Vue.use(Engine2D);
new Vue({
el: '#app',
diff --git a/src/router/index.js b/src/router/index.js
index a74967ab4..fedc095d9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -186,6 +186,8 @@ const UploadPdfList = () => import('@/views/uploadPdf/list');
const ThirdLogin = () => import('@/views/thirdLogin');
+const UserModelDesign = () => import('@/views/userModelDesign')
+
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
@@ -1281,6 +1283,14 @@ export const asyncRouter = [
hidden: true
}
]
+ },
+ {
+ path: 'usermodel',
+ component: UserModelDesign,
+ meta: {
+ i18n: 'router.userModelDesign',
+ roles: [admin]
+ },
}
]
},
diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index 11702c286..aa7bf7e1b 100644
--- a/src/utils/baseUrl.js
+++ b/src/utils/baseUrl.js
@@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
- BASE_API = 'https://test.joylink.club/jlcloud';
+ // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
- // BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
+ BASE_API = 'http://192.168.3.83: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'; // 杜康
diff --git a/src/views/userModelDesign/components/create.vue b/src/views/userModelDesign/components/create.vue
new file mode 100644
index 000000000..4f3ec87b9
--- /dev/null
+++ b/src/views/userModelDesign/components/create.vue
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/userModelDesign/index.vue b/src/views/userModelDesign/index.vue
new file mode 100644
index 000000000..8e9b7b526
--- /dev/null
+++ b/src/views/userModelDesign/index.vue
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+