|
@@ -1,26 +1,26 @@
|
|
|
<template>
|
|
|
<a-modal
|
|
|
- :title='modalTitle'
|
|
|
- :width='1000'
|
|
|
- :visible='visible'
|
|
|
- :confirmLoading='confirmLoading'
|
|
|
- class='ant-modal2'
|
|
|
- @cancel='handleCancel'
|
|
|
+ :title="modalTitle"
|
|
|
+ :width="1200"
|
|
|
+ :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'>
|
|
|
+ <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>
|
|
@@ -30,31 +30,31 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
|
|
|
- <div class='table-operator'>
|
|
|
+ <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"
|
|
|
+ showPagination="auto"
|
|
|
>
|
|
|
- <span slot='action' slot-scope='record1'>
|
|
|
+ <span slot="action" slot-scope="record1">
|
|
|
<template>
|
|
|
- <a @click='handleView(record1)'>查看</a>
|
|
|
+ <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 +89,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
advanced: false,
|
|
|
confirmLoading: false,
|
|
@@ -117,12 +117,12 @@ export default {
|
|
|
title: '修改时间',
|
|
|
dataIndex: 'createdTime'
|
|
|
},
|
|
|
- {
|
|
|
+ /* {
|
|
|
title: '涉及对象的ID',
|
|
|
dataIndex: 'objId'
|
|
|
- },
|
|
|
+ }, */
|
|
|
{
|
|
|
- title: '记录类型 0 设备 1 备件 2 仓库',
|
|
|
+ title: '记录类型',
|
|
|
dataIndex: 'objType',
|
|
|
customRender: (text, record, index) => {
|
|
|
return this.BaseTool.Amount.formatter(text)
|
|
@@ -131,14 +131,14 @@ export default {
|
|
|
{
|
|
|
title: '修改记录值',
|
|
|
dataIndex: 'updateJson'
|
|
|
- },
|
|
|
- {
|
|
|
+ }
|
|
|
+ /* {
|
|
|
title: '操作',
|
|
|
key: 'action',
|
|
|
width: '200px',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'action' }
|
|
|
- }
|
|
|
+ } */
|
|
|
],
|
|
|
// 下拉框map
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -149,7 +149,7 @@ export default {
|
|
|
...this.extraQueryParam,
|
|
|
dataScope: {
|
|
|
sortBy: 'desc',
|
|
|
- sortName: 'update_time'
|
|
|
+ sortName: 'created_time'
|
|
|
}
|
|
|
}
|
|
|
return getSbChangeLogPage(Object.assign(parameter, this.queryParam))
|
|
@@ -162,7 +162,8 @@ export default {
|
|
|
|
|
|
options: {
|
|
|
alert: {
|
|
|
- show: true, clear: () => {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
this.selectedRowKeys = []
|
|
|
}
|
|
|
},
|
|
@@ -175,15 +176,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 = []
|
|
|
}
|
|
|
},
|
|
@@ -222,24 +224,24 @@ export default {
|
|
|
this.optionAlertShow = false
|
|
|
}
|
|
|
},
|
|
|
- handleView(record) {
|
|
|
+ handleView (record) {
|
|
|
fetchSbChangeLog({ 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
|
|
@@ -253,11 +255,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 {
|
|
@@ -267,7 +269,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)
|
|
@@ -283,7 +285,6 @@ export default {
|
|
|
this.$refs.table.updateSelect(mySelectedRowKeys, mySelectedRows)
|
|
|
this.$refs.table.rowSelection.onChange(mySelectedRowKeys, mySelectedRows)
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|