<template>
  <div></div>
</template>

<script>
import components from './_import-components/xm-audit-cpm-checkself-setdept-import'

export const metaInfo = {
  name: '合规自查-设置自查范围',
  order: 100,
}

export default {
  name: 'XmAuditCpmCheckselfSetdept',
  components,
  props: {
    dataSource: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      fields: [],
    }
  },
  computed: {},
  created() {
    // 编辑时
    if (Object.keys(this.dataSource).length > 0) {
      this.fields.forEach((f) => {
        const value = this.dataSource[f.name]
        if (value && typeof value === 'object') {
          f.value = JSON.stringify(value)
        } else {
          f.value = value
        }
      })
    }
  },
  methods: {
    validate() {
      // return this.$refs.form.validateFields()
      return true
    },
    valueChange(value, field) {
      this.dataSource[field] = value.target.value
    },
  },
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
