处理消息中心页面种的table 及 分页的样式问题
This commit is contained in:
		
							parent
							
								
									ed0e11eedc
								
							
						
					
					
						commit
						5ddfc7f189
					
				| 
						 | 
					@ -4,7 +4,6 @@
 | 
				
			||||||
    <div class="table-page-search-wrapper">
 | 
					    <div class="table-page-search-wrapper">
 | 
				
			||||||
      <a-form layout="inline" @keyup.enter.native="searchQuery">
 | 
					      <a-form layout="inline" @keyup.enter.native="searchQuery">
 | 
				
			||||||
        <a-row :gutter="24">
 | 
					        <a-row :gutter="24">
 | 
				
			||||||
 | 
					 | 
				
			||||||
          <a-col :span="6">
 | 
					          <a-col :span="6">
 | 
				
			||||||
            <a-form-item label="Title">
 | 
					            <a-form-item label="Title">
 | 
				
			||||||
              <a-input placeholder="Please enter the title" v-model="queryParam.titile"></a-input>
 | 
					              <a-input placeholder="Please enter the title" v-model="queryParam.titile"></a-input>
 | 
				
			||||||
| 
						 | 
					@ -16,13 +15,12 @@
 | 
				
			||||||
            </a-form-item>
 | 
					            </a-form-item>
 | 
				
			||||||
          </a-col>
 | 
					          </a-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <a-col :span="8" >
 | 
					          <a-col :span="8">
 | 
				
			||||||
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
 | 
					            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
 | 
				
			||||||
              <a-button type="primary" @click="searchQuery" icon="search">Query</a-button>
 | 
					              <a-button type="primary" @click="searchQuery" icon="search">Query</a-button>
 | 
				
			||||||
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">Reset</a-button>
 | 
					              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">Reset</a-button>
 | 
				
			||||||
            </span>
 | 
					            </span>
 | 
				
			||||||
          </a-col>
 | 
					          </a-col>
 | 
				
			||||||
 | 
					 | 
				
			||||||
        </a-row>
 | 
					        </a-row>
 | 
				
			||||||
      </a-form>
 | 
					      </a-form>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
