【fix bug】delete请求改为post请求

This commit is contained in:
zhaoxiao
2023-03-14 10:37:15 +08:00
parent 8a45c78a57
commit 880e6f225d
10 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -42,7 +42,7 @@ const queryDepartTreeSync = (params) => getAction('/sys/sysDepart/queryDepartTre
const queryIdTree = (params) => getAction('/sys/sysDepart/queryIdTree', params)
const queryParentName = (params) => getAction('/sys/sysDepart/queryParentName', params)
const searchByKeywords = (params) => getAction('/sys/sysDepart/searchBy', params)
const deleteByDepartId = (params) => getAction('/sys/sysDepart/delete', params)
const deleteByDepartId = (params) => postAction('/sys/sysDepart/delete', params)
// 二级部门管理
const queryDepartPermission = (params) => getAction('/sys/permission/queryDepartPermission', params)
@@ -52,8 +52,8 @@ const queryDeptRolePermission = (params) => getAction('/sys/sysDepartPermission/
const queryMyDepartTreeList = (params) => getAction('/sys/sysDepart/queryMyDeptTreeList', params)
// 日志管理
const deleteLog = (params) => getAction('/sys/log/delete', params)
const deleteLogList = (params) => getAction('/sys/log/deleteBatch', params)
const deleteLog = (params) => postAction('/sys/log/delete', params)
const deleteLogList = (params) => postAction('/sys/log/deleteBatch', params)
// 数据字典
const addDict = (params) => postAction('/sys/dict/add', params)
+3 -3
View File
@@ -4,7 +4,7 @@
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
*/
import { filterObj } from '@/utils/util'
import { downFile, getAction, getFileAccessHttpUrl } from '@/api/manage'
import { downFile, getAction, getFileAccessHttpUrl, postAction } from '@/api/manage'
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
import store from '@/store'
@@ -174,7 +174,7 @@ export const JeroListMixin = {
content: '是否删除选中数据?',
onOk: function () {
that.loading = true
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
postAction(that.url.deleteBatch, { ids: ids }).then((res) => {
if (res.success) {
// 重新计算分页问题
that.reCalculatePage(that.selectedRowKeys.length)
@@ -197,7 +197,7 @@ export const JeroListMixin = {
return
}
const that = this
getAction(that.url.delete, { id: id }).then((res) => {
postAction(that.url.delete, { id: id }).then((res) => {
if (res.success) {
// 重新计算分页问题
that.reCalculatePage(1)
@@ -101,7 +101,7 @@
import JeroOrderDMainModal from './form/JeroOrderDMainModal'
import JeroOrderCustomerList from './JeroOrderCustomerList'
import JeroOrderTicketList from './JeroOrderTicketList'
import { getAction } from '@/api/manage'
import { postAction } from '@/api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
export default {
@@ -218,7 +218,7 @@ export default {
handleDelete: function (id) {
const that = this
getAction(that.url.delete, { id: id }).then((res) => {
postAction(that.url.delete, { id: id }).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.loadData()
+2 -2
View File
@@ -146,7 +146,7 @@
<script>
import DepartModal from './modules/DepartModal'
import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api'
import { httpAction, getAction } from '@/api/manage'
import { httpAction, postAction } from '@/api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import DepartAuthModal from './modules/DepartAuthModal'
// 表头
@@ -331,7 +331,7 @@ export default {
title: '确认删除',
content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
onOk: function () {
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
postAction(that.url.deleteBatch, { ids: ids }).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.loadTree()
+2 -2
View File
@@ -140,7 +140,7 @@
<script>
import DepartModal from './modules/DepartModal'
import { deleteByDepartId, queryDepartTreeSync, searchByKeywords } from '@/api/api'
import { getAction, httpAction } from '@/api/manage'
import { httpAction, postAction } from '@/api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import DepartAuthModal from './modules/DepartAuthModal'
import { cloneObject } from '@/utils/util'
@@ -367,7 +367,7 @@ export default {
title: '确认删除',
content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
onOk: function () {
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
postAction(that.url.deleteBatch, { ids: ids }).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.loadTree()
+1 -1
View File
@@ -116,7 +116,7 @@ export default {
centered: false,
onOk: () => {
const that = this
getAction('/sys/dict/deletePhysic/' + id).then((res) => {
postAction('/sys/dict/deletePhysic/' + id).then((res) => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
+2 -2
View File
@@ -423,7 +423,7 @@ export default {
return
}
const that = this
getAction(that.url.delete2, { roleId: this.currentRoleId, userId: id }).then((res) => {
postAction(that.url.delete2, { roleId: this.currentRoleId, userId: id }).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.loadData2()
@@ -450,7 +450,7 @@ export default {
title: '确认删除',
content: '是否删除选中数据?',
onOk: function () {
getAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => {
postAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.loadData2()
@@ -55,7 +55,7 @@
<script>
import { getAction } from '@/api/manage'
import { getAction, postAction } from '@/api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import SysCategoryModal from './modules/SysCategoryModal'
@@ -267,7 +267,7 @@ export default {
},
handleDelete: function (record) {
const that = this
getAction(that.url.delete, { id: record.id }).then((res) => {
postAction(that.url.delete, { id: record.id }).then((res) => {
if (res.success) {
// update--begin--autor:lvdandan-----date:20201204------forJT-31 删除成功后默认展开已展开信息
that.loadData()
@@ -201,7 +201,7 @@ export default {
title: '确认取消',
content: '是否取消用户与选中部门的关联?',
onOk: function () {
getAction(that.url.deleteBatch, { depId: that.currentDeptId, userIds: ids }).then((res) => {
postAction(that.url.deleteBatch, { depId: that.currentDeptId, userIds: ids }).then((res) => {
if (res.success) {
that.$message.success('删除用户与选中部门关系成功!')
that.loadData()
@@ -225,7 +225,7 @@ export default {
}
const that = this
getAction(that.url.delete, { depId: this.currentDeptId, userId: id }).then((res) => {
postAction(that.url.delete, { depId: this.currentDeptId, userId: id }).then((res) => {
if (res.success) {
that.$message.success('删除用户与选中部门关系成功!')
if (this.selectedRowKeys.length > 0) {
@@ -53,7 +53,7 @@
</template>
<script>
import { getFileAccessHttpUrl, getAction, postAction } from '@/api/manage'
import { getFileAccessHttpUrl, postAction } from '@/api/manage'
// 高度封装的请求,请务必使用 superRequest.call(this,{}) 的方式调用
function superRequest (options) {
@@ -161,7 +161,7 @@ export default {
centered: true,
onOk: () => {
const that = this
getAction(that.url.deleteRecycleBin, { userIds: userIds.join(',') }).then((res) => {
postAction(that.url.deleteRecycleBin, { userIds: userIds.join(',') }).then((res) => {
if (res.success) {
this.loadData()
this.handleClearSelection()