|
@@ -7,9 +7,23 @@
|
|
|
element-loading-background-color="rgba(0, 0, 0, 0.8)">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item :label="[3].includes(Number(form.type)) ? '标的产品' : '标的专利'" prop="signPatentNo">
|
|
|
+ <!-- <el-form-item :label="[3].includes(Number(form.type)) ? '标的产品' : '标的专利'" prop="signPatentNo">
|
|
|
<el-input v-model="form.signPatentNo" autocomplete="off"
|
|
|
:placeholder="[3].includes(Number(form.type)) ? '请输入标的产品' : '请输入标的专利'" @change="getPatentNo"></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item v-if="form.reportType == 3" label="标的产品" prop="signPatentNo">
|
|
|
+ <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">
|
|
|
+ <el-option v-for="item in productList.data" :key="item.id" :label="item.name"
|
|
|
+ :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input v-model="form.signProjectId" autocomplete="off"
|
|
|
+ placeholder="请输入标的产品" @change="getPatentNo"></el-input> -->
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-else label="标的专利" prop="signPatentNo">
|
|
|
+ <el-input v-model="form.signPatentNo" autocomplete="off"
|
|
|
+ placeholder="请输入标的专利" @change="getPatentNo"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -26,13 +40,13 @@
|
|
|
<template v-if="!form.id && form.status == 3">
|
|
|
<div>
|
|
|
<el-form-item label="核心结论">
|
|
|
- <el-checkbox-group v-model="form.conclusionIds">
|
|
|
+ <el-checkbox-group v-model="form.cronIds">
|
|
|
<el-checkbox v-for="item in conclusion" :key="item.dictChildValue" :label="item.dictChildValue">{{
|
|
|
item.dictChildLabel }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="结论论述">
|
|
|
- <el-input v-model="form.cronConclusion" type="textarea" placeholder="请输入结论论述"></el-input>
|
|
|
+ <el-input v-model="form.cronDescription" type="textarea" placeholder="请输入结论论述"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="后续跟进事项" v-if="$permission('/rms/matter')">
|
|
|
<span v-if="form.followUps"><span v-for="item in form.followUps" :key="item.followUpName"
|
|
@@ -40,7 +54,7 @@
|
|
|
<span>
|
|
|
<el-popover ref="popover" placement="bottom" @hide="hidePopover" @show="showPopover" trigger="click">
|
|
|
<div>
|
|
|
- <addMatter :type="matterType" :sign="matterSign" @value="getMatter"></addMatter>
|
|
|
+ <addMatter :type="matterType" :sign="matterSign" @value="getMatter"></addMatter>
|
|
|
</div>
|
|
|
<el-button slot="reference">添加后续事项</el-button>
|
|
|
</el-popover>
|
|
@@ -55,11 +69,11 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="负责人" prop="personId">
|
|
|
- <el-select style="width:100%" v-model="form.personId" placeholder="请选择负责人" filterable remote
|
|
|
+ <el-form-item label="负责人" prop="headId">
|
|
|
+ <el-select style="width:100%" v-model="form.headId" placeholder="请选择负责人" filterable remote
|
|
|
:popper-append-to-body="false" :remote-method="remoteMethodPerson" v-SelectLazyLoading="lazyLoadingPerson"
|
|
|
- :loading="personObj.loading">
|
|
|
- <el-option v-for="item in personnelList" :key="item.id" :label="item.personnelName"
|
|
|
+ :loading="personnelList.loading">
|
|
|
+ <el-option v-for="item in personnelList.data" :key="item.id" :label="item.name"
|
|
|
:value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -69,8 +83,8 @@
|
|
|
<el-col :span="12">
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-form-item label="委托方" prop="clientId" v-if="userinfo.tenantType == 1">
|
|
|
- <el-select style="width:100%" v-model="form.clientId" placeholder="请选择委托方" filterable remote
|
|
|
+ <el-form-item label="委托方" prop="entrustId" v-if="userinfo.tenantType == 1">
|
|
|
+ <el-select style="width:100%" v-model="form.entrustId" placeholder="请选择委托方" filterable remote
|
|
|
:popper-append-to-body="false" :remote-method="remoteMethodClient"
|
|
|
v-SelectLazyLoading="lazyLoadingClient" :loading="clientObj.loading">
|
|
|
<el-option v-for="item in clientList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
@@ -89,16 +103,16 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-form-item label="应用场景">
|
|
|
+ <!-- <el-form-item label="应用场景">
|
|
|
<el-checkbox-group v-model="form.scenarioList">
|
|
|
<el-checkbox v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO" :key="item.value"
|
|
|
:label="parseInt(item.value)">{{ item.label }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="产品/技术">
|
|
|
- <el-input v-model="form.proTec" autocomplete="off" placeholder="请输入产品/技术"></el-input>
|
|
|
+ <el-input v-model="form.productOrTech" autocomplete="off" placeholder="请输入产品/技术"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -148,10 +162,10 @@
|
|
|
</template>
|
|
|
<el-form-item :label="(!form.id && form.status == 3) ? '上传报告文档' : '上传附件'">
|
|
|
<myUpload :file-list="handleConcat(form.systemFileList)" @on-change="onChange" @on-remove="onRemove"
|
|
|
- @on-preview="onPreview" style="height: 180px;"></myUpload>
|
|
|
+ @on-preview="onPreview" style="height: 180px;" :autoUpload="true"></myUpload>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="备注" prop="remark">
|
|
|
- <el-input type='textarea' v-model="form.remark" autocomplete="off" placeholder="请输入备注"></el-input>
|
|
|
+ <el-form-item label="备注" prop="description">
|
|
|
+ <el-input type='textarea' v-model="form.description" autocomplete="off" placeholder="请输入备注"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" v-if="$reportPermission(form.id, [0, 1])">
|
|
@@ -179,8 +193,8 @@
|
|
|
placeholder="选择日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="审核备注:" prop="remark">
|
|
|
- <el-input v-model="taskForm.remark" type="textarea" placeholder="输入备注" />
|
|
|
+ <el-form-item label="审核备注:" prop="description">
|
|
|
+ <el-input v-model="taskForm.description" type="textarea" placeholder="输入备注" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -201,9 +215,11 @@
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import evidenceAndRequest from './evidenceAndRequest.vue'
|
|
|
+import addMatter from './addMatter.vue'
|
|
|
export default {
|
|
|
components: {
|
|
|
evidenceAndRequest,
|
|
|
+ addMatter,
|
|
|
},
|
|
|
props: {},
|
|
|
data() {
|
|
@@ -216,6 +232,8 @@ export default {
|
|
|
var text = '请输入标的专利号'
|
|
|
}
|
|
|
callback(new Error(text))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
}
|
|
|
}
|
|
|
const isTime = (rule, value, callback) => {
|
|
@@ -245,8 +263,8 @@ export default {
|
|
|
rules: {
|
|
|
name: [{ required: true, message: '请输入报告名称', trigger: 'blur' },],
|
|
|
signPatentNo: [{ required: true, validator: isExist, trigger: 'blur' },],
|
|
|
- personId: [{ required: true, message: '请选择负责人', trigger: 'change' },],
|
|
|
- clientId: [{ required: true, message: '请选择委托方', trigger: 'change' },],
|
|
|
+ headId: [{ required: true, message: '请选择负责人', trigger: 'change' },],
|
|
|
+ entrustId: [{ required: true, message: '请选择委托方', trigger: 'change' },],
|
|
|
},
|
|
|
//加载
|
|
|
loading: false,
|
|
@@ -295,15 +313,22 @@ export default {
|
|
|
//是否懒加载
|
|
|
isLazy: true,
|
|
|
},
|
|
|
- // 人员懒加载obj
|
|
|
- personObj: {
|
|
|
- queryParams: {
|
|
|
- current: 1,
|
|
|
- size: 10,
|
|
|
+ //人员列表懒加载
|
|
|
+ personnelList: {
|
|
|
+ queryParams:{
|
|
|
+ current:1,
|
|
|
+ size:10
|
|
|
},
|
|
|
- loading: false,
|
|
|
- //是否懒加载
|
|
|
- isLazy: true,
|
|
|
+ data:[]
|
|
|
+ },
|
|
|
+ //产品列表懒加载
|
|
|
+ productList: {
|
|
|
+ queryParams:{
|
|
|
+ current:1,
|
|
|
+ size:10
|
|
|
+ },
|
|
|
+ isLazy:true,
|
|
|
+ data:[]
|
|
|
},
|
|
|
matterType: null,
|
|
|
/*审核弹窗所需变量start*/
|
|
@@ -333,20 +358,21 @@ export default {
|
|
|
dictMessage() {
|
|
|
return this.$store.state.dictMessage.dictMessage
|
|
|
},
|
|
|
+ scenario() {
|
|
|
+ console.log(this.$store.state.dictMessage);
|
|
|
+ return this.$store.state.dictMessage.scenario || []
|
|
|
+ }
|
|
|
},
|
|
|
created() { },
|
|
|
mounted() {
|
|
|
- //获取字典项(接口还是通过字典获取)
|
|
|
- this.$api.getCommonData({ keys: 'QUERY_GROUP,ENTERPRISE_APPLICATION_SCENARIO,INVESTIGATION_TYPE' }).then(response => {
|
|
|
- this.commonData = response.data
|
|
|
- })
|
|
|
- // console.log(1)
|
|
|
+ // 获取所有产品
|
|
|
+ this.getAllProduct()
|
|
|
//获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
|
|
|
- this.getAllPersonnelList()
|
|
|
+ this.getPermissionPersonnel()
|
|
|
//获取所有客户列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
|
|
|
this.getAllClientList()
|
|
|
//获取所有部门列表
|
|
|
- this.getAllDepartmentList()
|
|
|
+ this.getDepartment()
|
|
|
},
|
|
|
methods: {
|
|
|
//打开弹窗
|
|
@@ -362,71 +388,102 @@ export default {
|
|
|
} else {
|
|
|
a = '创建'
|
|
|
}
|
|
|
- var reportType = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.type })[0].dictChildLabel
|
|
|
+ console.log(this.form);
|
|
|
+ var reportType = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.reportType })[0].dictChildLabel
|
|
|
this.title = a + reportType + '报告'
|
|
|
this.showDialog = true
|
|
|
},
|
|
|
+ // 产品列表远程搜索
|
|
|
+ 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){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.productList.queryParams.current++;
|
|
|
+ this.getAllProduct();
|
|
|
+ },
|
|
|
+ getAllProduct() {
|
|
|
+ if(!this.productList.isLazy){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ 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];
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ })
|
|
|
+ },
|
|
|
// 人员列表远程搜索
|
|
|
remoteMethodPerson(query) {
|
|
|
- // this.personObj.isLazy = true
|
|
|
- // if (query !== '') {
|
|
|
- // this.personObj.loading = true;
|
|
|
- // let params = {
|
|
|
- // ...this.personObj.queryParams,//分页信息
|
|
|
- // searchQuery: `name=${query}`,
|
|
|
- // }
|
|
|
- // this.$api.AllPersonnelList(params).then(response => {
|
|
|
- // if (response.code == 200) {
|
|
|
- // this.personObj.loading = false;
|
|
|
- // this.personnelList = response.data.data
|
|
|
- // }
|
|
|
- // }).catch(error => {
|
|
|
- // this.personObj.loading = false;
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // this.personnelList = [];
|
|
|
- // this.getProductCategory()
|
|
|
- // }
|
|
|
+ this.personnelList.data=[]
|
|
|
+ this.personnelList.queryParams.current = 1
|
|
|
+ this.personnelList.queryParams.name = query
|
|
|
+ this.getPermissionPersonnel()
|
|
|
},
|
|
|
// 获取所有人员列表懒加载
|
|
|
lazyLoadingPerson() {
|
|
|
- if (this.personObj.queryParams.current * this.personObj.queryParams.size >= this.personObj.queryParams.total) {
|
|
|
+ if(this.personnelList.queryParams.current * this.personnelList.queryParams.size>=this.personnelList.queryParams.total){
|
|
|
return false
|
|
|
}
|
|
|
- this.personObj.queryParams.current += 1
|
|
|
- this.getAllPersonnelList()
|
|
|
+ this.personnelList.queryParams.current += 1
|
|
|
+ this.getPermissionPersonnel()
|
|
|
},
|
|
|
//获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
|
|
|
- getAllPersonnelList() {
|
|
|
- this.$api.getAdminClientList(this.personObj.queryParams).then(response => {
|
|
|
- this.personnelList.push(...response.data.records)
|
|
|
- this.personObj.queryParams.total = response.data.total
|
|
|
- }).catch(error => {
|
|
|
- this.personnelList = []
|
|
|
- this.$message.error(error.message)
|
|
|
+ getPermissionPersonnel() {
|
|
|
+ this.personnelList.loading = true;
|
|
|
+ this.$api.getPermissionPersonnel(this.personnelList.queryParams).then((response) => {
|
|
|
+ if(response.code == 200){
|
|
|
+ this.personnelList.loading = false;
|
|
|
+ this.personnelList.data.push(...response.data)
|
|
|
+ this.personnelList.queryParams.total=response.pageColumn.total
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
// 客户列表远程搜索
|
|
|
remoteMethodClient(query) {
|
|
|
- // this.clientObj.isLazy = true
|
|
|
- // if (query !== '') {
|
|
|
- // this.clientObj.loading = true;
|
|
|
- // let params = {
|
|
|
- // ...this.clientObj.queryParams,//分页信息
|
|
|
- // searchQuery: `name=${query}`,
|
|
|
- // }
|
|
|
- // this.$api.AllClientList(params).then(response => {
|
|
|
- // if (response.code == 200) {
|
|
|
- // this.clientObj.loading = false;
|
|
|
- // this.clientList = response.data.data
|
|
|
- // }
|
|
|
- // }).catch(error => {
|
|
|
- // this.clientObj.loading = false;
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // this.clientList = [];
|
|
|
- // this.getAllClientList()
|
|
|
- // }
|
|
|
+ if (query != '') {
|
|
|
+ this.clientObj.loading = true;
|
|
|
+ this.clientObj.queryParams.current = 1
|
|
|
+ this.clientObj.queryParams.name=query
|
|
|
+ this.$api.getAllClientList(this.clientObj.queryParams).then(response => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.clientObj.loading = false;
|
|
|
+ this.clientList = response.data.records
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.clientObj.loading = false;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.clientObj.queryParams.name = null
|
|
|
+ this.clientList = [];
|
|
|
+ this.getAllClientList()
|
|
|
+ }
|
|
|
},
|
|
|
// 获取所有客户列表懒加载
|
|
|
lazyLoadingClient() {
|
|
@@ -447,38 +504,32 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//获取所有部门列表
|
|
|
- getAllDepartmentList() {
|
|
|
- let params = {
|
|
|
-
|
|
|
- }
|
|
|
- this.$api.AllDepartmentList(params).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.departmentList = res.data
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error(error.message)
|
|
|
- })
|
|
|
+ //获取部门列表
|
|
|
+ getDepartment() {
|
|
|
+ this.$api.getPermissionDepartmentList().then((response) => {
|
|
|
+ this.departmentList = response.data;
|
|
|
+ });
|
|
|
},
|
|
|
//切换是否完成状态
|
|
|
changeStatus(val) {
|
|
|
if (val == 3) {
|
|
|
- this.rules.personId[0].required = false
|
|
|
- this.rules.clientId[0].required = false
|
|
|
+ this.rules.headId[0].required = false
|
|
|
+ this.rules.entrustId[0].required = false
|
|
|
if (!this.form.id) {
|
|
|
- this.$set(this.form, 'conclusionIds', [])
|
|
|
+ this.$set(this.form, 'cronIds', [])
|
|
|
}
|
|
|
this.conclusion = this.dictMessage[this.reportAsDicItem[this.form.type]]
|
|
|
this.matterType = 2
|
|
|
} else {
|
|
|
- this.rules.personId[0].required = true
|
|
|
- this.rules.clientId[0].required = true
|
|
|
+ this.rules.headId[0].required = true
|
|
|
+ this.rules.entrustId[0].required = true
|
|
|
this.matterType = null
|
|
|
}
|
|
|
},
|
|
|
//获取专利号且填入报告名称
|
|
|
getPatentNo() {
|
|
|
if (!this.form.name) {
|
|
|
- var a = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.type })[0].dictChildLabel
|
|
|
+ var a = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.reportType })[0].dictChildLabel
|
|
|
this.$set(this.form, 'name', this.form.signPatentNo + a)
|
|
|
}
|
|
|
},
|
|
@@ -532,10 +583,10 @@ export default {
|
|
|
//删除未提交的附件
|
|
|
onRemove(file, fileList) {
|
|
|
if (file.guid) {
|
|
|
- let a = this.formData[0].systemFileList.findIndex(item => {
|
|
|
+ let a = this.form.systemFileList.findIndex(item => {
|
|
|
return item.guid == file.guid
|
|
|
})
|
|
|
- this.formData[0].systemFileList.splice(a, 1)
|
|
|
+ this.form.systemFileList.splice(a, 1)
|
|
|
} else {
|
|
|
let a = this.files.findIndex(item => {
|
|
|
return item.size == file.size
|
|
@@ -574,15 +625,10 @@ export default {
|
|
|
},
|
|
|
//提交填写的信息
|
|
|
submit() {
|
|
|
- this.$refs.reportForm.validate(valid => {
|
|
|
+ this.$refs.reportForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let formData = new FormData()
|
|
|
- if (this.files && this.files.length > 0) {
|
|
|
- for (var i = 0; i < this.files.length; i++) {
|
|
|
- formData.append("files", this.files[i]);
|
|
|
- }
|
|
|
- }
|
|
|
- formData.append('report', this.form)
|
|
|
+ this.form.type=2//项目类型(1专题库 2报告 3专利挖掘项目)
|
|
|
+ let formData = this.form
|
|
|
if (!this.form.id) {//新增报告
|
|
|
this.$confirm('是否需要进行审核?', '提示', {
|
|
|
confirmButtonText: '是',
|
|
@@ -594,7 +640,7 @@ export default {
|
|
|
this.$set(this.taskForm, 'taskName', this.form.name + '审核')
|
|
|
}).catch(action => {//不审核直接创建报告
|
|
|
// 调用创建报告公用,接口
|
|
|
- this.addReport(formData)
|
|
|
+ this.addReport(formData)
|
|
|
});
|
|
|
|
|
|
} else {//编辑报告
|
|
@@ -617,13 +663,14 @@ export default {
|
|
|
this.$s.setSession('params', {})
|
|
|
this.reportId = val
|
|
|
}
|
|
|
+ this.personnelList.queryParams.name = ''
|
|
|
this.$refs.reportForm.resetFields()
|
|
|
this.form = {}
|
|
|
this.showDialog = false
|
|
|
},
|
|
|
// 创建报告创建接口公用
|
|
|
addReport(formData) {
|
|
|
- this.$api.AddReport(formData).then(response => {
|
|
|
+ this.$api.addReportProject(formData).then(response => {
|
|
|
if (response.code == 200) {
|
|
|
this.files = []
|
|
|
this.$message.success('报告创建成功')
|
|
@@ -649,7 +696,7 @@ export default {
|
|
|
personIds: [this.taskForm.personnelId],
|
|
|
taskName: this.taskForm.taskName,
|
|
|
endTime: this.taskForm.endTime,
|
|
|
- remark: this.taskForm.remark,
|
|
|
+ description: this.taskForm.description,
|
|
|
type: 0,
|
|
|
}
|
|
|
formData.append('taskVO', JSON.stringify(a))
|