Browse Source

支持面包屑链接的

GuoYuFu123 5 years ago
parent
commit
a4c47c2950

+ 2 - 0
README.md

@@ -142,4 +142,6 @@ export default {
 
 ```
 在路由router中配置meta.breadcrumbs,在进入路由页面时会自动解析为面包屑
+this.$store.dispatch('setBreadcrumb', [{ label: 'Demo' }, { label: 'Form'  ])
+this.$store.dispatch('setBreadcrumb', [{ label: 'Demo', path: '' }, { label: 'Form' , path: ''}])
 ```

+ 1 - 1
src/components/business_space/dialogs/list/firm.vue

@@ -10,7 +10,7 @@
             placeholder="输入厂家名称、品牌名、型号进行查找"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px;margin-right: 10px;"
             clearable
           ></el-input>
           <el-button @click="searchKey" size="small">查找</el-button>

+ 1 - 1
src/components/business_space/dialogs/list/insurerDialog.vue

@@ -11,7 +11,7 @@
             placeholder="输入厂家名称进行查找"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px; margin-right: 10px;"
             clearable
           ></el-input>
           <el-button size="small" @click="filterSearch">查找</el-button>

+ 2 - 2
src/components/business_space/dialogs/list/maintainerDialog.vue

@@ -8,10 +8,10 @@
       <div id="firm">
         <div class="title-search query-form" style="padding: 10px; margin-bottom: 10px;">
           <el-input
-            placeholder="输入厂家名称进行查找23"
+            placeholder="输入厂家名称进行查找"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px; margin-right: 10px;"
             clearable
           ></el-input>
           <el-button size="small" @click="filterSearch">查找</el-button>

+ 1 - 1
src/components/business_space/dialogs/list/supplierDialog.vue

@@ -11,7 +11,7 @@
             placeholder="输入厂家名称进行查找"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px; margin-right:10px;"
             clearable
           ></el-input>
           <el-button size="small" @click="filterSearch">查找</el-button>

+ 1 - 1
src/components/business_space/dialogs/list/systemType.vue

@@ -10,7 +10,7 @@
             placeholder="输入名称或编码进行查询"
             v-model="search"
             size="small"
-            style="width:400px;"
+            style="width:300px;margin-right: 10px"
             clearable
           ></el-input>
           <el-button size="small" @click="searchChecked">查找</el-button>

+ 5 - 4
src/components/dialogs/addDialog/dialogDevice.vue

@@ -391,7 +391,7 @@ export default {
         }
       })
       if (falg) {
-        this.$message.error("存在设备的本地名称为空,请检查")
+        this.$message.info("存在设备的本地名称为空,请检查")
         return
       }
       data = data.map(item => {
@@ -414,12 +414,13 @@ export default {
       if (data.length) {
         this.createJson(data)
       } else {
-        this.$message.error("信息点不能为空")
+        this.$message.info("信息点不能为空")
       }
     },
 
     //创建设备接口
     async createJson(data) {
+        console.log(this.projectId)
       let param = {
         data: { criterias: data },
         ProjId: this.projectId,
@@ -457,8 +458,8 @@ export default {
       console.log(param, data)
       let pushParam = {
         data: { criterias: [] },
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: this.projectId,
+        secret: this.secret
       }
       let list = []
       data.map((item, index) => {

+ 1 - 1
src/components/dialogs/list/firm.vue

@@ -10,7 +10,7 @@
             placeholder="输入厂家名称、品牌名、型号进行查找"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px; margin-right: 10px;"
             clearable
           ></el-input>
           <el-button @click="searchKey" size="small">查找</el-button>

+ 1 - 1
src/components/dialogs/list/insurerDialog.vue

@@ -11,7 +11,7 @@
             placeholder="输入厂家名称进行查找"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px; margin-right: 10px;"
             clearable
           ></el-input>
           <el-button size="small" @click="filterSearch">查找</el-button>

+ 2 - 2
src/components/dialogs/list/maintainerDialog.vue

@@ -8,10 +8,10 @@
       <div id="firm">
         <div class="title-search query-form" style="padding: 10px; margin-bottom: 10px;">
           <el-input
-            placeholder="输入厂家名称进行查找23"
+            placeholder="输入厂家名称进行查找"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px; margin-right: 10px;"
             clearable
           ></el-input>
           <el-button size="small" @click="filterSearch">查找</el-button>

+ 1 - 1
src/components/dialogs/list/supplierDialog.vue

@@ -11,7 +11,7 @@
             placeholder="输入厂家名称进行查找"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px; margin-right: 10px;"
             clearable
           ></el-input>
           <el-button size="small" @click="filterSearch">查找</el-button>

+ 2 - 2
src/components/dialogs/list/systemType.vue

@@ -10,7 +10,7 @@
             placeholder="输入名称或编码进行查询"
             v-model="search"
             size="small"
-            style="width:300px;"
+            style="width:300px; margin-right:10px"
             clearable
           ></el-input>
           <el-button size="small" @click="searchChecked">查找</el-button>
@@ -40,7 +40,7 @@
           <el-table-column label="专业" header-align='center'>
             <template slot-scope="scope">{{getName(scope.row.category)}}</template>
           </el-table-column> 
-          <el-table-column label="详情" header-align='center'>
+          <el-table-column label="详情" header-align='center' width="100" align="center">
             <template slot-scope="scope">
               <el-button @click="lookDeatils(scope.row)" type="text">详情</el-button>
             </template>

+ 2 - 2
src/components/ledger/addDialog/dialogDevice.vue

@@ -382,7 +382,7 @@ export default {
         }
       })
       if (falg) {
-        this.$message.error("存在设备的本地名称为空,请检查")
+        this.$message.info("存在设备的本地名称为空,请检查")
         return
       }
       data = data.map(item => {
@@ -405,7 +405,7 @@ export default {
       if (data.length) {
         this.createJson(data)
       } else {
-        this.$message.error("信息点不能为空")
+        this.$message.info("信息点不能为空")
       }
     },
 

+ 0 - 1
src/components/ledger/handsontables/device.vue

@@ -209,7 +209,6 @@ export default {
     this.getEquipmentFamilyList()
     this.getFloorData()
   },
-  mounted() { },
   computed: {
     ...mapGetters("peojMess", [
         "projectId",

+ 25 - 17
src/components/ledger/tableTransfers.vue

@@ -1,21 +1,21 @@
 <template>
-  <el-dialog title="关联设备" :before-close="close" :visible.sync="dialog.relevance" width="1000px">
+  <el-dialog title="关联设备" :before-close="close" :visible.sync="dialog.relevance" width="900px">
     <div id="tableTransfers">
       <div class="main-left">
         <h4>未关联该系统的设备</h4>
         <div class="border-view">
           <div class="search">
-            <div class="search-small">
+            <div class="search-small" style="padding: 10px 10px 0 10px">
               <el-input
                 placeholder="输入设备名称进行查询"
                 v-model="search.filter"
-                style="width:280px;"
+                style="width:300px;margin-right: 10px;"
                 size="small"
                 clearable
               ></el-input>
               <el-button @click="getLeftData" size="small">查找</el-button>
             </div>
-            <div class="search-small">
+            <div class="search-small" style="padding: 10px">
               <floor-cascader :isWidth="false"></floor-cascader>
               <cascader :isWidth="false" @change="changeCascader" :isAll="true"></cascader>
             </div>
@@ -23,11 +23,13 @@
           <el-table
             ref="multipleTable"
             :data="tableData"
-            height="350px"
+            height="300px"
             tooltip-effect="dark"
             style="width: 100%"
+            class="data-table"
             @selection-change="handleSelectionChange"
             v-loading="isLoading1"
+            border
           >
             <el-table-column type="selection" width="55"></el-table-column>
             <el-table-column label="设备名称" width="120">
@@ -45,7 +47,9 @@
               <template slot-scope="scope">{{ scope.row.infos.InstallLocation || "--" }}</template>
             </el-table-column>
           </el-table>
-          <my-pagination @change="changePages1" :page="pages1"></my-pagination>
+          <div class="right">
+              <my-pagination @change="changePages1" :page="pages1"></my-pagination>
+          </div>
         </div>
       </div>
       <div class="main-button">
@@ -74,7 +78,7 @@
               <el-input
                 placeholder="输入设备名称、设备类名称进行查询"
                 v-model="search2.filter"
-                style="width:220px;"
+                style="width:200px; margin-bottom: 10px;"
                 size="small"
                 clearable
               ></el-input>
@@ -84,11 +88,13 @@
           <el-table
             ref="multipleTable"
             :data="table2Data"
-            height="350px"
+            height="300px"
             tooltip-effect="dark"
             style="width: 100%"
+            class="data-table"
             @selection-change="tableChange"
             v-loading="isLoading2"
+            border
           >
             <el-table-column type="selection" width="55"></el-table-column>
             <el-table-column label="设备名称">
@@ -97,7 +103,9 @@
               >{{ scope.row.infos.EquipLocalName || scope.row.infos.EquipName }}</template>
             </el-table-column>
           </el-table>
-          <my-pagination :page="pages2" @change="changePages2" :isSmall="false"></my-pagination>
+            <div class="right">
+                <my-pagination :page="pages2" @change="changePages2" :isSmall="false"></my-pagination>
+            </div>
         </div>
       </div>
     </div>
@@ -412,26 +420,26 @@ export default {
 </script>
 <style lang="less">
 #tableTransfers {
+    height: 500px;
   width: 100%;
-  overflow: hidden;
+  overflow-x: hidden;
+  overflow-y: auto; 
   h4 {
     font-size: 20px;
     font-weight: 500;
   }
   .search {
-    height: 100px;
     .search-small {
-      height: 45px;
-      padding: 5px;
+        overflow: hidden;
     }
     border-bottom: #dcdfe6 1px solid;
     .search-big {
-      padding: 25px 5px;
+        padding: 10px;
     }
   }
   .main-left {
     float: left;
-    width: 600px;
+    width: 550px;
     height: 500px;
   }
   .border-view {
@@ -457,9 +465,9 @@ export default {
     margin: 0;
   }
   .main-right {
-    height: 500px;
+    height: 300px;
     float: left;
-    width: 300px;
+    width: 230px;
   }
 }
 </style>

+ 2 - 2
src/framework/layout/Main.vue

@@ -8,8 +8,8 @@
             <div id='page-content-wrapper' class='page-content-wrapper'>
                 <div class='page-bar'>
                     <el-breadcrumb separator='/'>
-                        <el-breadcrumb-item :to='{ path: "/" }'>首页</el-breadcrumb-item>
-                        <el-breadcrumb-item v-for='(b, index) in breadcrumb' :key='index'>{{b.label}}</el-breadcrumb-item>
+                        <!-- <el-breadcrumb-item :to='{ path: "/" }'>首页</el-breadcrumb-item> -->
+                        <el-breadcrumb-item v-for='(b, index) in breadcrumb' :key='index' :to='b.path ? { path: b.path } : null'>{{b.label}}</el-breadcrumb-item>
                     </el-breadcrumb>
                 </div>
                 <!-- <router-view class='page-content'/> -->

+ 2 - 2
src/views/data_admin/buildUser/index.vue

@@ -11,7 +11,7 @@
                 ></el-input>
                 <el-button @click='refresh' style="margin-left: 10px;">&nbsp;&nbsp;&nbsp;刷新&nbsp;&nbsp;&nbsp;</el-button>
                 <el-button  @click='addUser'>&nbsp;&nbsp;&nbsp;添加&nbsp;&nbsp;&nbsp;</el-button>
-                <el-button type='danger' @click='someDel'>批量删除</el-button>
+                <!-- <el-button type='danger' @click='someDel'>批量删除</el-button> -->
             </div>
             <el-table
                 slot='table'
@@ -22,7 +22,7 @@
                 v-loading='loading'
                 @selection-change='handleSelectionChange'
             >
-                <el-table-column type='selection' width='55' align='center'></el-table-column>
+                <!-- <el-table-column type='selection' width='55' align='center'></el-table-column> -->
                 <el-table-column prop='UserName' label='姓名' width='100' header-align='center' align='center'></el-table-column>
                 <el-table-column prop='Phone' label='联系电话/登录名' width='120' header-align='center' align='center'></el-table-column>
                 <el-table-column prop='Note' label='备注' header-align='center'></el-table-column>

+ 8 - 2
src/views/ledger/facility/index.vue

@@ -68,7 +68,6 @@ export default {
     this.param.secret = this.secret
     this.getProjName()
   },
-  mounted() { },
   methods: {
     getProjName() {
       let param = {
@@ -90,6 +89,7 @@ export default {
     close(val) {
       this.getEqCode()
       console.log(val)
+      if(this.$refs.cascader)
       this.$refs.cascader.changeVal([val.code])
       //   this.$refs.tableMain.getHeaderData(this.param);
     },
@@ -106,7 +106,10 @@ export default {
         data: { type: "Eq" }
       }
       getFamilyList(param, res => {
-        this.$refs.cascader.pushData(res.Content)
+          if (this.$refs.cascader) {
+              this.$refs.cascader.pushData(res.Content)
+          }
+        
       })
     },
     //获取header的list
@@ -133,6 +136,7 @@ export default {
       getGraphyId(param).then(res => {
         if (res.data.Result == "success") {
           this.graphyId = res.data.graph_id
+          if(this.$refs.tableMain)
           this.$refs.tableMain.setGraphyId(this.graphyId, this.assetGroupList);
           this.getNumber()
         } else {
@@ -153,6 +157,7 @@ export default {
         this.param.floorId = null
       }
       if (!!this.param.deviceId) {
+          if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       } else {
         return;
@@ -164,6 +169,7 @@ export default {
       this.param.deviceId = value.code
       this.param.name = value.facility
       if (!!value) {
+          if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       } else {
         return;

+ 6 - 1
src/views/ledger/property/index.vue

@@ -97,7 +97,9 @@ export default {
         data: { type: "Pe" }
       }
       getFamilyList(param, res => {
-        this.$refs.cascader.pushData(res.Content)
+        if (this.$refs.cascader) {
+              this.$refs.cascader.pushData(res.Content)
+          }
       })
     },
     //获取header的list
@@ -124,6 +126,7 @@ export default {
         this.param.floorId = null
       }
       if (!!this.param.deviceId) {
+          if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       } else {
         return;
@@ -137,6 +140,7 @@ export default {
       this.param.deviceId = val.code
       this.getNumber()
       if (!!this.param.deviceId) {
+          if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       }
     },
@@ -146,6 +150,7 @@ export default {
       console.log(value)
       this.param.deviceId = value.code
       if (!!value) {
+          if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       } else {
         return;

+ 6 - 1
src/views/ledger/system/index.vue

@@ -95,13 +95,16 @@ export default {
         data: { type: "Sy" }
       }
       getFamilyList(param, res => {
-        this.$refs.cascader.pushData(res.Content)
+        if (this.$refs.cascader) {
+              this.$refs.cascader.pushData(res.Content)
+          }
       })
     },
     close(val) {
       this.getProjName()
       console.log(val)
       if (!!val && !!val.code) {
+          if(this.$refs.cascader)
         this.$refs.cascader.changeVal([val.code])
       }
     },
@@ -140,6 +143,7 @@ export default {
         this.param.floorId = null
       }
       if (!!this.param.deviceId) {
+          if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       } else {
         return;
@@ -151,6 +155,7 @@ export default {
       console.log(value)
       this.param.deviceId = value.code
       if (!!value) {
+          if(this.$refs.tableMain)
         this.$refs.tableMain.getHeaderData(this.param);
       } else {
         return;