index.vue 156 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153
  1. <template>
  2. <div class="home">
  3. <div class="grand flex">
  4. <div class="left-laowang" style="flex: 0 0 180px;overflow: hidden;">
  5. <el-col :span="24" class="left" :style="'height:'+ (tableHeight + 113) + 'px;'">
  6. <div class="department">
  7. <span><i class="iconfont firerock-iconzuzhijiegou" style="font-size:10px;" ></i>&nbsp;{{ $t('lable.department') }}</span>
  8. <div v-on:click="createDepartment(-1)" v-if="user.userNameNeedTranslate != '1'">
  9. <i class="fa fa-plus-circle"></i>
  10. {{ $t('create') }}
  11. </div>
  12. </div>
  13. <div style="width: 100%;display: flex">
  14. <el-button v-if="!adjustPosition" style="width: 100%;" size="small" @click="adjustPositionClick()">调整部门</el-button>
  15. <el-button v-if="adjustPosition" style="width: 50%" size="small" @click="adjustPosition = !adjustPosition,data = dataRepeat">取消</el-button>
  16. <el-button v-if="adjustPosition" style="width: 50%" size="small" @click="adjustPositionClick()">确定</el-button>
  17. </div>
  18. <el-divider style="margin: 0px 0px !important;height:0.5px;"></el-divider>
  19. <div class="tree" :style="'height:'+ (tableHeight + 83) + 'px'">
  20. <el-tree :data="data"
  21. :props="defaultProps"
  22. :draggable="adjustPosition"
  23. :allow-drop="allowDrop"
  24. @node-drop="nodeDrop"
  25. style="padding-bottom:70px;"
  26. :expand-on-click-node="false" accordion @node-click="handleNodeClick" :default-expanded-keys="jDarr" @node-expand="jieDian" @node-collapse="shutDown" @current-change="chufa">
  27. <span class="custom-tree-node" style="position: relative;box-sizing: border-box;width: 10%;" slot-scope="{ node }" @mouseleave= mouseleave(data,$event) @mouseover= mouseover(data,$event)>
  28. <span style="padding-right: 50px;box-sizing: border-box;overflow:hidden;text-overflow:ellipsis;line-height: 36px; display: inline-block;">
  29. <span v-if="user.userNameNeedTranslate == '1'">
  30. <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
  31. </span>
  32. <span v-else>
  33. {{ node.label }} <i v-if="node.data.ddDeptid != null" class="iconfont firerock-icondingding"></i>
  34. </span>
  35. <span v-if="node.label != $t('lable.allStaff') && node.label != $t('lable.unassigned') && adjustPosition" class="treeIons">
  36. <i class="el-icon-s-operation" style="color: #409eff"></i>
  37. </span>
  38. </span>
  39. <!-- <span v-if="node.label != '全部人员'" class="node none"> -->
  40. <span v-if="node.label != $t('lable.allStaff') && node.label != $t('lable.unassigned')" class="node none poAub">
  41. <el-button type="text" size="mini" @click="createDepartment(-2)" v-if="user.userNameNeedTranslate != '1'">
  42. <i class="el-icon-circle-plus-outline"></i> <!-- 新增 -->
  43. </el-button>
  44. <el-button type="text" size="mini" @click="deleteDep(null)" >
  45. <i class="el-icon-delete"></i> <!-- 删除 -->
  46. </el-button>
  47. </span>
  48. </span>
  49. </el-tree>
  50. </div>
  51. </el-col>
  52. </div>
  53. <div class="line line-second" style="display:flex;justify-content: center;align-items: center;">
  54. <div style="line-height: 5px;text-align: center;color: rgb(151 151 151);">
  55. -
  56. -
  57. -
  58. </div>
  59. </div>
  60. <div style="width: 200px; flex: 1; background: green" class="box-second-father">
  61. <el-col :span="24" class="right">
  62. <!--工具条-->
  63. <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
  64. <el-form :inline="true">
  65. <!-- <div style="width: 300px;display: inline-block;">
  66. <el-input v-model="keyword" class="input-with-select" placeholder="请输入人员名字搜索" clearable="true">
  67. <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
  68. </el-input>
  69. </div> -->
  70. <el-form-item>
  71. <div v-if="depData == null || depData.id == -1" class="nowTime" style="cursor:unset">
  72. <i class="fa fa-home"></i>{{ $t('lable.allStaff') }}
  73. </div>
  74. <div v-else-if="depData.id == 0" class="nowTime" style="cursor:unset">
  75. <i class="fa fa-home"></i>{{ $t('lable.unassigned') }}
  76. </div>
  77. <div v-else-if="depData != null && depData.id != -1 && depData.id != 0" class="nowTime" @click="createDepartment(0)">
  78. <i class="fa fa-pencil-square-o"></i>
  79. <!-- {{depData !=null ? depData.label : ''}} -->
  80. <span v-if="translation == '1' && user.userNameNeedTranslate == '1'">{{depData != null ?depData.label:""}}</span>
  81. <span v-if="translation == '2' && user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='depData.label'></TranslationOpenDataText></span>
  82. <span v-if="translation == '3' && user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='depData.label'></TranslationOpenDataText></span>
  83. <span v-if="user.userNameNeedTranslate != '1'">{{depData != null ?depData.label:""}}</span>
  84. <!-- <i class="iconfont firerock-icondingding"></i> -->
  85. <!-- {{translation}} -->
  86. </div>
  87. </el-form-item>
  88. <el-form-item>
  89. <div style="color:#999;font-size:13px;">{{ $t('gong') }}<span :style="total>user.company.staffCountMax?'color:red;':''">{{total}}</span>{{ $t('other.people') }}
  90. <span v-if="depData == null || depData.id == -1">({{ $t('shangxian') }}{{user.company.staffCountMax}}{{$t('other.people')}})</span>
  91. <!-- <el-link style="font-size:13px;margin-left:10px" type="primary" :underline="false" @click="recordMsgDialog = true" v-if="recordMsg.result == 0">同步日志</el-link> -->
  92. </div>
  93. </el-form-item>
  94. <el-form-item style="float:right;" v-if="permissions.structureCustomConfig">
  95. <el-link type="primary" :underline="false" @click="customConfigShow">{{ $t('customConfiguration') }}</el-link>
  96. </el-form-item>
  97. <el-form-item style="float:right;" v-if="permissions.structureExport">
  98. <el-link type="primary" :underline="false" @click="showExportDialog">{{ $t('exportpersonnel') }}</el-link>
  99. </el-form-item>
  100. <el-form-item style="float:right;" v-if="user.timeType.syncDingding == 0 && permissions.structureAdd && user.userNameNeedTranslate != '1' && user.dingdingUserid == null">
  101. <el-link type="primary" :underline="false" @click="openInsertDialog(null)">{{ $t('addpersonnel') }}</el-link>
  102. </el-form-item>
  103. <!--导入薪资-->
  104. <el-form-item style="float:right;" v-if="permissions.structurePersonnel">
  105. <el-link type="primary" :underline="false" @click="importUserSalary(null)">{{ $t('importSalary') }}</el-link>
  106. </el-form-item>
  107. <el-form-item style="float:right;" v-if="user.timeType.syncDingding == 0 && permissions.structureImport && user.userNameNeedTranslate != '1' && user.dingdingUserid == null">
  108. <el-link type="primary" :underline="false" @click="importUserC">{{ $t('bulkimport') }}</el-link>
  109. </el-form-item>
  110. <el-form-item style="float:right;" v-if="user.corpwxUserid != null && permissions.structureImport && user.companyId==469">
  111. <el-link type="primary" :underline="false" @click="syncMembByCardTime">{{ $t('associateenterprisemicroidentity') }}</el-link>
  112. </el-form-item>
  113. <el-form-item style="float:right;" v-if="user.corpwxUserid != null && permissions.structureImport && user.companyId!=469">
  114. <!-- <el-link type="primary" v-if="user.userNameNeedTranslate != '1'" :underline="false" @click="syncWithCorpWxDayload">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link>
  115. <el-link type="primary" v-if="user.userNameNeedTranslate == '1'" :underline="false" @click="newSyncWithCorpWx">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link> -->
  116. <el-link type="primary" v-if="user.userNameNeedTranslate != '1'" :underline="false" @click="syncWithCorpWx">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link>
  117. <el-link type="primary" v-if="user.userNameNeedTranslate == '1'" :underline="false" @click="newSyncWithCorpWxDayload = true">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link>
  118. </el-form-item>
  119. <el-form-item style="float:right;" v-if="user.dingdingUserid != null && permissions.structureImport">
  120. <el-link type="primary" :underline="false" @click="showCorpDDSyncDialog">{{ $t('synchronizetheaddressbook') }}</el-link>
  121. </el-form-item>
  122. <el-form-item style="float:right;" v-if="user.feishuUserid != null && permissions.structureImport">
  123. <el-link type="primary" :underline="false" @click="syncFeishu">{{ '同步飞书通讯录' }}</el-link>
  124. </el-form-item>
  125. <el-form-item style="float:right;" v-if="user.timeType.syncAd==1">
  126. <el-link type="primary" :underline="false" @click="syncAd">{{ '同步AD域控通讯录'}}</el-link>
  127. </el-form-item>
  128. <!-- <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
  129. <el-link type="primary" :underline="false" href="./upload/人员导入模板.xlsx" download="人员导入模板.xlsx">模板下载</el-link>
  130. </el-form-item> -->
  131. <!-- <el-form-item v-if="depData != null && depData.id != -1 && depData.id != 0" style="float:right;border: 0.5px solid #20a0ff;height: 27px;margin-top: 6px;">
  132. </el-form-item> -->
  133. <!-- <el-form-item style="float:right;">
  134. <el-link type="danger" v-if="depData != null && depData.id != -1 && depData.id != 0" :underline="false" @click="deleteDep(null)">删除部门</el-link>
  135. </el-form-item>
  136. <el-form-item style="float:right;">
  137. <el-link type="primary" v-if="depData != null && depData.id != -1 && depData.id != 0" :underline="false" @click="createDepartment(-2)">新增子部门</el-link>
  138. </el-form-item> -->
  139. <el-form-item style="float:right;">
  140. <span style="color: #666666">{{ $t('jiao-se') }}</span>
  141. <el-select v-model="roleId" :placeholder="$t('defaultText.pleaseChoose')" @change="page = 1;getUser()" style="width: 120px" clearable size="small">
  142. <!-- <el-option
  143. v-for="item in rolesa"
  144. :key="item.value"
  145. :label="item.label"
  146. :value="item.value">
  147. </el-option> -->
  148. <el-option v-for="item in acquireRoleList" :key="item.id" :label="item.rolename" :value="item.id"></el-option>
  149. </el-select>
  150. </el-form-item>
  151. <el-form-item style="float:right;">
  152. <span style="color: #666666">{{ $t('state.states') }}</span>
  153. <el-select v-model="status" :placeholder="$t('defaultText.pleaseChoose')" @change="page = 1;getUser()" style="width: 120px" size="small">
  154. <el-option
  155. v-for="item in states"
  156. :key="item.value"
  157. :label="item.label"
  158. :value="item.value">
  159. </el-option>
  160. </el-select>
  161. </el-form-item>
  162. <el-form-item style="float:right;">
  163. <div style="width: 300px;display: inline-block;margin-top: 4px">
  164. <el-input v-model="keyword" class="input-with-select" placeholder="请输入" clearable="true" size="small">
  165. <el-select v-model="integer" slot="prepend" style="width: 80px">
  166. <el-option label="姓名" value="0"></el-option>
  167. <el-option label="电话" value="1"></el-option>
  168. <el-option label="工号" value="2"></el-option>
  169. </el-select>
  170. <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
  171. </el-input>
  172. </div>
  173. </el-form-item>
  174. <el-form-item style="float:right;" v-if="depData != null && depData.id != '-1'">
  175. <el-checkbox v-model="onlyDirect" @change="page = 1;getUser()">{{ $t('directstaff') }}</el-checkbox>
  176. </el-form-item>
  177. </el-form>
  178. </el-col>
  179. <!--列表-->
  180. <el-table ref="handleSelectTable" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="handleSelectionZzjg">
  181. <el-table-column type="selection" width="50"></el-table-column>
  182. <el-table-column type="index" width="50">
  183. <template slot-scope="scope" >
  184. {{scope.$index+1+(page-1)*size}}
  185. </template>
  186. </el-table-column>
  187. <el-table-column prop="name" :label="$t('lable.name')" width="150">
  188. <template slot-scope="scope">
  189. <div class="classwxName">
  190. <span v-if="user.corpwxUserid && saasSyncContact == 0" class="classwxNameIon">
  191. <img src="../../assets/image/qiyeweix.png" alt="">
  192. </span>
  193. <div v-if="user.userNameNeedTranslate == 1">
  194. <TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText>
  195. </div>
  196. <div v-else>{{scope.row.name}}</div>
  197. </div>
  198. </template>
  199. </el-table-column>
  200. <el-table-column prop="jobNumber" :label="$t('Worknumber')" ></el-table-column>
  201. <el-table-column prop="phone" :label="$t('shou-ji')" width="120"></el-table-column>
  202. <el-table-column prop="departmentName" :label="$t('lable.department')" width="220">
  203. <template slot-scope="scope">
  204. <div>
  205. <div v-if="user.userNameNeedTranslate == 1">
  206. <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
  207. </div>
  208. <div v-else>{{scope.row.departmentName}}</div>
  209. </div>
  210. </template>
  211. </el-table-column>
  212. <el-table-column prop="superiorName" label="直属审核人" width="120" v-if="user.timeType.reportAuditType == 5 || user.timeType.reportAuditType == 6">
  213. <template slot-scope="scope">
  214. <div>
  215. <div v-if="user.userNameNeedTranslate == 1">
  216. <TranslationOpenDataText type='userName' :openid='scope.row.superiorCorpwxUserid'></TranslationOpenDataText>
  217. </div>
  218. <div v-else>{{scope.row.superiorName}}</div>
  219. </div>
  220. </template>
  221. </el-table-column>
  222. <el-table-column v-if="user.companyId==4374" :label="'员工类型'" width="100">
  223. <template slot-scope="scope">{{findValue('员工类型',scope.row.plateMap)}}</template>
  224. </el-table-column>
  225. <el-table-column :label="$t('jiao-se')" width="100">
  226. <template slot-scope="scope">{{scope.row.roleName}}</template>
  227. </el-table-column>
  228. <el-table-column prop="monthCost" :label="$t('monthcost')" align="right" v-if="permissions.structurePersonnel" width="140">
  229. <template slot-scope="scope">{{user.timeType.isSecretSalary==0?(scope.row.monthCost==null?0:scope.row.monthCost.toFixed(2)):'*'}} {{ $t('yuan') }}</template>
  230. </el-table-column>
  231. <el-table-column prop="cost" :label="$t('hourlywage')" v-if="permissions.structurePersonnel" width="150" align="right">
  232. <template slot-scope="scope">{{user.timeType.isSecretSalary==0?(scope.row.cost==null?0:scope.row.cost):'*'}} {{ $t('yuan') }}
  233. <el-link v-if="user.timeType.isSecretSalary==0" @click.native="showSalaryList(scope.row)"><i class="iconfont firerock-iconrecord"></i></el-link>
  234. </template>
  235. </el-table-column>
  236. <el-table-column :label="$t('state.states')" width="100">
  237. <template slot-scope="scope">
  238. <span>{{scope.row.isActive==0 ? $t('ting-yong')+(scope.row.inactiveDate != null? '(' + scope.row.inactiveDate + ')':''): $t('zai-zhi')}}</span>
  239. </template>
  240. </el-table-column>
  241. <el-table-column :label="$t('creationtime')" width="150" prop="createTime">
  242. </el-table-column>
  243. <el-table-column :label="$t('operation')" width="300" fixed="right">
  244. <template slot-scope="scope">
  245. <el-button size="mini" type="default" v-if="scope.row.roleName == $t('role.superAdministrator') && user.id == scope.row.id" @click="transferRole(scope.row)">{{ $t('transfer') }}</el-button>
  246. <el-button size="mini" type="default" v-if="scope.row.roleName != $t('role.superAdministrator') && user.userNameNeedTranslate != 1" @click="resetPwd(scope.row)">{{ $t('reset') }}</el-button>
  247. <el-button size="mini" type="default" v-if="(user.roleName == '超级管理员' || user.roleName == '系统管理员') && user.companyId == 936" @click="resetPwd(scope.row)">{{ $t('reset') }}</el-button>
  248. <!-- <el-button size="mini" type="primary" v-if="scope.row.roleName != $t('role.superAdministrator')" @click="openInsertDialog(scope.row)">{{ $t('bian-ji') }}</el-button> -->
  249. <el-button size="mini" type="primary" @click="openInsertDialog(scope.row, scope.row.roleName)">{{ $t('bian-ji') }}</el-button>
  250. <!-- <el-button size="mini" type="primary" v-if="scope.row.roleName == $t('role.superAdministrator')" @click="openInsertDialog1(scope.row)">{{ $t('bian-ji') }}</el-button> -->
  251. <!-- <el-button size="mini" type="danger" v-if="scope.row.roleName != $t('role.superAdministrator')" @click="deleteUser(scope.row)">删除</el-button> -->
  252. <el-button size="mini" type="default" v-if="scope.row.roleName != $t('role.superAdministrator') && scope.row.isActive==1" @click="showDeactiveDialog(scope.row)">{{ $t('ting-yong') }}</el-button>
  253. <el-button size="mini" type="success" v-if="scope.row.roleName != $t('role.superAdministrator') && scope.row.isActive==0" @click="setActive(scope.row, 1)">{{ $t('enable') }}</el-button>
  254. <el-button size="mini" type="default" v-if="scope.row.roleName != $t('role.superAdministrator') && scope.row.activeInfoByUser == 1" @click="transferActiveDialog(scope.row)">转让</el-button>
  255. </template>
  256. </el-table-column>
  257. </el-table>
  258. <!--工具条-->
  259. <el-col :span="24" class="toolbar">
  260. <!-- 123 -->
  261. <el-button size="small" @click="handleSelectionZzjgbtn1">{{ $t('btn.cancel') }}</el-button>
  262. <!-- <el-cascader v-model="handleSelectionZzjgwillchange" size="small" placeholder="请选择部门" style="width: 13%;margin-left: 1%;margin-right: 1%;font-size:12px"
  263. :options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
  264. <el-button size="small" type="primary" @click="handleSelectionZzjgbtn2">修改</el-button> -->
  265. <el-button size="small" type="primary" @click="handleSelectionZzjgbtn3" v-if="user.userNameNeedTranslate != 1">{{ $t('modifyingDepartments') }}</el-button>
  266. <el-button size="small" type="primary" @click="handJue">{{ $t('modifyingRoles') }}</el-button>
  267. <el-button size="small" type="primary" @click="workingHoursDialogClick()">修正工时所属部门</el-button>
  268. <el-button size="small" type="primary" @click="handleSelectionUser()">批量启用员工</el-button>
  269. <el-pagination
  270. @size-change="handleSizeChange"
  271. @current-change="handleCurrentChange"
  272. :page-sizes="[20 , 50 , 80 , 100]"
  273. :page-size="size"
  274. :current-page="page"
  275. layout="total, sizes, prev, pager, next"
  276. :total="total"
  277. style="float:right;"
  278. ></el-pagination>
  279. </el-col>
  280. </el-col>
  281. </div>
  282. <!-- 修正工时所属部门 -->
  283. <el-dialog title="修正工时" :visible.sync="workingHoursDialog" width="650px" :before-close="handleClose">
  284. <div>
  285. <div class="workingHours">
  286. <el-radio v-model="workingHoursRadio" label="1">全部工时</el-radio>
  287. <el-radio v-model="workingHoursRadio" label="2">部分工时</el-radio>
  288. </div>
  289. <div class="workingHours workingHoursData" v-if="workingHoursRadio == 2">
  290. <span class="workingHoursSpan">日期范围</span>
  291. <el-date-picker v-model="workingHoursDatas" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
  292. </div>
  293. </div>
  294. <span slot="footer" class="dialog-footer">
  295. <el-button @click="workingHoursDialog = false">取 消</el-button>
  296. <el-button type="primary" @click="workingHours()">确 定</el-button>
  297. </span>
  298. </el-dialog>
  299. <!-- 批量修改弹出框 -->
  300. <el-dialog :title="$t('changes')" :visible.sync="handleSelectionZzjgshow" v-if="handleSelectionZzjgshow" width="30%">
  301. <el-form model="" label-width="20%">
  302. <el-form-item :label="$t('setupdepartment')">
  303. <!-- <el-cascader v-model="handleSelectionZzjgwillchange" placeholder="请选择部门" style="width: 60%;"
  304. :options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader> -->
  305. <el-cascader v-model="handleSelectionZzjgwillchange" v-if="user.userNameNeedTranslate != 1" :placeholder="$t('qing-xuan-ze-bu-men')" style="width: 100%;"
  306. :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
  307. <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="option" :radios="false" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
  308. </el-form-item>
  309. </el-form>
  310. <div slot="footer" class="dialog-footer">
  311. <el-button @click="handleSelectionZzjgshow = false">{{ $t('btn.cancel') }}</el-button>
  312. <el-button type="primary" @click="handleSelectionZzjgbtn2">{{ $t('btn.determine') }}</el-button>
  313. </div>
  314. </el-dialog>
  315. <!-- 批量修改角色弹出框 -->
  316. <el-dialog :title="$t('changes')" :visible.sync="handljues" v-if="handljues" width="30%">
  317. <el-form model="" label-width="20%">
  318. <el-form-item :label="$t('settherole')">
  319. <el-select v-model="xiuRoleId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%">
  320. <el-option v-for="(item, index) in acquireRoleLists" :key="index" :label="item.rolename" :value="item.id"></el-option>
  321. </el-select>
  322. </el-form-item>
  323. </el-form>
  324. <div slot="footer" class="dialog-footer">
  325. <el-button @click="handljues = false">{{ $t('btn.cancel') }}</el-button>
  326. <el-button type="primary" @click="handTrue">{{ $t('btn.determine') }}</el-button>
  327. </div>
  328. </el-dialog>
  329. <!-- 新增部门 -->
  330. <el-dialog :title="depTitle" :visible.sync="departmentVisible" width="500px" >
  331. <el-form ref="depForm" :model="depForm" :rules="depRules" label-width="100px">
  332. <el-form-item :label="$t('departmentname')" prop="name">
  333. <el-input v-model="depForm.name" :placeholder="$t('peaseenterthe')" clearable style="width: 100%" v-if="user.userNameNeedTranslate != '1'"></el-input>
  334. <div v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='depForm.name'></TranslationOpenDataText></div>
  335. </el-form-item>
  336. <!-- 主要负责人 -->
  337. <el-form-item :label="$t('Principalpersoninharge')" prop="managerId">
  338. <el-select v-model="depForm.managerId" filterable v-if="user.userNameNeedTranslate != '1'" clearable :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%">
  339. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  340. <span style="float: left">{{ item.name }}</span>
  341. <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jobNumber }}</span>
  342. </el-option>
  343. </el-select>
  344. <selectCat :size="'medium'" :filterable="true" :clearable="true" :widthStr="'360'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="depForm.managerId" :distinction="'3'" @selectCal="selectCal"></selectCat>
  345. </el-form-item>
  346. <!-- 其他负责人 -->
  347. <el-form-item :label="$t('responsiblepersons')" prop="managerId">
  348. <el-select v-model="depForm.otherManagerIds" filterable v-if="user.userNameNeedTranslate != '1'" clearable multiple style="width: 100%" :placeholder="$t('defaultText.pleaseChoose')" >
  349. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  350. <span style="float: left">{{ item.name }}</span>
  351. <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jobNumber }}</span>
  352. </el-option>
  353. </el-select>
  354. <selectCat :subject="users" :subjectId="depForm.otherManagerIds" :size="'medium'" :filterable="true" :widthStr="'360'" :multiSelect="true" v-if="user.userNameNeedTranslate == '1' && departmentVisible" :distinction="'4'" :clearable="true" @selectCal="selectCal"></selectCat>
  355. </el-form-item>
  356. <!-- 直属领导 -->
  357. <el-form-item :label="$t('leadership')" prop="reportAuditUserid" v-if="user.timeType.needDeptAudit">
  358. <el-select v-model="depForm.reportAuditUserid" v-if="user.userNameNeedTranslate != '1'" filterable clearable :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%">
  359. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
  360. </el-select>
  361. <selectCat :size="'medium'" :widthStr="'360'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="depForm.reportAuditUserid" :distinction="'5'" @selectCal="selectCal"></selectCat>
  362. </el-form-item>
  363. <!-- 是否推送到SAP -->
  364. <el-form-item :label="'推送至SAP'" prop="pushToSap" v-if="user.companyId==3092">
  365. <el-radio-group v-model="depForm.pushToSap">
  366. <el-radio :label="1">是</el-radio>
  367. <el-radio :label="0">否</el-radio>
  368. </el-radio-group>
  369. </el-form-item>
  370. </el-form>
  371. <span slot="footer" class="dialog-footer">
  372. <el-button @click="departmentVisible = false">{{ $t('btn.cancel') }}</el-button>
  373. <el-button type="primary" @click="submitDepartment" >{{ $t('btn.submit') }}</el-button>
  374. </span>
  375. </el-dialog>
  376. <!-- 新增/编辑人员的Dialog -->
  377. <el-dialog :title="title" :visible.sync="dialogVisible" width="580px" :top="'7.5vh'">
  378. <div style="height: 62vh;overflow: auto;">
  379. <el-form ref="form12" :model="insertForm" :rules="rules" label-width="100px">
  380. <el-form-item :label="$t('lable.name')" prop="name" v-if="user.userNameNeedTranslate != '1'">
  381. <el-input v-model="insertForm.name" :placeholder="$t('peaseenterthe')" clearable :disabled="user.userNameNeedTranslate == '1'"></el-input>
  382. </el-form-item>
  383. <el-form-item :label="$t('lable.name')" prop="name" v-if="user.userNameNeedTranslate == '1'">
  384. <div><TranslationOpenDataText type='userName' :openid='insertForm.name'></TranslationOpenDataText></div>
  385. </el-form-item>
  386. <el-form-item :label="$t('phone')" prop="phone">
  387. <el-input v-model="insertForm.phone" :placeholder="$t('peaseenterthe')" clearable></el-input>
  388. </el-form-item>
  389. <el-form-item :label="$t('Worknumber')" prop="jobNumber">
  390. <el-input v-model="insertForm.jobNumber" :placeholder="$t('peaseenterthe')" clearable></el-input>
  391. </el-form-item>
  392. <el-form-item :label="$t('payway')" prop="salaryType" v-if="permissions.structurePersonnel&&user.timeType.isSecretSalary==0">
  393. <el-radio-group v-model="insertForm.salaryType" @change="onSalaryTypeChange">
  394. <el-radio :label="0" >{{ $t('fixedmonthlycost') }}</el-radio>
  395. <el-radio :label="1">{{ $t('hourlywages') }}</el-radio>
  396. </el-radio-group>
  397. </el-form-item>
  398. <el-form-item :label="$t('monthcost')" prop="monthCost" v-if="insertForm.salaryType == 0 && permissions.structurePersonnel&&user.timeType.isSecretSalary==0">
  399. <el-input v-model="insertForm.monthCost" id="mc" @input="oninput" :placeholder="$t('yuechengben')" clearable @keyup.native="restrictNumber('mc')"></el-input>
  400. <span style="color:orange;font-size:12px;">{{ $t('yuegongzuoo') }}{{timeType.monthDays}}{{ $t('time.day') }},{{$t('meitian')}}{{timeType.allday}}{{ $t('xiaoshi') }}</span>
  401. <el-link :underline="false" style="color:blue;font-size:12px;margin-left:7px;" href="#/timetype">{{ $t('modifyworkinghours') }}</el-link>
  402. </el-form-item>
  403. <el-form-item :label="$t('hourlywage')" prop="cost" v-if="permissions.structurePersonnel&&user.timeType.isSecretSalary==0">
  404. <el-input v-model="insertForm.cost" :disabled="insertForm.salaryType == 0" id="cc" style="width:120px;" @keyup.native="restrictNumber4('cc')"
  405. :placeholder="$t('yuechengbenxiaoshi')" clearable></el-input>
  406. <span style="margin-left:25px;">{{ $t('effectivedate') }}</span>
  407. <el-date-picker v-model="insertForm.costApplyDate" value-format="yyyy-MM-dd"></el-date-picker>
  408. </el-form-item>
  409. <el-form-item :label="$t('lable.department')" prop="departmentId">
  410. <!-- <el-cascader v-model="insertForm.departmentId" placeholder="请选择部门" style="width: 100%"
  411. :options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader> -->
  412. <el-cascader v-model="insertForm.departmentId" :placeholder="$t('qing-xuan-ze-bu-men')" style="width: 100%"
  413. :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable v-if="user.userNameNeedTranslate != 1"></el-cascader>
  414. <vueCascader :size="'medium'" :widthStr="'430'" :clearable="true && user.userNameNeedTranslate != 1" :subject="option" :subjectId="insertForm.departmentId" :radios="true" :distinction="'2'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" ></vueCascader>
  415. </el-form-item>
  416. <el-form-item label="可填报部门" prop="reportDeptIds" v-if="user.timeType.userWithMultiDept">
  417. <template v-if="insertForm.reportDeptIdsList && insertForm.reportDeptIdsList.length > 0">
  418. <el-tag v-for="(tag, tagIndex) in insertForm.reportDeptIdsList" :key="tag.id" closable :type="'success'" style="margin-right: 10px;" @close="handleDeptClose(tagIndex)">
  419. <TranslationOpenDataText type='departmentName' :openid='tag.label'></TranslationOpenDataText>
  420. </el-tag>
  421. </template>
  422. <el-link type="primary" :underline="false" @click="addFilldDepartment(insertForm.reportDeptIdsList)">添加</el-link>
  423. </el-form-item>
  424. <el-form-item label="审核层级" v-if="user.timeType.reportAuditType == 6">
  425. <el-radio-group v-model="insertForm.onlyAuditOnce" >
  426. <el-radio :label="0" >两层审核</el-radio>
  427. <el-radio :label="1">一层审核</el-radio>
  428. </el-radio-group>
  429. </el-form-item>
  430. <el-form-item v-if="user.timeType.reportAuditType == 5 || user.timeType.reportAuditType == 6">
  431. <span slot="label">
  432. <span>直属审核人</span>
  433. <el-tooltip effect="dark" content="未设置时由所属部门负责人审核" placement="top-start">
  434. <i class="el-icon-question" style="color:#606266"></i>
  435. </el-tooltip>
  436. </span>
  437. <el-select v-model="insertForm.superiorId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" filterable clearable v-if="user.userNameNeedTranslate != 1">
  438. <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id" :disabled="item.id == insertForm.id">
  439. <span style="float: left">{{item.name}}</span>
  440. <span style="float: right; color: #8492a6; font-size: 13px">{{item.departmentName}}</span>
  441. </el-option>
  442. </el-select>
  443. <selectCat :size="'medium'" :widthStr="'360'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="insertForm.superiorId" :distinction="'6'" @selectCal="selectCal"></selectCat>
  444. </el-form-item>
  445. <el-form-item :label="$t('jiao-se')" prop="roleId" v-if="roleNameFlg != $t('role.superAdministrator')">
  446. <el-select v-model="insertForm.roleId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%">
  447. <el-option v-for="item in acquireRoleList" :label="item.rolename" :value="item.id" :key="item.name">
  448. <span style="float: left">{{item.rolename}}</span>
  449. <span style="float: right; color: #8492a6; font-size: 13px">{{item.roleDescribe}}</span>
  450. </el-option>
  451. </el-select>
  452. </el-form-item>
  453. <el-form-item :label="item.name" v-for="item,index in userCustomConfig" :key="item.id">
  454. <el-select v-if="item.type == 0" v-model="insertForm[suoying[index]]" :placeholder="$t('defaultText.pleaseChoose')" clearable style="width: 100%">
  455. <el-option v-for="option in item.itemList" :label="option.name" :value="option.name" :key="option.id">
  456. </el-option>
  457. </el-select>
  458. <el-input v-else v-model="insertForm[suoying[index]]" :placeholder="$t('peaseenterthe')" clearable></el-input>
  459. </el-form-item>
  460. <el-form-item :label="$t('entrytime')" prop="phone">
  461. <el-date-picker v-model="insertForm.inductionDate" value-format="yyyy-MM-dd"></el-date-picker>
  462. </el-form-item>
  463. <el-form-item label="离职日期" prop="inactiveDate" v-if="insertForm.isActive == 0">
  464. <el-date-picker v-model="insertForm.inactiveDate" value-format="yyyy-MM-dd"></el-date-picker>
  465. </el-form-item>
  466. <el-form-item :label="$t('postrank')" prop="phone">
  467. <el-input v-model="insertForm.position" :placeholder="$t('joblevel')" clearable></el-input>
  468. </el-form-item>
  469. <div class="zhaunye"><p>{{ $t('professionalcertificate') }}</p><p><el-link type="primary" @click="addCertificateList()">{{ $t('addprofessionalcertificate') }}</el-link><el-link v-if="permissions.structureCertificate" type="primary" @click="managementDiolog = true" style="margin-left: 20px">{{ $t('professionalCertificate inManagement') }}</el-link></p></div>
  470. <div class="certificateList">
  471. <div class="moreList">
  472. <div class="moreLiList" v-for="(item,index) in insertForm.certJson" :key="index">
  473. <div style="margin-right: 10px;width: 160px;">
  474. <el-select v-model="item.certId" :placeholder="$t('defaultText.pleaseChoose')" size="mini" @change="changeManagement(index)">
  475. <el-option v-for="item in managementTableData" :key="item.id" :label="item.name" :value="item.id"> </el-option>
  476. </el-select>
  477. </div>
  478. <div><span>{{ $t('certificate') }}</span><el-date-picker size="mini" v-model="item.certDate" type="date" value-format="yyyy-MM-dd" :placeholder="$t('certificatedate')" style="width: 180px"></el-date-picker></div>
  479. <div style="color: red;margin-left: 15px;cursor:pointer;" @click="deteFrames(index)"><i class="el-icon-delete"></i></div>
  480. </div>
  481. </div>
  482. </div>
  483. </el-form>
  484. </div>
  485. <span slot="footer" class="dialog-footer">
  486. <!-- <el-button type="danger" @click="deleteUser(insertForm, '1')" style="float:left;">{{ $t('btn.delete') }}</el-button> -->
  487. <el-button type="danger" @click="deleteUserFlg = true" style="float:left;">{{ $t('btn.delete') }}</el-button>
  488. <el-button @click="dialogVisible=false">{{ $t('btn.cancel') }}</el-button>
  489. <el-button type="primary" @click="submitInsert('insertForm')" :loading="submitLoading">{{ $t('btn.submit') }}</el-button>
  490. </span>
  491. </el-dialog>
  492. <!-- 删除员工时转移日报 -->
  493. <el-dialog title="提示" :visible.sync="deleteUserFlg" width="600px" :before-close="handleClose">
  494. <div>
  495. <div class="deteee">确定删除该员工吗?</div>
  496. <div class="deteeeAce" v-if="deleteUserFlgData.isExistsReport">
  497. <div style="margin-right: 10px">将该员工的工时数据、参与的项目与任务转移 至</div>
  498. <el-select v-if="user.userNameNeedTranslate != 1" v-model="moveReportUserId" style="width:140px;" :placeholder="$t('defaultText.pleaseChoose')" clearable size="small" filterable popper-class="managePopperClass">
  499. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  500. <span style="float: left">{{ item.name }}</span>
  501. <span style="float: right; color: #8492a6;">{{ item.jobNumber }}</span>
  502. </el-option>
  503. </el-select>
  504. <selectCat v-if="user.userNameNeedTranslate == 1" :filterable="true" :size="'small'" :subject="users" :widthStr="350" :subjectId="moveReportUserId" :distinction="'22'" :clearable="true" @selectCal="selectCal"></selectCat>
  505. </div>
  506. </div>
  507. <span slot="footer" class="dialog-footer">
  508. <el-button @click="deleteUserFlg = false">取 消</el-button>
  509. <el-button type="primary" @click="deleteUser(deleteUserFlgData)" :loading="deleteUserFlgloading">确 定</el-button>
  510. </span>
  511. </el-dialog>
  512. <el-dialog :title="$t('historicalpersonnelcost')" :visible.sync="userSalaryListDialog" width="750px" >
  513. <el-table :data="userSalaryList" highlight-current-row v-loading="listLoading" height="300px" style="width: 100%;">
  514. <el-table-column prop="userName" :label="$t('lable.name')" >
  515. <template slot-scope="scope">
  516. <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText></span>
  517. <span v-else>{{scope.row.userName}}</span>
  518. </template>
  519. </el-table-column>
  520. <el-table-column prop="indate" :label="$t('updatetime')" width="150px">
  521. </el-table-column>
  522. <el-table-column prop="salaryType" :label="$t('payway')" >
  523. <template slot-scope="scope" >
  524. {{scope.row.salaryType==0?$t('monthlysalary'):$t('hourlywages')}}
  525. </template>
  526. </el-table-column>
  527. <el-table-column prop="monthCost" :label="$t('monthlysalarys')" >
  528. <template slot-scope="scope" >
  529. {{scope.row.monthCost}} {{ $t('yuan') }}
  530. </template>
  531. </el-table-column>
  532. <el-table-column prop="cost" :label="$t('hourlywage')" >
  533. <template slot-scope="scope" >
  534. {{scope.row.cost}} {{ $t('yuan') }}
  535. </template>
  536. </el-table-column>
  537. <el-table-column >
  538. <template slot-scope="scope" >
  539. <el-button size="small" @click="delHisSalary(scope.row.id,scope.row.userId)">删除</el-button>
  540. </template>
  541. </el-table-column>
  542. </el-table>
  543. </el-dialog>
  544. <!--导出人员 -->
  545. <el-dialog :title="$t('exportingpeople')" :visible.sync="exportDialogVisible" width="550px" >
  546. <el-form label-width="100px">
  547. <el-form-item :label="$t('export.export')" >
  548. <el-radio-group v-model="containInvalid" >
  549. <el-radio :label="1" >{{ $t('lable.allStaff') }}</el-radio>
  550. <el-radio :label="0" >{{ $t('serviceonly') }}</el-radio>
  551. </el-radio-group>
  552. </el-form-item>
  553. </el-form>
  554. <span slot="footer" class="dialog-footer">
  555. <el-button type="primary" @click="exportUsers">{{ $t('export.export') }}</el-button>
  556. </span>
  557. </el-dialog>
  558. <!-- 转让超级管理员权限 -->
  559. <el-dialog :title="$t('permissiontotransfer')" :visible.sync="transferDialog" width="550px" >
  560. <el-form label-width="200px">
  561. <el-form-item :label="$t('administratorroleto')" >
  562. <el-select v-model="toUserId" style="width:300px" filterable clearable v-if="user.userNameNeedTranslate != '1'">
  563. <el-option v-for="item in allActiveUsers" :key="item.id" :value="item.id" :label="item.name">
  564. </el-option>
  565. </el-select>
  566. <selectCat :size="'medium'" :widthStr="'300'" v-if="user.userNameNeedTranslate == '1'" :subject="allActiveUsers" :subjectId="toUserId" :distinction="'12'" @selectCal="selectCal"></selectCat>
  567. </el-form-item>
  568. <el-form-item :label="$t('transferoftheirrole')" >
  569. <el-select v-model="myRoleId" style="width:300px">
  570. <el-option v-for="item in acquireRoleList" :label="item.rolename" :value="item.id" :key="item.name">
  571. <span style="float: left">{{item.rolename}}</span>
  572. <span style="float: right; color: #8492a6; font-size: 13px">{{item.roleDescribe}}</span>
  573. </el-option>
  574. </el-select>
  575. </el-form-item>
  576. </el-form>
  577. <span slot="footer" class="dialog-footer">
  578. <el-button type="default" @click="transferDialog = false">{{ $t('btn.cancel') }}</el-button>
  579. <el-button type="primary" @click="showConfirmDialog">{{ $t('btn.determine') }}</el-button>
  580. </span>
  581. </el-dialog>
  582. <!--停用时选择日期 -->
  583. <el-dialog :title="$t('terminationstaff')" :visible.sync="deactiveDialog" width="550px" >
  584. <el-form label-width="200px">
  585. <el-form-item :label="$t('employeedeparture')" >
  586. <el-date-picker type="date" v-model="deactiveDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :placeholder="$t('defaultText.pleaseChoose')" />
  587. </el-form-item>
  588. </el-form>
  589. <span slot="footer" class="dialog-footer">
  590. <el-button type="default" @click="deactiveDialog = false">{{ $t('btn.cancel') }}</el-button>
  591. <el-button type="primary" @click="confirmDeactive">{{ $t('btn.determine') }}</el-button>
  592. </span>
  593. </el-dialog>
  594. <!-- 管理专业证书 -->
  595. <el-dialog :title="$t('professionalCertificate inManagement')" :visible.sync="managementDiolog" width="500px" :before-close="handleClose">
  596. <div>
  597. <el-table :data="managementTableData" style="width: 100%" height="400">
  598. <el-table-column prop="name" :label="$t('names')" width="280"></el-table-column>
  599. <el-table-column :label="$t('operation')" width="180">
  600. <template slot-scope="scope">
  601. <div>
  602. <el-button type="primary" size="small" @click="editorManagementForm(scope.row)">{{ $t('bian-ji') }}</el-button>
  603. <el-button type="danger" size="small" @click="deteManagementForm(scope.row)">{{ $t('btn.delete') }}</el-button>
  604. </div>
  605. </template>
  606. </el-table-column>
  607. </el-table>
  608. </div>
  609. <span slot="footer" class="dialog-footer">
  610. <el-button @click="managementDiolog = false">{{ $t('Shutdown') }}</el-button>
  611. <el-button type="primary" @click="addManagementDiologs()">{{ $t('add') }}</el-button>
  612. </span>
  613. </el-dialog>
  614. <!-- 新增项目管理专业 -->
  615. <el-dialog :title="$t('addededitedmanagement')" :visible.sync="addManagementDiolog" width="500px" :before-close="handleClose">
  616. <div>
  617. <el-form :model="managementForm" :rules="managementFormRou" ref="managementForm" label-width="150px" class="demo-ruleForm">
  618. <el-form-item :label="$t('professionalCertificateName')" prop="name">
  619. <el-input v-model="managementForm.name" :placeholder="$t('peaseenterthe')"></el-input>
  620. </el-form-item>
  621. </el-form>
  622. </div>
  623. <span slot="footer" class="dialog-footer">
  624. <el-button @click="addManagementDiolog = false">{{ $t('btn.cancel') }}</el-button>
  625. <el-button type="primary" @click="addManagementForm('managementForm')">{{ $t('btn.submit') }}</el-button>
  626. </span>
  627. </el-dialog>
  628. <!-- 自定义配置项 -->
  629. <el-dialog :title="$t('managecustomconfigurationitems')" show-header="false" v-if="customConfigDialog" :visible.sync="customConfigDialog" :close-on-click-modal="false" customClass="customWidth" width="650px" top="20px">
  630. <div style="margin-left:30px;">
  631. <p v-for="item,index in customConfigList" :key="index">
  632. <el-input size="medium" v-model="item.name" :placeholder="$t('enteranameforacustomconfigurationitem')" style="width:200px;margin-right:20px" maxlength="8"></el-input>
  633. <el-radio size="medium" :disabled="!item.name" v-model="item.type" :label="0" style="margin-right:10px;margin-left:10px">{{ $t('dropdown') }}</el-radio>
  634. <el-radio size="medium" :disabled="!item.name" v-model="item.type" :label="1">{{ $t('input') }}</el-radio>
  635. <span style="display:inline-block;">
  636. <el-button v-if="cusItemTypes[index] == 0" type="primary" size="small" @click="getConfigItemBtn(item)">{{ $t('configurationoptions') }}</el-button>
  637. <span v-if="!item.id && item.name && item.type == 0" style="color:#999;font-size:13px">{{ $t('canconfiguretheoptions') }}</span>
  638. </span>
  639. <el-button style="margin-left:20px" type="danger" size="small" v-if="item.id" @click="customConfigDelete(item,index)">{{ $t('btn.delete') }}</el-button>
  640. </p>
  641. </div>
  642. <div slot="footer" class="dialog-footer">
  643. <el-button type="primary" @click="customConfigDialog = false" >{{ $t('Shutdown') }}</el-button>
  644. <!-- <el-button type="primary" @click="customConfigListAdd" :disabled="customConfigList.length >= 5">新增</el-button> -->
  645. <el-button type="primary" @click="customConfigListSave" :loading="saveBtnLoading">{{ $t('save') }}</el-button>
  646. </div>
  647. <!-- 为下拉时的选项配置 -->
  648. <el-dialog :title="$t('configurationoptions')" v-if="configItemDialog" :visible.sync="configItemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px" append-to-body>
  649. <el-table :data="configItemList" height="400px" style="width:100%" key="configItemTable">
  650. <el-table-column prop="id" width="60" :label="$t('headerTop.serialNumber')">
  651. <template slot-scope="scope" >
  652. {{scope.$index + 1}}
  653. </template>
  654. </el-table-column>
  655. <el-table-column prop="name" :label="$t('names')" ></el-table-column>
  656. <el-table-column :label="$t('operation')" width="150">
  657. <template slot-scope="scope" >
  658. <el-button size="small" type="primary" @click="configItemAorM(scope.row)">{{ $t('bian-ji') }}</el-button>
  659. <el-button size="small" type="danger" @click="configItemDelete(scope.row)">{{ $t('btn.delete') }}</el-button>
  660. </template>
  661. </el-table-column>
  662. </el-table>
  663. <div slot="footer" class="dialog-footer">
  664. <el-button type="primary" @click="configItemDialog = false" >{{ $t('Shutdown') }}</el-button>
  665. <el-button type="primary" @click="configItemAorM" >{{ $t('newConfigurationOptions') }}</el-button>
  666. </div>
  667. <el-dialog :title="$t('addededitedconfigurationoptions')" v-if="configItemAorMDialog" :visible.sync="configItemAorMDialog" :close-on-click-modal="false" customClass="customWidth" width="500px" append-to-body>
  668. <span>{{ $t('names') }}</span>
  669. <el-input size="medium" v-model="AorMitem.name" :placeholder="$t('enteranameforacustomconfigurationitem')" style="width:200px;margin-right:20px" maxlength="8"></el-input>
  670. <div slot="footer" class="dialog-footer">
  671. <el-button type="primary" @click="configItemAorMDialog = false" >{{ $t('btn.cancel') }}</el-button>
  672. <el-button type="primary" @click="configItemAorMSure" >{{ $t('btn.submit') }}</el-button>
  673. </div>
  674. </el-dialog>
  675. </el-dialog>
  676. </el-dialog>
  677. <!-- 批量导入 -->
  678. <el-dialog :title="$t('batchimportofpersonnel')" v-if="importDialog" :visible.sync="importDialog" customClass="customWidth" width="500px">
  679. <p>1. {{ $t('other.download') }}
  680. <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/人员导入模板.xlsx" :download="$t('personnelimporttemplate')+'.xlsx'">{{$t('personnelimporttemplate')}}.xlsx</el-link>
  681. </p>
  682. <p>2. {{ $t('exceltemplateanduploadit') }}。</p>
  683. <p style="display: flex;justify-content: center;padding-bottom:1em;">
  684. <el-upload ref="upload" action="#" :limit="1" :http-request="importUser" :show-file-list="false">
  685. <el-button type="primary" :underline="false" :loading="importingData">{{ $t('other.startImporting') }}</el-button>
  686. </el-upload>
  687. </p>
  688. </el-dialog>
  689. <!--薪资导入-->
  690. <el-dialog :title="$t('importSalary')" v-if="importUserSalaryDialog" :visible.sync="importUserSalaryDialog" customClass="customWidth" width="500px">
  691. <p>1. {{ $t('other.download') }}
  692. <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/薪资导入模板.xlsx" :download="$t('salaryTemplate')+'.xlsx'">{{$t('salaryTemplate')}}.xlsx</el-link>
  693. </p>
  694. <p>2.
  695. {{ $t('Selectmonth') }}
  696. <el-date-picker v-model="ymonth" type="month" :placeholder="$t('Selectmonth')" format="yyyy-MM" value-format="yyyy-MM"></el-date-picker>
  697. <br/><span style="margin-left:10px;margin-top:8px;color:#999;">({{$t('Recalculatereportedcostsforthemonth')}})</span>
  698. </p>
  699. <p>3. {{ $t('exceltemplateanduploadit') }}。</p>
  700. <p style="display: flex;justify-content: center;padding-bottom:1em;">
  701. <el-upload ref="uploadSalaryRef" action="#" :limit="1" :http-request="importSalaryData" :show-file-list="false">
  702. <el-button type="primary" :underline="false" :loading="importingSalaryData">{{ $t('other.startImporting') }}</el-button>
  703. </el-upload>
  704. </p>
  705. </el-dialog>
  706. <el-dialog :title="$t('synchronizetheenterprisewechataddressbook')" v-if="showSyncCWDialog" :visible.sync="showSyncCWDialog" customClass="customWidth" width="500px">
  707. <p>{{ $t('oneWeix') }}
  708. <el-popover placement="top" width="1200" trigger="hover">
  709. <div class="imgFlex">
  710. <div><img src="../../assets/image/Step1.jpg" style="width: 380px"/> <p><b>{{ $t('firststep') }}</b></p> </div>
  711. <div class="imgBor"> <p></p> <img src="../../assets/image/Step2.jpg" style="width: 380px"/> <p><b>{{ $t('secondstep') }}</b></p></div>
  712. <div><img src="../../assets/image/Step3.jpg" style="width: 380px"/> <p><b>{{ $t('thirdstep') }}</b></p></div>
  713. </div>
  714. <i class="el-icon-question" slot="reference" />
  715. </el-popover>
  716. </p>
  717. <p>
  718. <el-input v-model="contactSecret" style="width:380px;" :disabled="!editSecret"/><el-button @click="editSecret?saveContactSecret():editSecret=true;" >{{editSecret?'保存':'修改'}}</el-button>
  719. </p>
  720. <p v-if="contactServer == null">
  721. {{ $t('twoWei') }}
  722. </p>
  723. <p v-if="contactServer == null" style="text-align:center;">
  724. <img
  725. style="width: 120px; height: 120px"
  726. src="../../assets/image/code.jpg" />
  727. </p>
  728. <p style="display: flex;justify-content: center;padding-bottom:1em;">
  729. <el-button type="primary" :underline="false" :loading="importingData" :disabled="!canSync" @click="startCorpWxImport">{{ $t('startsynchronization') }}</el-button>
  730. </p>
  731. </el-dialog>
  732. <el-dialog title="同步钉钉通讯录" v-if="showSyncDDDialog" :visible.sync="showSyncDDDialog" customClass="customWidth" width="500px">
  733. <p>{{ $t('areyousuretosynchronize') }}
  734. </p>
  735. <p>
  736. <el-checkbox v-model="isSyncContact" @change="setSyncContactDD()">人员所在部门与钉钉通讯录保持一致</el-checkbox>
  737. </p>
  738. <p style="display: flex;justify-content: center;padding-bottom:1em;">
  739. <el-button type="primary" :underline="false" :loading="importingData" @click="syncWithCorpDingding">{{ $t('startsynchronization') }}</el-button>
  740. </p>
  741. </el-dialog>
  742. <el-dialog :title="$t('correlationresults')" v-if="syncMembByCardTimeResultGialog" :visible.sync="syncMembByCardTimeResultGialog" customClass="customWidth" width="500px">
  743. <p style="padding-bottom:30px;">
  744. {{syncMembByCardTimeMsg}}
  745. </p>
  746. </el-dialog>
  747. <el-dialog title="同步日志" v-if="recordMsgDialog" :visible.sync="recordMsgDialog" customClass="customWidth" width="500px">
  748. <el-row style="height:70px;line-height:40px;padding-top:30px;padding-left:20px">
  749. <el-col :span="6">操作时间</el-col>
  750. <el-col :span="18">{{recordIndate(recordMsg.indate)}}</el-col>
  751. </el-row>
  752. <el-row style="height:70px;line-height:40px;padding-bottom:30px;padding-left:20px">
  753. <el-col :span="6">错误信息</el-col>
  754. <el-col :span="18">{{recordMsg.msg}}</el-col>
  755. </el-row>
  756. </el-dialog>
  757. <el-dialog :title="$t('synchronizetheenterprisemicrodirectory')" :visible.sync="newSyncWithCorpWxDayload" width="400px" :before-close="handleClose">
  758. <span>
  759. 同步前请联系企业微信管理员检查应用授权的可见范围 <br/>
  760. 路径:管理企业-应用管理-工时管家-可见范围
  761. </span>
  762. <span slot="footer" class="dialog-footer">
  763. <el-button type="primary" @click="visibleRange" v-if="wxManager">可见范围设置</el-button>
  764. <el-button type="primary" @click="newSyncWithCorpWx">开始同步</el-button>
  765. </span>
  766. </el-dialog>
  767. <el-dialog
  768. title="转移到"
  769. :visible.sync="transferActiveDialogFlag"
  770. width="20%">
  771. <span style="margin-left:25px;margin-right:5px;color:#606266;">转移到</span>
  772. <selectCat v-if="user.userNameNeedTranslate == 1" :subject="users" :subjectId="transferActive.takeoverId" :distinction="'23'" :clearable="true" @selectCal="selectCal"></selectCat>
  773. <span slot="footer" class="dialog-footer">
  774. <el-button @click="transferActiveDialogFlag = false">取 消</el-button>
  775. <el-button type="primary" @click="transferActiveMethod">确 定</el-button>
  776. </span>
  777. </el-dialog>
  778. <!-- 多选部门 -->
  779. <el-dialog :title="'请选择部门'" :top="'10vh'" v-if="specialHolidaysDialog" :visible.sync="specialHolidaysDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  780. <div v-if="user.userNameNeedTranslate == '1'">
  781. <el-input placeholder="请输入名字搜索" v-model.trim="wxFilterText" clearable @keyup.enter.native="echartDepartment()" @clear="getWhiteListAll()" class="input-with-select">
  782. <el-button slot="append" icon="el-icon-search" @click="echartDepartment()"></el-button>
  783. </el-input>
  784. </div>
  785. <div class="tree" style="height:400px">
  786. <el-scrollbar style="height:100%">
  787. <el-input v-if="user.userNameNeedTranslate != '1'"
  788. :placeholder="$t('keywordfiltering')"
  789. v-model="filterText">
  790. </el-input>
  791. <el-tree :data="whiteListAll" show-checkbox :props="defaultProps" node-key="id"
  792. ref="specialHolidaysTree"
  793. highlight-current :filter-node-method="filterNode">
  794. <span class="custom-tree-node" slot-scope="{ node, data }">
  795. <span v-if="user.userNameNeedTranslate == '1'">
  796. <span v-if="node.data.children">
  797. <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
  798. </span>
  799. <span v-else>
  800. <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
  801. </span>
  802. </span>
  803. <span v-if="user.userNameNeedTranslate != '1'">
  804. {{ node.label }}
  805. </span>
  806. </span>
  807. </el-tree>
  808. </el-scrollbar>
  809. </div>
  810. <!-- <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div> :default-checked-keys="alreadyPartArray" @check-change="onTreeItemChange" -->
  811. <div slot="footer" class="dialog-footer">
  812. <el-button @click="specialHolidaysDialog = false">{{ $t('btn.cancel') }}</el-button>
  813. <el-button type="primary" @click="specialHolidaysChange()">{{ $t('btn.determine') }}</el-button>
  814. </div>
  815. </el-dialog>
  816. </div>
  817. </div>
  818. </template>
  819. <script>
  820. // 左右滑動
  821. import dragMixin from "@/common/js/tensile.js";
  822. import util from "../../common/js/util";
  823. // 引入自定义级联组件
  824. import vueCascader from "@/components/cascader.vue"
  825. // 自定义select组件
  826. import selectCat from "@/components/select.vue"
  827. let that
  828. export default {
  829. name: "Home",
  830. components: {
  831. vueCascader,
  832. selectCat
  833. },
  834. mixins: [dragMixin],
  835. created() {
  836. let height = window.innerHeight;
  837. this.tableHeight = height - 195;
  838. const that = this;
  839. window.onresize = function temp() {
  840. that.tableHeight = window.innerHeight - 195;
  841. };
  842. this.initDrag([
  843. {
  844. type: "LR",
  845. domClass: {
  846. // 中间分割线的名字
  847. resize: "line-line",
  848. // 左侧盒子的名字
  849. left: "box-left",
  850. // 右侧盒子的名字
  851. right: "box-right",
  852. // 父级的名字
  853. box: "box-father",
  854. },
  855. otherInfo: {
  856. // 限制左边栏最低宽度
  857. leftWidth: 120,
  858. },
  859. },
  860. {
  861. type: "LR",
  862. domClass: {
  863. // 中间分割线的名字
  864. resize: "line-second",
  865. // 左侧盒子的名字
  866. left: "left-laowang",
  867. // 右侧盒子的名字
  868. right: "box-second-father",
  869. // 父级的名字
  870. box: "grand",
  871. },
  872. otherInfo: {
  873. // 限制左边栏最低宽度
  874. leftWidth: 120,
  875. },
  876. },
  877. ]);
  878. },
  879. data() {
  880. return {
  881. isSyncContact: false,
  882. showSyncDDDialog: false,
  883. transferActiveDialogFlag:false,
  884. transferActive:{
  885. handoverId:null,
  886. takeoverId:null
  887. },
  888. integer: '0',
  889. workingHoursDialog: false,
  890. workingHoursRadio: '1',
  891. workingHoursDatas: [],
  892. recordMsgDialog: false,
  893. recordMsg: {indate: [],msg:''},
  894. roleNameFlg: '',
  895. syncHistoryReport: true,
  896. ymonth: null,
  897. importingSalaryData: false,
  898. translation: '1', // 1、文字, 2、部门, 3、人员
  899. fullscreenLoading: false,
  900. syncMembByCardTimeResultGialog:false,
  901. syncMembByCardTimeMsg:null,
  902. editSecret: false,
  903. canSync: false,
  904. corpid: null,
  905. contactSecret: null,
  906. contactServer: null,
  907. showSyncCWDialog: false,
  908. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  909. handleSelectionZzjgshow: false,
  910. handljues: false,
  911. submitLoading: false,
  912. deactiveUser: null,
  913. deactiveDate: null,
  914. deactiveDialog: false,
  915. toUserId: null,
  916. myRoleId: null,
  917. allActiveUsers: [],
  918. transferDialog: false,
  919. containInvalid: 1,
  920. exportDialogVisible: false,
  921. roleArray: [
  922. this.$t('role.ordinaryEmployees'),
  923. this.$t('role.superAdministrator'),
  924. this.$t('role.systemAdministrator'),
  925. this.$t('role.companyTop'),
  926. this.$t('role.financialAdministrator'),
  927. this.$t('role.projectManager'),
  928. this.$t('role.companyLeadership'),
  929. ],
  930. roleDescArray: [
  931. { label: this.$t('role.ordinaryEmployees'), value: 0, desc: this.$t('eportandarticipate') },
  932. {
  933. label: this.$t('role.systemAdministrator'),
  934. value: 2,
  935. desc: this.$t('systemadministrators'),
  936. },
  937. // {label:"公司高层",value:3, desc:"查阅项目信息,人员工时情况"},
  938. {
  939. label: this.$t('role.financialAdministrator'),
  940. value: 4,
  941. desc: this.$t('financial'),
  942. },
  943. { label: this.$t('role.projectManager'), value: 5, desc: this.$t('createandmanageprojects') },
  944. {
  945. label: this.$t('role.companyLeadership'),
  946. value: 6,
  947. desc: this.$t('viewdailyreports'),
  948. },
  949. ],
  950. userSalaryList: [],
  951. userSalaryListDialog: false,
  952. value: {},
  953. user: JSON.parse(sessionStorage.getItem("user")),
  954. users: [],
  955. tableHeight: 0,
  956. listLoading: false,
  957. total: 0,
  958. page: 1,
  959. size: 20,
  960. list: [],
  961. data: [
  962. {
  963. id: -1,
  964. label: this.$t('lable.allStaff'),
  965. },
  966. {
  967. id: 0,
  968. label: this.$t('lable.unassigned'),
  969. },
  970. ],
  971. option: [],
  972. depData: {
  973. id: -1,
  974. label: this.$t('lable.allStaff'),
  975. },
  976. defaultProps: {
  977. children: "children",
  978. label: "label",
  979. },
  980. dialogVisible: false,
  981. title: "",
  982. insertForm: {
  983. id: null,
  984. name: null,
  985. phone: null,
  986. // role: null,
  987. roleId: null,
  988. monthCost: null,
  989. cost: null,
  990. departmentId: null,
  991. salaryType: 0,
  992. costApplyDate: util.formatDate.format(new Date(), "yyyy-MM-dd"),
  993. inductionDate: util.formatDate.format(new Date(), "yyyy-MM-dd"),
  994. position: "",
  995. certJson: [],
  996. plateMap: {},
  997. },
  998. rules: {
  999. name: [{ required: true, message: this.$t('defaultText.PleaseEnterYourName'), trigger: "blur" }],
  1000. // phone: [{ required: true, message: "请输入电话", trigger: "blur" }],
  1001. // role: [{ required: true, message: "请选择角色", trigger: "blur" }],
  1002. roleId: [{ required: true, message: this.$t('pleaseselectroles'), trigger: "blur" }],
  1003. cost: [{ required: true, message: this.$t('pleaseinputcost'), trigger: "blur" }],
  1004. monthCost: [
  1005. { required: true, message: this.$t('monthlycost'), trigger: "blur" },
  1006. ],
  1007. },
  1008. managementFormRou: {
  1009. name: [{ required: true, message: this.$t('pleaseenterprofessionalcertificate'), trigger: "blur" }],
  1010. },
  1011. departmentVisible: false,
  1012. depTitle: "",
  1013. depForm: {
  1014. id: null,
  1015. name: null,
  1016. parentId: null,
  1017. managerId: null,
  1018. pushToSap:'1',
  1019. },
  1020. depRules: {
  1021. name: [{ required: true, message: this.$t('pleaseenterthedepartmentname'), trigger: "blur" }],
  1022. },
  1023. timeType: {},
  1024. keyword: "",
  1025. rolesa: [
  1026. {
  1027. value: "",
  1028. label: this.$t('all'),
  1029. },
  1030. {
  1031. value: "6",
  1032. label: this.$t('role.companyLeadership'),
  1033. },
  1034. {
  1035. value: "2",
  1036. label: this.$t('role.systemAdministrator'),
  1037. },
  1038. {
  1039. value: "4",
  1040. label: this.$t('role.financialAdministrator'),
  1041. },
  1042. {
  1043. value: "5",
  1044. label: this.$t('role.projectManager'),
  1045. },
  1046. {
  1047. value: "0",
  1048. label: this.$t('role.ordinaryEmployees'),
  1049. },
  1050. ],
  1051. states: [
  1052. {
  1053. value: "",
  1054. label: this.$t('all'),
  1055. },
  1056. {
  1057. value: "1",
  1058. label: this.$t('zai-zhi'),
  1059. },
  1060. {
  1061. value: "0",
  1062. label: this.$t('ting-yong'),
  1063. }
  1064. ],
  1065. status: "1",
  1066. role: "",
  1067. jDarr: [],
  1068. importUserSalaryDialog: false,
  1069. handleSelectionZzjgDate: [],
  1070. handleSelectionZzjgwillchange: null,
  1071. acquireRoleList: [], // 角色列表
  1072. acquireRoleLists: [], // 没有超级管理员
  1073. roleId: "",
  1074. xiuRoleId: "",
  1075. managementDiolog: false,
  1076. addManagementDiolog: false,
  1077. managementForm: {
  1078. name: "",
  1079. },
  1080. managementTableData: [],
  1081. certificate: "",
  1082. addUserId: "",
  1083. userCustomConfig: [],
  1084. customConfigDialog: false,
  1085. importDialog: false,
  1086. importingData: false,
  1087. customConfigList: [],
  1088. cusItemTypes: [],
  1089. configItemList: [],
  1090. configItemId: null,
  1091. configItemDialog: false,
  1092. configItemAorMDialog: false,
  1093. AorMitem: {
  1094. name: null,
  1095. userCustomId: null,
  1096. id: null,
  1097. },
  1098. tableLoading: false,
  1099. suoying: ["plate1", "plate2", "plate3", "plate4", "plate5"],
  1100. insertFormPlates: [],
  1101. saveBtnLoading: false,
  1102. onlyDirect: false,
  1103. nextCursor: '',
  1104. newSyncWithCorpWxDayload: false,
  1105. wxManager: false,
  1106. adjustPosition: false,
  1107. dataRepeat: [],
  1108. deleteUserFlg: false,
  1109. deleteUserFlgData: {},
  1110. moveReportUserId: '',
  1111. deleteUserFlgloading: false,
  1112. // 多选部门
  1113. filterText: '',
  1114. wxFilterText: '', // 转译搜索
  1115. whiteListAll: [],
  1116. whiteListAllTwo: [],
  1117. specialHolidaysDialog: false,
  1118. };
  1119. },
  1120. watch: {
  1121. filterText(val) {
  1122. console.log(val)
  1123. console.log(this.$refs.specialHolidaysTree.filter)
  1124. this.$refs.specialHolidaysTree.filter(val);
  1125. }
  1126. },
  1127. filters: {
  1128. acquireRoleName(value) {
  1129. for (var i in that.acquireRoleList) {
  1130. if (that.acquireRoleList[i].id == value) {
  1131. return that.acquireRoleList[i].rolename;
  1132. }
  1133. }
  1134. },
  1135. },
  1136. beforeCreate: function () {
  1137. that = this;
  1138. },
  1139. methods: {
  1140. delHisSalary(id, userId) {
  1141. this.$confirm('是否删除该记录?', this.$t('other.prompts'), {
  1142. confirmButtonText: this.$t('btn.determine'),
  1143. cancelButtonText: this.$t('btn.cancel'),
  1144. type: 'warning'
  1145. }).then(()=>{
  1146. this.http.post('/user/deleteUserSalaryById',{
  1147. id: id
  1148. },res => {
  1149. if(res.code == 'ok'){
  1150. this.$message({
  1151. message: '操作成功',
  1152. type: 'success'
  1153. })
  1154. this.reqSalaryList(userId);
  1155. }else {
  1156. this.$message({
  1157. message: res.msg,
  1158. type: 'error'
  1159. })
  1160. }
  1161. },error => {
  1162. this.$message({
  1163. message: error,
  1164. type: 'error'
  1165. })
  1166. })
  1167. }).catch(()=>{
  1168. this.$message({
  1169. message: this.$t('thedeletionhasbeencancelled'),
  1170. type: 'info'
  1171. })
  1172. })
  1173. },
  1174. statesPush(){
  1175. if(this.user.corpwxUserid != null && this.user.userNameNeedTranslate == 1){
  1176. var state = {value: "2",label: "可转让"}
  1177. this.states.push(state);
  1178. }
  1179. },
  1180. //继承账号弹窗
  1181. transferActiveDialog(row){
  1182. this.transferActiveDialogFlag = true;
  1183. this.transferActive.handoverId = row.id;
  1184. },
  1185. //继承账号
  1186. transferActiveMethod(){
  1187. if(this.transferActive.takeoverId == null){
  1188. this.$message({
  1189. message: "请选择接收人",
  1190. type: "error"
  1191. });
  1192. return;
  1193. }
  1194. this.transferActiveDialogFlag = false;
  1195. var handoverId = this.transferActive.handoverId
  1196. var takeoverId = this.transferActive.takeoverId
  1197. this.http.post('/wx-corp-info/batchTransferLicense', {handoverId,takeoverId},
  1198. res => {
  1199. if (res.code == "ok") {
  1200. this.$message({
  1201. message: res.msg,
  1202. type: "success"
  1203. });
  1204. } else {
  1205. this.$message({
  1206. message: res.msg,
  1207. type: "error"
  1208. });
  1209. }
  1210. },
  1211. error => {
  1212. this.$message({
  1213. message: error,
  1214. type: "error"
  1215. });
  1216. });
  1217. },
  1218. // 调整
  1219. adjustPositionClick() {
  1220. this.adjustPosition = !this.adjustPosition
  1221. if(!this.adjustPosition) {
  1222. this.queding()
  1223. }
  1224. },
  1225. getWxManager() {
  1226. this.http.post('/user/isManager', {},
  1227. res => {
  1228. if (res.code == "ok") {
  1229. let bur = res.data + ''
  1230. this.wxManager = bur == 'true'
  1231. } else {
  1232. this.$message({
  1233. message: res.msg,
  1234. type: "error"
  1235. });
  1236. }
  1237. },
  1238. error => {
  1239. this.$message({
  1240. message: error,
  1241. type: "error"
  1242. });
  1243. });
  1244. },
  1245. recordIndate(date){
  1246. let datestr = ''
  1247. datestr += date[0]
  1248. datestr += '-'
  1249. datestr += date[1] < 10 ? '0' + date[1] : date[1]
  1250. datestr += '-'
  1251. datestr += date[2] < 10 ? '0' + date[2] : date[2]
  1252. datestr += '\u3000'
  1253. datestr += date[3] < 10 ? '0' + date[3] : date[3]
  1254. datestr += ':'
  1255. datestr += date[4] < 10 ? '0' + date[4] : date[4]
  1256. datestr += ':'
  1257. datestr += date[5] < 10 ? '0' + date[5] : date[5]
  1258. return datestr
  1259. },
  1260. getRecordMsg(){
  1261. this.http.post('/company/getSyncInfo',{
  1262. },res => {
  1263. if(res.code == 'ok'){
  1264. if(res.data){
  1265. this.recordMsg = res.data
  1266. if(this.recordMsg.result == 0){
  1267. this.recordMsgDialog = true
  1268. }
  1269. }
  1270. }else{
  1271. this.$message({
  1272. message: res.msg,
  1273. type: 'error'
  1274. })
  1275. }
  1276. },err => {
  1277. this.$message({
  1278. message: err,
  1279. type: 'error'
  1280. })
  1281. })
  1282. },
  1283. syncMembByCardTime() {
  1284. this.syncMembByCardTimeResultGialog = true;
  1285. this.syncMembByCardTimeMsg = this.$t('synchronizingtheassociation');
  1286. this.http.post("/wxcorp/syncMembByCardTime",
  1287. {
  1288. companyId: this.user.companyId,
  1289. },
  1290. (res) => {
  1291. if (res.code == "ok") {
  1292. this.syncMembByCardTimeMsg = res.data;
  1293. this.getUser();
  1294. //人员同步成功,再去同步获取本月的人员
  1295. this.getCurMonthDayData();
  1296. } else {
  1297. this.syncMembByCardTimeMsg = res.msg;
  1298. }
  1299. },
  1300. (err) => {
  1301. this.syncMembByCardTimeMsg = err;
  1302. }
  1303. );
  1304. },
  1305. getCurMonthDayData() {
  1306. this.http.post("/wxcorp/getCurMonthDayData",
  1307. {
  1308. companyId: this.user.companyId,
  1309. },
  1310. (res) => {
  1311. if (res.code == "ok") {
  1312. } else {
  1313. }
  1314. },
  1315. (err) => {
  1316. }
  1317. );
  1318. },
  1319. saveContactSecret() {
  1320. if (!this.contactSecret) {
  1321. this.$message({
  1322. message: this.$t('booksecret'),
  1323. type: "error",
  1324. });
  1325. return;
  1326. }
  1327. this.http.post(
  1328. "/wx-corp-info/saveContactSecret",
  1329. {
  1330. corpid: this.corpid,
  1331. contactSecret: this.contactSecret,
  1332. },
  1333. (res) => {
  1334. if (res.code == "ok") {
  1335. this.$message({
  1336. message: this.$t('savesuccess'),
  1337. type: "success",
  1338. });
  1339. this.canSync = true;
  1340. } else {
  1341. this.$message({
  1342. message: res.msg,
  1343. type: "error",
  1344. });
  1345. }
  1346. },
  1347. (err) => {
  1348. this.tableLoading = false;
  1349. this.$message({
  1350. message: err,
  1351. type: "error",
  1352. });
  1353. }
  1354. );
  1355. },
  1356. startCorpWxImport() {
  1357. this.importingData = true;
  1358. this.http.post(
  1359. "/wxcorp/getCorpMembs",
  1360. {
  1361. corpId: this.corpid,
  1362. },
  1363. (res) => {
  1364. this.importingData = false;
  1365. if (res.code == "ok") {
  1366. this.showSyncCWDialog = false;
  1367. this.$message({
  1368. message: this.$t('synchronoussuccesss'),
  1369. type: "success",
  1370. });
  1371. this.getDepartment();
  1372. this.getUser();
  1373. this.getUsers();
  1374. } else {
  1375. this.$message({
  1376. message: res.msg,
  1377. type: "error",
  1378. });
  1379. }
  1380. },
  1381. (err) => {
  1382. this.tableLoading = false;
  1383. this.$message({
  1384. message: err,
  1385. type: "error",
  1386. });
  1387. }
  1388. );
  1389. },
  1390. //从企业微信同步通讯录
  1391. syncWithCorpWx() {
  1392. this.showSyncCWDialog = true;
  1393. this.editSecret = false;
  1394. this.http.post(
  1395. "/wx-corp-info/get",
  1396. {
  1397. companyId: this.user.companyId,
  1398. },
  1399. (res) => {
  1400. if (res.code == "ok") {
  1401. this.contactSecret = res.data.contactSecret;
  1402. this.contactServer = res.data.contactServer;
  1403. if (this.contactSecret && this.contactServer) {
  1404. this.canSync = true;
  1405. } else {
  1406. this.editSecret = true;
  1407. }
  1408. this.corpid = res.data.corpid;
  1409. } else {
  1410. this.$message({
  1411. message: res.msg,
  1412. type: "error",
  1413. });
  1414. }
  1415. },
  1416. (err) => {
  1417. this.tableLoading = false;
  1418. this.$message({
  1419. message: err,
  1420. type: "error",
  1421. });
  1422. }
  1423. );
  1424. },
  1425. // 从企业微信同步通讯录 (待测试)
  1426. newSyncWithCorpWx() {
  1427. const loading = this.$loading({
  1428. lock: true,
  1429. text: '同步中',
  1430. spinner: 'el-icon-loading',
  1431. background: 'rgba(0, 0, 0, 0.7)'
  1432. });
  1433. this.newSyncWithCorpWxDayload = false
  1434. this.http.post(
  1435. "/wxcorp/getCorpMembsFromPlatform",
  1436. {
  1437. companyId: this.user.companyId,
  1438. },
  1439. (res) => {
  1440. loading.close();
  1441. if (res.code == "ok") {
  1442. this.$message({
  1443. message: '同步成功',
  1444. type: "success",
  1445. });
  1446. this.getDepartment();
  1447. this.getUser();
  1448. this.getUsers();
  1449. } else {
  1450. this.$message({
  1451. message: res.msg,
  1452. type: "error",
  1453. });
  1454. }
  1455. },
  1456. (err) => {
  1457. loading.close();
  1458. this.tableLoading = false;
  1459. this.$message({
  1460. message: err,
  1461. type: "error",
  1462. });
  1463. }
  1464. );
  1465. },
  1466. showCorpDDSyncDialog() {
  1467. this.showSyncDDDialog = true;
  1468. this.http.post(
  1469. "/company-dingding/getSyncContact",
  1470. {},
  1471. (res) => {
  1472. if (res.code == "ok") {
  1473. this.isSyncContact = (res.data ==1?true: false);
  1474. }
  1475. },
  1476. (err) => {
  1477. this.$message({
  1478. message: err,
  1479. type: "error",
  1480. });
  1481. }
  1482. );
  1483. },
  1484. setSyncContactDD() {
  1485. this.http.post(
  1486. "/company-dingding/setSyncContact",
  1487. {isSync: this.isSyncContact?1:0},
  1488. (res) => {
  1489. if (res.code == "ok") {
  1490. } else {
  1491. this.$message({
  1492. message: res.msg,
  1493. type: "error",
  1494. });
  1495. }
  1496. },
  1497. (err) => {
  1498. this.$message({
  1499. message: err,
  1500. type: "error",
  1501. });
  1502. }
  1503. );
  1504. },
  1505. // 从钉钉同步通讯录
  1506. syncWithCorpDingding() {
  1507. this.importingData = true;
  1508. this.listLoading = true;
  1509. this.http.post(
  1510. "/company/syncCorpMembs",
  1511. {},
  1512. (res) => {
  1513. this.listLoading = false;
  1514. this.importingData = false;
  1515. if (res.code == "ok") {
  1516. this.showSyncDDDialog = false;
  1517. this.$message({
  1518. message: res.data,
  1519. type: "success",
  1520. });
  1521. this.getDepartment();
  1522. this.getUser();
  1523. this.getUsers();
  1524. } else {
  1525. this.$message({
  1526. message: res.msg,
  1527. type: "error",
  1528. });
  1529. }
  1530. },
  1531. (err) => {
  1532. this.listLoading = false;
  1533. this.$message({
  1534. message: err,
  1535. type: "error",
  1536. });
  1537. }
  1538. );
  1539. },
  1540. //根据key找到value
  1541. findValue(key,obj) {
  1542. for (let k in obj){
  1543. if (k===key){
  1544. return obj[k]
  1545. }
  1546. }
  1547. },
  1548. test() {
  1549. this.getCustomConfigList();
  1550. },
  1551. // 自定义配置项
  1552. customConfigShow() {
  1553. this.getCustomConfigList();
  1554. this.customConfigDialog = true;
  1555. },
  1556. getConfigItemBtn(item) {
  1557. this.configItemDialog = true;
  1558. this.AorMitem.userCustomId = item.id;
  1559. this.getConfigItem();
  1560. },
  1561. getConfigItem() {
  1562. // 获取配置下拉数据
  1563. this.http.post(
  1564. "/sub-user-custom/list",
  1565. {
  1566. userCustomId: this.AorMitem.userCustomId,
  1567. },
  1568. (res) => {
  1569. if (res.code == "ok") {
  1570. this.configItemList = res.data;
  1571. } else {
  1572. this.$message({
  1573. message: res.msg,
  1574. type: "error",
  1575. });
  1576. }
  1577. },
  1578. (err) => {
  1579. this.tableLoading = false;
  1580. this.$message({
  1581. message: err,
  1582. type: "error",
  1583. });
  1584. }
  1585. );
  1586. },
  1587. getCustomConfigList() {
  1588. // 获取自定义配置
  1589. this.http.post(
  1590. "/user-custom/list",
  1591. {},
  1592. (res) => {
  1593. if (res.code == "ok") {
  1594. let lists = JSON.parse(JSON.stringify(res.data));
  1595. this.userCustomConfig = JSON.parse(JSON.stringify(res.data));
  1596. // let lists = res.data
  1597. // this.customConfigList = res.data
  1598. this.customConfigList = [
  1599. { name: "", id: null, type: 1, companyId: null },
  1600. { name: "", id: null, type: 1, companyId: null },
  1601. { name: "", id: null, type: 1, companyId: null },
  1602. { name: "", id: null, type: 1, companyId: null },
  1603. { name: "", id: null, type: 1, companyId: null },
  1604. ];
  1605. for (let i in lists) {
  1606. this.$set(this.customConfigList[i], "name", lists[i].name);
  1607. this.$set(this.customConfigList[i], "id", lists[i].id);
  1608. this.$set(this.customConfigList[i], "type", lists[i].type);
  1609. this.$set(
  1610. this.customConfigList[i],
  1611. "companyId",
  1612. lists[i].companyId
  1613. );
  1614. }
  1615. // console.log('customConfigList',this.customConfigList);
  1616. this.cusItemTypes = [];
  1617. for (let j in this.customConfigList) {
  1618. if (
  1619. this.customConfigList[j].type == null ||
  1620. this.customConfigList[j].type == 0
  1621. ) {
  1622. this.customConfigList[j].type = 0;
  1623. this.cusItemTypes[j] = 0;
  1624. } else {
  1625. this.cusItemTypes[j] = 1;
  1626. }
  1627. }
  1628. } else {
  1629. this.$message({
  1630. message: res.msg,
  1631. type: "error",
  1632. });
  1633. }
  1634. },
  1635. (err) => {
  1636. this.$message({
  1637. message: err,
  1638. type: "error",
  1639. });
  1640. }
  1641. );
  1642. },
  1643. customConfigListSave() {
  1644. // 保存/修改自定义配置
  1645. // let jsonStr = ''
  1646. // for(let i in this.customConfigList){
  1647. // if(this.customConfigList[i].name){
  1648. // jsonStr += JSON.stringify(this.customConfigList[i]) + ','
  1649. // }
  1650. // }
  1651. // jsonStr = jsonStr.substring(0,jsonStr.length - 1)
  1652. // let jsonStr = []
  1653. this.saveBtnLoading = true;
  1654. let parameter = this.customConfigList.filter(
  1655. (item) => item.name.trim() != ""
  1656. );
  1657. this.http.post(
  1658. "/user-custom/addOrMod",
  1659. {
  1660. json: JSON.stringify(parameter),
  1661. },
  1662. (res) => {
  1663. if (res.code == "ok") {
  1664. this.getCustomConfigList();
  1665. this.saveBtnLoading = false;
  1666. this.$message({
  1667. message: this.$t('savesuccess'),
  1668. type: "success",
  1669. });
  1670. } else {
  1671. this.saveBtnLoading = false;
  1672. this.$message({
  1673. message: res.msg,
  1674. type: "error",
  1675. });
  1676. }
  1677. },
  1678. (err) => {
  1679. this.saveBtnLoading = false;
  1680. this.$message({
  1681. message: err,
  1682. type: "error",
  1683. });
  1684. }
  1685. );
  1686. },
  1687. customConfigDelete(item, index) {
  1688. if (item.id) {
  1689. this.http.post(
  1690. "/user-custom/delete",
  1691. {
  1692. id: item.id,
  1693. },
  1694. (res) => {
  1695. if (res.code == "ok") {
  1696. this.getCustomConfigList();
  1697. this.$message({
  1698. message: this.$t('message.successfullyDeleted'),
  1699. type: "success",
  1700. });
  1701. } else {
  1702. this.$message({
  1703. message: res.msg,
  1704. type: "error",
  1705. });
  1706. }
  1707. },
  1708. (err) => {
  1709. this.$message({
  1710. message: err,
  1711. type: "error",
  1712. });
  1713. }
  1714. );
  1715. } else {
  1716. this.customConfigList.splice(index, 1);
  1717. }
  1718. },
  1719. configItemAorM(item) {
  1720. this.configItemAorMDialog = true;
  1721. if (item) {
  1722. this.AorMitem.name = item.name;
  1723. this.AorMitem.id = item.id;
  1724. } else {
  1725. this.AorMitem.name = null;
  1726. this.AorMitem.id = null;
  1727. }
  1728. },
  1729. configItemAorMSure() {
  1730. // 新增/修改配置下拉选项
  1731. if (!this.AorMitem.name) {
  1732. this.$message({
  1733. message: this.$t('namecannotbeempty'),
  1734. type: "error",
  1735. });
  1736. return;
  1737. }
  1738. this.http.post(
  1739. "/sub-user-custom/addOrMod",
  1740. this.AorMitem,
  1741. (res) => {
  1742. if (res.code == "ok") {
  1743. this.configItemAorMDialog = false;
  1744. this.getConfigItem();
  1745. this.$message({
  1746. message: this.$t('message.submittedSuccessfully'),
  1747. type: "success",
  1748. });
  1749. } else {
  1750. this.$message({
  1751. message: res.msg,
  1752. type: "error",
  1753. });
  1754. }
  1755. },
  1756. (err) => {
  1757. this.$message({
  1758. message: err,
  1759. type: "error",
  1760. });
  1761. }
  1762. );
  1763. },
  1764. configItemDelete(item) {
  1765. // 删除配置下拉选项
  1766. this.http.post(
  1767. "/sub-user-custom/delete",
  1768. {
  1769. id: item.id,
  1770. },
  1771. (res) => {
  1772. if (res.code == "ok") {
  1773. this.getConfigItem();
  1774. this.$message({
  1775. message: this.$t('message.successfullyDeleted'),
  1776. type: "success",
  1777. });
  1778. } else {
  1779. this.$message({
  1780. message: res.msg,
  1781. type: "error",
  1782. });
  1783. }
  1784. },
  1785. (err) => {
  1786. this.$message({
  1787. message: err,
  1788. type: "error",
  1789. });
  1790. }
  1791. );
  1792. },
  1793. // 获取添加人员时的自定义配置信息
  1794. getUserCustomConfig(e) {
  1795. this.http.post(
  1796. "/user-custom/list",
  1797. {},
  1798. (res) => {
  1799. if (res.code == "ok") {
  1800. this.userCustomConfig = JSON.parse(JSON.stringify(res.data));
  1801. for (let i in this.userCustomConfig) {
  1802. if (this.userCustomConfig[i].type == 0) {
  1803. this.http.post(
  1804. "/sub-user-custom/list",
  1805. {
  1806. userCustomId: this.userCustomConfig[i].id,
  1807. },
  1808. (res) => {
  1809. if (res.code == "ok") {
  1810. // this.userCustomConfig[i].itemList = res.data
  1811. this.$set(this.userCustomConfig[i], "itemList", res.data);
  1812. } else {
  1813. this.$message({
  1814. message: res.msg,
  1815. type: "error",
  1816. });
  1817. }
  1818. },
  1819. (err) => {
  1820. this.$message({
  1821. message: err,
  1822. type: "error",
  1823. });
  1824. }
  1825. );
  1826. }
  1827. }
  1828. this.$nextTick(() => {
  1829. // let opt = this.users[0].plateMap[this.userCustomConfig[0].name]
  1830. // console.log('userCustomConfig',this.userCustomConfig);
  1831. // console.log('insertForm',this.insertForm);
  1832. });
  1833. } else {
  1834. this.$message({
  1835. message: res.msg,
  1836. type: "error",
  1837. });
  1838. }
  1839. },
  1840. (err) => {
  1841. this.$message({
  1842. message: err,
  1843. type: "error",
  1844. });
  1845. }
  1846. );
  1847. },
  1848. // customConfigListAdd(){
  1849. // this.customConfigList.push({
  1850. // name: '',
  1851. // type: 1
  1852. // })
  1853. // },
  1854. // 批量修改部门
  1855. handleSelectionZzjg(e) {
  1856. // if (e.length == 0) {
  1857. // this.handleSelectionZzjgshow = false
  1858. // }else{
  1859. // this.handleSelectionZzjgshow = true
  1860. // }
  1861. this.handleSelectionZzjgDate = e;
  1862. },
  1863. handleSelectionZzjgbtn1() {
  1864. this.handleSelectionZzjgshow = false;
  1865. this.$refs.handleSelectTable.clearSelection();
  1866. this.handleSelectionZzjgwillchange = null;
  1867. },
  1868. handleSelectionZzjgbtn2() {
  1869. if (this.handleSelectionZzjgwillchange == null) {
  1870. this.$message(this.$t('qing-xuan-ze-bu-men'));
  1871. return;
  1872. }
  1873. //接口调用样例代码如下
  1874. var ids = [];
  1875. for (
  1876. let index = 0;
  1877. index < this.handleSelectionZzjgDate.length;
  1878. index++
  1879. ) {
  1880. ids.push(this.handleSelectionZzjgDate[index].id);
  1881. }
  1882. var changeId =
  1883. this.handleSelectionZzjgwillchange[
  1884. this.handleSelectionZzjgwillchange.length - 1
  1885. ];
  1886. this.http.post(
  1887. "/user/batchUpdateDept",
  1888. {
  1889. userIds: JSON.stringify(ids),
  1890. deptId: changeId,
  1891. },
  1892. (res) => {
  1893. if (res.code == "ok") {
  1894. this.$message({
  1895. message: this.$t('message.modifyTheSuccess'),
  1896. type: "success",
  1897. });
  1898. this.getUser();
  1899. } else {
  1900. this.$message({
  1901. message: res.msg,
  1902. type: "error",
  1903. });
  1904. }
  1905. },
  1906. (error) => {
  1907. this.$message({
  1908. message: error,
  1909. type: "error",
  1910. });
  1911. }
  1912. );
  1913. // for (let index = 0; index < this.handleSelectionZzjgDate.length; index++) {
  1914. // this.handleSelectionZzjgDate[index].departmentId = this.handleSelectionZzjgwillchange[this.handleSelectionZzjgwillchange.length - 1]
  1915. // if (this.handleSelectionZzjgDate[index].role == 1) {
  1916. // this.submitInsert1(this.handleSelectionZzjgDate[index],1)
  1917. // }else{
  1918. // this.submitInsert(this.handleSelectionZzjgDate[index],1)
  1919. // }
  1920. // }
  1921. // this.handleSelectionZzjgwillchange = null
  1922. this.handleSelectionZzjgshow = false;
  1923. },
  1924. handleSelectionZzjgbtn3() {
  1925. if (this.handleSelectionZzjgDate.length == 0) {
  1926. this.$message(this.$t('pleaseselectpersonnel'));
  1927. return;
  1928. }
  1929. this.handleSelectionZzjgshow = true;
  1930. },
  1931. workingHoursDialogClick() {
  1932. let endDate = this.dayjs(`${new Date()}`).format('YYYY-MM-DD')
  1933. let startDate = this.dayjs(`${new Date()}`).format('YYYY-MM') + '-01'
  1934. this.workingHoursDatas = [startDate, endDate]
  1935. if (this.handleSelectionZzjgDate.length == 0) {
  1936. this.$message(this.$t('pleaseselectpersonnel'));
  1937. return;
  1938. }
  1939. this.workingHoursDialog = true
  1940. },
  1941. handJue() {
  1942. if (this.handleSelectionZzjgDate.length == 0) {
  1943. this.$message(this.$t('pleaseselectpersonnel'));
  1944. return;
  1945. }
  1946. for (var i in this.acquireRoleList) {
  1947. if (this.acquireRoleList[i].isDefault == 1) {
  1948. this.xiuRoleId = this.acquireRoleList[i].id;
  1949. }
  1950. }
  1951. this.handljues = true;
  1952. // console.log('触发了')
  1953. },
  1954. handleSelectionUser() {
  1955. // console.log(this.handleSelectionZzjgDate)
  1956. //接口调用样例代码如下
  1957. var ids = [];
  1958. for (
  1959. let index = 0;
  1960. index < this.handleSelectionZzjgDate.length;
  1961. index++
  1962. ) {
  1963. ids.push(this.handleSelectionZzjgDate[index].id);
  1964. }
  1965. // console.log(ids);
  1966. this.http.post(
  1967. "/user/setActiveByIds",
  1968. {
  1969. ids: JSON.stringify(ids),
  1970. isActive:1
  1971. },
  1972. (res) => {
  1973. if (res.code == "ok") {
  1974. this.$message({
  1975. message: this.$t('message.modifyTheSuccess'),
  1976. type: "success",
  1977. });
  1978. this.getUser();
  1979. } else {
  1980. this.$message({
  1981. message: res.msg,
  1982. type: "error",
  1983. });
  1984. }
  1985. },
  1986. (error) => {
  1987. this.$message({
  1988. message: error,
  1989. type: "error",
  1990. });
  1991. }
  1992. );
  1993. },
  1994. handTrue() {
  1995. var arr = [];
  1996. for (var i in this.handleSelectionZzjgDate) {
  1997. arr.push(this.handleSelectionZzjgDate[i].id);
  1998. }
  1999. this.http.post(
  2000. "/user/batchUpdateRole",
  2001. {
  2002. userIds: JSON.stringify(arr),
  2003. roleId: this.xiuRoleId,
  2004. },
  2005. (res) => {
  2006. if (res.code == "ok") {
  2007. this.$message({
  2008. message: this.$t('operationissuccessful'),
  2009. type: "success",
  2010. });
  2011. this.handljues = false;
  2012. this.getUser();
  2013. } else {
  2014. this.$message({
  2015. message: res.msg,
  2016. type: "error",
  2017. });
  2018. }
  2019. },
  2020. (error) => {
  2021. this.$message({
  2022. message: error,
  2023. type: "error",
  2024. });
  2025. }
  2026. );
  2027. },
  2028. // 转移日报
  2029. transferDaily() {
  2030. this.deleteUserFlgloading = true
  2031. this.http.post("/user/moveUserData", {
  2032. targetId: this.moveReportUserId,
  2033. sourceId: this.deleteUserFlgData.id
  2034. },
  2035. (res) => {
  2036. if (res.code == "ok") {
  2037. this.transferDailydete()
  2038. } else {
  2039. }
  2040. },
  2041. (error) => {
  2042. this.$message({
  2043. message: error,
  2044. type: "error",
  2045. });
  2046. });
  2047. },
  2048. transferDailydete() {
  2049. this.deleteUserFlgloading = true
  2050. this.http.post(
  2051. "/user/deleteUser",
  2052. {
  2053. // userId: targetUser.id,
  2054. userId: this.deleteUserFlgData.id,
  2055. },
  2056. (res) => {
  2057. this.deleteUserFlg = false
  2058. if (res.code == "ok") {
  2059. this.$message({
  2060. message: this.$t('message.successfullyDeleted'),
  2061. type: "success",
  2062. });
  2063. this.dialogVisible = false;
  2064. this.deleteUserFlgloading = false
  2065. this.getUser();
  2066. } else {
  2067. this.$message({
  2068. message: res.msg,
  2069. type: "error",
  2070. });
  2071. this.dialogVisible = false;
  2072. }
  2073. },
  2074. (error) => {
  2075. this.deleteUserFlg = false
  2076. this.$message({
  2077. message: error,
  2078. type: "error",
  2079. });
  2080. this.dialogVisible = false;
  2081. this.deleteUserFlgloading = false
  2082. }
  2083. );
  2084. },
  2085. deleteUser(targetUser) {
  2086. console.log(targetUser, '数据', this.deleteUserFlgData)
  2087. // this.$confirm(this.$t('deletthisemployee'), this.$t('other.prompts'), {
  2088. // //type: 'warning'
  2089. // }).then(() => {
  2090. this.dialogVisible = true
  2091. if(this.deleteUserFlgData.isExistsReport) {
  2092. this.transferDaily()
  2093. } else {
  2094. this.transferDailydete()
  2095. }
  2096. // this.http.post(
  2097. // "/user/deleteUser",
  2098. // {
  2099. // // userId: targetUser.id,
  2100. // userId: this.deleteUserFlgData.id,
  2101. // },
  2102. // (res) => {
  2103. // if (res.code == "ok") {
  2104. // this.$message({
  2105. // message: this.$t('message.successfullyDeleted'),
  2106. // type: "success",
  2107. // });
  2108. // this.dialogVisible = false;
  2109. // this.getUser();
  2110. // } else {
  2111. // this.$message({
  2112. // message: res.msg,
  2113. // type: "error",
  2114. // });
  2115. // this.dialogVisible = false;
  2116. // }
  2117. // },
  2118. // (error) => {
  2119. // this.$message({
  2120. // message: error,
  2121. // type: "error",
  2122. // });
  2123. // this.dialogVisible = false;
  2124. // }
  2125. // );
  2126. // });
  2127. },
  2128. chufa(data, b, c, e) {
  2129. if (this.depData == null || data.id != this.depData.id) {
  2130. // this.depData = data.id
  2131. this.depData = data;
  2132. this.page = 1;
  2133. this.getUser();
  2134. }
  2135. },
  2136. jieDian(a, b, c) {
  2137. var ids = a.id;
  2138. var arrs = this.jDarr;
  2139. arrs.push(ids);
  2140. this.jDarr = arrs;
  2141. },
  2142. shutDown(a, b, c) {
  2143. var ids = a.id;
  2144. var arrs = [];
  2145. for (var i in this.jDarr) {
  2146. if (this.jDarr[i] != ids) {
  2147. arrs.push(this.jDarr[i]);
  2148. }
  2149. }
  2150. this.jDarr = arrs;
  2151. },
  2152. mouseleave(data, $event) {
  2153. if($event.currentTarget && $event.currentTarget.firstElementChild && $event.currentTarget.firstElementChild.nextElementSibling && !this.adjustPosition) {
  2154. $event.currentTarget.firstElementChild.nextElementSibling.setAttribute(
  2155. "class",
  2156. "node none poAub"
  2157. );
  2158. }
  2159. },
  2160. mouseover(data, $event) {
  2161. if($event.currentTarget.lastChild.setAttribute && !this.adjustPosition) {
  2162. $event.currentTarget.lastChild.setAttribute("class", "node block poAub");
  2163. }
  2164. },
  2165. confirmDeactive() {
  2166. this.http.post(
  2167. "/user/deactiveUser",
  2168. {
  2169. id: this.deactiveUser.id,
  2170. inactiveDate: this.deactiveDate,
  2171. },
  2172. (res) => {
  2173. if (res.code == "ok") {
  2174. this.deactiveDialog = false;
  2175. this.$message({
  2176. message: this.$t('stopsuccess'),
  2177. type: "success",
  2178. });
  2179. this.getUser();
  2180. } else {
  2181. if(this.user.companyId==876||this.user.companyId==877||this.user.companyId==878){
  2182. this.$confirm('当前员工有待审核日报,确认停用并驳回日报吗?', '提示', {
  2183. confirmButtonText: '确定',
  2184. cancelButtonText: '取消',
  2185. type: 'warning'
  2186. }).then(() => {
  2187. this.http.post(
  2188. "/report/denyByCheckId",
  2189. { userId:this.deactiveUser.id },
  2190. (res) => {
  2191. if (res.code == "ok") {
  2192. this.$message({
  2193. message: this.$t('stopsuccess'),
  2194. type: "success",
  2195. });
  2196. } else {
  2197. this.$message({
  2198. message: res.msg,
  2199. type: "error",
  2200. });
  2201. }
  2202. },
  2203. (error) => {
  2204. this.listLoading = false;
  2205. this.$message({
  2206. message: error,
  2207. type: "error",
  2208. });
  2209. }
  2210. );
  2211. }).catch(() => {
  2212. this.$message({
  2213. type: 'info',
  2214. message: '已取消'
  2215. });
  2216. });
  2217. }else{
  2218. this.$message({
  2219. message: error,
  2220. type: "error",
  2221. });
  2222. }
  2223. }
  2224. },
  2225. (error) => {
  2226. this.$message({
  2227. message: error,
  2228. type: "error",
  2229. });
  2230. }
  2231. );
  2232. },
  2233. showDeactiveDialog(item) {
  2234. this.deactiveDialog = true;
  2235. this.deactiveUser = item;
  2236. },
  2237. restrictNumber(targetId) {
  2238. let inpu = document.getElementById(targetId);
  2239. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  2240. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  2241. inpu.value = inpu.value
  2242. .replace(".", "$#*")
  2243. .replace(/\./g, "")
  2244. .replace("$#*", "."); //去除其他"."
  2245. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, "$1.$2"); //限制只能输入两个小数
  2246. if (inpu.value.indexOf(".") < 0 && inpu.value != "") {
  2247. //首位是0的话去掉
  2248. inpu.value = parseFloat(inpu.value);
  2249. }
  2250. },
  2251. restrictNumber4(targetId) {
  2252. let inpu = document.getElementById(targetId);
  2253. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  2254. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  2255. inpu.value = inpu.value
  2256. .replace(".", "$#*")
  2257. .replace(/\./g, "")
  2258. .replace("$#*", "."); //去除其他"."
  2259. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d\d\d).*$/, "$1.$2"); //限制只能输入两个小数
  2260. if (inpu.value.indexOf(".") < 0 && inpu.value != "") {
  2261. //首位是0的话去掉
  2262. inpu.value = parseFloat(inpu.value);
  2263. }
  2264. },
  2265. showConfirmDialog() {
  2266. if (this.toUserId == null || this.toUserId == "") {
  2267. this.$message({
  2268. message: this.$t('wanttotransfer'),
  2269. type: "error",
  2270. });
  2271. return;
  2272. }
  2273. if (!this.myRoleId) {
  2274. this.$message({
  2275. message: this.$t('pleaseselectaftertransfer'),
  2276. type: "error",
  2277. });
  2278. return;
  2279. }
  2280. this.$confirm(
  2281. this.$t('superadministratorrole'),
  2282. this.$t('other.prompts'),
  2283. {
  2284. //type: 'warning'
  2285. }
  2286. ).then(() => {
  2287. this.http.post(
  2288. "/user/changeSysManager",
  2289. {
  2290. toUserId: this.toUserId,
  2291. myRoleId: this.myRoleId,
  2292. },
  2293. (res) => {
  2294. if (res.code == "ok") {
  2295. sessionStorage.removeItem("user");
  2296. this.$router.push("/login");
  2297. } else {
  2298. this.$message({
  2299. message: res.msg,
  2300. type: "error",
  2301. });
  2302. }
  2303. },
  2304. (error) => {
  2305. this.$message({
  2306. message: error,
  2307. type: "error",
  2308. });
  2309. }
  2310. );
  2311. });
  2312. },
  2313. transferRole() {
  2314. this.transferDialog = true;
  2315. this.http.post(
  2316. this.port.manage.list,
  2317. {
  2318. departmentId: -1,
  2319. pageIndex: 1,
  2320. // pageSize: 99999,
  2321. pageSize: -1,
  2322. },
  2323. (res) => {
  2324. if (res.code == "ok") {
  2325. this.allActiveUsers = res.data.records.filter(
  2326. (u) => u.isActive == 1 && u.id != this.user.id
  2327. );
  2328. } else {
  2329. this.$message({
  2330. message: res.msg,
  2331. type: "error",
  2332. });
  2333. }
  2334. },
  2335. (error) => {
  2336. this.$message({
  2337. message: error,
  2338. type: "error",
  2339. });
  2340. }
  2341. );
  2342. },
  2343. showExportDialog() {
  2344. this.exportDialogVisible = true;
  2345. },
  2346. exportUsers() {
  2347. this.http.post(
  2348. "/user/exportUsers",
  2349. {
  2350. containInvalid: this.containInvalid,
  2351. },
  2352. (res) => {
  2353. if (res.code == "ok") {
  2354. this.exportDialogVisible = false;
  2355. var aTag = document.createElement("a");
  2356. aTag.download = this.$t('listofallemployees') + ".xls";
  2357. aTag.href = res.data;
  2358. aTag.click();
  2359. } else {
  2360. this.$message({
  2361. message: res.msg,
  2362. type: "error",
  2363. });
  2364. }
  2365. },
  2366. (error) => {
  2367. this.$message({
  2368. message: error,
  2369. type: "error",
  2370. });
  2371. }
  2372. );
  2373. },
  2374. showSalaryList(item) {
  2375. this.userSalaryListDialog = true;
  2376. this.reqSalaryList(item.id);
  2377. },
  2378. reqSalaryList(userId) {
  2379. this.userSalaryList = [];
  2380. this.http.post(
  2381. "/user/getUserSalaryList",
  2382. {
  2383. id: userId,
  2384. },
  2385. (res) => {
  2386. if (res.code == "ok") {
  2387. this.userSalaryList = res.data;
  2388. } else {
  2389. this.$message({
  2390. message: res.msg,
  2391. type: "error",
  2392. });
  2393. }
  2394. },
  2395. (error) => {
  2396. this.$message({
  2397. message: error,
  2398. type: "error",
  2399. });
  2400. }
  2401. );
  2402. },
  2403. getUsers() {
  2404. this.http.post(
  2405. // this.port.manage.list,
  2406. '/user/getSimpleActiveUserList',
  2407. {},
  2408. (res) => {
  2409. if (res.code == "ok") {
  2410. // this.users = res.data.records;
  2411. this.users = res.data;
  2412. } else {
  2413. this.$message({
  2414. message: res.msg,
  2415. type: "error",
  2416. });
  2417. }
  2418. },
  2419. (error) => {
  2420. this.$message({
  2421. message: error,
  2422. type: "error",
  2423. });
  2424. }
  2425. );
  2426. },
  2427. onSalaryTypeChange(value) {
  2428. if (value == 1) {
  2429. this.insertForm.monthCost = null;
  2430. }
  2431. },
  2432. //选中部门
  2433. choseDept(value) {
  2434. // console.log(value);
  2435. },
  2436. //月成本输入变化
  2437. oninput(e) {
  2438. this.insertForm.cost = (
  2439. this.insertForm.monthCost /
  2440. this.timeType.monthDays /
  2441. this.timeType.allday
  2442. ).toFixed(4);
  2443. },
  2444. // 获取本公司的工作时间设置
  2445. getCompanyTimeSetting() {
  2446. this.http.post(
  2447. "/time-type/getCompanyTimeSetting",
  2448. {
  2449. companyId: this.user.companyId,
  2450. },
  2451. (res) => {
  2452. if (res.code == "ok") {
  2453. this.timeType = res.data;
  2454. this.saasSyncContact = res.saasSyncContact
  2455. } else {
  2456. this.$message({
  2457. message: res.msg,
  2458. type: "error",
  2459. });
  2460. }
  2461. },
  2462. (error) => {
  2463. this.listLoading = false;
  2464. this.$message({
  2465. message: error,
  2466. type: "error",
  2467. });
  2468. }
  2469. );
  2470. },
  2471. importUserC() {
  2472. this.importDialog = true;
  2473. },
  2474. importUserSalary() {
  2475. this.importUserSalaryDialog = true;
  2476. },
  2477. // 批量导入人员
  2478. importUser(item) {
  2479. //首先判断文件类型
  2480. let str = item.file.name.split(".");
  2481. let format = str[str.length - 1];
  2482. if (format != "xls" && format != "xlsx") {
  2483. this.$message({
  2484. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  2485. type: "error",
  2486. });
  2487. } else {
  2488. this.listLoading = true;
  2489. let formData = new FormData();
  2490. formData.append("file", item.file);
  2491. this.importingData = true;
  2492. this.http.uploadFile(
  2493. this.port.manage.import,
  2494. formData,
  2495. (res) => {
  2496. this.importingData = false;
  2497. this.$refs.upload.clearFiles();
  2498. this.listLoading = false;
  2499. if (res.code == "ok") {
  2500. this.$message({
  2501. message: this.$t('other.importSuccess'),
  2502. type: "success",
  2503. });
  2504. //重新读取列表
  2505. this.getUser();
  2506. this.importDialog = false;
  2507. } else {
  2508. this.$message({
  2509. message: res.msg,
  2510. type: "error",
  2511. });
  2512. }
  2513. },
  2514. (error) => {
  2515. this.importingData = false;
  2516. this.$refs.upload.clearFiles();
  2517. this.listLoading = false;
  2518. this.$message({
  2519. message: error,
  2520. type: "error",
  2521. });
  2522. }
  2523. );
  2524. }
  2525. },
  2526. //导入人员薪资
  2527. importSalaryData(item) {
  2528. //首先判断文件类型
  2529. let str = item.file.name.split(".");
  2530. let format = str[str.length - 1];
  2531. if (format != "xls" && format != "xlsx") {
  2532. this.$message({
  2533. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  2534. type: "error",
  2535. });
  2536. } else {
  2537. let formData = new FormData();
  2538. formData.append("file", item.file);
  2539. formData.append("ymonth", this.ymonth);
  2540. this.importingSalaryData = true;
  2541. this.http.uploadFile(
  2542. "/user/importMonthCost",
  2543. formData,
  2544. (res) => {
  2545. this.importingSalaryData = false;
  2546. this.$refs.uploadSalaryRef.clearFiles();
  2547. this.listLoading = false;
  2548. if (res.code == "ok") {
  2549. this.$message({
  2550. message: this.$t('other.importSuccess'),
  2551. type: "success",
  2552. });
  2553. //重新读取列表
  2554. this.getUser();
  2555. this.importUserSalaryDialog = false;
  2556. } else {
  2557. this.$message({
  2558. message: res.msg,
  2559. type: "error",
  2560. });
  2561. }
  2562. },
  2563. (error) => {
  2564. this.importingSalaryData = false;
  2565. this.$refs.uploadSalaryRef.clearFiles();
  2566. this.$message({
  2567. message: error,
  2568. type: "error",
  2569. });
  2570. }
  2571. );
  2572. }
  2573. },
  2574. //分页
  2575. handleCurrentChange(val) {
  2576. this.page = val;
  2577. this.getUser();
  2578. },
  2579. handleSizeChange(val) {
  2580. this.size = val;
  2581. this.page=1;
  2582. this.getUser();
  2583. },
  2584. //获取所有员工的列表
  2585. getUser() {
  2586. // console.log(12345)
  2587. this.listLoading = true;
  2588. this.http.post(
  2589. this.port.manage.list,
  2590. {
  2591. departmentId: this.depData.id,
  2592. pageIndex: this.page,
  2593. pageSize: this.size,
  2594. keyword: this.keyword,
  2595. status: this.status,
  2596. // role: this.role
  2597. roleId: this.roleId,
  2598. onlyDirect: this.onlyDirect ? "1" : "0",
  2599. cursor: this.nextCursor, // 游标
  2600. matchingType: this.integer
  2601. },
  2602. (res) => {
  2603. this.listLoading = false;
  2604. if (res.code == "ok") {
  2605. this.list = res.data.records;
  2606. this.total = res.data.total;
  2607. this.nextCursor = res.data.nextCursor
  2608. } else {
  2609. this.$message({
  2610. message: res.msg,
  2611. type: "error",
  2612. });
  2613. }
  2614. },
  2615. (error) => {
  2616. this.listLoading = false;
  2617. this.$message({
  2618. message: error,
  2619. type: "error",
  2620. });
  2621. }
  2622. );
  2623. },
  2624. syncFeishu(){
  2625. const loading = this.$loading({
  2626. lock: true,
  2627. text: '同步中',
  2628. spinner: 'el-icon-loading',
  2629. background: 'rgba(0, 0, 0, 0.7)'
  2630. });
  2631. this.http.post(
  2632. "/feishu-info/getFeishuMembsFromPlatform",
  2633. {},
  2634. (res) => {
  2635. loading.close()
  2636. if (res.code == "ok") {
  2637. this.$message({
  2638. message: '同步成功',
  2639. type: "success",
  2640. });
  2641. } else {
  2642. this.$message({
  2643. message: res.msg,
  2644. type: "error",
  2645. });
  2646. }
  2647. },
  2648. (error) => {
  2649. loading.close()
  2650. this.listLoading = false;
  2651. this.$message({
  2652. message: error,
  2653. type: "error",
  2654. });
  2655. }
  2656. );
  2657. },
  2658. syncAd(){
  2659. this.http.post(
  2660. "/user/syncDeptWithAD",
  2661. {},
  2662. (res) => {
  2663. if (res.code == "ok") {
  2664. this.$message({
  2665. message: '同步成功',
  2666. type: "success",
  2667. });
  2668. } else {
  2669. this.$message({
  2670. message: res.msg,
  2671. type: "error",
  2672. });
  2673. }
  2674. },
  2675. (error) => {
  2676. this.listLoading = false;
  2677. this.$message({
  2678. message: error,
  2679. type: "error",
  2680. });
  2681. }
  2682. );
  2683. },
  2684. resetPwd(user) {
  2685. this.$confirm(this.$t('wanttoor') + user.name + this.$t('resetyourpassword'), this.$t('saresetyourpassword'), {
  2686. confirmButtonText: this.$t('btn.determine'),
  2687. cancelButtonText: this.$t('btn.cancel'),
  2688. type: "warning",
  2689. })
  2690. .then(() => {
  2691. this.http.post(
  2692. "/user/resetPwd",
  2693. { userId: user.id },
  2694. (res) => {
  2695. if (res.code == "ok") {
  2696. this.$message({
  2697. message: this.$t('linglingling'),
  2698. type: "success",
  2699. });
  2700. } else {
  2701. this.$message({
  2702. message: res.msg,
  2703. type: "error",
  2704. });
  2705. }
  2706. },
  2707. (error) => {
  2708. this.listLoading = false;
  2709. this.$message({
  2710. message: error,
  2711. type: "error",
  2712. });
  2713. }
  2714. );
  2715. })
  2716. .catch(() => {});
  2717. },
  2718. // 新增、编辑人员
  2719. openInsertDialog(row, roleNameFlg) {
  2720. this.roleNameFlg = roleNameFlg
  2721. if (row != null) {
  2722. var list = JSON.parse(JSON.stringify(row)),
  2723. arr = [],
  2724. array = [];
  2725. if (list.departmentCascade != "0" && list.departmentCascade != null) {
  2726. if (list.departmentCascade.indexOf(",") > -1) {
  2727. arr = list.departmentCascade.split(",");
  2728. } else {
  2729. arr = [].concat(list.departmentCascade);
  2730. }
  2731. }
  2732. for (var i in arr) {
  2733. array.push(parseInt(arr[i]));
  2734. }
  2735. // console.log(list, '数据')
  2736. // this.insertForm = {
  2737. // id: list.id,
  2738. // name: list.name,
  2739. // phone: list.phone,
  2740. // // role: list.role,
  2741. // roleId: list.roleId,
  2742. // monthCost:list.monthCost,
  2743. // cost: list.cost,
  2744. // departmentId: array.reverse(),
  2745. // salaryType: list.salaryType,
  2746. // costApplyDate: list.costApplyDate,
  2747. // position: list.position
  2748. // };
  2749. this.addUserId = list.id;
  2750. this.http.post(
  2751. "/user/getUserInfo",
  2752. {
  2753. userId: list.id,
  2754. },
  2755. (res) => {
  2756. if (res.code == "ok") {
  2757. this.deleteUserFlgData = res.data
  2758. if(res.data.userReportDeptList && res.data.userReportDeptList.length > 0) {
  2759. res.data.userReportDeptList = res.data.userReportDeptList .map(item => {
  2760. return {
  2761. ...item,
  2762. label: item.departmentName,
  2763. id: item.departmentId
  2764. }
  2765. })
  2766. }
  2767. this.insertForm = {
  2768. id: res.data.id,
  2769. name: res.data.name,
  2770. phone: res.data.phone,
  2771. roleId: res.data.roleId,
  2772. monthCost: res.data.monthCost ? res.data.monthCost : 0,
  2773. cost: res.data.cost ? res.data.cost : 0,
  2774. departmentId: array.reverse(),
  2775. salaryType: res.data.salaryType,
  2776. costApplyDate: res.data.costApplyDate,
  2777. // inductionDate: res.data.inductionDate,
  2778. inactiveDate: res.data.inactiveDate,
  2779. isActive: res.data.isActive,
  2780. position: res.data.position,
  2781. certJson: res.data.certList,
  2782. plateMap: {},
  2783. superiorId: res.data.superiorId,
  2784. plate1: res.data.plate1,
  2785. plate2: res.data.plate2,
  2786. plate3: res.data.plate3,
  2787. plate4: res.data.plate4,
  2788. plate5: res.data.plate5,
  2789. jobNumber: res.data.jobNumber,
  2790. onlyAuditOnce: res.data.onlyAuditOnce,
  2791. reportDeptIdsList: res.data.userReportDeptList || []
  2792. };
  2793. this.$set(this.insertForm, 'inductionDate', res.data.inductionDate)
  2794. this.getUserCustomConfig(1);
  2795. } else {
  2796. this.$message({
  2797. message: res.msg,
  2798. type: "error",
  2799. });
  2800. }
  2801. },
  2802. (error) => {
  2803. this.listLoading = false;
  2804. this.$message({
  2805. message: error,
  2806. type: "error",
  2807. });
  2808. }
  2809. );
  2810. this.title = this.$t('editorialstaff');
  2811. } else {
  2812. this.addUserId = "";
  2813. this.insertForm = {
  2814. id: null,
  2815. name: null,
  2816. phone: null,
  2817. // role: null,
  2818. roleId: null,
  2819. monthCost: null,
  2820. cost: null,
  2821. departmentId: null,
  2822. salaryType: 0,
  2823. costApplyDate: util.formatDate.format(new Date(), "yyyy-MM-dd"),
  2824. inductionDate: util.formatDate.format(new Date(), "yyyy-MM-dd"),
  2825. position: "",
  2826. certJson: [],
  2827. plateMap: {},
  2828. plate1: null,
  2829. plate2: null,
  2830. plate3: null,
  2831. plate4: null,
  2832. plate5: null,
  2833. jobNumber:null,
  2834. onlyAuditOnce: 0,
  2835. };
  2836. this.title = this.$t('addorialstaff');
  2837. this.getUserCustomConfig();
  2838. // this.insertForm.plateMap['定义测试文本'] = '测试文本'
  2839. // console.log('insertForm',this.insertForm);
  2840. }
  2841. this.dialogVisible = true;
  2842. console.log(this.insertForm);
  2843. },
  2844. submitInsert() {
  2845. var form = {};
  2846. var ssR = this.upRepeat(this.insertForm.certJson);
  2847. var trs = true;
  2848. this.$refs.form12.validate((valid) => {
  2849. if (valid) {
  2850. this.submitLoading = true;
  2851. if (ssR) {
  2852. this.$message({
  2853. message: this.$t('repeat'),
  2854. type: "error",
  2855. });
  2856. this.submitLoading = false;
  2857. return false;
  2858. }
  2859. for (var s in this.insertForm.certJson) {
  2860. if (
  2861. !this.insertForm.certJson[s].certDate ||
  2862. !this.insertForm.certJson[s].certId
  2863. ) {
  2864. trs = false;
  2865. }
  2866. }
  2867. if (!trs) {
  2868. this.$message({
  2869. message: this.$t('certificateisincomplete'),
  2870. type: "error",
  2871. });
  2872. this.submitLoading = false;
  2873. return false;
  2874. }
  2875. form = {
  2876. name: this.insertForm.name,
  2877. phone: this.insertForm.phone,
  2878. // role: this.insertForm.role,
  2879. roleId: this.insertForm.roleId,
  2880. monthCost: this.insertForm.monthCost,
  2881. cost: this.insertForm.cost,
  2882. salaryType: this.insertForm.salaryType,
  2883. position: this.insertForm.position,
  2884. certJson: JSON.stringify(this.insertForm.certJson),
  2885. // certJson: this.insertForm.certJson
  2886. inductionDate: this.insertForm.inductionDate,
  2887. plate1: this.insertForm.plate1,
  2888. plate2: this.insertForm.plate2,
  2889. plate3: this.insertForm.plate3,
  2890. plate4: this.insertForm.plate4,
  2891. plate5: this.insertForm.plate5,
  2892. jobNumber: this.insertForm.jobNumber,
  2893. onlyAuditOnce: this.insertForm.onlyAuditOnce,
  2894. };
  2895. if (this.insertForm.isActive == 0) {
  2896. form.inactiveDate = this.insertForm.inactiveDate;
  2897. }
  2898. // for(let i=0;i<5;i++) {
  2899. // if(this.insertFormPlates[i]){
  2900. // form[this.suoying[i]] = this.insertFormPlates[i]
  2901. // }
  2902. // }
  2903. // console.log(form, 'form')
  2904. if (this.insertForm.id != null) {
  2905. form.id = this.insertForm.id;
  2906. }
  2907. if (this.insertForm.superiorId) {
  2908. form.superiorId = this.insertForm.superiorId;
  2909. }
  2910. if (this.insertForm.costApplyDate != null) {
  2911. form.costApplyDate = this.insertForm.costApplyDate;
  2912. }
  2913. if (this.insertForm.departmentId != null) {
  2914. form.departmentId =
  2915. this.insertForm.departmentId[
  2916. this.insertForm.departmentId.length - 1
  2917. ];
  2918. }
  2919. if(this.user.timeType.userWithMultiDept == 1) {
  2920. let list = []
  2921. if(this.insertForm.reportDeptIdsList && this.insertForm.reportDeptIdsList.length > 0) {
  2922. list = this.insertForm.reportDeptIdsList.map(item => item.id)
  2923. }
  2924. form.reportDeptIds = list.join(',')
  2925. }
  2926. if (!ssR && trs) {
  2927. this.http.post(
  2928. this.port.manage.insert,
  2929. form,
  2930. (res) => {
  2931. this.submitLoading = false;
  2932. if (res.code == "ok") {
  2933. this.$message({
  2934. message:
  2935. this.insertForm.id != null ? this.$t('xiu-gai') : this.$t('create') + this.$t('other.successful'),
  2936. type: "success",
  2937. });
  2938. this.dialogVisible = false;
  2939. this.getUser();
  2940. this.getUsers();
  2941. } else {
  2942. this.$message({
  2943. message: res.msg,
  2944. type: "error",
  2945. });
  2946. }
  2947. },
  2948. (error) => {
  2949. this.listLoading = false;
  2950. this.$message({
  2951. message: error,
  2952. type: "error",
  2953. });
  2954. }
  2955. );
  2956. }
  2957. }
  2958. });
  2959. // console.log(form, '提交的数据')
  2960. // return
  2961. // console.log(ssR, trs)
  2962. },
  2963. // 切换角色
  2964. switchRole(index) {
  2965. this.listLoading = true;
  2966. this.http.post(
  2967. this.port.manage.permission,
  2968. { id: this.list[index].id },
  2969. (res) => {
  2970. this.listLoading = false;
  2971. if (res.code == "ok") {
  2972. this.$message({
  2973. message: this.$t('switchingroles'),
  2974. type: "success",
  2975. });
  2976. //重新读取列表
  2977. this.page=1;
  2978. this.getUser();
  2979. } else {
  2980. this.$message({
  2981. message: res.msg,
  2982. type: "error",
  2983. });
  2984. }
  2985. },
  2986. (error) => {
  2987. this.listLoading = false;
  2988. this.$message({
  2989. message: error,
  2990. type: "error",
  2991. });
  2992. }
  2993. );
  2994. },
  2995. // 删除用户
  2996. setActive(item, isActive) {
  2997. var txt = isActive == 1 ? this.$t('enable') : this.$t('ting-yong');
  2998. // this.$confirm(this.$t('sureyouwantto') + txt + " " + item.name + this.$t('ma'), this.$t('zhang-hao') + txt, {
  2999. this.$confirm(this.$t('sureyouwantto') + txt + '该员工' + this.$t('ma'), this.$t('zhang-hao') + txt, {
  3000. confirmButtonText: this.$t('btn.determine'),
  3001. cancelButtonText: this.$t('btn.cancel'),
  3002. type: "warning",
  3003. })
  3004. .then(() => {
  3005. this.listLoading = true;
  3006. this.http.post(
  3007. "/user/setActive",
  3008. { id: item.id, isActive: isActive },
  3009. (res) => {
  3010. this.listLoading = false;
  3011. if (res.code == "ok") {
  3012. this.$message({
  3013. message: txt + this.$t('other.successful'),
  3014. type: "success",
  3015. });
  3016. //重新读取列表
  3017. this.getUser();
  3018. } else {
  3019. this.$message({
  3020. message: res.msg,
  3021. type: "error",
  3022. });
  3023. }
  3024. },
  3025. (error) => {
  3026. this.listLoading = false;
  3027. this.$message({
  3028. message: error,
  3029. type: "error",
  3030. });
  3031. }
  3032. );
  3033. })
  3034. .catch(() => {});
  3035. },
  3036. // 获取部门列表
  3037. getDepartment() {
  3038. this.http.post(
  3039. this.port.manage.depList,
  3040. {},
  3041. (res) => {
  3042. if (res.code == "ok") {
  3043. var list = res.data,
  3044. list1 = JSON.parse(JSON.stringify(res.data));
  3045. list.splice(0, 0, {
  3046. id: -1,
  3047. label: this.$t('lable.allStaff'),
  3048. });
  3049. list.push({
  3050. id: 0,
  3051. label: this.$t('lable.unassigned'),
  3052. });
  3053. this.data = list;
  3054. this.dataRepeat = JSON.parse(JSON.stringify(list))
  3055. console.log(list, "部门数据")
  3056. this.option = this.changeArr(list1);
  3057. } else {
  3058. this.$message({
  3059. message: res.msg,
  3060. type: "error",
  3061. });
  3062. }
  3063. },
  3064. (error) => {
  3065. this.$message({
  3066. message: error,
  3067. type: "error",
  3068. });
  3069. }
  3070. );
  3071. },
  3072. // 修改数组
  3073. changeArr(arr) {
  3074. for (var i = 0; i < arr.length; i++) {
  3075. if (arr[i].id != -1 && arr[i].id != 0) {
  3076. if (arr[i].children != null && arr[i].children.length > 0) {
  3077. arr[i].children = this.changeArr(arr[i].children);
  3078. }
  3079. arr[i].id && (arr[i].value = arr[i].id);
  3080. delete arr[i].id;
  3081. }
  3082. }
  3083. for (var i in arr) {
  3084. if (arr[i].id == -1 || arr[i].id == 0) {
  3085. arr.splice(i, 1);
  3086. }
  3087. }
  3088. return arr;
  3089. },
  3090. // 部门列表点击
  3091. handleNodeClick(data) {
  3092. this.theValues(data)
  3093. console.log(data)
  3094. if (this.depData == null || data.id != this.depData.id) {
  3095. this.depData = data;
  3096. this.page = 1;
  3097. this.getUser();
  3098. }
  3099. },
  3100. theValues(obj) {
  3101. if(obj.id != '-1') {
  3102. this.translation = '2'
  3103. } else {
  3104. this.translation = '1'
  3105. }
  3106. },
  3107. // 新增、修改部门
  3108. createDepartment(i) {
  3109. console.log(i, '看看')
  3110. setTimeout(() => {
  3111. var that = this;
  3112. if (i == -2) {
  3113. //创建子部门user
  3114. that.depForm = {
  3115. id: null,
  3116. name: null,
  3117. parentId: null,
  3118. managerId: null,
  3119. };
  3120. if (that.depData.id != -1 && that.depData.id != 0) {
  3121. that.depForm.parentId = that.depData.id;
  3122. }
  3123. that.depTitle = this.$t('subdepartment');
  3124. } else if (i == -1) {
  3125. //创建一级部门
  3126. that.depForm = {
  3127. id: null,
  3128. name: null,
  3129. parentId: null,
  3130. managerId: null,
  3131. };
  3132. that.depTitle = this.$t('addsubdepartment');
  3133. } else {
  3134. console.log(that.depData, '看看值')
  3135. if (that.depData.managerId == "null") {
  3136. that.depData.managerId = "";
  3137. }
  3138. if (that.depData.reportAuditUserid == "null") {
  3139. that.depData.reportAuditUserid = "";
  3140. }
  3141. that.depForm = {
  3142. id: that.depData.id,
  3143. name: that.depData.label,
  3144. parentId: that.depData.parentId,
  3145. managerId: that.depData.managerId,
  3146. reportAuditUserid: that.depData.reportAuditUserid,
  3147. pushToSap:that.depData.pushToSap
  3148. }
  3149. if(that.depData.otherManagerIds) {
  3150. if(Array.isArray(that.depData.otherManagerIds)) {
  3151. this.$set(that.depForm, 'otherManagerIds', that.depData.otherManagerIds)
  3152. } else {
  3153. this.$set(that.depForm, 'otherManagerIds', that.depData.otherManagerIds.split(','))
  3154. }
  3155. } else {
  3156. this.$set(that.depForm, 'otherManagerIds', [])
  3157. }
  3158. // console.log('点击编辑的时候', that.depData)
  3159. // if(that.depData.reportAuditUserid != null && that.depData.reportAuditUserid != "null" && that.depData.reportAuditUserid.length > 0) {
  3160. // that.depForm.reportAuditUserid = that.depData.reportAuditUserid
  3161. // }
  3162. console.log(that.depForm, '<===== 最后的值')
  3163. that.depTitle = this.$t('editorialdepartment');
  3164. }
  3165. that.departmentVisible = true;
  3166. });
  3167. // if(i == -2) {//创建子部门
  3168. // this.depForm = {
  3169. // id: null,
  3170. // name: null,
  3171. // parentId: null,
  3172. // managerId: null,
  3173. // }
  3174. // if(this.depData.id != -1 && this.depData.id != 0) {
  3175. // this.depForm.parentId = this.depData.id;
  3176. // }
  3177. // this.depTitle = "新增子部门";
  3178. // } else if(i == -1) {//创建一级部门
  3179. // this.depForm = {
  3180. // id: null,
  3181. // name: null,
  3182. // parentId: null,
  3183. // managerId: null,
  3184. // }
  3185. // this.depTitle = "新增部门";
  3186. // } else {
  3187. // if(this.depData.managerId == "null") {
  3188. // this.depData.managerId = ''
  3189. // }
  3190. // if(this.depData.reportAuditUserid == "null") {
  3191. // this.depData.reportAuditUserid = ''
  3192. // }
  3193. // this.depForm = {
  3194. // id: this.depData.id,
  3195. // name: this.depData.label,
  3196. // parentId: this.depData.parentId,
  3197. // managerId: this.depData.managerId,
  3198. // reportAuditUserid: this.depData.reportAuditUserid
  3199. // }
  3200. // // if(this.depData.reportAuditUserid != null && this.depData.reportAuditUserid != "null" && this.depData.reportAuditUserid.length > 0) {
  3201. // // this.depForm.reportAuditUserid = this.depData.reportAuditUserid
  3202. // // }
  3203. // this.depTitle = "编辑部门";
  3204. // }
  3205. // this.departmentVisible = true;
  3206. },
  3207. submitDepartment() {
  3208. this.$refs.depForm.validate((valid) => {
  3209. if (valid) {
  3210. var form = {
  3211. name: this.depForm.name,
  3212. };
  3213. if (this.depForm.id != null) {
  3214. form.id = this.depForm.id;
  3215. }
  3216. if (this.depForm.parentId != null) {
  3217. form.parentId = this.depForm.parentId;
  3218. }
  3219. if (this.depForm.managerId) {
  3220. form.managerId = this.depForm.managerId;
  3221. }
  3222. if (this.depForm.pushToSap) {
  3223. form.pushToSap = this.depForm.pushToSap;
  3224. }
  3225. // console.log(this.depForm)
  3226. if (this.depForm.reportAuditUserid && this.user.timeType.needDeptAudit) {
  3227. form.reportAuditUserid = this.depForm.reportAuditUserid;
  3228. }
  3229. // 其他负责人
  3230. if(this.depForm.otherManagerIds) {
  3231. form.otherManagerIds = this.depForm.otherManagerIds.toString();
  3232. }
  3233. this.http.post(
  3234. this.depForm.id == null
  3235. ? this.port.manage.add
  3236. : this.port.manage.edit,
  3237. form,
  3238. (res) => {
  3239. if (res.code == "ok") {
  3240. this.$message({
  3241. message: this.depForm.id == null ? this.$t('newsuccess') : this.$t('message.modifyTheSuccess'),
  3242. type: "success",
  3243. });
  3244. this.departmentVisible = false;
  3245. if (this.depForm.id != null) {
  3246. this.depData.label = form.name;
  3247. this.depData.managerId = form.managerId;
  3248. this.depData.otherManagerIds = form.otherManagerIds;
  3249. }
  3250. this.getDepartment();
  3251. } else {
  3252. this.$message({
  3253. message: res.msg,
  3254. type: "error",
  3255. });
  3256. }
  3257. },
  3258. (error) => {
  3259. this.listLoading = false;
  3260. this.$message({
  3261. message: error,
  3262. type: "error",
  3263. });
  3264. }
  3265. );
  3266. }
  3267. });
  3268. },
  3269. // 删除部门
  3270. deleteDep() {
  3271. var that = this;
  3272. var txtMsg = this.user.userNameNeedTranslate == '1'?'确定要删除该部门吗?':this.$t('deletethedepartment') + that.depData.label + this.$t('ma')
  3273. setTimeout(() => {
  3274. that
  3275. .$confirm(txtMsg, this.$t('deletethedepartmentdsa'), {
  3276. confirmButtonText: this.$t('btn.determine'),
  3277. cancelButtonText: this.$t('btn.cancel'),
  3278. type: "warning",
  3279. })
  3280. .then(() => {
  3281. that.listLoading = true;
  3282. that.http.post(
  3283. that.port.manage.del,
  3284. { id: that.depData.id },
  3285. (res) => {
  3286. that.listLoading = false;
  3287. if (res.code == "ok") {
  3288. that.$message({
  3289. message: this.$t('message.successfullyDeleted'),
  3290. type: "success",
  3291. });
  3292. that.depData = {
  3293. id: -1,
  3294. label: this.$t('lable.allStaff'),
  3295. };
  3296. that.getDepartment();
  3297. this.page=1;
  3298. that.getUser();
  3299. } else {
  3300. that.$message({
  3301. message: res.msg,
  3302. type: "error",
  3303. });
  3304. }
  3305. },
  3306. (error) => {
  3307. that.listLoading = false;
  3308. that.$message({
  3309. message: error,
  3310. type: "error",
  3311. });
  3312. }
  3313. );
  3314. })
  3315. .catch(() => {});
  3316. }, 100);
  3317. // this.$confirm( "确定要删除部门" + this.depData.label + "吗?", "删除部门", {
  3318. // confirmButtonText: "确定",
  3319. // cancelButtonText: "取消",
  3320. // type: "warning"
  3321. // })
  3322. // .then(() => {
  3323. // this.listLoading = true;
  3324. // this.http.post( this.port.manage.del, { id: this.depData.id },
  3325. // res => {
  3326. // this.listLoading = false;
  3327. // if (res.code == "ok") {
  3328. // this.$message({
  3329. // message: "删除成功",
  3330. // type: "success"
  3331. // });
  3332. // this.depData = {
  3333. // id: -1,
  3334. // label: '全部人员',
  3335. // }
  3336. // this.getDepartment();
  3337. // this.getUser();
  3338. // } else {
  3339. // this.$message({
  3340. // message: res.msg,
  3341. // type: "error"
  3342. // });
  3343. // }
  3344. // },
  3345. // error => {
  3346. // this.listLoading = false;
  3347. // this.$message({
  3348. // message: error,
  3349. // type: "error"
  3350. // });
  3351. // });
  3352. // })
  3353. // .catch(() => {});
  3354. },
  3355. // 关键搜索
  3356. searchList() {
  3357. // console.log(this.keyword)
  3358. console.log(this.nextCursor, '游标')
  3359. this.listLoading = true;
  3360. this.http.post(
  3361. this.port.manage.list,
  3362. {
  3363. departmentId: this.depData.id,
  3364. pageIndex: this.page,
  3365. pageSize: this.size,
  3366. keyword: this.keyword,
  3367. status: this.keyword?'':this.status,//有姓名关键字时,按照全部状态搜索
  3368. roleId: this.roleId,
  3369. cursor: this.nextCursor,
  3370. onlyDirect: this.onlyDirect ? "1" : "0",
  3371. matchingType: this.integer
  3372. },
  3373. (res) => {
  3374. this.listLoading = false;
  3375. if (res.code == "ok") {
  3376. this.list = res.data.records;
  3377. this.total = res.data.total;
  3378. this.nextCursor = res.data.nextCursor
  3379. } else {
  3380. this.$message({
  3381. message: res.msg,
  3382. type: "error",
  3383. });
  3384. }
  3385. },
  3386. (error) => {
  3387. this.listLoading = false;
  3388. this.$message({
  3389. message: error,
  3390. type: "error",
  3391. });
  3392. }
  3393. );
  3394. },
  3395. // 获取角色
  3396. acquireRole() {
  3397. // this.http.post('/permission/getFrontRoleList', {
  3398. this.http.post(
  3399. "/permission/getFrontRoleList",
  3400. {
  3401. companyId: this.user.companyId,
  3402. },
  3403. (res) => {
  3404. if (res.code == "ok") {
  3405. // console.log(res.data, '获取角色')
  3406. this.acquireRoleList = res.data;
  3407. var arr = [];
  3408. for (var i in res.data) {
  3409. if (res.data[i].rolename != this.$t('role.systemAdministrator')) {
  3410. arr.push(res.data[i]);
  3411. }
  3412. }
  3413. this.acquireRoleLists = arr;
  3414. } else {
  3415. this.$message({
  3416. message: res.msg,
  3417. type: "error",
  3418. });
  3419. }
  3420. },
  3421. (error) => {
  3422. this.$message({
  3423. message: error,
  3424. type: "error",
  3425. });
  3426. }
  3427. );
  3428. },
  3429. // 获取专业分类
  3430. getProfessional() {
  3431. this.http.post(
  3432. "/company-cert/list",
  3433. {},
  3434. (res) => {
  3435. if (res.code == "ok") {
  3436. this.managementTableData = res.data;
  3437. } else {
  3438. this.$message({
  3439. message: res.msg,
  3440. type: "error",
  3441. });
  3442. }
  3443. },
  3444. (error) => {
  3445. this.$message({
  3446. message: error,
  3447. type: "error",
  3448. });
  3449. }
  3450. );
  3451. },
  3452. addManagementDiologs() {
  3453. this.managementForm = { name: "" };
  3454. this.addManagementDiolog = true;
  3455. },
  3456. // 新增/编辑人员专业费雷
  3457. addManagementForm(formName) {
  3458. this.$refs[formName].validate((valid) => {
  3459. if (valid) {
  3460. this.http.post(
  3461. "/company-cert/addOrMod",
  3462. this.managementForm,
  3463. (res) => {
  3464. if (res.code == "ok") {
  3465. this.$message({
  3466. message: this.$t('operationissuccessful'),
  3467. type: "success",
  3468. });
  3469. this.getProfessional();
  3470. this.addManagementDiolog = false;
  3471. } else {
  3472. this.$message({
  3473. message: res.msg,
  3474. type: "error",
  3475. });
  3476. }
  3477. },
  3478. (error) => {
  3479. this.$message({
  3480. message: error,
  3481. type: "error",
  3482. });
  3483. }
  3484. );
  3485. } else {
  3486. // console.log('error submit!!');
  3487. return false;
  3488. }
  3489. });
  3490. },
  3491. // 编辑
  3492. editorManagementForm(item) {
  3493. this.managementForm = item;
  3494. this.addManagementDiolog = true;
  3495. },
  3496. // 删除专业
  3497. deteManagementForm(item) {
  3498. this.$confirm(
  3499. this.$t('operationmaycausedatalossAreyousuredeletethedata'),
  3500. this.$t('deletionofprofessionalcertificate'),
  3501. {
  3502. confirmButtonText: this.$t('btn.determine'),
  3503. cancelButtonText: this.$t('btn.cancel'),
  3504. type: "warning",
  3505. }
  3506. )
  3507. .then(() => {
  3508. this.http.post(
  3509. "/company-cert/delete",
  3510. {
  3511. id: item.id,
  3512. },
  3513. (res) => {
  3514. if (res.code == "ok") {
  3515. this.$message({
  3516. message: this.$t('operationissuccessful'),
  3517. type: "success",
  3518. });
  3519. this.getProfessional();
  3520. } else {
  3521. this.$message({
  3522. message: res.msg,
  3523. type: "error",
  3524. });
  3525. }
  3526. },
  3527. (error) => {
  3528. this.$message({
  3529. message: error,
  3530. type: "error",
  3531. });
  3532. }
  3533. );
  3534. })
  3535. .catch(() => {
  3536. this.$message({
  3537. type: "info",
  3538. message: this.$t('thedeletionhasbeencancelled'),
  3539. });
  3540. });
  3541. },
  3542. // 点击添加更多帧数
  3543. addCertificateList() {
  3544. var obj = {};
  3545. obj.certId = "";
  3546. obj.certName = "";
  3547. obj.certDate = "";
  3548. obj.id = "";
  3549. obj.userId = this.addUserId;
  3550. this.insertForm.certJson.push(obj);
  3551. },
  3552. // 选择专业帧数
  3553. changeManagement(is) {
  3554. var id = this.insertForm.certJson[is].certId;
  3555. for (var i in this.managementTableData) {
  3556. if (this.managementTableData[i].id == id) {
  3557. this.insertForm.certJson[is].certName =
  3558. this.managementTableData[i].name;
  3559. }
  3560. }
  3561. },
  3562. // 查重复
  3563. upRepeat(arr) {
  3564. var obj = {};
  3565. for (var i in arr) {
  3566. if (obj[arr[i].certName]) {
  3567. return true;
  3568. }
  3569. obj[arr[i].certName] = true;
  3570. }
  3571. return false;
  3572. },
  3573. // 删除帧数
  3574. deteFrames(i) {
  3575. this.insertForm.certJson.splice(i, 1);
  3576. },
  3577. getStaffCountMax() {
  3578. this.http.post(
  3579. "/company/getStaffCountMax",
  3580. {companyId:this.user.companyId},
  3581. (res) => {
  3582. if (res.code == "ok") {
  3583. this.user.company.staffCountMax = res.data;
  3584. }
  3585. },
  3586. (error) => {
  3587. this.$message({
  3588. message: error,
  3589. type: "error",
  3590. });
  3591. }
  3592. );
  3593. },
  3594. // // 获取企业微信的参数
  3595. // agentConfig() {
  3596. // var curUrl = location.href.split("#")[0];
  3597. // this.http.post("/wxcorp/getCorpWXConfig", {url: curUrl, token: this.user.id}, (res) => {
  3598. // if (res.code == "ok") {
  3599. // wx.config({
  3600. // beta: true,
  3601. // debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  3602. // appId: res.data.appid, // 必填,公众号的唯一标识
  3603. // timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  3604. // nonceStr: res.data.noncestr, // 必填,生成签名的随机串
  3605. // signature: res.data.sign, // 必填,签名,见附录1
  3606. // jsApiList: ['chooseImage','previewImage','uploadImage','downloadImage','previewFile','getLocation','agentConfig']
  3607. // });
  3608. // var that = this;
  3609. // wx.ready(function(){
  3610. // // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
  3611. // that.http.post("/wxcorp/getCorpWXAgentConfig", {url: curUrl, token: that.user.id}, (res) => {
  3612. // if (res.code == "ok") {
  3613. // console.log()
  3614. // wx.agentConfig({
  3615. // corpid: res.data.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
  3616. // agentid: res.data.agentid, // 必填,企业微信的应用id (e.g. 1000247)
  3617. // timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  3618. // nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  3619. // signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
  3620. // jsApiList: ['selectExternalContact'], //必填,传入需要使用的接口名称
  3621. // success: function (result) {
  3622. // console.log(result, '请求微信成功')
  3623. // console.log(window, 'window')
  3624. // // wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
  3625. // window.WWOpenData.bind(document.querySelector('TranslationOpenDataText'))
  3626. // },
  3627. // fail: function (res) {
  3628. // console.log('查看错误信息', res)
  3629. // if (res.errMsg.indexOf('function not exist') > -1) {
  3630. // alert('版本过低请升级')
  3631. // }
  3632. // },
  3633. // })
  3634. // }
  3635. // }, (error) => {
  3636. // console.log('查看错误信息' + res)
  3637. // if (error.errMsg.indexOf('function not exist') > -1) {
  3638. // alert('版本过低请升级')
  3639. // }
  3640. // })
  3641. // });
  3642. // }
  3643. // }, (error) => {
  3644. // console.log(error, '哦耶')
  3645. // })
  3646. // },
  3647. // 自定义组件事件
  3648. vueCasader(obj) {
  3649. if(obj.distinction == '1') {
  3650. let arr = []
  3651. arr.push(obj.id)
  3652. this.handleSelectionZzjgwillchange = arr
  3653. } else if(obj.distinction == '2') {
  3654. let arr = []
  3655. arr.push(obj.id)
  3656. this.insertForm.departmentId = arr
  3657. }
  3658. } ,
  3659. // 自定义组件事件
  3660. selectCal(obj) {
  3661. console.log(obj, '<=== 返回的数据')
  3662. if(obj.distinction == '4') {
  3663. let userList = obj.arrUserList || []
  3664. this.depForm.otherManagerIds = userList.map(item => item.id)
  3665. } else if(obj.distinction == '3') {
  3666. this.depForm.managerId = obj.id
  3667. } else if(obj.distinction == '5'){
  3668. this.depForm.reportAuditUserid = obj.id
  3669. } else if(obj.distinction == '12'){
  3670. this.toUserId = obj.id
  3671. } else if(obj.distinction == '22') {
  3672. console.log(obj, '返回')
  3673. this.moveReportUserId = obj.id
  3674. } else if(obj.distinction == '23') {
  3675. console.log(obj, '返回qwe')
  3676. this.transferActive.takeoverId = obj.id
  3677. } else if (obj.distinction == '6') {
  3678. this.insertForm.superiorId = obj.id;
  3679. }
  3680. },
  3681. // 企业微信可见范围设置
  3682. visibleRange() {
  3683. console.log('我点击可见范围设置')
  3684. wx.invoke('openAppManage', {}, function(res){
  3685. if(res.err_msg == "openAppManage:ok") {
  3686. // 调用成功
  3687. }
  3688. if(res.err_msg == "openAppManage:fail:no permission") {
  3689. // 调用人身份不符合
  3690. this.$message({message: '调用人身份不符合',type: "error"});
  3691. }
  3692. if(res.err_msg == "openAppManage:fail:unknown app") {
  3693. // 应用信息获取失败
  3694. this.$message({message: '应用信息获取失败',type: "error"});
  3695. }
  3696. if(res.err_msg == "openAppManage:fail:unsupported app type") {
  3697. // 应用类型不符合要求
  3698. this.$message({message: '应用类型不符合要求',type: "error"});
  3699. }
  3700. if(res.err_msg == "openAppManage:fail") {
  3701. // 其它错误
  3702. this.$message({message: '其它错误',type: "error"});
  3703. }
  3704. })
  3705. },
  3706. // 修正工时所属部门
  3707. workingHours() {
  3708. let obj = {
  3709. userIds: '',
  3710. startDate: '',
  3711. endDate: ''
  3712. }
  3713. if(this.workingHoursRadio == '2') {
  3714. obj.startDate = this.workingHoursDatas[0],
  3715. obj.endDate = this.workingHoursDatas[1]
  3716. }
  3717. let arr = []
  3718. for(var i in this.handleSelectionZzjgDate) {
  3719. arr.push(this.handleSelectionZzjgDate[i].id)
  3720. }
  3721. obj.userIds = arr.toString()
  3722. this.http.post('/report/correctWorkingTime', obj,
  3723. res => {
  3724. if (res.code == "ok") {
  3725. this.getUser();
  3726. this.workingHoursDialog = false
  3727. this.$message({message: '操作成功:'+res.data,type: "success"});
  3728. } else {
  3729. this.$message({message: res.msg,type: "error"});
  3730. }
  3731. },
  3732. error => {
  3733. this.$message({message: error,type: "error"});
  3734. });
  3735. },
  3736. // 拖拽时判定目标节点能否被放置
  3737. allowDrop(draggingNode, dropNode, type) {
  3738. // 判断他是否属于同一级
  3739. if(draggingNode.parent.id == dropNode.parent.id) {
  3740. // 禁止插入目标节点内
  3741. if(type != 'inner') {
  3742. return type
  3743. } else {
  3744. return false
  3745. }
  3746. } else {
  3747. return false
  3748. }
  3749. },
  3750. nodeDrop() {
  3751. console.log(this.data)
  3752. },
  3753. queding() {
  3754. console.log(JSON.stringify(this.data), '数据', this.data)
  3755. this.http.post('/department/sortList', {
  3756. list: JSON.stringify(this.data)
  3757. },
  3758. res => {
  3759. if (res.code == "ok") {
  3760. } else {
  3761. this.$message({message: res.msg,type: "error"});
  3762. }
  3763. },
  3764. error => {
  3765. this.$message({message: error,type: "error"});
  3766. });
  3767. },
  3768. getWhiteListAll(){
  3769. this.http.post('/department/listAllMemb',{
  3770. },res => {
  3771. if(res.code == 'ok'){
  3772. let list = res.data
  3773. // this.haveUsersList(list)
  3774. this.whiteListAll = JSON.parse(JSON.stringify(list))
  3775. this.whiteListAllTwo = JSON.parse(JSON.stringify(list))
  3776. }
  3777. },error => {})
  3778. },
  3779. // 企业微信选人搜索
  3780. echartDepartment() {
  3781. if(this.wxFilterText != '') {
  3782. this.http.post("/department/listAllMemb", {
  3783. keyword: this.wxFilterText,
  3784. cursor: ''
  3785. },
  3786. res => {
  3787. if (res.code == "ok") {
  3788. if(!Array.isArray(res.data)) {
  3789. let list = res.data.data
  3790. // this.haveUsersList(list)
  3791. this.whiteListAll = JSON.parse(JSON.stringify(list))
  3792. this.whiteListAllTwo = JSON.parse(JSON.stringify(list))
  3793. } else {
  3794. this.whiteListAll = []
  3795. }
  3796. }
  3797. },
  3798. error => { });
  3799. } else {
  3800. this.getWhiteListAll()
  3801. }
  3802. },
  3803. haveUsersList(list){
  3804. for (var i in list) {
  3805. if (list[i].children != null) {
  3806. this.haveUsersList(list[i].children);
  3807. }
  3808. if (list[i].userList != null) {
  3809. if (list[i].children == null) {
  3810. list[i].children = [];
  3811. }
  3812. list[i].userList.forEach(element => {
  3813. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  3814. list[i].children.push(obj);
  3815. });
  3816. }
  3817. }
  3818. },
  3819. specialHolidaysChange() {
  3820. let selectList = this.$refs.specialHolidaysTree.getCheckedNodes();
  3821. this.specialHolidaysDialog = false
  3822. this.insertForm.reportDeptIdsList = selectList
  3823. },
  3824. addFilldDepartment(item) {
  3825. this.filterText = ''
  3826. this.wxFilterText = ''
  3827. this.whiteListAll = JSON.parse(JSON.stringify(this.whiteListAllTwo));
  3828. this.specialHolidaysDialog = true
  3829. if(item) {
  3830. let key = item.map(item => item.id)
  3831. console.log(key, '<=== key')
  3832. setTimeout(() => {
  3833. this.$refs.specialHolidaysTree.setCheckedKeys(key)
  3834. }, 500)
  3835. }
  3836. },
  3837. handleDeptClose(index) {
  3838. this.insertForm.reportDeptIdsList.splice(index, 1)
  3839. },
  3840. filterNode(value, data) {
  3841. if (!value) return true;
  3842. return data.label.indexOf(value) !== -1;
  3843. },
  3844. },
  3845. mounted() {
  3846. this.deactiveDate = util.formatDate.format(new Date(), "yyyy-MM-dd");
  3847. this.ymonth = util.formatDate.format(new Date(), "yyyy-MM");
  3848. this.getDepartment();
  3849. this.getUser();
  3850. this.getCompanyTimeSetting();
  3851. this.getUsers();
  3852. this.acquireRole();
  3853. this.getProfessional();
  3854. this.getStaffCountMax();
  3855. if(this.user.dingdingUserid != null || this.user.corpwxUserid != null){
  3856. this.getRecordMsg()
  3857. }
  3858. if(this.user.corpwxUserid != null && this.user.timeType.saasSyncContact == 1) {
  3859. this.getWxManager()
  3860. }
  3861. this.statesPush();
  3862. this.getWhiteListAll()
  3863. // 获取企业微信的参数
  3864. // if(this.user.companyId == '1081' || this.user.companyId == '7') {
  3865. // this.agentConfig()
  3866. // }
  3867. },
  3868. };
  3869. </script>
  3870. <style scoped>
  3871. .deteee{
  3872. font-size: 18px;
  3873. margin-bottom: 20px;
  3874. }
  3875. .deteeeAce {
  3876. display: flex;
  3877. align-items: center;
  3878. }
  3879. .treeIons {
  3880. float: right;
  3881. position: absolute;
  3882. right: 20px;
  3883. top: 0;
  3884. }
  3885. .classwxName{
  3886. display: flex;
  3887. flex-wrap: wrap;
  3888. }
  3889. .classwxNameIon {
  3890. width: 20px;
  3891. }
  3892. .classwxNameIon img {
  3893. width: 20px;
  3894. }
  3895. .workingHours {
  3896. padding: 0 60px;
  3897. }
  3898. .workingHoursData {
  3899. margin-top: 30px;
  3900. }
  3901. .workingHoursSpan {
  3902. display: inline-block;
  3903. margin-right: 20px;
  3904. }
  3905. .line {
  3906. width: 30px;
  3907. /* height: 500px; */
  3908. background: #f2f2f2;
  3909. cursor: w-resize;
  3910. }
  3911. .box-father {
  3912. border: 8px solid #000;
  3913. }
  3914. .line-second {
  3915. width: 10px;
  3916. /* background: red; */
  3917. }
  3918. .flex {
  3919. display: flex;
  3920. width: 100%;
  3921. }
  3922. .box-left {
  3923. flex: 0 0 400px;
  3924. /* height: 600px; */
  3925. /* background: blue; */
  3926. }
  3927. .box-right {
  3928. /* height: 600px; */
  3929. /* background: green; */
  3930. flex: 1;
  3931. }
  3932. .box-postion {
  3933. width: 200px;
  3934. /* height: 400px; */
  3935. background: #ccc;
  3936. }
  3937. </style>
  3938. <style lang="scss" scoped>
  3939. .imgFlex {
  3940. display: flex;
  3941. align-items: center;
  3942. }
  3943. .imgFlex p {
  3944. width: 100%;
  3945. text-align: center;
  3946. }
  3947. .imgFlex div {
  3948. padding: 10px;
  3949. display: flex;
  3950. align-content: space-between;
  3951. flex-wrap: wrap;
  3952. height: 600px;
  3953. }
  3954. .imgBor {
  3955. border-right: 1px solid #666;
  3956. border-left: 1px solid #666;
  3957. }
  3958. .custom-tree-node {
  3959. flex: 1;
  3960. display: flex;
  3961. align-items: center;
  3962. justify-content: space-between;
  3963. font-size: 14px;
  3964. padding-right: 8px;
  3965. }
  3966. .left {
  3967. border-right: 1px solid #f2f2f2;
  3968. overflow: hidden;
  3969. .department {
  3970. background:#f2f2f2;
  3971. line-height: 60px;
  3972. color:#666;
  3973. padding:0 10px;
  3974. height:60px;
  3975. font-size: 15px;
  3976. div {
  3977. float: right;
  3978. color: #20a0ff;
  3979. font-size: 14px;
  3980. cursor: pointer;
  3981. }
  3982. }
  3983. .tree {
  3984. overflow: auto;
  3985. }
  3986. }
  3987. .nowTime {
  3988. height: 40px;
  3989. line-height: 40px;
  3990. font-size: 16px;
  3991. color: #20a0ff;
  3992. margin-left: 10px;
  3993. cursor: pointer;
  3994. i {
  3995. margin-right: 10px;
  3996. }
  3997. }
  3998. .none {
  3999. display: none;
  4000. }
  4001. .block {
  4002. display: block;
  4003. }
  4004. </style>
  4005. <style lang="scss">
  4006. .tree {
  4007. .el-tree-node__label {
  4008. overflow-x: hidden;
  4009. white-space: nowrap;
  4010. text-overflow: ellipsis;
  4011. }
  4012. }
  4013. .el-divider--horizontal {
  4014. margin: 0px;
  4015. background:#f3f3f3;
  4016. }
  4017. //全局的作用范围
  4018. .el-tree-node__content {
  4019. height:36px;
  4020. }
  4021. .zhaunye {
  4022. display: flex;
  4023. justify-content: space-between;
  4024. padding: 0 5px 0 10px;
  4025. }
  4026. .certificateList {
  4027. width: 98%;
  4028. box-sizing: border-box;
  4029. margin: 0 10px 0 10px;
  4030. border: 1px solid rgb(194, 194, 194);
  4031. min-height: 200px;
  4032. max-height: 200px;
  4033. overflow: auto;
  4034. padding: 10px;
  4035. }
  4036. .moreAl {
  4037. display: flex;
  4038. width: 100%;
  4039. justify-content: center;
  4040. }
  4041. .moreLiList {
  4042. display: flex;
  4043. margin-bottom: 10px;
  4044. }
  4045. .moreLiList div {
  4046. line-height: 30px;
  4047. }
  4048. .moreLiList span {
  4049. display: inline-block;
  4050. margin-right: 15px;
  4051. }
  4052. .poAub {
  4053. position: absolute;
  4054. right: 10px;
  4055. }
  4056. </style>