diff --git a/jero-web/src/views/documentManage/splitting/index.vue b/jero-web/src/views/documentManage/splitting/index.vue index eaba94f90..3847ba99b 100644 --- a/jero-web/src/views/documentManage/splitting/index.vue +++ b/jero-web/src/views/documentManage/splitting/index.vue @@ -77,6 +77,9 @@ import SplitText from './modules/SplitText' import ImportResult from './modules/ImportResult' import { getAction, postAction, deleteAction } from '@/api/manage' + import { ACCESS_TOKEN } from '@/store/mutation-types' + import axios from 'axios' + import Vue from 'vue' export default { name: 'splitting', @@ -92,46 +95,37 @@ loading:false, total:0, ids:[], - tableData:[ - { - dbFieldTxt_dictText:'11111', - dbFieldEnName_dictText:'aaaaa', - fieldShowType_dictText:'345435435', - dbLength_dictText:'et435344354', - orderNum_dictText:'dfgdrgd', - showAreaName:'sdfsdfsd', - } - ], + tableData:[], columns:[ { title: this.$t('standard'), align: "center", - dataIndex: 'dbFieldTxt_dictText', + dataIndex: 'serialNumber', }, { title: this.$t('title'), align: "center", - dataIndex: 'dbFieldEnName_dictText', + dataIndex: 'title', }, { title: this.$t('TextStatus'), align: "center", - dataIndex: 'fieldShowType_dictText', + dataIndex: 'fileType_dictText', }, { title: this.$t('fileName'), align: "center", - dataIndex: 'dbLength_dictText' + dataIndex: 'fileName' }, { title: this.$t('splitTime'), align: "center", - dataIndex: 'orderNum_dictText' + dataIndex: 'createTime' }, { title: this.$t('splitResult'), align: "center", - dataIndex: 'showAreaName' + dataIndex: 'splitResult_dictText' }, { title: this.$t('operation'), @@ -144,7 +138,9 @@ queryParams:{ pageNo:1, pageSize:10 - } + }, + token:Vue.ls.get(ACCESS_TOKEN), + } }, props:{ @@ -163,7 +159,7 @@ let params={ ...this.queryParams } - getAction(``,params).then(res=>{ + getAction(`split/sarFileSplitInfo/page`,params).then(res=>{ if(res.success){ this.tableData=[...res.result.records] this.loading=false @@ -193,12 +189,28 @@ content: '', onOk: async () => { - deleteAction(``, params).then(res => { - if (res.success) { + axios({ + url: '/jero-boot/split/sarFileSplitInfo/deleteBatch', + method: 'post', + data: params, + transformRequest: [function (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')) if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){ this.queryParams.pageNo=this.queryParams.pageNo-1 } + this.selectedRowKeys=[] this.loadData() }else{ this.$message.warning(this.$t('operationFailed')) @@ -216,19 +228,21 @@ deleteDetail(val){ this.$confirm({ content: this.$t('confirmDeletion'), - onOk() { - deleteAction(``, { id: val.id }).then((res) => { - if (res.success) { - this.$message.success(res.message) - if(this.tableData&&this.tableData.length==1&&this.queryParams.pageNo!=1){ - this.queryParams.pageNo=this.queryParams.pageNo-1 + onOk: + async () => { + getAction(`split/sarFileSplitInfo/delete`, { id: val.id }).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) { + this.queryParams.pageNo = this.queryParams.pageNo - 1 + } + this.loadData() + } else { + this.$message.warning(this.$t('operationFailed')) } - this.loadData() - } else { - this.$message.warning(res.message) - } - }) - } + }) + } + }) }, sVisible(val){ diff --git a/jero-web/src/views/documentManage/tags/dialog/AreaManage.vue b/jero-web/src/views/documentManage/tags/dialog/AreaManage.vue index 9ba82221d..1142a0942 100644 --- a/jero-web/src/views/documentManage/tags/dialog/AreaManage.vue +++ b/jero-web/src/views/documentManage/tags/dialog/AreaManage.vue @@ -173,7 +173,8 @@ { required: true, message: this.$t('enterSortingNumber'), trigger: 'change' }, ] }, - areaTable:[] + areaTable:[], + flag:false, //表单提交标识 } }, props:{ @@ -184,6 +185,7 @@ }, methods:{ loadData(){ + this.loading=true let params={ ...this.queryParams } @@ -192,6 +194,8 @@ this.areaTable=[...res.result.records] this.total=res.result.total } + }).finally(()=>{ + this.loading=false }) }, onSelectChange(selectedRowKeys) { @@ -209,6 +213,7 @@ hideModal() { this.$refs.ruleForm.validate(valid => { if (valid) { + this.flag=true //编辑 if(this.form.id){ putAction(`tag/onlCgformArea/edit`,this.form).then((res)=>{ @@ -224,7 +229,9 @@ }else{ this.$message.warning(this.$t('operationFailed')) } - }); + }).finally(()=>{ + this.flag=false + }) }else{ //新增 postAction(`/tag/onlCgformArea/add`,this.form).then(res=>{ @@ -242,7 +249,9 @@ } } - ) + ).finally(()=>{ + this.flag=false + }) } this.newVisible = false; } else { @@ -263,7 +272,7 @@ content: '', onOk: async () => { - deleteAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => { + getAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => { if (res.success) { this.$message.success(this.$t('OperationSuccessful')); if(this.areaTable.length==1&&this.queryParams.pageNo!=1){ diff --git a/jero-web/src/views/documentManage/tags/dialog/DicList.vue b/jero-web/src/views/documentManage/tags/dialog/DicList.vue index e54993457..3f2c79353 100644 --- a/jero-web/src/views/documentManage/tags/dialog/DicList.vue +++ b/jero-web/src/views/documentManage/tags/dialog/DicList.vue @@ -54,18 +54,6 @@ {{item.name}} - - - - - - - - - - - - @@ -139,7 +127,8 @@ selectedIds:[], //树形选中的id parentData:[], editPId:'', - tabletreeDataSource:[] + tabletreeDataSource:[], + flag:false, //提交表单标识 } }, watch: { @@ -151,6 +140,7 @@ }, }, mounted() { + this.loadData() }, computed:{ @@ -190,11 +180,12 @@ postAction(`sys/category/queryPageList`,{ ...this.queryParams, // name:this.queryParams.itemText, - id:this.record.id, + sysDictId:this.record.id, isTagDict:1 }).then(res=>{ let parentNode=[] this.tabletreeDataSource=[...res.result] + this.total=res.result.total let data = this.toTree(this.tabletreeDataSource) this.tabletreeData=data this.parentData=this.getParents @@ -261,66 +252,78 @@ hideModal(){ this.$refs.ruleForm.validate(valid => { if (valid) { - if(this.dictVal=='list') { - let params = { - ...this.form, - dictId: this.record.id - } - if (this.isEdit) { - putAction(`sys/dictItem/edit`, params).then(res => { - if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.reFresh() - this.form = {} - this.loadData() - this.newVisible = false - } else { - this.$message.warning(this.$t('operationFailed')) + if(!this.flag) { + this.flag = true + + if (this.dictVal == 'list') { + let params = { + ...this.form, + dictId: this.record.id } - }) - } else { - postAction(`sys/dictItem/add`, params).then(res => { - if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.reFresh() - this.form = {} - this.loadData() - this.newVisible = false + if (this.isEdit) { + putAction(`sys/dictItem/edit`, params).then(res => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.reFresh() + this.form = {} + this.loadData() + this.newVisible = false + } else { + this.$message.warning(this.$t('operationFailed')) + } + }).finally(()=>{ + this.flag=false + }) } else { - this.$message.warning(this.$t('operationFailed')) + postAction(`sys/dictItem/add`, params).then(res => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.reFresh() + this.form = {} + this.loadData() + this.newVisible = false + } else { + this.$message.warning(this.$t('operationFailed')) + } + }).finally(()=>{ + this.flag=false + }) } - }) - } - } else if (this.dictVal == 'tree') { - let params = { - ...this.form, - sysDictId: this.record.id - } - if (this.isEdit) { - putAction(`sys/category/edit`, params).then(res => { - if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.form = {} - this.loadData() - this.newVisible = false + } else if (this.dictVal == 'tree') { + let params = { + ...this.form, + sysDictId: this.record.id + } + if (this.isEdit) { + putAction(`sys/category/edit`, params).then(res => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.form = {} + this.loadData() + this.newVisible = false + } else { + this.$message.warning(this.$t('operationFailed')) + } + }).finally(()=>{ + this.flag=false + }) } else { - this.$message.warning(this.$t('operationFailed')) + //新增 + postAction(`sys/category/add`, params).then(res => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.form = {} + this.loadData() + this.newVisible = false + } else { + this.$message.warning(this.$t('operationFailed')) + } + }).finally(()=>{ + this.flag=false + }) } - }) - } else { - //新增 - postAction(`sys/category/add`, params).then(res => { - if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.form = {} - this.loadData() - this.newVisible = false - } else { - this.$message.warning(this.$t('operationFailed')) - } - }) + } } - } } }) }, diff --git a/jero-web/src/views/documentManage/tags/dialog/TagForm.vue b/jero-web/src/views/documentManage/tags/dialog/TagForm.vue index b90c56136..a6e3dccac 100644 --- a/jero-web/src/views/documentManage/tags/dialog/TagForm.vue +++ b/jero-web/src/views/documentManage/tags/dialog/TagForm.vue @@ -1,5 +1,5 @@