@@ -263,6 +263,7 @@ export function mergeSpan(params) { | |||
methods: { | |||
reduceData(data) { | |||
let arr = data; | |||
console.log(arr) | |||
let prev = new Array(params.length).fill(undefined); | |||
try { | |||
return arr.map((item, index) => { | |||
@@ -284,6 +285,7 @@ export function mergeSpan(params) { | |||
} | |||
} | |||
}) | |||
console.log(item) | |||
return item; | |||
}) | |||
} catch (e) { |
@@ -1,37 +1,104 @@ | |||
<template> | |||
<div class="assessing-content ele-body"> | |||
<el-card shadow="never" v-loading="loading" element-loading-background="rgba(255, 255, 255, 1)"> | |||
<search :type="1" :search-params="searchParams" /> | |||
<div class="operating"> | |||
<el-card | |||
shadow="never" | |||
v-loading="loading" | |||
element-loading-background="rgba(255, 255, 255, 1)" | |||
> | |||
<search :type="1" :search-params="searchParams" /> | |||
<div class="operating"> | |||
<el-button size="small" type="primary">导出</el-button> | |||
</div> | |||
<el-table highlight-current-row :data="dataList" :height="tableHeight" border> | |||
<el-table-column type="index" width="50" align="center" label="编号"></el-table-column> | |||
<el-table-column label="一级指标" min-width="150" align="center" prop="quota1"></el-table-column> | |||
<el-table-column label="二级指标" min-width="150" align="center" prop="quota2"></el-table-column> | |||
<el-table-column label="考核内容和计分细则" min-width="200" align="center" prop="content"></el-table-column> | |||
<el-table-column label="小条内容" min-width="150" align="center" prop="littleContent"></el-table-column> | |||
<el-table-column label="分值" min-width="60" align="center" prop="points"></el-table-column> | |||
<el-table-column label="区牵头单位" min-width="80" align="center" prop="leaderUnit"></el-table-column> | |||
<el-table-column label="牵头部门" min-width="80" align="center" prop="leaderDeptList"></el-table-column> | |||
<el-table-column label="责任领导" min-width="80" align="center"></el-table-column> | |||
<el-table-column label="配合部门" min-width="80" align="center" prop="cooperateDept"></el-table-column> | |||
<el-table-column label="责任领导" min-width="80" align="center" prop="cooperateDeptList"></el-table-column> | |||
<el-table-column | |||
label="操作" | |||
width="125" | |||
align="center" | |||
:key="Math.random()" | |||
</div> | |||
<el-table | |||
highlight-current-row | |||
:data="dataList" | |||
:height="tableHeight" | |||
border | |||
:span-method="arraySpanMethod" | |||
> | |||
<template slot-scope="{ row }"> | |||
<router-link | |||
:to="{name:'segmentation', params:{row, type: 1}}" | |||
>分项</router-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
<el-table-column | |||
type="index" | |||
width="50" | |||
align="center" | |||
label="编号" | |||
></el-table-column> | |||
<el-table-column | |||
label="一级指标" | |||
min-width="150" | |||
align="center" | |||
prop="quota1" | |||
></el-table-column> | |||
<el-table-column | |||
label="二级指标" | |||
min-width="150" | |||
align="center" | |||
prop="quota2" | |||
></el-table-column> | |||
<el-table-column | |||
label="考核内容和计分细则" | |||
min-width="200" | |||
align="center" | |||
prop="content" | |||
></el-table-column> | |||
<el-table-column | |||
label="小条内容" | |||
min-width="150" | |||
align="center" | |||
prop="itemContent" | |||
></el-table-column> | |||
<el-table-column | |||
label="分值" | |||
min-width="60" | |||
align="center" | |||
prop="points" | |||
></el-table-column> | |||
<el-table-column | |||
label="区牵头单位" | |||
min-width="80" | |||
align="center" | |||
prop="leaderUnit" | |||
> | |||
</el-table-column> | |||
<el-table-column label="牵头部门" min-width="80" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ row.leaderDeptList | formatList }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="责任领导" min-width="80" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ row.leaderPrincipalList | formatList }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
label="配合部门" | |||
min-width="80" | |||
align="center" | |||
prop="cooperateDept" | |||
> | |||
<template slot-scope="{ row }"> | |||
{{ row.cooperateDeptList | formatList }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
label="责任领导" | |||
min-width="80" | |||
align="center" | |||
prop="cooperateDeptList" | |||
> | |||
<template slot-scope="{ row }"> | |||
{{ row.cooperatePrincipalList | formatList }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="操作" width="125" align="center"> | |||
<template slot-scope="{ row }"> | |||
<router-link | |||
:to="{ name: 'segmentation', params: { row, type: 1 } }" | |||
>分项</router-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
:current-page.sync="page.page" | |||
:page-size="page.limit" | |||
:total="count" | |||
@@ -48,7 +115,9 @@ | |||
<script> | |||
import search from "../search"; | |||
import api from "@/api/second/segmentation/basicTable"; | |||
import apiSummary from "@/api/second/taskSummary"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
export default { | |||
components: { | |||
search, | |||
@@ -56,13 +125,11 @@ export default { | |||
data() { | |||
return { | |||
searchParams: {}, | |||
dataList: [ | |||
{quota1:'sdewfdewd',quota2: 'xsuifewhdnix'} | |||
], | |||
dataList: [], | |||
loading: false, | |||
form: {}, | |||
quota1List:[], | |||
quota2List:[], | |||
quota1List: [], | |||
quota2List: [], | |||
count: 0, | |||
tableHeight: document.documentElement.clientHeight - 360, | |||
page: { | |||
@@ -73,18 +140,46 @@ export default { | |||
}, | |||
}; | |||
}, | |||
mixins: [ | |||
mergeSpan([ | |||
{ name: "quota1", col: [1] }, | |||
{ name: "quota2", col: [2] }, | |||
{ name: "content", col: [3] }, | |||
]), | |||
], | |||
created() { | |||
this.getDataList(); | |||
}, | |||
methods: { | |||
getDataList() {}, | |||
} | |||
getDataList() { | |||
this.loading = true; | |||
apiSummary | |||
.getBasicTableList(Object.assign({}, this.page, this.searchParams)) | |||
.then((res) => { | |||
let data = res.data.data; | |||
this.dataList = this.reduceData(data); | |||
}) | |||
.catch((e) => { | |||
this.dataList = []; | |||
}) | |||
.finally(() => { | |||
this.loading = false; | |||
}); | |||
}, | |||
}, | |||
filters: { | |||
formatList(val) { | |||
if (val) { | |||
return val.join(","); | |||
} | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style scoped> | |||
a { | |||
text-decoration:none; | |||
color:#66B1FF; | |||
} | |||
a { | |||
text-decoration: none; | |||
color: #66b1ff; | |||
} | |||
</style> |
@@ -1,36 +1,95 @@ | |||
<template> | |||
<div class="assessing-content ele-body"> | |||
<el-card shadow="never" v-loading="loading" element-loading-background="rgba(255, 255, 255, 1)"> | |||
<search :type="3" :search-params="searchParams" /> | |||
<div class="operating"> | |||
<el-card | |||
shadow="never" | |||
v-loading="loading" | |||
element-loading-background="rgba(255, 255, 255, 1)" | |||
> | |||
<search :type="3" :search-params="searchParams" /> | |||
<div class="operating"> | |||
<el-button size="small" type="primary">导出</el-button> | |||
</div> | |||
<el-table highlight-current-row :data="dataList" :height="tableHeight" border> | |||
<el-table-column type="index" width="50" align="center" label="编号"></el-table-column> | |||
<el-table-column label="考核指标" min-width="150" align="center"></el-table-column> | |||
<el-table-column label="考核内容和计分细则" min-width="200" align="center" prop="content"></el-table-column> | |||
<el-table-column label="小条内容" min-width="150" align="center" prop="littleContent"></el-table-column> | |||
<el-table-column label="分值" min-width="60" align="center" prop="points"></el-table-column> | |||
<el-table-column label="区牵头单位" min-width="80" align="center" prop="leaderUnit"></el-table-column> | |||
<el-table-column label="牵头部门" min-width="80" align="center" prop="leaderDeptList"></el-table-column> | |||
<el-table-column label="责任领导" min-width="80" align="center"></el-table-column> | |||
<el-table-column label="配合部门" min-width="80" align="center" prop="cooperateDept"></el-table-column> | |||
<el-table-column label="责任领导" min-width="80" align="center" prop="cooperateDeptList"></el-table-column> | |||
<el-table-column | |||
label="操作" | |||
width="125" | |||
align="center" | |||
:key="Math.random()" | |||
</div> | |||
<el-table | |||
highlight-current-row | |||
:data="dataList" | |||
:height="tableHeight" | |||
border | |||
> | |||
<template slot-scope="{ row }"> | |||
<router-link | |||
:to="{name:'segmentation', params:{row, type: 3}}" | |||
>分项</router-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
<el-table-column | |||
type="index" | |||
width="50" | |||
align="center" | |||
label="编号" | |||
></el-table-column> | |||
<el-table-column | |||
label="考核指标" | |||
min-width="150" | |||
align="center" | |||
></el-table-column> | |||
<el-table-column | |||
label="考核内容和计分细则" | |||
min-width="200" | |||
align="center" | |||
prop="content" | |||
></el-table-column> | |||
<el-table-column | |||
label="小条内容" | |||
min-width="150" | |||
align="center" | |||
prop="littleContent" | |||
></el-table-column> | |||
<el-table-column | |||
label="分值" | |||
min-width="60" | |||
align="center" | |||
prop="points" | |||
></el-table-column> | |||
<el-table-column | |||
label="区牵头单位" | |||
min-width="80" | |||
align="center" | |||
prop="leaderUnit" | |||
></el-table-column> | |||
<el-table-column label="牵头部门" min-width="80" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ row.leaderDeptList | formatList }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="责任领导" min-width="80" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ row.leaderPrincipalList | formatList }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
label="配合部门" | |||
min-width="80" | |||
align="center" | |||
prop="cooperateDept" | |||
> | |||
<template slot-scope="{ row }"> | |||
{{ row.cooperateDeptList | formatList }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
label="责任领导" | |||
min-width="80" | |||
align="center" | |||
prop="cooperateDeptList" | |||
> | |||
<template slot-scope="{ row }"> | |||
{{ row.cooperatePrincipalList | formatList }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="操作" width="125" align="center"> | |||
<template slot-scope="{ row }"> | |||
<router-link | |||
:to="{ name: 'segmentation', params: { row, type: 3 } }" | |||
>分项</router-link | |||
> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-pagination | |||
:current-page.sync="page.page" | |||
:page-size="page.limit" | |||
:total="count" | |||
@@ -47,7 +106,9 @@ | |||
<script> | |||
import search from "../search"; | |||
import api from "@/api/second/segmentation/constraint"; | |||
import apiSummary from "@/api/second/taskSummary"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
export default { | |||
components: { | |||
search, | |||
@@ -55,13 +116,11 @@ export default { | |||
data() { | |||
return { | |||
searchParams: {}, | |||
dataList: [ | |||
{quota1:'sdewfdewd',} | |||
], | |||
dataList: [{ quota1: "sdewfdewd" }], | |||
loading: false, | |||
form: {}, | |||
quota1List:[], | |||
quota2List:[], | |||
quota1List: [], | |||
quota2List: [], | |||
count: 0, | |||
tableHeight: document.documentElement.clientHeight - 310, | |||
page: { | |||
@@ -72,18 +131,46 @@ export default { | |||
}, | |||
}; | |||
}, | |||
mixins: [ | |||
mergeSpan([ | |||
{ name: "quota1", col: [1] }, | |||
{ name: "quota2", col: [2] }, | |||
{ name: "content", col: [3] }, | |||
]), | |||
], | |||
created() { | |||
this.getDataList(); | |||
}, | |||
methods: { | |||
getDataList() {}, | |||
} | |||
getDataList() { | |||
this.loading = true; | |||
apiSummary | |||
.getRewardList(Object.assign({}, this.page, this.searchParams)) | |||
.then((res) => { | |||
let data = res.data.data; | |||
this.dataList = this.reduceData(data); | |||
}) | |||
.catch((e) => { | |||
this.dataList = []; | |||
}) | |||
.finally(() => { | |||
this.loading = false; | |||
}); | |||
}, | |||
}, | |||
filters: { | |||
formatList(val) { | |||
if (val) { | |||
return val.join(","); | |||
} | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style scoped> | |||
a { | |||
text-decoration:none; | |||
color:#66B1FF; | |||
} | |||
a { | |||
text-decoration: none; | |||
color: #66b1ff; | |||
} | |||
</style> |