对外报告管理接口对接
This commit is contained in:
@@ -1190,4 +1190,5 @@ module.exports = {
|
||||
selectDirectorylocation: 'Please select the directory location to add the folder',
|
||||
Fileuploaded:'File uploaded, please wait',
|
||||
uploadedbyyourself:'You can only delete files and data uploaded by yourself',
|
||||
Fileuploaded:'File uploading, please wait',
|
||||
}
|
||||
@@ -1193,4 +1193,5 @@ module.exports = {
|
||||
Checkthepermissions:'查看权限',
|
||||
onlyFilesUploaded:'只能上传.docx、.doc文件',
|
||||
uploadedbyyourself:'只能删除自己上传的文件数据',
|
||||
Fileuploaded:'文件上传中,请稍后',
|
||||
}
|
||||
@@ -20,11 +20,11 @@
|
||||
<span class="title-text-text"
|
||||
:title="$t('fileName')">{{$t('fileName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="sourceFileId">
|
||||
<a-form-model-item class="itemModel" prop="fileKey">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('sourceFileId')">
|
||||
{{ (formInline.sourceFileId === 'null' || formInline.sourceFileId === '' ||
|
||||
formInline.sourceFileId == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
@click="clickButtonToUpload('fileKey')">
|
||||
{{ (formInline.fileKey === 'null' || formInline.fileKey === '' ||
|
||||
formInline.fileKey == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
@@ -38,12 +38,12 @@
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text" :title="$t('fileDeclaration')">{{$t('fileDeclaration')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="description">
|
||||
<a-form-model-item class="itemModel" prop="fileDescription">
|
||||
<a-input class="box-input add-input"
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('fileDeclaration')"
|
||||
v-model="formInline.description"/>
|
||||
v-model="formInline.fileDescription"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -86,17 +86,18 @@ export default {
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
spinning: false,
|
||||
menuId:'',
|
||||
visible: false,
|
||||
url: {
|
||||
add: 'params/template/add',
|
||||
edit: 'params/template/edit',
|
||||
add: 'com.jero.modules.extRepo/extRepoData/add',
|
||||
edit: 'com.jero.modules.extRepo/extRepoData/edit',
|
||||
},
|
||||
rules: {
|
||||
description:[
|
||||
fileDescription:[
|
||||
// { required: true, message: this.$t('PleaseEnter')+this.$t('fileDeclaration'), trigger: 'blur' },
|
||||
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
sourceFileId: [
|
||||
fileKey: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('fileName') + this.$t('cannotEmpty'),
|
||||
@@ -122,9 +123,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
addModel() {
|
||||
addModel(menuId) {
|
||||
this.visible = true
|
||||
this.title = this.$t('UploadFile')
|
||||
this.menuId = menuId
|
||||
this.formInline = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['ruleForm'].clearValidate()
|
||||
@@ -147,9 +149,6 @@ export default {
|
||||
}
|
||||
},
|
||||
handleSubmit() {
|
||||
if(this.formInline.paramsTemplateName !== undefined) {
|
||||
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.spinning = true
|
||||
@@ -162,21 +161,23 @@ export default {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
}
|
||||
this.formInline.supFolder = this.menuId
|
||||
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(query).forEach(res => {
|
||||
if (query[res] && query[res] instanceof Array) {
|
||||
query[res] = query[res].join(',')
|
||||
}
|
||||
})
|
||||
postAction(url, query).then((res) => {
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.spinning = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
// this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$message.success(res.message)
|
||||
this.visible = false
|
||||
this.$emit('addModelList')
|
||||
} else {
|
||||
this.spinning = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -43,16 +43,16 @@
|
||||
<template #overlay>
|
||||
<a-menu
|
||||
@click="({ key: menuKey }) => onContextMenuClick(treeKey, menuKey, record)">
|
||||
<a-menu-item key="1" @click="orgAdd" v-has="'split:sarFileSplitMenu:add'">{{$t('Addingfolder')}}
|
||||
<a-menu-item key="1" @click="orgAdd" v-has="'externalReports:folder'">{{$t('Addingfolder')}}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="4" @click="orgAdds" v-if="deleteNode"
|
||||
v-has="'split:sarFileSplitMenu:delete'">{{$t('Addingsubfolders')}}
|
||||
v-has="'externalReports:folder'">{{$t('Addingsubfolders')}}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2" @click="orgEdit" v-has="'split:sarFileSplitMenu:update'">
|
||||
<a-menu-item key="2" @click="orgEdit" v-has="'externalReports:folder'">
|
||||
{{$t('Editfolder')}}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3" @click="orgDelete"
|
||||
v-has="'split:sarFileSplitMenu:delete'">{{$t('Deletefolders')}}
|
||||
v-has="'externalReports:folder'">{{$t('Deletefolders')}}
|
||||
</a-menu-item>
|
||||
|
||||
</a-menu>
|
||||
@@ -185,26 +185,26 @@
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item :label="$t('Foldername')" prop="name">
|
||||
<a-input class="box-input add-input" v-model="form.name" :placeholder="$t('PleaseEnter')+$t('Foldername')"/>
|
||||
<a-form-model-item :label="$t('Foldername')" prop="folderName">
|
||||
<a-input class="box-input add-input" v-model="form.folderName" :placeholder="$t('PleaseEnter')+$t('Foldername')"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('Administrativeprivileges')" prop="Administrativeprivileges">
|
||||
<a-form-model-item :label="$t('Administrativeprivileges')" prop="authManage">
|
||||
<PersonnelSelection class="box-input add-input"
|
||||
:personneQuery="form"
|
||||
:query="{db_field_name:'Administrativeprivileges',db_field_txt:$t('Administrativeprivileges')}"
|
||||
:query="{db_field_name:'authManageIds',db_field_txt:$t('Administrativeprivileges')}"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="form.Administrativeprivileges"/>
|
||||
v-model="form.authManage"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('Checkthepermissions')" prop="Checkthepermissions">
|
||||
<a-form-model-item :label="$t('Checkthepermissions')" prop="authView">
|
||||
<PersonnelSelection
|
||||
class="box-input add-input"
|
||||
:personneQuery="form"
|
||||
:query="{db_field_name:'Checkthepermissions',db_field_txt:$t('Checkthepermissions')}"
|
||||
:query="{db_field_name:'authViewIds',db_field_txt:$t('Checkthepermissions')}"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="form.Checkthepermissions"/>
|
||||
v-model="form.authView"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('Folderorder')" prop="displaySeq">
|
||||
<a-input-number v-model="form.displaySeq" :min="1" :max="99999" class="box-input add-input"
|
||||
<a-form-model-item :label="$t('Folderorder')" prop="orderId">
|
||||
<a-input-number v-model="form.orderId" :min="1" :max="99999" class="box-input add-input"
|
||||
:placeholder="$t('PleaseEnter')+$t('Folderorder')" :formatter="limitNumber"
|
||||
:parser="limitNumber" />
|
||||
<!-- <a-input-number v-model="rowCount" :min="1" :placeholder="$t('pleaseEnter')+$t('numberRows')" :formatter="limitNumber" :parser="limitNumber" />-->
|
||||
@@ -223,7 +223,7 @@
|
||||
<script>
|
||||
import addModel from './components/addModel'
|
||||
import handleModel from './components/handle'
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import { getAction, postAction, downloadFile, deleteAction,putAction } from '@/api/manage'
|
||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||
// import exportTree from '@/components/exportTree/index'
|
||||
import axios from 'axios'
|
||||
@@ -281,17 +281,17 @@ export default {
|
||||
menuRightVisible: false,
|
||||
form: {},
|
||||
rules: {
|
||||
name: [
|
||||
folderName: [
|
||||
{ required: true, message: this.$t('PleaseEnter') + this.$t('Foldername'), trigger: 'blur' },
|
||||
{ min: 1, max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' }
|
||||
],
|
||||
Administrativeprivileges: [
|
||||
authManage: [
|
||||
{ required: true, message: this.$t('PleaseSelect') + this.$t('Administrativeprivileges'), trigger: 'change' },
|
||||
],
|
||||
Checkthepermissions: [
|
||||
authView: [
|
||||
{ required: true, message: this.$t('PleaseSelect') + this.$t('Checkthepermissions'), trigger: 'change' },
|
||||
],
|
||||
displaySeq: [
|
||||
orderId: [
|
||||
{ required: true, message: this.$t('PleaseEnter') + this.$t('Folderorder'), trigger: 'blur' }
|
||||
// { min: 1, max: 99999, message: this.$t('cantExeed') + '99999' + this.$t('characters'), trigger: 'blur' },
|
||||
]
|
||||
@@ -317,17 +317,17 @@ export default {
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumber',
|
||||
dataIndex: 'fileName',
|
||||
},
|
||||
{
|
||||
title: this.$t('fileDeclaration'),
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
dataIndex: 'fileDescription',
|
||||
},
|
||||
{
|
||||
title: this.$t('uploadedBy'),
|
||||
align: 'center',
|
||||
dataIndex: 'state_dicText',
|
||||
dataIndex: 'updateBy',
|
||||
},
|
||||
// {
|
||||
// title: this.$t('category'),
|
||||
@@ -337,7 +337,7 @@ export default {
|
||||
{
|
||||
title: this.$t('uploadTime'),
|
||||
align: 'center',
|
||||
dataIndex: 'technologyTerritory_dicText',
|
||||
dataIndex: 'updateTime',
|
||||
width: 250
|
||||
},
|
||||
{
|
||||
@@ -349,7 +349,7 @@ export default {
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: 'project/lawsComplianceBoard/page',
|
||||
list: 'com.jero.modules.extRepo/extRepoData/page',
|
||||
getSysCategoryTree: '/sys/category/getSysCategoryTree',
|
||||
},
|
||||
ids: '',
|
||||
@@ -379,26 +379,9 @@ export default {
|
||||
const that = this
|
||||
let client = ''
|
||||
let width = ''
|
||||
// this.widthBrown = window.screenWidth || document.body.clientWidth;
|
||||
// let iframeTop= document.querySelector('.split-detail-left').getBoundingClientRect().top
|
||||
// document.querySelector('.split-detail-left').style.height = this.brownHeight-iframeTop-24 + 'px'
|
||||
// console.log(iframeTop,'iframeTop2222')
|
||||
// document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px'
|
||||
// window.addEventListener('resize', () => {
|
||||
// that.screenWidth = window.screenWidth || document.body.clientWidth;
|
||||
// client = document.querySelector('.split-detail-table .ant-table-content').getBoundingClientRect()
|
||||
// // console.log('screenWidth',that.screenWidth)
|
||||
// width = that.screenWidth - client.left
|
||||
// document.querySelector('.split-detail-table .ant-table-content').style.width = width - 20 + 'px'
|
||||
// iframeTop= document.querySelector('.split-detail-left').getBoundingClientRect().top
|
||||
// console.log(iframeTop,'iframeTop111')
|
||||
// document.querySelector('.split-detail-left').style.height = this.brownHeight-iframeTop-24 + 'px'
|
||||
// }, false);
|
||||
|
||||
|
||||
this.userData = this.userInfo()
|
||||
this.infoId = this.$route.query.infoId
|
||||
console.log('info', this.$route.query)
|
||||
// this.infoId = this.$route.query.infoId
|
||||
// console.log('info', this.$route.query)
|
||||
this.loadMenuData()
|
||||
this.loadData()
|
||||
this.generateList(this.gData)
|
||||
@@ -467,13 +450,14 @@ export default {
|
||||
},
|
||||
//获取左侧目录数据
|
||||
loadMenuData() {
|
||||
let params = {
|
||||
infoId: this.infoId
|
||||
}
|
||||
// let params = {
|
||||
// infoId: this.infoId
|
||||
// }
|
||||
this.loading = true
|
||||
getAction(`split/sarFileSplitMenu/getSplitMenusByInfoId`, params).then(res => {
|
||||
getAction(`extRepo/extRepoFolder/list`, {}).then(res => {
|
||||
if (res.success) {
|
||||
this.data = this.toTree(res.result)
|
||||
// this.data = this.toTree(res.result)
|
||||
this.data = res.result
|
||||
this.gData = [...this.data]
|
||||
Object.assign(this, {
|
||||
expandedKeys: this.expandedKeys,
|
||||
@@ -485,51 +469,54 @@ export default {
|
||||
})
|
||||
},
|
||||
//将数据拼成树形结构
|
||||
toTree(config) {
|
||||
// 删除 所有 children,以防止多次调用
|
||||
config.forEach(function(item) {
|
||||
delete item.children
|
||||
})
|
||||
// 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
||||
let map = {}
|
||||
config.forEach((item) => {
|
||||
item.label = item.name
|
||||
item.key = item.id
|
||||
item.title = item.name + (item.itemName ? ' ' + item.itemName : '')
|
||||
map[item.id] = item
|
||||
})
|
||||
let val = []
|
||||
config.forEach((item) => {
|
||||
// 以当前遍历项,的pid,去map对象中找到索引的id
|
||||
let parent = map[item.pid]
|
||||
// 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
||||
if (parent) {
|
||||
(parent.children || (parent.children = [])).push(item)
|
||||
} else {
|
||||
//如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
||||
val.push(item)
|
||||
}
|
||||
})
|
||||
return val
|
||||
},
|
||||
// toTree(config) {
|
||||
// // 删除 所有 children,以防止多次调用
|
||||
// config.forEach(function(item) {
|
||||
// delete item.children
|
||||
// })
|
||||
// // 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
||||
// let map = {}
|
||||
// config.forEach((item) => {
|
||||
// item.label = item.title
|
||||
// item.key = item.key
|
||||
// item.title = item.title
|
||||
// map[item.key] = item
|
||||
// })
|
||||
// let val = []
|
||||
// config.forEach((item) => {
|
||||
// // 以当前遍历项,的pid,去map对象中找到索引的id
|
||||
// let parent = map[item.orderId]
|
||||
// // 如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
||||
// if (parent) {
|
||||
// (parent.children || (parent.children = [])).push(item)
|
||||
// } else {
|
||||
// //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
||||
// val.push(item)
|
||||
// }
|
||||
// })
|
||||
// return val
|
||||
// },
|
||||
//鼠标右键
|
||||
rightClick({ event, node }) {
|
||||
|
||||
this.deleteNode = node._props.dataRef.pid ? false : true
|
||||
this.deleteNode = node._props.dataRef.level == 4 ? false : true
|
||||
// console.log('eee',event,node)
|
||||
// this.NodeTreeItemVisible=true
|
||||
const x =
|
||||
event.currentTarget.offsetLeft + event.currentTarget.clientWidth
|
||||
const y = event.currentTarget.offsetTop
|
||||
console.log(node._props.dataRef)
|
||||
this.NodeTreeItem = {
|
||||
pageX: x,
|
||||
pageY: y,
|
||||
id: node._props.dataRef.id,
|
||||
name: node._props.dataRef.name,
|
||||
itemName: node._props.dataRef.itemName,
|
||||
displaySeq: node._props.dataRef.displaySeq,
|
||||
authManage: node._props.dataRef.authManage,
|
||||
authViewIds: node._props.dataRef.authViewIds,
|
||||
key: node._props.dataRef.key,
|
||||
authManageIds: node._props.dataRef.authManageIds,
|
||||
authView: node._props.dataRef.authView,
|
||||
title: node._props.dataRef.title,
|
||||
pid: node._props.dataRef.pid || null
|
||||
folderName: node._props.dataRef.folderName,
|
||||
orderId: node._props.dataRef.orderId,
|
||||
}
|
||||
this.nodeItem = JSON.parse(JSON.stringify(this.NodeTreeItem))
|
||||
// this.form.pid=this.NodeTreeItem.id
|
||||
@@ -556,12 +543,10 @@ export default {
|
||||
this.uploadMenuId = selectedKeys[0]
|
||||
this.selectedKeys = selectedKeys
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
supFolder: this.menuId
|
||||
|
||||
}
|
||||
this.parameter.info_id = this.infoId
|
||||
this.parameter.menu_id = this.menuId
|
||||
this.parameter.supFolder = this.menuId
|
||||
// eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.searchQuery(JSON.parse(JSON.stringify(queryParam)))
|
||||
// eventBUs.$emit('searchReset')
|
||||
@@ -573,6 +558,8 @@ export default {
|
||||
this.menuTitle = this.$t('Addingfolder')
|
||||
this.isEdit = false
|
||||
this.form = {}
|
||||
let supFolder = ''
|
||||
this.supFolder = this.nodeItem.key
|
||||
this.menuRightVisible = true
|
||||
|
||||
},
|
||||
@@ -580,17 +567,22 @@ export default {
|
||||
this.menuTitle = this.$t('Addingsubfolders')
|
||||
this.isEdit = false
|
||||
this.form = {}
|
||||
let supFolder = ''
|
||||
this.supFolder = this.nodeItem.key
|
||||
this.menuRightVisible = true
|
||||
},
|
||||
//树形修改
|
||||
orgEdit() {
|
||||
this.menuTitle = this.$t('edit')
|
||||
this.menuTitle = this.$t('Editfolder')
|
||||
this.isEdit = true
|
||||
this.form.id = this.nodeItem.id
|
||||
this.form.pid = this.nodeItem.pid
|
||||
this.form.name = this.nodeItem.name
|
||||
this.form.itemName = this.nodeItem.itemName
|
||||
this.form.displaySeq = this.nodeItem.displaySeq
|
||||
let supFolder = ''
|
||||
this.form.id = this.nodeItem.key
|
||||
this.form.authManageIds = this.nodeItem.authManageIds
|
||||
this.form.authViewIds = this.nodeItem.authViewIds
|
||||
this.form.authManage = this.nodeItem.authManage
|
||||
this.form.authView = this.nodeItem.authView
|
||||
this.form.folderName = this.nodeItem.folderName
|
||||
this.form.orderId = this.nodeItem.orderId
|
||||
this.menuRightVisible = true
|
||||
},
|
||||
//树形删除
|
||||
@@ -599,13 +591,12 @@ export default {
|
||||
content: this.$t('deleteNodes'),
|
||||
onOk:
|
||||
async () => {
|
||||
getAction(`split/sarFileSplitMenu/deleteMenu`, { id: this.nodeItem.id }).then(res => {
|
||||
deleteAction(`extRepo/extRepoFolder/delete`, { id: this.nodeItem.key }).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
supFolder: this.menuId
|
||||
|
||||
}
|
||||
// eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
@@ -632,60 +623,54 @@ export default {
|
||||
},
|
||||
//增加文件夹确定
|
||||
hideModalMenuRight() {
|
||||
|
||||
let expandId = []
|
||||
expandId.push(this.form.pid)
|
||||
if (!this.isEdit) {
|
||||
let params = {
|
||||
infoId: this.infoId,
|
||||
pid: this.nodeItem.id,
|
||||
...this.form
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
// console.log('parms',this.params)
|
||||
if (!this.flag) {
|
||||
this.flag = true
|
||||
postAction(`split/sarFileSplitMenu/addMenu`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.menuRightVisible = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
// this.onExpand(expandId)
|
||||
this.form = {}
|
||||
this.expandedKeys.push(this.nodeItem.id)
|
||||
// console.log('expandedKeys1111',this.expandedKeys)
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
// eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.searchQuery(JSON.parse(JSON.stringify(queryParam)))
|
||||
// eventBUs.$emit('searchReset')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.flag = false
|
||||
this.menuRightVisible = false
|
||||
})
|
||||
}
|
||||
let params = {
|
||||
supFolder: this.supFolder,
|
||||
...this.form
|
||||
}
|
||||
})
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
// console.log('parms',this.params)
|
||||
if (!this.flag) {
|
||||
this.flag = true
|
||||
postAction(`extRepo/extRepoFolder/add`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.menuRightVisible = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
// this.onExpand(expandId)
|
||||
this.form = {}
|
||||
this.expandedKeys.push(this.nodeItem.id)
|
||||
// console.log('expandedKeys1111',this.expandedKeys)
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
supFolder: this.menuId
|
||||
|
||||
}
|
||||
// eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.searchQuery(JSON.parse(JSON.stringify(queryParam)))
|
||||
// eventBUs.$emit('searchReset')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.flag = false
|
||||
this.menuRightVisible = false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
let params = {
|
||||
info_id: this.infoId,
|
||||
...this.form
|
||||
}
|
||||
if (!this.flag) {
|
||||
this.flag = true
|
||||
// console.log('parms',params)
|
||||
putAction(`split/sarFileSplitMenu/updateMenu`, params).then(res => {
|
||||
putAction(`extRepo/extRepoFolder/edit`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.onExpand(expandId)
|
||||
this.form = {}
|
||||
this.loadMenuData()
|
||||
} else {
|
||||
@@ -704,20 +689,23 @@ export default {
|
||||
},
|
||||
addModelList() {
|
||||
this.pageNo = 1
|
||||
this.loadData()
|
||||
let queryParam = {
|
||||
supFolder: this.menuId
|
||||
|
||||
}
|
||||
this.loadData(JSON.parse(JSON.stringify(queryParam)))
|
||||
},
|
||||
//获取列表数据
|
||||
loadData(item) {
|
||||
let params = {
|
||||
...this.queryParams,
|
||||
...item,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.loading = true
|
||||
postAction(this.url.list, params).then(res => {
|
||||
getAction(this.url.list, params).then(res => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.dataSource = res.result.pageList.records || []
|
||||
this.total = res.result.pageList.total
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
@@ -764,8 +752,7 @@ export default {
|
||||
// console.log('data111',data)
|
||||
if (status === 'success') {
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
supFolder: this.menuId
|
||||
|
||||
}
|
||||
this.loadMenuData()
|
||||
@@ -836,16 +823,21 @@ export default {
|
||||
},
|
||||
//删除
|
||||
batchDel(val) {
|
||||
console.log(this.menuId)
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
|
||||
let queryParam = {
|
||||
supFolder: _this.menuId
|
||||
}
|
||||
deleteAction('com.jero.modules.extRepo/extRepoData/delete', { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
|
||||
_this.loadData(JSON.parse(JSON.stringify(queryParam)))
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -859,11 +851,16 @@ export default {
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
getAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
||||
let queryParam = {
|
||||
supFolder: _this.menuId
|
||||
|
||||
}
|
||||
deleteAction('com.jero.modules.extRepo/extRepoData/deleteBatch', { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
|
||||
_this.loadData(JSON.parse(JSON.stringify(queryParam)))
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
@@ -878,72 +875,6 @@ export default {
|
||||
sumber() {
|
||||
this.loadMenuData()
|
||||
},
|
||||
//删除
|
||||
deleteClick(val) {
|
||||
let params = {
|
||||
ids: val.id
|
||||
}
|
||||
this.$confirm({
|
||||
title: this.$t('areYouSure'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
axios({
|
||||
url: '/jero-boot/split/sarFileSplitItems/batchDeleteItems',
|
||||
method: 'post',
|
||||
data: params,
|
||||
transformRequest: [function(data) {
|
||||
// Do whatever you want to transform the data
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loadMenuData()
|
||||
let queryParam = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
|
||||
}
|
||||
// eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
|
||||
this.searchQuery(JSON.parse(JSON.stringify(queryParam)))
|
||||
// eventBUs.$emit('searchReset')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
|
||||
// postAction(`split/sarFileSplitItems/batchDeleteItems`,params).then(res=> {
|
||||
// if(res.success){
|
||||
// this.$message.success(this.$t('OperationSuccessful'))
|
||||
// // if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!=1){
|
||||
// // this.queryParams.pageNo=this.queryParams.pageNo-1
|
||||
// // }
|
||||
// // this.loadData()
|
||||
// this.loadMenuData()
|
||||
// eventBUs.$emit('searchReset')
|
||||
// }else{
|
||||
// this.$message.warning(this.$t('operationFailed'))
|
||||
// }
|
||||
// })
|
||||
},
|
||||
onCancel() {
|
||||
}
|
||||
})
|
||||
},
|
||||
//选择框
|
||||
onSelectChange(selectedRowKeys, rows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
@@ -965,7 +896,7 @@ export default {
|
||||
// 上传文件
|
||||
handleuploadFile(e) {
|
||||
if (this.menuId) {
|
||||
this.$refs.addModelRef.addModel()
|
||||
this.$refs.addModelRef.addModel(this.menuId)
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectDirectorylocation'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user