Procházet zdrojové kódy

产品架构以及趋势图

zhuliu před 1 rokem
rodič
revize
cad8d1d1c3

+ 72 - 3
src/icons/icon2/demo_index.html

@@ -55,6 +55,24 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe613;</span>
+                <div class="name">邮箱</div>
+                <div class="code-name">&amp;#xe613;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe614;</span>
+                <div class="name">微信</div>
+                <div class="code-name">&amp;#xe614;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe666;</span>
+                <div class="name">信息</div>
+                <div class="code-name">&amp;#xe666;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe610;</span>
                 <div class="name">text-replacement</div>
                 <div class="code-name">&amp;#xe610;</div>
@@ -318,9 +336,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1699337484516') format('woff2'),
-       url('iconfont.woff?t=1699337484516') format('woff'),
-       url('iconfont.ttf?t=1699337484516') format('truetype');
+  src: url('iconfont.woff2?t=1700449564289') format('woff2'),
+       url('iconfont.woff?t=1700449564289') format('woff'),
+       url('iconfont.ttf?t=1700449564289') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -347,6 +365,33 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-youxiang"></span>
+            <div class="name">
+              邮箱
+            </div>
+            <div class="code-name">.icon-youxiang
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-tubiao-"></span>
+            <div class="name">
+              微信
+            </div>
+            <div class="code-name">.icon-tubiao-
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-xinxi"></span>
+            <div class="name">
+              信息
+            </div>
+            <div class="code-name">.icon-xinxi
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-wenbentihuan"></span>
             <div class="name">
               text-replacement
@@ -744,6 +789,30 @@
           
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-youxiang"></use>
+                </svg>
+                <div class="name">邮箱</div>
+                <div class="code-name">#icon-youxiang</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-tubiao-"></use>
+                </svg>
+                <div class="name">微信</div>
+                <div class="code-name">#icon-tubiao-</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-xinxi"></use>
+                </svg>
+                <div class="name">信息</div>
+                <div class="code-name">#icon-xinxi</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-wenbentihuan"></use>
                 </svg>
                 <div class="name">text-replacement</div>

+ 15 - 3
src/icons/icon2/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4121381 */
-  src: url('iconfont.woff2?t=1699337484516') format('woff2'),
-       url('iconfont.woff?t=1699337484516') format('woff'),
-       url('iconfont.ttf?t=1699337484516') format('truetype');
+  src: url('iconfont.woff2?t=1700449564289') format('woff2'),
+       url('iconfont.woff?t=1700449564289') format('woff'),
+       url('iconfont.ttf?t=1700449564289') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,18 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-youxiang:before {
+  content: "\e613";
+}
+
+.icon-tubiao-:before {
+  content: "\e614";
+}
+
+.icon-xinxi:before {
+  content: "\e666";
+}
+
 .icon-wenbentihuan:before {
   content: "\e610";
 }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/icons/icon2/iconfont.js


+ 21 - 0
src/icons/icon2/iconfont.json

