|
|
@ -59,19 +59,26 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</x-card>
|
|
|
|
</x-card>
|
|
|
|
<a-card :bordered="false">
|
|
|
|
<a-card :bordered="false">
|
|
|
|
|
|
|
|
<div style="margin-bottom: 10px;">
|
|
|
|
<a-button @click="$refs.addForm.add()" type="primary">新增</a-button>
|
|
|
|
<a-button @click="$refs.addForm.add()" type="primary">新增</a-button>
|
|
|
|
<a-button @click="$refs.addForm.add()" type="primary">启用</a-button>
|
|
|
|
<a-button @click="handleStart" type="primary">启用</a-button>
|
|
|
|
<a-button @click="$refs.addForm.add()">取消启用</a-button>
|
|
|
|
<a-button @click="handleStop">取消启用</a-button>
|
|
|
|
<a-button @click="$refs.addForm.add()" type="danger">作废</a-button>
|
|
|
|
<a-popconfirm title="确认作废吗?" @confirm="handleDelete">
|
|
|
|
|
|
|
|
<a-button type="danger">作废</a-button>
|
|
|
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
<a-table
|
|
|
|
<a-table
|
|
|
|
ref="table"
|
|
|
|
ref="table"
|
|
|
|
:columns="columns"
|
|
|
|
:columns="columns"
|
|
|
|
:data="list"
|
|
|
|
:data-source="list"
|
|
|
|
:pagination="pagination"
|
|
|
|
:pagination="pagination"
|
|
|
|
@change="tablePaginationChange"
|
|
|
|
@change="tablePaginationChange"
|
|
|
|
:rowKey="(record) => record.id"
|
|
|
|
:rowKey="(record) => record.pkId"
|
|
|
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
|
|
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
|
|
|
|
|
|
|
<span slot="action" slot-scope="text, record">
|
|
|
|
|
|
|
|
<a @click="$refs.editForm.edit(record)">编辑</a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</a-table>
|
|
|
|
</a-table>
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
@ -85,7 +92,10 @@ import {
|
|
|
|
XCard
|
|
|
|
XCard
|
|
|
|
} from '@/components'
|
|
|
|
} from '@/components'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
ServiceProjectGetPage
|
|
|
|
ServiceProjectGetPage,
|
|
|
|
|
|
|
|
ServiceProjectSetEnable,
|
|
|
|
|
|
|
|
ServiceProjectSetUnEnable,
|
|
|
|
|
|
|
|
ServiceProjectDelete
|
|
|
|
} from '@/api/modular/system/appManage'
|
|
|
|
} from '@/api/modular/system/appManage'
|
|
|
|
import editForm from './editForm'
|
|
|
|
import editForm from './editForm'
|
|
|
|
import addForm from './addForm'
|
|
|
|
import addForm from './addForm'
|
|
|
@ -183,11 +193,63 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
handleOk() {
|
|
|
|
handleOk() {
|
|
|
|
this.$refs.table.refresh()
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleStart() {
|
|
|
|
|
|
|
|
if (this.selectedRowKeys.length > 0) {
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
pkId: this.selectedRowKeys.join(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ServiceProjectSetEnable(data).then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
|
|
|
this.$message.success('启用成功')
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.data.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.warning('请选择')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleStop() {
|
|
|
|
|
|
|
|
if (this.selectedRowKeys.length > 0) {
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
pkId: this.selectedRowKeys.join(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ServiceProjectSetUnEnable(data).then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
|
|
|
this.$message.success('取消启用成功')
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.data.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.warning('请选择')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleDelete() {
|
|
|
|
|
|
|
|
if (this.selectedRowKeys.length > 0) {
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
pkId: this.selectedRowKeys.join(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ServiceProjectDelete(data).then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.data.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.warning('请选择')
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleRefsh() {
|
|
|
|
handleRefsh() {
|
|
|
|
this.$refs.query.resetFields()
|
|
|
|
this.$refs.query.resetFields()
|
|
|
|
this.queryParam = { create: [], update: [] }
|
|
|
|
this.queryParam = { create: [], update: [] }
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleSearch() {
|
|
|
|
handleSearch() {
|
|
|
|
if (this.queryParam.create.length > 0) {
|
|
|
|
if (this.queryParam.create.length > 0) {
|
|
|
@ -217,6 +279,7 @@ export default {
|
|
|
|
tablePaginationChange(pagination) {
|
|
|
|
tablePaginationChange(pagination) {
|
|
|
|
this.pagination.current = pagination.current
|
|
|
|
this.pagination.current = pagination.current
|
|
|
|
this.pagination.pageSize = pagination.pageSize
|
|
|
|
this.pagination.pageSize = pagination.pageSize
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onSelectChange(selectedRowKeys, selectedRows) {
|
|
|
|
onSelectChange(selectedRowKeys, selectedRows) {
|
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
|