dev_2022-05-11
luoJunYong.123 3 years ago
parent 3b69fea10e
commit d95f53fe0c
  1. 19
      src/pages/project/list/index.vue
  2. 6
      src/store/modules/project.js

@ -123,7 +123,7 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex"; import { mapState, mapActions, mapMutations } from "vuex";
import util from "@/libs/util"; import util from "@/libs/util";
export default { export default {
@ -216,7 +216,9 @@ export default {
"userId", "roleId" "userId", "roleId"
]), ]),
...mapState("project", [ ...mapState("project", [
"lastSystemId", "assFields" "lastSystemId",
"assFields",
"queryDataStatus",
]) ])
}, },
watch: { watch: {
@ -225,15 +227,28 @@ export default {
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
}, 500); }, 500);
},
queryData: {
handler: function(newVal) {
this.setQueryStatus({...newVal})
},
deep: true
} }
}, },
// created() {
// this.queryData = this.queryDataStatus
// },
mounted() { mounted() {
this.getSystemData(); this.getSystemData();
this.queryData = this.queryDataStatus
}, },
methods: { methods: {
...mapActions("project", [ ...mapActions("project", [
"setSystemId" "setSystemId"
]), ]),
...mapMutations({
setQueryStatus: "project/SET_QUERYDATASTATUS"
}),
getSystemData() { getSystemData() {
this.$get(this.api.getSystemIdBySchool).then(res => { this.$get(this.api.getSystemIdBySchool).then(res => {
if (res.status == 200){ if (res.status == 200){

@ -6,7 +6,8 @@ export default {
state: { state: {
lastSystemId: "", lastSystemId: "",
projectFields: {}, projectFields: {},
assFields: {} assFields: {},
queryDataStatus: {}
}, },
mutations: { mutations: {
SET_SYSTEM_ID: (state, systemId) => { SET_SYSTEM_ID: (state, systemId) => {
@ -17,6 +18,9 @@ export default {
}, },
SET_ASS: (state, assFields) => { SET_ASS: (state, assFields) => {
state.assFields = assFields; state.assFields = assFields;
},
SET_QUERYDATASTATUS: (state, newStatus) => {
state.queryDataStatus = newStatus
} }
}, },
actions: { actions: {

Loading…
Cancel
Save