state筛选

This commit is contained in:
caoqianming 2021-04-25 17:20:58 +08:00
parent b5cbd62ceb
commit 57f6ab09a7
10 changed files with 55 additions and 27 deletions

View File

@ -103,9 +103,9 @@
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationBarTitleText": "uView", "navigationBarTitleText": "uView",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#2b85e4",
"backgroundColor": "#FFFFFF" "backgroundColor": "#FFFFFF"
}, },
"tabBar": { "tabBar": {

View File

@ -1,9 +1,16 @@
<template> <template>
<view> <view>
<u-image :src="imageURL" mode="widthFix"></u-image> <!-- <view :style="{background: 'url('+imageURL+')'}">
</view> -->
<view style="background-color: #0074ba;">
<u-image :src="imageURL" mode="widthFix"></u-image>
<view style="background-color: #2b85e4;font-weight: bold;font-size: 30rpx;color:white;padding-left:8rpx">欢迎您:{{vuex_user.name}}</view>
</view>
<!-- <u-swiper @change="change" :height="250" :list="swiper_list" :title="swtitle" :effect3d="effect3d" <!-- <u-swiper @change="change" :height="250" :list="swiper_list" :title="swtitle" :effect3d="effect3d"
:indicator-pos="indicatorPos" :mode="mode" :interval="3000" @click="click"></u-swiper> --> :indicator-pos="indicatorPos" :mode="mode" :interval="3000" @click="click"></u-swiper> -->
<view style="margin-top:12rpx;margin-bottom: 12rpx;">
<view style="margin-bottom: 12rpx;">
<u-grid :col="3" :border="false"> <u-grid :col="3" :border="false">
<u-grid-item v-for="(item, index) in grids" v-bind:key="index" @click="clickGrid(item)"> <u-grid-item v-for="(item, index) in grids" v-bind:key="index" @click="clickGrid(item)">
<u-icon :name="item.icon" :size="60"></u-icon> <u-icon :name="item.icon" :size="60"></u-icon>
@ -11,6 +18,7 @@
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
<view style="margin-bottom: 12rpx;margin-left: 6rpx;"> <view style="margin-bottom: 12rpx;margin-left: 6rpx;">
<u-section title="最近任务" :right="false" ></u-section> <u-section title="最近任务" :right="false" ></u-section>
</view> </view>
@ -19,7 +27,7 @@
@body-click="taskClick" :index="item.id" padding="10"> @body-click="taskClick" :index="item.id" padding="10">
<view class="" slot="body"> <view class="" slot="body">
<view class="u-body-item-title"> <view class="u-body-item-title">
<span style="color:#2979FF;font-weight: bold;margin-right: 8rpx;">{{item.state}}</span> <span class="itemstate">{{item.state}}</span>
{{item.name}} {{item.name}}
</view> </view>
<view class="u-body-item"> <view class="u-body-item">
@ -33,9 +41,9 @@
</view> </view>
<view class="u-body-item"> <view class="u-body-item">
涉及单位: 涉及单位:
<span style="color:blue;">{{item.depts_count}}</span> <span style="color:darkblue;">{{item.depts_count}}</span>
巡查组: 巡查组:
<span style="color:blue;">{{item.members.length}}</span> <span style="color:darkblue;">{{item.members.length}}</span>
</view> </view>
</view> </view>
</u-card> </u-card>
@ -46,7 +54,7 @@
export default { export default {
data() { data() {
return { return {
imageURL: 'https://cdn.uviewui.com/uview/swiper/1.jpg', imageURL: 'http://testsearch.ctc.ac.cn:8000/media/default/banner3.jpg',
swiper_list: [{ swiper_list: [{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg', image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
title: '昨夜星辰昨夜风,画楼西畔桂堂东' title: '昨夜星辰昨夜风,画楼西畔桂堂东'
@ -164,4 +172,9 @@
color: #333; color: #333;
} }
} }
.itemstate {
color:$u-type-primary-dark;
font-weight: bold;
margin-right: 8rpx;
}
</style> </style>

View File

@ -4,7 +4,7 @@
:head-style="headstyle" padding="10"> :head-style="headstyle" padding="10">
<view class="" slot="body"> <view class="" slot="body">
<view class="u-body-item-title"> <view class="u-body-item-title">
<span style="color:#2979FF;font-weight: bold;margin-right: 8rpx;">{{initData.state}}</span> <span class="itemstate">{{initData.state}}</span>
</view> </view>
</view> </view>
<view class="" slot="foot"> <view class="" slot="foot">
@ -218,6 +218,7 @@
if (res.confirm) { if (res.confirm) {
that.$u.api.upInspectDept(that.initData.id).then(res=>{ that.$u.api.upInspectDept(that.initData.id).then(res=>{
this.initData = res.data this.initData = res.data
this.$u.toast('提交成功')
}).catch(e=>{}) }).catch(e=>{})
} else if (res.cancel) { } else if (res.cancel) {
@ -247,4 +248,9 @@
color: #333; color: #333;
} }
} }
.itemstate {
color:$u-type-primary-dark;
font-weight: bold;
margin-right: 8rpx;
}
</style> </style>

View File

@ -16,13 +16,11 @@
<span v-if="form.note">{{form.note}}</span> <span v-if="form.note">{{form.note}}</span>
</u-form-item> </u-form-item>
<u-form-item label="拍照取证"> <u-form-item label="拍照取证">
<u-image
</u-form-item>
<view >
<u-image
@click="imgListPreview(index)" @click="imgListPreview(index)"
width="260rpx" height="260rpx" :src="item" v-for="(item, index) in fileList" v-bind:key="index" style="padding: 6rpx;"></u-image> width="260rpx" height="260rpx" :src="item" v-for="(item, index) in fileList" v-bind:key="index" style="margin: 8rpx;"></u-image>
</view> </u-form-item>
</u-form> </u-form>
</view> </view>
</template> </template>

View File

@ -17,7 +17,7 @@
<!-- <button :style="[inputStyle]" class="getCaptcha">登录</button> --> <!-- <button :style="[inputStyle]" class="getCaptcha">登录</button> -->
<!-- <u-gap height="1" bg-color="#bbb"></u-gap> --> <!-- <u-gap height="1" bg-color="#bbb"></u-gap> -->
<view style="margin-top: 16rpx;"> <view style="margin-top: 16rpx;">
<u-button @click="submit" type="warning" >登录</u-button> <u-button @click="submit" type="primary" >登录</u-button>
</view> </view>
<view class="alternative"> <view class="alternative">
<navigator url="login_password" class="password" open-type="redirect">密码登录</navigator> <navigator url="login_password" class="password" open-type="redirect">密码登录</navigator>

View File

@ -13,7 +13,7 @@
</u-form-item> </u-form-item>
</u-form> </u-form>
<view style="margin-top: 16rpx;"> <view style="margin-top: 16rpx;">
<u-button @click="submit" type="warning" >登录</u-button> <u-button @click="submit" type="primary" >登录</u-button>
</view> </view>
</view> </view>
</view> </view>

View File

@ -83,5 +83,6 @@ page{
} }
.user-box{ .user-box{
background-color: #fff; background-color: #fff;
padding-top:24rpx;
} }
</style> </style>

View File

@ -1,11 +1,11 @@
<template> <template>
<view class="wrap"> <view class="wrap">
<u-card v-for="(item, index) in myinspecttaskList" v-bind:key="index" :title="item.name" margin="6rpx" <u-card v-for="(item, index) in myinspecttaskList" v-bind:key="index" :title="item.name" margin="12rpx"
:border="false" :foot-border-top="false" border-radius="2rpx" :head-style="headstyle" :border="false" :foot-border-top="false" border-radius="2rpx" :head-style="headstyle"
@body-click="taskClick" :index="item.id"> @body-click="taskClick" :index="item.id">
<view class="" slot="body"> <view class="" slot="body">
<view class="u-body-item-title"> <view class="u-body-item-title">
<span style="color:#2979FF;font-weight: bold;margin-right: 8rpx;">{{item.state}}</span> <span class="itemstate">{{item.state}}</span>
{{item.name}} {{item.name}}
</view> </view>
<view class="u-body-item"> <view class="u-body-item">
@ -19,9 +19,9 @@
</view> </view>
<view class="u-body-item"> <view class="u-body-item">
涉及单位: 涉及单位:
<span style="color:blue;">{{item.depts_count}}</span> <span style="color:darkblue;">{{item.depts_count}}</span>
巡查组: 巡查组:
<span style="color:blue;">{{item.members.length}}</span> <span style="color:darkblue;">{{item.members.length}}</span>
</view> </view>
</view> </view>
</u-card> </u-card>
@ -73,5 +73,10 @@
color: #333; color: #333;
} }
} }
.itemstate {
color:$u-type-primary-dark;
font-weight: bold;
margin-right: 8rpx;
}
</style> </style>

View File

@ -4,7 +4,7 @@
:head-style="headstyle" padding="10"> :head-style="headstyle" padding="10">
<view class="" slot="body"> <view class="" slot="body">
<view class="u-body-item-title"> <view class="u-body-item-title">
<span style="color:#2979FF;font-weight: bold;margin-right: 4rpx;">{{subtask.state}}</span> <span class="itemstate">{{subtask.state}}</span>
{{subtask.name}} {{subtask.name}}
</view> </view>
<view class="u-body-item"> <view class="u-body-item">
@ -18,9 +18,9 @@
</view> </view>
<view class="u-body-item"> <view class="u-body-item">
涉及单位: 涉及单位:
<span style="color:blue;">{{subtask.depts_count}}</span> <span style="color:darkblue;">{{subtask.depts_count}}</span>
巡查组: 巡查组:
<span style="color:blue;" v-if="subtask.members">{{subtask.members.length}}</span> <span style="color:darkblue;" v-if="subtask.members">{{subtask.members.length}}</span>
</view> </view>
<view style="margin-top: 6rpx;"> <view style="margin-top: 6rpx;">
<u-gap height="1" bg-color="#bbb"></u-gap> <u-gap height="1" bg-color="#bbb"></u-gap>
@ -29,12 +29,12 @@
<view> <view>
组长: 组长:
<span v-for="(item, index) in subtask.members" v-bind:key="index" mode="plain" <span v-for="(item, index) in subtask.members" v-bind:key="index" mode="plain"
style="margin-left:8rpx;color: #00007f;" v-if="item.type=='组长'">{{item.member__name}}</span> style="margin-left:8rpx;color: darkblue;" v-if="item.type=='组长'">{{item.member__name}}</span>
</view> </view>
<view> <view>
组员: 组员:
<span v-for="(item, index) in subtask.members" v-bind:key="index" mode="plain" <span v-for="(item, index) in subtask.members" v-bind:key="index" mode="plain"
style="margin-left:8rpx;color: #00007f;" v-if="item.type!='组长'">{{item.member__name}}</span> style="margin-left:8rpx;color: darkblue;" v-if="item.type!='组长'">{{item.member__name}}</span>
</view> </view>
</u-collapse-item> </u-collapse-item>
</view> </view>
@ -131,4 +131,9 @@
color: #333; color: #333;
} }
} }
.itemstate {
color:$u-type-primary-dark;
font-weight: bold;
margin-right: 8rpx;
}
</style> </style>

View File

@ -79,7 +79,7 @@ class SubtaskViewSet(PageOrNot, CreateUpdateCustomMixin, OptimizationMixin, Mode
'put': 'inspecttask_update', 'delete': 'inspecttask_delete'} 'put': 'inspecttask_update', 'delete': 'inspecttask_delete'}
queryset = SubInspectTask.objects.all() queryset = SubInspectTask.objects.all()
serializer_class = SubtaskListSerializer serializer_class = SubtaskListSerializer
filterset_fields = ['inspecttask'] filterset_fields = ['inspecttask', 'state']
ordering = ['-create_time'] ordering = ['-create_time']
def get_queryset(self): def get_queryset(self):