Browse Source

代码上传

zhangqiOMG 2 years ago
parent
commit
4899132702

+ 39 - 17
src/HDrpManagement/customerPortrait/index.vue

@@ -4,7 +4,7 @@
       <div style="padding: 20px 20px 5px 20px;">
         <div class="mt-10">
           <label  class="search__label" >范围:</label>
-          <el-select class="inline-16" v-model="value" size="small" placeholder="请选择范围" clearable @change="selectChange" >
+          <el-select class="inline-16" v-model="value" size="small" placeholder="请选择范围" clearable @change="selectChange">
             <el-option
                 v-for="item in editableTabs"
                 :key="item.index"
@@ -15,17 +15,17 @@
         </div>
       </div>
       <el-scrollbar >
-      <div style="min-width: 1500px;padding: 10px 20px 5px 20px;height:calc(100vh - 350px)">
+      <div style="min-width: 1500px;padding: 10px 20px 5px 20px;height:calc(100vh - 300px)">
         <div style="width: 20%;float: left" >
-          <el-table border :data="list" >
+          <el-table border :data="list" ref="table" highlight-current-row  @row-click="rowClick">
             <el-table-column
                 prop="enterprisename"
                 label="客户名称"
                 width="180">
             </el-table-column>
             <el-table-column
-                prop="name"
-                label="type"
+                prop="type"
+                label="类型"
                 width="180">
             </el-table-column>
             <el-table-column
@@ -35,19 +35,22 @@
               </template>
             </el-table-column>
           </el-table>
-          <el-pagination
-              background
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="param.content.pageNumber"
-              :page-sizes="[20, 50, 100, 200]"
-              :page-size="20"
-              layout="total,sizes, prev, pager, next, jumper"
-              :total="total">
-          </el-pagination>
+          <div style="width: 100%">
+            <el-pagination
+                background
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="param.content.pageNumber"
+                :page-sizes="[20, 50, 100, 200]"
+                :page-size="20"
+                layout="total, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+
         </div>
         <div style="width: 79%;float: right;">
-          <mindmap ref="custom" class="inline-16" style="width:calc(150vh - 130px);height:calc(100vh - 300px) " :id="2132" name="custom"></mindmap>
+          <mindmap v-if="flag" ref="custom" class="inline-16" style="width:calc(150vh - 130px);height:calc(100vh - 300px) " :id="sa_customersid" name="custom"></mindmap>
         </div>
       </div>
       </el-scrollbar>
