diff --git a/src/permission.ts b/src/permission.ts
index b05f8c3..34ca0f5 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -13,12 +13,16 @@ NProgress.configure({ showSpinner: false });
const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*'];
const isWhiteList = (path: string) => {
- return whiteList.some(pattern => isPathMatch(pattern, path))
-}
+ return whiteList.some((pattern) => isPathMatch(pattern, path));
+};
router.beforeEach(async (to, from, next) => {
NProgress.start();
- if (getToken()) {
+ console.log(to);
+ console.log(getToken());
+ if (to.path == '/indexEquipment') {
+ next();
+ } else if (getToken()) {
to.meta.title && useSettingsStore().setTitle(to.meta.title);
/* has token*/
if (to.path === '/login') {
diff --git a/src/router/index.ts b/src/router/index.ts
index 5eb2888..6ac8743 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -99,6 +99,11 @@ export const constantRoutes: RouteRecordRaw[] = [
component: () => import('@/views/gisHome/index.vue'),
hidden: true
},
+ {
+ path: '/indexEquipment',
+ component: () => import('@/views/materials/orderEquipment/indexEquipment.vue'),
+ hidden: true
+ },
{
path: '/drone',
component: () => import('@/views/drone/index.vue'),
diff --git a/src/views/materials/orderEquipment/index.vue b/src/views/materials/orderEquipment/index.vue
index 1e32896..2be87d9 100644
--- a/src/views/materials/orderEquipment/index.vue
+++ b/src/views/materials/orderEquipment/index.vue
@@ -36,7 +36,9 @@
保存
-
+
+ 分享
+
@@ -330,7 +332,16 @@ const handleAdd = () => {
// dialog.visible = true;
// dialog.title = '修改物资-材料设备';
// };
-
+const onShare = () => {
+ const TokenKey = 'Admin-Token';
+ const tokenStorage = useStorage(TokenKey, null);
+ const getToken = () => tokenStorage.value;
+ console.log(getToken());
+
+ // 跳转新的地址 传token
+ let url = `http://192.168.110.151:7788/indexEquipment?projectId=${encodeURIComponent(currentProject.value.id)}&token=${encodeURIComponent(getToken())}&batchNumber=${encodeURIComponent(form.value.batchNumber)}`;
+ window.open(url, '_blank');
+};
/** 提交按钮 */
const submitForm = async () => {
buttonLoading.value = true;
diff --git a/src/views/materials/orderEquipment/indexEquipment.vue b/src/views/materials/orderEquipment/indexEquipment.vue
new file mode 100644
index 0000000..12732aa
--- /dev/null
+++ b/src/views/materials/orderEquipment/indexEquipment.vue
@@ -0,0 +1,217 @@
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+