|
@@ -61,8 +61,8 @@
|
|
|
<div v-show="industryIndex == index">
|
|
|
<RichText v-model="item.BodyChartSummary" :ref="'logic' + index" :spareId="'logictest' + index" :isText="contentTextLogic" />
|
|
|
<draggable :list="item.List" animation="300" class="classification" filter=".addIndustrial" :move="onMove" @update="ificationSortChange">
|
|
|
- <div v-for="(val, num) in item.List" :key="val.IndustrialSubjectId" class="industrial" @click="ificationIndustrialBtn(val, num)" :class="num == ificationIndustrial ? 'pitch' : ''">
|
|
|
- <span style="margin-right: 19px">{{ val.IndustrialSubjectName }}</span>
|
|
|
+ <div v-for="(val, num) in item.List" :key="val.ShowName" class="industrial" @click="ificationIndustrialBtn(val, num)" :class="num == ificationIndustrial ? 'pitch' : ''">
|
|
|
+ <span style="margin-right: 19px">{{ val.ShowName }}</span>
|
|
|
<span v-if="num == ificationIndustrial">
|
|
|
<img src="~@/assets/img/icons/edit1.png" style="width: 12px; height: 12px; marginright: 10px" @click="editText(val, num)" />
|
|
|
<i class="el-icon-close" @click="deleteClassify(val, num)"></i>
|
|
@@ -70,7 +70,7 @@
|
|
|
</div>
|
|
|
<div class="addIndustrial" @click="addMulti" v-if="industryIndex == index">
|
|
|
<i class="el-icon-plus"></i>
|
|
|
- <span>添加标的</span>
|
|
|
+ <span>添加标的/赛道</span>
|
|
|
</div>
|
|
|
</draggable>
|
|
|
<template v-for="(val, num) in item.List">
|
|
@@ -123,7 +123,7 @@
|
|
|
<span style="font-size: 16px">{{ dialogText }}</span>
|
|
|
</div>
|
|
|
<div class="dlg-content">
|
|
|
- <el-autocomplete class="inline-input" v-model="stateValue" :trigger-on-focus="false" :fetch-suggestions="handleSearchResult" placeholder="请输入标的名称" clearable></el-autocomplete>
|
|
|
+ <el-autocomplete class="inline-input" v-model="stateValue" :trigger-on-focus="false" :fetch-suggestions="handleSearchResult" placeholder="请输入标的或赛道名称" clearable></el-autocomplete>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button v-if="dialogText == '编辑'" type="primary" @click="editconfirmPerson">确定</el-button>
|
|
@@ -337,6 +337,13 @@ export default {
|
|
|
.then(() => {
|
|
|
this.industryList[this.industryIndex].List.splice(index, 1);
|
|
|
this.ificationIndustrial = 0;
|
|
|
+ let itemList = this.industryList[0].List[0];
|
|
|
+ this.industrialSubjectName = itemList.IndustrialManagementName || "";
|
|
|
+ this.overviewList = {
|
|
|
+ ArticleId: itemList.OverviewArticleId,
|
|
|
+ Title: itemList.OverviewArticleTitle,
|
|
|
+ IsShowOverviewArticle: itemList.IsShowOverviewArticle,
|
|
|
+ };
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "删除成功!",
|
|
@@ -351,7 +358,7 @@ export default {
|
|
|
},
|
|
|
//添加产业
|
|
|
addMulti() {
|
|
|
- this.dialogText = "添加标的";
|
|
|
+ this.dialogText = "添加标的/赛道";
|
|
|
this.addDialogVisible = true;
|
|
|
},
|
|
|
//弹框的取消事件
|
|
@@ -362,7 +369,7 @@ export default {
|
|
|
//弹框的确认事件
|
|
|
async confirmPerson() {
|
|
|
if (this.stateValue) {
|
|
|
- const arr = this.subjectList.find((item) => item.SubjectName === this.stateValue);
|
|
|
+ const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
|
|
|
if (!arr) {
|
|
|
this.$message.error("输入正确的标的");
|
|
|
return;
|
|
@@ -373,34 +380,35 @@ export default {
|
|
|
});
|
|
|
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.SubjectName);
|
|
|
+ this.industryList.forEach((item) => {
|
|
|
+ if (item.ChartPermissionId == this.chartPermissionId) {
|
|
|
+ if (item.List.length > 0) {
|
|
|
+ var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.ShowName);
|
|
|
+ }
|
|
|
+ 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,
|
|
|
+ CompanyLabel: [{ name: "", value: item.List.length + 1 }],
|
|
|
+ OverviewArticleId: overviewList && overviewList.ArticleId,
|
|
|
+ OverviewArticleTitle: overviewList && overviewList.Title,
|
|
|
+ IsShowOverviewArticle: overviewList && overviewList.IsShowOverviewArticle,
|
|
|
+ });
|
|
|
}
|
|
|
- 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,
|
|
|
- CompanyLabel: [{ name: "", value: item.List.length + 1 }],
|
|
|
- OverviewArticleId: overviewList.ArticleId,
|
|
|
- OverviewArticleTitle: overviewList.Title,
|
|
|
- IsShowOverviewArticle: overviewList.IsShowOverviewArticle,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
this.stateValue = "";
|
|
|
this.addDialogVisible = false;
|
|
|
},
|
|
|
async editconfirmPerson() {
|
|
|
if (this.stateValue) {
|
|
|
- const arr = this.subjectList.find((item) => item.SubjectName === this.stateValue);
|
|
|
+ const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
|
|
|
if (!arr) {
|
|
|
this.$message.error("输入正确的标的");
|
|
|
return;
|
|
@@ -411,29 +419,32 @@ export default {
|
|
|
});
|
|
|
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.SubjectName);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ 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,
|
|
|
+ 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,
|
|
|
+ };
|
|
|
+ item.List.splice(this.editNum, 1, obj);
|
|
|
+ this.industrialSubjectName = arr.IndustryName || "";
|
|
|
}
|
|
|
- if (isNext) return this.$message.error("标的重复!");
|
|
|
- const obj = {
|
|
|
- Body: this.$refs.twoRich.value || "",
|
|
|
- ChartPermissionId: this.chartPermissionId,
|
|
|
- IndustrialManagementId: arr.IndustrialManagementId + "",
|
|
|
- IndustrialManagementName: arr.IndustryName,
|
|
|
- IndustrialSubjectId: arr.IndustrialSubjectId + "",
|
|
|
- IndustrialSubjectName: arr.SubjectName,
|
|
|
- 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,
|
|
|
- };
|
|
|
- item.List.splice(this.editNum, 1, obj);
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
this.stateValue = "";
|
|
|
this.addDialogVisible = false;
|
|
@@ -442,11 +453,11 @@ export default {
|
|
|
async handleSearchResult(data, cb) {
|
|
|
if (data) {
|
|
|
cb([]);
|
|
|
- let res = await raiInterface.industrialSubjectSearch({ KeyWord: data, ChartPermissionId: this.chartPermissionId });
|
|
|
+ let res = await raiInterface.industrialAndSubjectSearch({ KeyWord: data, ChartPermissionId: this.chartPermissionId });
|
|
|
if (res.Ret === 200) {
|
|
|
if (res.Data.List && res.Data.List.length > 0) {
|
|
|
let arr = res.Data.List.map((item) => {
|
|
|
- return { value: item.SubjectName, ...item };
|
|
|
+ return { value: item.ShowName, ...item };
|
|
|
});
|
|
|
this.subjectList = arr;
|
|
|
cb(arr);
|
|
@@ -464,6 +475,7 @@ export default {
|
|
|
key.CompanyLabel && key.CompanyLabel.length > 0 && isText.push(key.CompanyLabel.some((val) => val.name));
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
if (isText && isText.includes(false)) {
|
|
|
return this.$message.error("请输入公司标签");
|
|
|
}
|