@@ -4,6 +4,6 @@ export default { | |||
return axios.get('/chainindustryapply/index', {params}) | |||
}, | |||
editItem(params){ | |||
return axios.post('/chainindustryapply/applyDept',params) | |||
return axios.put('/chainindustryapply/checkApply',params) | |||
} | |||
} |
@@ -53,13 +53,16 @@ | |||
prop="cooperateDeptName" | |||
></el-table-column> | |||
<el-table-column label="操作" align="center" width="100"> | |||
<el-link | |||
@click="edit" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
>申请</el-link | |||
> | |||
<template slot-scope="{ row }"> | |||
<el-link | |||
@click="edit(row)" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
:disabled="judge(row)" | |||
>申请</el-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
@@ -106,7 +109,9 @@ | |||
<script> | |||
import search from "../search"; | |||
import { mapGetters } from "vuex"; | |||
import api from '@/api/chain/assessmentContent' | |||
import applyApi from '@/api/chain/coordinationManage/applyCooperation' | |||
import { mergeSpan } from "@/utils/mixin"; | |||
export default { | |||
components: { | |||
@@ -136,10 +141,22 @@ export default { | |||
showEdit: false, | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(["user"]), | |||
}, | |||
created(){ | |||
this.getDataList(); | |||
}, | |||
methods: { | |||
judge(row) { | |||
// console.log(row, this.user.user.deptId); | |||
// let arr = [].concat( | |||
// row.cooperateDept.split(",").map((item) => parseInt(item)), | |||
// row.leaderDept.split(",").map((item) => parseInt(item)) | |||
// ); | |||
// let bool = arr.includes(this.user.user.deptId); | |||
// return bool; | |||
}, | |||
getDataList() { | |||
api.getList(Object.assign({},this.searchParams)).then(res=>{ | |||
this.startList = res.data.data | |||
@@ -169,10 +186,29 @@ export default { | |||
this.loading=false; | |||
}) | |||
}, | |||
edit() { | |||
edit(row) { | |||
this.showEdit = true; | |||
this.form.chainIndustryId = row.id | |||
}, | |||
save(){ | |||
applyApi | |||
.applyCooperate(Object.assign({}, this.form)) | |||
.then((res) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "success", | |||
message: "提交申请成功", | |||
}); | |||
this.getDataList(); | |||
}) | |||
.catch((e) => { | |||
this.showEdit = false; | |||
this.$message({ | |||
type: "error", | |||
message: "提交申请失败", | |||
}); | |||
}); | |||
}, | |||
save(){}, | |||
}, | |||
}; | |||
</script> |
@@ -18,56 +18,68 @@ | |||
<el-table-column | |||
label="申请部门" | |||
align="center" | |||
min-width="150" | |||
></el-table-column | |||
><el-table-column | |||
width="150" | |||
prop="applyDeptList" | |||
></el-table-column> | |||
<el-table-column | |||
label="申请时间" | |||
align="center" | |||
min-width="150" | |||
width="150" | |||
prop="createTime" | |||
></el-table-column | |||
><el-table-column | |||
label="申请理由" | |||
align="center" | |||
min-width="150" | |||
width="150" | |||
prop="note" | |||
></el-table-column> | |||
<el-table-column | |||
label="产业链名称" | |||
align="center" | |||
min-width="150" | |||
width="150" | |||
prop="name" | |||
></el-table-column> | |||
<el-table-column | |||
label="类型" | |||
align="center" | |||
min-width="100" | |||
width="100" | |||
prop="type" | |||
></el-table-column> | |||
<el-table-column | |||
label="指标名称" | |||
align="center" | |||
min-width="100" | |||
width="100" | |||
prop="content" | |||
></el-table-column> | |||
<el-table-column | |||
label="分值" | |||
align="center" | |||
min-width="100" | |||
width="80" | |||
prop="points" | |||
></el-table-column> | |||
<el-table-column | |||
label="牵头部门" | |||
align="center" | |||
min-width="100" | |||
width="150" | |||
prop="leaderDeptList" | |||
></el-table-column> | |||
<el-table-column | |||
label="配合部门" | |||
align="center" | |||
min-width="100" | |||
width="150" | |||
prop="cooperateDeptList" | |||
></el-table-column> | |||
<el-table-column label="操作" align="center" min-width="120"> | |||
<el-link @click="edit(true)" type="primary" :underline="false" | |||
>同意</el-link | |||
> | |||
<el-link @click="edit(false)" type="primary" :underline="false" | |||
>不同意</el-link | |||
> | |||
<template slot-scope="{ row }"> | |||
<el-link @click="edit(row, true)" type="primary" :underline="false" | |||
:disabled="judge(row)" | |||
>同意</el-link | |||
> | |||
<el-link @click="edit(row, false)" type="primary" :underline="false" | |||
:disabled="judge(row)" | |||
>不同意</el-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
@@ -110,13 +122,16 @@ | |||
<script> | |||
import search from "../search"; | |||
import { mapGetters } from "vuex"; | |||
import api from '@/api/chain/coordinationManage/approvalCooperation' | |||
export default { | |||
components: { | |||
search, | |||
}, | |||
data() { | |||
return { | |||
dataList: [[]], | |||
searchParams: {}, | |||
dataList: [], | |||
count: 0, | |||
page: { | |||
page: 1, | |||
@@ -134,16 +149,56 @@ export default { | |||
}, | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(['user']), | |||
}, | |||
created() { | |||
this.getDataList() | |||
}, | |||
methods: { | |||
getDataList() {}, | |||
edit(flag) { | |||
judge(row) { | |||
if(row.status == 0) { | |||
return false | |||
} else if (row.status == 1 || row.status == 2) { | |||
return true | |||
} | |||
}, | |||
updateParams(data) { | |||
this.searchParams = data; | |||
this.resetCurrentPage(); | |||
this.getDataList(); | |||
}, | |||
resetCurrentPage() { | |||
let page = this.page; | |||
page.page = 1; | |||
this.page = page; | |||
}, | |||
getDataList() { | |||
api.getDataList(Object.assign({}, this.page, this.searchParams)).then((res)=> { | |||
let data = res.data.data | |||
this.count = data.total; | |||
this.dataList = data.records; | |||
}).catch((e)=>{ | |||
this.dataList = []; | |||
this.count = 0; | |||
}).finally(()=>{ | |||
this.loading = false | |||
}) | |||
}, | |||
edit(row, flag) { | |||
this.showEdit = true; | |||
this.form.id = row.id | |||
this.form.itemId = row.id | |||
this.form.leaderDept = row.leaderDept | |||
this.form.cooperateDept = row.cooperateDept | |||
if (flag) { | |||
this.form.status = 1 | |||
this.warning = { | |||
title: "确定同意此申请?", | |||
info: "点击确定后,该部门将添加至考核任务配合部门中", | |||
}; | |||
} else { | |||
this.form.status = 2 | |||
this.warning = { | |||
title: "确定不同意此申请?", | |||
info: |
@@ -9,66 +9,72 @@ | |||
:height="tableHeight" | |||
v-loading="loading" | |||
> | |||
<el-table-column | |||
<el-table-column | |||
type="index" | |||
width="50" | |||
align="center" | |||
label="序号" | |||
></el-table-column> | |||
<el-table-column | |||
label="产业链名称" | |||
label="申请部门" | |||
align="center" | |||
min-width="150" | |||
width="150" | |||
prop="applyDeptList" | |||
></el-table-column> | |||
<el-table-column | |||
label="申请部门" | |||
align="center" | |||
min-width="150" | |||
></el-table-column | |||
><el-table-column | |||
label="申请时间" | |||
align="center" | |||
min-width="150" | |||
width="150" | |||
prop="createTime" | |||
></el-table-column | |||
><el-table-column | |||
label="申请理由" | |||
align="center" | |||
min-width="150" | |||
width="150" | |||
prop="note" | |||
></el-table-column> | |||
<el-table-column | |||
label="产业链名称" | |||
align="center" | |||
width="150" | |||
prop="name" | |||
></el-table-column> | |||
<el-table-column | |||
label="类型" | |||
align="center" | |||
min-width="100" | |||
width="100" | |||
prop="type" | |||
></el-table-column> | |||
<el-table-column | |||
label="指标名称" | |||
align="center" | |||
min-width="100" | |||
width="100" | |||
prop="content" | |||
></el-table-column> | |||
<el-table-column | |||
label="分值" | |||
align="center" | |||
min-width="100" | |||
width="80" | |||
prop="points" | |||
></el-table-column> | |||
<el-table-column | |||
label="牵头部门" | |||
align="center" | |||
min-width="100" | |||
width="150" | |||
prop="leaderDeptList" | |||
></el-table-column> | |||
<el-table-column | |||
label="配合部门" | |||
align="center" | |||
min-width="100" | |||
width="150" | |||
prop="cooperateDeptList" | |||
></el-table-column> | |||
<el-table-column label="操作" align="center" min-width="100"> | |||
<el-link | |||
@click="edit" | |||
icon="el-icon-edit" | |||
type="primary" | |||
:underline="false" | |||
>申请</el-link | |||
> | |||
<el-table-column label="操作" align="center" min-width="120"> | |||
<template slot-scope="{ row }"> | |||
<el-link type="primary" v-if="row.status == 0">审核中</el-link> | |||
<el-link type="primary" v-if="row.status == 1">审核通过</el-link> | |||
<el-link type="primary" v-if="row.status == 2">已驳回</el-link> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
@@ -117,13 +123,16 @@ | |||
<script> | |||
import search from "../search"; | |||
import { mapGetters } from "vuex"; | |||
import api from '@/api/chain/coordinationManage/approvalCooperation' | |||
export default { | |||
components: { | |||
search, | |||
}, | |||
data() { | |||
return { | |||
dataList: [[]], | |||
searchParams: {}, | |||
dataList: [], | |||
count: 0, | |||
page: { | |||
page: 1, | |||
@@ -137,12 +146,36 @@ export default { | |||
showEdit: false, | |||
}; | |||
}, | |||
computed: { | |||
...mapGetters(['user']), | |||
}, | |||
created() { | |||
this.getDataList() | |||
}, | |||
methods: { | |||
getDataList() {}, | |||
edit() { | |||
this.showEdit = true; | |||
updateParams(data) { | |||
this.searchParams = data; | |||
this.resetCurrentPage(); | |||
this.getDataList(); | |||
}, | |||
resetCurrentPage() { | |||
let page = this.page; | |||
page.page = 1; | |||
this.page = page; | |||
}, | |||
getDataList() { | |||
api.getDataList(Object.assign({}, this.page, this.searchParams)).then((res)=> { | |||
let data = res.data.data | |||
this.count = data.total; | |||
this.dataList = data.records; | |||
}).catch((e)=>{ | |||
this.dataList = []; | |||
this.count = 0; | |||
}).finally(()=>{ | |||
this.loading = false | |||
}) | |||
}, | |||
save() {}, | |||
}, | |||
}; | |||
</script> |
@@ -228,7 +228,6 @@ export default { | |||
this.form.leaderDept = row.leaderDept; | |||
}, | |||
save() { | |||
console.log(this.form); | |||
applyApi | |||
.applyCooperate(Object.assign({}, this.form)) | |||
.then((res) => { |