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

优化自动设置父设备

408249787 пре 2 година
родитељ
комит
2e1475820b

+ 1 - 1
src/views/sb/info/modules/DetailC.vue

@@ -431,7 +431,7 @@ export default {
       // const modal = this.$refs.detailSbInfoModal
       console.log(this.model)
       // modal.base(this.model)
-      const routeUrl = this.$router.resolve({ path: '/sb/info/company', query: { parentId: this.model.id } })
+      const routeUrl = this.$router.resolve({ path: '/sb/info/company', query: { parentId: this.model.id, parentName: this.model.name } })
       // let routeUrl = this.$router.resolve(`/share/${96}`)
       window.open(routeUrl.href, '_blank')
     },

+ 8 - 4
src/views/workplace/backlog/NewWorkplaceBacklog.vue

@@ -102,10 +102,12 @@
         </a-col>
         <a-col class="gutter-row" :span="4">
           <div style="height: 471px;display:flex;flex-direction:column;justify-content: space-between">
-            <div class="btn" style="background:linear-gradient(to right,#36B5FA,#26ECF5);" >
-              <my-icon type="icon-chukuguanli" style="font-size:58px;"/>
-              <span>维修</span>
-            </div>
+            <a style="color:#fff;" target="_block" href="/repair/form/mine?type=1">
+              <div class="btn" style="background:linear-gradient(to right,#36B5FA,#26ECF5);" >
+                <my-icon type="icon-chukuguanli" style="font-size:58px;"/>
+                <span>维修</span>
+              </div>
+            </a>
             <div class="btn" style="background:linear-gradient(to right,#FF416D,#FF847F);" @click="$refs.repairForm.base({},{filter: -1})">
               <my-icon type="icon-rukuguanli" style="font-size:58px;"/>
               <span>报修</span>
@@ -347,8 +349,10 @@ export default {
   mounted () {
   },
   updated () {
+    console.log(11)
     if (this.lineData.length > 0 && this.equipmentData.length > 0) {
       this.$nextTick(function () {
+        console.log(1111)
         this.getPieCharts('container-pie')
         this.getLineCharts('container-line')
       })

+ 17 - 11
src/views/workplace/backlog/StoreWorkplaceBacklog.vue

@@ -136,7 +136,7 @@
                 <my-icon type="icon-zichanguanli-zichantiaobo" style="font-size:58px;"/>
                 <span>调拨</span>
               </div>
-              <div class="btn" style="background:linear-gradient(to right,#941FFF,#BC72FB);">
+              <div class="btn" style="background:linear-gradient(to right,#941FFF,#BC72FB);" @click="$refs.addStore.base()">
                 <my-icon type="icon-xinzengyugengxinhuopindangan-copy" style="font-size:58px;"/>
                 <span>新增</span>
               </div>
@@ -201,11 +201,12 @@
     </div>
     <InBaseFrom ref="inBaseModal" @ok="handleOk"></InBaseFrom>
     <OutBaseFrom ref="outBaseModal" @ok="handleOk"></OutBaseFrom>
-
+    <AddStore ref="addStore"></AddStore>
   </div>
 </template>
 
 <script>
+import AddStore from '@/views/store/store/modules/BaseForm.vue'
 import InBaseFrom from '@/views/store/instoreform/modules/BaseForm.vue'
 import OutBaseFrom from '@/views/store/outstoreform/modules/BaseForm.vue'
 
@@ -216,6 +217,7 @@ export default {
   name: 'NewWorkplaceBacklog',
   components: {
     STable,
+    AddStore,
     InBaseFrom,
     OutBaseFrom,
     Chart
@@ -224,10 +226,8 @@ export default {
     return {
       visible: true,
       equipmentData: [
-        { item: '事例一', count: 40, percent: 0.4 }
       ],
       lineData: [
-        { week: '周一', value: 3 }
       ],
       storeNums: 0,
       allCount: 100,
@@ -351,13 +351,19 @@ export default {
   },
   created () {
     this.getDict()
-    console.log(this.role)
-    // this.getInfo()
+    this.getInfo()
   },
   mounted () {
-    this.$nextTick(function () {
-      this.getInfo()
-    })
+  },
+  updated () {
+    if (this.lineData.length > 0 && this.equipmentData.length > 0) {
+      this.$nextTick(function () {
+        console.log(1111)
+        this.getPieCharts('container-pie', this.equipmentData)
+        this.getLineCharts('container-line', this.lineData)
+        console.log(1111)
+      })
+    }
   },
   methods: {
     getDict () {
@@ -388,7 +394,7 @@ export default {
             return pre
           }, [])
         )
-        this.getLineCharts('container-line', data)
+        this.lineData = data
       })
       getWorkplaceBacklogPie(this.role).then(res => {
         const data = res.data.reduce((pre, item) => {
@@ -399,7 +405,7 @@ export default {
           })
           return pre
         }, [])
-        this.getPieCharts('container-pie', data)
+        this.equipmentData = data
       })
     },
     getPieCharts (id, data) {