Blame view

src/views/system/xttz/xttzdata.js 2.99 KB
蔡俊立 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
import filter from '@/utils/filter.js'
let vm = null
const sendThis = (_this) => {
  vm = _this
}
class data extends filter {
  constructor() {
    super()
  }
  columns () {
    return [
      {
        label: '序号',
        type: 'index',
        width: '50',
        render: (h, scope) => {
          return (
            <div>
              {(vm.pageData.currentPage - 1) * vm.pageData.pageSize + scope.$index + 1}
            </div>
          )
        }
      },
      {
        prop: "noticeTitle",
        label: "通知标题",
27
        minWidth: '130',
蔡俊立 committed
28 29
      },
      {
蔡俊立 committed
30 31 32 33
        prop: "noticeSource",
        label: "通知来源",
      },
      {
蔡俊立 committed
34
        label: "通知内容",
35
        minWidth: '170',
蔡俊立 committed
36
        render: (h, scope) => {
37 38 39
          return <el-tooltip effect="dark" content={this.filterHtml(scope.row.noticeContent)} placement="top">
            <div class="item-cwnr" domPropsInnerHTML={scope.row.noticeContent}></div>
          </el-tooltip>
蔡俊立 committed
40 41 42 43 44 45
        }
      },
      {
        label: "发布状态",
        width: '80',
        render: (h, scope) => {
任超 committed
46 47 48 49 50
          switch (scope.row.noticeStatus) {
            case '1':
              return <div class='prohibit'>未发布</div>
            case '2':
              return <div class='allow'>已发布</div>
蔡俊立 committed
51
          }
任超 committed
52
        }
蔡俊立 committed
53 54
      },
      {
蔡俊立 committed
55 56
        prop: "noticePublishTime",
        label: "发布时间",
57
        width: '140'
蔡俊立 committed
58 59
      },
      {
赵千 committed
60 61 62 63 64
        prop: "failureTime",
        label: "失效时间",
        width: '140'
      },
      {
蔡俊立 committed
65 66 67 68 69 70 71
        prop: "creater",
        width: '120',
        label: "创建人",
      },
      {
        prop: "createtime",
        label: "创建时间",
72
        width: '140'
蔡俊立 committed
73 74 75 76
      },
      {
        label: '操作',
        align: 'center',
77
        width: '130',
蔡俊立 committed
78 79 80 81
        render: (h, scope) => {
          switch (scope.row.noticeStatus) {
            case '1':
              return <div>
蔡俊立 committed
82 83
                <el-button type="text" icon="el-icon-view" onClick={() => { vm.openDialog(scope.row) }}>查看</el-button>
                <el-button type="text" icon="el-icon-edit" onClick={() => { vm.editNotice(scope.row) }}>编辑</el-button>
蔡俊立 committed
84 85 86 87
                <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.toPublish(scope.row) }}>发布</el-button>
                <el-button type="text" icon="el-icon-delete" onClick={() => { vm.delNotice(scope.row) }}>删除</el-button>
              </div>
            case '2':
任超 committed
88
              return <div>
蔡俊立 committed
89
                <el-button type="text" icon="el-icon-view" onClick={() => { vm.openDialog(scope.row) }}>查看</el-button>
任超 committed
90
                <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.toUnPublish(scope.row) }}>撤销通知</el-button>
蔡俊立 committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
              </div>
          }
        }
      }
    ]
  }

  ywlys () {
    return [
      { value: 1, label: "办事大厅" },
      { value: 2, label: "微信小程序" },
      { value: 3, label: "法院端" },
      { value: 4, label: "银行端" },
    ]
  }

}
let datas = new data()
export {
  datas,
  sendThis
}