evaluationStartFrom.vue 15 KB

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