xttzdata.js 2.6 KB
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: "通知标题",
      },
      {
        label: "通知内容",
        render: (h, scope) => {
          return <div class="item-cwnr" domPropsInnerHTML={scope.row.noticeContent}></div>
        }
      },
      {
        prop: "noticeFileName",
        label: "通知附件",
        render: (h, scope) => {
          return <div class="pointer" onClick={() => { vm.downloadFile(scope.row) }}>{scope.row.noticeFileName}</div>
        }
      },
      {
        label: "发布状态",
        width: '80',
        render: (h, scope) => {
          switch (scope.row.noticeStatus) {
            case '1':
              return <div class='prohibit'>未发布</div>
            case '2':
              return <div class='allow'>已发布</div>
          }
        }
      },
      {
        prop: "creater",
        width: '120',
        label: "创建人",
      },
      {
        prop: "createtime",
        label: "创建时间",
      },
      {
        label: '操作',
        align: 'center',
        fixed: 'right',
        render: (h, scope) => {
          switch (scope.row.noticeStatus) {
            case '1':
              return <div>
                <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.toPublish(scope.row) }}>发布</el-button>
                <el-button type="text" onClick={() => { vm.viewDetail(scope.row) }}>查看</el-button>
                <el-button type="text" icon="el-icon-delete" onClick={() => { vm.delNotice(scope.row) }}>删除</el-button>
              </div>
            case '2':
              return <div>
                <el-button type="text" onClick={() => { vm.viewDetail(scope.row) }}>查看</el-button>
                <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.toUnPublish(scope.row) }}>撤销通知</el-button>
              </div>
          }
        }
      }
    ]
  }

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

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