@@ -65,6 +68,8 @@ export default {
       value:1,
       list:[],
       total:0,
+      flag:false,
+      sa_customersid:'',
       editableTabs:[
         {
           templetname:'我负责的',
@@ -103,6 +108,7 @@ export default {
   methods:{
     selectChange(){
       console.log(this.value,'value')
+      this.listData()
     },
     async listData(){
       this.param.content.type = this.value
@@ -110,7 +116,23 @@ export default {
       this.list = res.data
       this.total = res.total
       console.log(res.data,'客户')
-      this.$refs.custom.getData()
+      this.sa_customersid = res.data[0].sa_customersid
+      this.flag = true
+      this.$nextTick(()=>{
+        this.$refs.custom.getData()
+        this.$refs.table.setCurrentRow(this.list[0])
+      })
+
+    },
+    rowClick(val){
+      console.log(val)
+      this.sa_customersid = val.sa_customersid
+
+      this.$nextTick(()=>{
+        this.$refs.custom.getData()
+        this.flag = true
+      })
+
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);

+ 5 - 1
src/HDrpManagement/projectChange/components/putPeople.vue

@@ -2,11 +2,12 @@
   <div>
     <el-button class="inline-16" v-if="flag === 0 && tool.checkAuth($route.name,'putSubmit')" size="mini" :type="!disabled || rowData.status === '已失败' ?'':'primary'" slot="reference" @click="onSubmit" :disabled="!disabled || rowData.status === '已失败'">提交报备</el-button>
     <el-button class="inline-16" v-if="flag === 1 && tool.checkAuth($route.name,'putCheck')" size="mini" type="primary" slot="reference" @click="onCheck" :disabled="rowData.status === '已失败'" :type="rowData.status === '已失败' ?'':'primary'">报备审核</el-button>
-<!--    <el-button class="inline-16" v-if="flag !== 0 && tool.checkAuth($route.name,'putBack') " size="mini" type="primary" slot="reference"  @click="onUnCheck" :disabled="rowData.status === '已失败'" :type="rowData.status === '已失败' ?'':'primary'">报备驳回(退回)</el-button>-->
+    <el-button class="inline-16" v-if="flag === 2 && tool.checkAuth($route.name,'putBack') " size="mini" type="primary" slot="reference"  @click="onUnCheck" :disabled="rowData.status === '已失败'" :type="rowData.status === '已失败' ?'':'primary'">报备驳回(退回)</el-button>
     <el-drawer
         :visible.sync="drawer"
         append-to-body
         size="90%"
+        @close="onClose"
         :with-header="false">
       <report :url="url"></report>
     </el-drawer>
@@ -152,6 +153,9 @@ export default {
         }
       }
       console.log(this.flag,'报备状态')
+    },
+    onClose(){
+      this.$emit('onClose')
     }
   },
   mounted() {

+ 1 - 0
src/HDrpManagement/projectChange/index.vue

@@ -320,6 +320,7 @@ export default {
       console.log("执行")
       this.$refs['basicLayout'].param.content.type = id
       this.$refs['basicLayout'].param.content.isExport = false
+      this.$refs['basicLayout'].param.content.nocache = true
       this.$refs.basicLayout.param.content.deleted = 0
       this.$refs['basicLayout'].listData()
     },

+ 1 - 1
src/HDrpManagement/projectChange/modules/detail.vue

@@ -18,7 +18,7 @@
     <div slot="customOperation">
       <!-- 此区域提供了自定义操作按钮 -->
       <mindmap class="inline-16" :id="this.$route.query.id" name="project"></mindmap>
-      <putPeople style=" display: inline-block !important;" @putSuccess="putSuccess" v-if="flagTag !== ''" :rowData="mainData" :flagTag="flagTag" :disabled="mainData.disabled"/>
+      <putPeople style=" display: inline-block !important;" @putSuccess="putSuccess" v-if="flagTag !== ''" :rowData="mainData" :flagTag="flagTag" :disabled="mainData.disabled" @onClose="onSuccess"/>
       <projectRecovery class="inline-16" :data="mainData" v-if="tool.checkAuth($route.name,'recovery')  && mainData.status === '已失败'" :disabled="mainData.disabled" @onRecovery="onSuccess"></projectRecovery>
       <duplicatesProject class="inline-16" :data="mainData" v-if="tool.checkAuth($route.name,'queryDuplicates') " :disabled="mainData.disabled" @dialogClose="dialogClose"></duplicatesProject>
       <finish class="inline-16" v-if="tool.checkAuth($route.name,'finish')  && mainData.status === '跟进中'" :disabled="mainData.disabled" @onFinish="onSuccess"></finish>

+ 2 - 1
src/HDrpManagement/projectChange/modules/modules/reportingProgress/index.vue

@@ -5,7 +5,8 @@
           v-for="(activity, index) in list"
           :key="index"
           :timestamp="activity.createDate">
-        {{activity.positionName + activity.actionName + activity.activityName + activity.msg}}
+        {{activity.activityName + ':' + activity.actionName }}<br>
+        {{activity.msg?'留言:' + activity.msg:'留言:' + '-'}}
       </el-timeline-item>
     </el-timeline>
     <el-empty v-if="list.length === 0" description="暂无报备进度" :image-size="40"></el-empty>

+ 157 - 0
src/HDrpManagement/projectPortrait/index.vue

@@ -0,0 +1,157 @@
+<template>
+  <normalLayout>
+    <template #content>
+      <div style="padding: 20px 20px 5px 20px;">
+        <div class="mt-10">
+          <label  class="search__label" >范围:</label>
+          <el-select class="inline-16" v-model="value" size="small" placeholder="请选择范围" clearable @change="selectChange">
+            <el-option
+                v-for="item in editableTabs"
+                :key="item.index"
+                :label="item.templetname"
+                :value="item.templetid"
+            ></el-option>
+          </el-select>
+        </div>
+      </div>
+      <el-scrollbar >
+      <div style="min-width: 1500px;padding: 10px 20px 5px 20px;height:calc(100vh - 300px)">
+        <div style="width: 20%;float: left" >
+          <el-table border :data="list" ref="table" highlight-current-row  @row-click="rowClick">
+            <el-table-column
+                prop="projectname"
+                label="项目名称"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="projecttype"
+                label="项目类型"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="tradefield"
+                label="领域"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                label="负责人">
+              <template slot-scope="scope">
+                {{scope.row.leader[0].name}}
+              </template>
+            </el-table-column>
+          </el-table>
+          <div style="width: 100%">
+            <el-pagination
+                background
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="param.content.pageNumber"
+                :page-sizes="[20, 50, 100, 200]"
+                :page-size="20"
+                layout="total, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+
+        </div>
+        <div style="width: 79%;float: right;">
+          <mindmap v-if="flag" ref="project" class="inline-16" style="width:calc(150vh - 130px);height:calc(100vh - 300px) " :id="sa_projectid" ></mindmap>
+        </div>
+      </div>
+      </el-scrollbar>
+    </template>
+  </normalLayout>
+</template>
+
+<script>
+import mindmap from "@/components/mindmap/project.vue";
+export default {
+  name: "index",
+  components:{mindmap},
+  data() {
+    return {
+      value:1,
+      list:[],
+      total:0,
+      flag:false,
+      sa_projectid:'',
+      editableTabs:[
+        {
+          templetname:'我负责的',
+          templetid:1
+        },
+        {
+          templetname:'我参与的',
+          templetid:2
+        },
+        {
+          templetname:'我下属负责的',
+          templetid:3
+        },
+        {
+          templetname:'我下属参与的',
+          templetid:4
+        },
+        {
+          templetname:'我创建的',
+          templetid:5
+        }
+      ],
+      param:{
+        "id":20221020143502,
+        "content":{
+          "pageNumber": 1,
+          "pageSize": 20,
+          "type":'',
+          "deleted": 0,
+          "isExport": false,
+          "isend": 0
+        }
+      }
+    }
+  },
+  methods:{
+    selectChange(){
+      this.listData()
+    },
+    async listData(){
+      this.param.content.type = this.value
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.sa_projectid = res.data[0].sa_projectid
+      this.flag = true
+      this.$nextTick(()=>{
+        this.$refs.project.getData()
+        this.$refs.table.setCurrentRow(this.list[0])
+      })
+    },
+    rowClick(val){
+      console.log(val)
+      this.sa_projectid = val.sa_projectid
+      this.$nextTick(()=>{
+        this.$refs.project.getData()
+        this.flag = true
+      })
+
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+  },
+  mounted() {
+    this.listData()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 196 - 0
src/HDrpManagement/salerPortrait/index.vue

@@ -0,0 +1,196 @@
+<template>
+  <normalLayout>
+    <template #content>
+      <div style="padding: 20px 20px 5px 20px;">
+        <div class="mt-10">
+          <label  class="search__label" >范围:</label>
+            <el-cascader  size="small" ref="selectdep" :options="deplist" :props="{emitPath:true,expandTrigger:'hover',checkStrictly:true,label:'label',value:'departmentid',children:'children'}"  @change="selectDep"  clearable></el-cascader>
+        </div>
+      </div>
+      <el-scrollbar >
+      <div style="min-width: 1500px;padding: 10px 20px 5px 20px;height:calc(100vh - 300px)">
+        <div style="width: 20%;float: left" >
+          <el-table border :data="list" ref="table" highlight-current-row  @row-click="rowClick">
+            <el-table-column
+                prop="name"
+                label="人员"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="depname"
+                label="部门"
+                width="180">
+            </el-table-column>
+            <el-table-column
+                prop="tradefield"
+                label="区域"
+                width="180">
+            </el-table-column>
+          </el-table>
+          <div style="width: 100%">
+            <el-pagination
+                background
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="personParam.content.pageNumber"
+                :page-sizes="[20, 50, 100, 200]"
+                :page-size="20"
+                layout="total, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+
+        </div>
+        <div style="width: 79%;float: right;">
+          <mindmap v-if="flag" ref="saler" class="inline-16" style="width:calc(150vh - 130px);height:calc(100vh - 300px) " :id="hrid" ></mindmap>
+        </div>
+      </div>
+      </el-scrollbar>
+    </template>
+  </normalLayout>
+</template>
+
+<script>
+import mindmap from "@/components/mindmap/saler.vue";
+export default {
+  name: "index",
+  components:{mindmap},
+  data() {
+    return {
+      value:[],
+      list:[],
+      total:0,
+      flag:false,
+      hrid:'',
+      depmentParam:{
+        "id": 20230620102004,
+        "content": {
+        }
+      },
+      deplist:[],
+      personParam:{
+        "id": 20221102090303,
+        "content": {
+          "containssub":1,
+          "departmentids":[],
+          "pageNumber": 1,
+          "pageSize": 20,
+          "isExport":0
+        }
+      }
+    }
+  },
+  methods:{
+    selectChange(){
+      this.listData()
+    },
+    async departmentrtment() {
+      const res = await this.$api.requested(this.depmentParam)
+      this.deplist = this.createMenu(res.data.dep)
+      console.log(this.deplist,'部门列表')
+      this.personParam.content.departmentids = [this.deplist[0].departmentid]
+      this.value = this.deplist[0].label
+      console.log(this.value,'项目选择')
+      this.listData()
+      /*this.range = JSON.parse(window.sessionStorage.getItem('active_account')).name*/
+    },
+    createMenu (array) {
+      var that = this
+      let arr = []
+      function convertToElementTree(node) {
+        // 新节点
+        if (node.subdep.length === 0){
+          var elNode = {
+            label: node["depname"],
+            parentid:node['parentid'],
+            parentname:node['parentname'],
+            departmentid:node["departmentid"],
+            value:node["departmentid"],
+            remarks:node["remarks"],
+            isused:node["isused"],
+            changedate:node['changedate'],
+            changeby:node['changeby'],
+            createdate:node['createdate'],
+            createby:node['createby'],
+            depno:node['depno'],
+            disabled:that.pageOnlyRead,
+          }
+        }else {
+          var elNode = {
+            label: node["depname"],
+            parentid:node['parentid'],
+            parentname:node['parentname'],
+            departmentid:node["departmentid"],
+            value:node["departmentid"],
+            remarks:node["remarks"],
+            isused:node["isused"],
+            changedate:node['changedate'],
+            changeby:node['changeby'],
+            createdate:node['createdate'],
+            createby:node['createby'],
+            depno:node['depno'],
+            disabled:that.pageOnlyRead,
+            children: []
+          }
+        }
+        if (node.subdep && node.subdep.length > 0) {
+          // 如果存在子节点
+          for (var index = 0; index < node.subdep.length; index++) {
+            // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
+            elNode.children.push(convertToElementTree(node.subdep[index]));
+          }
+        }
+        return elNode;
+      }
+      array.forEach((element) => {
+        arr.push(convertToElementTree(element))
+      });
+      return arr
+    },
+    selectDep(val) {
+      let dataDep = this.$refs.selectdep.getCheckedNodes(true)[0].data
+      this.value = dataDep.label
+      this.personParam.content.departmentids = [val[val.length-1]]
+      this.listData()
+    },
+    async listData(){
+      const res = await this.$api.requested(this.personParam)
+      this.list = res.data
+      this.total = res.total
+      this.hrid = res.data[0].hrid
+      this.flag = true
+      this.$nextTick(()=>{
+        this.$refs.saler.getData()
+        this.$refs.table.setCurrentRow(this.list[0])
+      })
+    },
+    rowClick(val){
+      console.log(val)
+      this.hrid = val.hrid
+      this.$nextTick(()=>{
+        this.$refs.saler.getData()
+        this.flag = true
+      })
+
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.personParam.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.personParam.content.pageNumber = val
+      this.listData()
+    },
+  },
+  mounted() {
+   /* this.listData()*/
+    this.departmentrtment()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 61 - 6
src/components/mindmap/custom.vue

@@ -1,9 +1,38 @@
 <template>
-  <div style="background:#f1f2f3;" id="full">
+  <div style="background:#f1f2f3;" id="full" :style="contentStyle">
     <img style="width: 25px; height: 25px;float: right" v-if="!fullscreen" @click="enterFullscreen" src="@/assets/icons/amplify.svg" title="全屏">
     <img style="width: 25px; height: 25px;float: right" @click="backFullscreen" v-if="fullscreen" src="@/assets/icons/reduce.svg" title="还原">
-    <div :style="contentStyle" id="container">
+    <div  id="container">
     </div>
+    <el-drawer
+        :visible.sync="drawer"
+        append-to-body
+        size="600px"
+        :with-header="false">
+      <p style="padding: 10px 0px 0px 10px">合同列表</p>
+<!--      <el-divider></el-divider>-->
+      <div style="padding: 10px 0px 0px 10px">
+        <el-table
+            :data="tableData"
+            border
+            style="width: 100%">
+          <el-table-column
+              prop="title"
+              label="合同名称"
+              width="0">
+          </el-table-column>
+          <el-table-column
+              prop="operation"
+              width="100"
+              label="操作">
+            <template slot-scope="scope">
+<!--              <el-input v-model="scope.row.remarks" placeholder="输入订单备注" size="mini" @change="rowChange(scope.row,scope.$index)"></el-input>-->
+              <el-button size="mini" type="text" @click="rowChange(scope.row)">详 情</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
@@ -335,7 +364,7 @@ G6.registerNode('card-node', {
         });
       });
     }
-    
+
     if (nodeUrl) {
       group.addShape('text', {
         attrs: {
@@ -364,6 +393,8 @@ export default {
   data () {
     return {
       fullscreen:false,
+      drawer:false,
+      tableData: []
     }
   },
   mounted () {
@@ -386,6 +417,7 @@ export default {
           info:node['info']?node['info']:{},
           infoSize:node['infoSize']?node['infoSize']:1,
           value:node['labor']?node['labor'] !== node['name']?node['labor']:'-':'-',
+          data:node['data'],
           children: [],
           nodeUrl:HASLINKS.includes(node['name'])?'123':null
         }
@@ -449,11 +481,13 @@ export default {
       graph.data(this.createMenu([res.data])[0]);
       graph.render();
       graph.fitView();
-      
-      
+
+
       graph.on('node:click', evt => {
         const item = evt.item;
-        console.log(item)
+        this.drawer = true
+        console.log(item._cfg.model,'点击列表')
+        this.tableData = item._cfg.model.data
       })
       if (typeof window !== 'undefined')
         window.onresize = () => {
@@ -502,8 +536,29 @@ export default {
         document.msExitFullscreen();
       }
     },
+    rowChange(data){
+        this.$store.dispatch('changeDetailDrawer',false)
+        setTimeout(()=>{
+          let route = this.$route
+          console.log(route,'route')
+          if (route.path !== '/contractDetail') {
+            this.oldRoute = {path:route.path,query:route.query}
+            this.$store.dispatch('setHistoryRouter',this.oldRoute)
+          }
+          this.$router.replace({
+            path:'/contractDetail',
+            query:{
+              id:data.sa_contractid,
+              rowindex:data.rowindex,
+              portrait:'1'
+            }
+          })
+          this.$store.dispatch('changeDetailDrawer',true)
+        },500)
+    }
   },
 
+
 }
 
 </script>

+ 3 - 3
src/components/mindmap/index.vue

@@ -4,9 +4,9 @@
     <el-drawer
       :visible.sync="drawer"
       append-to-body
-      size="60%"
+      size="90%"
       :with-header="false">
-      <custom :contentStyle="{height:'100vh',width:'60vw'}" ref="custom" v-if="name === 'custom'" :id="id"/>
+      <custom :contentStyle="{height:'100vh',width:'100vw'}" ref="custom" v-if="name === 'custom'" :id="id"/>
       <project :contentStyle="{height:'100vh',width:'60vw'}" ref="project" v-else-if="name === 'project'" :id="id"/>
       <saler :contentStyle="{height:'100vh',width:'60vw'}" ref="saler" v-else :id="id"/>
     </el-drawer>
@@ -40,7 +40,7 @@ export default {
             this.$nextTick(()=>{
               this.$refs.custom.getData()
             })
-            
+
             break;
           case 'project':
             console.log(this.$refs.project)

+ 20 - 0
src/router/HDrpManagement.js

@@ -1028,6 +1028,26 @@ const HDrpManagement = [
       keeproute: true,
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/customerPortrait/index')
+  },
+  {
+    path: '/projectportrait',
+    name: 'projectportrait',
+    meta: {
+      title: '项目画像',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/projectPortrait/index')
+  },
+  {
+    path: '/salerportrait',
+    name: 'salerportrait',
+    meta: {
+      title: '业务员画像',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/salerPortrait/index')
   }
 
 ];

+ 3 - 3
src/router/index.js

@@ -110,15 +110,15 @@ let routes = [
           ast_nav:true
         },
         component: () => import(/!* webpackChunkName: "about" *!/ '@/components/mindmap/custom.vue')
-      },*/{
+      },*//*{
         path: '/projectportrait',
         name: 'projectportrait',
         meta: {
           title: '项目画像',
           ast_nav:true
         },
-        component: () => import(/* webpackChunkName: "about" */ '@/components/mindmap/project.vue')
-      },{
+        component: () => import(/!* webpackChunkName: "about" *!/ '@/components/mindmap/project.vue')
+      }*//*{
         path: '/salerportrait',
         name: 'salerportrait',
         meta: {