From 910f2ef56d0d49a4ce24b2f33860dce4d739b1b4 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期三, 03 八月 2022 16:58:06 +0800 Subject: [PATCH] 项目整体细节,新增主页煤仓剩余量图表。 --- pages/my-application/my-application.vue | 1494 ++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 803 insertions(+), 691 deletions(-) diff --git a/pages/my-application/my-application.vue b/pages/my-application/my-application.vue index dc26f9b..c11508e 100644 --- a/pages/my-application/my-application.vue +++ b/pages/my-application/my-application.vue @@ -1,721 +1,833 @@ <template> - <!-- 鎴戠殑鐢宠 --> - <view class="my-application" > - <!-- 鎼滅储鍖哄煙 --> - <view class="searchBox"> - <view class="topRow"> - <view class="search"> - <u-search - @clickIcon="searchIconClick" - :clearabled="true" - :showAction="false" - placeholder="璇疯緭鍏ユ爣棰�" - v-model="myApplication.title" - shape="square" - searchIconColor="#cccccc" - ></u-search> - </view> + <!-- 鎴戠殑鐢宠 --> + <view class="my-application"> + <!-- 鎼滅储鍖哄煙 --> + <view class="searchBox"> + <u-collapse :border="true" + @change="searchChange" + @close="searchClose" + @open="searchOpen" + > + <u-collapse-item :border="false" + title="鎼滅储妗�" + name="Docs guide" + > + <view class="topRow"> + <view class="search"> + <u-search + @clickIcon="searchIconClick" + :clearabled="true" + :showAction="false" + placeholder="璇疯緭鍏ユ爣棰�" + v-model="myApplication.title" + shape="square" + searchIconColor="#cccccc" + ></u-search> + </view> - <data-select-box ref="dataSelectBox" class="data-select-box" placeholder="璇烽�夋嫨鏉′欢" v-model="selectText" :clearabled="true" @click="dataSelectClick"></data-select-box> - </view> - <!-- 鏃堕棿閫夋嫨鍣� --> - <view class="example-body"><uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick" /></view> - <view class="searchBtn"><u-button type="primary" text="鎼滅储" @click="searchClick"></u-button> <u-button type="primary" :plain="true" text="娓呯┖" @click="emptyButtonClick"></u-button></view> - </view> + <data-select-box ref="dataSelectBox" class="data-select-box" placeholder="璇烽�夋嫨鏉′欢" v-model="selectText" + :clearabled="true" @click="dataSelectClick"></data-select-box> + </view> + <!-- 鏃堕棿閫夋嫨鍣� --> + <view class="example-body"> + <uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick"/> + </view> + <view class="searchBtn"> + <u-button type="primary" text="鎼滅储" @click="searchClick"></u-button> + <u-button type="primary" :plain="true" text="娓呯┖" @click="emptyButtonClick"></u-button> + </view> + </u-collapse-item> + </u-collapse> + </view> - <!-- 閫夋嫨鍣� --> - <u-picker @cancel="dataSelectCancel" @confirm="selectConfirm" :show="selectPickerShow" :columns="selectList"></u-picker> - <!-- 鎴戠殑鐢宠鍗$墖鍖哄煙 --> - <!-- <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:150px"> --> - <combination-card v-for="(item, index) in shenqingData" index="index"> - <template v-slot:top> - <!-- <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> --> - <view> - <text>{{ item.title }}</text> - </view> - </template> - <template v-slot:center> - <view class="center-container"> - <view class="center-content__one center-margin"> - <view class=""> - <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text> - </view> - <view class=""> - <text>瀹℃壒鐜妭锛歿{ item.currTaskName }}</text> - </view> - </view> - <view class="center-content__two center-margin"> - <view class=""> - 鐘舵�侊細 - <text :style="{ color: statusColor[item.status] }">{{ status[item.status] }}</text> - </view> - <view class=""> - 缁撴灉锛� - <text :style="{ color: resultColor[item.result] }">{{ result[item.result] }}</text> - </view> - </view> - <view class="center-content__three center-margin"> - <text>鍒涘缓鏃堕棿锛歿{ item.createTime }}</text> - </view> - <view class="center-content__four"> - <text>鎻愪氦鐢宠鏃堕棿锛歿{ item.applyTime }}</text> - </view> - </view> - </template> - <template v-slot:bottom> - <view class="bottom-container"> - <!-- 鎸夐挳鍖哄煙 --> - <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(item.procInstId)" v-if="item.status == 1"> - <image src="@/static/home/jindu.png" mode=""></image> - <view>鏌ョ湅杩涘害</view> - </view> - <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" @click="apply(item)"> - <image src="@/static/home/history.png" mode=""></image> - <view>閲嶆柊鐢宠</view> - </view> - <view v-if="item.status == 3" @click="editMyApplication(item)"> - <image src="@/static/home/history.png" mode=""></image> - <view>缂栬緫</view> - </view> - <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> - </template> - </combination-card> - <!-- </u-checkbox-group> --> + <!-- 閫夋嫨鍣� --> + <u-picker @cancel="dataSelectCancel" @confirm="selectConfirm" :show="selectPickerShow" + :columns="selectList"></u-picker> - <!-- 鎾ゅ洖妯℃�佹 --> - <view class="wodeshenqingMotai"> - <u-modal width="684rpx" :show="withDrawShow" title="鎾ゅ洖鍘熷洜" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel"> - <view class="slot-content"><u--textarea v-model="withDrawData.reason" placeholder="璇疯緭鍏ユ挙鍥炲師鍥�"></u--textarea></view> - </u-modal> - </view> + <!-- 鎴戠殑鐢宠鍗$墖鍖哄煙 --> + <!-- <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:150px"> --> + <combination-card v-for="(item, index) in shenqingData" index="index"> + <template v-slot:top> + <!-- <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> --> + <view> + <text>{{ item.title }}</text> + </view> + </template> + <template v-slot:center> + <view class="center-container"> + <view class="center-content__one center-margin"> + <view class=""> + <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text> + </view> + <view class=""> + <text>瀹℃壒鐜妭锛歿{ item.currTaskName == null ? '' : item.currTaskName }}</text> + </view> + </view> + <view class="center-content__two center-margin"> + <view class=""> + 鐘舵�侊細 + <text :style="{ color: statusColor[item.status] }">{{ status[item.status] }}</text> + </view> + <view class=""> + 缁撴灉锛� + <text :style="{ color: resultColor[item.result] }">{{ result[item.result] }}</text> + </view> + </view> + <view class="center-content__three center-margin"> + <text>鍒涘缓鏃堕棿锛歿{ item.createTime }}</text> + </view> + <view class="center-content__four"> + <text>鎻愪氦鐢宠鏃堕棿锛歿{ item.applyTime }}</text> + </view> + </view> + </template> + <template v-slot:bottom> + <view class="bottom-container"> + <!-- 鎸夐挳鍖哄煙 --> + <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(item.procInstId)" v-if="item.status == 1"> + <image src="@/static/home/jindu.png" mode=""></image> + <view>鏌ョ湅杩涘害</view> + </view> + <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" @click="apply(item)"> + <image src="@/static/home/history.png" mode=""></image> + <view>閲嶆柊鐢宠</view> + </view> + <view v-if="item.status == 3" @click="editMyApplication(item)"> + <image src="@/static/home/history.png" mode=""></image> + <view>缂栬緫</view> + </view> + <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> + </template> + </combination-card> + <!-- </u-checkbox-group> --> - <!-- 鎵归噺鍒犻櫎妯℃�佹 --> - <view class="batchDeleteModal"> - <u-modal - :show="batchDeleteModalShow" - title="鎻愮ず" - content="纭畾鍒犻櫎鐢宠锛�" - :showCancelButton="true" - @confirm="batchDeleteModalConfirm" - @cancel="batchDeleteModalCancel" - ></u-modal> - </view> - - <view class="" style="height:50px;"> - - </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="withDrawData.reason" placeholder="璇疯緭鍏ユ挙鍥炲師鍥�"></u--textarea> + </view> + </u-modal> + </view> - <!-- 搴曢儴鍏ㄩ�� --> - <view class="bottomTabbar"> - <view class="bottomTabbar_checkBox"> - <!-- <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> - <u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox> - </u-checkbox-group> --> - </view> - <view class="bottomTabbar_button"> - <!-- <u-button :plain="true" type="primary" text="鎵归噺鍒犻櫎" @click="batchDeleteClick"></u-button> --> - <u-button type="primary" text="鏂板鐢宠" @click="newApplicationClick"></u-button> - </view> - </view> + <!-- 鎵归噺鍒犻櫎妯℃�佹 --> + <view class="batchDeleteModal"> + <u-modal + :show="batchDeleteModalShow" + title="鎻愮ず" + content="纭畾鍒犻櫎鐢宠锛�" + :showCancelButton="true" + @confirm="batchDeleteModalConfirm" + @cancel="batchDeleteModalCancel" + ></u-modal> + </view> - <!-- 鑿滃崟鏍� --> - <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> - </view> + <!--杩斿洖椤堕儴--> + <view class="back-top-container"> + <u-back-top :scroll-top="scrollTop" style="position:fixed;bottom:100px;right:100px;"></u-back-top> + </view> + + <view class="" style="height:50px;"> + + </view> + + <!-- 搴曢儴鍏ㄩ�� --> + <view class="bottomTabbar"> + <view class="bottomTabbar_checkBox"> + <!-- <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> + <u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox> + </u-checkbox-group> --> + </view> + <view class="bottomTabbar_button"> + <!-- <u-button :plain="true" type="primary" text="鎵归噺鍒犻櫎" @click="batchDeleteClick"></u-button> --> + <u-button type="primary" text="鏂板鐢宠" @click="newApplicationClick"></u-button> + </view> + </view> + + + + <!-- 鑿滃崟鏍� --> + <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> + </view> </template> <script> import popupMenu from '@/components/common/popup-menu/popup-menu.vue'; import combinationCard from '@/components/common/combination-card/combination-card.vue'; import dataSelectBox from '@/components/common/data-select-box/data-select-box.vue'; + export default { - name: 'MyApplication', - data() { - return { - status: ['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], - statusColor: ['#dd8b8c', '#FF9900', '#007AFF', '#06BE00'], - result: ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖'], - resultColor: ['#dd8b8c', '#FF9900', '#06BE00', '#be2b2d'], - // 鎼滅储鍖哄煙 - selectText: '', - // 閫夋嫨鍣� - selectPickerShow: false, - selectList: [['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖']], - activeColor: '#cccccc', - isActive: false, - // 鏃堕棿閫夋嫨鍣� - range: [], - // 鎾ゅ洖妯℃�佹 - withDrawShow: false, - withDrawData: { - reason: '', - id: '', // 鎾ゅ洖鐢宠ID - procInstId: '' - }, - // 閲嶆柊鐢宠 - form: { - sendMessage: true, - sendSms: true, - sendEmail: true, - procDefId: '', - assignees: [], - priority: '0' - }, - assigneeList: [], - showAssign: false, - isGateway: false, - isCustom: false, - // 鎵归噺鍒犻櫎鐢宠 - batchDeleteModalShow: false, - // 澶嶉�夋 - checkBoxValue: [], - totalSelectValue: [], - menuShow: false, - shenqingData: [], // 瀹瑰櫒 - // 璇锋眰鍙傛暟 - myApplication: { - title: '', - status: '', - result: '', - pageNumber: 1, - pageSize: 10, - startTime: '', - endTime: '', - sort: 'createTime', - order: 'desc' - }, - // 涓婃媺鍔犺浇鏇村 - timer: {}, - load: 0, - loadingText: '鍔犺浇涓�...', - loadingType: 0, - contentText: { - contentDown: '涓婃媺鏄剧ず鏇村', - contentRefresh: '姝e湪鍔犺浇...', - contentNomore: '娌℃湁鏇村鏁版嵁浜�' - } - }; - }, - onShow() { - if (this.menuShow == true) { - this.$refs.menuRef.menuClick(); - } - this.myApplication.pageNumber = 1; - this.init(); - }, - // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 - onNavigationBarButtonTap(e) { - // console.log(e); - this.$refs.menuRef.menuClick(); - }, - watch: { - // 鏃堕棿缁戝畾鏃ユ湡 - range(nVal) { - console.log('鑼冨洿閫�:', this.range); - this.myApplication.startTime = this.range[0]; - this.myApplication.endTime = this.range[1]; - }, - // 鐩戝惉杈撳叆妗嗙殑鍐呭 - selectText(nVal) { - if (nVal == '') { - this.myApplication.status = ''; - this.myApplication.result = ''; - } - } - }, - components: { - combinationCard, - popupMenu, - dataSelectBox - }, - // 涓婃媺鍔犺浇鏇村 - onReachBottom() { - if (this.timer != null) { - clearTimeout(this.timer); - } - this.timer = setTimeout(() => { - this.getMoreNews(); - }, 1000); - }, - // 涓嬫媺鍔犺浇 - onPullDownRefresh() { - console.log('refresh'); - this.myApplication.pageNumber = 1; - this.loadingType = 0; - this.shenqingData = []; - setTimeout(()=> { - uni.stopPullDownRefresh(); - }, 1000); - this.init(); - }, - methods: { - init() { - this.getMoreNews(); - }, - // getProcessDataList() { - // this.$reqGet('getProcessDataList', this.myApplication).then(res => { - // if (res.code === 0) { - // console.log('鐢宠', res); - // this.shenqingData = res.data.records; - // } - // }); - // }, - getMoreNews() { - if (this.loadingType !== 0) { - //loadingType!=0;鐩存帴杩斿洖 - return false; - } - this.loadingType = 1; - uni.showNavigationBarLoading(); //鏄剧ず鍔犺浇鍔ㄧ敾 - this.$reqGet('getProcessDataList', this.myApplication).then(response => { - console.log('response', response); - this.myApplication.pageNumber++; // 寰楀埌鏁版嵁涔嬪悗 page+1 - if (response.data.records.length < 1) { - // 娌℃湁鏁版嵁 - this.loadingType = 2; - uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 - uni.showToast({ - title: '娌℃湁鏇村鏁版嵁浜嗭紒', - icon: 'error' - }); - return; - } - // this.myApplication.pageNumber++; // 姣忚Е搴曚竴娆� page +1 - if(this.myApplication.title||this.myApplication.status||this.myApplication.result||this.myApplication.startTime||this.myApplication.endTime){ - this.shenqingData = response.data.records - } else{ - this.shenqingData = this.shenqingData.concat(response.data.records); - } - //灏嗘暟鎹嫾鎺ュ湪涓�璧� - this.loadingType = 0; // 灏唋oadingType褰�0閲嶇疆 - uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 - }); - }, - // 鏉′欢閫夋嫨鍣� - selectConfirm(v) { - this.selectText = v.value.toString(); - this.myApplication.status = v.indexs[0]; - this.myApplication.result = v.indexs[1]; - this.selectPickerShow = false; - }, - dataSelectCancel() { - this.selectPickerShow = false; - this.$refs.dataSelectBox.isActive = false; - }, - dataSelectClick() { - this.selectPickerShow = true; - }, - // 鑿滃崟 - menushow(e) { - this.menuShow = e; - }, - // 鏃堕棿閫夋嫨鍣� - maskClick(e) { - console.log('maskClick浜嬩欢:', e); - }, - searchClick() { - console.log('this.myApplication', this.myApplication); - this.myApplication.pageNumber = 1; - this.loadingType = 0; - this.getMoreNews(); - }, - emptyButtonClick(){ - this.myApplication.title = ''; - this.selectText = ''; - this.range = []; - this.init(); - }, - // 鎾ゅ洖妯℃�佹 - withDrawClick(id) { - this.withDrawShow = true; - this.withDrawData.id = id; - }, - withDrawConfirm() { - this.shenqingData.forEach(i => { - if (i.id == this.withDrawData.id) { - this.withDrawData.procInstId = i.procInstId; - } - }); - this.$reqPost('withDraw', this.withDrawData, 'form').then(res => { - console.log('res', res); - if (res.code == 0) { - uni.showToast({ - title: res.data, - duration: 2000 - }); - } - this.withDrawShow = false; - // 鍒濆鍖栫敵璇峰垪琛� - this.myApplication.pageNumber = 1; - this.shenqingData = []; - this.getMoreNews(); - }); + name: 'MyApplication', + data() { + return { + scrollTop: 0, + status: ['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], + statusColor: ['#dd8b8c', '#FF9900', '#007AFF', '#06BE00'], + result: ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖'], + resultColor: ['#dd8b8c', '#FF9900', '#06BE00', '#be2b2d'], + // 鎼滅储鍖哄煙 + selectText: '', + // 閫夋嫨鍣� + selectPickerShow: false, + selectList: [['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖']], + activeColor: '#cccccc', + isActive: false, + // 鏃堕棿閫夋嫨鍣� + range: [], + // 鎾ゅ洖妯℃�佹 + withDrawShow: false, + withDrawData: { + reason: '', + id: '', // 鎾ゅ洖鐢宠ID + procInstId: '' + }, + // 閲嶆柊鐢宠 + form: { + sendMessage: true, + sendSms: true, + sendEmail: true, + procDefId: '', + assignees: [], + priority: '0' + }, + assigneeList: [], + showAssign: false, + isGateway: false, + isCustom: false, + // 鎵归噺鍒犻櫎鐢宠 + batchDeleteModalShow: false, + // 澶嶉�夋 + checkBoxValue: [], + totalSelectValue: [], + menuShow: false, + shenqingData: [], // 瀹瑰櫒 + // 璇锋眰鍙傛暟 + myApplication: { + title: '', + status: '', + result: '', + pageNumber: 1, + pageSize: 10, + startTime: '', + endTime: '', + sort: 'createTime', + order: 'desc' + }, + // 涓婃媺鍔犺浇鏇村 + timer: {}, + load: 0, + loadingText: '鍔犺浇涓�...', + loadingType: 0, + contentText: { + contentDown: '涓婃媺鏄剧ず鏇村', + contentRefresh: '姝e湪鍔犺浇...', + contentNomore: '娌℃湁鏇村鏁版嵁浜�' + } + }; + }, + // 杩斿洖椤堕儴 + onPageScroll(e) { + // console.log('椤甸潰婊戝姩', this.scrollTop); + this.scrollTop = e.scrollTop; + }, + onShow() { + if (this.menuShow == true) { + this.$refs.menuRef.menuClick(); + } + this.init(); + }, + // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 + onNavigationBarButtonTap(e) { + // console.log(e); + this.$refs.menuRef.menuClick(); + }, + watch: { + // 鏃堕棿缁戝畾鏃ユ湡 + range(nVal) { + console.log('鑼冨洿閫�:', this.range); + this.myApplication.startTime = this.range[0]; + this.myApplication.endTime = this.range[1]; + }, + // 鐩戝惉杈撳叆妗嗙殑鍐呭 + selectText(nVal) { + if (nVal == '') { + this.myApplication.status = ''; + this.myApplication.result = ''; + } + }, + scrollTop(nVal){ + if(nVal){ + // console.log('椤甸潰婊戝姩鍙樺寲'); + } + } + }, + components: { + combinationCard, + popupMenu, + dataSelectBox + }, + // 涓婃媺鍔犺浇鏇村 + onReachBottom() { + if (this.timer != null) { + clearTimeout(this.timer); + } + this.timer = setTimeout(() => { + this.getMoreNews(); + }, 1000); + }, + // 涓嬫媺鍔犺浇 + onPullDownRefresh() { + console.log('refresh'); - console.log(this.withDrawId); - if (this.withDrawData.reason.length >= 2) { - console.log(this.withDrawData.reason); - } else { - uni.showToast({ - title: '璇疯鑼冭緭鍏�', - duration: 2000 - }); - } - }, - withDrawCancel() { - this.withDrawShow = false; - }, - 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(); - }) - } 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}` - }); - }, - // 鎵归噺鍒犻櫎妯℃�佹 - batchDeleteClick() { - this.batchDeleteModalShow = true; - }, - batchDeleteModalConfirm() { - this.batchDeleteModalShow = false; - }, - batchDeleteModalCancel() { - this.batchDeleteModalShow = false; - }, - // 鎼滅储 - searchIconClick() { - console.log(1111, this.myApplication.title); - }, + setTimeout(() => { + uni.stopPullDownRefresh(); + }, 1000); + this.init(); + }, + methods: { + init() { + this.myApplication.pageNumber = 1; + this.loadingType = 0; + this.shenqingData = []; + this.getMoreNews(); + }, + // getProcessDataList() { + // this.$reqGet('getProcessDataList', this.myApplication).then(res => { + // if (res.code === 0) { + // console.log('鐢宠', res); + // this.shenqingData = res.data.records; + // } + // }); + // }, + getMoreNews() { + if (this.loadingType !== 0) { + //loadingType!=0;鐩存帴杩斿洖 + return false; + } + uni.showLoading({ + title: '鍔犺浇涓�...' + }) + this.loadingType = 1; + uni.showNavigationBarLoading(); //鏄剧ず鍔犺浇鍔ㄧ敾 + this.$reqGet('getProcessDataList', this.myApplication).then(response => { + uni.hideLoading(); + console.log('response', response); + this.myApplication.pageNumber++; // 寰楀埌鏁版嵁涔嬪悗 page+1 + if (response.data.records.length < 1) { + // 娌℃湁鏁版嵁 + this.loadingType = 2; + uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 + uni.showToast({ + title: '娌℃湁鏇村鏁版嵁浜嗭紒', + icon: 'error' + }); + return; + } + // this.myApplication.pageNumber++; // 姣忚Е搴曚竴娆� page +1 + if (this.myApplication.title || this.myApplication.status || this.myApplication.result || this.myApplication.startTime || this.myApplication.endTime) { + if(this.myApplication.pageNumber == 1){ + this.shenqingData = response.data.records; + }else{ + this.shenqingData = this.shenqingData.concat(response.data.records); + } + } else { + if(this.myApplication.pageNumber == 1){ + this.shenqingData = []; + } + this.shenqingData = this.shenqingData.concat(response.data.records); + } + //灏嗘暟鎹嫾鎺ュ湪涓�璧� + this.loadingType = 0; // 灏唋oadingType褰�0閲嶇疆 + uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 + }); + }, + // 鏉′欢閫夋嫨鍣� + selectConfirm(v) { + this.selectText = v.value.toString(); + this.myApplication.status = v.indexs[0]; + this.myApplication.result = v.indexs[1]; + this.selectPickerShow = false; + }, + dataSelectCancel() { + this.selectPickerShow = false; + this.$refs.dataSelectBox.isActive = false; + }, + dataSelectClick() { + this.selectPickerShow = true; + }, + // 鑿滃崟 + menushow(e) { + this.menuShow = e; + }, + // 鏃堕棿閫夋嫨鍣� + maskClick(e) { + console.log('maskClick浜嬩欢:', e); + }, + searchChange(e){ + console.log('e', e); + }, + searchClose(e){ + console.log('e', e); + }, + searchOpen(e){ + console.log('e', e); + }, + searchClick() { + console.log('this.myApplication', this.myApplication); + this.myApplication.pageNumber = 1; + this.loadingType = 0; + this.getMoreNews(); + }, + emptyButtonClick() { + this.loadingType == 0; + this.myApplication.pageNumber = 1; + this.myApplication.title = ''; + this.selectText = ''; + this.range = []; + this.init(); + }, + // 鎾ゅ洖妯℃�佹 + withDrawClick(id) { + this.withDrawShow = true; + this.withDrawData.id = id; + }, + withDrawConfirm() { + this.shenqingData.forEach(i => { + if (i.id == this.withDrawData.id) { + this.withDrawData.procInstId = i.procInstId; + } + }); + this.$reqPost('withDraw', this.withDrawData, 'form').then(res => { + console.log('res', res); + if (res.code == 0) { + uni.showToast({ + title: res.data, + duration: 2000 + }); + } + this.withDrawShow = false; + // 鍒濆鍖栫敵璇峰垪琛� + this.myApplication.pageNumber = 1; + this.shenqingData = []; + this.getMoreNews(); + }); - checkboxChange(n) { - console.log('change', n); - }, - totalSelectChange(n) { - if (n[0] == 'tatalSelect') { - this.shenqingData.forEach(item => { - this.totalSelectValue.push(item.id); - }); - this.checkBoxValue = this.totalSelectValue; - } else { - this.checkBoxValue = []; - } - console.log('totalChange', n); - }, - // 鏌ョ湅杩涘害 - checkTheScheduleClick(v) { - uni.navigateTo({ - url: `/pages/check-the-schedule/check-the-schedule?index=${v}` - }); - }, - // 琛ㄥ崟鏁版嵁 - theFormDataClick(v) { - uni.navigateTo({ - url: `/pages/the-form-data/the-form-data?index=${v}` - }); - }, - // 瀹℃壒鍘嗗彶 - approvalHistoryClick(v) { - uni.navigateTo({ - url: `/pages/approval-history/approval-history?index=${v}` - }); - }, - // 鏂板鐢宠 - newApplicationClick() { - uni.navigateTo({ - url: '/pages/new-application/new-application' - }); - } - } + console.log(this.withDrawId); + if (this.withDrawData.reason.length >= 2) { + console.log(this.withDrawData.reason); + } else { + uni.showToast({ + title: '璇疯鑼冭緭鍏�', + duration: 2000 + }); + } + }, + withDrawCancel() { + this.withDrawShow = false; + }, + 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(); + }) + } 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}` + }); + }, + // 鎵归噺鍒犻櫎妯℃�佹 + batchDeleteClick() { + this.batchDeleteModalShow = true; + }, + batchDeleteModalConfirm() { + this.batchDeleteModalShow = false; + }, + batchDeleteModalCancel() { + this.batchDeleteModalShow = false; + }, + // 鎼滅储 + searchIconClick() { + console.log(1111, this.myApplication.title); + }, + + checkboxChange(n) { + console.log('change', n); + }, + totalSelectChange(n) { + if (n[0] == 'tatalSelect') { + this.shenqingData.forEach(item => { + this.totalSelectValue.push(item.id); + }); + this.checkBoxValue = this.totalSelectValue; + } else { + this.checkBoxValue = []; + } + console.log('totalChange', n); + }, + // 鏌ョ湅杩涘害 + checkTheScheduleClick(v) { + uni.navigateTo({ + url: `/pages/check-the-schedule/check-the-schedule?index=${v}` + }); + }, + // 琛ㄥ崟鏁版嵁 + theFormDataClick(v) { + uni.navigateTo({ + url: `/pages/the-form-data/the-form-data?index=${v}` + }); + }, + // 瀹℃壒鍘嗗彶 + approvalHistoryClick(v) { + uni.navigateTo({ + url: `/pages/approval-history/approval-history?index=${v}` + }); + }, + // 鏂板鐢宠 + newApplicationClick() { + uni.navigateTo({ + url: '/pages/new-application/new-application' + }); + } + } }; </script> <style lang="scss" scoped> ::v-deep.my-application { - width: 100%; - height: 100%; - .searchBox { - width: 94%; - margin: vww(16) auto; - .topRow { - display: flex; - justify-content: space-between; - flex-wrap: nowrap; - .search { - // width: vww(160); - width: 48%; - .u-search { - border: 1px solid #d1d1d1; - border-radius: vww(4); - .u-search__content { - height: 38px; - background-color: #ffffff !important; - .u-search__content__icon { - width: 10px; - height: 5.5px; - .u-icon { - .u-icon__icon { - font-size: 20px !important; - } - } - } - .u-search__content__close { - width: 16px !important; - height: 16px !important; - background-color: #cccccc !important; - .u-icon { - .u-icon__icon { - font-size: 10px !important; - } - } - } - .u-search__content__input { - margin-left: vww(10); - background-color: #ffffff !important; - .uni-input-placeholder { - color: #cccccc !important; - } - .u-search__content__input--placeholder { - // color:#CCCCCC; - } - } - } - } - } - .data-select-box { - width: 48%; - } - // 涓嬫媺鑿滃崟 - // .data-selet { - // border: 1px solid #d1d1d1; - // border-radius: 4px; - // // width: vww(160); - // width:48%; - // height: 40px; - // display: flex; - // align-items: center; - // font-size: 13px; - // color: #cccccc; - // .uni-select__icon { - // display: flex; - // align-content: center; - // margin: 0 10px; - // image { - // width: 10px; - // height: 5.5px; - // } - // } - // .content { - // margin-left: vww(8); - // width: vww(150); - // } - // } - } + width: 100%; + height: 100%; - // 鏃堕棿閫夋嫨鍣� - .example-body { - margin-top: vww(16); - width: 100%; - } + .searchBox { + width: 94%; + margin: vww(16) auto; - // 鎼滅储鎸夐挳 - .searchBtn { - width: 100%; - display: flex; - align-items: center; - .u-button { - width: vww(90); - height: vww(32); - margin: vww(16) auto 0; - } - } - } + .u-collapse{ + .u-collapse-item{ + .u-collapse-item__content{ + .topRow { + display: flex; + justify-content: space-between; + flex-wrap: nowrap; - // 鍗$墖涓棿 - .center-container { - display: flex; - flex-direction: column; - .center-content__one { - display: flex; - view { - width: 50%; - } - } - .center-content__two { - display: flex; - // margin: vww(10) 0; - view { - width: 50%; - } - } - .center-content__three { - display: flex; - view { - width: 50%; - } - } - .center-content__four { - } - } - // 涓棿閮ㄥ垎鏍峰紡 - .center-margin { - margin-bottom: vww(16); - } + .search { + // width: vww(160); + width: 48%; - // 鍗$墖搴曢儴 - .bottom-container { - .bottom-content__item { - display: flex; - justify-content: space-around; - view { - display: flex; - justify-content: center; - align-content: center; - margin-right: vww(10); - &:nth-last-child() { - margin-right: 0; - } - view { - display: inline-block; - } - image { - width: vww(16); - height: vww(16); - margin-right: vww(4); - } - } - } - } + .u-search { + border: 1px solid #d1d1d1; + border-radius: vww(4); - // 妯℃�佹 - .wodeshenqingMotai { - // width:100%; - // height:vww(244); - .slot-content { - .u-textarea { - width: vww(280); - height: vww(90) !important; - .uni-textarea-wrapper { - height: vww(90) !important; - } - } - } - } + .u-search__content { + height: vww(38); + background-color: #ffffff !important; - // 搴曢儴 - .bottomTabbar { - position: fixed; - bottom: 0; - width: 100%; - height: vww(48); - display: flex; - align-items: center; - justify-content: space-between; - background-color: #f5f5f5; - .bottomTabbar_checkBox { - margin-left: vww(16); - .u-checkbox-group { - .u-checkbox { - } - } - } - .bottomTabbar_button { - display: flex; - .u-button { - font-size: 13px; - margin-right: vww(14); - width: vww(90); - height: vww(32); - } - } - } + .u-search__content__icon { + width: 10px; + height: 5.5px; + + .u-icon { + .u-icon__icon { + font-size: 20px !important; + } + } + } + + .u-search__content__close { + width: 16px !important; + height: 16px !important; + background-color: #cccccc !important; + + .u-icon { + .u-icon__icon { + font-size: 10px !important; + } + } + } + + .u-search__content__input { + margin-left: vww(10); + background-color: #ffffff !important; + + .uni-input-placeholder { + color: #cccccc !important; + } + + .u-search__content__input--placeholder { + // color:#CCCCCC; + } + } + } + } + } + + .data-select-box { + width: 48%; + } + + // 涓嬫媺鑿滃崟 + // .data-selet { + // border: 1px solid #d1d1d1; + // border-radius: 4px; + // // width: vww(160); + // width:48%; + // height: 40px; + // display: flex; + // align-items: center; + // font-size: 13px; + // color: #cccccc; + // .uni-select__icon { + // display: flex; + // align-content: center; + // margin: 0 10px; + // image { + // width: 10px; + // height: 5.5px; + // } + // } + // .content { + // margin-left: vww(8); + // width: vww(150); + // } + // } + } + + // 鏃堕棿閫夋嫨鍣� + .example-body { + margin-top: vww(16); + width: 100%; + } + + // 鎼滅储鎸夐挳 + .searchBtn { + width: 100%; + display: flex; + align-items: center; + + .u-button { + width: vww(90); + height: vww(32); + margin: vww(16) auto 0; + } + } + } + } + } + + + } + + // 鍗$墖涓棿 + .center-container { + display: flex; + flex-direction: column; + + .center-content__one { + display: flex; + + view { + width: 50%; + } + } + + .center-content__two { + display: flex; + // margin: vww(10) 0; + view { + width: 50%; + } + } + + .center-content__three { + display: flex; + + view { + width: 50%; + } + } + + .center-content__four { + } + } + + // 涓棿閮ㄥ垎鏍峰紡 + .center-margin { + margin-bottom: vww(16); + } + + // 鍗$墖搴曢儴 + .bottom-container { + .bottom-content__item { + display: flex; + justify-content: space-around; + + view { + display: flex; + justify-content: center; + align-content: center; + margin-right: vww(10); + + &:nth-last-child(1) { + margin-right: 0; + } + + view { + display: inline-block; + } + + image { + width: vww(16); + height: vww(16); + margin-right: vww(4); + } + } + } + } + + // 妯℃�佹 + .wodeshenqingMotai { + // width:100%; + // height:vww(244); + .slot-content { + .u-textarea { + width: vww(280); + height: vww(90) !important; + + .uni-textarea-wrapper { + height: vww(90) !important; + } + } + } + } + + // 杩斿洖椤堕儴 + .back-top-container{ + .u-transition{ + position:fixed; + bottom:vww(80)!important; + right:vww(20)!important; + } + } + + + // 搴曢儴 + .bottomTabbar { + position: fixed; + bottom: 0; + width: 100%; + height: vww(48); + display: flex; + align-items: center; + justify-content: space-between; + background-color: #f5f5f5; + + .bottomTabbar_checkBox { + margin-left: vww(16); + + .u-checkbox-group { + .u-checkbox { + } + } + } + + .bottomTabbar_button { + display: flex; + + .u-button { + font-size: 13px; + margin-right: vww(14); + width: vww(90); + height: vww(32); + } + } + } } </style> -- Gitblit v1.9.1