@@ -252,7 +252,13 @@ export let categoryName = { | |||
}, | |||
} | |||
export function mergeSpan(params) { | |||
/** | |||
* | |||
* @param {*} params | |||
* [{name: 'quota, col: [1,2]}] | |||
*/ | |||
export function mergeSpan(params) { | |||
return { | |||
methods: { | |||
reduceData(data) { |
@@ -181,7 +181,7 @@ | |||
import tab from "./tab"; | |||
import search from "./search"; | |||
import api from "@/api/assessingTarget/basicTarget"; | |||
import { assessing } from "@/utils/mixin"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | |||
import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | |||
import { mapGetters } from "vuex"; | |||
@@ -191,7 +191,10 @@ export default { | |||
search, | |||
Treeselect, | |||
}, | |||
mixins: [assessing], | |||
mixins: [mergeSpan([ | |||
{name: 'quota1', col: [1]}, | |||
{name: 'quota2', col: [2]}, | |||
])], | |||
data() { | |||
return { | |||
dataList: [], |
@@ -64,7 +64,7 @@ | |||
<script> | |||
import api from "@/api/assessingTarget/commonquotatask"; | |||
import { categoryName } from "@/utils/mixin"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
export default { | |||
components: {}, | |||
data() { | |||
@@ -84,7 +84,9 @@ export default { | |||
created() { | |||
this.getDataList(); | |||
}, | |||
mixins: [categoryName], | |||
mixins: [mergeSpan([ | |||
{name: 'categoryName', col: [1]} | |||
])], | |||
methods: { | |||
getDataList() { | |||
this.loading = true; |
@@ -151,7 +151,7 @@ | |||
import tab from "./tab"; | |||
import search from "./search"; | |||
import api from "@/api/assessingTarget/constraint"; | |||
import { quota } from "@/utils/mixin"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | |||
import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | |||
import { mapGetters } from "vuex"; | |||
@@ -161,7 +161,9 @@ export default { | |||
search, | |||
Treeselect, | |||
}, | |||
mixins: [quota], | |||
mixins: [mergeSpan([ | |||
{name: 'quota', col: [1]} | |||
])], | |||
data() { | |||
return { | |||
dataList: [], |
@@ -167,7 +167,7 @@ | |||
import tab from "./tab"; | |||
import search from "./search"; | |||
import api from "@/api/assessingTarget/reward"; | |||
import { assessing } from "@/utils/mixin"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | |||
import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | |||
import { mapGetters } from "vuex"; | |||
@@ -177,7 +177,10 @@ export default { | |||
search, | |||
Treeselect, | |||
}, | |||
mixins: [assessing], | |||
mixins: [mergeSpan([ | |||
{name: 'quota1', col: [1]}, | |||
{name: 'quota2', col: [2]}, | |||
])], | |||
data() { | |||
return { | |||
dataList: [], | |||
@@ -310,7 +313,6 @@ export default { | |||
return item; | |||
}); | |||
this.dataList = this.reduceData(data); | |||
// this.dataList = data; | |||
console.log(this.dataList); | |||
this.count = res.data.data.total; | |||
this.$nextTick(() => { |
@@ -151,12 +151,16 @@ | |||
<script> | |||
import search from "./search"; | |||
import api from "@/api/basicTable/conventionl.js"; | |||
import { base } from "@/utils/mixin"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
export default { | |||
components: { | |||
search, | |||
}, | |||
mixins: [base], | |||
mixins: [mergeSpan([ | |||
{name: 'year', col: [1]}, | |||
{name: 'code', col: [2,3]}, | |||
{name: 'quota1', col: [4]} | |||
])], | |||
data() { | |||
return { | |||
dataList: [], |
@@ -88,7 +88,7 @@ | |||
<script> | |||
import search from "../assessingTarget/search"; | |||
import api from "../../api/summary/basicTarget"; | |||
import { assessing } from "@/utils/mixin"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
export default { | |||
name: "basic-target", | |||
data() { | |||
@@ -117,7 +117,10 @@ export default { | |||
components: { | |||
search, | |||
}, | |||
mixins: [assessing], | |||
mixins: [mergeSpan([ | |||
{name: 'quota1', col: [1]}, | |||
{name: 'quota2', col: [2]}, | |||
])], | |||
created() { | |||
this.getDataList(); | |||
this.$store.dispatch("base/getQuota1List", 1); |
@@ -74,7 +74,7 @@ | |||
<script> | |||
import search from "../assessingTarget/search"; | |||
import { quota } from "@/utils/mixin"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
import api from "../../api/summary/constraint"; | |||
export default { | |||
name: "constraint", | |||
@@ -111,7 +111,9 @@ export default { | |||
} | |||
}, | |||
}, | |||
mixins: [quota], | |||
mixins: [mergeSpan([ | |||
{name: 'quota', col: [1]} | |||
])], | |||
created() { | |||
this.getDataList(); | |||
this.$store.dispatch("base/getQuota1List", 1); |
@@ -92,7 +92,7 @@ | |||
<script> | |||
import search from "../assessingTarget/search"; | |||
import { assessing } from "@/utils/mixin"; | |||
import { mergeSpan } from "@/utils/mixin"; | |||
import api from "../../api/summary/reward"; | |||
export default { | |||
name: "", | |||
@@ -122,7 +122,10 @@ export default { | |||
components: { | |||
search, | |||
}, | |||
mixins: [assessing], | |||
mixins: [mergeSpan([ | |||
{name: 'quota1', col: [1]}, | |||
{name: 'quota2', col: [2]}, | |||
])], | |||
created() { | |||
this.getDataList(); | |||
this.$store.dispatch("base/getQuota1List", 1); |