|
|
|
|
@ -25,7 +25,10 @@
|
|
|
|
|
<div>
|
|
|
|
|
<div class="list" v-if="list.length > 0">
|
|
|
|
|
<div class="list__item" v-for="i in list" :key="i.id">
|
|
|
|
|
<div class="list__item--pre" v-if="$store.state.reception.select.leixing == 5">
|
|
|
|
|
<div
|
|
|
|
|
class="list__item--pre"
|
|
|
|
|
v-if="$store.state.reception.select.leixing == 5"
|
|
|
|
|
>
|
|
|
|
|
{{ i.wenjian }}【{{ i.nianfen }}】{{ i.bianhao }}号
|
|
|
|
|
</div>
|
|
|
|
|
<div class="list__item--name">{{ i.biaoti }}</div>
|
|
|
|
|
@ -180,20 +183,25 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
typeSelect(i) {
|
|
|
|
|
if (this.$store.state.reception.select.leixing == i.value) {
|
|
|
|
|
typeSelect({ value }) {
|
|
|
|
|
let leixing = this.$store.state.reception.select.leixing
|
|
|
|
|
? this.$store.state.reception.select.leixing.split(",")
|
|
|
|
|
: [];
|
|
|
|
|
if (leixing.find((i) => i == value)) {
|
|
|
|
|
leixing.splice(leixing.indexOf(leixing.find((i) => i == value)), 1);
|
|
|
|
|
this.$store.commit("reception/SET_SELECTED", {
|
|
|
|
|
key: "leixing",
|
|
|
|
|
value: "",
|
|
|
|
|
value: leixing.toString(),
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
leixing.push(value);
|
|
|
|
|
this.$store.commit("reception/SET_SELECTED", {
|
|
|
|
|
key: "leixing",
|
|
|
|
|
value: i.value,
|
|
|
|
|
value: leixing.toString(),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getMaterial()
|
|
|
|
|
this.getMaterial();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getMaterial() {
|
|
|
|
|
@ -229,26 +237,36 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
isSelectedType() {
|
|
|
|
|
return function (i) {
|
|
|
|
|
return i.value == this.$store.state.reception.select.leixing;
|
|
|
|
|
return function ({ value }) {
|
|
|
|
|
let leixing = this.$store.state.reception.select.leixing
|
|
|
|
|
? this.$store.state.reception.select.leixing.split(",")
|
|
|
|
|
: [];
|
|
|
|
|
return leixing.find((i) => i == value);
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
type() {
|
|
|
|
|
return (
|
|
|
|
|
this.formType.find(
|
|
|
|
|
(i) => i.value === this.$store.state.reception.select.leixing
|
|
|
|
|
)?.label || "全部文件"
|
|
|
|
|
);
|
|
|
|
|
return this.formType
|
|
|
|
|
.filter((i) =>
|
|
|
|
|
(this.$store.state.reception.select.leixing
|
|
|
|
|
? this.$store.state.reception.select.leixing.split(",")
|
|
|
|
|
: []
|
|
|
|
|
).find((j) => j == i.value)
|
|
|
|
|
)
|
|
|
|
|
.map((i) => i.label)
|
|
|
|
|
.toString();
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getMaterial();
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
window.getMaterial = this.getMaterial;
|
|
|
|
|
},
|
|
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
|
|
next(vm => {
|
|
|
|
|
vm.getMaterial()
|
|
|
|
|
})
|
|
|
|
|
next((vm) => {
|
|
|
|
|
vm.getMaterial();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|