mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
-- 课程
This commit is contained in:
@@ -68,31 +68,33 @@
|
||||
/>
|
||||
<div class="inname">封面图</div>
|
||||
</div>
|
||||
<div class="in select" style="flex:1">
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="projectInfo.picUrl"
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 440px"
|
||||
placeholder="请选择"
|
||||
:options="projectPic"
|
||||
allowClear
|
||||
></a-select>
|
||||
<div
|
||||
:class="`box ${projectInfo.picUrl === src?'active':''}`"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid rgba(78, 166, 255, 1);
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
"
|
||||
v-for="(src,index) in projectPic"
|
||||
:key="index"
|
||||
@click="()=>{
|
||||
projectInfo.picUrl = src
|
||||
}"
|
||||
>
|
||||
<img
|
||||
style="width:100px;height:100px;margin-top:20px;border-radius: 8px"
|
||||
v-if="projectInfo.picUrl"
|
||||
:src="projectInfo.picUrl"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
"
|
||||
:src="src"
|
||||
alt="avatar"
|
||||
/>
|
||||
<div class="i_bottom">
|
||||
<span style="color: #999ba3">
|
||||
高宽比为16:9 (如:800*450) png或jpg图片
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
@@ -128,7 +130,7 @@
|
||||
<ProjectManager
|
||||
v-model:value="projectInfo.managerId"
|
||||
v-model:name="projectInfo.manager"
|
||||
@change="managerChange"
|
||||
@onChange="managerChange"
|
||||
mode="multiple"
|
||||
></ProjectManager>
|
||||
</div>
|
||||
@@ -292,13 +294,13 @@ import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import * as api from "../../api/index";
|
||||
import {useStore} from "vuex";
|
||||
import ProjectClass from "@/components/project/ProjectClass";
|
||||
import TrainClass from "@/components/project/TrainClass";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import ProjectLevel from "@/components/project/ProjectLevel";
|
||||
import {changeOwnership, scrollLoad} from "@/api/method";
|
||||
import * as api1 from "@/api/index1";
|
||||
|
||||
export default {
|
||||
name: "projectAdd",
|
||||
@@ -310,7 +312,6 @@ export default {
|
||||
OrgClass,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const routers = useRoute();
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
@@ -330,8 +331,8 @@ export default {
|
||||
courseSyncFlag: false,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
state.projectPic = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
||||
onMounted(async () => {
|
||||
state.projectPic = await getDictList('pathmapPic').then(e => e.map(e => e.dictValue));
|
||||
state.viewDetail = routers.query.viewDetail;
|
||||
getProjectInfo();
|
||||
getTemplate();
|
||||
@@ -343,6 +344,12 @@ export default {
|
||||
state.projectInfo.parentId = routers.query.parentId;
|
||||
});
|
||||
|
||||
const getDictList = (param) => api1.getDict({
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
setCode: param,
|
||||
}).then((res) => res.data.data.rows);
|
||||
|
||||
function getProjectInfo() {
|
||||
if (!routers.query.projectId) {
|
||||
state.projectInfo = {
|
||||
|
||||
Reference in New Issue
Block a user