|
@@ -1,60 +1,58 @@
|
|
|
<template>
|
|
|
<a-modal
|
|
|
- :title='modalTitle'
|
|
|
- :width='1000'
|
|
|
- :visible='visible'
|
|
|
- :confirmLoading='confirmLoading'
|
|
|
- class='ant-modal2'
|
|
|
- @cancel='handleCancel'
|
|
|
+ :title="modalTitle"
|
|
|
+ :width="1300"
|
|
|
+ :visible="visible"
|
|
|
+ :confirmLoading="confirmLoading"
|
|
|
+ class="ant-modal2"
|
|
|
+ @cancel="handleCancel"
|
|
|
>
|
|
|
- <a-card :bordered='false'>
|
|
|
- <div class='table-page-search-wrapper'>
|
|
|
- <a-form layout='inline'>
|
|
|
- <a-row :gutter='48'>
|
|
|
- <a-col :md='6' :sm='24'>
|
|
|
- <a-form-item label='关键字'>
|
|
|
- <a-input v-model='queryParam.keyword' placeholder='请输入名称/类型名称' />
|
|
|
+ <a-card :bordered="false">
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline">
|
|
|
+ <a-row :gutter="48">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="关键字">
|
|
|
+ <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md='6 || 24' :sm='24'>
|
|
|
- <span class='table-page-search-submitButtons'>
|
|
|
- <a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
|
|
|
- <a-button style='margin-left: 8px' @click='resetSearchForm'>重置</a-button>
|
|
|
- <a @click='()=>{ this.advanced = !this.advanced}' style='margin-left: 8px'>
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
- </a>
|
|
|
- </span>
|
|
|
+ <a-col :md="6 || 24" :sm="24">
|
|
|
+ <span class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
|
|
|
+ <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
|
|
|
- <div class='table-operator'>
|
|
|
- </div>
|
|
|
-
|
|
|
<s-table
|
|
|
- ref='table'
|
|
|
- size='default'
|
|
|
- rowKey='id'
|
|
|
- :columns='columns'
|
|
|
- :data='loadData'
|
|
|
- :alert='options.alert'
|
|
|
- :customRow='options.customRow'
|
|
|
- :rowSelection='options.rowSelection'
|
|
|
- showPagination='auto'
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ rowKey="id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :alert="options.alert"
|
|
|
+ :customRow="options.customRow"
|
|
|
+ :rowSelection="options.rowSelection"
|
|
|
+ :scroll="{x: 1200, y: BaseTool.Constant.scrollY}"
|
|
|
+ showPagination="auto"
|
|
|
>
|
|
|
- <span slot='action' slot-scope='record1'>
|
|
|
- <template>
|
|
|
- <a @click='handleView(record1)'>查看</a>
|
|
|
- </template>
|
|
|
- </span>
|
|
|
+ <span slot="action" slot-scope="record1">
|
|
|
+ <template>
|
|
|
+ <a @click="handleView(record1)">查看</a>
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
</s-table>
|
|
|
- <detail ref='detailModal' />
|
|
|
+ <detail ref="detailModal" />
|
|
|
</a-card>
|
|
|
- <template slot='footer'>
|
|
|
- <a-button :loading='confirmLoading' type='primary' @click='handleCancel()'>取消</a-button>
|
|
|
- <a-button :loading='confirmLoading' type='primary' @click='handleSelect()'>确定</a-button>
|
|
|
+ <template slot="footer">
|
|
|
+ <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">取消</a-button>
|
|
|
+ <a-button :loading="confirmLoading" type="primary" @click="handleSelect()">确定</a-button>
|
|
|
</template>
|
|
|
</a-modal>
|
|
|
</template>
|
|
@@ -89,7 +87,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
advanced: false,
|
|
|
confirmLoading: false,
|
|
@@ -105,55 +103,75 @@ export default {
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'index',
|
|
|
+ width: 50,
|
|
|
customRender: (text, record, index) => {
|
|
|
return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '记录人',
|
|
|
dataIndex: 'createdUserName'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
+
|
|
|
title: '设备ID',
|
|
|
dataIndex: 'sbId'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
+ title: '设备名称',
|
|
|
+ dataIndex: 'sbName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+
|
|
|
title: '更改内容',
|
|
|
dataIndex: 'content'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '原设备位置',
|
|
|
dataIndex: 'oldPositionId'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '修改后设备位置',
|
|
|
dataIndex: 'positionId'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '位号',
|
|
|
dataIndex: 'sbNoId'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '原父设备ID',
|
|
|
dataIndex: 'oldParentId'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '修改后父设备ID',
|
|
|
dataIndex: 'parentId'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '记录时间',
|
|
|
dataIndex: 'createdTime'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '开始时间',
|
|
|
dataIndex: 'startTime'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '结束时间',
|
|
|
dataIndex: 'endTime'
|
|
|
},
|
|
|
{
|
|
|
+ width: 150,
|
|
|
title: '更改类型 1 位置 2 位号 3 父设备',
|
|
|
dataIndex: 'changeType',
|
|
|
customRender: (text, record, index) => {
|
|
@@ -190,7 +208,8 @@ export default {
|
|
|
|
|
|
options: {
|
|
|
alert: {
|
|
|
- show: true, clear: () => {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
this.selectedRowKeys = []
|
|
|
}
|
|
|
},
|
|
@@ -203,15 +222,16 @@ export default {
|
|
|
isCreated: false
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
// 下拉框map
|
|
|
},
|
|
|
methods: {
|
|
|
- tableOption() {
|
|
|
+ tableOption () {
|
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|
|
|
alert: {
|
|
|
- show: true, clear: () => {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
this.selectedRowKeys = []
|
|
|
}
|
|
|
},
|
|
@@ -250,24 +270,24 @@ export default {
|
|
|
this.optionAlertShow = false
|
|
|
}
|
|
|
},
|
|
|
- handleView(record) {
|
|
|
+ handleView (record) {
|
|
|
fetchSbChangeRecord({ id: record.id }).then(res => {
|
|
|
const modal = this.$refs.detailModal
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handleOk() {
|
|
|
+ handleOk () {
|
|
|
this.$refs.table.refresh()
|
|
|
},
|
|
|
- onSelectChange(selectedRowKeys, selectedRows) {
|
|
|
+ onSelectChange (selectedRowKeys, selectedRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
this.selectedRows = selectedRows
|
|
|
},
|
|
|
- resetSearchForm() {
|
|
|
+ resetSearchForm () {
|
|
|
this.queryParam = {}
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- base(record, queryParam = {}) {
|
|
|
+ base (record, queryParam = {}) {
|
|
|
this.visible = true
|
|
|
this.modalTitle = '选择信息'
|
|
|
this.extraQueryParam = queryParam
|
|
@@ -281,11 +301,11 @@ export default {
|
|
|
this.isCreated = true
|
|
|
}
|
|
|
},
|
|
|
- handleCancel() {
|
|
|
+ handleCancel () {
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|
|
|
},
|
|
|
- handleSelect() {
|
|
|
+ handleSelect () {
|
|
|
if (this.selectedRowKeys.length === 0) {
|
|
|
this.$message.warn('请至少选择一项信息')
|
|
|
} else {
|
|
@@ -295,7 +315,7 @@ export default {
|
|
|
this.visible = false
|
|
|
}
|
|
|
},
|
|
|
- mySelect(selectedRowKeys, selectedRows) {
|
|
|
+ mySelect (selectedRowKeys, selectedRows) {
|
|
|
if (this.type === 'radio') {
|
|
|
this.$refs.table.updateSelect(selectedRowKeys, selectedRows)
|
|
|
this.$refs.table.rowSelection.onChange(selectedRowKeys, selectedRows)
|
|
@@ -311,7 +331,6 @@ export default {
|
|
|
this.$refs.table.updateSelect(mySelectedRowKeys, mySelectedRows)
|
|
|
this.$refs.table.rowSelection.onChange(mySelectedRowKeys, mySelectedRows)
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|