evaluationYearFrom.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <template>
  2. <div class="startFrom">
  3. <el-dialog title="年度考评详情" v-model="dialogVisible" width="80vw" :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.creator}}</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="detaTableBtns">
  49. <div class="tableBtn add" v-if="activeName === 'second'">
  50. <img :src="addIcon" alt="">
  51. <span>新增</span>
  52. </div>
  53. <div class="tableBtn save" @click="saveDetail" v-if="$utils.havePurview('evalYear:twoLevel:save')">
  54. <img :src="saveIcon" alt="">
  55. <span>保存</span>
  56. </div>
  57. <!-- <div class="tableBtn edit">
  58. <img :src="editIcon" alt="">
  59. <span>新增</span>
  60. </div> -->
  61. <!-- <div class="tableBtn delete">
  62. <img :src="deleteIcon" alt="">
  63. <span>删除</span>
  64. </div> -->
  65. </div>
  66. <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
  67. <el-tab-pane label="考评指标项内容" name="first">
  68. <el-table :data="quantifiedList" style="width: 100%" @select="rowClick" @select-all="rowClick">
  69. <el-table-column type="selection" label="操作" align="center"></el-table-column>
  70. <el-table-column type="index" label="序号" width="80" />
  71. <el-table-column label="业务阶段" prop="stageName" />
  72. <el-table-column label="业务属性" prop="sectionName" />
  73. <el-table-column label="单位名称" prop="organizationName" width="300" />
  74. <el-table-column label="填报部门" prop="deptName" width="260" />
  75. <el-table-column label="指标分类" prop="typeName" />
  76. <el-table-column label="指标名称" prop="childName" />
  77. <el-table-column label="指标项" prop="optionName" />
  78. <el-table-column label="值" width="150">
  79. <template #default="scope">
  80. <el-input-number v-model="scope.row.quantifiedValue" :precision="2" :step="0.1" :min="1" />
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="单位" prop="unit" />
  84. </el-table>
  85. </el-tab-pane>
  86. <el-tab-pane label="考评评价指标内容" name="second">
  87. <el-table :data="nonQuantifiedList" style="width: 100%">
  88. <el-table-column type="index" label="序号" width="80" />
  89. <el-table-column label="业务阶段" prop="stageName" />
  90. <el-table-column label="业务属性" prop="sectionName" />
  91. <el-table-column label="单位名称" prop="organizationName" width="300" />
  92. <el-table-column label="填报部门" prop="deptName" width="260" />
  93. <el-table-column label="指标分类" prop="typeName" />
  94. <el-table-column label="指标名称" prop="childName" />
  95. <el-table-column label="指标项" prop="optionName" />
  96. <el-table-column label="值" width="150">
  97. <template #default="scope">
  98. <el-input v-model="scope.row.nonQuantifiedValue" />
  99. </template>
  100. </el-table-column>
  101. </el-table>
  102. </el-tab-pane>
  103. </el-tabs>
  104. </div>
  105. <template #footer>
  106. <span class="dialog-footer">
  107. <el-button type="primary" @click="dialogVisible = false">取 消</el-button>
  108. </span>
  109. </template>
  110. </el-dialog>
  111. </div>
  112. </template>
  113. <script>
  114. import {apiGetOrgEvalInfoList,apiGetOrgEvaInfoBatchDto} from '../../api/api'
  115. import addIcon from '../../assets/btnIcon/add.png'
  116. import saveIcon from '../../assets/btnIcon/save.png'
  117. import editIcon from '../../assets/btnIcon/edit.png'
  118. import deleteIcon from '../../assets/btnIcon/delete.png'
  119. export default {
  120. data() {
  121. return {
  122. dialogVisible: false,
  123. activeName: 'first',
  124. quantifiedList: [],
  125. nonQuantifiedList: [],
  126. changeDateSelect: [],
  127. receiptMsg: {
  128. code: '',
  129. des: '',
  130. stage: '',
  131. creator: '',
  132. createDate: '',
  133. type: '',
  134. year: '',
  135. recStage: ''
  136. },
  137. addIcon: addIcon,
  138. saveIcon: saveIcon,
  139. editIcon: editIcon,
  140. deleteIcon: deleteIcon,
  141. rowMsg: {}
  142. }
  143. },
  144. created() {
  145. },
  146. methods: {
  147. init(row) {
  148. this.dialogVisible = true
  149. this.activeName = 'first'
  150. this.receiptMsg = {
  151. code: row.organizationEvaluationCode,
  152. des: row.des,
  153. stage: row.stage,
  154. creator: row.createBy,
  155. createDate: row.createTime,
  156. type: row.checkCycle === 'YDKP'?'月度考评':row.checkCycle === 'JDKP'?'季度考评':'年度考评',
  157. year: row.year,
  158. recStage: '有效'
  159. }
  160. this.getDetails(row.id)
  161. this.rowMsg = row
  162. },
  163. handleClick() {
  164. this.changeDateSelect = []
  165. },
  166. rowClick(selection, row) {
  167. this.changeDateSelect = selection
  168. },
  169. //获取详情
  170. getDetails(id) {
  171. let that = this
  172. let params = {
  173. organizationEvaluationId: id
  174. }
  175. apiGetOrgEvalInfoList(params).then(datas =>{
  176. if (datas && datas.data) {
  177. that.quantifiedList = datas.data.quantifiedList
  178. that.nonQuantifiedList = datas.data.nonQuantifiedList
  179. }
  180. })
  181. },
  182. saveDetail() {
  183. let that = this
  184. let params = []
  185. if (that.activeName === 'first') {
  186. that.quantifiedList.forEach(item =>{
  187. let obj = {
  188. id: item.id,
  189. isQuantified: '是',
  190. quantifiedValue: item.quantifiedValue
  191. }
  192. params.push(obj)
  193. })
  194. } else {
  195. that.nonQuantifiedList.forEach(item =>{
  196. let obj = {
  197. id: item.id,
  198. isQuantified: '否',
  199. nonQuantifiedValue: item.nonQuantifiedValue
  200. }
  201. params.push(obj)
  202. })
  203. }
  204. apiGetOrgEvaInfoBatchDto(params).then(datas =>{
  205. if (datas && datas.success) {
  206. that.$message({
  207. message: '保存成功',
  208. type: 'success'
  209. });
  210. that.getDetails(that.rowMsg.id)
  211. }
  212. })
  213. }
  214. }
  215. }
  216. </script>
  217. <style lang="less">
  218. .startFrom{
  219. .el-overlay{
  220. .el-dialog{
  221. // margin-top: 7vh;
  222. .el-dialog__body{
  223. padding: 0 20px !important;
  224. .startDetail{
  225. .starttitleSty{
  226. font-size: 18px;
  227. font-family: Microsoft YaHei;
  228. font-weight: bold;
  229. color: #3B7AD1;
  230. // line-height: 12px;
  231. margin: 20px 0 20px 10px;
  232. }
  233. .danjuMsg{
  234. border: 1px solid #D6DBEA;
  235. padding: 10px 20px;
  236. border-radius: 10px;
  237. margin-bottom: 20px;
  238. .danjuMsg_data{
  239. padding: 5px 0 10px 0;
  240. .data_tit{
  241. margin-right: 10px;
  242. font-weight: bold;
  243. font-size: 14px;
  244. font-family: Microsoft YaHei;
  245. color: #8991B0;
  246. }
  247. .data_tit_wd{
  248. display: inline-block;
  249. width: 90px;
  250. }
  251. .el-form-item--small{
  252. .el-input{
  253. height: 25px;
  254. width: 160px;
  255. }
  256. margin-bottom: 0;
  257. .el-input-number{
  258. height: 25px;
  259. .el-input-number__decrease, .el-input-number__increase{
  260. right: -39px;
  261. }
  262. }
  263. }
  264. }
  265. }
  266. .el-select, .el-input{
  267. width: 100%;
  268. }
  269. .detaTableBtns{
  270. display: flex;
  271. width: 500px;
  272. position: relative;
  273. top: 32px;
  274. left: 90vw;
  275. z-index: 11111;
  276. .tableBtn {
  277. display: flex;
  278. margin-right: 30px;
  279. img{
  280. margin-right: 5px;
  281. margin-top: 1px;
  282. }
  283. span{
  284. font-size: 14px;
  285. font-family: Microsoft YaHei;
  286. font-weight: 400;
  287. }
  288. }
  289. .add{
  290. cursor: no-drop;
  291. span{
  292. color: #3B7AD1;
  293. }
  294. }
  295. .save{
  296. cursor: pointer;
  297. span{
  298. color: #50C14E;
  299. }
  300. }
  301. .edit{
  302. span{
  303. color: #F5A623;
  304. }
  305. }
  306. .delete{
  307. cursor: no-drop;
  308. span{
  309. color: #F65177;
  310. }
  311. }
  312. }
  313. .el-tabs{
  314. .el-tabs__header{
  315. .el-tabs__nav{
  316. .el-tabs__item{
  317. font-size: 18px;
  318. font-family: Microsoft YaHei;
  319. font-weight: bold;
  320. margin: 0 10px;
  321. color: #8991B0;
  322. }
  323. .is-active{
  324. font-size: 18px;
  325. font-family: Microsoft YaHei;
  326. font-weight: bold;
  327. color: #3B7AD1;
  328. margin: 0 10px;
  329. }
  330. }
  331. }
  332. .el-table{
  333. .el-table__body-wrapper{
  334. height: 55vh;
  335. }
  336. .el-table__row{
  337. .cell{
  338. .el-input{
  339. height: 24px;
  340. .el-input__inner{
  341. height: 24px;
  342. }
  343. }
  344. }
  345. }
  346. }
  347. }
  348. }
  349. }
  350. .el-dialog__footer{
  351. .dialog-footer{
  352. display: flex;
  353. justify-content: center;
  354. .el-button{
  355. width: 180px !important;
  356. height: 40px !important;
  357. }
  358. }
  359. }
  360. }
  361. }
  362. }
  363. </style>