项目管理更新

This commit is contained in:
Yjhon 2022-01-20 21:44:16 +08:00
parent 390cf5720f
commit 2cdb3fcb80
4 changed files with 26 additions and 12 deletions

View File

@ -5,6 +5,7 @@ const projectApi = {
getDict: 'project/dict/get', getDict: 'project/dict/get',
list: 'project/pageList', list: 'project/pageList',
get: 'project/get', get: 'project/get',
del: 'project/del',
projectCourseList: '', projectCourseList: '',
release: '/project/release', release: '/project/release',
} }
@ -16,6 +17,14 @@ export function projectAdd(params) {
data: params data: params
}) })
} }
export function projectDel(params) {
return request({
url: projectApi.del,
method: 'post',
params: params
})
}
export function dictGet(params) { export function dictGet(params) {
return request({ return request({
url: projectApi.getDict, url: projectApi.getDict,

View File

@ -12,7 +12,7 @@
} }
"></SearchCom> "></SearchCom>
</div> </div>
</br> <br/>
<s-table <s-table
ref="table" ref="table"
:pageSize="5" :pageSize="5"

View File

@ -56,7 +56,7 @@
<script> <script>
import { STable } from '@/components' import { STable } from '@/components'
import { getProjectList,releaseProject } from '@/api/project/project' import { getProjectList,releaseProject,projectDel } from '@/api/project/project'
export default { export default {
components: { components: {
@ -179,6 +179,16 @@ export default {
}, },
}) })
}, },
handleDelete(record){
projectDel({id:record.id}).then((res) => {
if(res.code == 200){
this.$message.success('删除成功')
this.$refs.table.refresh(false);
}else{
this.$message.success('删除失败')
}
})
},
// //
changeType(path) { changeType(path) {
var arr = [] var arr = []

View File

@ -123,15 +123,11 @@
</a-form-model> </a-form-model>
</a-card> </a-card>
</div> </div>
<!-- </page-header-wrapper> -->
<!-- <class-list ref="ClassList"></class-list> -->
</template> </template>
<script> <script>
import { dictGet } from '@/api/project/project'
import ClassList from '../classAdd/ClassList.vue'
import { classList } from '@/api/project/class' import { classList } from '@/api/project/class'
import { projectAdd, getProjectDetail } from '@/api/project/project' import { dictGet , getProjectDetail } from '@/api/project/project'
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
export default { export default {
props: { props: {
@ -168,7 +164,6 @@ export default {
}, },
components: { components: {
dictGet, dictGet,
ClassList,
classList classList
}, },
created(ClassList) { created(ClassList) {
@ -187,10 +182,10 @@ export default {
console.log('Form返回list页面') console.log('Form返回list页面')
this.$emit('close') this.$emit('close')
}, },
//, //
fetchTemplateData() { fetchTemplateData() {
let formData = { type: 2 } let formData = { dictionaryCode:'0005'}
dictGet(formData).then(res => { dictionaryDropDown(formData).then(res => {
console.log(res) console.log(res)
if (res.code == 200) { if (res.code == 200) {
const result = res.data const result = res.data