Commit 92a6c944 authored by 秦嘉's avatar 秦嘉

Merge remote-tracking branch 'origin/master'

parents 731f07a3 4ec849da
// 不良定义api
import request from '@/utils/request'
import business from "../../mock/business";
import Qs from "qs";
// 分页查询列表
export function listBad(query) {
......@@ -35,14 +35,15 @@ export function deleteLogical(businessId) {
})
}
// 不良定义修改状态
export function updateStatus(businessId, flag) {
const data = {
businessId,
flag
}
export function updateStatus(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/nltdisadvantage/update',
url: '/nltdisadvantage/update/' + businessId,
method: 'put',
params: data
data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
......@@ -227,8 +227,7 @@
</template>
<script>
import {listBad, listPost, deleteLogical, updateStatus} from '@/api/badDefinition'
import {changeUserStatus} from "@/api/system/user";
import { listBad, listPost, deleteLogical, updateStatus } from '@/api/badDefinition'
export default {
name: 'BadDefinition',
......@@ -364,13 +363,14 @@ export default {
// 不良定义状态修改
handleStatusChange(row) {
const text = row.flag === '1' ? '启用' : '停用'
this.$confirm('确认要"' + text + '""' + row.rejectCode + '"状态吗?', '警告', {
this.$confirm('确认要' + text + '"' + row.rejectCode + '"状态吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return updateStatus(row.businessId, row.flag)
return updateStatus(row)
}).then(() => {
this.getList()
this.$message({
message: text + '成功',
type: 'success'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment