标签项管理

This commit is contained in:
caoyang
2022-03-07 18:21:33 +08:00
parent 411e6f5762
commit 435e4565f4
4 changed files with 42 additions and 13 deletions
@@ -164,7 +164,9 @@
confirmLoading: false,
selectedIds:'', //选择行id
record:{},
accept:'application/pdf'
accept:'application/pdf',
today:'',
timer:''
}
},
props:{
@@ -173,6 +175,20 @@
mounted() {
// this.loadData()
},
created() {
const date = new Date(),
year = date.getFullYear(),
month = date.getMonth()+1,
myDate = date.getDate()
this.today = `${year}/${month < 10 ? '0'+month : month}/${myDate < 10 ? '0'+myDate : myDate}`
if(this.timer){
clearInterval(this.timer)
}else{
eventBUs.$emit('searchReset')
this.initSetTimeout(this.today)//调用每隔10秒刷新数据
}
},
methods:{
//上传
handleUpload(){
@@ -325,8 +341,17 @@
},
addFormClick() {
this.fileVisible = false
}
}
},
//10秒刷新页面
initSetTimeout(today) {//每隔10秒刷新数据,也就是每隔10秒向后台请求一次数据
this.timer=setInterval( () => {
eventBUs.$emit('searchReset')
}, 10000)
},
},
beforeDestroy(){
clearInterval(this.timer)
},
}
</script>
@@ -351,6 +351,7 @@
httpurl+=this.url.add;
method = 'post';
this.form.id=''
this.form.isReadOnly=0
}else if(this.submitEdit=='edit'){
httpurl+=this.url.edit;
method = 'put';
@@ -11,9 +11,9 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="editVisible(record.id)" v-if="!record.is_read_only">{{$t('edit')}}</a>
<a-divider type="vertical" v-if="!record.is_read_only" />
<a class="table-del" @click="deleteVisible(record.id)">{{$t('delete')}}</a>
<a @click="editVisible(record.id)" v-if="record.isReadOnly==0">{{$t('edit')}}</a>
<a-divider type="vertical" v-if="record.isReadOnly==0" />
<a class="table-del" v-if="record.isReadOnly==2||record.isReadOnly==0" @click="deleteVisible(record.id)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="tableData.length > 0">
@@ -88,37 +88,37 @@
title: this.$t('ChineseName'),
align: "center",
width: 100,
dataIndex: 'db_field_txt',
dataIndex: 'dbFieldTxt_dictText',
},
{
title: this.$t('enName'),
align: "center",
width: 100,
dataIndex: 'db_field_en_name',
dataIndex: 'dbFieldEnName_dictText',
},
{
title: this.$t('AttributeType'),
align: "center",
width: 100,
dataIndex: 'item_text',
dataIndex: 'fieldShowType_dictText',
},
{
title: this.$t('FieldLength'),
align: "center",
width: 80,
dataIndex: 'db_length'
dataIndex: 'dbLength_dictText'
},
{
title: this.$t('DisplayOrder'),
align: "center",
width: 80,
dataIndex: 'order_num'
dataIndex: 'orderNum_dictText'
},
{
title: this.$t('DisplayArea'),
align: "center",
width: 80,
dataIndex: 'show_area'
dataIndex: 'showAreaName_dictText'
},
{
title: this.$t('operation'),
@@ -212,7 +212,10 @@
postAction(`tag/onlCgformTag/page`,params).then(res=>{
if(res.success){
this.total=res.result.total
this.tableData= [ ...res.result]
this.tableData= [ ...res.result.records]
this.spinning=false
}else{
this.$message.warning(res.message)
this.spinning=false
}
})