|
@@ -4,6 +4,17 @@
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
<a-row :gutter="24">
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="点检内容名称">
|
|
|
+ <a-input v-model="queryParam.contentname" placeholder="请输入点检内容名称"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
|
|
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
@@ -12,12 +23,12 @@
|
|
|
<!-- 操作按钮区域 -->
|
|
|
<div class="table-operator">
|
|
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
- <a-button type="primary" icon="download" @click="handleExportXls('点检内容')">导出</a-button>
|
|
|
+ <!-- <a-button type="primary" icon="download" @click="handleExportXls('点检内容')">导出</a-button>
|
|
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
|
|
<a-button type="primary" icon="import">导入</a-button>
|
|
|
- </a-upload>
|
|
|
+ </a-upload> -->
|
|
|
<!-- 高级查询区域 -->
|
|
|
- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
|
|
|
+ <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> -->
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
<a-menu slot="overlay">
|
|
|
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
|
|
@@ -47,6 +58,15 @@
|
|
|
class="j-table-force-nowrap"
|
|
|
@change="handleTableChange">
|
|
|
|
|
|
+ <template slot="status" slot-scope="text, record">
|
|
|
+ <!-- {{ record.status }} -->
|
|
|
+ <!-- <a-popconfirm title="确定删除吗?" @confirm="() => statusChange(record)">
|
|
|
+ <a-switch :default-checked= "record.status == 0 ? true : false" @change="statusChange(record,$event)" />
|
|
|
+ </a-popconfirm> -->
|
|
|
+ <a-switch :default-checked= "record.status == 0 ? true : false" @click="statusChange(record,$event)" />
|
|
|
+ <!-- <a-switch checkedChildren="禁用" unCheckedChildren="启用" :default-checked= "record.status == 0 ? true : false" @change="statusChange(record,$event)" /> -->
|
|
|
+ </template>
|
|
|
+
|
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
|
<div v-html="text"></div>
|
|
|
</template>
|
|
@@ -133,14 +153,15 @@
|
|
|
dataIndex: 'contentname'
|
|
|
},
|
|
|
{
|
|
|
- title:'设备id',
|
|
|
+ title:'设备',
|
|
|
align:"center",
|
|
|
dataIndex: 'equipmentid_dictText'
|
|
|
},
|
|
|
{
|
|
|
- title:'状态:启用:0、禁用:1',
|
|
|
+ title:'状态',
|
|
|
align:"center",
|
|
|
- dataIndex: 'status_dictText'
|
|
|
+ dataIndex: 'status_dictText',
|
|
|
+ scopedSlots: { customRender: 'status' }
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
@@ -161,6 +182,7 @@
|
|
|
},
|
|
|
dictOptions:{},
|
|
|
superFieldList:[],
|
|
|
+ model: {}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -181,6 +203,9 @@
|
|
|
fieldList.push({type:'sel_search',value:'equipmentid',text:'设备id',dictTable:"ems_tpm_equipment", dictText:'equipmentname', dictCode:'id'})
|
|
|
fieldList.push({type:'string',value:'status',text:'状态:启用:0、禁用:1',dictCode:'spotcheck_content_status'})
|
|
|
this.superFieldList = fieldList
|
|
|
+ },
|
|
|
+ statusChange(record,$event){
|
|
|
+ console.log(record.status,$event)
|
|
|
}
|
|
|
}
|
|
|
}
|