index.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item :label="$t('员工姓名')" prop="name">
  5. <el-input
  6. v-model="queryParams.name"
  7. :placeholder="$t('请输入') + $t('员工姓名')"
  8. clearable
  9. size="small"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item :label="$t('性别')" prop="sexs">
  14. <el-select v-model="queryParams.sex" :placeholder="$t('请选择') + $t('性别')" size="small">
  15. <el-option
  16. v-for="dict in sexOptions"
  17. :key="dict.dictValue"
  18. :label="dict.dictLabel"
  19. :value="dict.dictValue"
  20. />
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item :label="$t('部门')" prop="units">
  24. <el-select v-model="units" :placeholder="$t('请选择') + $t('部门')" clearable size="small" multiple>
  25. <el-option
  26. v-for="dict in unitOptions"
  27. :key="dict.dictValue"
  28. :label="dict.dictLabel"
  29. :value="dict.dictValue"
  30. />
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item :label="$t('班值')" prop="teams">
  34. <el-select v-model="teams" :placeholder="$t('请选择') + $t('班值')" clearable size="small" multiple>
  35. <el-option
  36. v-for="dict in teamOptions"
  37. :key="dict.dictValue"
  38. :label="dict.dictLabel"
  39. :value="dict.dictValue"
  40. />
  41. </el-select>
  42. </el-form-item>
  43. <el-form-item :label="$t('实际岗位')" prop="actualposts" label-width="200">
  44. <el-select v-model="actualposts" :placeholder="$t('请选择') + $t('实际岗位')" clearable size="small" multiple>
  45. <el-option
  46. v-for="dict in actualpostOptions"
  47. :key="dict.dictValue"
  48. :label="dict.dictValue+dict.dictLabel"
  49. :value="dict.dictValue"
  50. />
  51. </el-select>
  52. </el-form-item>
  53. <el-form-item :label="$t('学历')" prop="educations" label-width="200">
  54. <el-select v-model="educations" :placeholder="$t('请选择') + $t('学历')" clearable size="small" multiple>
  55. <el-option
  56. v-for="dict in educationOptions"
  57. :key="dict.dictValue"
  58. :label="dict.dictLabel"
  59. :value="dict.dictValue"
  60. />
  61. </el-select>
  62. </el-form-item>
  63. <el-form-item :label="$t('英语能力')" prop="enAbilitys" label-width="200">
  64. <el-select v-model="enAbilitys" :placeholder="$t('请选择') + $t('英语能力')" clearable size="small" multiple>
  65. <el-option
  66. v-for="dict in enAbilityOptions"
  67. :key="dict.dictValue"
  68. :label="dict.dictLabel"
  69. :value="dict.dictValue"
  70. />
  71. </el-select>
  72. </el-form-item>
  73. <el-form-item :label="$t('特殊职能')" prop="specialDuty" label-width="200">
  74. <el-select v-model="queryParams.specialDuty" :placeholder="$t('请选择') + $t('特殊职能')" clearable size="small">
  75. <el-option
  76. v-for="dict in specialDutyOptions"
  77. :key="dict.dictValue"
  78. :label="dict.dictLabel"
  79. :value="dict.dictValue"
  80. />
  81. </el-select>
  82. </el-form-item>
  83. <el-form-item>
  84. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
  85. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
  86. </el-form-item>
  87. </el-form>
  88. <el-row :gutter="10" class="mb8">
  89. <el-col :span="1.5">
  90. <el-button
  91. type="primary"
  92. icon="el-icon-plus"
  93. size="mini"
  94. @click="handleAdd"
  95. v-hasPermi="['plant:staffmgr:add']"
  96. >{{ $t('新增') }}</el-button>
  97. </el-col>
  98. <el-col :span="1.5">
  99. <el-button
  100. type="success"
  101. icon="el-icon-edit"
  102. size="mini"
  103. :disabled="single"
  104. @click="handleUpdate"
  105. v-hasPermi="['plant:staffmgr:edit']"
  106. >{{ $t('修改') }}</el-button>
  107. </el-col>
  108. <el-col :span="1.5">
  109. <el-button
  110. type="danger"
  111. icon="el-icon-delete"
  112. size="mini"
  113. :disabled="multiple"
  114. @click="handleDelete"
  115. v-hasPermi="['plant:staffmgr:remove']"
  116. >{{ $t('删除') }}</el-button>
  117. </el-col>
  118. <el-col :span="1.5">
  119. <el-button
  120. type="info"
  121. icon="el-icon-upload2"
  122. size="mini"
  123. @click="handleImport"
  124. v-hasPermi="['plant:staffmgr:edit']"
  125. >{{ $t('导入') }}</el-button>
  126. </el-col>
  127. <el-col :span="1.5">
  128. <el-button
  129. type="warning"
  130. icon="el-icon-download"
  131. size="mini"
  132. @click="handleExport"
  133. v-hasPermi="['plant:staffmgr:export']"
  134. >{{ $t('导出') }}</el-button>
  135. </el-col>
  136. <el-col :span="1.5">
  137. <el-button
  138. type="primary"
  139. icon="el-icon-s-data"
  140. size="mini"
  141. @click="handleData"
  142. >{{ $t('数据分析') }}</el-button>
  143. </el-col>
  144. <el-col :span="1.5">
  145. <el-button
  146. type="success"
  147. icon="el-icon-s-release"
  148. size="mini"
  149. @click="handleLeft"
  150. >{{ $t('离职名单') }}</el-button>
  151. </el-col>
  152. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  153. </el-row>
  154. <el-table v-loading="loading" :data="staffmgrList" @selection-change="handleSelectionChange" :height="clientHeight" border>
  155. <el-table-column type="selection" width="55" align="center" />
  156. <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :formatter="plantCodeFormat" />
  157. <el-table-column :label="$t('员工编号')" align="center" prop="staffid" :show-overflow-tooltip="true"/>
  158. <el-table-column :label="$t('员工姓名')" align="center" prop="name" :show-overflow-tooltip="true"/>
  159. <el-table-column :label="$t('性别')" align="center" prop="sex" :formatter="sexFormat" />
  160. <el-table-column :label="$t('出生日期')" align="center" prop="birthday" width="100">
  161. <template slot-scope="scope">
  162. <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
  163. </template>
  164. </el-table-column>
  165. <el-table-column :label="$t('部门')" align="center" prop="unit" :formatter="unitFormat" />
  166. <el-table-column :label="$t('班值')" align="center" prop="team" :formatter="teamFormat" />
  167. <el-table-column :label="$t('实际岗位')" align="center" prop="actualpost" width="120" :formatter="actualpostFormat" />
  168. <el-table-column :label="$t('联系方式')" align="center" prop="contact" width="150" :show-overflow-tooltip="true"/>
  169. <el-table-column :label="$t('学历')" align="center" prop="education" :formatter="educationFormat" />
  170. <el-table-column :label="$t('英语能力')" align="center" prop="enAbility" :formatter="enAbilityFormat" />
  171. <el-table-column :label="$t('邮箱')" align="center" prop="mail" width="230" :show-overflow-tooltip="true"/>
  172. <!--<el-table-column :label="$t('隐患查找数量')" align="center" prop="accidentNum" width="100" :show-overflow-tooltip="true"/>
  173. <el-table-column :label="$t('技能评估得分')" align="center" prop="skillScore" width="100" :show-overflow-tooltip="true"/>-->
  174. <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
  175. <!--<el-table-column label="特殊职能" align="center" prop="specialDuty" :formatter="specialDutyFormat" />-->
  176. <el-table-column :label="$t('操作')" align="center" fixed="right" width="220" class-name="small-padding fixed-width">
  177. <template slot-scope="scope">
  178. <el-button
  179. size="mini"
  180. type="text"
  181. icon="el-icon-edit"
  182. @click="handleUpdate(scope.row)"
  183. v-hasPermi="['plant:staffmgr:edit']"
  184. >{{ $t('修改') }}</el-button>
  185. <el-button
  186. size="mini"
  187. type="text"
  188. icon="el-icon-delete"
  189. @click="handleDelete(scope.row)"
  190. v-hasPermi="['plant:staffmgr:remove']"
  191. >{{ $t('删除') }}</el-button>
  192. <el-button
  193. size="mini"
  194. type="text"
  195. icon="el-icon-s-release"
  196. @click="handleLeftDelete(scope.row)"
  197. v-hasPermi="['plant:staffmgr:remove']"
  198. >{{ $t('离职') }}</el-button>
  199. <el-button
  200. size="mini"
  201. type="text"
  202. icon="el-icon-document"
  203. @click="handleDoc(scope.row)"
  204. v-hasPermi="['plant:staffmgr:edit']"
  205. >{{ $t('附件') }}</el-button>
  206. </template>
  207. </el-table-column>
  208. </el-table>
  209. <pagination
  210. v-show="total>0"
  211. :total="total"
  212. :page.sync="queryParams.pageNum"
  213. :limit.sync="queryParams.pageSize"
  214. @pagination="getList"
  215. />
  216. <!-- 添加或修改人员管理对话框 -->
  217. <el-dialog v-dialogDrag ref="dialog__wrapper" :title="title" :visible.sync="open" width="700px" append-to-body>
  218. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  219. <el-row>
  220. <el-col :span="12">
  221. <el-form-item :label="$t('装置名称')" prop="plantCode">
  222. <el-select v-model="form.plantCode" :placeholder="$t('请选择') + $t('装置名称')">
  223. <el-option
  224. v-for="dict in plantCodeOptions"
  225. :key="dict.dictValue"
  226. :label="dict.dictLabel"
  227. :value="dict.dictValue"
  228. ></el-option>
  229. </el-select>
  230. </el-form-item>
  231. </el-col>
  232. <el-col :span="12">
  233. <el-form-item :label="$t('员工编号')" prop="staffid">
  234. <el-input v-model="form.staffid" :placeholder="$t('请输入') + $t('员工编号')" />
  235. </el-form-item>
  236. </el-col>
  237. </el-row>
  238. <el-row>
  239. <el-col :span="12">
  240. <el-form-item :label="$t('员工姓名')" prop="name">
  241. <el-input v-model="form.name" :placeholder="$t('请输入') + $t('员工姓名')" />
  242. </el-form-item>
  243. </el-col>
  244. <el-col :span="12">
  245. <el-form-item :label="$t('性别')" prop="sex">
  246. <el-select v-model="form.sex" :placeholder="$t('请选择') + $t('性别')">
  247. <el-option
  248. v-for="dict in sexOptions"
  249. :key="dict.dictValue"
  250. :label="dict.dictLabel"
  251. :value="dict.dictValue"
  252. ></el-option>
  253. </el-select>
  254. </el-form-item>
  255. </el-col>
  256. </el-row>
  257. <el-row>
  258. <el-col :span="12">
  259. <el-form-item :label="$t('出生日期')" prop="birthday">
  260. <el-date-picker clearable size="small" style="width: 200px"
  261. v-model="form.birthday"
  262. type="date"
  263. value-format="yyyy-MM-dd"
  264. :placeholder="$t('请选择') + $t('出生日期')">
  265. </el-date-picker>
  266. </el-form-item>
  267. </el-col>
  268. <el-col :span="12">
  269. <el-form-item :label="$t('部门')" prop="unit">
  270. <el-select v-model="form.unit" :placeholder="$t('请选择') + $t('部门')">
  271. <el-option
  272. v-for="dict in unitOptions"
  273. :key="dict.dictValue"
  274. :label="dict.dictLabel"
  275. :value="dict.dictValue"
  276. ></el-option>
  277. </el-select>
  278. </el-form-item>
  279. </el-col>
  280. </el-row>
  281. <el-row>
  282. <el-col :span="12">
  283. <el-form-item :label="$t('班值')" prop="team">
  284. <el-select v-model="form.team" :placeholder="$t('请选择') + $t('班值')">
  285. <el-option
  286. v-for="dict in teamOptions"
  287. :key="dict.dictValue"
  288. :label="dict.dictLabel"
  289. :value="dict.dictValue"
  290. ></el-option>
  291. </el-select>
  292. </el-form-item>
  293. </el-col>
  294. <el-col :span="12">
  295. <el-form-item :label="$t('实际岗位')" prop="actualpost">
  296. <el-select v-model="form.actualpost" :placeholder="$t('请选择') + $t('实际岗位')">
  297. <el-option
  298. v-for="dict in actualpostOptions"
  299. :key="dict.dictValue"
  300. :label="dict.dictLabel"
  301. :value="dict.dictValue"
  302. ></el-option>
  303. </el-select>
  304. </el-form-item>
  305. </el-col>
  306. </el-row>
  307. <el-row>
  308. <el-col :span="12">
  309. <el-form-item :label="$t('联系方式')" prop="contact">
  310. <el-input v-model="form.contact" :placeholder="$t('请输入') + $t('联系方式')" />
  311. </el-form-item>
  312. </el-col>
  313. <el-col :span="12">
  314. <el-form-item :label="$t('学历')" prop="educations">
  315. <el-select v-model="form.education" :placeholder="$t('请选择') + $t('学历')">
  316. <el-option
  317. v-for="dict in educationOptions"
  318. :key="dict.dictValue"
  319. :label="dict.dictLabel"
  320. :value="dict.dictValue"
  321. ></el-option>
  322. </el-select>
  323. </el-form-item>
  324. </el-col>
  325. </el-row>
  326. <el-row>
  327. <el-col :span="12">
  328. <el-form-item :label="$t('英语能力')" prop="enAbility">
  329. <el-select v-model="form.enAbility" :placeholder="$t('请选择') + $t('英语能力')">
  330. <el-option
  331. v-for="dict in enAbilityOptions"
  332. :key="dict.dictValue"
  333. :label="dict.dictLabel"
  334. :value="dict.dictValue"
  335. ></el-option>
  336. </el-select>
  337. </el-form-item>
  338. </el-col>
  339. <el-col :span="12">
  340. <el-form-item :label="$t('邮箱')" prop="mail">
  341. <el-input v-model="form.mail" :placeholder="$t('请输入') + $t('邮箱')" />
  342. </el-form-item>
  343. </el-col>
  344. </el-row>
  345. <el-row>
  346. <el-col :span="12">
  347. <el-form-item :label="$t('上级领导')" prop="pId">
  348. <treeselect v-model="form.pId" :options="pIdOptions" :normalizer="normalizer" :placeholder="$t('请选择') + $t('上级领导')" />
  349. </el-form-item>
  350. </el-col>
  351. <el-col :span="12">
  352. <el-form-item :label="$t('归属部门')" prop="deptId">
  353. <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择') + $t('归属部门')" />
  354. </el-form-item>
  355. </el-col>
  356. </el-row>
  357. <el-row>
  358. <el-col :span="12">
  359. <el-form-item :label="$t('备注')" prop="remarks">
  360. <el-input v-model="form.remarks" :placeholder="$t('请输入') + $t('备注')" type="textarea" />
  361. </el-form-item>
  362. </el-col>
  363. <el-col :span="12">
  364. <!--<el-form-item label="证件照" prop="photo">
  365. <el-upload
  366. ref="photo"
  367. class="avatar-uploader"
  368. :headers="photo.headers"
  369. :action="photo.url + '?pType=' + photo.pType + '&pId=' + photo.pId"
  370. :show-file-list="false"
  371. :on-progress="handleAvatarProgress"
  372. :on-success="handleAvatarSuccess"
  373. :auto-upload="false"
  374. >
  375. <img v-if="form.photo" :src="photoUrl" class="avatar">
  376. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  377. </el-upload>
  378. </el-form-item>-->
  379. <el-form-item :label="$t('证件照')" prop="photo" v-if="notPhoto === true">
  380. <el-upload
  381. ref="photo"
  382. :headers="photo.headers"
  383. :action="photo.url + '?pType=' + photo.pType + '&pId=' + photo.pId"
  384. :show-file-list="false"
  385. :on-success="handleAvatarSuccess"
  386. list-type="picture-card">
  387. <img v-if="photoUrl" :src="photoUrl" class="avatar">
  388. <i v-else class="el-icon-plus "></i>
  389. </el-upload>
  390. <el-dialog v-dialogDrag :visible.sync="dialogVisible" append-to-body>
  391. <img width="100%" :src="dialogImageUrl" alt="">
  392. </el-dialog>
  393. </el-form-item>
  394. </el-col>
  395. </el-row>
  396. <el-row>
  397. <el-col :span="12">
  398. <el-form-item :label="$t('特殊职能')" prop="specialDuty">
  399. <el-select v-model="specialDutys" multiple :placeholder="$t('请选择') + $t('特殊职能')">
  400. <el-option
  401. v-for="dict in specialDutyOptions"
  402. :key="dict.dictValue"
  403. :label="dict.dictLabel"
  404. :value="dict.dictValue"
  405. ></el-option>
  406. </el-select>
  407. </el-form-item>
  408. </el-col>
  409. <el-col :span="12" v-if="form.delFlag == 9">
  410. <el-form-item :label="$t('离职日期')" prop="birthday">
  411. <el-date-picker clearable size="small" style="width: 200px"
  412. v-model="form.leftDate"
  413. type="date"
  414. value-format="yyyy-MM-dd"
  415. :placeholder="$t('请选择') + $t('离职日期')">
  416. </el-date-picker>
  417. </el-form-item>
  418. </el-col>
  419. </el-row>
  420. </el-form>
  421. <div slot="footer" class="dialog-footer">
  422. <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
  423. <el-button @click="cancel">{{ $t('取 消') }}</el-button>
  424. </div>
  425. </el-dialog>
  426. <!-- 用户导入对话框 -->
  427. <el-dialog v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
  428. <el-upload
  429. ref="upload"
  430. :limit="1"
  431. accept=".xlsx, .xls"
  432. :headers="upload.headers"
  433. :action="upload.url"
  434. :disabled="upload.isUploading"
  435. :on-progress="handleFileUploadProgress"
  436. :on-success="handleFileSuccess"
  437. :auto-upload="false"
  438. drag
  439. >
  440. <i class="el-icon-upload"></i>
  441. <div class="el-upload__text">
  442. {{ $t('将文件拖到此处,或') }}
  443. <em>{{ $t('点击上传') }}</em>
  444. </div>
  445. <div class="el-upload__tip" slot="tip">
  446. <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
  447. <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
  448. </div>
  449. <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
  450. <input name="type" :value="upload.type" hidden />
  451. </form>
  452. <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
  453. </el-upload>
  454. <div slot="footer" class="dialog-footer">
  455. <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>
  456. <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
  457. </div>
  458. </el-dialog>
  459. <!-- 报告附件对话框 -->
  460. <el-dialog v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
  461. <el-upload
  462. ref="doc"
  463. :limit="50"
  464. :headers="doc.headers"
  465. :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
  466. :disabled="doc.isUploading"
  467. :on-progress="handleFileDocProgress"
  468. :on-success="handleFileDocSuccess"
  469. :auto-upload="true"
  470. drag
  471. >
  472. <i class="el-icon-upload"></i>
  473. <div class="el-upload__text">
  474. {{ $t('将文件拖到此处,或') }}
  475. <em>{{ $t('点击上传') }}</em>
  476. </div>
  477. </el-upload>
  478. <el-table :data="doc.commonfileList" border>
  479. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  480. <template slot-scope="scope">
  481. <a class="link-type" @click="handleDownload(scope.row)">
  482. <span>{{ scope.row.fileName }}</span>
  483. </a>
  484. </template>
  485. </el-table-column>
  486. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  487. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  488. <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
  489. <template slot-scope="scope">
  490. <el-button
  491. v-if="scope.row.fileName.endsWith('pdf')"
  492. size="mini"
  493. type="text"
  494. icon="el-icon-view"
  495. @click="handleSee(scope.row)"
  496. >{{ $t('预览') }}</el-button>
  497. <el-button
  498. size="mini"
  499. type="text"
  500. icon="el-icon-download"
  501. @click="handleDownload(scope.row)"
  502. >{{ $t('下载') }}</el-button>
  503. <el-button
  504. size="mini"
  505. type="text"
  506. icon="el-icon-delete"
  507. @click="handleDeleteDoc(scope.row)"
  508. >{{ $t('删除') }}</el-button>
  509. </template>
  510. </el-table-column>
  511. </el-table>
  512. <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
  513. <div style="margin-top: -60px;float: right;margin-right: 40px;">
  514. <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
  515. <div style="margin-top: -30px">
  516. <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
  517. </div>
  518. </el-dialog>
  519. <div slot="footer" class="dialog-footer">
  520. <!-- <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
  521. <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
  522. </div>
  523. </el-dialog>
  524. <!-- 离职人员对话框 -->
  525. <el-dialog v-dialogDrag :title="left.title" :visible.sync="left.open" width="700px" append-to-body>
  526. <el-table :data="left.staffmgrList" border>
  527. <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :formatter="plantCodeFormat" />
  528. <el-table-column :label="$t('员工编号')" align="center" prop="staffid" :show-overflow-tooltip="true"/>
  529. <el-table-column :label="$t('员工姓名')" align="center" prop="name" :show-overflow-tooltip="true"/>
  530. <el-table-column :label="$t('离职日期')" align="center" prop="leftDate" :show-overflow-tooltip="true">
  531. <template slot-scope="scope">
  532. <span>{{ parseTime(scope.row.leftDate, '{y}-{m}-{d}') }}</span>
  533. </template>
  534. </el-table-column>
  535. <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
  536. <template slot-scope="scope">
  537. <el-button
  538. size="mini"
  539. type="text"
  540. icon="el-icon-edit"
  541. @click="handleUpdate(scope.row)"
  542. v-hasPermi="['plant:staffmgr:edit']"
  543. >{{ $t('修改') }}</el-button>
  544. <el-button
  545. size="mini"
  546. type="text"
  547. @click="handleReLeft(scope.row)"
  548. >{{ $t('复职') }}</el-button>
  549. </template>
  550. </el-table-column>
  551. </el-table>
  552. <div slot="footer" class="dialog-footer">
  553. <!-- <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
  554. <el-button @click="left.open = false">{{ $t('返 回') }}</el-button>
  555. </div>
  556. </el-dialog>
  557. <el-drawer
  558. :title="$t('数据分析')"
  559. size="600px"
  560. :visible.sync="drawer"
  561. :direction="direction">
  562. <el-row>
  563. <el-col>
  564. <el-card class="box-card" shadow="hover">
  565. <div slot="header" class="clearfix">
  566. <span>{{ $t('学历统计') }}</span>
  567. </div>
  568. <div class="text item">
  569. <edu-chart> </edu-chart>
  570. </div>
  571. </el-card>
  572. </el-col>
  573. </el-row>
  574. <el-row>
  575. <el-col>
  576. <el-card class="box-card" shadow="hover">
  577. <div slot="header" class="clearfix">
  578. <span>{{ $t('英语统计') }}</span>
  579. </div>
  580. <div class="text item">
  581. <eng-chart> </eng-chart>
  582. </div>
  583. </el-card>
  584. </el-col>
  585. </el-row>
  586. <el-row>
  587. <el-col>
  588. <el-card class="box-card" shadow="hover">
  589. <div slot="header" class="clearfix">
  590. <span>{{ $t('班值统计') }}</span>
  591. </div>
  592. <div class="text item">
  593. <team-chart> </team-chart>
  594. </div>
  595. </el-card>
  596. </el-col>
  597. </el-row>
  598. </el-drawer>
  599. </div>
  600. </template>
  601. <script>
  602. import { listStaffmgr, listpIdStaffmgr, listLeftStaffmgr, getStaffmgr, delStaffmgr, delLeftStaffmgr,reLeftStaffmgr ,addStaffmgr, updateStaffmgr, exportStaffmgr } from "@/api/plant/staffmgr";
  603. import { allFileList, listCommonfile, getCommonfile, delCommonfile, addCommonfile, updateCommonfile, exportCommonfile} from "@/api/common/commonfile";
  604. import { treeselect } from "@/api/system/dept";
  605. import { getToken } from "@/utils/auth";
  606. import Treeselect from "@riophae/vue-treeselect";
  607. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  608. import EduChart from "./eduChart";
  609. import EngChart from "./engChart";
  610. import TeamChart from "./teamChart";
  611. export default {
  612. name: "Staffmgr",
  613. components: {TeamChart, EngChart, EduChart, Treeselect },
  614. data() {
  615. return {
  616. drawer: false,
  617. direction: 'rtl',
  618. // 遮罩层
  619. loading: true,
  620. // 选中数组
  621. ids: [],
  622. // 非单个禁用
  623. single: true,
  624. // 非多个禁用
  625. multiple: true,
  626. // 显示搜索条件
  627. showSearch: false,
  628. // 总条数
  629. total: 0,
  630. // 人员管理表格数据
  631. staffmgrList: [],
  632. //目标措施树选项
  633. pIdOptions: [],
  634. // 弹出层标题
  635. title: "",
  636. // 部门树选项
  637. deptOptions: undefined,
  638. clientHeight:300,
  639. // 是否显示弹出层
  640. open: false,
  641. // 装置名称字典
  642. plantCodeOptions: [],
  643. // 性别字典
  644. sexOptions: [],
  645. // 部门字典
  646. unitOptions: [],
  647. // 班值字典
  648. teamOptions: [],
  649. // 实际岗位字典
  650. actualpostOptions: [],
  651. // 学历字典
  652. educationOptions: [],
  653. // 英语能力字典
  654. enAbilityOptions: [],
  655. // 特殊职能字典
  656. specialDutyOptions: [],
  657. //照片url
  658. photoUrl: '',
  659. //新增不可上传照片
  660. notPhoto: false,
  661. // 用户导入参数
  662. upload: {
  663. downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
  664. //下载模板类型
  665. type: "staffmgr",
  666. // 是否显示弹出层(用户导入)
  667. open: false,
  668. // 弹出层标题(用户导入)
  669. title: "",
  670. // 是否禁用上传
  671. isUploading: false,
  672. // 是否更新已经存在的用户数据
  673. updateSupport: 0,
  674. // 设置上传的请求头部
  675. headers: { Authorization: "Bearer " + getToken() },
  676. // 上传的地址
  677. url: process.env.VUE_APP_BASE_API + "/plant/staffmgr/importData"
  678. },
  679. // 报告附件参数
  680. doc: {
  681. file: "",
  682. // 是否显示弹出层(报告附件)
  683. open: false,
  684. // 弹出层标题(报告附件)
  685. title: "",
  686. // 是否禁用上传
  687. isUploading: false,
  688. // 是否更新已经存在的用户数据
  689. updateSupport: 0,
  690. // 报告附件上传位置编号
  691. ids: 0,
  692. // 设置上传的请求头部
  693. headers: { Authorization: "Bearer " + getToken() },
  694. // 上传的地址
  695. url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
  696. commonfileList: null,
  697. queryParams: {
  698. pId: null,
  699. pType: 'staffmgr'
  700. },
  701. pType: 'staffmgr',
  702. pId: null
  703. },
  704. // 人员证件照参数
  705. photo: {
  706. file: "",
  707. // 报告附件上传位置编号
  708. ids: 0,
  709. // 设置上传的请求头部
  710. headers: { Authorization: "Bearer " + getToken() },
  711. // 上传的地址
  712. url: process.env.VUE_APP_BASE_API + "/plant/staffmgr/uploadPhoto",
  713. pType: 'staffmgrPhoto',
  714. pId: null
  715. },
  716. //证件照回显
  717. dialogImageUrl: '',
  718. dialogVisible: false,
  719. pdf : {
  720. title: '',
  721. pdfUrl: '',
  722. numPages: null,
  723. open: false,
  724. pageNum: 1,
  725. pageTotalNum: 1,
  726. loadedRatio: 0,
  727. },
  728. // 离职人员
  729. left: {
  730. file: "",
  731. // 是否显示弹出层(报告附件)
  732. open: false,
  733. // 弹出层标题(报告附件)
  734. title: "",
  735. staffmgrList: []
  736. },
  737. // 查询参数
  738. queryParams: {
  739. pageNum: 1,
  740. pageSize: 20,
  741. name: null,
  742. sexs: null,
  743. sex: [],
  744. unit: null,
  745. team: null,
  746. actualpost: null,
  747. education: null,
  748. enAbility: null,
  749. educations: null,
  750. units: null,
  751. teams: null,
  752. actualposts: null,
  753. enAbilitys: null,
  754. photo: null,
  755. specialDuty: null
  756. },
  757. querypIdParams: {
  758. units: '10,18',
  759. },
  760. educations: [],
  761. units: [],
  762. teams: [],
  763. actualposts: [],
  764. enAbilitys: [],
  765. specialDutys: [],
  766. // 表单参数
  767. form: {},
  768. // 表单校验
  769. rules: {
  770. plantCode: [
  771. { required: true, message: this.$t('装置名称') + this.$t('不能为空'), trigger: "change" }
  772. ],
  773. staffid: [
  774. { required: true, message: this.$t('员工编号') + this.$t('不能为空'), trigger: "blur" }
  775. ],
  776. name: [
  777. { required: true, message: this.$t('员工姓名') + this.$t('不能为空'), trigger: "blur" }
  778. ],
  779. sex: [
  780. { required: true, message: this.$t('性别') + this.$t('不能为空'), trigger: "change" }
  781. ],
  782. unit: [
  783. { required: true, message: this.$t('部门') + this.$t('不能为空'), trigger: "change" }
  784. ],
  785. team: [
  786. { required: true, message: this.$t('班值') + this.$t('不能为空'), trigger: "change" }
  787. ],
  788. actualpost: [
  789. { required: true, message: this.$t('实际岗位') + this.$t('不能为空'), trigger: "change" }
  790. ],
  791. pId: [
  792. { required: true, message: this.$t('上级领导') + this.$t('不能为空'), trigger: "change" }
  793. ],
  794. deptId: [
  795. { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
  796. ],
  797. }
  798. };
  799. },
  800. watch: {
  801. // 根据名称筛选部门树
  802. deptName(val) {
  803. this.$refs.tree.filter(val);
  804. }
  805. },
  806. created() {
  807. //设置表格高度对应屏幕高度
  808. this.$nextTick(() => {
  809. this.clientHeight = (document.body.clientHeight - 80) * 0.8
  810. })
  811. this.getList();
  812. this.getpIdTreeselect();
  813. this.getTreeselect();
  814. this.getDicts("PLANT_DIVIDE").then(response => {
  815. this.plantCodeOptions = response.data;
  816. });
  817. this.getDicts("sys_user_sex").then(response => {
  818. this.sexOptions = response.data;
  819. });
  820. this.getDicts("STAFF_UNIT").then(response => {
  821. this.unitOptions = response.data;
  822. });
  823. this.getDicts("TEAM_DIVIDE").then(response => {
  824. this.teamOptions = response.data;
  825. });
  826. this.getDicts("ACTUALPOST").then(response => {
  827. this.actualpostOptions = response.data;
  828. });
  829. this.getDicts("EDUCATION").then(response => {
  830. this.educationOptions = response.data;
  831. });
  832. this.getDicts("ENGLISHABILITY").then(response => {
  833. this.enAbilityOptions = response.data;
  834. });
  835. this.getDicts("SPECIAL_DUTY").then(response => {
  836. this.specialDutyOptions = response.data;
  837. });
  838. },
  839. methods: {
  840. /** 查询人员管理列表 */
  841. getList() {
  842. this.loading = true;
  843. this.queryParams.educations = this.educations.join()
  844. this.queryParams.units = this.units.join()
  845. this.queryParams.teams = this.teams.join()
  846. this.queryParams.actualposts = this.actualposts.join()
  847. this.queryParams.enAbilitys = this.enAbilitys.join()
  848. listStaffmgr(this.queryParams).then(response => {
  849. this.staffmgrList = response.rows;
  850. this.total = response.total;
  851. this.loading = false;
  852. });
  853. },
  854. /** 查询部门下拉树结构 */
  855. getTreeselect() {
  856. treeselect().then(response => {
  857. this.deptOptions = response.data;
  858. });
  859. },
  860. /** 转换目标录入数据结构 */
  861. normalizer(node) {
  862. if (node.children && !node.children.length) {
  863. delete node.children;
  864. }
  865. return {
  866. id: node.id,
  867. label: node.name,
  868. children: node.children
  869. };
  870. },
  871. // 装置名称字典翻译
  872. plantCodeFormat(row, column) {
  873. return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
  874. },
  875. // 性别字典翻译
  876. sexFormat(row, column) {
  877. return this.selectDictLabel(this.sexOptions, row.sex);
  878. },
  879. // 部门字典翻译
  880. unitFormat(row, column) {
  881. return this.selectDictLabel(this.unitOptions, row.unit);
  882. },
  883. // 班值字典翻译
  884. teamFormat(row, column) {
  885. return this.selectDictLabel(this.teamOptions, row.team);
  886. },
  887. // 实际岗位字典翻译
  888. actualpostFormat(row, column) {
  889. return this.selectDictLabel(this.actualpostOptions, row.actualpost);
  890. },
  891. // 学历字典翻译
  892. educationFormat(row, column) {
  893. return this.selectDictLabel(this.educationOptions, row.education);
  894. },
  895. // 英语能力字典翻译
  896. enAbilityFormat(row, column) {
  897. return this.selectDictLabel(this.enAbilityOptions, row.enAbility);
  898. },
  899. // 特殊职能字典翻译
  900. specialDutyFormat(row, column) {
  901. return this.selectDictLabel(this.specialDutyOptions, row.specialDuty);
  902. },
  903. /** 查询列表下拉树结构 */
  904. getpIdTreeselect() {
  905. listpIdStaffmgr(this.querypIdParams).then(response => {
  906. this.pIdOptions = [];
  907. const data = { id: 0, name: this.$t('顶级节点'), children: [] };
  908. data.children = this.handleTree(response.data, "id", "pId");
  909. this.pIdOptions.push(data);
  910. });
  911. },
  912. // 取消按钮
  913. cancel() {
  914. this.open = false;
  915. this.reset();
  916. },
  917. // 表单重置
  918. reset() {
  919. this.photoUrl= '';
  920. this.specialDutys = [];
  921. this.form = {
  922. id: null,
  923. plantCode: null,
  924. staffid: null,
  925. name: null,
  926. sex: null,
  927. birthday: null,
  928. unit: null,
  929. team: null,
  930. actualpost: null,
  931. contact: null,
  932. education: null,
  933. enAbility: null,
  934. accidentNum: null,
  935. mail: null,
  936. delFlag: null,
  937. createrCode: null,
  938. photoUrl: '',
  939. createdate: null,
  940. updaterCode: null,
  941. updatedate: null,
  942. deptId: null,
  943. skillScore: null,
  944. remarks: null,
  945. photo: null,
  946. pId: null,
  947. specialDuty: null
  948. };
  949. this.resetForm("form");
  950. },
  951. /** 搜索按钮操作 */
  952. handleQuery() {
  953. this.queryParams.pageNum = 1;
  954. this.getList();
  955. },
  956. /** 重置按钮操作 */
  957. resetQuery() {
  958. this.resetForm("queryForm");
  959. this.educations = []
  960. this.units = []
  961. this.teams = []
  962. this.actualposts = []
  963. this.enAbilitys = []
  964. this.handleQuery();
  965. },
  966. // 多选框选中数据
  967. handleSelectionChange(selection) {
  968. this.ids = selection.map(item => item.id)
  969. this.single = selection.length!==1
  970. this.multiple = !selection.length
  971. },
  972. /** 新增按钮操作 */
  973. handleAdd() {
  974. this.reset();
  975. this.open = true;
  976. this.notPhoto = false;
  977. this.title = this.$t('新增') + " " + this.$t('人员管理');
  978. },
  979. /** 修改按钮操作 */
  980. handleUpdate(row) {
  981. this.reset();
  982. const id = row.id || this.ids
  983. getStaffmgr(id).then(response => {
  984. this.form = response.data;
  985. if (response.data.photo) {
  986. this.photoUrl = process.env.VUE_APP_BASE_API + response.data.photo;
  987. }
  988. if (response.data.specialDuty) {
  989. this.specialDutys = response.data.specialDuty.split(',');
  990. }else {
  991. this.specialDutys = [];
  992. }
  993. this.open = true;
  994. this.notPhoto = true;
  995. this.title = this.$t('修改') + this.$t('人员管理');
  996. });
  997. this.photo.pId = row.id;
  998. },
  999. /** 提交按钮 */
  1000. submitForm() {
  1001. this.$refs["form"].validate(valid => {
  1002. if (valid) {
  1003. /*this.$refs.photo.submit();*/
  1004. this.form.specialDuty = this.specialDutys.join();
  1005. if (this.form.id != null) {
  1006. updateStaffmgr(this.form).then(response => {
  1007. this.msgSuccess(this.$t('修改成功'));
  1008. this.open = false;
  1009. this.getList();
  1010. });
  1011. } else {
  1012. addStaffmgr(this.form).then(response => {
  1013. this.msgSuccess(this.$t('新增成功'));
  1014. this.open = false;
  1015. this.getList();
  1016. });
  1017. }
  1018. }
  1019. });
  1020. },
  1021. /** 删除按钮操作 */
  1022. handleDelete(row) {
  1023. const ids = row.id || this.ids;
  1024. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  1025. confirmButtonText: this.$t('确定'),
  1026. cancelButtonText: this.$t('取消'),
  1027. type: "warning"
  1028. }).then(function() {
  1029. return delStaffmgr(ids);
  1030. }).then(() => {
  1031. this.getList();
  1032. this.msgSuccess(this.$t('删除成功'));
  1033. })
  1034. },
  1035. /** 删除按钮操作 */
  1036. handleLeftDelete(row) {
  1037. const ids = row.id;
  1038. this.$confirm(this.$t('是否确认离职?'), this.$t('警告'), {
  1039. confirmButtonText: this.$t('确定'),
  1040. cancelButtonText: this.$t('取消'),
  1041. type: "warning"
  1042. }).then(function() {
  1043. return delLeftStaffmgr(ids);
  1044. }).then(() => {
  1045. this.getList();
  1046. this.msgSuccess(this.$t('离职成功'));
  1047. })
  1048. },
  1049. /** 导出按钮操作 */
  1050. handleExport() {
  1051. const queryParams = this.queryParams;
  1052. this.$confirm(this.$t('是否确认导出所有人员管理数据项?'), this.$t('提示'), {
  1053. confirmButtonText: this.$t('确定'),
  1054. cancelButtonText: this.$t('取消'),
  1055. type: "warning"
  1056. }).then(function() {
  1057. return exportStaffmgr(queryParams);
  1058. }).then(response => {
  1059. this.download(response.msg);
  1060. })
  1061. },
  1062. /** 导入按钮操作 */
  1063. handleImport() {
  1064. this.upload.title = this.$t('用户导入');
  1065. this.upload.open = true;
  1066. },
  1067. /** 下载模板操作 */
  1068. importTemplate() {
  1069. this.$refs['downloadFileForm'].submit()
  1070. },
  1071. // 文件上传中处理
  1072. handleFileUploadProgress(event, file, fileList) {
  1073. this.upload.isUploading = true;
  1074. },
  1075. // 文件上传成功处理
  1076. handleFileSuccess(response, file, fileList) {
  1077. this.upload.open = false;
  1078. this.upload.isUploading = false;
  1079. this.$refs.upload.clearFiles();
  1080. if (response.data[0] != null) {
  1081. this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
  1082. }else {
  1083. this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
  1084. }
  1085. this.getList();
  1086. },
  1087. // 提交上传文件
  1088. submitFileForm() {
  1089. this.$refs.upload.submit();
  1090. },
  1091. /** 报告附件按钮操作 */
  1092. handleDoc(row) {
  1093. this.doc.id = row.id;
  1094. this.doc.title = row.name + this.$t('附件');
  1095. this.doc.open = true;
  1096. this.doc.queryParams.pId = row.id
  1097. this.doc.pId = row.id
  1098. this.getFileList()
  1099. this.$nextTick(() => {
  1100. this.$refs.doc.clearFiles()
  1101. })
  1102. },
  1103. getFileList (){
  1104. allFileList(this.doc.queryParams).then(response => {
  1105. this.doc.commonfileList = response;
  1106. });
  1107. },
  1108. //附件上传中处理
  1109. handleFileDocProgress(event, file, fileList) {
  1110. this.doc.file = file;
  1111. this.doc.isUploading = true;
  1112. },
  1113. //附件上传成功处理
  1114. handleFileDocSuccess(response, file, fileList) {
  1115. this.doc.isUploading = false;
  1116. this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
  1117. this.getFileList()
  1118. },
  1119. /** 删除按钮操作 */
  1120. handleDeleteDoc(row) {
  1121. const ids = row.id || this.ids;
  1122. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  1123. confirmButtonText: this.$t('确定'),
  1124. cancelButtonText: this.$t('取消'),
  1125. type: "warning"
  1126. }).then(function() {
  1127. return delCommonfile(ids);
  1128. }).then(() => {
  1129. this.getFileList()
  1130. this.msgSuccess(this.$t('删除成功'));
  1131. })
  1132. },
  1133. // 文件下载处理
  1134. handleDownload(row) {
  1135. var name = row.fileName;
  1136. var url = row.fileUrl;
  1137. var suffix = url.substring(url.lastIndexOf("."), url.length);
  1138. const a = document.createElement('a')
  1139. a.setAttribute('download', name)
  1140. a.setAttribute('target', '_blank')
  1141. a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
  1142. a.click()
  1143. },
  1144. openPdf(){
  1145. window.open(this.pdf.pdfUrl);//path是文件的全路径地址
  1146. },
  1147. handleSee (row){
  1148. this.pdf.open =true
  1149. this.pdf.title = row.fileName
  1150. this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
  1151. },
  1152. handleLeft(){
  1153. this.left.open = true;
  1154. this.left.title = this.$t('离职人员信息');
  1155. this.getLeftData();
  1156. },
  1157. getLeftData(){
  1158. listLeftStaffmgr().then(response => {
  1159. this.left.staffmgrList = response;
  1160. });
  1161. },
  1162. handleReLeft(row){
  1163. const ids = row.id;
  1164. this.$confirm(this.$t('是否确认复职?'), this.$t('警告'), {
  1165. confirmButtonText: this.$t('确定'),
  1166. cancelButtonText: this.$t('取消'),
  1167. type: "warning"
  1168. }).then(function() {
  1169. return reLeftStaffmgr(ids);
  1170. }).then(() => {
  1171. this.getLeftData();
  1172. this.getList();
  1173. this.msgSuccess(this.$t('复职成功'));
  1174. })
  1175. },
  1176. //数据分析
  1177. handleData(){
  1178. this.drawer = true
  1179. },
  1180. handleAvatarProgress(event, file, fileList) {
  1181. this.photo.file = file;
  1182. this.photoUrl = file;
  1183. },
  1184. handleAvatarSuccess (res, file, fileList) {
  1185. this.photoUrl = URL.createObjectURL(file.raw);
  1186. this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
  1187. },
  1188. handlePictureCardPreview(file) {
  1189. console.info("111" + file.url)
  1190. this.dialogImageUrl = file.url;
  1191. this.dialogVisible = true;
  1192. },
  1193. }
  1194. };
  1195. </script>
  1196. <style>
  1197. .text {
  1198. font-size: 14px;
  1199. }
  1200. .item {
  1201. margin-bottom: 18px;
  1202. }
  1203. .clearfix {
  1204. color: #1e1e1e;
  1205. }
  1206. .clearfix:before,
  1207. .clearfix:after {
  1208. display: table;
  1209. content: "";
  1210. }
  1211. .clearfix:after {
  1212. clear: both
  1213. }
  1214. .box-card {
  1215. width: 100%;
  1216. }
  1217. .el-drawer__body {
  1218. overflow: auto;
  1219. }
  1220. .el-drawer__container ::-webkit-scrollbar {
  1221. display: none;
  1222. }
  1223. .avatar-uploader .el-upload {
  1224. border: 1px dashed #d9d9d9;
  1225. border-radius: 6px;
  1226. cursor: pointer;
  1227. position: relative;
  1228. overflow: hidden;
  1229. }
  1230. .avatar-uploader .el-upload:hover {
  1231. border-color: #409EFF;
  1232. }
  1233. .avatar-uploader-icon {
  1234. font-size: 28px;
  1235. color: #8c939d;
  1236. width: 178px;
  1237. height: 178px;
  1238. line-height: 178px;
  1239. text-align: center;
  1240. }
  1241. .avatar {
  1242. width: 120px;
  1243. height: 140px;
  1244. }
  1245. </style>