feat:修改面授课回显问题

This commit is contained in:
lixg
2023-02-24 20:32:18 +08:00
parent 035b348d5d
commit 7bcae5724f
2 changed files with 975 additions and 755 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -214,7 +214,7 @@
</div>
<div style="margin-top: 10px">
<a-select
v-model:value="selectBandName"
v-model:value="selectBandId"
mode="multiple"
style="width: 440px; min-height: 40px"
placeholder="请选择Band"
@@ -824,15 +824,19 @@ export default defineComponent({
}
files = files.slice(0, files.length - 1);
let orgSelect = [];
let orgSelectIds = [];
let orgSelectNames = [];
if (state.orgSelect && state.orgSelect.length) {
state.orgSelect.forEach((item) => {
orgSelect.push({
label: item.label,
value: item.value,
});
orgSelectIds += item.value + ",";
});
state.orgSelect.forEach((item) => {
orgSelectNames += item.label + ",";
});
}
orgSelectIds = orgSelectIds.slice(0, orgSelectIds.length - 1);
orgSelectNames = orgSelectNames.slice(0, orgSelectNames.length - 1);
console.log("orgSelectIds&orgSelectNames2", orgSelectIds, orgSelectNames);
let selectJobId = "";
if (state.selectJobId.length) {
@@ -880,10 +884,12 @@ export default defineComponent({
attach: state.attach,
outline: valueHtml.value,
// organizationIds: orgSelect, //todo 传的不对
organizationIds: orgSelectIds,
organizationNames: orgSelectNames,
jobTypeIds: selectJobId,
bandIds: selectBandId,
sourceBelongId: state.sourceBelongId,
sourceBelongFullName: state.sourceBelongName
sourceBelongFullName: state.sourceBelongName,
};
console.log("postData", postData);
const checkList = [
@@ -991,6 +997,33 @@ export default defineComponent({
}
console.log(str);
state.attach = str;
if (item.jobTypeIds) {
state.selectJobId = item.jobTypeIds.split(",");
}
if (item.bandIds) {
state.selectBandId = item.bandIds.split(",");
}
console.log("state.selectBandId", state.selectBandId);
state.sourceBelongId = item.sourceBelongId;
state.sourceBelongName = item.sourceBelongFullName;
if (item.organizationIds && item.organizationNames) {
let orgSelectIds = item.organizationIds;
let orgSelectNames = item.organizationNames;
orgSelectIds = orgSelectIds.split(",");
orgSelectNames = orgSelectNames.split(",");
console.log(
"orgSelectIds&orgSelectNames",
orgSelectIds,
orgSelectNames
);
let arrObj = [];
arrObj = orgSelectIds.map((item, index) => {
return { value: item, lebel: orgSelectNames[index] };
});
console.log("arrObj-------------", arrObj);
state.orgSelect = arrObj;
}
};
const handleTagChange = () => {