attendance_statisticnew.vue 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032
  1. <template>
  2. <div style=" background-color: #fff; padding:15px; min-height: calc(100vh - 160px);">
  3. <el-alert style="margin-bottom:15px;background:#fdf6ec!important;color:#E6A23C!important;border:1px solid #e9a846;padding:20px 16px;" title="温馨提示:" type="warning" v-show="tips_show" @close="tips_close" description>
  4. <p class="diy-tip" style="color:#E6A23C!important;font-size:14px;margin:0 !important;padding:0;">1、系统默认统计本月数据,您可以自定义时间段统计;</p>
  5. </el-alert>
  6. <div style="margin-top:2px; margin-bottom:15px;" class="inline-block-btn-list">
  7. <el-date-picker
  8. class="first-element-btn"
  9. v-model="filter.time_range"
  10. type="daterange"
  11. value-format="timestamp"
  12. range-separator="至"
  13. start-placeholder="开始日期"
  14. end-placeholder="结束日期"
  15. :picker-options="instantPickerOptions"
  16. @change="onFilterChanged"
  17. ></el-date-picker>
  18. <!--
  19. <el-cascader
  20. clearable
  21. :options="dept_tree"
  22. change-on-select
  23. :required="true"
  24. v-model="department_id"
  25. @change="onFilterChanged"
  26. placeholder="选择部门"
  27. style="width:120px"
  28. ></el-cascader> -->
  29. <el-cascader
  30. clearable
  31. :options="dept_tree"
  32. ref="dept1"
  33. change-on-select
  34. :required="true"
  35. v-model="category_id"
  36. style="width: 120px;margin-left:10px;"
  37. @change="onFilterChanged()"
  38. placeholder="选择部门"
  39. ></el-cascader>
  40. <!-- <el-cascader
  41. clearable
  42. :options="categoryTree"
  43. change-on-select
  44. :required="true"
  45. v-model="taskForm.category_id"
  46. style="width: 150px;"
  47. :disabled="(edit_flag.category==true&&edit_flag.item==true || twAgree && source == 20 || isFirst && source ==10 )"
  48. @change="loadAvailableRuleItems(taskForm)"
  49. placeholder="选择积分分类"
  50. ></el-cascader> -->
  51. <el-select
  52. v-show="profile.manager_type > 0"
  53. v-model="target_id_set"
  54. filterable
  55. multiple
  56. :multiple-limit="3"
  57. placeholder="选择员工进行筛选(最多3个)"
  58. @change="onFilterChanged"
  59. class="gap-right-8"
  60. style="width:250px;margin-left:10px"
  61. >
  62. <el-option
  63. v-for="item in employeeOptions"
  64. :key="item.id"
  65. :label="item.name"
  66. :value="item.id"
  67. ></el-option>
  68. </el-select>
  69. <el-button style="margin-left:10px;"
  70. type="primary"
  71. @click="exporExcelJump"
  72. >{{create_file_text}}</el-button>
  73. <!--
  74. <el-button
  75. type="primary"
  76. plain
  77. @click="reflush_data"
  78. :loading="create_file_loading1"
  79. class="first-element-btn"
  80. >刷新报表</el-button> -->
  81. </div>
  82. <el-table
  83. border
  84. stripe
  85. v-loading="loading"
  86. ref="multipleTable"
  87. :data="tableData"
  88. tooltip-effect="dark"
  89. @filter-change="filterHandler"
  90. >
  91. <el-table-column prop="name" label="姓名" fixed align="center"></el-table-column>
  92. <el-table-column prop="company_id" label="工号" align="center"></el-table-column>
  93. <el-table-column prop="job_name" label="职位" align="center"></el-table-column>
  94. <el-table-column prop="work_days_count" label="出勤天数" align="center"></el-table-column>
  95. <el-table-column prop="off_days_count" label="休息天数" align="center"></el-table-column>
  96. <el-table-column prop="duration" :formatter="time_convert" align="center" label="工作时长(小时)" width="120"></el-table-column>
  97. <el-table-column prop="late_count" label="迟到次数" align="center">
  98. <template slot-scope="scope" >
  99. <a href="javascript:void(0);" @click="_late_list_show(scope.row, 1)" style="text-decoration: underline;">{{scope.row.late_count}}</a>
  100. </template>
  101. </el-table-column>
  102. <el-table-column prop="late_time_sum" label="迟到时长(小时)" align="center" :formatter="time_convert" width="120">
  103. <template slot-scope="scope" >
  104. <a href="javascript:void(0);" @click="_late_list_show(scope.row, 1)" style="text-decoration: underline;">{{time_convert(null, null, scope.row.late_time_sum)}}</a>
  105. </template>
  106. </el-table-column>
  107. <el-table-column prop="serious_late_count" label="严重迟到次数" align="center" width="110">
  108. <template slot-scope="scope" >
  109. <a href="javascript:void(0);" @click="_late_list_show(scope.row, 2)" style="text-decoration: underline;">{{scope.row.serious_late_count}}</a>
  110. </template>
  111. </el-table-column>
  112. <el-table-column prop="serious_late_time_sum" label="严重迟到时长(小时)" align="center" :formatter="time_convert" width="150">
  113. <template slot-scope="scope" >
  114. <a href="javascript:void(0);" @click="_late_list_show(scope.row, 2)" style="text-decoration: underline;">{{time_convert(null, null, scope.row.serious_late_time_sum)}}</a>
  115. </template>
  116. </el-table-column>
  117. <el-table-column prop="late2_days_count" label="旷工迟到天数" align="center" width="110">
  118. <template slot-scope="scope" >
  119. <a href="javascript:void(0);" @click="_late_list_show(scope.row, 3)" style="text-decoration: underline;">{{scope.row.late2_days_count}}</a>
  120. </template>
  121. </el-table-column>
  122. <el-table-column prop="leave_time_count" label="早退次数" align="center">
  123. <template slot-scope="scope" >
  124. <a href="javascript:void(0);" @click="_leave_list_show(scope.row)" style="text-decoration: underline;">{{scope.row.leave_time_count}}</a>
  125. </template>
  126. </el-table-column>
  127. <el-table-column prop="leave_time_sum" label="早退时长(小时)" align="center" width="120" :formatter="time_convert">
  128. <template slot-scope="scope" >
  129. <a href="javascript:void(0);" @click="_leave_list_show(scope.row)" style="text-decoration: underline;">{{time_convert(null, null, scope.row.leave_time_sum)}}</a>
  130. </template>
  131. </el-table-column>
  132. <el-table-column prop="no_checkin_count" label="上班缺卡次数" align="center" width="120">
  133. <template slot-scope="scope" >
  134. <a href="javascript:void(0);" @click="_go_lack_detail_show(scope.row, 1)" style="text-decoration: underline;">{{scope.row.no_checkin_count}}</a>
  135. </template>
  136. </el-table-column>
  137. <el-table-column prop="no_checkout_count" label="下班缺卡次数" align="center" width="120">
  138. <template slot-scope="scope" >
  139. <a href="javascript:void(0);" @click="_go_lack_detail_show(scope.row, 2)" style="text-decoration: underline;">{{scope.row.no_checkout_count}}</a>
  140. </template>
  141. </el-table-column>
  142. <el-table-column prop="no_work_days_count" label="旷工天数" align="center">
  143. <template slot-scope="scope" >
  144. <a href="javascript:void(0);" @click="_go_lack_detail_show(scope.row, 3)" style="text-decoration: underlinen;">{{scope.row.no_work_days_count}}</a>
  145. </template>
  146. </el-table-column>
  147. <el-table-column prop="business_trip_time_sum" label="出差时长(小时)" align="center" width="120" :formatter="time_convert"></el-table-column>
  148. <el-table-column prop="out_time_sum" label="外出时长(小时)" width="120" align="center" :formatter="time_convert"></el-table-column>
  149. <el-table-column label="请假(小时)" align="center" width="90">
  150. <el-table-column v-for="(item,index) in tableDataList" :key="index" :label="item.name" align="center" width="90" >
  151. <template slot-scope="scope" >
  152. <!-- <div v-for="(item,index) in tableDataList" :key="index" > -->
  153. <div v-for="(items, key) in scope.row.ask_for_leave" :key="key">
  154. <!-- <span v-if="item.id == items.id"> {{items.total}}</span> -->
  155. <span v-if="tableDataList[index].id == items.id">{{items.total}}</span>
  156. </div>
  157. <!-- </div> -->
  158. </template>
  159. </el-table-column>
  160. </el-table-column>
  161. <el-table-column prop="overtime_review_count" label="加班-审批单统计" align="center"></el-table-column>
  162. <el-table-column label="加班计为加班费" align="center">
  163. <!-- :formatter="time_convert" -->
  164. <el-table-column prop="workday_overtime_sum" label="工作日(小时)" align="center" width="120"></el-table-column>
  165. <el-table-column prop="offday_overtime_sum" label="休息日(小时)" align="center" width="120"></el-table-column>
  166. <el-table-column prop="holiday_overtime_sum" label="节假日(小时)" align="center" width="120"></el-table-column>
  167. </el-table-column>
  168. <el-table-column label="加班时长转为调休" align="center">
  169. <el-table-column prop="workday_overtime_convert_sum" align="center" label="工作日(小时)" width="120"></el-table-column>
  170. <el-table-column prop="offday_overtime_convert_sum" align="center" label="休息日(小时)" width="120"></el-table-column>
  171. <el-table-column prop="holiday_overtime_convert_sum" align="center" label="节假日(小时)" width="120"></el-table-column>
  172. </el-table-column>
  173. <el-table-column header-align="center" :label="item.slice(5,7) + '-'+item.slice(8,) " v-for="(item, index) in table_header" :key="index" width="80px'" align="center">
  174. <template slot-scope="scope" >
  175. <a href="javascript:void(0);" @click="set_attendance_show(item, scope.row)">{{scope.row.days_data[item]}}</a>
  176. </template>
  177. </el-table-column>
  178. </el-table>
  179. <el-pagination
  180. background
  181. layout="total,sizes, prev, pager, next"
  182. @size-change="handleSizeChange"
  183. :page-size="pageLimit"
  184. :page-sizes="[10, 20, 50, 100]"
  185. :total="totalCount"
  186. :current-page.sync="currentPage"
  187. @current-change="changePage"
  188. ></el-pagination>
  189. <el-dialog
  190. title="考勤详情"
  191. :visible.sync="attendance_show"
  192. top="50px"
  193. width="500px"
  194. :close-on-click-modal="false"
  195. >
  196. <div v-for="(item, index) in attendance_info" :key="index" style="line-height: 2">
  197. <div>
  198. {{item.name}}({{$moment(item.checkin_base_time * 1000).format('HH:mm')}}):
  199. <span v-if="item.checkin_time > 0">打卡时间{{$moment(item.checkin_time * 1000).format('HH:mm')}}</span>
  200. <span v-if="item.checkin_status == -1">缺卡</span>
  201. <span v-if="item.checkin_status == 0">未打卡</span>
  202. <span v-if="item.checkin_status == 1">准时打卡</span>
  203. <span v-if="item.checkin_status == 2">迟到</span>
  204. <span v-if="item.checkin_status == 3">已补卡</span>
  205. </div>
  206. <div>
  207. {{item.name}}({{$moment(item.checkout_base_time * 1000).format('HH:mm')}}):
  208. <span v-if="item.checkout_time > 0">打卡时间{{$moment(item.checkout_time * 1000).format('HH:mm')}}</span>
  209. <span v-if="item.checkout_status == -1">缺卡</span>
  210. <span v-if="item.checkout_status == 0">未打卡</span>
  211. <span v-if="item.checkout_status == 1">准时打卡</span>
  212. <span v-if="item.checkout_status == 2">早退</span>
  213. <span v-if="item.checkout_status == 3">已补卡</span>
  214. </div>
  215. </div>
  216. <div v-if="attendance_info.length==0" style="text-align: center;">暂无数据</div>
  217. </el-dialog>
  218. <el-dialog
  219. :title="late_list_title"
  220. :visible.sync="late_list_show"
  221. width="600px"
  222. :close-on-click-modal="false"
  223. >
  224. <el-table
  225. border
  226. stripe
  227. height="300"
  228. v-loading="late_list_loading"
  229. :data="late_list_tableData"
  230. tooltip-effect="dark"
  231. >
  232. <el-table-column prop="name" label="班次" fixed align="center">
  233. </el-table-column>
  234. <el-table-column prop="checkin_base_time" label="上班时间" fixed align="center">
  235. <template slot-scope="scope">
  236. {{$moment(scope.row.checkin_base_time * 1000).format('MM-DD HH:mm')}}
  237. </template>
  238. </el-table-column>
  239. <el-table-column prop="checkin_time" label="实际打卡时间" fixed align="center">
  240. <template slot-scope="scope">
  241. {{$moment(scope.row.checkin_time * 1000).format('MM-DD HH:mm')}}
  242. </template>
  243. </el-table-column>
  244. <el-table-column prop="late_time" label="迟到时长" fixed align="center">
  245. <template slot-scope="scope">
  246. {{(scope.row.late_time/3600).toFixed(2)}}
  247. </template>
  248. </el-table-column>
  249. </el-table>
  250. </el-dialog>
  251. <el-dialog
  252. :title="leave_list_title"
  253. :visible.sync="leave_list_show"
  254. width="600px"
  255. :close-on-click-modal="false"
  256. >
  257. <el-table
  258. border
  259. stripe
  260. height="300"
  261. v-loading="leave_list_loading"
  262. :data="leave_list_tableData"
  263. tooltip-effect="dark"
  264. >
  265. <el-table-column prop="name" label="班次" fixed align="center"></el-table-column>
  266. <el-table-column prop="checkout_base_time" label="下班时间" fixed align="center">
  267. <template slot-scope="scope">
  268. {{$moment(scope.row.checkout_base_time * 1000).format('MM-DD HH:mm')}}
  269. </template>
  270. </el-table-column>
  271. <el-table-column prop="checkout_time" label="实际打卡时间" fixed align="center">
  272. <template slot-scope="scope">
  273. {{$moment(scope.row.checkout_time * 1000).format('MM-DD HH:mm')}}
  274. </template>
  275. </el-table-column>
  276. <el-table-column prop="leave_time" label="早退时长" fixed align="center">
  277. <template slot-scope="scope">
  278. {{(scope.row.leave_time/3600).toFixed(2)}}
  279. </template>
  280. </el-table-column>
  281. </el-table>
  282. </el-dialog>
  283. <el-dialog
  284. :title="go_lack_detail_title"
  285. :visible.sync="go_lack_detail_show"
  286. width="600px"
  287. :close-on-click-modal="false"
  288. >
  289. <el-table
  290. border
  291. stripe
  292. height="300"
  293. v-loading="go_lack_detail_loading"
  294. :data="go_lack_detail_tableData"
  295. tooltip-effect="dark"
  296. >
  297. <el-table-column prop="name" label="班次" fixed align="center"></el-table-column>
  298. <el-table-column prop="checkout_base_time" label="下班时间" fixed align="center">
  299. <template slot-scope="scope" >
  300. <!-- </template> -->
  301. {{$moment(scope.row.checkout_base_time * 1000).format('MM-DD HH:mm')}}
  302. </template>
  303. </el-table-column>
  304. </el-table>
  305. </el-dialog>
  306. <el-dialog
  307. title="导出考勤统计数据"
  308. custom-class="downlowd"
  309. :visible.sync="dialogVisible"
  310. width="40%"
  311. >
  312. <div class="color: #303133;font-size: 12px;text-align: left;">
  313. <div class="alignColor">温馨提示</div>
  314. <div class="alignColor">1, 导入前请点击"下载模版"按钮下载模版文件</div>
  315. <div class="alignColor">2, 填写规则到Excel表中</div>
  316. <div class="alignColor">3,点击"Excel文件导入"上传填写好的电子表</div>
  317. </div>
  318. <!-- <span style="color: #5b8bf7;cursor: pointer;" @click="openDalod">点击下载考勤数据</span> -->
  319. <div style=" margin-top:30px;">
  320. <el-button type="primary" @click="openDalod">导出考勤统计数据</el-button>
  321. </div>
  322. </el-dialog>
  323. </div>
  324. </template>
  325. <script>
  326. import qs from 'qs'
  327. import { getToken } from '@/utils/auth'
  328. import EmployeeSelector from '@/views/integral/EmployeeSelector'
  329. import Vue from 'vue'
  330. import preview from 'vue-photo-preview'
  331. import moment from 'moment'
  332. import 'vue-photo-preview/dist/skin.css'
  333. import clip from '@/utils/clipboard' // use clipboard directly
  334. Vue.use(preview, {
  335. tapToClose: false
  336. })
  337. export default {
  338. components: {
  339. EmployeeSelector
  340. },
  341. watch: {
  342. department_id(val, old) {
  343. // this.loadWidgetData()
  344. },
  345. // category_id(val){
  346. // let dept_list
  347. // for(let i in val){
  348. // dept_list = val[i]
  349. // }
  350. // this.category_id_BL = dept_list
  351. // console.log(val)
  352. // }
  353. },
  354. data() {
  355. const now = new Date()
  356. const startDate = new Date(now.getFullYear(), now.getMonth(), 1)
  357. const endDate = new Date(
  358. now.getFullYear(),
  359. now.getMonth() + 1,
  360. 0
  361. )
  362. let time_range = JSON.parse(JSON.stringify([moment(startDate).valueOf(), moment(endDate).valueOf()]))
  363. return {
  364. category_id_BL: '',//部门id
  365. tips_show: false,
  366. category_id:'',
  367. dialogVisible: false,
  368. late_list_tableData:[],
  369. late_list_loading:false,
  370. late_list_show:false,
  371. late_list_title:'',
  372. leave_list_tableData:[],
  373. leave_list_loading:false,
  374. leave_list_show:false,
  375. leave_list_title:'',
  376. go_lack_detail_tableData:[],
  377. go_lack_detail_loading:false,
  378. go_lack_detail_show:false,
  379. go_lack_detail_title:'',
  380. attendance_info:[],
  381. attendance_show:false,
  382. table_header:[],
  383. department_id:[],
  384. file_url:'',
  385. target_id_set:[],
  386. create_file_loading:false,
  387. create_file_loading1:false,
  388. tableDataList:[],
  389. create_file_text:'下载月报表',
  390. checkinSettingForm: {
  391. checkinMech: []
  392. },
  393. checkinSettingFormRules: {
  394. checkinMech: [{ required: true, message: '请输入考勤机名称', trigger: 'change' }]
  395. },
  396. employeeSelectorIds: [],
  397. workScheduleApi: '/integral.php/attendance/setting_add',
  398. checkinMechApi: '/integral/attendance/set_attendance_config',
  399. checkinMechForm: {
  400. name: '',
  401. ip: '',
  402. port: '',
  403. machine_id: '',
  404. config_ids: []
  405. },
  406. checkinMechFormRules: {
  407. name: [{ required: true, message: '请输入考勤机名称', trigger: 'blur' }],
  408. ip: [{ required: true, message: '请输入考勤机连接ip', trigger: 'blur' }],
  409. machine_id: [{ required: true, message: '请输入考勤机机器号', trigger: 'blur' }],
  410. config_ids: [{ required: true, message: '请先添加排班', trigger: 'change' }]
  411. },
  412. dept_tree:[],
  413. workScheduleList: [],
  414. attendanceMechList: [],
  415. workScheduleForm: {
  416. name: '',
  417. starttime: '',
  418. endtime: '',
  419. send_time: {
  420. starttime: '',
  421. endtime: ''
  422. },
  423. employee_ids: [],
  424. job_time: [
  425. { starttime: '', endtime: '' },
  426. { starttime: '', endtime: '' },
  427. { starttime: '', endtime: '' },
  428. { starttime: '', endtime: '' },
  429. { starttime: '', endtime: '' },
  430. { starttime: '', endtime: '' },
  431. { starttime: '', endtime: '' }
  432. ]
  433. },
  434. workScheduleFormRules: {
  435. name: [{ required: true, message: '请输入排班名称', trigger: 'blur' }],
  436. starttime: [
  437. { required: true, message: '请选择上班时间', trigger: 'blur' }
  438. ],
  439. endtime: [
  440. { required: true, message: '请选择下班时间', trigger: 'blur' }
  441. ]
  442. },
  443. // mechForm: {
  444. // target_id_set: []
  445. // },
  446. value2: '',
  447. activeIndex: 0,
  448. work_schedule_add: false,
  449. value4: '',
  450. value5: '',
  451. checkin_mech_add: false,
  452. checkin_dingtalk_appkey: '',
  453. checkin_dingtalk_secret: '',
  454. checkin_sys_secret: '',
  455. checkin_wexin_secret: '',
  456. checkin_type: 1,
  457. // value2:'',
  458. // value1:'',
  459. setpIndex: 0,
  460. Xtoken: { 'X-Token': getToken() },
  461. files: [],
  462. setting_show: false,
  463. profile: this.$store.getters.user_info,
  464. filter: {
  465. status: [],
  466. keywords: '',
  467. // time_range: time_range
  468. time_range: ''
  469. },
  470. employeeOptions: [],
  471. loading: false,
  472. // 0事假,1病假,2婚假,3丧假,4产假,5其它
  473. type_list: [],
  474. dialogTaskVisible: false,
  475. dialogTaskTitle: '记录考勤',
  476. totalCount: 0,
  477. currentPage: 1,
  478. pageLimit: 10,
  479. tableData: null,
  480. dialogCreateCategoryVisible: false,
  481. dialogEditCategoryVisible: false,
  482. taskFormApi: '/integral.php/attendance/add',
  483. isRequest: false,
  484. employee_list: [],
  485. downurl:'',
  486. // mechFormRules: {},
  487. taskForm: {
  488. // labelPosition: 'right',
  489. employee_id: '',
  490. duration: 0,
  491. item_id: '',
  492. remark: '',
  493. // time_range: [-1,-1],
  494. value1: '',
  495. value2: '',
  496. starttime: '',
  497. endtime: '',
  498. file_list: [],
  499. point: 0
  500. },
  501. taskFormRules: {
  502. item_id: [{ required: true, message: '请选择类型', trigger: 'change' }],
  503. // time_range: [
  504. // { required: true, message: "请选择时间", trigger: "blur" }
  505. // ],
  506. // value1: [
  507. // { type: "datetime", required: true, trigger: "blur",validator: validateTimeS }
  508. // ],
  509. // time_star: [
  510. // { required: true, trigger: "blur",validator: validateTimeS }
  511. // ],
  512. starttime: [
  513. { required: true, message: '请选择上班时间', trigger: 'blur' }
  514. ],
  515. endtime: [
  516. { required: true, message: '请选择下班时间', trigger: 'blur' }
  517. ],
  518. employee_id: [
  519. { required: true, message: '请选择员工', trigger: 'blur' }
  520. ]
  521. },
  522. accessEnabled: {
  523. add: 0,
  524. delete: 0,
  525. edit: 0
  526. },
  527. get_file_info_timer:null,
  528. instantPickerOptions: {
  529. shortcuts: [
  530. {
  531. text: '本周',
  532. onClick(picker) {
  533. const now = new Date(new Date().toLocaleDateString())
  534. const start =
  535. now.getTime() - (now.getDay() - 1) * 24 * 60 * 60 * 1000
  536. const end = start + 7 * 24 * 60 * 60 * 1000 - 1000
  537. picker.$emit('pick', [start, end])
  538. }
  539. },
  540. {
  541. text: '上周',
  542. onClick(picker) {
  543. const now = new Date(new Date().toLocaleDateString())
  544. const start =
  545. now.getTime() - (now.getDay() + 6) * 24 * 60 * 60 * 1000
  546. const end = start + 7 * 24 * 60 * 60 * 1000 - 1000
  547. picker.$emit('pick', [start, end])
  548. }
  549. },
  550. {
  551. text: '本月',
  552. onClick(picker) {
  553. const now = new Date()
  554. const startDate = new Date(now.getFullYear(), now.getMonth(), 1)
  555. const endDate = new Date(
  556. now.getFullYear(),
  557. now.getMonth() + 1,
  558. 0
  559. )
  560. picker.$emit('pick', [startDate.getTime(), endDate.getTime()])
  561. }
  562. },
  563. {
  564. text: '上月',
  565. onClick(picker) {
  566. const now = new Date()
  567. const startDate = new Date(
  568. now.getFullYear() - (now.getMonth() > 0 ? 0 : 1),
  569. (now.getMonth() + 11) % 12,
  570. 1
  571. )
  572. const endDate = new Date(now.getFullYear(), now.getMonth(), 0)
  573. picker.$emit('pick', [startDate.getTime(), endDate.getTime()])
  574. }
  575. }
  576. ]
  577. }
  578. }
  579. },
  580. beforeRouteLeave (to, from, next) {
  581. clearTimeout(this.get_file_info_timer)
  582. next()
  583. },
  584. filters:{
  585. get_status_text(list){
  586. if(typeof(list) == 'undefined'){
  587. return ''
  588. }
  589. if(list.length == 0){
  590. return '休息'
  591. }
  592. for(let i in list){
  593. if(list[i].result_code == 9){
  594. return '';
  595. }
  596. if(list[i].result_code == 6){
  597. return list[i].result_text
  598. }
  599. if(list[i].result_code != 0 && list[i].result_code != 9){
  600. return '异常'
  601. }
  602. }
  603. return '正常'
  604. },
  605. },
  606. methods: {
  607. tips_close() {
  608. localStorage.getItem('attendance_statisticnew_tips', 'true')
  609. this.tips_show = false
  610. },
  611. dateTimeFormatter_go: function(row, column, cellValue) {
  612. return cellValue
  613. ? this.$moment(cellValue * 1000).format('YYYY-MM-DD')
  614. : row.go_checkin_str
  615. },
  616. // 迟到
  617. _late_list_show(row, type){
  618. this.late_list_show = true
  619. let url = '/ad/attendance_data/late_detail'
  620. let late_text = '迟到';
  621. if(type == 2){
  622. late_text = '严重迟到'
  623. }
  624. if(type == 3){
  625. late_text = '旷工迟到'
  626. }
  627. let self = this;
  628. let time_range = JSON.parse(JSON.stringify(self.filter.time_range))
  629. if (time_range.length > 0) {
  630. time_range[0] = time_range[0] * 1 / 1000
  631. time_range[1] = (time_range[1]*1/1000) + 24*3600-1
  632. }else {
  633. let newarray = [];
  634. const current = new Date();
  635. const year = current.getFullYear(); // 得到年份z
  636. let month = current.getMonth() + 1; // 得到月份
  637. let date = current.getDate(); // 得到日期
  638. let day = current.getDay(); // 得到周几
  639. let first = year+'/' + month +'/' + '/' + '01'
  640. let late = year+'/' + month +'/' + date
  641. const timestamp= (new Date(first))/1000
  642. const late2 = (new Date(late))/1000
  643. newarray[0] = timestamp*1
  644. newarray[1] = (late2*1) + 24*3600-1
  645. time_range = newarray
  646. }
  647. //{{$moment(item.checkin_time * 1000).format('HH:mm')}}
  648. // this.late_list_title = row.name +' '+ moment(time_range[0]).format('YYYY-MM-DD')+'~'+moment(time_range[1]).format('YYYY-MM-DD') + ' '+late_text
  649. this.late_list_title = row.name +' '+ moment(time_range[0] * 1000).format('YYYY-MM-DD')+'~'+moment(time_range[1] * 1000).format('YYYY-MM-DD') + ' '+late_text
  650. // startDate: moment(self.filter.time_range[0]).format('YYYY-MM-DD'),
  651. // endDate: moment(self.filter.time_range[1]).format('YYYY-MM-DD'),
  652. this.$jtoken.get(this.serveAd + url,{
  653. params: {
  654. time_range: time_range.toString(),
  655. employee_id: row.employee_id,
  656. page: 1,
  657. page_size: 100
  658. }
  659. }).then((res) => {
  660. if(res.data.code == 1){
  661. self.late_list_tableData = res.data.data.list
  662. }
  663. })
  664. },
  665. // 早退 /ad/attendance_data/leave_detail
  666. _leave_list_show(row){
  667. this.leave_list_show = true
  668. let self = this;
  669. let time_range = JSON.parse(JSON.stringify(self.filter.time_range))
  670. if (time_range.length > 0) {
  671. time_range[0] = time_range[0] * 1 / 1000
  672. time_range[1] = (time_range[1]*1/1000) + 24*3600-1
  673. }else {
  674. let newarray = [];
  675. const current = new Date();
  676. const year = current.getFullYear(); // 得到年份
  677. let month = current.getMonth() + 1; // 得到月份
  678. let date = current.getDate(); // 得到日期
  679. let day = current.getDay(); // 得到周几
  680. let first = year+'/' + month +'/' + '/' + '01'
  681. let late = year+'/' + month +'/' + date
  682. const timestamp= (new Date(first))/1000
  683. const late2 = (new Date(late))/1000
  684. newarray[0] = timestamp*1
  685. newarray[1] = (late2*1) + 24*3600-1
  686. time_range = newarray
  687. }
  688. var params = {
  689. // startDate: moment(self.filter.time_range[0]).format('YYYY-MM-DD'),
  690. // endDate: moment(self.filter.time_range[1]).format('YYYY-MM-DD'),
  691. time_range: time_range.toString(),
  692. employee_id: row.employee_id,
  693. page: 1,
  694. page_size: 100
  695. }
  696. // this.leave_list_title = row.name +' '+ moment(this.filter.time_range[0]).format('YYYY-MM-DD')+'~'+moment(this.filter.time_range[1]).format('YYYY-MM-DD') + ' 早退'
  697. this.leave_list_title = row.name +' '+ moment(time_range[0] * 1000).format('YYYY-MM-DD')+'~'+moment(time_range[1] * 1000).format('YYYY-MM-DD')+ ' 早退'
  698. this.$jtoken.get(this.serveAd + '/ad/attendance_data/leave_detail', {
  699. params: params
  700. }).then((res) => {
  701. if(res.data.code == 1){
  702. self.leave_list_tableData = res.data.data.list
  703. }
  704. })
  705. },
  706. _go_lack_detail_show(row, type){
  707. this.go_lack_detail_show = true
  708. let title_text = '上班缺卡'
  709. if(type == 2){
  710. title_text = '下班缺卡'
  711. }
  712. if(type == 3){
  713. title_text = '旷工'
  714. }
  715. let self = this;
  716. let time_range = JSON.parse(JSON.stringify(self.filter.time_range))
  717. if (time_range.length > 0) {
  718. time_range[0] = time_range[0] * 1 / 1000
  719. time_range[1] = (time_range[1]*1/1000) + 24*3600-1
  720. }else {
  721. let newarray = [];
  722. const current = new Date();
  723. const year = current.getFullYear(); // 得到年份
  724. let month = current.getMonth() + 1; // 得到月份
  725. let date = current.getDate(); // 得到日期
  726. let day = current.getDay(); // 得到周几
  727. let first = year+'/' + month +'/' + '/' + '01'
  728. let late = year+'/' + month +'/' + date
  729. const timestamp= (new Date(first))/1000
  730. const late2 = (new Date(late))/1000
  731. newarray[0] = timestamp*1
  732. newarray[1] = (late2*1) + 24*3600-1
  733. time_range = newarray
  734. }
  735. this.go_lack_detail_title = row.name +' '+ moment(time_range[0] * 1000).format('YYYY-MM-DD')+'~'+moment(time_range[1] * 1000).format('YYYY-MM-DD') + ' '+title_text
  736. let url = '/ad/attendance_data/no_check_in'
  737. if(type == 2){
  738. url = '/ad/attendance_data/no_check_out'
  739. }
  740. if(type == 3){
  741. url = '/ad/attendance_data/absenteeism_detail'
  742. }
  743. let params = {
  744. time_range: time_range.toString(),
  745. employee_id: row.employee_id,
  746. page: 1,
  747. page_size: 20
  748. }
  749. this.$jtoken.get(this.serveAd + url, {
  750. params: params
  751. }).then((res) => {
  752. if(res.status == 200){
  753. self.go_lack_detail_tableData = res.data.data.list
  754. }
  755. })
  756. },
  757. // 显示考勤详情的弹窗
  758. set_attendance_show(list, status){
  759. if(list.length == 0){
  760. return false;
  761. }
  762. let newdata = list.replace(/_/g,"/");
  763. let employee_id = status.employee_id;
  764. let date = "00:00:00"
  765. let news = newdata +'/' + date
  766. let date1 = "23:59:59"
  767. const timestamp1= (new Date(news))/1000
  768. let new2 = newdata +'/' + date1
  769. const timestamp2= (new Date(new2))/1000
  770. let date3 = timestamp2
  771. let time_range = [];
  772. time_range[0] = timestamp1;
  773. time_range[1] = date3;
  774. this.$jtoken.get(this.serveAd+'/ad/attendance_data/check_result',
  775. {
  776. params: {
  777. page: 1,
  778. page_size: 20,
  779. time_range: time_range.toString(),
  780. employee_id:employee_id
  781. }
  782. }
  783. )
  784. .then(res => {
  785. if(res.data.code == 1) {
  786. this.attendance_info = res.data.data.list
  787. this.attendance_show = true;
  788. }
  789. })
  790. },
  791. reflush_data(){
  792. let self = this
  793. this.create_file_loading1 = true
  794. this.$jtoken.get('/integral.php/attendance_excel/reflush_data.html',{
  795. params: {
  796. time_range: self.filter.time_range
  797. }
  798. }).then((res) => {
  799. self.create_file_loading1 = false
  800. if(res.status == 200){
  801. if(res.data.code == 1){
  802. self.$message.success(res.data.msg)
  803. }else{
  804. self.$message.error(res.data.msg)
  805. }
  806. }
  807. })
  808. },
  809. // create_file(){
  810. // let self = this
  811. // if(self.file_url != ''){
  812. // window.open(self.file_url, '_blank')
  813. // return
  814. // }
  815. // this.create_file_loading = true
  816. // this.$jtoken.get('/integral.php/attendance_excel/create_file.html', {
  817. // params: {
  818. // time_range: self.filter.time_range
  819. // }
  820. // }).then((res) => {
  821. // self.create_file_loading = false
  822. // if(res.status == 200){
  823. // if(res.data.code == 1){
  824. // self.$message.success(res.data.msg)
  825. // }else{
  826. // self.$message.error(res.data.msg)
  827. // }
  828. // }else{
  829. // }
  830. // })
  831. // },
  832. checkinMechCloseHandle() {
  833. this.checkinMechApi = '/integral/attendance/set_attendance_config' // 默认添加考勤机
  834. this.$refs.checkinMechForm.resetFields()
  835. this.checkinMechForm = {
  836. name: '',
  837. ip: '',
  838. port: '',
  839. machine_id: '',
  840. config_ids: []
  841. }
  842. },
  843. workScheduleCloseHandle() {
  844. this.$refs.workScheduleForm.resetFields()
  845. this.activeIndex = 0
  846. this.workScheduleForm = {
  847. name: '',
  848. starttime: '',
  849. endtime: '',
  850. send_time: {
  851. starttime: '',
  852. endtime: ''
  853. },
  854. employee_ids: [],
  855. job_time: [
  856. { starttime: '', endtime: '' },
  857. { starttime: '', endtime: '' },
  858. { starttime: '', endtime: '' },
  859. { starttime: '', endtime: '' },
  860. { starttime: '', endtime: '' },
  861. { starttime: '', endtime: '' },
  862. { starttime: '', endtime: '' }
  863. ]
  864. }
  865. },
  866. getWorkScheduleById(id) {
  867. this.$jtoken.get('/integral/attendance/get_attendance_machine_setting', {
  868. params: {
  869. id
  870. }
  871. }).then(res => {
  872. if (res.status == 200) {
  873. this.workScheduleList = res.data.data
  874. }
  875. })
  876. },
  877. delWorkScheduleById(id) {
  878. this.$jtoken.get('/integral/attendance/delete_attendance_config', {
  879. params: {
  880. id
  881. }
  882. }).then(res => {
  883. if (res.status == 200) {
  884. this.$message({
  885. message: res.data.message,
  886. type: 'success'
  887. })
  888. this.getAttendanceMech()
  889. }
  890. })
  891. },
  892. checkinMechShow(item) {
  893. this.checkinMechApi = '/integral/attendance/update_attendance_config'
  894. this.checkinMechForm['id'] = item.id
  895. this.checkin_mech_add = true
  896. this.checkinMechForm.name = item.name
  897. this.checkinMechForm.ip = item.ip
  898. this.checkinMechForm.port = item.port
  899. this.checkinMechForm.machine_id = item.machine_id
  900. this.getWorkScheduleById(item.id)
  901. },
  902. checkinMechSave() {
  903. if (this.workScheduleList.length === 0) {
  904. this.$message({
  905. message: '请先设置排班',
  906. type: 'error'
  907. })
  908. return false
  909. }
  910. this.checkinMechForm.config_ids = []
  911. this.workScheduleList.forEach(item => {
  912. this.checkinMechForm.config_ids.push(item.id)
  913. })
  914. this.checkinMechForm.kq_site_id = this.profile.company_info.id
  915. this.$refs['checkinMechForm'].validate((valid) => {
  916. if (valid) {
  917. this.$jtoken.post(this.checkinMechApi,
  918. this.checkinMechForm
  919. ).then(res => {
  920. if (res.data.status === 1) {
  921. this.$message({
  922. message: '添加成功',
  923. type: 'success'
  924. })
  925. this.checkin_mech_add = false
  926. this.$refs['checkinMechForm'].resetFields()
  927. this.getAttendanceMech()
  928. }
  929. })
  930. } else {
  931. return false
  932. }
  933. })
  934. },
  935. // 字符串时间格式转换为时间格式
  936. // stringToDate(hour, minutes) {
  937. // const date = new Date()
  938. // return new Date(date.getFullYear(), date.getMonth(), date.getDate(), hour, minutes)
  939. // },
  940. delWorkScheduleItem(id) {
  941. this.workScheduleList.forEach((item, i) => {
  942. if (item.id == id) {
  943. this.workScheduleList.splice(i, 1)
  944. }
  945. })
  946. },
  947. eidtWorkScheduleShow(id) {
  948. this.workScheduleApi = '/integral.php/attendance/setting_update'
  949. this.$jtoken.get('/integral.php/attendance/get_setting_by_id', {
  950. params: { id }
  951. }).then(res => {
  952. if (res.data.code === 1) {
  953. this.workScheduleForm['id'] = res.data.data.config.id
  954. this.workScheduleForm.name = res.data.data.config.name
  955. this.workScheduleForm.send_time = res.data.data.config.send_time
  956. this.workScheduleForm.starttime = res.data.data.config.send_time.starttime
  957. this.workScheduleForm.endtime = res.data.data.config.send_time.endtime
  958. this.workScheduleForm.employee_ids = res.data.data.config.employee_ids
  959. this.workScheduleForm.job_time = res.data.data.config.job_time
  960. // res.data.data.config.job_time.forEach((item, i) => {
  961. // if (item.starttime && item.endtime) {
  962. // this.workScheduleForm.job_time[i].starttime = this.stringToDate(item.starttime.split(':')[0], item.starttime.split(':')[1])
  963. // this.workScheduleForm.job_time[i].endtime = this.stringToDate(item.endtime.split(':')[0], item.endtime.split(':')[1])
  964. // }
  965. // })
  966. // this.workScheduleForm.starttime = this.stringToDate(res.data.data.config.send_time.starttime.split(':')[0], res.data.data.config.send_time.starttime.split(':')[1])
  967. // this.workScheduleForm.endtime = this.stringToDate(res.data.data.config.send_time.endtime.split(':')[0], res.data.data.config.send_time.endtime.split(':')[1])
  968. this.employeeSelectorIds = res.data.data.config.employee_ids.map(item => {
  969. return parseInt(item)
  970. })
  971. }
  972. })
  973. this.work_schedule_add = true
  974. // get_setting_by_id
  975. },
  976. // editworkSchedule() {
  977. // },
  978. workScheduleSave() {
  979. if (this.workScheduleForm.employee_ids.length === 0) {
  980. this.$message({
  981. message: '请选择奖扣积分对象',
  982. type: 'error'
  983. })
  984. return false
  985. }
  986. // 删除多余参数
  987. delete this.workScheduleForm.starttime
  988. delete this.workScheduleForm.endtime
  989. // 转换时间格式
  990. // this.workScheduleForm.job_time.forEach((item, i) => {
  991. // if (item.starttime && item.endtime) {
  992. // this.workScheduleForm.job_time[i].starttime = this.$moment(this.workScheduleForm.job_time[i].starttime.valueOf()).format('HH:mm')
  993. // this.workScheduleForm.job_time[i].endtime = this.$moment(this.workScheduleForm.job_time[i].endtime.valueOf()).format('HH:mm')
  994. // }
  995. // })
  996. this.$jtoken.post(this.workScheduleApi, {
  997. row: this.workScheduleForm
  998. }).then((res) => {
  999. if (res.data.code == 1) {
  1000. this.$message({
  1001. message: res.data.msg,
  1002. type: 'success'
  1003. })
  1004. this.work_schedule_add = false
  1005. this.getWorkScheduleList()
  1006. }
  1007. }).catch((e) => {})
  1008. },
  1009. checkInMechShow() {
  1010. this.checkin_mech_add = true
  1011. this.getWorkScheduleList()
  1012. },
  1013. getWorkScheduleList() {
  1014. this.$jtoken.get('/integral/attendance/get_setting_list').then(res => {
  1015. if (res.status == 200) {
  1016. this.workScheduleList = res.data.data.list
  1017. }
  1018. })
  1019. },
  1020. handleCopy(text, event) {
  1021. clip(text, event)
  1022. },
  1023. // clipboardSuccess() {
  1024. // this.$message({
  1025. // message: 'Copy successfully',
  1026. // type: 'success',
  1027. // duration: 1500
  1028. // })
  1029. // },
  1030. setCheckInType() {
  1031. this.setting_show = true
  1032. // 获取系统打卡API密码
  1033. this.getAttendanceAuth()
  1034. // 获取考勤机配置列表
  1035. this.getAttendanceMech()
  1036. },
  1037. set_target_ids(data) {
  1038. const self = this
  1039. self.workScheduleForm.employee_ids = []
  1040. for (const i in data) {
  1041. self.workScheduleForm.employee_ids.push(data[i].id)
  1042. }
  1043. },
  1044. activeIndexPrev() {
  1045. this.activeIndex--
  1046. },
  1047. activeIndexNext() {
  1048. if (this.activeIndex == 0) {
  1049. var isSchedule = false
  1050. this.workScheduleForm.job_time.forEach((item, i) => {
  1051. if (item.starttime && item.endtime) {
  1052. isSchedule = true
  1053. }
  1054. })
  1055. if (!isSchedule) {
  1056. this.$message({
  1057. message: '请设置排班时间',
  1058. type: 'error'
  1059. })
  1060. return false
  1061. }
  1062. }
  1063. if (this.activeIndex == 1) {
  1064. var isValid = true
  1065. this.$refs.workScheduleForm.validate(valid => {
  1066. isValid = valid
  1067. })
  1068. if (!isValid) {
  1069. return false
  1070. }
  1071. this.workScheduleForm.send_time.starttime = this.workScheduleForm.starttime
  1072. this.workScheduleForm.send_time.endtime = this.workScheduleForm.endtime
  1073. }
  1074. this.activeIndex++
  1075. },
  1076. cancelHandle() {
  1077. this.work_schedule_add = false
  1078. // this.resetCreateDialog()
  1079. this.activeIndex = 0
  1080. },
  1081. fileProview(url, list, key) {
  1082. const $ext_list = ['doc', 'docx', 'pptx', 'xls', 'xlsx', 'ppt', 'txt']
  1083. const $ext_name = url.split('.')[1]
  1084. if ($ext_list.indexOf($ext_name) >= 0) {
  1085. window.open(
  1086. 'https://view.officeapps.live.com/op/view.aspx?src=' +
  1087. this.serverdomain +
  1088. url,
  1089. '_blank'
  1090. )
  1091. }
  1092. const $ext_list1 = ['jpg', 'png', 'bmp', 'jpeg','JPG','PNG']
  1093. const $ext_name1 = url.split('.')[1]
  1094. if ($ext_list1.indexOf($ext_name1) >= 0) {
  1095. let ii = 0
  1096. for (const i in list) {
  1097. if (
  1098. ['jpg', 'png', 'bmp', 'jpeg','JPG','PNG'].indexOf(list[i].url.split('.')[1]) >=
  1099. 0
  1100. ) {
  1101. if (list[i].url == url) {
  1102. this.openPhotoSwipe(
  1103. ii,
  1104. document.querySelectorAll('img[preview="' + key + '"]')
  1105. )
  1106. return
  1107. }
  1108. ii++
  1109. }
  1110. }
  1111. }
  1112. },
  1113. time_star_change(val) {
  1114. this.taskForm.value1 = val
  1115. this.taskForm.starttime = val
  1116. if (this.taskForm.value2 == '' || this.taskForm.value1 == '') {
  1117. this.taskForm.duration = 0
  1118. } else {
  1119. if (typeof this.taskForm.value2 === 'string') {
  1120. const timestamp = this.transDate(this.taskForm.value2)
  1121. const newDate = new Date()
  1122. this.taskForm.value2 = newDate.setTime(timestamp * 1000)
  1123. }
  1124. this.taskForm.duration = (
  1125. (this.taskForm.value2 - this.taskForm.value1) /
  1126. 3600 /
  1127. 1000
  1128. ).toFixed(1)
  1129. }
  1130. },
  1131. time_end_change(val) {
  1132. this.taskForm.value2 = val
  1133. this.taskForm.endtime = val
  1134. if (this.taskForm.value2 == '' || this.taskForm.value1 == '') {
  1135. this.taskForm.duration = 0
  1136. } else {
  1137. if (typeof this.taskForm.value1 === 'string') {
  1138. const timestamp = this.transDate(this.taskForm.value1)
  1139. const newDate = new Date()
  1140. this.taskForm.value1 = newDate.setTime(timestamp * 1000)
  1141. }
  1142. this.taskForm.duration = (
  1143. (this.taskForm.value2 - this.taskForm.value1) /
  1144. 3600 /
  1145. 1000
  1146. ).toFixed(1)
  1147. }
  1148. },
  1149. transDate(time) {
  1150. const date = new Date()
  1151. date.setFullYear(time.substring(0, 4))
  1152. date.setMonth(time.substring(5, 7) - 1)
  1153. date.setDate(time.substring(8, 10))
  1154. date.setHours(time.substring(11, 13))
  1155. date.setMinutes(time.substring(14, 16))
  1156. date.setSeconds(time.substring(17, 19))
  1157. return Date.parse(date) / 1000
  1158. },
  1159. dialogNext() {
  1160. if (this.setpIndex == 0 && this.taskForm.employee_ids.length == 0) {
  1161. this.$message.error('请至少选择一个员工')
  1162. return false
  1163. }
  1164. this.setpIndex++
  1165. },
  1166. dialogPrev() {
  1167. this.setpIndex--
  1168. },
  1169. // 获取可录入积分对象的列表
  1170. loadTargetRange: function() {
  1171. var self = this
  1172. this.$jtoken
  1173. .get('/integral.php/ajax_request_common/load_target_range', {
  1174. params: {
  1175. recorder_id: this.profile.id
  1176. }
  1177. })
  1178. .then(function(response) {
  1179. if (response.status == 200) {
  1180. var jsonData = response.data
  1181. try {
  1182. self.employeeOptions = jsonData
  1183. } catch (err) {
  1184. }
  1185. }
  1186. })
  1187. .catch(function(error) {
  1188. })
  1189. },
  1190. onFilePreView(file) {
  1191. // 点击时查看文件
  1192. const $ext_list = ['doc', 'docx', 'pptx', 'xls', 'xlsx', 'ppt', 'txt']
  1193. const $ext_name = file.name.split('.')[1]
  1194. if ($ext_list.indexOf($ext_name) >= 0) {
  1195. window.open(
  1196. 'https://view.officeapps.live.com/op/view.aspx?src=' +
  1197. this.serverdomain +
  1198. file.response.url,
  1199. '_blank'
  1200. )
  1201. }
  1202. // 点击时查看图片
  1203. const $ext_list1 = ['jpg', 'png', 'bmp', 'jpeg','JPG','PNG']
  1204. const $ext_name1 = file.name.split('.')[1]
  1205. if ($ext_list1.indexOf($ext_name1) >= 0) {
  1206. let ii = 0
  1207. for (const i in this.taskForm.file_list) {
  1208. if (
  1209. ['jpg', 'png', 'bmp', 'jpeg','JPG','PNG'].indexOf(
  1210. this.taskForm.file_list[i].name.split('.')[1]
  1211. ) >= 0
  1212. ) {
  1213. if (this.taskForm.file_list[i].name == file.name) {
  1214. this.openPhotoSwipe(
  1215. ii,
  1216. document.querySelectorAll('img[preview]')
  1217. )
  1218. return
  1219. }
  1220. ii++
  1221. }
  1222. }
  1223. }
  1224. },
  1225. onFileRemove(file, fileList) {
  1226. this.taskForm.file_list = fileList
  1227. },
  1228. handleFilesSuccess(response, file, fileList) {
  1229. // this.taskForm.file_list = fileList;
  1230. this.$set(this.taskForm, 'file_list', fileList)
  1231. },
  1232. beforeFilesUpload() {},
  1233. handleSizeChange(val) {
  1234. this.pageLimit = val
  1235. this.onFilterChanged()
  1236. },
  1237. filterHandler: function(value) {
  1238. if (typeof value.status !== 'undefined' && value.status.length == 0) {
  1239. this.filter.status = []
  1240. }
  1241. if (typeof value.status !== 'undefined' && value.status.length > 0) {
  1242. this.filter.status = value['status']
  1243. }
  1244. this.onFilterChanged()
  1245. },
  1246. load_attendance_type_list() {
  1247. const self = this
  1248. this.$jtoken
  1249. .get('/integral.php/attendance/get_attendance_type_list')
  1250. .then(ret => {
  1251. const list = ret.data.data
  1252. self.type_list = []
  1253. for (const i in list) {
  1254. self.type_list.push({ value: list[i].id, text: list[i].content })
  1255. }
  1256. // 固定类型,写死先
  1257. self.type_list.push({ value: 0, text: '出勤' })
  1258. // self.type_list = [{value: 0,text: '出勤'}]
  1259. })
  1260. },
  1261. dialogTaskClose: function() {
  1262. const form = this.$refs['newTaskForm']
  1263. form.clearValidate()
  1264. this.dialogTaskVisible = false
  1265. },
  1266. dialogTaskOpen: function(target, id) {
  1267. this.load_attendance_type_list()
  1268. // this.loadRuleList()
  1269. const self = this
  1270. this.setpIndex = 0
  1271. this.dialogTaskTitle = typeof id === 'undefined' ? '记录考勤' : '修改'
  1272. this.dialogTaskVisible = true
  1273. if (typeof id !== 'undefined') {
  1274. // self.taskForm["id"] = id;
  1275. self.taskFormApi = '/integral.php/attendance/update'
  1276. this.loadTaskInfo(id)
  1277. } else {
  1278. this.taskForm = {
  1279. employee_id: '',
  1280. duration: 0,
  1281. item_id: '',
  1282. remark: '',
  1283. // time_range: null,
  1284. file_list: [],
  1285. point: 0
  1286. }
  1287. self.taskFormApi = '/integral.php/attendance/add'
  1288. }
  1289. this.$nextTick(() => {
  1290. const form = this.$refs['newTaskForm']
  1291. if (typeof id === 'undefined') {
  1292. form.resetFields()
  1293. form.clearValidate()
  1294. }
  1295. })
  1296. },
  1297. employee_selected(data) {
  1298. this.taskForm.employee_ids = []
  1299. for (const i in data) {
  1300. this.taskForm.employee_ids.push(data[i].id)
  1301. }
  1302. },
  1303. loadTaskInfo(id) {
  1304. this.$jtoken
  1305. .get('/integral.php/attendance/get_info', {
  1306. params: {
  1307. id: id
  1308. }
  1309. })
  1310. .then(response => {
  1311. if (response.status == 200) {
  1312. var jsonData = response.data.data
  1313. this.taskForm = {
  1314. id: jsonData.id,
  1315. employee_id: jsonData.employee_id,
  1316. duration: jsonData.duration,
  1317. item_id: jsonData.item_id,
  1318. remark: jsonData.remark,
  1319. starttime: this.dateTimeFormatter('', '', jsonData.starttime),
  1320. endtime: this.dateTimeFormatter('', '', jsonData.endtime),
  1321. value1: this.dateTimeFormatter('', '', jsonData.starttime),
  1322. value2: this.dateTimeFormatter('', '', jsonData.endtime),
  1323. // time_range: null,
  1324. file_list: []
  1325. // point: 0
  1326. }
  1327. }
  1328. })
  1329. .catch(error => {
  1330. })
  1331. },
  1332. dialogSettingSend() {
  1333. /*if (this.attendanceMechList.length === 0) {
  1334. this.$message({
  1335. message: '请先添加考勤机',
  1336. type: 'error'
  1337. })
  1338. return false
  1339. }*/
  1340. const self = this
  1341. this.$jtoken({
  1342. url: '/integral.php/attendance/save_corpsecret',
  1343. data: qs.stringify({
  1344. row: {
  1345. checkin_dingtalk_appkey: self.checkin_dingtalk_appkey,
  1346. checkin_dingtalk_secret: self.checkin_dingtalk_secret,
  1347. checkin_wexin_secret: self.checkin_wexin_secret,
  1348. checkin_type: self.checkin_type
  1349. }
  1350. }),
  1351. method: 'post',
  1352. headers: {
  1353. 'Content-Type': 'application/x-www-form-urlencoded'
  1354. }
  1355. })
  1356. .then(function(res) {
  1357. if (res.data.code == 1) {
  1358. self.setting_show = false
  1359. self.$message.success(res.data.msg)
  1360. } else {
  1361. self.$message.error(res.data.msg)
  1362. }
  1363. })
  1364. .catch(function(err) {})
  1365. },
  1366. getAttendanceAuth() {
  1367. this.$jtoken
  1368. .get('/integral/attendance/attendance_config_auth_select', {
  1369. params: {
  1370. kq_site_id: this.profile.company_info.id
  1371. }
  1372. })
  1373. .then(res => {
  1374. if (res.status == 200) {
  1375. this.checkin_sys_secret = res.data.data.auth
  1376. }
  1377. })
  1378. },
  1379. getAttendanceAuthAgain() {
  1380. this.$jtoken
  1381. .get('/integral/attendance/attendance_config_auth', {
  1382. params: {
  1383. kq_site_id: this.profile.company_info.id
  1384. }
  1385. })
  1386. .then(res => {
  1387. if (res.status == 200) {
  1388. this.$message({
  1389. message: '获取成功',
  1390. type: 'success',
  1391. duration: 1500
  1392. })
  1393. this.checkin_sys_secret = res.data.data.auth
  1394. }
  1395. })
  1396. },
  1397. getAttendanceMech() {
  1398. this.$jtoken
  1399. .get('/integral/attendance/select_attendance_config', {
  1400. params: {
  1401. kq_site_id: this.profile.company_info.id
  1402. }
  1403. })
  1404. .then(res => {
  1405. if (res.status == 200) {
  1406. this.attendanceMechList = res.data.data
  1407. }
  1408. })
  1409. },
  1410. dialogTaskSend: function() {
  1411. const self = this
  1412. if (self.isRequest) {
  1413. return
  1414. }
  1415. const form = this.$refs['newTaskForm']
  1416. delete this.taskForm.value1
  1417. delete this.taskForm.value2
  1418. form.validate(valid => {
  1419. if (valid) {
  1420. this.$jtoken({
  1421. url: self.taskFormApi,
  1422. data: qs.stringify({ row: this.taskForm }),
  1423. method: 'post',
  1424. headers: {
  1425. 'Content-Type': 'application/x-www-form-urlencoded'
  1426. }
  1427. })
  1428. .then(function(response) {
  1429. setTimeout(function() {
  1430. self.isRequest = false
  1431. }, 200)
  1432. var message = ''
  1433. var status = 0
  1434. if (response.status == 200) {
  1435. var data = response.data
  1436. message = data.msg
  1437. if (data.code == 1) {
  1438. self.$message({
  1439. message: message,
  1440. type: 'success'
  1441. })
  1442. } else {
  1443. self.$message({
  1444. message: message,
  1445. type: 'error'
  1446. })
  1447. }
  1448. } else {
  1449. message = '服务器太忙了'
  1450. }
  1451. })
  1452. .catch(function(error) {
  1453. })
  1454. } else {
  1455. return false
  1456. }
  1457. })
  1458. },
  1459. onFilterChanged: function() {
  1460. if(this.filter.time_range == null){
  1461. this.filter.time_range = []
  1462. }
  1463. this.currentPage = 1
  1464. this.$refs.dept1.dropDownVisible = false;
  1465. this.loadTaskList()
  1466. this.get_file_info()
  1467. },
  1468. dateTimeFormatter: function(row, column, cellValue) {
  1469. return cellValue
  1470. ? this.$moment(cellValue * 1000).format('MM-DD HH:mm')
  1471. : '缺卡'
  1472. },
  1473. time_convert: function(row, column, cellValue) {
  1474. return (cellValue/3600).toFixed(2)+''
  1475. },
  1476. formatTime(row, colum, cellValue) {
  1477. return cellValue ? (cellValue / 3600).toFixed(1) + '小时' : '无'
  1478. },
  1479. taskStatusText: function(row, column, cellValue) {
  1480. let text = ''
  1481. switch (cellValue) {
  1482. case 0:
  1483. text = '未领取'
  1484. break
  1485. case 1:
  1486. text = '已领取'
  1487. break
  1488. case 2:
  1489. text = '已完成'
  1490. break
  1491. case -1:
  1492. text = '已取消'
  1493. break
  1494. }
  1495. if (row.expire_text != '') {
  1496. return text + '-' + row.expire_text
  1497. }
  1498. return text
  1499. },
  1500. exporExcelJump() {
  1501. window.open(this.downurl, '_blank')
  1502. },
  1503. get_file_info(){
  1504. // this.dialogVisible = true;
  1505. var self = this
  1506. let time_range = JSON.parse(JSON.stringify(self.filter.time_range))
  1507. if (time_range == null) {
  1508. time_range = []
  1509. }
  1510. if (time_range.length > 0) {
  1511. time_range[0] = time_range[0] * 1 / 1000
  1512. time_range[1] = (time_range[1]*1/1000) + 24*3600-1
  1513. }
  1514. var params = {
  1515. site_id: this.profile.site_id,
  1516. time_range: time_range.toString(),
  1517. page: this.currentPage,
  1518. page_size: this.pageLimit,
  1519. dept_id: this.category_id_BL
  1520. }
  1521. if(self.department_id.length > 0){
  1522. params['dept_id'] = self.department_id[self.department_id.length - 1]
  1523. }
  1524. if(self.target_id_set.length > 0){
  1525. params['employee_id'] = self.target_id_set
  1526. }
  1527. params['export'] = 1;
  1528. this.$jtoken
  1529. .get(this.serveAd + '/ad/attendance_data/get_code', {
  1530. params: params
  1531. })
  1532. .then(function(response) {
  1533. if (response.data.code == 1) {
  1534. self.downurl = self.serveAd+'/ad/attendance_data/statistic_export?code='+response.data.data.code
  1535. }
  1536. })
  1537. .catch(function(error) {
  1538. })
  1539. },
  1540. openDalod() {
  1541. window.open(this.downurl,'_blank')
  1542. this.dialogVisible = false;
  1543. },
  1544. // 列表接口
  1545. loadTaskList: function() {
  1546. this.loading = true
  1547. var self = this
  1548. if(this.category_id.length == 0){
  1549. this.category_id_BL = 0
  1550. }else{
  1551. for(let i in this.category_id){//遍历出部门id中最后一位
  1552. this.category_id_BL = this.category_id[i]
  1553. }
  1554. }
  1555. let time_range = JSON.parse(JSON.stringify(self.filter.time_range))
  1556. if (time_range.length > 0) {
  1557. time_range[0] = time_range[0] * 1 / 1000
  1558. time_range[1] = (time_range[1]*1/1000) + 24*3600-1
  1559. }else {
  1560. let newarray = [];
  1561. const current = new Date();
  1562. const year = current.getFullYear(); // 得到年份
  1563. let month = current.getMonth() + 1; // 得到月份
  1564. let date = current.getDate(); // 得到日期
  1565. let day = current.getDay(); // 得到周几
  1566. let first = year+'/' + month +'/' + '/' + '01'
  1567. let late = year+'/' + month +'/' + date
  1568. const timestamp= (new Date(first))/1000
  1569. const late2 = (new Date(late))/1000
  1570. newarray[0] = timestamp*1
  1571. newarray[1] = (late2*1) + 24*3600-1
  1572. time_range = newarray
  1573. }
  1574. var params = {
  1575. site_id: this.profile.site_id,
  1576. time_range: time_range.toString(),
  1577. page: this.currentPage,
  1578. page_size: this.pageLimit,
  1579. dept_id: this.category_id_BL
  1580. }
  1581. if(self.department_id.length > 0){
  1582. params['dept_id'] = self.department_id[self.department_id.length - 1]
  1583. }
  1584. if(self.target_id_set.length > 0){
  1585. params['employee_id'] = self.target_id_set
  1586. }
  1587. this.$jtoken
  1588. .get(this.serveAd + '/ad/attendance_data/monthly_statistic', {
  1589. params: params
  1590. })
  1591. .then(function(response) {
  1592. if (response.data.code == 1) {
  1593. self.loading = false
  1594. var jsonData = response.data
  1595. try {
  1596. self.totalCount = jsonData.data.total
  1597. self.tableData = jsonData.data.list
  1598. self.tableDataList = jsonData.data.holiday_list
  1599. self.table_header = jsonData.data.table_header
  1600. } catch (err) {
  1601. }
  1602. }
  1603. })
  1604. .catch(function(error) {
  1605. })
  1606. },
  1607. changePage: function(current) {
  1608. if (isNaN(current) || current < 1) {
  1609. return false
  1610. }
  1611. this.loadTaskList()
  1612. },
  1613. onDismissCreateCategoryDialog: function() {
  1614. var form = this.$refs['newCategoryForm']
  1615. form.clearValidate()
  1616. this.newCategoryForm = {
  1617. name: '',
  1618. pid: []
  1619. }
  1620. },
  1621. onDismissEditCategoryDialog: function() {
  1622. var form = this.$refs['categoryForm']
  1623. form.clearValidate()
  1624. this.categoryForm = {
  1625. id: '',
  1626. name: '',
  1627. pid: []
  1628. }
  1629. },
  1630. // 递归判断列表,把最后的children设为undefined
  1631. getTreeData(data){
  1632. for(var i=0;i<data.length;i++){
  1633. if(data[i].children.length<1){
  1634. // children若为空数组,则将children设为undefined
  1635. data[i].children=undefined;
  1636. }else {
  1637. // children若不为空数组,则继续 递归调用 本方法
  1638. this.getTreeData(data[i].children);
  1639. }
  1640. }
  1641. return data;
  1642. },
  1643. submitCreateCategoryForm: function(formName) {
  1644. var form = this.$refs[formName]
  1645. var self = this
  1646. form.validate(valid => {
  1647. if (valid) {
  1648. if (form) {
  1649. self.sendCreateCategoryRequest()
  1650. }
  1651. } else {
  1652. return false
  1653. }
  1654. })
  1655. },
  1656. submitEditCategoryForm: function(formName) {
  1657. var form = this.$refs[formName]
  1658. var self = this
  1659. form.validate(valid => {
  1660. if (valid) {
  1661. if (form) {
  1662. self.submitEditCategoryForm(form)
  1663. }
  1664. } else {
  1665. return false
  1666. }
  1667. })
  1668. },
  1669. confirmDelete: function(taskId) {
  1670. this.$confirm('确定要删除此任务吗?', '删除任务', {
  1671. confirmButtonText: '确定',
  1672. cancelButtonText: '取消',
  1673. type: 'warning'
  1674. })
  1675. .then(() => {
  1676. this.deleteTask(taskId)
  1677. })
  1678. .catch(() => {})
  1679. },
  1680. getTask: function(taskId) {
  1681. if (!taskId) {
  1682. return false
  1683. }
  1684. const params = {
  1685. id: taskId
  1686. }
  1687. var self = this
  1688. this.$jtoken({
  1689. url: '/integral.php/attendance/get_attendance',
  1690. params: params,
  1691. method: 'get',
  1692. transformRequest: [
  1693. data => {
  1694. const paramArray = new Array()
  1695. for (const it in data) {
  1696. paramArray.push(
  1697. encodeURIComponent(it) + '=' + encodeURIComponent(data[it])
  1698. )
  1699. }
  1700. return paramArray.join('&')
  1701. }
  1702. ],
  1703. headers: {
  1704. 'Content-Type': 'application/x-www-form-urlencoded'
  1705. }
  1706. })
  1707. .then(function(response) {
  1708. var message = ''
  1709. var status = 0
  1710. if (response.status == 200) {
  1711. var data = response.data
  1712. message = data.msg
  1713. if (data.code == 1) {
  1714. self.$message({
  1715. message: message,
  1716. type: 'success'
  1717. })
  1718. self.loadTaskList()
  1719. } else {
  1720. self.$message({
  1721. message: message,
  1722. type: 'error'
  1723. })
  1724. }
  1725. } else {
  1726. message = '服务器太忙了'
  1727. }
  1728. })
  1729. .catch(function(error) {
  1730. })
  1731. },
  1732. deleteTask: function(taskId) {
  1733. if (!taskId) {
  1734. return false
  1735. }
  1736. const params = {
  1737. id: taskId
  1738. }
  1739. var self = this
  1740. this.$jtoken({
  1741. url: '/integral.php/attendance/delete',
  1742. data: params,
  1743. method: 'post',
  1744. transformRequest: [
  1745. data => {
  1746. const paramArray = new Array()
  1747. for (const it in data) {
  1748. paramArray.push(
  1749. encodeURIComponent(it) + '=' + encodeURIComponent(data[it])
  1750. )
  1751. }
  1752. return paramArray.join('&')
  1753. }
  1754. ],
  1755. headers: {
  1756. 'Content-Type': 'application/x-www-form-urlencoded'
  1757. }
  1758. })
  1759. .then(function(response) {
  1760. var message = ''
  1761. var status = 0
  1762. if (response.status == 200) {
  1763. var data = response.data
  1764. message = data.msg
  1765. if (data.code == 1) {
  1766. self.$message({
  1767. message: message,
  1768. type: 'success'
  1769. })
  1770. self.loadTaskList()
  1771. } else {
  1772. self.$message({
  1773. message: message,
  1774. type: 'error'
  1775. })
  1776. }
  1777. } else {
  1778. message = '服务器太忙了'
  1779. }
  1780. })
  1781. .catch(function(error) {
  1782. })
  1783. },
  1784. loadRuleDetail: function(ruleId) {
  1785. const params = {
  1786. id: ruleId
  1787. }
  1788. var self = this
  1789. this.$jtoken
  1790. .get('/integral.php/ajax_request_common/get_rule_info', {
  1791. params: params
  1792. })
  1793. .then(function(response) {
  1794. if (response.status == 200) {
  1795. const jsonData = response.data
  1796. try {
  1797. const detailData = self.processDetailData(jsonData)
  1798. self.detailData.name = detailData.name
  1799. self.detailData.remark = detailData.remark
  1800. self.detailData.category_id = detailData.category_id
  1801. self.detailData.items = detailData.items
  1802. self.detailData.id = detailData.id
  1803. } catch (err) {
  1804. }
  1805. }
  1806. })
  1807. .catch(function(error) {
  1808. })
  1809. }
  1810. },
  1811. mounted(){
  1812. this.loadTaskList()
  1813. this.get_file_info()
  1814. // this.load_attendance_setting_info()
  1815. //this.loadTargetRange()
  1816. // this.loadWidgetData()
  1817. if (this.profile.manager_type == 4) {
  1818. this.accessEnabled = {
  1819. add: 1,
  1820. delete: 1,
  1821. excel_import: 1,
  1822. edit: 1
  1823. }
  1824. } else if (this.profile.manager_type > 1) {
  1825. // this.loadAccessItemFlag();
  1826. }
  1827. if (localStorage.getItem('attendance_statisticnew_tips')) {
  1828. this.tips_show = false
  1829. } else {
  1830. this.tips_show = true
  1831. }
  1832. },
  1833. created() {
  1834. this.dept_tree = this.getTreeData(JSON.parse(localStorage.getItem('dept_tree')))
  1835. }
  1836. }
  1837. </script>
  1838. <style scoped>
  1839. .el-pagination {
  1840. text-align: center;
  1841. margin-top: 15px;
  1842. }
  1843. .dialog_box .el-dialog__header {
  1844. display: none;
  1845. }
  1846. /deep/ .downlowd .el-dialog__body {
  1847. padding: 30px 20px 60px 20px;
  1848. text-align: center;
  1849. }
  1850. .alignColor{
  1851. text-align: left;
  1852. padding-left: 20px;
  1853. line-height: 30px;
  1854. }
  1855. </style>