修改中英文切换
This commit is contained in:
@@ -22,14 +22,22 @@
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery" style="margin-bottom: 20px">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8" v-for="(item,index) in searchList" :key="index" style="line-height: 48px">
|
||||
<a-col :md="6" :sm="8" style="line-height: 48px">
|
||||
<div class="box-title-text-index">
|
||||
<div class="title-text-index">
|
||||
<span>{{item.enName}}</span><br>
|
||||
<span>{{item.name}}</span>
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input-index" :placeholder="item.placeholder"
|
||||
v-model="queryParam[item.attrModel]"></a-input>
|
||||
<a-input class="box-input-index" :placeholder="this.$t('PleaseEnter') +' '+ this.$t('standard')"
|
||||
v-model="queryParam.serialNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8" style="line-height: 48px">
|
||||
<div class="box-title-text-index">
|
||||
<div class="title-text-index">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input-index" :placeholder="this.$t('PleaseEnter') +' '+ this.$t('title')"
|
||||
v-model="queryParam.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
@@ -40,14 +48,24 @@
|
||||
</a-form>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
rowKey="id"
|
||||
:data-source="dataList"
|
||||
:scroll="{ y: 540 }"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
bordered>
|
||||
<template slot="name" slot-scope="text">
|
||||
<a>{{ text }}</a>
|
||||
</template>
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => `共 ${total} 条`"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
@@ -57,6 +75,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
props: ['query', 'value'],
|
||||
@@ -66,110 +86,58 @@
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
content: [],
|
||||
loading: false,
|
||||
queryParam: {},
|
||||
searchList: [
|
||||
{ name: '标准编号', placeholder: '请输入标准编号', attrModel: 'name', enName: 'standard' },
|
||||
{ name: '标准名称', placeholder: '请输入标准名称', attrModel: 'title', enName: 'standName' }
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: { customRender: 'name' }
|
||||
title: this.$t('standard'),
|
||||
dataIndex: 'serial_number'
|
||||
},
|
||||
{
|
||||
title: 'Cash Assets',
|
||||
className: 'column-money',
|
||||
dataIndex: 'money'
|
||||
title: this.$t('title'),
|
||||
dataIndex: 'title'
|
||||
},
|
||||
{
|
||||
title: 'Address',
|
||||
dataIndex: 'address'
|
||||
title: this.$t('TextStatus'),
|
||||
dataIndex: 'state'
|
||||
}
|
||||
],
|
||||
data: [
|
||||
{
|
||||
key: '1',
|
||||
name: 'John Brown',
|
||||
money: '¥300,000.00',
|
||||
address: 'New York No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: 'Jim Green',
|
||||
money: '¥1,256,000.00',
|
||||
address: 'London No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
name: 'Joe Black',
|
||||
money: '¥120,000.00',
|
||||
address: 'Sidney No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '4',
|
||||
name: 'John Brown',
|
||||
money: '¥300,000.00',
|
||||
address: 'New York No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '5',
|
||||
name: 'Jim Green',
|
||||
money: '¥1,256,000.00',
|
||||
address: 'London No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '6',
|
||||
name: 'Joe Black',
|
||||
money: '¥120,000.00',
|
||||
address: 'Sidney No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '7',
|
||||
name: 'John Brown',
|
||||
money: '¥300,000.00',
|
||||
address: 'New York No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '8',
|
||||
name: 'Jim Green',
|
||||
money: '¥1,256,000.00',
|
||||
address: 'London No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '9',
|
||||
name: 'Joe Black',
|
||||
money: '¥120,000.00',
|
||||
address: 'Sidney No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '10',
|
||||
name: 'Jim Green',
|
||||
money: '¥1,256,000.00',
|
||||
address: 'London No. 1 Lake Park'
|
||||
},
|
||||
{
|
||||
key: '11',
|
||||
name: 'Joe Black',
|
||||
money: '¥120,000.00',
|
||||
address: 'Sidney No. 1 Lake Park'
|
||||
}
|
||||
]
|
||||
dataList: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.replacePage()
|
||||
},
|
||||
methods: {
|
||||
standardClick() {
|
||||
this.visible = true
|
||||
},
|
||||
replacePage() {
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
this.loading = true
|
||||
getAction('document/bussDocumentLibraryEO/replacePageInfo', query).then((res) => {
|
||||
this.loading = false
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records
|
||||
this.total = res.result.total
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
let content = []
|
||||
this.content.forEach(res=>{
|
||||
this.content.forEach(res => {
|
||||
content.push(res.name)
|
||||
})
|
||||
this.$emit('input', content.join(','))
|
||||
@@ -182,7 +150,7 @@
|
||||
this.content = []
|
||||
value.forEach(val => {
|
||||
this.data.forEach((res) => {
|
||||
if (res.key === val){
|
||||
if (res.key === val) {
|
||||
this.content.push(res)
|
||||
}
|
||||
})
|
||||
@@ -190,11 +158,20 @@
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
searchQuery() {
|
||||
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset() {
|
||||
|
||||
}
|
||||
this.queryParam = {}
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.replacePage()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageSize = pageSize
|
||||
this.replacePage()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -203,19 +180,6 @@
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
@@ -224,17 +188,6 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 220px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.button-box {
|
||||
margin-left: 10px;
|
||||
height: 38px;
|
||||
@@ -262,6 +215,7 @@
|
||||
|
||||
.title-text-index {
|
||||
display: inline-block;
|
||||
min-width: 60px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
@@ -278,4 +232,8 @@
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user