taskCenterEvlNewFrom.vue 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080
  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] = '0.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. that.monthQuarterYearDetailData.forEach(it =>{
  697. let addObj = {
  698. organizationEvaluationId: that.tastbizKey,
  699. indicatorId: that.isClickTagId,
  700. organizationId: that.detailMsg.organizationId,
  701. optionMap: it
  702. }
  703. addParams.push(addObj)
  704. })
  705. apiPostsaveEvaluationCommonInfo(addParams).then(datas =>{
  706. if (datas) {
  707. that.detailVisible = false
  708. that.responseData(datas)
  709. }
  710. })
  711. },
  712. removeDetailData(row) {
  713. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  714. confirmButtonText: '确定',
  715. cancelButtonText: '取消',
  716. type: 'warning'
  717. }).then(() => {
  718. let that = this
  719. let parArr = []
  720. for(let i in row) {
  721. if (i.indexOf('ID_') !== -1) {
  722. parArr.push(row[i])
  723. }
  724. }
  725. apiPostremoveEvaluationCommonInfo(parArr.join(',')).then(datas =>{
  726. if (datas) {
  727. that.changeDetailList(that.detailMsg)
  728. }
  729. })
  730. })
  731. }
  732. }
  733. }
  734. </script>
  735. <style lang="less">
  736. .taskEvalFrom{
  737. .el-overlay{
  738. .el-dialog{
  739. // margin-top: 7vh;
  740. .el-dialog__body{
  741. padding: 0 20px !important;
  742. .startDetail{
  743. .starttitleSty{
  744. font-size: 18px;
  745. font-family: Microsoft YaHei;
  746. font-weight: bold;
  747. color: #3B7AD1;
  748. // line-height: 12px;
  749. margin: 20px 0 20px 10px;
  750. }
  751. .danjuMsg{
  752. border: 1px solid #D6DBEA;
  753. padding: 10px 20px;
  754. border-radius: 10px;
  755. // margin-bottom: 20px;
  756. .danjuMsg_data{
  757. padding: 5px 0 10px 0;
  758. .data_tit{
  759. margin-right: 10px;
  760. font-weight: bold;
  761. font-size: 14px;
  762. font-family: Microsoft YaHei;
  763. color: #8991B0;
  764. }
  765. .data_tit_wd{
  766. display: inline-block;
  767. width: 90px;
  768. }
  769. .el-form-item--small{
  770. .el-input{
  771. height: 25px;
  772. width: 160px;
  773. }
  774. margin-bottom: 0;
  775. .el-input-number{
  776. height: 25px;
  777. .el-input-number__decrease, .el-input-number__increase{
  778. right: -39px;
  779. }
  780. }
  781. }
  782. }
  783. }
  784. .el-select, .el-input{
  785. width: 100%;
  786. }
  787. .monthQuarterYear{
  788. display: flex;
  789. width: 100%;
  790. margin-top: 20px;
  791. .tableMain{
  792. width: calc(100% - 100px);
  793. .el-tabs__header{
  794. .el-tabs__nav{
  795. .el-tabs__item{
  796. font-size: 18px;
  797. font-family: Microsoft YaHei;
  798. font-weight: bold;
  799. margin: 0 10px;
  800. color: #8991B0;
  801. }
  802. .is-active{
  803. font-size: 18px;
  804. font-family: Microsoft YaHei;
  805. font-weight: bold;
  806. color: #3B7AD1;
  807. margin: 0 10px;
  808. }
  809. }
  810. }
  811. .detailsHeader{
  812. width: 100%;
  813. display: flex;
  814. justify-content: space-between;
  815. .headerLeft{
  816. display: flex;
  817. width: 65%;
  818. overflow-x: auto;
  819. .tagArr {
  820. height: 33px;
  821. margin-right: 10px;
  822. cursor: pointer;
  823. margin-bottom: 10px;
  824. }
  825. .el-tag--dark {
  826. background-color: #184FB4;
  827. border: 1px solid #184FB4;
  828. }
  829. .el-tag--info {
  830. background-color: #E6EBF5;
  831. border: 1px solid #E6EBF5;
  832. color: #9DA5BE;
  833. .el-tag__close {
  834. color: #9DA5BE;
  835. }
  836. }
  837. }
  838. .headerRight{
  839. display: flex;
  840. justify-content: end;
  841. width: 35%;
  842. margin-bottom: 5px;
  843. .seachFor{
  844. display: flex;
  845. .el-input{
  846. height: 30px;
  847. .el-input__inner{
  848. height:30px;
  849. }
  850. .el-input__suffix{
  851. .el-select__caret{
  852. line-height:30px;
  853. }
  854. }
  855. }
  856. .el-icon{
  857. margin: 5px 10px 0 10px;
  858. cursor: pointer;
  859. }
  860. }
  861. .tableBtn {
  862. display: flex;
  863. height: 20px;
  864. margin: 5px 8px 0 8px;
  865. // width: 20%;
  866. width: fit-content;
  867. img{
  868. margin-right: 5px;
  869. margin-top: 1px;
  870. }
  871. span{
  872. display: inline-block;
  873. width: 35px;
  874. font-size: 14px;
  875. font-family: Microsoft YaHei;
  876. font-weight: 400;
  877. }
  878. }
  879. .add{
  880. cursor: pointer;
  881. span{
  882. color: #3B7AD1;
  883. }
  884. }
  885. .save{
  886. cursor: pointer;
  887. span{
  888. color: #50C14E;
  889. }
  890. }
  891. .import{
  892. cursor: pointer;
  893. span{
  894. color: #ce1e78;
  895. }
  896. }
  897. .export{
  898. cursor: pointer;
  899. span{
  900. color: #2baa8a;
  901. }
  902. }
  903. }
  904. }
  905. .el-table {
  906. .el-table__header-wrapper{
  907. .el-table__header{
  908. .el-table__cell {
  909. border-bottom: none !important;
  910. }
  911. thead{
  912. tr{
  913. th{
  914. .cell{
  915. line-height: 16px;
  916. }
  917. }
  918. }
  919. }
  920. }
  921. }
  922. .el-table__body-wrapper {
  923. height: 35vh !important;
  924. .el-scrollbar{
  925. .is-horizontal{
  926. .el-scrollbar__thumb{
  927. // width: 100% !important;
  928. }
  929. }
  930. .el-table__body{
  931. .error-row {
  932. --el-table-tr-bg-color: #fdecec;
  933. &:hover > td{
  934. background: #fdecec !important;
  935. }
  936. }
  937. tr{
  938. td{
  939. padding: 0;
  940. .cell{
  941. // background: #F6F7FA;
  942. line-height: 47px;
  943. height: 47px;
  944. }
  945. }
  946. td:hover {
  947. line-height: 45px;
  948. height: 45px;
  949. }
  950. }
  951. }
  952. }
  953. }
  954. .el-table--border .el-table__cell{
  955. border: none;
  956. }
  957. .el-table thead.is-group th.el-table__cell{
  958. background: transparent;
  959. }
  960. .tooltipCC {
  961. width: 180px;
  962. display: inline-block;
  963. overflow: hidden;
  964. text-overflow: ellipsis;
  965. white-space: nowrap;
  966. }
  967. }
  968. .el-pagination {
  969. margin-top: 20px;
  970. text-align: end;
  971. position: relative;
  972. }
  973. }
  974. .tableSeach{
  975. width: 88px;
  976. height: 50vh;
  977. margin-left: 10px;
  978. margin-top: 37px;
  979. border: 1px solid #D6DBEA;
  980. padding: 5px 0;
  981. border-radius: 5px;
  982. overflow-y: auto;
  983. .seachType{
  984. width: 78px;
  985. height: 78px;
  986. cursor: pointer;
  987. border-left: 3px solid transparent;
  988. img{
  989. margin-top: 17px;
  990. margin-left: 27px;
  991. }
  992. p{
  993. text-align: center;
  994. font-size: 14px;
  995. }
  996. }
  997. .seachTypeCha{
  998. background: #E6EBF5;
  999. cursor: pointer;
  1000. border-left: 3px solid #3B7AD1;
  1001. }
  1002. }
  1003. }
  1004. }
  1005. .detailSeach{
  1006. display: flex;
  1007. justify-content: flex-end;
  1008. margin: 15px 0;
  1009. .tableBtn {
  1010. display: flex;
  1011. height: 20px;
  1012. margin: 5px 8px 0 8px;
  1013. // width: 20%;
  1014. width: fit-content;
  1015. img{
  1016. margin-right: 5px;
  1017. margin-top: 1px;
  1018. }
  1019. span{
  1020. display: inline-block;
  1021. width: 35px;
  1022. font-size: 14px;
  1023. font-family: Microsoft YaHei;
  1024. font-weight: 400;
  1025. }
  1026. }
  1027. .add{
  1028. cursor: pointer;
  1029. span{
  1030. color: #3B7AD1;
  1031. }
  1032. }
  1033. .save{
  1034. cursor: pointer;
  1035. span{
  1036. color: #50C14E;
  1037. }
  1038. }
  1039. }
  1040. .el-table {
  1041. .indicitem{
  1042. color: #409EFF;
  1043. font-size: 12px;
  1044. margin-right: 20px;
  1045. cursor:pointer;
  1046. &:hover{
  1047. text-decoration: underline;
  1048. }
  1049. }
  1050. }
  1051. }
  1052. .el-dialog__footer{
  1053. .dialog-footer{
  1054. display: flex;
  1055. justify-content: center;
  1056. .el-button{
  1057. width: 180px !important;
  1058. height: 40px !important;
  1059. }
  1060. }
  1061. }
  1062. }
  1063. }
  1064. }
  1065. </style>