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

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

parent 69b0ac43
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
</template> </template>
<script> <script>
// import { getHomeInfo } from "@/api"; import { getMatterFolderList } from "@/api";
import MateralsList from "@/components/MateralsList.vue"; import MateralsList from "@/components/MateralsList.vue";
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
export default { export default {
...@@ -363,16 +363,29 @@ export default { ...@@ -363,16 +363,29 @@ export default {
handleClose() { handleClose() {
this.search = ""; this.search = "";
}, },
// 查看材料列表 // 查看事项
checkMatter(row) { async checkMatter(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss"); let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time); this.SET_operTime(time);
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({ this.$router.push({
path: "/matterify", path: "/matterify",
query: { query: {
matterId: row.id, matterId: row.id,
}, },
}); });
} else {
this.matterInfo = row;
this.visible = true;
}
}
}, },
// 查看材料 // 查看材料
checkMaterial(row) { checkMaterial(row) {
......
...@@ -110,7 +110,11 @@ import SearchBox from "@/components/SearchBox.vue"; ...@@ -110,7 +110,11 @@ import SearchBox from "@/components/SearchBox.vue";
import MateralsList from "@/components/MateralsList.vue"; import MateralsList from "@/components/MateralsList.vue";
import YEmpty from "@/components/YEmpty.vue"; import YEmpty from "@/components/YEmpty.vue";
import YPagination from "@/components/YPagination.vue"; import YPagination from "@/components/YPagination.vue";
import { getSampleformMatterList, getMatterForFlownum } from "@/api"; import {
getSampleformMatterList,
getMatterForFlownum,
getMatterFolderList,
} from "@/api";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
export default { export default {
components: { components: {
...@@ -195,15 +199,28 @@ export default { ...@@ -195,15 +199,28 @@ export default {
this.typeSearch(); this.typeSearch();
}, },
// 查看 // 查看
handleCheck(row) { async handleCheck(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss"); let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time); this.SET_operTime(time);
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({ this.$router.push({
path: "/matterify", path: "/matterify",
query: { query: {
matterId: row.id, matterId: row.id,
}, },
}); });
} else {
this.matterInfo = row;
this.visible = true;
}
}
}, },
// 重置搜索 // 重置搜索
// handleClear() { // handleClear() {
......
...@@ -87,7 +87,7 @@ import SearchBox from "@/components/SearchBox.vue"; ...@@ -87,7 +87,7 @@ import SearchBox from "@/components/SearchBox.vue";
import MateralsList from "../../components/MateralsList.vue"; import MateralsList from "../../components/MateralsList.vue";
import YEmpty from "@/components/YEmpty.vue"; import YEmpty from "@/components/YEmpty.vue";
import YPagination from "@/components/YPagination.vue"; import YPagination from "@/components/YPagination.vue";
import { getDeviceMatterList } from "@/api"; import { getDeviceMatterList, getMatterFolderList } from "@/api";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
export default { export default {
components: { components: {
...@@ -154,16 +154,28 @@ export default { ...@@ -154,16 +154,28 @@ export default {
this.current = cur; this.current = cur;
this.getDeviceMatterList(); this.getDeviceMatterList();
}, },
handleCheck(row) { async handleCheck(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss"); let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time); this.SET_operTime(time);
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({ this.$router.push({
path: "/matterify", path: "/matterify",
query: { query: {
matterId: row.matterId, matterId: row.matterId,
}, },
}); });
} else {
this.matterInfo = row;
this.visible = true;
}
}
}, },
// 重置搜索 // 重置搜索
// handleClear() { // 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