}, | }, | ||||
} | } | ||||
export function mergeSpan(params) { | |||||
/** | |||||
* | |||||
* @param {*} params | |||||
* [{name: 'quota, col: [1,2]}] | |||||
*/ | |||||
export function mergeSpan(params) { | |||||
return { | return { | ||||
methods: { | methods: { | ||||
reduceData(data) { | reduceData(data) { |
import tab from "./tab"; | import tab from "./tab"; | ||||
import search from "./search"; | import search from "./search"; | ||||
import api from "@/api/assessingTarget/basicTarget"; | 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 "@riophae/vue-treeselect/dist/vue-treeselect.css"; | ||||
import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | ||||
import { mapGetters } from "vuex"; | import { mapGetters } from "vuex"; | ||||
search, | search, | ||||
Treeselect, | Treeselect, | ||||
}, | }, | ||||
mixins: [assessing], | |||||
mixins: [mergeSpan([ | |||||
{name: 'quota1', col: [1]}, | |||||
{name: 'quota2', col: [2]}, | |||||
])], | |||||
data() { | data() { | ||||
return { | return { | ||||
dataList: [], | dataList: [], |
<script> | <script> | ||||
import api from "@/api/assessingTarget/commonquotatask"; | import api from "@/api/assessingTarget/commonquotatask"; | ||||
import { categoryName } from "@/utils/mixin"; | |||||
import { mergeSpan } from "@/utils/mixin"; | |||||
export default { | export default { | ||||
components: {}, | components: {}, | ||||
data() { | data() { | ||||
created() { | created() { | ||||
this.getDataList(); | this.getDataList(); | ||||
}, | }, | ||||
mixins: [categoryName], | |||||
mixins: [mergeSpan([ | |||||
{name: 'categoryName', col: [1]} | |||||
])], | |||||
methods: { | methods: { | ||||
getDataList() { | getDataList() { | ||||
this.loading = true; | this.loading = true; |
import tab from "./tab"; | import tab from "./tab"; | ||||
import search from "./search"; | import search from "./search"; | ||||
import api from "@/api/assessingTarget/constraint"; | 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 "@riophae/vue-treeselect/dist/vue-treeselect.css"; | ||||
import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | ||||
import { mapGetters } from "vuex"; | import { mapGetters } from "vuex"; | ||||
search, | search, | ||||
Treeselect, | Treeselect, | ||||
}, | }, | ||||
mixins: [quota], | |||||
mixins: [mergeSpan([ | |||||
{name: 'quota', col: [1]} | |||||
])], | |||||
data() { | data() { | ||||
return { | return { | ||||
dataList: [], | dataList: [], |
import tab from "./tab"; | import tab from "./tab"; | ||||
import search from "./search"; | import search from "./search"; | ||||
import api from "@/api/assessingTarget/reward"; | 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 "@riophae/vue-treeselect/dist/vue-treeselect.css"; | ||||
import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | import Treeselect from "@riophae/vue-treeselect"; // 下拉树 | ||||
import { mapGetters } from "vuex"; | import { mapGetters } from "vuex"; | ||||
search, | search, | ||||
Treeselect, | Treeselect, | ||||
}, | }, | ||||
mixins: [assessing], | |||||
mixins: [mergeSpan([ | |||||
{name: 'quota1', col: [1]}, | |||||
{name: 'quota2', col: [2]}, | |||||
])], | |||||
data() { | data() { | ||||
return { | return { | ||||
dataList: [], | dataList: [], | ||||
return item; | return item; | ||||
}); | }); | ||||
this.dataList = this.reduceData(data); | this.dataList = this.reduceData(data); | ||||
// this.dataList = data; | |||||
console.log(this.dataList); | console.log(this.dataList); | ||||
this.count = res.data.data.total; | this.count = res.data.data.total; | ||||
this.$nextTick(() => { | this.$nextTick(() => { |
<script> | <script> | ||||
import search from "./search"; | import search from "./search"; | ||||
import api from "@/api/basicTable/conventionl.js"; | import api from "@/api/basicTable/conventionl.js"; | ||||
import { base } from "@/utils/mixin"; | |||||
import { mergeSpan } from "@/utils/mixin"; | |||||
export default { | export default { | ||||
components: { | components: { | ||||
search, | search, | ||||
}, | }, | ||||
mixins: [base], | |||||
mixins: [mergeSpan([ | |||||
{name: 'year', col: [1]}, | |||||
{name: 'code', col: [2,3]}, | |||||
{name: 'quota1', col: [4]} | |||||
])], | |||||
data() { | data() { | ||||
return { | return { | ||||
dataList: [], | dataList: [], |
<script> | <script> | ||||
import search from "../assessingTarget/search"; | import search from "../assessingTarget/search"; | ||||
import api from "../../api/summary/basicTarget"; | import api from "../../api/summary/basicTarget"; | ||||
import { assessing } from "@/utils/mixin"; | |||||
import { mergeSpan } from "@/utils/mixin"; | |||||
export default { | export default { | ||||
name: "basic-target", | name: "basic-target", | ||||
data() { | data() { | ||||
components: { | components: { | ||||
search, | search, | ||||
}, | }, | ||||
mixins: [assessing], | |||||
mixins: [mergeSpan([ | |||||
{name: 'quota1', col: [1]}, | |||||
{name: 'quota2', col: [2]}, | |||||
])], | |||||
created() { | created() { | ||||
this.getDataList(); | this.getDataList(); | ||||
this.$store.dispatch("base/getQuota1List", 1); | this.$store.dispatch("base/getQuota1List", 1); |
<script> | <script> | ||||
import search from "../assessingTarget/search"; | import search from "../assessingTarget/search"; | ||||
import { quota } from "@/utils/mixin"; | |||||
import { mergeSpan } from "@/utils/mixin"; | |||||
import api from "../../api/summary/constraint"; | import api from "../../api/summary/constraint"; | ||||
export default { | export default { | ||||
name: "constraint", | name: "constraint", | ||||
} | } | ||||
}, | }, | ||||
}, | }, | ||||
mixins: [quota], | |||||
mixins: [mergeSpan([ | |||||
{name: 'quota', col: [1]} | |||||
])], | |||||
created() { | created() { | ||||
this.getDataList(); | this.getDataList(); | ||||
this.$store.dispatch("base/getQuota1List", 1); | this.$store.dispatch("base/getQuota1List", 1); |
<script> | <script> | ||||
import search from "../assessingTarget/search"; | import search from "../assessingTarget/search"; | ||||
import { assessing } from "@/utils/mixin"; | |||||
import { mergeSpan } from "@/utils/mixin"; | |||||
import api from "../../api/summary/reward"; | import api from "../../api/summary/reward"; | ||||
export default { | export default { | ||||
name: "", | name: "", | ||||
components: { | components: { | ||||
search, | search, | ||||
}, | }, | ||||
mixins: [assessing], | |||||
mixins: [mergeSpan([ | |||||
{name: 'quota1', col: [1]}, | |||||
{name: 'quota2', col: [2]}, | |||||
])], | |||||
created() { | created() { | ||||
this.getDataList(); | this.getDataList(); | ||||
this.$store.dispatch("base/getQuota1List", 1); | this.$store.dispatch("base/getQuota1List", 1); |