scoringRulesNewPage.vue 17 KB

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