+去掉考试管理 +题目行间距 +实操选完才进行下一题
| | |
| | | <i class="el-icon-arrow-down el-icon--right"></i> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item> |
| | | <!-- <el-dropdown-item> |
| | | <router-link to="/">{{ $t("navbar.dashboard") }}</router-link> |
| | | </el-dropdown-item> |
| | | </el-dropdown-item> --> |
| | | <el-dropdown-item> |
| | | <router-link to="/info/index">{{ |
| | | $t("navbar.userinfo") |
| | |
| | | <template> |
| | | <div class="top-menu"> |
| | | <el-menu :default-active="activeIndex" |
| | | mode="horizontal" |
| | | text-color="#333"> |
| | | <el-menu :default-active="activeIndex" mode="horizontal" text-color="#333"> |
| | | <el-menu-item index="0" @click.native="openHome(itemHome)" key="0"> |
| | | <template slot="title"> |
| | | <i :class="itemHome.source"></i> |
| | | <span>{{generateTitle(itemHome)}}</span> |
| | | <span>{{ generateTitle(itemHome) }}</span> |
| | | </template> |
| | | </el-menu-item> |
| | | <template v-for="(item,index) in items"> |
| | | <el-menu-item :index="item.id+''" @click.native="openMenu(item)" :key="index"> |
| | | <template v-for="(item, index) in items"> |
| | | <el-menu-item |
| | | :index="item.id + ''" |
| | | @click.native="openMenu(item)" |
| | | :key="index" |
| | | > |
| | | <template slot="title"> |
| | | <i :class="item.source" style="padding-right: 5px;"></i> |
| | | <span>{{generateTitle(item)}}</span> |
| | | <i :class="item.source" style="padding-right: 5px"></i> |
| | | <span>{{ generateTitle(item) }}</span> |
| | | </template> |
| | | </el-menu-item> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | name: "top-menu", |
| | | data() { |
| | | return { |
| | | itemHome: { |
| | | name: '考试管理', |
| | | source: 'el-icon-menu', |
| | | }, |
| | | activeIndex: "0", |
| | | items: [], |
| | | }; |
| | | export default { |
| | | name: "top-menu", |
| | | data() { |
| | | return { |
| | | itemHome: { |
| | | // name: "考试管理", |
| | | source: "el-icon-menu", |
| | | }, |
| | | activeIndex: "0", |
| | | items: [], |
| | | }; |
| | | }, |
| | | inject: ["index"], |
| | | created() { |
| | | this.getMenu(); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagCurrent", "menu"]), |
| | | }, |
| | | methods: { |
| | | openHome(itemHome) { |
| | | this.index.openMenu(itemHome); |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath( |
| | | { name: itemHome.name, src: "" }, |
| | | {} |
| | | ), |
| | | }); |
| | | }, |
| | | inject: ["index"], |
| | | created() { |
| | | this.getMenu(); |
| | | openMenu(item) { |
| | | this.index.openMenu(item); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagCurrent", "menu"]) |
| | | getMenu() { |
| | | this.$store.dispatch("GetTopMenu").then((res) => { |
| | | this.items = res; |
| | | }); |
| | | }, |
| | | methods: { |
| | | openHome(itemHome) { |
| | | this.index.openMenu(itemHome); |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath({name: itemHome.name, src: ''}, {}) |
| | | }); |
| | | }, |
| | | openMenu(item) { |
| | | this.index.openMenu(item) |
| | | }, |
| | | getMenu() { |
| | | this.$store.dispatch("GetTopMenu").then(res => { |
| | | this.items = res; |
| | | }); |
| | | }, |
| | | generateTitle(item) { |
| | | return this.$router.$avueRouter.generateTitle( |
| | | item.name, |
| | | (item.meta || {}).i18n |
| | | ); |
| | | }, |
| | | } |
| | | }; |
| | | generateTitle(item) { |
| | | return this.$router.$avueRouter.generateTitle( |
| | | item.name, |
| | | (item.meta || {}).i18n |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | .subject-exam-title { |
| | | font-size: 30px !important; |
| | | margin-bottom: 0 !important; |
| | | } |
| | | .subject-content { |
| | | margin-top: 10px !important; |
| | | span { |
| | | font-size: 24px !important; |
| | | font-size: 22px !important; |
| | | line-height: 28px !important; |
| | | font-weight: 500; |
| | | } |
| | | .subject-title { |
| | | font-size: 24px !important; |
| | | line-height: 24px !important; |
| | | line-height: 26px !important; |
| | | letter-spacing: 0.1rem !important; |
| | | } |
| | | } |
| | |
| | | }); |
| | | return; |
| | | } |
| | | // if (this.getAnswer() == "") { |
| | | // this.$message({ |
| | | // message: "请选择答案", |
| | | // type: "warning", |
| | | // }); |
| | | // return; |
| | | // } |
| | | // console.log(this.getAnswer(), this.query.type); |
| | | if (this.query.type == 3) { |
| | | let goShiCao = true; |
| | | const answer = this.getAnswer(); |
| | | for (let k in answer) { |
| | | if (answer[k].value == "") { |
| | | goShiCao = false; |
| | | } |
| | | } |
| | | if (!goShiCao) { |
| | | this.$message({ |
| | | message: "实操题目请选择完整顺序!", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | this.subjectIds[i].answer = this.getAnswer(); |
| | | |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //本地服务接口地址 |
| | | // target: 'http://192.168.0.114:81', |
| | | target: 'http://localhost:81', |
| | | target: 'http://192.168.0.114:81', |
| | | // target: 'http://localhost:81', |
| | | // target: 'http://172.20.10.2:81', |
| | | //远程演示服务地址,可用于直接启动项目 |
| | | // target: 'http://2h3f861221.wicp.vip:58646', |