123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <view style="background-color: #fff;padding-bottom: 110rpx;" v-if="deptList.length != 0">
- <u-radio-group v-model="checkboxValue1" placement="column" iconPlacement="right" @change="checkboxChange">
- <u-collapse accordion @open="open">
- <u-collapse-item :title="v.Name" :name="v.No" :key="v.No" v-for="v in deptList">
- <view slot="value" style="color: #2979ff;">
- {{idList.indexOf(v.No)==-1?'':'已选'}}
- </view>
- <view class="checkitem" v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
- <u-radio shape="square" :label="i.Name" :name="i.NO" size="24" @change="change2(i)">{{i.Name}}
- </u-radio>
- </view>
- </u-collapse-item>
- </u-collapse>
- </u-radio-group>
- <view
- style="position: fixed;bottom: 0;left: 0;width: 100%;height: 100rpx;background-color: #fff;box-sizing: border-box;padding: 20rpx;">
- <u-button type="primary" text="确认" @click="submit"></u-button>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- checkboxValue1: [],
- userList: [],
- deptList: [],
- allUserList: [],
- nameList: '',
- idList: ''
- }
- },
- onLoad(options) {
- this.getjsPeo(options)
- },
- onNavigationBarButtonTap(e) {
- },
- methods: {
- //获取下一节点接收人信息
- getjsPeo(options) {
- uni.$u.http.get('/jflow/restful/GenerNextStepNodeEmps', {
- params: {
- workid: options.workid,
- token: uni.getStorageSync('jtoken'),
- flowNo: options.flowNo,
- toNodeID: options.id
- }
- }).then(res => {
- console.log(res)
- if (getApp().globalData.peoList.length != 0) {
- this.nameList = getApp().globalData.peoList.split(",")
- this.idList = getApp().globalData.peoDeptList.split(",")
- this.checkboxValue1 = getApp().globalData.peoIdList.split(",")
- }
- this.allUserList = res.Emps;
- this.userList = res.Emps;
- this.$forceUpdate()
- if (res.Depts.length > 1 && res.Depts[0].Name == "定州") {
- this.deptList = res.Depts.splice(1)
- } else {
- this.deptList = res.Depts
- }
- })
- },
- //选择人员
- checkboxChange(e) {
- console.log('‘,', e)
- },
- //折叠面板打开
- open(e) {
- // console.log(e)
- },
- change2(e) {
- console.log('563‘', e)
- this.nameList = e.Name
- this.idList = e.NO
- },
- submit() {
- console.log()
- if (this.checkboxValue1.length == 0) {
- uni.showToast({
- title: "请选择人员",
- icon: "none"
- })
- } else {
- console.log(this.nameList, this.idList)
- getApp().globalData.zhubanName = this.nameList
- // getApp().globalData.peoIdList = this.checkboxValue1.join(",")
- getApp().globalData.zhubanId = this.idList
- uni.$emit('query', {
- a: 3
- })
- uni.navigateBack()
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .checkitem {
- // display: flex;
- // align-items: center;
- // justify-content: space-between;
- font-size: 32rpx;
- padding: 20rpx 0;
- border-bottom: 1px solid #eaeaea;
- }
- ::v-deep .u-collapse-item__content__text {
- background-color: #f7f7f7;
- }
- ::v-deep .u-cell__title-text {
- font-size: 32rpx;
- }
- </style>
|