app验收反馈
This commit is contained in:
@@ -6,14 +6,32 @@
|
||||
</view> -->
|
||||
<picker
|
||||
@change="projectNameChange"
|
||||
@cancel="selectProject = false"
|
||||
:value="select.projectNameIndex"
|
||||
:range="projectList"
|
||||
range-key="text"
|
||||
v-if="store.params.engineerId"
|
||||
>
|
||||
<view class="nav-menu" :class="{ 'nav-menu-active': select.projectName }">
|
||||
{{ select.projectName || '项目' }}
|
||||
<uni-icons type="bottom" size="14" color="#666"></uni-icons>
|
||||
<view class="nav-menu" :class="{ 'nav-menu-active': select.projectName }" @click="selectProject = true">
|
||||
{{
|
||||
select.projectName
|
||||
? select.projectName.length > 4
|
||||
? select.projectName.substring(0, 4) + '...'
|
||||
: select.projectName
|
||||
: '全部项目'
|
||||
}}
|
||||
<uni-icons
|
||||
type="top"
|
||||
size="14"
|
||||
:color="select.projectName ? '#376cf3' : '#666'"
|
||||
v-if="selectProject"
|
||||
></uni-icons>
|
||||
<uni-icons
|
||||
type="bottom"
|
||||
size="14"
|
||||
:color="select.projectName ? '#376cf3' : '#666'"
|
||||
v-else
|
||||
></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
<view style="flex: 1"></view>
|
||||
@@ -101,6 +119,7 @@ export default {
|
||||
projectType: [],
|
||||
navHeight: 0,
|
||||
userInfo: {},
|
||||
selectProject: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -231,6 +250,7 @@ export default {
|
||||
this.select.projectType = this.projectType[e.detail.value].text
|
||||
},
|
||||
projectNameChange(e) {
|
||||
this.selectProject = false
|
||||
console.log(e)
|
||||
this.select.projectNameIndex = e.detail.value
|
||||
if (e.detail.value === 0) {
|
||||
|
||||
@@ -105,6 +105,14 @@ export default {
|
||||
// e的返回格式为json对象:{"text":"测试","index":0}
|
||||
this.drawer = !this.drawer
|
||||
if (this.drawer) {
|
||||
// #ifdef APP-PLUS
|
||||
var webView = this.$mp.page.$getAppWebview()
|
||||
// 修改buttons
|
||||
webView.setTitleNViewButtonStyle(0, {
|
||||
text: '取消',
|
||||
select: false,
|
||||
})
|
||||
// #endif
|
||||
this.openDrawer()
|
||||
} else {
|
||||
this.closeDrawer()
|
||||
@@ -141,11 +149,29 @@ export default {
|
||||
// #endif
|
||||
getDevCount(this.select.engineeringId).then((res) => {
|
||||
this.devCount = res.data
|
||||
this.devCount.currentOffLineDevs.forEach((item) => {
|
||||
item.runStatus = 1
|
||||
})
|
||||
this.devCount.offLineDevs.forEach((item) => {
|
||||
item.runStatus = 1
|
||||
})
|
||||
})
|
||||
this.$refs.device && this.$refs.device.init()
|
||||
},
|
||||
closeDrawer(e) {
|
||||
if (!e) {
|
||||
// #ifdef APP-PLUS
|
||||
var webView = this.$mp.page.$getAppWebview()
|
||||
// 修改buttons
|
||||
webView.setTitleNViewButtonStyle(0, {
|
||||
text: this.select.engineeringName
|
||||
? this.select.engineeringName.length > 7
|
||||
? this.select.engineeringName.substring(0, 7) + '...'
|
||||
: this.select.engineeringName
|
||||
: '请选择工程',
|
||||
select: true,
|
||||
})
|
||||
// #endif
|
||||
this.$refs.showRight.close()
|
||||
return
|
||||
}
|
||||
@@ -160,7 +186,11 @@ export default {
|
||||
var webView = this.$mp.page.$getAppWebview()
|
||||
// 修改buttons
|
||||
webView.setTitleNViewButtonStyle(0, {
|
||||
text: this.select.engineeringName,
|
||||
text:
|
||||
this.select.engineeringName.length > 7
|
||||
? this.select.engineeringName.substring(0, 7) + '...'
|
||||
: this.select.engineeringName,
|
||||
select: true,
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<view :loading="loading">
|
||||
<view class="mine">
|
||||
<view class="mine-header" @click="jump('basic')">
|
||||
<image mode="aspectFill" class="mine-header-head" src="/static/head.png" />
|
||||
<image mode="aspectFill" class="mine-header-head" :src="userInfo.avatar" v-if="userInfo.avatar" />
|
||||
<image mode="aspectFill" class="mine-header-head" src="/static/head.png" v-else />
|
||||
<view class="mine-header-name hide-txt">
|
||||
<view>{{ userInfo.nickname }}</view>
|
||||
<view></view>
|
||||
@@ -45,7 +46,11 @@
|
||||
<view class="mine-nav-label">工程列表</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('engineering/setting')" v-if="userInfo.authorities === 'engineering_user'">
|
||||
<view
|
||||
class="mine-nav"
|
||||
@click="jump('engineering/setting')"
|
||||
v-if="userInfo.authorities === 'engineering_user'"
|
||||
>
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/like.png" />
|
||||
<view class="mine-nav-label">关注工程配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
@@ -90,6 +95,7 @@
|
||||
<script>
|
||||
import { roleUpdate } from '@/common/api/user'
|
||||
import { transferDevice } from '@/common/api/device'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -124,9 +130,7 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.loading = false
|
||||
},
|
||||
init() {},
|
||||
upgrade(code) {
|
||||
console.log(code)
|
||||
roleUpdate({
|
||||
@@ -210,7 +214,7 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
console.log(this.userInfo)
|
||||
this.loading = false
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user