123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- <template>
- <view>
- <view class="search">
- <view class="box" @click="go_search()">
- <view class="icon">
- <uni-icons type="search" size="16" color="#BBBBBB"></uni-icons>
- </view>
- <view class="text">搜索</view>
- </view>
- </view>
- <view class="content">
- <view class="title">
- <view class="icon">
- <image src="./icon/title_icon.png" mode=""></image>
- </view>
- <view class="text" v-if="mine_code == 'zaoquan'">国家能源集团枣泉煤矿</view>
- <view class="text" v-if="mine_code == 'ningmeijituan'">国家能源集团宁夏煤业公司</view>
- <view class="text" v-if="mine_code == 'ningdongyunying'">国家能源集团宁东运营部</view>
- <view class="text" v-if="mine_code == 'qingshuiying'">国家能源集团清水营煤矿</view>
- <view class="text" v-if="mine_code == 'wuyegongsi'">物业公司</view>
- <view class="text" v-if="mine_code == 'jinjiaqu' || mine_code == 'jinjiaqu_neiwang'">国家能源集团金家渠煤矿</view>
- <view class="text" v-if="mine_code == 'yangchangwan'">国家能源集团羊场湾煤矿</view>
- <view class="text" v-if="mine_code == 'shicaocun'">国家能源集团石槽村煤矿</view>
- <view class="text" v-if="mine_code == 'jinfeng' || mine_code == 'jinfeng_neiwang'">国家能源集团金凤煤矿</view>
- </view>
- <origanizationSection :data="list" :mine_code="mine_code"></origanizationSection>
- </view>
- </view>
- </template>
- <script>
- import data from "./data.json"
- export default {
- data() {
- return {
- // 当前煤矿编码
- mine_code: "",
- // 部门列表
- list: [
- ],
- // 当前展开部门
- active: 99999999,
- // 人员列表
- user_list: []
- };
- },
- onLoad() {
- // 初始化当前煤矿编码
- this.mine_code = uni.getStorageSync('mine_code')
- this.get_section_getGroupList()
- },
- methods: {
- // 搜索
- go_search() {
- uni.navigateTo({
- url: "./search/search",
- animationType: "fade-in",
- animationDuration: 200
- })
- },
- // 获取部门列表
- get_section_getGroupList() {
- uni.showLoading({
- mask: true
- })
- this.$api.section_get_org_structure({
- }).then((res) => {
- uni.hideLoading()
- console.log(res.data.content.data[0].children)
- if(this.mine_code == 'ningmeijituan'){
- this.list = res.data.content.data[0].children
- }else{
- this.list = res.data.content.data
- }
- })
- },
- change_active(index, id) {
- this.user_list = []
- if (this.active == index) {
- this.active = 99999999
- } else {
- this.active = index
- // this.get_user_list(id)
- console.log(id)
- }
- },
- go_record(page_id) {
- console.log(page_id)
- if (page_id == null) {
- uni.showToast({
- icon: "none",
- title: "该部门还未关联二维码"
- })
- } else {
- console.log(page_id)
- uni.navigateTo({
- url: "../../../index/record/record?pageId=" + page_id + "&mine_code=" + uni.getStorageSync(
- 'mine_code'),
- })
- }
- },
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #F3F8F7;
- }
- .search {
- margin-bottom: 20rpx;
- background-color: #FFFFFF;
- box-sizing: border-box;
- padding: 25rpx 30rpx;
- .box {
- height: 80rpx;
- background-color: #F4F4F4;
- border-radius: 50rpx;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 0 25rpx;
- .icon {
- margin-right: 10rpx;
- }
- .text {
- font-size: 30rpx;
- color: #BBBBBB;
- }
- }
- }
- .content {
- background-color: #FFFFFF;
- .title {
- height: 110rpx;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 0 36rpx;
- border-bottom: 1rpx solid #F3F8F7;
- .icon {
- image {
- width: 48rpx;
- height: 36rpx;
- }
- }
- .text {
- margin-left: 20rpx;
- font-size: 36rpx;
- font-weight: 700;
- }
- }
- }
- </style>
|