monthQuarterYearFrom.vue 45 KB

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