sunlupeng 1 년 전
부모
커밋
c311ebbc62
3개의 변경된 파일64개의 추가작업 그리고 82개의 파일을 삭제
  1. 11 53
      pages/index.vue
  2. 33 27
      pages/oa/dataList.vue
  3. 20 2
      pages/oa/universal/index.vue

+ 11 - 53
pages/index.vue

@@ -59,68 +59,22 @@
         </uni-grid-item>
       </uni-grid>
     </view>
-
+	<view style="margin-left: 10px;">
+		<h2>我的应用</h2>
+	</view>
     <view v-for="(item, index) in appList" :key="index">
-      <uni-section :title="item.name" type="line"></uni-section>
+      <uni-section :title="item.name"></uni-section>
       <!-- 宫格组件 -->
       <view class="grid-body">
         <uni-grid :column="4" :showBorder="false" @change="changeGrid">
           <uni-grid-item v-for="(childItem, index) in item.children" :key="index">
-            <view class="grid-item-box">
+            <view class="grid-item-box" @click="handleGrid(childItem)">
               <svg-icon :id="childItem.icon" :name="childItem.icon" :width="30" :height="30"></svg-icon>
 			  <!-- <svg-icon id="yingtao" name="yingtao" :width="30" :height="30"></svg-icon> -->
               <!-- <uni-icons type="person-filled" size="30"></uni-icons> -->
               <text class="text">{{ childItem.name }}</text>
             </view>
           </uni-grid-item>
-          <!-- <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="staff-filled" size="30"></uni-icons>
-            <text class="text">角色管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="color" size="30"></uni-icons>
-            <text class="text">菜单管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="settings-filled" size="30"></uni-icons>
-            <text class="text">部门管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="heart-filled" size="30"></uni-icons>
-            <text class="text">岗位管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="bars" size="30"></uni-icons>
-            <text class="text">字典管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="gear-filled" size="30"></uni-icons>
-            <text class="text">参数设置</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="chat-filled" size="30"></uni-icons>
-            <text class="text">通知公告</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="wallet-filled" size="30"></uni-icons>
-            <text class="text">日志管理</text>
-          </view>
-        </uni-grid-item> -->
         </uni-grid>
       </view>
     </view>
@@ -190,8 +144,12 @@ export default {
     },
     changeGrid(e) {
       // this.$modal.showToast('模块建设中~')
-      this.$tab.navigateTo('/pages/oa/universal/index')
-    }
+    },
+	handleGrid(val){
+		let url = '/pages' + val.path + '/index';
+		console.log(url);
+		this.$tab.navigateTo(url);
+	}
   }
 }
 </script>

+ 33 - 27
pages/oa/dataList.vue

@@ -1,19 +1,16 @@
 <template>
 	<view class='my-unit'>
 		<view class="unit-head">
-			<text style="font-weight: bold;font-size: 26upx;">{{ info.title }}</text>
+			<text style="font-weight: bold;">{{ info.title }}</text>
+			<text style="color: gray;font-size: 20upx;">{{ parseTime(info.time) }}</text>
 		</view>
 		<view class="unit-body">
-			<view style="display: flex;justify-content: center;align-items:center;">
-				<uni-icons type="settings" size="20"></uni-icons>
-				<text style="margin-left: 10upx;">{{ info.status }}</text>
-			</view>
-
-			<text style="color: gray;">{{ parseTime(info.time) }}</text>
+			<text class="uni-ellipsis-1">事项标题:{{ info.status }}</text>
+			<text class="uni-ellipsis-1">详细描述:{{ info.status }}</text>
 		</view>
 		<view class="unit-foot">
-			<text style="color: gray;">{{ initIndex == 2 ? '当前处理人' : '发起人' }}</text>
-			<text style="font-weight: bold;">{{ info.nickname }}</text>
+			<text>{{ initIndex == 2 ? '当前处理人' : '发起人' }}</text>
+			<text style="color: orange;">{{ info.nickname }}</text>
 		</view>
 	</view>
 
@@ -65,37 +62,46 @@ export default {
 	box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3;
 
 	.unit-head {
+		font-size: 26upx;
 		padding: 20upx 20upx 10upx 20upx;
-		/* height: 80upx; */
-		box-sizing: border-box;
-		/* border-bottom: 2upx solid #f5f5f5; */
-	}
-
-	.unit-body {
-		padding: 0 20upx;
 		display: flex;
 		flex-wrap: wrap;
 		justify-content: space-between;
 		align-items: center;
+	}
 
-		text {
-			font-size: 20upx;
-			line-height: 55upx;
-		}
+	.unit-body {
+		padding: 0 20upx;
+		color: gray;
+		display: flex;
+		flex-direction: column;
+		font-size: 20upx;
+		line-height: 30upx;
 	}
 
 	.unit-foot {
-		height: 88upx;
+		font-size: 20upx;
+		height: 66upx;
 		padding: 0 20upx;
-		border-top: 2upx solid #f5f5f5;
+		// border-top: 2upx solid #f5f5f5;
 		border-bottom: none;
-		line-height: 88upx;
+		line-height: 66upx;
 		display: flex;
 		flex-wrap: wrap;
-
-		text {
-			width: 30%;
-		}
+		justify-content: space-between;
+		align-items: center;
+		font-weight: bold;
 	}
 }
+.uni-ellipsis-1 {
+		/* #ifndef APP-NVUE */
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		lines: 1;
+		text-overflow:ellipsis;
+		/* #endif */
+	}
 </style>

+ 20 - 2
pages/oa/universal/index.vue

@@ -7,8 +7,9 @@
 			</view>
 			<view v-if="initIndex === 1">
 				<data-List v-for="(item,index) in listData" :key="index" :info="item"></data-List>
+				<uni-fab :pattern="pattern" :horizontal="horizontal" :vertical="vertical"
+					:direction="direction" @fabClick="fabClick" />
 			</view>
-			
 		</scroll-view>
 	</view>
 </template>
@@ -24,13 +25,30 @@
 			return {
 				initIndex: 0,
 				pageNo: 1,
-				pageSize: 10
+				pageSize: 10,
+				horizontal: 'right',
+				vertical: 'bottom',
+				direction: 'horizontal',
+				pattern: {
+					color: '#7A7E83',
+					backgroundColor: '#fff',
+					selectedColor: '#007AFF',
+					buttonColor: '#007AFF',
+					iconColor: '#fff'
+				},
 			}
 		},
 		onLoad(){
 			this.refresh();
 		},
 		methods: {
+			fabClick() {
+				this.initIndex = 0;
+				// uni.showToast({
+				// 	title: '点击了悬浮按钮',
+				// 	icon: 'none'
+				// })
+			},
 			/**
 			 * @name 获取列表
 			 */