Преглед изворни кода

在线文档-OA逻辑修改

fan пре 2 година
родитељ
комит
6808e15981
2 измењених фајлова са 57 додато и 2 уклоњено
  1. 38 0
      src/components/myMessageNew.vue
  2. 19 2
      src/pages/main/onlineExcel/index.vue

+ 38 - 0
src/components/myMessageNew.vue

@@ -0,0 +1,38 @@
+<template>
+    <div class="myMessage">
+        <el-dialog title="提示" :visible.sync="centerDialogVisible" top="30vh" width="30%" :close-on-press-escape="false"
+                   :show-close="true" :destroy-on-close="true" :modal-append-to-body="false"
+                   :close-on-click-modal="false" :before-close="closemessage">
+            <div style="height: 30px;line-height: 30px;overflow: hidden;">
+                <i class="el-icon-warning" style="font-size: 30px;float:left;padding:0 10px;color: orange;"></i>
+                <span style="height: 30px;line-height: 30px;display: inline-block;float:left">{{messTit}}</span>
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button size="small" type="primary" @click="closemessage(1)">{{yesBtnName}}</el-button>
+                <el-button size="small" @click="closemessage">{{noBtnName}}</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+export default {
+    props: ["centerDialogVisible","messTit",'type','yesBtnName','noBtnName'],
+    data() {
+        return {
+
+        };
+    },
+    methods: {
+        closemessage(v){
+            this.$emit("closeMessage",v)
+        }
+    },
+    mounted() {},
+    created() {},
+};
+</script>
+
+
+<style>
+</style>

+ 19 - 2
src/pages/main/onlineExcel/index.vue

@@ -188,8 +188,8 @@
         </el-dialog>
         <myMessage :messTit='messTit' @closeMessage="processDel" :centerDialogVisible="delVisible"
                    v-if="delVisible"></myMessage>
-        <myMessage :messTit='oaTitle' @closeMessage="processOa" :centerDialogVisible="oaVisible"
-                   v-if="oaVisible"></myMessage>
+        <myMessageNew :messTit='oaTitle' @closeMessage="processOa" :centerDialogVisible="oaVisible"
+                   v-if="oaVisible" yesBtnName="是" noBtnName="否"></myMessageNew>
     </div>
     </fullscreen>
 </template>
@@ -198,6 +198,7 @@
 import pForm from "../../../components/p-form";
 import toolList from "../../../components/toolList";
 import myMessage from "../../../components/myMessage.vue";
+import myMessageNew from "../../../components/myMessageNew.vue";
 import deptTreeUserNew from "../../../components/deptTreeUserNew.vue"
 
 export default {
@@ -205,6 +206,7 @@ export default {
         pForm,
         toolList,
         myMessage,
+        myMessageNew,
         deptTreeUserNew,
     },
     data() {
@@ -722,11 +724,26 @@ export default {
             this.menuStatus = true;
             this.loading = false;
         },
+        getUrlKey(name) {
+            return (
+                decodeURIComponent(
+                    (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
+                        location.href
+                    ) || [, ""])[1].replace(/\+/g, "%20")
+                ) || null
+            );
+        },
     },
     mounted() {
         this.woNo = this.$route.query.woNo
         if (this.woNo != null) {
             this.processWoNo();
+        } else {
+            this.woNo = this.getUrlKey("id")//获取地址栏参数
+            console.log(this.woNo);
+            if (this.woNo != null) {
+                this.processWoNo();
+            }
         }
         this.getList({}, 1);
         this.getTreeData();