mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # src/views/projectcenter/ProjectAdd.vue
This commit is contained in:
@@ -68,33 +68,32 @@
|
||||
/>
|
||||
<div class="inname">封面图</div>
|
||||
</div>
|
||||
<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
|
||||
}"
|
||||
>
|
||||
<div class="in select" style="flex:1">
|
||||
<a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="picUrlName"
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 440px"
|
||||
placeholder="请选择"
|
||||
:options="projectPic"
|
||||
@change="handleChangeSelect"
|
||||
allowClear
|
||||
></a-select>
|
||||
<img
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
"
|
||||
:src="src"
|
||||
style="width:100px;height:100px;margin-top:20px;border-radius: 8px"
|
||||
v-if="projectInfo.picUrl"
|
||||
:src="projectInfo.picUrl"
|
||||
alt="avatar"
|
||||
/>
|
||||
<div class="i_bottom">
|
||||
<span style="color: #999ba3">
|
||||
高宽比为16:9 (如:800*450) png或jpg图片
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
@@ -130,7 +129,7 @@
|
||||
<ProjectManager
|
||||
v-model:value="projectInfo.managerId"
|
||||
v-model:name="projectInfo.manager"
|
||||
@onChange="managerChange"
|
||||
@change="managerChange"
|
||||
mode="multiple"
|
||||
></ProjectManager>
|
||||
</div>
|
||||
@@ -294,13 +293,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",
|
||||
@@ -312,6 +311,7 @@ export default {
|
||||
OrgClass,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const routers = useRoute();
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
@@ -329,10 +329,16 @@ export default {
|
||||
},
|
||||
classifyList5: [],
|
||||
courseSyncFlag: false,
|
||||
picUrlName:'请选择封面图'
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
state.projectPic = await getDictList('pathmapPic').then(e => e.map(e => e.dictValue));
|
||||
// 封面图选择
|
||||
const handleChangeSelect = (value) => {
|
||||
console.log(value)
|
||||
state.projectInfo.picUrl= value
|
||||
}
|
||||
onMounted(() => {
|
||||
state.projectPic = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
||||
state.viewDetail = routers.query.viewDetail;
|
||||
getProjectInfo();
|
||||
getTemplate();
|
||||
@@ -344,12 +350,6 @@ 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 = {
|
||||
@@ -362,6 +362,17 @@ export default {
|
||||
.getProjectDetail({projectId: routers.query.projectId})
|
||||
.then((res) => {
|
||||
state.projectInfo = res.data.data.projectInfo;
|
||||
|
||||
console.log(res)
|
||||
let picurl = res.data.data.projectInfo.picUrl
|
||||
let dates = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
||||
console.log(dates,picurl)
|
||||
for(let i=0;i<dates.length;i++){
|
||||
if(dates[i].value==picurl){
|
||||
state.picUrlName = dates[i].label
|
||||
}
|
||||
}
|
||||
|
||||
state.projectInfo.rangeTime = [
|
||||
state.projectInfo.beginTime,
|
||||
state.projectInfo.endTime,
|
||||
@@ -479,6 +490,7 @@ export default {
|
||||
createProject,
|
||||
backPage,
|
||||
templateScroll,
|
||||
handleChangeSelect
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user