.
This commit is contained in:
parent
c207911220
commit
0da7fb60b3
@ -5,20 +5,21 @@
|
||||
<!-- 顶部导航栏 -->
|
||||
<custom-nav-bar :left="true" @leftClick="" title="分享">
|
||||
<template v-slot:right>
|
||||
<view class="fixed">
|
||||
<view class="fixed" @click="selectAll">
|
||||
<view style=" font-size: 0.9rem;">全选</view>
|
||||
</view>
|
||||
</template>
|
||||
</custom-nav-bar>
|
||||
</template>
|
||||
<view class="card-zd">
|
||||
<u-checkbox-group v-model="scenarioCheck" placement="column" @change="">
|
||||
<uni-collapse>
|
||||
<uni-collapse-item title-border="none" :border="false" :show-arrow="false" :open="true"
|
||||
v-for="item in dataList">
|
||||
<template v-slot:title>
|
||||
<view class="cards-title">
|
||||
<view>
|
||||
<view><u-checkbox name="reading1" /></view>
|
||||
<view><u-checkbox :name="item.id" /></view>
|
||||
<view class="text">{{ item.groupName }}</view>
|
||||
<view>已选:{{item.wos.length}}</view>
|
||||
</view>
|
||||
@ -45,15 +46,44 @@
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
<view class="form-btn">
|
||||
<u-button size="large" type="success" @click="submit">确认</u-button>
|
||||
<u-button size="large" @click="cancel">取消</u-button>
|
||||
<u-button size="large" type="success" @click="showPopup" :disabled="!scenarioCheck.length">确认</u-button>
|
||||
<u-button size="large" @click="uni.navigateBack()">取消</u-button>
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
<!-- 左侧分组弹出层 -->
|
||||
<u-popup mode="bottom" :show="showPop" @close="closePopup" :closeOnClickOverlay="true">
|
||||
<view style="padding-bottom: 46px; background: #f3f3f3;">
|
||||
<view style="text-align: center;">
|
||||
<text>请选择分享用户</text>
|
||||
</view>
|
||||
<view v-if="landUsers.length" style="max-height: 50vh;overflow-y: auto;">
|
||||
<u-checkbox-group v-model="userCheck" placement="column" @change="">
|
||||
<view v-for="(item, index) in landUsers">
|
||||
<u-checkbox v-if="item.userId != userId" :key="index" :label="item.userName"
|
||||
:name="item.userId">
|
||||
</u-checkbox>
|
||||
</view>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
<view style="position: absolute;bottom: 0; width: 100%;">
|
||||
<u-button type="success" size="large" text="确定" @click="confirm"
|
||||
style="width: 50%!important;float: left;" :disabled="!userCheck.length" />
|
||||
<u-button size="large" text="取消" @click="closePopup" style="width: 50%!important;float: right;" />
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</template>
|
||||
<script>
|
||||
import store from '@/store'
|
||||
const user = store.state.user.user;
|
||||
import * as isApi from '@/api/irrigate/irrigateScenario.js'
|
||||
import {
|
||||
getLandUser
|
||||
} from '@/api/system/land.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -74,12 +104,15 @@
|
||||
"4": "④",
|
||||
}
|
||||
},
|
||||
disabled: false
|
||||
userId: user.userId,
|
||||
showPop: false,
|
||||
landUsers: [],
|
||||
scenarioCheck: [],
|
||||
userCheck: [],
|
||||
}
|
||||
},
|
||||
onLoad(par) {
|
||||
this.landId = par.landId;
|
||||
this.queryList();
|
||||
},
|
||||
onShow() {},
|
||||
mounted() {},
|
||||
@ -91,7 +124,36 @@
|
||||
} else {
|
||||
this.$refs.paging.completeByTotal([]);
|
||||
}
|
||||
});
|
||||
},
|
||||
selectAll() {
|
||||
let ids = [];
|
||||
this.dataList.forEach(item => {
|
||||
ids.push(item.id);
|
||||
})
|
||||
this.scenarioCheck = ids;
|
||||
},
|
||||
showPopup() {
|
||||
getLandUser({
|
||||
landId: this.landId,
|
||||
typeId: 2,
|
||||
enableControl: '0'
|
||||
}).then(res => {
|
||||
this.landUsers = res.rows;
|
||||
});
|
||||
|
||||
this.showPop = true;
|
||||
},
|
||||
closePopup() {
|
||||
this.showPop = false;
|
||||
},
|
||||
confirm() {
|
||||
isApi.saveBatchControlShare({
|
||||
ids: this.scenarioCheck,
|
||||
shareUserIds: this.userCheck.join(',')
|
||||
}).then(res => {
|
||||
this.$toast("分享成功")
|
||||
this.cancel();
|
||||
});
|
||||
},
|
||||
}
|
||||
@ -105,7 +167,14 @@
|
||||
uni-page-body {
|
||||
padding-bottom: 38px !important;
|
||||
}
|
||||
.form-btn{width: 100%;position: fixed;bottom: 0;gap: 0px;}
|
||||
|
||||
.form-btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
gap: 0px;
|
||||
}
|
||||
|
||||
::v-deep .uni-forms {
|
||||
margin-right: 10px;
|
||||
padding: 0 !important;
|
||||
|
Loading…
Reference in New Issue
Block a user