Browse Source

修改部分模块接口

master
xiaobai 3 years ago
parent
commit
57df672b7d
  1. 10
      src/api/common.js
  2. 7
      src/views/archive/archive_info.vue
  3. 5
      src/views/archive/archive_scan.vue
  4. 15
      src/views/dic/category.vue
  5. 2
      src/views/dic/dic_data.vue
  6. 2
      src/views/dic/dic_type.vue
  7. 22
      src/views/flow/definition.vue
  8. 11
      src/views/flow/message.vue

10
src/api/common.js

@ -130,3 +130,13 @@ export function getDepartmentTreeList(params) {
params
})
}
export function deleteDefinitionFn(params) {
return api({
url: '/definition',
method: 'delete',
params: params,
paramsSerializer: function(data) {
return require('qs').stringify(data, { indices: false })
}
})
}

7
src/views/archive/archive_info.vue

@ -77,8 +77,11 @@ export default {
},
getList() {
this.server({
url: '/archive/archive/getArchiveInfo/' + this.id,
method: 'get'
url: '/archive',
method: 'get',
params: {
id: this.id
}
}).then(data => {
this.archive = data.archive
this.paramList = data.paramList

5
src/views/archive/archive_scan.vue

@ -91,7 +91,10 @@ export default {
this.jianyijiahao = this.frameNums
if (this.isAppend) {
this.api({
url: '/archive/getArchiveInfo/' + this.id,
url: '/archive',
params: {
id: this.id
},
method: 'get'
}).then(data => {
this.archive = data.archive

15
src/views/dic/category.vue

@ -22,7 +22,7 @@
</div>
<el-table
ref="list"
:data="parentList"
:data="leftList"
:row-class-name="tableRowClassName"
border
fit
@ -135,7 +135,8 @@ export default {
listQuery: {
pageNum: 1, //
pageSize: 20,
orderBy: 'sort asc'
orderBy: 'sort asc',
parentId: ''
},
dialogStatus: 'create',
dialogFormVisible: false,
@ -152,7 +153,7 @@ export default {
}
},
created() {
this.getList()
// this.getList()
this.getSbzlList()
this.getParentList()
this.getLeftList()
@ -175,6 +176,8 @@ export default {
},
onRowClick(row) {
this.$refs.list.toggleRowSelection(row)
this.listQuery.parentId = row.id
this.getList()
},
handleSelectionChange: function(val) {
this.multipleSelection = val
@ -274,7 +277,7 @@ export default {
},
getParentList() {
this.api({
url: '/category/getCategoryList',
url: '/category/all',
method: 'get',
params: {
parentCode: null,
@ -286,14 +289,14 @@ export default {
},
getLeftList() {
this.api({
url: '/getTopLevel',
url: '/category/getTopLevel',
method: 'get',
params: {
pageNum: 10,
pageSize: 10
}
}).then(data => {
this.leftList = data
this.leftList = data.list
})
},
closeDialog() {

2
src/views/dic/dic_data.vue

@ -153,7 +153,7 @@ export default {
},
getDicType() {
this.api({
url: '/dicType/getAllDicType',
url: '/dicType/all',
method: 'get'
}).then(data => {
this.dicTypeList = data

2
src/views/dic/dic_type.vue

@ -409,7 +409,7 @@ export default {
},
getDicType() {
this.api({
url: '/dicType/getAllDicType',
url: '/dicType/all',
method: 'get'
}).then(data => {
this.dicTypeList = data

22
src/views/flow/definition.vue

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

11
src/views/flow/message.vue

@ -151,7 +151,7 @@ export default {
return false
}
this.api({
url: '/message/addMessage',
url: '/message',
method: 'post',
data: {
message: this.tempMessage,
@ -171,8 +171,8 @@ export default {
this.$refs['tempMessage'].validate(valid => {
if (valid) {
this.api({
url: '/message/updateMessage',
method: 'post',
url: '/message',
method: 'put',
data: this.tempMessage
}).then(() => {
this.$message({ message: '更新成功。', type: 'success' })
@ -187,10 +187,11 @@ export default {
editStatus($index) {
const messgae = this.list[$index]
this.api({
url: '/message/updateMessage',
method: 'post',
url: '/message',
method: 'put',
data: messgae
}).then(() => {
this.$message({ message: '操作成功。', type: 'success' })
this.getList()
})
}

Loading…
Cancel
Save