monthQuarterYearFrom.vue 44 KB

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