|
@ -119,6 +119,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import Pagination from '@/components/Pagination' |
|
|
import Pagination from '@/components/Pagination' |
|
|
|
|
|
import { deleteDefinitionFn } from '@/api/common' |
|
|
export default { |
|
|
export default { |
|
|
name: 'FlowDefinition', |
|
|
name: 'FlowDefinition', |
|
|
components: { Pagination }, |
|
|
components: { Pagination }, |
|
@ -185,7 +186,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getAllDepartment() { |
|
|
getAllDepartment() { |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/department/getAllDepartment', |
|
|
url: '/department/all', |
|
|
method: 'get' |
|
|
method: 'get' |
|
|
}).then(data => { |
|
|
}).then(data => { |
|
|
this.listDepartment = data |
|
|
this.listDepartment = data |
|
@ -308,7 +309,7 @@ export default { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
this.formDefinition.neibuleibie = JSON.stringify(this.neibuleibie) |
|
|
this.formDefinition.neibuleibie = JSON.stringify(this.neibuleibie) |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/definition/add', |
|
|
url: '/definition', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
data: this.formDefinition |
|
|
data: this.formDefinition |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
@ -327,8 +328,8 @@ export default { |
|
|
const _vue = this |
|
|
const _vue = this |
|
|
this.formDefinition.neibuleibie = JSON.stringify(this.neibuleibie) |
|
|
this.formDefinition.neibuleibie = JSON.stringify(this.neibuleibie) |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/definition/update', |
|
|
url: '/definition', |
|
|
method: 'post', |
|
|
method: 'put', |
|
|
data: this.formDefinition |
|
|
data: this.formDefinition |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
this.dialogFormVisible = false |
|
|
this.dialogFormVisible = false |
|
@ -379,20 +380,11 @@ export default { |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
const pks = [] |
|
|
const pks = [] |
|
|
const qs = require('qs') |
|
|
|
|
|
this.multipleSelection.forEach(definition => { |
|
|
this.multipleSelection.forEach(definition => { |
|
|
pks.push(definition.id) |
|
|
pks.push(definition.id) |
|
|
}) |
|
|
}) |
|
|
this.api({ |
|
|
console.log(pks) |
|
|
url: '/definition/delDefinition', |
|
|
deleteDefinitionFn({ pks: pks }).then(() => { |
|
|
method: 'delete', |
|
|
|
|
|
params: { |
|
|
|
|
|
pks: pks |
|
|
|
|
|
}, |
|
|
|
|
|
paramsSerializer: function(params) { |
|
|
|
|
|
return qs.stringify(params, { indices: false }) |
|
|
|
|
|
} |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '删除成功', |
|
|
message: '删除成功', |
|
|
type: 'success', |
|
|
type: 'success', |
|
|