xttzdata.js 2.87 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: "通知标题",
        minWidth: '130',
      },
      {
        prop: "noticeSource",
        label: "通知来源",
      },
      {
        label: "通知内容",
        minWidth: '170',
        render: (h, scope) => {
          return <div class="item-cwnr" domPropsInnerHTML={scope.row.noticeContent}></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: "noticePublishTime",
        label: "发布时间",
        width: '140'
      },
      {
        prop: "failureTime",
        label: "失效时间",
        width: '140'
      },
      {
        prop: "creater",
        width: '120',
        label: "创建人",
      },
      {
        prop: "createtime",
        label: "创建时间",
        width: '140'
      },
      {
        label: '操作',
        align: 'center',
        width: '130',
        render: (h, scope) => {
          switch (scope.row.noticeStatus) {
            case '1':
              return <div>
                <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>
                <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':
              return <div>
                <el-button type="text" icon="el-icon-view" onClick={() => { vm.openDialog(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
}