Browse Source

feat: 创建线索、客户、机会

Signed-off-by: tsz <2417024719@qq.com>
tsz 1 year ago
parent
commit
63cd3a7b71

+ 53 - 0
src/components/crm-info/IframeDialog.vue

@@ -0,0 +1,53 @@
+<template>
+  <div class="Iframe-dialog">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="50%"
+      >
+      <iframe src="http://127.0.0.1:8081/swordfish/page_big_pc/unit_portrayal/%E5%AE%9D%E4%B8%B0%E5%8E%BF%E5%9B%AD%E6%9E%97%E7%BB%BF%E5%8C%96%E4%B8%AD%E5%BF%83?resource=BI" width="100%" height="500" frameborder="0"></iframe>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { Dialog } from 'element-ui'
+export default {
+  name: 'Iframe-dialog',
+  components: {
+    [Dialog.name]: Dialog
+  },
+  props: {
+    showDialog: {
+      type: Boolean,
+      default: false
+    }
+  },
+  watch: {
+    showDialog: {
+      handler (newval) {
+        this.dialogVisible = newval
+        if (!newval) {
+          this.getEmployInfo()
+        }
+      },
+      immediate: true
+    },
+    dialogVisible (newval) {
+      this.$emit('setDialogStatus', newval)
+    }
+  },
+  data () {
+    return {
+      dialogVisible: false
+    }
+  },
+  methods: {
+    getEmployInfo () {
+      this.$emit('getEmployInfo')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.Iframe-dialog{}
+</style>

+ 13 - 1
src/components/crm-info/crmAction.vue

@@ -9,11 +9,13 @@
         <span> {{ item.active ? '已' : '' }}{{ item.title }}</span>
       </div>
     </div>
+    <iframe-dialog @getEmployInfo="getEmployEvent" @setDialogStatus="setDialogStatus" :showDialog="setShowDialog"></iframe-dialog>
   </div>
 </template>
 
 <script>
 import '@/assets/style/iconfont.css'
+import iframeDialog from '@/components/crm-info/IframeDialog.vue'
 import { ajaxIgnoreOperate, ajaxEmployOperate, ajaxEmployInfo } from '@/api/modules/'
 export default {
   name: 'crm-action',
@@ -28,6 +30,9 @@ export default {
       }
     }
   },
+  components: {
+    iframeDialog
+  },
   data () {
     return {
       list: [
@@ -35,7 +40,8 @@ export default {
         { title: '忽略', 'icon-0': 'a-Property1hulve', 'icon-1': 'a-Property1yihulve', class: 'ignore', active: 0 },
         { title: '创建客户', 'icon-0': 'chuangjiankehu', 'icon-1': 'chuangjiankehu', class: 'custom', active: 0, msg: 0 }
       ],
-      employInfo: {}
+      employInfo: {},
+      setShowDialog: false
     }
   },
   computed: {
@@ -51,6 +57,9 @@ export default {
     this.getEmployEvent()
   },
   methods: {
+    setDialogStatus (data) {
+      this.setShowDialog = data
+    },
     // 收录情况
     async getEmployEvent () {
       const { data, error_code: code } = await ajaxEmployInfo(this.params)
@@ -70,6 +79,9 @@ export default {
         case 'ignore':
           this.setIgnoreEvent(data)
           break
+        case 'custom':
+          this.setShowDialog = true
+          break
         default:
           break
       }

+ 1 - 1
src/views/portrayal/EntPortrayal.vue

@@ -284,7 +284,7 @@ export default {
     },
     // 是否是BI嵌入页面
     isBIPage () {
-      return this.$route.query.type
+      return this.$route.query.resource
     },
     crmParams () {
       return {

+ 1 - 1
src/views/portrayal/EntSearchPortrayal.vue

@@ -410,7 +410,7 @@ export default {
     },
     // 是否是BI嵌入页面
     isBIPage () {
-      return this.$route.query.type
+      return this.$route.query.resource
     },
     crmParams () {
       return {

+ 1 - 1
src/views/portrayal/UnitPortrayal.vue

@@ -565,7 +565,7 @@ export default {
     },
     // 是否是BI嵌入页面
     isBIPage () {
-      return this.$route.query.type
+      return this.$route.query.resource
     },
     crmParams () {
       return {