zhuliu 1 år sedan
förälder
incheckning
10c3aefb92

+ 54 - 0
src/utils/model/iframe/index.vue

@@ -0,0 +1,54 @@
+<template>
+  <div class="myIframe" v-loading="loadLoading" ref="myIframe">
+    <iframe ref="iframe" :src="src" v-bind="$attrs" width="100%"></iframe>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  props: {
+    src:{
+        default:''
+    }
+  },
+  data() {
+    return {
+        loadLoading:false
+    };
+  },
+  watch: {
+    src(){
+        this.loadIframe()
+    }
+  },
+  computed: {},
+  created() {},
+  mounted() {
+    this.loadIframe()
+  },
+  methods: {
+    loadIframe(){
+        if(!this.src){
+            return
+        }
+        var that = this
+        this.$nextTick(()=>{
+            var a = that.$refs.iframe
+            a.onload = function() {
+                that.loadLoading = false
+            };
+            if(a.contentDocument.readyState == 'complete'){
+                that.loadLoading = false
+            }
+        })
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.myIframe{
+    width: 100%; 
+    height: 100%; 
+}
+</style>

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

@@ -17,6 +17,7 @@ import myImageViewer from './imageViewer/index'
 import myUpload from './upload/index'
 import myCascader from './Cascader/index'
 import myTooltip from './tooltip/index'
+import myIframe from './iframe'
 
 //tab
 import myTabs from './tabs/index'
@@ -41,6 +42,7 @@ var models = {
   myUpload,
   myCascader,
   myTooltip,
+  myIframe,
 
   //tab
   myTabs,

+ 97 - 40
src/utils/model/myView/index.vue

@@ -24,11 +24,13 @@
       return {
         direction: null,
         className: 'myView_Middle',
+        haveIframe:false
       }
     },
     watch: {
       position() {
         this.directionRule()
+        this.getShow()
       },
       showView(){
         this.getShow()
@@ -41,6 +43,7 @@
       this.directionRule()
       this.getShow()
       this.getMouse()
+      
       window.addEventListener('resize',this.EventListener)
     },
     methods: {
@@ -68,14 +71,42 @@
             }
           }
       },
+      checkIframe(){
+        if(!this.showView){
+          return false
+        }
+        // 获取所有的 iframe 元素
+        var iframes = document.getElementsByClassName('myIframe');
+        
+        if (iframes.length > 0) {
+            this.haveIframe = true
+        }
+      },
+      changeIframe(display){
+        // 获取所有的 iframe 元素
+        var iframes = document.getElementsByClassName('myIframe');
+        for(var i = 0;i<iframes.length;i++){
+          iframes[i].style.pointerEvents = display
+        }
+      },
       getShow(){
         var dom = this.$refs.myView
         var display = this.showView?'block':'none'
         if(!this.showView){
             dom.childNodes[0].style.width = '100%'
+            dom.childNodes[0].style.height = '100%'
         }else{
           dom.childNodes[0].style.width = '100%'
           dom.childNodes[2].style.width = '100%'
+          dom.childNodes[0].style.height = '100%'
+          dom.childNodes[2].style.height = '100%'
+        }
+        if (this.direction == 'row' || this.direction == 'row-reverse') {
+          dom.childNodes[1].style.height = '100%'
+          dom.childNodes[1].style.width = '5px'
+        } else {
+          dom.childNodes[1].style.height = '5px'
+          dom.childNodes[1].style.width = '100%'
         }
         dom.style.setProperty('--displays',`${display}`)
       },
@@ -125,56 +156,82 @@
         var startY = e.clientY;
         // 目标元素距离顶部的距离
         now.Top = now.offsetTop;
+        this.checkIframe()
         // 鼠标拖动
         document.onmousemove = (e) => {
-          if (this.direction == 'row' || this.direction == 'row-reverse') {
-            var endX = e.clientX;
-            // (endx-startx)=移动的距离。
-            // now.left + 移动的距离 - 整个盒子距离左侧的距离 = 左边区域最后的宽度
-            var moveLen = now.left + (endX - startX) - box.offsetLeft;
-            // 容器宽度 - 左边区域的宽度 = 右边区域的宽度
-            var maxT = box.clientWidth - now.offsetWidth;
-            // 左边区域的最小宽度为150px
-            if (moveLen < 150) moveLen = 150;
-            //右边区域最小宽度为150px
-            if (moveLen > maxT - 150) moveLen = maxT - 150;
-            // 设置目标元素距离左侧区域的距离
-            now.style.left = moveLen;
-            // 左侧(上一个)的兄弟元素
-            prev.style.width = moveLen + 'px';
-            // prev.style.width = moveLen / box.clientWidth * 100 + '%';
-            now.style.width = '5px'
-            if (next) {
-              next.style.width = box.clientWidth - moveLen - 5 + 'px';
-              // next.style.width = (box.clientWidth - moveLen - 5)/ box.clientWidth * 100 + '%';
-            }
-          } else {
-            var endY = e.clientY;
-            // (endx-startx)=移动的距离。 
-            // now.Top + 移动的距离 - 整个盒子距离上边的距离= 上边区域最后的宽度
-            var moveLen = now.Top + (endY - startY) - box.offsetTop;
-            // 容器宽度 - 上边区域的宽度 = 下边区域的宽度
-            var maxT = box.clientHeight - now.offsetHeight;
-            // 上边区域的最小宽度为150px
-            if (moveLen < 150) moveLen = 150;
-            //下边区域最小宽度为150px
-            if (moveLen > maxT - 150) moveLen = maxT - 150;
-            // 设置目标元素距离顶部的距离
-            now.style.left = moveLen;
-            // 左侧(上一个)的兄弟元素
-            prev.style.height = moveLen + 'px';
-            now.style.height = '5px'
-            if (next) {
-              next.style.height = (box.clientHeight - moveLen) + 'px';
-            }
+          window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
+          if(this.haveIframe){
+            this.changeIframe('none')
+          }
+          var endX = e.clientX;
+          var endY = e.clientY;
+          // now.left + 移动的距离 - 整个盒子距离左侧的距离 = 左边区域最后的宽度
+          var moveLenX = now.left + (endX - startX) - box.offsetLeft;
+          // now.Top + 移动的距离 - 整个盒子距离上边的距离= 上边区域最后的宽度
+          var moveLenY = now.Top + (endY - startY) - box.offsetTop;
+          // 容器宽度 - 左边区域的宽度 = 右边区域的宽度
+          var maxTX = box.clientWidth - now.offsetWidth;
+          // 容器宽度 - 上边区域的宽度 = 下边区域的宽度
+          var maxTY = box.clientHeight - now.offsetHeight;
+          // 左边区域的最小宽度为150px
+          if (moveLenX < 150) moveLenX = 150;
+          //右边区域最小宽度为150px
+          if (moveLenX > maxTX - 150) moveLenX = maxTX - 150;
+          // 上边区域的最小宽度为150px
+          if (moveLenY < 150) moveLenY = 150;
+          //下边区域最小宽度为150px
+          if (moveLenY > maxTY - 150) moveLenY = maxTY - 150;
+
+          switch(this.direction){
+            case 'row':
+              // 设置目标元素距离左侧区域的距离
+              now.style.left = moveLenX;
+              prev.style.width = moveLenX + 'px';
+              now.style.width = '5px'
+              if (next) {
+                next.style.width = box.clientWidth - moveLenX - 5 + 'px';
+              }
+              break;
+            case 'row-reverse':
+              now.style.left = moveLenX;
+              next.style.width = moveLenX + 'px';
+              now.style.width = '5px'
+              if (prev) {
+                prev.style.width = box.clientWidth - moveLenX - 5 + 'px';
+              }
+              break;
+            case 'column':
+              // 设置目标元素距离顶部的距离
+              now.style.top = moveLenY;
+              // 左侧(上一个)的兄弟元素
+              prev.style.height = moveLenY + 'px';
+              now.style.height = '5px'
+              if (next) {
+                next.style.height = (box.clientHeight - moveLenY) + 'px';
+              }
+              break;
+            case 'column-reverse':
+              // 设置目标元素距离顶部的距离
+              now.style.top = moveLenY;
+              // 左侧(上一个)的兄弟元素
+              next.style.height = moveLenY + 'px';
+              now.style.height = '5px'
+              if (prev) {
+                prev.style.height = (box.clientHeight - moveLenY) + 'px';
+              }
+              break;
           }
         }
         // 鼠标抬起清空按下及拖动事件
         document.onmouseup = (e) => {
+          if(this.haveIframe){
+            this.changeIframe('')
+          }
           document.onmouseup = null;
           document.onmousemove = null;
         }
       },
+
     },
     deactivated(){
       window.removeEventListener('resize',()=>{})

+ 4 - 1
src/views/analyse/custom/components/Charts/Scatter/index.vue

@@ -66,7 +66,10 @@ export default {
             axisLabel: this.getAxisLabel('category', 'y'),
             splitLine: {
               show: this.form.setting.splitLine2
-            }
+            },
+            axisLine:{
+              show:this.form.setting.show2
+            },
           }
         ],
         series: [

+ 6 - 0
src/views/components/setting/mixins.js

@@ -458,6 +458,9 @@ export const chartOption = {
           splitLine: {
             show: this.form.setting.splitLine2
           },
+          axisLine:{
+            show:this.form.setting.show2
+          },
           axisLabel: this.getAxisLabel('value', 'y')
         }
         let series = [{
@@ -528,6 +531,9 @@ export const chartOption = {
           splitLine: {
             show: this.form.setting.splitLine2
           },
+          axisLine:{
+            show:this.form.setting.show2
+          },
           axisLabel: this.getAxisLabel('value', 'y')
         }
         let legend =this.selected.y.length>1? [...this.selected.y]:[]

+ 9 - 1
src/views/home/components/echarts/components/report.vue

@@ -15,7 +15,8 @@ export default {
         type:[],
         count:[]
       },
-      chart:null
+      chart:null,
+      count:0
     };
   },
   watch: {
@@ -69,6 +70,13 @@ export default {
           }
         })
         this.initChart()
