taskCenterEvlNewFrom.vue 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079
  1. <template>
  2. <div class="taskEvalFrom">
  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.createDate}}</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.des}}</span>
  21. </div>
  22. <div class="danjuMsg_data">
  23. <span class="data_tit">业务类别:</span>
  24. <span>{{receiptMsg.type}}</span>
  25. </div>
  26. </el-col>
  27. <el-col :span="6">
  28. <div class="danjuMsg_data">
  29. <span class="data_tit">流程状态:</span>
  30. <span>{{receiptMsg.stage}}</span>
  31. </div>
  32. <div class="danjuMsg_data">
  33. <span class="data_tit">年度:</span>
  34. <span>{{receiptMsg.year}}</span>
  35. </div>
  36. </el-col>
  37. <el-col :span="6">
  38. <div class="danjuMsg_data">
  39. <span class="data_tit">创建人:</span>
  40. <span>{{receiptMsg.createName}}</span>
  41. </div>
  42. <div class="danjuMsg_data">
  43. <span class="data_tit">单据状态:</span>
  44. <span>{{receiptMsg.recStage}}</span>
  45. </div>
  46. </el-col>
  47. </el-row>
  48. <div class="monthQuarterYear">
  49. <el-tabs v-model="activeName" class="tableMain" @tab-click="handleClick">
  50. <el-tab-pane v-for="it in stageData" :key="it.id" :label="it.stageName" :name="it.stageCode">
  51. <div class="detailsHeader">
  52. <div class="headerLeft">
  53. <el-tag v-for="tag in indicatorList" :key="tag.id" size="large" class="tagArr"
  54. effect="dark" :type="tag.id === isClickTagId ? '': 'info'" @click="handleShowPage(tag)">
  55. <span>{{ tag.indicator_name }}</span>
  56. </el-tag>
  57. </div>
  58. <div class="headerRight">
  59. <div class="seachFor">
  60. <el-input v-model="compNameSa" placeholder="请输入单位名称" @keyup.enter="getTableData(isClickTagId)"></el-input>
  61. <!-- <el-icon :size="20" color="#3B7AD1" @click="getTableData(isClickTagId)"><Search /></el-icon> -->
  62. </div>
  63. <!-- <div class="tableBtn add" @click="addTableDetail"
  64. v-if="(activeName === 'ZDZX' || activeName === 'GLSX') && indicatorList.length > 0">
  65. <img :src="addIcon" alt="">
  66. <span>新增</span>
  67. </div>
  68. <div class="tableBtn save" @click="saveAddDetail"
  69. v-if="(activeName === 'ZDZX' || activeName === 'GLSX') && indicatorList.length > 0">
  70. <img :src="saveIcon" alt="">
  71. <span>保存</span>
  72. </div> -->
  73. <div class="tableBtn save" @click="saveDetail">
  74. <img :src="saveIcon" alt="">
  75. <span>保存</span>
  76. </div>
  77. <div class="tableBtn import" @click="handleImport">
  78. <img :src="importIcon" alt="">
  79. <span>导入</span>
  80. </div>
  81. <div class="tableBtn export" @click="handleExport">
  82. <img :src="exportIcon" alt="">
  83. <span>导出</span>
  84. </div>
  85. </div>
  86. </div>
  87. <el-table :data="monthQuarterYearData" style="width: 100%" ref="monthQuarterYearTT"
  88. v-if="activeName === 'ZDZX' || activeName === 'GLSX'"
  89. :row-class-name="tableRowClassName" :border="true" >
  90. <el-table-column type="index" label="排名" align="center"></el-table-column>
  91. <el-table-column label="考评单位" prop="organizationShortName" width="300">
  92. <template #default="scope">
  93. <el-select v-model="scope.row.organizationShortName" placeholder="请选择审核状态">
  94. <el-option
  95. v-for="item in organizationData"
  96. :key="item.organizationId"
  97. :label="item.organizationShortName"
  98. :value="item.organizationId">
  99. </el-option>
  100. </el-select>
  101. </template>
  102. </el-table-column>
  103. <el-table-column v-for="(it, index) in monthQuarterYearHeader" :key="index"
  104. :label="it.name" align="center">
  105. <el-table-column v-for="(iv, index) in it.children" :key="index" :label="iv.key"
  106. align="center" width="150" sortable :sort-method="(a,b)=>sortMethods(a,b,iv.code)">
  107. <template #default="scope">
  108. <el-select v-model="scope.row[iv.code]" class="selectSty" placeholder="请选择审核状态" v-if="scope.row['IS_LH_'+iv.code] === '3'">
  109. <el-option
  110. v-for="item in statusData"
  111. :key="item.id"
  112. :label="item.name"
  113. :value="item.id">
  114. </el-option>
  115. </el-select>
  116. <span class="inputSty" v-else>{{scope.row[iv.code]}}</span>
  117. </template>
  118. </el-table-column>
  119. </el-table-column>
  120. <el-table-column label="操作" width="100">
  121. <template #default="scope">
  122. <span class="indicitem" @click="changeDetail(scope.row)">详情</span>
  123. </template>
  124. </el-table-column>
  125. </el-table>
  126. <el-table :data="monthQuarterYearData" style="width: 100%" ref="monthQuarterYearTT"
  127. v-else
  128. :row-class-name="tableRowClassName" :border="true" >
  129. <el-table-column type="index" label="排名" align="center"></el-table-column>
  130. <el-table-column label="考评单位" prop="organizationShortName" width="300">
  131. <template #default="scope">
  132. <el-select v-model="scope.row.organizationShortName" placeholder="请选择审核状态">
  133. <el-option
  134. v-for="item in organizationData"
  135. :key="item.organizationId"
  136. :label="item.organizationShortName"
  137. :value="item.organizationId">
  138. </el-option>
  139. </el-select>
  140. </template>
  141. </el-table-column>
  142. <el-table-column v-for="(it, index) in monthQuarterYearHeader" :key="index"
  143. :label="it.name" align="center">
  144. <el-table-column v-for="(iv, index) in it.children" :key="index" :label="iv.key"
  145. align="center" width="150" sortable :sort-method="(a,b)=>sortMethods(a,b,iv.code)">
  146. <template #default="scope">
  147. <el-select v-model="scope.row[iv.code]" class="selectSty" placeholder="请选择审核状态" v-if="scope.row['IS_LH_'+iv.code] === '3'">
  148. <el-option
  149. v-for="item in statusData"
  150. :key="item.id"
  151. :label="item.name"
  152. :value="item.id">
  153. </el-option>
  154. </el-select>
  155. <el-input v-model="scope.row[iv.code]" class="inputSty" v-else-if="scope.row['IS_LH_'+iv.code] === '2'"></el-input>
  156. <el-input-number v-model="scope.row[iv.code]" class="numberSty" :precision="2" :step="0.1" v-else />
  157. </template>
  158. </el-table-column>
  159. </el-table-column>
  160. </el-table>
  161. </el-tab-pane>
  162. </el-tabs>
  163. <div class="tableSeach">
  164. <div class="seachType" v-for="item in titleMsgArr" :key="item.isName"
  165. :class="item.showClick? 'seachTypeCha':''" @click="changType(item)">
  166. <img :src="item.img" alt="" v-if="!item.showClick">
  167. <img :src="item.clickImg" alt="" v-else>
  168. <p :style="item.showClick? 'color: #3B7AD1' : ''">{{item.isName}}</p>
  169. </div>
  170. </div>
  171. </div>
  172. <div>
  173. <p class="starttitleSty">审批意见:</p>
  174. <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
  175. </div>
  176. </div>
  177. <!-- <template #footer>
  178. <span class="dialog-footer">
  179. <el-button type="primary" @click="dialogVisible = false">取 消</el-button>
  180. </span>
  181. </template> -->
  182. <template #footer>
  183. <span class="dialog-footer">
  184. <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
  185. <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
  186. </span>
  187. </template>
  188. </el-dialog>
  189. <el-dialog title="详情填报" v-model="detailVisible" :fullscreen="true" :close-on-click-modal="false">
  190. <div class="detailSeach">
  191. <div class="tableBtn add" @click="addTableDetailInfo">
  192. <img :src="addIcon" alt="">
  193. <span>新增</span>
  194. </div>
  195. <div class="tableBtn save" @click="saveAddDetailInfo">
  196. <img :src="saveIcon" alt="">
  197. <span>保存</span>
  198. </div>
  199. </div>
  200. <el-table :data="monthQuarterYearDetailData" style="width: 100%" ref="monthQuarterYearTT"
  201. :row-class-name="tableRowClassName" :border="true" >
  202. <el-table-column type="index" label="序号" align="center"></el-table-column>
  203. <el-table-column label="部门名称" prop="deptName" align="center" width="200"></el-table-column>
  204. <el-table-column v-for="(it, index) in monthQuarterYearDetailHeader" :key="index"
  205. :label="it.name" align="center">
  206. <el-table-column v-for="(iv, index) in it.children" :key="index" :label="iv.key" align="center">
  207. <template #default="scope">
  208. <el-input v-model="scope.row[iv.code]" class="inputSty" v-if="scope.row['IS_LH_'+iv.code] === '2'"></el-input>
  209. <el-input-number v-model="scope.row[iv.code]" class="numberSty" :precision="2" :step="0.1" v-else-if="scope.row['IS_LH_'+iv.code] === '1'" />
  210. </template>
  211. </el-table-column>
  212. </el-table-column>
  213. <el-table-column label="操作" width="100">
  214. <template #default="scope">
  215. <span class="indicitem" @click="removeDetailData(scope.row)">删除</span>
  216. </template>
  217. </el-table-column>
  218. </el-table>
  219. </el-dialog>
  220. <import-dailog ref="importPage" @successImport="successImport"></import-dailog>
  221. </div>
  222. </template>
  223. <script>
  224. import importDailog from '../importPage/importDailog.vue'
  225. import {apiGetEvaluationIndicatorList,apiGetgetEvaluationInfoDataList,apiGetbinsectionList, apiGetbinstageList,apiGetExportMsg,
  226. apiPostorganizationUpdateEvaluationInfo, apiPostorganizationUpdateAddEvaluationInfo,apiGetHeaderOrganizationEvaluation,
  227. apiPostIsdoAction, apiGetorganizationevaluationcommoninfo, apiPostsaveEvaluationCommonInfo, apiPostremoveEvaluationCommonInfo} from '../../api/api'
  228. import * as XLSX from 'xlsx'
  229. import { saveAs } from 'file-saver'
  230. import * as XLSXD from 'xlsx-js-style'
  231. import sectionDef from '../../assets/benchmarkImg/sectionDef.png'
  232. import sectionCha from '../../assets/benchmarkImg/sectionCha.png'
  233. import addIcon from '../../assets/btnIcon/add.png'
  234. import saveIcon from '../../assets/btnIcon/save.png'
  235. import exportIcon from '../../assets/btnIcon/export.png'
  236. import importIcon from '../../assets/btnIcon/import.png'
  237. export default {
  238. components: {
  239. importDailog
  240. },
  241. data() {
  242. return {
  243. dialogVisible: false,
  244. detailVisible: false,
  245. activeName: '',
  246. monthQuarterYearData: [],
  247. monthQuarterYearHeader: [],
  248. monthQuarterYearDetailData: [],
  249. monthQuarterYearDetailHeader: [],
  250. indicatorList: [],
  251. isClickTagId: '',
  252. compNameSa: '',
  253. receiptMsg: {
  254. code: '',
  255. des: '',
  256. stage: '',
  257. createName: '',
  258. createDate: '',
  259. type: '',
  260. year: '',
  261. recStage: ''
  262. },
  263. rowMsg: {},
  264. moduleData: [],
  265. stageData: [],
  266. titleMsgArr: [],
  267. binSectionStr: '',
  268. addIcon: addIcon,
  269. saveIcon: saveIcon,
  270. exportIcon: exportIcon,
  271. importIcon: importIcon,
  272. addstageId: '',
  273. tastbizKey: '',
  274. taskDefKey: '',
  275. instanceChild: {},
  276. descMsg: '',
  277. statusData: [],
  278. organizationData: [],
  279. detailMsg: {}
  280. }
  281. },
  282. created() {
  283. this.statusData = [
  284. {
  285. name: '已确认',
  286. id: '1'
  287. },
  288. {
  289. name: '待确认',
  290. id: '0'
  291. },
  292. {
  293. name: '不合格',
  294. id: '-1'
  295. }
  296. ]
  297. },
  298. methods: {
  299. init(row, allData) {
  300. this.dialogVisible = true
  301. this.instanceChild = allData
  302. this.tastbizKey = allData.bizKey
  303. this.taskDefKey = allData.defKey
  304. this.getevalHeaderDetails(this.tastbizKey, this.taskDefKey)
  305. this.getModelData(this.taskDefKey)
  306. this.rowMsg = row
  307. },
  308. sortMethods(a, b, it) {
  309. if (a[it] < b[it]) {
  310. return -1
  311. }
  312. },
  313. //获取头部详情
  314. getevalHeaderDetails(id, defKey) {
  315. let that = this
  316. let params = {
  317. id: id
  318. }
  319. apiGetHeaderOrganizationEvaluation(params).then(datas =>{
  320. that.getDataMsg(defKey, datas)
  321. })
  322. },
  323. getDataMsg(types, datas) {
  324. if (datas && datas.data) {
  325. let item = datas.data
  326. this.receiptMsg = {
  327. code: types === 'dwkpmbqd'?item.responsibilityCode:item.organizationEvaluationCode,
  328. des: item.des,
  329. stage: item.stage,
  330. createName: item.createName,
  331. createDate: item.createTime,
  332. type: item.checkCycle === 'YDKP'?'月度考评':item.checkCycle === 'JDKP'?'季度考评':'年度考评',
  333. year: item.year,
  334. recStage: '有效'
  335. }
  336. }
  337. },
  338. // 获取业务属性
  339. getModelData(type) {
  340. let that = this
  341. that.titleMsgArr = []
  342. let params = {
  343. type: type === 'nddwkplc' ? '3' : '2'
  344. }
  345. apiGetbinsectionList(params).then(datas =>{
  346. if (datas && datas.data) {
  347. that.moduleData = datas.data
  348. that.moduleData.forEach(item =>{
  349. let obj = {
  350. id: item.id,
  351. isName: item.sectionName === '新能源(光电)' ? '新能源光电' : item.sectionName === '新能源(风电)' ? '新能源风电' : item.sectionName,
  352. isNameEn: item.sectionCode,
  353. showClick: false,
  354. isClass: 'sectionDef',
  355. img: sectionDef,
  356. isClassC: 'sectionCha',
  357. clickImg: sectionCha
  358. }
  359. that.titleMsgArr.push(obj)
  360. })
  361. that.titleMsgArr[0].showClick = true
  362. that.binSectionStr = that.titleMsgArr[0].id
  363. that.getStageData(type)
  364. that.getorganizationData(type)
  365. }
  366. })
  367. },
  368. //获取单位数据
  369. getorganizationData(type) {
  370. let that = this
  371. let params = {
  372. evaluationCycle: type ==='nddwkplc' ? 'NDKP': type ==='jddwkplc' ? 'JDKP' : 'YDKP',
  373. organizationType: 'DWKP',
  374. binSection: that.binSectionStr
  375. }
  376. apiGetOrganizationListAll(params).then(datas => {
  377. if (datas && datas.data) {
  378. that.organizationData = datas.data
  379. }
  380. })
  381. },
  382. //根据业务属性获取业务阶段
  383. getStageData(type) {
  384. let that = this
  385. let params = {}
  386. if (type !== 'nddwkplc') {
  387. params = {
  388. type: '3'
  389. }
  390. }
  391. apiGetbinstageList(params).then(datas =>{
  392. if (datas && datas.data) {
  393. that.stageData = datas.data
  394. that.activeName = datas.data[0].stageCode
  395. that.getTableHeaderData(datas.data[0].id)
  396. }
  397. })
  398. },
  399. //获取指标数据
  400. getTableHeaderData(id) {
  401. let that = this
  402. that.monthQuarterYearHeader = []
  403. that.monthQuarterYearData = []
  404. that.isClickTagId = ''
  405. let params = {
  406. organizationEvaluationId: that.tastbizKey,
  407. binSection: that.binSectionStr,
  408. binStage: id
  409. }
  410. apiGetEvaluationIndicatorList(params).then(datas =>{
  411. if (datas && datas.data) {
  412. that.indicatorList = datas.data
  413. if (datas.data.length>0) {
  414. that.isClickTagId = datas.data[0].id
  415. that.getTableData(that.isClickTagId)
  416. }
  417. }
  418. })
  419. },
  420. tableRowClassName(row, rowIndex) {
  421. if (!row.row.valueFlag) {
  422. return 'error-row'
  423. }
  424. },
  425. handleClick(val) {
  426. let stageId = ''
  427. this.stageData.forEach(it =>{
  428. if (it.stageCode === val.props.name) {
  429. stageId = it.id
  430. }
  431. })
  432. this.getTableHeaderData(stageId)
  433. },
  434. //获取表格数据
  435. getTableData(id) {
  436. let that = this
  437. let params = {
  438. organizationEvaluationId: that.tastbizKey,
  439. indicatorId: id,
  440. organizationShortName: that.compNameSa
  441. }
  442. apiGetgetEvaluationInfoDataList(params).then(datas =>{
  443. if (datas && datas.data) {
  444. if (datas.data.title) {
  445. let header = []
  446. for(let i in datas.data.title) {
  447. let obj = {
  448. name: i,
  449. children: datas.data.title[i]
  450. }
  451. header.push(obj)
  452. }
  453. that.monthQuarterYearHeader = header
  454. }
  455. that.monthQuarterYearData = datas.data.value
  456. }
  457. })
  458. },
  459. handleShowPage(tag) {
  460. this.isClickTagId = tag.id
  461. this.monthQuarterYearHeader = []
  462. this.monthQuarterYearData = []
  463. this.getTableData(tag.id)
  464. },
  465. changType(data) {
  466. this.titleMsgArr.forEach(it =>{
  467. it.showClick = false
  468. if (it.isName === data.isName) {
  469. it.showClick = true
  470. this.binSectionStr = it.id
  471. }
  472. })
  473. let stageId = ''
  474. this.stageData.forEach(it =>{
  475. if (it.stageCode === this.activeName) {
  476. stageId = it.id
  477. }
  478. })
  479. this.getTableHeaderData(stageId)
  480. this.getorganizationData(this.taskDefKey)
  481. },
  482. addTableDetail() {
  483. console.log('表头数据11====>>>>>>>', this.monthQuarterYearHeader)
  484. if (this.monthQuarterYearHeader.length>0) {
  485. let headerArr = []
  486. this.monthQuarterYearHeader.forEach(item =>{
  487. headerArr = headerArr.concat(item.children)
  488. })
  489. console.log('表头数据22====>>>>>>>', headerArr)
  490. this.addstageId = ''
  491. this.stageData.forEach(it =>{
  492. if (it.stageCode === this.activeName) {
  493. this.addstageId = it.id
  494. }
  495. })
  496. let obj = {
  497. isAdd: true,
  498. }
  499. headerArr.forEach(it =>{
  500. obj[it.code] = ''
  501. obj['IS_LH_'+it.code] = it.flag
  502. })
  503. this.monthQuarterYearData.unshift(obj)
  504. }
  505. console.log('表格数据====>>>>>>>', this.monthQuarterYearData)
  506. },
  507. saveAddDetail() {
  508. let that = this
  509. let addParams = []
  510. let saveParams = []
  511. let addObj = {
  512. organizationEvaluationId: that.tastbizKey,
  513. indicatorId: that.isClickTagId,
  514. binSection: that.binSectionStr,
  515. binStage: that.addstageId,
  516. optionMap: {}
  517. }
  518. that.monthQuarterYearData.forEach(it =>{
  519. if (it.isAdd) {
  520. addObj.organizationId = it.organizationShortName
  521. addObj.optionMap = it
  522. addParams.push(addObj)
  523. } else {
  524. saveParams.push(it)
  525. }
  526. })
  527. if (addParams.length > 0) {
  528. apiPostorganizationUpdateAddEvaluationInfo(addParams).then(datas =>{
  529. if (datas) {
  530. that.responseData(datas)
  531. }
  532. })
  533. }
  534. if (saveParams.length > 0) {
  535. apiPostorganizationUpdateEvaluationInfo(saveParams).then(datas =>{
  536. if (datas) {
  537. that.responseData(datas)
  538. }
  539. })
  540. }
  541. },
  542. // 返回数据
  543. responseData(datas) {
  544. if (datas.message === '成功') {
  545. this.$message({
  546. message: '考评详情信息保存成功',
  547. type: 'success'
  548. });
  549. } else {
  550. this.$message({
  551. message: datas.message,
  552. type: 'error'
  553. });
  554. }
  555. this.getTableData(this.isClickTagId)
  556. },
  557. saveDetail() {
  558. let that = this
  559. apiPostorganizationUpdateEvaluationInfo(that.monthQuarterYearData).then(datas =>{
  560. if (datas) {
  561. if (datas.message === '成功') {
  562. that.$message({
  563. message: '考评详情信息保存成功',
  564. type: 'success'
  565. });
  566. } else {
  567. that.$message({
  568. message: datas.message,
  569. type: 'error'
  570. });
  571. }
  572. that.getTableData(that.isClickTagId)
  573. }
  574. })
  575. },
  576. handleImport() {
  577. this.$refs.importPage.upload.title = "考评详情信息导入"
  578. this.$refs.importPage.upload.open = true
  579. this.$refs.importPage.upload.url = '/organization-evaluation-info/import-excel'
  580. },
  581. successImport(val) {
  582. that.getTableData(that.isClickTagId)
  583. },
  584. handleExport() {
  585. let that = this
  586. let url = 'organization-evaluation-info/download-excel'
  587. let params = {
  588. organizationEvaluationId: that.tastbizKey,
  589. indicatorId: that.isClickTagId
  590. }
  591. apiGetExportMsg(url,params).then(datas =>{
  592. let blob = new Blob([datas])
  593. saveAs(blob, '考评详情数据导出.xlsx')
  594. }).catch((r) => {
  595. console.error(r)
  596. })
  597. },
  598. examineAndApprove(type) {
  599. let that = this
  600. let actionCS = ''
  601. if (type === 'agree') {
  602. if (that.rowMsg.taskType === 'SIGN') {
  603. actionCS = 'signAgree'
  604. } else if (that.rowMsg.taskType === 'NORMAL') {
  605. actionCS = 'agree'
  606. }
  607. } else {
  608. // if (that.rowMsg.taskType === 'SIGN') {
  609. // actionCS = 'signReject'
  610. // } else if (that.rowMsg.taskType === 'NORMAL') {
  611. // }
  612. actionCS = 'reject'
  613. }
  614. let params = {
  615. taskId: that.rowMsg.id, //任务ID
  616. nodeId: that.rowMsg.nodeId, //节点ID
  617. action: actionCS, //固定值
  618. instanceId: that.rowMsg.instId, //流程实例ID
  619. opinion: that.descMsg, //审批意见
  620. iamCode: window.localStorage.getItem('code'), //认证后code值
  621. taskName: that.rowMsg.name,
  622. defKey: that.instanceChild.defKey,
  623. bizKey: that.instanceChild.bizKey
  624. }
  625. apiPostIsdoAction(params).then(datas =>{
  626. if (datas && datas.data) {
  627. if (datas.data.isOk) {
  628. that.$message({
  629. message: datas.data.data,
  630. type: 'success'
  631. })
  632. that.dialogVisible = false
  633. that.$emit('approveMsg', datas.data.isOk)
  634. } else {
  635. that.$message({
  636. message: datas.data.msg,
  637. type: 'error'
  638. })
  639. }
  640. }
  641. })
  642. },
  643. changeDetail(row) {
  644. this.detailVisible = true
  645. this.detailMsg = row
  646. this.changeDetailList(row)
  647. },
  648. changeDetailList(row) {
  649. let that = this
  650. let params = {
  651. organizationEvaluationId: that.tastbizKey,
  652. indicatorId: that.isClickTagId,
  653. organizationId: row.organizationId
  654. }
  655. apiGetorganizationevaluationcommoninfo(params).then(datas =>{
  656. if (datas && datas.data) {
  657. if (datas.data.title) {
  658. let header = []
  659. for(let i in datas.data.title) {
  660. let obj = {
  661. name: i,
  662. children: datas.data.title[i]
  663. }
  664. header.push(obj)
  665. }
  666. that.monthQuarterYearDetailHeader = header
  667. }
  668. that.monthQuarterYearDetailData = datas.data.value
  669. }
  670. })
  671. },
  672. addTableDetailInfo() {
  673. if (this.monthQuarterYearDetailHeader.length>0) {
  674. let headerArr = []
  675. this.monthQuarterYearDetailHeader.forEach(item =>{
  676. headerArr = headerArr.concat(item.children)
  677. })
  678. let obj = {
  679. isAdd: true,
  680. deptName: this.userMes.deptName
  681. }
  682. headerArr.forEach(it =>{
  683. if (it.flag === '1') {
  684. obj[it.code] = '1.00'
  685. } else {
  686. obj[it.code] = ''
  687. }
  688. obj['IS_LH_'+it.code] = it.flag
  689. })
  690. this.monthQuarterYearDetailData.unshift(obj)
  691. }
  692. },
  693. saveAddDetailInfo() {
  694. let that = this
  695. let addParams = []
  696. let addObj = {}
  697. that.monthQuarterYearDetailData.forEach(it =>{
  698. addObj.organizationEvaluationId = that.tastbizKey
  699. addObj.indicatorId = that.isClickTagId
  700. addObj.organizationId = that.detailMsg.organizationId
  701. addObj.optionMap = it
  702. addParams.push(addObj)
  703. })
  704. apiPostsaveEvaluationCommonInfo(addParams).then(datas =>{
  705. if (datas) {
  706. that.detailVisible = false
  707. that.responseData(datas)
  708. }
  709. })
  710. },
  711. removeDetailData(row) {
  712. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  713. confirmButtonText: '确定',
  714. cancelButtonText: '取消',
  715. type: 'warning'
  716. }).then(() => {
  717. let that = this
  718. let parArr = []
  719. for(let i in row) {
  720. if (i.indexOf('ID_') !== -1) {
  721. parArr.push(row[i])
  722. }
  723. }
  724. apiPostremoveEvaluationCommonInfo(parArr.join(',')).then(datas =>{
  725. if (datas) {
  726. that.changeDetailList(that.detailMsg)
  727. }
  728. })
  729. })
  730. }
  731. }
  732. }
  733. </script>
  734. <style lang="less">
  735. .taskEvalFrom{
  736. .el-overlay{
  737. .el-dialog{
  738. // margin-top: 7vh;
  739. .el-dialog__body{
  740. padding: 0 20px !important;
  741. .startDetail{
  742. .starttitleSty{
  743. font-size: 18px;
  744. font-family: Microsoft YaHei;
  745. font-weight: bold;
  746. color: #3B7AD1;
  747. // line-height: 12px;
  748. margin: 20px 0 20px 10px;
  749. }
  750. .danjuMsg{
  751. border: 1px solid #D6DBEA;
  752. padding: 10px 20px;
  753. border-radius: 10px;
  754. // margin-bottom: 20px;
  755. .danjuMsg_data{
  756. padding: 5px 0 10px 0;
  757. .data_tit{
  758. margin-right: 10px;
  759. font-weight: bold;
  760. font-size: 14px;
  761. font-family: Microsoft YaHei;
  762. color: #8991B0;
  763. }
  764. .data_tit_wd{
  765. display: inline-block;
  766. width: 90px;
  767. }
  768. .el-form-item--small{
  769. .el-input{
  770. height: 25px;
  771. width: 160px;
  772. }
  773. margin-bottom: 0;
  774. .el-input-number{
  775. height: 25px;
  776. .el-input-number__decrease, .el-input-number__increase{
  777. right: -39px;
  778. }
  779. }
  780. }
  781. }
  782. }
  783. .el-select, .el-input{
  784. width: 100%;
  785. }
  786. .monthQuarterYear{
  787. display: flex;
  788. width: 100%;
  789. margin-top: 20px;
  790. .tableMain{
  791. width: calc(100% - 100px);
  792. .el-tabs__header{
  793. .el-tabs__nav{
  794. .el-tabs__item{
  795. font-size: 18px;
  796. font-family: Microsoft YaHei;
  797. font-weight: bold;
  798. margin: 0 10px;
  799. color: #8991B0;
  800. }
  801. .is-active{
  802. font-size: 18px;
  803. font-family: Microsoft YaHei;
  804. font-weight: bold;
  805. color: #3B7AD1;
  806. margin: 0 10px;
  807. }
  808. }
  809. }
  810. .detailsHeader{
  811. width: 100%;
  812. display: flex;
  813. justify-content: space-between;
  814. .headerLeft{
  815. display: flex;
  816. width: 65%;
  817. overflow-x: auto;
  818. .tagArr {
  819. height: 33px;
  820. margin-right: 10px;
  821. cursor: pointer;
  822. margin-bottom: 10px;
  823. }
  824. .el-tag--dark {
  825. background-color: #184FB4;
  826. border: 1px solid #184FB4;
  827. }
  828. .el-tag--info {
  829. background-color: #E6EBF5;
  830. border: 1px solid #E6EBF5;
  831. color: #9DA5BE;
  832. .el-tag__close {
  833. color: #9DA5BE;
  834. }
  835. }
  836. }
  837. .headerRight{
  838. display: flex;
  839. justify-content: end;
  840. width: 35%;
  841. margin-bottom: 5px;
  842. .seachFor{
  843. display: flex;
  844. .el-input{
  845. height: 30px;
  846. .el-input__inner{
  847. height:30px;
  848. }
  849. .el-input__suffix{
  850. .el-select__caret{
  851. line-height:30px;
  852. }
  853. }
  854. }
  855. .el-icon{
  856. margin: 5px 10px 0 10px;
  857. cursor: pointer;
  858. }
  859. }
  860. .tableBtn {
  861. display: flex;
  862. height: 20px;
  863. margin: 5px 8px 0 8px;
  864. // width: 20%;
  865. width: fit-content;
  866. img{
  867. margin-right: 5px;
  868. margin-top: 1px;
  869. }
  870. span{
  871. display: inline-block;
  872. width: 35px;
  873. font-size: 14px;
  874. font-family: Microsoft YaHei;
  875. font-weight: 400;
  876. }
  877. }
  878. .add{
  879. cursor: pointer;
  880. span{
  881. color: #3B7AD1;
  882. }
  883. }
  884. .save{
  885. cursor: pointer;
  886. span{
  887. color: #50C14E;
  888. }
  889. }
  890. .import{
  891. cursor: pointer;
  892. span{
  893. color: #ce1e78;
  894. }
  895. }
  896. .export{
  897. cursor: pointer;
  898. span{
  899. color: #2baa8a;
  900. }
  901. }
  902. }
  903. }
  904. .el-table {
  905. .el-table__header-wrapper{
  906. .el-table__header{
  907. .el-table__cell {
  908. border-bottom: none !important;
  909. }
  910. thead{
  911. tr{
  912. th{
  913. .cell{
  914. line-height: 16px;
  915. }
  916. }
  917. }
  918. }
  919. }
  920. }
  921. .el-table__body-wrapper {
  922. height: 35vh !important;
  923. .el-scrollbar{
  924. .is-horizontal{
  925. .el-scrollbar__thumb{
  926. // width: 100% !important;
  927. }
  928. }
  929. .el-table__body{
  930. .error-row {
  931. --el-table-tr-bg-color: #fdecec;
  932. &:hover > td{
  933. background: #fdecec !important;
  934. }
  935. }
  936. tr{
  937. td{
  938. padding: 0;
  939. .cell{
  940. // background: #F6F7FA;
  941. line-height: 47px;
  942. height: 47px;
  943. }
  944. }
  945. td:hover {
  946. line-height: 45px;
  947. height: 45px;
  948. }
  949. }
  950. }
  951. }
  952. }
  953. .el-table--border .el-table__cell{
  954. border: none;
  955. }
  956. .el-table thead.is-group th.el-table__cell{
  957. background: transparent;
  958. }
  959. .tooltipCC {
  960. width: 180px;
  961. display: inline-block;
  962. overflow: hidden;
  963. text-overflow: ellipsis;
  964. white-space: nowrap;
  965. }
  966. }
  967. .el-pagination {
  968. margin-top: 20px;
  969. text-align: end;
  970. position: relative;
  971. }
  972. }
  973. .tableSeach{
  974. width: 88px;
  975. height: 50vh;
  976. margin-left: 10px;
  977. margin-top: 37px;
  978. border: 1px solid #D6DBEA;
  979. padding: 5px 0;
  980. border-radius: 5px;
  981. overflow-y: auto;
  982. .seachType{
  983. width: 78px;
  984. height: 78px;
  985. cursor: pointer;
  986. border-left: 3px solid transparent;
  987. img{
  988. margin-top: 17px;
  989. margin-left: 27px;
  990. }
  991. p{
  992. text-align: center;
  993. font-size: 14px;
  994. }
  995. }
  996. .seachTypeCha{
  997. background: #E6EBF5;
  998. cursor: pointer;
  999. border-left: 3px solid #3B7AD1;
  1000. }
  1001. }
  1002. }
  1003. }
  1004. .detailSeach{
  1005. display: flex;
  1006. justify-content: flex-end;
  1007. margin: 15px 0;
  1008. .tableBtn {
  1009. display: flex;
  1010. height: 20px;
  1011. margin: 5px 8px 0 8px;
  1012. // width: 20%;
  1013. width: fit-content;
  1014. img{
  1015. margin-right: 5px;
  1016. margin-top: 1px;
  1017. }
  1018. span{
  1019. display: inline-block;
  1020. width: 35px;
  1021. font-size: 14px;
  1022. font-family: Microsoft YaHei;
  1023. font-weight: 400;
  1024. }
  1025. }
  1026. .add{
  1027. cursor: pointer;
  1028. span{
  1029. color: #3B7AD1;
  1030. }
  1031. }
  1032. .save{
  1033. cursor: pointer;
  1034. span{
  1035. color: #50C14E;
  1036. }
  1037. }
  1038. }
  1039. .el-table {
  1040. .indicitem{
  1041. color: #409EFF;
  1042. font-size: 12px;
  1043. margin-right: 20px;
  1044. cursor:pointer;
  1045. &:hover{
  1046. text-decoration: underline;
  1047. }
  1048. }
  1049. }
  1050. }
  1051. .el-dialog__footer{
  1052. .dialog-footer{
  1053. display: flex;
  1054. justify-content: center;
  1055. .el-button{
  1056. width: 180px !important;
  1057. height: 40px !important;
  1058. }
  1059. }
  1060. }
  1061. }
  1062. }
  1063. }
  1064. </style>