新增宣传配送页面
This commit is contained in:
parent
9b3698abfa
commit
1e7885b889
@ -1,16 +1,22 @@
|
||||
<template>
|
||||
<view class="c_task_index">
|
||||
<u-sticky bgColor="#f5f5f5" offsetTop="44px">
|
||||
<u-tabs :list="tabLists" @click="changeCurrent" lineColor='#3274F9' :scrollable="false"
|
||||
inactiveStyle='color:#666' activeStyle="color:#3274F9"></u-tabs>
|
||||
<!-- <u-tabs :list="tabLists" @click="changeCurrent" lineColor='#3274F9' :scrollable="false"
|
||||
inactiveStyle='color:#666' activeStyle="color:#3274F9"></u-tabs> -->
|
||||
<uni-segmented-control :current="current" :values="['全部','已完成', '未完成']" styleType="text" @clickItem="changeCurrent" activeColor="#3274F9"></uni-segmented-control>
|
||||
</u-sticky>
|
||||
<view class="c_task_index_list">
|
||||
<taskItem v-for="item in 20"></taskItem>
|
||||
<view v-for="item in 10" @click="naviTo('/subpkg/dispatching/dispatching')" :key="item">
|
||||
<taskItem></taskItem>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
<!-- <u-empty v-else icon="/static/img/empty/data.png" text="没有数据"></u-empty> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Toast } from "../../libs/uniApi";
|
||||
import taskItem from "./taskItem.vue"
|
||||
export default {
|
||||
name: "task",
|
||||
@ -18,13 +24,13 @@
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
tabLists: [{
|
||||
name: '全部',
|
||||
}, {
|
||||
name: '已完成'
|
||||
}, {
|
||||
name: '未完成'
|
||||
}],
|
||||
// tabLists: [{
|
||||
// name: '全部',
|
||||
// }, {
|
||||
// name: '已完成'
|
||||
// }, {
|
||||
// name: '未完成'
|
||||
// }],
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
@ -38,8 +44,16 @@
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
naviTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
changeCurrent(e) {
|
||||
this.current = e.index;
|
||||
if(this.current!==e.currentIndex){
|
||||
this.current = e.currentIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
<view class="text">2023.08.05</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<text>进入任务<uni-icons type="right" color="#3175f9"></uni-icons></text>
|
||||
<view>进入任务<uni-icons type="right" color="#3175f9"></uni-icons></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -401,6 +401,15 @@
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "dispatching/dispatching",
|
||||
"style": {
|
||||
"navigationBarTitleText": "宣传配送",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#3175f9",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}]
|
||||
}],
|
||||
"globalStyle": {
|
||||
|
BIN
static/img/task/car.png
Normal file
BIN
static/img/task/car.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
@ -39,7 +39,7 @@
|
||||
<companyFinance></companyFinance>
|
||||
</view>
|
||||
<view v-show="current==3">
|
||||
<task></task>
|
||||
<task style="width: 100vw;"></task>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-else icon="/static/img/empty/data.png" text="没有数据"></u-empty>
|
||||
|
85
subpkg/dispatching/dispatching.vue
Normal file
85
subpkg/dispatching/dispatching.vue
Normal file
@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="img">
|
||||
<image src="../../static/img/task/car.png"></image>
|
||||
</view>
|
||||
<view class="center_card">
|
||||
<u-steps direction="column" dot>
|
||||
<u-steps-item title="开始地点: 某某村">
|
||||
</u-steps-item>
|
||||
<u-steps-item title="中转地点: 某某村">
|
||||
</u-steps-item>
|
||||
<u-steps-item title="结束地点: 某某村"></u-steps-item>
|
||||
</u-steps>
|
||||
</view>
|
||||
<view class="center_card">
|
||||
<view class="item">
|
||||
<view>开始地点:<text>通滩镇砾石村1组</text></view>
|
||||
<view>抵达时间:<text>2023/08/02 11:00:35</text></view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view>中转地点:<text>通滩镇砾石村1组</text></view>
|
||||
<view>抵达时间:<text>2023/08/02 11:00:35</text></view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view>结束地点:<text>通滩镇砾石村1组</text></view>
|
||||
<view>抵达时间:<text>2023/08/02 11:00:35</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<mybtn text="开始任务"></mybtn>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {},
|
||||
methods: {},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.img {
|
||||
padding-top: 90rpx;
|
||||
padding-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 443rpx;
|
||||
height: 241rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.center_card {
|
||||
width: 694rpx;
|
||||
// height: 226rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
opacity: 1;
|
||||
margin: 0 auto;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
.item{
|
||||
margin-bottom: 28rpx;
|
||||
line-height: 48rpx;
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
text{
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
9
uni_modules/uni-segmented-control/changelog.md
Normal file
9
uni_modules/uni-segmented-control/changelog.md
Normal file
@ -0,0 +1,9 @@
|
||||
## 1.2.0(2021-11-19)
|
||||
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
|
||||
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-segmented-control](https://uniapp.dcloud.io/component/uniui/uni-segmented-control)
|
||||
## 1.1.0(2021-07-30)
|
||||
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
|
||||
## 1.0.5(2021-05-12)
|
||||
- 新增 项目示例地址
|
||||
## 1.0.4(2021-02-05)
|
||||
- 调整为uni_modules目录规范
|
@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<view :class="[styleType === 'text'?'segmented-control--text' : 'segmented-control--button' ]"
|
||||
:style="{ borderColor: styleType === 'text' ? '' : activeColor }" class="segmented-control">
|
||||
<view v-for="(item, index) in values" :class="[ styleType === 'text' ? '': 'segmented-control__item--button',
|
||||
index === currentIndex&&styleType === 'button' ? 'segmented-control__item--button--active': '',
|
||||
index === 0&&styleType === 'button' ? 'segmented-control__item--button--first': '',
|
||||
index === values.length - 1&&styleType === 'button' ? 'segmented-control__item--button--last': '' ]" :key="index"
|
||||
:style="{ backgroundColor: index === currentIndex && styleType === 'button' ? activeColor : '',borderColor: index === currentIndex&&styleType === 'text'||styleType === 'button'?activeColor:'transparent' }"
|
||||
class="segmented-control__item" @click="_onClick(index)">
|
||||
<view>
|
||||
<text :style="{color:
|
||||
index === currentIndex
|
||||
? styleType === 'text'
|
||||
? activeColor
|
||||
: '#fff'
|
||||
: styleType === 'text'
|
||||
? '#000'
|
||||
: activeColor}" class="segmented-control__text" :class="styleType === 'text' && index === currentIndex ? 'segmented-control__item--text': ''">{{ item }}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* SegmentedControl 分段器
|
||||
* @description 用作不同视图的显示
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=54
|
||||
* @property {Number} current 当前选中的tab索引值,从0计数
|
||||
* @property {String} styleType = [button|text] 分段器样式类型
|
||||
* @value button 按钮类型
|
||||
* @value text 文字类型
|
||||
* @property {String} activeColor 选中的标签背景色与边框颜色
|
||||
* @property {Array} values 选项数组
|
||||
* @event {Function} clickItem 组件触发点击事件时触发,e={currentIndex}
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'UniSegmentedControl',
|
||||
emits: ['clickItem'],
|
||||
props: {
|
||||
current: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
values: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: '#2979FF'
|
||||
},
|
||||
styleType: {
|
||||
type: String,
|
||||
default: 'button'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentIndex: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
current(val) {
|
||||
if (val !== this.currentIndex) {
|
||||
this.currentIndex = val
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.currentIndex = this.current
|
||||
},
|
||||
methods: {
|
||||
_onClick(index) {
|
||||
if (this.currentIndex !== index) {
|
||||
this.currentIndex = index
|
||||
this.$emit('clickItem', {
|
||||
currentIndex: index
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.segmented-control {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
/* #ifdef H5 */
|
||||
cursor: pointer;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.segmented-control__item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: inline-flex;
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
position: relative;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.segmented-control__item--button {
|
||||
border-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.segmented-control__item--button--first {
|
||||
border-left-width: 1px;
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
|
||||
.segmented-control__item--button--last {
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
}
|
||||
|
||||
.segmented-control__item--text {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 2px;
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.segmented-control__text {
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
87
uni_modules/uni-segmented-control/package.json
Normal file
87
uni_modules/uni-segmented-control/package.json
Normal file
@ -0,0 +1,87 @@
|
||||
{
|
||||
"id": "uni-segmented-control",
|
||||
"displayName": "uni-segmented-control 分段器",
|
||||
"version": "1.2.0",
|
||||
"description": "分段器由至少 2 个分段控件组成,用作不同视图的显示",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
"uniui",
|
||||
"分段器",
|
||||
"segement",
|
||||
"顶部选择"
|
||||
],
|
||||
"repository": "https://github.com/dcloudio/uni-ui",
|
||||
"engines": {
|
||||
"HBuilderX": ""
|
||||
},
|
||||
"directories": {
|
||||
"example": "../../temps/example_temps"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
],
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": ["uni-scss"],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y"
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "y"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "y",
|
||||
"QQ": "y"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
uni_modules/uni-segmented-control/readme.md
Normal file
13
uni_modules/uni-segmented-control/readme.md
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
## SegmentedControl 分段器
|
||||
> **组件名:uni-segmented-control**
|
||||
> 代码块: `uSegmentedControl`
|
||||
|
||||
|
||||
用作不同视图的显示
|
||||
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-segmented-control)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user