YaolongHan 4 лет назад
Родитель
Сommit
626af5955b
4 измененных файлов с 41 добавлено и 15 удалено
  1. 4 4
      package.json
  2. 24 2
      public/systemConf.js
  3. 1 1
      publish.js
  4. 12 8
      src/views/home.vue

+ 4 - 4
package.json

@@ -2,10 +2,10 @@
   "name": "persagy-plan-editer",
   "version": "0.1.4",
   "remote": {
-    "host": "60.205.177.43",
-    "path": "/root/apps/web/persagyPlan",
-    "user": "root",
-    "password": "persagy_2021Persagy%#$",
+    "host": "39.102.40.239",
+    "path": "/opt/apps/web/persagyPlan",
+    "user": "publish",
+    "password": "1qaz2wsx",
     "local": "persagyPlan"
   },
   "scripts": {

+ 24 - 2
public/systemConf.js

@@ -9,7 +9,7 @@
  *  defaultEquipStyle,
  * ...
  * //新增的设备类样式
- *  
+ *
  * // 通风风口
         AAAAAA: {
             color: "#1F2429",
@@ -17,7 +17,7 @@
             url: "1611299075489.svg", // 对应文件服务器中,图片对应的的键值 -----只需要改动此值即可,其他值使用统一的
             formula: [],
         },
- * 
+ *
  * }
  */
 
@@ -313,5 +313,27 @@ var __systemConf = {
             formula: [],
         },
     },
+    // 项目列表
+    projectList: [
+        { id: "Pj1101050029", name: "东坝万达" },
+        { id: "Pj4403070003", name: "龙岗万达" },
+        { id: "Pj5001120003", name: "香港置地" },
+        { id: "Pj4403050019", name: "招商IOC" },
+
+        { id: "Pj0002220001", name: "数字化交付01" },
+        { id: "Pj0002220002", name: "数字化交付02" },
+        { id: "Pj0002220003", name: "数字化交付03" },
+        { id: "Pj0002220004", name: "数字化交付04" },
+        { id: "Pj0002220005", name: "数字化交付05" },
+
+        { id: "Pj0002220006", name: "数字化交付06" },
+        { id: "Pj0002220007", name: "数字化交付07" },
+        { id: "Pj0002220008", name: "数字化交付08" },
+        { id: "Pj0002220009", name: "数字化交付09" },
+        { id: "Pj00022200010", name: "数字化交付10" },
+        // 资产管理
+        { id: "Pj3702020002", name: "青岛海天中心" }
+
+    ]
 };
 window.__systemConf = __systemConf;

+ 1 - 1
publish.js

@@ -30,7 +30,7 @@ const ssh = new Client();
 
 ssh.connect({
     host: process.env.npm_package_remote_host,
-    port: "22",
+    port: "2020",
     username: process.env.npm_package_remote_user,
     password: process.env.npm_package_remote_password
 }).then(() => {

+ 12 - 8
src/views/home.vue

@@ -2,7 +2,7 @@
     <el-container class="home">
         <!-- 顶部导航栏 -->
         <el-header class="header">
-            <Select width="200" radius v-model="projectId" @change="testClick" :selectdata="dataSelect3" :placeholder="'请选择'" :hideClear="true" />
+            <Select width="200" radius v-model="projectId" @change="testClick" :selectdata="projectList" :placeholder="'请选择'" :hideClear="true" />
             <DropDownButton
                 @click="createCanvas"
                 type="primary"
@@ -24,7 +24,7 @@
             <!-- 左侧树状导航栏部分 -->
             <el-aside class="aside" width="240px">
                 <left-folder ref="leftFolder" @changeFolder="changeFolder"></left-folder>
-                <!-- 
+                <!--
                 <div class="recycle" @click="showRecycleDialog">
                     <img :src="require('@/assets/images/recycle.png')" />
                     <span>回收站</span>
@@ -131,6 +131,7 @@ import recycle from "@/components/homeView/recycle";
 import createPlanarDialog from "@/components/homeView/createPlanarDialog";
 import { SNetUtil } from "@persagy-web/base";
 import { mapState, mapMutations } from "vuex";
+const projectList = window.__systemConf.projectList
 export default {
     name: "home",
     components: {
@@ -150,12 +151,7 @@ export default {
     data() {
         return {
             chooseProjectId: this.projectId,
-            dataSelect3: [
-                { id: "Pj1101050029", name: "东坝万达" },
-                { id: "Pj4403070003", name: "龙岗万达" },
-                { id: "Pj5001120003", name: "香港置地" },
-                { id: "Pj4403050019", name: "招商IOC" },
-            ], // 项目列表
+            projectList, // 项目列表
             dropDownList: [
                 {
                     id: "batch",
@@ -572,6 +568,14 @@ export default {
             immediate: true,
         },
     },
+    created(){
+        // 如果路径带参数则摈弃项目配置项目、使用传入项目
+        const urlData = this.$route.query;
+        if (Object.keys(urlData).length != 0) {
+            this.projectList = [{ id: urlData.projectId, name: urlData.projectName }];
+            this.projectId = urlData.projectId;
+        }
+    }
 };
 </script>
 <style lang="less" scoped>