拆分详情新增
This commit is contained in:
@@ -105,10 +105,13 @@
|
||||
:url="url"
|
||||
:flag="'4'"
|
||||
:OperationList="OperationList"
|
||||
:infoId="infoId"
|
||||
:menuId="menuId"
|
||||
showAction
|
||||
@onSelectChange="onSelectChange"
|
||||
@deleteClick="deleteClick"
|
||||
@editClick="editClick"
|
||||
@showContent="showContent"
|
||||
></table-data>
|
||||
<!-- <a-table :data-source="tableData" :columns="columns" rowKey="id" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">-->
|
||||
<!-- <template slot="clauseContent" slot-scope="text, record">-->
|
||||
@@ -174,7 +177,7 @@
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" @closeVisible="closeVisible"></split-add-form>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" :item="item" @closeVisible="closeVisible"></split-add-form>
|
||||
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
|
||||
</div>
|
||||
</a-card>
|
||||
@@ -184,9 +187,10 @@
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction, putAction, downloadFile } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import TableData from '@/components/SplitTable/index'
|
||||
import TableData from '@/components/SplitDetailTable/index'
|
||||
import upload from '@/components/uploadFile/file.vue'
|
||||
import SplitAddForm from './SplitAddForm'
|
||||
import eventBUs from '@/common/event'
|
||||
export default {
|
||||
name: 'SplitDetail',
|
||||
components:{
|
||||
@@ -317,6 +321,9 @@
|
||||
],
|
||||
},
|
||||
infoId:'',
|
||||
menuId:'',
|
||||
itemId:'',
|
||||
item:{},
|
||||
// NodeTreeItemVisible:false,
|
||||
flag:false, //提交按钮标识
|
||||
isEdit:false,
|
||||
@@ -333,9 +340,10 @@
|
||||
url:{
|
||||
tableHeader: 'language/switch/getHeader', //表格头部字段
|
||||
seachList: 'language/switch/queryCondition', //搜索字段
|
||||
// tableList: 'split/sarFileSplitInfo/page', //表格数据
|
||||
tableList: 'split/sarFileSplitItems/getSplitItemsByPage', //表格数据
|
||||
getAddForm: 'language/switch/getForm', // 表单的字段
|
||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
||||
updateInfo:'/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -343,6 +351,7 @@
|
||||
this.infoId=this.$route.query.infoId
|
||||
// console.log('info',this.$route.query)
|
||||
this.loadMenuData()
|
||||
this.loadData()
|
||||
this.generateList(this.gData);
|
||||
},
|
||||
methods: {
|
||||
@@ -480,7 +489,9 @@
|
||||
},
|
||||
//选择树节点
|
||||
onSelect(selectedKeys){
|
||||
console.log('sele',selectedKeys)
|
||||
this.menuId=selectedKeys[0]
|
||||
eventBUs.$emit('searchReset')
|
||||
// console.log('sele',selectedKeys)
|
||||
},
|
||||
//树形新增
|
||||
orgAdd(){
|
||||
@@ -504,7 +515,7 @@
|
||||
//树形删除
|
||||
orgDelete(){
|
||||
this.$confirm({
|
||||
content: this.$t('areYouSure'),
|
||||
content: this.$t('deleteNodes'),
|
||||
onOk:
|
||||
async () => {
|
||||
getAction(`split/sarFileSplitMenu/deleteMenu`, { id: this.nodeItem.id }).then(res => {
|
||||
@@ -528,7 +539,7 @@
|
||||
expandId.push(this.form.pid)
|
||||
if(!this.isEdit){
|
||||
let params={
|
||||
infoId: this.infoId,
|
||||
info_id: this.infoId,
|
||||
pid:this.nodeItem.id,
|
||||
...this.form,
|
||||
}
|
||||
@@ -548,7 +559,7 @@
|
||||
})
|
||||
}else{
|
||||
let params = {
|
||||
infoId: this.infoId,
|
||||
info_id: this.infoId,
|
||||
...this.form,
|
||||
}
|
||||
this.flag=true
|
||||
@@ -572,13 +583,13 @@
|
||||
let params={
|
||||
...this.queryParams
|
||||
}
|
||||
// this.loading=true
|
||||
// getAction(``,params).then(res=>{
|
||||
// if(res.success){
|
||||
// this.tableData= [ ...res.result.records ]
|
||||
// this.loading=false
|
||||
// }
|
||||
// })
|
||||
this.loading=true
|
||||
postAction(`split/sarFileSplitItems/getSplitItemsByPage`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.tableData= [ ...res.result.records ]
|
||||
this.loading=false
|
||||
}
|
||||
})
|
||||
},
|
||||
//搜索
|
||||
searchQuery(){
|
||||
@@ -617,11 +628,17 @@
|
||||
},
|
||||
//新增
|
||||
handleAddManage(){
|
||||
this.formTitle=this.$t('add')
|
||||
this.addVisible=true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.splitForm.add()
|
||||
})
|
||||
// console.log('this.menuId',this.menuId)
|
||||
if(this.menuId){
|
||||
this.formTitle=this.$t('add')
|
||||
this.itemId=''
|
||||
this.addVisible=true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.splitForm.add()
|
||||
})
|
||||
}else{
|
||||
this.$message.warning('请选择要添加条款的目录位置')
|
||||
}
|
||||
},
|
||||
closeVisible(val){
|
||||
this.addVisible=val
|
||||
@@ -650,7 +667,11 @@
|
||||
},
|
||||
//合并条款
|
||||
handleMergeManage(){
|
||||
if(this.selectedRowKeys&&this.selectedRowKeys.length<1){
|
||||
this.$message.warning(this.$t('leastTwo'))
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
//批量设置
|
||||
handleManage(){
|
||||
@@ -683,10 +704,13 @@
|
||||
},
|
||||
//编辑
|
||||
editClick(val){
|
||||
// console.log('val',val)
|
||||
this.formTitle=this.$t('edit')
|
||||
this.item=val
|
||||
this.itemId=val.id
|
||||
this.addVisible=true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.splitForm.edit()
|
||||
this.$refs.splitForm.edit(val)
|
||||
})
|
||||
},
|
||||
//删除
|
||||
@@ -906,5 +930,10 @@
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.split-detail-search-header{
|
||||
.ant-col-sm-8{
|
||||
min-width: 300px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user