浏览代码

Merge branch 'linwenxin_workOrder' of ssh://gogs.zfire.top:2222/zfire-front/zfire-newmall-admin

linwenxin 1 年之前
父节点
当前提交
0008a8aa71

二进制
src/assets/yjs.png


二进制
src/assets/ywgdjs.png


+ 15 - 6
src/layout/components/AppMain.vue

@@ -2,9 +2,9 @@
   <section class="app-main" :style="{ paddingTop: show ? '140px' : '80px' }">
     <div class="app-main-view">
       <keep-alive>
-        <router-view v-if="$route.meta.isCache == 1" :key="$route.name" />
+        <router-view v-if="$route.meta.isCache == 1" :key="nameKey" />
       </keep-alive>
-      <router-view v-if="$route.meta.isCache != 1" :key="$route.name"/>
+      <router-view v-if="$route.meta.isCache != 1" :key="nameKey" />
       <zj-watermark color="rgba(200,200,200,.3)" position="absolute" :str="str" zIndex="99" />
     </div>
   </section>
@@ -12,15 +12,22 @@
 
 <script>
 import { mapGetters } from 'vuex'
-
 export default {
   name: 'AppMain',
+  data(){
+    return {
+      key:0
+    }
+  },
   computed: {
     ...mapGetters(['show']),
     str() {
       return this.$store.state?.user?.name
-    }
-  }
+    },
+    nameKey(){
+      return this.$store.state.tagsView.visitedViews.find(item=>item?.name===this.$route?.name)?.nameKey || "0"
+    },
+  },
 }
 </script>
 
@@ -32,10 +39,12 @@ export default {
   position: relative;
   overflow: hidden;
 }
-.fixed-header + .app-main {
+
+.fixed-header+.app-main {
   /* padding-top: 50px; */
   /* padding-top: 80px; */
 }
+
 .app-main-view {
   width: 100%;
   height: 100%;

+ 1 - 1
src/layout/components/TagsView/index.vue

@@ -113,7 +113,7 @@ export default {
     addTags() {
       const { name } = this.$route
       if (name) {
-        this.$store.dispatch('tagsView/addView', this.$route)
+        this.$store.dispatch('tagsView/addView', {...this.$route, nameKey:`${this.$route.name}_${Math.floor(Date.now() / 1000)}`})
       }
       return false
     },

+ 3 - 1
src/permission.js

@@ -27,6 +27,7 @@ function getc(obj) {
     return getc(obj.children[0])
   }
 }
+
 router.beforeEach(async (to, from, next) => {
   NProgress.start()
   document.title = getPageTitle(to.meta.title)
@@ -124,6 +125,7 @@ function buildRoute(route, parentUrl = '', bool = true) {
 
       try {
         item.component = _import(`${fullUrl}/index`)
+        item.component.name = item.name
       } catch (e) {
         console.log(e)
       }
@@ -161,7 +163,7 @@ function buildRoute(route, parentUrl = '', bool = true) {
     } else if (type == 2) {
       try {
         item.component = _import(`${fullUrl}/index`)
-
+        item.component.name = item.name
         if (!pages.find(ite => ite.path === item.path)) {
           item.path = `${item.path}${bool ? '' : ''}`
           pages.push(item)

+ 18 - 6
src/views/workOrder/workOrderPool/index.vue

@@ -43,6 +43,8 @@ import Detail from './detail'
 import Reassignment from "./components/reassignment/index.vue"
 import Reschedule from "./components/reschedule/index.vue"
 import { commonTemplateDownload } from '@/api/common.js'
+import ywgdjs from "@/assets/ywgdjs.png"
+import yjs from "@/assets/yjs.png"
 export default {
   components: {
     TemplatePage,
@@ -306,13 +308,23 @@ export default {
       if (item.jname === 'orderFlags') {
         defaultData.render = (h, { row, index, column }) => {
           return (
-            <div style="padding:0 6px;cursor: pointer;">
+            <div style="padding:0 6px;display:flex;align-items:center;">
               {(row[column.columnAttributes.prop] || []).map(item => {
-                return (
-                  <div style="display: inline-block;border:1px solid #409EFF; color:#409EFF;padding:0 2px;border-radius: 4px;margin:2px 2px 0 0;">
-                    {item.tagName}
-                  </div>
-                )
+                if (item.tagName == "已完工") {
+                  return (
+                    <img src={ywgdjs} style="width:22px;height:22px;" />
+                  )
+                } else if (item.tagName == "已结算") {
+                  return (
+                    <img src={yjs} style="width:22px;height:22px;" />
+                  )
+                } else {
+                  return (
+                    <div style="display: inline-block;border:1px solid #409EFF; color:#409EFF;padding:0 2px;border-radius: 4px;margin:2px 2px 0 0;">
+                      {item.tagName}
+                    </div>
+                  )
+                }
               })}
             </div>
           )