zoukankan      html  css  js  c++  java
  • 222

    <template>
    <a-card :bordered="false" style="margin-top: -0.6%;margin-left: -0.6%; 102%">
    <!-- 弹出框提示-->
    <alert-mes ref="alertFrom"></alert-mes>
    <!-- table区域-begin -->

    <div class="table-page-search-wrapper" style="height: 40px;">
    <a-form layout="inline" @keyup.enter.native="searchQuery">
    <a-row :gutter="24">
    <a-col :xl="4" :lg="8" :md="8" :sm="24">
    <a-form-item label="编码">
    <!-- <a-input placeholder="请输入物料编码" v-model="queryParam.procCode"></a-input>-->
    <a-input size="small" placeholder="" v-model="queryParam.shiftNo"></a-input>
    </a-form-item>
    </a-col>
    <a-col :xl="4" :lg="8" :md="8" :sm="24">
    <a-form-item label="名称">
    <a-input size="small" placeholder v-model="queryParam.shiftName"></a-input>
    </a-form-item>
    </a-col>
    <a-col :xl="2" :lg="7" :md="8" :sm="24">
    <a-button type="primary" @click="searchQuery" size="small">
    <a-icon type="search"></a-icon>
    </a-button>
    </a-col>
    <a-col :xl="12 " :lg="24" :md="24" :sm="24">
    <div
    class="cl"
    style="border: 1px rgb(210, 210, 210) solid; 100%;height: 26px;border-radius: 3px;margin-top: 4px;margin-left: 10%"
    >
    <span
    v-for="itme in str"
    style="border: 1px #6c757d solid;margin-left: 5px;position: relative;top: 1px;border-radius: 2px;color: snow;background-color: #e2e2e0;color:#7c7bad;"
    >
    <a-icon type="filter"></a-icon>
    {{itme.name}}
    <a @click="quchu(itme.name)" style="color: white">
    <a-icon type="close" style="color: #7c7bad" />
    </a>
    </span>
    <a-icon
    type="search"
    style="float: right;position: relative;left:-10px;top:4px"
    @click="showModalScreen"
    ></a-icon>
    </div>
    </a-col>
    </a-row>
    </a-form>

    <div
    class="ant-alert ant-alert-info"
    style="margin-bottom: 10px;height: 34px;font-size: 12px; 102%;margin-left:-1.3%;margin-top: 10px"
    >
    <a-row>
    <a-col :xl="8" :lg="10" :md="10" :sm="10" style="margin-top: 8px;margin-left: -2%">
    <a
    style="margin-left: 24px;margin-top: 10px;"
    @click="handleFormAdd('/basic/workingShift/components/workingShiftFrom')"
    type="primary"
    >{{ $t('button.add') }}</a>
    <a style="margin-left: 24px;margin-top: 10px;" type="link" @change="handleImportExcel">
    {{
    $t('button.import') }}
    </a>
    <a-dropdown style="margin-left: 24px;margin-top: 10px;">
    <a class="ant-dropdown-link" @click="e => e.preventDefault()">
    {{ $t('button.audit') }}
    <a-icon type="caret-down" />
    </a>
    <a-menu slot="overlay">
    <a-menu-item key="2" @click="batchAudit">{{ $t('button.audit') }}</a-menu-item>
    <a-menu-item key="3" @click="batchUnaudit">{{ $t('button.unAudit') }}</a-menu-item>
    </a-menu>
    </a-dropdown>
    <a-dropdown style="margin-left: 24px;margin-top: 10px;">
    <a class="ant-dropdown-link" @click="e => e.preventDefault()">
    {{ $t('button.forbid') }}
    <a-icon type="caret-down" />
    </a>
    <a-menu slot="overlay">
    <a-menu-item key="4" @click="batchForbidden">{{ $t('button.forbid') }}</a-menu-item>
    <a-menu-item key="5" @click="batchUnforbidden">{{ $t('button.unForbid') }}</a-menu-item>
    </a-menu>
    </a-dropdown>

    <a style="margin-left: 24px">
    <a-icon @click="handleExportXls('班别')" type="download" style="color: #000c17;" />
    </a>
    <a-dropdown style="margin-left: 24px;margin-top: 10px;">
    <a style="color: #000c17" class="ant-dropdown-link" @click="e => e.preventDefault()">
    {{ $t('button.operation') }}
    <a-icon type="caret-down" />
    </a>
    <a-menu slot="overlay">
    <a-menu-item key="1" @click="batchDel">{{ $t('button.delete') }}</a-menu-item>
    <a-menu-item
    key="1"
    @click="handlePaginationChange('refresh')"
    >{{ $t('button.refresh') }}</a-menu-item>
    </a-menu>
    </a-dropdown>
    </a-col>
    <a-col :xl="8" :lg="6" :md="6" :sm="6" style="margin-top: 2px">
    <a-button
    class="but"
    type="primary"
    style="margin-left: 46%;height: 28px;position: relative;top: 6.6%;color:#777777;background-color: #FFFFFF;border:#d2d2d2 1px solid"
    :size="large"
    @click="showModalScreen"
    >
    <a-icon type="filter" style="color: black;font-size: 12px" />筛选
    </a-button>
    <a-dropdown
    style="margin-left: 8px;height: 28px;position: relative;top: 6.6%;color:#777777;background-color: #FFFFFF;border:#d2d2d2 1px solid"
    >
    <a-button type="primary" @click="showModalCollection">
    <a-icon type="star" style="color: black;font-size: 12px" />收藏
    <a-icon type="caret-down" />
    </a-button>
    <a-menu slot="overlay">
    <a-menu-item
    key="2"
    @contextmenu.prevent="del(filterSource)"
    @click="xianshi(filterSource)"
    v-for="filterSource in filterSource"
    >{{filterSource.filterName}}</a-menu-item>
    </a-menu>
    </a-dropdown>
    <a-modal title="筛选" v-model="visibleScreen" @ok="handleScreenOk">
    <p>Some contents...</p>
    <p>Some contents...</p>
    <p>Some contents...</p>
    </a-modal>
    <a-modal
    :title="$t('button.collect')"
    v-model="visibleCollection"
    @ok="handleCollectionOk"
    >
    <!-- <p>{{ $t('message.isCollect') }}</p>-->
    <a-input v-model="filterName" placeholder="请输入保存名称"></a-input>
    </a-modal>
    </a-col>
    <a-col :xl="4" :lg="4" :md="4" :sm="4">
    <div style="line-height: 34px">
    <spen>{{this.current+'/'+this.pages}}</spen>
    <span style="margin-left: 15px;">{{this.total}}</span>
    <span style="margin-left: 15px;">
    <a-icon type="left" @click="jian" :disabled="leftdis" style="color: #00A0E9" />
    <a-icon type="right" @click="add" :disabled="rightdis" style="color: #00A0E9" />
    </span>
    </div>
    </a-col>
    <a-col
    :xl="4"
    :lg="4"
    :md="4"
    :sm="4"
    style="margin-top: 2px;margin-left: 2%;margin-top: 3px;"
    >
    <div style="150px;height: 30px;float: right;">
    <span style="margin-left: 15px">
    <a-button
    style="height: 28px;background-color: #1890FF"
    @click="handleReturn('/basic/workingShift/list')"
    >
    <a-icon type="unordered-list" style="fontSize:15px;color: white" />
    </a-button>
    <a-button style="height: 28px;" @click="see('/basic/workingShiftFromSee')">
    <a-icon type="appstore" style="fontSize:15px;;" />
    </a-button>
    </span>
    </div>
    </a-col>
    </a-row>
    </div>
    </div>

    <a-table
    style=" 102%;margin-left:-1.3%;margin-top: 40px; "
    class="ant-table"
    ref="table"
    size="small"
    rowKey="id"
    :columns="columns"
    :dataSource="dataSource"
    :pagination="false"
    :loading="loading"
    :rowSelection="{fixed:true,selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
    :scroll="tableScroll"
    :customHeaderRow="customHeaderRow"
    >
    <!-- 自定义列-->
    <div slot="ellipsis">
    <a-card style=" 800px">
    <a-checkbox-group
    @change="onColSettingsChange"
    v-model="settingColumns"
    :defaultValue="settingColumns"
    >
    <a-row>
    <template v-for="(item,index) in defColumns">
    <template v-if="item.key!='rowIndex'&& item.dataIndex!='action'">
    <a-col :span="4">
    <a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
    </a-col>
    </template>
    </template>
    </a-row>
    </a-checkbox-group>
    </a-card>
    </div>

    <template slot="htmlSlot" slot-scope="text">
    <div v-html="text"></div>
    </template>
    <template slot="imgSlot" slot-scope="text">
    <span v-if="!text" style="font-size: 12px;font-style: italic;">无此图片</span>
    <img
    v-else
    :src="getImgView(text)"
    height="25px"
    alt="图片不存在"
    style="max-80px;font-size: 12px;font-style: italic;"
    />
    </template>
    <template slot="fileSlot" slot-scope="text">
    <span v-if="!text" style="font-size: 12px;font-style: italic;">无此文件</span>
    <a-button
    v-else
    :ghost="true"
    type="primary"
    icon="download"
    size="small"
    @click="uploadFile(text)"
    >下载</a-button>
    </template>

    <span slot="codeAction" slot-scope="text , record">
    <a
    @click="handleFormEdit('/basic/workingShift/components/workingShiftFrom/edit',record,getItemIds())"
    >{{record.shiftNo}}</a>
    </span>
    <span slot="dataStatus" slot-scope="text , record">
    <a-tag :color="getStatusColor(record)">{{ getStatusText(record) }}</a-tag>
    </span>
    <span slot="forbidFlag" slot-scope="text , record">
    <a-tag :color="getForbidColor(record)">{{ getForbidText(record) }}</a-tag>
    </span>
    </a-table>
    <j-super-query-search
    :fieldList="fieldList"
    ref="superQueryModal"
    @handleSuperQuery="handleSuperQuery"
    @seachcallck="seachcallck"
    ></j-super-query-search>
    </a-card>
    </template>

    <script>
    import Vue from 'vue'
    import AlertMes from '@/components/mes/AlertMes'
    import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil'
    import JInput from '@/components/jeecg/JInput'
    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
    import { getAction } from '../../../../../api/manage'
    // import pick from 'lodash.pick'
    import JSuperQuerySearch from '@/components/mes/JSuperQuerySearch.vue'
    import { statusFilter } from '@/utils/statusFilter'

    export default {
    name: 'cxList',
    mixins: [JeecgListMixin, statusFilter],
    components: {
    JInput,
    JSuperQuerySearch,
    AlertMes
    },
    data() {
    return {
    // queryParam:{
    // wkstationNo:"",
    // wkstationName:""
    // },
    // parr:{},
    // userList:store.state.userList,
    filterName: '',
    fieldList: '',//高级查询列
    parameter: '',//查询条件
    total: 0,
    sz: [],
    pages: 0,
    current: 0,
    rightdis: '',
    leftdis: 'disabled',
    billlName: 'base_workingShift',
    visibleCollection: false,
    visibleScreen: false,
    dataSource: [],
    //表头
    columns: [],
    //列设置
    settingColumns: [],
    // 表头
    defColumns: [
    {
    title: '编码',
    align: 'center',
    dataIndex: 'shiftNo',
    className: 'd',
    sorter: true,
    scopedSlots: {
    customRender: 'codeAction'
    , keepAlive: true
    }
    },
    {
    title: '名称',
    align: 'center',
    className: 'd',
    dataIndex: 'shiftName'
    },
    {
    title: '开始时间',
    align: 'center',
    className: 'd',
    dataIndex: 'startTime'
    },
    {
    title: '结束时间',
    align: 'center',
    className: 'd',
    dataIndex: 'endTime'
    },
    {
    title: '是否跨天',
    align: 'center',
    className: 'd',
    dataIndex: 'isDay',
    customRender: (text) => {
    if (text==1) {
    return '是'
    } else {
    return '否'
    }
    }
    },
    {
    title: '数据状态',
    align: 'center',
    dataIndex: 'dataStatus',
    scopedSlots: { customRender: 'dataStatus' },
    },
    {
    title: '禁用状态',
    align: 'center',
    dataIndex: 'forbidFlag',
    scopedSlots: { customRender: 'forbidFlag' },

    },
    {
    title: '工作小时数',
    align: 'center',
    className: 'd',

    dataIndex: 'remarks'
    },
    {
    title: '班别描述',
    align: 'center',
    className: 'd',
    dataIndex: 'tdesc'
    },
    {
    title: '创建人',
    align: 'center',
    className: 'd',
    dataIndex: 'createBy'
    },
    {
    title: '审核人',
    align: 'center',
    className: 'd',
    dataIndex: 'chkBy'
    },
    {
    title: '',
    dataIndex: 'action',
    align: 'left',
    className: 'd',
    30,
    scopedSlots: {
    filterDropdown: 'ellipsis'
    }
    }
    ],
    url: {
    list: `${window._CONFIG['mes']}/base/baseShift/list`,
    delete: `${window._CONFIG['mes']}/base/baseShift/delete`,
    deleteBatch: `${window._CONFIG['mes']}/base/baseShift/deleteBatch`,
    exportXlsUrl: `${window._CONFIG['mes']}/base/baseShift/exportXls`,
    importExcelUrl: `${window._CONFIG['mes']}/base/baseShift/importExcel`,
    add: `${window._CONFIG['mes']}/base/baseShift/add`,
    edit: `${window._CONFIG['mes']}/base/baseShift/edit`,
    entry: `${window._CONFIG['mes']}/base/baseShift/edit`,
    // audit: `${window._CONFIG['mes']}/base/baseShift/audit`,
    audit: `${window._CONFIG['mes']}/base/baseShift/auditBatch`,
    // unAudit: `${window._CONFIG['mes']}/base/baseShift/unAudit`,
    unAudit: `${window._CONFIG['mes']}/base/baseShift/unAuditBatch`,
    // forbid: `${window._CONFIG['mes']}/base/baseShift/forbid`,
    forbid: `${window._CONFIG['mes']}/base/baseShift/forbidBatch`,
    // unForbid: `${window._CONFIG['mes']}/base/baseShift/unForbid`,
    unForbid: `${window._CONFIG['mes']}/base/baseShift/unForbidBatch`,
    filterw: `${window._CONFIG['mes']}/system/sysfilterw/add`,
    filterwlist: `${window._CONFIG['mes']}/system/sysfilterw/list`,
    filterwdel: `${window._CONFIG['mes']}/system/sysfilterw/delete`
    },
    filterSource: [],
    dictOptions: {
    tgroup: [],
    forbidFlag: []
    },
    str: [],
    restr: [],
    tableScroll: { x: 13 * 147 + 50 }
    }
    },
    created() {
    this.paramStor(),
    this.initColumns()
    // this.refreshField();
    },
    computed: {
    importExcelUrl: function() {
    return this.url.importExcelUrl
    }
    // refreshField:function () {
    // for (let i=0;i<this.defColumns.length;i++){
    // this.defColumns[i].title=this.$t('wkstation.'+this.defColumns[i].dataIndex+'')
    // }
    // }
    },
    watch: {
    //语言切换监听
    // '$i18n.locale' (){
    // this.refreshField();
    // }
    },

    mounted() {
    this.fieldList = [
    {
    text: '编码',
    value: 'qtypeNo',
    type: 'string'
    },
    {
    text: '名称',
    value: 'qtypeName',
    type: 'string'
    },
    {
    text: '备注',
    value: 'remarks',
    type: 'string'
    },
    {
    text: '创建人',
    value: 'createBy',
    type: 'string'
    },
    {
    text: '创建日期',
    value: 'createTime',
    type: 'date'
    },
    {
    text: '更新人',
    value: 'updateBy',
    type: 'string'
    },
    {
    text: '更新日期',
    value: 'updateTime',
    type: 'date'
    },
    {
    text: '审核人',
    value: 'chkBy',
    type: 'string'
    },
    {
    text: '审核日期',
    value: 'chkTime',
    type: 'date'
    },
    {
    text: '所属部门',
    value: 'sysOrgCode',
    type: 'string'
    }
    ]
    },
    methods: {
    //切换页签后的筛选条件
    paramStor() {
    let str = this.$store.state.userList
    // this.restr=str
    if (JSON.stringify(str) == undefined) {
    return
    }
    this.retparamss(str)
    },
    //显示查询条件
    xianshi(e) {
    var str = JSON.parse(e.conditions)
    this.retfiled(str, 3)
    },
    quchu(e, index) {
    var count = this.str.length
    for (var i = 0; i < this.str.length; i++) {
    if (this.str[i].name == e) {
    if (this.str.length == 1) {
    this.str = []
    this.restr = []
    }
    this.restr.splice(i - 0, i)
    this.str.splice(i - 0, i)
    }
    }
    if (count == this.str.length) {
    this.restr.shift()
    this.str.shift()
    }
    this.retparams1(this.restr)
    },
    retparams1(param) {
    this.retfiled(param, 2)
    this.restr = param
    this.$refs.superQueryModal.emitCallback(this.restr)
    },
    //返回提示
    //正常
    success(par) {
    this.$refs.alertFrom.normal(par)
    },
    //错误
    error(par) {
    this.$refs.alertFrom.error(par)
    },
    //警告
    warning(par) {
    this.$refs.alertFrom.warning(par)
    },
    //提示
    tips(par) {
    this.$refs.alertFrom.tips(par)
    },
    initColumns() {
    //权限过滤(列权限控制时打开,修改第二个参数为授权码前缀)
    //this.defColumns = colAuthFilter(this.defColumns,'testdemo:');
    var key = this.$route.name + ':colsettings'
    let colSettings = Vue.ls.get(key)
    if (colSettings == null || colSettings == undefined) {
    let allSettingColumns = []
    this.defColumns.forEach(function(item, i, array) {
    allSettingColumns.push(item.dataIndex)
    })
    this.settingColumns = allSettingColumns
    this.columns = this.defColumns
    } else {
    this.settingColumns = colSettings
    const cols = this.defColumns.filter(item => {
    if (item.key == 'rowIndex' || item.dataIndex == 'action') {
    return true
    }
    if (colSettings.includes(item.dataIndex)) {
    return true
    }
    return false
    })
    this.columns = cols
    }
    },
    //列设置更改事件
    onColSettingsChange(checkedValues) {
    var key = this.$route.name + ':colsettings'
    Vue.ls.set(key, checkedValues, 7 * 24 * 60 * 60 * 1000)
    this.settingColumns = checkedValues
    const cols = this.defColumns.filter(item => {
    if (item.key == 'rowIndex' || item.dataIndex == 'action') {
    return true
    }
    if (this.settingColumns.includes(item.dataIndex)) {
    return true
    }
    return false
    })
    this.columns = cols
    },

    handlePaginationChange(operation) {
    if (operation == 'reduce') {
    if ((this.ipagination.current = 1)) {
    this.leftdis = 'disabled'
    } else {
    this.ipagination.current--
    }
    } else if (operation == 'plus') {
    var ye = Math.ceil(this.ipagination.total / this.ipagination.pageSize)

    if ((this.ipagination.current = ye)) {
    this.rightdis = 'disabled'
    } else {
    this.ipagination.current++
    }
    } else if (operation == 'refresh') {
    this.ipagination.current = 1
    }
    this.loadData()
    },
    //点击筛选进行高级查询
    showModalScreen() {
    this.$refs.superQueryModal.visible = true
    },

    showModalCollection() {
    this.visibleCollection = true
    },

    handleScreenOk(e) {
    console.log(e)
    this.visible = false
    },
    //高级查询搜索
    searchQuery1() {
    this.$refs.superQueryModal.visible = true
    },
    //查询条件返回到文本框
    seachcallck(param, param1) {
    let p = param
    // alert(JSON.stringify(param))
    this.restr = []
    this.str = []
    if (param1.dataStatus != 4) {
    var str1 = { field: 'dataStatus', val: param1.dataStatus, rule: 'eq' }
    this.restr.push(str1)
    }
    var v = String(param1.forbidFlag)
    if (v != '') {
    var str2 = { field: 'forbidFlag', val: param1.forbidFlag, rule: 'eq' }
    this.restr.push(str2)
    }
    for (var j = 0; j < param.length; j++) {
    this.restr.push(param[j])
    }

    if (param1.dataStatus == 0) {
    param1.dataStatus = '保存'
    } else if (param1.dataStatus == 1) {
    param1.dataStatus = '已审核'
    } else if (param1.dataStatus == 2) {
    param1.dataStatus = '重新审核'
    }
    var f = String(param1.forbidFlag)
    if (f != '') {
    if (param1.forbidFlag == 1) {
    param1.forbidFlag = '禁用'
    } else if (param1.forbidFlag == 0) {
    param1.forbidFlag = '正常'
    }
    }
    if (param1.dataStatus != 4) {
    var str1 = { name: '数据状态:' + param1.dataStatus }
    this.str.push(str1)
    }
    if (param1.forbidFlag != '') {
    var str2 = { name: '禁用状态:' + param1.forbidFlag }
    this.str.push(str2)
    }
    // str="数据状态:"+param1.dataState+";"+"禁用状态:"+param1.isDisabled
    this.retfiled(p, 1)
    for (var i = 0; i < param.length; i++) {
    if (param[i].field == null) {
    continue
    }
    var str3 = { name: param[i].field + param[i].rule + param[i].val }
    this.str.push(str3)
    }
    this.retfiled(param, 2)
    },
    initDictConfig() {
    initDictOptions('dataState').then(res => {
    if (res.success) {
    this.$set(this.dictOptions, 'dataStatus', res.result)
    }
    })
    initDictOptions('radio').then(res => {
    if (res.success) {
    this.$set(this.dictOptions, 'forbidFlag', res.result)
    }
    })
    initDictOptions('whether').then(res => {
    if (res.success) {
    this.$set(this.dictOptions, 'isSubcon', res.result)
    }
    })
    initDictOptions('procType').then(res => {
    if (res.success) {
    this.$set(this.dictOptions, 'procType', res.result)
    }
    })
    initDictOptions('timeUnit').then(res => {
    if (res.success) {
    this.$set(this.dictOptions, 'timeUnit', res.result)
    }
    })
    initDictOptions('whether').then(res => {
    if (res.success) {
    this.$set(this.dictOptions, 'isDay', res.result)
    }
    })
    },
    customHeaderRow(column, index) {
    // alert()
    if (index == 0) {
    return 'font-weight:bold;"> }
    },
    //高级查询返回字段转换
    retfiled(params, f) {
    if (f == 1) {
    for (var i = 0; i < params.length; i++) {
    if (params[i].field == 'qtypeNo') {
    params[i].field = '编码'
    }
    if (params[i].field == 'qtypeName') {
    params[i].field = '名称'
    }
    if (params[i].field == 'remarks') {
    params[i].field = '备注'
    }
    if (params[i].field == 'remarks') {
    params[i].field = '备注'
    }
    if (params[i].field == 'createBy') {
    params[i].field = '创建人'
    }
    if (params[i].field == 'createTime') {
    params[i].field = '创建日期'
    }
    if (params[i].field == 'updateBy') {
    params[i].field = '更新人'
    }
    if (params[i].field == 'updateTime') {
    params[i].field = '更新日期'
    }
    if (params[i].field == 'chkBy') {
    params[i].field = '审核人'
    }
    if (params[i].field == 'chkTime') {
    params[i].field = '审核日期'
    }
    if (params[i].field == 'sysOrgCode') {
    params[i].field = '所属部门'
    }
    }

    return params
    } else if (f == 2) {
    for (var j = 0; j < params.length; j++) {
    if (params[j].rule == '等于') {
    params[j].rule = 'eq'
    }
    if (params[j].rule == '不等于') {
    params[j].rule = 'ne'
    }
    if (params[j].rule == '大于') {
    params[j].rule = 'gt'
    }
    if (params[j].rule == '大于等于') {
    params[j].rule = 'ge'
    }
    if (params[j].rule == '小于lt') {
    params[j].rule = '小于'
    }
    if (params[j].rule == '小于等于') {
    params[j].rule = 'le'
    }
    if (params[j].rule == '以..开始') {
    params[j].rule = 'right_like'
    }
    if (params[j].rule == '以..结尾') {
    params[j].rule = 'left_like'
    }
    if (params[j].rule == '包含') {
    params[j].rule = 'like'
    }
    if (params[j].rule == '在...中') {
    params[j].rule = 'in'
    }
    if (params[i].field == 'qtypeNo') {
    params[i].field = '编码'
    }
    if (params[i].field == 'qtypeName') {
    params[i].field = '名称'
    }
    if (params[j].field == '备注') {
    params[j].field = 'remarks'
    }
    if (params[j].field == '创建人') {
    params[j].field = 'createBy'
    }
    if (params[j].field == '创建日期') {
    params[j].field = 'createTime'
    }
    if (params[j].field == '更新人') {
    params[j].field = 'updateBy'
    }
    if (params[j].field == '更新日期') {
    params[j].field = 'updateTime'
    }
    if (params[j].field == '审核人') {
    params[j].field = 'chkBy'
    }
    if (params[j].field == '审核日期') {
    params[j].field = 'chkTime'
    }
    if (params[j].field == '所属部门') {
    params[j].field = 'sysOrgCode'
    }
    }
    return params
    } else if (f == 3) {
    this.str = []
    for (var i = 0; i < params.length; i++) {
    if (params[i].rule == null) {
    continue
    }
    if (params[i].field == 'dataStatus') {
    params[i].field = '数据状态'
    if (params[i].val == 0) {
    params[i].val = '保存'
    }
    if (params[i].val == 1) {
    params[i].val = '已审核'
    }
    if (params[i].val == 2) {
    params[i].val = '重新审核'
    }
    }
    if (params[i].field == 'forbidFlag') {
    params[i].field = '禁用状态'
    if (params[i].val == 1) {
    params[i].val = '禁用'
    }
    if (params[i].val == 0) {
    params[i].val = '正常'
    }
    }

    if (params[i].rule == 'eq') {
    params[i].rule = '等于'
    }
    if (params[i].rule == 'ne') {
    params[i].rule = '不等于'
    }
    if (params[i].rule == 'gt') {
    params[i].rule = '大于'
    }
    if (params[i].rule == 'ge') {
    params[i].rule = '大于等于'
    }
    if (params[i].rule == 'lt') {
    params[i].rule = '小于'
    }
    if (params[i].rule == 'le') {
    params[i].rule = '小于等于'
    }
    if (params[i].rule == 'right_like') {
    params[i].rule = '以..开始'
    }
    if (params[i].rule == 'left_like') {
    params[i].rule = '以..结尾'
    }
    if (params[i].rule == 'like') {
    params[i].rule = '包含'
    }
    if (params[i].rule == 'in') {
    params[i].rule = '在...中'
    }
    if (params[i].field == 'qtypeNo') {
    params[i].field = '编码'
    }
    if (params[i].field == 'qtypeName') {
    params[i].field = '名称'
    }
    if (params[i].field == 'remarks') {
    params[i].field = '备注'
    }
    if (params[i].field == 'createBy') {
    params[i].field = '创建人'
    }
    if (params[i].field == 'createTime') {
    params[i].field = '创建日期'
    }
    if (params[i].field == 'updateBy') {
    params[i].field = '更新人'
    }
    if (params[i].field == 'updateTime') {
    params[i].field = '更新日期'
    }
    if (params[i].field == 'chkBy') {
    params[i].field = '审核人'
    }
    if (params[i].field == 'chkTime') {
    params[i].field = '审核日期'
    }
    if (params[i].field == 'sysOrgCode') {
    params[i].field = '所属部门'
    }

    var str3 = { name: params[i].field + params[i].rule + params[i].val }

    this.str.push(str3)
    }

    for (var i = 0; i < params.length; i++) {
    if (params[i].field == '数据状态') {
    params[i].field = 'dataStatus'
    if (params[i].val == '保存') {
    params[i].val = '0'
    }
    if (params[i].val == '已审核') {
    params[i].val = '1'
    }
    if (params[i].val == '重新审核') {
    params[i].val = '2'
    }
    }
    if (params[i].field == '禁用状态') {
    params[i].field = 'forbidFlag'
    if (params[i].val == '禁用') {
    params[i].val = '1'
    }
    if (params[i].val == '正常') {
    params[i].val = '0'
    }
    }

    if (params[i].rule == '等于') {
    params[i].rule = 'eq'
    }
    if (params[i].rule == '不等于') {
    params[i].rule = 'ne'
    }
    if (params[i].rule == '大于') {
    params[i].rule = 'gt'
    }
    if (params[i].rule == '大于等于') {
    params[i].rule = 'ge'
    }
    if (params[i].rule == '小于') {
    params[i].rule = 'lt'
    }
    if (params[i].rule == '小于等于') {
    params[i].rule = 'le'
    }
    if (params[i].rule == '以..开始') {
    params[i].rule = 'right_like'
    }
    if (params[i].rule == '以..结尾') {
    params[i].rule = 'left_like'
    }
    if (params[i].rule == '包含') {
    params[i].rule = 'like'
    }
    if (params[i].rule == '在...中') {
    params[i].rule = 'in'
    }
    if (params[i].field == 'qtypeNo') {
    params[i].field = '编码'
    }
    if (params[i].field == 'qtypeName') {
    params[i].field = '名称'
    }
    if (params[i].field == '所属线别') {
    params[i].field = 'plineName'
    }
    if (params[i].field == '备注') {
    params[i].field = 'remarks'
    }
    if (params[i].field == '创建人') {
    params[i].field = 'createBy'
    }
    if (params[i].field == '创建日期') {
    params[i].field = 'createTime'
    }
    if (params[i].field == '更新人') {
    params[i].field = 'updateBy'
    }
    if (params[i].field == '更新日期') {
    params[i].field = 'updateTime'
    }
    if (params[i].field == '审核人') {
    params[i].field = 'chkBy'
    }
    if (params[i].field == '审核日期') {
    params[i].field = 'chkTime'
    }
    if (params[i].field == '所属部门') {
    params[i].field = 'sysOrgCode'
    }

    //
    // this.str.push(str3)
    }
    this.restr = params
    this.$refs.superQueryModal.emitCallback(params)
    }
    },
    getItemIds() {
    let ids = []
    this.dataSource.forEach((item, index, arr) => {
    ids.push(item.id)
    })
    return ids
    }
    }
    }
    </script>
    <style scoped>
    @import '~@assets/less/common.less';

    >>> .ant-row {
    margin-top: -0.5%;
    }

    /deep/ .ant-table {
    line-height: 0.5;
    }

    /deep/ .ant-table-small > .ant-table-content > .ant-table-header > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-body > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-header > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-body > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-fixed-left > .ant-table-header > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-fixed-right > .ant-table-header > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-fixed-left > .ant-table-body-outer > .ant-table-body-inner > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-fixed-right > .ant-table-body-outer > .ant-table-body-inner > table > .ant-table-thead > tr > th {
    color: red !important;
    }

    /deep/ .ant-table-thead > tr > th {
    border-left: 1px #e8e8e8 solid;
    background-color: #fafafa !important;;
    }

    /deep/ .d {
    font-size: 12px;
    }

    /deep/ .ant-input {
    border-radius: 0px;
    }

    /*当屏幕小于1100像素*/
    @media (max- 1100px) {
    /deep/ .ant-col-md-24, .ant-col-lg-24 div {
    margin-left: 0%;
    }

    /deep/ .ant-col-sm-6 {
    margin-top: -1px !important;
    }

    /deep/ .ant-col-sm-10 {
    margin-top: 0px !important;
    }

    /deep/ .ant-col-sm-4 {
    margin-top: 0px !important;
    }

    .but {
    margin-left: 8px !important;
    }

    .cl {
    margin-left: 0% !important;
    }
    }

    /deep/ .tishi {
    103% !important;
    margin-left: -1.5% !important;
    }

    /deep/ .ant-table table {
    border-radius: 0px 0px 0px 0px !important;
    }

    /deep/ .ant-col-xl-4 {
    height: 30px;
    }

    /deep/ .ant-col-xl-2 {
    height: 30px;
    }

    </style>
  • 相关阅读:
    NodeJS加MongoDB应用入门
    调试NodeJS应用
    二月一号博客
    大三寒假第二篇学习记录
    大三寒假第一篇学习记录
    jQuery处理json数据
    Mapreduce案例测试
    你的灯还亮着吗?发现问题的真正所在(一)
    大型数据库技术(一)
    暑假第八周博客
  • 原文地址:https://www.cnblogs.com/lvqiupingboke-2019/p/13256338.html
Copyright © 2011-2022 走看看