标签项管理
This commit is contained in:
@@ -164,7 +164,9 @@
|
|||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
selectedIds:'', //选择行id
|
selectedIds:'', //选择行id
|
||||||
record:{},
|
record:{},
|
||||||
accept:'application/pdf'
|
accept:'application/pdf',
|
||||||
|
today:'',
|
||||||
|
timer:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
@@ -173,6 +175,20 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
// this.loadData()
|
// 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:{
|
methods:{
|
||||||
//上传
|
//上传
|
||||||
handleUpload(){
|
handleUpload(){
|
||||||
@@ -325,8 +341,17 @@
|
|||||||
},
|
},
|
||||||
addFormClick() {
|
addFormClick() {
|
||||||
this.fileVisible = false
|
this.fileVisible = false
|
||||||
}
|
},
|
||||||
}
|
//10秒刷新页面
|
||||||
|
initSetTimeout(today) {//每隔10秒刷新数据,也就是每隔10秒向后台请求一次数据
|
||||||
|
this.timer=setInterval( () => {
|
||||||
|
eventBUs.$emit('searchReset')
|
||||||
|
}, 10000)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
beforeDestroy(){
|
||||||
|
clearInterval(this.timer)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -351,6 +351,7 @@
|
|||||||
httpurl+=this.url.add;
|
httpurl+=this.url.add;
|
||||||
method = 'post';
|
method = 'post';
|
||||||
this.form.id=''
|
this.form.id=''
|
||||||
|
this.form.isReadOnly=0
|
||||||
}else if(this.submitEdit=='edit'){
|
}else if(this.submitEdit=='edit'){
|
||||||
httpurl+=this.url.edit;
|
httpurl+=this.url.edit;
|
||||||
method = 'put';
|
method = 'put';
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="editVisible(record.id)" v-if="!record.is_read_only">{{$t('edit')}}</a>
|
<a @click="editVisible(record.id)" v-if="record.isReadOnly==0">{{$t('edit')}}</a>
|
||||||
<a-divider type="vertical" v-if="!record.is_read_only" />
|
<a-divider type="vertical" v-if="record.isReadOnly==0" />
|
||||||
<a class="table-del" @click="deleteVisible(record.id)">{{$t('delete')}}</a>
|
<a class="table-del" v-if="record.isReadOnly==2||record.isReadOnly==0" @click="deleteVisible(record.id)">{{$t('delete')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="page" v-if="tableData.length > 0">
|
<div class="page" v-if="tableData.length > 0">
|
||||||
|
|||||||
@@ -88,37 +88,37 @@
|
|||||||
title: this.$t('ChineseName'),
|
title: this.$t('ChineseName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'db_field_txt',
|
dataIndex: 'dbFieldTxt_dictText',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('enName'),
|
title: this.$t('enName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'db_field_en_name',
|
dataIndex: 'dbFieldEnName_dictText',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('AttributeType'),
|
title: this.$t('AttributeType'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'item_text',
|
dataIndex: 'fieldShowType_dictText',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('FieldLength'),
|
title: this.$t('FieldLength'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 80,
|
width: 80,
|
||||||
dataIndex: 'db_length'
|
dataIndex: 'dbLength_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('DisplayOrder'),
|
title: this.$t('DisplayOrder'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 80,
|
width: 80,
|
||||||
dataIndex: 'order_num'
|
dataIndex: 'orderNum_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('DisplayArea'),
|
title: this.$t('DisplayArea'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 80,
|
width: 80,
|
||||||
dataIndex: 'show_area'
|
dataIndex: 'showAreaName_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
@@ -212,7 +212,10 @@
|
|||||||
postAction(`tag/onlCgformTag/page`,params).then(res=>{
|
postAction(`tag/onlCgformTag/page`,params).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
this.total=res.result.total
|
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
|
this.spinning=false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user