mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
<!-- 审核理由 -->
|
||||
<div v-if="statusJuJue" class="statusJuJue">
|
||||
<span>审核意见:</span>
|
||||
<span>{{auditDescription}}</span>
|
||||
<span>{{ auditDescription }}</span>
|
||||
</div>
|
||||
<div class="faceteach" :style="{ display: ft_hs ? 'block' : 'none' }">
|
||||
<div class="ft_main">
|
||||
@@ -310,7 +310,7 @@
|
||||
<span style="margin-right: 10px">附件</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<FJUpload v-model:value="attach"></FJUpload>
|
||||
<FJUpload v-model:value="attach" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -360,8 +360,8 @@ import {
|
||||
defineComponent,
|
||||
ref,
|
||||
shallowRef,
|
||||
onMounted,
|
||||
onBeforeUnmount,
|
||||
// onMounted,
|
||||
onUnmounted,
|
||||
} from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { edit, detail, handle } from "@/api/indexCourse";
|
||||
@@ -372,7 +372,7 @@ import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import FJUpload from "@/components/common/FJUpload";
|
||||
import * as moment from "moment";
|
||||
import * as api2 from "../../api/indexAudit"
|
||||
import * as api2 from "../../api/indexAudit";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
Editor,
|
||||
@@ -383,6 +383,7 @@ export default defineComponent({
|
||||
setup(props, { expose, emit }) {
|
||||
const state = reactive({
|
||||
hideshow: true,
|
||||
ft_eidt: false,
|
||||
attach: "",
|
||||
ft_hs: false,
|
||||
addLoading: false,
|
||||
@@ -401,17 +402,20 @@ export default defineComponent({
|
||||
tags_val: [],
|
||||
qdms_inputV6: "",
|
||||
imgList: [],
|
||||
auditDescription:"",
|
||||
auditDescription: "",
|
||||
});
|
||||
|
||||
const visibleOpen = (offcourseId, name) => {
|
||||
state.offcourseId = offcourseId;
|
||||
|
||||
if (state.offcourseId) {
|
||||
state.ft_hs = true;
|
||||
state.ft_eidt = true;
|
||||
handleEditInfo(state.offcourseId);
|
||||
} else {
|
||||
state.qdms_inputV1 = name;
|
||||
state.ft_hs = true;
|
||||
state.ft_eidt = false;
|
||||
state.qdms_inputV1 = name;
|
||||
}
|
||||
};
|
||||
const visibleClose = () => {
|
||||
@@ -446,7 +450,7 @@ export default defineComponent({
|
||||
state.imgList = [];
|
||||
state.attach = "";
|
||||
|
||||
valueHtml.value = "";
|
||||
// valueHtml.value = "";
|
||||
};
|
||||
|
||||
// 富文本 sssssssssssssss
|
||||
@@ -455,18 +459,17 @@ export default defineComponent({
|
||||
// 内容 HTML
|
||||
const valueHtml = ref("");
|
||||
// // 模拟 ajax 异步获取内容
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
// valueHtml.value = "<p>模拟 Ajax 异步设置内容</p>";
|
||||
console.log("toolbar222222222222222");
|
||||
console.log(editorRef.value);
|
||||
// const toolbar = DomEditor.getToolbar(editorRef.value);
|
||||
// const menu = editorRef.value.getAllMenuKeys();
|
||||
// const bar = toolbar.getConfig().toolbarKeys;
|
||||
// console.log(menu);
|
||||
// console.log(bar);
|
||||
}, 3500);
|
||||
});
|
||||
// onMounted(() => {
|
||||
// setTimeout(() => {
|
||||
// // valueHtml.value = "<p>模拟 Ajax 异步设置内容</p>";
|
||||
// console.log(editorRef.value);
|
||||
// // const toolbar = DomEditor.getToolbar(editorRef.value);
|
||||
// // const menu = editorRef.value.getAllMenuKeys();
|
||||
// // const bar = toolbar.getConfig().toolbarKeys;
|
||||
// // console.log(menu);
|
||||
// // console.log(bar);
|
||||
// }, 3500);
|
||||
// });
|
||||
const toolbarConfig = {
|
||||
excludeKeys: ["insertVideo", "insertImage"],
|
||||
};
|
||||
@@ -478,7 +481,7 @@ export default defineComponent({
|
||||
formData.append("file", file);
|
||||
fileUp(formData).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
// 最后插入图片
|
||||
// 最后插入图片 url alt href
|
||||
insertFn(res.data.data, file.name, res.data.data);
|
||||
}
|
||||
});
|
||||
@@ -487,11 +490,15 @@ export default defineComponent({
|
||||
const handleCreated = (editor) => {
|
||||
editorRef.value = editor; // 记录 editor 实例,重要!
|
||||
};
|
||||
// const handleDestory = () => {
|
||||
// const editor = editorRef.value;
|
||||
// if (editor == null) return;
|
||||
// editor.destroy();
|
||||
// };
|
||||
// 组件销毁时,也及时销毁编辑器
|
||||
onBeforeUnmount(() => {
|
||||
const editor = editorRef.value;
|
||||
if (editor == null) return;
|
||||
editor.destroy();
|
||||
onUnmounted(() => {
|
||||
console.log("组件销毁时,也及时销毁编辑器");
|
||||
// handleDestory();
|
||||
});
|
||||
// 富文本 eeeeeeeeeeeeee
|
||||
|
||||
@@ -620,7 +627,9 @@ export default defineComponent({
|
||||
if (param === "review") {
|
||||
//新建时点击审核按钮
|
||||
submitReview(res.data.data.offcourseId);
|
||||
} else visibleClose();
|
||||
} else {
|
||||
visibleClose();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -641,12 +650,21 @@ export default defineComponent({
|
||||
if (Number(item.auditStatus) === 2 && Number(item.status) === 0) {
|
||||
state.statusTingQi = 0;
|
||||
}
|
||||
if(Number(item.auditStatus) === -1){
|
||||
let obj ={
|
||||
offcourseId:offcourseId,
|
||||
type:2,
|
||||
if (Number(item.auditStatus) === -1) {
|
||||
let obj = {
|
||||
offcourseId: offcourseId,
|
||||
type: 2,
|
||||
pageNo: 1,
|
||||
pageSize: 1,
|
||||
pageSize: 1,
|
||||
};
|
||||
const res = await api2.auditList(obj).then((res) => {
|
||||
if (res.data.code === 200) return res.data.data;
|
||||
});
|
||||
if (res.rows && res.rows.length > 0) {
|
||||
state.auditDescription = res.rows[0].description
|
||||
? res.rows[0].description
|
||||
: "-";
|
||||
console.log("state.auditDescription", state.auditDescription);
|
||||
}
|
||||
api2.auditList(obj).then((res)=>{
|
||||
|
||||
@@ -670,8 +688,13 @@ export default defineComponent({
|
||||
state.qdms_inputV6 = item.intro;
|
||||
state.member = { value: item.teacherId, name: item.teacher };
|
||||
valueHtml.value = item.outline;
|
||||
state.attach = item.attach;
|
||||
state.ft_hs = true;
|
||||
let arrss = item.attach.split(',')
|
||||
let str =''
|
||||
for(let i=0;i<arrss.length;i++){
|
||||
i == arrss.length -1 ? str += arrss[i].slice(arrss[i].lastIndexOf('/')+1) : str += arrss[i].slice(arrss[i].lastIndexOf('/')+1) + ','
|
||||
}
|
||||
console.log(str)
|
||||
state.attach = str;
|
||||
};
|
||||
|
||||
const handleTagChange = () => {
|
||||
@@ -721,15 +744,15 @@ export default defineComponent({
|
||||
visibleClose,
|
||||
handleTagChange,
|
||||
handleTagClose,
|
||||
handleCreated,
|
||||
handlePush,
|
||||
submitReview,
|
||||
reviewClick,
|
||||
|
||||
editorRef,
|
||||
valueHtml,
|
||||
mode: "simple", // 或 'simple'
|
||||
toolbarConfig,
|
||||
editorConfig,
|
||||
handleCreated,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user