소스 검색

页面样式 首页 项目列表

XuZinan 2 년 전
부모
커밋
97e180231f
11개의 변경된 파일679개의 추가작업 그리고 131개의 파일을 삭제
  1. 55 29
      App.vue
  2. 6 2
      components/search-drawer/search-drawer.vue
  3. 60 2
      pages.json
  4. 0 2
      pages/Project/detail.vue
  5. 414 0
      pages/Project/edit.vue
  6. 125 85
      pages/Project/list.vue
  7. 15 11
      pages/index/index.vue
  8. BIN
      static/app-plus/menu-title-bg.png
  9. BIN
      static/fonts/dataMeter.ttf
  10. BIN
      static/index/bg.png
  11. 4 0
      store/index.js

+ 55 - 29
App.vue

@@ -1,35 +1,61 @@
 <script>
-	export default {
-		onLaunch: function() {
-			console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
-			console.log('App Launch')
-		},
-		onShow: function() {
-			console.log('App Show')
-		},
-		onHide: function() {
-			console.log('App Hide')
-		}
-	}
+export default {
+  onLaunch: function () {
+    console.warn(
+      "当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!"
+    );
+    console.log("App Launch");
+  },
+  onShow: function () {
+    console.log("App Show");
+  },
+  onHide: function () {
+    console.log("App Hide");
+  },
+};
 </script>
 
 <style lang="scss">
-	/*每个页面公共css */
-	@import '@/uni_modules/uni-scss/index.scss';
-	/* #ifndef APP-NVUE */
-	@import '@/static/customicons.css';
-	// 设置整个项目的背景色
-	page {
-		background-color: #f5f5f5;
-	}
-	* {
-		box-sizing: border-box;
-	}
+/*每个页面公共css */
+@import "@/uni_modules/uni-scss/index.scss";
+/* #ifndef APP-NVUE */
+@import "@/static/customicons.css";
+// 设置整个项目的背景色
+@font-face {
+  font-family: "dataMeter";
+  src: url("static/fonts/dataMeter.ttf");
+  font-weight: normal;
+  font-style: normal;
+}
+.page {
+  position: relative;
+  // padding-bottom: 50px;
+  min-height: 100vh;
+  display: flex;
+  flex-direction: column;
+  background: url("./static/index/bg.png") no-repeat center;
+  background-size: 100% 100%;
+  .content {
+    flex: 1 1 auto;
+    margin: 0 30rpx;
+    background: #fff;
+    overflow-y: auto;
+    /*
+	* 移动端下当未设置高度时,flex:1 1 auto设置不生效,content不会有滚动条。
+	* 导致uni-content出现滚动条,footer_text跟随页面滚动
+	* 设置任意高度后content样式正常,显示滚动条,footer_text始终在底部。
+	*/
+    height: 600rpx;
+  }
+}
+* {
+  box-sizing: border-box;
+}
 
-	/* #endif */
-	.example-info {
-		font-size: 14px;
-		color: #333;
-		padding: 10px;
-	}
+/* #endif */
+.example-info {
+  font-size: 14px;
+  color: #333;
+  padding: 10px;
+}
 </style>

+ 6 - 2
components/search-drawer/search-drawer.vue

@@ -1,6 +1,6 @@
 <template>
   <view>
-    <view class="search" @click="showDrawer"></view>
+    <view v-show="showSearch" class="search" @click="showDrawer"></view>
     <uni-drawer ref="showRight" mode="right" :width="300">
       <scroll-view class="drawer" style="height: 100%" scroll-y="true">
         <div class="title">{{ title }}</div>
@@ -14,6 +14,7 @@
   </view>
 </template>
 <script>
+import { mapState } from "vuex";
 export default {
   name: "search-drawer",
   props: ["title", "visible"],
@@ -26,6 +27,9 @@ export default {
       }
     },
   },
