qgb-process 0.2.3 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/.env +2 -2
  2. package/.env.development +70 -70
  3. package/.env.pre +60 -60
  4. package/.env.production +48 -48
  5. package/.env.test +48 -48
  6. package/.eslintignore +4 -4
  7. package/.eslintrc.js +302 -302
  8. package/README.md +66 -66
  9. package/babel.config.js +5 -5
  10. package/commitlint.config.js +30 -30
  11. package/config/dev.env.js +7 -7
  12. package/config/index.js +82 -82
  13. package/config/prod.env.js +4 -4
  14. package/debug.log +4 -4
  15. package/index.js +6 -6
  16. package/jsconfig.json +9 -9
  17. package/lib/qgb-process.common.js +7666 -5069
  18. package/lib/qgb-process.umd.js +7666 -5069
  19. package/lib/qgb-process.umd.min.js +108 -108
  20. package/package.json +148 -148
  21. package/packages/index.js +26 -26
  22. package/public/index.html +47 -47
  23. package/public/js/qykf.js +21 -21
  24. package/src/App.vue +37 -37
  25. package/src/api/ApiExAndapp.js +24 -24
  26. package/src/api/EnterpriseAssociation.js +8 -8
  27. package/src/api/Notice.js +31 -31
  28. package/src/api/apiAcceptance/apiAcceptance.js +37 -37
  29. package/src/api/apiAddress.js +9 -9
  30. package/src/api/apiApprovalConfig.js +13 -13
  31. package/src/api/apiApprove.js +18 -18
  32. package/src/api/apiArrears/apiArrears.js +41 -41
  33. package/src/api/apiArrears/apiProjectArrears.js +16 -16
  34. package/src/api/apiArrears/index.js +15 -15
  35. package/src/api/apiAssets.js +19 -19
  36. package/src/api/apiAssociate.js +42 -42
  37. package/src/api/apiAudit/apiAudit.js +32 -32
  38. package/src/api/apiAuth.js +25 -25
  39. package/src/api/apiAuthentication.js +35 -35
  40. package/src/api/apiBankAccount/index.js +12 -12
  41. package/src/api/apiBudget/apiBudget.js +30 -30
  42. package/src/api/apiBudget/apiBudgets.js +105 -105
  43. package/src/api/apiCarRecord.js +48 -48
  44. package/src/api/apiCart.js +202 -202
  45. package/src/api/apiChangeTel.js +13 -13
  46. package/src/api/apiCheckingIn.js +95 -95
  47. package/src/api/apiCollection/index.js +13 -13
  48. package/src/api/apiContract/apiContract.js +21 -21
  49. package/src/api/apiContract/index.js +3 -3
  50. package/src/api/apiContract/quill-config.js +122 -122
  51. package/src/api/apiContractManage/apiContractManage.js +57 -57
  52. package/src/api/apiContractManage/index.js +2 -2
  53. package/src/api/apiContractManage/quill-config.js +121 -121
  54. package/src/api/apiCoping.js +22 -22
  55. package/src/api/apiCost/index.js +31 -31
  56. package/src/api/apiCreditManagement.js +16 -16
  57. package/src/api/apiCustomer/apiCustomer.js +12 -12
  58. package/src/api/apiDivisional.js +9 -9
  59. package/src/api/apiDivisionalManagementList.js +17 -17
  60. package/src/api/apiEmployeeRegularization.js +73 -73
  61. package/src/api/apiEquipmentRental.js +50 -50
  62. package/src/api/apiFormBuilder/menu.js +65 -65
  63. package/src/api/apiFormBuilder/reissueRule.js +15 -15
  64. package/src/api/apiFund/index.js +16 -16
  65. package/src/api/apiHelp.js +43 -43
  66. package/src/api/apiHome.js +24 -24
  67. package/src/api/apiIminfo.js +39 -39
  68. package/src/api/apiInventory.js +52 -52
  69. package/src/api/apiInventorySetting.js +9 -9
  70. package/src/api/apiInvoice.js +29 -29
  71. package/src/api/apiJobManage.js +15 -15
  72. package/src/api/apiLease/apiLease.js +12 -12
  73. package/src/api/apiLogisticsTransportation/apiLogisticsTransportation.js +34 -34
  74. package/src/api/apiLostPassword.js +9 -9
  75. package/src/api/apiMachine/api.js +3 -3
  76. package/src/api/apiMachine/apiCategory.js +18 -18
  77. package/src/api/apiMachine/apiHire.js +19 -19
  78. package/src/api/apiMachine/apiLease.js +27 -27
  79. package/src/api/apiMachine/apiLocation.js +4 -4
  80. package/src/api/apiMachine/apiRentInfo.js +107 -107
  81. package/src/api/apiMachine/apiRentPublish.js +14 -14
  82. package/src/api/apiMachine/apiStore.js +15 -15
  83. package/src/api/apiMachine/index.js +3 -3
  84. package/src/api/apiManagementStore/api.js +3 -3
  85. package/src/api/apiManagementStore/apiManagementStore.js +25 -25
  86. package/src/api/apiMaterCheckAndAccept/apiMaterCheckAndAccept.js +47 -47
  87. package/src/api/apiMaterCheckAndAccept/apiMechanicalSourcing.js +16 -16
  88. package/src/api/apiMaterCheckAndAccept/index.js +3 -3
  89. package/src/api/apiMaterials/aaaaaaaaaaaaaa.js +9 -9
  90. package/src/api/apiMaterials/api.js +3 -3
  91. package/src/api/apiMaterials/apiAddress.js +116 -116
  92. package/src/api/apiMaterials/apiBalanceData.js +188 -188
  93. package/src/api/apiMaterials/apiCommercialConcrete.js +36 -36
  94. package/src/api/apiMaterials/apiCommodity.js +70 -70
  95. package/src/api/apiMaterials/apiDownload.js +26 -26
  96. package/src/api/apiMaterials/apiHome.js +44 -44
  97. package/src/api/apiMaterials/apiItemBrand.js +9 -9
  98. package/src/api/apiMaterials/apiLogistics.js +72 -72
  99. package/src/api/apiMaterials/apiLogisticsReceipt.js +94 -94
  100. package/src/api/apiMaterials/apiMaterials.js +8 -8
  101. package/src/api/apiMaterials/apiMySalesOrder.js +21 -21
  102. package/src/api/apiMaterials/apiOfflineOrder.js +18 -18
  103. package/src/api/apiMaterials/apiOrder.js +183 -183
  104. package/src/api/apiMaterials/apiReceipt.js +45 -45
  105. package/src/api/apiMaterials/quill-config.js +122 -122
  106. package/src/api/apiMemberSelection.js +39 -39
  107. package/src/api/apiMessage.js +10 -10
  108. package/src/api/apiMock/mockOrder.js +98 -98
  109. package/src/api/apiMonthPlan/apiMonthPlan.js +47 -47
  110. package/src/api/apiMyBidding.js +8 -8
  111. package/src/api/apiMyMember/apiComInfo.js +17 -17
  112. package/src/api/apiMyMember/apiInviteJoin.js +24 -24
  113. package/src/api/apiMyMember/apiMember.js +24 -24
  114. package/src/api/apiMyMember/apiMemberApply.js +36 -36
  115. package/src/api/apiMyMember/apiMemberChance.js +40 -40
  116. package/src/api/apiOffer.js +40 -40
  117. package/src/api/apiOffice.js +19 -19
  118. package/src/api/apiPact.js +26 -26
  119. package/src/api/apiPassword.js +7 -7
  120. package/src/api/apiPay/apiPay.js +25 -25
  121. package/src/api/apiPaying.js +21 -21
  122. package/src/api/apiPayment/apiPayment.js +13 -13
  123. package/src/api/apiPayment/apiProjectPayment.js +13 -13
  124. package/src/api/apiPrint.js +23 -0
  125. package/src/api/apiProcess.js +65 -65
  126. package/src/api/apiProject/apiBaseList.js +29 -29
  127. package/src/api/apiProject/apiGoodsOffer.js +11 -11
  128. package/src/api/apiProject/apiInventory.js +116 -116
  129. package/src/api/apiProject/apiOfferOrder.js +12 -12
  130. package/src/api/apiProject/apiOfferQuery.js +18 -18
  131. package/src/api/apiProject/apiPlan.js +21 -21
  132. package/src/api/apiProject/apiProject.js +158 -158
  133. package/src/api/apiProjectProcurement/apiProjectProcurement.js +88 -88
  134. package/src/api/apiPurchase/apiPurchase.js +67 -67
  135. package/src/api/apiPurchaseApply.js +15 -15
  136. package/src/api/apiPurchasePay.js +16 -16
  137. package/src/api/apiRankManagement.js +24 -24
  138. package/src/api/apiRecruit.js +37 -37
  139. package/src/api/apiReimbursement/apiReimbursement.js +15 -15
  140. package/src/api/apiRisk/index.js +11 -11
  141. package/src/api/apiRoleManagement.js +15 -15
  142. package/src/api/apiRules/apiRules.js +11 -11
  143. package/src/api/apiSchedule/apiSchedule.js +17 -17
  144. package/src/api/apiSealRecord.js +52 -52
  145. package/src/api/apiSign.js +8 -8
  146. package/src/api/apiSolution/apiSolution.js +9 -9
  147. package/src/api/apiSubcontract.js +35 -35
  148. package/src/api/apiSystem/index.js +40 -40
  149. package/src/api/apiTask.js +76 -76
  150. package/src/api/apiTeam/api.js +3 -3
  151. package/src/api/apiTeam/apiUtils.js +11 -11
  152. package/src/api/apiTender.js +127 -127
  153. package/src/api/apiUser.js +24 -24
  154. package/src/api/apiUserEnterprise/api.js +3 -3
  155. package/src/api/apiUserEnterprise/apiUserEn.js +15 -15
  156. package/src/api/apiVolunteerTeam.js +11 -11
  157. package/src/api/apiWorkarea.js +33 -33
  158. package/src/api/apiXzqh.js +8 -8
  159. package/src/api/common/api.js +3 -3
  160. package/src/api/common/apiUtils.js +9 -9
  161. package/src/api/customer.js +21 -21
  162. package/src/api/evection.js +19 -19
  163. package/src/api/guide.js +9 -9
  164. package/src/api/sociaManageApi.js +30 -30
  165. package/src/assets/Area.json +1773 -1773
  166. package/src/assets/css/quill.bubble.css +952 -952
  167. package/src/assets/css/quill.core.css +397 -397
  168. package/src/assets/css/quill.snow.css +945 -945
  169. package/src/assets/data.js +284 -284
  170. package/src/assets/fonts/Read Me.txt +7 -7
  171. package/src/assets/fonts/demo-files/demo.css +155 -155
  172. package/src/assets/fonts/demo-files/demo.js +30 -30
  173. package/src/assets/fonts/demo.html +951 -951
  174. package/src/assets/fonts/fonts/icomoon.svg +130 -130
  175. package/src/assets/fonts/style.css +563 -563
  176. package/src/assets/icons/checkbox.svg +12 -12
  177. package/src/assets/icons/columns-3.svg +12 -12
  178. package/src/assets/icons/columns.svg +12 -12
  179. package/src/assets/icons/custom-table.svg +12 -12
  180. package/src/assets/icons/date.svg +19 -19
  181. package/src/assets/icons/daterange.svg +12 -12
  182. package/src/assets/icons/fuzhi.svg +11 -11
  183. package/src/assets/icons/fuzhi_03.svg +5 -5
  184. package/src/assets/icons/gaojizujian.svg +12 -12
  185. package/src/assets/icons/groupSummary.svg +12 -12
  186. package/src/assets/icons/groupTitle.svg +12 -12
  187. package/src/assets/icons/image-uploader.svg +12 -12
  188. package/src/assets/icons/input-number.svg +12 -12
  189. package/src/assets/icons/input.svg +12 -12
  190. package/src/assets/icons/quill-editor.svg +12 -12
  191. package/src/assets/icons/radio.svg +12 -12
  192. package/src/assets/icons/select.svg +12 -12
  193. package/src/assets/icons/switch.svg +12 -12
  194. package/src/assets/icons/textarea.svg +12 -12
  195. package/src/assets/icons/upload-file.svg +12 -12
  196. package/src/assets/marketplace.js +289 -289
  197. package/src/components/ComAduitNew.vue +477 -477
  198. package/src/components/CommonAduit.vue +512 -512
  199. package/src/components/CommonAduitNew.vue +906 -906
  200. package/src/components/CommonAduitNews.vue +753 -753
  201. package/src/components/CommonUEditer.vue +63 -63
  202. package/src/components/PersonCenter/Mess.vue +59 -59
  203. package/src/components/PersonCenter/Title.vue +80 -80
  204. package/src/components/SvgIcon.vue +57 -57
  205. package/src/components/XmCommonAduit.vue +761 -761
  206. package/src/components/feiyCommon.vue +713 -713
  207. package/src/components/form/card.js +5 -5
  208. package/src/components/form/chinese.js +6 -6
  209. package/src/components/form/chinessstring.js +5 -5
  210. package/src/components/form/hunhe.js +8 -8
  211. package/src/components/form/hunhecq.js +8 -8
  212. package/src/components/form/hunheh.js +8 -8
  213. package/src/components/form/num.js +12 -12
  214. package/src/components/form/numstring.js +5 -5
  215. package/src/components/form/user.js +7 -7
  216. package/src/components/form/validate.js +42 -42
  217. package/src/components/form/validcredit.js +5 -5
  218. package/src/components/fundCommonAduit.vue +661 -661
  219. package/src/components/public/BaseCustomTable.vue +71 -71
  220. package/src/components/public/BaseDialog.vue +144 -144
  221. package/src/components/public/BaseEmptyData.vue +73 -73
  222. package/src/components/public/BaseFormTitle.vue +39 -39
  223. package/src/components/public/BasePagination.vue +55 -55
  224. package/src/components/public/BaseRouter.vue +14 -14
  225. package/src/components/public/BaseUpload.vue +185 -185
  226. package/src/components/public/Bottom.vue +62 -62
  227. package/src/components/public/Footer.vue +412 -412
  228. package/src/components/public/Header.vue +30 -30
  229. package/src/components/public/LeftMenu.vue +170 -170
  230. package/src/components/public/MemberSelection coby.vue +444 -444
  231. package/src/components/public/MemberSelection.vue +487 -487
  232. package/src/components/public/NewLeftMenu.vue +418 -418
  233. package/src/components/public/PicturesPreview.vue +62 -62
  234. package/src/components/public/Popout.vue +147 -147
  235. package/src/components/public/TagLine.vue +353 -353
  236. package/src/components/public/components/BaseImageUploadDrag.vue +320 -320
  237. package/src/components/public/components/HeadBar.vue +315 -315
  238. package/src/components/public/components/MenuList.vue +110 -110
  239. package/src/components/public/components/NewHeadBar.vue +936 -936
  240. package/src/components/public/components/QuickGoods.vue +273 -273
  241. package/src/components/public/components/Search.vue +164 -164
  242. package/src/components/public/components/Userinfo.vue +383 -383
  243. package/src/components/utils/pdf.js +254 -254
  244. package/src/components/xmfyCommonAduit.vue +752 -752
  245. package/src/filters/index.js +619 -619
  246. package/src/fnc/arr.js +102 -102
  247. package/src/fnc/quill-config.js +121 -121
  248. package/src/fnc/unit.js +102 -102
  249. package/src/fnc/verify.js +187 -187
  250. package/src/fnc/verifyStatus.js +24 -24
  251. package/src/formBuilder/apiBusiness.js +67 -67
  252. package/src/formBuilder/business.js +1039 -1039
  253. package/src/formBuilder/component/components/data.js +719 -719
  254. package/src/formBuilder/component/components/purchaseIndex.vue +1109 -1109
  255. package/src/formBuilder/component/purchase.vue +35 -35
  256. package/src/formBuilder/components/app-main/components/components/GroupSummary.vue +33 -33
  257. package/src/formBuilder/components/app-main/components/components/GroupTitle.vue +33 -33
  258. package/src/formBuilder/components/app-main/components/components/bank.vue +226 -226
  259. package/src/formBuilder/components/app-main/components/components/bankFormHeard.vue +298 -298
  260. package/src/formBuilder/components/app-main/components/components/builder.vue +718 -718
  261. package/src/formBuilder/components/app-main/components/components/columns.vue +393 -393
  262. package/src/formBuilder/components/app-main/components/components/customTable.vue +1758 -1758
  263. package/src/formBuilder/components/app-main/components/components/formDep.vue +105 -105
  264. package/src/formBuilder/components/app-main/components/components/handleCode.vue +39 -39
  265. package/src/formBuilder/components/app-main/components/components/itemOption.vue +116 -116
  266. package/src/formBuilder/components/app-main/components/components/linkForm.vue +116 -116
  267. package/src/formBuilder/components/app-main/components/components/listDesign.vue +772 -772
  268. package/src/formBuilder/components/app-main/components/components/optionSolt.js +78 -78
  269. package/src/formBuilder/components/app-main/components/components/person.vue +104 -104
  270. package/src/formBuilder/components/app-main/components/components/postman.vue +40 -40
  271. package/src/formBuilder/components/app-main/components/components/previewDialog.vue +391 -391
  272. package/src/formBuilder/components/app-main/components/components/tableIndex.vue +51 -51
  273. package/src/formBuilder/components/app-main/components/components/tableList.vue +561 -561
  274. package/src/formBuilder/components/app-main/components/components/twoColumns.vue +52 -52
  275. package/src/formBuilder/components/app-main/components/main-center.vue +187 -187
  276. package/src/formBuilder/components/app-main/components/main-header.vue +351 -351
  277. package/src/formBuilder/components/app-main/components/main-left.vue +179 -179
  278. package/src/formBuilder/components/app-main/components/main-right/components/components/calculateDialog.vue +914 -914
  279. package/src/formBuilder/components/app-main/components/main-right/components/components/curTextArea.vue +338 -338
  280. package/src/formBuilder/components/app-main/components/main-right/components/components/form-item-rules.vue +190 -190
  281. package/src/formBuilder/components/app-main/components/main-right/components/components/linkageDialog.vue +25 -25
  282. package/src/formBuilder/components/app-main/components/main-right/components/components/searchMixin.js +26 -26
  283. package/src/formBuilder/components/app-main/components/main-right/components/form-config.vue +284 -284
  284. package/src/formBuilder/components/app-main/components/main-right/components/form-item-attrs.vue +407 -407
  285. package/src/formBuilder/components/app-main/components/main-right/components/form-item-config.vue +478 -478
  286. package/src/formBuilder/components/app-main/components/main-right/index.vue +203 -203
  287. package/src/formBuilder/components/app-main/index.vue +329 -329
  288. package/src/formBuilder/comps.js +283 -283
  289. package/src/formBuilder/config/button.js +63 -63
  290. package/src/formBuilder/config/cascader-panel.js +224 -224
  291. package/src/formBuilder/config/cascader.js +306 -306
  292. package/src/formBuilder/config/checkbox.js +67 -67
  293. package/src/formBuilder/config/color.js +42 -42
  294. package/src/formBuilder/config/columns.js +30 -30
  295. package/src/formBuilder/config/custom-table.js +49 -49
  296. package/src/formBuilder/config/date.js +107 -107
  297. package/src/formBuilder/config/daterange.js +47 -47
  298. package/src/formBuilder/config/datetime.js +78 -78
  299. package/src/formBuilder/config/datetimerange.js +111 -111
  300. package/src/formBuilder/config/formDep.js +37 -37
  301. package/src/formBuilder/config/groupSummary.js +23 -23
  302. package/src/formBuilder/config/groupTitle.js +23 -23
  303. package/src/formBuilder/config/handleCode.js +23 -23
  304. package/src/formBuilder/config/image-uploader.js +113 -113
  305. package/src/formBuilder/config/input.js +162 -162
  306. package/src/formBuilder/config/json-editor.js +31 -31
  307. package/src/formBuilder/config/linkForm.js +69 -69
  308. package/src/formBuilder/config/number.js +49 -49
  309. package/src/formBuilder/config/password.js +82 -82
  310. package/src/formBuilder/config/person.js +37 -37
  311. package/src/formBuilder/config/postman.js +23 -23
  312. package/src/formBuilder/config/purchase.js +19 -19
  313. package/src/formBuilder/config/quill-editor.js +66 -66
  314. package/src/formBuilder/config/radio-button.js +44 -44
  315. package/src/formBuilder/config/radio.js +69 -69
  316. package/src/formBuilder/config/rate.js +93 -93
  317. package/src/formBuilder/config/select.js +105 -105
  318. package/src/formBuilder/config/slider.js +92 -92
  319. package/src/formBuilder/config/switch.js +35 -35
  320. package/src/formBuilder/config/tag.js +79 -79
  321. package/src/formBuilder/config/text.js +18 -18
  322. package/src/formBuilder/config/textarea.js +129 -129
  323. package/src/formBuilder/config/time.js +60 -60
  324. package/src/formBuilder/config/timerange.js +94 -94
  325. package/src/formBuilder/config/tree-select.js +100 -100
  326. package/src/formBuilder/config/upload-file.js +100 -100
  327. package/src/formBuilder/config/yesno.js +39 -39
  328. package/src/formBuilder/config.js +16 -16
  329. package/src/formBuilder/extend/index.js +20 -20
  330. package/src/formBuilder/index.js +39 -39
  331. package/src/formBuilder/menuConfig.js +36 -36
  332. package/src/formBuilder/mixins/index.js +215 -215
  333. package/src/formBuilder/tool.js +101 -101
  334. package/src/function/base.js +13 -13
  335. package/src/function/findCompanyTree.js +94 -94
  336. package/src/function/formulaAnalysis.js +44 -44
  337. package/src/function/verify.js +23 -23
  338. package/src/http/index.js +219 -219
  339. package/src/http/type.js +82 -82
  340. package/src/library/AddType/Index.js +17 -17
  341. package/src/library/AddType/Index.vue +201 -201
  342. package/src/library/AreaChange/regionCascader/regionCascader.vue +155 -155
  343. package/src/library/BigImg/BigImage1/Index.js +17 -17
  344. package/src/library/BigImg/BigImage1/Index.vue +125 -125
  345. package/src/library/Button/Button1/Index.js +17 -17
  346. package/src/library/Button/Button1/Index.vue +60 -60
  347. package/src/library/Button/Button2/Index.js +17 -17
  348. package/src/library/Button/Button2/Index.vue +52 -52
  349. package/src/library/Button/Button3/Index.js +17 -17
  350. package/src/library/Button/Button3/Index.vue +56 -56
  351. package/src/library/Button/Button4/Index.js +17 -17
  352. package/src/library/Button/Button4/Index.vue +56 -56
  353. package/src/library/Button/Button5/Index.js +17 -17
  354. package/src/library/Button/Button5/Index.vue +55 -55
  355. package/src/library/Button/Button6/Index.js +17 -17
  356. package/src/library/Button/Button6/Index.vue +74 -74
  357. package/src/library/Button/Button7/Index.js +17 -17
  358. package/src/library/Button/Button7/Index.vue +56 -56
  359. package/src/library/ConfirmPlaugin/ConfirmPlaugin1/Index.js +17 -17
  360. package/src/library/ConfirmPlaugin/ConfirmPlaugin1/Index.vue +147 -147
  361. package/src/library/ConfirmPlaugin/ConfirmPlaugin2/Index.js +17 -17
  362. package/src/library/ConfirmPlaugin/ConfirmPlaugin2/Index.vue +137 -137
  363. package/src/library/ConfirmPlaugin/ConfirmPlaugin3/Index.vue +142 -142
  364. package/src/library/ConfirmPlaugin/ConfirmPlaugin4/Index.vue +141 -141
  365. package/src/library/ConfirmPlaugin/ConfirmPlaugin5/Index.vue +121 -121
  366. package/src/library/ConfirmPlaugin/ConfirmPlaugin6/Index.vue +142 -142
  367. package/src/library/Input/Input1/Index.js +17 -17
  368. package/src/library/Input/Input1/Index.vue +66 -66
  369. package/src/library/NoMessage/NoMessage0/Index.js +17 -17
  370. package/src/library/NoMessage/NoMessage0/Index.vue +60 -60
  371. package/src/library/NoMessage/NoMessage1/Index.js +17 -17
  372. package/src/library/NoMessage/NoMessage1/Index.vue +66 -66
  373. package/src/library/NoMessage/NoMessage2/Index.js +17 -17
  374. package/src/library/NoMessage/NoMessage2/Index.vue +66 -66
  375. package/src/library/Tab/Tab1/TabBox1/Index.vue +36 -36
  376. package/src/library/Tab/Tab1/TabInner1/Index.vue +70 -70
  377. package/src/library/Tab/Tab2/TabBox2/Index.vue +36 -36
  378. package/src/library/Tab/Tab2/TabInner2/Index.vue +66 -66
  379. package/src/library/Table/Table1/Td1/Index.js +17 -17
  380. package/src/library/Table/Table1/Td1/Index.vue +110 -110
  381. package/src/library/Table/Table1/Tr1/Index.js +17 -17
  382. package/src/library/Table/Table1/Tr1/Index.vue +53 -53
  383. package/src/library/Table/Table2/Td2/Index.js +17 -17
  384. package/src/library/Table/Table2/Td2/Index.vue +90 -90
  385. package/src/library/Table/Table2/Tr2/Index.js +17 -17
  386. package/src/library/Table/Table2/Tr2/Index.vue +66 -66
  387. package/src/library/Table/Table3/Td3/Index.js +17 -17
  388. package/src/library/Table/Table3/Td3/Index.vue +109 -109
  389. package/src/library/Table/Table3/Tr3/Index.js +17 -17
  390. package/src/library/Table/Table3/Tr3/Index.vue +128 -128
  391. package/src/library/Table/Table4/Td4/Index.js +17 -17
  392. package/src/library/Table/Table4/Td4/Index.vue +114 -114
  393. package/src/library/Table/Table4/Tr4/Index.js +17 -17
  394. package/src/library/Table/Table4/Tr4/Index.vue +53 -53
  395. package/src/library/Title/Title1/Index.js +17 -17
  396. package/src/library/Title/Title1/Index.vue +80 -80
  397. package/src/library/toast/Index.js +17 -17
  398. package/src/library/toast/Index.vue +86 -86
  399. package/src/main.js +161 -161
  400. package/src/mixins/Export2Excel.js +207 -207
  401. package/src/mixins/chartOption.js +110 -110
  402. package/src/mixins/companyMixins.js +84 -84
  403. package/src/mixins/quillOptions.js +15 -15
  404. package/src/mixins/validate/deviceManage.js +211 -211
  405. package/src/mixins/validate/systemConfig.js +117 -117
  406. package/src/mixins/validate/validate.js +25 -25
  407. package/src/public/apiUser/apiUser.js +10 -10
  408. package/src/public/areaFunction.js +26 -26
  409. package/src/public/link.js +91 -91
  410. package/src/public/stageData.js +495 -495
  411. package/src/public/topmenu.js +68 -68
  412. package/src/router/index.js +225 -225
  413. package/src/router/setting/BaseRoutes.js +1639 -1639
  414. package/src/router/setting/MenuDevMock.js +1570 -1570
  415. package/src/router/setting/modules/login.js +45 -45
  416. package/src/router/setting/noAuthRouter.js +109 -109
  417. package/src/router/setting/routes.js +55 -55
  418. package/src/static/css/flex.css +75 -75
  419. package/src/static/css/switch.scss +31 -31
  420. package/src/storage/cookies.js +37 -37
  421. package/src/storage/localStorage.js +36 -36
  422. package/src/storage/sessionStorage.js +25 -25
  423. package/src/store/formBuilder/formAttrDefault.js +28 -28
  424. package/src/store/formBuilder/index.js +40 -40
  425. package/src/store/index.js +553 -553
  426. package/src/styles/color.scss +24 -24
  427. package/src/styles/offer.scss +39 -39
  428. package/src/styles/s-reset.scss +52 -52
  429. package/src/styles/static-style.scss +797 -797
  430. package/src/styles/talent.scss +26 -26
  431. package/src/styles/variable.scss +69 -69
  432. package/src/styles/workflow/workflow.css +1308 -1308
  433. package/src/utils/TableFormTypeList.js +26 -26
  434. package/src/utils/allRouter.js +5579 -5579
  435. package/src/utils/auditUtil.js +535 -535
  436. package/src/utils/commonComponents.js +34 -34
  437. package/src/utils/commonFunc.js +213 -213
  438. package/src/utils/deepCopyArray.js +9 -9
  439. package/src/utils/dict.js +49 -49
  440. package/src/utils/directive.js +26 -26
  441. package/src/utils/emoji.js +16 -16
  442. package/src/utils/flator.js +18 -18
  443. package/src/utils/imMeeting.js +1180 -1180
  444. package/src/utils/index.js +105 -105
  445. package/src/utils/initRouter.js +94 -94
  446. package/src/utils/map.js +23 -23
  447. package/src/utils/passwordStrength.js +177 -177
  448. package/src/utils/style.js +30 -30
  449. package/src/utils/validate.js +30 -30
  450. package/src/views/404.vue +53 -53
  451. package/src/views/Login/Login.vue +50 -50
  452. package/src/views/Login/Passfind.vue +347 -347
  453. package/src/views/Login/Passfindnext.vue +146 -146
  454. package/src/views/Login/Sign.vue +55 -55
  455. package/src/views/Login/SignSuccessfully.vue +132 -132
  456. package/src/views/Login/appDownload.vue +224 -224
  457. package/src/views/Login/clientDownload.vue +201 -201
  458. package/src/views/Login/components/Background.vue +153 -153
  459. package/src/views/Login/components/FormLogin.vue +1001 -1001
  460. package/src/views/Login/components/FormPassFind.vue +395 -395
  461. package/src/views/Login/components/FormSign.vue +493 -493
  462. package/src/views/Login/components/Title.vue +301 -301
  463. package/src/views/Login/components/agreeMent.vue +111 -111
  464. package/src/views/Login/components/companysign.vue +1296 -1296
  465. package/src/views/Login/components/guideLogin.vue +984 -984
  466. package/src/views/formBuilder/components/addNode.vue +119 -119
  467. package/src/views/formBuilder/components/approverSelector.vue +493 -493
  468. package/src/views/formBuilder/components/baseRoute.vue +315 -315
  469. package/src/views/formBuilder/components/builderHeader.vue +106 -106
  470. package/src/views/formBuilder/components/conditionConfig.js +588 -588
  471. package/src/views/formBuilder/components/conditionNode.vue +191 -191
  472. package/src/views/formBuilder/components/dataDefault.js +147 -147
  473. package/src/views/formBuilder/components/depFormNode.vue +583 -583
  474. package/src/views/formBuilder/components/linkForm.vue +566 -566
  475. package/src/views/formBuilder/components/linkFormList.vue +821 -821
  476. package/src/views/formBuilder/components/menuConfig.vue +1752 -1752
  477. package/src/views/formBuilder/components/newNodeForm.vue +426 -426
  478. package/src/views/formBuilder/components/newsection.vue +424 -424
  479. package/src/views/formBuilder/components/nodeConditionConfig cody.vue +376 -376
  480. package/src/views/formBuilder/components/nodeConditionConfig.vue +603 -603
  481. package/src/views/formBuilder/components/nodeForm.vue +355 -355
  482. package/src/views/formBuilder/components/nodeMenu.vue +147 -147
  483. package/src/views/formBuilder/components/personNode.vue +566 -566
  484. package/src/views/formBuilder/components/planNode.vue +269 -269
  485. package/src/views/formBuilder/designListPage.vue +457 -457
  486. package/src/views/formBuilder/formDataDetail.vue +565 -565
  487. package/src/views/formBuilder/formGeneration.vue +904 -904
  488. package/src/views/formBuilder/index.vue +242 -242
  489. package/src/views/formBuilder/process-1.vue +976 -976
  490. package/src/views/formBuilder/process-2.vue +1323 -1323
  491. package/src/views/formBuilder/process.vue +662 -431
  492. package/src/views/formBuilder/processList.vue +877 -877
  493. package/src/views/formBuilder/service/ProcessBuilder.js +136 -136
  494. package/src/views/formBuilder/service/RsxzFieldCollection.js +199 -0
  495. package/src/views/formBuilder/workflow/addNode.vue +95 -95
  496. package/src/views/formBuilder/workflow/initData.js +205 -205
  497. package/src/views/formBuilder/workflow/nodeWrap.vue +731 -731
  498. package/src/views/guide.vue +227 -227
  499. package/src/views/guideIndex.vue +284 -284
  500. package/tests/unit/.eslintrc.js +5 -5
  501. package/tests/unit/example.spec.js +13 -13
  502. package/vue.config.js +287 -287
