Commit 2e09eb2cfdc017377d9ea34984e5f9a2e73a5ca6

Authored by liujun001
1 parent cc9d3bdc

修改企业负责人和司机的首页显示

garbage-removal/src/pages/home/index.vue
@@ -26,9 +26,9 @@ @@ -26,9 +26,9 @@
26 </view> 26 </view>
27 </view> 27 </view>
28 <view class="company-container"> 28 <view class="company-container">
29 - <view class="company-list-box" v-if="addressInfo && userType == '用户'"> 29 + <view class="company-list-box" v-if="(addressInfo && userType == '用户')||userType == '运输企业负责人'||userType == '清运车辆驾驶员'">
30 <view class="company-list-header"> 30 <view class="company-list-header">
31 - <view class="company-list-header-left"> 31 + <view class="company-list-header-left" v-if="(addressInfo && userType == '用户')">
32 <u-dropdown active-color="#19a97c"> 32 <u-dropdown active-color="#19a97c">
33 <u-dropdown-item :height="'240rpx'" :placement="'left'" v-model="registrationAreaValue" 33 <u-dropdown-item :height="'240rpx'" :placement="'left'" v-model="registrationAreaValue"
34 @change="handleDropdownAreaChange" :title="'所属区域'" :options="dropdownOptions[0]"></u-dropdown-item> 34 @change="handleDropdownAreaChange" :title="'所属区域'" :options="dropdownOptions[0]"></u-dropdown-item>
@@ -93,7 +93,7 @@ @@ -93,7 +93,7 @@
93 </view> 93 </view>
94 </view> 94 </view>
95 </view> 95 </view>
96 - <view class="company-list-item-main-right-box" 96 + <view class="company-list-item-main-right-box" v-if="(addressInfo && userType == '用户')"
97 style="display: flex;font-size: 28rpx; justify-content: flex-end; align-items: flex-end;color:#458B74;font-weight: bold;"> 97 style="display: flex;font-size: 28rpx; justify-content: flex-end; align-items: flex-end;color:#458B74;font-weight: bold;">
98 <view class="company-list-item-main-right-box-text" 98 <view class="company-list-item-main-right-box-text"
99 @click.stop="handleCleanGarbage(item, item.servicePhone, userAddress)"> 99 @click.stop="handleCleanGarbage(item, item.servicePhone, userAddress)">
@@ -421,13 +421,23 @@ const initData = () =&gt; { @@ -421,13 +421,23 @@ const initData = () =&gt; {
421 }) 421 })
422 } 422 }
423 const queryList = (pageNo, pageSize) => { 423 const queryList = (pageNo, pageSize) => {
  424 + let userTypeValue=0;
  425 + if(userType == '用户'){
  426 + userTypeValue=1;
  427 + }else if(userType.value == '清运车辆驾驶员'){
  428 + userTypeValue=2;
  429 + }else if(userType.value == '运输企业负责人'){
  430 + userTypeValue=3;
  431 + }
424 let query = { 432 let query = {
425 companyType: 1, 433 companyType: 1,
426 pageNum: pageNo, 434 pageNum: pageNo,
427 pageSize, 435 pageSize,
428 orderByColumn: sortValue.value, 436 orderByColumn: sortValue.value,
429 registrationArea: registrationAreaValue.value, 437 registrationArea: registrationAreaValue.value,
430 - searchValue: carTypeValue.value 438 + searchValue: carTypeValue.value,
  439 + userTypeValue:userTypeValue,
  440 + userType:userType.value
431 } 441 }
432 // 查询公司信息 442 // 查询公司信息
433 queryEnterpriseList(query).then(res => { 443 queryEnterpriseList(query).then(res => {
garbage-removal/src/pages/wode-info/wode-info-choose/index.vue
@@ -127,11 +127,22 @@ const submit = (userType) =&gt; { @@ -127,11 +127,22 @@ const submit = (userType) =&gt; {
127 } 127 }
128 store.userType = userType; 128 store.userType = userType;
129 store.userInfo = unitInfo.value[userType] 129 store.userInfo = unitInfo.value[userType]
130 - // #ifdef H5  
131 - uni.$u.route({  
132 - type: "switchTab",  
133 - url: `pages/order/index`,  
134 - }) 130 +
  131 +
  132 +
  133 + // #ifdef H5
  134 + if("处置场所负责人" == userType){
  135 + uni.$u.route({
  136 + type: "switchTab",
  137 + url: `pages/order/index`,
  138 + })
  139 + }else{
  140 + uni.$u.route({
  141 + type: "switchTab",
  142 + url: `/pages/home/index`,
  143 + })
  144 + }
  145 +
135 // #endif 146 // #endif
136 // #ifdef MP-WEIXIN 147 // #ifdef MP-WEIXIN
137 uni.switchTab({ 148 uni.switchTab({