index.vue 137 KB

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