scoringRulesNewPage.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <template>
  2. <div class="scoringRules" v-loading="loadingImport">
  3. <div class="scoringRulesBtn">
  4. <div class="collectSeach" :style="$utils.collectSeachSty()">
  5. <div class="exceed">
  6. <span class="exceedSpan">指标名称:</span>
  7. <el-input v-model="indicatorIdS" placeholder="请输入指标名称"></el-input>
  8. </div>
  9. <div class="exceed">
  10. <span class="exceedSpan" style="width: 80px">业务属性:</span>
  11. <el-select v-model="binSectionIds" placeholder="请选择业务属性">
  12. <el-option
  13. v-for="item in moduleData"
  14. :key="item.id"
  15. :label="item.sectionName"
  16. :value="item.id">
  17. </el-option>
  18. </el-select>
  19. </div>
  20. <div class="exceed">
  21. <span class="exceedSpan" style="width: 80px;margin-left:10px">考评周期:</span>
  22. <el-select v-model="evaluationCycleStr" placeholder="请选择考评周期">
  23. <el-option
  24. v-for="item in periodData"
  25. :key="item.keyValue"
  26. :label="item.keyName"
  27. :value="item.keyValue"
  28. :disabled="item.keyValue === 'YDKP'">
  29. </el-option>
  30. </el-select>
  31. </div>
  32. <seachs @handleSeach="getSeachData" @handleRest="resetSeach"></seachs>
  33. </div>
  34. <div class="scoringRulesTableData">
  35. <el-table :data="scoringRulesData" style="width: 100%" @row-dblclick="editRuleDetail">
  36. <el-table-column label="序号" type="index" align="center" />
  37. <el-table-column label="指标编码" prop="indicatorCode" width="200" />
  38. <el-table-column label="业务属性" prop="binSectionName" />
  39. <el-table-column label="业务阶段" prop="binStageName" />
  40. <el-table-column label="指标类型" prop="indicatorTypeName" width="200" />
  41. <el-table-column label="指标名称" prop="indicatorName" width="300" />
  42. <el-table-column label="考评周期" prop="evaluationCycle">
  43. <template #default="scope">
  44. <span>{{scope.row.evaluationCycle==='YDKP'?'月度考评':scope.row.evaluationCycle==='JDKP'?'季度考评':'年度考评'}}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="指标单位" prop="unit" />
  48. <el-table-column label="是否专项" prop="isAdditional" />
  49. <el-table-column label="描述" width="250">
  50. <template #default="scope">
  51. <span>{{scope.row.des}}</span>
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. <el-pagination
  56. @size-change="handleSizeChange"
  57. @current-change="handleCurrentChange"
  58. :current-page="page.currentPage"
  59. :page-size="page.pagesize"
  60. layout="total, prev, pager, next, jumper"
  61. :total="page.total">
  62. </el-pagination>
  63. </div>
  64. </div>
  65. <rule-new-detail ref="ruleNewDetail"></rule-new-detail>
  66. </div>
  67. </template>
  68. <script>
  69. import seachs from '../seachGroup.vue'
  70. import ruleNewDetail from './scoringRulesNewDetailPage.vue'
  71. import {apiGetIndicatorList, apiGetbinsectionList,
  72. apiGetIndicatorTypeList, apiGetdatadictionaryList, apiGetbinstageList} from '../../api/api'
  73. export default {
  74. components: { seachs, ruleNewDetail },
  75. data() {
  76. return {
  77. indicatorIdS: '',
  78. binSectionIds: '',
  79. evaluationCycleStr: '',
  80. scoringRulesData:[],
  81. moduleData: [],
  82. stageData: [],
  83. periodData: [],
  84. page:{
  85. pagesize: 12,
  86. currentPage: 1,
  87. total: 0
  88. },
  89. winPix: window.devicePixelRatio,
  90. }
  91. },
  92. created() {
  93. this.getEvaluationData()
  94. this.getDataDictionary()
  95. this.getPeriodData()
  96. },
  97. methods:{
  98. // 查询指标数据
  99. getEvaluationData() {
  100. let that = this
  101. let params = {
  102. pageNum: that.page.currentPage,
  103. pageSize: that.page.pagesize,
  104. indicatorName: that.indicatorIdS,
  105. binSection: that.binSectionIds,
  106. evaluationCycle: that.evaluationCycleStr
  107. }
  108. apiGetIndicatorList(params).then(datas =>{
  109. if (datas && datas.data) {
  110. that.scoringRulesData = datas.data.records
  111. that.page.total = datas.data.total
  112. }
  113. })
  114. },
  115. // 查询指标类别
  116. getindicatorTypeData() {
  117. let that = this
  118. apiGetIndicatorTypeList().then(datas =>{
  119. if (datas && datas.data) {
  120. that.indicatorTypeData = datas.data
  121. }
  122. })
  123. },
  124. //考评周期
  125. getPeriodData() {
  126. let that = this
  127. let params = {
  128. superKey: 'KPZQ0001'
  129. }
  130. apiGetdatadictionaryList(params).then(datas =>{
  131. if (datas && datas.data) {
  132. that.periodData = datas.data
  133. }
  134. })
  135. },
  136. // 查询部门
  137. // 查询规则模块和阶段数据
  138. getDataDictionary(val) {
  139. let that = this
  140. apiGetbinsectionList().then(datas =>{
  141. if (datas && datas.data) {
  142. that.moduleData = datas.data
  143. }
  144. })
  145. apiGetbinstageList().then(datas =>{
  146. if (datas && datas.data) {
  147. that.stageData = datas.data
  148. }
  149. })
  150. },
  151. editRuleDetail(row) {
  152. this.$refs.ruleNewDetail.init(row)
  153. },
  154. getSeachData() {
  155. this.page.currentPage = 1
  156. this.getEvaluationData()
  157. },
  158. resetSeach() {
  159. this.page.currentPage = 1
  160. this.indicatorIdS = ''
  161. this.binSectionIds = ''
  162. this.evaluationCycleStr = ''
  163. this.getEvaluationData()
  164. },
  165. handleSizeChange(val){
  166. this.page.pagesize = val
  167. this.getEvaluationData()
  168. },
  169. handleCurrentChange(val){
  170. this.page.currentPage =val
  171. this.getEvaluationData()
  172. }
  173. }
  174. }
  175. </script>
  176. <style lang="less">
  177. .scoringRules{
  178. .scoringRulesBtn{
  179. .collectSeach{
  180. display: flex;
  181. padding: 24px 20px;
  182. border-bottom: 1px solid#D6DBEA;
  183. .exceed{
  184. display: flex;
  185. .exceedSpan{
  186. width: 100px;
  187. height: 12px;
  188. font-size: 14px;
  189. font-family: Microsoft YaHei;
  190. font-weight: 400;
  191. color: #8991B0;
  192. line-height: 12px;
  193. margin-top: 14px;
  194. }
  195. .el-input{
  196. margin-right:10px;
  197. .el-input__inner{
  198. height:30px;
  199. }
  200. .el-input__suffix{
  201. .el-select__caret{
  202. line-height:30px;
  203. }
  204. }
  205. }
  206. .el-select{
  207. line-height: 40px !important;
  208. .el-input__inner, .is-disabled{
  209. height:40px !important;
  210. }
  211. .el-input__suffix{
  212. .el-select__caret{
  213. line-height:40px;
  214. }
  215. }
  216. }
  217. }
  218. }
  219. span{
  220. font-size:14px;
  221. }
  222. .PeriodBtn{
  223. display: flex;
  224. justify-content: flex-end;
  225. padding: 20px 0;
  226. }
  227. .el-button{
  228. height: 30px;
  229. // width:100px;
  230. padding: 0 30px ;
  231. // padding-top: 8px;
  232. span{
  233. margin:0;
  234. }
  235. }
  236. .indexdialog{
  237. .el-overlay{
  238. .el-dialog{
  239. .el-dialog__body{
  240. padding: 0px 20px 0px 20px !important;
  241. border-top: 1px solid #D6DBEA;
  242. border-bottom: 1px solid #D6DBEA;
  243. .periodFrom{
  244. .el-select, .el-input{
  245. width: 100%;
  246. }
  247. .el-select{
  248. .el-input__inner, .is-disabled{
  249. height:30px !important;
  250. }
  251. }
  252. .DruleForm{
  253. padding: 20px 60px 20px 20px;
  254. }
  255. .indicatorItemBtn{
  256. padding: 10px 20px 0 20px;
  257. border-left: 1px solid #D6DBEA;
  258. span{
  259. font-size:14px;
  260. }
  261. .PeriodBtnDia{
  262. display: flex;
  263. justify-content: space-between;
  264. padding: 20px 0;
  265. .indItemC{
  266. position: relative;
  267. // left: -600px;
  268. top: 15px;
  269. font-size: 16px;
  270. font-family: Microsoft YaHei;
  271. font-weight: 600;
  272. color: #3B7AD1;
  273. }
  274. .el-button{
  275. height: 30px;
  276. padding: 0 30px ;
  277. span{
  278. margin:0;
  279. }
  280. }
  281. .is-disabled{
  282. opacity: 0.5;
  283. }
  284. }
  285. .indicatorItemTableData{
  286. // max-height: 75vh !important;
  287. height: 75vh !important;
  288. overflow-y: auto;
  289. .datasMsg{
  290. .tableBtn {
  291. display: flex;
  292. justify-content: end;
  293. margin-right: 30px;
  294. img{
  295. margin-right: 5px;
  296. margin-top: 1px;
  297. width: 18px;
  298. height: 18px;
  299. }
  300. span{
  301. position: relative;
  302. top: -2px;
  303. font-size: 14px;
  304. font-family: Microsoft YaHei;
  305. font-weight: 400;
  306. }
  307. }
  308. .add{
  309. cursor: pointer;
  310. span{
  311. color: #3B7AD1;
  312. }
  313. }
  314. .el-collapse{
  315. .el-collapse-item{
  316. .el-collapse-item__header{
  317. .nameTit{
  318. display: inline-block;
  319. height: 20px;
  320. font-size: 12px;
  321. font-weight: bold;
  322. position: relative;
  323. top: -8px;
  324. }
  325. .el-input{
  326. width: 150px;
  327. margin-right: 10px;
  328. }
  329. }
  330. .el-table{
  331. .el-table__body-wrapper{
  332. }
  333. .el-input__inner{
  334. height: 30px !important;
  335. }
  336. .el-radio__label{
  337. display: none;
  338. }
  339. }
  340. .indicitem{
  341. color: #409EFF;
  342. font-size: 12px;
  343. margin-right: 20px;
  344. cursor:pointer;
  345. &:hover{
  346. text-decoration: underline;
  347. }
  348. }
  349. .el-pagination{
  350. margin-top: 20px;
  351. text-align: end;
  352. position: relative;
  353. }
  354. .el-button{
  355. height: 26px;
  356. padding: 0 15px ;
  357. span{
  358. margin:0;
  359. }
  360. }
  361. }
  362. }
  363. }
  364. .emptyData{
  365. display: inline-block;
  366. width: 100%;
  367. // border: 1px solid #d9d9d9;
  368. text-align: center;
  369. margin-top: 50px;
  370. }
  371. }
  372. }
  373. }
  374. }
  375. .el-dialog__footer{
  376. .dialog-footer{
  377. display: flex;
  378. justify-content: center;
  379. .el-button{
  380. width: 180px !important;
  381. height: 40px !important;
  382. }
  383. }
  384. }
  385. }
  386. }
  387. }
  388. }
  389. .scoringRulesTableData{
  390. margin-top: 30px;
  391. .el-table{
  392. .el-table__body-wrapper{
  393. height: 63vh !important;
  394. }
  395. .el-input__inner{
  396. height: 30px !important;
  397. }
  398. .el-radio__label{
  399. display: none;
  400. }
  401. .indicitem{
  402. color: #409EFF;
  403. font-size: 12px;
  404. margin-right: 20px;
  405. cursor:pointer;
  406. &:hover{
  407. text-decoration: underline;
  408. }
  409. }
  410. }
  411. .el-pagination{
  412. margin-top: 20px;
  413. text-align: end;
  414. position: relative;
  415. }
  416. }
  417. }
  418. </style>