瀏覽代碼

专题库

zhuliu 1 年之前
父節點
當前提交
54cb1ee47e

+ 29 - 10
src/views/event/components/dialog/addEvent.vue

@@ -249,18 +249,35 @@ export default {
     //获取客户信息
     getAdminClientList() {
       this.$api.getAdminClientList(this.client.queryParams).then(response => {
-        this.clientList.push(...response.data.records)
-        this.client.queryParams.total = response.data.total
+        if(response.code == 200){
+          if(this.clientId){
+            var index = response.data.records.findIndex(item=>{
+              return item.id == this.clientId
+            })
+            if(index!=-1){
+              this.clientList.shift()
+            }
+          }
+          this.clientList.push(...response.data.records)
+          this.client.queryParams.total = response.data.total
+        }
       }).catch(error => {
-
+        
       })
     },
     //打开弹窗,判断是编辑还是添加,同时判断是批量添加还是添加单个事件(type==1是单个,type==2是批量)
-    open(data, type) {
-      this.getAdminClientList()
+    async open(data, type) {
       this.type = type
-      if (data) {
+      if (data && data.id) {
         this.title = '编辑事件'
+        if(data.clientId){
+          this.clientList.push(
+            {
+              id:clientId,
+              name:data.clientName
+            }
+          )
+        }
         this.$set(this.formData, 0, data)
       } else {
         if (this.type == 1) {
@@ -273,21 +290,23 @@ export default {
             name: '',
             eventDate: '',
             description: '',
-            scenarioId: '',
+            clientId:'',
+            scenarioId: data.scenarioId,
           }
         ]
       }
-      console.log(this.formData);
+      this.getAdminClientList()
       this.dialogVisible = true
     },
     //关闭弹窗
     handleClose() {
       if (this.type == '1') {
-        // this.$refs.select.blur()
-        // this.$refs.select2.blur()
         this.$refs.ruleForm.resetFields()
       }
       this.files = []
+      this.client.queryParams.name = null
+      this.client.queryParams.current = 1
+      this.clientList = [];
       this.loading = false
       this.dialogVisible = false
     },

+ 4 - 1
src/views/event/components/index.vue

@@ -316,7 +316,10 @@ export default {
     handleCommand(e) {
       switch(e){
         case '1'://添加单个事件
-          this.$refs.addEvent.open(null, e)
+          var form = {
+            scenarioId : this.scenarioId
+          }
+          this.$refs.addEvent.open(form, e)
           break;
         case '3'://显示栏位管理
           this.$refs.field.open(this.columnList)

+ 6 - 6
src/views/home/components/echarts/components/event.vue

@@ -42,12 +42,12 @@ export default {
           current:1,
           size:999,//分页信息
           searchQuery:'',//检索条件
-          orderDTOList: [
-            {
-              "orderBy": "createTime",
-              "orderType": 1
-            }
-          ],//排序
+          // orderDTOList: [
+          //   {
+          //     "orderBy": "scenarioNames",
+          //     "orderType": 1
+          //   }
+          // ],//排序
           groupBy:'scenarioNames',//分组信息
         }
         var data = []

+ 13 - 2
src/views/project/components/drawer/form.vue

@@ -40,7 +40,7 @@
             <el-form-item label="事件" prop="event" v-if="!ruleForm.id">
               <mySelectButton size='large' style="width:100%" @click="addEvent" >
                     <div style="width:100%">
-                      <el-select style="width:100%" v-model="ruleForm.eventId" @change="changeEvent" filterable remote clearable placeholder="请选择"
+                      <el-select style="width:100%" v-model="ruleForm.eventId" @change="changeEvent" filterable remote :disabled="eventList.disabled" clearable placeholder="请选择"
                         :loading="eventList.loading" v-SelectLazyLoading="loadEvent" :remote-method="remoteEvent">
                         <el-option v-for="item in eventList.data" :key="item.id" :label="item.name" :value="item.id">
                         </el-option>
@@ -300,6 +300,7 @@ export default {
       this.ruleForm = JSON.parse(JSON.stringify(form))
       //获取部门列表
       this.getDepartment()
+      
       if(this.ruleForm.scenarioIds && this.ruleForm.scenarioIds.length!=0){
         this.show=true
         this.onChange()
@@ -311,7 +312,17 @@ export default {
       if(!this.ruleForm.id){
         this.eventList.data = []
         this.eventList.name = ''
-        this.getEventList()
+        this.eventList.disabled = false
+        if(this.ruleForm.eventId){
+          this.eventList.disabled = true
+          this.eventList.data.push({
+            id:this.ruleForm.eventId,
+            name:this.ruleForm.eventName,
+          })
+        }else{
+          this.getEventList()
+        }
+        
       }
 
       this.personnelList.data = []

+ 6 - 3
src/views/project/index.vue

@@ -93,7 +93,8 @@ export default {
     isOperate: '',
     matterId:{},
     scenarioId:{},
-    eventName:''
+    eventName:'',
+    eventId:''
   },
   data() {
     return {
@@ -355,8 +356,10 @@ export default {
         crons: '',
         status: '0',
         sort: 1,
-        matterIds: [],
-        scenarioIds: []
+        matterIds:this.matterId || [],
+        scenarioIds:this.scenarioId || [],
+        eventName:this.eventName,
+        eventId:this.eventId
       }, '新增专利数据库')
     },
     //确认提交专利数据库信息

+ 2 - 14
src/views/report/components/dialog/addAndEditReport.vue

@@ -560,7 +560,6 @@ export default {
     async open(form) {
       var a = ''
       this.form = JSON.parse(JSON.stringify(form))
-      console.log(form);
       if (this.form.id) {
         if (this.$reportPermission(this.form.id, [0, 1])) {
           a = '编辑'
@@ -572,9 +571,8 @@ export default {
         this.$set(this.form, 'systemFileList', [])
         this.$set(this.form, 'fileGuids', [])
         a = '创建'
-        // console.log(1);
       }
-      // console.log(2);
+      
       var reportType = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.reportType })[0].dictChildLabel
       this.title = a + reportType + '报告'
       // 负责人
@@ -583,20 +581,9 @@ export default {
         await this.getPermissionPersonnel(1)
         this.personnelList.queryParams.id = null
       }
-      // console.log(3);
-      // 委托方
-      // if (this.form.entrustId) {
-      //   this.clientList.queryParams.id = this.form.entrustId
-      //   await this.getAllClientList(1)
-      //   this.clientList.queryParams.id = null
-      // }
-
       this.getPermissionPersonnel()
-      // console.log(4);
-      // this.getAllClientList()
       // this.getEventList()
       this.showDialog = true
-      // console.log(5);
     },
 
     /**
@@ -867,6 +854,7 @@ export default {
       // 清空事件相关
       this.form.eventIds = []
       this.eventList.queryParams.current = 1
+      this.eventList.name = ''
       this.eventList.data = []
       // 清空负责人相关
       this.personnelList.data = []

+ 1 - 1
src/views/visual/components/drawer/titleDrawer.vue

@@ -5,7 +5,7 @@
               <el-tabs v-model="components">
                   <el-tab-pane v-for="item in menu" :key="item.components"  :label="item.name" :name="item.components"></el-tab-pane>
               </el-tabs>
-              <component :is='components' style="height:calc(100% - 50px);" :isOperate='2' :scenarioId="[params.scenarioId]" :matterId="[params.matterId]" :eventName="params.eventName"></component>
+              <component :is='components' style="height:calc(100% - 50px);" :isOperate='2' :scenarioId="[params.scenarioId]" :matterId="[params.matterId]" :eventId="params.eventId" :eventName="params.eventName"></component>
           </div>
           
       </el-drawer>

+ 6 - 6
src/views/visual/components/sceneSVG.vue

@@ -80,12 +80,12 @@ export default {
           "current": 1,
           "size": 10,
           "searchQuery": this.$commonJS.objectToString(this.searchOption),
-          "orderDTOList": [
-            {
-              "orderBy": "createTime",
-              "orderType": 1
-            }
-          ],
+          // "orderDTOList": [
+          //   {
+          //     "orderBy": "createTime",
+          //     "orderType": 1
+          //   }
+          // ],
           "groupBy": "scenarioNames"
         }
       await this.$api.groupEvent(params).then(res => {

+ 6 - 6
src/views/visual/title/index.vue

@@ -132,12 +132,12 @@
           "current": 1,
           "size": 10,
           "searchQuery": this.$commonJS.objectToString(obj),
-          "orderDTOList": [
-            {
-              "orderBy": "createTime",
-              "orderType": 1
-            }
-          ],
+          // "orderDTOList": [
+          //   {
+          //     "orderBy": "createTime",
+          //     "orderType": 1
+          //   }
+          // ],
           "groupBy": "scenarioNames"
         }
       await this.$api.groupEvent(params).then(res => {