【fix bug】axios请求,put改为post,delete改为get
This commit is contained in:
+11
-11
@@ -1,27 +1,27 @@
|
||||
import { deleteAction, getAction, httpAction, postAction, putAction } from '@/api/manage'
|
||||
import { getAction, httpAction, postAction, putAction } from '@/api/manage'
|
||||
import Vue from 'vue'
|
||||
import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||
|
||||
// 角色管理
|
||||
const addRole = (params) => postAction('/sys/role/add', params)
|
||||
const editRole = (params) => putAction('/sys/role/edit', params)
|
||||
const editRole = (params) => postAction('/sys/role/edit', params)
|
||||
const checkRoleCode = (params) => getAction('/sys/role/checkRoleCode', params)
|
||||
const queryall = (params) => getAction('/sys/role/queryall', params)
|
||||
|
||||
// 用户管理
|
||||
const addUser = (params) => postAction('/sys/user/add', params)
|
||||
const editUser = (params) => putAction('/sys/user/edit', params)
|
||||
const editUser = (params) => postAction('/sys/user/edit', params)
|
||||
const queryUserRole = (params) => getAction('/sys/user/queryUserRole', params)
|
||||
const getUserList = (params) => getAction('/sys/user/page', params)
|
||||
const frozenBatch = (params) => putAction('/sys/user/frozenBatch', params)
|
||||
const frozenBatch = (params) => postAction('/sys/user/frozenBatch', params)
|
||||
// 验证用户是否存在
|
||||
const checkOnlyUser = (params) => getAction('/sys/user/checkOnlyUser', params)
|
||||
// 改变密码
|
||||
const changePassword = (params) => putAction('/sys/user/changePassword', params)
|
||||
const changePassword = (params) => postAction('/sys/user/changePassword', params)
|
||||
|
||||
// 权限管理
|
||||
const addPermission = (params) => postAction('/sys/permission/add', params)
|
||||
const editPermission = (params) => putAction('/sys/permission/edit', params)
|
||||
const editPermission = (params) => postAction('/sys/permission/edit', params)
|
||||
const getPermissionList = (params) => getAction('/sys/permission/page', params)
|
||||
const getSystemMenuList = (params) => getAction('/sys/permission/getSystemMenuList', params)
|
||||
const getSystemSubmenu = (params) => getAction('/sys/permission/getSystemSubmenu', params)
|
||||
@@ -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) => deleteAction('/sys/sysDepart/delete', params)
|
||||
const deleteByDepartId = (params) => getAction('/sys/sysDepart/delete', params)
|
||||
|
||||
// 二级部门管理
|
||||
const queryDepartPermission = (params) => getAction('/sys/permission/queryDepartPermission', params)
|
||||
@@ -52,15 +52,15 @@ const queryDeptRolePermission = (params) => getAction('/sys/sysDepartPermission/
|
||||
const queryMyDepartTreeList = (params) => getAction('/sys/sysDepart/queryMyDeptTreeList', params)
|
||||
|
||||
// 日志管理
|
||||
const deleteLog = (params) => deleteAction('/sys/log/delete', params)
|
||||
const deleteLogList = (params) => deleteAction('/sys/log/deleteBatch', params)
|
||||
const deleteLog = (params) => getAction('/sys/log/delete', params)
|
||||
const deleteLogList = (params) => getAction('/sys/log/deleteBatch', params)
|
||||
|
||||
// 数据字典
|
||||
const addDict = (params) => postAction('/sys/dict/add', params)
|
||||
const editDict = (params) => putAction('/sys/dict/edit', params)
|
||||
const editDict = (params) => postAction('/sys/dict/edit', params)
|
||||
const treeList = (params) => getAction('/sys/dict/treeList', params)
|
||||
const addDictItem = (params) => postAction('/sys/dictItem/add', params)
|
||||
const editDictItem = (params) => putAction('/sys/dictItem/edit', params)
|
||||
const editDictItem = (params) => postAction('/sys/dictItem/edit', params)
|
||||
|
||||
// 字典标签专用(通过code获取字典数组)
|
||||
export const ajaxGetDictItems = (code, params) => getAction(`/sys/dict/getDictItems/${code}`, params)
|
||||
|
||||
@@ -105,12 +105,10 @@ export function getPermissions (parameter) {
|
||||
})
|
||||
}
|
||||
|
||||
// id == 0 add post
|
||||
// id != 0 update put
|
||||
export function saveService (parameter) {
|
||||
return axios({
|
||||
url: api.service,
|
||||
method: parameter.id + '' === '0' ? 'post' : 'put',
|
||||
method: 'post',
|
||||
data: parameter
|
||||
})
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, putAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import Vue from 'vue'
|
||||
import store from '@/store/'
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
@@ -122,7 +122,7 @@ export default {
|
||||
orgCode: this.departSelected,
|
||||
username: this.username
|
||||
}
|
||||
putAction('/sys/selectDepart', obj).then(res => {
|
||||
postAction('/sys/selectDepart', obj).then(res => {
|
||||
if (res.success) {
|
||||
const userInfo = res.result.userInfo
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, putAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import ShowAnnouncement from './ShowAnnouncement'
|
||||
import store from '@/store/'
|
||||
import DynamicNotice from './DynamicNotice'
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
}, 200)
|
||||
},
|
||||
showAnnouncement (record) {
|
||||
putAction(this.url.editCementSend, { anntId: record.id }).then((res) => {
|
||||
postAction(this.url.editCementSend, { anntId: record.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.loadData()
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { putAction } from '@/api/manage'
|
||||
import { postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'UserPassword',
|
||||
@@ -112,7 +112,7 @@ export default {
|
||||
that.confirmLoading = true
|
||||
const params = Object.assign({ username: this.username }, values)
|
||||
console.log('修改密码提交数据', params)
|
||||
putAction(this.url, params).then((res) => {
|
||||
postAction(this.url, params).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res)
|
||||
that.$message.success(res.message)
|
||||
|
||||
@@ -117,10 +117,11 @@ export const JEditableTableMixin = {
|
||||
},
|
||||
/** 发起请求,自动判断是执行新增还是修改操作 */
|
||||
request (formData) {
|
||||
let url = this.url.add; let method = 'post'
|
||||
let url = this.url.add
|
||||
const method = 'post'
|
||||
if (this.model.id) {
|
||||
url = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
this.confirmLoading = true
|
||||
httpAction(url, formData, method).then((res) => {
|
||||
|
||||
@@ -116,10 +116,11 @@ export const JEditableTableModelMixin = {
|
||||
},
|
||||
/** 发起请求,自动判断是执行新增还是修改操作 */
|
||||
request (formData) {
|
||||
let url = this.url.add; let method = 'post'
|
||||
let url = this.url.add
|
||||
const method = 'post'
|
||||
if (this.model.id) {
|
||||
url = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
this.confirmLoading = true
|
||||
httpAction(url, formData, method).then((res) => {
|
||||
|
||||
@@ -106,10 +106,10 @@ export const JVxeTableMixin = {
|
||||
/** 发起请求,自动判断是执行新增还是修改操作 */
|
||||
request (formData) {
|
||||
let url = this.url.add
|
||||
let method = 'post'
|
||||
const method = 'post'
|
||||
if (this.model.id) {
|
||||
url = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
this.confirmLoading = true
|
||||
console.log('formData===>', formData)
|
||||
|
||||
@@ -105,10 +105,11 @@ export const JVxeTableModelMixin = {
|
||||
},
|
||||
/** 发起请求,自动判断是执行新增还是修改操作 */
|
||||
request (formData) {
|
||||
let url = this.url.add; let method = 'post'
|
||||
let url = this.url.add
|
||||
const method = 'post'
|
||||
if (this.model.id) {
|
||||
url = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
this.confirmLoading = true
|
||||
console.log('formData===>', formData)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
|
||||
*/
|
||||
import { filterObj } from '@/utils/util'
|
||||
import { deleteAction, downFile, getAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { downFile, getAction, getFileAccessHttpUrl } 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
|
||||
deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
getAction(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
|
||||
deleteAction(that.url.delete, { id: id }).then((res) => {
|
||||
getAction(that.url.delete, { id: id }).then((res) => {
|
||||
if (res.success) {
|
||||
// 重新计算分页问题
|
||||
that.reCalculatePage(1)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, putAction } from '@api/manage'
|
||||
import { getAction, postAction } from '@api/manage'
|
||||
import { JVXETypes } from '@/components/jero/JVxeTable'
|
||||
|
||||
// 即时保存示例
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
// 【模拟保存】
|
||||
const hideLoading = this.$message.loading(`正在保存"${column.title}"`, 0)
|
||||
console.log('即时保存数据:', row)
|
||||
putAction(this.url.saveRow, row).then(res => {
|
||||
postAction(this.url.saveRow, row).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(`"${column.title}"保存成功!`)
|
||||
// 局部更新单元格为已保存状态
|
||||
|
||||
@@ -280,10 +280,10 @@ export default {
|
||||
/** 发起新增或修改的请求 */
|
||||
requestAddOrEdit (formData) {
|
||||
let url = this.url.add
|
||||
let method = 'post'
|
||||
const method = 'post'
|
||||
if (this.model.id) {
|
||||
url = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
this.confirmLoading = true
|
||||
httpAction(url, formData, method).then((res) => {
|
||||
|
||||
@@ -279,10 +279,10 @@ export default {
|
||||
},
|
||||
/** 发起新增或修改的请求 */
|
||||
requestAddOrEdit (formData) {
|
||||
let url = this.url.add; let method = 'post'
|
||||
let url = this.url.add; const method = 'post'
|
||||
if (this.model.id) {
|
||||
url = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
this.confirmLoading = true
|
||||
httpAction(url, formData, method).then((res) => {
|
||||
|
||||
@@ -108,13 +108,12 @@ export default {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpUrl
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpUrl = this.url.add
|
||||
method = 'post'
|
||||
} else {
|
||||
httpUrl = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
|
||||
httpAction(httpUrl, this.model, method).then((res) => {
|
||||
|
||||
@@ -203,13 +203,14 @@ export default {
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let httpurl, method
|
||||
let httpurl
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl = this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
const formData = Object.assign(this.model, values)
|
||||
// 时间格式化
|
||||
|
||||
@@ -222,13 +222,14 @@ export default {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl, method
|
||||
let httpurl
|
||||
const method = 'post'
|
||||
if (!this.orderMainModel.id) {
|
||||
httpurl = this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
|
||||
httpAction(httpurl, this.orderMainModel, method).then((res) => {
|
||||
|
||||
@@ -283,10 +283,11 @@ export default {
|
||||
},
|
||||
/** 发起新增或修改的请求 */
|
||||
requestAddOrEdit (formData) {
|
||||
let url = this.url.add; let method = 'post'
|
||||
let url = this.url.add
|
||||
const method = 'post'
|
||||
if (this.model.id) {
|
||||
url = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
this.confirmLoading = true
|
||||
httpAction(url, formData, method).then((res) => {
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
import JeroOrderDMainModal from './form/JeroOrderDMainModal'
|
||||
import JeroOrderCustomerList from './JeroOrderCustomerList'
|
||||
import JeroOrderTicketList from './JeroOrderTicketList'
|
||||
import { deleteAction } from '@/api/manage'
|
||||
import { getAction } from '@/api/manage'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
|
||||
export default {
|
||||
@@ -218,7 +218,7 @@ export default {
|
||||
|
||||
handleDelete: function (id) {
|
||||
const that = this
|
||||
deleteAction(that.url.delete, { id: id }).then((res) => {
|
||||
getAction(that.url.delete, { id: id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
|
||||
@@ -175,13 +175,14 @@ export default {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl, method
|
||||
let httpurl
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl = this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
const formData = Object.assign({}, this.model)
|
||||
if (this.fileList && this.fileList.length > 0) {
|
||||
|
||||
@@ -112,13 +112,14 @@ export default {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl, method
|
||||
let httpurl
|
||||
const method = 'post'
|
||||
if (!this.orderMainModel.id) {
|
||||
httpurl = this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
|
||||
httpAction(httpurl, this.orderMainModel, method).then((res) => {
|
||||
|
||||
@@ -136,13 +136,14 @@ export default {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl, method
|
||||
let httpurl
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl = this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
this.model.mainId = this.model.orderId
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
|
||||
@@ -141,13 +141,13 @@ export default {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
const formData = Object.assign(this.model, values)
|
||||
// 时间格式化
|
||||
|
||||
@@ -159,13 +159,13 @@ export default {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
const formData = Object.assign(this.model, values)
|
||||
// 时间格式化
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
<script>
|
||||
import DepartModal from './modules/DepartModal'
|
||||
import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api'
|
||||
import { httpAction, deleteAction } from '@/api/manage'
|
||||
import { httpAction, getAction } 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 () {
|
||||
deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.loadTree()
|
||||
@@ -425,7 +425,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
httpAction(this.url.edit, this.currSelected, 'put').then((res) => {
|
||||
httpAction(this.url.edit, this.currSelected, 'post').then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success('保存成功!')
|
||||
this.loadTree()
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
<script>
|
||||
import DepartModal from './modules/DepartModal'
|
||||
import { deleteByDepartId, queryDepartTreeSync, searchByKeywords } from '@/api/api'
|
||||
import { deleteAction, httpAction } from '@/api/manage'
|
||||
import { getAction, httpAction } 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 () {
|
||||
deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.loadTree()
|
||||
@@ -467,7 +467,7 @@ export default {
|
||||
|
||||
const formData = Object.assign(this.currSelected, this.model)
|
||||
console.log('Received values of form: ', formData)
|
||||
httpAction(this.url.edit, formData, 'put').then((res) => {
|
||||
httpAction(this.url.edit, formData, 'post').then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success('保存成功!')
|
||||
this.loadTree()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, deleteAction, putAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
export default {
|
||||
name: 'DictDeleteList',
|
||||
data () {
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleBack (id) {
|
||||
putAction('/sys/dict/back/' + id).then(res => {
|
||||
postAction('/sys/dict/back/' + id).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
centered: false,
|
||||
onOk: () => {
|
||||
const that = this
|
||||
deleteAction('/sys/dict/deletePhysic/' + id).then((res) => {
|
||||
getAction('/sys/dict/deletePhysic/' + id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import { deleteAction, postAction, getAction } from '@/api/manage'
|
||||
import { postAction, getAction } from '@/api/manage'
|
||||
import SelectUserModal from './modules/SelectUserModal'
|
||||
import RoleModal from './modules/RoleModal'
|
||||
import UserModal from './modules/UserModal'
|
||||
@@ -423,7 +423,7 @@ export default {
|
||||
return
|
||||
}
|
||||
const that = this
|
||||
deleteAction(that.url.delete2, { roleId: this.currentRoleId, userId: id }).then((res) => {
|
||||
getAction(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 () {
|
||||
deleteAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => {
|
||||
getAction(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, deleteAction } from '@/api/manage'
|
||||
import { getAction } 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
|
||||
deleteAction(that.url.delete, { id: record.id }).then((res) => {
|
||||
getAction(that.url.delete, { id: record.id }).then((res) => {
|
||||
if (res.success) {
|
||||
// update--begin--autor:lvdandan-----date:20201204------for:JT-31 删除成功后默认展开已展开信息
|
||||
that.loadData()
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<script>
|
||||
// import { filterObj } from '@/utils/util'
|
||||
import { getAction, putAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import DynamicNotice from '../../components/tools/DynamicNotice'
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
this.$refs.sysAnnouncementModal.title = '查看'
|
||||
},
|
||||
showAnnouncement (record) {
|
||||
putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
|
||||
postAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
|
||||
if (res.success) {
|
||||
this.loadData()
|
||||
this.syncHeadNotic(record.anntId)
|
||||
@@ -166,7 +166,7 @@ export default {
|
||||
title: '确认操作',
|
||||
content: '是否全部标注已读?',
|
||||
onOk: function () {
|
||||
putAction(that.url.readAllMsg).then((res) => {
|
||||
postAction(that.url.readAllMsg).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
<script>
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import SelectUserModal from './SelectUserModal'
|
||||
import UserModal from './UserModal'
|
||||
|
||||
@@ -201,7 +201,7 @@ export default {
|
||||
title: '确认取消',
|
||||
content: '是否取消用户与选中部门的关联?',
|
||||
onOk: function () {
|
||||
deleteAction(that.url.deleteBatch, { depId: that.currentDeptId, userIds: ids }).then((res) => {
|
||||
getAction(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
|
||||
deleteAction(that.url.delete, { depId: this.currentDeptId, userId: id }).then((res) => {
|
||||
getAction(that.url.delete, { depId: this.currentDeptId, userId: id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success('删除用户与选中部门关系成功!')
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
|
||||
@@ -122,13 +122,13 @@ export default {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
|
||||
@@ -103,13 +103,13 @@ export default {
|
||||
if (ok) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
|
||||
console.log('提交参数', this.model)
|
||||
|
||||
@@ -249,13 +249,13 @@ export default {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
if (this.userType) {
|
||||
this.model.userIds = this.userIds
|
||||
|
||||
@@ -100,13 +100,13 @@ export default {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -328,9 +328,10 @@ export default {
|
||||
const formData = Object.assign(this.model, mainValues, { ruleJson })
|
||||
|
||||
// 判断请求方式和请求地址,并发送请求
|
||||
let method = 'post'; let httpUrl = this.url.add
|
||||
const method = 'post'
|
||||
let httpUrl = this.url.add
|
||||
if (this.model.id) {
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
httpUrl = this.url.edit
|
||||
}
|
||||
this.confirmLoading = true
|
||||
|
||||
@@ -214,10 +214,11 @@ export default {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
const formData = Object.assign(this.model, values)
|
||||
let httpUrl = this.url.add; let method = 'post'
|
||||
let httpUrl = this.url.add
|
||||
const method = 'post'
|
||||
if (this.model.id) {
|
||||
httpUrl = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
// 由于编码的特殊性,所以不能更改
|
||||
formData.code = undefined
|
||||
}
|
||||
|
||||
@@ -108,10 +108,11 @@ export default {
|
||||
this.$refs.form.validate((ok) => {
|
||||
if (ok) {
|
||||
that.confirmLoading = true
|
||||
let httpUrl = this.url.add; let method = 'post'
|
||||
let httpUrl = this.url.add
|
||||
const method = 'post'
|
||||
if (this.model.id) {
|
||||
httpUrl = this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
|
||||
httpAction(httpUrl, this.model, method).then((res) => {
|
||||
|
||||
@@ -131,13 +131,13 @@ export default {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
|
||||
@@ -142,13 +142,13 @@ export default {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
const formData = Object.assign(this.model, values)
|
||||
httpAction(httpurl, formData, method).then((res) => {
|
||||
|
||||
@@ -138,13 +138,13 @@ export default {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
let httpurl = ''
|
||||
let method
|
||||
const method = 'post'
|
||||
if (!this.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
// method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
// method = 'put'
|
||||
}
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putAction, deleteAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { getFileAccessHttpUrl, getAction, postAction } from '@/api/manage'
|
||||
|
||||
// 高度封装的请求,请务必使用 superRequest.call(this,{}) 的方式调用
|
||||
function superRequest (options) {
|
||||
@@ -140,7 +140,7 @@ export default {
|
||||
content: `您确定要恢复这 ${userIds.length} 个用户吗?`,
|
||||
centered: true,
|
||||
onOk: () => {
|
||||
putAction(this.url.putRecycleBin, { userIds: userIds.join(',') }).then((res) => {
|
||||
postAction(this.url.putRecycleBin, { userIds: userIds.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
this.handleOk()
|
||||
this.handleClearSelection()
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
centered: true,
|
||||
onOk: () => {
|
||||
const that = this
|
||||
deleteAction(that.url.deleteRecycleBin, { userIds: userIds.join(',') }).then((res) => {
|
||||
getAction(that.url.deleteRecycleBin, { userIds: userIds.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
this.loadData()
|
||||
this.handleClearSelection()
|
||||
|
||||
@@ -182,7 +182,7 @@ import { mapActions } from 'vuex'
|
||||
import { timeFix } from '@/utils/util'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN/* , ENCRYPTED_STRING, USER_INFO */ } from '@/store/mutation-types'
|
||||
import { /* putAction, */ postAction, getAction } from '@/api/manage'
|
||||
import { postAction, getAction } from '@/api/manage'
|
||||
|
||||
import { getRSAPublicKey } from '@/utils/encryption.js'
|
||||
import { JSEncrypt } from 'jsencrypt'
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<script>
|
||||
|
||||
import Vue from 'vue'
|
||||
import { putAction } from '@/api/manage'
|
||||
import { postAction } from '@/api/manage'
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
@@ -155,7 +155,7 @@ export default {
|
||||
orgCode: this.orgCode,
|
||||
username: this.username
|
||||
}
|
||||
putAction('/sys/selectDepart', obj).then(res => {
|
||||
postAction('/sys/selectDepart', obj).then(res => {
|
||||
if (res.success) {
|
||||
const userInfo = res.result.userInfo
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
|
||||
Reference in New Issue
Block a user