|
@@ -655,60 +655,52 @@ export default {
|
|
|
|
|
|
|
|
|
//打开弹窗
|
|
|
- async open(form) {
|
|
|
+ async open(form={}){
|
|
|
+ this.form = JSON.parse(JSON.stringify(form))
|
|
|
this.personnelList.data = []
|
|
|
- if (form && form.id) {
|
|
|
- this.form = JSON.parse(JSON.stringify(form))
|
|
|
- // 负责人
|
|
|
- if (this.form.headId) {
|
|
|
- this.personnelList.queryParams.id = this.form.headId
|
|
|
- await this.getPermissionPersonnel(1)
|
|
|
- this.personnelList.queryParams.id = null
|
|
|
- }
|
|
|
- // 部门委托客户
|
|
|
- if (this.form.entrustId) {
|
|
|
-
|
|
|
- // this.personnelList.queryParams.id = this.form.entrustId
|
|
|
- // await this.getPermissionPersonnel(1)
|
|
|
- // this.personnelList.queryParams.id = null
|
|
|
- }
|
|
|
- // 参与人
|
|
|
- if (this.form.involvedPersons && this.form.involvedPersons.length) {
|
|
|
- this.form.adminPersons = []
|
|
|
- this.form.adminIds = []
|
|
|
- this.form.involvedPersons.forEach(item => {
|
|
|
- let a = {
|
|
|
- id: item.personId,
|
|
|
- name: item.personName
|
|
|
- }
|
|
|
- this.form.adminPersons.push(a)
|
|
|
- this.form.adminIds.push(a.id)
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
+ //获取title
|
|
|
+ if(this.form.id){
|
|
|
this.title = '编辑专利挖掘项目'
|
|
|
- } else {
|
|
|
- // this.eventList.disabled = false
|
|
|
- // if (this.form.eventId) {
|
|
|
- // this.eventList.disabled = true
|
|
|
- // this.eventList.data.push({
|
|
|
- // id: this.form.eventId,
|
|
|
- // name: this.form.eventName,
|
|
|
- // })
|
|
|
- // }
|
|
|
+ }else{
|
|
|
this.title = '新增专利挖掘项目'
|
|
|
}
|
|
|
+ //负责人
|
|
|
+ if (this.form.headId) {
|
|
|
+ this.personnelList.queryParams.id = this.form.headId
|
|
|
+ await this.getPermissionPersonnel(1)
|
|
|
+ this.personnelList.queryParams.id = null
|
|
|
+ }
|
|
|
+ // 部门委托客户
|
|
|
+ if (this.form.entrustId) {
|
|
|
+ }
|
|
|
+ // 参与人
|
|
|
+ if (this.form.involvedPersons && this.form.involvedPersons.length) {
|
|
|
+ this.form.adminPersons = []
|
|
|
+ this.form.adminIds = []
|
|
|
+ this.form.involvedPersons.forEach(item => {
|
|
|
+ let a = {
|
|
|
+ id: item.personId,
|
|
|
+ name: item.personName
|
|
|
+ }
|
|
|
+ this.form.adminPersons.push(a)
|
|
|
+ this.form.adminIds.push(a.id)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ //事件
|
|
|
this.eventList.data = []
|
|
|
this.eventList.name = ''
|
|
|
this.eventList.disabled = false
|
|
|
var hasEvent = false
|
|
|
- if(this.form.eventId){
|
|
|
- this.eventList.disabled = true
|
|
|
- hasEvent = true
|
|
|
- }
|
|
|
if(this.form.eventIds && this.form.eventIds.length>0){
|
|
|
this.form.eventId = this.form.eventIds[0]
|
|
|
hasEvent = true
|
|
|
}
|
|
|
+ if(this.form.eventId){
|
|
|
+ this.eventList.disabled = true
|
|
|
+ hasEvent = true
|
|
|
+ }
|
|
|
if(hasEvent){
|
|
|
if(this.form.eventId){
|
|
|
let params = {
|
|
@@ -738,6 +730,7 @@ export default {
|
|
|
}
|
|
|
this.getPermissionPersonnel()
|
|
|
this.dialogVisible = true
|
|
|
+
|
|
|
},
|
|
|
//关闭弹窗
|
|
|
handleClose() {
|