1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/Lee/工地打卡小程序/building-sign/pagesB/repair/repair.vue?b5d6","webpack:///D:/Lee/工地打卡小程序/building-sign/pagesB/repair/repair.vue?055d","webpack:///D:/Lee/工地打卡小程序/building-sign/pagesB/repair/repair.vue?0329","webpack:///D:/Lee/工地打卡小程序/building-sign/pagesB/repair/repair.vue?ae06","uni-app:///pagesB/repair/repair.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","components","subNav","tabbar","data","statusHeight","userType","signList","page","size","status","total","isAll","ids","onLoad","onShow","onReachBottom","onPullDownRefresh","uni","onShareAppMessage","title","path","imageUrl","methods","changeEv","chooseEv","idsTemparr","idsArr","chooseAll","item","submitEv","id","type","submitAll","getSignList","console","res","created_at","status_text","worksite_name","worker_name","type_text","is_statistic","ifcheck","signArr"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,eAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAA+H;AAC/H;AAC0D;AACL;;;AAGrD;AACgL;AAChL,gBAAgB,uLAAU;AAC1B,EAAE,4EAAM;AACR,EAAE,6FAAM;AACR,EAAE,sGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,iGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA,aAAa,oMAEN;AACP,KAAK;AACL;AACA,aAAa,wOAEN;AACP,KAAK;AACL;AACA,aAAa,kOAEN;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC3CA;AAAA;AAAA;AAAA;AAAoqB,CAAgB,kqBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;eCgDxrB;EACAC;IACAC;IACAC;EACA;EACAC;IACA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MACAC;MACAC;MACAC;MACAC;MAAA;MACAC;IACA;EACA;EACAC,2BAEA;EACAC;IACA;IACA;EACA;EACAC;IACA;MACA;MACA;MACA;IACA;EACA;EACAC;IACA;IACA;IACA;IACA;IACAC;EACA;EACAC;IACA;MACAC;MACAC;MACAC;IACA;IACA;IACA;EACA;EACAC;IACA;IACAC;MACA;MACA;MACA;MACA;IACA;IACA;IACAC;MACA;MACA;QAAA;MAAA;MACA;QACA;MACA;QACA;MACA;MACA;QAAA;MAAA;MACA;MACAC;QACAC;MACA;MACA;MACA;IACA;IAEA;IACAC;MACA;QAAA;MAAA;MACA;QACA;QACA;UAAA;QAAA;MACA;QACA;QACA;UAAAC;QAAA;MACA;MACA;QAAA;MAAA;MACA;MACAH;QACAC;MACA;MACA;MACA;IACA;IAEA;IACAG;MAAA;MACA;QACAC;QACAC;MACA;MACA;QACA;UACA;YACA;UACA;YACA;UACA;UACA;UACA;QACA;MACA;IACA;IAEA;IACAC;MAAA;MACA;QACAF;QACAC;MACA;MACA;QACA;UACA;YACA;UACA;YACA;UACA;UACA;UACA;QACA;MACA;IACA;IAEA;IACAE;MAAA;MACA;QACA1B;QACAC;QACAC;MACA;MACA;MACA;QACA;UACAyB;UACA;UACA;UACAC;YACA;cACAL;cACAM;cACA3B;cACA4B;cACAC;cACAC;cACAC;cACAC;cACAC;YACA;YACAC;UACA;UACA;QACA;MACA;IACA;EACA;AACA;AAAA,2B","file":"pagesB/repair/repair.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesB/repair/repair.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./repair.vue?vue&type=template&id=6ef6be8c&scoped=true&\"\nvar renderjs\nimport script from \"./repair.vue?vue&type=script&lang=js&\"\nexport * from \"./repair.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6ef6be8c\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pagesB/repair/repair.vue\"\nexport default component.exports","export * from \"-!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./repair.vue?vue&type=template&id=6ef6be8c&scoped=true&\"","var components\ntry {\n components = {\n statusNav: function () {\n return import(\n /* webpackChunkName: \"components/status-nav/status-nav\" */ \"@/components/status-nav/status-nav.vue\"\n )\n },\n subNav: function () {\n return import(\n /* webpackChunkName: \"components/sub-nav/sub-nav\" */ \"@/components/sub-nav/sub-nav.vue\"\n )\n },\n tabbar: function () {\n return import(\n /* webpackChunkName: \"components/tabbar/tabbar\" */ \"@/components/tabbar/tabbar.vue\"\n )\n },\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./repair.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./repair.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"pad-x120\">\r\n\t\t<!-- 头部 -->\r\n\t\t<status-nav navBarTitle=\"补卡确认\"></status-nav>\r\n\t\t<view class=\"content\" :style=\"{'padding-top':statusHeight+50+'px'}\">\r\n\t\t\t<!-- 导航 -->\r\n\t\t\t<view class=\"pull-nav\" :style=\"{'top':statusHeight+50+'px'}\">\r\n\t\t\t\t<sub-nav @changeEv=\"changeEv\"></sub-nav>\r\n\t\t\t</view>\r\n\t\t\t<!-- 全选 -->\r\n\t\t\t<view class=\"choose-all-bg\">\r\n\t\t\t\t<view class=\"choose-all font26\" v-if=\"status==0 && signList.length>0\">\r\n\t\t\t\t\t<view class=\"radio\" :class=\"isAll?'checked':''\" @tap=\"chooseAll\"></view>\r\n\t\t\t\t\t<view class=\"title\">全选</view>\r\n\t\t\t\t\t<view class=\"choose-all-btns font24\" v-if=\"ids!==''\">\r\n\t\t\t\t\t\t<view class=\"btn color-blue\" @tap=\"submitAll(1)\">一键确认</view>\r\n\t\t\t\t\t\t<view class=\"btn color-99 btn-no\" @tap=\"submitAll(0)\">退回</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 打卡列表 -->\r\n\t\t\t<view class=\"sign-record sign-record-other bg-white\">\r\n\t\t\t\t<view class=\"item font26\" v-for=\"(item,index) in signList\" :key=\"index\">\r\n\t\t\t\t\t<view class=\"radio\" :class=\"item.ifcheck?'checked':''\" @tap=\"chooseEv(index)\" v-if=\"status==0\"></view>\r\n\t\t\t\t\t<view class=\"info\" :class=\"status==0?'hide':''\">\r\n\t\t\t\t\t\t<text>姓名:{{item.worker_name}}</text>\r\n\t\t\t\t\t\t<text>{{item.type_text}}打卡:{{item.created_at}}</text>\r\n\t\t\t\t\t\t<text>打卡工地:{{item.worksite_name}}</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- 待确认 -->\r\n\t\t\t\t\t<view class=\"examine-btns font24\" v-if=\"item.status==0\">\r\n\t\t\t\t\t\t<view class=\"btn color-blue\" @tap=\"submitEv(item.id,1)\">确认</view>\r\n\t\t\t\t\t\t<view class=\"btn color-99\" @tap=\"submitEv(item.id,0)\">退回</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- 已确认 -->\r\n\t\t\t\t\t<view class=\"state\" :class=\"item.status==-1?'color-red':''\" v-if=\"item.status==1 || item.status==-1\">{{item.status_text}}</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<!-- 加载更多 -->\r\n\t\t\t\t<view class=\"more-tips font24\">{{signList.length==total?'没有更多数据了':'下滑获取更多'}}</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 尾部 -->\r\n\t\t<tabbar :userType=\"userType\" current=\"4\"></tabbar>\r\n\t</view>\r\n</template>\r\n<script>\r\n\timport subNav from '@/components/sub-nav/sub-nav.vue';\r\n\timport tabbar from '@/components/tabbar/tabbar';\r\n\texport default {\r\n\t\tcomponents:{\r\n\t\t\tsubNav,\r\n\t\t\ttabbar\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tstatusHeight:uni.getSystemInfoSync().statusBarHeight, //状态栏高度\r\n\t\t\t\tuserType:'director', //账户类型 工人:worker 负责人:director\r\n\t\t\t\tsignList:[], //打卡列表\r\n\t\t\t\tpage:1,\r\n\t\t\t\tsize:10,\r\n\t\t\t\tstatus:0,\r\n\t\t\t\ttotal:0,\r\n\t\t\t\tisAll:false, //是否全选\r\n\t\t\t\tids:'', //选中的id\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad() {\r\n\t\t\t\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\t// 获取打卡列表\r\n\t\t\tthis.getSignList();\r\n\t\t},\r\n\t\tonReachBottom() {\r\n\t\t\tif(this.signList.length<this.total){\r\n\t\t\t\tthis.page++;\r\n\t\t\t\t// 获取打卡列表\r\n\t\t\t\tthis.getSignList();\r\n\t\t\t}\r\n\t\t},\r\n\t\tonPullDownRefresh() {\r\n\t\t\tthis.page = 1;\r\n\t\t\t// 获取打卡列表\r\n\t\t\tthis.getSignList();\t\r\n\t\t\t// 关闭下拉刷新\r\n\t\t\tuni.stopPullDownRefresh();\r\n\t\t},\r\n\t\tonShareAppMessage(res) {\r\n\t\t\tlet shareObj = {\r\n\t\t\t\ttitle:'工地打卡',\r\n\t\t\t\tpath: '/pages/pagehome/pagehome',\r\n\t\t\t\timageUrl:'/static/share-logo.jpg',\r\n\t\t\t}\r\n\t\t\t// 返回shareObj\r\n\t\t\treturn shareObj;\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 选择栏目\r\n\t\t\tchangeEv(index){\r\n\t\t\t\tthis.status = index;\r\n\t\t\t\tthis.page = 1;\r\n\t\t\t\t// 获取打卡列表\r\n\t\t\t\tthis.getSignList();\r\n\t\t\t},\r\n\t\t\t// 选中事件\r\n\t\t\tchooseEv(index) {\r\n\t\t\t\tthis.signList[index].ifcheck = !this.signList[index].ifcheck;\r\n\t\t\t\tlet exit = this.signList.filter(item=>item.ifcheck==false);\r\n\t\t\t\tif(exit.length>0){\r\n\t\t\t\t\tthis.isAll = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.isAll = true;\r\n\t\t\t\t}\r\n\t\t\t\tlet idsTemparr = this.signList.filter(item=>{return item.ifcheck==true})\r\n\t\t\t\tlet idsArr = [];\r\n\t\t\t\tidsTemparr.forEach(item=>{\r\n\t\t\t\t\tidsArr.push(item.id)\r\n\t\t\t\t})\r\n\t\t\t\t// 选中的id\r\n\t\t\t\tthis.ids = idsArr.join(',');\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 全选事件\r\n\t\t\tchooseAll(){\r\n\t\t\t\tlet exit = this.signList.filter(item=>item.ifcheck==false);\r\n\t\t\t\tif(exit.length>0){\r\n\t\t\t\t\tthis.isAll = true;\r\n\t\t\t\t\tthis.signList.forEach(item=>item.ifcheck = true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.isAll = false;\r\n\t\t\t\t\tthis.signList.forEach(item=>{item.ifcheck = false});\r\n\t\t\t\t}\r\n\t\t\t\tlet idsTemparr = this.signList.filter(item=>{return item.ifcheck==true})\r\n\t\t\t\tlet idsArr = [];\r\n\t\t\t\tidsTemparr.forEach(item=>{\r\n\t\t\t\t\tidsArr.push(item.id)\r\n\t\t\t\t})\r\n\t\t\t\t// 选中的id\r\n\t\t\t\tthis.ids = idsArr.join(',');\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 确认&退回事件\r\n\t\t\tsubmitEv(id,type){\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\tid:id,\r\n\t\t\t\t\ttype:type\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('/api/v1/manager/check-clock',params).then(res=>{\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tif(type==0){\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('已退回');\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('已确认');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// 获取打卡列表\r\n\t\t\t\t\t\tthis.getSignList();\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 批量确认&退回事件\r\n\t\t\tsubmitAll(type){\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\tid:this.ids,\r\n\t\t\t\t\ttype:type\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('/api/v1/manager/check-clock',params).then(res=>{\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tif(type==0){\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('已退回');\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('已确认');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// 获取打卡列表\r\n\t\t\t\t\t\tthis.getSignList();\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 获取打卡列表\r\n\t\t\tgetSignList(){\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\tpage:this.page,\r\n\t\t\t\t\tsize:this.size,\r\n\t\t\t\t\tstatus:this.status\r\n\t\t\t\t}\r\n\t\t\t\tif(this.page==1) this.signList = [];\r\n\t\t\t\tthis.$requst.post('/api/v1/manager/clock-list',params).then(res=>{\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tconsole.log(res,'打卡列表');\r\n\t\t\t\t\t\tthis.total = res.data.total;\r\n\t\t\t\t\t\tlet signArr = [];\r\n\t\t\t\t\t\tres.data.list.forEach(item=>{\r\n\t\t\t\t\t\t\tlet obj = {\r\n\t\t\t\t\t\t\t\tid: item.id,\r\n\t\t\t\t\t\t\t\tcreated_at:item.created_at,\r\n\t\t\t\t\t\t\t\tstatus:item.status,\r\n\t\t\t\t\t\t\t\tstatus_text:item.status_text,\r\n\t\t\t\t\t\t\t\tworksite_name: item.worksite_name,\r\n\t\t\t\t\t\t\t\tworker_name:item.worker_name,\r\n\t\t\t\t\t\t\t\ttype_text: item.type_text,\r\n\t\t\t\t\t\t\t\tis_statistic: item.is_statistic,\r\n\t\t\t\t\t\t\t\tifcheck:false,\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsignArr.push(obj);\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tthis.signList = this.signList.concat(signArr);\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n<style scoped>\r\n\t\r\n</style>"],"sourceRoot":""} |