|
@@ -32,7 +32,7 @@ page {
|
|
line-height: 48rpx;
|
|
line-height: 48rpx;
|
|
background-color: transparent;
|
|
background-color: transparent;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
- caret-color: #1DB1B2;
|
|
|
|
|
|
+ caret-color: #1db1b2;
|
|
}
|
|
}
|
|
|
|
|
|
.input-wrap .icon {
|
|
.input-wrap .icon {
|
|
@@ -229,7 +229,9 @@ page {
|
|
:key="index"
|
|
:key="index"
|
|
@click.stop="checkSpace(item)"
|
|
@click.stop="checkSpace(item)"
|
|
v-for="(item,index) in histroyData">
|
|
v-for="(item,index) in histroyData">
|
|
- <image src="{{h5StaticPath+'metting-icon.svg'}}" alt=""/>
|
|
|
|
|
|
+ <image v-if="item.typeName=='会议室'" src="{{h5StaticPath+'metting-icon.svg'}}" alt=""/>
|
|
|
|
+ <image v-else-if="item.name" src="{{h5StaticPath+'person-icon.svg'}}" alt=""/>
|
|
|
|
+ <image v-else src="{{h5StaticPath+'space-icon.svg'}}" alt=""/>
|
|
<view>{{item.name?item.name:item.permanentSpaceName }}</view>
|
|
<view>{{item.name?item.name:item.permanentSpaceName }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -259,7 +261,9 @@ page {
|
|
<view class="searchable-item"
|
|
<view class="searchable-item"
|
|
@click.stop="checkSpace(item,1)"
|
|
@click.stop="checkSpace(item,1)"
|
|
:key="index+'serach'" v-for="(item,index) in serachData">
|
|
:key="index+'serach'" v-for="(item,index) in serachData">
|
|
- <image src="{{h5StaticPath+'metting-icon.svg'}}" alt=""/>
|
|
|
|
|
|
+ <image v-if="item.typeName=='会议室'" src="{{h5StaticPath+'metting-icon.svg'}}" alt=""/>
|
|
|
|
+ <image v-else-if="item.name" src="{{h5StaticPath+'person-icon.svg'}}" alt=""/>
|
|
|
|
+ <image v-else src="{{h5StaticPath+'space-icon.svg'}}" alt=""/>
|
|
<view class="searchable">
|
|
<view class="searchable">
|
|
<!-- {{ item.name?item.name:item.permanentSpaceName }} -->
|
|
<!-- {{ item.name?item.name:item.permanentSpaceName }} -->
|
|
<text wx:for="{{item.searchArray}}" wx:for-item="item2" wx:key="index2" style="{{item2 == inputValue?'color:#1DB1B2':''}}">{{item2}}</text>
|
|
<text wx:for="{{item.searchArray}}" wx:for-item="item2" wx:key="index2" style="{{item2 == inputValue?'color:#1DB1B2':''}}">{{item2}}</text>
|
|
@@ -279,6 +283,7 @@ import wepy from '@wepy/core';
|
|
import eventHub from '@/common/eventHub';
|
|
import eventHub from '@/common/eventHub';
|
|
import { mapState } from '@wepy/x';
|
|
import { mapState } from '@wepy/x';
|
|
import store from '@/store';
|
|
import store from '@/store';
|
|
|
|
+import utils from '@/common/utils';
|
|
import { findControllSpace } from '@/packagesEnv/api/mapApi';
|
|
import { findControllSpace } from '@/packagesEnv/api/mapApi';
|
|
import testMixin from '@/mixins/test';
|
|
import testMixin from '@/mixins/test';
|
|
|
|
|
|
@@ -287,7 +292,7 @@ let h5StaticPath = config.h5StaticPath + '/page-search/';
|
|
wepy.page({
|
|
wepy.page({
|
|
store,
|
|
store,
|
|
config: {
|
|
config: {
|
|
- navigationBarTitleText: 'test'
|
|
|
|
|
|
+ navigationBarTitleText: 'test',
|
|
},
|
|
},
|
|
|
|
|
|
data: {
|
|
data: {
|
|
@@ -297,12 +302,12 @@ wepy.page({
|
|
histroyData: [],
|
|
histroyData: [],
|
|
activeId: '',
|
|
activeId: '',
|
|
meetingData: [],
|
|
meetingData: [],
|
|
- serachData: []
|
|
|
|
|
|
+ serachData: [],
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState({
|
|
...mapState({
|
|
- userInfo: state => state.user.userInfo
|
|
|
|
- })
|
|
|
|
|
|
+ userInfo: (state) => state.user.userInfo,
|
|
|
|
+ }),
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
this.init();
|
|
this.init();
|
|
@@ -324,9 +329,9 @@ wepy.page({
|
|
console.log('获取到会议室数据d');
|
|
console.log('获取到会议室数据d');
|
|
let params = {
|
|
let params = {
|
|
companyId: this.userInfo.companyId,
|
|
companyId: this.userInfo.companyId,
|
|
- projectId: this.userInfo.projectId
|
|
|
|
|
|
+ projectId: this.userInfo.projectId,
|
|
};
|
|
};
|
|
- findControllSpace(params).then(res => {
|
|
|
|
|
|
+ findControllSpace(params).then((res) => {
|
|
console.log('获取到会议室数据--', res);
|
|
console.log('获取到会议室数据--', res);
|
|
this.meetingData = res.data || [];
|
|
this.meetingData = res.data || [];
|
|
});
|
|
});
|
|
@@ -336,19 +341,28 @@ wepy.page({
|
|
let params = {
|
|
let params = {
|
|
companyId: this.userInfo.companyId,
|
|
companyId: this.userInfo.companyId,
|
|
param: this.inputValue,
|
|
param: this.inputValue,
|
|
- projectId: this.userInfo.projectId
|
|
|
|
|
|
+ projectId: this.userInfo.projectId,
|
|
};
|
|
};
|
|
- findControllSpace(params).then(res => {
|
|
|
|
|
|
+ findControllSpace(params).then((res) => {
|
|
console.log('获取到会议室数据--', res);
|
|
console.log('获取到会议室数据--', res);
|
|
this.serachData = res.data || [];
|
|
this.serachData = res.data || [];
|
|
let that = this;
|
|
let that = this;
|
|
- this.serachData.map(item => {
|
|
|
|
|
|
+ this.serachData.map((item) => {
|
|
//高亮字符串数组
|
|
//高亮字符串数组
|
|
item.searchArray = that.getHilightStrArray(
|
|
item.searchArray = that.getHilightStrArray(
|
|
item.name ? item.name : item.permanentSpaceName,
|
|
item.name ? item.name : item.permanentSpaceName,
|
|
this.inputValue
|
|
this.inputValue
|
|
);
|
|
);
|
|
});
|
|
});
|
|
|
|
+ // 设置图标
|
|
|
|
+ this.setSpaceIcon();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 设置空间图像
|
|
|
|
+ setSpaceIcon() {
|
|
|
|
+ this.serachData.map((item) => {
|
|
|
|
+ item.typeName = utils.getMapSpaceIcon(item.roomFuncType).typeName;
|
|
|
|
+ console.log('item.typeName==', item.typeName);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
checkSpace(item, type) {
|
|
checkSpace(item, type) {
|
|
@@ -370,7 +384,7 @@ wepy.page({
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
url: `/packagesEnv/pages/officehome/index?from=FindIt&floorId=${
|
|
url: `/packagesEnv/pages/officehome/index?from=FindIt&floorId=${
|
|
item.floorId
|
|
item.floorId
|
|
- }&buildingId=${item.buildingId}&spaceId=${item.permanentSpaceId}`
|
|
|
|
|
|
+ }&buildingId=${item.buildingId}&spaceId=${item.permanentSpaceId}`,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 搜索
|
|
// 搜索
|
|
@@ -393,21 +407,21 @@ wepy.page({
|
|
goEnv() {
|
|
goEnv() {
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
url:
|
|
url:
|
|
- '/packagesEnv/pages/officehome/index?spaceId=Sp1101080259b3510e26e7dd4dd9bf9784f06f3feb68'
|
|
|
|
|
|
+ '/packagesEnv/pages/officehome/index?spaceId=Sp1101080259b3510e26e7dd4dd9bf9784f06f3feb68',
|
|
});
|
|
});
|
|
},
|
|
},
|
|
goPortrait() {
|
|
goPortrait() {
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
- url: '/packagesEnv/pages/portrait/home'
|
|
|
|
|
|
+ url: '/packagesEnv/pages/portrait/home',
|
|
});
|
|
});
|
|
},
|
|
},
|
|
goPersonCenter() {
|
|
goPersonCenter() {
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
- url: '/packagesEnv/pages/personalCenter/index'
|
|
|
|
|
|
+ url: '/packagesEnv/pages/personalCenter/index',
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- created() {}
|
|
|
|
|
|
+ created() {},
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
<config>
|
|
<config>
|