|
@@ -42,13 +42,13 @@
|
|
:placeholder="$t('ReportManage.ReportList.please_select_category')"
|
|
:placeholder="$t('ReportManage.ReportList.please_select_category')"
|
|
size="medium"
|
|
size="medium"
|
|
style="width: 400px"
|
|
style="width: 400px"
|
|
- @change="handleUpdateBaseInfo"
|
|
|
|
|
|
+ @change="handleChangeClassify"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item prop="relationVariety" :label="$t('ReportManage.ReportList.label_relation_variety')" v-if="formData.relationVariety.length">
|
|
<el-form-item prop="relationVariety" :label="$t('ReportManage.ReportList.label_relation_variety')" v-if="formData.relationVariety.length">
|
|
- <div>
|
|
|
|
- <el-tag v-for="item in formData.relationVariety" :key="item"></el-tag>
|
|
|
|
|
|
+ <div class="permission-wrap">
|
|
|
|
+ <el-tag v-for="item in formData.relationVariety" :key="item.ChartPermissionId">{{item.ChartPermissionName}}</el-tag>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
@@ -190,6 +190,7 @@
|
|
<script>
|
|
<script>
|
|
import { apiSmartReport } from "@/api/modules/smartReport";
|
|
import { apiSmartReport } from "@/api/modules/smartReport";
|
|
import { reportV2Interface,classifylist,reportadd } from '@/api/modules/reportV2.js';
|
|
import { reportV2Interface,classifylist,reportadd } from '@/api/modules/reportV2.js';
|
|
|
|
+import { classifyPermissionInterface } from '@/api/api.js';
|
|
import chooseCooperaUserDia from './chooseCooperaUserDia.vue';
|
|
import chooseCooperaUserDia from './chooseCooperaUserDia.vue';
|
|
import chooseInherReportDia from './chooseInherReportDia.vue';
|
|
import chooseInherReportDia from './chooseInherReportDia.vue';
|
|
export default {
|
|
export default {
|
|
@@ -235,13 +236,17 @@ export default {
|
|
frequency: this.reportInfo.Frequency,
|
|
frequency: this.reportInfo.Frequency,
|
|
time: this.reportInfo.CreateTime,
|
|
time: this.reportInfo.CreateTime,
|
|
cooperationType: this.reportInfo.CollaborateType,//协作方式
|
|
cooperationType: this.reportInfo.CollaborateType,//协作方式
|
|
- cooperationUsers: this.reportInfo.GrandAdminList?this.reportInfo.GrandAdminList.map(_ => ({
|
|
|
|
- NodeId: _.AdminId,
|
|
|
|
- NodeName: _.AdminName
|
|
|
|
- })):[],
|
|
|
|
|
|
+ cooperationUsers: this.reportInfo.GrandAdminList
|
|
|
|
+ ? this.reportInfo.GrandAdminList.map(_ => ({
|
|
|
|
+ NodeId: _.AdminId,
|
|
|
|
+ NodeName: _.AdminName
|
|
|
|
+ }))
|
|
|
|
+ : [],
|
|
reportLayout: this.reportInfo.ReportLayout,//报告布局
|
|
reportLayout: this.reportInfo.ReportLayout,//报告布局
|
|
isPublcPublish: this.reportInfo.IsPublicPublish
|
|
isPublcPublish: this.reportInfo.IsPublicPublish
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ this.getRelationPermission()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -394,6 +399,13 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+
|
|
|
|
+ //分类变化 获取关联品种
|
|
|
|
+ handleChangeClassify(val) {
|
|
|
|
+ this.getRelationPermission()
|
|
|
|
+ this.handleUpdateBaseInfo()
|
|
|
|
+ },
|
|
|
|
+
|
|
handleUpdateBaseInfo() {
|
|
handleUpdateBaseInfo() {
|
|
this.formData.inheritId = 0;
|
|
this.formData.inheritId = 0;
|
|
|
|
|
|
@@ -429,7 +441,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
/* 选择继承报告 */
|
|
/* 选择继承报告 */
|
|
- chooseInheritReport(item) {
|
|
|
|
|
|
+ async chooseInheritReport(item) {
|
|
const { Id,Title,Abstract,Author,CollaborateType,ReportLayout,IsPublicPublish } = item;
|
|
const { Id,Title,Abstract,Author,CollaborateType,ReportLayout,IsPublicPublish } = item;
|
|
|
|
|
|
this.formData.title = Title;
|
|
this.formData.title = Title;
|
|
@@ -439,9 +451,25 @@ export default {
|
|
: "";
|
|
: "";
|
|
this.formData.cooperationType = CollaborateType;
|
|
this.formData.cooperationType = CollaborateType;
|
|
this.formData.inheritId = Id;
|
|
this.formData.inheritId = Id;
|
|
- // this.formData.cooperationUsers: [],
|
|
|
|
this.formData.reportLayout = ReportLayout;
|
|
this.formData.reportLayout = ReportLayout;
|
|
this.formData.isPublcPublish = IsPublicPublish;
|
|
this.formData.isPublcPublish = IsPublicPublish;
|
|
|
|
+
|
|
|
|
+ //继承的章节报告默认带出协作人
|
|
|
|
+ if(CollaborateType===1) {
|
|
|
|
+ this.formData.cooperationUsers = [];
|
|
|
|
+ }else {
|
|
|
|
+ const res = await reportV2Interface.getRportBase({
|
|
|
|
+ ReportId: Id
|
|
|
|
+ })
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+
|
|
|
|
+ this.formData.cooperationUsers = res.Data.GrandAdminList
|
|
|
|
+ ? res.Data.GrandAdminList.map(_ => ({
|
|
|
|
+ NodeId: _.AdminId,
|
|
|
|
+ NodeName: _.AdminName
|
|
|
|
+ }))
|
|
|
|
+ : [];
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
//选择协作人
|
|
//选择协作人
|
|
@@ -457,6 +485,16 @@ export default {
|
|
this.formData.cooperationUsers.splice(index,1)
|
|
this.formData.cooperationUsers.splice(index,1)
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ //获取关联品种
|
|
|
|
+ async getRelationPermission() {
|
|
|
|
+ if(!this.formData.classify.length) return
|
|
|
|
+
|
|
|
|
+ const res = await classifyPermissionInterface.classifyPermissionList({ClassifyId:this.formData.classify[this.formData.classify.length-1]})
|
|
|
|
+
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+ this.formData.relationVariety = res.Data || []
|
|
|
|
+ },
|
|
|
|
+
|
|
// 获取选择的分类名称
|
|
// 获取选择的分类名称
|
|
getSelectClassifyName() {
|
|
getSelectClassifyName() {
|
|
let arr = [];
|
|
let arr = [];
|
|
@@ -543,5 +581,11 @@ export default {
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
gap: 10px;
|
|
}
|
|
}
|
|
|
|
+ .permission-wrap {
|
|
|
|
+ width: 80%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+ gap: 5px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|