index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
  3. :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents">
  4. <div class="cartographer_big">
  5. <el-dialog title="详情" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
  6. <zj-page-container v-if="formBool">
  7. <zj-page-fill class="neibuview" v-if="formBool">
  8. <zj-form-container v-if="formBool" :formAttributes="{ 'label-position': 'top' }">
  9. <zj-form-module v-if="formBool" title="" :form-data="formData" :form-items="formItems">
  10. </zj-form-module>
  11. </zj-form-container>
  12. </zj-page-fill>
  13. </zj-page-container>
  14. </el-dialog>
  15. </div>
  16. </template-page>
  17. </template>
  18. <script>
  19. import TemplatePage from '@/components/template/template-page-1.vue'
  20. import import_mixin from '@/components/template/import_mixin.js'
  21. import operation_mixin from '@/components/template/operation_mixin.js'
  22. import { enginMaterialList, enginMaterialListExport, enginMaterialDetail } from "@/api/applicationWithoutFee.js"
  23. import feel from "../mixins/feel.js"
  24. export default {
  25. components: {
  26. TemplatePage,
  27. },
  28. mixins: [import_mixin, operation_mixin, feel],
  29. data() {
  30. return {
  31. formBool: false,
  32. // 表格属性
  33. tableAttributes: {
  34. // 启用勾选列
  35. selectColumn: false,
  36. },
  37. // 表格事件
  38. tableEvents: {
  39. 'selection-change': this.selectionChange
  40. },
  41. formData: {}
  42. }
  43. },
  44. methods: {
  45. // 列表请求函数
  46. getList(p, cb) {
  47. try {
  48. var pam = JSON.parse(JSON.stringify(p))
  49. pam.params.push({ "param": "is_all_fee", "compare": "=", "value": "YES" })
  50. cb && cb(pam)
  51. return enginMaterialList(pam)
  52. } catch (err) {
  53. console.log(err)
  54. }
  55. },
  56. // 列表导出函数
  57. exportList: enginMaterialListExport,
  58. // 表格列解析渲染数据更改
  59. columnParsing(item, defaultData) {
  60. return defaultData
  61. },
  62. // 监听勾选变化
  63. selectionChange(data) {
  64. this.recordSelected = data
  65. },
  66. operation() {
  67. return this.operationBtn({
  68. detail: {
  69. click: ({ row, index, column }) => {
  70. console.log(row)
  71. enginMaterialDetail({
  72. id: row.orderId
  73. }).then(res => {
  74. this.formData = res.data
  75. this.$nextTick(() => {
  76. this.formBool = true
  77. })
  78. })
  79. }
  80. }
  81. })
  82. },
  83. handleClose() {
  84. this.$refs.formRef.$refs.inlineForm.clearValidate()
  85. this.formData = {}
  86. this.formBool = false
  87. },
  88. }
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .neibuview {
  93. box-sizing: border-box;
  94. padding-left: 16px;
  95. ::v-deep &>.zj-page-fill-scroll {
  96. box-sizing: border-box;
  97. padding-right: 16px;
  98. &>div:nth-child(1) {
  99. margin-top: 20px;
  100. }
  101. }
  102. }
  103. </style>