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

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

Loading…
Cancel
Save