@@ -6,6 +6,27 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "4640891",
+      "name": "邮箱",
+      "font_class": "youxiang",
+      "unicode": "e613",
+      "unicode_decimal": 58899
+    },
+    {
+      "icon_id": "9113017",
+      "name": "微信",
+      "font_class": "tubiao-",
+      "unicode": "e614",
+      "unicode_decimal": 58900
+    },
+    {
+      "icon_id": "23957663",
+      "name": "信息",
+      "font_class": "xinxi",
+      "unicode": "e666",
+      "unicode_decimal": 58982
+    },
+    {
       "icon_id": "5978748",
       "name": "text-replacement",
       "font_class": "wenbentihuan",

binární
src/icons/icon2/iconfont.ttf


binární
src/icons/icon2/iconfont.woff


binární
src/icons/icon2/iconfont.woff2


+ 0 - 2
src/utils/model/index.js

@@ -16,7 +16,6 @@ import myCard from './card/index'
 import myImageViewer from './imageViewer/index'
 import myUpload from './upload/index'
 import myCascader from './Cascader/index'
-import myNodeCopy from './nodeCopy/index'
 import myTooltip from './tooltip/index'
 
 //tab
@@ -41,7 +40,6 @@ var models = {
   myImageViewer,
   myUpload,
   myCascader,
-  myNodeCopy,
   myTooltip,
 
   //tab

+ 0 - 144
src/utils/model/nodeCopy/index.vue

@@ -1,144 +0,0 @@
-<template>
-  <!-- 新增/编辑架构分类节点 -->
-  <div class="nodeCopy">
-    <el-dialog :title="title" :visible.sync="dialogVisible" :before-close="handleClose" width="700px"
-      :close-on-click-modal="false">
-      <div class="margin_bottom_10">
-        <span>是否包含子节点:</span>
-        <!-- display:flex;align-items:center; -->
-        <el-radio v-model="check" :label="false">是</el-radio>
-        <el-radio v-model="check" :label="true">否</el-radio>
-      </div>
-      <div class="margin_bottom_10">
-        <span>所属来源:</span>
-        <el-select v-model="fromValue" size="small" disabled placeholder="请选择">
-          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-          </el-option>
-        </el-select>
-      </div>
-      <div class="margin_bottom_10" v-if="false">
-        <span>所属{{ options.filter(item => { return item.value == fromValue })[0].label }}:</span>
-        <span>{{ affiliation }}</span>
-      </div>
-      <div>
-        <span>树:</span>
-        <div v-if="treeData.length > 0" style="min-height:200px;max-height: 600px;overflow: auto;">
-          <el-tree :data="treeData" ref="tree" :props="props" show-checkbox node-key="id" :check-strictly="check" @check="handleCheck">
-          </el-tree>
-        </div>
-        <div v-else>
-          <div style="padding-left: 20px;">暂无数据</div>
-        </div>
-
-      </div>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="handleClose">取消</el-button>
-        <el-button type="primary" @click="submit">确定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  props: {
-    // 数据源
-    treeData: {
-      type: Array,
-      default: () => {
-        return []
-      }
-    },
-    // 勾选父级是否连带勾选子级,true不连带,false连带
-    checkStrictly: {
-      type: Boolean,
-      default: false,
-    },
-    // 来源
-    source: {
-      type: String,
-      default: '1',
-    },
-    // 所属地,属于那个产品类别或产品等
-    affiliation: {
-      type: String,
-      default: '暂无说明'
-    }
-  },
-  data() {
-    return {
-      // 提示
-      title: '复制分类节点',
-      // 控制弹窗显示与隐藏
-      dialogVisible: false,
-      // 配置项,树节点的显示与层级
-      props: {
-        label: 'name',
-        children: 'child'
-      },
-      // 勾选父级是否连带勾选子级,true不连带,false连带
-      check: this.checkStrictly,
-      // 来源选项
-      options: [
-        { label: '产品类别', value: '1' },
-        { label: '产品', value: '2' },
-        { label: '技术分类', value: '3' },
-        { label: '自定义树', value: '4' },
-      ],
-      // 来源
-      fromValue: this.source,
-      // 存储选中的id
-      checkId: [],
-    }
-  },
-  mounted() {
-
-  },
-  methods: {
-    // 树节点的勾选
-    handleCheck(node, data) {
-      if (this.checkId && this.checkId.length > 0) {
-        let index = this.checkId.findIndex(item => {
-          return item == node.id
-        })
-        if (index != -1) {
-          this.checkId.splice(index, 1)
-        } else {
-          this.checkId.push(node.id)
-        }
-      } else {
-        this.checkId.push(node.id)
-      }
-    },
-    // 打开弹窗
-    open() {
-      this.dialogVisible = true
-    },
-    // 弹窗确定提交 
-    submit() {
-      let is = {
-        checked: this.checkId,
-        check:!this.check,
-      }
-      this.$emit('checkId', is)
-      this.handleClose()
-    },
-    // 关闭
-    handleClose() {
-      this.$refs.tree.setCheckedKeys([]);
-      this.checkId = []
-      this.dialogVisible = false
-    },
-  },
-}
-</script>
-
-<style lang="scss" scoped>
-.nodeCopy {
-  .margin_bottom_10{
-    margin-bottom:10px;
-  }
-  
-}
-</style>

+ 360 - 0
src/views/components/dialog/nodeCopy.vue

@@ -0,0 +1,360 @@
+<template>
+  <div class="nodeCopy">
+    <el-dialog :title="title" :visible.sync="dialogVisible" :before-close="handleClose" width="700px"
+      :close-on-click-modal="false">
+        <div>
+            <div class="margin-bottom_10">
+                <span>是否包含子节点:</span>
+                <el-switch
+                    v-model="form.check"
+                    active-color="#13ce66"
+                    inactive-color="#ff4949">
+                </el-switch>
+            </div>
+            <div class="margin-bottom_10">
+                <span>{{type? '去处':'来源'}}:</span>
+                <el-select v-model="form.value" size="small" :disabled="disable" @change="changeValue" placeholder="请选择">
+                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                </el-select>
+            </div>
+            <!-- <div class="margin_bottom_10" v-if="false">
+                <span>所属{{ options.filter(item => { return item.value == fromValue })[0].label }}:</span>
+                <span>{{ affiliation }}</span>
+            </div> -->
+            <div class="table">
+                <!-- <span>树:</span>
+                <div v-if="treeData.length > 0" style="min-height:200px;max-height: 600px;overflow: auto;">
+                <el-tree :data="treeData" ref="tree" :props="props" show-checkbox node-key="id" :check-strictly="check" @check="handleCheck">
+                </el-tree>
+                </div>
+                <div v-else>
+                <div style="padding-left: 20px;">暂无数据</div>
+                </div> -->
+                <div style="height:calc(100vh - 350px)" v-if="tableData.length>0">
+                    <el-container>
+                        <el-main class="height_100" :loading="loading">
+                            <el-table
+                                class="copyTable"
+                                :data="tableData"
+                                style="width: 100%"
+                                row-key="id"
+                                :expand-row-keys="expends"
+                                @expand-change="handleExpand"
+                                >
+                                <el-table-column type="expand" width="1">
+                                    <template slot-scope="scope">
+                                        <div style="padding: 10px;" :loading="treeLoading">
+                                            <el-tree :data="scope.row.treeData" ref="tree" :props="props" show-checkbox node-key="id" :default-checked-keys="form.nodeIds" :check-strictly="true" @check="handleCheck"></el-tree>
+                                        </div>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column
+                                    prop="index"
+                                    label=""
+                                    width="50px">
+                                    <template slot-scope="scope">
+                                        <div>
+                                            <el-radio-group v-model="form.id">
+                                                <el-radio :label="scope.row.id" @click.native.prevent="changeId(scope.row.id)">{{  }}</el-radio>
+                                            </el-radio-group>
+                                        </div>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column
+                                    prop="name"
+                                    label="姓名">
+                                </el-table-column>
+                            </el-table>
+                        </el-main>
+                        <el-footer class="pagination">
+                            <el-pagination background layout="total, sizes, prev, pager, next, jumper"
+                                :current-page.sync="queryParams.current" :page-size.sync="queryParams.size"
+                                @current-change="handleCurrentChange" @size-change="getData()" :total="total">
+                            </el-pagination>
+                        </el-footer>
+                    </el-container>
+                    
+                    
+                </div>
+            </div>
+        </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="handleClose">取消</el-button>
+        <el-button type="primary" @click="submit">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  props: {},
+  data() {
+    return {
+        // 提示
+        title: '复制分类节点',
+        // 控制弹窗显示与隐藏
+        dialogVisible: false,
+        form:{
+            check:true,
+            value:'',
+            name:'',
+            nodes:[],
+            nodeIds:[],
+            id:''
+        },
+        submitForm:{
+
+        },
+        options: [
+            { label: '产品类别', value: '1' },
+            { label: '产品', value: '2' },
+            { label: '技术分类', value: '3' },
+            { label: '自定义树', value: '4' },
+        ],
+        loading:true,
+        tableData:[],
+        queryParams:{
+            current:1,
+            size:10
+        },
+        total:0,
+        searchOption:{
+
+        },
+        sort:[
+            {
+                "orderBy": "createTime",
+                "orderType": 1
+            }
+        ],
+        // 配置项,树节点的显示与层级
+        props: {
+            label: 'name',
+            children: 'child'
+        },
+        expends:[],
+        treeLoading:false,
+        type:0,
+        disable:false
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {},
+  methods: {
+    /**
+     * 
+     * @param {Object} form 
+     * @param {String} type 0表示复制,1表示粘贴
+     */
+    open(form,type){
+        this.submitForm = form
+        if(!type){
+            this.form.value = form.fromType
+            this.searchOption.category_id = form.fromTypeId
+        }else{
+            this.form.value = form.toType
+            this.searchOption.product_id = form.toTypeId
+        }
+        if(this.form.value){
+            this.disable = true
+            this.getData()
+        }
+        this.type = type || 0
+        this.dialogVisible = true
+    },
+    changeValue(val){
+        this.queryParams.current = 1
+        this.form.nodes = []
+        this.form.nodeIds = []
+        this.getData()
+    },
+    changeId(val){
+        if(this.form.id == val){
+            if(this.expends.indexOf(val)==-1){
+                this.expends = [val]
+            }else{
+                this.expends = []
+            }
+        }else{
+            this.form.id = val
+            this.expends = [val]
+            this.form.nodes = []
+            this.form.nodeIds = []
+            this.getTreeData()
+        }
+    },
+    getData(){
+        switch(this.form.value){
+            case '1':
+                this.queryProductCategory()
+                break;
+            case '2':
+                this.queryProduct()
+                break;
+            case '3':
+                break;
+            case '4':
+                break;
+        }
+    },
+    handleCurrentChange(val){
+        this.queryParams.current = val
+        this.getData()
+    },
+    //获取产品类别列表
+    queryProductCategory(params){
+        var params = {
+            ...this.queryParams,
+            searchQuery:this.$commonJS.objectToString(this.searchOption),//检索条件
+            orderDTOList: this.sort,//排序
+        }
+        this.loading = true
+        this.$api.queryProductCategory(params).then(response=>{
+            if(response.code == 200){
+                this.tableData = response.data.data
+                this.total = response.data.total
+                this.loading = false
+            }
+        }).catch(error=>{
+            this.loading = false
+            this.tableData = []
+            this.total = 0
+        })
+    },
+     //获取产品列表
+     queryProduct(params){
+        var params = {
+            ...this.queryParams,
+            searchQuery:this.$commonJS.objectToString(this.searchOption),//检索条件
+            orderDTOList: this.sort,//排序
+        }
+        this.loading = true
+        this.$api.queryProduct(params).then(response=>{
+            if(response.code == 200){
+                this.tableData = response.data.data
+                this.total = response.data.total
+                this.loading = false
+            }
+        }).catch(error=>{
+            this.loading = false
+            this.tableData = []
+            this.total = 0
+        })
+    },
+    //获取树数据
+    getTreeData(){
+        var index = this.tableData.findIndex(item=>{
+            return item.id == this.expends[0]
+        })
+        if(this.tableData[index].treeData && this.tableData[index].treeData.length>0){
+            return false
+        }
+        let params = {
+            type: this.form.value,//类型:1产品类别,2产品,3技术分类,4自定义树
+            typeId: this.expends[0],//产品类别id
+        }
+        this.treeLoading = true
+        this.$api.queryTreeNodeTree(params).then(res => {
+            if (res.code == 200) {
+                this.tableData[index].treeData = res.data.data
+                this.treeLoading = false
+            }
+        }).catch(err => {
+            this.$message.error(err.message)
+            this.treeLoading = false
+        })
+    },
+    handleCheck(node,data){
+        // console.log(node,data)
+        if(this.type == 1){
+            if(this.form.nodes.length>0){
+                this.$message.warning('只能合并或粘贴到一个节点上')
+            }
+            return false
+        }
+        var index = this.form.nodes.findIndex(item=>{
+            return item.parentId == node.parentId
+        })
+        if(this.form.nodes.length==0 || index != -1){
+            var index2 = this.form.nodeIds.indexOf(node.id)
+            if(index2 == -1){
+                this.form.nodes.push(node)
+                this.form.nodeIds.push(node.id)
+            }else{
+                this.form.nodes.splice(index2,1)
+                this.form.nodeIds.splice(index2,1)
+            }
+        }else{
+            this.$refs.tree.setChecked(node.id , false);
+            this.$message.warning('只允许选择同一层级的且是同一个分支的节点')
+        }
+    },
+    handleExpand(val){
+        var index = this.expends.indexOf(val.id)
+        if(index==-1){
+            this.expends = [val.id]
+            this.getTreeData()
+        }else{
+            this.expends = []
+        }
+    },
+    handleClose(){
+        this.dialogVisible = false
+        this.searchOption = {}
+        this.form={
+            check:true,
+            value:'',
+            name:'',
+            nodes:[]
+        }
+    },
+    submit(){
+        if(!this.type){
+            this.submitForm.fromNodeIds= this.form.nodeIds//选中需要复制的数据
+            this.submitForm.fromType= this.form.value//类型:1产品类别,2产品,3技术分类,4自定义树
+            this.submitForm.fromTypeId=this.form.id//来源目标
+            if(!this.submitForm.fromTypeId){
+                this.$message.error('请选择来源目标')
+                return false
+            }
+        }else{
+            this.submitForm.toType=this.form.value//类型:1产品类别,2产品,3技术分类,4自定义树
+            this.submitForm.toTypeId= this.form.id//产品id
+            this.submitForm.toNodeId= this.form.nodeIds[0]//放到哪一个节点下面
+            if(!this.submitForm.toTypeId){
+                this.$message.error('请选择去往的目标')
+                return false
+            }
+        }
+        this.submitForm.ifCopyChild=this.form.check//是否有子节点 
+        this.$api.copyTreeNode(this.submitForm).then(res => {
+            if (res.code == 200) {
+                this.$message.success('操作成功!')
+                this.$emit('submit','成功')
+                this.handleClose()
+            }
+        }).catch(error=>{
+            this.$message.error(error.message)
+        })
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.table:empty{
+    content:'暂无数据'
+}
+</style>
+<style lang="scss">
+    .copyTable{
+        .el-table__expand-icon{
+            opacity: 0;
+        }
+    }
+    
+</style>

+ 36 - 10
src/views/home/index.vue

@@ -10,7 +10,7 @@
       <div class="home_search">
         <div class="input_search" id="step2">
           <el-input :placeholder="getPlaceholder()" v-model="queryParams.content" class="input-with-select">
-            <el-select v-model="queryParams.select" slot="prepend" placeholder="请选择" style="width:100px">
+            <el-select v-model="queryParams.select" slot="prepend" placeholder="请选择" style="width:130px">
               <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
             </el-select>
             <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
@@ -29,46 +29,57 @@
             <span class="title">知识产权风控与组织记忆系统</span>
           </div>
           <div class="bei">
-            <el-link class="elLink">粤<span class="en">IPC</span>备010101010101</el-link>
+            <el-link :underline="false" class="elLink">粤<span class="en">IPC</span>备010101010101</el-link>
           </div>
         </div>
         <div>
           <div>
-            <el-link class="elLink">联系我们</el-link>
+            <el-link :underline="false" class="elLink">联系我们</el-link>
           </div>
           <div>
-            <el-link class="elLink">反馈建议</el-link>
+            <el-link :underline="false" class="elLink">
+              <span>
+                <i class="iconfont icon-tubiao- plus margin-right_10"></i>
+                <i class="iconfont icon-youxiang"></i>
+              </span>
+            </el-link>
           </div>
         </div>
         <div>
           <div>
-            <el-link class="elLink" href="">官方网站</el-link>
+            <el-link :underline="false" class="elLink">反馈建议</el-link>
           </div>
           <div>
-            <el-link class="elLink en" href="">xswip.cn</el-link>
+            <el-link :underline="false" class="elLink">
+              <span>
+                <i class="iconfont icon-yijianfankui" @click="feedback"></i>
+              </span>
+            </el-link>
           </div>
         </div>
         <div>
           <div>
-            <el-link class="elLink">实时动态</el-link>
+            <el-link :underline="false" class="elLink">实时动态</el-link>
           </div>
           <div class="elLink">
-            <i class="iconfont icon-weixinfang "></i>
+            <i class="iconfont icon-xinxi plus"></i>
           </div>
         </div>
       </div>
     </div>
-
+    <feedback ref="feedback"></feedback>
   </div>
 </template>
 
 <script>
 import carousel from './components/carousel.vue'
 import myEcharts from './components/echarts';
+import feedback from '@/views/layout/components/dialog/feedback.vue';
 export default {
   components: {
     carousel,
-    myEcharts
+    myEcharts,
+    feedback
   },
   data() {
     return {
@@ -134,6 +145,10 @@ export default {
       }
       return a
     },
+    //意见反馈
+    feedback(){
+      this.$refs.feedback.open()
+    },
   }
 }
 </script>
@@ -286,6 +301,9 @@ export default {
         font-family: inherit;
 
         i {
+          font-size: 16px;
+        }
+        .plus{
           font-size: 20px;
         }
       }
@@ -293,4 +311,12 @@ export default {
     }
   }
 }
+</style>
+<style lang="scss">
+.home{
+  .elLink .el-link--default:after, .elLink .el-link--primary.is-underline:hover:after, .elLink .el-link--primary:after{
+    border: none;
+  }
+}
+
 </style>

+ 36 - 18
src/views/product/components/echarts/components/MultipleLine/index.vue

@@ -86,7 +86,6 @@ export default {
    }
   },
   mounted() {
-    
   },
   
   methods: {
@@ -99,7 +98,6 @@ export default {
       // this.$emit('form',this.form)
     },
     open(chartData,name,relation,timeUnit){
-      console.log(chartData,name,relation,timeUnit)
       this.chartData = chartData
       this.relation = relation
       this.name = name
@@ -141,23 +139,43 @@ export default {
       // var myChart1 = this.$echarts.init(chartDom1)
       var timeList = []
       var productNameList = []
+      var productList = []
       var data = []
-      data.push(
-        {
-          name:'',
-          type:'line',
-          connectNulls:true,
-          data:[]
-        }
-      )
-      productNameList=['']
-      timeList = this.chartData.map(item=>{
-        return item[relation.x]
-      })
-      data[0].data = this.chartData.map(item=>{
-        return item[relation.y]
-      })
 
+      for(var i = 0;i<this.chartData.length;i++){
+        var index = productList.findIndex(item=>{
+          return item.id == this.chartData[i].productId
+        })
+        if(index == -1){
+          productNameList.push(this.chartData[i].productName)
+          productList.push({
+            id:this.chartData[i].productId,
+            data:[this.chartData[i]]
+          })
+        }else{
+          productList[index].data.push(this.chartData[i])
+        }
+        var index2 = timeList.indexOf(this.chartData[i][relation.x])
+        if(index2 == -1){
+          timeList.push(this.chartData[i][relation.x])
+        }
+      }
+      for(let i =0;i<productList.length;i++){
+        var timeData = []
+        var productData = productList[i].data
+        for(let j = 0;j<productData.length;j++){
+          var index = timeList.indexOf(productData[j][relation.x])
+          timeData[index] = productData[j][relation.y]
+        }
+        data.push(
+          {
+            name:productNameList[i],
+            type:'line',
+            connectNulls:true,
+            data:timeData
+          }
+        )
+      }
 
       // this.chartData.forEach(item => {
       //   productNameList.push(item.productName)
@@ -207,7 +225,7 @@ export default {
         this.setColor()
       }
       
-      console.log(this.selected)
+      // console.log(this.selected)
       let {backgroundColor, title, legend, xAxis, yAxis, series, grid,toolbox } = this.get2AxisOption('line', '')
       // console.log(legend, xAxis, yAxis, series, grid)
       return {

+ 2 - 2
src/views/product/components/echarts/components/echarts.vue

@@ -1,5 +1,5 @@
 <template>
-    <div style="height:100%;padding:20px">
+    <div style="height:100%;padding:0 20px;">
         <div>
             <div style="display:flex;justify-content: space-between;">
                 <el-form :inline="true">
@@ -163,7 +163,7 @@ export default {
                     return !item.productId
                 }),'趋势总图',relation.label,this.queryParams.timeUnit)
                 this.$refs[this.component].open(this.chartData.filter(item=>{
-                    return item.productId!=0
+                    return item.productId
                 }),name,relation.label,this.queryParams.timeUnit)
             }else{
                 this.$refs[this.component].open(this.chartData,name,relation.label,this.queryParams.timeUnit)

+ 15 - 41
src/views/product/components/framework/viewIndex.vue

@@ -80,14 +80,14 @@
 
     <classifyNode ref="classifyNode" :treeDataPath="treeDataPath" @isSuccess="handleSuccess"></classifyNode>
     <myImageViewer v-if="showImg" :on-close="closeViewer" :src="imgSrc"></myImageViewer>
-    <myNodeCopy v-if="row.type=='2'" ref="nodeCopy" :treeData="categoryTreeData" source="1" :checkStrictly="true" @checkId="handleChecked"></myNodeCopy>
-    
+    <node-Copy ref="nodeCopy" @submit="submitNode"></node-Copy>
   </div>
 </template> 
 
 <script>
 import frameworkTable from './view/table.vue'
 import classifyNode from '../dialog/classifyNode.vue';
+import nodeCopy from '@/views/components/dialog/nodeCopy.vue';
 export default {
   props: {
     name:{
@@ -100,6 +100,7 @@ export default {
   components: {
     frameworkTable,
     classifyNode,
+    nodeCopy
   },
   data() {
     return {
@@ -139,8 +140,6 @@ export default {
       showImg:false,
       //图片地址
       imgSrc: '',
-      // 类别分类架构的数据
-      categoryTreeData: [],
       // 当前节点的id
       nodeId:null,
     }
@@ -162,10 +161,7 @@ export default {
     this.getTableList()
     // 请求架构路径
     this.getPath()
-    // 请求类别的分类架构,用于复制类别架构至产品
-    if (this.row.type == '2') {
-      this.getCategory()
-    }
+
     
   },
   methods: {
@@ -294,8 +290,7 @@ export default {
     // 树节点上复制分类架构
     copy(data, node) {
       this.nodeId=data.id
-      // console.log(data,node);
-      this.$refs.nodeCopy.open()
+      this.openNodeCopy()
     },
     // 树节点点击事件
     handleNodeClick(data, node) {
@@ -308,43 +303,22 @@ export default {
     // 按钮复制分类架构
     handleCopy() {
       this.nodeId=null
-      this.$refs.nodeCopy.open()
+      this.openNodeCopy()
     },
-    // 选中需要复制的类别架构的节点
-    handleChecked(val) {
-      let params = {
-        fromNodeIds: val.checked,//选中需要复制的数据
-        fromType: 1,//类型:1产品类别,2产品,3技术分类,4自定义树
-        fromTypeId:this.row.categoryId,//类别id
-        toType: 2,//类型:1产品类别,2产品,3技术分类,4自定义树
+    openNodeCopy(){
+      var form = {
+        toType: '2',//类型:1产品类别,2产品,3技术分类,4自定义树
         toTypeId: this.row.id,//产品id
         toNodeId: this.nodeId,//放到哪一个节点下面
-        ifCopyChild:val.check,//是否有子节点  
+        fromType: '1',//类型:1产品类别,2产品,3技术分类,4自定义树
+        fromTypeId:this.row.categoryId,//类别id
       }
-      this.$api.copyTreeNode(params).then(res => {
-        if (res.code == 200) {
-          this.nodeId=null
-          this.$message.success('类别分类架构节点复制成功')
-          this.getList()
-          this.getTableList()
-        }
-      })
+      this.$refs.nodeCopy.open(form)
     },
-    // 请求类别架构的数据,用于复制分类架构
-    getCategory() {
-      let params = {
-        type: 1,//类型:1产品类别,2产品,3技术分类,4自定义树
-        typeId: this.row.categoryId,//产品类别id
-      }
-      this.$api.queryTreeNodeTree(params).then(res => {
-        if (res.code == 200) {
-          this.categoryTreeData = res.data.data
-        }
-      }).catch(err => {
-        this.$message.error(err.message)
-      })
+    submitNode(val){
+      this.getList()
+      this.getTableList()
     },
-
     // 请求数据(tree)
     async getList() {
       let params = {

+ 1 - 1
src/views/product/components/market/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="height_100">
     <el-container>
       <el-header>
         <div style="width:100%;display:flex;justify-content:flex-end">