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