Kaynağa Gözat

扫楼修改

zhangyu 5 yıl önce
ebeveyn
işleme
d28a4237a3

+ 6 - 0
src/components/business_space/business/handsontable.vue

@@ -278,6 +278,7 @@ export default {
 				zone: this.zoneObj.code
 			}
       params.map(item => {
+        if(item.RoomID)
         param.data.push({RoomID: item.RoomID})
       })
       this.$confirm("此操作将删除业务空间,是否继续?", "提示", {
@@ -302,6 +303,10 @@ export default {
           delete param[key]
         }
       })
+      if (!param.RoomLocalName) {
+        this.$message("新增业务空间本地名称不能为空!")
+        return
+      }
       if (!Object.keys(param).length) {
         this.$message("新添加业务空间内容不能为空!")
         return
@@ -317,6 +322,7 @@ export default {
         data: [param]
       }
       createZone(params,(res) => {
+        this.$message.success("添加成功!")
         this.getData()
       })
     },

+ 1 - 1
src/framework/style/layout.scss

@@ -193,7 +193,7 @@ body {
     >.data-table {
         // flex-grow: 1;
         // flex-shrink: 1;
-        height: calc(100% - 52px);
+        height: calc(100% - 54px);
         // overflow-x: auto;
         // overflow-y: auto;
         background: #fff;

+ 62 - 49
src/views/data_admin/buildLog/index.vue

@@ -1,40 +1,42 @@
 <template>
   <div style="display: flex; flex-direction: column;flex-grow: 1; flex-shrink: 1;">
-    <table-page-template>
-      <div slot='form' class='condition'>
+    <div class="log-main">
+      <div class='condition'>
         <el-input v-model.trim='searchValue' class='margin-right' style='width: 300px;'
           placeholder='请输入操作人、动作、对象id等关键字搜索' @change='searchChange'></el-input>
         <el-date-picker class='margin-right' v-model='dateValue' type='daterange' align='center' :clearable='false'
           unlink-panels range-separator='至' start-placeholder='开始日期' end-placeholder='结束日期'
           :picker-options='pickerOptions' @change='dateChange' value-format='yyyy-MM-dd'></el-date-picker>
       </div>
-      <div slot='table' style="border: 1px solid #dfe6ec">
+      <div class="log-table">
         <p style="text-align: right; padding: 10px">
           <el-button style="width: 96px" @click='action'>动作说明</el-button>
           <el-button style="width: 96px" @click='refresh'>刷新</el-button>
           <el-button style="width: 96px" @click='downExcel'>导出到Excel</el-button>
         </p>
-        <el-table :data='tableData' border tooltip-effect='dark' style='width: 100%;' v-loading='loading'
-          height="710px">
-          <el-table-column prop='CreateTime' label='时间' width='150' align='center' header-align='center'>
-          </el-table-column>
-          <el-table-column prop='Comming' label='来源' width='120' header-align='center' align="center"></el-table-column>
-          <el-table-column prop='UserName' label='操作人' width='120' header-align='center' align='center'>
-          </el-table-column>
-          <el-table-column prop='Phone' label='手机' width='150' header-align='center' align='center'></el-table-column>
-          <el-table-column prop='Action' label='动作' header-align='center'></el-table-column>
-          <el-table-column prop='UserId' label='对象id' header-align='center' align='center'></el-table-column>
-          <el-table-column label='操作说明' width='350' header-align='center'>
-            <template slot-scope='scope'>
-              <div class='ellipsis btn' :title='scope.row.Note'>{{scope.row.Note}}</div>
-            </template>
-          </el-table-column>
-        </el-table>
+        <div style="height: calc(100% - 52px)">
+          <el-table :data='tableData' tooltip-effect='dark' style='width: 100%;' v-loading='loading' height="100%">
+            <el-table-column prop='CreateTime' label='时间' width='150' align='center' header-align='center'>
+            </el-table-column>
+            <el-table-column prop='Comming' label='来源' width='120' header-align='center' align="center"></el-table-column>
+            <el-table-column prop='UserName' label='操作人' width='120' header-align='center' align='center'>
+            </el-table-column>
+            <el-table-column prop='Phone' label='手机' width='150' header-align='center' align='center'></el-table-column>
+            <el-table-column prop='Action' label='动作' width='200' header-align='center' align='center'></el-table-column>
+            <el-table-column prop='UserId' label='对象id' width='300' header-align='center' align='center'></el-table-column>
+            <el-table-column label='操作说明' header-align='left' align="left">
+              <template slot-scope='scope'>
+                <div class='ellipsis' :title='scope.row.Note'>{{scope.row.Note}}</div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
       </div>
-
-      <base-pagination :currentPages='pageNum' :total='total' @pageChanged='pageChanged' slot='pagination'>
-      </base-pagination>
-    </table-page-template>
+      <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total">
+      </el-pagination>
+    </div>
     <saga-action ref='action'></saga-action>
   </div>
 </template>
@@ -105,9 +107,6 @@ export default {
           }
         ]
       },
-      pageNum: 1,
-      pageSize: 50,
-      total: 80,
       page: {
         pageSize: 50,
         pageSizes: [10, 20, 50, 100],
@@ -124,7 +123,7 @@ export default {
   },
   methods: {
     searchChange(value) {
-      this.pageNum = 1
+      this.page.pageNumber = 1
       this.getLogData()
     },
     refresh() {
@@ -174,13 +173,18 @@ export default {
           console.dirxml(err)
         })
     },
-    pageChanged(page, size) {
-      this.pageNum = page
-      this.pageSize = size
+    //切换每页显示多少条数据
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.getLogData()
+    },
+    //切换页数
+    handleCurrentChange(val) {
+      this.page.pageNumber = val
       this.getLogData()
     },
     dateChange(value) {
-      this.pageNum = 1
+      this.page.pageNumber = 1
       this.getLogData()
     },
     getLogData() {
@@ -189,14 +193,14 @@ export default {
         startTime: this.dateValue[0] + ' 00:00:00',
         endTime: this.dateValue[1] + ' 23:59:59',
         filter: this.searchValue,
-        pageNum: this.pageNum,
-        pageSize: this.pageSize,
+        pageNum: this.page.pageNumber,
+        pageSize: this.page.pageSize,
         ProjId: this.projectId,
         UserId: this.userId
       }
       getBuildLog(param).then(res => {
         this.loading = false
-        this.total = res.data.Count
+        this.page.total = res.data.Count
         this.tableData = res.data.LogList
       })
     },
@@ -217,21 +221,30 @@ export default {
 </script>
 
 <style lang='less' scoped>
-.margin-right {
-  margin-right: 10px;
-}
-.condition {
-  margin: 10px;
-  display: flex;
-}
-.ellipsis {
-  width: 350px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
+.log-main{
+  height: 100%;
+  background: #fff;
+  .condition {
+    margin: 10px;
+    display: flex;
+    .margin-right {
+      margin-right: 10px;
+    }
+  }
+  .log-table{
+    border-top: 2px solid #dfe6ec;
+    height: calc(100% - 100px);
+    .ellipsis {
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+  }
 }
-.btn {
-  height: 28px;
-  line-height: 28px;
+</style>
+<style lang="less">
+.el-table th {
+  background-color: #d9d9d9;
+  color: #000;
 }
 </style>