|
@@ -16,7 +16,7 @@
|
|
|
<el-form-item label="报告名称" prop="name">
|
|
|
<el-input v-model="form.name" autocomplete="off" placeholder="请输入报告名称"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="是否完成" v-if="!form.id">
|
|
|
+ <el-form-item label="是否完成" v-show="!form.id">
|
|
|
<el-switch
|
|
|
v-model="form.status"
|
|
|
active-color="#13ce66"
|
|
@@ -71,15 +71,19 @@
|
|
|
<el-form-item label="产品/技术">
|
|
|
<el-input v-model="form.proTec" autocomplete="off" placeholder="请输入产品/技术"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="应用场景" prop="easFlag" >
|
|
|
+ <el-form-item label="应用场景">
|
|
|
<el-select v-model="form.scenarioList" multiple clearable placeholder="请选择应用场景" :popper-append-to-body="false">
|
|
|
<el-option v-for="item in dictsFromPASList" :key="item.id" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
-
|
|
|
</el-form-item>
|
|
|
<el-form-item label="关联报告">
|
|
|
<el-input v-model="form.associateReportName" autocomplete="off" placeholder="请输入关联报告"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="需要复制的选项" v-show="form.track">
|
|
|
+ <el-select v-model="form.copyIds" multiple clearable placeholder="请选择需要复制的选项" :popper-append-to-body="false" @change="changeCopyIds">
|
|
|
+ <el-option v-for="item in copyList" :key="item.dictChildValue" :label="item.dictChildLabel" :value="item.dictChildValue"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="卷号" prop="volumeNumber" >
|
|
|
<el-input v-model="form.volumeNumber" autocomplete="off" placeholder="请输入卷号"></el-input>
|
|
|
</el-form-item>
|
|
@@ -269,6 +273,16 @@ export default {
|
|
|
"4":"TORT_ASSESS",
|
|
|
"5":"AVOID_ASSESS",
|
|
|
},
|
|
|
+ reportAsDicItemCopy:{
|
|
|
+ "0":"INVALID_COPY",
|
|
|
+ "1":"THIRD_COPY",
|
|
|
+ "2":"STABILITY_COPY",
|
|
|
+ "3":"FTO_COPY",
|
|
|
+ "4":"TORT_COPY",
|
|
|
+ "5":"AVOID_COPY",
|
|
|
+ },
|
|
|
+ copyList:[],
|
|
|
+ copyIndex:{},
|
|
|
conclusion:[],
|
|
|
rules: {//校验,
|
|
|
name: [{ required: true, message: '请输入报告名称', trigger: 'blur' },],
|
|
@@ -584,6 +598,38 @@ export default {
|
|
|
this.dictsFromPASList = response.data
|
|
|
})
|
|
|
},
|
|
|
+ //修改需要复制的选项
|
|
|
+ changeCopyIds(val){
|
|
|
+ if(Object.keys(this.copyIndex).length>0){
|
|
|
+ var index = this.copyList.findIndex(item=>{
|
|
|
+ return item.dictChildLabel == '对比文件'
|
|
|
+ })
|
|
|
+ if(index!=-1){
|
|
|
+ var id = this.copyList[index].dictChildValue
|
|
|
+ var index2 = this.copyList.findIndex(item=>{
|
|
|
+ return item.dictChildLabel == '标引信息'
|
|
|
+ })
|
|
|
+ if(val.indexOf(id)!=-1){
|
|
|
+ if(index2==-1){
|
|
|
+ this.copyList.splice(index,0,this.copyIndex)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(index2!=-1){
|
|
|
+ this.copyList.splice(index2,1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // var index = this.copyList.findIndex(item=>{
|
|
|
+ // return item.dictChildLabel == '标引信息'
|
|
|
+ // })
|
|
|
+ // if(index!=-1){
|
|
|
+ // this.copyIndex = this.copyList[index]
|
|
|
+ // this.copyList.splice(index,1)
|
|
|
+ // }
|
|
|
+ },
|
|
|
//接收创建报告类型
|
|
|
open(row,dictMessage) {
|
|
|
this.tenantType = this.userinfo.tenantType
|
|
@@ -603,6 +649,19 @@ export default {
|
|
|
}
|
|
|
var reportType = this.dictMessage.REPORT_TYPE.filter(item=>{return item.dictChildValue == this.form.type})[0].dictChildLabel
|
|
|
this.title = a + reportType + '报告'
|
|
|
+ if(row.track){
|
|
|
+ this.title = '添加追踪报告'
|
|
|
+ this.copyList = this.dictMessage[this.reportAsDicItemCopy[this.form.type]]
|
|
|
+ var index = this.copyList.findIndex(item=>{
|
|
|
+ return item.dictChildLabel == '标引信息'
|
|
|
+ })
|
|
|
+ if(index!=-1){
|
|
|
+ this.copyIndex = this.copyList[index]
|
|
|
+ // this.copyList.splice(index,1)
|
|
|
+ }
|
|
|
+ var arr = this.copyList?this.copyList.map(item=>{return item.dictChildValue}):[]
|
|
|
+ this.$set(this.form,'copyIds',arr)
|
|
|
+ }
|
|
|
if(this.form.signPatentNo ){
|
|
|
this.$set(this.form,'name',this.form.signPatentNo + reportType)
|
|
|
}
|
|
@@ -636,7 +695,7 @@ export default {
|
|
|
if (valid) {
|
|
|
this.loading = false
|
|
|
if(!this.form.id){
|
|
|
- if(this.form.status != 3){
|
|
|
+ if(this.form.status == 3){
|
|
|
let formData = new FormData()
|
|
|
if(this.file){
|
|
|
for (var i = 0; i < this.file.length; i++) {
|
|
@@ -735,11 +794,12 @@ export default {
|
|
|
},
|
|
|
// 弹出框关闭
|
|
|
handleClose() {
|
|
|
+ this.copyIndex = {}
|
|
|
this.matterType = null
|
|
|
this.$refs.upload.clearFiles()
|
|
|
this.file = []
|
|
|
+ this.$refs.reportForm.resetFields();
|
|
|
this.showDialog = false
|
|
|
- // this.$refs.reportForm.resetFields();
|
|
|
this.show = 0
|
|
|
this.form = {}
|
|
|
},
|