Browse Source

接口

master
YF-yuan 3 years ago
parent
commit
0675d89f8d
2 changed files with 40 additions and 13 deletions
  1. +0
    -1
      src/views/assessingTarget/basicTarget.vue
  2. +40
    -12
      src/views/second/taskSummary/basicTable.vue

+ 0
- 1
src/views/assessingTarget/basicTarget.vue View File

@@ -329,7 +329,6 @@ export default {
return item;
});
this.dataList = this.reduceData(data);
console.log(this.dataList);
this.count = res.data.data.total;
this.loading = false;
})

+ 40
- 12
src/views/second/taskSummary/basicTable.vue View File

@@ -5,7 +5,7 @@
<div class="operating">
<el-button size="small" type="primary">导出</el-button>
</div>
<el-table highlight-current-row :data="dataList" :height="tableHeight" border>
<el-table highlight-current-row :data="dataList" :height="tableHeight" border :span-method="arraySpanMethod">
<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>
@@ -64,18 +64,18 @@
@submit.native.prevent
ref="editForm"
>
<el-form-item label="小条内容:" prop="">
<el-form-item label="小条内容:" prop="itemContent">
<el-input
type="textarea"
:rows="5"
placeholder="请输入考核内容"
></el-input>
</el-form-item>
<el-form-item label="分值:" prop="">
<el-form-item label="分值:" prop="points">
<el-input placeholder="请输入分值"></el-input>
</el-form-item>

<el-form-item label="牵头部门:" prop="">
<el-form-item label="牵头部门:" prop="leaderDeptList">
<treeselect
:flat="true"
:options="formatDep"
@@ -96,7 +96,7 @@
"
/>
</el-form-item>
<el-form-item label="配合部门:" prop="">
<el-form-item label="配合部门:" prop="cooperateDeptList">
<treeselect
:flat="true"
:options="formatDep"
@@ -132,22 +132,26 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect";
import { mapGetters } from "vuex";
import api from "@/api/second/taskSummary"
import { mergeSpan } from "@/utils/mixin";
export default {
components: {
search,
Treeselect
},
mixins: [
mergeSpan([
{ name: "quota1", col: [1] },
{ name: "quota2", col: [2] },
{ name: "content", col: [3] },
]),
],
data() {
return {
searchParams: {},
dataList: [
{quota1:'sdewfdewd',}
],
dataList: [],
loading: false,
showEdit: false,
form: {},
quota1List:[],
quota2List:[],
count: 0,
tableHeight: document.documentElement.clientHeight - 360,
page: {
@@ -165,7 +169,30 @@ export default {
...mapGetters(["formatDep"]),
},
methods: {
getDataList() {},
getDataList() {
this.loading = true;
api
.getList(Object.assign({}, this.searchParams, this.page))
.then((res) => {
let data = res.data.data.records;
data = data.map((item) => {
item.year = item.year + "";
item.focus = false;
item.selectFocus = false;
return item;
});
this.dataList = this.reduceData(data);
this.count = res.data.data.total;
this.loading = false;
})
.catch(() => {
this.dataList = [];
this.count = 0;
this.loading = false;
})
},
},

edit(row) {
this.showEdit = true
},
@@ -173,8 +200,9 @@ export default {
this.showEdit = false
}
}
};
}
</script>

<style scoped>

</style>

Loading…
Cancel
Save