mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 22:06:45 +08:00
feat:面授课预览增加目标人群及资源归属
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-02-23 14:57:21
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-02-24 09:58:42
|
||||
* @LastEditTime: 2023-02-24 22:54:03
|
||||
* @FilePath: /fe-manage/src/components/project/OrgClassCheck.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
|
||||
@@ -65,19 +65,84 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="item_nam" style="margin-bottom: 102px">
|
||||
<div class="asterisk_icon">
|
||||
<img
|
||||
style="width: 10px; height: 10px"
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="img"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">目标人群:</span>
|
||||
<span style="margin-right: 14px">目标人群</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="i1_input">
|
||||
{{ filterTxt(detail.targetUser) }}
|
||||
<!-- <a-input v-model:value="qdms_inputV2" maxlength="50"
|
||||
style="width: 440px; height: 40px; border-radius: 8px" placeholder="请输入目标人群" />
|
||||
<div class="inp_num">
|
||||
<span style="color: #c7cbd2">
|
||||
{{ qdms_inputV2.length }}/50
|
||||
</span>
|
||||
</div> -->
|
||||
<div>
|
||||
<OrgClassCheck
|
||||
v-model:value="orgSelect"
|
||||
v-model:name="orgSelectName"
|
||||
:disabled="true"
|
||||
></OrgClassCheck>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<a-select
|
||||
v-model:value="selectJobId"
|
||||
mode="multiple"
|
||||
style="width: 440px; min-height: 40px"
|
||||
placeholder="请选择岗位"
|
||||
:options="jobType"
|
||||
@change="handleChangeJob"
|
||||
:fieldNames="{
|
||||
key: 'id',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
}"
|
||||
disabled
|
||||
></a-select>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<a-select
|
||||
v-model:value="selectBandId"
|
||||
mode="multiple"
|
||||
style="width: 440px; min-height: 40px"
|
||||
placeholder="请选择Band"
|
||||
:options="bandList"
|
||||
@change="handleChangeBand"
|
||||
:fieldNames="{
|
||||
key: 'id',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
}"
|
||||
disabled
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">资源归属</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="select i6_input" style="width: 440px">
|
||||
<OrgClass
|
||||
v-model:value="sourceBelongId"
|
||||
v-model:name="sourceBelongName"
|
||||
:disabled="true"
|
||||
></OrgClass>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -249,11 +314,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a
|
||||
@click="openDown(item)"
|
||||
style="margin-left: 5px"
|
||||
>下载</a
|
||||
>
|
||||
<a @click="openDown(item)" style="margin-left: 5px">下载</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -281,7 +342,9 @@
|
||||
<script>
|
||||
import { reactive, toRefs, defineComponent, watch, computed } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
import OrgClassCheck from "@/components/project/OrgClassCheck";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import { detail } from "@/api/indexCourse";
|
||||
export default defineComponent({
|
||||
props: {
|
||||
visible: {
|
||||
@@ -293,6 +356,10 @@ export default defineComponent({
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
components: {
|
||||
OrgClassCheck,
|
||||
OrgClass,
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
console.log("props", props);
|
||||
const store = useStore();
|
||||
@@ -304,20 +371,89 @@ export default defineComponent({
|
||||
location.href.indexOf("http://") !== -1
|
||||
? "http://43.143.139.204:12016/"
|
||||
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
||||
|
||||
//目标任务
|
||||
orgSelect: [],
|
||||
orgSelectName: [],
|
||||
orgSelectFullName: [],
|
||||
selectJobName: [],
|
||||
selectJobId: [],
|
||||
selectBandName: [],
|
||||
selectBandId: [],
|
||||
//资源归属
|
||||
sourceBelongId: [],
|
||||
sourceBelongName: [],
|
||||
sourceBelongFullName: [],
|
||||
});
|
||||
|
||||
const sysTypeOptions = computed(() => store.state.content_type);
|
||||
|
||||
//获取岗位
|
||||
const jobType = computed(() => store.state.job_type);
|
||||
//获取band
|
||||
const bandList = computed(() => store.state.band);
|
||||
watch(
|
||||
() => props.detail.sysTypeId,
|
||||
() => {
|
||||
state.categoryName = findClassFullName(sysTypeOptions.value);
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => props.detail.id,
|
||||
() => {
|
||||
detail({
|
||||
offcourseId: Number(props.detail.id),
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
let item = res.data.data;
|
||||
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;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
function findClassFullName(list, name = "") {
|
||||
return (
|
||||
(list && list.length && list.map((e) => props.detail.sysTypeId == e.code ? name ? name + "-" + e.name : e.name : findClassFullName(e.children, name ? name + "-" + e.name : e.name)).filter((name) => name).join("")) || ""
|
||||
(list &&
|
||||
list.length &&
|
||||
list
|
||||
.map((e) =>
|
||||
props.detail.sysTypeId == e.code
|
||||
? name
|
||||
? name + "-" + e.name
|
||||
: e.name
|
||||
: findClassFullName(
|
||||
e.children,
|
||||
name ? name + "-" + e.name : e.name
|
||||
)
|
||||
)
|
||||
.filter((name) => name)
|
||||
.join("")) ||
|
||||
""
|
||||
);
|
||||
}
|
||||
|
||||
@@ -329,12 +465,13 @@ export default defineComponent({
|
||||
}
|
||||
};
|
||||
const handleCancel = () => {
|
||||
console.log("关闭");
|
||||
emit("cancel");
|
||||
};
|
||||
|
||||
function openDown(link){
|
||||
window.open(process.env.VUE_APP_FILE_PATH + link)
|
||||
//:href="item.indexOf('http') !== -1 ? item : locationHref + item"
|
||||
function openDown(link) {
|
||||
window.open(process.env.VUE_APP_FILE_PATH + link);
|
||||
//:href="item.indexOf('http') !== -1 ? item : locationHref + item"
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -342,6 +479,8 @@ export default defineComponent({
|
||||
filterTxt,
|
||||
openDown,
|
||||
handleCancel,
|
||||
jobType,
|
||||
bandList,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user