修改禅道已知bug
This commit is contained in:
@@ -106,7 +106,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
eventBUs.$on('searchQuery', search => {
|
eventBUs.$on('searchQueryOne', search => {
|
||||||
Object.keys(search).forEach(res => {
|
Object.keys(search).forEach(res => {
|
||||||
if (search[res] instanceof Array) {
|
if (search[res] instanceof Array) {
|
||||||
search[res] = search[res].join(',')
|
search[res] = search[res].join(',')
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
this.getData()
|
this.getData()
|
||||||
this.getTableList()
|
this.getTableList()
|
||||||
})
|
})
|
||||||
eventBUs.$on('searchReset', target => {
|
eventBUs.$on('searchResetOne', target => {
|
||||||
this.searchParmes = {}
|
this.searchParmes = {}
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
this.getData()
|
this.getData()
|
||||||
@@ -126,8 +126,8 @@
|
|||||||
this.getTableList()
|
this.getTableList()
|
||||||
},
|
},
|
||||||
beforeDestroy(){
|
beforeDestroy(){
|
||||||
eventBUs.$off('searchQuery')
|
eventBUs.$off('searchQueryOne')
|
||||||
eventBUs.$off('searchReset')
|
eventBUs.$off('searchResetOne')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
|||||||
@@ -179,11 +179,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchQuery() {
|
searchQuery() {
|
||||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
|
eventBUs.$emit('searchQueryOne', JSON.parse(JSON.stringify(this.queryParam)))
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
|
eventBUs.$emit('searchQueryOne', JSON.parse(JSON.stringify(this.queryParam)))
|
||||||
},
|
},
|
||||||
getSeach() {
|
getSeach() {
|
||||||
let params = {
|
let params = {
|
||||||
|
|||||||
+3
-4
@@ -96,10 +96,10 @@
|
|||||||
{{!record.releaseStatus || record.releaseStatus == 'Draft' ? $t('release') :$t('withdraw')}}
|
{{!record.releaseStatus || record.releaseStatus == 'Draft' ? $t('release') :$t('withdraw')}}
|
||||||
</a>
|
</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="record.createBy == userInfoQuery.username && record.releaseStatus == 'Draft'"
|
v-if="record.releaseStatus == 'Draft'"
|
||||||
@click="edit(record)">{{$t('edit')}}</a>
|
@click="edit(record)">{{$t('edit')}}</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="record.createBy == userInfoQuery.username && record.releaseStatus == 'Draft'"
|
v-if="record.releaseStatus == 'Draft'"
|
||||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -279,8 +279,7 @@
|
|||||||
let idList = []
|
let idList = []
|
||||||
let selectedRowKeysRecord = JSON.parse(JSON.stringify(_this.selectedRowKeysRecord))
|
let selectedRowKeysRecord = JSON.parse(JSON.stringify(_this.selectedRowKeysRecord))
|
||||||
for (let i = 0; i < selectedRowKeysRecord.length; i++) {
|
for (let i = 0; i < selectedRowKeysRecord.length; i++) {
|
||||||
if (selectedRowKeysRecord[i].createBy == _this.userInfo().username &&
|
if (selectedRowKeysRecord[i].releaseStatus == 'Draft') {
|
||||||
selectedRowKeysRecord[i].releaseStatus == 'Draft') {
|
|
||||||
idList.push(selectedRowKeysRecord[i].id)
|
idList.push(selectedRowKeysRecord[i].id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="splitting">
|
<div class="splitting">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<div class="splitting-search-wrapper">
|
<div class="splitting-search-wrapper">
|
||||||
<searchalonesplit :flag="'3'" :url="url" :searchalonesplit='serialnumber'/>
|
<searchalonesplit :flag="'3'" :url="url" :searchalonesplit='serialnumber'/>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div class="operator-text" @click="handleModule" v-has="'split:sarFileSplitInfo:splitFile'">
|
<div class="operator-text" @click="handleModule" v-has="'split:sarFileSplitInfo:splitFile'">
|
||||||
<a-icon type="plus" />
|
<a-icon type="plus"/>
|
||||||
{{ $t('SplitText') }}
|
{{ $t('SplitText') }}
|
||||||
</div>
|
|
||||||
<div class="operator-text" @click="handleExport" v-has="'split:sarFileSplitInfo:splitResult'">
|
|
||||||
<a-icon type="export" />
|
|
||||||
{{ $t('ImportResults') }}
|
|
||||||
</div>
|
|
||||||
<div class="operator-text" @click="handleDel" v-has="'split:sarFileSplitInfo:deleteBatch'">
|
|
||||||
<a-icon type="delete" />
|
|
||||||
{{ $t('BatchDelete') }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="splitting-table">
|
<div class="operator-text" @click="handleExport" v-has="'split:sarFileSplitInfo:splitResult'">
|
||||||
<table-data
|
<a-icon type="export"/>
|
||||||
:url="url"
|
{{ $t('ImportResults') }}
|
||||||
:flag="'3'"
|
|
||||||
:OperationList="OperationList"
|
|
||||||
showAction
|
|
||||||
@onSelectChange="onSelectChange"
|
|
||||||
@backDocument="backDocument"
|
|
||||||
@deleteDetail="deleteDetail"
|
|
||||||
@detailClick="detailClick"
|
|
||||||
></table-data>
|
|
||||||
</div>
|
</div>
|
||||||
<split-text v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split-text>
|
<div class="operator-text" @click="handleDel" v-has="'split:sarFileSplitInfo:deleteBatch'">
|
||||||
<import-result v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></import-result>
|
<a-icon type="delete"/>
|
||||||
</a-card>
|
{{ $t('BatchDelete') }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="splitting-table">
|
||||||
|
<table-data
|
||||||
|
:url="url"
|
||||||
|
:flag="'3'"
|
||||||
|
:OperationList="OperationList"
|
||||||
|
showAction
|
||||||
|
@onSelectChange="onSelectChange"
|
||||||
|
@backDocument="backDocument"
|
||||||
|
@deleteDetail="deleteDetail"
|
||||||
|
@detailClick="detailClick"
|
||||||
|
></table-data>
|
||||||
|
</div>
|
||||||
|
<split-text v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split-text>
|
||||||
|
<import-result v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></import-result>
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -55,51 +55,51 @@
|
|||||||
SplitText,
|
SplitText,
|
||||||
ImportResult
|
ImportResult
|
||||||
},
|
},
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
splitVisible:false,
|
splitVisible: false,
|
||||||
importsVisible:false,
|
importsVisible: false,
|
||||||
selectedRowKeys:[],
|
selectedRowKeys: [],
|
||||||
loading:false,
|
loading: false,
|
||||||
total:0,
|
total: 0,
|
||||||
ids:[],
|
ids: [],
|
||||||
tableData:[],
|
tableData: [],
|
||||||
columns:[
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('standard'),
|
title: this.$t('standard'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'serialNumber',
|
dataIndex: 'serialNumber'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('title'),
|
title: this.$t('title'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'title',
|
dataIndex: 'title'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('TextStatus'),
|
title: this.$t('TextStatus'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'fileType_dictText',
|
dataIndex: 'fileType_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('fileName'),
|
title: this.$t('fileName'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'fileName'
|
dataIndex: 'fileName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('splitTime'),
|
title: this.$t('splitTime'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'createTime'
|
dataIndex: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('splitResult'),
|
title: this.$t('splitResult'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'splitResult_dictText'
|
dataIndex: 'splitResult_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
scopedSlots: {customRender: 'action'},
|
scopedSlots: { customRender: 'action' },
|
||||||
align: "center",
|
align: 'center',
|
||||||
width: 170
|
width: 170
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -117,69 +117,67 @@
|
|||||||
ClickEvent: 'deleteDetail'
|
ClickEvent: 'deleteDetail'
|
||||||
} //删除
|
} //删除
|
||||||
],
|
],
|
||||||
url:{
|
url: {
|
||||||
tableHeader: 'split/sarFileSplitInfo/getHeader', //表格头部字段
|
tableHeader: 'split/sarFileSplitInfo/getHeader', //表格头部字段
|
||||||
seachList: 'split/sarFileSplitInfo/queryCondition', //搜索字段
|
seachList: 'split/sarFileSplitInfo/queryCondition', //搜索字段
|
||||||
tableList: 'split/sarFileSplitInfo/page', //表格数据
|
tableList: 'split/sarFileSplitInfo/page' //表格数据
|
||||||
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
|
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
|
||||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||||
},
|
},
|
||||||
queryParams:{
|
queryParams: {
|
||||||
pageNo:1,
|
pageNo: 1,
|
||||||
pageSize:10
|
pageSize: 10
|
||||||
},
|
},
|
||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token: Vue.ls.get(ACCESS_TOKEN),
|
||||||
serialnumber: '',
|
serialnumber: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props: {},
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if(this.$route.query.serial_number !== undefined) {
|
if (this.$route.query.serial_number !== undefined) {
|
||||||
this.serialnumber = this.$route.query.serial_number
|
this.serialnumber = this.$route.query.serial_number
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
//获取列表数据
|
//获取列表数据
|
||||||
loadData(){
|
loadData() {
|
||||||
this.loading=true
|
this.loading = true
|
||||||
let params={
|
let params = {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}
|
}
|
||||||
getAction(`split/sarFileSplitInfo/page`,params).then(res=>{
|
getAction(`split/sarFileSplitInfo/page`, params).then(res => {
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||||
this.queryParams.pageNo = res.result.current - 1
|
this.queryParams.pageNo = res.result.current - 1
|
||||||
this.loadData()
|
this.loadData()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.tableData=[...res.result.records]
|
this.tableData = [...res.result.records]
|
||||||
this.loading=false
|
this.loading = false
|
||||||
this.total=res.result.total
|
this.total = res.result.total
|
||||||
}else{
|
} else {
|
||||||
this.loading=false
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//拆分已入库文本
|
//拆分已入库文本
|
||||||
handleModule(){
|
handleModule() {
|
||||||
this.splitVisible=true
|
this.splitVisible = true
|
||||||
},
|
},
|
||||||
//导入拆分结果
|
//导入拆分结果
|
||||||
handleExport(){
|
handleExport() {
|
||||||
this.importsVisible=true
|
this.importsVisible = true
|
||||||
},
|
},
|
||||||
//批量删除
|
//批量删除
|
||||||
handleDel(){
|
handleDel() {
|
||||||
let params={
|
let params = {
|
||||||
ids:this.selectedRowKeys.join(',')
|
ids: this.selectedRowKeys.join(',')
|
||||||
}
|
}
|
||||||
if(this.selectedRowKeys&&this.selectedRowKeys.length>0){
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('ConfirmDelete'),
|
title: this.$t('ConfirmDelete'),
|
||||||
content: '',
|
content: '',
|
||||||
@@ -192,7 +190,7 @@
|
|||||||
url: '/jero-boot/split/sarFileSplitInfo/deleteBatch',
|
url: '/jero-boot/split/sarFileSplitInfo/deleteBatch',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params,
|
data: params,
|
||||||
transformRequest: [function (data) {
|
transformRequest: [function(data) {
|
||||||
// Do whatever you want to transform the data
|
// Do whatever you want to transform the data
|
||||||
let ret = ''
|
let ret = ''
|
||||||
for (let it in data) {
|
for (let it in data) {
|
||||||
@@ -202,31 +200,30 @@
|
|||||||
}],
|
}],
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
'X-Access-Token':this.token
|
'X-Access-Token': this.token
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
// if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
|
// if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
|
||||||
// this.queryParams.pageNo=this.queryParams.pageNo-1
|
// this.queryParams.pageNo=this.queryParams.pageNo-1
|
||||||
// }
|
// }
|
||||||
this.selectedRowKeys=[]
|
this.selectedRowKeys = []
|
||||||
eventBUs.$emit('searchGetData')
|
eventBUs.$emit('searchGetData')
|
||||||
// this.loadData()
|
// this.loadData()
|
||||||
}else{
|
} else {
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
deleteDetail(val){
|
deleteDetail(val) {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: this.$t('confirmDeletion'),
|
content: this.$t('confirmDeletion'),
|
||||||
onOk:
|
onOk:
|
||||||
@@ -247,81 +244,80 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sVisible(val){
|
sVisible(val) {
|
||||||
this.splitVisible=val
|
this.splitVisible = false
|
||||||
},
|
},
|
||||||
iVisible(val){
|
iVisible(val) {
|
||||||
this.importsVisible=val
|
this.importsVisible = val
|
||||||
},
|
},
|
||||||
//查询
|
//查询
|
||||||
searchQuery(){
|
searchQuery() {
|
||||||
|
|
||||||
},
|
},
|
||||||
//清空
|
//清空
|
||||||
searchReset(){
|
searchReset() {
|
||||||
|
|
||||||
},
|
},
|
||||||
onSelectChange(selKeys){
|
onSelectChange(selKeys) {
|
||||||
this.selectedRowKeys=selKeys
|
this.selectedRowKeys = selKeys
|
||||||
},
|
},
|
||||||
handleTableChange(){
|
handleTableChange() {
|
||||||
|
|
||||||
},
|
},
|
||||||
//点击页数
|
//点击页数
|
||||||
onChangePage(page,pageSize){
|
onChangePage(page, pageSize) {
|
||||||
this.queryParams.pageNo = page
|
this.queryParams.pageNo = page
|
||||||
this.$emit('queryParams',this.queryParams)
|
this.$emit('queryParams', this.queryParams)
|
||||||
},
|
},
|
||||||
//一页显示条数
|
//一页显示条数
|
||||||
SizeChange(page,pageSize){
|
SizeChange(page, pageSize) {
|
||||||
this.queryParams.pageSize = pageSize
|
this.queryParams.pageSize = pageSize
|
||||||
this.queryParams.pageNo = 1
|
this.queryParams.pageNo = 1
|
||||||
this.$emit('queryParams',this.queryParams)
|
this.$emit('queryParams', this.queryParams)
|
||||||
},
|
},
|
||||||
//回传至文档库
|
//回传至文档库
|
||||||
backDocument(val){
|
backDocument(val) {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: this.$t('backDocument'),
|
content: this.$t('backDocument'),
|
||||||
onOk:
|
onOk:
|
||||||
async () =>
|
async () => {
|
||||||
{
|
let params = {
|
||||||
let params={
|
id: val.id,
|
||||||
id:val.id,
|
fileName: val.fileName,
|
||||||
fileName:val.fileName,
|
connectId: val.connectId
|
||||||
connectId:val.connectId
|
}
|
||||||
|
axios({
|
||||||
|
url: '/jero-boot/split/sarFileSplitInfo/bindToDocumentLibrary',
|
||||||
|
method: 'get',
|
||||||
|
params: params,
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'multipart/form-data',
|
||||||
|
'X-Access-Token': this.token
|
||||||
}
|
}
|
||||||
axios({
|
}).then(res => {
|
||||||
url: '/jero-boot/split/sarFileSplitInfo/bindToDocumentLibrary',
|
// console.log('res,res',res)
|
||||||
method: 'get',
|
if (res.data.success) {
|
||||||
params:params,
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
headers: {
|
eventBUs.$emit('searchGetData')
|
||||||
// 'Content-Type': 'multipart/form-data',
|
} else {
|
||||||
'X-Access-Token':this.token
|
this.$message.warning(res.data.message)
|
||||||
}
|
}
|
||||||
}).then(res => {
|
})
|
||||||
// console.log('res,res',res)
|
|
||||||
if (res.data.success) {
|
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
|
||||||
eventBUs.$emit('searchGetData')
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.data.message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//查看
|
//查看
|
||||||
detailClick(val){
|
detailClick(val) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:'/docManage/splitting/splitDetail',
|
path: '/docManage/splitting/splitDetail',
|
||||||
query: {
|
query: {
|
||||||
infoId:val.id,
|
infoId: val.id,
|
||||||
infoNumber:val.serialNumber,
|
infoNumber: val.serialNumber,
|
||||||
createBy:val.createBy
|
createBy: val.createBy
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -332,20 +328,22 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.splitting{
|
.splitting {
|
||||||
.splitting-search-wrapper {
|
.splitting-search-wrapper {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
}
|
|
||||||
.splitting-table{
|
|
||||||
.action-margin{
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.splitting-table {
|
||||||
|
.action-margin {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.splitting-table{
|
.splitting-table {
|
||||||
.page{
|
.page {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
@@ -360,7 +358,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ant-col-sm-8{
|
|
||||||
|
.ant-col-sm-8 {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,12 +16,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div class="operator-text">
|
<div class="operator-text">
|
||||||
<!-- <a-icon type="copy" />-->
|
<!-- <a-icon type="copy" />-->
|
||||||
<!-- 拆分文件-->
|
<!-- 拆分文件-->
|
||||||
<split-upload ref="uploadFile" :accept="accept" :disabled="disabled" :module="'split'" @uploadSuccess="uploadSuccess"></split-upload>
|
<split-upload ref="uploadFile" :accept="accept" :disabled="disabled" :module="'split'"
|
||||||
|
@uploadSuccess="uploadSuccess"></split-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="downLoad" v-has="'split:sarFileSplitItems:template'">
|
<div class="operator-text" @click="downLoad" v-has="'split:sarFileSplitItems:template'">
|
||||||
<a-icon type="download" />
|
<a-icon type="download"/>
|
||||||
{{$t('templateDownload')}}
|
{{$t('templateDownload')}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,8 +39,12 @@
|
|||||||
|
|
||||||
<div class="imports-footer" style='display: flex;justify-content: flex-end'>
|
<div class="imports-footer" style='display: flex;justify-content: flex-end'>
|
||||||
<div class="imports-footer-wrap">
|
<div class="imports-footer-wrap">
|
||||||
<a-button class="imports-btn" style='background-color: #f5222d;border: none;margin-right: 15px' type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
|
<a-button class="imports-btn" style='background-color: #f5222d;border: none;margin-right: 15px' type="primary"
|
||||||
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmit" v-has="'split:sarFileSplitItems:importSplitResult'">{{$t('submit')}}</a-button>
|
@click="cancleImports">{{$t('cancel')}}
|
||||||
|
</a-button>
|
||||||
|
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmit"
|
||||||
|
v-has="'split:sarFileSplitItems:importSplitResult'">{{$t('submit')}}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-modal
|
<a-modal
|
||||||
@@ -50,9 +55,10 @@
|
|||||||
:footer="false"
|
:footer="false"
|
||||||
>
|
>
|
||||||
<div class="err-value" v-html="errValue"></div>
|
<div class="err-value" v-html="errValue"></div>
|
||||||
<!-- <span class="err-value">{{errValue}}</span>-->
|
<!-- <span class="err-value">{{errValue}}</span>-->
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<!-- <split-upload ref="uploadFile" :disabled="disabled" :title="upload1" :accept="accept" @uploadSuccess="uploadSuccess"></split-upload>-->
|
<JLoading :loading="loading">{{$t('Submitting')}}</JLoading>
|
||||||
|
<!-- <split-upload ref="uploadFile" :disabled="disabled" :title="upload1" :accept="accept" @uploadSuccess="uploadSuccess"></split-upload>-->
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -66,96 +72,98 @@
|
|||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import eventBUs from '../../../../common/event'
|
import eventBUs from '../../../../common/event'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'import',
|
name: 'import',
|
||||||
components:{
|
components: {
|
||||||
SplitUpload,
|
SplitUpload,
|
||||||
search,
|
search,
|
||||||
TableData
|
TableData
|
||||||
},
|
},
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
labelCol: { span:4 },
|
labelCol: { span: 4 },
|
||||||
wrapperCol: { span: 18 },
|
wrapperCol: { span: 18 },
|
||||||
visible:false,
|
loading: false,
|
||||||
contentVisible:true,
|
visible: false,
|
||||||
disabled:false,
|
contentVisible: true,
|
||||||
tableSource:[], //列表数据
|
disabled: false,
|
||||||
selectedRowKeys:[],
|
tableSource: [], //列表数据
|
||||||
queryParams:{
|
selectedRowKeys: [],
|
||||||
pageNo:1,
|
queryParams: {
|
||||||
pageSize:10
|
pageNo: 1,
|
||||||
|
pageSize: 10
|
||||||
}, //搜索条件
|
}, //搜索条件
|
||||||
total:0,
|
total: 0,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title:this.$t('standard'),
|
title: this.$t('standard'),
|
||||||
key: 'standNumber',
|
key: 'standNumber',
|
||||||
align:"center",
|
align: 'center',
|
||||||
dataIndex: 'standNumber',
|
dataIndex: 'standNumber',
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:this.$t('title'),
|
title: this.$t('title'),
|
||||||
key: 'standName',
|
key: 'standName',
|
||||||
align:"center",
|
align: 'center',
|
||||||
dataIndex: 'standName',
|
dataIndex: 'standName',
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:this.$t('fileName'),
|
title: this.$t('fileName'),
|
||||||
key: 'fileName',
|
key: 'fileName',
|
||||||
align:"center",
|
align: 'center',
|
||||||
dataIndex: 'fileName',
|
dataIndex: 'fileName',
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:this.$t('TextStatus'),
|
title: this.$t('TextStatus'),
|
||||||
key: 'fileType_dictText',
|
key: 'fileType_dictText',
|
||||||
align:"center",
|
align: 'center',
|
||||||
dataIndex: 'fileType_dictText',
|
dataIndex: 'fileType_dictText',
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
file:'',
|
file: '',
|
||||||
form:{},
|
form: {},
|
||||||
rules:{
|
rules: {
|
||||||
file:[
|
file: [
|
||||||
{ required: true, message: this.$t('pleaseUploadFile'), trigger: 'change' },
|
{ required: true, message: this.$t('pleaseUploadFile'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
spinning:false, //loading标识
|
spinning: false, //loading标识
|
||||||
type:'pdfdoc',
|
type: 'pdfdoc',
|
||||||
url:{
|
url: {
|
||||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
|
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
|
||||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
|
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
|
||||||
tableList: 'split/sarFileSplitInfo/splitResultPageInfo', //表格数据
|
tableList: 'split/sarFileSplitInfo/splitResultPageInfo' //表格数据
|
||||||
},
|
},
|
||||||
OperationList:[],
|
OperationList: [],
|
||||||
upload1:this.$t('upload1'),
|
upload1: this.$t('upload1'),
|
||||||
// accept:'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword',
|
// accept:'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword',
|
||||||
accept:'application/x-zip-compressed,application/zip',
|
accept: 'application/x-zip-compressed,application/zip',
|
||||||
rows:[],
|
rows: [],
|
||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token: Vue.ls.get(ACCESS_TOKEN),
|
||||||
flag:false, //提交表单标识
|
flag: false, //提交表单标识
|
||||||
cut:'',
|
cut: '',
|
||||||
preErrVisible:false,
|
preErrVisible: false,
|
||||||
errValue:'',
|
errValue: '',
|
||||||
titleItem: '', // 错误标题
|
titleItem: '' // 错误标题
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props: {
|
||||||
importsVisible:Boolean
|
importsVisible: Boolean
|
||||||
},
|
},
|
||||||
watch:{
|
watch: {
|
||||||
'form.file'(val){
|
'form.file'(val) {
|
||||||
// console.log('val111',val)
|
// console.log('val111',val)
|
||||||
},
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.visible=this.importsVisible
|
this.visible = this.importsVisible
|
||||||
let long = localStorage.getItem('language')
|
let long = localStorage.getItem('language')
|
||||||
this.cut = ''
|
this.cut = ''
|
||||||
if (long && long === 'zh-cn') {
|
if (long && long === 'zh-cn') {
|
||||||
@@ -167,63 +175,61 @@
|
|||||||
}
|
}
|
||||||
// console.log('visibleSplit',this.visible)
|
// console.log('visibleSplit',this.visible)
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
//获取列表数据
|
//获取列表数据
|
||||||
loadData(){
|
loadData() {
|
||||||
this.spinning=true
|
this.spinning = true
|
||||||
let params={
|
let params = {}
|
||||||
|
getAction(``, params).then(res => {
|
||||||
|
|
||||||
}
|
}).finally(() => {
|
||||||
getAction(``,params).then(res=>{
|
this.spinning = false
|
||||||
|
|
||||||
}).finally(()=>{
|
|
||||||
this.spinning=false
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
afterVisibleChange(val) {
|
afterVisibleChange(val) {
|
||||||
// console.log('visible', val);
|
// console.log('visible', val);
|
||||||
},
|
},
|
||||||
onClose() {
|
onClose() {
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
this.$emit('visible',false)
|
this.$emit('visible', false)
|
||||||
},
|
},
|
||||||
onSelectChange(keys,rows){
|
onSelectChange(keys, rows) {
|
||||||
// console.log('keys',keys,rows)
|
// console.log('keys',keys,rows)
|
||||||
this.selectedRowKeys=keys
|
this.selectedRowKeys = keys
|
||||||
this.rows=rows
|
this.rows = rows
|
||||||
},
|
},
|
||||||
|
|
||||||
//搜索
|
//搜索
|
||||||
searchQuery(){
|
searchQuery() {
|
||||||
|
|
||||||
},
|
},
|
||||||
//清空
|
//清空
|
||||||
searchReset(){
|
searchReset() {
|
||||||
|
|
||||||
},
|
},
|
||||||
//点击页数
|
//点击页数
|
||||||
onChangePage(page,pageSize){
|
onChangePage(page, pageSize) {
|
||||||
this.queryParams.pageNo = page
|
this.queryParams.pageNo = page
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
//一页显示条数
|
//一页显示条数
|
||||||
SizeChange(page,pageSize){
|
SizeChange(page, pageSize) {
|
||||||
this.queryParams.pageSize = pageSize
|
this.queryParams.pageSize = pageSize
|
||||||
this.queryParams.pageNo = 1
|
this.queryParams.pageNo = 1
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
cancleImports(){
|
cancleImports() {
|
||||||
this.$emit('visible',false)
|
this.$emit('visible', false)
|
||||||
},
|
},
|
||||||
fileUpload(){
|
fileUpload() {
|
||||||
this.$refs.uploadFile.visible=true
|
this.$refs.uploadFile.visible = true
|
||||||
},
|
},
|
||||||
//上传文件
|
//上传文件
|
||||||
uploadSuccess(data) {
|
uploadSuccess(data) {
|
||||||
// console.log('updata',data)
|
// console.log('updata',data)
|
||||||
|
|
||||||
let attIdList = []
|
let attIdList = []
|
||||||
if(data && data.length>0) {
|
if (data && data.length > 0) {
|
||||||
data.map(item => {
|
data.map(item => {
|
||||||
attIdList.push(item.id || data.name)
|
attIdList.push(item.id || data.name)
|
||||||
})
|
})
|
||||||
@@ -234,72 +240,76 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
//模板下载
|
//模板下载
|
||||||
downLoad(){
|
downLoad() {
|
||||||
let name = this.$t('documentSplitTemplate')+'.xlsx'
|
let name = this.$t('documentSplitTemplate') + '.xlsx'
|
||||||
downloadFile('split/sarFileSplitItems/exportTemplate',name, {})
|
downloadFile('split/sarFileSplitItems/exportTemplate', name, {})
|
||||||
},
|
},
|
||||||
//保存
|
//保存
|
||||||
handleSubmit(){
|
handleSubmit() {
|
||||||
// console.log('seleced',this.selectedRowKeys,this.rows)
|
// console.log('seleced',this.selectedRowKeys,this.rows)
|
||||||
// console.log('this.form.file,',this.form.file)
|
// console.log('this.form.file,',this.form.file)
|
||||||
if(this.rows.length===0){
|
if (this.rows.length === 0) {
|
||||||
this.$message.warning(this.$t('PleaseSelectData'))
|
this.$message.warning(this.$t('PleaseSelectData'))
|
||||||
}else if(this.rows&&this.rows.length>1){
|
} else if (this.rows && this.rows.length > 1) {
|
||||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||||
}else if(!this.form.file) {
|
} else if (!this.form.file) {
|
||||||
this.$message.warning(this.$t('pleaseUploadSplitFile'))
|
this.$message.warning(this.$t('pleaseUploadSplitFile'))
|
||||||
}else if(this.rows&&this.rows.length===1){
|
} else if (this.rows && this.rows.length === 1) {
|
||||||
let params={
|
let params = {
|
||||||
connectId:this.rows[0].connect_id,
|
connectId: this.rows[0].connect_id,
|
||||||
splitFileId:this.form.file,
|
splitFileId: this.form.file,
|
||||||
fileName:this.rows[0].file_name,
|
fileName: this.rows[0].file_name,
|
||||||
serialNumber:this.rows[0].serial_number,
|
serialNumber: this.rows[0].serial_number,
|
||||||
title:this.rows[0].title,
|
title: this.rows[0].title,
|
||||||
titleEn:this.rows[0].title_en,
|
titleEn: this.rows[0].title_en
|
||||||
}
|
}
|
||||||
params.fileType=this.rows[0].text_info_id
|
params.fileType = this.rows[0].text_info_id
|
||||||
params.cut=this.cut
|
params.cut = this.cut
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
Object.keys(params).forEach((key) => {
|
Object.keys(params).forEach((key) => {
|
||||||
// console.log('key',key,params[key])
|
// console.log('key',key,params[key])
|
||||||
formData.append(key, params[key]);
|
formData.append(key, params[key])
|
||||||
});
|
})
|
||||||
// console.log('formData',params,formData.getAll)
|
// console.log('formData',params,formData.getAll)
|
||||||
if(this.form.file) {
|
if (this.form.file) {
|
||||||
// this.$refs.ruleForm.validate(valid => {
|
// this.$refs.ruleForm.validate(valid => {
|
||||||
// if (valid) {
|
// if (valid) {
|
||||||
|
|
||||||
if (!this.flag) {
|
if (!this.flag) {
|
||||||
this.flag = true
|
this.flag = true
|
||||||
axios({
|
this.loading = true
|
||||||
url: '/jero-boot/split/sarFileSplitItems/importSplitResult',
|
axios({
|
||||||
method: 'post',
|
url: '/jero-boot/split/sarFileSplitItems/importSplitResult',
|
||||||
data: formData,
|
method: 'post',
|
||||||
headers: {
|
data: formData,
|
||||||
'Content-Type': 'multipart/form-data',
|
headers: {
|
||||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'multipart/form-data',
|
||||||
'X-Access-Token': this.token
|
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
}
|
'X-Access-Token': this.token
|
||||||
}).then(res => {
|
|
||||||
if (res.data.success) {
|
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
|
||||||
eventBUs.$emit('searchGetData')
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit('visible',false)
|
|
||||||
}else{
|
|
||||||
// this.$message.warning(res.data.message)
|
|
||||||
if(res.data.code==1){
|
|
||||||
this.$message.error(res.data.message);
|
|
||||||
}else{
|
|
||||||
this.titleItem = '失败'
|
|
||||||
this.preErrVisible=true
|
|
||||||
this.errValue=res.data.message
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).finally(() => [
|
|
||||||
this.flag = false
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
eventBUs.$emit('searchGetData')
|
||||||
|
this.visible = false
|
||||||
|
this.loading = false
|
||||||
|
this.$emit('visible', false)
|
||||||
|
} else {
|
||||||
|
this.loading = false
|
||||||
|
// this.$message.warning(res.data.message)
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
this.$message.error(res.data.message)
|
||||||
|
} else {
|
||||||
|
this.titleItem = '失败'
|
||||||
|
this.preErrVisible = true
|
||||||
|
this.errValue = res.data.message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.flag = false
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
@@ -331,42 +341,47 @@
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleErrCancel(){
|
handleErrCancel() {
|
||||||
this.preErrVisible=false
|
this.preErrVisible = false
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
.imports-table-content{
|
|
||||||
.imports-header{
|
.imports-table-content {
|
||||||
|
.imports-header {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.imports-table-detail{
|
.imports-table-detail {
|
||||||
.page{
|
.page {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.imports-files{
|
|
||||||
|
.imports-files {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin:20px 0;
|
margin: 20px 0;
|
||||||
.file-down{
|
|
||||||
|
.file-down {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 320px;
|
left: 320px;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.imports-footer{
|
|
||||||
.imports-footer-wrap{
|
.imports-footer {
|
||||||
margin:20px 0;
|
.imports-footer-wrap {
|
||||||
|
margin: 20px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.imports-sub{
|
|
||||||
|
.imports-sub {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -375,21 +390,23 @@
|
|||||||
<style lang="less">
|
<style lang="less">
|
||||||
.imports-table-content {
|
.imports-table-content {
|
||||||
.imports-header {
|
.imports-header {
|
||||||
.ant-col-sm-24{
|
.ant-col-sm-24 {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.imports-table-drawer{
|
|
||||||
.table-operator{
|
.imports-table-drawer {
|
||||||
display: flex;
|
.table-operator {
|
||||||
justify-content: end;
|
display: flex;
|
||||||
text-align: right;
|
justify-content: end;
|
||||||
margin-bottom: 20px;
|
text-align: right;
|
||||||
span{
|
margin-bottom: 20px;
|
||||||
color:#040B29;
|
|
||||||
|
span {
|
||||||
|
color: #040B29;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -1,76 +1,81 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="split">
|
<div class="split">
|
||||||
<a-drawer
|
<a-drawer
|
||||||
class="split-table-drawer"
|
class="split-table-drawer"
|
||||||
:title="$t('SplitText')"
|
:title="$t('SplitText')"
|
||||||
placement="right"
|
placement="right"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:after-visible-change="afterVisibleChange"
|
@close="onClose"
|
||||||
@close="onClose"
|
width="1100"
|
||||||
width="1100"
|
>
|
||||||
>
|
<div class="split-table-content">
|
||||||
<div class="split-table-content">
|
<div class="split-header">
|
||||||
<div class="split-header">
|
<searchAlone :url="url" :flag="'condition'"></searchAlone>
|
||||||
<searchAlone :url="url" :flag="'condition'"></searchAlone>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator operator-select">
|
</div>
|
||||||
<div class="operator-text">
|
<div class="table-operator operator-select">
|
||||||
<!-- <a-icon type="download" />-->
|
<div class="operator-text">
|
||||||
<!-- 模板下载-->
|
<!-- <a-icon type="download" />-->
|
||||||
|
<!-- 模板下载-->
|
||||||
|
|
||||||
<div class="operator-select-type">
|
<div class="operator-select-type">
|
||||||
<span class="operator-file-type"><i class="operator-i">*</i>{{$t('fileType')}}</span>
|
<span class="operator-file-type"><i class="operator-i">*</i>{{$t('fileType')}}</span>
|
||||||
<a-select v-model="fileGroup" style='min-width: 295px' :placeholder="$t('selectFileType')" class="file-type-select">
|
<a-select v-model="fileGroup" style='min-width: 295px' :placeholder="$t('selectFileType')"
|
||||||
<a-select-option value="GSO" key="GSO" :title="$t('GSO')">
|
class="file-type-select">
|
||||||
{{$t('GSO')}}
|
<a-select-option value="GSO" key="GSO" :title="$t('GSO')">
|
||||||
</a-select-option>
|
{{$t('GSO')}}
|
||||||
<a-select-option value="KMVSS_Table" key="KMVSS_Table" :title="$t('KMVSS_Table')">
|
</a-select-option>
|
||||||
{{$t('KMVSS_Table')}}
|
<a-select-option value="KMVSS_Table" key="KMVSS_Table" :title="$t('KMVSS_Table')">
|
||||||
</a-select-option>
|
{{$t('KMVSS_Table')}}
|
||||||
<a-select-option value="KMVSS_Article" key="KMVSS_Article" :title="$t('KMVSS_Article')">
|
</a-select-option>
|
||||||
{{$t('KMVSS_Article')}}
|
<a-select-option value="KMVSS_Article" key="KMVSS_Article" :title="$t('KMVSS_Article')">
|
||||||
</a-select-option>
|
{{$t('KMVSS_Article')}}
|
||||||
<a-select-option value="CFR" key="CFR" :title="$t('CFR')">
|
</a-select-option>
|
||||||
{{$t('CFR')}}
|
<a-select-option value="CFR" key="CFR" :title="$t('CFR')">
|
||||||
</a-select-option>
|
{{$t('CFR')}}
|
||||||
<a-select-option value="UNECE" key="UNECE" :title="$t('UNECE')">
|
</a-select-option>
|
||||||
{{$t('UNECE')}}
|
<a-select-option value="UNECE" key="UNECE" :title="$t('UNECE')">
|
||||||
</a-select-option>
|
{{$t('UNECE')}}
|
||||||
<a-select-option value="JPN_Attachment" key="JPN_Attachment" :title="$t('JPN_Attachment')">
|
</a-select-option>
|
||||||
{{$t('JPN_Attachment')}}
|
<a-select-option value="JPN_Attachment" key="JPN_Attachment" :title="$t('JPN_Attachment')">
|
||||||
</a-select-option>
|
{{$t('JPN_Attachment')}}
|
||||||
<a-select-option value="JPN_Article" key="JPN_Article" :title="$t('JPN_Article')">
|
</a-select-option>
|
||||||
{{$t('JPN_Article')}}
|
<a-select-option value="JPN_Article" key="JPN_Article" :title="$t('JPN_Article')">
|
||||||
</a-select-option>
|
{{$t('JPN_Article')}}
|
||||||
<a-select-option value="GB" key="GB" :title="$t('GB')">
|
</a-select-option>
|
||||||
{{$t('GB')}}
|
<a-select-option value="GB" key="GB" :title="$t('GB')">
|
||||||
</a-select-option>
|
{{$t('GB')}}
|
||||||
<a-select-option value="GBT" key="GBT" :title="$t('GBT')">
|
</a-select-option>
|
||||||
{{$t('GBT')}}
|
<a-select-option value="GBT" key="GBT" :title="$t('GBT')">
|
||||||
</a-select-option>
|
{{$t('GBT')}}
|
||||||
</a-select>
|
</a-select-option>
|
||||||
</div>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="split-table-detail">
|
</div>
|
||||||
<tableData
|
<div class="split-table-detail">
|
||||||
:flag="'header'"
|
<tableData
|
||||||
:url="url"
|
:flag="'header'"
|
||||||
:type="type"
|
:url="url"
|
||||||
:showAction="false"
|
:type="type"
|
||||||
:OperationList="OperationList"
|
:showAction="false"
|
||||||
@onSelectChange="onSelectChange"
|
:OperationList="OperationList"
|
||||||
/>
|
@onSelectChange="onSelectChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="split-footer" style='display: flex;justify-content: flex-end'>
|
||||||
|
<div class="split-footer-wrap">
|
||||||
|
<a-button class="split-btn" type="primary" @click="cancelSplit"
|
||||||
|
style='background-color: #f5222d;border: none;margin-right: 15px'>{{$t('cancel')}}
|
||||||
|
</a-button>
|
||||||
|
<a-button class="split-btn split-chai" type="primary" @click="submitSplit"
|
||||||
|
v-has="'split:sarFileSplitInfo:add'">{{$t('submit')}}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="split-footer" style='display: flex;justify-content: flex-end'>
|
</div>
|
||||||
<div class="split-footer-wrap">
|
<JLoading :loading="loading">{{$t('Submitting')}}</JLoading>
|
||||||
<a-button class="split-btn" type="primary" @click="cancelSplit" style='background-color: #f5222d;border: none;margin-right: 15px'>{{$t('cancel')}}</a-button>
|
</a-drawer>
|
||||||
<a-button class="split-btn split-chai" type="primary" @click="submitSplit" v-has="'split:sarFileSplitInfo:add'">{{$t('submit')}}</a-button>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-drawer>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -85,203 +90,210 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'split',
|
name: 'split',
|
||||||
components:{
|
components: {
|
||||||
SearchAlone,
|
SearchAlone,
|
||||||
TableData,
|
TableData
|
||||||
},
|
},
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
visible:false,
|
visible: false,
|
||||||
fileGroup:'',
|
loading: false,
|
||||||
tableSource:[], //列表数据
|
fileGroup: '',
|
||||||
selectedRowKeys:[],
|
tableSource: [], //列表数据
|
||||||
queryParams:{
|
selectedRowKeys: [],
|
||||||
pageNo:1,
|
queryParams: {
|
||||||
pageSize:10
|
pageNo: 1,
|
||||||
|
pageSize: 10
|
||||||
}, //搜索条件
|
}, //搜索条件
|
||||||
total:0,
|
total: 0,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title:this.$t('standard'),
|
title: this.$t('standard'),
|
||||||
key: 'standNumber',
|
key: 'standNumber',
|
||||||
align:"center",
|
align: 'center',
|
||||||
dataIndex: 'standNumber',
|
dataIndex: 'standNumber',
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:this.$t('title'),
|
title: this.$t('title'),
|
||||||
key: 'standName',
|
key: 'standName',
|
||||||
align:"center",
|
align: 'center',
|
||||||
dataIndex: 'standName',
|
dataIndex: 'standName',
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:this.$t('fileName'),
|
title: this.$t('fileName'),
|
||||||
key: 'fileName',
|
key: 'fileName',
|
||||||
align:"center",
|
align: 'center',
|
||||||
dataIndex: 'fileName',
|
dataIndex: 'fileName',
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:this.$t('TextStatus'),
|
title: this.$t('TextStatus'),
|
||||||
key: 'fileType_dictText',
|
key: 'fileType_dictText',
|
||||||
align:"center",
|
align: 'center',
|
||||||
dataIndex: 'fileType_dictText',
|
dataIndex: 'fileType_dictText',
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
spinning:false, //loading标识
|
spinning: false, //loading标识
|
||||||
url:{
|
url: {
|
||||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
|
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
|
||||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
|
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
|
||||||
tableList: 'split/sarFileSplitInfo/splitFilePageInfo', //表格数据
|
tableList: 'split/sarFileSplitInfo/splitFilePageInfo' //表格数据
|
||||||
},
|
},
|
||||||
type:'pdfdoc',
|
type: 'pdfdoc',
|
||||||
OperationList:[],
|
OperationList: [],
|
||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token: Vue.ls.get(ACCESS_TOKEN),
|
||||||
cut:'',
|
cut: '',
|
||||||
submitFlag:false
|
submitFlag: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props: {
|
||||||
splitVisible:{
|
splitVisible: {
|
||||||
type:Boolean,
|
type: Boolean,
|
||||||
default:false
|
default: false
|
||||||
},
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.visible=this.splitVisible
|
this.visible = this.splitVisible
|
||||||
|
|
||||||
// console.log('visibleSplit',this.visible)
|
// console.log('visibleSplit',this.visible)
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
//获取列表数据
|
//获取列表数据
|
||||||
loadData(){
|
loadData() {
|
||||||
this.spinning=true
|
this.spinning = true
|
||||||
let params={
|
let params = {}
|
||||||
|
getAction(``, params).then(res => {
|
||||||
|
|
||||||
}
|
}).finally(() => {
|
||||||
getAction(``,params).then(res=>{
|
this.spinning = false
|
||||||
|
|
||||||
}).finally(()=>{
|
|
||||||
this.spinning=false
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
afterVisibleChange(val) {
|
afterVisibleChange(val) {
|
||||||
console.log('visible', val);
|
console.log('visible', val)
|
||||||
},
|
},
|
||||||
onClose() {
|
onClose() {
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
this.$emit('visible',false)
|
this.$emit('visible', false)
|
||||||
},
|
},
|
||||||
onSelectChange(keys,rows){
|
onSelectChange(keys, rows) {
|
||||||
this.selectedRowKeys=keys
|
this.selectedRowKeys = keys
|
||||||
if(keys.length>1){
|
if (keys.length > 1) {
|
||||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||||
}else{
|
} else {
|
||||||
this.rowId=keys[0]
|
this.rowId = keys[0]
|
||||||
}
|
}
|
||||||
this.rows=[...rows]
|
this.rows = [...rows]
|
||||||
},
|
},
|
||||||
|
|
||||||
//搜索
|
//搜索
|
||||||
searchQuery(){
|
searchQuery() {
|
||||||
|
|
||||||
},
|
},
|
||||||
//清空
|
//清空
|
||||||
searchReset(){
|
searchReset() {
|
||||||
|
|
||||||
},
|
},
|
||||||
//点击页数
|
//点击页数
|
||||||
onChangePage(page,pageSize){
|
onChangePage(page, pageSize) {
|
||||||
this.queryParams.pageNo = page
|
this.queryParams.pageNo = page
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
//一页显示条数
|
//一页显示条数
|
||||||
SizeChange(page,pageSize){
|
SizeChange(page, pageSize) {
|
||||||
this.queryParams.pageSize = pageSize
|
this.queryParams.pageSize = pageSize
|
||||||
this.queryParams.pageNo = 1
|
this.queryParams.pageNo = 1
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
cancelSplit(){
|
cancelSplit() {
|
||||||
this.$emit('visible',false)
|
this.visible = false
|
||||||
|
this.$emit('visible', false)
|
||||||
},
|
},
|
||||||
//拆分
|
//拆分
|
||||||
submitSplit(){
|
submitSplit() {
|
||||||
if(this.fileGroup.length == 0||this.fileGroup==undefined){
|
if (this.fileGroup.length == 0 || this.fileGroup == undefined) {
|
||||||
this.$message.warning(this.$t('selectFileType'))
|
this.$message.warning(this.$t('selectFileType'))
|
||||||
}else if(this.rows&&this.rows.length>1){
|
} else if (this.rows && this.rows.length > 1) {
|
||||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||||
}else if(this.rows==undefined||this.rows.length===0){
|
} else if (this.rows == undefined || this.rows.length === 0) {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}else if(this.rows&&this.rows.length==1) {
|
} else if (this.rows && this.rows.length == 1) {
|
||||||
let file = this.rows[0]
|
let file = this.rows[0]
|
||||||
if (file.file_name) {
|
if (file.file_name) {
|
||||||
let name = file.file_name.split('.')
|
let name = file.file_name.split('.')
|
||||||
let nameSuffix = name[name.length - 1]
|
let nameSuffix = name[name.length - 1]
|
||||||
if(this.fileGroup === 'GSO') {
|
if (this.fileGroup === 'GSO') {
|
||||||
if (nameSuffix.toLowerCase() === 'doc'||nameSuffix.toLowerCase() === 'docx'||nameSuffix.toLowerCase() === 'pdf') {
|
if (nameSuffix.toLowerCase() === 'doc' || nameSuffix.toLowerCase() === 'docx' || nameSuffix.toLowerCase() === 'pdf') {
|
||||||
let params = {
|
let params = {
|
||||||
attId: file.id,
|
attId: file.id,
|
||||||
title: file.title,
|
title: file.title,
|
||||||
titleEn:file.title_en,
|
titleEn: file.title_en,
|
||||||
fileName:file.file_name,
|
fileName: file.file_name,
|
||||||
serialNumber: file.serial_number,
|
serialNumber: file.serial_number,
|
||||||
connectId: file.connect_id,
|
connectId: file.connect_id,
|
||||||
fileGroup: this.fileGroup,
|
fileGroup: this.fileGroup,
|
||||||
fileType:file.text_info_id
|
fileType: file.text_info_id
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.submitFlag){
|
if (!this.submitFlag) {
|
||||||
this.submitFlag=true
|
this.submitFlag = true
|
||||||
|
this.loading = true
|
||||||
postAction(`split/sarFileSplitInfo/add`, params).then(res => {
|
postAction(`split/sarFileSplitInfo/add`, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
eventBUs.$emit('searchGetData')
|
eventBUs.$emit('searchGetData')
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
|
this.loading = false
|
||||||
this.$emit('visible', false)
|
this.$emit('visible', false)
|
||||||
} else {
|
} else {
|
||||||
|
this.loading = false
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
}).finally(()=>{
|
}).finally(() => {
|
||||||
this.submitFlag =false
|
this.loading = false
|
||||||
|
this.submitFlag = false
|
||||||
|
|
||||||
})
|
})
|
||||||
this.$emit('exportVisible',true)
|
this.$emit('exportVisible', true)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('OnlyWord'))
|
this.$message.warning(this.$t('OnlyWord'))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (nameSuffix.toLowerCase() === 'doc'||nameSuffix.toLowerCase() === 'docx') {
|
if (nameSuffix.toLowerCase() === 'doc' || nameSuffix.toLowerCase() === 'docx') {
|
||||||
let params = {
|
let params = {
|
||||||
attId: file.id,
|
attId: file.id,
|
||||||
title: file.title,
|
title: file.title,
|
||||||
fileName:file.file_name,
|
fileName: file.file_name,
|
||||||
titleEn:file.title_en,
|
titleEn: file.title_en,
|
||||||
serialNumber: file.serial_number,
|
serialNumber: file.serial_number,
|
||||||
connectId: file.connect_id,
|
connectId: file.connect_id,
|
||||||
fileGroup: this.fileGroup,
|
fileGroup: this.fileGroup,
|
||||||
fileType:file.text_info_id
|
fileType: file.text_info_id
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.submitFlag){
|
if (!this.submitFlag) {
|
||||||
this.submitFlag=true
|
this.submitFlag = true
|
||||||
|
this.loading = true
|
||||||
postAction(`split/sarFileSplitInfo/add`, params).then(res => {
|
postAction(`split/sarFileSplitInfo/add`, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
eventBUs.$emit('searchReset')
|
eventBUs.$emit('searchGetData')
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
|
this.loading = false
|
||||||
this.$emit('visible', false)
|
this.$emit('visible', false)
|
||||||
} else {
|
} else {
|
||||||
|
this.loading = false
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
}).finally(()=>{
|
}).finally(() => {
|
||||||
this.submitFlag =false
|
this.submitFlag = false
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
this.$emit('exportVisible',true)
|
this.$emit('exportVisible', true)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('OnlyWordItem'))
|
this.$message.warning(this.$t('OnlyWordItem'))
|
||||||
@@ -291,59 +303,66 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.split-table-content{
|
.split-table-content {
|
||||||
.split-header{
|
.split-header {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
.split-item{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
.split-item {
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.split-table-detail{
|
}
|
||||||
.page{
|
}
|
||||||
|
|
||||||
|
.split-table-detail {
|
||||||
|
.page {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.split-footer{
|
|
||||||
.split-footer-wrap{
|
.split-footer {
|
||||||
margin:20px 0;
|
.split-footer-wrap {
|
||||||
|
margin: 20px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.split-chai{
|
|
||||||
|
.split-chai {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.operator-select{
|
|
||||||
|
.operator-select {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
/*margin-left: 60px;*/
|
/*margin-left: 60px;*/
|
||||||
.operator-file-type{
|
|
||||||
|
.operator-file-type {
|
||||||
/*width: 100px;*/
|
/*width: 100px;*/
|
||||||
min-width: 110px;
|
min-width: 110px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
.operator-i{
|
|
||||||
|
.operator-i {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color:#f5222d;
|
color: #f5222d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.operator-select-type{
|
|
||||||
|
.operator-select-type {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
.file-type-select{
|
|
||||||
|
.file-type-select {
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -354,15 +373,17 @@
|
|||||||
<style lang="less">
|
<style lang="less">
|
||||||
.split-table-content {
|
.split-table-content {
|
||||||
.split-header {
|
.split-header {
|
||||||
.ant-col-sm-24{
|
.ant-col-sm-24 {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.operator-select-type{
|
|
||||||
.ant-select-selection{
|
.operator-select-type {
|
||||||
|
.ant-select-selection {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
.ant-select-selection__rendered{
|
|
||||||
|
.ant-select-selection__rendered {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user