todoList.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. <template>
  2. <view class="content">
  3. <view class="top-fixed">
  4. <!-- 事项列表 -->
  5. <view class="filter">
  6. <view :class="isShow==false?'time-box':'time-box active'" @tap="openCalendar()">
  7. <view class="title">选择日期</view>
  8. <image :src="isShow==false?'/static/images/company/time_arrow_icon.png':'/static/images/company/time_arrow_blue_icon.png'" class="w24 h24"></image>
  9. </view>
  10. <view class="list-box">
  11. <image src="/static/images/company/list_matters_icon.png" class="w32 h32"></image>
  12. <view class="title">事项列表</view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="top-fixed2">
  17. <!-- tab切换 -->
  18. <view class="pub-tab-box">
  19. <view class="tab-inner">
  20. <view v-for="(item,index) in taskType" :key="index"
  21. :class="item.val == showType?'item active':'item'" @click="orderStatusChange(item)">
  22. <view class="text">
  23. {{ item.name }}
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <u-popup :show="isShow" mode="top" :round="12" customStyle="top: 110rpx;">
  30. <view class="calendar-box">
  31. <pushangyuqi-calendar @onDayClick="onDayClick"></pushangyuqi-calendar>
  32. </view>
  33. </u-popup>
  34. <mescroll-body top="200upx" ref="mescrollRef">
  35. <view class="sms-list">
  36. <view v-for="(item,index) in dataList" :key="index" class="item">
  37. <view class="justify-between align-center">
  38. <view class="title">{{item.content}}</view>
  39. <view class="state" :style="{'color':item.status==0?'#FF5030':'#2CAE5C'}">
  40. {{item.status==0?"未完成":"已完成"}}</view>
  41. </view>
  42. <view class="personnel">
  43. {{item.personnel}}
  44. </view>
  45. </view>
  46. </view>
  47. </mescroll-body>
  48. </view>
  49. </template>
  50. <script>
  51. import pushangyuqiCalendar from '../components/pushangyuqi-calendar/pushangyuqi-calendar.vue'
  52. import {
  53. getMyDoctorOrderList,
  54. cancelOrder
  55. } from '@/api/doctorOrder.js'
  56. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  57. export default {
  58. mixins: [MescrollMixin],
  59. components:{
  60. pushangyuqiCalendar
  61. },
  62. data() {
  63. return {
  64. taskType: [{
  65. name: "全部",
  66. val: 0
  67. },
  68. {
  69. name: "固定任务",
  70. val: 1
  71. },
  72. {
  73. name: "工作计划",
  74. val: 2
  75. },
  76. ],
  77. isShow:false,
  78. showType: 0,
  79. mescroll: null,
  80. // 上拉加载的配置
  81. upOption: {
  82. onScroll: true,
  83. use: true, // 是否启用上拉加载; 默认true
  84. page: {
  85. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  86. size: 10 // 每页数据的数量,默认10
  87. },
  88. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  89. empty: {
  90. icon: '/static/images/no_data.png',
  91. tip: '暂无数据'
  92. }
  93. },
  94. dataList: [{
  95. orderId: 1,
  96. content: '发送20条营销短信',
  97. status: 0,
  98. personnel: '管理员张三分配'
  99. },
  100. {
  101. orderId: 2,
  102. content: '发送20条营销短信',
  103. status: 1,
  104. personnel: '管理员张三分配'
  105. },
  106. {
  107. orderId: 3,
  108. content: '发送20条营销短信',
  109. status: 0,
  110. personnel: '管理员张三分配'
  111. }
  112. ]
  113. }
  114. },
  115. onLoad() {
  116. // uni.$on('refreshDoctorOrder', () => {
  117. // this.mescroll.resetUpScroll()
  118. // })
  119. },
  120. methods: {
  121. //时间筛选
  122. openCalendar(){
  123. this.isShow=!this.isShow
  124. },
  125. //日历
  126. onDayClick(data){
  127. this.curDate = data;
  128. this.isShow = false
  129. },
  130. navgetTo(index) {
  131. uni.navigateTo({
  132. url: index == 0 ? '/pages_health/addServe' : '/pages_health/addCompetitors'
  133. })
  134. },
  135. // tab切换
  136. orderStatusChange(item) {
  137. this.showType = item.val
  138. this.mescroll.resetUpScroll()
  139. },
  140. mescrollInit(mescroll) {
  141. this.mescroll = mescroll;
  142. },
  143. /*下拉刷新的回调 */
  144. downCallback(mescroll) {
  145. mescroll.resetUpScroll()
  146. },
  147. upCallback(page) {
  148. //联网加载数据
  149. var that = this;
  150. var data = {
  151. status: this.showType,
  152. page: page.num,
  153. pageSize: page.size
  154. };
  155. // getMyDoctorOrderList(data).then(res => {
  156. // if(res.code==200){
  157. // //设置列表数据
  158. // if (page.num == 1) {
  159. // that.dataList = res.data.list;
  160. // } else {
  161. // that.dataList = that.dataList.concat(res.data.list);
  162. // }
  163. // that.mescroll.endBySize(res.data.list.length, res.data.total);
  164. // }else{
  165. // uni.showToast({
  166. // icon:'none',
  167. // title: "请求失败",
  168. // });
  169. // that.dataList = null;
  170. // that.mescroll.endErr();
  171. // }
  172. // });
  173. },
  174. showDetail(item) {
  175. if (item.orderType == 1) {
  176. uni.navigateTo({
  177. url: '/pages_doctor/doctorOrderIM?orderId=' + item.orderId
  178. })
  179. }
  180. }
  181. }
  182. }
  183. </script>
  184. <style lang="scss">
  185. page{
  186. background-color:#EFF3F7;
  187. background: #EFF3F7;
  188. }
  189. .calendar-box{
  190. padding:0 30rpx;
  191. }
  192. .content {
  193. padding: 20upx;
  194. .top-fixed {
  195. width: 100%;
  196. position: fixed;
  197. top: 0;
  198. left: 0;
  199. z-index:10076;
  200. }
  201. .top-fixed2 {
  202. width: 100%;
  203. position: fixed;
  204. top: 110rpx;
  205. left: 0;
  206. z-index: 10;
  207. }
  208. .filter{
  209. background: #FFFFFF;
  210. padding: 20rpx;
  211. display: flex;
  212. align-items: center;
  213. justify-content: space-between;
  214. .time-box{
  215. display: flex;
  216. align-items: center;
  217. padding:16rpx 48rpx;
  218. background: #F5F7FA;
  219. border-radius: 32rpx 32rpx 32rpx 32rpx;
  220. .title{
  221. font-family: PingFang SC;
  222. font-weight: 400;
  223. font-size: 28rpx;
  224. color: #626468;
  225. text-align: center;
  226. padding-right: 20rpx;
  227. }
  228. &.active{
  229. background: #F0FAFF;
  230. .title{
  231. color:#008FD3
  232. }
  233. }
  234. }
  235. .list-box{
  236. display: flex;
  237. align-items: center;
  238. .title{
  239. font-family: PingFang SC;
  240. font-weight: 400;
  241. font-size: 28rpx;
  242. color: #222426;
  243. text-align: center;
  244. padding-left: 16rpx;
  245. }
  246. }
  247. }
  248. .pub-tab-box {
  249. box-sizing: border-box;
  250. width: 100%;
  251. padding: 0 20upx;
  252. background-color: #EFF3F7;
  253. .tab-inner {
  254. height: 110upx;
  255. line-height: 110upx;
  256. display: flex;
  257. align-items: center;
  258. // justify-content: space-between;
  259. overflow-x: auto;
  260. }
  261. .item {
  262. // flex: 1;
  263. font-size: 28upx;
  264. white-space: nowrap;
  265. line-height: 1;
  266. font-family: PingFang SC;
  267. font-weight: 400;
  268. color: #222426;
  269. margin-right: 16upx;
  270. display: flex;
  271. align-items: center;
  272. justify-content: center;
  273. background: #FFFFFF;
  274. border-radius: 36rpx 36rpx 36rpx 36rpx;
  275. padding:16rpx 48rpx;
  276. &:last-child {
  277. margin-right: 0;
  278. }
  279. &.active {
  280. font-weight: bold;
  281. color: #fff;
  282. background: linear-gradient(120deg, #31A1FE 0%, #008FD3 100%);
  283. }
  284. .text {
  285. position: relative;
  286. z-index: 1;
  287. }
  288. .tab-bg {
  289. width: 72upx;
  290. height: 28upx;
  291. position: absolute;
  292. top: 17upx;
  293. left: 50%;
  294. transform: translateX(-36upx);
  295. z-index: -1;
  296. }
  297. }
  298. }
  299. .btn-box2 {
  300. z-index: 9999;
  301. width: 100%;
  302. padding: 30upx;
  303. position: fixed;
  304. bottom: 0;
  305. left: 0;
  306. box-sizing: border-box;
  307. // background: #FFFFFF;
  308. .sub-btn {
  309. width: 100%;
  310. height: 88upx;
  311. line-height: 88upx;
  312. text-align: center;
  313. font-size: 30upx;
  314. font-family: PingFang SC;
  315. font-weight: bold;
  316. color: #FFFFFF;
  317. background: #008FD3;
  318. border-radius: 44upx;
  319. display: flex;
  320. align-items: center;
  321. justify-content: center;
  322. image {
  323. margin-right: 16rpx;
  324. }
  325. }
  326. }
  327. .sms-list {
  328. .item {
  329. padding: 30rpx;
  330. background: #FFFFFF;
  331. border-radius: 16rpx 16rpx 16rpx 16rpx;
  332. margin-bottom: 20rpx;
  333. .title {
  334. font-family: PingFang SC;
  335. font-weight: 500;
  336. font-size: 32rpx;
  337. color: #222426;
  338. text-align: left;
  339. }
  340. .title {
  341. font-family: PingFang SC;
  342. font-weight: 500;
  343. font-size: 32rpx;
  344. color: #222426;
  345. text-align: left;
  346. }
  347. .state {
  348. font-family: PingFang SC;
  349. font-weight: 400;
  350. font-size: 26rpx;
  351. text-align: right;
  352. }
  353. .personnel {
  354. font-family: PingFang SC;
  355. font-weight: 400;
  356. font-size: 28rpx;
  357. color: #898E91;
  358. text-align: left;
  359. margin-top: 16rpx;
  360. }
  361. }
  362. }
  363. }
  364. </style>