|
@@ -9,13 +9,11 @@
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <el-form-item v-if="form.reportType == 3" label="标的产品" prop="signProjectId">
|
|
|
|
- <el-select style="width:100%" v-model="form.signProjectId" placeholder="请选择产品" filterable remote
|
|
|
|
- :popper-append-to-body="false" :remote-method="remoteMethodProduct"
|
|
|
|
- v-SelectLazyLoading="lazyLoadingProduct" :loading="productList.loading" @change="getPatentNo">
|
|
|
|
- <el-option v-for="item in productList.data" :key="item.id" :label="item.name"
|
|
|
|
- :value="item.id"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-form-item v-if="form.reportType == 3" label="标的产品" prop="signProjectId">
|
|
|
|
+ <el-autocomplete v-model="form.signProjectId" value-key="name" v-SelectLazyLoading="productLoad"
|
|
|
|
+ :fetch-suggestions="querySearchProduct" placeholder="请输入标的产品" :trigger-on-focus="false"
|
|
|
|
+ @select="handleSelectProduct" @change="handleChangeProduct"
|
|
|
|
+ style="width: 100%;"></el-autocomplete>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item v-else label="标的专利" prop="signPatentNo">
|
|
<el-form-item v-else label="标的专利" prop="signPatentNo">
|
|
<el-input v-model="form.signPatentNo" autocomplete="off" placeholder="请输入标的专利"
|
|
<el-input v-model="form.signPatentNo" autocomplete="off" placeholder="请输入标的专利"
|
|
@@ -83,13 +81,13 @@
|
|
<div>
|
|
<div>
|
|
<el-form-item label="委托方" prop="entrustId" v-if="userinfo.tenantType == 1">
|
|
<el-form-item label="委托方" prop="entrustId" v-if="userinfo.tenantType == 1">
|
|
<mySelectButton size='large' style="width:100%" @click="handleSelect">
|
|
<mySelectButton size='large' style="width:100%" @click="handleSelect">
|
|
- <div style="width:100%">
|
|
|
|
- <el-autocomplete style="width:100%" v-model="form.entrustName" ref="client" value-key="name"
|
|
|
|
- :fetch-suggestions="querySearch" v-SelectLazyLoading="loadClient" @input="input"
|
|
|
|
- placeholder="请输入内容" :trigger-on-focus="false" @select="handleChange">
|
|
|
|
- </el-autocomplete>
|
|
|
|
- </div>
|
|
|
|
- </mySelectButton>
|
|
|
|
|
|
+ <div style="width:100%">
|
|
|
|
+ <el-autocomplete style="width:100%" v-model="form.entrustName" ref="client" value-key="name"
|
|
|
|
+ :fetch-suggestions="querySearch" v-SelectLazyLoading="loadClient" @input="input"
|
|
|
|
+ placeholder="请输入内容" :trigger-on-focus="false" @select="handleChange">
|
|
|
|
+ </el-autocomplete>
|
|
|
|
+ </div>
|
|
|
|
+ </mySelectButton>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="委托部门" prop="departmentId" v-else>
|
|
<el-form-item label="委托部门" prop="departmentId" v-else>
|
|
<mySelectTree style="width:100%" v-model="form.departmentId" :options="departmentList"></mySelectTree>
|
|
<mySelectTree style="width:100%" v-model="form.departmentId" :options="departmentList"></mySelectTree>
|
|
@@ -120,8 +118,7 @@
|
|
<el-form-item label="需要复制的选项" v-show="form.track">
|
|
<el-form-item label="需要复制的选项" v-show="form.track">
|
|
<el-select v-model="form.copyIds" multiple clearable placeholder="请选择需要复制的选项" :popper-append-to-body="false"
|
|
<el-select v-model="form.copyIds" multiple clearable placeholder="请选择需要复制的选项" :popper-append-to-body="false"
|
|
@change="changeCopyIds">
|
|
@change="changeCopyIds">
|
|
- <el-option v-for="item in copyList" :key="item.value" :label="item.label"
|
|
|
|
- :value="item.value"></el-option>
|
|
|
|
|
|
+ <el-option v-for="item in copyList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -133,9 +130,9 @@
|
|
<el-form-item label="事件:">
|
|
<el-form-item label="事件:">
|
|
<mySelectButton size='large' style="width:100%" @click="addEvent">
|
|
<mySelectButton size='large' style="width:100%" @click="addEvent">
|
|
<div style="width:100%">
|
|
<div style="width:100%">
|
|
- <el-select style="width:100%" v-model="form.eventId" @change="changeEvent" filterable remote :disabled="eventList.disabled"
|
|
|
|
- clearable placeholder="请选择" :loading="eventList.loading" v-SelectLazyLoading="loadEvent"
|
|
|
|
- :remote-method="remoteEvent">
|
|
|
|
|
|
+ <el-select style="width:100%" v-model="form.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 v-for="item in eventList.data" :key="item.id" :label="item.name" :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -204,7 +201,8 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 审核弹窗,做公用组件 -->
|
|
<!-- 审核弹窗,做公用组件 -->
|
|
- <el-dialog title="添加审核任务" :visible.sync="showTask" width="500px" @close="handleCloseTask" :append-to-body="true" :close-on-click-modal="false">
|
|
|
|
|
|
+ <el-dialog title="添加审核任务" :visible.sync="showTask" width="500px" @close="handleCloseTask" :append-to-body="true"
|
|
|
|
+ :close-on-click-modal="false">
|
|
<el-form :model="taskForm" :rules="TaskRules" ref="TaskForm" label-width="120px" v-loading="loading">
|
|
<el-form :model="taskForm" :rules="TaskRules" ref="TaskForm" label-width="120px" v-loading="loading">
|
|
<el-form-item label="任务名称:" prop="taskName">
|
|
<el-form-item label="任务名称:" prop="taskName">
|
|
<el-input v-model="taskForm.taskName" type="text" placeholder="输入任务名称" />
|
|
<el-input v-model="taskForm.taskName" type="text" placeholder="输入任务名称" />
|
|
@@ -238,8 +236,8 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 委托方弹窗 -->
|
|
<!-- 委托方弹窗 -->
|
|
- <el-dialog title="选择委托方" :visible.sync="visible" width="800px" :append-to-body="true" :close-on-click-modal="false" destroy-on-close :before-close="close2"
|
|
|
|
- top="10vh">
|
|
|
|
|
|
+ <el-dialog title="选择委托方" :visible.sync="visible" width="800px" :append-to-body="true" :close-on-click-modal="false"
|
|
|
|
+ destroy-on-close :before-close="close2" top="10vh">
|
|
<ClientTable :choseClient="true" @getClient="getClient"></ClientTable>
|
|
<ClientTable :choseClient="true" @getClient="getClient"></ClientTable>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -300,7 +298,7 @@ export default {
|
|
//表单规则
|
|
//表单规则
|
|
rules: {
|
|
rules: {
|
|
name: [{ required: true, message: '请输入报告名称', trigger: 'blur' },],
|
|
name: [{ required: true, message: '请输入报告名称', trigger: 'blur' },],
|
|
- signProjectId: [{ required: true, validator: isExist, trigger: 'blur' },],//产品
|
|
|
|
|
|
+ signProjectId: [{ required: true, validator: isExist, trigger: 'change' },],//产品
|
|
signPatentNo: [{ required: true, validator: isExist, trigger: 'blur' },],//专利
|
|
signPatentNo: [{ required: true, validator: isExist, trigger: 'blur' },],//专利
|
|
headId: [{ required: true, message: '请选择负责人', trigger: 'change' },],
|
|
headId: [{ required: true, message: '请选择负责人', trigger: 'change' },],
|
|
entrustId: [{ required: true, message: '请选择委托方', trigger: 'change' },],
|
|
entrustId: [{ required: true, message: '请选择委托方', trigger: 'change' },],
|
|
@@ -364,8 +362,9 @@ export default {
|
|
current: 1,
|
|
current: 1,
|
|
size: 10
|
|
size: 10
|
|
},
|
|
},
|
|
- isLazy: true,
|
|
|
|
- data: []
|
|
|
|
|
|
+ loading: false,
|
|
|
|
+ name: '',
|
|
|
|
+ data: [],
|
|
},
|
|
},
|
|
matterType: null,
|
|
matterType: null,
|
|
//事件列表
|
|
//事件列表
|
|
@@ -417,9 +416,9 @@ export default {
|
|
this.getDepartment()
|
|
this.getDepartment()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- /**
|
|
|
|
- * 人员
|
|
|
|
- */
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 人员
|
|
|
|
+ */
|
|
// 人员列表远程搜索
|
|
// 人员列表远程搜索
|
|
remoteMethodPerson(query) {
|
|
remoteMethodPerson(query) {
|
|
this.personnelList.data = []
|
|
this.personnelList.data = []
|
|
@@ -596,17 +595,17 @@ export default {
|
|
a = '查看'
|
|
a = '查看'
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- this.$set(this.form, 'matterIds',form.matterId)
|
|
|
|
|
|
+ this.$set(this.form, 'matterIds', form.matterId)
|
|
this.form.scenarioIds = form.scenarioId
|
|
this.form.scenarioIds = form.scenarioId
|
|
this.$set(this.form, 'systemFileList', [])
|
|
this.$set(this.form, 'systemFileList', [])
|
|
this.$set(this.form, 'fileGuids', [])
|
|
this.$set(this.form, 'fileGuids', [])
|
|
- this.eventList.disabled =false
|
|
|
|
- if(this.form.eventId){
|
|
|
|
|
|
+ this.eventList.disabled = false
|
|
|
|
+ if (this.form.eventId) {
|
|
this.eventList.disabled = true
|
|
this.eventList.disabled = true
|
|
this.eventList.data.push(
|
|
this.eventList.data.push(
|
|
{
|
|
{
|
|
- id:form.eventId,
|
|
|
|
- name:form.eventName
|
|
|
|
|
|
+ id: form.eventId,
|
|
|
|
+ name: form.eventName
|
|
}
|
|
}
|
|
)
|
|
)
|
|
}
|
|
}
|
|
@@ -630,54 +629,44 @@ export default {
|
|
* 产品
|
|
* 产品
|
|
* @param {*} query
|
|
* @param {*} query
|
|
*/
|
|
*/
|
|
- // 产品列表远程搜索
|
|
|
|
- remoteMethodProduct(query) {
|
|
|
|
- this.productList.isLazy = true
|
|
|
|
- if (query !== '') {
|
|
|
|
- this.productList.loading = true;
|
|
|
|
- this.productList.queryParams = {
|
|
|
|
- current: 1,
|
|
|
|
- size: 10,
|
|
|
|
- searchQuery: `name=${query}`
|
|
|
|
- }
|
|
|
|
- this.$api.queryProductCategory(this.productList.queryParams).then(response => {
|
|
|
|
- if (response.code == 200) {
|
|
|
|
- this.productList.loading = false;
|
|
|
|
- this.productList.data = response.data.data
|
|
|
|
- }
|
|
|
|
- }).catch(error => {
|
|
|
|
- this.productList.loading = false;
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- this.productList.queryParams.name = null
|
|
|
|
- this.productList = [];
|
|
|
|
- this.getAllProduct()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 产品列表懒加载
|
|
|
|
- lazyLoadingProduct() {
|
|
|
|
- if (!this.productList.isLazy) {
|
|
|
|
|
|
+ // 懒加载产品方法
|
|
|
|
+ productLoad() {
|
|
|
|
+ if (this.productList.queryParams.current * this.productList.queryParams.size >= this.productList.queryParams.total) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
- this.productList.queryParams.current++;
|
|
|
|
- this.getAllProduct();
|
|
|
|
|
|
+ this.productList.queryParams.current++
|
|
|
|
+ this.queryProduct()
|
|
},
|
|
},
|
|
- getAllProduct() {
|
|
|
|
- if (!this.productList.isLazy) {
|
|
|
|
- return false
|
|
|
|
|
|
+ // 查询产品
|
|
|
|
+ async queryProduct() {
|
|
|
|
+ let params = {
|
|
|
|
+ ...this.productList.queryParams,
|
|
|
|
+ name:this.productList.name
|
|
}
|
|
}
|
|
- this.$api.queryProductCategory(this.productList.queryParams).then(response => {
|
|
|
|
- if (response.code == 200) {
|
|
|
|
- if (response.data.data && response.data.data.length == 0) {
|
|
|
|
- this.productList.isLazy = false
|
|
|
|
- }
|
|
|
|
- this.productList.data = [...this.productList.data, ...response.data.data];
|
|
|
|
|
|
+ await this.$api.queryProduct(params).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.productList.data.push(...res.data)
|
|
|
|
+ this.productList.queryParams.total = res.pageColumn.total
|
|
|
|
+ this.productList.cb(this.productList.data);
|
|
}
|
|
}
|
|
- }).catch(error => {
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ //获取下拉建议产品数据
|
|
|
|
+ async querySearchProduct(queryString, cb) {
|
|
|
|
+ this.productList.queryParams.current = 1
|
|
|
|
+ this.productList.name = queryString
|
|
|
|
+ this.productList.data = []
|
|
|
|
+ this.productList.cb = cb
|
|
|
|
+ await this.queryProduct()
|
|
|
|
+ },
|
|
|
|
+ // 产品输入框
|
|
|
|
+ handleChangeProduct(val) {
|
|
|
|
+ this.$set(this.form, 'name', val + 'FTO调查')
|
|
|
|
+ },
|
|
|
|
+ // 产品输入框选择
|
|
|
|
+ handleSelectProduct(val) {
|
|
|
|
+ this.$set(this.form, 'name', val.name + 'FTO调查')
|
|
|
|
+ },
|
|
|
|
|
|
//获取所有部门列表
|
|
//获取所有部门列表
|
|
getDepartment() {
|
|
getDepartment() {
|
|
@@ -719,14 +708,13 @@ export default {
|
|
if (!this.form.name) {
|
|
if (!this.form.name) {
|
|
var a = this.dictMessage.REPORT_TYPE.filter(item => { return item.value == this.form.reportType })[0].label
|
|
var a = this.dictMessage.REPORT_TYPE.filter(item => { return item.value == this.form.reportType })[0].label
|
|
if (this.form.signProjectId) {
|
|
if (this.form.signProjectId) {
|
|
- let name=this.productList.data.filter(item => {
|
|
|
|
|
|
+ let name = this.productList.data.filter(item => {
|
|
return item.id == this.form.signProjectId
|
|
return item.id == this.form.signProjectId
|
|
})
|
|
})
|
|
- this.$set(this.form,'name',name[0].name + a)
|
|
|
|
|
|
+ this.$set(this.form, 'name', name[0].name + a)
|
|
} else {
|
|
} else {
|
|
this.$set(this.form, 'name', this.form.signPatentNo + a)
|
|
this.$set(this.form, 'name', this.form.signPatentNo + a)
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -857,6 +845,8 @@ export default {
|
|
this.showTask = true
|
|
this.showTask = true
|
|
this.$set(this.taskForm, 'taskName', this.form.name + '审核')
|
|
this.$set(this.taskForm, 'taskName', this.form.name + '审核')
|
|
}).catch(action => {//不审核直接创建报告
|
|
}).catch(action => {//不审核直接创建报告
|
|
|
|
+ // 直接完成传true
|
|
|
|
+ formData.ifFinish = true
|
|
// 调用创建报告公用,接口
|
|
// 调用创建报告公用,接口
|
|
this.addReport(formData, scenarioIds)
|
|
this.addReport(formData, scenarioIds)
|
|
});
|
|
});
|
|
@@ -891,7 +881,7 @@ export default {
|
|
this.showDialog = false
|
|
this.showDialog = false
|
|
this.clear()
|
|
this.clear()
|
|
},
|
|
},
|
|
- //清空组件缓存数据
|
|
|
|
|
|
+ //清空组件缓存数据
|
|
clear() {
|
|
clear() {
|
|
// 清空事件相关
|
|
// 清空事件相关
|
|
this.form.eventId = []
|
|
this.form.eventId = []
|
|
@@ -988,7 +978,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped></style>
|
|
<style lang="scss" scoped></style>
|