search.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!-- 搜索表单 -->
  2. <template>
  3. <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
  4. </template>
  5. <script>
  6. import dictMixins from '@/mixins/dictMixins';
  7. export default {
  8. props: {},
  9. mixins: [dictMixins],
  10. data() {
  11. return {
  12. typeList: [],
  13. reportWorkTypeList: []
  14. };
  15. },
  16. computed: {
  17. // 表格列配置
  18. seekList() {
  19. return [
  20. {
  21. label: '规则编码:',
  22. value: 'code',
  23. type: 'input',
  24. placeholder: '规则编码'
  25. },
  26. {
  27. label: '规则名称:',
  28. value: 'name',
  29. type: 'input',
  30. placeholder: '规则名称'
  31. },
  32. {
  33. label: '应用场景',
  34. value: 'classify',
  35. type: 'select',
  36. placeholder: '记录表分类',
  37. planList: this.typeList
  38. }
  39. // {
  40. // label: '状态:',
  41. // value: 'publishStatus',
  42. // type: 'select',
  43. // placeholder: '状态',
  44. // // 0-草稿,1-已发布,2-已撤销
  45. // planList: [
  46. // {
  47. // label: '草稿',
  48. // value: '0'
  49. // },
  50. // {
  51. // label: '已发布',
  52. // value: '1'
  53. // },
  54. // {
  55. // label: '已撤销',
  56. // value: '2'
  57. // }
  58. // ]
  59. // },
  60. // {
  61. // label: '是否启用:',
  62. // value: 'enable',
  63. // type: 'select',
  64. // placeholder: '是否启用',
  65. // // 0-草稿,1-已发布,2-已撤销
  66. // planList: [
  67. // {
  68. // label: '启用',
  69. // value: '1'
  70. // },
  71. // {
  72. // label: '停用',
  73. // value: '0'
  74. // }
  75. // ]
  76. // }
  77. ];
  78. }
  79. },
  80. mounted() {
  81. this.requestDict('记录规则类型').then(() => {
  82. if (this.$store.state.dict['record_sheet']) {
  83. this.typeList = this.$store.state.dict['record_sheet'].map((i) => {
  84. return { label: i.dictValue, value: i.dictCode };
  85. });
  86. }
  87. });
  88. this.requestDict('记录规则报工类型').then(() => {
  89. if (this.$store.state.dict['record_rules_report_work_type']) {
  90. this.reportWorkTypeList = this.$store.state.dict[
  91. 'record_rules_report_work_type'
  92. ].map((i) => {
  93. return { label: i.dictValue, value: i.dictCode };
  94. });
  95. }
  96. });
  97. },
  98. methods: {
  99. /* 搜索 */
  100. search(e) {
  101. this.$emit('search', {
  102. ...e
  103. });
  104. }
  105. }
  106. };
  107. </script>