Merge remote-tracking branch 'origin/master'

This commit is contained in:
liyawei
2022-03-10 15:44:32 +08:00
24 changed files with 758 additions and 318 deletions
@@ -8,8 +8,6 @@ package com.jero.common.constant.enums;
public enum ModuleEnum { public enum ModuleEnum {
DOCUMENT_LIBRARY("文档管理","1"), DOCUMENT_LIBRARY("文档管理","1"),
OCR_RECORD("OCR识别转换记录表","2"), OCR_RECORD("OCR识别转换记录表","2"),
ONL_CGFORM_TAG("标签项管理","3"),
ONL_CGFORM_AREA("展示区域管理","4"),
ONL_CGFORM_COLLECTION("我的收藏","5"), ONL_CGFORM_COLLECTION("我的收藏","5"),
ONL_CGFORM_SUBSCRIBE("我的订阅","6"); ONL_CGFORM_SUBSCRIBE("我的订阅","6");
@@ -119,12 +119,13 @@
</otherwise> </otherwise>
</choose> </choose>
</select> </select>
<!-- 查询新增表单数据,并且按照展示区域的"排序号"和字段的"展示顺序"排序 -->
<select id="getFieldList" resultType="com.jero.generater.modules.online.cgform.entity.OnlCgformField"> <select id="getFieldList" resultType="com.jero.generater.modules.online.cgform.entity.OnlCgformField">
select * from onl_cgform_field ocf select * from onl_cgform_field ocf
left join onl_cgform_head och on ocf.cgform_head_id = och.id left join onl_cgform_head och on ocf.cgform_head_id = och.id
left join onl_cgform_area oca on ocf.show_area=oca.id
where table_name =#{tableName} and ocf.is_delete = 0 where table_name =#{tableName} and ocf.is_delete = 0
order by order_num asc order by oca.sort asc,order_num asc
</select> </select>
</mapper> </mapper>
@@ -818,10 +818,6 @@ public class OnlCgformFieldServiceImpl extends ServiceImpl<OnlCgformFieldMapper,
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.BUSS_DOCUMENT_LIBRARY.getTable()+" "); fieldList = onlCgformFieldMapper.getFieldList(TableEnum.BUSS_DOCUMENT_LIBRARY.getTable()+" ");
}else if(ModuleEnum.OCR_RECORD.getValue().equals(flag)){ }else if(ModuleEnum.OCR_RECORD.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.OCR_RECORD.getTable()); fieldList = onlCgformFieldMapper.getFieldList(TableEnum.OCR_RECORD.getTable());
}else if(ModuleEnum.ONL_CGFORM_TAG.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.TAG.getTable());
}else if(ModuleEnum.ONL_CGFORM_AREA.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.TAG_AREA.getTable());
}else if(ModuleEnum.ONL_CGFORM_COLLECTION.getValue().equals(flag)){ }else if(ModuleEnum.ONL_CGFORM_COLLECTION.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.ONL_CGFORM_COLLECTION.getTable()); fieldList = onlCgformFieldMapper.getFieldList(TableEnum.ONL_CGFORM_COLLECTION.getTable());
}else if(ModuleEnum.ONL_CGFORM_SUBSCRIBE.getValue().equals(flag)){ }else if(ModuleEnum.ONL_CGFORM_SUBSCRIBE.getValue().equals(flag)){
@@ -151,7 +151,7 @@ public class SysDictItemController {
* @return * @return
*/ */
//@RequiresRoles({"admin"}) //@RequiresRoles({"admin"})
@RequiresPermissions("sys:dict:list") //@RequiresPermissions("sys:dict:list")未改
@RequestMapping(value = "/logicDelete", method = RequestMethod.DELETE) @RequestMapping(value = "/logicDelete", method = RequestMethod.DELETE)
@CacheEvict(value=CacheConstant.SYS_DICT_CACHE, allEntries=true) @CacheEvict(value=CacheConstant.SYS_DICT_CACHE, allEntries=true)
public Result<SysDictItem> logicDelete(@RequestParam(name="id",required=true) String id) { public Result<SysDictItem> logicDelete(@RequestParam(name="id",required=true) String id) {
@@ -9,6 +9,7 @@ import com.jero.modules.enums.FixedFieldEnum;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.tag.entity.OnlCgformArea; import com.jero.modules.tag.entity.OnlCgformArea;
import com.jero.modules.tag.entity.OnlCgformTag; import com.jero.modules.tag.entity.OnlCgformTag;
import com.jero.modules.tag.enums.FileTableIdEnum;
import com.jero.modules.tag.service.IOnlCgformTagService; import com.jero.modules.tag.service.IOnlCgformTagService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -84,7 +85,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
//@RequiresPermissions("tag:add") //@RequiresPermissions("tag:add")
public Result<?> add(@Validated @RequestBody OnlCgformTag onlCgformTag) { public Result<?> add(@Validated @RequestBody OnlCgformTag onlCgformTag) {
onlCgformTagService.add(onlCgformTag); onlCgformTagService.add(onlCgformTag);
onlCgformApiController.h("48308196e7b04761b533dc31bc899707","normal"); onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
@@ -103,8 +104,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
return Result.error("固定字段,不可修改"); return Result.error("固定字段,不可修改");
}else { }else {
onlCgformTagService.editById(onlCgformTag); onlCgformTagService.editById(onlCgformTag);
//TODO 统一定义枚举或者统一常量形式并且加注释说明,不然ID写的太乱后期不好修改 onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");
onlCgformApiController.h("48308196e7b04761b533dc31bc899707","normal");
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
} }
@@ -127,8 +127,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
result.error500("固定字段,不可删除"); result.error500("固定字段,不可删除");
} else { } else {
onlCgformTagService.deleteById(id); onlCgformTagService.deleteById(id);
//TODO 统一定义枚举或者统一常量形式并且加注释说明,不然ID写的太乱后期不好修改 onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");
onlCgformApiController.h("48308196e7b04761b533dc31bc899707","normal");
result.OK("删除成功!"); result.OK("删除成功!");
} }
} }
@@ -148,11 +147,10 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
OnlCgformTag onlCgformTag = onlCgformTagService.queryById(ids); OnlCgformTag onlCgformTag = onlCgformTagService.queryById(ids);
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) { if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) {
return Result.error("固定字段,不可删除"); return Result.error("包含固定字段,不可删除");
}else { }else {
this.onlCgformTagService.deleteByIds(Arrays.asList(ids.split(","))); this.onlCgformTagService.deleteByIds(Arrays.asList(ids.split(",")));
//TODO 统一定义枚举或者统一常量形式并且加注释说明,不然ID写的太乱后期不好修改 onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");
onlCgformApiController.h("48308196e7b04761b533dc31bc899707","normal");
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
} }
@@ -0,0 +1,30 @@
package com.jero.modules.tag.enums;
public enum FileTableIdEnum {
FILE_TABLE_ID("文档库表id","48308196e7b04761b533dc31bc899707"),
;
String name;
String value;
FileTableIdEnum(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
@@ -119,7 +119,6 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, O
QueryWrapper<OnlCgformArea> queryWrapper = new QueryWrapper<>(); QueryWrapper<OnlCgformArea> queryWrapper = new QueryWrapper<>();
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
queryWrapper.select("id","show_area").orderByAsc("sort"); queryWrapper.select("id","show_area").orderByAsc("sort");
System.out.println("QueryWrapper数据:"+queryWrapper);
return list(queryWrapper); return list(queryWrapper);
}else{ }else{
queryWrapper.select("id","en_name").orderByAsc("sort"); queryWrapper.select("id","en_name").orderByAsc("sort");
@@ -8,13 +8,16 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.CommonConstant; import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.vo.LoginUser;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
import com.jero.modules.document.enums.FieldTypeEnum;
import com.jero.modules.tag.entity.OnlCgformArea; import com.jero.modules.tag.entity.OnlCgformArea;
import com.jero.modules.tag.entity.OnlCgformTag; import com.jero.modules.tag.entity.OnlCgformTag;
import com.jero.modules.tag.mapper.OnlCgformTagMapper; import com.jero.modules.tag.mapper.OnlCgformTagMapper;
import com.jero.modules.tag.service.IOnlCgformTagService; import com.jero.modules.tag.service.IOnlCgformTagService;
import com.jero.modules.utils.HanYuPinYinUtil; import com.jero.modules.utils.HanYuPinYinUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -55,21 +58,24 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
onlCgformTag.setDbIsNull(1); onlCgformTag.setDbIsNull(1);
onlCgformTag.setDbPointLength(0); onlCgformTag.setDbPointLength(0);
onlCgformTag.setIsReadOnly(0); onlCgformTag.setIsReadOnly(0);
Date now = new Date();
onlCgformTag.setCreateTime(now);
onlCgformTag.setUpdateTime(now);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
onlCgformTag.setCreateBy(sysUser.getRealname());
onlCgformTag.setUpdateBy(sysUser.getRealname());
String pinYin = HanYuPinYinUtil.changeToNumberPinYin(onlCgformTag.getDbFieldTxt()); String pinYin = HanYuPinYinUtil.changeToNumberPinYin(onlCgformTag.getDbFieldTxt());
onlCgformTag.setDbFieldName(pinYin.replace(" ","_")); onlCgformTag.setDbFieldName(pinYin.replace(" ","_"));
onlCgformTag.setDbFieldEnName(onlCgformTag.getDbFieldEnName().replace(" ","_")); onlCgformTag.setDbFieldEnName(onlCgformTag.getDbFieldEnName().replace(" ","_"));
//TODO 使用枚举形式,不能直接使用字符串定义,看不出代表什么含义 //设置标签存入数据库的字段类型
if(onlCgformTag.getFieldShowType()=="2"){ if(onlCgformTag.getFieldShowType().equals(FieldTypeEnum.TEXT_NUMBER)){
onlCgformTag.setDbType("int"); onlCgformTag.setDbType("int");
}else if(onlCgformTag.getFieldShowType()=="5" && onlCgformTag.getFieldShowType()=="6"){ }else if(onlCgformTag.getFieldShowType().equals(FieldTypeEnum.DATE_SINGLE) && onlCgformTag.equals(FieldTypeEnum.DATE_MORE)){
onlCgformTag.setDbType("Date"); onlCgformTag.setDbType("Date");
}else{ }else{
onlCgformTag.setDbType("String"); onlCgformTag.setDbType("String");
} }
} }
Date now = new Date();
onlCgformTag.setCreateTime(now);
onlCgformTag.setUpdateTime(now);
save(onlCgformTag); save(onlCgformTag);
} }
@@ -81,10 +87,13 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
*/ */
@Override @Override
public void editById(OnlCgformTag onlCgformTag) { public void editById(OnlCgformTag onlCgformTag) {
Date now = new Date();
String pinYin = HanYuPinYinUtil.changeToNumberPinYin(onlCgformTag.getDbFieldTxt()); String pinYin = HanYuPinYinUtil.changeToNumberPinYin(onlCgformTag.getDbFieldTxt());
onlCgformTag.setDbFieldName(pinYin.replace(" ","_")); onlCgformTag.setDbFieldName(pinYin.replace(" ","_"));
Date now = new Date();
onlCgformTag.setUpdateTime(now); onlCgformTag.setUpdateTime(now);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
onlCgformTag.setUpdateBy(sysUser.getRealname());
saveOrUpdate(onlCgformTag); saveOrUpdate(onlCgformTag);
} }
+5 -2
View File
@@ -30,8 +30,8 @@ See https://github.com/adobe-type-tools/cmap-resources
<link rel="stylesheet" href="viewer.css"> <link rel="stylesheet" href="viewer.css">
<!-- This snippet is used in production (included from viewer.html) --> <!-- This snippet is used in production (included from viewer.html) -->
<link rel="resource" type="application/l10n" href="locale/locale.properties"> <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/demo.css" type="text/css">-->
<link rel="stylesheet" href="../../zTree/css/zTreeStyle/zTreeStyle.css" type="text/css"> <!-- <link rel="stylesheet" href="../../zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">-->
<style> <style>
/*.pdfViewer .page{*/ /*.pdfViewer .page{*/
/* margin: 1px auto -8px 232px;*/ /* margin: 1px auto -8px 232px;*/
@@ -205,6 +205,9 @@ See https://github.com/adobe-type-tools/cmap-resources
<body tabindex="1" class="loadingInProgress"> <body tabindex="1" class="loadingInProgress">
<!--遮罩层--> <!--遮罩层-->
<div class="mask"></div> <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>--> <!-- <ul id="treeDemo" class="ztree"></ul>-->
<!-- <div id="rMenu">--> <!-- <div id="rMenu">-->
<!-- &lt;!&ndash; 不需要权限 &ndash;&gt;--> <!-- &lt;!&ndash; 不需要权限 &ndash;&gt;-->
+25
View File
@@ -508,5 +508,30 @@ module.exports = {
labelNameCannotDuplicate:'Label name cannot be duplicate', labelNameCannotDuplicate:'Label name cannot be duplicate',
list:'list', list:'list',
paragraph:'paragraph', 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' theRelease:'The release date should not exceed the standard implementation date'
} }
+24
View File
@@ -512,5 +512,29 @@ module.exports = {
labelNameCannotDuplicate:'标签名称不能重复', labelNameCannotDuplicate:'标签名称不能重复',
list:'列表', list:'列表',
paragraph:'段落', 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:'发布日期不能大于标准实施日期' theRelease:'发布日期不能大于标准实施日期'
} }
@@ -44,35 +44,38 @@
</div> </div>
</div> </div>
<div class="colloction-table"> <div class="colloction-table">
<tableData <a-table
:url="url" ref="table"
:flag="'1'" size="middle"
:OperationList="OperationList" rowKey="id"
showAction :columns="columns"
@titleClick="titleClick" :dataSource="tableData"
@onCancel="onCancel" :pagination="false"
@onSelectChange="onSelectChange" :loading="loading"
@detailClick="detailClick" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
></tableData> >
<!-- <a-table bordered :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">--> <span slot="serialNumber" slot-scope="text, record">
<!-- <a slot="serialNumber" slot-scope="text, record" @click="numberClick(record)">{{ text }}</a>--> <a class="table-del" @click="onDetail(record)">{{record.serialNumber}}</a>
<!--&lt;!&ndash; <a slot="title" slot-scope="text, record" @click="titleClick(record)">{{ text }}</a>&ndash;&gt;--> </span>
<!-- <template slot="action" slot-scope="text, record">--> <span slot="serialtitle" slot-scope="text, record">
<!-- <a class="action-delete" href="javascript:;" @click="onCancel(record)">取消收藏</a>--> <a class="table-del" @click="onDetail(record)">{{record.title}}</a>
<!-- </template>--> </span>
<!-- </a-table>--> <span slot="action" slot-scope="text, record">
<!-- <div class="page" v-if="tableData.length > 0">--> <a class="table-del" @click="onCancel(record)">{{$t('CancelCollection')}}</a>
<!-- <a-pagination--> </span>
<!-- :show-total="total => `共 ${total} 条`"--> </a-table>
<!-- show-quick-jumper--> <div class="page" v-if="tableData.length > 0">
<!-- show-size-changer--> <a-pagination
<!-- :current="queryParams.pageNo"--> :show-total="total => $t('total')+` ${total} `+ $t('strip')"
<!-- :page-size.sync="queryParams.pageSize"--> show-quick-jumper
<!-- :total="total"--> show-size-changer
<!-- @change="onChangePage"--> :current="queryParams.pageNo"
<!-- @showSizeChange="SizeChange"--> :page-size.sync="queryParams.pageSize"
<!-- />--> :total="total"
<!-- </div>--> @change="onChangePage"
@showSizeChange="SizeChange"
/>
</div>
</div> </div>
</a-card> </a-card>
</div> </div>
@@ -81,12 +84,12 @@
import { getAction, postAction, deleteAction, putAction } from '@/api/manage' import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
import eventBUs from '../../../common/event' import eventBUs from '../../../common/event'
import search from '@/components/search/index' import search from '@/components/search/index'
import tableData from '@/components/coTable/index' // import tableData from '@/components/coTable/index'
export default { export default {
name:'collection', name:'collection',
components:{ components:{
search, search,
tableData // tableData
}, },
data(){ data(){
return{ return{
@@ -99,33 +102,31 @@
//列表表头 //列表表头
columns: [ columns: [
{ {
title: '编号', title: this.$t('standard'),
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
key: 'serialNumber', key: 'serialNumber',
scopedSlots: {customRender: 'serialNumber'},
align: "center", align: "center",
width: 100, width: 100,
ellipsis: true,
}, },
{ {
title: '标题', title: this.$t('title'),
align: "center", align: "center",
scopedSlots: {customRender: 'serialtitle'},
width: 100, width: 100,
dataIndex: 'title', dataIndex: 'title',
ellipsis: true,
}, },
{ {
title: '状态', title: this.$t('status'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'state', dataIndex: 'state',
ellipsis: true,
}, },
{ {
title: '收藏时间', title: this.$t('collectionTime'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'createTime', dataIndex: 'createTime',
ellipsis: true,
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
@@ -136,7 +137,7 @@
} }
], ],
tableData:[], //列表数据 tableData:[], //列表数据
selecIds:'', selecIds:[],
loading:false, loading:false,
url:{ url:{
tableHeader: 'collection/onlCgformCollection/getHeader', //表格头部字段 tableHeader: 'collection/onlCgformCollection/getHeader', //表格头部字段
@@ -152,7 +153,7 @@
} }
}, },
mounted() { mounted() {
// this.loadData() this.loadData()
}, },
methods:{ methods:{
//获取列表数据 //获取列表数据
@@ -161,7 +162,7 @@
...this.queryParams ...this.queryParams
} }
this.loading=true this.loading=true
getAction(`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.loading=false this.loading=false
@@ -174,20 +175,21 @@
//批量取消收藏 //批量取消收藏
handleBatCancel(){ handleBatCancel(){
let params={ let params={
ids:this.selecIds ids:this.selecIds.join(',')
} }
if(this.selecIds){ if(this.selecIds&&this.selecIds.length>0){
this.$confirm({ this.$confirm({
title: '确认批量取消收藏?', 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'))
eventBUs.$emit('searchReset') if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!==1){
// this.selectedRowKeys = [] 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'))
} }
@@ -196,7 +198,7 @@
onCancel() {}, onCancel() {},
}); });
}else{ }else{
this.$message.warning('请选择至少一条数据') this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
//取消收藏 //取消收藏
@@ -205,15 +207,17 @@
id:record.id id:record.id
} }
this.$confirm({ this.$confirm({
title: '确认取消收藏?', 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'))
eventBUs.$emit('searchReset') if(this.tableData.length==1&&this.queryParams.pageNo!==1){
// this.loadData() this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -242,7 +246,7 @@
}, },
//选择框 //选择框
onSelectChange(rows) { onSelectChange(rows) {
console.log('rows',rows) // console.log('rows',rows)
// this.selectedRowKeys = selectedRowKeys // this.selectedRowKeys = selectedRowKeys
// let ids=[] // let ids=[]
// if(rows && rows.length>0){ // if(rows && rows.length>0){
@@ -250,7 +254,7 @@
// ids.push(item.id) // ids.push(item.id)
// }) // })
// } // }
this.selecIds=rows.join(',') this.selecIds=rows
// console.log('selectedRowKeys changed: ', ids); // console.log('selectedRowKeys changed: ', ids);
}, },
//点击编号 //点击编号
@@ -261,7 +265,7 @@
titleClick(records){ titleClick(records){
}, },
detailClick(item) { onDetail(item) {
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/docManage/library/detail', path: '/docManage/library/detail',
query: item query: item
@@ -280,6 +284,7 @@
.colloction-table{ .colloction-table{
.page{ .page{
margin-top: 20px; margin-top: 20px;
text-align: right;
} }
} }
} }
@@ -297,4 +302,5 @@
float: none!important; float: none!important;
} }
} }
</style> </style>
@@ -2,7 +2,26 @@
<div class="splitting"> <div class="splitting">
<a-card :bordered="false"> <a-card :bordered="false">
<div class="splitting-search-wrapper"> <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>
<div class="table-operator"> <div class="table-operator">
<div class="operator-text" @click="handleModule"> <div class="operator-text" @click="handleModule">
@@ -19,15 +38,34 @@
</div> </div>
</div> </div>
<div class="splitting-table"> <div class="splitting-table">
<tableData <a-table
:flag="'1'" ref="table"
:OperationList="OperationList" size="middle"
@editTable="seeTable" rowKey="id"
@deleteTable="deleteTable" :columns="columns"
:url="url" :dataSource="tableData"
showAction :pagination="false"
@returnBack="returnBack" :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> </div>
<split v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split> <split v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split>
<imports v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></imports> <imports v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></imports>
@@ -57,29 +95,62 @@
return{ return{
splitVisible:false, splitVisible:false,
importsVisible:false, importsVisible:false,
OperationList: [ selectedRowKeys:[],
loading:false,
total:0,
ids:[],
tableData:[
{ {
text: '回传至文档库', dbFieldTxt_dictText:'11111',
ClickEvent: 'returnBack' dbFieldEnName_dictText:'aaaaa',
}, fieldShowType_dictText:'345435435',
{ dbLength_dictText:'et435344354',
text: '查看', orderNum_dictText:'dfgdrgd',
ClickEvent: 'seeTable' showAreaName:'sdfsdfsd',
},
{
text: '删除',
ClickEvent: 'deleteTable'
} }
], ],
url: { columns:[
// tableHeader: 'document/bussDocumentLibraryEO/getHeader', //表格头部字段 {
// seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段 title: this.$t('standard'),
// tableList: 'document/bussDocumentLibraryEO/queryPageInfo', //表格数据 align: "center",
// getAddForm: 'document/bussDocumentLibraryEO/getAddForm', // 表单的字段 dataIndex: 'dbFieldTxt_dictText',
// addInfo: 'document/bussDocumentLibraryEO/addInfo', //新增 },
// updateInfo: 'document/bussDocumentLibraryEO/updateInfo', //编辑 {
// getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', //查看 title: this.$t('title'),
// deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch' //删除 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() { mounted() {
this.loadData()
}, },
methods:{ 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(){ handleModule(){
this.splitVisible=true this.splitVisible=true
@@ -103,28 +191,46 @@
}, },
//批量删除 //批量删除
handleDel(){ 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){ else{
console.log('val',val) this.$message.warning(this.$t('selectLeastOne'))
}, }
//查看
seeTable(){
this.$router.push({
path:'/docManage/splitting/splitDetail'
})
}, },
//删除 //删除
deleteTable(val){ deleteDetail(val){
let _this = this
this.$confirm({ this.$confirm({
content: '确认删除?', content: '确认删除?',
onOk() { onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => { deleteAction(``, { id: val.id }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(res.message) this.$message.success(res.message)
eventBUs.$emit('searchReset') if(this.tableData&&this.tableData.length==1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
@@ -137,7 +243,43 @@
}, },
iVisible(val){ iVisible(val){
this.importsVisible=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> </script>
@@ -146,12 +288,26 @@
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
</style> </style>
<style lang="less"> <style lang="less" scoped>
.splitting{ .splitting{
.splitting-search-wrapper{ .splitting-search-wrapper{
margin-bottom: 20px;
.table-page-search-submitButtons{ .table-page-search-submitButtons{
float: none!important; float: none!important;
} }
}
.splitting-table{
.action-margin{
margin-right: 10px;
}
} }
} }
.splitting-table{
.page{
margin-top: 20px;
text-align: right;
}
}
</style> </style>
@@ -2,7 +2,7 @@
<div class="imports"> <div class="imports">
<a-drawer <a-drawer
class="imports-table-drawer" class="imports-table-drawer"
title="拆分已入库文本" :title="$t('ImportResults')"
placement="right" placement="right"
:visible="visible" :visible="visible"
:after-visible-change="afterVisibleChange" :after-visible-change="afterVisibleChange"
@@ -14,19 +14,19 @@
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)"> <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item :label="'编号'"> <a-form-item :label="$t('standard')">
<j-input :placeholder="'请输入编号'" v-model="queryParams.standNumber"></j-input> <j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item :label="'标题'"> <a-form-item :label="$t('title')">
<j-input :placeholder="'请输入标题'" v-model="queryParams.standName"></j-input> <j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>
</a-form-item> </a-form-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">清空</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>
@@ -38,7 +38,7 @@
</a-table> </a-table>
<div class="page" v-if="tableSource.length > 0"> <div class="page" v-if="tableSource.length > 0">
<a-pagination <a-pagination
:show-total="total => `共 ${total} 条`" :show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper show-quick-jumper
show-size-changer show-size-changer
:page-size.sync="queryParams.pageSize" :page-size.sync="queryParams.pageSize"
@@ -57,21 +57,21 @@
:label-col="labelCol" :label-col="labelCol"
:wrapper-col="wrapperCol" :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" <a-button type="primary" class="button-text"
@click="fileUpload()"> @click="fileUpload()">
{{ (form.file === 'null' || form.file === '' || {{ (form.file === 'null' || form.file === '' ||
form.file == null) ? '上传' : '查看已上传文件' form.file == null) ? $t('upload1') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</a-form-model> </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>
<div class="imports-footer"> <div class="imports-footer">
<div class="imports-footer-wrap"> <div class="imports-footer-wrap">
<a-button class="imports-btn imports-chai" type="primary">保存</a-button> <a-button class="imports-btn imports-chai" type="primary">{{$t('preservation')}}</a-button>
<a-button class="imports-btn" type="primary" @click="cancleImports">取消</a-button> <a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
</div> </div>
</div> </div>
<ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload> <ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload>
@@ -80,7 +80,7 @@
</template> </template>
<script> <script>
import { getAction, postAction, deleteAction } from '@/api/manage' import { getAction, postAction, deleteAction, downFile } from '@/api/manage'
import ocrUpload from '@/components/ocrUpload/index' import ocrUpload from '@/components/ocrUpload/index'
export default { export default {
name: 'import', name: 'import',
@@ -103,28 +103,28 @@
total:0, total:0,
columns: [ columns: [
{ {
title:'编号', title:this.$t('standard'),
key: 'standNumber', key: 'standNumber',
align:"center", align:"center",
dataIndex: 'standNumber', dataIndex: 'standNumber',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'标题', title:this.$t('title'),
key: 'standName', key: 'standName',
align:"center", align:"center",
dataIndex: 'standName', dataIndex: 'standName',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'文件名称', title:this.$t('fileName'),
key: 'fileName', key: 'fileName',
align:"center", align:"center",
dataIndex: 'fileName', dataIndex: 'fileName',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'文本状态', title:this.$t('TextStatus'),
key: 'fileType_dictText', key: 'fileType_dictText',
align:"center", align:"center",
dataIndex: 'fileType_dictText', dataIndex: 'fileType_dictText',
@@ -136,7 +136,7 @@
form:{}, form:{},
rules:{ rules:{
file:[ file:[
{ required: true, message: '请选择文件', trigger: 'change' }, { required: true, message: this.$t('noFile'), trigger: 'change' },
], ],
}, },
} }
@@ -198,6 +198,10 @@
// /** 赋值给当前对应的表单文件 */ // /** 赋值给当前对应的表单文件 */
this.form.file = attIdList.join(',') this.form.file = attIdList.join(',')
}, },
//模板下载
downLoad(){
}
} }
} }
</script> </script>
@@ -2,7 +2,7 @@
<div class="split"> <div class="split">
<a-drawer <a-drawer
class="split-table-drawer" class="split-table-drawer"
title="拆分已入库文本" :title="$t('SplitText')"
placement="right" placement="right"
:visible="visible" :visible="visible"
:after-visible-change="afterVisibleChange" :after-visible-change="afterVisibleChange"
@@ -13,20 +13,20 @@
<div class="split-header"> <div class="split-header">
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)"> <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="8">
<a-form-item :label="'编号'"> <a-form-item :label="$t('standard')" class="split-item">
<j-input :placeholder="'请输入编号'" v-model="queryParams.standNumber"></j-input> <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> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <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"> <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">清空</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>
@@ -34,11 +34,11 @@
</div> </div>
</div> </div>
<div class="split-table-detail"> <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> </a-table>
<div class="page" v-if="tableSource.length > 0"> <div class="page" v-if="tableSource.length > 0">
<a-pagination <a-pagination
:show-total="total => `共 ${total} 条`" :show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper show-quick-jumper
show-size-changer show-size-changer
:page-size.sync="queryParams.pageSize" :page-size.sync="queryParams.pageSize"
@@ -50,8 +50,8 @@
</div> </div>
<div class="split-footer"> <div class="split-footer">
<div class="split-footer-wrap"> <div class="split-footer-wrap">
<a-button class="split-btn split-chai" type="primary">拆分</a-button> <a-button class="split-btn split-chai" type="primary">{{$t('split')}}</a-button>
<a-button class="split-btn" type="primary" @click="cancelSplit">取消</a-button> <a-button class="split-btn" type="primary" @click="cancelSplit">{{$t('cancel')}}</a-button>
</div> </div>
</div> </div>
</a-drawer> </a-drawer>
@@ -64,7 +64,14 @@
data(){ data(){
return{ return{
visible:false, visible:false,
tableSource:[], //列表数据 tableSource:[
{
standNumber:'aaaa',
standName:'11111',
fileName:'234323',
fileType_dictText:'ewre',
}
], //列表数据
selectedRowKeys:[], selectedRowKeys:[],
queryParams:{ queryParams:{
pageNo:1, pageNo:1,
@@ -73,35 +80,33 @@
total:0, total:0,
columns: [ columns: [
{ {
title:'编号', title:this.$t('standard'),
key: 'standNumber', key: 'standNumber',
align:"center", align:"center",
dataIndex: 'standNumber', dataIndex: 'standNumber',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'标题', title:this.$t('title'),
key: 'standName', key: 'standName',
align:"center", align:"center",
dataIndex: 'standName', dataIndex: 'standName',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'文件名称', title:this.$t('fileName'),
key: 'fileName', key: 'fileName',
align:"center", align:"center",
dataIndex: 'fileName', dataIndex: 'fileName',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'文本状态', title:this.$t('TextStatus'),
key: 'fileType_dictText', key: 'fileType_dictText',
align:"center", align:"center",
dataIndex: 'fileType_dictText', dataIndex: 'fileType_dictText',
ellipsis: true, ellipsis: true,
}, },
] ]
} }
}, },
@@ -158,6 +163,9 @@
.split-table-content{ .split-table-content{
.split-header{ .split-header{
margin-bottom: 20px; margin-bottom: 20px;
.split-item{
display: flex;
}
} }
} }
@@ -3,7 +3,7 @@
<div class="split-add-form-wrapper"> <div class="split-add-form-wrapper">
<a-drawer <a-drawer
class="split-table-drawer" class="split-table-drawer"
title="新增条款" :title="title"
placement="right" placement="right"
:visible="visible" :visible="visible"
:after-visible-change="afterVisibleChange" :after-visible-change="afterVisibleChange"
@@ -19,55 +19,61 @@
:label-col="labelCol" :label-col="labelCol"
:wrapper-col="wrapperCol" :wrapper-col="wrapperCol"
> >
<!-- 条款号-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="条款号" prop="number"> <a-form-model-item :label="$t('clauseNo')" prop="number">
<a-input v-model="form.number" placeholder="请输入条款号" /> <a-input v-model="form.number" :placeholder="$t('pleaseEnter')+$t('clauseNo')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- 条款名称-->
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="条款名称" prop="name"> <a-form-model-item :label="$t('clauseName')" prop="name">
<a-input v-model="form.name" placeholder="请输入条款名称" /> <a-input v-model="form.name" :placeholder="$t('pleaseEnter')+$t('clauseName')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 功能领域-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="功能领域" prop="funArea"> <a-form-model-item :label="$t('functionalAreas')" prop="funArea">
<j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" placeholder="请选择功能领域" /> <j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" :placeholder="$t('pleaseSelect')+$t('functionalAreas')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- 技术领域-->
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="技术领域" prop="tecArea"> <a-form-model-item :label="$t('technicalField')" prop="tecArea">
<j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" placeholder="请选择技术领域" /> <j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" :placeholder="$t('pleaseSelect')+$t('technicalField')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 信息类别-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="信息类别" prop="infoType"> <a-form-model-item :label="$t('informationCategory')" prop="infoType">
<j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" placeholder="请选择信息类别" /> <j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" :placeholder="$t('pleaseSelect')+$t('informationCategory')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<span class="con-divider">内容简介</span> <!-- 内容简介-->
<span class="con-divider">{{$t('contentValidity')}}</span>
<a-divider dashed /> <a-divider dashed />
<a-row :gutter="24" class="split-content" id="split-content" v-for="(item, index) in contentList" :key="item.id"> <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="split-row">
<div class="row-left"> <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>
<div class="row-right"> <div class="row-right">
<a-button class="row-btn-add" @click="splitAdd">增加</a-button> <a-button class="row-btn-add" @click="splitAdd">{{$t('Add')}}</a-button>
<a-button @click="splitDelete">删除</a-button> <a-button @click="splitDelete">{{$t('delete')}}</a-button>
</div> </div>
</div> </div>
</a-row> </a-row>
</a-form-model> </a-form-model>
</a-form> </a-form>
<div class="split-form-footer"> <div class="split-form-footer">
<a-button type="primary" class="footer-btn-save" @click="splitSave">保存</a-button> <a-button type="primary" class="footer-btn-save" @click="splitSave">{{$t('preservation')}}</a-button>
<a-button type="primary" @click="splitCancel">取消</a-button> <a-button type="primary" @click="splitCancel">{{$t('cancel')}}</a-button>
</div> </div>
<!-- 类型选择弹框--> <!-- 类型选择弹框-->
<a-modal <a-modal
@@ -101,6 +107,7 @@
name: 'splitAddForm', name: 'splitAddForm',
data(){ data(){
return{ return{
title:this.$t('newClause'),
contentList:[ contentList:[
{ {
id:'001', id:'001',
@@ -117,7 +124,7 @@
selected:1, selected:1,
selectedNum:true, selectedNum:true,
textNumber:1, textNumber:1,
Title:'新增', Title:this.$t('add'),
confirmLoading: false, confirmLoading: false,
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@@ -33,18 +33,18 @@
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
> >
<a-row :gutter="44"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="8">
<a-form-model-item :label="'条款名称'"> <a-form-model-item :label="$t('clauseName')" class="split-item">
<j-input :placeholder="'请输入条款名称'" v-model="queryParams.serialNumber"></j-input> <j-input :placeholder="$t('pleaseEnter') + $t('clauseName')" 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-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="$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"> <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>
@@ -91,8 +91,8 @@
<div class="split-detail-table"> <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"> <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"> <template slot="action" slot-scope="text, record">
<a class="action-edit" href="javascript:;" @click="onEdit(record)">编辑</a> <a class="action-edit" href="javascript:;" @click="onEdit(record)">{{$t('edit')}}</a>
<a class="action-delete" href="javascript:;" @click="onCancel(record)">删除</a> <a class="action-delete" href="javascript:;" @click="onCancel(record)">{{$t('delete')}}</a>
</template> </template>
</a-table> </a-table>
<div class="page" v-if="tableData.length > 0"> <div class="page" v-if="tableData.length > 0">
@@ -174,23 +174,19 @@
loading:false, loading:false,
columns: [ columns: [
{ {
title: '条款号', title: this.$t('clauseNo'),
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
key: 'serialNumber', key: 'serialNumber',
align: "center", align: "center",
width: 80,
ellipsis: true,
}, },
{ {
title: '条款名称', title: this.$t('clauseName'),
dataIndex: 'serialName', dataIndex: 'serialName',
key: 'serialName', key: 'serialName',
align: "center", align: "center",
width: 80,
ellipsis: true,
}, },
{ {
title: '条款内容', title: this.$t('clauseContent'),
dataIndex: 'serialContent', dataIndex: 'serialContent',
key: 'serialContent', key: 'serialContent',
align: "center", align: "center",
@@ -198,27 +194,23 @@
ellipsis: true, ellipsis: true,
}, },
{ {
title: '功能领域', title: this.$t('functionalAreas'),
dataIndex: 'functionArea', dataIndex: 'functionArea',
key: 'functionArea', key: 'functionArea',
align: "center", align: "center",
width: 80,
ellipsis: true,
}, },
{ {
title: '技术领域', title: this.$t('technicalField'),
dataIndex: 'tecArea', dataIndex: 'tecArea',
key: 'tecArea', key: 'tecArea',
align: "center", align: "center",
width: 80,
ellipsis: true,
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
dataIndex: 'action', dataIndex: 'action',
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
align: "center", align: "center",
width: 80 width: 120
} }
], ],
addVisible:false addVisible:false
@@ -403,11 +395,20 @@
flex: 1; flex: 1;
.split-detail-search-header{ .split-detail-search-header{
margin-bottom: 20px; margin-bottom: 20px;
.table-page-search-submitButtons{
display: flex;
}
} }
.split-detail-table{ .split-detail-table{
.action-edit{ .action-edit{
margin-right: 20px; margin-right: 20px;
} }
.page{
text-align: right;
}
}
.split-item{
display: flex;
} }
} }
.page{ .page{
@@ -415,4 +416,12 @@
} }
} }
} }
</style>
<style lang="less">
.split-item{
.ant-form-item-label{
min-width: 100px;
}
}
</style> </style>
@@ -17,16 +17,38 @@
</div> </div>
</div> </div>
<div class="colloction-table"> <div class="colloction-table">
<tableData <a-table
:url="url" ref="table"
:flag="'1'" size="middle"
:OperationList="OperationList" rowKey="id"
showAction :columns="columns"
@titleClick="titleClick" :dataSource="tableData"
@onCancel="onCancel" :pagination="false"
@onSelectChange="onSelectChange" :loading="loading"
@detailClick="detailClick" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
></tableData> >
<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> </div>
<sub-area v-if="visible" :subVisible="visible" @visible="areaVisible"></sub-area> <sub-area v-if="visible" :subVisible="visible" @visible="areaVisible"></sub-area>
</a-card> </a-card>
@@ -56,29 +78,31 @@
//列表表头 //列表表头
columns: [ columns: [
{ {
title: '编号', title: this.$t('standard'),
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
key: 'serialNumber', key: 'serialNumber',
align: "center", align: "center",
width: 100, width: 100,
scopedSlots: {customRender: 'serialNumber'},
ellipsis: true, ellipsis: true,
}, },
{ {
title: '标题', title: this.$t('title'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'title', dataIndex: 'title',
scopedSlots: {customRender: 'serialtitle'},
ellipsis: true, ellipsis: true,
}, },
{ {
title: '状态', title: this.$t('status'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'state', dataIndex: 'state',
ellipsis: true, ellipsis: true,
}, },
{ {
title: '订阅时间', title: this.$t('subscriptionTime'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'createTime', dataIndex: 'createTime',
@@ -94,7 +118,7 @@
], ],
tableData:[], //列表数据 tableData:[], //列表数据
visible:false, visible:false,
selecIds:'', selecIds:[],
loading:false, loading:false,
url:{ url:{
tableHeader: 'subscribe/onlCgformSubscribe/getHeader', //表格头部字段 tableHeader: 'subscribe/onlCgformSubscribe/getHeader', //表格头部字段
@@ -136,20 +160,21 @@
//批量取消收藏 //批量取消收藏
handleBatCancel(){ handleBatCancel(){
let params={ let params={
ids:this.selecIds ids:this.selecIds.join(',')
} }
if(this.selecIds){ if(this.selecIds&&this.selecIds.length>0){
this.$confirm({ this.$confirm({
title: '确认批量取消订阅?', title: this.$t('confirmBulkUnsubscribe'),
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`subscribe/onlCgformSubscribe/deleteBatch`,params).then(res=> { deleteAction(`subscribe/onlCgformSubscribe/deleteBatch`,params).then(res=> {
if(res.success){ if(res.success){
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset') if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!==1){
// this.selectedRowKeys = [] 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'))
} }
@@ -158,24 +183,26 @@
onCancel() {}, onCancel() {},
}); });
}else{ }else{
this.$message.warning('请选择至少一条数据') 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: '确认取消订阅?', title: this.$t('unsubscribeConfirm'),
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`subscribe/onlCgformSubscribe/delete`,params).then(res=> { deleteAction(`subscribe/onlCgformSubscribe/delete`,params).then(res=> {
if(res.success){ if(res.success){
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset') if(this.tableData.length==1&&this.queryParams.pageNo!==1){
// this.loadData() this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -211,7 +238,7 @@
// ids.push(item.id) // ids.push(item.id)
// }) // })
// } // }
this.selecIds=rows.join(',') this.selecIds=rows
}, },
//点击编号 //点击编号
numberClick(records){ numberClick(records){
@@ -224,7 +251,8 @@
areaVisible(val){ areaVisible(val){
this.visible=val this.visible=val
}, },
detailClick(item) { //跳转详情
onDetail(item) {
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/docManage/library/detail', path: '/docManage/library/detail',
query: item query: item
@@ -242,6 +270,7 @@
} }
.page{ .page{
margin-top: 20px; margin-top: 20px;
text-align: right;
} }
} }
@@ -76,13 +76,14 @@
getAction(`sys/category/getSysCategoryTree`,params).then(res=> { getAction(`sys/category/getSysCategoryTree`,params).then(res=> {
if(res.success){ if(res.success){
this.data=[...res.result] this.data=[...res.result]
this.treeData=this.addAttr(this.data) this.treeData=[...this.addAttr(this.data)]
// console.log('treeData',this.treeData) // console.log('treeData',this.treeData)
} }
}) })
}, },
onSearch(){ onSearch(){
this.loadData() // this.treeData=[]
// this.treeData=this.getSearch(this.data)
}, },
//获取用户的订阅 //获取用户的订阅
getSubscribtion(){ getSubscribtion(){
@@ -95,7 +96,7 @@
}) })
this.checkedKeys=[...ids] this.checkedKeys=[...ids]
// this.selectedKeys=this.checkedKeys // 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){ if((Array.isArray(dataI)) && dataI.length>0){
dataI.forEach((item,index)=>{ dataI.forEach((item,index)=>{
this.$set(item,'key',item.id) this.$set(item,'key',item.id)
// if(item.title.indexOf(this.searchValue)!==-1){
// console.log('item.title',item.title)
// }
let arr = []; let arr = [];
this.addAttr(item.children,arr); this.addAttr(item.children,arr);
}); });
@@ -113,8 +111,24 @@
// console.log('dataI',dataI) // console.log('dataI',dataI)
return 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) { afterVisibleChange(val) {
console.log('visible', val); // console.log('visible', val);
}, },
handleOk(e) { handleOk(e) {
this.confirmLoading = true; this.confirmLoading = true;
@@ -175,7 +189,7 @@
return null; return null;
}) })
.filter((item, i, self) => item && self.indexOf(item) === i); .filter((item, i, self) => item && self.indexOf(item) === i);
console.log('item',item)
Object.assign(this, { Object.assign(this, {
expandedKeys, expandedKeys,
searchValue: value, searchValue: value,
@@ -17,13 +17,13 @@
<a-icon type="plus" /> <a-icon type="plus" />
{{$t('add')}} {{$t('add')}}
</div> </div>
<div class="operator-text" v-if="dictVal=='tree'" @click="batDelete"> <div class="operator-text" @click="batDelete">
<a-icon type="delete" /> <a-icon type="delete" />
{{$t('BatchDelete')}} {{$t('BatchDelete')}}
</div> </div>
</div> </div>
<div class="dic-list-table"> <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> <tree-table v-if="dictVal=='tree'&&dataFlag" :tabletreeData="tabletreeData" :record="record" @editDict="editTreeDict" @selectedKeys="selectedKeys" @ok="ok" :total="total"></tree-table>
</div> </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"> <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(){ data(){
return{ return{
selected:[],
title:this.$t('add'), title:this.$t('add'),
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 16 }, wrapperCol: { span: 16 },
@@ -256,64 +257,70 @@
}, },
//保存 //保存
hideModal(){ hideModal(){
if(this.dictVal=='list') {
let params = { this.$refs.ruleForm.validate(valid => {
...this.form, if (valid) {
dictId: this.record.id if(this.dictVal=='list') {
} let params = {
if (this.isEdit) { ...this.form,
putAction(`sys/dictItem/edit`, params).then(res => { dictId: this.record.id
if (res.success) { }
this.$message.success(this.$t('OperationSuccessful')) if (this.isEdit) {
this.form={} putAction(`sys/dictItem/edit`, params).then(res => {
this.loadData() if (res.success) {
this.newVisible = false this.$message.success(this.$t('OperationSuccessful'))
this.form = {}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
} else { } else {
this.$message.warning(this.$t('operationFailed')) postAction(`sys/dictItem/add`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.form = {}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
} }
}) } else if (this.dictVal == 'tree') {
} else { console.log('tree1111')
postAction(`sys/dictItem/add`, params).then(res => { let params = {
if (res.success) { ...this.form,
this.$message.success(this.$t('OperationSuccessful')) sysDictId: this.record.id
this.form={} }
this.loadData() if (this.isEdit) {
this.newVisible = false putAction(`sys/category/edit`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.form = {}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
} else { } else {
this.$message.warning(this.$t('operationFailed')) //新增
postAction(`sys/category/add`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.form = {}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
} }
}) }
} }
}else if(this.dictVal=='tree'){ })
let params = {
...this.form,
sysDictId: this.record.id
}
if (this.isEdit) {
putAction(`sys/category/edit`,params).then(res=>{
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
this.form={}
this.loadData()
this.newVisible = false
}else {
this.$message.warning(this.$t('operationFailed'))
}
})
}else{
//新增
postAction(`sys/category/add`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.form={}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
}
}
}, },
//取消 //取消
cancelModel(){ cancelModel(){
@@ -345,6 +352,7 @@
let params={ let params={
id:val id:val
} }
this.$confirm({ this.$confirm({
title: this.$t('ConfirmDelete'), title: this.$t('ConfirmDelete'),
content: '', content: '',
@@ -353,7 +361,9 @@
deleteAction(`sys/dictItem/delete`, params).then(res => { deleteAction(`sys/dictItem/delete`, params).then(res => {
if(res.success) { if(res.success) {
this.$message.success(this.$t('OperationSuccessful')); this.$message.success(this.$t('OperationSuccessful'));
this.queryParams.pageNo=1 if(this.tableData&&this.tableData.length==1&&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'));
@@ -380,15 +390,29 @@
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`sys/category/deleteBatch`, params).then(res => { if(this.dictVal=='list'){
if(res.success){ deleteAction(`sys/dictItem/logicDeleteBatch`, params).then(res => {
this.queryParams.pageNo=1 if(res.success){
this.loadData() if(this.ids.length==this.tableData.length&&this.queryParams.pageNo!=1){
this.$message.success(this.$t('OperationSuccessful')) this.queryParams.pageNo=this.queryParams.pageNo-1
}else{ }
this.$message.warning(this.$t('operationFailed')) 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{ }else{
@@ -1,6 +1,6 @@
<template> <template>
<div class="list-table"> <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"> <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>
@@ -98,7 +98,9 @@
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys); console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.$emit('selected',this.selectedRowKeys)
}, },
//点击页数 //点击页数
onChangePage(page,pageSize){ onChangePage(page,pageSize){
this.queryParams.pageNo = page this.queryParams.pageNo = page
@@ -63,6 +63,7 @@
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
// console.log('selectedRowKeys changed: ', selectedRowKeys); // console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.$emit('selecteds',selectedRowKeys)
}, },
handleTableChange(){ handleTableChange(){
@@ -22,6 +22,10 @@
<a-icon type="plus" /> <a-icon type="plus" />
{{$t('add')}} {{$t('add')}}
</div> </div>
<div class="operator-text" @click="batDelete">
<a-icon type="delete" />
{{$t('BatchDelete')}}
</div>
</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-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 <a-form-model
@@ -51,7 +55,7 @@
</a-form-model> </a-form-model>
</a-modal> </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"> <template slot="action" slot-scope="text, record">
<a class="action-dict" @click="handleDicPop(record)">{{$t('DictionaryConfiguration')}}</a> <a class="action-dict" @click="handleDicPop(record)">{{$t('DictionaryConfiguration')}}</a>
@@ -105,6 +109,7 @@
pageNo:1, pageNo:1,
pageSize:10 pageSize:10
}, },
ids:[],
selectedRowKeys: [], selectedRowKeys: [],
contentVisible:false, contentVisible:false,
tableData:[], tableData:[],
@@ -259,6 +264,9 @@
deleteAction(`sys/dict/logicDelete`, param).then(res => { deleteAction(`sys/dict/logicDelete`, param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if(this.tableData&&this.tableData.length==1&&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'));
@@ -270,6 +278,41 @@
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
// console.log('selectedRowKeys changed: ', selectedRowKeys); // console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.ids = this.selectedRowKeys;
},
//批量删除
batDelete(){
let params={
ids:this.ids.join(',')
}
if(this.ids&&this.ids.length>0){
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'))
if(this.ids.length==this.tableData.length&&this.queryParams.pageNo!=1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
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){ actionEdit(val){
@@ -33,6 +33,10 @@
<a-icon type="rocket" :rotate="45" /> <a-icon type="rocket" :rotate="45" />
{{$t('ExhibitionAreaManagement')}} {{$t('ExhibitionAreaManagement')}}
</div> </div>
<div class="operator-text" @click="batDelete">
<a-icon type="delete" />
{{$t('BatchDelete')}}
</div>
</div> </div>
<a-drawer class="show-drawer" :title="titleTag" placement="right" width="1000px" @close="close" :visible="drawerVisible" :after-visible-change="afterVisibleChange" > <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> <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-spin :spinning="spinning" tip="Loading...">
<a-tabs default-active-key="1" @change="callbackTab"> <a-tabs default-active-key="1" @change="callbackTab">
<a-tab-pane key="1" :tab="$t('DocumentLibrary')"> <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>
<!-- <a-tab-pane key="2" :tab="$t('DocumentSplitting')" force-render>--> <!-- <a-tab-pane key="2" :tab="$t('DocumentSplitting')" force-render>-->
<!-- <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>--> <!-- <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>-->
@@ -138,7 +142,8 @@
submitEdit:'add', submitEdit:'add',
key:1, key:1,
total:0, total:0,
type:'input' type:'input',
ids:[]
} }
}, },
mounted() { mounted() {
@@ -282,10 +287,15 @@
if (res.success) { if (res.success) {
if (this.key == 1) { if (this.key == 1) {
this.$message.success(this.$t('OperationSuccessful')) 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) this.loadData(1)
} else if (this.key == 2) { } else if (this.key == 2) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if(this.tableData&&this.tableData.length==1){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(0) this.loadData(0)
} }
postAction(`online/cgform/api/doDbSynch/48308196e7b04761b533dc31bc899707/normal 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){ closeTag(val){
this.drawerVisible=val this.drawerVisible=val