master
wangxia 1 month ago
parent bb313e9278
commit 32a71ba4da

@ -30,21 +30,22 @@
/> />
</div> </div>
<div class="r_box g_ml_10 g_mr_10"> <div class="r_box g_ml_10 g_mr_10">
<div v-for="item in memberList" :key="item.id" <div v-for="item in memberList" :key="item.id" @click="editMember(item)" class="g_border_e_b g_flex_row_between g_fs_18" style="padding: 19px 12px 19px 22px">
@click="editMember(item)" <div class="g_flex_row_start flex_center" style="font-size: 16px; color: #333333">
class="g_border_e_b g_flex_row_between g_fs_18"
style="padding: 19px 12px 19px 22px"
>
<div class="g_flex_row_start flex_center" style="font-size: 16px;color: #333333;">
{{ item.aliasName || item.userName }} {{ item.aliasName || item.userName }}
<div class="g_fs_12 g_pl_2 g_h_18 g_pr_2 g_radius_4 g_flex_row_center flex_center g_ml_4" <div class="g_fs_12 g_pl_2 g_h_18 g_pr_2 g_radius_4 g_flex_row_center flex_center g_ml_4"
v-for="i in item.agencyRoleNameList" v-for="(role, index) in getDisplayRoles(item.agencyRoleNameList)"
:class="i ? (i == '创建人' ? 'creator' : i == '管理员' ? 'manager' : 'member') : ''" :key="index"
>{{ i }}</div> :class="role !== '...' ? (role == '创建人' ? 'creator' : role == '管理员' ? 'manager' : 'member') : ''"
v-show="role && role.trim()">
{{ role }}
</div>
</div> </div>
<div class="g_flex_row_end flex_center g_c_6" style="font-size: 16px;color: #888;"> <div class="g_flex_row_end flex_center g_c_6" style="font-size: 16px; color: #888">
{{ item.tel }} {{ item.tel }}
<i class="iconfont icon-gengduo11 g_c_c" style="font-size: 16px;"></i> <i class="iconfont icon-gengduo11 g_c_c" style="font-size: 16px"></i>
</div> </div>
</div> </div>
</div> </div>
@ -85,12 +86,16 @@
</template> </template>
<script> <script>
import gPanelFormItem from "@/components/panel/formItem.vue";
export default { export default {
components: {
gPanelFormItem,
},
data() { data() {
return { return {
memberList: [], memberList: [],
addMemberShow: false, addMemberShow: false,
agencyInfo: uni.getStorageSync("apply-userinfo"), agencyInfo: uni.getStorageSync("agencyInfo"),
applyNum: 0, applyNum: 0,
}; };
}, },
@ -105,7 +110,7 @@ export default {
methods: { methods: {
compare(a, b) { compare(a, b) {
let sortList = ["创建人", "管理员",'成员']; let sortList = ["创建人", "管理员", "成员"];
if (sortList.includes(a) && sortList.includes(b)) { if (sortList.includes(a) && sortList.includes(b)) {
return sortList.indexOf(a) - sortList.indexOf(b); return sortList.indexOf(a) - sortList.indexOf(b);
} else if (sortList.includes(a)) { } else if (sortList.includes(a)) {
@ -154,18 +159,32 @@ export default {
}); });
}, },
openChoose() { openChoose() {
console.log('openChoose') console.log("openChoose");
uni.showActionSheet({ uni.showActionSheet({
itemList: ['添加团队成员', '修改企业资料'], title: "请选择操作",
itemList: ["添加团队成员", "修改企业资料"],
success: (res) => { success: (res) => {
console.log(res) console.log(res);
if (res.tapIndex == 0) { if (res.tapIndex == 0) {
this.goPage('/root/merchantManagement/addOrUpdataMember') this.goPage("/root/merchantManagement/addOrUpdataMember");
} else if (res.tapIndex == 1) { } else if (res.tapIndex == 1) {
this.goPage('/root/person/info?active=1') this.goPage("/root/person/info?active=1");
}
},
});
},
//
getDisplayRoles(roles) {
if (!roles || roles.length <= 2) {
//
return (roles || []).filter(role => role && role.trim());
} }
// 2
const filteredRoles = (roles || []).filter(role => role && role.trim());
if (filteredRoles.length <= 2) {
return filteredRoles;
} }
}) return [...filteredRoles.slice(0, 2), '...'];
} }
}, },
}; };

@ -28,7 +28,7 @@
</view> </view>
<view style="width: 100vw" class="g_border_e_b"> <view style="width: 100vw" class="g_border_e_b">
<!-- item-width="126" itemWidth="auto" --> <!-- item-width="126" itemWidth="auto" -->
<g-tabs :list="tabInfo" v-if="!numLoading" item-width="126" :current="menuActive" active-color="#6A81FF" bar-width="60" bar-height="6" font-size="32" @change="handleUpdateMenu" :gutter="22" duration="0.1" itemWidth="auto" height="84"></g-tabs> <g-tabs :list="tabInfo" v-if="!numLoading" item-width="126" :current="menuActive" bar-width="60" bar-height="6" font-size="32" @change="handleUpdateMenu" :gutter="22" duration="0.1" itemWidth="auto" height="84"></g-tabs>
<!-- <u-tabs :list="tabInfo" v-model="menuActive" active-color="#6A81FF" bar-width="60" bar-height="6" font-size="32" @change="handleUpdateMenu" :gutter="22" duration="0.1" height="84"></u-tabs> --> <!-- <u-tabs :list="tabInfo" v-model="menuActive" active-color="#6A81FF" bar-width="60" bar-height="6" font-size="32" @change="handleUpdateMenu" :gutter="22" duration="0.1" height="84"></u-tabs> -->
</view> </view>

Loading…
Cancel
Save