+  computed: {
+    ...mapState(["showSearch"]),
+  },
   methods: {
     onOk() {
       this.$emit("onOk");
@@ -102,4 +106,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 60 - 2
pages.json

@@ -1,3 +1,4 @@
+/*
 {
   "pages": [
     {
@@ -97,11 +98,68 @@
     }
   ],
   "globalStyle": {
-    "navigationBarTextStyle": "black",
-    "navigationBarBackgroundColor": "#F8F8F8",
+    "navigationBarTextStyle": "white",
+    "navigationBarBackgroundColor": "#2D3E5E",
     "backgroundColor": "#F8F8F8",
     "app-plus": {
       "background": "#efeff4"
     }
   }
 }
+*/
+{
+  "pages": [
+    {
+      "path": "pages/index/index"
+    },
+    {
+      "path": "pages/WorkingHours/index"
+    },
+    {
+      "path": "pages/login/login",
+      "style": {
+        "navigationBarBackgroundColor": "#7399DB"
+      }
+    },
+    {
+      "path": "pages/WorkingHours/add"
+    },
+    {
+      "path": "pages/WorkingHours/audit"
+    },
+    {
+      "path": "pages/Project/list",
+      "style": {
+        "enablePullDownRefresh": true,
+        "pullToRefresh": {
+          "color": "#2979ff",
+          "offset": "60px"
+        }
+      }
+    },
+    {
+      "path": "pages/Project/add"
+    },
+    {
+      "path": "pages/Project/detail"
+    },
+    {
+      "path": "pages/Project/auth",
+      "style": {
+        "enablePullDownRefresh": true,
+        "pullToRefresh": {
+          "color": "#2979ff",
+          "offset": "60px"
+        }
+      }
+    },
+    {
+      "path": "pages/Project/member"
+    }
+  ],
+  "globalStyle": {
+    "app-plus": {
+      "titleNView": false
+    }
+  }
+}

+ 0 - 2
pages/Project/detail.vue

@@ -235,10 +235,8 @@ import {
   startWarranty,
   startOperate,
 } from "@/services/project";
-import uniFormsItem from "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue";
 const contracts = ["无合同", "有合同"];
 export default {
-  components: { uniFormsItem },
   data() {
     return {
       auth: false,

+ 414 - 0
pages/Project/edit.vue

@@ -0,0 +1,414 @@
+<template>
+  <view>
+    <view class="card-wrapper">
+      <uni-card title="操作">
+        <view class="editBtns" slot="actions">
+          <view class="edit" @click="onClickProject">项目详情</view>
+          <view class="edit" v-if="canEdit(0)" @click="onEdit">编辑</view>
+          <view class="edit" v-if="canEdit(0)" @click="onDelete">删除</view>
+          <view class="edit" v-if="canEdit(0)" @click="onSubmitAuth">
+            提交审核
+          </view>
+          <view class="edit" v-if="canEdit(1)" @click="onMember">
+            成员管理
+          </view>
+          <view class="edit" v-if="canEdit(2)" @click="onExecute">
+            转执行
+          </view>
+          <view class="edit" v-if="canEdit(3)" @click="onWarranty">
+            转质保
+          </view>
+          <view class="edit" v-if="canEdit(3)" @click="onOperate">
+            转运营
+          </view>
+        </view>
+      </uni-card>
+    </view>
+
+    <uni-popup ref="exePopup" type="dialog">
+      <uni-popup-dialog
+        title="转执行"
+        type="info"
+        @confirm="submitExecute"
+        @close="onCancel"
+        before-close
+      >
+        <uni-forms
+          ref="exe"
+          :modelValue="formData"
+          label-position="left"
+          :rules="exeRules"
+        >
+          <uni-forms-item required label="执行经理:" name="manager">
+            <uni-data-picker
+              class="depSelect"
+              placeholder="请选择执行经理"
+              :localdata="depUserTree"
+              @change="changeManager"
+            />
+          </uni-forms-item>
+          <uni-forms-item required label="合同状态:" name="contract">
+            <picker
+              @change="changeContract"
+              :range="contracts"
+              :value="formData.contract"
+            >
+              <view class="select">{{ contracts[formData.contract] }}</view>
+            </picker>
+          </uni-forms-item>
+        </uni-forms>
+      </uni-popup-dialog>
+    </uni-popup>
+    <uni-popup ref="wtyPopup" type="dialog">
+      <uni-popup-dialog
+        title="转质保"
+        type="info"
+        @confirm="submitWarranty"
+        @close="onCancel"
+        before-close
+      >
+        <uni-forms
+          ref="wty"
+          :modelValue="formData"
+          label-position="left"
+          :rules="wtyRules"
+        >
+          <uni-forms-item required label="质保经理:" name="manager">
+            <uni-data-picker
+              class="depSelect"
+              placeholder="请选择质保经理"
+              :localdata="depUserTree"
+              @change="changeManager"
+            />
+          </uni-forms-item>
+        </uni-forms>
+      </uni-popup-dialog>
+    </uni-popup>
+    <uni-popup ref="optPopup" type="dialog">
+      <uni-popup-dialog
+        title="转运营"
+        type="info"
+        @confirm="submitOperate"
+        @close="onCancel"
+        before-close
+      >
+        <uni-forms
+          ref="opt"
+          :modelValue="formData"
+          label-position="left"
+          :rules="optRules"
+        >
+          <uni-forms-item required label="运营经理:" name="manager">
+            <uni-data-picker
+              class="depSelect"
+              placeholder="请选择运营经理"
+              :localdata="depUserTree"
+              @change="changeManager"
+            />
+          </uni-forms-item>
+        </uni-forms>
+      </uni-popup-dialog>
+    </uni-popup>
+  </view>
+</template>
+
+<script>
+import { mapState } from "vuex";
+import {
+  deleteApproval,
+  submitAudit,
+  startExecution,
+  startWarranty,
+  startOperate,
+} from "@/services/project";
+export default {
+  props: ["project", "user"],
+  computed: {
+    ...mapState(["depUserTree", "showSearch"]),
+  },
+  data() {
+    return {
+      contracts: ["无合同", "有合同"],
+      formData: {
+        manager: "",
+        contract: null,
+      },
+      exeRules: {
+        manager: {
+          rules: [{ required: true, errorMessage: "请选择质保经理" }],
+        },
+        contract: {
+          rules: [{ required: true, errorMessage: "请选择合同状态" }],
+        },
+      },
+      wtyRules: {
+        manager: {
+          rules: [{ required: true, errorMessage: "请选择质保经理" }],
+        },
+      },
+      optRules: {
+        manager: {
+          rules: [{ required: true, errorMessage: "请选择运营经理" }],
+        },
+      },
+    };
+  },
+  methods: {
+    async onClickProject() {
+      await this.$store.commit("setCurrentProject", this.project);
+      uni.navigateTo({
+        url: `./detail?id=${this.project.id}`,
+      });
+    },
+    canEdit(index) {
+      let {
+        audit_status,
+        project_status,
+        author,
+        LeaderId,
+        opt_manager_id,
+        wty_manager_id,
+      } = this.project;
+      //audit_status: 0未提审1审核中2审核拒绝3审核通过
+      //project_status: 0售前1执行2转运营3转质保
+      switch (index) {
+        //编辑删除提审
+        case 0:
+          //售前阶段,未提审/审核被拒,创建人/管理员
+          return (
+            project_status == 0 &&
+            (audit_status == 0 || audit_status == 2) &&
+            (this.user.ID == author || this.user.IsSuper)
+          );
+        //成员管理
+        case 1:
+          //售前/执行/运营/质保,审核通过,项目经理/管理员
+          let manager;
+          switch (project_status) {
+            case 0:
+              manager = this.user.ID == author;
+              break;
+            case 1:
+              manager = this.user.ID == LeaderId;
+              break;
+            case 2:
+              manager =
+                this.user.ID == LeaderId || this.user.ID == opt_manager_id;
+              break;
+            case 3:
+              manager =
+                this.user.ID == LeaderId || this.user.ID == wty_manager_id;
+              break;
+          }
+          return audit_status == 3 && (manager || this.user.IsSuper);
+        //转执行
+        case 2:
+          //售前,审核通过,售前经理/管理员
+          return (
+            project_status == 0 &&
+            audit_status == 3 &&
+            (this.user.ID == author || this.user.IsSuper)
+          );
+        //转质保运营
+        case 3:
+          //执行,审核通过,执行经理/管理员
+          return (
+            project_status == 1 &&
+            audit_status == 3 &&
+            (this.user.ID == LeaderId || this.user.IsSuper)
+          );
+      }
+    },
+    async onEdit() {
+      await this.$store.commit("setCurrentProject", this.project);
+      uni.navigateTo({
+        url: `./add?project_id=${this.project.id}`,
+      });
+    },
+    onDelete() {
+      uni.showModal({
+        title: "删除项目",
+        content: "是否确认删除该项目",
+        confirmText: "删除",
+        confirmColor: "#ff7875",
+        success: async (res) => {
+          if (res.confirm) {
+            await deleteApproval(this.project);
+            uni.showToast({
+              title: "删除成功",
+            });
+            setTimeout(function () {
+              uni.hideToast();
+							location.reload();
+            }, 1800);
+          }
+        },
+      });
+    },
+    onSubmitAuth() {
+      uni.showModal({
+        title: "提交审核",
+        content: "是否确认提交审核",
+        confirmText: "提审",
+        success: async (res) => {
+          if (res.confirm) {
+            let payload = {
+              id: this.project.id,
+              flow_id: this.project.flow_id,
+              node_id: this.project.node_id,
+            };
+            await submitAudit(payload);
+            uni.showToast({
+              title: "提审成功",
+            });
+            setTimeout(function () {
+              uni.hideToast();
+							location.reload();
+            }, 1800);
+          }
+        },
+      });
+    },
+    async onMember() {
+      await this.$store.commit("setCurrentProject", this.project);
+      uni.navigateTo({
+        url: "./member",
+      });
+    },
+    changeManager(e) {
+      if (e.detail.value.length > 0)
+        this.formData.manager = e.detail.value[e.detail.value.length - 1].value;
+      else this.formData.manager = "";
+    },
+    async onExecute() {
+      await this.$store.commit("setShowSearch", false);
+      this.$refs.exePopup.open();
+    },
+    changeContract(e) {
+      this.formData.contract = e.detail.value;
+    },
+    async submitExecute() {
+      this.$refs.exe.validate(async (err) => {
+        if (!err) {
+          const [dep_id, manager_id] = this.formData.manager.split("-");
+          let payload = {
+            project_code_id: this.project.id,
+            with_contract: Number(this.formData.contract),
+            dep_id: Number(dep_id),
+            exe_manager_id: Number(manager_id),
+          };
+          await startExecution(payload);
+          this.$refs.exePopup.close();
+          uni.showToast({
+            title: "转执行送审成功",
+          });
+          setTimeout(function () {
+            uni.hideToast();
+            location.reload();
+          }, 1800);
+        }
+      });
+    },
+    async onWarranty() {
+      await this.$store.commit("setShowSearch", false);
+      this.$refs.wtyPopup.open();
+    },
+    async submitWarranty() {
+      this.$refs.wty.validate(async (err) => {
+        if (!err) {
+          const [dep_id, manager_id] = this.formData.manager.split("-");
+          let payload = {
+            project_code_id: this.project.id,
+            dep_id: Number(dep_id),
+            wty_manager_id: Number(manager_id),
+          };
+          await startWarranty(payload);
+          this.$refs.wtyPopup.close();
+          uni.showToast({
+            title: "转质保送审成功",
+          });
+          setTimeout(function () {
+            uni.hideToast();
+            location.reload();
+          }, 1800);
+        }
+      });
+    },
+    async onOperate() {
+      await this.$store.commit("setShowSearch", false);
+      this.$refs.optPopup.open();
+    },
+    async submitOperate() {
+      this.$refs.opt.validate(async (err) => {
+        if (!err) {
+          const [dep_id, manager_id] = this.formData.manager.split("-");
+          let payload = {
+            project_code_id: this.project.id,
+            dep_id: Number(dep_id),
+            opt_manager_id: Number(manager_id),
+          };
+          await startOperate(payload);
+          this.$refs.optPopup.close();
+          uni.showToast({
+            title: "转运营送审成功",
+          });
+          setTimeout(function () {
+            uni.hideToast();
+            location.reload();
+          }, 1800);
+        }
+      });
+    },
+    async onCancel() {
+      await this.$store.commit("setShowSearch", true);
+      this.$refs.exePopup.close();
+      this.$refs.wtyPopup.close();
+      this.$refs.optPopup.close();
+      this.formData = {
+        manager: "",
+        contract: null,
+      };
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.editBtns {
+  display: flex;
+  justify-content: space-around;
+  flex-wrap: wrap;
+  margin: 0 5%;
+  .edit {
+    width: 30%;
+    margin-bottom: 20px;
+    font-size: 28rpx;
+    text-align: center;
+  }
+}
+
+.card-wrapper {
+  padding-bottom: 60rpx;
+}
+
+.select {
+  width: 100%;
+  height: 72rpx;
+  line-height: 70rpx;
+  border: 1px solid #666;
+  padding-left: 20rpx;
+}
+::v-deep {
+  .uni-steps__column-title {
+    font-size: 18px;
+    line-height: 24px;
+  }
+  .uni-steps__column-desc {
+    font-size: 14px;
+    line-height: 18px;
+  }
+}
+.depSelect {
+  width: 200px;
+}
+</style>

+ 125 - 85
pages/Project/list.vue

@@ -1,67 +1,95 @@
 <template>
-  <view class="content">
-    <view class="head">
-      <span class="title">项目列表</span>
-      <span class="self">
-        <uni-data-checkbox
-          multiple
-          v-model="checkself"
-          :localdata="self"
-          @change="checkSelf()"
-        ></uni-data-checkbox>
-      </span>
-    </view>
-    <view class="list">
-      <view
-        class="project"
-        v-for="project in projectList"
-        :key="project.id"
-        @click="onClickProject(project)"
-      >
-        {{ `${project.project_name}(${project.project_full_code})` }}
+  <view class="page">
+    <view class="content">
+      <view class="head">
+        <span class="title">项目列表</span>
+        <span class="self">
+          <uni-data-checkbox
+            multiple
+            v-model="checkself"
+            :localdata="self"
+            @change="checkSelf()"
+          ></uni-data-checkbox>
+        </span>
       </view>
-      <view class="loadmore">{{ loadMoreText }}</view>
-    </view>
+      <scroll-view
+        class="list"
+        :scroll-top="scrollTop"
+        scroll-y="true"
+        lower-threshold="20"
+        @scroll="scroll"
+        @scrolltolower="scrollToLower()"
+      >
+        <uni-collapse>
+          <uni-collapse-item
+            v-for="project in projectList"
+            :key="project.id"
+            :border="false"
+            title-border="none"
+          >
+            <template v-slot:title>
+              <uni-list>
+                <uni-list-item
+                  :title="project.project_name"
+                  :note="project.project_full_code"
+                  :rightText="statusList[project.project_status + 1].label"
+                />
+              </uni-list>
+            </template>
+            <edit :project="project" :user="user"></edit>
+          </uni-collapse-item>
+        </uni-collapse>
+        <view class="loadmore">{{ loadMoreText }}</view>
+      </scroll-view>
 
-    <uni-fab
-      :horizontal="'right'"
-      :popMenu="false"
-      @fabClick="onClickAdd()"
-    ></uni-fab>
+      <uni-fab
+        :horizontal="'right'"
+        :popMenu="false"
+        @fabClick="onClickAdd()"
+      ></uni-fab>
 
-    <search-drawer title="查询项目" ref="searchDrawer" @onOk="search">
-      <uni-forms :modelValue="projectFilter" label-position="top" class="form">
-        <uni-forms-item label="项目名称">
-          <uni-easyinput
-            type="text"
-            class="input"
-            v-model="projectFilter.project_name"
-          />
-        </uni-forms-item>
-        <uni-forms-item label="项目编号">
-          <uni-easyinput
-            type="text"
-            class="input"
-            v-model="projectFilter.project_code"
-          />
-        </uni-forms-item>
-        <uni-forms-item label="状态">
-          <picker
-            @change="selectChangeStatus"
-            :range="statusList"
-            :range-key="'label'"
-          >
-            <view class="select">
-              {{
-                projectFilter.project_status != null
-                  ? statusList[projectFilter.project_status + 1].label
-                  : "全部"
-              }}
-            </view>
-          </picker>
-        </uni-forms-item>
-      </uni-forms>
-    </search-drawer>
+      <search-drawer
+        title="查询项目"
+        ref="searchDrawer"
+        @onOk="search"
+      >
+        <uni-forms
+          :modelValue="projectFilter"
+          label-position="top"
+          class="form"
+        >
+          <uni-forms-item label="项目名称">
+            <uni-easyinput
+              type="text"
+              class="input"
+              v-model="projectFilter.project_name"
+            />
+          </uni-forms-item>
+          <uni-forms-item label="项目编号">
+            <uni-easyinput
+              type="text"
+              class="input"
+              v-model="projectFilter.project_code"
+            />
+          </uni-forms-item>
+          <uni-forms-item label="状态">
+            <picker
+              @change="selectChangeStatus"
+              :range="statusList"
+              :range-key="'label'"
+            >
+              <view class="select">
+                {{
+                  projectFilter.project_status != null
+                    ? statusList[projectFilter.project_status + 1].label
+                    : "全部"
+                }}
+              </view>
+            </picker>
+          </uni-forms-item>
+        </uni-forms>
+      </search-drawer>
+    </view>
   </view>
 </template>
 
@@ -69,6 +97,7 @@
 import { queryProject } from "@/services/project";
 import { mapState } from "vuex";
 import mixin from "@/utils/listMixin";
+import edit from "./edit.vue";
 const statusList = [
   { value: null, label: "全部" },
   { value: 0, label: "售前" },
@@ -78,11 +107,15 @@ const statusList = [
 ];
 export default {
   mixins: [mixin],
+  components: {
+    edit,
+  },
   computed: {
     ...mapState(["currentProject", "depUserTree"]),
   },
   data() {
     return {
+      user: {},
       projectList: [],
       projectFilter: {
         project_name: "",
@@ -92,6 +125,8 @@ export default {
       checkself: [],
       statusList,
       self: [{ text: "只看自己", value: 0 }],
+      scrollTop: 0,
+      showSearch: true,
     };
   },
   onLoad() {
@@ -107,6 +142,7 @@ export default {
   },
   methods: {
     async init() {
+      this.user = uni.getStorageSync("user");
       await this.$store.dispatch("getDep");
     },
     async getProject(params) {
@@ -117,12 +153,6 @@ export default {
         : (this.projectList = this.projectList.concat(res.data.list));
       return res.data;
     },
-    async onClickProject(project) {
-      await this.$store.commit("setCurrentProject", project);
-      uni.navigateTo({
-        url: `./detail?id=${project.id}`,
-      });
-    },
     async checkSelf() {
       this.projectFilter = {
         ...this.projectFilter,
@@ -130,10 +160,7 @@ export default {
       };
       this.pagination.currentPage = 1;
       await this.initData();
-      uni.pageScrollTo({
-        scrollTop: 0,
-        duration: 0,
-      });
+      this.scrollTop = 0;
     },
     onClickAdd() {
       uni.navigateTo({
@@ -150,10 +177,18 @@ export default {
       this.pagination.currentPage = 1;
       await this.initData();
       this.$refs.searchDrawer.closeDrawer();
-      uni.pageScrollTo({
-        scrollTop: 0,
-        duration: 0,
-      });
+      this.scrollTop = 0;
+    },
+    scroll(e) {
+      this.scrollTop = e.detail.scrollTop;
+    },
+    scrollToLower() {
+      if (this.projectList.length >= this.pagination.total) {
+        this.loadMoreText = "没有更多数据了";
+        return;
+      }
+      this.pagination.currentPage++;
+      this.initData();
     },
   },
 };
@@ -166,33 +201,38 @@ export default {
   flex-wrap: wrap;
 }
 .head {
-  width: 100%;
-  padding: 0 20px 20px 20px;
+  width: calc(100% - 60rpx);
+  // box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
+  padding: 40rpx;
   position: fixed;
-  background: #f8f8f8;
+  background: url("~@/static/app-plus/menu-title-bg.png") no-repeat center;
+  background-size: 100% 100%;
+  background-color: #fff;
   display: flex;
   justify-content: space-between;
   align-items: center;
   .title {
-    font: 24px bold;
+    font: 18px bold;
+    color: #fff;
   }
   .self {
     font: 16px;
+    padding-left: 20rpx;
+    background-color: #fff;
   }
 }
 .list {
   width: 90%;
-  margin-top: 60px;
-  border-top: 2px solid gray;
+  margin-top: 150rpx;
 }
 .project {
-  border-bottom: 2px solid gray;
-  padding: 20px 0px;
-  font-size: 18px;
+  border-bottom: 2rpx solid gray;
+  padding: 30rpx 0px;
+  font-size: 16px;
 }
 .loadmore {
-  padding: 20px 0px;
-  font-size: 18px;
+  padding: 30rpx 0px;
+  font-size: 16px;
   color: gray;
   text-align: center;
 }

+ 15 - 11
pages/index/index.vue

@@ -1,24 +1,25 @@
 <template>
+<view class="page">
   <view class="content">
     <view class="group">
-      <button class="page" v-if="true" @click="onHandleClick(0)">
-        <uni-icons type="list" size="40" />
+      <button class="button" v-if="true" @click="onHandleClick(0)">
+        <uni-icons type="list" size="35" />
         <view>项目列表</view>
       </button>
-      <button class="page" v-if="true" @click="onHandleClick(1)">
-        <uni-icons type="checkmarkempty" size="40" />
+      <button class="button" v-if="true" @click="onHandleClick(1)">
+        <uni-icons type="checkmarkempty" size="35" />
         <view>项目审核</view>
       </button>
-      <button class="page" v-if="true" @click="onHandleClick(2)">
-        <uni-icons type="calendar" size="40" />
+      <button class="button" v-if="true" @click="onHandleClick(2)">
+        <uni-icons type="calendar" size="35" />
         <view>工时上报</view>
       </button>
-      <button class="page" v-if="true" @click="onHandleClick(3)">
-        <uni-icons type="auth" size="40" />
+      <button class="button" v-if="true" @click="onHandleClick(3)">
+        <uni-icons type="auth" size="35" />
         <view>工时审批</view>
       </button>
     </view>
-  </view>
+  </view></view>
 </template>
 
 <script>
@@ -84,14 +85,17 @@ export default {
 }
 .group {
   width: 90%;
-  padding: 10%;
+  padding: 5%;
   display: flex;
   justify-content: center;
   flex-wrap: wrap;
   background-color: #ffffff;
+  height: 800rpx;
 }
-.page {
+.button {
   width: 40%;
   margin: 5%;
+  height: 280rpx;
+  font-size: 32rpx;
 }
 </style>

BIN
static/app-plus/menu-title-bg.png


BIN
static/fonts/dataMeter.ttf


BIN
static/index/bg.png


+ 4 - 0
store/index.js

@@ -6,6 +6,7 @@ import { queryDep } from "@/services/project";
 Vue.use(Vuex);
 const store = new Vuex.Store({
   state: {
+    showSearch: true,
     typeList: [],
     allType: {},
     currentProject: {},
@@ -19,6 +20,9 @@ const store = new Vuex.Store({
     setCurrentProject(state, project) {
       state.currentProject = project;
     },
+    setShowSearch(state, value){
+      state.showSearch = value;
+    },
     setDep(state, dep) {
       const getDepUserTree = (data) => {
         let ret = {};