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.
- package/.env +2 -2
- package/.env.development +70 -70
- package/.env.pre +60 -60
- package/.env.production +48 -48
- package/.env.test +48 -48
- package/.eslintignore +4 -4
- package/.eslintrc.js +302 -302
- package/README.md +66 -66
- package/babel.config.js +5 -5
- package/commitlint.config.js +30 -30
- package/config/dev.env.js +7 -7
- package/config/index.js +82 -82
- package/config/prod.env.js +4 -4
- package/debug.log +4 -4
- package/index.js +6 -6
- package/jsconfig.json +9 -9
- package/lib/qgb-process.common.js +7666 -5069
- package/lib/qgb-process.umd.js +7666 -5069
- package/lib/qgb-process.umd.min.js +108 -108
- package/package.json +148 -148
- package/packages/index.js +26 -26
- package/public/index.html +47 -47
- package/public/js/qykf.js +21 -21
- package/src/App.vue +37 -37
- package/src/api/ApiExAndapp.js +24 -24
- package/src/api/EnterpriseAssociation.js +8 -8
- package/src/api/Notice.js +31 -31
- package/src/api/apiAcceptance/apiAcceptance.js +37 -37
- package/src/api/apiAddress.js +9 -9
- package/src/api/apiApprovalConfig.js +13 -13
- package/src/api/apiApprove.js +18 -18
- package/src/api/apiArrears/apiArrears.js +41 -41
- package/src/api/apiArrears/apiProjectArrears.js +16 -16
- package/src/api/apiArrears/index.js +15 -15
- package/src/api/apiAssets.js +19 -19
- package/src/api/apiAssociate.js +42 -42
- package/src/api/apiAudit/apiAudit.js +32 -32
- package/src/api/apiAuth.js +25 -25
- package/src/api/apiAuthentication.js +35 -35
- package/src/api/apiBankAccount/index.js +12 -12
- package/src/api/apiBudget/apiBudget.js +30 -30
- package/src/api/apiBudget/apiBudgets.js +105 -105
- package/src/api/apiCarRecord.js +48 -48
- package/src/api/apiCart.js +202 -202
- package/src/api/apiChangeTel.js +13 -13
- package/src/api/apiCheckingIn.js +95 -95
- package/src/api/apiCollection/index.js +13 -13
- package/src/api/apiContract/apiContract.js +21 -21
- package/src/api/apiContract/index.js +3 -3
- package/src/api/apiContract/quill-config.js +122 -122
- package/src/api/apiContractManage/apiContractManage.js +57 -57
- package/src/api/apiContractManage/index.js +2 -2
- package/src/api/apiContractManage/quill-config.js +121 -121
- package/src/api/apiCoping.js +22 -22
- package/src/api/apiCost/index.js +31 -31
- package/src/api/apiCreditManagement.js +16 -16
- package/src/api/apiCustomer/apiCustomer.js +12 -12
- package/src/api/apiDivisional.js +9 -9
- package/src/api/apiDivisionalManagementList.js +17 -17
- package/src/api/apiEmployeeRegularization.js +73 -73
- package/src/api/apiEquipmentRental.js +50 -50
- package/src/api/apiFormBuilder/menu.js +65 -65
- package/src/api/apiFormBuilder/reissueRule.js +15 -15
- package/src/api/apiFund/index.js +16 -16
- package/src/api/apiHelp.js +43 -43
- package/src/api/apiHome.js +24 -24
- package/src/api/apiIminfo.js +39 -39
- package/src/api/apiInventory.js +52 -52
- package/src/api/apiInventorySetting.js +9 -9
- package/src/api/apiInvoice.js +29 -29
- package/src/api/apiJobManage.js +15 -15
- package/src/api/apiLease/apiLease.js +12 -12
- package/src/api/apiLogisticsTransportation/apiLogisticsTransportation.js +34 -34
- package/src/api/apiLostPassword.js +9 -9
- package/src/api/apiMachine/api.js +3 -3
- package/src/api/apiMachine/apiCategory.js +18 -18
- package/src/api/apiMachine/apiHire.js +19 -19
- package/src/api/apiMachine/apiLease.js +27 -27
- package/src/api/apiMachine/apiLocation.js +4 -4
- package/src/api/apiMachine/apiRentInfo.js +107 -107
- package/src/api/apiMachine/apiRentPublish.js +14 -14
- package/src/api/apiMachine/apiStore.js +15 -15
- package/src/api/apiMachine/index.js +3 -3
- package/src/api/apiManagementStore/api.js +3 -3
- package/src/api/apiManagementStore/apiManagementStore.js +25 -25
- package/src/api/apiMaterCheckAndAccept/apiMaterCheckAndAccept.js +47 -47
- package/src/api/apiMaterCheckAndAccept/apiMechanicalSourcing.js +16 -16
- package/src/api/apiMaterCheckAndAccept/index.js +3 -3
- package/src/api/apiMaterials/aaaaaaaaaaaaaa.js +9 -9
- package/src/api/apiMaterials/api.js +3 -3
- package/src/api/apiMaterials/apiAddress.js +116 -116
- package/src/api/apiMaterials/apiBalanceData.js +188 -188
- package/src/api/apiMaterials/apiCommercialConcrete.js +36 -36
- package/src/api/apiMaterials/apiCommodity.js +70 -70
- package/src/api/apiMaterials/apiDownload.js +26 -26
- package/src/api/apiMaterials/apiHome.js +44 -44
- package/src/api/apiMaterials/apiItemBrand.js +9 -9
- package/src/api/apiMaterials/apiLogistics.js +72 -72
- package/src/api/apiMaterials/apiLogisticsReceipt.js +94 -94
- package/src/api/apiMaterials/apiMaterials.js +8 -8
- package/src/api/apiMaterials/apiMySalesOrder.js +21 -21
- package/src/api/apiMaterials/apiOfflineOrder.js +18 -18
- package/src/api/apiMaterials/apiOrder.js +183 -183
- package/src/api/apiMaterials/apiReceipt.js +45 -45
- package/src/api/apiMaterials/quill-config.js +122 -122
- package/src/api/apiMemberSelection.js +39 -39
- package/src/api/apiMessage.js +10 -10
- package/src/api/apiMock/mockOrder.js +98 -98
- package/src/api/apiMonthPlan/apiMonthPlan.js +47 -47
- package/src/api/apiMyBidding.js +8 -8
- package/src/api/apiMyMember/apiComInfo.js +17 -17
- package/src/api/apiMyMember/apiInviteJoin.js +24 -24
- package/src/api/apiMyMember/apiMember.js +24 -24
- package/src/api/apiMyMember/apiMemberApply.js +36 -36
- package/src/api/apiMyMember/apiMemberChance.js +40 -40
- package/src/api/apiOffer.js +40 -40
- package/src/api/apiOffice.js +19 -19
- package/src/api/apiPact.js +26 -26
- package/src/api/apiPassword.js +7 -7
- package/src/api/apiPay/apiPay.js +25 -25
- package/src/api/apiPaying.js +21 -21
- package/src/api/apiPayment/apiPayment.js +13 -13
- package/src/api/apiPayment/apiProjectPayment.js +13 -13
- package/src/api/apiPrint.js +23 -0
- package/src/api/apiProcess.js +65 -65
- package/src/api/apiProject/apiBaseList.js +29 -29
- package/src/api/apiProject/apiGoodsOffer.js +11 -11
- package/src/api/apiProject/apiInventory.js +116 -116
- package/src/api/apiProject/apiOfferOrder.js +12 -12
- package/src/api/apiProject/apiOfferQuery.js +18 -18
- package/src/api/apiProject/apiPlan.js +21 -21
- package/src/api/apiProject/apiProject.js +158 -158
- package/src/api/apiProjectProcurement/apiProjectProcurement.js +88 -88
- package/src/api/apiPurchase/apiPurchase.js +67 -67
- package/src/api/apiPurchaseApply.js +15 -15
- package/src/api/apiPurchasePay.js +16 -16
- package/src/api/apiRankManagement.js +24 -24
- package/src/api/apiRecruit.js +37 -37
- package/src/api/apiReimbursement/apiReimbursement.js +15 -15
- package/src/api/apiRisk/index.js +11 -11
- package/src/api/apiRoleManagement.js +15 -15
- package/src/api/apiRules/apiRules.js +11 -11
- package/src/api/apiSchedule/apiSchedule.js +17 -17
- package/src/api/apiSealRecord.js +52 -52
- package/src/api/apiSign.js +8 -8
- package/src/api/apiSolution/apiSolution.js +9 -9
- package/src/api/apiSubcontract.js +35 -35
- package/src/api/apiSystem/index.js +40 -40
- package/src/api/apiTask.js +76 -76
- package/src/api/apiTeam/api.js +3 -3
- package/src/api/apiTeam/apiUtils.js +11 -11
- package/src/api/apiTender.js +127 -127
- package/src/api/apiUser.js +24 -24
- package/src/api/apiUserEnterprise/api.js +3 -3
- package/src/api/apiUserEnterprise/apiUserEn.js +15 -15
- package/src/api/apiVolunteerTeam.js +11 -11
- package/src/api/apiWorkarea.js +33 -33
- package/src/api/apiXzqh.js +8 -8
- package/src/api/common/api.js +3 -3
- package/src/api/common/apiUtils.js +9 -9
- package/src/api/customer.js +21 -21
- package/src/api/evection.js +19 -19
- package/src/api/guide.js +9 -9
- package/src/api/sociaManageApi.js +30 -30
- package/src/assets/Area.json +1773 -1773
- package/src/assets/css/quill.bubble.css +952 -952
- package/src/assets/css/quill.core.css +397 -397
- package/src/assets/css/quill.snow.css +945 -945
- package/src/assets/data.js +284 -284
- package/src/assets/fonts/Read Me.txt +7 -7
- package/src/assets/fonts/demo-files/demo.css +155 -155
- package/src/assets/fonts/demo-files/demo.js +30 -30
- package/src/assets/fonts/demo.html +951 -951
- package/src/assets/fonts/fonts/icomoon.svg +130 -130
- package/src/assets/fonts/style.css +563 -563
- package/src/assets/icons/checkbox.svg +12 -12
- package/src/assets/icons/columns-3.svg +12 -12
- package/src/assets/icons/columns.svg +12 -12
- package/src/assets/icons/custom-table.svg +12 -12
- package/src/assets/icons/date.svg +19 -19
- package/src/assets/icons/daterange.svg +12 -12
- package/src/assets/icons/fuzhi.svg +11 -11
- package/src/assets/icons/fuzhi_03.svg +5 -5
- package/src/assets/icons/gaojizujian.svg +12 -12
- package/src/assets/icons/groupSummary.svg +12 -12
- package/src/assets/icons/groupTitle.svg +12 -12
- package/src/assets/icons/image-uploader.svg +12 -12
- package/src/assets/icons/input-number.svg +12 -12
- package/src/assets/icons/input.svg +12 -12
- package/src/assets/icons/quill-editor.svg +12 -12
- package/src/assets/icons/radio.svg +12 -12
- package/src/assets/icons/select.svg +12 -12
- package/src/assets/icons/switch.svg +12 -12
- package/src/assets/icons/textarea.svg +12 -12
- package/src/assets/icons/upload-file.svg +12 -12
- package/src/assets/marketplace.js +289 -289
- package/src/components/ComAduitNew.vue +477 -477
- package/src/components/CommonAduit.vue +512 -512
- package/src/components/CommonAduitNew.vue +906 -906
- package/src/components/CommonAduitNews.vue +753 -753
- package/src/components/CommonUEditer.vue +63 -63
- package/src/components/PersonCenter/Mess.vue +59 -59
- package/src/components/PersonCenter/Title.vue +80 -80
- package/src/components/SvgIcon.vue +57 -57
- package/src/components/XmCommonAduit.vue +761 -761
- package/src/components/feiyCommon.vue +713 -713
- package/src/components/form/card.js +5 -5
- package/src/components/form/chinese.js +6 -6
- package/src/components/form/chinessstring.js +5 -5
- package/src/components/form/hunhe.js +8 -8
- package/src/components/form/hunhecq.js +8 -8
- package/src/components/form/hunheh.js +8 -8
- package/src/components/form/num.js +12 -12
- package/src/components/form/numstring.js +5 -5
- package/src/components/form/user.js +7 -7
- package/src/components/form/validate.js +42 -42
- package/src/components/form/validcredit.js +5 -5
- package/src/components/fundCommonAduit.vue +661 -661
- package/src/components/public/BaseCustomTable.vue +71 -71
- package/src/components/public/BaseDialog.vue +144 -144
- package/src/components/public/BaseEmptyData.vue +73 -73
- package/src/components/public/BaseFormTitle.vue +39 -39
- package/src/components/public/BasePagination.vue +55 -55
- package/src/components/public/BaseRouter.vue +14 -14
- package/src/components/public/BaseUpload.vue +185 -185
- package/src/components/public/Bottom.vue +62 -62
- package/src/components/public/Footer.vue +412 -412
- package/src/components/public/Header.vue +30 -30
- package/src/components/public/LeftMenu.vue +170 -170
- package/src/components/public/MemberSelection coby.vue +444 -444
- package/src/components/public/MemberSelection.vue +487 -487
- package/src/components/public/NewLeftMenu.vue +418 -418
- package/src/components/public/PicturesPreview.vue +62 -62
- package/src/components/public/Popout.vue +147 -147
- package/src/components/public/TagLine.vue +353 -353
- package/src/components/public/components/BaseImageUploadDrag.vue +320 -320
- package/src/components/public/components/HeadBar.vue +315 -315
- package/src/components/public/components/MenuList.vue +110 -110
- package/src/components/public/components/NewHeadBar.vue +936 -936
- package/src/components/public/components/QuickGoods.vue +273 -273
- package/src/components/public/components/Search.vue +164 -164
- package/src/components/public/components/Userinfo.vue +383 -383
- package/src/components/utils/pdf.js +254 -254
- package/src/components/xmfyCommonAduit.vue +752 -752
- package/src/filters/index.js +619 -619
- package/src/fnc/arr.js +102 -102
- package/src/fnc/quill-config.js +121 -121
- package/src/fnc/unit.js +102 -102
- package/src/fnc/verify.js +187 -187
- package/src/fnc/verifyStatus.js +24 -24
- package/src/formBuilder/apiBusiness.js +67 -67
- package/src/formBuilder/business.js +1039 -1039
- package/src/formBuilder/component/components/data.js +719 -719
- package/src/formBuilder/component/components/purchaseIndex.vue +1109 -1109
- package/src/formBuilder/component/purchase.vue +35 -35
- package/src/formBuilder/components/app-main/components/components/GroupSummary.vue +33 -33
- package/src/formBuilder/components/app-main/components/components/GroupTitle.vue +33 -33
- package/src/formBuilder/components/app-main/components/components/bank.vue +226 -226
- package/src/formBuilder/components/app-main/components/components/bankFormHeard.vue +298 -298
- package/src/formBuilder/components/app-main/components/components/builder.vue +718 -718
- package/src/formBuilder/components/app-main/components/components/columns.vue +393 -393
- package/src/formBuilder/components/app-main/components/components/customTable.vue +1758 -1758
- package/src/formBuilder/components/app-main/components/components/formDep.vue +105 -105
- package/src/formBuilder/components/app-main/components/components/handleCode.vue +39 -39
- package/src/formBuilder/components/app-main/components/components/itemOption.vue +116 -116
- package/src/formBuilder/components/app-main/components/components/linkForm.vue +116 -116
- package/src/formBuilder/components/app-main/components/components/listDesign.vue +772 -772
- package/src/formBuilder/components/app-main/components/components/optionSolt.js +78 -78
- package/src/formBuilder/components/app-main/components/components/person.vue +104 -104
- package/src/formBuilder/components/app-main/components/components/postman.vue +40 -40
- package/src/formBuilder/components/app-main/components/components/previewDialog.vue +391 -391
- package/src/formBuilder/components/app-main/components/components/tableIndex.vue +51 -51
- package/src/formBuilder/components/app-main/components/components/tableList.vue +561 -561
- package/src/formBuilder/components/app-main/components/components/twoColumns.vue +52 -52
- package/src/formBuilder/components/app-main/components/main-center.vue +187 -187
- package/src/formBuilder/components/app-main/components/main-header.vue +351 -351
- package/src/formBuilder/components/app-main/components/main-left.vue +179 -179
- package/src/formBuilder/components/app-main/components/main-right/components/components/calculateDialog.vue +914 -914
- package/src/formBuilder/components/app-main/components/main-right/components/components/curTextArea.vue +338 -338
- package/src/formBuilder/components/app-main/components/main-right/components/components/form-item-rules.vue +190 -190
- package/src/formBuilder/components/app-main/components/main-right/components/components/linkageDialog.vue +25 -25
- package/src/formBuilder/components/app-main/components/main-right/components/components/searchMixin.js +26 -26
- package/src/formBuilder/components/app-main/components/main-right/components/form-config.vue +284 -284
- package/src/formBuilder/components/app-main/components/main-right/components/form-item-attrs.vue +407 -407
- package/src/formBuilder/components/app-main/components/main-right/components/form-item-config.vue +478 -478
- package/src/formBuilder/components/app-main/components/main-right/index.vue +203 -203
- package/src/formBuilder/components/app-main/index.vue +329 -329
- package/src/formBuilder/comps.js +283 -283
- package/src/formBuilder/config/button.js +63 -63
- package/src/formBuilder/config/cascader-panel.js +224 -224
- package/src/formBuilder/config/cascader.js +306 -306
- package/src/formBuilder/config/checkbox.js +67 -67
- package/src/formBuilder/config/color.js +42 -42
- package/src/formBuilder/config/columns.js +30 -30
- package/src/formBuilder/config/custom-table.js +49 -49
- package/src/formBuilder/config/date.js +107 -107
- package/src/formBuilder/config/daterange.js +47 -47
- package/src/formBuilder/config/datetime.js +78 -78
- package/src/formBuilder/config/datetimerange.js +111 -111
- package/src/formBuilder/config/formDep.js +37 -37
- package/src/formBuilder/config/groupSummary.js +23 -23
- package/src/formBuilder/config/groupTitle.js +23 -23
- package/src/formBuilder/config/handleCode.js +23 -23
- package/src/formBuilder/config/image-uploader.js +113 -113
- package/src/formBuilder/config/input.js +162 -162
- package/src/formBuilder/config/json-editor.js +31 -31
- package/src/formBuilder/config/linkForm.js +69 -69
- package/src/formBuilder/config/number.js +49 -49
- package/src/formBuilder/config/password.js +82 -82
- package/src/formBuilder/config/person.js +37 -37
- package/src/formBuilder/config/postman.js +23 -23
- package/src/formBuilder/config/purchase.js +19 -19
- package/src/formBuilder/config/quill-editor.js +66 -66
- package/src/formBuilder/config/radio-button.js +44 -44
- package/src/formBuilder/config/radio.js +69 -69
- package/src/formBuilder/config/rate.js +93 -93
- package/src/formBuilder/config/select.js +105 -105
- package/src/formBuilder/config/slider.js +92 -92
- package/src/formBuilder/config/switch.js +35 -35
- package/src/formBuilder/config/tag.js +79 -79
- package/src/formBuilder/config/text.js +18 -18
- package/src/formBuilder/config/textarea.js +129 -129
- package/src/formBuilder/config/time.js +60 -60
- package/src/formBuilder/config/timerange.js +94 -94
- package/src/formBuilder/config/tree-select.js +100 -100
- package/src/formBuilder/config/upload-file.js +100 -100
- package/src/formBuilder/config/yesno.js +39 -39
- package/src/formBuilder/config.js +16 -16
- package/src/formBuilder/extend/index.js +20 -20
- package/src/formBuilder/index.js +39 -39
- package/src/formBuilder/menuConfig.js +36 -36
- package/src/formBuilder/mixins/index.js +215 -215
- package/src/formBuilder/tool.js +101 -101
- package/src/function/base.js +13 -13
- package/src/function/findCompanyTree.js +94 -94
- package/src/function/formulaAnalysis.js +44 -44
- package/src/function/verify.js +23 -23
- package/src/http/index.js +219 -219
- package/src/http/type.js +82 -82
- package/src/library/AddType/Index.js +17 -17
- package/src/library/AddType/Index.vue +201 -201
- package/src/library/AreaChange/regionCascader/regionCascader.vue +155 -155
- package/src/library/BigImg/BigImage1/Index.js +17 -17
- package/src/library/BigImg/BigImage1/Index.vue +125 -125
- package/src/library/Button/Button1/Index.js +17 -17
- package/src/library/Button/Button1/Index.vue +60 -60
- package/src/library/Button/Button2/Index.js +17 -17
- package/src/library/Button/Button2/Index.vue +52 -52
- package/src/library/Button/Button3/Index.js +17 -17
- package/src/library/Button/Button3/Index.vue +56 -56
- package/src/library/Button/Button4/Index.js +17 -17
- package/src/library/Button/Button4/Index.vue +56 -56
- package/src/library/Button/Button5/Index.js +17 -17
- package/src/library/Button/Button5/Index.vue +55 -55
- package/src/library/Button/Button6/Index.js +17 -17
- package/src/library/Button/Button6/Index.vue +74 -74
- package/src/library/Button/Button7/Index.js +17 -17
- package/src/library/Button/Button7/Index.vue +56 -56
- package/src/library/ConfirmPlaugin/ConfirmPlaugin1/Index.js +17 -17
- package/src/library/ConfirmPlaugin/ConfirmPlaugin1/Index.vue +147 -147
- package/src/library/ConfirmPlaugin/ConfirmPlaugin2/Index.js +17 -17
- package/src/library/ConfirmPlaugin/ConfirmPlaugin2/Index.vue +137 -137
- package/src/library/ConfirmPlaugin/ConfirmPlaugin3/Index.vue +142 -142
- package/src/library/ConfirmPlaugin/ConfirmPlaugin4/Index.vue +141 -141
- package/src/library/ConfirmPlaugin/ConfirmPlaugin5/Index.vue +121 -121
- package/src/library/ConfirmPlaugin/ConfirmPlaugin6/Index.vue +142 -142
- package/src/library/Input/Input1/Index.js +17 -17
- package/src/library/Input/Input1/Index.vue +66 -66
- package/src/library/NoMessage/NoMessage0/Index.js +17 -17
- package/src/library/NoMessage/NoMessage0/Index.vue +60 -60
- package/src/library/NoMessage/NoMessage1/Index.js +17 -17
- package/src/library/NoMessage/NoMessage1/Index.vue +66 -66
- package/src/library/NoMessage/NoMessage2/Index.js +17 -17
- package/src/library/NoMessage/NoMessage2/Index.vue +66 -66
- package/src/library/Tab/Tab1/TabBox1/Index.vue +36 -36
- package/src/library/Tab/Tab1/TabInner1/Index.vue +70 -70
- package/src/library/Tab/Tab2/TabBox2/Index.vue +36 -36
- package/src/library/Tab/Tab2/TabInner2/Index.vue +66 -66
- package/src/library/Table/Table1/Td1/Index.js +17 -17
- package/src/library/Table/Table1/Td1/Index.vue +110 -110
- package/src/library/Table/Table1/Tr1/Index.js +17 -17
- package/src/library/Table/Table1/Tr1/Index.vue +53 -53
- package/src/library/Table/Table2/Td2/Index.js +17 -17
- package/src/library/Table/Table2/Td2/Index.vue +90 -90
- package/src/library/Table/Table2/Tr2/Index.js +17 -17
- package/src/library/Table/Table2/Tr2/Index.vue +66 -66
- package/src/library/Table/Table3/Td3/Index.js +17 -17
- package/src/library/Table/Table3/Td3/Index.vue +109 -109
- package/src/library/Table/Table3/Tr3/Index.js +17 -17
- package/src/library/Table/Table3/Tr3/Index.vue +128 -128
- package/src/library/Table/Table4/Td4/Index.js +17 -17
- package/src/library/Table/Table4/Td4/Index.vue +114 -114
- package/src/library/Table/Table4/Tr4/Index.js +17 -17
- package/src/library/Table/Table4/Tr4/Index.vue +53 -53
- package/src/library/Title/Title1/Index.js +17 -17
- package/src/library/Title/Title1/Index.vue +80 -80
- package/src/library/toast/Index.js +17 -17
- package/src/library/toast/Index.vue +86 -86
- package/src/main.js +161 -161
- package/src/mixins/Export2Excel.js +207 -207
- package/src/mixins/chartOption.js +110 -110
- package/src/mixins/companyMixins.js +84 -84
- package/src/mixins/quillOptions.js +15 -15
- package/src/mixins/validate/deviceManage.js +211 -211
- package/src/mixins/validate/systemConfig.js +117 -117
- package/src/mixins/validate/validate.js +25 -25
- package/src/public/apiUser/apiUser.js +10 -10
- package/src/public/areaFunction.js +26 -26
- package/src/public/link.js +91 -91
- package/src/public/stageData.js +495 -495
- package/src/public/topmenu.js +68 -68
- package/src/router/index.js +225 -225
- package/src/router/setting/BaseRoutes.js +1639 -1639
- package/src/router/setting/MenuDevMock.js +1570 -1570
- package/src/router/setting/modules/login.js +45 -45
- package/src/router/setting/noAuthRouter.js +109 -109
- package/src/router/setting/routes.js +55 -55
- package/src/static/css/flex.css +75 -75
- package/src/static/css/switch.scss +31 -31
- package/src/storage/cookies.js +37 -37
- package/src/storage/localStorage.js +36 -36
- package/src/storage/sessionStorage.js +25 -25
- package/src/store/formBuilder/formAttrDefault.js +28 -28
- package/src/store/formBuilder/index.js +40 -40
- package/src/store/index.js +553 -553
- package/src/styles/color.scss +24 -24
- package/src/styles/offer.scss +39 -39
- package/src/styles/s-reset.scss +52 -52
- package/src/styles/static-style.scss +797 -797
- package/src/styles/talent.scss +26 -26
- package/src/styles/variable.scss +69 -69
- package/src/styles/workflow/workflow.css +1308 -1308
- package/src/utils/TableFormTypeList.js +26 -26
- package/src/utils/allRouter.js +5579 -5579
- package/src/utils/auditUtil.js +535 -535
- package/src/utils/commonComponents.js +34 -34
- package/src/utils/commonFunc.js +213 -213
- package/src/utils/deepCopyArray.js +9 -9
- package/src/utils/dict.js +49 -49
- package/src/utils/directive.js +26 -26
- package/src/utils/emoji.js +16 -16
- package/src/utils/flator.js +18 -18
- package/src/utils/imMeeting.js +1180 -1180
- package/src/utils/index.js +105 -105
- package/src/utils/initRouter.js +94 -94
- package/src/utils/map.js +23 -23
- package/src/utils/passwordStrength.js +177 -177
- package/src/utils/style.js +30 -30
- package/src/utils/validate.js +30 -30
- package/src/views/404.vue +53 -53
- package/src/views/Login/Login.vue +50 -50
- package/src/views/Login/Passfind.vue +347 -347
- package/src/views/Login/Passfindnext.vue +146 -146
- package/src/views/Login/Sign.vue +55 -55
- package/src/views/Login/SignSuccessfully.vue +132 -132
- package/src/views/Login/appDownload.vue +224 -224
- package/src/views/Login/clientDownload.vue +201 -201
- package/src/views/Login/components/Background.vue +153 -153
- package/src/views/Login/components/FormLogin.vue +1001 -1001
- package/src/views/Login/components/FormPassFind.vue +395 -395
- package/src/views/Login/components/FormSign.vue +493 -493
- package/src/views/Login/components/Title.vue +301 -301
- package/src/views/Login/components/agreeMent.vue +111 -111
- package/src/views/Login/components/companysign.vue +1296 -1296
- package/src/views/Login/components/guideLogin.vue +984 -984
- package/src/views/formBuilder/components/addNode.vue +119 -119
- package/src/views/formBuilder/components/approverSelector.vue +493 -493
- package/src/views/formBuilder/components/baseRoute.vue +315 -315
- package/src/views/formBuilder/components/builderHeader.vue +106 -106
- package/src/views/formBuilder/components/conditionConfig.js +588 -588
- package/src/views/formBuilder/components/conditionNode.vue +191 -191
- package/src/views/formBuilder/components/dataDefault.js +147 -147
- package/src/views/formBuilder/components/depFormNode.vue +583 -583
- package/src/views/formBuilder/components/linkForm.vue +566 -566
- package/src/views/formBuilder/components/linkFormList.vue +821 -821
- package/src/views/formBuilder/components/menuConfig.vue +1752 -1752
- package/src/views/formBuilder/components/newNodeForm.vue +426 -426
- package/src/views/formBuilder/components/newsection.vue +424 -424
- package/src/views/formBuilder/components/nodeConditionConfig cody.vue +376 -376
- package/src/views/formBuilder/components/nodeConditionConfig.vue +603 -603
- package/src/views/formBuilder/components/nodeForm.vue +355 -355
- package/src/views/formBuilder/components/nodeMenu.vue +147 -147
- package/src/views/formBuilder/components/personNode.vue +566 -566
- package/src/views/formBuilder/components/planNode.vue +269 -269
- package/src/views/formBuilder/designListPage.vue +457 -457
- package/src/views/formBuilder/formDataDetail.vue +565 -565
- package/src/views/formBuilder/formGeneration.vue +904 -904
- package/src/views/formBuilder/index.vue +242 -242
- package/src/views/formBuilder/process-1.vue +976 -976
- package/src/views/formBuilder/process-2.vue +1323 -1323
- package/src/views/formBuilder/process.vue +662 -431
- package/src/views/formBuilder/processList.vue +877 -877
- package/src/views/formBuilder/service/ProcessBuilder.js +136 -136
- package/src/views/formBuilder/service/RsxzFieldCollection.js +199 -0
- package/src/views/formBuilder/workflow/addNode.vue +95 -95
- package/src/views/formBuilder/workflow/initData.js +205 -205
- package/src/views/formBuilder/workflow/nodeWrap.vue +731 -731
- package/src/views/guide.vue +227 -227
- package/src/views/guideIndex.vue +284 -284
- package/tests/unit/.eslintrc.js +5 -5
- package/tests/unit/example.spec.js +13 -13
- package/vue.config.js +287 -287
|
@@ -1,561 +1,561 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-table
|
|
3
|
-
:data="tableData"
|
|
4
|
-
style="width: 100%;border:1px solid #ebeef5;"
|
|
5
|
-
:header-cell-style="$TableCell.setHeaderCellStyle"
|
|
6
|
-
:cell-style="$TableCell.setCellStyle"
|
|
7
|
-
border
|
|
8
|
-
@selection-change="handleTableSelect"
|
|
9
|
-
v-bind="$attrs"
|
|
10
|
-
>
|
|
11
|
-
<template slot="empty">
|
|
12
|
-
<base-empty-data />
|
|
13
|
-
</template>
|
|
14
|
-
<el-table-column
|
|
15
|
-
v-if="checkBox"
|
|
16
|
-
type="selection"
|
|
17
|
-
width="55"
|
|
18
|
-
:selectable="selectable"
|
|
19
|
-
align="center"
|
|
20
|
-
>
|
|
21
|
-
</el-table-column>
|
|
22
|
-
<el-table-column
|
|
23
|
-
label="序号"
|
|
24
|
-
align="center"
|
|
25
|
-
type="index"
|
|
26
|
-
width="50"
|
|
27
|
-
v-if="showIndex"
|
|
28
|
-
>
|
|
29
|
-
</el-table-column>
|
|
30
|
-
<template v-if="tableConfig.length > 0">
|
|
31
|
-
<template v-for='(item,index) in tableConfig'>
|
|
32
|
-
<template v-if="item.type=='conunt'">
|
|
33
|
-
<el-table-column
|
|
34
|
-
show-overflow-tooltip
|
|
35
|
-
:label="item.label"
|
|
36
|
-
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
37
|
-
:width='item.width'
|
|
38
|
-
:key="index+'con'"
|
|
39
|
-
align="center"
|
|
40
|
-
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
<template slot-scope="scope">
|
|
44
|
-
|
|
45
|
-
<!-- <div v-else-if="$route.name=='designListPage'">{{scope.row._id}}</div> -->
|
|
46
|
-
|
|
47
|
-
<div
|
|
48
|
-
v-for="(e,i) in tableCustomArr"
|
|
49
|
-
v-if="scope.$index == i"
|
|
50
|
-
:key='i'
|
|
51
|
-
>
|
|
52
|
-
<div
|
|
53
|
-
v-for="(children,i1) in e"
|
|
54
|
-
:key='i1'
|
|
55
|
-
>
|
|
56
|
-
<!-- 这里进行规格属性遍历 -->
|
|
57
|
-
<span> {{children.property}}:{{children.value}}</span>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
</template>
|
|
63
|
-
</el-table-column>
|
|
64
|
-
</template>
|
|
65
|
-
<template v-else-if="item.type=='postman'">
|
|
66
|
-
<el-table-column
|
|
67
|
-
show-overflow-tooltip
|
|
68
|
-
:label="item.label"
|
|
69
|
-
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
70
|
-
:width='item.width'
|
|
71
|
-
:key="index+'con'"
|
|
72
|
-
align="center"
|
|
73
|
-
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
74
|
-
>
|
|
75
|
-
|
|
76
|
-
<template
|
|
77
|
-
slot-scope="scope"
|
|
78
|
-
>
|
|
79
|
-
{{user.realName}}
|
|
80
|
-
</template>
|
|
81
|
-
</el-table-column>
|
|
82
|
-
|
|
83
|
-
</template>
|
|
84
|
-
<template v-else-if=" item.type=='handleCode' ">
|
|
85
|
-
<el-table-column
|
|
86
|
-
show-overflow-tooltip
|
|
87
|
-
:label="item.label"
|
|
88
|
-
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
89
|
-
:width='item.width'
|
|
90
|
-
:key="index+'con'"
|
|
91
|
-
align="center"
|
|
92
|
-
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
93
|
-
>
|
|
94
|
-
|
|
95
|
-
<template
|
|
96
|
-
slot-scope="scope"
|
|
97
|
-
>
|
|
98
|
-
{{formId}}
|
|
99
|
-
</template>
|
|
100
|
-
</el-table-column>
|
|
101
|
-
|
|
102
|
-
</template>
|
|
103
|
-
<template v-else-if="item.type=='datetime'">
|
|
104
|
-
<el-table-column
|
|
105
|
-
show-overflow-tooltip
|
|
106
|
-
:label="item.label"
|
|
107
|
-
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
108
|
-
:width='item.width'
|
|
109
|
-
:key="index+'con'"
|
|
110
|
-
align="center"
|
|
111
|
-
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
112
|
-
>
|
|
113
|
-
|
|
114
|
-
<template slot-scope="scope">
|
|
115
|
-
|
|
116
|
-
<!-- <div v-else-if="$route.name=='designListPage'">{{scope.row._id}}</div> -->
|
|
117
|
-
|
|
118
|
-
<span>
|
|
119
|
-
{{scope.row[item.key] | formatDate}}
|
|
120
|
-
</span>
|
|
121
|
-
</template>
|
|
122
|
-
</el-table-column>
|
|
123
|
-
</template>
|
|
124
|
-
|
|
125
|
-
<template v-else-if="item.children && item.children.length > 0">
|
|
126
|
-
<el-table-column
|
|
127
|
-
:label="item.label"
|
|
128
|
-
:key="index+'par'"
|
|
129
|
-
>
|
|
130
|
-
<el-table-column
|
|
131
|
-
v-for="(i,ind) in item.children"
|
|
132
|
-
:label="i.label"
|
|
133
|
-
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
134
|
-
class-name="cell-pre"
|
|
135
|
-
:width='i.width'
|
|
136
|
-
:show-overflow-tooltip='true'
|
|
137
|
-
:key="ind+'sub'"
|
|
138
|
-
align="center"
|
|
139
|
-
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item,i)"
|
|
140
|
-
></el-table-column>
|
|
141
|
-
</el-table-column>
|
|
142
|
-
</template>
|
|
143
|
-
<template v-else>
|
|
144
|
-
<el-table-column
|
|
145
|
-
show-overflow-tooltip
|
|
146
|
-
:label="item.label"
|
|
147
|
-
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
148
|
-
:width='item.width'
|
|
149
|
-
:key="index+'con'"
|
|
150
|
-
align="center"
|
|
151
|
-
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
152
|
-
>
|
|
153
|
-
|
|
154
|
-
<template slot-scope="scope">
|
|
155
|
-
<div
|
|
156
|
-
v-if='item.label=="数据标题" && $route.name=="designListPage"'
|
|
157
|
-
style="cursor:pointer;color:#409EFF"
|
|
158
|
-
>
|
|
159
|
-
|
|
160
|
-
<span @click="goFormData(scope.row)">{{getTitle(item.key.split(","),scope.$index,scope.row) }}</span>
|
|
161
|
-
|
|
162
|
-
</div>
|
|
163
|
-
<!-- <div v-else-if="$route.name=='designListPage'">{{scope.row._id}}</div> -->
|
|
164
|
-
<div v-else-if="$route.name=='designListPage'">{{getStr(scope.row._id,item.key,scope.row) || scope.row.content[item.key]}}</div>
|
|
165
|
-
<div v-else-if="$route.name=='formDataDetail'">{{getStr(scope.row._id,item.prop,scope.row) ||scope.row[item.prop]}}</div>
|
|
166
|
-
|
|
167
|
-
</template>
|
|
168
|
-
</el-table-column>
|
|
169
|
-
</template>
|
|
170
|
-
|
|
171
|
-
</template>
|
|
172
|
-
</template>
|
|
173
|
-
<template v-else>
|
|
174
|
-
<el-table-column
|
|
175
|
-
label=""
|
|
176
|
-
prop=""
|
|
177
|
-
align="center"
|
|
178
|
-
>无</el-table-column>
|
|
179
|
-
</template>
|
|
180
|
-
<el-table-column
|
|
181
|
-
align="center"
|
|
182
|
-
label="操作"
|
|
183
|
-
v-if="buttons && buttons.length > 0"
|
|
184
|
-
width="120px"
|
|
185
|
-
fixed="right"
|
|
186
|
-
>
|
|
187
|
-
<template slot-scope="scope">
|
|
188
|
-
<template v-for="(item,index) in buttons">
|
|
189
|
-
<el-button
|
|
190
|
-
type="text"
|
|
191
|
-
@click="$emit(item.event,{'row':scope.row, 'func':item.func})"
|
|
192
|
-
:key="index+'btn'"
|
|
193
|
-
style="margin:0px 5px;"
|
|
194
|
-
:style="item.name=='删除'?'color:':''"
|
|
195
|
-
>{{item.name}}</el-button>
|
|
196
|
-
</template>
|
|
197
|
-
</template>
|
|
198
|
-
</el-table-column>
|
|
199
|
-
</el-table>
|
|
200
|
-
</template>
|
|
201
|
-
|
|
202
|
-
<script>
|
|
203
|
-
import moment from "moment";
|
|
204
|
-
import dataTypeList from "@/formBuilder/config/datetime.js";
|
|
205
|
-
import dataTimeRangeTypeList from "@/formBuilder/config/datetimerange.js";
|
|
206
|
-
export default {
|
|
207
|
-
props: {
|
|
208
|
-
// 表格数据
|
|
209
|
-
tableData: {
|
|
210
|
-
type: Array,
|
|
211
|
-
default: () => {
|
|
212
|
-
return [];
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
// 表格头字段及对应字段 {label:'表头显示字段',prop:'',width: '',children: [{label:'表头显示字段',prop:''}]}
|
|
216
|
-
tableConfig: {
|
|
217
|
-
type: Array,
|
|
218
|
-
default: () => {
|
|
219
|
-
return [];
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
// 操作按钮
|
|
223
|
-
buttons: {
|
|
224
|
-
type: Array,
|
|
225
|
-
default: () => {
|
|
226
|
-
return [];
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
// 是否显示多选框
|
|
230
|
-
checkBox: {
|
|
231
|
-
type: Boolean,
|
|
232
|
-
default: false
|
|
233
|
-
},
|
|
234
|
-
// 是否显示序号
|
|
235
|
-
showIndex: {
|
|
236
|
-
type: Boolean,
|
|
237
|
-
default: false
|
|
238
|
-
},
|
|
239
|
-
formDesign: {},
|
|
240
|
-
formId: {
|
|
241
|
-
type: String
|
|
242
|
-
},
|
|
243
|
-
title: {
|
|
244
|
-
type: String
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
computed: {
|
|
248
|
-
user() {
|
|
249
|
-
return this.$store.state.user;
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
data() {
|
|
253
|
-
return {
|
|
254
|
-
tableCustomArr: []
|
|
255
|
-
};
|
|
256
|
-
},
|
|
257
|
-
mounted() {
|
|
258
|
-
const _this = this;
|
|
259
|
-
_this.menuId = _this.$route.params.id;
|
|
260
|
-
// _this.tableCustomArr = _.cloneDeep(_this.tableData)
|
|
261
|
-
},
|
|
262
|
-
|
|
263
|
-
watch: {
|
|
264
|
-
tableConfig: {
|
|
265
|
-
deep: true,
|
|
266
|
-
immediate: true,
|
|
267
|
-
handler: function(newVal, oldVal) {
|
|
268
|
-
const _this = this;
|
|
269
|
-
_.find(_this.tableData, function(o, i) {
|
|
270
|
-
const obj = {};
|
|
271
|
-
for (const key in o) {
|
|
272
|
-
// if (o.hasOwnProperty.call(o, key)) {
|
|
273
|
-
if (key.includes("-Str")) {
|
|
274
|
-
obj[key] = o[key];
|
|
275
|
-
if (
|
|
276
|
-
!_.find(_this.tableConfig, function(o) {
|
|
277
|
-
return o.type == "conunt";
|
|
278
|
-
})
|
|
279
|
-
) {
|
|
280
|
-
_this.tableConfig.splice(1, 0, {
|
|
281
|
-
label: "规格属性",
|
|
282
|
-
prop: "key_conunt",
|
|
283
|
-
type: "conunt"
|
|
284
|
-
});
|
|
285
|
-
// _this.tableConfig.push({
|
|
286
|
-
// label: "规格属性",
|
|
287
|
-
// prop: "key_conunt",
|
|
288
|
-
// type: "conunt"
|
|
289
|
-
// });
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
// }
|
|
293
|
-
}
|
|
294
|
-
_this.$set(_this.tableCustomArr, i, obj);
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
methods: {
|
|
300
|
-
goFormData(obj) {
|
|
301
|
-
const vm = this;
|
|
302
|
-
vm.$router.push({
|
|
303
|
-
name: "formDataDetail",
|
|
304
|
-
params: { id: this.menuId },
|
|
305
|
-
query: { auditId: obj.content.auditId, title: this.title }
|
|
306
|
-
});
|
|
307
|
-
},
|
|
308
|
-
getStrRes(arr, opt, row, key) {
|
|
309
|
-
var str = [];
|
|
310
|
-
var id = row._id;
|
|
311
|
-
var vm = this;
|
|
312
|
-
if (Array.isArray(arr)) {
|
|
313
|
-
for (let i = 0; i < opt.length; i++) {
|
|
314
|
-
const e = opt[i];
|
|
315
|
-
for (let i2 = 0; i2 < arr.length; i2++) {
|
|
316
|
-
const e2 = arr[i2];
|
|
317
|
-
if (e2 == e.value) {
|
|
318
|
-
str.push(e.text);
|
|
319
|
-
str.join(",");
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
return str.join(",");
|
|
324
|
-
} else if (typeof arr == "number") {
|
|
325
|
-
for (let i = 0; i < opt.length; i++) {
|
|
326
|
-
const e = opt[i];
|
|
327
|
-
const e2 = arr;
|
|
328
|
-
if (e2 == e.value) {
|
|
329
|
-
str.push(e.text);
|
|
330
|
-
str.join(",");
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
return str.join(",");
|
|
334
|
-
} else {
|
|
335
|
-
return "";
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
getStr(id, key, row) {
|
|
339
|
-
var str = "";
|
|
340
|
-
var vm = this;
|
|
341
|
-
vm.tableData.map((e2, i2) => {
|
|
342
|
-
if (e2._id == id) {
|
|
343
|
-
vm.tableConfig.map((e, i) => {
|
|
344
|
-
// if (e.key.includes(",")) {
|
|
345
|
-
// e.key.split(",").map((e3, i) => {
|
|
346
|
-
// if (e3 == key) {
|
|
347
|
-
|
|
348
|
-
// var dataArr = e2.content[key];
|
|
349
|
-
// var dataOptions = e.options;
|
|
350
|
-
|
|
351
|
-
// if (
|
|
352
|
-
// e.type == "checkbox" ||
|
|
353
|
-
// e.type == "radio" ||
|
|
354
|
-
// e.type == "select"
|
|
355
|
-
// ) {
|
|
356
|
-
// str = vm.getStrRes(dataArr, dataOptions, row, key);
|
|
357
|
-
// } else {
|
|
358
|
-
// str = dataArr;
|
|
359
|
-
// }
|
|
360
|
-
// }
|
|
361
|
-
// });
|
|
362
|
-
// }
|
|
363
|
-
if (key == e.key) {
|
|
364
|
-
const dataArr = e2.content[key];
|
|
365
|
-
const dataOptions = e.options;
|
|
366
|
-
if (!dataArr) return "无";
|
|
367
|
-
if (
|
|
368
|
-
e.type == "checkbox" ||
|
|
369
|
-
e.type == "radio" ||
|
|
370
|
-
e.type == "select"
|
|
371
|
-
) {
|
|
372
|
-
str = vm.getStrRes(dataArr, dataOptions, row, key);
|
|
373
|
-
} else if (e.type == "datetime") {
|
|
374
|
-
var typeArr = dataTypeList.attrs.type.options.filter(function(
|
|
375
|
-
item
|
|
376
|
-
) {
|
|
377
|
-
return item.value == vm.formDesign[e.key].attrs.type;
|
|
378
|
-
});
|
|
379
|
-
str = moment(dataArr * 1000).format(typeArr[0].format);
|
|
380
|
-
} else if (e.type == "datetimerange") {
|
|
381
|
-
var typeList = dataTimeRangeTypeList.attrs.type.options.filter(
|
|
382
|
-
function(item) {
|
|
383
|
-
return item.value == vm.formDesign[e.key].attrs.type;
|
|
384
|
-
}
|
|
385
|
-
);
|
|
386
|
-
str =
|
|
387
|
-
moment(dataArr[0] * 1000).format(typeList[0].format) +
|
|
388
|
-
" 至 " +
|
|
389
|
-
moment(dataArr[1] * 1000).format(typeList[0].format);
|
|
390
|
-
} else {
|
|
391
|
-
str = dataArr;
|
|
392
|
-
}
|
|
393
|
-
} else if (!key && !e.key) {
|
|
394
|
-
for (const key in row) {
|
|
395
|
-
// if (Object.hasOwnProperty.call(row, key)) {
|
|
396
|
-
const e = row[key];
|
|
397
|
-
// }
|
|
398
|
-
}
|
|
399
|
-
} else {
|
|
400
|
-
// 详情子表级联
|
|
401
|
-
if (e.prop == key) {
|
|
402
|
-
let title = "";
|
|
403
|
-
if (e.type == "cascader") {
|
|
404
|
-
const arr = this.getOptionArr(e.options);
|
|
405
|
-
row[e.prop].map(one => {
|
|
406
|
-
arr.map(item => {
|
|
407
|
-
if (item.value == one) {
|
|
408
|
-
title = title + item.label + "/";
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
});
|
|
412
|
-
title = title.substring(0, title.length - 1);
|
|
413
|
-
str = title;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
return str;
|
|
422
|
-
},
|
|
423
|
-
// 扁平化数组
|
|
424
|
-
getOptionArr(arr) {
|
|
425
|
-
let result = [];
|
|
426
|
-
arr.map(item => {
|
|
427
|
-
var res = JSON.parse(JSON.stringify(item));
|
|
428
|
-
delete res["children"];
|
|
429
|
-
result.push(res);
|
|
430
|
-
if (item.children instanceof Array && item.children.length > 0) {
|
|
431
|
-
result = result.concat(this.getOptionArr(item.children));
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
return result;
|
|
435
|
-
},
|
|
436
|
-
getTitle(arr, index, row) {
|
|
437
|
-
var str = "";
|
|
438
|
-
var vm = this;
|
|
439
|
-
|
|
440
|
-
arr.forEach((e, i) => {
|
|
441
|
-
if (vm.tableData[index].content[e]) {
|
|
442
|
-
// str += vm.tableData[index].content[e];
|
|
443
|
-
str += vm.getStr(vm.tableData[index]._id, e, row);
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
return str;
|
|
447
|
-
},
|
|
448
|
-
handleTableSelect(val) {
|
|
449
|
-
this.$emit("handleTableSelect", val);
|
|
450
|
-
},
|
|
451
|
-
formatter(row, column, cellValue, index, item, subItem) {
|
|
452
|
-
if (item.children) {
|
|
453
|
-
const arr = [];
|
|
454
|
-
if (Array.isArray(cellValue)) {
|
|
455
|
-
cellValue.forEach(cell => {
|
|
456
|
-
if (subItem.options && typeof subItem.options == "string") {
|
|
457
|
-
arr.push(cell[subItem.prop + "Str"]);
|
|
458
|
-
} else {
|
|
459
|
-
const data = this.setCellValue(
|
|
460
|
-
row,
|
|
461
|
-
column,
|
|
462
|
-
cell[subItem.prop],
|
|
463
|
-
index,
|
|
464
|
-
subItem
|
|
465
|
-
);
|
|
466
|
-
arr.push(data);
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
return arr.join("\r\n");
|
|
471
|
-
} else {
|
|
472
|
-
if (!cellValue) {
|
|
473
|
-
return "";
|
|
474
|
-
} else {
|
|
475
|
-
return this.setCellValue(row, column, cellValue, index, item);
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
setCellValue(row, column, cellValue, index, item) {
|
|
480
|
-
let str = "";
|
|
481
|
-
|
|
482
|
-
if (item.options && typeof item.options == "string") {
|
|
483
|
-
return cellValue;
|
|
484
|
-
}
|
|
485
|
-
switch (item.type) {
|
|
486
|
-
case "input":
|
|
487
|
-
str = cellValue;
|
|
488
|
-
break;
|
|
489
|
-
case "time":
|
|
490
|
-
str = cellValue;
|
|
491
|
-
break;
|
|
492
|
-
case "textarea":
|
|
493
|
-
str = cellValue;
|
|
494
|
-
break;
|
|
495
|
-
case "date":
|
|
496
|
-
str = moment(cellValue * 1000).format("YYYY-MM-DD");
|
|
497
|
-
break;
|
|
498
|
-
case "daterange":
|
|
499
|
-
str = cellValue
|
|
500
|
-
.map(item => moment(item * 1000).format("YYYY-MM-DD"))
|
|
501
|
-
.join(" -- ");
|
|
502
|
-
break;
|
|
503
|
-
case "datetimerange":
|
|
504
|
-
str = cellValue
|
|
505
|
-
.map(item => moment(item * 1000).format("YYYY-MM-DD"))
|
|
506
|
-
.join(" -- ");
|
|
507
|
-
break;
|
|
508
|
-
case "datetime":
|
|
509
|
-
str = moment(cellValue * 1000).format("YYYY-MM-DD");
|
|
510
|
-
break;
|
|
511
|
-
case "timerange":
|
|
512
|
-
str = cellValue
|
|
513
|
-
.map(item => moment(item * 1000).format("HH:mm:ss"))
|
|
514
|
-
.join(" -- ");
|
|
515
|
-
break;
|
|
516
|
-
case "select":
|
|
517
|
-
const arr = item.options.filter
|
|
518
|
-
? item.options.filter(item => item.value == cellValue)
|
|
519
|
-
: [];
|
|
520
|
-
str = arr.length > 0 ? arr[0].text : "";
|
|
521
|
-
break;
|
|
522
|
-
case "switch":
|
|
523
|
-
str = cellValue == true ? "是" : cellValue == false ? "否" : "";
|
|
524
|
-
break;
|
|
525
|
-
case "number":
|
|
526
|
-
str = cellValue;
|
|
527
|
-
break;
|
|
528
|
-
case "radio":
|
|
529
|
-
const radioName = item.options.filter
|
|
530
|
-
? item.options.filter(item => item.value == cellValue)
|
|
531
|
-
: [];
|
|
532
|
-
str = radioName.length > 0 ? radioName[0].text : "";
|
|
533
|
-
break;
|
|
534
|
-
case "checkbox":
|
|
535
|
-
const checkbox = item.options.filter
|
|
536
|
-
? item.options
|
|
537
|
-
.filter(item => cellValue.indexOf(item.value) > -1)
|
|
538
|
-
.map(i => i.text)
|
|
539
|
-
: [];
|
|
540
|
-
str = checkbox.length > 0 ? checkbox.join(",") : "";
|
|
541
|
-
break;
|
|
542
|
-
case "text":
|
|
543
|
-
str = cellValue;
|
|
544
|
-
break;
|
|
545
|
-
}
|
|
546
|
-
return str;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
};
|
|
550
|
-
</script>
|
|
551
|
-
|
|
552
|
-
<style lang="scss" scoped>
|
|
553
|
-
/deep/.cell-pre .cell {
|
|
554
|
-
white-space: pre;
|
|
555
|
-
}
|
|
556
|
-
</style>
|
|
557
|
-
<style>
|
|
558
|
-
.el-tooltip__popper {
|
|
559
|
-
white-space: pre;
|
|
560
|
-
}
|
|
561
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-table
|
|
3
|
+
:data="tableData"
|
|
4
|
+
style="width: 100%;border:1px solid #ebeef5;"
|
|
5
|
+
:header-cell-style="$TableCell.setHeaderCellStyle"
|
|
6
|
+
:cell-style="$TableCell.setCellStyle"
|
|
7
|
+
border
|
|
8
|
+
@selection-change="handleTableSelect"
|
|
9
|
+
v-bind="$attrs"
|
|
10
|
+
>
|
|
11
|
+
<template slot="empty">
|
|
12
|
+
<base-empty-data />
|
|
13
|
+
</template>
|
|
14
|
+
<el-table-column
|
|
15
|
+
v-if="checkBox"
|
|
16
|
+
type="selection"
|
|
17
|
+
width="55"
|
|
18
|
+
:selectable="selectable"
|
|
19
|
+
align="center"
|
|
20
|
+
>
|
|
21
|
+
</el-table-column>
|
|
22
|
+
<el-table-column
|
|
23
|
+
label="序号"
|
|
24
|
+
align="center"
|
|
25
|
+
type="index"
|
|
26
|
+
width="50"
|
|
27
|
+
v-if="showIndex"
|
|
28
|
+
>
|
|
29
|
+
</el-table-column>
|
|
30
|
+
<template v-if="tableConfig.length > 0">
|
|
31
|
+
<template v-for='(item,index) in tableConfig'>
|
|
32
|
+
<template v-if="item.type=='conunt'">
|
|
33
|
+
<el-table-column
|
|
34
|
+
show-overflow-tooltip
|
|
35
|
+
:label="item.label"
|
|
36
|
+
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
37
|
+
:width='item.width'
|
|
38
|
+
:key="index+'con'"
|
|
39
|
+
align="center"
|
|
40
|
+
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
41
|
+
>
|
|
42
|
+
|
|
43
|
+
<template slot-scope="scope">
|
|
44
|
+
|
|
45
|
+
<!-- <div v-else-if="$route.name=='designListPage'">{{scope.row._id}}</div> -->
|
|
46
|
+
|
|
47
|
+
<div
|
|
48
|
+
v-for="(e,i) in tableCustomArr"
|
|
49
|
+
v-if="scope.$index == i"
|
|
50
|
+
:key='i'
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
v-for="(children,i1) in e"
|
|
54
|
+
:key='i1'
|
|
55
|
+
>
|
|
56
|
+
<!-- 这里进行规格属性遍历 -->
|
|
57
|
+
<span> {{children.property}}:{{children.value}}</span>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
</template>
|
|
63
|
+
</el-table-column>
|
|
64
|
+
</template>
|
|
65
|
+
<template v-else-if="item.type=='postman'">
|
|
66
|
+
<el-table-column
|
|
67
|
+
show-overflow-tooltip
|
|
68
|
+
:label="item.label"
|
|
69
|
+
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
70
|
+
:width='item.width'
|
|
71
|
+
:key="index+'con'"
|
|
72
|
+
align="center"
|
|
73
|
+
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
74
|
+
>
|
|
75
|
+
|
|
76
|
+
<template
|
|
77
|
+
slot-scope="scope"
|
|
78
|
+
>
|
|
79
|
+
{{user.realName}}
|
|
80
|
+
</template>
|
|
81
|
+
</el-table-column>
|
|
82
|
+
|
|
83
|
+
</template>
|
|
84
|
+
<template v-else-if=" item.type=='handleCode' ">
|
|
85
|
+
<el-table-column
|
|
86
|
+
show-overflow-tooltip
|
|
87
|
+
:label="item.label"
|
|
88
|
+
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
89
|
+
:width='item.width'
|
|
90
|
+
:key="index+'con'"
|
|
91
|
+
align="center"
|
|
92
|
+
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
93
|
+
>
|
|
94
|
+
|
|
95
|
+
<template
|
|
96
|
+
slot-scope="scope"
|
|
97
|
+
>
|
|
98
|
+
{{formId}}
|
|
99
|
+
</template>
|
|
100
|
+
</el-table-column>
|
|
101
|
+
|
|
102
|
+
</template>
|
|
103
|
+
<template v-else-if="item.type=='datetime'">
|
|
104
|
+
<el-table-column
|
|
105
|
+
show-overflow-tooltip
|
|
106
|
+
:label="item.label"
|
|
107
|
+
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
108
|
+
:width='item.width'
|
|
109
|
+
:key="index+'con'"
|
|
110
|
+
align="center"
|
|
111
|
+
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
112
|
+
>
|
|
113
|
+
|
|
114
|
+
<template slot-scope="scope">
|
|
115
|
+
|
|
116
|
+
<!-- <div v-else-if="$route.name=='designListPage'">{{scope.row._id}}</div> -->
|
|
117
|
+
|
|
118
|
+
<span>
|
|
119
|
+
{{scope.row[item.key] | formatDate}}
|
|
120
|
+
</span>
|
|
121
|
+
</template>
|
|
122
|
+
</el-table-column>
|
|
123
|
+
</template>
|
|
124
|
+
|
|
125
|
+
<template v-else-if="item.children && item.children.length > 0">
|
|
126
|
+
<el-table-column
|
|
127
|
+
:label="item.label"
|
|
128
|
+
:key="index+'par'"
|
|
129
|
+
>
|
|
130
|
+
<el-table-column
|
|
131
|
+
v-for="(i,ind) in item.children"
|
|
132
|
+
:label="i.label"
|
|
133
|
+
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
134
|
+
class-name="cell-pre"
|
|
135
|
+
:width='i.width'
|
|
136
|
+
:show-overflow-tooltip='true'
|
|
137
|
+
:key="ind+'sub'"
|
|
138
|
+
align="center"
|
|
139
|
+
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item,i)"
|
|
140
|
+
></el-table-column>
|
|
141
|
+
</el-table-column>
|
|
142
|
+
</template>
|
|
143
|
+
<template v-else>
|
|
144
|
+
<el-table-column
|
|
145
|
+
show-overflow-tooltip
|
|
146
|
+
:label="item.label"
|
|
147
|
+
:prop='item.prop ? item.prop : `content.${item.key}`'
|
|
148
|
+
:width='item.width'
|
|
149
|
+
:key="index+'con'"
|
|
150
|
+
align="center"
|
|
151
|
+
:formatter="(row, column, cellValue, indexs)=>formatter(row, column, cellValue, indexs,item)"
|
|
152
|
+
>
|
|
153
|
+
|
|
154
|
+
<template slot-scope="scope">
|
|
155
|
+
<div
|
|
156
|
+
v-if='item.label=="数据标题" && $route.name=="designListPage"'
|
|
157
|
+
style="cursor:pointer;color:#409EFF"
|
|
158
|
+
>
|
|
159
|
+
|
|
160
|
+
<span @click="goFormData(scope.row)">{{getTitle(item.key.split(","),scope.$index,scope.row) }}</span>
|
|
161
|
+
|
|
162
|
+
</div>
|
|
163
|
+
<!-- <div v-else-if="$route.name=='designListPage'">{{scope.row._id}}</div> -->
|
|
164
|
+
<div v-else-if="$route.name=='designListPage'">{{getStr(scope.row._id,item.key,scope.row) || scope.row.content[item.key]}}</div>
|
|
165
|
+
<div v-else-if="$route.name=='formDataDetail'">{{getStr(scope.row._id,item.prop,scope.row) ||scope.row[item.prop]}}</div>
|
|
166
|
+
|
|
167
|
+
</template>
|
|
168
|
+
</el-table-column>
|
|
169
|
+
</template>
|
|
170
|
+
|
|
171
|
+
</template>
|
|
172
|
+
</template>
|
|
173
|
+
<template v-else>
|
|
174
|
+
<el-table-column
|
|
175
|
+
label=""
|
|
176
|
+
prop=""
|
|
177
|
+
align="center"
|
|
178
|
+
>无</el-table-column>
|
|
179
|
+
</template>
|
|
180
|
+
<el-table-column
|
|
181
|
+
align="center"
|
|
182
|
+
label="操作"
|
|
183
|
+
v-if="buttons && buttons.length > 0"
|
|
184
|
+
width="120px"
|
|
185
|
+
fixed="right"
|
|
186
|
+
>
|
|
187
|
+
<template slot-scope="scope">
|
|
188
|
+
<template v-for="(item,index) in buttons">
|
|
189
|
+
<el-button
|
|
190
|
+
type="text"
|
|
191
|
+
@click="$emit(item.event,{'row':scope.row, 'func':item.func})"
|
|
192
|
+
:key="index+'btn'"
|
|
193
|
+
style="margin:0px 5px;"
|
|
194
|
+
:style="item.name=='删除'?'color:':''"
|
|
195
|
+
>{{item.name}}</el-button>
|
|
196
|
+
</template>
|
|
197
|
+
</template>
|
|
198
|
+
</el-table-column>
|
|
199
|
+
</el-table>
|
|
200
|
+
</template>
|
|
201
|
+
|
|
202
|
+
<script>
|
|
203
|
+
import moment from "moment";
|
|
204
|
+
import dataTypeList from "@/formBuilder/config/datetime.js";
|
|
205
|
+
import dataTimeRangeTypeList from "@/formBuilder/config/datetimerange.js";
|
|
206
|
+
export default {
|
|
207
|
+
props: {
|
|
208
|
+
// 表格数据
|
|
209
|
+
tableData: {
|
|
210
|
+
type: Array,
|
|
211
|
+
default: () => {
|
|
212
|
+
return [];
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
// 表格头字段及对应字段 {label:'表头显示字段',prop:'',width: '',children: [{label:'表头显示字段',prop:''}]}
|
|
216
|
+
tableConfig: {
|
|
217
|
+
type: Array,
|
|
218
|
+
default: () => {
|
|
219
|
+
return [];
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
// 操作按钮
|
|
223
|
+
buttons: {
|
|
224
|
+
type: Array,
|
|
225
|
+
default: () => {
|
|
226
|
+
return [];
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
// 是否显示多选框
|
|
230
|
+
checkBox: {
|
|
231
|
+
type: Boolean,
|
|
232
|
+
default: false
|
|
233
|
+
},
|
|
234
|
+
// 是否显示序号
|
|
235
|
+
showIndex: {
|
|
236
|
+
type: Boolean,
|
|
237
|
+
default: false
|
|
238
|
+
},
|
|
239
|
+
formDesign: {},
|
|
240
|
+
formId: {
|
|
241
|
+
type: String
|
|
242
|
+
},
|
|
243
|
+
title: {
|
|
244
|
+
type: String
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
computed: {
|
|
248
|
+
user() {
|
|
249
|
+
return this.$store.state.user;
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
data() {
|
|
253
|
+
return {
|
|
254
|
+
tableCustomArr: []
|
|
255
|
+
};
|
|
256
|
+
},
|
|
257
|
+
mounted() {
|
|
258
|
+
const _this = this;
|
|
259
|
+
_this.menuId = _this.$route.params.id;
|
|
260
|
+
// _this.tableCustomArr = _.cloneDeep(_this.tableData)
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
watch: {
|
|
264
|
+
tableConfig: {
|
|
265
|
+
deep: true,
|
|
266
|
+
immediate: true,
|
|
267
|
+
handler: function(newVal, oldVal) {
|
|
268
|
+
const _this = this;
|
|
269
|
+
_.find(_this.tableData, function(o, i) {
|
|
270
|
+
const obj = {};
|
|
271
|
+
for (const key in o) {
|
|
272
|
+
// if (o.hasOwnProperty.call(o, key)) {
|
|
273
|
+
if (key.includes("-Str")) {
|
|
274
|
+
obj[key] = o[key];
|
|
275
|
+
if (
|
|
276
|
+
!_.find(_this.tableConfig, function(o) {
|
|
277
|
+
return o.type == "conunt";
|
|
278
|
+
})
|
|
279
|
+
) {
|
|
280
|
+
_this.tableConfig.splice(1, 0, {
|
|
281
|
+
label: "规格属性",
|
|
282
|
+
prop: "key_conunt",
|
|
283
|
+
type: "conunt"
|
|
284
|
+
});
|
|
285
|
+
// _this.tableConfig.push({
|
|
286
|
+
// label: "规格属性",
|
|
287
|
+
// prop: "key_conunt",
|
|
288
|
+
// type: "conunt"
|
|
289
|
+
// });
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
// }
|
|
293
|
+
}
|
|
294
|
+
_this.$set(_this.tableCustomArr, i, obj);
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
methods: {
|
|
300
|
+
goFormData(obj) {
|
|
301
|
+
const vm = this;
|
|
302
|
+
vm.$router.push({
|
|
303
|
+
name: "formDataDetail",
|
|
304
|
+
params: { id: this.menuId },
|
|
305
|
+
query: { auditId: obj.content.auditId, title: this.title }
|
|
306
|
+
});
|
|
307
|
+
},
|
|
308
|
+
getStrRes(arr, opt, row, key) {
|
|
309
|
+
var str = [];
|
|
310
|
+
var id = row._id;
|
|
311
|
+
var vm = this;
|
|
312
|
+
if (Array.isArray(arr)) {
|
|
313
|
+
for (let i = 0; i < opt.length; i++) {
|
|
314
|
+
const e = opt[i];
|
|
315
|
+
for (let i2 = 0; i2 < arr.length; i2++) {
|
|
316
|
+
const e2 = arr[i2];
|
|
317
|
+
if (e2 == e.value) {
|
|
318
|
+
str.push(e.text);
|
|
319
|
+
str.join(",");
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return str.join(",");
|
|
324
|
+
} else if (typeof arr == "number") {
|
|
325
|
+
for (let i = 0; i < opt.length; i++) {
|
|
326
|
+
const e = opt[i];
|
|
327
|
+
const e2 = arr;
|
|
328
|
+
if (e2 == e.value) {
|
|
329
|
+
str.push(e.text);
|
|
330
|
+
str.join(",");
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return str.join(",");
|
|
334
|
+
} else {
|
|
335
|
+
return "";
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
getStr(id, key, row) {
|
|
339
|
+
var str = "";
|
|
340
|
+
var vm = this;
|
|
341
|
+
vm.tableData.map((e2, i2) => {
|
|
342
|
+
if (e2._id == id) {
|
|
343
|
+
vm.tableConfig.map((e, i) => {
|
|
344
|
+
// if (e.key.includes(",")) {
|
|
345
|
+
// e.key.split(",").map((e3, i) => {
|
|
346
|
+
// if (e3 == key) {
|
|
347
|
+
|
|
348
|
+
// var dataArr = e2.content[key];
|
|
349
|
+
// var dataOptions = e.options;
|
|
350
|
+
|
|
351
|
+
// if (
|
|
352
|
+
// e.type == "checkbox" ||
|
|
353
|
+
// e.type == "radio" ||
|
|
354
|
+
// e.type == "select"
|
|
355
|
+
// ) {
|
|
356
|
+
// str = vm.getStrRes(dataArr, dataOptions, row, key);
|
|
357
|
+
// } else {
|
|
358
|
+
// str = dataArr;
|
|
359
|
+
// }
|
|
360
|
+
// }
|
|
361
|
+
// });
|
|
362
|
+
// }
|
|
363
|
+
if (key == e.key) {
|
|
364
|
+
const dataArr = e2.content[key];
|
|
365
|
+
const dataOptions = e.options;
|
|
366
|
+
if (!dataArr) return "无";
|
|
367
|
+
if (
|
|
368
|
+
e.type == "checkbox" ||
|
|
369
|
+
e.type == "radio" ||
|
|
370
|
+
e.type == "select"
|
|
371
|
+
) {
|
|
372
|
+
str = vm.getStrRes(dataArr, dataOptions, row, key);
|
|
373
|
+
} else if (e.type == "datetime") {
|
|
374
|
+
var typeArr = dataTypeList.attrs.type.options.filter(function(
|
|
375
|
+
item
|
|
376
|
+
) {
|
|
377
|
+
return item.value == vm.formDesign[e.key].attrs.type;
|
|
378
|
+
});
|
|
379
|
+
str = moment(dataArr * 1000).format(typeArr[0].format);
|
|
380
|
+
} else if (e.type == "datetimerange") {
|
|
381
|
+
var typeList = dataTimeRangeTypeList.attrs.type.options.filter(
|
|
382
|
+
function(item) {
|
|
383
|
+
return item.value == vm.formDesign[e.key].attrs.type;
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
str =
|
|
387
|
+
moment(dataArr[0] * 1000).format(typeList[0].format) +
|
|
388
|
+
" 至 " +
|
|
389
|
+
moment(dataArr[1] * 1000).format(typeList[0].format);
|
|
390
|
+
} else {
|
|
391
|
+
str = dataArr;
|
|
392
|
+
}
|
|
393
|
+
} else if (!key && !e.key) {
|
|
394
|
+
for (const key in row) {
|
|
395
|
+
// if (Object.hasOwnProperty.call(row, key)) {
|
|
396
|
+
const e = row[key];
|
|
397
|
+
// }
|
|
398
|
+
}
|
|
399
|
+
} else {
|
|
400
|
+
// 详情子表级联
|
|
401
|
+
if (e.prop == key) {
|
|
402
|
+
let title = "";
|
|
403
|
+
if (e.type == "cascader") {
|
|
404
|
+
const arr = this.getOptionArr(e.options);
|
|
405
|
+
row[e.prop].map(one => {
|
|
406
|
+
arr.map(item => {
|
|
407
|
+
if (item.value == one) {
|
|
408
|
+
title = title + item.label + "/";
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
title = title.substring(0, title.length - 1);
|
|
413
|
+
str = title;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
return str;
|
|
422
|
+
},
|
|
423
|
+
// 扁平化数组
|
|
424
|
+
getOptionArr(arr) {
|
|
425
|
+
let result = [];
|
|
426
|
+
arr.map(item => {
|
|
427
|
+
var res = JSON.parse(JSON.stringify(item));
|
|
428
|
+
delete res["children"];
|
|
429
|
+
result.push(res);
|
|
430
|
+
if (item.children instanceof Array && item.children.length > 0) {
|
|
431
|
+
result = result.concat(this.getOptionArr(item.children));
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
return result;
|
|
435
|
+
},
|
|
436
|
+
getTitle(arr, index, row) {
|
|
437
|
+
var str = "";
|
|
438
|
+
var vm = this;
|
|
439
|
+
|
|
440
|
+
arr.forEach((e, i) => {
|
|
441
|
+
if (vm.tableData[index].content[e]) {
|
|
442
|
+
// str += vm.tableData[index].content[e];
|
|
443
|
+
str += vm.getStr(vm.tableData[index]._id, e, row);
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
return str;
|
|
447
|
+
},
|
|
448
|
+
handleTableSelect(val) {
|
|
449
|
+
this.$emit("handleTableSelect", val);
|
|
450
|
+
},
|
|
451
|
+
formatter(row, column, cellValue, index, item, subItem) {
|
|
452
|
+
if (item.children) {
|
|
453
|
+
const arr = [];
|
|
454
|
+
if (Array.isArray(cellValue)) {
|
|
455
|
+
cellValue.forEach(cell => {
|
|
456
|
+
if (subItem.options && typeof subItem.options == "string") {
|
|
457
|
+
arr.push(cell[subItem.prop + "Str"]);
|
|
458
|
+
} else {
|
|
459
|
+
const data = this.setCellValue(
|
|
460
|
+
row,
|
|
461
|
+
column,
|
|
462
|
+
cell[subItem.prop],
|
|
463
|
+
index,
|
|
464
|
+
subItem
|
|
465
|
+
);
|
|
466
|
+
arr.push(data);
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
return arr.join("\r\n");
|
|
471
|
+
} else {
|
|
472
|
+
if (!cellValue) {
|
|
473
|
+
return "";
|
|
474
|
+
} else {
|
|
475
|
+
return this.setCellValue(row, column, cellValue, index, item);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
setCellValue(row, column, cellValue, index, item) {
|
|
480
|
+
let str = "";
|
|
481
|
+
|
|
482
|
+
if (item.options && typeof item.options == "string") {
|
|
483
|
+
return cellValue;
|
|
484
|
+
}
|
|
485
|
+
switch (item.type) {
|
|
486
|
+
case "input":
|
|
487
|
+
str = cellValue;
|
|
488
|
+
break;
|
|
489
|
+
case "time":
|
|
490
|
+
str = cellValue;
|
|
491
|
+
break;
|
|
492
|
+
case "textarea":
|
|
493
|
+
str = cellValue;
|
|
494
|
+
break;
|
|
495
|
+
case "date":
|
|
496
|
+
str = moment(cellValue * 1000).format("YYYY-MM-DD");
|
|
497
|
+
break;
|
|
498
|
+
case "daterange":
|
|
499
|
+
str = cellValue
|
|
500
|
+
.map(item => moment(item * 1000).format("YYYY-MM-DD"))
|
|
501
|
+
.join(" -- ");
|
|
502
|
+
break;
|
|
503
|
+
case "datetimerange":
|
|
504
|
+
str = cellValue
|
|
505
|
+
.map(item => moment(item * 1000).format("YYYY-MM-DD"))
|
|
506
|
+
.join(" -- ");
|
|
507
|
+
break;
|
|
508
|
+
case "datetime":
|
|
509
|
+
str = moment(cellValue * 1000).format("YYYY-MM-DD");
|
|
510
|
+
break;
|
|
511
|
+
case "timerange":
|
|
512
|
+
str = cellValue
|
|
513
|
+
.map(item => moment(item * 1000).format("HH:mm:ss"))
|
|
514
|
+
.join(" -- ");
|
|
515
|
+
break;
|
|
516
|
+
case "select":
|
|
517
|
+
const arr = item.options.filter
|
|
518
|
+
? item.options.filter(item => item.value == cellValue)
|
|
519
|
+
: [];
|
|
520
|
+
str = arr.length > 0 ? arr[0].text : "";
|
|
521
|
+
break;
|
|
522
|
+
case "switch":
|
|
523
|
+
str = cellValue == true ? "是" : cellValue == false ? "否" : "";
|
|
524
|
+
break;
|
|
525
|
+
case "number":
|
|
526
|
+
str = cellValue;
|
|
527
|
+
break;
|
|
528
|
+
case "radio":
|
|
529
|
+
const radioName = item.options.filter
|
|
530
|
+
? item.options.filter(item => item.value == cellValue)
|
|
531
|
+
: [];
|
|
532
|
+
str = radioName.length > 0 ? radioName[0].text : "";
|
|
533
|
+
break;
|
|
534
|
+
case "checkbox":
|
|
535
|
+
const checkbox = item.options.filter
|
|
536
|
+
? item.options
|
|
537
|
+
.filter(item => cellValue.indexOf(item.value) > -1)
|
|
538
|
+
.map(i => i.text)
|
|
539
|
+
: [];
|
|
540
|
+
str = checkbox.length > 0 ? checkbox.join(",") : "";
|
|
541
|
+
break;
|
|
542
|
+
case "text":
|
|
543
|
+
str = cellValue;
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
return str;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
</script>
|
|
551
|
+
|
|
552
|
+
<style lang="scss" scoped>
|
|
553
|
+
/deep/.cell-pre .cell {
|
|
554
|
+
white-space: pre;
|
|
555
|
+
}
|
|
556
|
+
</style>
|
|
557
|
+
<style>
|
|
558
|
+
.el-tooltip__popper {
|
|
559
|
+
white-space: pre;
|
|
560
|
+
}
|
|
561
|
+
</style>
|