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

Merge remote-tracking branch 'origin/master'

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