【fix bug】delete请求改为post请求
This commit is contained in:
@@ -42,7 +42,7 @@ const queryDepartTreeSync = (params) => getAction('/sys/sysDepart/queryDepartTre
|
|||||||
const queryIdTree = (params) => getAction('/sys/sysDepart/queryIdTree', params)
|
const queryIdTree = (params) => getAction('/sys/sysDepart/queryIdTree', params)
|
||||||
const queryParentName = (params) => getAction('/sys/sysDepart/queryParentName', params)
|
const queryParentName = (params) => getAction('/sys/sysDepart/queryParentName', params)
|
||||||
const searchByKeywords = (params) => getAction('/sys/sysDepart/searchBy', 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)
|
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 queryMyDepartTreeList = (params) => getAction('/sys/sysDepart/queryMyDeptTreeList', params)
|
||||||
|
|
||||||
// 日志管理
|
// 日志管理
|
||||||
const deleteLog = (params) => getAction('/sys/log/delete', params)
|
const deleteLog = (params) => postAction('/sys/log/delete', params)
|
||||||
const deleteLogList = (params) => getAction('/sys/log/deleteBatch', params)
|
const deleteLogList = (params) => postAction('/sys/log/deleteBatch', params)
|
||||||
|
|
||||||
// 数据字典
|
// 数据字典
|
||||||
const addDict = (params) => postAction('/sys/dict/add', params)
|
const addDict = (params) => postAction('/sys/dict/add', params)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
|
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
|
||||||
*/
|
*/
|
||||||
import { filterObj } from '@/utils/util'
|
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 Vue from 'vue'
|
||||||
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
|
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
@@ -174,7 +174,7 @@ export const JeroListMixin = {
|
|||||||
content: '是否删除选中数据?',
|
content: '是否删除选中数据?',
|
||||||
onOk: function () {
|
onOk: function () {
|
||||||
that.loading = true
|
that.loading = true
|
||||||
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
postAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// 重新计算分页问题
|
// 重新计算分页问题
|
||||||
that.reCalculatePage(that.selectedRowKeys.length)
|
that.reCalculatePage(that.selectedRowKeys.length)
|
||||||
@@ -197,7 +197,7 @@ export const JeroListMixin = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const that = this
|
const that = this
|
||||||
getAction(that.url.delete, { id: id }).then((res) => {
|
postAction(that.url.delete, { id: id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// 重新计算分页问题
|
// 重新计算分页问题
|
||||||
that.reCalculatePage(1)
|
that.reCalculatePage(1)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
import JeroOrderDMainModal from './form/JeroOrderDMainModal'
|
import JeroOrderDMainModal from './form/JeroOrderDMainModal'
|
||||||
import JeroOrderCustomerList from './JeroOrderCustomerList'
|
import JeroOrderCustomerList from './JeroOrderCustomerList'
|
||||||
import JeroOrderTicketList from './JeroOrderTicketList'
|
import JeroOrderTicketList from './JeroOrderTicketList'
|
||||||
import { getAction } from '@/api/manage'
|
import { postAction } from '@/api/manage'
|
||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -218,7 +218,7 @@ export default {
|
|||||||
|
|
||||||
handleDelete: function (id) {
|
handleDelete: function (id) {
|
||||||
const that = this
|
const that = this
|
||||||
getAction(that.url.delete, { id: id }).then((res) => {
|
postAction(that.url.delete, { id: id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.loadData()
|
that.loadData()
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import DepartModal from './modules/DepartModal'
|
import DepartModal from './modules/DepartModal'
|
||||||
import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api'
|
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 { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
import DepartAuthModal from './modules/DepartAuthModal'
|
import DepartAuthModal from './modules/DepartAuthModal'
|
||||||
// 表头
|
// 表头
|
||||||
@@ -331,7 +331,7 @@ export default {
|
|||||||
title: '确认删除',
|
title: '确认删除',
|
||||||
content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
|
content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
|
||||||
onOk: function () {
|
onOk: function () {
|
||||||
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
postAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.loadTree()
|
that.loadTree()
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import DepartModal from './modules/DepartModal'
|
import DepartModal from './modules/DepartModal'
|
||||||
import { deleteByDepartId, queryDepartTreeSync, searchByKeywords } from '@/api/api'
|
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 { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
import DepartAuthModal from './modules/DepartAuthModal'
|
import DepartAuthModal from './modules/DepartAuthModal'
|
||||||
import { cloneObject } from '@/utils/util'
|
import { cloneObject } from '@/utils/util'
|
||||||
@@ -367,7 +367,7 @@ export default {
|
|||||||
title: '确认删除',
|
title: '确认删除',
|
||||||
content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
|
content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?',
|
||||||
onOk: function () {
|
onOk: function () {
|
||||||
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
postAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.loadTree()
|
that.loadTree()
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export default {
|
|||||||
centered: false,
|
centered: false,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const that = this
|
const that = this
|
||||||
getAction('/sys/dict/deletePhysic/' + id).then((res) => {
|
postAction('/sys/dict/deletePhysic/' + id).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
this.loadData()
|
this.loadData()
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const that = this
|
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) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.loadData2()
|
that.loadData2()
|
||||||
@@ -450,7 +450,7 @@ export default {
|
|||||||
title: '确认删除',
|
title: '确认删除',
|
||||||
content: '是否删除选中数据?',
|
content: '是否删除选中数据?',
|
||||||
onOk: function () {
|
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) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.loadData2()
|
that.loadData2()
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
import SysCategoryModal from './modules/SysCategoryModal'
|
import SysCategoryModal from './modules/SysCategoryModal'
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDelete: function (record) {
|
handleDelete: function (record) {
|
||||||
const that = this
|
const that = this
|
||||||
getAction(that.url.delete, { id: record.id }).then((res) => {
|
postAction(that.url.delete, { id: record.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// update--begin--autor:lvdandan-----date:20201204------for:JT-31 删除成功后默认展开已展开信息
|
// update--begin--autor:lvdandan-----date:20201204------for:JT-31 删除成功后默认展开已展开信息
|
||||||
that.loadData()
|
that.loadData()
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ export default {
|
|||||||
title: '确认取消',
|
title: '确认取消',
|
||||||
content: '是否取消用户与选中部门的关联?',
|
content: '是否取消用户与选中部门的关联?',
|
||||||
onOk: function () {
|
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) {
|
if (res.success) {
|
||||||
that.$message.success('删除用户与选中部门关系成功!')
|
that.$message.success('删除用户与选中部门关系成功!')
|
||||||
that.loadData()
|
that.loadData()
|
||||||
@@ -225,7 +225,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const that = this
|
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) {
|
if (res.success) {
|
||||||
that.$message.success('删除用户与选中部门关系成功!')
|
that.$message.success('删除用户与选中部门关系成功!')
|
||||||
if (this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys.length > 0) {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getFileAccessHttpUrl, getAction, postAction } from '@/api/manage'
|
import { getFileAccessHttpUrl, postAction } from '@/api/manage'
|
||||||
|
|
||||||
// 高度封装的请求,请务必使用 superRequest.call(this,{}) 的方式调用
|
// 高度封装的请求,请务必使用 superRequest.call(this,{}) 的方式调用
|
||||||
function superRequest (options) {
|
function superRequest (options) {
|
||||||
@@ -161,7 +161,7 @@ export default {
|
|||||||
centered: true,
|
centered: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const that = this
|
const that = this
|
||||||
getAction(that.url.deleteRecycleBin, { userIds: userIds.join(',') }).then((res) => {
|
postAction(that.url.deleteRecycleBin, { userIds: userIds.join(',') }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
this.handleClearSelection()
|
this.handleClearSelection()
|
||||||
|
|||||||
Reference in New Issue
Block a user