+        this.count = 0
+      }else{
+        if(this.count >= 3){
+          return false
+        }
+        await this.init()
+        count ++ 
       }
     },
     initChart() {

+ 1 - 1
src/views/product/components/dialog/addEditCategory.vue

@@ -7,7 +7,7 @@
           <el-input v-model="form.name" placeholder="请输入类别名称"></el-input>
         </el-form-item>
         <el-form-item label="参考许可费率" prop="rate">
-          <el-input v-model="form.licenseRate" placeholder="请输入参考许可费率(介于 0 ~ 1 之间)"></el-input>
+          <el-input-number style="width: 100%;" controls-position="right" :min="0" :max="1" :precision="1" :step="0.1" v-model="form.licenseRate" placeholder="请输入参考许可费率(介于 0 ~ 1 之间)"></el-input-number>
         </el-form-item>
         <el-form-item label="管理人" prop="rate">
           <div class="manage">

+ 1 - 1
src/views/product/components/dialog/addEditMarket.vue

@@ -18,7 +18,7 @@
                 <span>{{ form.licenseRate }}</span>
             </el-form-item>
             <el-form-item label="自定义许可费" prop="customLicenseRate">
-                <el-input v-model="form.customLicenseRate" placeholder="请输入自定义许可费率(许可费率介于0-1之间)"></el-input>
+                <el-input-number style="width: 100%;" controls-position="right" :min="0" :max="1" :precision="1" :step="0.1" v-model="form.customLicenseRate" placeholder="请输入自定义许可费率(许可费率介于0-1之间)"></el-input-number>
             </el-form-item>
         </el-form>
         <div slot="footer" class="dialog-footer">

+ 1 - 1
src/views/product/components/dialog/addEditProduct.vue

@@ -39,7 +39,7 @@
           <el-input v-model="form.companyName" :disabled="form.tenantId?true:false" placeholder="请输入所属公司"></el-input>
         </el-form-item>
         <el-form-item label="参考许可费率" prop="licenseRate">
-          <el-input v-model="form.licenseRate" placeholder="请输入参考许可费率(介于 0 ~ 1 之间)"></el-input>
+          <el-input-number style="width: 100%;" controls-position="right" :min="0" :max="1" :precision="1" :step="0.1" v-model="form.licenseRate" placeholder="请输入参考许可费率(介于 0 ~ 1 之间)"></el-input-number>
         </el-form-item>
         <el-form-item label="管理人" prop="rate">
           <div class="manage">

+ 36 - 46
src/views/project/patentCollection/components/dialog/PatentBatchIndex.vue

@@ -19,14 +19,14 @@
                   <el-date-picker v-model="item.text" @change="changeOption(item)" value-format="yyyy-MM-dd" type="date"
                     size="small" placeholder="选择日期" class="width_100"></el-date-picker>
                 </template>
-                <!-- <template v-if="item.type === 4">
+                <template v-if="item.type === 4">
                   <el-radio-group v-model="item.selected" @change="changeOption(item)">
                     <div v-for="option in item.option" :key="option.id">
                       <el-radio :label="option.id">{{ option.name }}</el-radio>
                     </div>
                   </el-radio-group>
-                </template> -->
-                <template v-if="item.type === 5 || item.type === 4">
+                </template>
+                <template v-if="item.type === 5 ">
                   <el-checkbox-group v-model="item.selected" @change="changeOption(item)">
                     <div v-for="option in item.option" :key="option.id">
                       <el-checkbox :label="option.id">{{ option.name }}</el-checkbox>
@@ -123,29 +123,41 @@ export default {
     // 开关,是否打开请求自定义字段以及架构的值
     change(val) {
       if (val.enabled) {
-        if (val.isCategory == 1) {
-          this.queryProductCategory(val)
-        } else {
-          this.queryCustomOption(val)
+        if(val.options){
+          return
+        }
+        switch (val.type) {
+          case 4:
+          case 5:
+            this.queryCustomOption(item)
+            break;
+          case 6:
+            this.queryProductCategory(item, 4)
+            break;
+          case 7://接口传值类型:1产品类别,2产品,3技术分类,4自定义树
+            this.queryProductCategory(item, 2)
+            break;
+          case 8:
+            this.queryProductCategory(item, 1)
+            break;
+          case 9:
+            this.queryProductCategory(item, 3)
+            break;
         }
       }
     },
-    // 获取自定义字段
+    // 获取标引字段
     async getList() {
       var params = {
-        current: 1,
-        size: 999,
-        searchQuery: `projectId=${this.projectId}`,
-        orderDTOList: [
-          {
-            "orderBy": "createTime",
-            "orderType": 1
-          }
-        ],
+        projectId: this.projectId,
+        taskId: this.taskId
       }
-      await this.$api.queryCustomField(params).then(response => {
-        this.field = response.data.data
+      this.$api.getAllPatentCustomField(params).then(response => {
+        if (response.code == 200) {
+          this.field = response.data.data
+        }
       }).catch(error => {
+        this.field = []
       })
     },
     // 查询自定义栏位选项数据
@@ -164,12 +176,12 @@ export default {
       })
     },
     //获取产品或产品类别架构以及技术分类
-    queryProductCategory(item) {
+    queryProductCategory(item,type) {
       let params = {
         projectId: this.projectId,
         taskId: this.taskId || null,
-        type: item.treeType,//类型:1产品类别,2产品,3技术分类,4自定义树
-        typeId: item.fieldId,//产品或类别id
+        type: type,//类型:1产品类别,2产品,3技术分类,4自定义树
+        typeId: item.id,//产品或类别id
       }
       this.$api.queryTreeNodeTree(params).then(res => {
         if (res.code == 200) {
@@ -181,29 +193,7 @@ export default {
         this.$set(row, 'selected', [])
       })
     },
-    //获取专利信息,拿到产品或产品类别
-    getPatent() {
-      let params = {
-        current: 1,//分页信息及区分同族类型
-        size: 10,//分页信息及区分同族类型
-        projectId: this.projectId,
-        searchQuery: this.searchStr || '',//检索条件
-        customFields: this.customFields || [],
-        orderDTOList: [],//排序信息
-      }
-      this.$api.QueryPatent(params).then(res => {
-        if (res.code == 200) {
-          // treeType 3产品类别 2产品???
-          if (res.data.data[0].trees.length > 0) {
-            res.data.data[0].trees.forEach(item => {
-              item.isCategory = 1
-              this.field.push(item)
-            })
-          }
-        }
-      }).catch(error => {
-      })
-    },
+
     // 打开弹窗
     async open({ selectQuery, searchQuery, customFields ,orderDTOList }) {
       // console.log(selectQuery, searchQuery, customFields);
@@ -212,7 +202,6 @@ export default {
       this.customFields = customFields
       this.orderDTOList = orderDTOList
       await this.getList()
-      this.getPatent()
       this.visible = true
     },
     // 弹窗确定
@@ -228,6 +217,7 @@ export default {
       this.$api.batchAddCustomField(params).then(res => {
         if (res.code == 200) {
           this.$message.success('标引成功')
+          this.$emit('submit',true)
           this.close()
         }
       })

+ 435 - 0
src/views/project/patentCollection/components/dialog/PatentIndexSetting.vue

@@ -0,0 +1,435 @@
+<template>
+  <div>
+    <el-dialog class="no-body-padding-dialog" title="编辑标引" :visible.sync="visible" width="450px" append-to-body destroy-on-close :before-close="close" top="10vh">
+      <el-container class="patent-index-setting">
+        <el-header>
+          <div class="patent-index-setting-title">
+            <span>字段名称:</span>
+            <span class="padding-left_10">{{ customField.name }}</span>
+          </div>
+        </el-header>
+        <el-main class="patent-index-setting-main">
+          <div class="patent-label" v-if="fieldType == 10">
+            <el-tag v-for="label in dynamicLabels" closable :disable-transitions="false" @close="handleCloseLabel(label)">{{ label }}</el-tag>
+            <el-input
+                class="input-new-tag"
+                v-if="inputLabelVisible"
+                v-model="inputLabelValue"
+                ref="saveLabelInput"
+                size="small"
+                @keyup.enter.native="handleInputLabelConfirm"
+                @blur="handleInputLabelConfirm"
+            >
+            </el-input>
+            <el-button v-else class="button-new-tag" size="small" @click="showInputLabel">添加标签</el-button>
+          </div>
+          <div v-else>
+            <template v-if="fieldType == 0 || fieldType == 2 || fieldType == 1">
+              <div v-for="(item, index) in selected" class="custom-input">
+                <el-date-picker v-if="fieldType === 1" v-model="item.label" value-format="yyyy-MM-dd" type="date" size="small" placeholder="选择日期" style="width: 100%;"></el-date-picker>
+                <el-input v-else type="textarea" v-model="item.label" placeholder="请输入内容" size="small"></el-input>
+              </div>
+            </template>
+            <template v-if="fieldType == 4">
+              <el-radio-group v-model="selected">
+                <div v-for="option in customField.option">
+                  <el-radio :label="option.id">{{ option.name }}</el-radio>
+                </div>
+              </el-radio-group>
+            </template>
+            <template v-if="fieldType == 5">
+              <el-checkbox-group v-model="selected">
+                <div v-for="option in customField.option">
+                  <el-checkbox :label="option.id">{{ option.name }}</el-checkbox>
+                </div>
+              </el-checkbox-group>
+            </template>
+            <template v-if="fieldType === 6">
+              <el-tree
+                  ref="tree"
+                  :data="customField.option"
+                  check-strictly
+                  :default-checked-keys="selected"
+                  show-checkbox
+                  node-key="id"
+                  :props="defaultProps"
+              ></el-tree>
+            </template>
+          </div>
+        </el-main>
+      </el-container>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="close">取 消</el-button>
+        <el-button type="primary" @click="submit" :loading="btnLoading">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  props:{
+    projectId:{
+      default:null
+    },
+    taskId:{
+      default:null
+    }
+  },
+  data() {
+    return {
+      btnLoading: false,
+      inputLabelVisible: false,
+      visible: false,
+      customField: {},
+      defaultProps: {
+        children: 'child',
+        label: 'name'
+      },
+      dynamicLabels: [],
+      inputLabelValue: '',
+      field: {},
+      fieldType: 0,
+      fieldId: 0,
+      row: {},
+      selected: [],
+      patent:{},
+      search:{}
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    handleCloseLabel(label) {
+      this.dynamicLabels.splice(this.dynamicLabels.indexOf(label), 1);
+    },
+    handleInputLabelConfirm() {
+      let inputLabelValue = this.inputLabelValue;
+      if (inputLabelValue) {
+        this.dynamicLabels.push(inputLabelValue);
+      }
+      this.inputLabelVisible = false;
+      this.inputLabelValue = '';
+    },
+    showInputLabel() {
+      this.inputLabelVisible = true;
+      this.$nextTick(_ => {
+        this.$refs.saveLabelInput.$refs.input.focus();
+      });
+    },
+    handleDeleteInput(index) {
+      this.selected.splice(index, 1)
+    },
+    handleAddInput(item) {
+      if (!item.label) {
+        this.$message.error('请录入内容')
+        return false
+      }
+      item.value = 0
+      this.selected.push({
+        value: -1,
+        label: ''
+      })
+    },
+    //获取已选中选项值、已添加的值
+    getSelected(item) {
+      let params = {
+        projectId: this.projectId,
+        taskId: this.taskId,
+        fieldType: item.type,
+        fieldId: item.id,
+        patentNo: this.patent.patentNo,
+      }
+      this.$api.getCustomFieldValues(params).then(response => {
+        if (response.code == 200) {
+          // item.selected = response.data.data
+          this.$set(item,'selects',response.data.data)
+          switch (item.type) {
+            case '0'://数字,日期,文字
+            case '1':
+            case '2':
+              var value = [
+                {
+                  label:(item.selects && item.selects.length > 0) ? item.selects[0].value : ''
+                }
+              ]
+              this.$set(this, 'selected', value)
+              break;
+            case '4'://单选
+              this.$set(this, 'selected', (item.selects && item.selects.length > 0) ? item.selects[0].valueId : '')
+              break;
+            case '6'://多选和树
+            case '5':
+              var a = []
+              // item.selectedValue = []
+              a = (item.selects && item.selects.length > 0) ? item.selects.map(item => item.valueId) : []
+              this.$set(this, 'selected', a)
+              break;
+
+            default:
+              break;
+          }
+
+        }
+      }).catch(error => {
+        this.selected = []
+      })
+    },
+    getOption(item) {
+      switch (item.type) {
+        case '0':
+        case '1':
+        case '2':
+          break;
+        case '4':
+        case '5':
+          this.getCustomOption(item)
+          break;
+        case '6':
+          this.queryProductCategory(item, 4)
+          break;
+        case '7'://接口传值类型:1产品类别,2产品,3技术分类,4自定义树
+          this.queryProductCategory(item, 2)
+          break;
+        case '8':
+          this.queryProductCategory(item, 1)
+          break;
+        case '9':
+          this.queryProductCategory(item, 3)
+          break;
+      }
+    },
+    //查询自定义栏位选项
+    getCustomOption(item) {
+      var params = {
+        customFieldId: item.id
+      }
+      this.$api.queryCustomOption(params).then(response => {
+        if (response.code == 200) {
+          this.$set(item, 'option', response.data.data)
+        }
+      }).catch(error => {
+        this.$set(item, 'option', [])
+      })
+    },
+    //获取产品或产品类别架构以及技术分类
+    queryProductCategory(item, type) {
+      let params = {
+        projectId: this.projectId,
+        taskId: this.taskId,
+        type: type,//类型:1产品类别,2产品,3技术分类,4自定义树
+        typeId: item.id,//产品或类别id
+      }
+      this.$api.queryTreeNodeTree(params).then(res => {
+        if (res.code == 200) {
+          this.$set(item, 'option', res.data.data)
+        }
+      }).catch(err => {
+        this.$set(item, 'option', [])
+      })
+    },
+    //获取标签
+    getPatentField(){
+      var params = {
+        projectId : this.projectId,
+        patentNos:[this.patent.patentNo],
+        innerFields:[
+          {
+            fieldType:10,
+            fieldId:0
+          }
+        ]
+      }
+      this.$api.getPatentFields(params).then(response=>{
+        if(response.code == 200){
+          var data = response.data.data
+          if(data && data.length>0){
+            var inner = data[0].innerClassFields
+            if(inner && inner.length>0){
+              this.dynamicLabels = inner[0].fieldValueVOS.map(item=>item.value)
+            }else{
+              this.dynamicLabels = []
+            }
+            
+          }else{
+            this.dynamicLabels = []
+            } 
+        }
+      })
+    },
+    open(obj,patent, field) {
+      this.field = field
+      this.patent = patent
+      this.search = obj
+      this.visible = true
+      this.selected = []
+      this.fieldType = parseInt(field.type)
+      if (field.type !== '10') {
+        this.fieldId = parseInt(field.value)
+        this.customField = {
+          id:field.value,
+          name:field.name,
+          type:field.type
+        }
+        this.getSelected(this.customField)
+        this.getOption(this.customField)
+      } else {
+        this.customField = {
+          name: '标签'
+        }
+        this.getPatentField()
+        
+      }
+    },
+    close() {
+      this.visible = false
+      this.$emit('close')
+    },
+    submit() {
+      this.btnLoading = true
+      if (this.fieldType === 10) {
+        let data = {
+          projectId: this.projectId,
+          patentNo:this.patent.patentNo,
+          labels:this.dynamicLabels
+        }
+        this.$api.addPatentLabel(data).then(response => {
+          this.$message.success('操作成功')
+          this.visible = false
+          this.btnLoading = false
+          this.$emit('submit')
+        }).catch(error => {
+        })
+      } else {
+        let selected = []
+        console.log(this.fieldType)
+        switch (this.fieldType) {
+          case 0:
+          case 1:
+          case 2:
+            selected = [
+              {
+                projectId:this.projectId,
+                taskId:this.taskId,
+                fieldType:this.fieldType,
+                fieldId:this.fieldId,
+                fieldValue:this.selected.map(item=>item.label),
+                optionType:2
+              }
+            ]
+            break
+          case 3:
+            // selected = [{
+            //     projectId:this.projectId,
+            //     taskId:this.taskId,
+            //     fieldType:this.fieldType,
+            //     fieldId:this.fieldId,
+            //     fieldValue:[this.selected]
+            // }]
+            break
+          case 4:
+            selected = [{
+              projectId:this.projectId,
+                taskId:this.taskId,
+                fieldType:this.fieldType,
+                fieldId:this.fieldId,
+                fieldValue:[this.selected],
+                optionType:2
+            }]
+            break
+          case 5:
+              selected = [{
+                projectId:this.projectId,
+                taskId:this.taskId,
+                fieldType:this.fieldType,
+                fieldId:this.fieldId,
+                fieldValue:this.selected,
+                optionType:2
+              }]
+            break;
+          case 6:
+            const keys = this.$refs.tree.getCheckedKeys()
+            // keys.map(item => selected.push({
+            //   value: item,
+            //   label: ''
+            // }))
+              selected = [{
+                projectId:this.projectId,
+                taskId:this.taskId,
+                fieldType:this.fieldType,
+                fieldId:this.fieldId,
+                fieldValue:keys,
+                optionType:2
+              }]
+            break
+        }
+
+        let params = {
+          projectId: this.projectId,
+          ...this.search,//选择的信息
+          esCustomFieldDTOS: selected,
+        }
+        this.$api.batchAddCustomField(params).then(res => {
+          if (res.code == 200) {
+            this.$message.success('标引成功')
+            this.visible = false
+            this.btnLoading = false
+            this.$emit('submit')
+          }
+        }).catch(error => {
+          this.btnLoading = false
+        })
+
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.patent-index-setting {
+  padding: 0 20px;
+  height: 400px !important;
+  .patent-index-setting-title {
+    font-size: 17px;
+  }
+  .patent-index-setting-main {
+    padding: 0;
+    margin: 10px 0;
+  }
+  .patent-label {
+    .el-tag + .el-tag {
+      margin-left: 10px;
+    }
+    .button-new-tag {
+      margin-left: 10px;
+      height: 32px;
+      line-height: 30px;
+      padding-top: 0;
+      padding-bottom: 0;
+    }
+    .input-new-tag {
+      width: 90px;
+      margin-left: 10px;
+      vertical-align: bottom;
+    }
+  }
+  .custom-field-title {
+    font-size: 17px;
+    padding-bottom: 10px;
+    margin-bottom: 15px;
+    border-bottom: 1px solid #c4c4c4;
+  }
+  .custom-input {
+    margin-bottom: 10px;
+    .el-input {
+    }
+    .el-button {
+      float: right;
+    }
+  }
+  .el-checkbox, .el-radio {
+    line-height: 30px;
+  }
+}
+</style>

+ 36 - 3
src/views/project/patentCollection/components/views/Abstract.vue

@@ -199,8 +199,7 @@
 </template>
 
 <script>
-// import { commonMixins } from "../../articles/components/mixins"
-// import { patentViewList, patentKeywordsHighlight } from '../mixins'
+import { downLoad2 } from "@/utils"
 import { projectData, handleData } from '../mixins/index'
 export default {
   mixins: [projectData, handleData],
@@ -289,7 +288,41 @@ export default {
     },
     // pdf下载按钮
     handleDownload(patent) {
-      this.$emit('download', patent)
+      if(patent.pdf && patent.pdf.length>0){
+        this.download(patent)
+        return 
+      }
+      if(this.outside){
+        var params = {
+          appNo: patent.appNo,
+          rowApplicationNo: patent.rowApplicationNo,
+        }
+        this.$api.getCnPdf(params).then(response => {
+          if (response.code == 200) {
+            this.$set(patent, 'pdf', response.data)
+            this.download(patent)
+          }
+        })
+      }else{
+        let params = {
+          appNo: patent.appNo,
+          // type: this.pdfType,//0公开1授权
+        }
+        this.$api.getTextPdf(params).then(response => {
+          if (response.code == 200) {
+            this.$set(patent, 'pdf', response.data)
+            this.download(patent)
+          }
+        })
+      }
+      // this.$emit('download', patent)
+    },
+    download(patent){
+      if(patent.pdf && patent.pdf.length>0){
+        for(var i = 0;i<patent.pdf.length;i++){
+          downLoad2(patent.pdf[i].pdfGuid)
+        }
+      }
     },
     // 已读未读
     handleChangeRead(patent) {

+ 19 - 1
src/views/project/patentCollection/components/views/Table.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="patent-table-list-view height_100" v-DivHeight="getDivHeight">
     <el-table :data="tableData" border style="width: 100%" header-row-class-name="custom-table-header"
-      :maxHeight="tableHeight" @sort-change="sortChange">
+      :maxHeight="tableHeight" @sort-change="sortChange" @cell-click="cellClick" :cell-class-name="cellClassName">
       <el-table-column label="#" width="60" type="index" align="center">
         <template slot-scope="scope">
           <div v-if="refresh">
@@ -125,6 +125,24 @@ export default {
     sortChange({ column, prop, order }) {
       this.$emit('on-sort', { column, prop, order })
     },
+    cellClassName({ row, column, rowIndex, columnIndex }) {
+      if (this.validationCustomField(column.label)) {
+        return 'custom-field-cell'
+      }
+    },
+    validationCustomField(label) {
+      const field = this.column.find(item => item.name === label)
+      if (field && field.ifPersonal) {
+        return field
+      }
+      return false
+    },
+    cellClick(row, column, cell,event){
+      const field = this.validationCustomField(column.label)
+      if (field) {
+        this.$emit('index-setting', row, field)
+      }
+    }
   },
 }
 </script>

+ 33 - 9
src/views/project/patentCollection/index.vue

@@ -171,7 +171,9 @@
     <!-- 创建FTO报告 -->
     <addAndEditReport ref="addAndEditReport"></addAndEditReport>
     <!-- 批量那个标引 -->
-    <PatentBatchIndexVue ref="PatentBatchIndexVue" :projectId="projectId"></PatentBatchIndexVue>
+    <PatentBatchIndexVue ref="PatentBatchIndexVue" @submit="submitIndex" :projectId="projectId"></PatentBatchIndexVue>
+    <!-- 单个栏位标引 -->
+    <patent-index-setting @submit="submitIndex" :projectId="projectId" ref="patentIndexSetting" />
     <!-- 合并发明人/合并权利人、申请人 -->
     <patentInventorMergeDrawer ref="patentInventorMergeDrawer" @mergeClose="mergeClose"></patentInventorMergeDrawer>
   </div>
@@ -191,6 +193,7 @@ import searchPatent from '@/views/report/components/patentList/components/search
 import reportFileDrawer from '@/views/report/components/drawer/reportFileDrawer.vue'
 import addAndEditReport from '@/views/report/components/dialog/addAndEditReport.vue'
 import PatentBatchIndexVue from './components/dialog/PatentBatchIndex.vue'
+import PatentIndexSetting from "./components/dialog/PatentIndexSetting"
 import patentInventorMergeDrawer from './components/drawer/MergeInventor.vue'
 import PatentKeywordsHighlight from '../components/PatentKeywordsHighlight.vue'
 export default {
@@ -206,6 +209,7 @@ export default {
     reportFileDrawer,
     addAndEditReport,
     PatentBatchIndexVue,
+    PatentIndexSetting,
     patentInventorMergeDrawer,
     PatentKeywordsHighlight
   },
@@ -457,7 +461,7 @@ export default {
             var index = patentNos.findIndex(item=>{
               return item == data[i].patentNo
             })
-            if(index){
+            if(index!=-1){
               this.$set(this.tableData[index],'customFields',data[i].innerClassFields)
             }
           }
@@ -712,8 +716,28 @@ export default {
 
 
 
-
-
+    //自定义栏位以及标签设置值
+    async handleIndexSetting(patent, field) {
+      if(!(await this.$permission.projectPermission(this.projectId))){
+        // this.$showPermissionDialog()
+        return false
+      }
+      let obj = {
+        isAdd: [patent.patentNo],
+        isDelete: [],
+        startNumber: 1,
+        endNumber: 0,
+        searchQuery: this.searchStr,
+        customFields: this.customFields,
+        orderDTOList:this.sort,
+      }
+      if (field) {
+        this.$refs.patentIndexSetting.open(obj,patent, field)
+      }
+    },
+    submitIndex(){
+      this.getList()
+    },
 
 
 
@@ -762,11 +786,11 @@ export default {
       })
     },
     //自定义栏位以及标签设置值
-    handleIndexSetting(patent, field) {
-      if (field) {
-        this.$refs.patentIndexSetting.open(this.queryParams.projectId, patent, field)
-      }
-    },
+    // handleIndexSetting(patent, field) {
+    //   if (field) {
+    //     this.$refs.patentIndexSetting.open(this.queryParams.projectId, patent, field)
+    //   }
+    // },
 
     //取消编辑
     // changeRefresh() {

+ 1 - 81
src/views/project/patentDetails/components/PatentField.vue

@@ -240,87 +240,7 @@ export default {
           this.getOptionsAndSelected()
         }
       }).catch(error => {
-        this.customField = [
-          {
-            "id": 10,
-            "name": "相似度",
-            "projectId": 101,
-            "type": 6,
-            "description": "",
-            "status": true,
-            "createId": "328",
-            "createName": "朱豪",
-            "createTime": "2023-12-15 14:52:42"
-          },
-          {
-            "id": 11,
-            "name": "多选",
-            "projectId": 101,
-            "type": 5,
-            "description": "",
-            "status": true,
-            "createId": "328",
-            "createName": "朱豪",
-            "createTime": "2023-12-15 14:54:03"
-          },
-          {
-            "id": 12,
-            "name": "单选",
-            "projectId": 101,
-            "type": 4,
-            "description": "",
-            "status": true,
-            "createId": "328",
-            "createName": "朱豪",
-            "createTime": "2023-12-15 14:54:29",
-            selected: [
-              {
-                id: 1,
-                name: '选项'
-              }
-            ],
-            selectedId: 1,
-            option: [
-              {
-                id: 1,
-                name: '选项'
-              }
-            ]
-          },
-          {
-            "id": 13,
-            "name": "文本",
-            "projectId": 101,
-            "type": 2,
-            "description": "",
-            "status": true,
-            "createId": "328",
-            "createName": "朱豪",
-            "createTime": "2023-12-15 14:54:51"
-          },
-          {
-            "id": 14,
-            "name": "日期",
-            "projectId": 101,
-            "type": 1,
-            "description": "",
-            "status": true,
-            "createId": "328",
-            "createName": "朱豪",
-            "createTime": "2023-12-15 14:54:57"
-          },
-          {
-            "id": 15,
-            "name": "数字",
-            "projectId": 101,
-            "type": 0,
-            "description": "",
-            "status": true,
-            "createId": "328",
-            "createName": "朱豪",
-            "createTime": "2023-12-15 14:55:03"
-          }
-        ]
+        this.customField = []
       })
     },
     //获取栏位的选项和选项值(0数字,1日期,2文本,4单选,5多选,6树,7产品8产品类别9技术分类)

+ 12 - 4
src/views/project/patentDetails/components/patentDetails.vue

@@ -65,7 +65,7 @@
             </el-link>
             <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined" :key="item.value"
               v-if="!outside" @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
-            <template v-if="!outside">
+            <template v-if="signPermission">
               <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧菜单'" placement="top">
                 <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'"
                   style="font-size: 25px;position: absolute; right: 10px; margin-top: 5px;color: #2f2f2f; cursor: pointer"
@@ -169,7 +169,7 @@ export default {
   mixins: [projectData, handleData],
   props: {
     projectId: {
-      default: 0
+      default: null
     },
     patentNo: {
       type: String
@@ -204,6 +204,7 @@ export default {
     return {
       loading: false,
       radio: 1,
+      signPermission:false,
       positionList: [
         {
           label: 'tab展示',
@@ -326,11 +327,18 @@ export default {
   },
   created() { },
   mounted() {
-
+    this.getSignPermission()
     this.getPatent()
     this.getPiZhuData()
   },
   methods: {
+    async getSignPermission(){
+      if(!this.outside || this.reportType!=3 || (await this.$permission.projectPermission(this.projectId)) || this.taskId){
+        this.signPermission = true
+      }else{
+        this.signPermission = false
+      }
+    },
     // 获取批注
     getPiZhuData(val) {
       let params = {
@@ -493,7 +501,7 @@ export default {
       return false
     },
     changePosition(val) {
-
+      this.radio = val
     }
   },
 };

+ 1 - 2
src/views/project/patentDetails/components/patentMessage/PatentPDF.vue

@@ -12,7 +12,7 @@
         <div slot="tip" class="el-upload__tip"></div>
       </el-upload> -->
     </div>
-    <iframe v-if="show" :src="src" frameborder="0" :height="height" width="100%"></iframe>
+    <myIframe v-if="show" :src="src" frameborder="0" :height="height" width="100%"></myIframe>
     <div v-else class="no-pdf-file">
       <span>暂无文档</span>
     </div>
@@ -21,7 +21,6 @@
 
 <script>
 import { patentDetails } from './mixins';
-import { Base64 } from 'js-base64';
 export default {
   mixins: [patentDetails],
   props: ['patent', 'projectId', 'patentNo'],