标签管理

This commit is contained in:
caoyang
2022-01-26 14:57:55 +08:00
parent 07d22d0fd6
commit 2c7c939ac9
5 changed files with 201 additions and 5 deletions
+1
View File
@@ -88,6 +88,7 @@
getAction(this.url.seachList, params).then((res) => {
if (res.success) {
this.searchList = res.result
console.log('reList',this.searchList)
}
})
}
@@ -0,0 +1,110 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<search :flag="'1'" :url="url" :searchList="searchList"/>
</div>
<div class="table-operator">
<a-button @click="handleExport()" type="primary">数据导出</a-button>
<a-button @click="handleFileExport()" type="primary">带文件导出</a-button>
<a-button @click="handleAdd()" type="primary">{{$t('add')}}</a-button>
<a-button @click="handleModule()" type="primary">模板下载</a-button>
<a-button @click="handleModule()" type="primary">导入</a-button>
<a-button @click="handleDel()" type="primary">批量删除</a-button>
<a-button @click="handleCompare()" type="primary" icon="plus">推送</a-button>
</div>
<div>
<tableData
:flag="'1'"
:OperationList="OperationList"
@editTable="editTable"
@deleteTable="deleteTable"
:url="url"
/>
</div>
<addForm ref="addFormClick1"/>
</a-card>
</template>
<script>
import search from '@/components/search/index'
import tableData from '@/components/tableDate/index'
import addForm from './modules/addForm'
export default {
name: 'docLibrary',
components: {
search,
addForm,
tableData
},
data() {
return {
searchList: [
{ name: '名称', placeholder: '请输入姓名', attrModel: 'name', enName: 'title' },
{ name: '标题', placeholder: '请输入标题', attrModel: 'title', enName: 'title' }
],
OperationList: [
{
text: '编辑',
ClickEvent: 'editTable'
},
{
text: '删除',
ClickEvent: 'deleteTable'
},
{
text: '收藏',
ClickEvent: 'Collection'
},
{
text: '订阅',
ClickEvent: 'subscribe'
}
],
selectedRowKeys: [],
loading: false,
url:{
tableHeader:'document/bussDocumentLibraryEO/getHeader',
seachList:'document/bussDocumentLibraryEO/queryCondition',
tableList:'/document/bussDocumentLibraryEO/queryPageInfo',
}
}
},
methods: {
onSelectChange() {
},
handleExport(){
},
handleFileExport(){
},
handleAdd(){
this.$refs.addFormClick1.add()
},
handleModule(){
},
handleDel(){
},
handleCompare() {
// this.$refs.addFormClick1.add()
},
handleFileImport(){
},
editTable(item) {
console.log(item)
},
deleteTable(){
console.log(3)
},
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,74 @@
<template>
<a-drawer
:title="title"
:maskClosable="true"
:width="drawerWidth"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<addFormData
ref="addFormDataRef"
isDisplayType
v-if="visible"
:url="url"
/>
<div class="drawer-bootom-button">
<a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"
:cancelText="$t('cancel')">
<a-button style="margin-right: .8rem">{{$t('cancel')}}</a-button>
</a-popconfirm>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import addFormData from '@/components/addForm/index'
export default {
name: 'docLibraryAddForm',
components: {
addFormData
},
data() {
return {
title: '添加',
drawerWidth: 1000,
visible: false,
confirmLoading: false,
url: {}
}
},
methods: {
handleCancel() {
this.visible = false
},
add() {
this.visible = true
},
edit() {
this.visible = true
},
handleSubmit() {
this.$refs.addFormDataRef.sumber()
console.log('11111')
}
}
}
</script>
<style lang="less" scoped>
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
@@ -99,19 +99,19 @@
title: '英文名称',
align: "center",
width: 100,
dataIndex: 'englishName',
dataIndex: 'enName',
},
{
title: '所属模块',
align: "center",
width: 100,
dataIndex: 'type',
dataIndex: 'isModel',
},
{
title: '排序号',
align: "center",
width: 80,
dataIndex: 'numberSort'
dataIndex: 'sort'
},
{
title: this.$t('operation'),
@@ -162,7 +162,9 @@
this.$refs.ruleForm.validate(valid => {
if (valid) {
postAction(`/tag/onlCgformArea/add`,this.form).then(res=>{
console.log('res',res)
if(res.success){
this.$emit('submitOk',res.result)
}
}
)
} else {
@@ -32,7 +32,7 @@
<new-drawer v-if="drawerVisible"></new-drawer>
</a-drawer>
<a-modal class="show-area" v-model="areaVisible" title="展示区域管理" :footer="null" @cancel="hideModal">
<area-manage v-if="areaVisible" @diaHide="diaHide" :areaTable="areaTable"></area-manage>
<area-manage v-if="areaVisible" @diaHide="diaHide" :areaTable="areaTable" @submit-ok="submitOk"></area-manage>
</a-modal>
<div class="tag-doc-tab">
<a-tabs default-active-key="1" @change="callbackTab">
@@ -48,6 +48,7 @@
</template>
<script>
import { putAction,postAction,getAction } from '@/api/manage'
import JInput from '@/components/jero/JInput'
import tabTable from './tabTable'
import areaManage from '../dialog/areaManage'
@@ -198,6 +199,11 @@
},
handleShow(){
this.areaVisible=true
getAction(`/tag/onlCgformArea/list`,{}).then(res=>{
if(res.success){
this.areaTable=res.result
}
})
},
callbackTab(value){
console.log('values',value)
@@ -215,6 +221,9 @@
},
close(){
this.drawerVisible=false
},
submitOk(value){
this.handleShow()
}
}
}