Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yuping
2022-12-04 19:47:00 +08:00
2 changed files with 901 additions and 875 deletions

View File

@@ -460,11 +460,15 @@
</div> </div>
<div class="time"> <div class="time">
<div class="timetext">开始时间</div> <div class="timetext">开始时间</div>
<div class="timetext">{{ item.startTime!==null?item.startTime:''}}</div> <div class="timetext">
{{ item.startTime !== null ? item.startTime : "" }}
</div>
</div> </div>
<div class="progress"> <div class="progress">
<div class="progresstext"> <div class="progresstext">
{{ item.complete?item.complete:0 }}/{{ item.total?item.total:0 }} {{ item.complete ? item.complete : 0 }}/{{
item.total ? item.total : 0
}}
</div> </div>
<div style="display: flex"> <div style="display: flex">
<a-progress <a-progress
@@ -474,7 +478,7 @@
trailColor="rgba(253, 209, 98, 0.2)" trailColor="rgba(253, 209, 98, 0.2)"
/> />
<span class="progresstext" style="margin-left: 10px" <span class="progresstext" style="margin-left: 10px"
>{{ item.percent?item.percent:0 }}%</span >{{ item.percent ? item.percent : 0 }}%</span
> >
</div> </div>
</div> </div>
@@ -768,7 +772,10 @@
<div class="box"></div> <div class="box"></div>
<div class="onetitle">上传共享文档</div> <div class="onetitle">上传共享文档</div>
<div class="oneedi"> <div class="oneedi">
<a-switch v-model:checked="docChecked" @change="checkedClose"></a-switch> <a-switch
v-model:checked="docChecked"
@change="checkedClose"
></a-switch>
</div> </div>
</div> </div>
<div class="btnbox" style="margin: 20px"> <div class="btnbox" style="margin: 20px">
@@ -1217,6 +1224,15 @@
</div> </div>
</div> </div>
</a-modal> </a-modal>
<!-- 二维码弹窗 -->
<two-dimensional-code
v-model:codevisible="codevisible"
:codeInfo="codeInfo"
index="0"
type="课程二维码"
/>
<!-- 二维码弹窗 -->
</div> </div>
</template> </template>
<script> <script>
@@ -1243,6 +1259,7 @@ import { GetRouterDetail } from "@/api/indexTask";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { toDate } from "../../api/method"; import { toDate } from "../../api/method";
import { editRoutered } from "../../api/indexLearningPath"; import { editRoutered } from "../../api/indexLearningPath";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
export default { export default {
name: "LevelAdd", name: "LevelAdd",
components: { components: {
@@ -1257,6 +1274,7 @@ export default {
FaceManage, FaceManage,
WorkManage, WorkManage,
SeeStu, SeeStu,
TwoDimensionalCode,
}, },
setup() { setup() {
// const routers = useRoute(); // const routers = useRoute();
@@ -1888,7 +1906,7 @@ export default {
const getOverview = () => { const getOverview = () => {
getRouterOverview(state.routerId) getRouterOverview(state.routerId)
.then((res) => { .then((res) => {
console.log(res) console.log(res);
Object.keys(res.data.data.routerInfoOverview).forEach((item) => { Object.keys(res.data.data.routerInfoOverview).forEach((item) => {
levelList.routerInfoOverview[item] = levelList.routerInfoOverview[item] =
res.data.data.routerInfoOverview[item] || 0; res.data.data.routerInfoOverview[item] || 0;
@@ -1911,40 +1929,40 @@ export default {
}; };
// 设置上传图片开关 // 设置上传图片开关
const checkedClose = (data,a) => { const checkedClose = (data, a) => {
console.log(data,a) console.log(data, a);
state.docChecked = data state.docChecked = data;
console.log({ console.log({
routerId: state.routerId, routerId: state.routerId,
status: state.action, status: state.action,
attachSwitch: data ? 1: -1 attachSwitch: data ? 1 : -1,
}) });
// 更新开关状态 // 更新开关状态
editRoutered({ editRoutered({
attach:JSON.stringify(state.fileList), attach: JSON.stringify(state.fileList),
name: state.styTitle, name: state.styTitle,
picUrl: state.picUrl, picUrl: state.picUrl,
remark: state.remark, remark: state.remark,
routerId: state.routerId, routerId: state.routerId,
status: state.action, status: state.action,
attachSwitch: data ? 1: -1 attachSwitch: data ? 1 : -1,
})
.then((res) => {
console.log(res);
}) })
.then((res) => { .catch((err) => {
console.log(res); console.log(err);
}) });
.catch((err) => { };
console.log(err);
});
}
// 获取路径列表 // 获取路径列表
const myGetRouterDetail = () => { const myGetRouterDetail = () => {
GetRouterDetail(state.routerId) GetRouterDetail(state.routerId)
.then((res) => { .then((res) => {
console.log('router-list',res) console.log("router-list", res);
state.fileList = JSON.parse(res.data.data.routerInfo.attach) state.fileList = JSON.parse(res.data.data.routerInfo.attach);
state.docChecked = res.data.data.routerInfo.attachSwitch == 1?true:false state.docChecked =
res.data.data.routerInfo.attachSwitch == 1 ? true : false;
if (res.data.data.routerInfo.status == 1) { if (res.data.data.routerInfo.status == 1) {
state.nodata = false; state.nodata = false;
} }
@@ -1990,7 +2008,7 @@ export default {
remark: state.remark, remark: state.remark,
routerId: state.routerId, routerId: state.routerId,
status: state.action, status: state.action,
attachSwitch: state.docChecked?1:-1 attachSwitch: state.docChecked ? 1 : -1,
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@@ -2213,7 +2231,7 @@ export default {
deleteStu, deleteStu,
totask, totask,
tostudent, tostudent,
checkedClose checkedClose,
}; };
}, },
}; };

File diff suppressed because it is too large Load Diff