bug修改

This commit is contained in:
caoyang
2022-03-10 14:41:42 +08:00
parent bf2e8cf916
commit 90a1ee53eb
16 changed files with 638 additions and 241 deletions
+5 -2
View File
@@ -30,8 +30,8 @@ See https://github.com/adobe-type-tools/cmap-resources
<link rel="stylesheet" href="viewer.css">
<!-- This snippet is used in production (included from viewer.html) -->
<link rel="resource" type="application/l10n" href="locale/locale.properties">
<link rel="stylesheet" href="../../zTree/css/demo.css" type="text/css">
<link rel="stylesheet" href="../../zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<!-- <link rel="stylesheet" href="../../zTree/css/demo.css" type="text/css">-->
<!-- <link rel="stylesheet" href="../../zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">-->
<style>
/*.pdfViewer .page{*/
/* margin: 1px auto -8px 232px;*/
@@ -205,6 +205,9 @@ See https://github.com/adobe-type-tools/cmap-resources
<body tabindex="1" class="loadingInProgress">
<!--遮罩层-->
<div class="mask"></div>
<!-- <a href="/pdf/web/viewer.html?file=http://10.0.1.31:3000/file/demo.pdf">-->
<!-- 预览文件-->
<!-- </a>-->
<!-- <ul id="treeDemo" class="ztree"></ul>-->
<!-- <div id="rMenu">-->
<!-- &lt;!&ndash; 不需要权限 &ndash;&gt;-->
+25
View File
@@ -508,5 +508,30 @@ module.exports = {
labelNameCannotDuplicate:'Label name cannot be duplicate',
list:'list',
paragraph:'paragraph',
enterNumber:'please enter the number',
enterTitle:'Please enter a title',
backDocument:'back to document library',
fileName:'file name',
splitTime:'split time',
splitResult:'split result',
collectionTime:'collection time',
split:'split',
splitFile:'split file',
clauseName:'clause name',
clauseContent:'clause content',
newClause:'new clause',
clauseNo:'clause No.',
functionalAreas:'functional areas',
technicalField:'technical field',
informationCategory:'information category',
contentValidity:'content validity',
content:'content',
Add:'add',
subscriptionTime:'subscription time',
confirmBulkUnsubscribe:'Confirm bulk unsubscribe?',
BatchCancelCollection:'Confirm batch cancel collection?',
unsubscribeConfirm:'unsubscribe confirm?',
confirmCancelCollection:'confirm to cancel collection?',
theRelease:'The release date should not exceed the standard implementation date'
}
+24
View File
@@ -512,5 +512,29 @@ module.exports = {
labelNameCannotDuplicate:'标签名称不能重复',
list:'列表',
paragraph:'段落',
enterNumber:'请输入编号',
enterTitle:'请输入标题',
backDocument:'回传至文档库',
fileName:'文件名称',
splitTime:'拆分时间',
splitResult:'拆分结果',
collectionTime:'收藏时间',
split:'拆分',
splitFile:'拆分文件',
clauseName:'条款名称',
clauseContent:'条款内容',
newClause:'新增条款',
clauseNo:'条款号',
functionalAreas:'功能领域',
technicalField:'技术领域',
informationCategory:'信息类别',
contentValidity:'内容简介',
content:'内容',
Add:'增加',
subscriptionTime:'订阅时间',
confirmBulkUnsubscribe:'确认批量取消订阅?',
BatchCancelCollection:'确认批量取消收藏?',
unsubscribeConfirm:'确认取消订阅?',
confirmCancelCollection:'确认取消收藏?',
theRelease:'发布日期不能大于标准实施日期'
}
@@ -44,35 +44,38 @@
</div>
</div>
<div class="colloction-table">
<tableData
:url="url"
:flag="'1'"
:OperationList="OperationList"
showAction
@titleClick="titleClick"
@onCancel="onCancel"
@onSelectChange="onSelectChange"
@detailClick="detailClick"
></tableData>
<!-- <a-table bordered :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">-->
<!-- <a slot="serialNumber" slot-scope="text, record" @click="numberClick(record)">{{ text }}</a>-->
<!--&lt;!&ndash; <a slot="title" slot-scope="text, record" @click="titleClick(record)">{{ text }}</a>&ndash;&gt;-->
<!-- <template slot="action" slot-scope="text, record">-->
<!-- <a class="action-delete" href="javascript:;" @click="onCancel(record)">取消收藏</a>-->
<!-- </template>-->
<!-- </a-table>-->
<!-- <div class="page" v-if="tableData.length > 0">-->
<!-- <a-pagination-->
<!-- :show-total="total => ` ${total} `"-->
<!-- show-quick-jumper-->
<!-- show-size-changer-->
<!-- :current="queryParams.pageNo"-->
<!-- :page-size.sync="queryParams.pageSize"-->
<!-- :total="total"-->
<!-- @change="onChangePage"-->
<!-- @showSizeChange="SizeChange"-->
<!-- />-->
<!-- </div>-->
<a-table
ref="table"
size="middle"
rowKey="id"
:columns="columns"
:dataSource="tableData"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
>
<span slot="serialNumber" slot-scope="text, record">
<a class="table-del" @click="onDetail(record)">{{record.serialNumber}}</a>
</span>
<span slot="serialtitle" slot-scope="text, record">
<a class="table-del" @click="onDetail(record)">{{record.title}}</a>
</span>
<span slot="action" slot-scope="text, record">
<a class="table-del" @click="onCancel(record)">{{$t('CancelCollection')}}</a>
</span>
</a-table>
<div class="page" v-if="tableData.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper
show-size-changer
:current="queryParams.pageNo"
:page-size.sync="queryParams.pageSize"
:total="total"
@change="onChangePage"
@showSizeChange="SizeChange"
/>
</div>
</div>
</a-card>
</div>
@@ -81,12 +84,12 @@
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
import eventBUs from '../../../common/event'
import search from '@/components/search/index'
import tableData from '@/components/coTable/index'
// import tableData from '@/components/coTable/index'
export default {
name:'collection',
components:{
search,
tableData
// tableData
},
data(){
return{
@@ -99,33 +102,31 @@
//列表表头
columns: [
{
title: '编号',
title: this.$t('standard'),
dataIndex: 'serialNumber',
key: 'serialNumber',
scopedSlots: {customRender: 'serialNumber'},
align: "center",
width: 100,
ellipsis: true,
},
{
title: '标题',
title: this.$t('title'),
align: "center",
scopedSlots: {customRender: 'serialtitle'},
width: 100,
dataIndex: 'title',
ellipsis: true,
},
{
title: '状态',
title: this.$t('status'),
align: "center",
width: 100,
dataIndex: 'state',
ellipsis: true,
},
{
title: '收藏时间',
title: this.$t('collectionTime'),
align: "center",
width: 100,
dataIndex: 'createTime',
ellipsis: true,
},
{
title: this.$t('operation'),
@@ -136,7 +137,7 @@
}
],
tableData:[], //列表数据
selecIds:'',
selecIds:[],
loading:false,
url:{
tableHeader: 'collection/onlCgformCollection/getHeader', //表格头部字段
@@ -152,7 +153,7 @@
}
},
mounted() {
// this.loadData()
this.loadData()
},
methods:{
//获取列表数据
@@ -161,7 +162,7 @@
...this.queryParams
}
this.loading=true
getAction(`collection/onlCgformCollection/page`,params).then(res=>{
postAction(`collection/onlCgformCollection/page`,params).then(res=>{
if(res.success){
this.tableData= [ ...res.result.records ]
this.loading=false
@@ -174,20 +175,21 @@
//批量取消收藏
handleBatCancel(){
let params={
ids:this.selecIds
ids:this.selecIds.join(',')
}
if(this.selecIds){
if(this.selecIds&&this.selecIds.length>0){
this.$confirm({
title: '确认批量取消收藏?',
title: this.$t('BatchCancelCollection'),
content: '',
onOk:
async () => {
deleteAction(`collection/onlCgformCollection/deleteBatch`,params).then(res=> {
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
// this.selectedRowKeys = []
// this.loadData()
if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!==1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -196,7 +198,7 @@
onCancel() {},
});
}else{
this.$message.warning('请选择至少一条数据')
this.$message.warning(this.$t('selectLeastOne'))
}
},
//取消收藏
@@ -205,15 +207,17 @@
id:record.id
}
this.$confirm({
title: '确认取消收藏?',
title: this.$t('confirmCancelCollection'),
content: '',
onOk:
async () => {
deleteAction(`collection/onlCgformCollection/delete`,params).then(res=> {
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
// this.loadData()
if(this.tableData.length==1&&this.queryParams.pageNo!==1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -242,7 +246,7 @@
},
//选择框
onSelectChange(rows) {
console.log('rows',rows)
// console.log('rows',rows)
// this.selectedRowKeys = selectedRowKeys
// let ids=[]
// if(rows && rows.length>0){
@@ -250,7 +254,7 @@
// ids.push(item.id)
// })
// }
this.selecIds=rows.join(',')
this.selecIds=rows
// console.log('selectedRowKeys changed: ', ids);
},
//点击编号
@@ -261,7 +265,7 @@
titleClick(records){
},
detailClick(item) {
onDetail(item) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: item
@@ -280,6 +284,7 @@
.colloction-table{
.page{
margin-top: 20px;
text-align: right;
}
}
}
@@ -297,4 +302,5 @@
float: none!important;
}
}
</style>
@@ -2,7 +2,26 @@
<div class="splitting">
<a-card :bordered="false">
<div class="splitting-search-wrapper">
<search :flag="'1'" :url="url"/>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item :label="$t('standard')">
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.attId"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item :label="$t('title')">
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.title"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<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 class="table-operator">
<div class="operator-text" @click="handleModule">
@@ -19,15 +38,34 @@
</div>
</div>
<div class="splitting-table">
<tableData
:flag="'1'"
:OperationList="OperationList"
@editTable="seeTable"
@deleteTable="deleteTable"
:url="url"
showAction
@returnBack="returnBack"
/>
<a-table
ref="table"
size="middle"
rowKey="id"
:columns="columns"
:dataSource="tableData"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a class="action-margin" @click="backDocument(record)">{{$t('backDocument')}}</a>
<a class="action-margin" @click="detail(record)">{{$t('See')}}</a>
<a class="table-del" @click="deleteDetail(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="tableData.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper
show-size-changer
:current="queryParams.pageNo"
:page-size.sync="queryParams.pageSize"
:total="total"
@change="onChangePage"
@showSizeChange="SizeChange"
/>
</div>
</div>
<split v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split>
<imports v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></imports>
@@ -57,29 +95,62 @@
return{
splitVisible:false,
importsVisible:false,
OperationList: [
selectedRowKeys:[],
loading:false,
total:0,
ids:[],
tableData:[
{
text: '回传至文档库',
ClickEvent: 'returnBack'
},
{
text: '查看',
ClickEvent: 'seeTable'
},
{
text: '删除',
ClickEvent: 'deleteTable'
dbFieldTxt_dictText:'11111',
dbFieldEnName_dictText:'aaaaa',
fieldShowType_dictText:'345435435',
dbLength_dictText:'et435344354',
orderNum_dictText:'dfgdrgd',
showAreaName:'sdfsdfsd',
}
],
url: {
// tableHeader: 'document/bussDocumentLibraryEO/getHeader', //表格头部字段
// seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段
// tableList: 'document/bussDocumentLibraryEO/queryPageInfo', //表格数据
// getAddForm: 'document/bussDocumentLibraryEO/getAddForm', // 表单的字段
// addInfo: 'document/bussDocumentLibraryEO/addInfo', //新增
// updateInfo: 'document/bussDocumentLibraryEO/updateInfo', //编辑
// getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', //查看
// deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch' //删除
columns:[
{
title: this.$t('standard'),
align: "center",
dataIndex: 'dbFieldTxt_dictText',
},
{
title: this.$t('title'),
align: "center",
dataIndex: 'dbFieldEnName_dictText',
},
{
title: this.$t('TextStatus'),
align: "center",
dataIndex: 'fieldShowType_dictText',
},
{
title: this.$t('fileName'),
align: "center",
dataIndex: 'dbLength_dictText'
},
{
title: this.$t('splitTime'),
align: "center",
dataIndex: 'orderNum_dictText'
},
{
title: this.$t('splitResult'),
align: "center",
dataIndex: 'showAreaName'
},
{
title: this.$t('operation'),
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
width: 170
}
],
queryParams:{
pageNo:1,
pageSize:10
}
}
},
@@ -90,9 +161,26 @@
},
mounted() {
this.loadData()
},
methods:{
//获取列表数据
loadData(){
this.loading=true
let params={
...this.queryParams
}
getAction(``,params).then(res=>{
if(res.success){
this.tableData=[...res.result.records]
this.loading=false
this.total=res.result.total
}else{
this.loading=false
}
})
},
//拆分已入库文本
handleModule(){
this.splitVisible=true
@@ -103,28 +191,46 @@
},
//批量删除
handleDel(){
let params={
ids:this.selectedRowKeys.join(',')
}
if(this.selectedRowKeys&&this.selectedRowKeys.length>0){
this.$confirm({
title: this.$t('ConfirmDelete'),
content: '',
onOk:
async () => {
deleteAction(``, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}
},
//回传至文档库
returnBack(val){
console.log('val',val)
},
//查看
seeTable(){
this.$router.push({
path:'/docManage/splitting/splitDetail'
})
})
}
else{
this.$message.warning(this.$t('selectLeastOne'))
}
},
//删除
deleteTable(val){
let _this = this
deleteDetail(val){
this.$confirm({
content: '确认删除?',
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
deleteAction(``, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(res.message)
eventBUs.$emit('searchReset')
this.$message.success(res.message)
if(this.tableData&&this.tableData.length==1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
} else {
this.$message.warning(res.message)
}
@@ -137,7 +243,43 @@
},
iVisible(val){
this.importsVisible=val
}
},
//查询
searchQuery(){
},
//清空
searchReset(){
},
onSelectChange(selKeys){
this.selectedRowKeys=selKeys
},
handleTableChange(){
},
//点击页数
onChangePage(page,pageSize){
this.queryParams.pageNo = page
this.$emit('queryParams',this.queryParams)
},
//一页显示条数
SizeChange(page,pageSize){
this.queryParams.pageSize = pageSize
this.$emit('queryParams',this.queryParams)
},
//回传至文档库
backDocument(val){
},
//查看
detail(val){
this.$router.push({
path:'/docManage/splitting/splitDetail',
query:val
})
},
}
}
</script>
@@ -146,12 +288,26 @@
@import '~@assets/less/common.less';
</style>
<style lang="less">
<style lang="less" scoped>
.splitting{
.splitting-search-wrapper{
margin-bottom: 20px;
.table-page-search-submitButtons{
float: none!important;
}
}
.splitting-table{
.action-margin{
margin-right: 10px;
}
}
}
.splitting-table{
.page{
margin-top: 20px;
text-align: right;
}
}
</style>
@@ -2,7 +2,7 @@
<div class="imports">
<a-drawer
class="imports-table-drawer"
title="拆分已入库文本"
:title="$t('ImportResults')"
placement="right"
:visible="visible"
:after-visible-change="afterVisibleChange"
@@ -14,19 +14,19 @@
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item :label="'编号'">
<j-input :placeholder="'请输入编号'" v-model="queryParams.standNumber"></j-input>
<a-form-item :label="$t('standard')">
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :label="'标题'">
<j-input :placeholder="'请输入标题'" v-model="queryParams.standName"></j-input>
<a-form-item :label="$t('title')">
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<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 @click="searchReset" icon="reload" style="margin-left: 8px">清空</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
</span>
</a-col>
</a-row>
@@ -38,7 +38,7 @@
</a-table>
<div class="page" v-if="tableSource.length > 0">
<a-pagination
:show-total="total => ` ${total} `"
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="queryParams.pageSize"
@@ -57,21 +57,21 @@
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<a-form-model-item ref="file" label="拆分文件" prop="file">
<a-form-model-item ref="file" :label="$t('splitFile')" prop="file">
<a-button type="primary" class="button-text"
@click="fileUpload()">
{{ (form.file === 'null' || form.file === '' ||
form.file == null) ? '上传' : '查看已上传文件'
form.file == null) ? $t('upload1') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</a-form-model>
<a-button class="file-down" type="primary">模板下载</a-button>
<a-button class="file-down" type="primary" @click="downLoad">{{$t('templateDownload')}}</a-button>
</div>
<div class="imports-footer">
<div class="imports-footer-wrap">
<a-button class="imports-btn imports-chai" type="primary">保存</a-button>
<a-button class="imports-btn" type="primary" @click="cancleImports">取消</a-button>
<a-button class="imports-btn imports-chai" type="primary">{{$t('preservation')}}</a-button>
<a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
</div>
</div>
<ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload>
@@ -80,7 +80,7 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction, downFile } from '@/api/manage'
import ocrUpload from '@/components/ocrUpload/index'
export default {
name: 'import',
@@ -103,28 +103,28 @@
total:0,
columns: [
{
title:'编号',
title:this.$t('standard'),
key: 'standNumber',
align:"center",
dataIndex: 'standNumber',
ellipsis: true,
},
{
title:'标题',
title:this.$t('title'),
key: 'standName',
align:"center",
dataIndex: 'standName',
ellipsis: true,
},
{
title:'文件名称',
title:this.$t('fileName'),
key: 'fileName',
align:"center",
dataIndex: 'fileName',
ellipsis: true,
},
{
title:'文本状态',
title:this.$t('TextStatus'),
key: 'fileType_dictText',
align:"center",
dataIndex: 'fileType_dictText',
@@ -136,7 +136,7 @@
form:{},
rules:{
file:[
{ required: true, message: '请选择文件', trigger: 'change' },
{ required: true, message: this.$t('noFile'), trigger: 'change' },
],
},
}
@@ -198,6 +198,10 @@
// /** 赋值给当前对应的表单文件 */
this.form.file = attIdList.join(',')
},
//模板下载
downLoad(){
}
}
}
</script>
@@ -2,7 +2,7 @@
<div class="split">
<a-drawer
class="split-table-drawer"
title="拆分已入库文本"
:title="$t('SplitText')"
placement="right"
:visible="visible"
:after-visible-change="afterVisibleChange"
@@ -13,20 +13,20 @@
<div class="split-header">
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item :label="'编号'">
<j-input :placeholder="'请输入编号'" v-model="queryParams.standNumber"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :label="'标题'">
<j-input :placeholder="'请输入标题'" v-model="queryParams.standName"></j-input>
<a-col :md="6" :sm="8">
<a-form-item :label="$t('standard')" class="split-item">
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item :label="$t('title')" class="split-item">
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<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 @click="searchReset" icon="reload" style="margin-left: 8px">清空</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
</span>
</a-col>
</a-row>
@@ -34,11 +34,11 @@
</div>
</div>
<div class="split-table-detail">
<a-table bordered :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
<a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
</a-table>
<div class="page" v-if="tableSource.length > 0">
<a-pagination
:show-total="total => ` ${total} `"
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="queryParams.pageSize"
@@ -50,8 +50,8 @@
</div>
<div class="split-footer">
<div class="split-footer-wrap">
<a-button class="split-btn split-chai" type="primary">拆分</a-button>
<a-button class="split-btn" type="primary" @click="cancelSplit">取消</a-button>
<a-button class="split-btn split-chai" type="primary">{{$t('split')}}</a-button>
<a-button class="split-btn" type="primary" @click="cancelSplit">{{$t('cancel')}}</a-button>
</div>
</div>
</a-drawer>
@@ -64,7 +64,14 @@
data(){
return{
visible:false,
tableSource:[], //列表数据
tableSource:[
{
standNumber:'aaaa',
standName:'11111',
fileName:'234323',
fileType_dictText:'ewre',
}
], //列表数据
selectedRowKeys:[],
queryParams:{
pageNo:1,
@@ -73,35 +80,33 @@
total:0,
columns: [
{
title:'编号',
title:this.$t('standard'),
key: 'standNumber',
align:"center",
dataIndex: 'standNumber',
ellipsis: true,
},
{
title:'标题',
title:this.$t('title'),
key: 'standName',
align:"center",
dataIndex: 'standName',
ellipsis: true,
},
{
title:'文件名称',
title:this.$t('fileName'),
key: 'fileName',
align:"center",
dataIndex: 'fileName',
ellipsis: true,
},
{
title:'文本状态',
title:this.$t('TextStatus'),
key: 'fileType_dictText',
align:"center",
dataIndex: 'fileType_dictText',
ellipsis: true,
},
]
}
},
@@ -158,6 +163,9 @@
.split-table-content{
.split-header{
margin-bottom: 20px;
.split-item{
display: flex;
}
}
}
@@ -3,7 +3,7 @@
<div class="split-add-form-wrapper">
<a-drawer
class="split-table-drawer"
title="新增条款"
:title="title"
placement="right"
:visible="visible"
:after-visible-change="afterVisibleChange"
@@ -19,55 +19,61 @@
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<!-- 条款号-->
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="条款号" prop="number">
<a-input v-model="form.number" placeholder="请输入条款号" />
<a-form-model-item :label="$t('clauseNo')" prop="number">
<a-input v-model="form.number" :placeholder="$t('pleaseEnter')+$t('clauseNo')" />
</a-form-model-item>
</a-col>
<!-- 条款名称-->
<a-col :span="12">
<a-form-model-item label="条款名称" prop="name">
<a-input v-model="form.name" placeholder="请输入条款名称" />
<a-form-model-item :label="$t('clauseName')" prop="name">
<a-input v-model="form.name" :placeholder="$t('pleaseEnter')+$t('clauseName')" />
</a-form-model-item>
</a-col>
</a-row>
<!-- 功能领域-->
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="功能领域" prop="funArea">
<j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" placeholder="请选择功能领域" />
<a-form-model-item :label="$t('functionalAreas')" prop="funArea">
<j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" :placeholder="$t('pleaseSelect')+$t('functionalAreas')" />
</a-form-model-item>
</a-col>
<!-- 技术领域-->
<a-col :span="12">
<a-form-model-item label="技术领域" prop="tecArea">
<j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" placeholder="请选择技术领域" />
<a-form-model-item :label="$t('technicalField')" prop="tecArea">
<j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" :placeholder="$t('pleaseSelect')+$t('technicalField')" />
</a-form-model-item>
</a-col>
</a-row>
<!-- 信息类别-->
<a-row :gutter="24">
<a-col :span="12">
<a-form-model-item label="信息类别" prop="infoType">
<j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" placeholder="请选择信息类别" />
<a-form-model-item :label="$t('informationCategory')" prop="infoType">
<j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" :placeholder="$t('pleaseSelect')+$t('informationCategory')" />
</a-form-model-item>
</a-col>
</a-row>
<span class="con-divider">内容简介</span>
<!-- 内容简介-->
<span class="con-divider">{{$t('contentValidity')}}</span>
<a-divider dashed />
<a-row :gutter="24" class="split-content" id="split-content" v-for="(item, index) in contentList" :key="item.id">
<div class="split-row">
<div class="row-left">
<a-textarea v-if="item.type=='TEXT'" v-model="item.textContent" placeholder="请输入内容" auto-size />
<a-textarea v-if="item.type=='TEXT'" v-model="item.textContent" placeholder="$t('pleaseEnter')+$t('content')" auto-size />
</div>
<div class="row-right">
<a-button class="row-btn-add" @click="splitAdd">增加</a-button>
<a-button @click="splitDelete">删除</a-button>
<a-button class="row-btn-add" @click="splitAdd">{{$t('Add')}}</a-button>
<a-button @click="splitDelete">{{$t('delete')}}</a-button>
</div>
</div>
</a-row>
</a-form-model>
</a-form>
<div class="split-form-footer">
<a-button type="primary" class="footer-btn-save" @click="splitSave">保存</a-button>
<a-button type="primary" @click="splitCancel">取消</a-button>
<a-button type="primary" class="footer-btn-save" @click="splitSave">{{$t('preservation')}}</a-button>
<a-button type="primary" @click="splitCancel">{{$t('cancel')}}</a-button>
</div>
<!-- 类型选择弹框-->
<a-modal
@@ -101,6 +107,7 @@
name: 'splitAddForm',
data(){
return{
title:this.$t('newClause'),
contentList:[
{
id:'001',
@@ -117,7 +124,7 @@
selected:1,
selectedNum:true,
textNumber:1,
Title:'新增',
Title:this.$t('add'),
confirmLoading: false,
labelCol: {
xs: { span: 24 },
@@ -33,18 +33,18 @@
:model="queryParams"
ref="queryForm"
>
<a-row :gutter="44">
<a-col :md="6" :sm="12">
<a-form-model-item :label="'条款名称'">
<j-input :placeholder="'请输入条款名称'" v-model="queryParams.serialNumber"></j-input>
</a-form-model-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-model-item :label="'条款内容'">
<j-input :placeholder="'请输入条款内容'" v-model="queryParams.title"></j-input>
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-model-item :label="$t('clauseName')" class="split-item">
<j-input :placeholder="$t('pleaseEnter') + $t('clauseName')" v-model="queryParams.serialNumber"></j-input>
</a-form-model-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-model-item :label="$t('clauseContent')" class="split-item">
<j-input :placeholder="$t('pleaseEnter')+$t('clauseContent')" v-model="queryParams.title"></j-input>
</a-form-model-item>
</a-col>
<a-col :md="6" :sm="6">
<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 @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
@@ -91,8 +91,8 @@
<div class="split-detail-table">
<a-table bordered :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">
<template slot="action" slot-scope="text, record">
<a class="action-edit" href="javascript:;" @click="onEdit(record)">编辑</a>
<a class="action-delete" href="javascript:;" @click="onCancel(record)">删除</a>
<a class="action-edit" href="javascript:;" @click="onEdit(record)">{{$t('edit')}}</a>
<a class="action-delete" href="javascript:;" @click="onCancel(record)">{{$t('delete')}}</a>
</template>
</a-table>
<div class="page" v-if="tableData.length > 0">
@@ -174,23 +174,19 @@
loading:false,
columns: [
{
title: '条款号',
title: this.$t('clauseNo'),
dataIndex: 'serialNumber',
key: 'serialNumber',
align: "center",
width: 80,
ellipsis: true,
},
{
title: '条款名称',
title: this.$t('clauseName'),
dataIndex: 'serialName',
key: 'serialName',
align: "center",
width: 80,
ellipsis: true,
},
{
title: '条款内容',
title: this.$t('clauseContent'),
dataIndex: 'serialContent',
key: 'serialContent',
align: "center",
@@ -198,27 +194,23 @@
ellipsis: true,
},
{
title: '功能领域',
title: this.$t('functionalAreas'),
dataIndex: 'functionArea',
key: 'functionArea',
align: "center",
width: 80,
ellipsis: true,
},
{
title: '技术领域',
title: this.$t('technicalField'),
dataIndex: 'tecArea',
key: 'tecArea',
align: "center",
width: 80,
ellipsis: true,
},
{
title: this.$t('operation'),
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
width: 80
width: 120
}
],
addVisible:false
@@ -403,11 +395,20 @@
flex: 1;
.split-detail-search-header{
margin-bottom: 20px;
.table-page-search-submitButtons{
display: flex;
}
}
.split-detail-table{
.action-edit{
margin-right: 20px;
}
.page{
text-align: right;
}
}
.split-item{
display: flex;
}
}
.page{
@@ -415,4 +416,12 @@
}
}
}
</style>
<style lang="less">
.split-item{
.ant-form-item-label{
min-width: 100px;
}
}
</style>
@@ -17,16 +17,38 @@
</div>
</div>
<div class="colloction-table">
<tableData
:url="url"
:flag="'1'"
:OperationList="OperationList"
showAction
@titleClick="titleClick"
@onCancel="onCancel"
@onSelectChange="onSelectChange"
@detailClick="detailClick"
></tableData>
<a-table
ref="table"
size="middle"
rowKey="id"
:columns="columns"
:dataSource="tableData"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
>
<span slot="serialNumber" slot-scope="text, record">
<a class="table-del" @click="onDetail(record)">{{record.serialNumber}}</a>
</span>
<span slot="serialtitle" slot-scope="text, record">
<a class="table-del" @click="onDetail(record)">{{record.title}}</a>
</span>
<span slot="action" slot-scope="text, record">
<a class="table-del" @click="onCancel(record)">{{$t('CancelCollection')}}</a>
</span>
</a-table>
<div class="page" v-if="tableData.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper
show-size-changer
:current="queryParams.pageNo"
:page-size.sync="queryParams.pageSize"
:total="total"
@change="onChangePage"
@showSizeChange="SizeChange"
/>
</div>
</div>
<sub-area v-if="visible" :subVisible="visible" @visible="areaVisible"></sub-area>
</a-card>
@@ -56,29 +78,31 @@
//列表表头
columns: [
{
title: '编号',
title: this.$t('standard'),
dataIndex: 'serialNumber',
key: 'serialNumber',
align: "center",
width: 100,
scopedSlots: {customRender: 'serialNumber'},
ellipsis: true,
},
{
title: '标题',
title: this.$t('title'),
align: "center",
width: 100,
dataIndex: 'title',
scopedSlots: {customRender: 'serialtitle'},
ellipsis: true,
},
{
title: '状态',
title: this.$t('status'),
align: "center",
width: 100,
dataIndex: 'state',
ellipsis: true,
},
{
title: '订阅时间',
title: this.$t('subscriptionTime'),
align: "center",
width: 100,
dataIndex: 'createTime',
@@ -94,7 +118,7 @@
],
tableData:[], //列表数据
visible:false,
selecIds:'',
selecIds:[],
loading:false,
url:{
tableHeader: 'subscribe/onlCgformSubscribe/getHeader', //表格头部字段
@@ -136,20 +160,21 @@
//批量取消收藏
handleBatCancel(){
let params={
ids:this.selecIds
ids:this.selecIds.join(',')
}
if(this.selecIds){
if(this.selecIds&&this.selecIds.length>0){
this.$confirm({
title: '确认批量取消订阅?',
title: this.$t('confirmBulkUnsubscribe'),
content: '',
onOk:
async () => {
deleteAction(`subscribe/onlCgformSubscribe/deleteBatch`,params).then(res=> {
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
// this.selectedRowKeys = []
// this.loadData()
if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!==1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -158,24 +183,26 @@
onCancel() {},
});
}else{
this.$message.warning('请选择至少一条数据')
this.$message.warning(this.$t('selectLeastOne'))
}
},
//取消收藏
//取消订阅
onCancel(record){
let params={
id:record.id
}
this.$confirm({
title: '确认取消订阅?',
title: this.$t('unsubscribeConfirm'),
content: '',
onOk:
async () => {
deleteAction(`subscribe/onlCgformSubscribe/delete`,params).then(res=> {
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
// this.loadData()
if(this.tableData.length==1&&this.queryParams.pageNo!==1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -211,7 +238,7 @@
// ids.push(item.id)
// })
// }
this.selecIds=rows.join(',')
this.selecIds=rows
},
//点击编号
numberClick(records){
@@ -224,7 +251,8 @@
areaVisible(val){
this.visible=val
},
detailClick(item) {
//跳转详情
onDetail(item) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: item
@@ -242,6 +270,7 @@
}
.page{
margin-top: 20px;
text-align: right;
}
}
@@ -76,13 +76,14 @@
getAction(`sys/category/getSysCategoryTree`,params).then(res=> {
if(res.success){
this.data=[...res.result]
this.treeData=this.addAttr(this.data)
this.treeData=[...this.addAttr(this.data)]
// console.log('treeData',this.treeData)
}
})
},
onSearch(){
this.loadData()
// this.treeData=[]
// this.treeData=this.getSearch(this.data)
},
//获取用户的订阅
getSubscribtion(){
@@ -95,7 +96,7 @@
})
this.checkedKeys=[...ids]
// this.selectedKeys=this.checkedKeys
console.log('checkKeys',this.checkedKeys)
// console.log('checkKeys',this.checkedKeys)
}
})
},
@@ -103,9 +104,6 @@
if((Array.isArray(dataI)) && dataI.length>0){
dataI.forEach((item,index)=>{
this.$set(item,'key',item.id)
// if(item.title.indexOf(this.searchValue)!==-1){
// console.log('item.title',item.title)
// }
let arr = [];
this.addAttr(item.children,arr);
});
@@ -113,8 +111,24 @@
// console.log('dataI',dataI)
return dataI
},
getSearch(dataI){
let dataSearch=[]
console.log('tree',this.treeData,this.data)
if((Array.isArray(dataI)) && dataI.length>0){
dataI.forEach((item,index)=>{
this.$set(item,'key',item.id)
if(item.title.indexOf(this.searchValue)>-1){
dataSearch.push(item)
}
let arr = [];
this.addAttr(item.children,arr);
});
}
console.log('dataSearch',dataSearch)
return dataSearch
},
afterVisibleChange(val) {
console.log('visible', val);
// console.log('visible', val);
},
handleOk(e) {
this.confirmLoading = true;
@@ -175,7 +189,7 @@
return null;
})
.filter((item, i, self) => item && self.indexOf(item) === i);
console.log('item',item)
Object.assign(this, {
expandedKeys,
searchValue: value,
@@ -17,13 +17,13 @@
<a-icon type="plus" />
{{$t('add')}}
</div>
<div class="operator-text" v-if="dictVal=='tree'" @click="batDelete">
<div class="operator-text" @click="batDelete">
<a-icon type="delete" />
{{$t('BatchDelete')}}
</div>
</div>
<div class="dic-list-table">
<list-table v-if="dictVal=='list'&&dataFlag" :tableData="tableData" @editDict="editDict" @deleteDict="deleteDict" :total="total" @ok="ok"></list-table>
<list-table v-if="dictVal=='list'&&dataFlag" :tableData="tableData" @editDict="editDict" @deleteDict="deleteDict" :total="total" @selected="selectedKeys" @ok="ok"></list-table>
<tree-table v-if="dictVal=='tree'&&dataFlag" :tabletreeData="tabletreeData" :record="record" @editDict="editTreeDict" @selectedKeys="selectedKeys" @ok="ok" :total="total"></tree-table>
</div>
<a-modal class="dict-module" v-model="newVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
@@ -94,6 +94,7 @@
},
data(){
return{
selected:[],
title:this.$t('add'),
labelCol: { span: 6 },
wrapperCol: { span: 16 },
@@ -345,6 +346,7 @@
let params={
id:val
}
this.$confirm({
title: this.$t('ConfirmDelete'),
content: '',
@@ -353,7 +355,9 @@
deleteAction(`sys/dictItem/delete`, params).then(res => {
if(res.success) {
this.$message.success(this.$t('OperationSuccessful'));
this.queryParams.pageNo=1
if(this.tableData&&this.tableData.length==1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'));
@@ -380,15 +384,27 @@
content: '',
onOk:
async () => {
deleteAction(`sys/category/deleteBatch`, params).then(res => {
if(res.success){
this.queryParams.pageNo=1
this.loadData()
this.$message.success(this.$t('OperationSuccessful'))
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
if(this.dictVal=='list'){
deleteAction(`sys/dictItem/logicdeleteBatch`, params).then(res => {
if(res.success){
this.queryParams.pageNo=1
this.loadData()
this.$message.success(this.$t('OperationSuccessful'))
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}else if(this.dictVal=='tree'){
deleteAction(`sys/category/deleteBatch`, params).then(res => {
if(res.success){
this.queryParams.pageNo=1
this.loadData()
this.$message.success(this.$t('OperationSuccessful'))
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}
}
})
}else{
@@ -1,6 +1,6 @@
<template>
<div class="list-table">
<a-table :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
<a-table :data-source="tableData" :columns="columns" rowKey="id" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
<template slot="action" slot-scope="text, record">
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">{{$t('edit')}}</a>
@@ -98,7 +98,9 @@
onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
this.$emit('selected',this.selectedRowKeys)
},
//点击页数
onChangePage(page,pageSize){
this.queryParams.pageNo = page
@@ -63,6 +63,7 @@
onSelectChange(selectedRowKeys) {
// console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
this.$emit('selecteds',selectedRowKeys)
},
handleTableChange(){
@@ -22,6 +22,10 @@
<a-icon type="plus" />
{{$t('add')}}
</div>
<div class="operator-text" @click="batDelete">
<a-icon type="delete" />
{{$t('BatchDelete')}}
</div>
</div>
<a-modal class="show-content" v-model="contentVisible" :visible="contentVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="contentVisible">
<a-form-model
@@ -51,7 +55,7 @@
</a-form-model>
</a-modal>
<a-table :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
<a-table :data-source="tableData" rowKey="id" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
<template slot="action" slot-scope="text, record">
<a class="action-dict" @click="handleDicPop(record)">{{$t('DictionaryConfiguration')}}</a>
@@ -259,6 +263,9 @@
deleteAction(`sys/dict/logicDelete`, param).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.tableData&&this.tableData.length==1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'));
@@ -268,8 +275,40 @@
})
},
onSelectChange(selectedRowKeys) {
// console.log('selectedRowKeys changed: ', selectedRowKeys);
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
},
//批量删除
batDelete(){
let params={
ids:this.selectedRowKeys.join(',')
}
if(this.selectedRowKeys){
this.$confirm({
title: this.$t('ConfirmDelete'),
content: '',
onOk:
async () => {
deleteAction(`sys/dict/logicdeleteBatch`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loadData()
postAction(`online/cgform/api/doDbSynch/48308196e7b04761b533dc31bc899707/normal
`,{}).then(res=>{
})
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
}
else{
this.$message.warning(this.$t('selectLeastOne'))
}
},
//编辑
actionEdit(val){
@@ -33,6 +33,10 @@
<a-icon type="rocket" :rotate="45" />
{{$t('ExhibitionAreaManagement')}}
</div>
<div class="operator-text" @click="batDelete">
<a-icon type="delete" />
{{$t('BatchDelete')}}
</div>
</div>
<a-drawer class="show-drawer" :title="titleTag" placement="right" width="1000px" @close="close" :visible="drawerVisible" :after-visible-change="afterVisibleChange" >
<new-drawer v-if="drawerVisible&&editFlag" :drawerVisible="drawerVisible" :isTagContent="isTagContent" :editData="editData" :editId="editId" :submitEdit="submitEdit" @closeTag="closeTag" ></new-drawer>
@@ -44,7 +48,7 @@
<a-spin :spinning="spinning" tip="Loading...">
<a-tabs default-active-key="1" @change="callbackTab">
<a-tab-pane key="1" :tab="$t('DocumentLibrary')">
<tabTable v-if="spinning==false" :tableData="tableData" :columns="taglabColumns" :parm="queryParam" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>
<tabTable v-if="spinning==false" :tableData="tableData" :columns="taglabColumns" :parm="queryParam" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" @selecteds="selecteds" :total="total"></tabTable>
</a-tab-pane>
<!-- <a-tab-pane key="2" :tab="$t('DocumentSplitting')" force-render>-->
<!-- <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>-->
@@ -138,7 +142,8 @@
submitEdit:'add',
key:1,
total:0,
type:'input'
type:'input',
ids:[]
}
},
mounted() {
@@ -282,10 +287,15 @@
if (res.success) {
if (this.key == 1) {
this.$message.success(this.$t('OperationSuccessful'))
this.queryParam.pageNo=1
if(this.tableData&&this.tableData.length==1){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(1)
} else if (this.key == 2) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.tableData&&this.tableData.length==1){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(0)
}
postAction(`online/cgform/api/doDbSynch/48308196e7b04761b533dc31bc899707/normal
@@ -298,6 +308,50 @@
}
})
},
selecteds(val){
this.ids=val
},
//批量删除
batDelete(val){
let params={
ids:this.ids.join(',')
}
if(this.ids){
this.$confirm({
title: this.$t('ConfirmDelete'),
content: '',
onOk:
async () => {
deleteAction(`tag/onlCgformTag/deleteBatch`, params).then(res => {
if (res.success) {
if (this.key == 1) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.ids&&this.ids.length==this.tableData.length){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(1)
} else if (this.key == 2) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.ids&&this.ids.length==this.tableData.length){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(0)
}
postAction(`online/cgform/api/doDbSynch/48308196e7b04761b533dc31bc899707/normal
`,{}).then(res=>{
})
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
}
else{
this.$message.warning(this.$t('selectLeastOne'))
}
},
//新增关闭
closeTag(val){
this.drawerVisible=val