| 
						 | 
					@ -33,160 +31,179 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <a-table
 | 
					    <a-table
 | 
				
			||||||
      ref="table"
 | 
					      ref="table"
 | 
				
			||||||
      size="default"
 | 
					      size="middle"
 | 
				
			||||||
      bordered
 | 
					 | 
				
			||||||
      rowKey="id"
 | 
					      rowKey="id"
 | 
				
			||||||
      :columns="columns"
 | 
					      :columns="columns"
 | 
				
			||||||
      :dataSource="dataSource"
 | 
					      :dataSource="dataSource"
 | 
				
			||||||
      :pagination="ipagination"
 | 
					      :pagination="ipagination"
 | 
				
			||||||
      :loading="loading"
 | 
					      :loading="loading"
 | 
				
			||||||
      @change="handleTableChange">
 | 
					      @change="handleTableChange"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
      <span slot="action" slot-scope="text, record">
 | 
					      <span slot="action" slot-scope="text, record">
 | 
				
			||||||
        <a @click="showAnnouncement(record)">VIEW</a>
 | 
					        <a @click="showAnnouncement(record)">VIEW</a>
 | 
				
			||||||
      </span>
 | 
					      </span>
 | 
				
			||||||
    </a-table>
 | 
					    </a-table>
 | 
				
			||||||
    <show-announcement ref="ShowAnnouncement"></show-announcement>
 | 
					    <show-announcement ref="ShowAnnouncement"></show-announcement>
 | 
				
			||||||
    <dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
 | 
					    <dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData" />
 | 
				
			||||||
  </a-card>
 | 
					  </a-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
  import { filterObj } from '@/utils/util'
 | 
					import { filterObj } from '@/utils/util'
 | 
				
			||||||
  import { getAction,putAction } from '@/api/manage'
 | 
					import { getAction, putAction } from '@/api/manage'
 | 
				
			||||||
  import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
 | 
					import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
 | 
				
			||||||
  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
 | 
					import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 | 
				
			||||||
  import DynamicNotice from '../../components/tools/DynamicNotice'
 | 
					import DynamicNotice from '../../components/tools/DynamicNotice'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  export default {
 | 
					export default {
 | 
				
			||||||
    name: "UserAnnouncementList",
 | 
					  name: 'UserAnnouncementList',
 | 
				
			||||||
    mixins: [JeecgListMixin],
 | 
					  mixins: [JeecgListMixin],
 | 
				
			||||||
    components: {
 | 
					  components: {
 | 
				
			||||||
      DynamicNotice,
 | 
					    DynamicNotice,
 | 
				
			||||||
      ShowAnnouncement
 | 
					    ShowAnnouncement,
 | 
				
			||||||
    },
 | 
					  },
 | 
				
			||||||
    data () {
 | 
					  data() {
 | 
				
			||||||
      return {
 | 
					    return {
 | 
				
			||||||
        description: '系统通告表管理页面',
 | 
					      description: '系统通告表管理页面',
 | 
				
			||||||
        queryParam: {},
 | 
					      queryParam: {},
 | 
				
			||||||
        columns: [{
 | 
					      columns: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          title: 'TITLE',
 | 
					          title: 'TITLE',
 | 
				
			||||||
          align:"center",
 | 
					          align: 'center',
 | 
				
			||||||
          dataIndex: 'titile'
 | 
					          dataIndex: 'titile',
 | 
				
			||||||
        },{
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          title: 'MESSAGE TYPE',
 | 
					          title: 'MESSAGE TYPE',
 | 
				
			||||||
          align: "center",
 | 
					          align: 'center',
 | 
				
			||||||
          dataIndex: 'msgCategory',
 | 
					          dataIndex: 'msgCategory',
 | 
				
			||||||
          customRender: function (text) {
 | 
					          customRender: function (text) {
 | 
				
			||||||
            if (text == '1') {
 | 
					            if (text == '1') {
 | 
				
			||||||
              return "NOTICE";
 | 
					              return 'NOTICE'
 | 
				
			||||||
            } else if (text == "2") {
 | 
					            } else if (text == '2') {
 | 
				
			||||||
              return "SYSTEM";
 | 
					              return 'SYSTEM'
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
              return text;
 | 
					              return text
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          },
 | 
				
			||||||
        },{
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          title: 'SENDER',
 | 
					          title: 'SENDER',
 | 
				
			||||||
          align:"center",
 | 
					          align: 'center',
 | 
				
			||||||
          dataIndex: 'sender'
 | 
					          dataIndex: 'sender',
 | 
				
			||||||
        },{
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          title: 'SEND TIME',
 | 
					          title: 'SEND TIME',
 | 
				
			||||||
          align:"center",
 | 
					          align: 'center',
 | 
				
			||||||
          dataIndex: 'sendTime'
 | 
					          dataIndex: 'sendTime',
 | 
				
			||||||
        },{
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          title: 'PRIORTIY',
 | 
					          title: 'PRIORTIY',
 | 
				
			||||||
          align:"center",
 | 
					          align: 'center',
 | 
				
			||||||
          dataIndex: 'priority',
 | 
					          dataIndex: 'priority',
 | 
				
			||||||
          customRender:function (text) {
 | 
					          customRender: function (text) {
 | 
				
			||||||
            if(text=='L'){
 | 
					            if (text == 'L') {
 | 
				
			||||||
              return "LOW";
 | 
					              return 'LOW'
 | 
				
			||||||
            }else if(text=="M"){
 | 
					            } else if (text == 'M') {
 | 
				
			||||||
              return "MIDDLE";
 | 
					              return 'MIDDLE'
 | 
				
			||||||
            }else if(text=="H"){
 | 
					            } else if (text == 'H') {
 | 
				
			||||||
              return "HIGH";
 | 
					              return 'HIGH'
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
              return text;
 | 
					              return text
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          },
 | 
				
			||||||
        },{
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          title: 'READING STATE',
 | 
					          title: 'READING STATE',
 | 
				
			||||||
          align:"center",
 | 
					          align: 'center',
 | 
				
			||||||
          dataIndex: 'readFlag',
 | 
					          dataIndex: 'readFlag',
 | 
				
			||||||
          customRender:function (text) {
 | 
					          customRender: function (text) {
 | 
				
			||||||
            if(text=='0'){
 | 
					            if (text == '0') {
 | 
				
			||||||
              return "UNREAD";
 | 
					              return 'UNREAD'
 | 
				
			||||||
            }else if(text=="1"){
 | 
					            } else if (text == '1') {
 | 
				
			||||||
              return "READ";
 | 
					              return 'READ'
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
              return text;
 | 
					              return text
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          },
 | 
				
			||||||
        },{
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          title: 'ACTION',
 | 
					          title: 'ACTION',
 | 
				
			||||||
          dataIndex: 'action',
 | 
					          dataIndex: 'action',
 | 
				
			||||||
          align:"center",
 | 
					          align: 'center',
 | 
				
			||||||
          scopedSlots: { customRender: 'action' },
 | 
					          scopedSlots: { customRender: 'action' },
 | 
				
			||||||
        }],
 | 
					 | 
				
			||||||
		    url: {
 | 
					 | 
				
			||||||
          list: "/sys/sysAnnouncementSend/getMyAnnouncementSend",
 | 
					 | 
				
			||||||
          editCementSend:"sys/sysAnnouncementSend/editByAnntIdAndUserId",
 | 
					 | 
				
			||||||
          readAllMsg:"sys/sysAnnouncementSend/readAll",
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        loading:false,
 | 
					      ],
 | 
				
			||||||
        openPath:'',
 | 
					      url: {
 | 
				
			||||||
        formData:''
 | 
					        list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
 | 
				
			||||||
 | 
					        editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
 | 
				
			||||||
 | 
					        readAllMsg: 'sys/sysAnnouncementSend/readAll',
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      loading: false,
 | 
				
			||||||
 | 
					      openPath: '',
 | 
				
			||||||
 | 
					      formData: '',
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    handleDetail: function (record) {
 | 
				
			||||||
 | 
					      this.$refs.sysAnnouncementModal.detail(record)
 | 
				
			||||||
 | 
					      this.$refs.sysAnnouncementModal.title = 'VIEW'
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    showAnnouncement(record) {
 | 
				
			||||||
 | 
					      putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
 | 
				
			||||||
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
					          this.loadData()
 | 
				
			||||||
 | 
					          this.syncHeadNotic(record.anntId)
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      if (record.openType === 'component') {
 | 
				
			||||||
 | 
					        this.openPath = record.openPage
 | 
				
			||||||
 | 
					        this.formData = { id: record.busId }
 | 
				
			||||||
 | 
					        this.$refs.showDynamNotice.detail()
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.$refs.ShowAnnouncement.detail(record)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    syncHeadNotic(anntId) {
 | 
				
			||||||
      handleDetail: function(record){
 | 
					      getAction('sys/annountCement/syncNotic', { anntId: anntId })
 | 
				
			||||||
        this.$refs.sysAnnouncementModal.detail(record);
 | 
					    },
 | 
				
			||||||
        this.$refs.sysAnnouncementModal.title="VIEW";
 | 
					    readAll() {
 | 
				
			||||||
      },
 | 
					      var that = this
 | 
				
			||||||
      showAnnouncement(record){
 | 
					      that.$confirm({
 | 
				
			||||||
        putAction(this.url.editCementSend,{anntId:record.anntId}).then((res)=>{
 | 
					        title: 'Config',
 | 
				
			||||||
          if(res.success){
 | 
					        content: 'Whether all marks are read?',
 | 
				
			||||||
            this.loadData();
 | 
					        onOk: function () {
 | 
				
			||||||
            this.syncHeadNotic(record.anntId)
 | 
					          putAction(that.url.readAllMsg).then((res) => {
 | 
				
			||||||
          }
 | 
					            if (res.success) {
 | 
				
			||||||
        });
 | 
					              that.$message.success(res.message)
 | 
				
			||||||
        if(record.openType==='component'){
 | 
					              that.loadData()
 | 
				
			||||||
          this.openPath = record.openPage;
 | 
					              that.syncHeadNotic()
 | 
				
			||||||
          this.formData = {id:record.busId};
 | 
					            }
 | 
				
			||||||
          this.$refs.showDynamNotice.detail();
 | 
					          })
 | 
				
			||||||
        }else{
 | 
					        },
 | 
				
			||||||
          this.$refs.ShowAnnouncement.detail(record);
 | 
					      })
 | 
				
			||||||
        }
 | 
					    },
 | 
				
			||||||
      },
 | 
					  },
 | 
				
			||||||
      syncHeadNotic(anntId){
 | 
					}
 | 
				
			||||||
        getAction("sys/annountCement/syncNotic",{anntId:anntId})
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      readAll(){
 | 
					 | 
				
			||||||
        var that = this;
 | 
					 | 
				
			||||||
        that.$confirm({
 | 
					 | 
				
			||||||
          title:"Config",
 | 
					 | 
				
			||||||
          content:"Whether all marks are read?",
 | 
					 | 
				
			||||||
          onOk: function(){
 | 
					 | 
				
			||||||
            putAction(that.url.readAllMsg).then((res)=>{
 | 
					 | 
				
			||||||
              if(res.success){
 | 
					 | 
				
			||||||
                that.$message.success(res.message);
 | 
					 | 
				
			||||||
                that.loadData();
 | 
					 | 
				
			||||||
                that.syncHeadNotic();
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style scoped>
 | 
					<style lang="less" scoped>
 | 
				
			||||||
  .ant-card-body .table-operator{
 | 
					.ant-card-body .table-operator {
 | 
				
			||||||
    margin-bottom: 18px;
 | 
					  margin-bottom: 18px;
 | 
				
			||||||
  }
 | 
					}
 | 
				
			||||||
  .anty-row-operator button{margin: 0 5px}
 | 
					.anty-row-operator button {
 | 
				
			||||||
  .ant-btn-danger{background-color: #ffffff}z
 | 
					  margin: 0 5px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
  .ant-modal-cust-warp{height: 100%}
 | 
					.ant-btn-danger {
 | 
				
			||||||
  .ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto}
 | 
					  background-color: #ffffff;
 | 
				
			||||||
  .ant-modal-cust-warp .ant-modal-content{height:90% !important;overflow-y: hidden}
 | 
					}
 | 
				
			||||||
 | 
					z .ant-modal-cust-warp {
 | 
				
			||||||
 | 
					  height: 100%;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.ant-modal-cust-warp .ant-modal-body {
 | 
				
			||||||
 | 
					  height: calc(100% - 110px) !important;
 | 
				
			||||||
 | 
					  overflow-y: auto;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.ant-modal-cust-warp .ant-modal-content {
 | 
				
			||||||
 | 
					  height: 90% !important;
 | 
				
			||||||
 | 
					  overflow-y: hidden;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user