taskApplicationFrom.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  1. <template>
  2. <div class="applicationFrom">
  3. <el-dialog title="绩效结果考核申报详情" v-model="dialogVisible" :fullscreen="true" :close-on-click-modal="false">
  4. <div class="startDetail">
  5. <p class="starttitleSty">单据信息:</p>
  6. <el-row class="danjuMsg">
  7. <el-col :span="6">
  8. <div class="danjuMsg_data">
  9. <span class="data_tit">申报编号:</span>
  10. <span>{{receiptMsg.code}}</span>
  11. </div>
  12. <div class="danjuMsg_data">
  13. <span class="data_tit">申报部门:</span>
  14. <span>{{receiptMsg.deptName}}</span>
  15. </div>
  16. </el-col>
  17. <el-col :span="6">
  18. <div class="danjuMsg_data">
  19. <span class="data_tit">申报级别:</span>
  20. <span>{{receiptMsg.declarationLevel}}级</span>
  21. </div>
  22. <div class="danjuMsg_data">
  23. <span class="data_tit">申报年度:</span>
  24. <span>{{receiptMsg.year}}年</span>
  25. </div>
  26. <!-- <div class="danjuMsg_data">
  27. <span class="data_tit">申报领导:</span>
  28. <span>{{receiptMsg.deptLeaderName}}</span>
  29. </div> -->
  30. </el-col>
  31. <el-col :span="6">
  32. <div class="danjuMsg_data">
  33. <span class="data_tit">流程状态:</span>
  34. <span>{{receiptMsg.stage}}</span>
  35. </div>
  36. <div class="danjuMsg_data">
  37. <span class="data_tit">申报月份:</span>
  38. <span>{{receiptMsg.month}}月</span>
  39. </div>
  40. </el-col>
  41. <el-col :span="6">
  42. <div class="danjuMsg_data">
  43. <span class="data_tit">创建日期:</span>
  44. <span>{{receiptMsg.createDate}}</span>
  45. </div>
  46. </el-col>
  47. <el-col :span="6">
  48. <div class="danjuMsgSelect">
  49. <span class="data_tit">评定等级:</span>
  50. <span v-if="userMes.deptId !== '23031009'">{{receiptMsg.ratingGrade}}</span>
  51. <el-select v-model="receiptMsg.ratingGrade" placeholder="请选择评定等级" @change="changeratingGrade" v-else>
  52. <el-option
  53. v-for="item in ratingGradeOption"
  54. :key="item.value"
  55. :label="item.label"
  56. :value="item.value">
  57. </el-option>
  58. </el-select>
  59. </div>
  60. </el-col>
  61. <el-col :span="18">
  62. <div class="danjuMsgSelect">
  63. <span class="data_tit">申报简述:</span>
  64. <span v-if="userMes.deptId !== '23031009'">{{receiptMsg.des}}</span>
  65. <el-input v-model="receiptMsg.des" :rows="1" type="textarea" @blur="blurDes" v-else
  66. placeholder="请输入申报简述"></el-input>
  67. </div>
  68. </el-col>
  69. </el-row>
  70. <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
  71. <el-tab-pane label="员工月度考核系数" name="first">
  72. <div class="detaTableBtns">
  73. <div class="tableBtn add" @click="addTableDetail">
  74. <img :src="addIcon" alt="">
  75. <span>新增</span>
  76. </div>
  77. <div class="tableBtn save" @click="saveDetail">
  78. <img :src="saveIcon" alt="">
  79. <span>保存</span>
  80. </div>
  81. <div class="tableBtn delete" @click="handleDelete">
  82. <img :src="deleteIcon" alt="">
  83. <span>删除</span>
  84. </div>
  85. <div class="tableBtn import" @click="handleImport">
  86. <img :src="importIcon" alt="">
  87. <span>导入</span>
  88. </div>
  89. <div class="tableBtn export" @click="handleExport">
  90. <img :src="exportIcon" alt="">
  91. <span>导出</span>
  92. </div>
  93. </div>
  94. <el-table :data="quantifiedList.slice((pageLeft.currentPage-1)*pageLeft.pagesize, pageLeft.currentPage*pageLeft.pagesize)"
  95. style="width: 100%" @select="rowClick" @select-all="rowClick">
  96. <el-table-column type="selection" label="操作" align="center"></el-table-column>
  97. <el-table-column label="序号" type="index" width="80" />
  98. <el-table-column label="人员编号" prop="employeeNo">
  99. <template #default="scope">
  100. <el-input v-model="scope.row.employeeNo" @blur="employeeNoInputBlur(scope.row.employeeNo, scope.row)" />
  101. </template>
  102. </el-table-column>
  103. <el-table-column label="人员" prop="deptName">
  104. <template #default="scope">
  105. <!-- <el-select v-model="scope.row.employeeId" placeholder="请选择人员">
  106. <el-option
  107. v-for="item in deptLeaderOptionDet"
  108. :key="item.id"
  109. :label="item.name"
  110. :value="item.id">
  111. </el-option>
  112. </el-select> -->
  113. <span>{{scope.row.employeeName}}</span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column label="建议值" v-if="showMessage">
  117. <template #default="scope">
  118. <el-input-number v-model="scope.row.suggestedValue" :precision="2" :step="0.1" :min="0" />
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="排序" >
  122. <template #default="scope">
  123. <el-input-number v-model="scope.row.serialNumber" :min="1" />
  124. </template>
  125. </el-table-column>
  126. <el-table-column label="操作" width="120">
  127. <template #default="scope">
  128. <p class="indicitem" @click="deleteRowFn(scope.row, scope.$index)">删除</p>
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. <el-pagination
  133. @current-change="handleCurrentChangeLeft"
  134. :current-page="pageLeft.currentPage"
  135. :page-size="pageLeft.pagesize"
  136. layout="total, prev, pager, next, jumper"
  137. :total="pageLeft.total">
  138. </el-pagination>
  139. </el-tab-pane>
  140. <el-tab-pane label="本月主要工作完成情况" name="second">
  141. <div class="detaTableBtns">
  142. <div class="tableBtn add" @click="addSecondWork">
  143. <img :src="addIcon" alt="">
  144. <span>新增</span>
  145. </div>
  146. <div class="tableBtn save" @click="saveSecondWork">
  147. <img :src="saveIcon" alt="">
  148. <span>保存</span>
  149. </div>
  150. <div class="tableBtn delete" @click="handleSecondWork">
  151. <img :src="deleteIcon" alt="">
  152. <span>删除</span>
  153. </div>
  154. </div>
  155. <el-table :data="secondWorkSituation.slice((pageRight.currentPage-1)*pageRight.pagesize, pageRight.currentPage*pageRight.pagesize)"
  156. style="width: 100%" @select="rowSituationClick" @select-all="rowSituationClick">
  157. <el-table-column type="selection" label="操作" align="center"></el-table-column>
  158. <el-table-column label="序号" type="index" width="80" />
  159. <el-table-column label="工作内容">
  160. <template #default="scope">
  161. <el-input v-model="scope.row.jobContent" :rows="2" type="textarea" />
  162. </template>
  163. </el-table-column>
  164. <el-table-column label="完成情况">
  165. <template #default="scope">
  166. <el-input v-model="scope.row.completionStatus" :rows="2" type="textarea" />
  167. </template>
  168. </el-table-column>
  169. <el-table-column label="相关处室" width="200">
  170. <template #default="scope">
  171. <el-input v-model="scope.row.relatedOffice" />
  172. </template>
  173. </el-table-column>
  174. <el-table-column label="经办人" width="200">
  175. <template #default="scope">
  176. <el-input v-model="scope.row.handlePeopleName" />
  177. </template>
  178. </el-table-column>
  179. <el-table-column label="排序" >
  180. <template #default="scope">
  181. <el-input-number v-model="scope.row.serialNumber" :min="1" />
  182. </template>
  183. </el-table-column>
  184. </el-table>
  185. <el-pagination
  186. @current-change="handleCurrentChangeRight"
  187. :current-page="pageRight.currentPage"
  188. :page-size="pageRight.pagesize"
  189. layout="total, prev, pager, next, jumper"
  190. :total="pageRight.total">
  191. </el-pagination>
  192. </el-tab-pane>
  193. </el-tabs>
  194. <div>
  195. <p class="starttitleSty">审批意见:</p>
  196. <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
  197. </div>
  198. </div>
  199. <template #footer>
  200. <span class="dialog-footer">
  201. <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
  202. <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
  203. </span>
  204. </template>
  205. </el-dialog>
  206. <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
  207. </div>
  208. </template>
  209. <script>
  210. import importDailog from '../importPage/importDailog.vue'
  211. import {apiPostevaluationdeptadDetails,apiGetevaluationdeptadUpdate, apiGetevaluationdeptadDelete,apiPostIsdoAction,apideptAdmodify,
  212. apiPostevaluationdeptadDetailsHead, apiGetuserPageList, apiGetUserPostList, apiGetevaluationdeptadUpdateComplete,
  213. apiGetevaluationdeptadDeleteComplete, apiGetprocessInformation} from '../../api/api'
  214. import ExcelJS from 'exceljs'
  215. import fileSave from 'file-saver'
  216. import addIcon from '../../assets/btnIcon/add.png'
  217. import saveIcon from '../../assets/btnIcon/save.png'
  218. import editIcon from '../../assets/btnIcon/edit.png'
  219. import deleteIcon from '../../assets/btnIcon/delete.png'
  220. import exportIcon from '../../assets/btnIcon/export.png'
  221. import importIcon from '../../assets/btnIcon/import.png'
  222. export default {
  223. components: {
  224. importDailog
  225. },
  226. data() {
  227. return {
  228. dialogVisible: false,
  229. activeName: 'first',
  230. quantifiedList: [],
  231. secondWorkSituation: [],
  232. changeDateSelect: [],
  233. descMsg: '',
  234. receiptMsg: {
  235. code: '',
  236. des: '',
  237. stage: '',
  238. createName: '',
  239. createDate: '',
  240. type: '',
  241. year: '',
  242. month: '',
  243. recStage: ''
  244. },
  245. addIcon: addIcon,
  246. saveIcon: saveIcon,
  247. editIcon: editIcon,
  248. deleteIcon: deleteIcon,
  249. exportIcon: exportIcon,
  250. importIcon: importIcon,
  251. rowMsg: {},
  252. orgruleData: [],
  253. indicItemoptions: [],
  254. sectionNameArr: [],
  255. deptNameArr: [],
  256. pageLeft:{
  257. pagesize: 15,
  258. currentPage: 1,
  259. total: 0
  260. },
  261. pageRight:{
  262. pagesize: 15,
  263. currentPage: 1,
  264. total: 0
  265. },
  266. deptLeaderOptionDet: [],
  267. ratingGradeOption: [],
  268. userMes: {},
  269. instanceChild: {},
  270. keyId: '',
  271. showMessage: false,
  272. changeSituationSelect: [],
  273. }
  274. },
  275. created() {
  276. this.ratingGradeOption = [
  277. {
  278. label: 'A',
  279. value: 'A'
  280. },
  281. {
  282. label: 'B',
  283. value: 'B'
  284. },
  285. {
  286. label: 'C',
  287. value: 'C'
  288. },
  289. {
  290. label: 'D',
  291. value: 'D'
  292. }
  293. ]
  294. },
  295. methods: {
  296. init(row, id, allData) {
  297. this.dialogVisible = true
  298. this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
  299. this.activeName = 'first'
  300. this.instanceChild = allData
  301. this.getUserPostList()
  302. this.getDetails(id)
  303. this.getDetailsHeader(id)
  304. this.getprocessInformation(row)
  305. this.keyId = id
  306. this.changeDeptLead(row.deptId)
  307. this.rowMsg = row
  308. },
  309. //查询审批人领导给提示
  310. getprocessInformation(row) {
  311. let that = this
  312. let params = {
  313. id: row.instId
  314. }
  315. apiGetprocessInformation(params).then(datas =>{
  316. if (datas && datas.data && datas.data.length>0) {
  317. let item = datas.data[1]
  318. if (item.taskKey === 'UserTask2') {
  319. that.$message({
  320. message: '请领导对员工月度考核系数进行确认。',
  321. type: 'success'
  322. });
  323. }
  324. }
  325. })
  326. },
  327. // 根据部门查询人员
  328. changeDeptLead(val) {
  329. let that = this
  330. let params = {
  331. current: 1,
  332. size: 500,
  333. orgId: val
  334. }
  335. apiGetuserPageList(params).then(datas =>{
  336. if (datas && datas.data) {
  337. that.deptLeaderOptionDet = datas.data.records
  338. }
  339. })
  340. },
  341. getUserPostList() {
  342. let that = this
  343. that.showMessage = false
  344. if (that.userMes.deptId === '23031009') {
  345. that.showMessage = true
  346. } else {
  347. let params = {
  348. userId: that.userMes.id,
  349. current: 1,
  350. size: 10
  351. }
  352. apiGetUserPostList(params).then(datas =>{
  353. if (datas.data && datas.data.records.length>0) {
  354. datas.data.records.forEach(it =>{
  355. if (it.posName === '主任' || it.posName === '副主任') {
  356. that.showMessage = true
  357. }
  358. })
  359. }
  360. })
  361. }
  362. },
  363. rowClick(selection, row) {
  364. this.changeDateSelect = selection
  365. },
  366. rowSituationClick(selection, row) {
  367. this.changeSituationSelect = selection
  368. },
  369. changeratingGrade(val) {
  370. this.modeifyDetail('level', val)
  371. },
  372. blurDes() {
  373. this.modeifyDetail('des', this.receiptMsg.des)
  374. },
  375. // 修改申报详情头信息
  376. modeifyDetail(type, val) {
  377. let that = this
  378. let params = {
  379. id: that.keyId
  380. }
  381. if (type === 'level') {
  382. params.ratingGrade = val
  383. } else {
  384. params.des = val
  385. }
  386. apideptAdmodify(params).then(datas =>{
  387. if (datas.success) {
  388. that.$message({
  389. message: '修改成功',
  390. type: 'success'
  391. });
  392. } else {
  393. that.$message({
  394. message: '修改失败',
  395. type: 'error'
  396. });
  397. }
  398. })
  399. },
  400. handleClick(val) {
  401. this.changeDateSelect = []
  402. this.changeSituationSelect = []
  403. this.activeName = val.props.name
  404. },
  405. handleCurrentChangeLeft(val) {
  406. this.pageLeft.currentPage = val
  407. },
  408. handleCurrentChangeRight(val) {
  409. this.pageRight.currentPage = val
  410. },
  411. //获取详情头数据
  412. getDetailsHeader(id) {
  413. let that = this
  414. apiPostevaluationdeptadDetailsHead(id).then(datas =>{
  415. if (datas && datas.data) {
  416. let row = datas.data
  417. that.receiptMsg = {
  418. code: row.orderNumber,
  419. des: row.declarationReason,
  420. stage: row.stage,
  421. deptName: row.deptName,
  422. deptLeaderName: row.deptLeaderName,
  423. declarationLevel: row.declarationLevel,
  424. ratingGrade: row.ratingGrade,
  425. createName: row.createName,
  426. createDate: row.createTime,
  427. type: row.checkCycle === 'YDKP'?'月度考评':row.checkCycle === 'JDKP'?'季度考评':'年度考评',
  428. year: row.annual,
  429. month: row.declarationMonth,
  430. recStage: '有效'
  431. }
  432. }
  433. })
  434. },
  435. //获取详情
  436. getDetails(id) {
  437. let that = this
  438. that.quantifiedList = []
  439. that.secondWorkSituation = []
  440. apiPostevaluationdeptadDetails(id).then(datas =>{
  441. if (datas && datas.data) {
  442. if (datas.data['ygydkhxs'][0]) {
  443. datas.data['ygydkhxs'][0].forEach(it =>{
  444. it.serialNumber = it.serialNumber.toString()
  445. })
  446. that.quantifiedList = datas.data['ygydkhxs'][0]
  447. that.pageLeft.total = datas.data['ygydkhxs'][0].length
  448. }
  449. if (datas.data['byzygzwcqk'][0]) {
  450. that.secondWorkSituation = datas.data['byzygzwcqk'][0]
  451. that.pageRight.total = datas.data['byzygzwcqk'][0].length
  452. }
  453. }
  454. })
  455. },
  456. employeeNoInputBlur(val, row) {
  457. this.deptLeaderOptionDet.forEach(it =>{
  458. if (val === it.no) {
  459. row.employeeId = it.id
  460. }
  461. })
  462. },
  463. addTableDetail() {
  464. this.pageLeft.currentPage = 1
  465. let obj = {
  466. showInput: true,
  467. businessPlanId: this.keyId,
  468. employeeId: '',
  469. employeeNo: '',
  470. suggestedValue: 1.00,
  471. serialNumber: 0
  472. }
  473. this.quantifiedList.unshift(obj)
  474. },
  475. saveDetail() {
  476. let that = this
  477. let params = []
  478. that.quantifiedList.forEach(item =>{
  479. // let emName = ''
  480. // let emNo = ''
  481. // that.deptLeaderOptionDet.forEach(it =>{
  482. // if (item.employeeId === it.id) {
  483. // emName = it.name
  484. // emNo = it.no
  485. // }
  486. // })
  487. let obj = {
  488. assessmentDeclarationId: that.keyId,
  489. employeeId: item.employeeId,
  490. employeeName: item.employeeName,
  491. employeeNo: item.employeeNo,
  492. suggestedValue: Number(item.suggestedValue).toFixed(2),
  493. serialNumber: item.serialNumber
  494. }
  495. if (!item.showInput) {
  496. obj.id = item.id
  497. }
  498. params.push(obj)
  499. })
  500. apiGetevaluationdeptadUpdate(params).then(datas =>{
  501. if (datas) {
  502. if (datas.success) {
  503. that.$message({
  504. message: '保存成功',
  505. type: 'success'
  506. });
  507. that.getDetails(that.keyId)
  508. } else {
  509. that.$message({
  510. message: datas.data,
  511. type: 'error'
  512. })
  513. }
  514. }
  515. })
  516. },
  517. deleteRowFn(row) {
  518. let that = this
  519. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  520. confirmButtonText: '确定',
  521. cancelButtonText: '取消',
  522. type: 'warning'
  523. }).then(() => {
  524. if (!row.id) {
  525. that.quantifiedList.splice(index, 1)
  526. } else {
  527. apiGetevaluationdeptadDelete(row.id).then(datas =>{
  528. if (datas) {
  529. that.$message({
  530. type: 'success',
  531. message: '删除成功!'
  532. });
  533. that.getDetails(that.keyId)
  534. }
  535. })
  536. }
  537. })
  538. },
  539. handleImport() {
  540. this.$refs.importPage.upload.title = "绩效结果考核申报导入"
  541. this.$refs.importPage.upload.open = true
  542. this.$refs.importPage.upload.url = '/evaluation-dept-ad/import'
  543. },
  544. successImport(val) {
  545. this.$message({
  546. type: 'success',
  547. message: val.message
  548. });
  549. this.getDetails(this.keyId)
  550. },
  551. handleExport() {
  552. let data = this.quantifiedList //接口返回数据
  553. const workbook = new ExcelJS.Workbook()
  554. const worksheet = workbook.addWorksheet('Sheet1')
  555. //根据数据自己调整
  556. let colums = []
  557. colums = [
  558. // { header: 'ID', key: 'id', width: 26, hidden: true },
  559. { header: '申报ID', key: 'assessmentDeclarationId', width: 26, hidden: true },
  560. { header: '人员编号', key: 'employeeNo', width: 26 },
  561. // { header: '员工ID', key: 'employeeId', width: 26 },
  562. { header: '员工名称', key: 'employeeName', width: 26 },
  563. { header: '建议值', key: 'suggestedValue', width: 26 },
  564. { header: '排序', key: 'serialNumber', width: 26 },
  565. ]
  566. worksheet.columns = colums
  567. worksheet.getRow(1).font = {
  568. size: 12,
  569. bold: true
  570. }
  571. worksheet.addRows(data)
  572. workbook.xlsx.writeBuffer().then(buffer => {
  573. //这里为type
  574. const blob = new Blob([buffer], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8' })
  575. fileSave(blob, `绩效结果考核申报数据导出.xlsx`)
  576. })
  577. },
  578. examineAndApprove(type) {
  579. let that = this
  580. let actionCS = ''
  581. if (type === 'agree') {
  582. if (that.rowMsg.taskType === 'SIGN') {
  583. actionCS = 'signAgree'
  584. } else if (that.rowMsg.taskType === 'NORMAL') {
  585. actionCS = 'agree'
  586. }
  587. } else {
  588. if (that.rowMsg.taskType === 'SIGN') {
  589. actionCS = 'signReject'
  590. } else if (that.rowMsg.taskType === 'NORMAL') {
  591. actionCS = 'reject'
  592. }
  593. }
  594. let params = {
  595. taskId: that.rowMsg.id, //任务ID
  596. nodeId: that.rowMsg.nodeId, //节点ID
  597. action: actionCS, //固定值
  598. instanceId: that.rowMsg.instId, //流程实例ID
  599. opinion: that.descMsg, //审批意见
  600. iamCode: window.localStorage.getItem('code'), //认证后code值
  601. taskName: that.rowMsg.name,
  602. defKey: that.instanceChild.defKey,
  603. bizKey: that.instanceChild.bizKey
  604. }
  605. apiPostIsdoAction(params).then(datas =>{
  606. if (datas && datas.data) {
  607. if (datas.data.isOk) {
  608. that.$message({
  609. message: datas.data.data,
  610. type: 'success'
  611. })
  612. that.dialogVisible = false
  613. that.$emit('approveMsg', datas.data.isOk)
  614. } else {
  615. that.$message({
  616. message: datas.data.msg,
  617. type: 'error'
  618. })
  619. }
  620. }
  621. })
  622. },
  623. addSecondWork() {
  624. this.pageRight.currentPage = 1
  625. let obj = {
  626. showInput: true,
  627. assessmentDeclarationId: this.keyId,
  628. jobContent: '',
  629. completionStatus: '',
  630. relatedOffice: '',
  631. handlePeopleName: '',
  632. serialNumber: 0
  633. }
  634. this.secondWorkSituation.unshift(obj)
  635. },
  636. saveSecondWork() {
  637. let that = this
  638. let params = []
  639. that.secondWorkSituation.forEach(item =>{
  640. let obj = {
  641. assessmentDeclarationId: that.keyId,
  642. jobContent: item.jobContent,
  643. completionStatus: item.completionStatus,
  644. relatedOffice: item.relatedOffice,
  645. handlePeopleName: item.handlePeopleName,
  646. serialNumber: item.serialNumber
  647. }
  648. if (!item.showInput) {
  649. obj.id = item.id
  650. }
  651. params.push(obj)
  652. })
  653. apiGetevaluationdeptadUpdateComplete(params).then(datas =>{
  654. if (datas) {
  655. if (datas.success) {
  656. that.$message({
  657. message: '保存成功',
  658. type: 'success'
  659. });
  660. that.activeName = 'second'
  661. that.getDetails(that.keyId)
  662. } else {
  663. that.$message({
  664. message: datas.message,
  665. type: 'error'
  666. })
  667. }
  668. }
  669. })
  670. },
  671. handleSecondWork() {
  672. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  673. confirmButtonText: '确定',
  674. cancelButtonText: '取消',
  675. type: 'warning'
  676. }).then(() => {
  677. let that = this
  678. let paramsArr = []
  679. that.changeSituationSelect.forEach(it =>{
  680. paramsArr.push(it.id)
  681. })
  682. apiGetevaluationdeptadDeleteComplete(paramsArr.join(',')).then(datas =>{
  683. if (datas) {
  684. that.$message({
  685. type: 'success',
  686. message: '删除成功!'
  687. });
  688. that.activeName = 'second'
  689. that.changeSituationSelect = []
  690. that.getDetails(that.keyId)
  691. }
  692. })
  693. })
  694. },
  695. }
  696. }
  697. </script>
  698. <style lang="less">
  699. .applicationFrom{
  700. .el-overlay{
  701. .el-dialog{
  702. // margin-top: 7vh;
  703. .el-dialog__body{
  704. padding: 0 20px !important;
  705. .startDetail{
  706. .starttitleSty{
  707. font-size: 18px;
  708. font-family: Microsoft YaHei;
  709. font-weight: bold;
  710. color: #3B7AD1;
  711. // line-height: 12px;
  712. margin: 20px 0 20px 10px;
  713. }
  714. .danjuMsg{
  715. border: 1px solid #D6DBEA;
  716. padding: 10px 20px;
  717. border-radius: 10px;
  718. margin-bottom: 10px;
  719. .danjuMsg_data{
  720. padding: 5px 0 10px 0;
  721. .data_tit{
  722. margin-right: 10px;
  723. font-weight: bold;
  724. font-size: 14px;
  725. font-family: Microsoft YaHei;
  726. color: #8991B0;
  727. }
  728. .data_tit_wd{
  729. display: inline-block;
  730. width: 90px;
  731. }
  732. .el-form-item--small{
  733. .el-input{
  734. height: 25px;
  735. width: 160px;
  736. }
  737. margin-bottom: 0;
  738. .el-input-number{
  739. height: 25px;
  740. .el-input-number__decrease, .el-input-number__increase{
  741. right: -39px;
  742. }
  743. }
  744. }
  745. }
  746. .danjuMsgSelect{
  747. display: flex;
  748. .data_tit{
  749. margin-right: 10px;
  750. font-weight: bold;
  751. font-size: 14px;
  752. font-family: Microsoft YaHei;
  753. color: #8991B0;
  754. }
  755. .el-select{
  756. width: 30%;
  757. position: relative;
  758. top: -5px;
  759. }
  760. .el-textarea{
  761. width: 80%;
  762. position: relative;
  763. top: -4px;
  764. }
  765. }
  766. }
  767. .el-select, .el-input{
  768. width: 100%;
  769. }
  770. .el-tabs{
  771. margin-top: 20px;
  772. .detaTableBtns{
  773. display: flex;
  774. justify-content: flex-end;
  775. width: 100%;
  776. margin-top: 5px;
  777. .tableBtn {
  778. display: flex;
  779. height: 20px;
  780. margin: 0 10px;
  781. // width: 20%;
  782. width: fit-content;
  783. img{
  784. margin-right: 5px;
  785. margin-top: 1px;
  786. }
  787. span{
  788. width: 35px;
  789. display: inline-block;
  790. font-size: 14px;
  791. font-family: Microsoft YaHei;
  792. font-weight: 400;
  793. }
  794. }
  795. .add{
  796. cursor: pointer;
  797. span{
  798. color: #3B7AD1;
  799. }
  800. }
  801. .save{
  802. cursor: pointer;
  803. span{
  804. color: #50C14E;
  805. }
  806. }
  807. .edit{
  808. span{
  809. color: #F5A623;
  810. }
  811. }
  812. .delete{
  813. cursor: pointer;
  814. span{
  815. color: #F65177;
  816. }
  817. }
  818. .import{
  819. cursor: pointer;
  820. span{
  821. color: #ce1e78;
  822. }
  823. }
  824. .export{
  825. cursor: pointer;
  826. span{
  827. color: #2baa8a;
  828. }
  829. }
  830. }
  831. .el-tabs__header{
  832. .el-tabs__nav{
  833. .el-tabs__item{
  834. font-size: 18px;
  835. font-family: Microsoft YaHei;
  836. font-weight: bold;
  837. margin: 0 10px;
  838. color: #8991B0;
  839. }
  840. .is-active{
  841. font-size: 18px;
  842. font-family: Microsoft YaHei;
  843. font-weight: bold;
  844. color: #3B7AD1;
  845. margin: 0 10px;
  846. }
  847. }
  848. }
  849. .el-table{
  850. margin-bottom: 10px;
  851. .el-table__body-wrapper{
  852. height: 38vh;
  853. }
  854. .el-table__row{
  855. .cell{
  856. .el-input{
  857. height: 24px;
  858. .el-input__inner{
  859. height: 24px;
  860. }
  861. }
  862. }
  863. }
  864. .indicitem{
  865. color: #F65177;
  866. font-size: 12px;
  867. margin-right: 20px;
  868. cursor:pointer;
  869. &:hover{
  870. text-decoration: underline;
  871. }
  872. }
  873. }
  874. }
  875. }
  876. }
  877. .el-dialog__footer{
  878. .dialog-footer{
  879. display: flex;
  880. justify-content: center;
  881. .el-button{
  882. width: 180px !important;
  883. height: 40px !important;
  884. }
  885. }
  886. }
  887. }
  888. }
  889. }
  890. </style>