|
|
@@ -67,11 +67,16 @@
|
|
|
<text class="text">清除缓存</text>
|
|
|
</view>
|
|
|
</uni-grid-item>
|
|
|
- <uni-grid-item :index="3" v-if="homesysShow">
|
|
|
+ </uni-grid>
|
|
|
+ </view>
|
|
|
+ <uni-section title="房屋管家" titleFontSize="1.3rem" v-if="homesysShow" type="line"></uni-section>
|
|
|
+ <view class="grid-body" v-if="homesysShow">
|
|
|
+ <uni-grid :column="uni_grid_column" :showBorder="false" @change="changeHomesys">
|
|
|
+ <uni-grid-item v-for="(code, index) in homesysInfo.homeCode" :index="index" v-if="homesysShow" :key="index">
|
|
|
<view class="grid-item-box">
|
|
|
<!-- <uni-icons type="home-filled" size="30" color="#66ccff" class="icon_size"></uni-icons> -->
|
|
|
<text class="ygoa_work_icon icon-zhinengjiaju"></text>
|
|
|
- <text class="text">房屋管家</text>
|
|
|
+ <text class="text">{{ roomAliases[code] || code }}</text>
|
|
|
</view>
|
|
|
</uni-grid-item>
|
|
|
</uni-grid>
|
|
|
@@ -110,18 +115,117 @@ if(config.companyCode && config.companyCode == 'yg'){
|
|
|
diaryShow.value = false;
|
|
|
}
|
|
|
const homesysShow = ref(false)
|
|
|
-onMounted(() => {
|
|
|
- switch (userStore.user.userName) {
|
|
|
- case "hez":
|
|
|
- case "yzadmin":
|
|
|
- homesysShow.value = true
|
|
|
- break;
|
|
|
- default:
|
|
|
- homesysShow.value = false
|
|
|
+const homesysList = [
|
|
|
+ {
|
|
|
+ name: '测试',
|
|
|
+ username: 'yzadmin',
|
|
|
+ homeCode: [103]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '林明东',
|
|
|
+ username: 'linmd',
|
|
|
+ homeCode: [203, 204, 303, 306, 310]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '何总',
|
|
|
+ username: 'hez',
|
|
|
+ homeCode: [302, 303, 306, 310, 204]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '黄林葳',
|
|
|
+ username: 'huanglw',
|
|
|
+ homeCode: [303, 305, 306, 310, 204]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '余煌',
|
|
|
+ username: 'yuh',
|
|
|
+ homeCode: [202]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '周颖',
|
|
|
+ username: 'zhouy',
|
|
|
+ homeCode: [202]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '谭艳',
|
|
|
+ username: 'tany',
|
|
|
+ homeCode: [101, 204, 208, 303, 306, 310]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '林镇堃',
|
|
|
+ username: 'linzk',
|
|
|
+ homeCode: [106, 107]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '陈雪梅',
|
|
|
+ username: 'chenxm',
|
|
|
+ homeCode: [106, 107]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '陈小沛',
|
|
|
+ username: 'chenxp',
|
|
|
+ homeCode: [301]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '温永志',
|
|
|
+ username: '',
|
|
|
+ homeCode: [102]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '苏总',
|
|
|
+ username: '',
|
|
|
+ homeCode: [209]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '黄铭',
|
|
|
+ username: 'huangm',
|
|
|
+ homeCode: [303, 304, 306, 310]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '黄德胜',
|
|
|
+ username: 'huangds',
|
|
|
+ homeCode: [103]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '黄蓉',
|
|
|
+ username: 'huangr',
|
|
|
+ homeCode: [103]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '潘福雁',
|
|
|
+ username: 'panfy',
|
|
|
+ homeCode: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '沈宇红',
|
|
|
+ username: 'shenyh',
|
|
|
+ homeCode: [106, 107, 204, 208, 303, 306, 310]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '余总',
|
|
|
+ username: '',
|
|
|
+ homeCode: [207, 204, 208, 303, 306, 310]
|
|
|
}
|
|
|
+]
|
|
|
+
|
|
|
+// 房屋别名映射
|
|
|
+const roomAliases = {
|
|
|
+ 204: '二楼会议室',
|
|
|
+ 208: '休息室',
|
|
|
+ 303: '贵宾室',
|
|
|
+ 306: '三楼茶室',
|
|
|
+ 310: '三楼会议室'
|
|
|
+}
|
|
|
+const homesysInfo = ref({})
|
|
|
+onMounted(() => {
|
|
|
sysFontSize = uni.getAppBaseInfo().fontSizeSetting
|
|
|
if (sysFontSize > 20) uni_grid_column.value = 3
|
|
|
initProcessList()
|
|
|
+ const homesysInfoIndex = homesysList.findIndex(({username}) => userStore.user.userName == username)
|
|
|
+ if (homesysInfoIndex != -1) {
|
|
|
+ homesysShow.value = true
|
|
|
+ homesysInfo.value = homesysList[homesysInfoIndex]
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
onShow(()=>{
|
|
|
@@ -188,11 +292,13 @@ function changeToolsGrid(e) {
|
|
|
clearCache()
|
|
|
// openClearCachePopup() // 打开清除缓存弹出层
|
|
|
break
|
|
|
- case 3:
|
|
|
- $tab.navigateTo('/pages/work/homesys/index')
|
|
|
default:
|
|
|
}
|
|
|
}
|
|
|
+// 点击房屋管家
|
|
|
+function changeHomesys(e) {
|
|
|
+ $tab.navigateTo('/pages/work/homesys/index?homeCode=' + homesysInfo.value.homeCode[e.detail.index])
|
|
|
+}
|
|
|
// 计算器
|
|
|
const calculatorPopup = ref(null)
|
|
|
function openCalculatorPopup() { // 打开计算器弹出层
|