Bläddra i källkod

项目列表增加部门筛选,样式调整

dev01 11 månader sedan
förälder
incheckning
325d52660a

+ 3 - 1
src/layout/components/Sidebar/Logo.vue

@@ -98,7 +98,7 @@ export default {
   line-height: 50px;
   background: #2b2f3a;
   // text-align: center;
-  padding-left:20px;
+  padding-left: 10%;
   overflow: hidden;
 
   & .sidebar-logo-link {
@@ -127,6 +127,8 @@ export default {
   }
 
   &.collapse {
+    text-align: center;
+    padding-left: 0;
     .sidebar-logo {
       margin-right: 0px;
     }

+ 34 - 16
src/views/project/list/index.vue

@@ -2,19 +2,37 @@
   <div class="app-container">
     <el-row :gutter="20">
       <!--部门数据-->
-      <!-- <el-col :span="4" :xs="24">
+      <el-col
+        :span="2"
+        :xs="24"
+        style="padding-left: 0; padding-right: 0; overflow-x: auto"
+      >
         <div class="head-container">
-          <el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search"
-            style="margin-bottom: 20px" />
+          <el-input
+            v-model="deptName"
+            placeholder="请输入部门名称"
+            clearable
+            size="small"
+            prefix-icon="el-icon-search"
+            style="margin-bottom: 20px"
+          />
         </div>
-        <div class="head-container">
-          <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
-            :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
-            @node-click="handleNodeClick" />
+        <div class="head-container" style="display: flex">
+          <el-tree
+            :data="deptOptions"
+            :props="defaultProps"
+            :expand-on-click-node="false"
+            :filter-node-method="filterNode"
+            ref="tree"
+            node-key="id"
+            default-expand-all
+            highlight-current
+            @node-click="handleNodeClick"
+          />
         </div>
-      </el-col> -->
+      </el-col>
       <!--用户数据-->
-      <el-col :span="24" :xs="24">
+      <el-col :span="22" :xs="24">
         <el-form
           :model="queryParams"
           ref="queryForm"
@@ -215,7 +233,7 @@
           <el-table-column
             label="累积工时"
             align="center"
-            width="80"
+            width="50"
             key="duration"
             prop="duration"
             v-if="columns[7].visible"
@@ -231,12 +249,15 @@
           <el-table-column
             label="起止时间"
             align="center"
+            width="168"
             key="startTime"
             prop="startTime"
             v-if="columns[9].visible"
           >
             <template slot-scope="scope">
-              <div>{{ scope.row.startTime + " 至 " + scope.row.endTime }}</div>
+              <div style="font-size: 12px;">
+                {{ scope.row.startTime + " 至 " + scope.row.endTime }}
+              </div>
             </template>
           </el-table-column>
           <el-table-column
@@ -473,7 +494,7 @@ import {
   listStaff,
   deleteStaff,
 } from "@/api/system/project";
-import { selectName } from "@/api/system/user";
+import { selectName, deptTreeSelect } from "@/api/system/user";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -588,7 +609,7 @@ export default {
   },
   created() {
     this.getList();
-    // this.getDeptTree();
+    this.getDeptTree();
     this.getConfigKey("sys.user.initPassword").then((response) => {
       this.initPassword = response.msg;
     });
@@ -776,9 +797,6 @@ export default {
       this.$refs["form"].validate((valid) => {
         this.form.startTime = this.dateRange1[0];
         this.form.endTime = this.dateRange1[1];
-
-        console.log("-----");
-        return;
         if (valid) {
           if (this.form.id != undefined) {
             updateProject(this.form).then((response) => {

+ 16 - 9
src/views/record/list/index.vue

@@ -2,7 +2,11 @@
   <div class="app-container">
     <el-row :gutter="20">
       <!--部门数据-->
-      <el-col :span="2" :xs="24" style="padding-left:0;padding-right:0;">
+      <el-col
+        :span="2"
+        :xs="24"
+        style="padding-left: 0; padding-right: 0; overflow-x: auto"
+      >
         <div class="head-container">
           <el-input
             v-model="deptName"
@@ -13,7 +17,7 @@
             style="margin-bottom: 20px"
           />
         </div>
-        <div class="head-container">
+        <div class="head-container" style="display: flex">
           <el-tree
             :data="deptOptions"
             :props="defaultProps"
@@ -229,9 +233,12 @@
             key="projectStatus"
             prop="projectStatus"
             v-if="columns[9].visible"
-            >
+          >
             <template slot-scope="scope">
-              <dict-tag :options="dict.type.syx_record_stage" :value="scope.row.projectStatus"/>
+              <dict-tag
+                :options="dict.type.syx_record_stage"
+                :value="scope.row.projectStatus"
+              />
             </template>
           </el-table-column>
           <el-table-column
@@ -607,9 +614,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.head-container {
-  word-wrap: break-word;
-  overflow: hidden;
-  word-break: break-all;
-}
+// .head-container {
+//   word-wrap: break-word;
+//   overflow: hidden;
+//   word-break: break-all;
+// }
 </style>

+ 11 - 7
src/views/system/user/index.vue

@@ -2,7 +2,11 @@
   <div class="app-container">
     <el-row :gutter="20">
       <!--部门数据-->
-      <el-col :span="2" :xs="24" style="padding-left:0;padding-right:0;">
+      <el-col
+        :span="2"
+        :xs="24"
+        style="padding-left: 0; padding-right: 0; overflow-x: auto"
+      >
         <div class="head-container">
           <el-input
             v-model="deptName"
@@ -13,7 +17,7 @@
             style="margin-bottom: 20px"
           />
         </div>
-        <div class="head-container">
+        <div class="head-container" style="display: flex">
           <el-tree
             :data="deptOptions"
             :props="defaultProps"
@@ -1103,9 +1107,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.head-container {
-  word-wrap: break-word;
-  overflow: hidden;
-  word-break: break-all;
-}
+// .head-container {
+//   word-wrap: break-word;
+//   overflow: hidden;
+//   word-break: break-all;
+// }
 </style>

+ 2 - 2
vue.config.js

@@ -35,8 +35,8 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // target: `http://172.16.0.255:8888`,
-        target: `https://yanfa.jishutao.com/prod-api`,
+        target: `http://172.16.0.255:8888`,
+        // target: `https://yanfa.jishutao.com/prod-api`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''