yubo
2026-04-06 6448ec15bfe0b65fb822a662105bceddc23b58d8
src/views/remind/contract.vue
@@ -158,11 +158,13 @@
import Pagination from '@/components/Pagination'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { dateDifference } from '@/utils/myUtil'
import dictMixin from '../../utils/dictMixin'
export default {
  components: {
    Pagination
  },
  mixins: [dictMixin],
  data() {
    return {
      dialog: {
@@ -215,8 +217,7 @@
        version: '',
        diffDay: 0
      },
      sexOptions: [],
      contractStatusOptions: [],
      dialogShowContract: false,
      contractRules: {
        empName: [{ required: true, message: '请选择员工', trigger: 'change' }],
@@ -246,14 +247,15 @@
      }
    }
  },
  computed: {
    // 字典选项计算属性
    sexOptions() { return this.getDictOptions('sex') },
    contractStatusOptions() { return this.getDictOptions('CONTRACTSTATUS') }
  },
  mounted() {
    this.fetch()
    this.getDicts('sex').then(response => {
      this.sexOptions = response.data
    })
    this.getDicts('CONTRACTSTATUS').then(response => {
      this.contractStatusOptions = response.data
    })
    // 字典数据已在登录时预加载,直接从 Vuex 获取
    this.initDictTypes(['sex', 'CONTRACTSTATUS'])
  },
  methods: {
    search() {