Преглед изворни кода

Merge branch 'http_mock' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into http_mock

qinzhipeng_v пре 5 година
родитељ
комит
6da8db3337

+ 18 - 0
src/components/dialog/normalDialog.vue

@@ -43,3 +43,21 @@ export default {
   }
 }
 </script>
+<style scoped lang="scss">
+.el-dialog__header {
+  padding: 20px;
+}
+.el-dialog__title{
+  position: relative;
+}
+>>>.el-dialog__title::before {
+  content:" ";
+  display: inline-block;
+  position: absolute;
+  top: 22px;
+  left: 10px;
+  width: 5px;
+  height: 20px;
+  background-color: rgb(64, 158, 255);;
+}
+</style>

+ 9 - 9
src/views/Platform/presentation/testPresentation.vue

@@ -377,12 +377,12 @@ export default {
       this.$set(this.queryData2, 'state', '')
       this.$set(this.queryData2, 'radio', undefined)
       this.restaurants = []
-      taskListCreate({ status: 5 }).then(res => {
+      taskListCreate({ statusList: [1], bizId: localStorage.getItem('bizId') }).then(res => {
         const arr = []
         switch (e) {
           case 1:
             for (var ele of res.data.projectInfoList) {
-              arr.push({ value: ele.name, id: ele.id, type: ele.platForm, bizId: ele.bizId, typeString: e })
+              arr.push({ value: ele.name, id: ele.id, typeString: e })
             }
             this.restaurants = arr
             this.$refs['btn1'].$el.style.background = '#409EFF'
@@ -392,7 +392,7 @@ export default {
             break
           case 2:
             for (var vel of res.data.taskInfoList) {
-              arr.push({ value: vel.name, id: vel.id, type: vel.type, bizId: vel.bizId, typeString: e })
+              arr.push({ value: vel.name, id: vel.id, typeString: e })
             }
             this.restaurants = arr
             this.$refs['btn1'].$el.style.background = '#FFFFFF'
@@ -406,12 +406,12 @@ export default {
     getQueryData1(e) {
       this.restaurants = []
       this.states = ''
-      taskListCreate({ status: 7 }).then(res => {
+      taskListCreate({ statusList: [3], bizId: localStorage.getItem('bizId') }).then(res => {
         const arr = []
         switch (e) {
           case 1:
             for (var ele of res.data.projectInfoList) {
-              arr.push({ value: ele.name, id: ele.id, type: ele.platForm, bizId: ele.bizId, typeString: e })
+              arr.push({ value: ele.name, id: ele.id, typeString: e })
             }
             this.restaurants = arr
             this.$refs['btn1'].$el.style.background = '#409EFF'
@@ -421,7 +421,7 @@ export default {
             break
           case 2:
             for (var vel of res.data.taskInfoList) {
-              arr.push({ value: vel.name, id: vel.id, type: vel.type, bizId: vel.bizId, typeString: e })
+              arr.push({ value: vel.name, id: vel.id, typeString: e })
             }
             this.restaurants = arr
             this.$refs['btn1'].$el.style.background = '#FFFFFF'
@@ -472,12 +472,12 @@ export default {
       this.restaurants = []
       this.states = ''
       this.$set(this.queryDataState, 'code', '')
-      taskListCreate({ status: 7 }).then(res => {
+      taskListCreate({ statusList: [3], bizId: localStorage.getItem('bizId') }).then(res => {
         const arr = []
         switch (e) {
           case 1:
             for (var ele of res.data.projectInfoList) {
-              arr.push({ name: ele.name, id: ele.id, type: ele.platForm, bizId: ele.bizId, projectId: ele.id })
+              arr.push({ name: ele.name, id: ele.id, projectId: ele.id })
             }
             this.restaurants = arr
             this.$refs['btn1'].$el.style.background = '#409EFF'
@@ -487,7 +487,7 @@ export default {
             break
           case 2:
             for (var vel of res.data.taskInfoList) {
-              arr.push({ name: vel.name, id: vel.id, type: vel.type, bizId: vel.bizId, taskId: vel.id })
+              arr.push({ name: vel.name, id: vel.id, taskId: vel.id })
             }
             this.restaurants = arr
             this.$refs['btn1'].$el.style.background = '#FFFFFF'

+ 48 - 44
src/views/ToConfigure/configure.vue

@@ -92,7 +92,7 @@
       <div class="two-hao module">
         <el-container style="height:calc(100vh - 140px);">
           <el-aside class="aside">
-            <label class="tab-line">业务线<i class="el-icon-circle-plus" @click="handlerNodeTree('add');dialogTitle='新增业务线'" /></label>
+            <label class="tab-line" style="margin-bottom:10px">业务线<i class="el-icon-circle-plus" @click="handlerNodeTree('add');dialogTitle='新增业务线'" /></label>
             <el-tree
               ref="tree"
               node-key="id"
@@ -103,6 +103,7 @@
               <span slot-scope="{ node, data }" class="custom-tree-node">
                 <span>{{ node.label }}</span>
                 <el-popover
+                  ref="popover"
                   trigger="click"
                   placement="bottom"
                 >
@@ -150,8 +151,10 @@
                 row-key="id"
                 border
                 :tree-props="{children: 'childModules', hasChildren: 'hasChildren'}"
-                :row-class-name="tableRowhidden"
                 header-align="center"
+                size="mini"
+                :header-cell-style="{ background: '#F2F3F6' }"
+                fit
               >
                 <el-table-column v-if="false" prop="id" label="ID" width="180" align="center" />
                 <el-table-column prop="moduleName" label="模块名称">
@@ -159,20 +162,25 @@
                     模块名称<i class="el-icon-circle-plus" @click="handlerModule('add')" />
                   </template>
                 </el-table-column>
-                <el-table-column prop="creator" label="创建人" width="120" align="center" />
-                <el-table-column prop="createTime" label="创建时间" width="180" align="center" />
+                <el-table-column prop="creator" label="创建人" width="150" align="center" />
+                <el-table-column prop="createTime" label="创建时间" width="150" align="center" />
                 <el-table-column label="操作" width="240" align="center">
                   <template slot-scope="scope">
                     <el-button
                       size="mini"
+                      plain
                       @click="handlerModule('add', scope.row, scope.$index)"
                     >添加</el-button>
                     <el-button
                       size="mini"
+                      plain
+                      type="primary"
                       @click="handlerModule('edit', scope.row, scope.$index)"
                     >编辑</el-button>
                     <el-button
                       size="mini"
+                      plain
+                      type="danger"
                       @click="handlerModule('delete', scope.row, scope.$index)"
                     >删除</el-button>
                   </template>
@@ -545,8 +553,6 @@ export default {
         this.$message({ message: '添加成功', type: 'success' })
         this.getBiz_list()
         this.showDialog = false
-      } else {
-        this.$message({ message: res.msg, type: 'error' })
       }
     },
     async editNodeTree(nodeForm) { // 编辑业务线
@@ -555,8 +561,6 @@ export default {
         this.$message({ message: '修改成功', type: 'success' })
         this.getBiz_list()
         this.showDialog = false
-      } else {
-        this.$message({ message: res.msg, type: 'error' })
       }
     },
     async deteleNodeTree(nodeForm) { // 删除业务线
@@ -565,8 +569,6 @@ export default {
         this.$message({ message: '删除成功', type: 'success' })
         this.getBiz_list()
         this.showDialog = false
-      } else {
-        this.$message({ message: res.msg, type: 'error' })
       }
     },
     handleNodeClick(data) { // 选择业务线
@@ -578,13 +580,17 @@ export default {
     },
     async getQueryBizModuleList(bizId) { // 获取结构化模块列表
       const res = await queryBizModuleList(bizId)
-      this.moduleData = res.data
+      this.moduleData = this.handleData(res.data)
     },
-    tableRowhidden(row, index) { // 隐藏处理
-      if (row.row.isDelete === 1) {
-        return 'hidden-row'
+    handleData(arr) {
+      if (arr.length === 0) return
+      const newArr = arr.filter(item => {
+        return item.isDelete !== 1
+      })
+      for (let i = 0; i < newArr.length; i++) {
+        newArr[i].childModules = this.handleData(newArr[i].childModules)
       }
-      return ''
+      return newArr
     },
     handlerModule(type, data, index) { // 模块处理
       console.log(data)
@@ -592,6 +598,7 @@ export default {
       this.curcentModule = type
       this.moduleForm = { bizId: null, moduleNames: [null], parentId: -1, id: null }// 初始化
       this.curcentParent = '无'
+      this.moduleTitle = '新增模块'
       if (data && type === 'add') {
         this.moduleTitle = '新增模块'
         this.curcentParent = data.moduleName
@@ -647,8 +654,6 @@ export default {
         this.$message({ message: '添加成功', type: 'success' })
         this.getQueryBizModuleList(this.curcentTreeData.id)// 重新获取模块列表
         this.moduleDialog = false
-      } else {
-        this.$message({ message: res.msg, type: 'error' })
       }
     },
     async updataModule(moduleForm) { // 更新模块
@@ -663,8 +668,6 @@ export default {
         this.$message({ message: '更新成功', type: 'success' })
         this.getQueryBizModuleList(this.curcentTreeData.id)// 重新获取模块列表
         this.moduleDialog = false
-      } else {
-        this.$message({ message: res.msg, type: 'error' })
       }
     },
     async deleteModule(moduleForm) { // 删除模块
@@ -677,14 +680,12 @@ export default {
         this.moduleData = []// 初始化
         this.getQueryBizModuleList(this.curcentTreeData.id)// 重新获取模块列表
         this.moduleDialog = false
-      } else {
-        this.$message({ message: res.msg, type: 'error' })
       }
     }
   }
 }
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
   .set-background{
     background-color: #F2F3F6;
     min-width: 900px;
@@ -712,7 +713,9 @@ export default {
       overflow: auto;
       border-radius:4px;
       background-color: white;
+      padding-left:20px;
       .tab-line {
+        font-size: 14px;
         width: 100%;
         display: inline-block;
         padding-left: 15%;
@@ -728,14 +731,19 @@ export default {
       }
       .el-tree-node:hover .icon-display{
         display: inline-block;
+        color: #909399
       }
       .is-current {
         color: rgb(64, 158, 255);
         background-color: #f0f7ff;
+        .icon-display{
+          color: rgb(64, 158, 255) !important;
+        }
       }
     }
     .module {
       background-color: #F2F3F6;
+      padding-left:0px;
     }
   }
   .aside{
@@ -750,7 +758,7 @@ export default {
   .combine-table{
     background-color: white;
     border-radius: 4px;
-    width: 82.7%;
+    width: 90%;
     margin: 0 0 10px 10px;
     flex: 0 1 auto !important;
     i {
@@ -764,38 +772,19 @@ export default {
     }
     .table-title {
       color: #606266;
-      font-size: 20px;
+      font-size: 16px;
       font-weight: bold;
       margin-right: 20px;
     }
     .table-id {
       color: #909399;
-      font-size: 14px;
+      font-size: 12px;
     }
     .el-col {
       display: flex;
       align-items: center;
     }
   }
-  .el-table .hidden-row {
-    display: none;
-  }
-  .el-popover {
-    min-width: 50px !important;
-    padding: 0;
-    width: 50px;
-    .edit-cancel {
-      display: flex;
-      flex-direction: column;
-      button {
-        margin: 0;
-      }
-    }
-  }
-  // .edit-cancel {
-  //   display: flex;
-  //   justify-content: space-around;
-  // }
   .custom-tree-node {
     flex: 1;
     display: flex;
@@ -819,3 +808,18 @@ export default {
     display: none;
   }
 </style>
+<style lang="scss">
+  .el-popover {
+    min-width: 50px;
+    padding: 0;
+    width: 50px;
+    .edit-cancel {
+      display: flex;
+      flex-direction: column;
+      button {
+        margin: 0;
+        color: #909399
+      }
+    }
+  }
+</style>

+ 1 - 1
src/views/projectManage/projectList/projectIndex.vue

@@ -500,7 +500,7 @@ export default {
 }
 </script>
 
-<style>
+<style scoped>
 .el-loading-mask {
   z-index: 8;
 }