Blame view

src/utils/filter.js 1.12 KB
1 2 3
/*
 * @Description: 
 * @Autor: renchao
4
 * @LastEditTime: 2023-04-25 17:05:49
5
 */
任超 committed
6
import store from '@/store'
任超 committed
7 8
// table 内部过滤器 由于过滤器只能在模板中使用 所以 就有了 jsx内部方法过滤器
export default class filter {
任超 committed
9
  selected (row) {
10 11 12 13 14 15
    // if (row.sfbl == 0) { // 正在办理不能申请
    //   return false 
    // } else {
    //   return true //可选择
    // }
    return true
任超 committed
16
  }
任超 committed
17
  // 业务来源
任超 committed
18
  busSource (val) {
19
    let status = { 1: '办事大厅', 2: '微信小程序' }
任超 committed
20 21
    return status[val]
  }
22 23 24 25 26 27

  //申请分类(1:正常申请,2:一并申请,3:补录申请)
  sqfls (val) {
    let status = { 1: '正常申请', 2: '一并申请', 3: '补录申请' }
    return status[val]
  }
任超 committed
28 29 30 31 32 33 34 35 36 37 38 39 40
  // 字典
  dicStatus (val, code) {
    let data = store.getters.dictData[code],
      name = '暂无'
    if (data) {
      data.map((item) => {
        if (item.dcode == val) {
          name = item.dname
        }
      })
      return name
    }
  }
41 42 43 44
  filterHtml (content) {
    return content.replace(/<[^>]+>/g, '');
  }
  getDictData (val) {
45 46
    return store.getters.dictData[val]
  }
任超 committed
47
}