Преглед изворни кода

修改合并行函数

master
YF-yuan пре 3 година
родитељ
комит
950422669f
9 измењених фајлова са 45 додато и 18 уклоњено
  1. +7
    -1
      src/utils/mixin.js
  2. +5
    -2
      src/views/assessingTarget/basicTarget.vue
  3. +4
    -2
      src/views/assessingTarget/commonquotatask.vue
  4. +4
    -2
      src/views/assessingTarget/constraint.vue
  5. +5
    -3
      src/views/assessingTarget/reward.vue
  6. +6
    -2
      src/views/basicTable/conventional.vue
  7. +5
    -2
      src/views/summary/basicTarget.vue
  8. +4
    -2
      src/views/summary/constraint.vue
  9. +5
    -2
      src/views/summary/reward.vue

+ 7
- 1
src/utils/mixin.js Прегледај датотеку

@@ -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) {

+ 5
- 2
src/views/assessingTarget/basicTarget.vue Прегледај датотеку

@@ -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: [],

+ 4
- 2
src/views/assessingTarget/commonquotatask.vue Прегледај датотеку

@@ -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;

+ 4
- 2
src/views/assessingTarget/constraint.vue Прегледај датотеку

@@ -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: [],

+ 5
- 3
src/views/assessingTarget/reward.vue Прегледај датотеку

@@ -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(() => {

+ 6
- 2
src/views/basicTable/conventional.vue Прегледај датотеку

@@ -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: [],

+ 5
- 2
src/views/summary/basicTarget.vue Прегледај датотеку

@@ -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);

+ 4
- 2
src/views/summary/constraint.vue Прегледај датотеку

@@ -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);

+ 5
- 2
src/views/summary/reward.vue Прегледај датотеку

@@ -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);

Loading…
Откажи
Сачувај