订阅修改
This commit is contained in:
@@ -3,38 +3,38 @@
|
|||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<div class="collection-search-wrapper">
|
<div class="collection-search-wrapper">
|
||||||
<div class="collection-search-header">
|
<div class="collection-search-header">
|
||||||
<search :url="url" :flag="'1'"></search>
|
<!-- <search :url="url" :flag="'1'"></search>-->
|
||||||
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">-->
|
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
|
||||||
<!-- <a-form-model-->
|
<a-form-model
|
||||||
<!-- class="collection-content"-->
|
class="collection-content"
|
||||||
<!-- :model="queryParams"-->
|
:model="queryParams"
|
||||||
<!-- ref="tagEditForm"-->
|
ref="tagEditForm"
|
||||||
<!-- >-->
|
>
|
||||||
<!-- <a-row :gutter="24" type="flex" justify="start">-->
|
<a-row :gutter="24" type="flex" justify="start">
|
||||||
<!-- <a-col :md="6" :sm="8">-->
|
<a-col :md="6" :sm="8">
|
||||||
<!-- <a-form-model-item :label="'编号'">-->
|
<a-form-model-item :label="$t('standard')">
|
||||||
<!-- <j-input :placeholder="'请输入编号'" v-model="queryParams.serialNumber"></j-input>-->
|
<a-input :placeholder="$t('enterNumber')" v-model="queryParams.serialNumber"></a-input>
|
||||||
<!-- </a-form-model-item>-->
|
</a-form-model-item>
|
||||||
<!-- </a-col>-->
|
</a-col>
|
||||||
<!-- <a-col :md="6" :sm="8">-->
|
<a-col :md="6" :sm="8">
|
||||||
<!-- <a-form-model-item :label="'标题'">-->
|
<a-form-model-item :label="$t('title')">
|
||||||
<!-- <j-input :placeholder="'请输入标题'" v-model="queryParams.title"></j-input>-->
|
<a-input :placeholder="$t('enterTitle')" v-model="queryParams.title"></a-input>
|
||||||
<!-- </a-form-model-item>-->
|
</a-form-model-item>
|
||||||
<!-- </a-col>-->
|
</a-col>
|
||||||
<!-- <a-col :md="6" :sm="8">-->
|
<a-col :md="6" :sm="8">
|
||||||
<!-- <a-form-model-item :label="'状态'">-->
|
<a-form-model-item :label="$t('status')">
|
||||||
<!-- <j-dict-select-tag type="list" v-model="queryParams.state" dictCode="file_type" :placeholder="'请选择状态'" />-->
|
<j-dict-select-tag type="list" v-model="queryParams.state" dictCode="file_type" :placeholder="$t('selectStatus')" />
|
||||||
<!-- </a-form-model-item>-->
|
</a-form-model-item>
|
||||||
<!-- </a-col>-->
|
</a-col>
|
||||||
<!-- <a-col :md="6" :sm="8">-->
|
<a-col :md="6" :sm="8">
|
||||||
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
|
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||||
<!-- <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>-->
|
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
|
||||||
<!-- </span>-->
|
</span>
|
||||||
<!-- </a-col>-->
|
</a-col>
|
||||||
<!-- </a-row>-->
|
</a-row>
|
||||||
<!-- </a-form-model>-->
|
</a-form-model>
|
||||||
<!-- </a-form>-->
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
@@ -165,6 +165,7 @@
|
|||||||
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.loading=false
|
this.loading=false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -298,6 +299,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.collection-search-header{
|
.collection-search-header{
|
||||||
|
.ant-form-item-control-wrapper{
|
||||||
|
min-width: 200px;
|
||||||
|
.ant-form-item{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-col-md-6{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.table-page-search-submitButtons{
|
.table-page-search-submitButtons{
|
||||||
float: none!important;
|
float: none!important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,17 +163,17 @@
|
|||||||
// this.loadData()
|
// this.loadData()
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.refresh()
|
// this.refresh()
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
drawVisible(val){
|
// drawVisible(val){
|
||||||
if(val&&this.timer){
|
// if(val&&this.timer){
|
||||||
clearInterval(this.timer)
|
// clearInterval(this.timer)
|
||||||
}else{
|
// }else{
|
||||||
clearInterval(this.timer)
|
// clearInterval(this.timer)
|
||||||
this.initSetTimeout(this.today)//调用每隔10秒刷新数据
|
// this.initSetTimeout(this.today)//调用每隔10秒刷新数据
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 定时刷新页面
|
// 定时刷新页面
|
||||||
|
|||||||
@@ -3,7 +3,32 @@
|
|||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<div class="subscribtion-search-wrapper">
|
<div class="subscribtion-search-wrapper">
|
||||||
<div class="subscribtion-search-header">
|
<div class="subscribtion-search-header">
|
||||||
<search :url="url" :flag="'1'"></search>
|
<!-- <search :url="url" :flag="'1'"></search>-->
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="6" :sm="6">
|
||||||
|
<a-form-item :label="$t('standard')">
|
||||||
|
<a-input :placeholder="$t('enterNumber')" v-model="queryParams.serialNumber"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="6" :sm="6">
|
||||||
|
<a-form-item :label="$t('title')">
|
||||||
|
<a-input :placeholder="$t('enterTitle')" v-model="queryParams.title"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="6" :sm="6">
|
||||||
|
<a-form-item :label="$t('status')">
|
||||||
|
<j-dict-select-tag type="list" v-model="queryParams.state" dictCode="file_type" :placeholder="$t('selectStatus')" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="6" :sm="4">
|
||||||
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
|
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
||||||
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
@@ -134,7 +159,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
//获取列表数据
|
//获取列表数据
|
||||||
@@ -143,9 +168,10 @@
|
|||||||
...this.queryParams
|
...this.queryParams
|
||||||
}
|
}
|
||||||
this.loading=true
|
this.loading=true
|
||||||
getAction(`subscribe/onlCgformSubscribe/page`,params).then(res=>{
|
postAction(`subscribe/onlCgformSubscribe/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.loading=false
|
this.loading=false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -280,10 +306,16 @@
|
|||||||
.subscribtion-content{
|
.subscribtion-content{
|
||||||
.ant-form-item-control-wrapper{
|
.ant-form-item-control-wrapper{
|
||||||
min-width: 180px;
|
min-width: 180px;
|
||||||
|
.ant-form-item{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.subscribtion-search-header{
|
.subscribtion-search-header{
|
||||||
|
.ant-form-item-control-wrapper{
|
||||||
|
min-width: 200px;
|
||||||
|
}
|
||||||
.table-page-search-submitButtons{
|
.table-page-search-submitButtons{
|
||||||
float: none!important;
|
float: none!important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="dic-list-header">
|
<div class="dic-list-header">
|
||||||
<a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol">
|
<a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||||
<a-form-item :label="$t('name')+':'">
|
<a-form-item :label="$t('name')+':'">
|
||||||
<j-input v-model="queryParams.itemText" :placeholder="$t('enterName')" />
|
<a-input v-model="queryParams.itemText" :placeholder="$t('enterName')" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<div class="form-btn">
|
<div class="form-btn">
|
||||||
@@ -186,7 +186,8 @@
|
|||||||
//sys/category/queryBySysName
|
//sys/category/queryBySysName
|
||||||
//sys/category/queryBySysDictId
|
//sys/category/queryBySysDictId
|
||||||
getAction(`sys/category/queryBySysDictId`,{
|
getAction(`sys/category/queryBySysDictId`,{
|
||||||
...this.queryParams,
|
// ...this.queryParams,
|
||||||
|
// name:this.queryParams.itemText,
|
||||||
id:this.record.id,
|
id:this.record.id,
|
||||||
isTagDict:1
|
isTagDict:1
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
@@ -198,7 +199,6 @@
|
|||||||
this.dataFlag=true
|
this.dataFlag=true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//将数据拼成树形结构
|
//将数据拼成树形结构
|
||||||
@@ -376,12 +376,14 @@
|
|||||||
//树形选中行
|
//树形选中行
|
||||||
selectedKeys(val){
|
selectedKeys(val){
|
||||||
this.selectedIds=val
|
this.selectedIds=val
|
||||||
|
console.log('seleVal',val)
|
||||||
},
|
},
|
||||||
//批量删除
|
//批量删除
|
||||||
batDelete(){
|
batDelete(){
|
||||||
let params={
|
let params={
|
||||||
ids:this.selectedIds.join(',')
|
ids:this.selectedIds.join(',')
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.selectedIds && this.selectedIds.length>0){
|
if(this.selectedIds && this.selectedIds.length>0){
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('ConfirmDelete'),
|
title: this.$t('ConfirmDelete'),
|
||||||
|
|||||||
@@ -5,28 +5,29 @@
|
|||||||
class="tree-table-con"
|
class="tree-table-con"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="tabData"
|
:data-source="tabData"
|
||||||
|
rowKey="id"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:rowClassName='setRowClassName'
|
:rowClassName='setRowClassName'
|
||||||
:row-selection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange, onSelectAll: onSelectAll, onSelect: onSelect, }"
|
:row-selection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange }"
|
||||||
>
|
>
|
||||||
<template slot="action" slot-scope="text, record">
|
<template slot="action" slot-scope="text, record">
|
||||||
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">{{$t('edit')}}</a>
|
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">{{$t('edit')}}</a>
|
||||||
<a class="action-delete" href="javascript:;" @click="onDelete(record)">{{$t('delete')}}</a>
|
<a class="action-delete" href="javascript:;" @click="onDelete(record)">{{$t('delete')}}</a>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="page" v-if="tabData.length > 0">
|
<!-- <div class="page" v-if="tabData.length > 0">-->
|
||||||
<a-pagination
|
<!-- <a-pagination-->
|
||||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
||||||
show-quick-jumper
|
<!-- show-quick-jumper-->
|
||||||
show-size-changer
|
<!-- show-size-changer-->
|
||||||
:current="queryParams.pageNo"
|
<!-- :current="queryParams.pageNo"-->
|
||||||
:page-size.sync="queryParams.pageSize"
|
<!-- :page-size.sync="queryParams.pageSize"-->
|
||||||
:total="total"
|
<!-- :total="total"-->
|
||||||
@change="onChangePage"
|
<!-- @change="onChangePage"-->
|
||||||
@showSizeChange="SizeChange"
|
<!-- @showSizeChange="SizeChange"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -165,107 +166,108 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSelectChange(keys){
|
onSelectChange(keys){
|
||||||
|
this.selectedRowKeys=keys
|
||||||
// console.log('keys',keys,this.selectedRowKeys)
|
// console.log('keys',keys,this.selectedRowKeys)
|
||||||
},
|
},
|
||||||
onSelectAll(selected) {
|
// onSelectAll(selected) {
|
||||||
if (selected) {
|
// if (selected) {
|
||||||
const tabData = this.tabData;
|
// const tabData = this.tabData;
|
||||||
const arr = [];
|
// const arr = [];
|
||||||
setVal(tabData, arr);
|
// setVal(tabData, arr);
|
||||||
this.selectedRowKeys = arr;
|
// this.selectedRowKeys = arr;
|
||||||
} else {
|
// } else {
|
||||||
this.selectedRowKeys = [];
|
// this.selectedRowKeys = [];
|
||||||
}
|
// }
|
||||||
function setVal(list, arr) {
|
// function setVal(list, arr) {
|
||||||
list.forEach(v => {
|
// list.forEach(v => {
|
||||||
arr.push(v.key);
|
// arr.push(v.key);
|
||||||
if (v.children) {
|
// if (v.children) {
|
||||||
setVal(v.children, arr);
|
// setVal(v.children, arr);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
onSelect(record, selected) {
|
// onSelect(record, selected) {
|
||||||
const set = new Set(this.selectedRowKeys);
|
// const set = new Set(this.selectedRowKeys);
|
||||||
const tabData = this.tabData;
|
// const tabData = this.tabData;
|
||||||
const key = record.key;
|
// const key = record.key;
|
||||||
if (selected) {
|
// if (selected) {
|
||||||
set.add(key);
|
// set.add(key);
|
||||||
record.children && setChildCheck(record.children);
|
// record.children && setChildCheck(record.children);
|
||||||
setParentCheck(key);
|
// setParentCheck(key);
|
||||||
} else {
|
// } else {
|
||||||
set.delete(key);
|
// set.delete(key);
|
||||||
record.children && setChildUncheck(record.children);
|
// record.children && setChildUncheck(record.children);
|
||||||
setParentUncheck(key);
|
// setParentUncheck(key);
|
||||||
}
|
// }
|
||||||
this.selectedRowKeys = Array.from(set);
|
// this.selectedRowKeys = Array.from(set);
|
||||||
// console.log('keyssssss',this.selectedRowKeys)
|
// // console.log('keyssssss',this.selectedRowKeys)
|
||||||
this.$emit('selectedKeys',this.selectedRowKeys)
|
// this.$emit('selectedKeys',this.selectedRowKeys)
|
||||||
// 设置父级选择
|
// // 设置父级选择
|
||||||
function setParentCheck(key) {
|
// function setParentCheck(key) {
|
||||||
let parent = getParent(key);
|
// let parent = getParent(key);
|
||||||
if (parent) {
|
// if (parent) {
|
||||||
set.add(parent.key);
|
// set.add(parent.key);
|
||||||
setParentCheck(parent.key);
|
// setParentCheck(parent.key);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// 设置父级取消,如果父级的子集有选择,则不取消
|
// // 设置父级取消,如果父级的子集有选择,则不取消
|
||||||
function setParentUncheck(key) {
|
// function setParentUncheck(key) {
|
||||||
let childHasCheck = false,
|
// let childHasCheck = false,
|
||||||
parent = getParent(key);
|
// parent = getParent(key);
|
||||||
if (parent) {
|
// if (parent) {
|
||||||
let childlist = parent.children;
|
// let childlist = parent.children;
|
||||||
childlist.forEach(function(v) {
|
// childlist.forEach(function(v) {
|
||||||
if (set.has(v.key)) childHasCheck = true;
|
// if (set.has(v.key)) childHasCheck = true;
|
||||||
});
|
// });
|
||||||
if (!childHasCheck) {
|
// if (!childHasCheck) {
|
||||||
set.delete(parent.key);
|
// set.delete(parent.key);
|
||||||
setParentUncheck(parent.key);
|
// setParentUncheck(parent.key);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// 获取当前对象的父级
|
// // 获取当前对象的父级
|
||||||
function getParent(key) {
|
// function getParent(key) {
|
||||||
for (let i = 0; i < tabData.length; i++) {
|
// for (let i = 0; i < tabData.length; i++) {
|
||||||
if (tabData[i].key === key) {
|
// if (tabData[i].key === key) {
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return _getParent(tabData);
|
// return _getParent(tabData);
|
||||||
function _getParent(list) {
|
// function _getParent(list) {
|
||||||
let childlist,
|
// let childlist,
|
||||||
isExist = false;
|
// isExist = false;
|
||||||
for (let i = 0; i < list.length; i++) {
|
// for (let i = 0; i < list.length; i++) {
|
||||||
if ((childlist = list[i].children)) {
|
// if ((childlist = list[i].children)) {
|
||||||
childlist.forEach(function(v) {
|
// childlist.forEach(function(v) {
|
||||||
if (v.key === key) isExist = true;
|
// if (v.key === key) isExist = true;
|
||||||
});
|
// });
|
||||||
if (isExist) {
|
// if (isExist) {
|
||||||
return list[i];
|
// return list[i];
|
||||||
}
|
// }
|
||||||
if (_getParent(childlist)) {
|
// if (_getParent(childlist)) {
|
||||||
return _getParent(childlist);
|
// return _getParent(childlist);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// 设置child全选
|
// // 设置child全选
|
||||||
function setChildCheck(list) {
|
// function setChildCheck(list) {
|
||||||
list.forEach(function(v) {
|
// list.forEach(function(v) {
|
||||||
set.add(v.key);
|
// set.add(v.key);
|
||||||
v.children && setChildCheck(v.children);
|
// v.children && setChildCheck(v.children);
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
// 设置child取消
|
// // 设置child取消
|
||||||
function setChildUncheck(list) {
|
// function setChildUncheck(list) {
|
||||||
list.forEach(function(v) {
|
// list.forEach(function(v) {
|
||||||
set.delete(v.key);
|
// set.delete(v.key);
|
||||||
v.children && setChildUncheck(v.children);
|
// v.children && setChildUncheck(v.children);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="6" :sm="12">
|
<a-col :md="6" :sm="12">
|
||||||
<a-form-item :label="$t('LabeItemName')">
|
<a-form-item :label="$t('LabeItemName')">
|
||||||
<j-input :placeholder="$t('PleaseEnterLabelName')" v-model="queryParam.dbFieldTxt"></j-input>
|
<a-input :placeholder="$t('PleaseEnterLabelName')" v-model="queryParam.dbFieldTxt"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
|
|||||||
Reference in New Issue
Block a user