zhaowei
22 小时以前 c182a210e2e5ab812e104c63c2fbb1a16e91afae
Merge remote-tracking branch 'origin/master'
已修改3个文件
384 ■■■■ 文件已修改
src/views/eam/base/EamThirdMaintenanceWorkPlanSheetList.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue 357 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/EamEquipmentLedger.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/base/EamThirdMaintenanceWorkPlanSheetList.vue
@@ -148,12 +148,6 @@
            align:"center",
            dataIndex: 'hfCode'
           },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            scopedSlots: { customRender: 'action' },
          }
        ],
        url: {
          list: "/eam/eamThirdMaintenanceWorkPlanSheet/list",
src/views/eam/base/modules/EamMaintenanceStandardDetailList.vue
@@ -4,178 +4,203 @@
</template>
<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import { getAction } from '@api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '@api/manage'
  export default {
    name: 'EamMaintenanceStandardDetailList',
    mixins: [JeecgListMixin],
    props: {
      standardId: {
        type: String,
        required: true,
        default: '-1'
      },
      pageSelectionRow: {
        type: Object,
        default: () => {
        }
      },
      filterKey: {
        type: String,
        default: ''
export default {
  name: 'EamMaintenanceStandardDetailList',
  mixins: [JeecgListMixin],
  props: {
    standardId: {
      type: String,
      required: true,
      default: '-1'
    },
    pageSelectionRow: {
      type: Object,
      default: () => {
      }
    },
    data() {
      return {
        description: '保养标准明细管理页面',
        // 表头
        columns: [],
        inspectionColumns: [
          {
            title: '序号',
            align: 'center',
            dataIndex: 'itemCode',
            width: 60
          },
          {
            title: '保养项分类',
            align: 'center',
            dataIndex: 'itemCategory_dictText',
            width: 150
          },
          {
            title: '保养项目',
            align: 'center',
            dataIndex: 'itemName',
            ellipsis: true
          },
          {
            title: '保养规范或要求',
            align: 'center',
            dataIndex: 'itemDemand',
            ellipsis: true
          }
        ],
        secondMaintenanceColumns: [
          {
            title: '序号',
            align: 'center',
            dataIndex: 'itemCode',
            width: 60
          },
          {
            title: '保养项分类',
            align: 'center',
            dataIndex: 'itemCategory_dictText',
            width: 150
          },
          {
            title: '保养项目',
            align: 'center',
            dataIndex: 'itemName',
            ellipsis: true
          }
        ],
        thirdMaintenanceColumns: [
          {
            title: '序号',
            align: 'center',
            dataIndex: 'itemCode',
            width: 60
          },
          {
            title: '保养部位',
            align: 'center',
            dataIndex: 'itemPart',
            ellipsis: true
          },
          {
            title: '保养内容',
            align: 'center',
            dataIndex: 'itemName',
            ellipsis: true
          },
          {
            title: '验收标准',
            align: 'center',
            dataIndex: 'itemDemand',
            ellipsis: true
          }
        ],
        disableMixinCreated: true,
        url: {
          list: '/eam/eamMaintenanceStandardDetail/list'
    filterKey: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      description: '保养标准明细管理页面',
      // 表头
      columns: [],
      inspectionColumns: [
        {
          title: '序号',
          align: 'center',
          dataIndex: 'itemCode',
          width: 60
        },
        {
          title: '保养项分类',
          align: 'center',
          dataIndex: 'itemCategory_dictText',
          width: 150
        },
        {
          title: '保养项目',
          headerAlign: 'center',
          align: 'left',
          dataIndex: 'itemName',
          ellipsis: true
        },
        {
          title: '保养规范或要求',
          headerAlign: 'center',
          align: 'left',
          dataIndex: 'itemDemand',
          ellipsis: true
        }
      }
    },
    watch: {
      standardId: {
        immediate: true,
        handler(val) {
          if (val) {
            this.loadData(1)
          } else {
            this.clearList()
          }
      ],
      secondMaintenanceColumns: [
        {
          title: '序号',
          align: 'center',
          dataIndex: 'itemCode',
          width: 60
        },
        {
          title: '保养项分类',
          align: 'center',
          dataIndex: 'itemCategory_dictText',
          width: 150
        },
        {
          title: '保养项目',
          headerAlign: 'center',
          align: 'left',
          dataIndex: 'itemName',
          ellipsis: true
        }
      },
      pageSelectionRow: {
        immediate: true,
        handler(val) {
          switch (val.maintenanceCategory) {
            case 'POINT_INSPECTION':
              this.columns = this.inspectionColumns
              break
            case 'SECOND_MAINTENANCE':
              this.columns = this.secondMaintenanceColumns
              break
            case 'THIRD_MAINTENANCE':
              this.columns = this.thirdMaintenanceColumns
              break
          }
      ],
      thirdMaintenanceColumns: [
        {
          title: '序号',
          align: 'center',
          dataIndex: 'itemCode',
          width: 60
        },
        {
          title: '保养部位',
          align: 'center',
          dataIndex: 'itemPart',
          ellipsis: true
        },
        {
          title: '保养内容',
          headerAlign: 'center',
          align: 'left',
          dataIndex: 'itemName',
          ellipsis: true
        },
        {
          title: '验收标准',
          headerAlign: 'center',
          align: 'left',
          dataIndex: 'itemDemand',
          ellipsis: true
        }
      }
    },
    methods: {
      loadData(arg) {
        //加载数据 若传入参数1则加载第一页的内容
        if (arg === 1) {
          this.ipagination.current = 1
        }
        let params = this.getQueryParams()//查询条件
        if (!params) {
          return false
        }
        this.dataSource = []
        params.standardId = this.standardId
        params.itemCategory = this.filterKey
        this.loading = true
        console.log('----------------------', this.filterKey)
        getAction(this.url.list, params)
          .then((res) => {
            if (res.success) {
              this.dataSource = res.result.records
              if (res.result.total) {
                this.ipagination.total = res.result.total
              } else {
                this.ipagination.total = 0
              }
            } else {
              this.$notification.warning({
                message: '消息',
                description: res.message
              })
            }
          })
          .finally(() => {
            this.loading = false
          })
      },
      clearList() {
        this.dataSource = []
        this.clearSelected()
      ],
      disableMixinCreated: true,
      url: {
        list: '/eam/eamMaintenanceStandardDetail/list'
      }
    }
  },
  watch: {
    standardId: {
      immediate: true,
      handler(val) {
        if (val) {
          this.loadData(1)
        } else {
          this.clearList()
        }
      }
    },
    pageSelectionRow: {
      immediate: true,
      handler(val) {
        switch (val.maintenanceCategory) {
          case 'POINT_INSPECTION':
            this.columns = this.inspectionColumns
            break
          case 'SECOND_MAINTENANCE':
            this.columns = this.secondMaintenanceColumns
            break
          case 'THIRD_MAINTENANCE':
            this.columns = this.thirdMaintenanceColumns
            break
        }
      }
    }
  },
  methods: {
    loadData(arg) {
      //加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1
      }
      let params = this.getQueryParams()//查询条件
      if (!params) {
        return false
      }
      this.dataSource = []
      params.standardId = this.standardId
      params.itemCategory = this.filterKey
      this.loading = true
      console.log('----------------------', this.filterKey)
      getAction(this.url.list, params)
        .then((res) => {
          if (res.success) {
            this.dataSource = res.result.records
            if (res.result.total) {
              this.ipagination.total = res.result.total
            } else {
              this.ipagination.total = 0
            }
          } else {
            this.$notification.warning({
              message: '消息',
              description: res.message
            })
          }
        })
        .finally(() => {
          this.loading = false
        })
    },
    clearList() {
      this.dataSource = []
      this.clearSelected()
    }
  }
</script>
}
</script>
<style scoped lang="less">
/* 表头全部居中 */
::v-deep .ant-table-thead > tr > th {
  text-align: center !important;
}
/* 表体:序号、保养项分类、保养部位的内容居中 */
::v-deep .ant-table-tbody > tr > td[data-col="itemCode"],
::v-deep .ant-table-tbody > tr > td[data-col="itemCategory_dictText"],
::v-deep .ant-table-tbody > tr > td[data-col="itemPart"] {
  text-align: center !important;
}
/* 表体:保养项目、保养内容、验收标准的内容左对齐 */
::v-deep .ant-table-tbody > tr > td[data-col="itemName"],
::v-deep .ant-table-tbody > tr > td[data-col="itemDemand"] {
  text-align: left !important;
}
</style>
src/views/eam/equipment/EamEquipmentLedger.vue
@@ -220,7 +220,9 @@
          {
            title: '使用部门',
            dataIndex: 'factoryOrgCode',
            scopedSlots: { customRender: 'factoryOrgCode' }
            scopedSlots: { customRender: 'factoryOrgCode' },
            headerAlign: 'center',
            align: 'left'
          },
          {
            title: '所属分类',
@@ -493,4 +495,19 @@
      }
    }
  }
</script>
</script>
<style scoped lang="less">
/* 表头全部居中 */
::v-deep .ant-table-thead > tr > th {
  text-align: center !important;
}
/* 表体:左对齐 */
::v-deep .ant-table-tbody > tr > td[data-col="factoryOrgCode"] {
  text-align: left !important;
}
</style>