|
@@ -323,7 +323,7 @@ export default {
|
|
|
editText(item, index) {
|
|
|
this.dialogText = "编辑";
|
|
|
this.chartPermissionId = item.ChartPermissionId;
|
|
|
- this.stateValue = item.IndustrialSubjectName;
|
|
|
+ this.stateValue = item.IndustrialSubjectName || item.ShowName;
|
|
|
this.addDialogVisible = true;
|
|
|
this.editNum = index;
|
|
|
},
|
|
@@ -370,34 +370,39 @@ export default {
|
|
|
async confirmPerson() {
|
|
|
if (this.stateValue) {
|
|
|
const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
|
|
|
- if (!arr) {
|
|
|
- this.$message.error("输入正确的标的");
|
|
|
- return;
|
|
|
- }
|
|
|
let overviewList = {};
|
|
|
- const res = await raiInterface.getReportSelectionArticle({
|
|
|
- IndustrialSubjectId: arr.IndustrialSubjectId,
|
|
|
- });
|
|
|
+ const res = !arr
|
|
|
+ ? await raiInterface.getReportSelectionThird_name({
|
|
|
+ ThirdName: this.stateValue,
|
|
|
+ ChartPermissionId: this.chartPermissionId,
|
|
|
+ })
|
|
|
+ : await raiInterface.getReportSelectionArticle({
|
|
|
+ IndustrialSubjectId: arr.IndustrialSubjectId,
|
|
|
+ });
|
|
|
if (res.Ret === 200) {
|
|
|
overviewList = res.Data;
|
|
|
this.industryList.forEach((item) => {
|
|
|
if (item.ChartPermissionId == this.chartPermissionId) {
|
|
|
if (item.List.length > 0) {
|
|
|
- var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.ShowName);
|
|
|
+ console.log(item, "------");
|
|
|
+
|
|
|
+ var isNext = res.Data.ThirdName ? item.List.some((item) => item.ThirdName == res.Data.ThirdName) : item.List.some((item) => item.IndustrialSubjectName == arr.SubjectName);
|
|
|
}
|
|
|
if (isNext) return this.$message.error("标的重复!");
|
|
|
item.List.push({
|
|
|
Body: "",
|
|
|
ChartPermissionId: this.chartPermissionId,
|
|
|
- IndustrialManagementId: arr.IndustrialManagementId + "",
|
|
|
- IndustrialManagementName: arr.IndustryName,
|
|
|
- IndustrialSubjectId: arr.IndustrialSubjectId + "",
|
|
|
- IndustrialSubjectName: arr.SubjectName,
|
|
|
- ShowName: arr.ShowName,
|
|
|
+ IndustrialManagementId: arr ? arr.IndustrialManagementId + "" : "",
|
|
|
+ IndustrialManagementName: arr ? arr.IndustryName : "",
|
|
|
+ IndustrialSubjectId: arr ? arr.IndustrialSubjectId + "" : "",
|
|
|
+ IndustrialSubjectName: arr ? arr.SubjectName : "",
|
|
|
+ ShowName: arr ? arr.ShowName : res.Data.ThirdName,
|
|
|
+ ThirdId: res.Data.ThirdId || "",
|
|
|
+ ThirdName: res.Data.ThirdName || "",
|
|
|
CompanyLabel: [{ name: "", value: item.List.length + 1 }],
|
|
|
- OverviewArticleId: overviewList && overviewList.ArticleId,
|
|
|
- OverviewArticleTitle: overviewList && overviewList.Title,
|
|
|
- IsShowOverviewArticle: overviewList && overviewList.IsShowOverviewArticle,
|
|
|
+ OverviewArticleId: overviewList.ArticleId || 0,
|
|
|
+ OverviewArticleTitle: overviewList.Title || "",
|
|
|
+ IsShowOverviewArticle: overviewList.IsShowOverviewArticle || 0,
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -409,36 +414,40 @@ export default {
|
|
|
async editconfirmPerson() {
|
|
|
if (this.stateValue) {
|
|
|
const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
|
|
|
- if (!arr) {
|
|
|
- this.$message.error("输入正确的标的");
|
|
|
- return;
|
|
|
- }
|
|
|
let overviewList = {};
|
|
|
- const res = await raiInterface.getReportSelectionArticle({
|
|
|
- IndustrialSubjectId: arr.IndustrialSubjectId,
|
|
|
- });
|
|
|
+ const res = !arr
|
|
|
+ ? await raiInterface.getReportSelectionThird_name({
|
|
|
+ ThirdName: this.stateValue,
|
|
|
+ ChartPermissionId: this.chartPermissionId,
|
|
|
+ })
|
|
|
+ : await raiInterface.getReportSelectionArticle({
|
|
|
+ IndustrialSubjectId: arr.IndustrialSubjectId,
|
|
|
+ });
|
|
|
if (res.Ret === 200) {
|
|
|
overviewList = res.Data;
|
|
|
this.overviewList = overviewList;
|
|
|
this.industryList.forEach((item) => {
|
|
|
if (item.ChartPermissionId == this.chartPermissionId) {
|
|
|
if (item.List.length > 0) {
|
|
|
- var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.SubjectName);
|
|
|
+ console.log(arr, "------");
|
|
|
+ var isNext = item.List.some((item) => item.IndustrialSubjectName == (arr ? arr.SubjectName : res.Data.ThirdName));
|
|
|
}
|
|
|
if (isNext) return this.$message.error("标的重复!");
|
|
|
const obj = {
|
|
|
Body: (this.$refs.twoRich && this.$refs.twoRich.value) || "",
|
|
|
ChartPermissionId: this.chartPermissionId,
|
|
|
- IndustrialManagementId: arr.IndustrialManagementId + "",
|
|
|
- IndustrialManagementName: arr.IndustryName,
|
|
|
- IndustrialSubjectId: arr.IndustrialSubjectId + "",
|
|
|
- IndustrialSubjectName: arr.SubjectName,
|
|
|
- ShowName: arr.ShowName,
|
|
|
+ IndustrialManagementId: arr ? arr.IndustrialManagementId + "" : "",
|
|
|
+ IndustrialManagementName: arr ? arr.IndustryName : "",
|
|
|
+ IndustrialSubjectId: arr ? arr.IndustrialSubjectId + "" : "",
|
|
|
+ IndustrialSubjectName: arr ? arr.SubjectName : "",
|
|
|
+ ShowName: arr ? arr.ShowName : "",
|
|
|
+ ThirdId: res.Data.ThirdId || "",
|
|
|
+ ThirdName: res.Data.ThirdName || "",
|
|
|
CompanyLabel:
|
|
|
item.List[this.editNum].CompanyLabel && item.List[this.editNum].CompanyLabel.length > 0 ? item.List[this.editNum].CompanyLabel : [{ name: "", value: item.List.length + 1 }],
|
|
|
- OverviewArticleId: overviewList.ArticleId,
|
|
|
- OverviewArticleTitle: overviewList.Title,
|
|
|
- IsShowOverviewArticle: overviewList.IsShowOverviewArticle,
|
|
|
+ OverviewArticleId: overviewList.ArticleId || 0,
|
|
|
+ OverviewArticleTitle: overviewList.Title || "",
|
|
|
+ IsShowOverviewArticle: overviewList.IsShowOverviewArticle || 0,
|
|
|
};
|
|
|
item.List.splice(this.editNum, 1, obj);
|
|
|
this.industrialSubjectName = arr.IndustryName || "";
|