Commit a69c6836 authored by “yiyousong”'s avatar “yiyousong”

perf: 在事项下没有分类时候直接弹出抽屉

parent 69b0ac43
......@@ -264,7 +264,7 @@
</template>
<script>
// import { getHomeInfo } from "@/api";
import { getMatterFolderList } from "@/api";
import MateralsList from "@/components/MateralsList.vue";
import { mapState, mapMutations } from "vuex";
export default {
......@@ -363,16 +363,29 @@ export default {
handleClose() {
this.search = "";
},
// 查看材料列表
checkMatter(row) {
// 查看事项
async checkMatter(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time);
this.$router.push({
path: "/matterify",
query: {
matterId: row.id,
},
let res = await getMatterFolderList({
page: 1,
size: 1,
matterId: row.id,
});
if (res.data.code == 1) {
let { total } = res.data.data;
if (total) {
this.$router.push({
path: "/matterify",
query: {
matterId: row.id,
},
});
} else {
this.matterInfo = row;
this.visible = true;
}
}
},
// 查看材料
checkMaterial(row) {
......
......@@ -110,7 +110,11 @@ import SearchBox from "@/components/SearchBox.vue";
import MateralsList from "@/components/MateralsList.vue";
import YEmpty from "@/components/YEmpty.vue";
import YPagination from "@/components/YPagination.vue";
import { getSampleformMatterList, getMatterForFlownum } from "@/api";
import {
getSampleformMatterList,
getMatterForFlownum,
getMatterFolderList,
} from "@/api";
import { mapMutations } from "vuex";
export default {
components: {
......@@ -195,15 +199,28 @@ export default {
this.typeSearch();
},
// 查看
handleCheck(row) {
async handleCheck(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time);
this.$router.push({
path: "/matterify",
query: {
matterId: row.id,
},
let res = await getMatterFolderList({
page: 1,
size: 1,
matterId: row.id,
});
if (res.data.code == 1) {
let { total } = res.data.data;
if (total) {
this.$router.push({
path: "/matterify",
query: {
matterId: row.id,
},
});
} else {
this.matterInfo = row;
this.visible = true;
}
}
},
// 重置搜索
// handleClear() {
......
......@@ -87,7 +87,7 @@ import SearchBox from "@/components/SearchBox.vue";
import MateralsList from "../../components/MateralsList.vue";
import YEmpty from "@/components/YEmpty.vue";
import YPagination from "@/components/YPagination.vue";
import { getDeviceMatterList } from "@/api";
import { getDeviceMatterList, getMatterFolderList } from "@/api";
import { mapMutations } from "vuex";
export default {
components: {
......@@ -154,16 +154,28 @@ export default {
this.current = cur;
this.getDeviceMatterList();
},
handleCheck(row) {
async handleCheck(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time);
this.$router.push({
path: "/matterify",
query: {
matterId: row.matterId,
},
let res = await getMatterFolderList({
page: 1,
size: 1,
matterId: row.matterId,
});
if (res.data.code == 1) {
let { total } = res.data.data;
if (total) {
this.$router.push({
path: "/matterify",
query: {
matterId: row.matterId,
},
});
} else {
this.matterInfo = row;
this.visible = true;
}
}
},
// 重置搜索
// handleClear() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment