Commit 077ad723 authored by “yiyousong”'s avatar “yiyousong”

perf:优化样表查看报表参数

parent 845a5cd2
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
}, },
serviceInfo: { serviceInfo: {
homeUrl: "http://192.168.0.24:8080/#/", homeUrl: "http://192.168.0.24:8080/#/",
serverUrl: "http://112.19.80.237:11078/", serverUrl: "http://192.168.0.98:11078/",
}, },
devicenum: "18-93-7F-C0-AD-B5", devicenum: "18-93-7F-C0-AD-B5",
// devicenum: "B8-13-32-86-9F-04", // devicenum: "B8-13-32-86-9F-04",
......
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
<script> <script>
// import { getHomeInfo } from "@/api"; // import { getHomeInfo } from "@/api";
import MateralsList from "@/components/MateralsList.vue"; import MateralsList from "@/components/MateralsList.vue";
import { mapState } from "vuex"; import { mapState, mapMutations } from "vuex";
export default { export default {
components: { components: {
MateralsList, MateralsList,
...@@ -237,6 +237,7 @@ export default { ...@@ -237,6 +237,7 @@ export default {
}, },
}, },
methods: { methods: {
...mapMutations(["SET_operTime"]),
// 获取首页数据展示 // 获取首页数据展示
// async getHomeInfo() { // async getHomeInfo() {
// let res = await getHomeInfo({}); // let res = await getHomeInfo({});
...@@ -285,11 +286,14 @@ export default { ...@@ -285,11 +286,14 @@ export default {
}, },
// 查看材料列表 // 查看材料列表
checkMatter(row) { checkMatter(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time);
this.matterInfo = row; this.matterInfo = row;
this.visible = true; this.visible = true;
}, },
// 查看材料 // 查看材料
checkMaterial(row) { checkMaterial(row) {
this.SET_operTime("");
this.$router.push({ this.$router.push({
path: "/showmaterials", path: "/showmaterials",
query: { query: {
......
...@@ -106,6 +106,7 @@ import SearchBox from "@/components/SearchBox.vue"; ...@@ -106,6 +106,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 { getSampleformMatterList, getMatterForFlownum } from "@/api"; import { getSampleformMatterList, getMatterForFlownum } from "@/api";
import { mapMutations } from "vuex";
export default { export default {
components: { components: {
Header, Header,
...@@ -142,6 +143,7 @@ export default { ...@@ -142,6 +143,7 @@ export default {
}, },
}, },
methods: { methods: {
...mapMutations(["SET_operTime"]),
// 区分搜索 // 区分搜索
async typeSearch() { async typeSearch() {
let reg = /^[\u4e00-\u9fa5]+$/; let reg = /^[\u4e00-\u9fa5]+$/;
...@@ -188,6 +190,8 @@ export default { ...@@ -188,6 +190,8 @@ export default {
}, },
// 查看 // 查看
handleCheck(row) { handleCheck(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time);
this.matterInfo = row; this.matterInfo = row;
this.visible = true; this.visible = true;
}, },
......
...@@ -83,6 +83,7 @@ import SearchBox from "@/components/SearchBox.vue"; ...@@ -83,6 +83,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 { getDeviceMatterList } from "@/api"; import { getDeviceMatterList } from "@/api";
import { mapMutations } from "vuex";
export default { export default {
components: { components: {
Header, Header,
...@@ -117,6 +118,7 @@ export default { ...@@ -117,6 +118,7 @@ export default {
}, },
}, },
methods: { methods: {
...mapMutations(["SET_operTime"]),
// 获取事项列表 // 获取事项列表
async getDeviceMatterList() { async getDeviceMatterList() {
let res = await getDeviceMatterList({ let res = await getDeviceMatterList({
...@@ -147,6 +149,8 @@ export default { ...@@ -147,6 +149,8 @@ export default {
this.getDeviceMatterList(); this.getDeviceMatterList();
}, },
handleCheck(row) { handleCheck(row) {
let time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
this.SET_operTime(time);
this.matterInfo = row; this.matterInfo = row;
this.visible = true; this.visible = true;
}, },
......
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
import Header from "@/components/Header.vue"; import Header from "@/components/Header.vue";
import { getMaterialsList, checkMaterials } from "@/api"; import { getMaterialsList, checkMaterials } from "@/api";
import local from "@/utils/local"; import local from "@/utils/local";
import { mapGetters } from "vuex";
// import Hammer from "hammerjs"; // import Hammer from "hammerjs";
export default { export default {
components: { components: {
...@@ -126,6 +127,9 @@ export default { ...@@ -126,6 +127,9 @@ export default {
width: 800, width: 800,
}; };
}, },
computed: {
...mapGetters(["operTime"]),
},
created() { created() {
this.getMaterialsList(); this.getMaterialsList();
// this.materailsList=this.matterInfo.matterDatumList; // this.materailsList=this.matterInfo.matterDatumList;
...@@ -202,6 +206,7 @@ export default { ...@@ -202,6 +206,7 @@ export default {
matterFullName, matterFullName,
materialName, materialName,
materialFullName, materialFullName,
operTime: this.operTime ? this.operTime : null,
}); });
}, },
// 切换材料 // 切换材料
......
...@@ -14,6 +14,7 @@ export default new Vuex.Store({ ...@@ -14,6 +14,7 @@ export default new Vuex.Store({
deviceCode: "", // 设备编码 deviceCode: "", // 设备编码
times: 300, // 倒计时时间 times: 300, // 倒计时时间
defaultTimes: 300, // 倒计时时间 defaultTimes: 300, // 倒计时时间
operTime: "", // 样表打开时间
}, },
getters: { getters: {
deviceCode(state) { deviceCode(state) {
...@@ -25,8 +26,14 @@ export default new Vuex.Store({ ...@@ -25,8 +26,14 @@ export default new Vuex.Store({
defaultTimes(state) { defaultTimes(state) {
return state.defaultTimes; return state.defaultTimes;
}, },
operTime(state) {
return state.operTime;
},
}, },
mutations: { mutations: {
SET_operTime(state, operTime) {
state.operTime = operTime;
},
SET_devicenum(state, devicenum) { SET_devicenum(state, devicenum) {
state.devicenum = devicenum; state.devicenum = devicenum;
}, },
......
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