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