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 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() { getList() {
this.server({ this.server({
url: '/archive/archive/getArchiveInfo/' + this.id, url: '/archive',
method: 'get' method: 'get',
params: {
id: this.id
}
}).then(data => { }).then(data => {
this.archive = data.archive this.archive = data.archive
this.paramList = data.paramList this.paramList = data.paramList

5
src/views/archive/archive_scan.vue

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

15
src/views/dic/category.vue

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

2
src/views/dic/dic_data.vue

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

2
src/views/dic/dic_type.vue

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

22
src/views/flow/definition.vue

@ -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',

11
src/views/flow/message.vue

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

Loading…
Cancel
Save