@@ -1,984 +1,984 @@
1
- <!--
2
- * @Descripttion: 未描述
3
- * @version: 1.0.0
4
- * @Author: Chendajiang
5
- * @Date: 2019-08-09 11:22:34
6
- * @LastEditors: Yxj
7
- * @LastEditTime: 2020-10-09 19:30:16
8
- -->
9
-
10
- <template>
11
- <div class="login-box-right" v-loading="loginloading">
12
- <div class="pasLog">
13
- <div class="login-box-right-tab">
14
- <div :class="{'login-box-right-tab-click':tabClick == 3}" @click="clickTabClick(3)">扫一扫</div>
15
- <div :class="{'login-box-right-tab-click':tabClick == 1}" @click="clickTabClick(1)">密码登录</div>
16
- <div :class="{'login-box-right-tab-click':tabClick == 2}" @click="clickTabClick(2)">验证码登录</div>
17
- </div>
18
- <div v-show="tabClick == 1">
19
- <div style="height: 20px;"></div>
20
- <el-form ref="form1" :model="form1" :rules="rules1">
21
- <el-form-item prop="username">
22
- <div class="login-tel login-input">
23
- <div class="bg-img"></div>
24
- <div class="bg-line"></div>
25
- <el-input
26
- autocomplete="off"
27
- v-model="form1.username"
28
- placeholder="请输入手机号码"
29
- @input="changeTel(1)"
30
- ></el-input>
31
- </div>
32
- </el-form-item>
33
- <el-form-item prop="password">
34
- <div class="login-password login-input">
35
- <div class="bg-img"></div>
36
- <div class="bg-line"></div>
37
- <div class="bg-eye" @click="showEye = !showEye">
38
- <img v-if="showEye" src="@/assets/login/close-eye.png" alt />
39
- <img v-if="!showEye" src="@/assets/login/eye.png" alt />
40
- </div>
41
- <input type="text" style="display: none;" />
42
- <el-input
43
- autocomplete="new-password"
44
- ref="password"
45
- v-if="showEye"
46
- :type="type"
47
- @focus="onFocus"
48
- onpaste="return false"
49
- oncontextmenu="return false"
50
- oncopy="return false"
51
- oncut="return false"
52
- oninput="if(value.length>20)value=value.slice(0,20)"
53
- v-model="form1.password"
54
- placeholder="请输入密码"
55
- ></el-input>
56
- <el-input
57
- v-if="!showEye"
58
- autocomplete="new-password"
59
- type="text"
60
- onpaste="return false"
61
- oncontextmenu="return false"
62
- oncopy="return false"
63
- oncut="return false"
64
- oninput="if(value.length>20)value=value.slice(0,20)"
65
- v-model="form1.password"
66
- placeholder="请输入密码"
67
- ></el-input>
68
- </div>
69
- </el-form-item>
70
- </el-form>
71
- <div class="login-button">
72
- <Button6 @click="login" style="margin-top: 30px;margin-bottom: 30px;">登录</Button6>
73
- </div>
74
- <div class="login-font font14">
75
- <div @click="go(0)">用户注册</div>
76
- <div @click="go(1)">忘记密码?</div>
77
- </div>
78
- </div>
79
- <div v-show="tabClick == 2">
80
- <div style="height: 20px;"></div>
81
- <el-form ref="form2" :model="form2" :rules="rules2">
82
- <el-form-item prop="username">
83
- <div class="login-tel login-input">
84
- <div class="bg-img"></div>
85
- <div class="bg-line"></div>
86
- <el-input
87
- autocomplete="off"
88
- v-model="form2.username"
89
- placeholder="请输入手机号码"
90
- @input="changeTel(2)"
91
- ></el-input>
92
- </div>
93
- </el-form-item>
94
- <el-form-item prop="short">
95
- <div class="login-short-box">
96
- <div class="login-password login-input">
97
- <div class="bg-img"></div>
98
- <div class="bg-line"></div>
99
- <el-input
100
- type="text"
101
- oninput="if(value.length>4)value=value.slice(0,4)"
102
- v-model="form2.short"
103
- placeholder="请输入验证码"
104
- ></el-input>
105
- </div>
106
- <div>
107
- <Button6 v-if="ifGetCode && codeFont == '获取验证码'" @click="getSMSLoginCode">获取验证码</Button6>
108
- <Button6 v-if="!(ifGetCode && codeFont == '获取验证码')" :disabled="true">{{codeFont}}</Button6>
109
- </div>
110
- </div>
111
- </el-form-item>
112
- </el-form>
113
- <div class="login-button">
114
- <!-- <el-button type="primary" @click="login">登录</el-button> -->
115
- <Button6 @click="login" style="margin-top: 30px;margin-bottom: 30px;">登录</Button6>
116
- </div>
117
- <div class="login-font font14">
118
- <div @click="go(0)">用户注册</div>
119
- <div @click="go(1)">忘记密码?</div>
120
- </div>
121
- </div>
122
- <div style="position: relative;height: 283px;" v-show="tabClick == 3">
123
- <div class="qrLog">
124
- <div class="titleText">
125
- <span>手机扫码</span>
126
- <span>安全登录</span>
127
- </div>
128
- <div class="QRCodeBox">
129
- <canvas id="QRCode"></canvas>
130
- <div v-show="shade" class="QRCodechenge">
131
- <p>请重新刷新二维码</p>
132
- <el-button type="primary" @click="getQRCode()">点击刷新</el-button>
133
- </div>
134
- <div v-show="successShade" class="QRCodechenge successShade">
135
- <img src="./image/icon_success.png" alt />
136
- <p>登录成功</p>
137
- </div>
138
- </div>
139
- <div class="textBox">
140
- <div class="left">
141
- <img src="./image/sys.png" />
142
- </div>
143
- <div class="right">
144
- <p>
145
- 打开
146
- <span>企管帮APP</span>
147
- </p>
148
- <p>扫一扫</p>
149
- </div>
150
- </div>
151
- </div>
152
- </div>
153
- </div>
154
- </div>
155
- </template>
156
- <script>
157
- import apiUser from "@/api/apiUser";
158
- import apiAuth from "@/api/apiAuth";
159
- import { isvalidPhone } from "@/components/form/validate";
160
- import apiMaterials from "@/api/apiMaterials/apiMaterials";
161
- import axios from "axios";
162
- import sessionStorage from "@/storage/sessionStorage.js";
163
- import cookie from "@/storage/cookies";
164
- import localStorage from "@/storage/localStorage";
165
- import { apiHome } from "@/api/apiHome";
166
- import qs from "qs";
167
- import QRCode from "qrcode";
168
-
169
- export default {
170
- name: "FormLogin",
171
- mixins: [],
172
- extends: {},
173
- props: {},
174
- data() {
175
- return {
176
- successShade: false,
177
- timeId: null,
178
- time: 0,
179
- shade: false,
180
- QRCodeMsg: "生成二维码信息",
181
- loginloading: false,
182
- codeFont: "获取验证码",
183
- codeNum: 60,
184
- ifGetCode: false,
185
- tabClick: 1,
186
- type: "text",
187
- showEye: true,
188
- showCode: false,
189
- form1: {
190
- username: "", // 17609321099
191
- password: "", // 000qwer
192
- code: "0000",
193
- grant_type: "password",
194
- randomStr: "",
195
- remember_me: false,
196
- short: ""
197
- },
198
- form2: {
199
- username: "",
200
- short: ""
201
- },
202
- img: `${process.env.VUE_APP_APIUSER}/code/`,
203
- rules1: {
204
- username: {
205
- required: true,
206
- validator: this.validPhone,
207
- trigger: "blur"
208
- },
209
- password: [
210
- { required: true, message: "密码不能为空", trigger: "blur" }
211
- ]
212
- },
213
- rules2: {
214
- username: {
215
- required: true,
216
- validator: this.validPhone,
217
- trigger: "blur"
218
- },
219
- short: [
220
- { required: true, validator: this.validShort, trigger: "blur" }
221
- ]
222
- }
223
- };
224
- },
225
- computed: {},
226
- components: {},
227
- filter: {},
228
- watch: {
229
- QRCodeMsg(val) {
230
- // 获取页面的canvas
231
- const msg = document.getElementById("QRCode");
232
- // 将获取到的数据(val)画到msg(canvas)上
233
- QRCode.toCanvas(msg, val, { width: 200, height: 200 }, function(error) {
234
- console.log(error);
235
- });
236
- },
237
- tabClick(newVal, oldVal) {
238
- if (newVal == 1) {
239
- // this.$refs.form2.resetFields()
240
- this.form1.username = this.form2.username;
241
- // if (this.form2.username.length == 11) {
242
- // if (!isvalidPhone(this.form2.username)) {
243
- // this.ifGetCode = false
244
- // } else {
245
- // this.ifGetCode = true
246
- // }
247
- // }
248
- } else {
249
- // this.$refs.form1.resetFields()
250
- this.form2.username = this.form1.username;
251
- if (this.form2.username.length == 11) {
252
- if (!isvalidPhone(this.form2.username)) {
253
- this.ifGetCode = false;
254
- } else {
255
- this.ifGetCode = true;
256
- }
257
- }
258
- }
259
- }
260
- },
261
- methods: {
262
- go(e) {
263
- if (e == 0) {
264
- this.$emit("goSign");
265
- } else {
266
- this.$emit("goFind");
267
- }
268
- },
269
- async generateUUID() {
270
- const res = await apiUser.createQrCode();
271
- if (res.data.code == 200) {
272
- this.uuid = res.data.data.key;
273
- this.QRCodeMsg = res.data.data.content;
274
- }
275
- },
276
- async isLogin(uuid) {
277
- const res = await apiUser.queryQRCode({ uuid });
278
- if (res.data.code == 200) {
279
- if (res.data.data.resourceToken != "") {
280
- this.successShade = true;
281
- window.clearTimeout(this.timeId);
282
- cookie.cookieSet("token", res.data.data.resourceToken);
283
- this.$router.push({ path: "/index" });
284
- }
285
- }
286
- },
287
- getQRCode() {
288
- const that = this;
289
- that.shade = false;
290
- that.time = 0;
291
- that.generateUUID();
292
- that.timeId = setInterval(() => {
293
- that.time++;
294
- that.isLogin(that.uuid);
295
- if (that.time == 60) {
296
- that.shade = true;
297
- window.clearTimeout(that.timeId);
298
- }
299
- }, 1000);
300
- },
301
- clickTabClick(num) {
302
- this.tabClick = num;
303
- if (num == 3) {
304
- this.getQRCode();
305
- } else {
306
- window.clearTimeout(this.timeId);
307
- }
308
- // // console.log(num)
309
- // if (num == 2) {
310
- // this.changeTel(2)
311
- // }
312
- },
313
- setTime() {
314
- this.codeFont = --this.codeNum + "s";
315
- const setInter = setInterval(
316
- function() {
317
- this.codeFont = --this.codeNum + "s";
318
- if (this.codeNum == 0) {
319
- this.codeFont = "获取验证码";
320
- this.codeNum = 60;
321
- clearInterval(setInter);
322
- }
323
- }.bind(this),
324
- 1000
325
- );
326
- },
327
- changeTel(type) {
328
- // console.log(this.form2.username)
329
- // ifGetCode 是否可以点击获取验证码
330
- // console.log(type)
331
- if (type == 1) {
332
- if (this.form1.username.length > 11) {
333
- this.form1.username = this.form1.username.slice(0, 11);
334
- }
335
- // this.form2.username = this.form1.username
336
-
337
- return;
338
- }
339
-
340
- if (this.form2.username.length > 11) {
341
- this.form2.username = this.form2.username.slice(0, 11);
342
- }
343
- // this.form1.username = this.form2.username
344
-
345
- if (this.form2.username.length == 11) {
346
- if (!isvalidPhone(this.form2.username)) {
347
- this.ifGetCode = false;
348
- // callback(new Error('请输入正确的手机号'))
349
- } else {
350
- this.ifGetCode = true;
351
- // callback()
352
- }
353
- // this.ifGetCode = true
354
- return;
355
- }
356
- this.ifGetCode = false;
357
- },
358
-
359
- async getSMSLoginCode() {
360
- this.setTime();
361
- const data = {
362
- uname: this.form2.username,
363
- type: 2,
364
- channel: 2
365
- };
366
- const res = await apiAuth.getSMSLoginCode(data);
367
-
368
- if (res.data.code == 0) {
369
- this.$_toast({ msg: "发送成功" });
370
- return;
371
- }
372
- if (res.data.code == 500) {
373
- this.$_toast({ msg: res.data.msg, type: "error" });
374
- return;
375
- }
376
- this.$_toast({ msg: res.data.msg, type: "error" });
377
- // this.$_toast
378
- // let res = await apiHome.getSMSLoginCode(data)
379
- // console.log(res.data.data)
380
- // /authentication/mobile?mobile=18699155392&smsCode=7825
381
- },
382
- async shortLogin() {
383
- const that = this;
384
- this.$refs["form2"].validate(async(valid) => {
385
- if (valid) {
386
- this.clickEnter(false);
387
- this.loginloading = true;
388
- const form = qs.stringify({
389
- username: this.form2.username,
390
- password: this.form2.short,
391
- grant_type: "sms"
392
- });
393
- axios
394
- .request({
395
- method: "post",
396
- data: form,
397
- headers: {
398
- Authorization:
399
- "Basic MTE3NTI3Njk0NDMyNjAwNDczNjo2M2NkMzYwM2Q5YTc0ZTNiYmI4ZDhiOGE5NmQ3MWVlZA=="
400
- },
401
- url: `${process.env.VUE_APP_API}${
402
- process.env.VUE_APP_AUTHURLTYPE
403
- }/oauth/token`
404
- })
405
- .then(async(res) => {
406
- const data = res;
407
- if (!data.data.code || data.data.code !== 1) {
408
- const token = data.data.access_token;
409
- cookie.cookieSet("token", token);
410
- // await that.getUser();
411
- // that.$router.push({ path: '/home' })
412
- if (process.env.NODE_ENV !== "development") {
413
- that.jump();
414
- } else {
415
- // that.$router.push({ path: "/home" });
416
- that.$router.push({ path: "/" });
417
- }
418
- } else {
419
- that.loginloading = false;
420
- that.clickEnter(true);
421
- // that.errType(data.data);
422
- that.$_toast({ type: "error", msg: data.data.msg, time: 3000 });
423
- }
424
- })
425
- .catch((err) => {
426
- // console.log('error')
427
- that.loginloading = false;
428
- that.clickEnter(true);
429
- that.$_toast({ type: "error", msg: err.msg, time: 3000 });
430
- });
431
- } else {
432
- this.loginloading = false;
433
- return false;
434
- }
435
- });
436
-
437
- // /authentication/mobile?mobile=18699155392&smsCode=7825
438
- // http://192.168.100.213:9090/authentication/mobile?mobile=18609942548&smsCode=2420
439
- },
440
- onFocus() {
441
- this.type = "password";
442
- // console.log(this.$refs.password)
443
- },
444
- clickEnter(bol) {
445
- const that = this;
446
- document.onkeydown = function(e) {
447
- const key = window.event.keyCode;
448
- if (key === 13) {
449
- if (bol) {
450
- that.login();
451
- }
452
- }
453
- };
454
- },
455
- login() {
456
- if (this.tabClick == 2) {
457
- this.shortLogin();
458
- return;
459
- }
460
- this.$refs["form1"].validate(async(valid) => {
461
- if (valid) {
462
- this.clickEnter(false);
463
- this.submit();
464
- } else {
465
- this.loginloading = false;
466
- return false;
467
- }
468
- });
469
- },
470
- submit() {
471
- this.loginloading = true;
472
- const that = this;
473
- const form = qs.stringify({
474
- username: this.form1.username,
475
- password: this.form1.password,
476
- code: this.form1.code,
477
- grant_type: this.form1.grant_type,
478
- randomStr: this.form1.randomStr,
479
- remember_me: false
480
- });
481
- //
482
- axios
483
- .request({
484
- method: "post",
485
- data: form,
486
- headers: {
487
- Authorization:
488
- "Basic MTE3NTI3Njk0NDMyNjAwNDczNjo2M2NkMzYwM2Q5YTc0ZTNiYmI4ZDhiOGE5NmQ3MWVlZA=="
489
- },
490
- url: `${process.env.VUE_APP_API}${
491
- process.env.VUE_APP_AUTHURLTYPE
492
- }/oauth/token`
493
- })
494
- .then(async(res) => {
495
- const data = res;
496
- if (!data.data.code || data.data.code !== 1) {
497
- const token = data.data.access_token;
498
- cookie.cookieSet("token", token);
499
- // await that.getUser();
500
- // that.$router.push({ path: '/home' })
501
- if (process.env.NODE_ENV !== "development") {
502
- that.jump();
503
- } else {
504
- // that.$router.push({ path: "/home" });
505
- that.$router.push({ path: "/index" });
506
- }
507
- } else {
508
- that.clickEnter(true);
509
- that.loginloading = false;
510
- // that.errType(data.data);
511
- that.$_toast({ type: "error", msg: data.data.msg, time: 3000 });
512
- }
513
- })
514
- .catch((err) => {
515
- that.clickEnter(true);
516
- // console.log('err,lkkkk')
517
- that.loginloading = false;
518
- // if (err.response) {
519
- // that.errType(err.response.data);
520
- // } else {
521
- // that.errType(err);
522
- // }
523
- });
524
- },
525
- async jump() {
526
- const referrer = document.referrer;
527
- const host = document.location.host;
528
- const fromPath = sessionStorage.read("fromPath");
529
- // console.log(fromPath, 'fromPath')
530
- if (referrer && referrer.indexOf(host) === -1) {
531
- if (fromPath == "/") {
532
- // window.history.go(-1);
533
- // window.history.back()
534
- this.$router.push({ path: "/index" });
535
- } else {
536
- this.$router.push({ path: "/index" });
537
- }
538
- } else {
539
- // await this.getUser()
540
- this.$router.push({ path: "/index" });
541
- }
542
- },
543
- async shopHasFinish() {
544
- const res = await apiMaterials.shopHasFinish();
545
- switch (res.data.code) {
546
- case 0:
547
- this.$store.commit("SET_STORE_TYPE", true);
548
- break;
549
- case 1:
550
- this.$store.commit("SET_STORE_TYPE", false);
551
- break;
552
- default:
553
- break;
554
- }
555
- // console.log(res.data.code, 'shopHasFinish') // 1 未完善 0 已完善
556
- },
557
- async getUser() {
558
- // 获取用户信息
559
- const res = await apiUser.getUserInfo();
560
- const user = res.data.data;
561
- // let { data } = await apiUser.getCompanyAuthInfo()
562
- // console.log(data.data)
563
- // user['cno'] = data.data.no
564
- this.$store.commit("SET_USER", user);
565
- this.getAuth();
566
- if (user.userRole !== 0) {
567
- // this.shopHasFinish()
568
- }
569
- },
570
- async getAuth() {
571
- const { data } = await apiAuth.getAuthList();
572
- if (data.code === 0) {
573
- this.$store.commit("SET_AUTH_USER", data.result);
574
- localStorage.set("menu", JSON.stringify(data.result.routes));
575
- } else {
576
- this.$message.error(data.msg);
577
- }
578
- },
579
- errType(response) {
580
- console.log(response);
581
- switch (response.code) {
582
- case 1001: // 验证码为空
583
- this.rules.code = {
584
- required: false,
585
- validator: this.validCode,
586
- trigger: "blur"
587
- };
588
- if (!this.showCode) {
589
- // this.$_toast({ type: "error", msg: "请输入验证码" });
590
- //
591
- }
592
- this.showCode = true;
593
- break;
594
- case 1002: // 验证码错误
595
- this.$_toast({ type: "error", msg: "验证码输入有误" });
596
- break;
597
- case 1003: // 验证码已过期,请重新获取
598
- this.$_toast({ type: "error", msg: "验证码已过期,请重新获取" });
599
- break;
600
- case 2001: // 用户不存在
601
- this.$_toast({ type: "error", msg: "该手机号未注册" });
602
- break;
603
- case 2002: // 用户或密码错误
604
- this.$_toast({ type: "error", msg: "手机号或密码有误,请重新输入" });
605
- this.form1.password = "";
606
- break;
607
- case 2003: // 用户被禁用
608
- this.$_toast({ type: "error", msg: "用户被禁用" });
609
- this.form1.password = "";
610
- break;
611
- }
612
- this.clickEnter(true);
613
- },
614
- setRandomStr() {
615
- let time = new Date().getTime();
616
- time = "" + time + parseInt(Math.random() * 1000);
617
- this.form1.randomStr = time;
618
- },
619
- validPhone(rule, value, callback) {
620
- if (!value) {
621
- // this.ifGetCode = false
622
- callback(new Error("请输入电话号码"));
623
- } else if (!isvalidPhone(value)) {
624
- // this.ifGetCode = false
625
- callback(new Error("请输入正确的手机号"));
626
- } else {
627
- // this.ifGetCode = true
628
- callback();
629
- }
630
- },
631
- validShort(rule, value, callback) {
632
- if (!value) {
633
- callback(new Error("请输入验证码"));
634
- } else if (value.length != 4) {
635
- callback(new Error("请输入正确的四位验证码"));
636
- } else {
637
- callback();
638
- }
639
- },
640
- validCode(rule, value, callback) {
641
- if (!value) {
642
- callback(new Error("验证码不能为空"));
643
- } else if (value.length !== 4) {
644
- callback(new Error("验证码输入有误"));
645
- } else {
646
- callback();
647
- }
648
- }
649
- },
650
- created() {
651
- this.setRandomStr();
652
- this.clickEnter(true);
653
- },
654
- mounted() {}
655
- };
656
- </script>
657
-
658
- <style lang="scss" rel="stylesheet/scss" scoped>
659
- .login-box-right {
660
- width: 400px;
661
- background: #fff;
662
- overflow: hidden;
663
- position: absolute;
664
- top: 30px;
665
- right: -30px;
666
- .pasLog {
667
- .login-box-right-tab {
668
- width: 340px;
669
- height: 60px;
670
- line-height: 60px;
671
- position: relative;
672
- .login-box-right-tab-click {
673
- font-weight: bold;
674
- color: rgba(2, 134, 223, 1);
675
- border-bottom: 2px solid rgba(2, 134, 223, 1);
676
- }
677
- > div {
678
- width: 80px;
679
- height: 47px;
680
- color: #333333;
681
- font-size: 16px;
682
- font-weight: 400;
683
- cursor: pointer;
684
- position: absolute;
685
- text-align: center;
686
- border-bottom: 2px solid #fff;
687
- &:nth-child(1) {
688
- left: 130px;
689
- top: 0;
690
- }
691
- &:nth-child(2) {
692
- right: 0;
693
- top: 0;
694
- }
695
- }
696
- }
697
- }
698
-
699
- > div {
700
- width: 340px;
701
- margin: 0 auto;
702
- }
703
- .login-type {
704
- height: 40px;
705
- top: 55px;
706
- > div {
707
- cursor: pointer;
708
- display: inline-block;
709
- vertical-align: middle;
710
- &:nth-child(3) {
711
- text-align: right;
712
- }
713
- }
714
- .type-line {
715
- background: rgba(223, 228, 234, 1);
716
- width: 1px;
717
- height: 28px;
718
- }
719
- .type-click {
720
- font-size: 30px;
721
- color: $default;
722
- width: 218px;
723
- }
724
- .type-noclick {
725
- font-size: 24px;
726
- color: #000;
727
- width: 178px;
728
- }
729
- }
730
- .login-tel {
731
- .bg-img {
732
- background: url("../../../assets/login/login-tel.png") 16px 8px no-repeat;
733
- background-size: 18px 26px;
734
- }
735
- }
736
- .login-user {
737
- .bg-img {
738
- background: url("../../../assets/login/login-user.png") 16px 11px
739
- no-repeat;
740
- background-size: 18px 18px;
741
- }
742
- }
743
- .login-password {
744
- .bg-img {
745
- background: url("../../../assets/login/login-password.png") 16px 11px
746
- no-repeat;
747
- background-size: 17px 19px;
748
- }
749
- }
750
-
751
- .login-font {
752
- cursor: pointer;
753
- overflow: hidden;
754
- margin-bottom: 20px;
755
- > div {
756
- color: #0286df;
757
- font-weight: 400;
758
- display: inline-block;
759
- &:nth-child(1) {
760
- float: left;
761
- }
762
- &:nth-child(2) {
763
- float: right;
764
- }
765
- }
766
- }
767
- }
768
- .QRcodeTab {
769
- width: 58px !important;
770
- position: absolute;
771
- right: 10px;
772
- top: 10px;
773
- z-index: 999;
774
- cursor: pointer;
775
- }
776
- .toast {
777
- width: 143px !important;
778
- height: 28px;
779
- background: rgba(2, 134, 223, 0.1);
780
- position: absolute;
781
- right: 68px;
782
- top: 20px;
783
- border: 1px solid #0286df;
784
- section {
785
- width: 100%;
786
- height: 100%;
787
- display: flex;
788
- align-items: center;
789
- position: relative;
790
- img {
791
- margin-left: 16px;
792
- width: 12px;
793
- height: 14px;
794
- }
795
- span {
796
- margin-left: 9px;
797
- font-size: 12px;
798
- color: #0286df;
799
- }
800
- }
801
- section:before {
802
- content: "";
803
- position: absolute;
804
- width: 0;
805
- height: 0;
806
- border-top: 7px solid transparent;
807
- border-left: 7px solid #0082df;
808
- border-bottom: 7px solid transparent;
809
- font-size: 0;
810
- line-height: 0;
811
- right: -7px;
812
- }
813
- section:after {
814
- content: "";
815
- position: absolute;
816
- width: 0;
817
- height: 0;
818
- border-top: 6px solid transparent;
819
- border-left: 6px solid #e5f3fc;
820
- border-bottom: 6px solid transparent;
821
- font-size: 0;
822
- line-height: 0;
823
- right: -6px;
824
- }
825
- }
826
- .qrLog {
827
- position: absolute;
828
- left: -40px;
829
- width: 420px !important;
830
- .QRCodeBox {
831
- width: 100%;
832
- box-sizing: border-box;
833
- padding: 0 99px;
834
- position: relative;
835
- .QRCodechenge,
836
- .successShade {
837
- width: 100%;
838
- height: 100%;
839
- box-sizing: border-box;
840
- padding: 0 99px;
841
- position: absolute;
842
- left: 0;
843
- top: 0;
844
- background: rgba(255, 255, 255, 0.9);
845
- display: flex;
846
- flex-direction: column;
847
- align-items: center;
848
- justify-content: center;
849
- & > p {
850
- margin: 0;
851
- padding: 0;
852
- margin-bottom: 20px;
853
- font-size: 12px;
854
- color: #333333;
855
- }
856
- }
857
- .successShade {
858
- background: rgba(255, 255, 255, 0.9);
859
- & > p {
860
- font-size: 16px;
861
- font-weight: bold;
862
- margin-top: 10px;
863
- margin-bottom: 0;
864
- }
865
- }
866
- }
867
-
868
- .titleText {
869
- display: flex;
870
- justify-content: space-between;
871
- padding: 0 118px;
872
- span {
873
- color: #0286df;
874
- font-weight: bold;
875
- font-size: 20px;
876
- }
877
- }
878
-
879
- .textBox {
880
- width: 100%;
881
- display: flex;
882
- align-items: center;
883
- box-sizing: border-box;
884
- padding: 0 126px;
885
- .left {
886
- img {
887
- width: 32px;
888
- height: 32px;
889
- }
890
- }
891
- .right {
892
- margin-left: 16px;
893
- & > p {
894
- margin: 0;
895
- padding: 0;
896
- color: #969696;
897
- font-size: 16px;
898
- span {
899
- color: #0286df;
900
- }
901
- }
902
- }
903
- }
904
- .footer {
905
- margin-top: 15px;
906
- display: flex;
907
- color: #666666;
908
- font-size: 14px;
909
- box-sizing: border-box;
910
- padding-right: 20px;
911
- float: right;
912
- div {
913
- cursor: pointer;
914
- }
915
- & > div:last-child {
916
- margin-left: 25px;
917
- }
918
- }
919
- }
920
- </style>
921
- <style lang="scss" rel="stylesheet/scss">
922
- .login-box-right {
923
- .el-input__inner {
924
- border-radius: 0px;
925
- }
926
- .login-short-box {
927
- width: 100%;
928
- height: 100%;
929
- > div {
930
- height: 100%;
931
- &:nth-child(1) {
932
- width: 200px;
933
- float: left;
934
- }
935
- &:nth-child(2) {
936
- width: 120px;
937
- float: right;
938
- > button {
939
- float: right;
940
- border-radius: 0;
941
- }
942
- }
943
- }
944
- }
945
- .login-input {
946
- // background: #fff;
947
- [type="text"],
948
- [type="password"] {
949
- text-indent: 50px;
950
- }
951
- }
952
- .bg-line {
953
- background: #dfe4ea;
954
- width: 1px;
955
- height: 38px;
956
- position: absolute;
957
- left: 50px;
958
- top: 1px;
959
- z-index: 1;
960
- }
961
-
962
- .el-input__inner {
963
- height: 40px;
964
- line-height: 40px;
965
- font-size: 14px;
966
- border: 1px solid #dfe4ea;
967
- }
968
- .bg-img {
969
- z-index: 1;
970
- position: absolute;
971
- left: 0px;
972
- top: 0px;
973
- width: 49px;
974
- height: 36px;
975
- line-height: 20px;
976
- }
977
- .bg-eye {
978
- top: 0px;
979
- right: 16px;
980
- z-index: 1;
981
- position: absolute;
982
- }
983
- }
984
- </style>
1
+ <!--
2
+ * @Descripttion: 未描述
3
+ * @version: 1.0.0
4
+ * @Author: Chendajiang
5
+ * @Date: 2019-08-09 11:22:34
6
+ * @LastEditors: Yxj
7
+ * @LastEditTime: 2020-10-09 19:30:16
8
+ -->
9
+
10
+ <template>
11
+ <div class="login-box-right" v-loading="loginloading">
12
+ <div class="pasLog">
13
+ <div class="login-box-right-tab">
14
+ <div :class="{'login-box-right-tab-click':tabClick == 3}" @click="clickTabClick(3)">扫一扫</div>
15
+ <div :class="{'login-box-right-tab-click':tabClick == 1}" @click="clickTabClick(1)">密码登录</div>
16
+ <div :class="{'login-box-right-tab-click':tabClick == 2}" @click="clickTabClick(2)">验证码登录</div>
17
+ </div>
18
+ <div v-show="tabClick == 1">
19
+ <div style="height: 20px;"></div>
20
+ <el-form ref="form1" :model="form1" :rules="rules1">
21
+ <el-form-item prop="username">
22
+ <div class="login-tel login-input">
23
+ <div class="bg-img"></div>
24
+ <div class="bg-line"></div>
25
+ <el-input
26
+ autocomplete="off"
27
+ v-model="form1.username"
28
+ placeholder="请输入手机号码"
29
+ @input="changeTel(1)"
30
+ ></el-input>
31
+ </div>
32
+ </el-form-item>
33
+ <el-form-item prop="password">
34
+ <div class="login-password login-input">
35
+ <div class="bg-img"></div>
36
+ <div class="bg-line"></div>
37
+ <div class="bg-eye" @click="showEye = !showEye">
38
+ <img v-if="showEye" src="@/assets/login/close-eye.png" alt />
39
+ <img v-if="!showEye" src="@/assets/login/eye.png" alt />
40
+ </div>
41
+ <input type="text" style="display: none;" />
42
+ <el-input
43
+ autocomplete="new-password"
44
+ ref="password"
45
+ v-if="showEye"
46
+ :type="type"
47
+ @focus="onFocus"
48
+ onpaste="return false"
49
+ oncontextmenu="return false"
50
+ oncopy="return false"
51
+ oncut="return false"
52
+ oninput="if(value.length>20)value=value.slice(0,20)"
53
+ v-model="form1.password"
54
+ placeholder="请输入密码"
55
+ ></el-input>
56
+ <el-input
57
+ v-if="!showEye"
58
+ autocomplete="new-password"
59
+ type="text"
60
+ onpaste="return false"
61
+ oncontextmenu="return false"
62
+ oncopy="return false"
63
+ oncut="return false"
64
+ oninput="if(value.length>20)value=value.slice(0,20)"
65
+ v-model="form1.password"
66
+ placeholder="请输入密码"
67
+ ></el-input>
68
+ </div>
69
+ </el-form-item>
70
+ </el-form>
71
+ <div class="login-button">
72
+ <Button6 @click="login" style="margin-top: 30px;margin-bottom: 30px;">登录</Button6>
73
+ </div>
74
+ <div class="login-font font14">
75
+ <div @click="go(0)">用户注册</div>
76
+ <div @click="go(1)">忘记密码?</div>
77
+ </div>
78
+ </div>
79
+ <div v-show="tabClick == 2">
80
+ <div style="height: 20px;"></div>
81
+ <el-form ref="form2" :model="form2" :rules="rules2">
82
+ <el-form-item prop="username">
83
+ <div class="login-tel login-input">
84
+ <div class="bg-img"></div>
85
+ <div class="bg-line"></div>
86
+ <el-input
87
+ autocomplete="off"
88
+ v-model="form2.username"
89
+ placeholder="请输入手机号码"
90
+ @input="changeTel(2)"
91
+ ></el-input>
92
+ </div>
93
+ </el-form-item>
94
+ <el-form-item prop="short">
95
+ <div class="login-short-box">
96
+ <div class="login-password login-input">
97
+ <div class="bg-img"></div>
98
+ <div class="bg-line"></div>
99
+ <el-input
100
+ type="text"
101
+ oninput="if(value.length>4)value=value.slice(0,4)"
102
+ v-model="form2.short"
103
+ placeholder="请输入验证码"
104
+ ></el-input>
105
+ </div>
106
+ <div>
107
+ <Button6 v-if="ifGetCode && codeFont == '获取验证码'" @click="getSMSLoginCode">获取验证码</Button6>
108
+ <Button6 v-if="!(ifGetCode && codeFont == '获取验证码')" :disabled="true">{{codeFont}}</Button6>
109
+ </div>
110
+ </div>
111
+ </el-form-item>
112
+ </el-form>
113
+ <div class="login-button">
114
+ <!-- <el-button type="primary" @click="login">登录</el-button> -->
115
+ <Button6 @click="login" style="margin-top: 30px;margin-bottom: 30px;">登录</Button6>
116
+ </div>
117
+ <div class="login-font font14">
118
+ <div @click="go(0)">用户注册</div>
119
+ <div @click="go(1)">忘记密码?</div>
120
+ </div>
121
+ </div>
122
+ <div style="position: relative;height: 283px;" v-show="tabClick == 3">
123
+ <div class="qrLog">
124
+ <div class="titleText">
125
+ <span>手机扫码</span>
126
+ <span>安全登录</span>
127
+ </div>
128
+ <div class="QRCodeBox">
129
+ <canvas id="QRCode"></canvas>
130
+ <div v-show="shade" class="QRCodechenge">
131
+ <p>请重新刷新二维码</p>
132
+ <el-button type="primary" @click="getQRCode()">点击刷新</el-button>
133
+ </div>
134
+ <div v-show="successShade" class="QRCodechenge successShade">
135
+ <img src="./image/icon_success.png" alt />
136
+ <p>登录成功</p>
137
+ </div>
138
+ </div>
139
+ <div class="textBox">
140
+ <div class="left">
141
+ <img src="./image/sys.png" />
142
+ </div>
143
+ <div class="right">
144
+ <p>
145
+ 打开
146
+ <span>企管帮APP</span>
147
+ </p>
148
+ <p>扫一扫</p>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ </template>
156
+ <script>
157
+ import apiUser from "@/api/apiUser";
158
+ import apiAuth from "@/api/apiAuth";
159
+ import { isvalidPhone } from "@/components/form/validate";
160
+ import apiMaterials from "@/api/apiMaterials/apiMaterials";
161
+ import axios from "axios";
162
+ import sessionStorage from "@/storage/sessionStorage.js";
163
+ import cookie from "@/storage/cookies";
164
+ import localStorage from "@/storage/localStorage";
165
+ import { apiHome } from "@/api/apiHome";
166
+ import qs from "qs";
167
+ import QRCode from "qrcode";
168
+
169
+ export default {
170
+ name: "FormLogin",
171
+ mixins: [],
172
+ extends: {},
173
+ props: {},
174
+ data() {
175
+ return {
176
+ successShade: false,
177
+ timeId: null,
178
+ time: 0,
179
+ shade: false,
180
+ QRCodeMsg: "生成二维码信息",
181
+ loginloading: false,
182
+ codeFont: "获取验证码",
183
+ codeNum: 60,
184
+ ifGetCode: false,
185
+ tabClick: 1,
186
+ type: "text",
187
+ showEye: true,
188
+ showCode: false,
189
+ form1: {
190
+ username: "", // 17609321099
191
+ password: "", // 000qwer
192
+ code: "0000",
193
+ grant_type: "password",
194
+ randomStr: "",
195
+ remember_me: false,
196
+ short: ""
197
+ },
198
+ form2: {
199
+ username: "",
200
+ short: ""
201
+ },
202
+ img: `${process.env.VUE_APP_APIUSER}/code/`,
203
+ rules1: {
204
+ username: {
205
+ required: true,
206
+ validator: this.validPhone,
207
+ trigger: "blur"
208
+ },
209
+ password: [
210
+ { required: true, message: "密码不能为空", trigger: "blur" }
211
+ ]
212
+ },
213
+ rules2: {
214
+ username: {
215
+ required: true,
216
+ validator: this.validPhone,
217
+ trigger: "blur"
218
+ },
219
+ short: [
220
+ { required: true, validator: this.validShort, trigger: "blur" }
221
+ ]
222
+ }
223
+ };
224
+ },
225
+ computed: {},
226
+ components: {},
227
+ filter: {},
228
+ watch: {
229
+ QRCodeMsg(val) {
230
+ // 获取页面的canvas
231
+ const msg = document.getElementById("QRCode");
232
+ // 将获取到的数据(val)画到msg(canvas)上
233
+ QRCode.toCanvas(msg, val, { width: 200, height: 200 }, function(error) {
234
+ console.log(error);
235
+ });
236
+ },
237
+ tabClick(newVal, oldVal) {
238
+ if (newVal == 1) {
239
+ // this.$refs.form2.resetFields()
240
+ this.form1.username = this.form2.username;
241
+ // if (this.form2.username.length == 11) {
242
+ // if (!isvalidPhone(this.form2.username)) {
243
+ // this.ifGetCode = false
244
+ // } else {
245
+ // this.ifGetCode = true
246
+ // }
247
+ // }
248
+ } else {
249
+ // this.$refs.form1.resetFields()
250
+ this.form2.username = this.form1.username;
251
+ if (this.form2.username.length == 11) {
252
+ if (!isvalidPhone(this.form2.username)) {
253
+ this.ifGetCode = false;
254
+ } else {
255
+ this.ifGetCode = true;
256
+ }
257
+ }
258
+ }
259
+ }
260
+ },
261
+ methods: {
262
+ go(e) {
263
+ if (e == 0) {
264
+ this.$emit("goSign");
265
+ } else {
266
+ this.$emit("goFind");
267
+ }
268
+ },
269
+ async generateUUID() {
270
+ const res = await apiUser.createQrCode();
271
+ if (res.data.code == 200) {
272
+ this.uuid = res.data.data.key;
273
+ this.QRCodeMsg = res.data.data.content;
274
+ }
275
+ },
276
+ async isLogin(uuid) {
277
+ const res = await apiUser.queryQRCode({ uuid });
278
+ if (res.data.code == 200) {
279
+ if (res.data.data.resourceToken != "") {
280
+ this.successShade = true;
281
+ window.clearTimeout(this.timeId);
282
+ cookie.cookieSet("token", res.data.data.resourceToken);
283
+ this.$router.push({ path: "/index" });
284
+ }
285
+ }
286
+ },
287
+ getQRCode() {
288
+ const that = this;
289
+ that.shade = false;
290
+ that.time = 0;
291
+ that.generateUUID();
292
+ that.timeId = setInterval(() => {
293
+ that.time++;
294
+ that.isLogin(that.uuid);
295
+ if (that.time == 60) {
296
+ that.shade = true;
297
+ window.clearTimeout(that.timeId);
298
+ }
299
+ }, 1000);
300
+ },
301
+ clickTabClick(num) {
302
+ this.tabClick = num;
303
+ if (num == 3) {
304
+ this.getQRCode();
305
+ } else {
306
+ window.clearTimeout(this.timeId);
307
+ }
308
+ // // console.log(num)
309
+ // if (num == 2) {
310
+ // this.changeTel(2)
311
+ // }
312
+ },
313
+ setTime() {
314
+ this.codeFont = --this.codeNum + "s";
315
+ const setInter = setInterval(
316
+ function() {
317
+ this.codeFont = --this.codeNum + "s";
318
+ if (this.codeNum == 0) {
319
+ this.codeFont = "获取验证码";
320
+ this.codeNum = 60;
321
+ clearInterval(setInter);
322
+ }
323
+ }.bind(this),
324
+ 1000
325
+ );
326
+ },
327
+ changeTel(type) {
328
+ // console.log(this.form2.username)
329
+ // ifGetCode 是否可以点击获取验证码
330
+ // console.log(type)
331
+ if (type == 1) {
332
+ if (this.form1.username.length > 11) {
333
+ this.form1.username = this.form1.username.slice(0, 11);
334
+ }
335
+ // this.form2.username = this.form1.username
336
+
337
+ return;
338
+ }
339
+
340
+ if (this.form2.username.length > 11) {
341
+ this.form2.username = this.form2.username.slice(0, 11);
342
+ }
343
+ // this.form1.username = this.form2.username
344
+
345
+ if (this.form2.username.length == 11) {
346
+ if (!isvalidPhone(this.form2.username)) {
347
+ this.ifGetCode = false;
348
+ // callback(new Error('请输入正确的手机号'))
349
+ } else {
350
+ this.ifGetCode = true;
351
+ // callback()
352
+ }
353
+ // this.ifGetCode = true
354
+ return;
355
+ }
356
+ this.ifGetCode = false;
357
+ },
358
+
359
+ async getSMSLoginCode() {
360
+ this.setTime();
361
+ const data = {
362
+ uname: this.form2.username,
363
+ type: 2,
364
+ channel: 2
365
+ };
366
+ const res = await apiAuth.getSMSLoginCode(data);
367
+
368
+ if (res.data.code == 0) {
369
+ this.$_toast({ msg: "发送成功" });
370
+ return;
371
+ }
372
+ if (res.data.code == 500) {
373
+ this.$_toast({ msg: res.data.msg, type: "error" });
374
+ return;
375
+ }
376
+ this.$_toast({ msg: res.data.msg, type: "error" });
377
+ // this.$_toast
378
+ // let res = await apiHome.getSMSLoginCode(data)
379
+ // console.log(res.data.data)
380
+ // /authentication/mobile?mobile=18699155392&smsCode=7825
381
+ },
382
+ async shortLogin() {
383
+ const that = this;
384
+ this.$refs["form2"].validate(async(valid) => {
385
+ if (valid) {
386
+ this.clickEnter(false);
387
+ this.loginloading = true;
388
+ const form = qs.stringify({
389
+ username: this.form2.username,
390
+ password: this.form2.short,
391
+ grant_type: "sms"
392
+ });
393
+ axios
394
+ .request({
395
+ method: "post",
396
+ data: form,
397
+ headers: {
398
+ Authorization:
399
+ "Basic MTE3NTI3Njk0NDMyNjAwNDczNjo2M2NkMzYwM2Q5YTc0ZTNiYmI4ZDhiOGE5NmQ3MWVlZA=="
400
+ },
401
+ url: `${process.env.VUE_APP_API}${
402
+ process.env.VUE_APP_AUTHURLTYPE
403
+ }/oauth/token`
404
+ })
405
+ .then(async(res) => {
406
+ const data = res;
407
+ if (!data.data.code || data.data.code !== 1) {
408
+ const token = data.data.access_token;
409
+ cookie.cookieSet("token", token);
410
+ // await that.getUser();
411
+ // that.$router.push({ path: '/home' })
412
+ if (process.env.NODE_ENV !== "development") {
413
+ that.jump();
414
+ } else {
415
+ // that.$router.push({ path: "/home" });
416
+ that.$router.push({ path: "/" });
417
+ }
418
+ } else {
419
+ that.loginloading = false;
420
+ that.clickEnter(true);
421
+ // that.errType(data.data);
422
+ that.$_toast({ type: "error", msg: data.data.msg, time: 3000 });
423
+ }
424
+ })
425
+ .catch((err) => {
426
+ // console.log('error')
427
+ that.loginloading = false;
428
+ that.clickEnter(true);
429
+ that.$_toast({ type: "error", msg: err.msg, time: 3000 });
430
+ });
431
+ } else {
432
+ this.loginloading = false;
433
+ return false;
434
+ }
435
+ });
436
+
437
+ // /authentication/mobile?mobile=18699155392&smsCode=7825
438
+ // http://192.168.100.213:9090/authentication/mobile?mobile=18609942548&smsCode=2420
439
+ },
440
+ onFocus() {
441
+ this.type = "password";
442
+ // console.log(this.$refs.password)
443
+ },
444
+ clickEnter(bol) {
445
+ const that = this;
446
+ document.onkeydown = function(e) {
447
+ const key = window.event.keyCode;
448
+ if (key === 13) {
449
+ if (bol) {
450
+ that.login();
451
+ }
452
+ }
453
+ };
454
+ },
455
+ login() {
456
+ if (this.tabClick == 2) {
457
+ this.shortLogin();
458
+ return;
459
+ }
460
+ this.$refs["form1"].validate(async(valid) => {
461
+ if (valid) {
462
+ this.clickEnter(false);
463
+ this.submit();
464
+ } else {
465
+ this.loginloading = false;
466
+ return false;
467
+ }
468
+ });
469
+ },
470
+ submit() {
471
+ this.loginloading = true;
472
+ const that = this;
473
+ const form = qs.stringify({
474
+ username: this.form1.username,
475
+ password: this.form1.password,
476
+ code: this.form1.code,
477
+ grant_type: this.form1.grant_type,
478
+ randomStr: this.form1.randomStr,
479
+ remember_me: false
480
+ });
481
+ //
482
+ axios
483
+ .request({
484
+ method: "post",
485
+ data: form,
486
+ headers: {
487
+ Authorization:
488
+ "Basic MTE3NTI3Njk0NDMyNjAwNDczNjo2M2NkMzYwM2Q5YTc0ZTNiYmI4ZDhiOGE5NmQ3MWVlZA=="
489
+ },
490
+ url: `${process.env.VUE_APP_API}${
491
+ process.env.VUE_APP_AUTHURLTYPE
492
+ }/oauth/token`
493
+ })
494
+ .then(async(res) => {
495
+ const data = res;
496
+ if (!data.data.code || data.data.code !== 1) {
497
+ const token = data.data.access_token;
498
+ cookie.cookieSet("token", token);
499
+ // await that.getUser();
500
+ // that.$router.push({ path: '/home' })
501
+ if (process.env.NODE_ENV !== "development") {
502
+ that.jump();
503
+ } else {
504
+ // that.$router.push({ path: "/home" });
505
+ that.$router.push({ path: "/index" });
506
+ }
507
+ } else {
508
+ that.clickEnter(true);
509
+ that.loginloading = false;
510
+ // that.errType(data.data);
511
+ that.$_toast({ type: "error", msg: data.data.msg, time: 3000 });
512
+ }
513
+ })
514
+ .catch((err) => {
515
+ that.clickEnter(true);
516
+ // console.log('err,lkkkk')
517
+ that.loginloading = false;
518
+ // if (err.response) {
519
+ // that.errType(err.response.data);
520
+ // } else {
521
+ // that.errType(err);
522
+ // }
523
+ });
524
+ },
525
+ async jump() {
526
+ const referrer = document.referrer;
527
+ const host = document.location.host;
528
+ const fromPath = sessionStorage.read("fromPath");
529
+ // console.log(fromPath, 'fromPath')
530
+ if (referrer && referrer.indexOf(host) === -1) {
531
+ if (fromPath == "/") {
532
+ // window.history.go(-1);
533
+ // window.history.back()
534
+ this.$router.push({ path: "/index" });
535
+ } else {
536
+ this.$router.push({ path: "/index" });
537
+ }
538
+ } else {
539
+ // await this.getUser()
540
+ this.$router.push({ path: "/index" });
541
+ }
542
+ },
543
+ async shopHasFinish() {
544
+ const res = await apiMaterials.shopHasFinish();
545
+ switch (res.data.code) {
546
+ case 0:
547
+ this.$store.commit("SET_STORE_TYPE", true);
548
+ break;
549
+ case 1:
550
+ this.$store.commit("SET_STORE_TYPE", false);
551
+ break;
552
+ default:
553
+ break;
554
+ }
555
+ // console.log(res.data.code, 'shopHasFinish') // 1 未完善 0 已完善
556
+ },
557
+ async getUser() {
558
+ // 获取用户信息
559
+ const res = await apiUser.getUserInfo();
560
+ const user = res.data.data;
561
+ // let { data } = await apiUser.getCompanyAuthInfo()
562
+ // console.log(data.data)
563
+ // user['cno'] = data.data.no
564
+ this.$store.commit("SET_USER", user);
565
+ this.getAuth();
566
+ if (user.userRole !== 0) {
567
+ // this.shopHasFinish()
568
+ }
569
+ },
570
+ async getAuth() {
571
+ const { data } = await apiAuth.getAuthList();
572
+ if (data.code === 0) {
573
+ this.$store.commit("SET_AUTH_USER", data.result);
574
+ localStorage.set("menu", JSON.stringify(data.result.routes));
575
+ } else {
576
+ this.$message.error(data.msg);
577
+ }
578
+ },
579
+ errType(response) {
580
+ console.log(response);
581
+ switch (response.code) {
582
+ case 1001: // 验证码为空
583
+ this.rules.code = {
584
+ required: false,
585
+ validator: this.validCode,
586
+ trigger: "blur"
587
+ };
588
+ if (!this.showCode) {
589
+ // this.$_toast({ type: "error", msg: "请输入验证码" });
590
+ //
591
+ }
592
+ this.showCode = true;
593
+ break;
594
+ case 1002: // 验证码错误
595
+ this.$_toast({ type: "error", msg: "验证码输入有误" });
596
+ break;
597
+ case 1003: // 验证码已过期,请重新获取
598
+ this.$_toast({ type: "error", msg: "验证码已过期,请重新获取" });
599
+ break;
600
+ case 2001: // 用户不存在
601
+ this.$_toast({ type: "error", msg: "该手机号未注册" });
602
+ break;
603
+ case 2002: // 用户或密码错误
604
+ this.$_toast({ type: "error", msg: "手机号或密码有误,请重新输入" });
605
+ this.form1.password = "";
606
+ break;
607
+ case 2003: // 用户被禁用
608
+ this.$_toast({ type: "error", msg: "用户被禁用" });
609
+ this.form1.password = "";
610
+ break;
611
+ }
612
+ this.clickEnter(true);
613
+ },
614
+ setRandomStr() {
615
+ let time = new Date().getTime();
616
+ time = "" + time + parseInt(Math.random() * 1000);
617
+ this.form1.randomStr = time;
618
+ },
619
+ validPhone(rule, value, callback) {
620
+ if (!value) {
621
+ // this.ifGetCode = false
622
+ callback(new Error("请输入电话号码"));
623
+ } else if (!isvalidPhone(value)) {
624
+ // this.ifGetCode = false
625
+ callback(new Error("请输入正确的手机号"));
626
+ } else {
627
+ // this.ifGetCode = true
628
+ callback();
629
+ }
630
+ },
631
+ validShort(rule, value, callback) {
632
+ if (!value) {
633
+ callback(new Error("请输入验证码"));
634
+ } else if (value.length != 4) {
635
+ callback(new Error("请输入正确的四位验证码"));
636
+ } else {
637
+ callback();
638
+ }
639
+ },
640
+ validCode(rule, value, callback) {
641
+ if (!value) {
642
+ callback(new Error("验证码不能为空"));
643
+ } else if (value.length !== 4) {
644
+ callback(new Error("验证码输入有误"));
645
+ } else {
646
+ callback();
647
+ }
648
+ }
649
+ },
650
+ created() {
651
+ this.setRandomStr();
652
+ this.clickEnter(true);
653
+ },
654
+ mounted() {}
655
+ };
656
+ </script>
657
+
658
+ <style lang="scss" rel="stylesheet/scss" scoped>
659
+ .login-box-right {
660
+ width: 400px;
661
+ background: #fff;
662
+ overflow: hidden;
663
+ position: absolute;
664
+ top: 30px;
665
+ right: -30px;
666
+ .pasLog {
667
+ .login-box-right-tab {
668
+ width: 340px;
669
+ height: 60px;
670
+ line-height: 60px;
671
+ position: relative;
672
+ .login-box-right-tab-click {
673
+ font-weight: bold;
674
+ color: rgba(2, 134, 223, 1);
675
+ border-bottom: 2px solid rgba(2, 134, 223, 1);
676
+ }
677
+ > div {
678
+ width: 80px;
679
+ height: 47px;
680
+ color: #333333;
681
+ font-size: 16px;
682
+ font-weight: 400;
683
+ cursor: pointer;
684
+ position: absolute;
685
+ text-align: center;
686
+ border-bottom: 2px solid #fff;
687
+ &:nth-child(1) {
688
+ left: 130px;
689
+ top: 0;
690
+ }
691
+ &:nth-child(2) {
692
+ right: 0;
693
+ top: 0;
694
+ }
695
+ }
696
+ }
697
+ }
698
+
699
+ > div {
700
+ width: 340px;
701
+ margin: 0 auto;
702
+ }
703
+ .login-type {
704
+ height: 40px;
705
+ top: 55px;
706
+ > div {
707
+ cursor: pointer;
708
+ display: inline-block;
709
+ vertical-align: middle;
710
+ &:nth-child(3) {
711
+ text-align: right;
712
+ }
713
+ }
714
+ .type-line {
715
+ background: rgba(223, 228, 234, 1);
716
+ width: 1px;
717
+ height: 28px;
718
+ }
719
+ .type-click {
720
+ font-size: 30px;
721
+ color: $default;
722
+ width: 218px;
723
+ }
724
+ .type-noclick {
725
+ font-size: 24px;
726
+ color: #000;
727
+ width: 178px;
728
+ }
729
+ }
730
+ .login-tel {
731
+ .bg-img {
732
+ background: url("../../../assets/login/login-tel.png") 16px 8px no-repeat;
733
+ background-size: 18px 26px;
734
+ }
735
+ }
736
+ .login-user {
737
+ .bg-img {
738
+ background: url("../../../assets/login/login-user.png") 16px 11px
739
+ no-repeat;
740
+ background-size: 18px 18px;
741
+ }
742
+ }
743
+ .login-password {
744
+ .bg-img {
745
+ background: url("../../../assets/login/login-password.png") 16px 11px
746
+ no-repeat;
747
+ background-size: 17px 19px;
748
+ }
749
+ }
750
+
751
+ .login-font {
752
+ cursor: pointer;
753
+ overflow: hidden;
754
+ margin-bottom: 20px;
755
+ > div {
756
+ color: #0286df;
757
+ font-weight: 400;
758
+ display: inline-block;
759
+ &:nth-child(1) {
760
+ float: left;
761
+ }
762
+ &:nth-child(2) {
763
+ float: right;
764
+ }
765
+ }
766
+ }
767
+ }
768
+ .QRcodeTab {
769
+ width: 58px !important;
770
+ position: absolute;
771
+ right: 10px;
772
+ top: 10px;
773
+ z-index: 999;
774
+ cursor: pointer;
775
+ }
776
+ .toast {
777
+ width: 143px !important;
778
+ height: 28px;
779
+ background: rgba(2, 134, 223, 0.1);
780
+ position: absolute;
781
+ right: 68px;
782
+ top: 20px;
783
+ border: 1px solid #0286df;
784
+ section {
785
+ width: 100%;
786
+ height: 100%;
787
+ display: flex;
788
+ align-items: center;
789
+ position: relative;
790
+ img {
791
+ margin-left: 16px;
792
+ width: 12px;
793
+ height: 14px;
794
+ }
795
+ span {
796
+ margin-left: 9px;
797
+ font-size: 12px;
798
+ color: #0286df;
799
+ }
800
+ }
801
+ section:before {
802
+ content: "";
803
+ position: absolute;
804
+ width: 0;
805
+ height: 0;
806
+ border-top: 7px solid transparent;
807
+ border-left: 7px solid #0082df;
808
+ border-bottom: 7px solid transparent;
809
+ font-size: 0;
810
+ line-height: 0;
811
+ right: -7px;
812
+ }
813
+ section:after {
814
+ content: "";
815
+ position: absolute;
816
+ width: 0;
817
+ height: 0;
818
+ border-top: 6px solid transparent;
819
+ border-left: 6px solid #e5f3fc;
820
+ border-bottom: 6px solid transparent;
821
+ font-size: 0;
822
+ line-height: 0;
823
+ right: -6px;
824
+ }
825
+ }
826
+ .qrLog {
827
+ position: absolute;
828
+ left: -40px;
829
+ width: 420px !important;
830
+ .QRCodeBox {
831
+ width: 100%;
832
+ box-sizing: border-box;
833
+ padding: 0 99px;
834
+ position: relative;
835
+ .QRCodechenge,
836
+ .successShade {
837
+ width: 100%;
838
+ height: 100%;
839
+ box-sizing: border-box;
840
+ padding: 0 99px;
841
+ position: absolute;
842
+ left: 0;
843
+ top: 0;
844
+ background: rgba(255, 255, 255, 0.9);
845
+ display: flex;
846
+ flex-direction: column;
847
+ align-items: center;
848
+ justify-content: center;
849
+ & > p {
850
+ margin: 0;
851
+ padding: 0;
852
+ margin-bottom: 20px;
853
+ font-size: 12px;
854
+ color: #333333;
855
+ }
856
+ }
857
+ .successShade {
858
+ background: rgba(255, 255, 255, 0.9);
859
+ & > p {
860
+ font-size: 16px;
861
+ font-weight: bold;
862
+ margin-top: 10px;
863
+ margin-bottom: 0;
864
+ }
865
+ }
866
+ }
867
+
868
+ .titleText {
869
+ display: flex;
870
+ justify-content: space-between;
871
+ padding: 0 118px;
872
+ span {
873
+ color: #0286df;
874
+ font-weight: bold;
875
+ font-size: 20px;
876
+ }
877
+ }
878
+
879
+ .textBox {
880
+ width: 100%;
881
+ display: flex;
882
+ align-items: center;
883
+ box-sizing: border-box;
884
+ padding: 0 126px;
885
+ .left {
886
+ img {
887
+ width: 32px;
888
+ height: 32px;
889
+ }
890
+ }
891
+ .right {
892
+ margin-left: 16px;
893
+ & > p {
894
+ margin: 0;
895
+ padding: 0;
896
+ color: #969696;
897
+ font-size: 16px;
898
+ span {
899
+ color: #0286df;
900
+ }
901
+ }
902
+ }
903
+ }
904
+ .footer {
905
+ margin-top: 15px;
906
+ display: flex;
907
+ color: #666666;
908
+ font-size: 14px;
909
+ box-sizing: border-box;
910
+ padding-right: 20px;
911
+ float: right;
912
+ div {
913
+ cursor: pointer;
914
+ }
915
+ & > div:last-child {
916
+ margin-left: 25px;
917
+ }
918
+ }
919
+ }
920
+ </style>
921
+ <style lang="scss" rel="stylesheet/scss">
922
+ .login-box-right {
923
+ .el-input__inner {
924
+ border-radius: 0px;
925
+ }
926
+ .login-short-box {
927
+ width: 100%;
928
+ height: 100%;
929
+ > div {
930
+ height: 100%;
931
+ &:nth-child(1) {
932
+ width: 200px;
933
+ float: left;
934
+ }
935
+ &:nth-child(2) {
936
+ width: 120px;
937
+ float: right;
938
+ > button {
939
+ float: right;
940
+ border-radius: 0;
941
+ }
942
+ }
943
+ }
944
+ }
945
+ .login-input {
946
+ // background: #fff;
947
+ [type="text"],
948
+ [type="password"] {
949
+ text-indent: 50px;
950
+ }
951
+ }
952
+ .bg-line {
953
+ background: #dfe4ea;
954
+ width: 1px;
955
+ height: 38px;
956
+ position: absolute;
957
+ left: 50px;
958
+ top: 1px;
959
+ z-index: 1;
960
+ }
961
+
962
+ .el-input__inner {
963
+ height: 40px;
964
+ line-height: 40px;
965
+ font-size: 14px;
966
+ border: 1px solid #dfe4ea;
967
+ }
968
+ .bg-img {
969
+ z-index: 1;
970
+ position: absolute;
971
+ left: 0px;
972
+ top: 0px;
973
+ width: 49px;
974
+ height: 36px;
975
+ line-height: 20px;
976
+ }
977
+ .bg-eye {
978
+ top: 0px;
979
+ right: 16px;
980
+ z-index: 1;
981
+ position: absolute;
982
+ }
983
+ }
984
+ </style>