mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-11-21 14:32:52
|
* @Date: 2022-11-21 14:32:52
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-12-08 08:48:26
|
* @LastEditTime: 2022-12-08 15:47:05
|
||||||
* @FilePath: /fe-manage/src/api/config.js
|
* @FilePath: /fe-manage/src/api/config.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
@@ -56,7 +56,7 @@ http.interceptors.response.use(
|
|||||||
return response;
|
return response;
|
||||||
} else {
|
} else {
|
||||||
if (code === 1000) {
|
if (code === 1000) {
|
||||||
window.open("https://u-pre.boe.com/web/", '_self');
|
// window.open("https://u-pre.boe.com/web/", '_self');
|
||||||
// window.open("http://111.231.196.214:12013/manage/login", '_self');
|
// window.open("http://111.231.196.214:12013/manage/login", '_self');
|
||||||
}
|
}
|
||||||
console.log("api %o", msg);
|
console.log("api %o", msg);
|
||||||
|
|||||||
@@ -61,14 +61,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name flex-top">
|
<div class="name flex-top">
|
||||||
<div class="namebox" style="margin-top:10px">
|
<div class="namebox" style="margin-top: 10px">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select" style="flex:1">
|
<div class="in select" style="flex: 1">
|
||||||
<a-select
|
<a-select
|
||||||
:getPopupContainer="
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
@@ -84,7 +84,12 @@
|
|||||||
allowClear
|
allowClear
|
||||||
></a-select>
|
></a-select>
|
||||||
<img
|
<img
|
||||||
style="width:100px;height:100px;margin-top:20px;border-radius: 8px"
|
style="
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
margin-top: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
"
|
||||||
v-if="projectInfo.picUrl"
|
v-if="projectInfo.picUrl"
|
||||||
:src="projectInfo.picUrl"
|
:src="projectInfo.picUrl"
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
@@ -289,18 +294,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
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 { 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 { storage } from "../../api/storage";
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
components: {
|
components: {
|
||||||
@@ -329,16 +334,19 @@ export default {
|
|||||||
},
|
},
|
||||||
classifyList5: [],
|
classifyList5: [],
|
||||||
courseSyncFlag: false,
|
courseSyncFlag: false,
|
||||||
picUrlName:'请选择封面图'
|
picUrlName: "请选择封面图",
|
||||||
});
|
});
|
||||||
|
|
||||||
// 封面图选择
|
// 封面图选择
|
||||||
const handleChangeSelect = (value) => {
|
const handleChangeSelect = (value) => {
|
||||||
console.log(value)
|
console.log(value);
|
||||||
state.projectInfo.picUrl= value
|
state.projectInfo.picUrl = value;
|
||||||
}
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
state.projectPic = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
state.projectPic = store.state.projectPic.map((e) => ({
|
||||||
|
value: e.dictValue,
|
||||||
|
label: e.dictName,
|
||||||
|
}));
|
||||||
state.viewDetail = routers.query.viewDetail;
|
state.viewDetail = routers.query.viewDetail;
|
||||||
getProjectInfo();
|
getProjectInfo();
|
||||||
getTemplate();
|
getTemplate();
|
||||||
@@ -359,17 +367,20 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
api
|
api
|
||||||
.getProjectDetail({projectId: routers.query.projectId})
|
.getProjectDetail({ projectId: routers.query.projectId })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
state.projectInfo = res.data.data.projectInfo;
|
state.projectInfo = res.data.data.projectInfo;
|
||||||
|
|
||||||
console.log(res)
|
console.log(res);
|
||||||
let picurl = res.data.data.projectInfo.picUrl
|
let picurl = res.data.data.projectInfo.picUrl;
|
||||||
let dates = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
let dates = store.state.projectPic.map((e) => ({
|
||||||
console.log(dates,picurl)
|
value: e.dictValue,
|
||||||
for(let i=0;i<dates.length;i++){
|
label: e.dictName,
|
||||||
if(dates[i].value==picurl){
|
}));
|
||||||
state.picUrlName = dates[i].label
|
console.log(dates, picurl);
|
||||||
|
for (let i = 0; i < dates.length; i++) {
|
||||||
|
if (dates[i].value == picurl) {
|
||||||
|
state.picUrlName = dates[i].label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -466,19 +477,23 @@ export default {
|
|||||||
state.projectInfo.type = 3;
|
state.projectInfo.type = 3;
|
||||||
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
||||||
api.createProject(state.projectInfo).then((res) => {
|
api.createProject(state.projectInfo).then((res) => {
|
||||||
state.projectInfo.projectId || changeOwnership(
|
state.projectInfo.projectId ||
|
||||||
"project",
|
changeOwnership("project", res.data.data.projectId, [
|
||||||
res.data.data.projectId,
|
{ id: res.data.data.createId, name: res.data.data.createName },
|
||||||
[{id: res.data.data.createId, name: res.data.data.createName}]
|
]);
|
||||||
);
|
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("编辑成功");
|
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
||||||
router.back();
|
// router.back();
|
||||||
|
router.push({
|
||||||
|
path: "/taskpage",
|
||||||
|
query: { projectId: res.data.data.projectId },
|
||||||
|
});
|
||||||
|
storage.set("projectId", res.data.data.projectId);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function managerChange(e, l, d) {
|
function managerChange(e, l, d) {
|
||||||
state.projectInfo.sourceBelongId = d
|
state.projectInfo.sourceBelongId = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -490,7 +505,7 @@ export default {
|
|||||||
createProject,
|
createProject,
|
||||||
backPage,
|
backPage,
|
||||||
templateScroll,
|
templateScroll,
|
||||||
handleChangeSelect
|
handleChangeSelect,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user