修改已知bug1
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div class="operator-text" @click="handleBatCancel">
|
<div class="operator-text" @click="handleBatCancel">
|
||||||
<a-icon type="delete" />
|
<a-icon type="delete"/>
|
||||||
{{ $t('BatchCancel') }}
|
{{ $t('BatchCancel') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -93,156 +93,159 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name:'collection',
|
name: 'collection',
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
selectedRowKeys:[],
|
selectedRowKeys: [],
|
||||||
queryParams:{
|
queryParams: {
|
||||||
pageNo:1,
|
pageNo: 1,
|
||||||
pageSize:10
|
pageSize: 10
|
||||||
}, //搜索条件
|
}, //搜索条件
|
||||||
total:0,
|
total: 0,
|
||||||
//列表表头
|
//列表表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('standard'),
|
title: this.$t('standard'),
|
||||||
dataIndex: 'serialNumber',
|
dataIndex: 'serialNumber',
|
||||||
key: 'serialNumber',
|
key: 'serialNumber',
|
||||||
scopedSlots: {customRender: 'serialNumber'},
|
scopedSlots: { customRender: 'serialNumber' },
|
||||||
align: "center",
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 180,
|
width: 180
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('title'),
|
title: this.$t('title'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
scopedSlots: {customRender: 'serialtitle'},
|
scopedSlots: { customRender: 'serialtitle' },
|
||||||
width: 180,
|
width: 180,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
dataIndex: 'title',
|
dataIndex: 'title'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('status'),
|
title: this.$t('status'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
dataIndex: 'state',
|
dataIndex: 'state'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('collectionTime'),
|
title: this.$t('collectionTime'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
scopedSlots: {customRender: 'action'},
|
scopedSlots: { customRender: 'action' },
|
||||||
align: "center",
|
align: 'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 170
|
width: 170
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
tableData:[], //列表数据
|
tableData: [], //列表数据
|
||||||
selecIds:[],
|
selecIds: [],
|
||||||
loading:false,
|
loading: false
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
//获取列表数据
|
//获取列表数据
|
||||||
loadData(){
|
loadData() {
|
||||||
let params={
|
let params = {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}
|
}
|
||||||
this.loading=true
|
this.loading = true
|
||||||
postAction(`collection/onlCgformCollection/page`,params).then(res=>{
|
postAction(`collection/onlCgformCollection/page`, params).then(res => {
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
this.tableData= [ ...res.result.records ]
|
this.tableData = [...res.result.records]
|
||||||
this.total=res.result.total
|
this.total = res.result.total
|
||||||
this.loading=false
|
this.loading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},//搜索
|
},//搜索
|
||||||
searchQuery(){
|
searchQuery() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
//批量取消收藏
|
//批量取消收藏
|
||||||
handleBatCancel(){
|
handleBatCancel() {
|
||||||
let params={
|
let params = {
|
||||||
ids:this.selecIds.join(',')
|
ids: this.selecIds.join(',')
|
||||||
}
|
}
|
||||||
if(this.selecIds&&this.selecIds.length>0){
|
if (this.selecIds && this.selecIds.length > 0) {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('BatchCancelCollection'),
|
title: this.$t('BatchCancelCollection'),
|
||||||
content: '',
|
content: '',
|
||||||
onOk:
|
onOk:
|
||||||
async () => {
|
async () => {
|
||||||
deleteAction(`collection/onlCgformCollection/deleteBatch`,params).then(res=> {
|
deleteAction(`collection/onlCgformCollection/deleteBatch`, params).then(res => {
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!==1){
|
if (this.selecIds.length == this.tableData.length && this.queryParams.pageNo !== 1) {
|
||||||
this.queryParams.pageNo=this.queryParams.pageNo-1
|
this.queryParams.pageNo = this.queryParams.pageNo - 1
|
||||||
}
|
}
|
||||||
this.loadData()
|
this.loadData()
|
||||||
}else{
|
} else {
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onCancel() {},
|
onCancel() {
|
||||||
});
|
}
|
||||||
}else{
|
})
|
||||||
|
} else {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//取消收藏
|
//取消收藏
|
||||||
onCancel(record){
|
onCancel(record) {
|
||||||
let params={
|
let params = {
|
||||||
id:record.id
|
id: record.id
|
||||||
}
|
}
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('confirmCancelCollection'),
|
title: this.$t('confirmCancelCollection'),
|
||||||
content: '',
|
content: '',
|
||||||
onOk:
|
onOk:
|
||||||
async () => {
|
async () => {
|
||||||
deleteAction(`collection/onlCgformCollection/delete`,params).then(res=> {
|
deleteAction(`collection/onlCgformCollection/delete`, params).then(res => {
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
if(this.tableData.length==1&&this.queryParams.pageNo!==1){
|
if (this.tableData.length == 1 && this.queryParams.pageNo !== 1) {
|
||||||
this.queryParams.pageNo=this.queryParams.pageNo-1
|
this.queryParams.pageNo = this.queryParams.pageNo - 1
|
||||||
}
|
}
|
||||||
this.loadData()
|
this.loadData()
|
||||||
}else{
|
} else {
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onCancel() {},
|
onCancel() {
|
||||||
});
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//清空
|
//清空
|
||||||
searchReset(){
|
searchReset() {
|
||||||
this.queryParams={
|
this.queryParams = {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
}
|
}
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
//点击页数
|
//点击页数
|
||||||
onChangePage(page,pageSize){
|
onChangePage(page, pageSize) {
|
||||||
this.queryParams.pageNo = page
|
this.queryParams.pageNo = page
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
//一页显示条数
|
//一页显示条数
|
||||||
SizeChange(page,pageSize){
|
SizeChange(page, pageSize) {
|
||||||
this.queryParams.pageSize = pageSize
|
this.queryParams.pageSize = pageSize
|
||||||
this.queryParams.pageNo=1
|
this.queryParams.pageNo = 1
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
//选择框
|
//选择框
|
||||||
@@ -255,21 +258,25 @@
|
|||||||
// ids.push(item.id)
|
// ids.push(item.id)
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
this.selecIds=rows
|
this.selecIds = rows
|
||||||
// console.log('selectedRowKeys changed: ', ids);
|
// console.log('selectedRowKeys changed: ', ids);
|
||||||
},
|
},
|
||||||
//点击编号
|
//点击编号
|
||||||
numberClick(records){
|
numberClick(records) {
|
||||||
|
|
||||||
},
|
},
|
||||||
//点击名称
|
//点击名称
|
||||||
titleClick(records){
|
titleClick(records) {
|
||||||
|
|
||||||
},
|
},
|
||||||
onDetail(item) {
|
onDetail(item) {
|
||||||
let newUrl = this.$router.resolve({
|
let newUrl = this.$router.resolve({
|
||||||
path: '/docManage/library/detail',
|
path: '/docManage/library/detail',
|
||||||
query: { id:item.documentId }
|
query: {
|
||||||
|
id: item.documentId,
|
||||||
|
serial_number: item.serialNumber,
|
||||||
|
title: item.title
|
||||||
|
}
|
||||||
})
|
})
|
||||||
window.open(newUrl.href, '_blank')
|
window.open(newUrl.href, '_blank')
|
||||||
}
|
}
|
||||||
@@ -278,17 +285,20 @@
|
|||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
.collection{
|
|
||||||
.collection-search-wrapper{
|
.collection {
|
||||||
|
.collection-search-wrapper {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
.colloction-table{
|
|
||||||
.page{
|
.colloction-table {
|
||||||
|
.page {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -346,6 +356,7 @@
|
|||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-input .ant-select-selection--single {
|
.box-input .ant-select-selection--single {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
>
|
>
|
||||||
<span slot="projectStatusTitle">
|
<span slot="projectStatusTitle">
|
||||||
<span>{{this.$t('CurrentStatusOfTheProject')}}</span><br/>
|
<span>{{this.$t('CurrentStatusOfTheProject')}}</span><br/>
|
||||||
<span>{{'('+$t('red')+'/'+$t('yellow')+'/'+$t('green')+')'}}</span>
|
<span>{{'('+$t('red')+'/'+$t('yellow')+'/'+$t('green')+'/'+$t('blue')+')'}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span slot="CertificationProgressTitle">
|
<span slot="CertificationProgressTitle">
|
||||||
<span>{{this.$t('CertificationProgress')}}</span><br/>
|
<span>{{this.$t('CertificationProgress')}}</span><br/>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
>
|
>
|
||||||
<span slot="projectStatusTitle">
|
<span slot="projectStatusTitle">
|
||||||
<span>{{this.$t('CurrentStatusOfTheProject')}}</span><br/>
|
<span>{{this.$t('CurrentStatusOfTheProject')}}</span><br/>
|
||||||
<span>{{'('+$t('red')+'/'+$t('yellow')+'/'+$t('green')+')'}}</span>
|
<span>{{'('+$t('red')+'/'+$t('yellow')+'/'+$t('green')+'/'+$t('blue')+')'}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span slot="CertificationProgressTitle">
|
<span slot="CertificationProgressTitle">
|
||||||
<span>{{this.$t('CertificationProgress')}}</span><br/>
|
<span>{{this.$t('CertificationProgress')}}</span><br/>
|
||||||
|
|||||||
Reference in New Issue
Block a user