staffResume.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <template>
  2. <el-dialog :title="$t('一人一档')" :visible.sync="visible" width="1200px" append-to-body>
  3. <el-card>
  4. <div slot="header" class="clearfix">
  5. <span>基本资料</span>
  6. </div>
  7. <div class="el-descriptions">
  8. <div class="el-descriptions__body">
  9. <table class="el-descriptions__table is-bordered el-descriptions--big" style="border: 1px solid #e6ebf5;">
  10. <tbody>
  11. <tr class="el-descriptions-row" rowspan="3">
  12. <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 姓名</th>
  13. <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content"> {{staff.name}}</td>
  14. <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 性别</th>
  15. <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content" > {{sexFormat(staff)}}</td>
  16. <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 年龄</th>
  17. <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content">{{staff.birthday}}</td>
  18. <td colspan="1" rowspan="3" class="el-descriptions-item__cell el-descriptions-item__content">
  19. <img :src="staff.photo" />
  20. </td>
  21. </tr>
  22. </tbody>
  23. <tbody>
  24. <tr class="el-descriptions-row">
  25. <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 学历</th>
  26. <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content">{{educationFormat(staff)}}</td>
  27. <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 专业</th>
  28. <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content"></td>
  29. <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 工号</th>
  30. <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content">{{staff.staffid}}</td>
  31. </tr>
  32. </tbody>
  33. <tbody>
  34. <tr class="el-descriptions-row">
  35. <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 入职时间
  36. </th>
  37. <td colspan="1" class="el-descriptions-item__cell el-descriptions-item__content"></td>
  38. <th colspan="1" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label "> 当前岗位
  39. </th>
  40. <td colspan="3" class="el-descriptions-item__cell el-descriptions-item__content">{{actualpostFormat(staff)}}</td>
  41. </tr>
  42. </tbody>
  43. </table>
  44. </div>
  45. </div>
  46. </el-card>
  47. <el-card>
  48. <div slot="header" class="clearfix">
  49. <span>公司级培养</span>
  50. </div>
  51. <el-table v-loading="loading" :data="participantsList" border>
  52. <el-table-column :label="$t('课程代码')" align="center" prop="courseCode" width="120" :show-overflow-tooltip="true"/>
  53. <el-table-column :label="$t('公司级') + $t('空格') + $t('培训课程') + $t('空格') + $t('名称')" align="center" prop="companyItem" width="400" :show-overflow-tooltip="true"/>
  54. <el-table-column :label="$t('开始日期')" align="center" prop="startDate" width="200">
  55. <template slot-scope="scope">
  56. <span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column :label="$t('结束日期')" align="center" prop="endDate" width="200">
  60. <template slot-scope="scope">
  61. <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column :label="$t('培训时长')" align="center" prop="trainingDuration" :show-overflow-tooltip="true"/>
  65. </el-table>
  66. </el-card>
  67. <el-card>
  68. <div slot="header" class="clearfix">
  69. <span>装置级培养</span>
  70. </div>
  71. <el-table v-loading="loading" :data="devicceList" border>
  72. <el-table-column :label="$t('课程代码')" align="center" prop="courseCode" width="200" :show-overflow-tooltip="true"/>
  73. <el-table-column :label="$t('课程名称')" align="center" prop="item" width="350" :show-overflow-tooltip="true"/>
  74. <el-table-column :label="$t('授课人')" align="center" prop="lecturerName" width="150" :show-overflow-tooltip="true" />
  75. <el-table-column :label="$t('课时')" align="center" prop="hour" :show-overflow-tooltip="true"/>
  76. <el-table-column :label="$t('开始日期')" align="center" prop="startDate" width="100">
  77. <template slot-scope="scope">
  78. <span v-if="scope.row.supplementary === '0' && scope.row.trainingType === '10'">{{ parseTime(scope.row.startDate, '{y}-{m}') }}</span>
  79. <span v-else>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
  80. </template>
  81. </el-table-column>
  82. </el-table>
  83. </el-card>
  84. <el-card>
  85. <div slot="header" class="clearfix">
  86. <span> 专项培养</span><div style="float: right;margin-bottom: -14px">
  87. <el-form :model="queryDeviceParams" ref="queryRegularForm" label-width="68px" :inline="true">
  88. <el-form-item :label="$t('年份')" prop="year">
  89. <el-date-picker clearable size="small" style="width: 200px"
  90. v-model="queryDeviceParams.year"
  91. type="year"
  92. value-format="yyyy"
  93. :placeholder="$t('请选择') + $t('年份')">
  94. </el-date-picker>
  95. </el-form-item>
  96. <el-button type="cyan" icon="el-icon-search" size="mini" @click="staffPlanQuery" style="margin-left: 20px;">
  97. {{ $t('搜索') }}</el-button>
  98. </el-form>
  99. </div>
  100. </div>
  101. <el-table :data="planList" v-loading="planLoading" border>
  102. <el-table-column label="培养内容" align="center" prop="plantName" :show-overflow-tooltip="true"/>
  103. <el-table-column label="开始日期" align="center" prop="startDate" width="100">
  104. <template slot-scope="scope">
  105. <span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
  106. </template>
  107. </el-table-column>
  108. <el-table-column label="结束日期" align="center" prop="endDate" width="100">
  109. <template slot-scope="scope">
  110. <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
  111. </template>
  112. </el-table-column>
  113. <!-- <el-table-column label="学时" align="center" prop="classHour" :show-overflow-tooltip="true"/>-->
  114. <el-table-column label="具体内容" align="center" prop="classContent" :show-overflow-tooltip="true"/>
  115. <el-table-column label="评分" align="center" prop="classContent" :show-overflow-tooltip="true"/>
  116. </el-table>
  117. </el-card>
  118. </el-dialog>
  119. </template>
  120. <script>
  121. import Treeselect from "@riophae/vue-treeselect";
  122. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  123. import {listPlan} from "@/api/training/spec/plan";
  124. import {listParticipants} from "@/api/training/participants";
  125. import {listDevice} from "@/api/training/device";
  126. export default {
  127. name: "Resume",
  128. components: {Treeselect},
  129. data() {
  130. return {
  131. // 遮罩层
  132. loading: false,
  133. planLoading: false,
  134. visible: false,
  135. // 选中数组
  136. ids: [],
  137. staff: null,
  138. dataListSelections: [],
  139. // 装置名称字典
  140. plantCodeOptions: [],
  141. // 性别字典
  142. sexOptions: [],
  143. // 部门字典
  144. unitOptions: [],
  145. // 班值字典
  146. teamOptions: [],
  147. // 实际岗位字典
  148. actualpostOptions: [],
  149. // 学历字典
  150. educationOptions: [],
  151. // 英语能力字典
  152. enAbilityOptions: [],
  153. // 特殊职能字典
  154. specialDutyOptions: [],
  155. // 非单个禁用
  156. single: true,
  157. // 非多个禁用
  158. multiple: true,
  159. // 显示搜索条件
  160. showSearch: false,
  161. // 总条数
  162. total: 0,
  163. // 培养计划表格数据
  164. planList: [],
  165. // 人员-公司级培训关系表格数据
  166. participantsList: [],
  167. // 人员-装置级培训关系表格数据
  168. devicceList: [],
  169. // 弹出层标题
  170. title: "",
  171. // 操作
  172. operation: "",
  173. // 部门树选项
  174. deptOptions: undefined,
  175. clientHeight: 300,
  176. // 是否显示弹出层
  177. open: false,
  178. // 学习状态字典
  179. studyStateOptions: [],
  180. // 学员列表
  181. successorOptions: [],
  182. // 查询参数
  183. queryParams: {
  184. pageNum: 1,
  185. pageSize: 20,
  186. staffId: null,
  187. plantName: null,
  188. startDate: null,
  189. endDate: null,
  190. classHour: null,
  191. studyState: null
  192. },
  193. queryCompanyParams: {
  194. staffId: null,
  195. companyId: null,
  196. },
  197. queryDeviceParams: {
  198. staffId: null,
  199. regularId: null,
  200. year: this.getNowTime(),
  201. trainingType: null
  202. },
  203. // 表单参数
  204. form: {},
  205. // 表单校验
  206. rules: {}
  207. };
  208. },
  209. watch: {},
  210. created() {
  211. this.getDicts("PLANT_DIVIDE").then(response => {
  212. this.plantCodeOptions = response.data;
  213. });
  214. this.getDicts("sys_user_sex").then(response => {
  215. this.sexOptions = response.data;
  216. });
  217. this.getDicts("STAFF_UNIT").then(response => {
  218. this.unitOptions = response.data;
  219. });
  220. this.getDicts("TEAM_DIVIDE").then(response => {
  221. this.teamOptions = response.data;
  222. });
  223. this.getDicts("ACTUALPOST").then(response => {
  224. this.actualpostOptions = response.data;
  225. });
  226. this.getDicts("EDUCATION").then(response => {
  227. this.educationOptions = response.data;
  228. });
  229. this.getDicts("ENGLISHABILITY").then(response => {
  230. this.enAbilityOptions = response.data;
  231. });
  232. this.getDicts("SPECIAL_DUTY").then(response => {
  233. this.specialDutyOptions = response.data;
  234. });
  235. },
  236. methods: {
  237. init(row) {
  238. this.visible = true
  239. this.staff = row.staff
  240. this.queryParams.staffId = row.staff.staffid
  241. this.getNowTime()
  242. this.getPlanList()
  243. this.getParticipants()
  244. this.getDevice()
  245. },
  246. /** 获取当前年份 */
  247. getNowTime() {
  248. var now = new Date();
  249. var year = now.getFullYear(); //得到年份
  250. var defaultDate = `${year}`;
  251. defaultDate = `${year}`
  252. return defaultDate;
  253. },
  254. /** 查询培养计划列表 */
  255. getPlanList() {
  256. this.planLoading = true;
  257. this.queryParams.year = this.queryDeviceParams.year
  258. listPlan(this.queryParams).then(response => {
  259. this.planList = response.rows;
  260. this.total = response.total;
  261. this.planLoading = false;
  262. });
  263. },
  264. getParticipants() {
  265. this.queryCompanyParams.staffId = this.staff.staffid
  266. // this.queryCompanyParams.year = this.queryDeviceParams.year
  267. listParticipants(this.queryCompanyParams).then(response => {
  268. this.participantsList = response.rows;
  269. });
  270. },
  271. getDevice() {
  272. this.queryDeviceParams.staffId = this.staff.staffid
  273. listDevice(this.queryDeviceParams).then(response => {
  274. this.devicceList = response.rows;
  275. });
  276. },
  277. staffPlanQuery (){
  278. this.getPlanList()
  279. },
  280. // 装置名称字典翻译
  281. plantCodeFormat(row, column) {
  282. return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
  283. },
  284. // 性别字典翻译
  285. sexFormat(row, column) {
  286. return this.selectDictLabel(this.sexOptions, row.sex);
  287. },
  288. // 部门字典翻译
  289. unitFormat(row, column) {
  290. return this.selectDictLabel(this.unitOptions, row.unit);
  291. },
  292. // 班值字典翻译
  293. teamFormat(row, column) {
  294. return this.selectDictLabel(this.teamOptions, row.team);
  295. },
  296. // 实际岗位字典翻译
  297. actualpostFormat(row, column) {
  298. return this.selectDictLabel(this.actualpostOptions, row.actualpost);
  299. },
  300. // 学历字典翻译
  301. educationFormat(row, column) {
  302. return this.selectDictLabel(this.educationOptions, row.education);
  303. },
  304. // 英语能力字典翻译
  305. enAbilityFormat(row, column) {
  306. return this.selectDictLabel(this.enAbilityOptions, row.enAbility);
  307. },
  308. // 特殊职能字典翻译
  309. specialDutyFormat(row, column) {
  310. return this.selectDictLabel(this.specialDutyOptions, row.specialDuty);
  311. },
  312. }
  313. };
  314. </script>