| | |
| | | <template v-slot:bottom> |
| | | <view class="bottom-container"> |
| | | <!-- 按钮区域 --> |
| | | <view class="bottom-content__chulizhong bottom-content__item" > |
| | | <view class="bottom-content__chulizhong bottom-content__item"> |
| | | <view @click="withDrawClick(item.id)" v-if="item.status == 1"> |
| | | <image src="@/static/home/cehui.png" mode=""></image> |
| | | <view>撤回</view> |
| | | </view> |
| | | <view @click="checkTheScheduleClick" v-if="item.status == 1"> |
| | | <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1"> |
| | | <image src="@/static/home/jindu.png" mode=""></image> |
| | | <view>查看进度</view> |
| | | </view> |
| | | <view @click="theFormDataClick" v-if="item.status == 1 || item.status == 2 "> |
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2"> |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>表单数据</view> |
| | | </view> |
| | | <view v-if="item.status == 3"> |
| | | <image src="@/static/home/history.png" mode="" ></image> |
| | | <view @click="apply(item)" v-if="item.status == 3"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>重新申请</view> |
| | | </view> |
| | | <view v-if="item.status == 3"> |
| | | <image src="@/static/home/history.png" mode="" ></image> |
| | | <view @click="editMyApplication(item)" v-if="item.status == 3"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>编辑</view> |
| | | </view> |
| | | <view @click="approvalHistoryClick" v-if="item.status == 2 || item.status == 3"> |
| | | <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>审批历史</view> |
| | | </view> |
| | | |
| | | </view> |
| | | <!-- 已结束小组按钮 --> |
| | | <!-- <view class="bottom-content__chulizhong bottom-content__item" v-if="item.status == 2"> |
| | |
| | | <view class="bottom-container"> |
| | | <!-- 待办按钮 --> |
| | | <view class="bottom-content__item"> |
| | | <view @click="theFormDataClick"> |
| | | <!-- <view @click="theFormDataClick"> |
| | | <image src="@/static/home/jindu.png" mode=""></image> |
| | | <view>申请详情</view> |
| | | </view> |
| | | <view @click="adoptModalShow = true"> |
| | | </view> --> |
| | | <view @click="adopClick(item)"> |
| | | <image src="@/static/home/tongguo.png" mode=""></image> |
| | | <view>通过</view> |
| | | </view> |
| | | <view @click="rejectModalShow = true"> |
| | | <view @click="rejectClick(item)"> |
| | | <image src="@/static/home/bohui.png" mode=""></image> |
| | | <view>驳回</view> |
| | | </view> |
| | | <view @click="approvalHistoryClick"> |
| | | <view @click="approvalHistoryClick(item.procInstId)"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>历史</view> |
| | | </view> |
| | |
| | | item.duration >= 86400000 |
| | | ? parseInt(item.duration / 86400000 + '天' + parseInt(item.duration % 86400000) / 3600000 + '时' + parseInt(item.duration % 3600000) / 60000 + '分') |
| | | : item.duration >= 3600000 |
| | | ? parseInt(item.duration / 3600000) + '时' + parseInt(item.duration / 3600000 % 3600000) + '分' |
| | | ? parseInt(item.duration / 3600000) + '时' + parseInt((item.duration / 3600000) % 3600000) + '分' |
| | | : parseInt(item.duration / 60000) + '分' |
| | | }} |
| | | </text> |
| | |
| | | <view class="bottom-container"> |
| | | <!-- 已办按钮 --> |
| | | <view class="bottom-content__item"> |
| | | <view @click="theFormDataClick"> |
| | | <view @click="theFormDataClick(item.tableId)"> |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>表单数据</view> |
| | | </view> |
| | | <view @click="approvalHistoryClick"> |
| | | <view @click="approvalHistoryClick(item.procInstId)"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>审批历史</view> |
| | | </view> |
| | |
| | | <!-- 撤回模态框 --> |
| | | <view class="wodeshenqingMotai"> |
| | | <u-modal width="684rpx" :show="withDrawShow" title="撤回原因" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel"> |
| | | <view class="slot-content"><u--textarea v-model="withDrawContent" placeholder="请输入撤回原因"></u--textarea></view> |
| | | <view class="slot-content"><u--textarea v-model="withDrawData.reason" placeholder="请输入撤回原因"></u--textarea></view> |
| | | </u-modal> |
| | | </view> |
| | | |
| | | <!-- 通过模态框 --> |
| | | <view class="adoptModal"> |
| | | <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel"> |
| | | <view class="slot-content"><u--textarea v-model="adoptModalContent" placeholder="请输入审批意见"></u--textarea></view> |
| | | <view class="slot-content"> |
| | | <view class="rejectMesaage"> |
| | | <u-icon name="info-circle-fill" color="#0307ff"></u-icon> |
| | | <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text> |
| | | </view> |
| | | <u--textarea v-model="adoptForm.comment" placeholder="请输入审批意见"></u--textarea> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | |
| | |
| | | <view class="rejectModal"> |
| | | <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel"> |
| | | <view class="slot-content"> |
| | | <u--textarea v-model="rejectModalContent" placeholder="请输入审批意见"></u--textarea> |
| | | <view class="rejectBack"> |
| | | <view class="rejectMesaage"> |
| | | <u-icon name="info-circle-fill" color="#0307ff"></u-icon> |
| | | <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text> |
| | | </view> |
| | | <u--textarea v-model="rejectForm.comment" placeholder="请输入审批意见"></u--textarea> |
| | | <!-- <view class="rejectBack"> |
| | | <view class="rejectBack-title"><text>驳回至</text></view> |
| | | <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <!-- 选择器 --> |
| | | <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> |
| | | <!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> --> |
| | | |
| | | <!-- 菜单栏 --> |
| | | <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> |
| | |
| | | import popupMenu from '@/components/common/popup-menu/popup-menu.vue'; |
| | | import combinedTitle from '@/components/common/combined-title/combined-title.vue'; |
| | | import combinationCard from '@/components/common/combination-card/combination-card.vue'; |
| | | import {setAccessToken} from '@/utils/status.js' |
| | | import { setAccessToken } from '@/utils/status.js'; |
| | | export default { |
| | | name: 'home', |
| | | data() { |
| | |
| | | list3: ['https://cdn.uviewui.com/uview/swiper/swiper3.png', 'https://cdn.uviewui.com/uview/swiper/swiper2.png', 'https://cdn.uviewui.com/uview/swiper/swiper1.png'], |
| | | // 撤回模态框 |
| | | withDrawShow: false, |
| | | withDrawData: { |
| | | reason: '', |
| | | id: '', // 撤回申请ID |
| | | procInstId: '' |
| | | }, |
| | | withDrawContent: '', |
| | | withDrawId: 0, // 撤回申请ID |
| | | // 重新申请 |
| | | form: { |
| | | sendMessage: true, |
| | | sendSms: true, |
| | | sendEmail: true, |
| | | procDefId: '', |
| | | assignees: [], |
| | | priority: '0' |
| | | }, |
| | | assigneeList: [], |
| | | showAssign: false, |
| | | isGateway: false, |
| | | isCustom: false, |
| | | // 通过模态框 |
| | | adoptModalShow: false, |
| | | adoptModalContent: '', |
| | | // 通过请求 |
| | | adoptForm: { |
| | | ids: '', |
| | | comment: '' |
| | | }, |
| | | // 驳回模态框 |
| | | rejectModalShow: false, |
| | | rejectModalContent: '', |
| | | dataSeletText: '请选择状态', |
| | | // dataSeletText: '请选择状态', |
| | | // 驳回请求 |
| | | rejectForm: { |
| | | procInstIds: '', |
| | | comment: '' |
| | | }, |
| | | modalType: 0, |
| | | // 删除申请模态框 |
| | | deleteApplicationModalShow: false, |
| | | procInstId:'', |
| | | // 选择器 |
| | | statusSeletShow: false, |
| | | statusList: [['中国', '美国', '日本']], |
| | |
| | | methods: { |
| | | getUserInfo() { |
| | | this.$reqGet('getUserInfo').then(res => { |
| | | if(res.code == 0) { |
| | | uni.setStorageSync('userInfo',res.data.sysUser) |
| | | if (res.code == 0) { |
| | | uni.setStorageSync('userInfo', res.data.sysUser); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | init() { |
| | | this.getUserInfo() |
| | | this.getUserInfo(); |
| | | this.getProcessDataList(); // 申请列表 |
| | | this.todoList(); // 我的待办 |
| | | this.doneList(); // 我的已办 |
| | |
| | | }); |
| | | }, |
| | | doneList() { |
| | | uni.showLoading({ |
| | | title:'加载中...' |
| | | }) |
| | | this.$reqGet('doneList', this.haveTodoParams).then(res => { |
| | | uni.hideLoading(); |
| | | if (res.code === 0) { |
| | | // console.log('已办', res); |
| | | this.yibanData = res.data.content; |
| | |
| | | // 撤回模态框 |
| | | withDrawClick(id) { |
| | | this.withDrawShow = true; |
| | | this.withDrawId = id; |
| | | this.withDrawData.id = id; |
| | | }, |
| | | withDrawConfirm() { |
| | | console.log(this.withDrawId); |
| | | if (this.withDrawContent.length >= 2) { |
| | | console.log(this.withDrawContent); |
| | | this.shenqingData.forEach(i => { |
| | | if (i.id == this.withDrawData.id) { |
| | | this.withDrawData.procInstId = i.procInstId; |
| | | } |
| | | }); |
| | | if (this.withDrawData.reason.length >= 2) { |
| | | this.$reqPost('withDraw', this.withDrawData, 'form').then(res => { |
| | | this.withDrawShow = false; |
| | | if (res.code == 0) { |
| | | uni.showToast({ |
| | | title: res.data, |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | this.getProcessDataList(); |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '请规范输入', |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // 通过 |
| | | adopClick(v) { |
| | | console.log('通过点击', v); |
| | | this.adoptModalShow = true; |
| | | this.adoptForm.ids = v.id; |
| | | this.modalType = 0; |
| | | // let urlparam = v.procDefId+'/'+v.key; |
| | | // this.$reqGet('getNextNode',{},urlparam).then(res=>{ |
| | | // console.log('通过欲请求'); |
| | | // }) |
| | | }, |
| | | // 通过模态框 |
| | | adoptModalConfirm() { |
| | | this.adoptModalShow = false; |
| | | this.adoptForm.comment = this.adoptModalContent; |
| | | |
| | | this.$reqPost('passAll', this.adoptForm, 'form').then(res => { |
| | | if (res.code == 0) { |
| | | this.$u.toast('操作成功!'); |
| | | } else { |
| | | this.$u.toast('添加失败!!'); |
| | | } |
| | | }); |
| | | }, |
| | | adoptModalCancel() { |
| | | this.adoptModalShow = false; |
| | | }, |
| | | // 驳回 |
| | | rejectClick(v) { |
| | | this.modalType = 1; |
| | | this.rejectModalShow = true; |
| | | this.rejectForm.procInstIds = v.procInstId; |
| | | }, |
| | | // 驳回模态框 |
| | | rejectModalConfirm() { |
| | | this.rejectModalShow = false; |
| | | |
| | | this.$reqPost('backAll', this.rejectForm, 'form').then(res => { |
| | | if (res.code == 0) { |
| | | this.$u.toast('操作成功!'); |
| | | } else { |
| | | this.$u.toast('操作失败!!!'); |
| | | } |
| | | this.todoList(); // 我的待办 |
| | | }); |
| | | }, |
| | | rejectModalCancel() { |
| | | this.rejectModalShow = false; |
| | |
| | | // 删除申请模态框 |
| | | deleteApplicationModalConfirm() { |
| | | this.deleteApplicationModalShow = false; |
| | | this.$reqPost('deleteHistoric',{ids:this.procInstId},'form').then(res=>{ |
| | | if(res.code == 0){ |
| | | this.$u.toast('操作成功!') |
| | | this.yibanData = []; |
| | | this.doneList(); // 我的已办 |
| | | } else { |
| | | this.$u.toast('操作失败!!!') |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | deleteApplicationModalCancel() { |
| | | this.deleteApplicationModalShow = false; |
| | | }, |
| | | // 查看进度 |
| | | checkTheScheduleClick() { |
| | | checkTheScheduleClick(v) { |
| | | uni.navigateTo({ |
| | | url: '/pages/check-the-schedule/check-the-schedule' |
| | | url: `/pages/check-the-schedule/check-the-schedule?index=${v}` |
| | | }); |
| | | }, |
| | | // 表单数据 |
| | | theFormDataClick() { |
| | | theFormDataClick(v) { |
| | | uni.navigateTo({ |
| | | url: '/pages/the-form-data/the-form-data' |
| | | url: `/pages/the-form-data/the-form-data?index=${v}` |
| | | }); |
| | | }, |
| | | // 重新申请 |
| | | apply(v){ |
| | | if (!v.procDefId || v.procDefId == 'null') { |
| | | this.$u.toast('流程定义为空'); |
| | | return; |
| | | } |
| | | this.form.id = v.id; |
| | | this.form.procDefId = v.procDefId; |
| | | this.form.title = v.title; |
| | | // 加载审批人 |
| | | // this.userLoading = true; |
| | | uni.showLoading({ |
| | | title: '审批人加载中' |
| | | }); |
| | | // getFirstNode(v.procDefId).then((res) => { |
| | | this.$reqGet('getFirstNode', {}, v.procDefId).then(res => { |
| | | // this.userLoading = false; |
| | | console.log('审批人', res); |
| | | uni.hideLoading(); |
| | | if (res.data) { |
| | | this.error = ''; |
| | | if (res.data.type == 3 || res.data.type == 4) { |
| | | this.isGateway = true; |
| | | this.form.firstGateway = true; |
| | | this.showAssign = false; |
| | | this.isCustom = false; |
| | | return; |
| | | } |
| | | if (res.data.type == 5) { |
| | | this.isCustom = true; |
| | | this.isGateway = false; |
| | | this.form.firstGateway = false; |
| | | this.showAssign = false; |
| | | return; |
| | | } |
| | | if (res.data.type == 1) { |
| | | this.showAssign = true; |
| | | this.isGateway = false; |
| | | this.form.firstGateway = false; |
| | | this.isCustom = false; |
| | | if (res.data.users && res.data.users.length > 0) { |
| | | this.assigneeList = res.data.users; |
| | | // 默认勾选 |
| | | let ids = []; |
| | | res.data.users.forEach(e => { |
| | | ids.push(e.userId); |
| | | }); |
| | | this.form.assignees = ids; |
| | | this.showAssign = true; |
| | | // 获取表单内容,重新创建申请 |
| | | this.$reqPost('apply',this.form,'form').then(res=>{ |
| | | console.log('重新提交申请',res); |
| | | if(res.code == 0){ |
| | | uni.showToast({ |
| | | title:res.data, |
| | | icon:'success', |
| | | duration:2000 |
| | | }); |
| | | } |
| | | // 初始化申请列表 |
| | | // this.myApplication.pageNumber = 1; |
| | | // this.shenqingData = []; |
| | | // this.getMoreNews(); |
| | | this.getProcessDataList(); |
| | | }) |
| | | } else { |
| | | this.form.assignees = []; |
| | | this.showAssign = true; |
| | | this.error = '请进入"流程管理"为审批节点分配候选审批人员'; |
| | | } |
| | | } |
| | | } |
| | | console.log(this.form); |
| | | }); |
| | | |
| | | this.modalVisible = true; |
| | | }, |
| | | // 修改 |
| | | editMyApplication(v){ |
| | | console.log('修改申请'); |
| | | uni.navigateTo({ |
| | | url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}` |
| | | }); |
| | | }, |
| | | // 审批历史 |
| | | approvalHistoryClick() { |
| | | approvalHistoryClick(v) { |
| | | uni.navigateTo({ |
| | | url: '/pages/approval-history/approval-history' |
| | | url: `/pages/approval-history/approval-history?index=${v}` |
| | | }); |
| | | }, |
| | | // 删除申请 |
| | | deleteApplicationClick(id) { |
| | | this.deleteApplicationModalShow = true; |
| | | this.procInstId = id; |
| | | console.log(id); |
| | | } |
| | | } |
| | |
| | | ::v-deep.home { |
| | | height: 100%; |
| | | width: 100%; |
| | | padding-bottom: vww(24); |
| | | .home_swipe { |
| | | width: 100%; |
| | | height: vww(160); |
| | |
| | | justify-content: center; |
| | | align-content: center; |
| | | margin-right: vww(10); |
| | | &:nth-last-child() { |
| | | margin-right: 0; |
| | | } |
| | | view { |
| | | display: inline-block; |
| | | } |
| | |
| | | // width:100%; |
| | | // height:vww(244); |
| | | .slot-content { |
| | | .rejectMesaage { |
| | | display: flex; |
| | | padding: vww(3); |
| | | border: 1px solid #0307ff; |
| | | border-radius: vww(4); |
| | | font-size: 13px; |
| | | text { |
| | | margin-left: vww(5); |
| | | } |
| | | } |
| | | .u-textarea { |
| | | margin-top: vww(10); |
| | | width: vww(280); |
| | | height: vww(90) !important; |
| | | .uni-textarea-wrapper { |
| | |
| | | .rejectModal { |
| | | .slot-content { |
| | | display: inline-block; |
| | | .rejectMesaage { |
| | | display: flex; |
| | | padding: vww(3); |
| | | border: 1px solid #0307ff; |
| | | border-radius: vww(4); |
| | | font-size: 13px; |
| | | text { |
| | | margin-left: vww(5); |
| | | } |
| | | } |
| | | .u-textarea { |
| | | margin-top: vww(10); |
| | | width: vww(280); |
| | | height: vww(90) !important; |
| | | .uni-textarea-wrapper { |