monthQuarterYearFrom.vue 45 KB

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