提交代码
This commit is contained in:
@@ -147,7 +147,7 @@ export default {
|
|||||||
.device-body-item {
|
.device-body-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
@@ -170,12 +170,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.uni-card .uni-card__header .uni-card__header-content .uni-card__header-content-title {
|
.uni-card .uni-card__header .uni-card__header-content .uni-card__header-content-title {
|
||||||
font-size: 28rpx;
|
font-size: 30rpx;
|
||||||
color: #3a3a3a;
|
color: #3a3a3a;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
.uni-card .uni-card__header .uni-card__header-content .uni-card__header-content-subtitle {
|
.uni-card .uni-card__header .uni-card__header-content .uni-card__header-content-subtitle {
|
||||||
font-size: 12px;
|
font-size: 24rpx;
|
||||||
// margin-top: 5px;
|
// margin-top: 5px;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
@@ -208,7 +208,7 @@ export default {
|
|||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
.event-tag {
|
.event-tag {
|
||||||
font-size: 20rpx;
|
font-size: 22rpx;
|
||||||
padding: 2rpx 10rpx;
|
padding: 2rpx 10rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
margin-top: 5rpx;
|
margin-top: 5rpx;
|
||||||
|
|||||||
@@ -1,61 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :loading="loading">
|
<view :loading="loading">
|
||||||
<!-- <uni-nav-bar left-icon="left" right-icon="cart" title="标题" /> -->
|
<!-- <uni-nav-bar left-icon="left" right-icon="cart" title="标题" /> -->
|
||||||
<uni-nav-bar
|
<uni-nav-bar dark :fixed="true" status-bar left-icon="left" :rightIcon="userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'
|
||||||
dark
|
? 'plusempty'
|
||||||
:fixed="true"
|
: ''
|
||||||
status-bar
|
" background-color="#fff" color="#111" title="工程管理" @clickLeft="back" @clickRight="add" />
|
||||||
left-icon="left"
|
<uni-search-bar v-model="store.params.name" clearButton="none" bgColor="#fff" placeholder="请输入关键词"
|
||||||
:rightIcon="
|
@input="store.search()"></uni-search-bar>
|
||||||
userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'
|
|
||||||
? 'plusempty'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
background-color="#fff"
|
|
||||||
color="#111"
|
|
||||||
title="工程管理"
|
|
||||||
@clickLeft="back"
|
|
||||||
@clickRight="add"
|
|
||||||
/>
|
|
||||||
<uni-search-bar
|
|
||||||
v-model="store.params.name"
|
|
||||||
clearButton="none"
|
|
||||||
bgColor="#fff"
|
|
||||||
placeholder="请输入关键词"
|
|
||||||
@input="store.search()"
|
|
||||||
></uni-search-bar>
|
|
||||||
<view class="message">
|
<view class="message">
|
||||||
<uni-card
|
|
||||||
class="boxClick"
|
|
||||||
:title="item.name"
|
<uni-swipe-action>
|
||||||
extra="🔍"
|
<uni-swipe-action-item v-for="(item, index) in store.data"
|
||||||
@click="jump(item)"
|
:style="{ marginTop: index === 0 ? '0' : '' }" :key="index" :threshold="0"
|
||||||
v-for="(item, index) in store.data"
|
:right-options="item.isTop == 0 ? options1 : options12" @click="bindClick($event, item)">
|
||||||
:style="{ marginTop: index === 0 ? '0' : '' }"
|
<uni-card class="boxClick" :title="item.name" extra="🔍" @click="jump(item)">
|
||||||
:key="index"
|
<view class="term-list-bottom">
|
||||||
>
|
<view class="term-list-bottom-item">
|
||||||
<view class="term-list-bottom">
|
<view>区域</view>
|
||||||
<view class="term-list-bottom-item">
|
<view>{{ item.provinceName + item.cityName }}</view>
|
||||||
<view>区域</view>
|
</view>
|
||||||
<view>{{ item.provinceName + item.cityName }}</view>
|
<view class="term-list-bottom-item">
|
||||||
</view>
|
<view>创建时间</view>
|
||||||
<view class="term-list-bottom-item">
|
<view>{{ item.createTime }}</view>
|
||||||
<view>创建时间</view>
|
</view>
|
||||||
<view>{{ item.createTime }}</view>
|
</view>
|
||||||
</view>
|
<view class="pinToTop" v-if="item.isTop == 1"> 置顶 </view>
|
||||||
</view>
|
</uni-card>
|
||||||
</uni-card>
|
</uni-swipe-action-item>
|
||||||
|
</uni-swipe-action>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
|
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
|
||||||
<uni-load-more
|
<uni-load-more v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
||||||
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
:status="store.status"></uni-load-more>
|
||||||
:status="store.status"
|
|
||||||
></uni-load-more>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import list from '../../common/js/list'
|
import list from '../../common/js/list'
|
||||||
|
import { engineeringPinToTop } from '@/common/api/device'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [list],
|
mixins: [list],
|
||||||
@@ -63,9 +50,39 @@ export default {
|
|||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
|
options1: [
|
||||||
|
{
|
||||||
|
text: '置顶',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#376cf3',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options12: [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#ccc',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
bindClick(e, item) {
|
||||||
|
engineeringPinToTop({
|
||||||
|
targetId: item.id,
|
||||||
|
targetType: 2,
|
||||||
|
userId: uni.getStorageSync(this.$cacheKey.userInfo).userIndex,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
this.$util.toast('操作成功!')
|
||||||
|
this.store.search()
|
||||||
|
} else {
|
||||||
|
this.$util.toast(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
init() {
|
init() {
|
||||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||||
this.store = this.DataSource('/cs-device-boot/engineering/queryEngineeringPage')
|
this.store = this.DataSource('/cs-device-boot/engineering/queryEngineeringPage')
|
||||||
@@ -174,7 +191,7 @@ export default {
|
|||||||
.term-list-bottom {
|
.term-list-bottom {
|
||||||
.term-list-bottom-item {
|
.term-list-bottom-item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-bottom: 20rpx;
|
// margin-bottom: 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
// view:first-of-type{
|
// view:first-of-type{
|
||||||
@@ -186,4 +203,42 @@ export default {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-card--border {
|
||||||
|
margin: 0 10px !important;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-swipe {
|
||||||
|
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pinToTop {
|
||||||
|
background-color: $uni-theme-color;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
right: 0rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
/* 核心:旋转成斜三角效果 */
|
||||||
|
transform: rotate(45deg) translate(50rpx, -10rpx);
|
||||||
|
transform-origin: top right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-card__content {
|
||||||
|
padding: 5px 10px 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-card__header-content-title {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -279,8 +279,7 @@ export default {
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
mask: true,
|
mask: true,
|
||||||
title: '申请暂态报告,成功!',
|
title: '申请报告,成功!',
|
||||||
duration: 1000,
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.event-detail {
|
.event-detail {
|
||||||
font-size: 25rpx !important;
|
// font-size: 25rpx !important;
|
||||||
// display: grid;
|
// display: grid;
|
||||||
// grid-template-columns: 1fr 1fr;
|
// grid-template-columns: 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="dateReport">
|
<view class="dateReport">
|
||||||
<view class="pd20">
|
<view class="pd20">
|
||||||
<uni-segmented-control
|
<uni-segmented-control :current="curSub" class="subsection" active-color="#376cf3" :values="subsectionList"
|
||||||
:current="curSub"
|
@clickItem="sectionChange" />
|
||||||
class="subsection"
|
|
||||||
active-color="#376cf3"
|
|
||||||
:values="subsectionList"
|
|
||||||
@clickItem="sectionChange"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 申请报告 -->
|
<!-- 申请报告 -->
|
||||||
@@ -22,15 +17,9 @@
|
|||||||
<!-- 筛选条件 -->
|
<!-- 筛选条件 -->
|
||||||
<Cn-filterCriteria @select="select" :showQianTree="false"> </Cn-filterCriteria>
|
<Cn-filterCriteria @select="select" :showQianTree="false"> </Cn-filterCriteria>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view
|
<scroll-view scroll-y="true" @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower"
|
||||||
scroll-y="true"
|
:refresher-triggered="triggered" refresher-enabled="true" class="record event-list mt20"
|
||||||
@refresherrefresh="refresherrefresh"
|
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }">
|
||||||
@scrolltolower="scrolltolower"
|
|
||||||
:refresher-triggered="triggered"
|
|
||||||
refresher-enabled="true"
|
|
||||||
class="record event-list mt20"
|
|
||||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
|
||||||
>
|
|
||||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in store.data" :key="index">
|
<uni-card class="event-item" :class="item.type" v-for="(item, index) in store.data" :key="index">
|
||||||
<!-- 头部:图标 + 信息 + 操作 -->
|
<!-- 头部:图标 + 信息 + 操作 -->
|
||||||
<view class="event-header">
|
<view class="event-header">
|
||||||
@@ -58,14 +47,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="event-action">
|
<view class="event-action">
|
||||||
<view class="iconText boxClick" v-if="item.isComplete == 1" @click="download(item)"
|
<view class="iconText boxClick" v-if="item.isComplete == 1" @click="download(item)">
|
||||||
><uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
|
<uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view class="nav-menu nav-menu-btn boxClick"
|
||||||
class="nav-menu nav-menu-btn boxClick"
|
v-else-if="userInfo.authorities === 'operation_manager'" @click="generate(item)">生成报告
|
||||||
v-else-if="userInfo.authorities === 'operation_manager'"
|
|
||||||
@click="generate(item)"
|
|
||||||
>生成报告
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -76,6 +62,12 @@
|
|||||||
<text>申请人:</text>
|
<text>申请人:</text>
|
||||||
<text>{{ item.applyUser }}</text>
|
<text>{{ item.applyUser }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="device-body-item">
|
||||||
|
<text>报告状态:</text>
|
||||||
|
<text :style="{ color: item.isComplete == 1 ? '#10b981' : '#FF0000' }">{{
|
||||||
|
item.isComplete == 1 ? '已完成' : '未完成'
|
||||||
|
}}</text>
|
||||||
|
</view>
|
||||||
<view class="device-body-item">
|
<view class="device-body-item">
|
||||||
<text>申请时间:</text>
|
<text>申请时间:</text>
|
||||||
<text>{{ item.time }}</text>
|
<text>{{ item.time }}</text>
|
||||||
@@ -84,12 +76,7 @@
|
|||||||
<text>暂降事件:</text>
|
<text>暂降事件:</text>
|
||||||
<text>{{ item.eventNums }}次</text>
|
<text>{{ item.eventNums }}次</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="device-body-item">
|
|
||||||
<text>报告状态:</text>
|
|
||||||
<text :style="{ color: item.isComplete == 1 ? '#10b981' : '#FF0000' }">{{
|
|
||||||
item.isComplete == 1 ? '已完成' : '未完成'
|
|
||||||
}}</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- <view class="device-body-item">
|
<!-- <view class="device-body-item">
|
||||||
<text>申请时间:</text>
|
<text>申请时间:</text>
|
||||||
@@ -99,10 +86,8 @@
|
|||||||
|
|
||||||
<!-- </view> -->
|
<!-- </view> -->
|
||||||
</uni-card>
|
</uni-card>
|
||||||
<uni-load-more
|
<uni-load-more v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
||||||
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
:status="store.status"></uni-load-more>
|
||||||
:status="store.status"
|
|
||||||
></uni-load-more>
|
|
||||||
<Cn-empty v-else style="top: 30%"></Cn-empty>
|
<Cn-empty v-else style="top: 30%"></Cn-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
@@ -149,7 +134,7 @@ export default {
|
|||||||
selectValue: {},
|
selectValue: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() { },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||||
},
|
},
|
||||||
@@ -262,7 +247,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: function (res) {},
|
fail: function (res) { },
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@@ -308,7 +293,7 @@ export default {
|
|||||||
|
|
||||||
.event-detail {
|
.event-detail {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1.2fr;
|
grid-template-columns: 1.6fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// /deep/ .record {
|
// /deep/ .record {
|
||||||
@@ -320,28 +305,35 @@ export default {
|
|||||||
.nav {
|
.nav {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choose1 {
|
.choose1 {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
/deep/ .uni-checkbox-input {
|
/deep/ .uni-checkbox-input {
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// .device-body {
|
// .device-body {
|
||||||
// padding: 10rpx 20rpx 20rpx;
|
// padding: 10rpx 20rpx 20rpx;
|
||||||
|
|
||||||
.device-body-item {
|
.device-body-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
// justify-content: space-between;
|
// justify-content: space-between;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// }
|
// }
|
||||||
.iconText {
|
.iconText {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -352,6 +344,7 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-menu {
|
.nav-menu {
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
padding: 6rpx 20rpx;
|
padding: 6rpx 20rpx;
|
||||||
@@ -360,26 +353,32 @@ export default {
|
|||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
background: #ebeaec;
|
background: #ebeaec;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
&-active {
|
&-active {
|
||||||
background: #dfe5f7;
|
background: #dfe5f7;
|
||||||
color: $uni-theme-color;
|
color: $uni-theme-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-btn {
|
&-btn {
|
||||||
background: $uni-theme-color;
|
background: $uni-theme-color;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.event-list {
|
.event-list {
|
||||||
|
|
||||||
/* 图标区域(按类型区分背景色) */
|
/* 图标区域(按类型区分背景色) */
|
||||||
.event-icon {
|
.event-icon {
|
||||||
background-color: #376cf320;
|
background-color: #376cf320;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.segmented-control {
|
.segmented-control {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-right: 24rpx;
|
margin-right: 24rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .uni-scroll-view-refresher {
|
/deep/ .uni-scroll-view-refresher {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export default {
|
|||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.detail-content-title {
|
.detail-content-title {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@@ -141,13 +141,13 @@ export default {
|
|||||||
}
|
}
|
||||||
.frequency {
|
.frequency {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
// color: #666666;
|
// color: #666666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.textBox {
|
.textBox {
|
||||||
// border-bottom: 1px solid #eee;
|
// border-bottom: 1px solid #eee;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
text-indent: 2em;
|
text-indent: 2em;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export default {
|
|||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.detail-content-title {
|
.detail-content-title {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@@ -131,7 +131,7 @@ export default {
|
|||||||
text {
|
text {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
// color: #333;
|
// color: #333;
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export default {
|
|||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.detail-content-title {
|
.detail-content-title {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
flex-wrap: wrap; /* 适配小屏,防止文字溢出 */
|
flex-wrap: wrap; /* 适配小屏,防止文字溢出 */
|
||||||
}
|
}
|
||||||
.event-id {
|
.event-id {
|
||||||
font-size: 28rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
gap: 8rpx;
|
gap: 8rpx;
|
||||||
}
|
}
|
||||||
.event-desc text {
|
.event-desc text {
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
|
|
||||||
/* 详情文本 */
|
/* 详情文本 */
|
||||||
.event-detail {
|
.event-detail {
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
|
|||||||
@@ -1,39 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :loading="loading">
|
<view :loading="loading">
|
||||||
<!-- <uni-nav-bar left-icon="left" right-icon="cart" title="标题" /> -->
|
<!-- <uni-nav-bar left-icon="left" right-icon="cart" title="标题" /> -->
|
||||||
<uni-nav-bar
|
<uni-nav-bar dark :fixed="true" status-bar left-icon="left" :rightIcon="userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'
|
||||||
dark
|
? 'plusempty'
|
||||||
:fixed="true"
|
: ''
|
||||||
status-bar
|
" background-color="#fff" color="#111" title="项目管理" @clickLeft="back" @clickRight="add" />
|
||||||
left-icon="left"
|
<uni-search-bar v-model="store.params.searchValue" clearButton="none" bgColor="#fff" placeholder="请输入关键词"
|
||||||
:rightIcon="
|
@input="store.search()"></uni-search-bar>
|
||||||
userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'
|
|
||||||
? 'plusempty'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
background-color="#fff"
|
|
||||||
color="#111"
|
|
||||||
title="项目管理"
|
|
||||||
@clickLeft="back"
|
|
||||||
@clickRight="add"
|
|
||||||
/>
|
|
||||||
<uni-search-bar
|
|
||||||
v-model="store.params.searchValue"
|
|
||||||
clearButton="none"
|
|
||||||
bgColor="#fff"
|
|
||||||
placeholder="请输入关键词"
|
|
||||||
@input="store.search()"
|
|
||||||
></uni-search-bar>
|
|
||||||
<view class="message">
|
<view class="message">
|
||||||
<uni-card
|
<uni-card class="boxClick" :title="item.name" @click="jump(item)" extra="🔍"
|
||||||
class="boxClick"
|
v-for="(item, index) in store.data" :key="index" :style="{ marginTop: index === 0 ? '0' : '' }">
|
||||||
:title="item.name"
|
|
||||||
@click="jump(item)"
|
|
||||||
extra="🔍"
|
|
||||||
v-for="(item, index) in store.data"
|
|
||||||
:key="index"
|
|
||||||
:style="{ marginTop: index === 0 ? '0' : '' }"
|
|
||||||
>
|
|
||||||
<view class="term-list-bottom">
|
<view class="term-list-bottom">
|
||||||
<view class="term-list-bottom-item">
|
<view class="term-list-bottom-item">
|
||||||
<view>设备个数</view>
|
<view>设备个数</view>
|
||||||
@@ -46,10 +22,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
|
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
|
||||||
<uni-load-more
|
<uni-load-more v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
||||||
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
:status="store.status"></uni-load-more>
|
||||||
:status="store.status"
|
|
||||||
></uni-load-more>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -169,7 +143,7 @@ export default {
|
|||||||
.term-list-bottom {
|
.term-list-bottom {
|
||||||
.term-list-bottom-item {
|
.term-list-bottom-item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-bottom: 20rpx;
|
// margin-bottom: 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
// view:first-of-type{
|
// view:first-of-type{
|
||||||
@@ -181,4 +155,12 @@ export default {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-card__content {
|
||||||
|
padding: 5px 10px 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-card__header-content-title {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,147 +1,148 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<Cn-page :loading="loading">
|
<Cn-page :loading="loading">
|
||||||
<view slot="body">
|
<view slot="body">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<image class="head-img" :src="userInfo.avatar" v-if="userInfo.avatar"></image>
|
<image class="head-img" :src="userInfo.avatar" v-if="userInfo.avatar"></image>
|
||||||
<image class="head-img" src="/static/head.png" v-else></image>
|
<image class="head-img" src="/static/head.png" v-else></image>
|
||||||
<view class="head-setup">
|
<view class="head-setup">
|
||||||
<view class="head-setup-item" @click="take('album')">从相册选一张</view>
|
<view class="head-setup-item" @click="take('album')">从相册选一张</view>
|
||||||
<view class="head-setup-item" @click="take('camera')">拍一张照片</view>
|
<view class="head-setup-item" @click="take('camera')">拍一张照片</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</Cn-page>
|
</Cn-page>
|
||||||
|
|
||||||
<uni-popup ref="alertDialog" type="dialog">
|
<uni-popup ref="alertDialog" type="dialog">
|
||||||
<uni-popup-dialog
|
<uni-popup-dialog
|
||||||
style="width: 90%; margin: 5%"
|
style="width: 90%; margin: 5%"
|
||||||
cancelText="禁止"
|
cancelText="禁止"
|
||||||
confirmText="允许"
|
confirmText="允许"
|
||||||
title="权限说明"
|
title="权限说明"
|
||||||
content='是否允许"灿能物联"使用相机?'
|
content='是否允许"灿能物联"使用相机?'
|
||||||
@confirm="handleScon('camera')"
|
@confirm="handleScon('camera')"
|
||||||
@close="dialogClose"
|
@close="dialogClose"
|
||||||
></uni-popup-dialog>
|
></uni-popup-dialog>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
<uni-popup ref="message" type="message">
|
<uni-popup ref="message" type="message">
|
||||||
<uni-popup-message type="info" :duration="0" style="width: 90%; margin: 5%">
|
<uni-popup-message type="info" :duration="0" style="width: 90%; margin: 5%">
|
||||||
<view style="color: #909399; font-style: 16px">相机权限使用说明:</view>
|
<view style="color: #909399; font-style: 16px">相机权限使用说明:</view>
|
||||||
<view style="color: #6c6c6c; margin-top: 3rpx"> 用于拍照上传头像!</view>
|
<view style="color: #6c6c6c; margin-top: 3rpx"> 用于拍照上传头像!</view>
|
||||||
</uni-popup-message>
|
</uni-popup-message>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
<yk-authpup ref="authpup" type="top" @changeAuth="changeAuth" permissionID="CAMERA"></yk-authpup>
|
<yk-authpup ref="authpup" type="top" @changeAuth="changeAuth" permissionID="CAMERA"></yk-authpup>
|
||||||
<yk-authpup
|
<yk-authpup
|
||||||
ref="authpup1"
|
ref="authpup1"
|
||||||
type="top"
|
type="top"
|
||||||
@changeAuth="changeAuth"
|
@changeAuth="changeAuth"
|
||||||
permissionID="WRITE_EXTERNAL_STORAGE"
|
permissionID="WRITE_EXTERNAL_STORAGE"
|
||||||
></yk-authpup>
|
></yk-authpup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { uploadImage, getImageUrl } from '@/common/api/basic'
|
import { uploadImage, getImageUrl } from '@/common/api/basic'
|
||||||
import { apiUpdateUser } from '@/common/api/user'
|
import { apiUpdateUser } from '@/common/api/user'
|
||||||
import ykAuthpup from '@/components/yk-authpup/yk-authpup'
|
import ykAuthpup from '@/components/yk-authpup/yk-authpup'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ykAuthpup,
|
ykAuthpup,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
type: '',
|
type: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
take(type) {
|
take(type) {
|
||||||
this.type = type
|
this.type = type
|
||||||
if (type == 'camera') {
|
if (type == 'camera') {
|
||||||
if (plus.os.name == 'Android') {
|
if (plus.os.name == 'Android') {
|
||||||
this.$refs['authpup'].open()
|
this.$refs['authpup'].open()
|
||||||
//未授权
|
//未授权
|
||||||
// this.$refs.message.open()
|
// this.$refs.message.open()
|
||||||
// this.$refs.alertDialog.open('bottom')
|
// this.$refs.alertDialog.open('bottom')
|
||||||
} else {
|
} else {
|
||||||
this.handleScon(type)
|
this.handleScon(type)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (plus.os.name == 'Android') {
|
if (plus.os.name == 'Android') {
|
||||||
this.$refs['authpup1'].open()
|
this.$refs['authpup1'].open()
|
||||||
//未授权
|
//未授权
|
||||||
// this.$refs.message.open()
|
// this.$refs.message.open()
|
||||||
// this.$refs.alertDialog.open('bottom')
|
// this.$refs.alertDialog.open('bottom')
|
||||||
} else {
|
} else {
|
||||||
this.handleScon(type)
|
this.handleScon(type)
|
||||||
}
|
}
|
||||||
// this.handleScon(type)、
|
// this.handleScon(type)、
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeAuth() {
|
changeAuth() {
|
||||||
//这里是权限通过后执行自己的代码逻辑
|
//这里是权限通过后执行自己的代码逻辑
|
||||||
console.log('权限已授权,可执行自己的代码逻辑了')
|
console.log('权限已授权,可执行自己的代码逻辑了')
|
||||||
// this.handleScon()
|
// this.handleScon()
|
||||||
this.handleScon(this.type)
|
this.handleScon(this.type)
|
||||||
},
|
},
|
||||||
handleScon(type) {
|
handleScon(type) {
|
||||||
this.$refs.message.close()
|
this.$refs.message.close()
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
sizeType: ['original', 'compressed'],
|
sizeType: ['original', 'compressed'],
|
||||||
sourceType: [type],
|
sourceType: [type],
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
uploadImage(res.tempFilePaths[0]).then((res) => {
|
uploadImage(res.tempFilePaths[0]).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
let result = JSON.parse(res[1].data)
|
console.log("🚀 ~ res:", res)
|
||||||
apiUpdateUser({
|
let result = JSON.parse(res[1].data)
|
||||||
headSculpture: result.data.minFileUrl,
|
apiUpdateUser({
|
||||||
}).then((res) => {
|
headSculpture: result.data.minFileUrl,
|
||||||
console.log(res)
|
}).then((res) => {
|
||||||
this.userInfo.headSculpture = result.data.minFileUrl
|
console.log(res)
|
||||||
this.userInfo.avatar = this.$config.static + result.data.minFileUrl
|
this.userInfo.headSculpture = result.data.minFileUrl
|
||||||
uni.setStorageSync(this.$cacheKey.userInfo, this.userInfo)
|
this.userInfo.avatar = this.$config.static + result.data.minFileUrl
|
||||||
this.$forceUpdate()
|
uni.setStorageSync(this.$cacheKey.userInfo, this.userInfo)
|
||||||
})
|
this.$forceUpdate()
|
||||||
})
|
})
|
||||||
},
|
})
|
||||||
})
|
},
|
||||||
},
|
})
|
||||||
dialogClose() {
|
},
|
||||||
this.$refs.message.close()
|
dialogClose() {
|
||||||
},
|
this.$refs.message.close()
|
||||||
},
|
},
|
||||||
|
},
|
||||||
onLoad(options) {
|
|
||||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
onLoad(options) {
|
||||||
},
|
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||||
}
|
},
|
||||||
</script>
|
}
|
||||||
<style lang="scss">
|
</script>
|
||||||
.head {
|
<style lang="scss">
|
||||||
.head-img {
|
.head {
|
||||||
height: 750rpx;
|
.head-img {
|
||||||
width: 750rpx;
|
height: 750rpx;
|
||||||
}
|
width: 750rpx;
|
||||||
|
}
|
||||||
.head-setup {
|
|
||||||
position: fixed;
|
.head-setup {
|
||||||
bottom: 0;
|
position: fixed;
|
||||||
left: 0;
|
bottom: 0;
|
||||||
width: 750rpx;
|
left: 0;
|
||||||
padding-bottom: 60rpx;
|
width: 750rpx;
|
||||||
background-color: #fff;
|
padding-bottom: 60rpx;
|
||||||
|
background-color: #fff;
|
||||||
.head-setup-item {
|
|
||||||
height: 100rpx;
|
.head-setup-item {
|
||||||
line-height: 100rpx;
|
height: 100rpx;
|
||||||
text-align: center;
|
line-height: 100rpx;
|
||||||
border-top: 1rpx solid #e8e8e8;
|
text-align: center;
|
||||||
}
|
border-top: 1rpx solid #e8e8e8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/ .uni-popup-message__box {
|
}
|
||||||
border-radius: 10rpx !important;
|
/deep/ .uni-popup-message__box {
|
||||||
background-color: #fff;
|
border-radius: 10rpx !important;
|
||||||
}
|
background-color: #fff;
|
||||||
</style>
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user