| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514 |
- <template>
- <div class="generating_container app-container">
- <el-card>
- <div class="header_top">
- <div v-for="(tab,idx) in visibleTabs" :key="idx" class="pointer"
- :class="{'active-tab': tab.content==tabActive}"
- @click="handleTabChange(idx)">
- {{ tab.label }}
- </div>
- </div>
- </el-card>
- <!-- NOTE:类似延迟加载 -->
- <keep-alive v-for="tab in visibleTabs" :key="tab.content">
- <component :is="tab.content" v-if="tab.content==tabActive"></component>
- </keep-alive>
- </div>
- </template>
- <script>
- import PaperByHand from '@/views/questioncenter/components/generate-tabs/paper-by-hand'
- import PaperByIntelligent from '@/views/questioncenter/components/generate-tabs/paper-by-intelligent'
- import PaperRecord from '@/views/questioncenter/components/generate-tabs/paper-record'
- import PaperWorkIdentifierMixin from './components/generate-tabs/paper-work-identifier-mixin'
- import PaperWorkVideo from '@/views/questioncenter/components/generate-tabs/paper-work-video'
- import PaperWorkPast from '@/views/questioncenter/components/generate-tabs/paper-work-past'
- import PaperWorkPublish from '@/views/questioncenter/components/generate-tabs/paper-work-publish'
- import PaperWorkHistory from '@/views/questioncenter/components/generate-tabs/paper-work-history'
- export default {
- mixins: [PaperWorkIdentifierMixin],
- components: {
- PaperWorkHistory,
- PaperWorkPublish,
- PaperWorkPast,
- PaperWorkVideo,
- PaperRecord,
- PaperByIntelligent,
- PaperByHand
- },
- data() {
- return {
- normalTabs: [{
- label: '手动组卷',
- content: PaperByHand.name
- }, {
- label: '智能组卷',
- content: PaperByIntelligent.name
- }, {
- label: '组卷记录',
- content: PaperRecord.name
- }],
- paperWorkTabs: [{
- label: '组卷作业',
- content: PaperByHand.name
- }, {
- label: '视频作业',
- content: PaperWorkVideo.name
- }, {
- label: '试卷作业',
- content: PaperWorkPast.name
- }, {
- label: '发布作业',
- content: PaperWorkPublish.name
- }, {
- label: '检查作业',
- content: PaperWorkHistory.name
- }],
- visibleTabs: [],
- tabActive: ''
- }
- },
- created() {
- // visibleTabs不能做成计算属性,否则因为依赖于路由会在任意跳转时刷新
- this.visibleTabs = this.isPaperWork ? this.paperWorkTabs : this.normalTabs
- let query = this.$route.query
- const defaultActive = query.tabActive * 1 || 0
- this.handleTabChange(defaultActive)
- },
- methods: {
- handleTabChange(idx) {
- const current = this.visibleTabs[idx]
- this.tabActive = current.content
- }
- }
- }
- </script>
- <style lang="scss">
- .generating_container {
- .active-tab {
- color: #47c6a2;
- }
- .active-tab::after {
- content: "";
- width: 100%;
- height: 4px;
- position: absolute;
- background: #47c6a2;
- left: 0;
- transform: translateY(50%);
- bottom: 0;
- }
- .header_top {
- display: flex;
- border-bottom: 1px solid #b7b7b7;
- margin-bottom: 20px;
- }
- .header_top > div {
- position: relative;
- flex: 1;
- text-align: center;
- padding: 8px 0 24px 0;
- }
- .el-card {
- margin-bottom: 20px;
- }
- .generating_aside {
- padding-bottom: 104px;
- background: #fff;
- margin-right: 24px;
- height: 600px;
- overflow: scroll;
- overflow-x: hidden;
- }
- .el-aside {
- margin-bottom: 0;
- padding: 24px 0 0 16px;
- }
- .aside_header {
- display: flex;
- flex-direction: column;
- justify-content: left;
- }
- .aside_header > span:first-child {
- width: 173px;
- height: 27px;
- background: -webkit-gradient(
- linear,
- left top,
- left bottom,
- from(#ffffff),
- to(#47c6a2)
- );
- background: linear-gradient(180deg, #ffffff 0%, #47c6a2 100%);
- opacity: 0.5;
- }
- .aside_header > span:last-child {
- margin-bottom: 20px;
- }
- .aside_header > span {
- margin-top: 5px;
- width: 84px;
- height: 22px;
- font-size: 16px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #343434;
- line-height: 22px;
- }
- .el-main {
- //padding: 37px 28px 0 28px;
- }
- .main_header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 20px;
- }
- .main_header .main_tit {
- font-size: 16px;
- font-weight: 500;
- color: #47c6a2;
- line-height: 22px;
- margin-right: 64px;
- }
- .main_header .filter {
- font-weight: 400;
- color: #4c4c4c;
- line-height: 20px;
- }
- .main_header .left {
- display: flex;
- }
- .search_box {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: flex-end;
- position: relative;
- margin-right: 20px;
- }
- .search_box img {
- position: absolute;
- right: 20px;
- cursor: pointer;
- top: 6px;
- }
- .search_box input {
- background: #f7f7ff;
- border-radius: 20px;
- border: 1px solid #c6cbf5;
- outline: none;
- width: 340px;
- height: 32px;
- padding-left: 24px;
- }
- .que_item {
- border-radius: 1px;
- border: 1px solid #dedede;
- margin-bottom: 8px;
- }
- .que_content {
- padding: 12px 24px 0 33px;
- font-size: 14px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #4c4c4c;
- line-height: 27px;
- margin-bottom: 40px;
- }
- .que-content-title {
- font-size: 14px;
- display: flex;
- }
- .que-option {
- line-height: 40px;
- }
- .que-option span {
- margin-right: 5px;
- }
- .que_footer {
- border-top: 1px solid #dedede;
- padding-left: 33px;
- overflow: hidden;
- padding-bottom: 23px;
- padding-top: 21px;
- }
- .que_footer .spans {
- float: left;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #979797;
- line-height: 20px;
- }
- .que_footer .spans > span {
- margin-right: 20px;
- }
- .operation {
- display: flex;
- align-items: center;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #47c6a2;
- line-height: 20px;
- float: right;
- }
- .operation > div {
- display: flex;
- align-items: center;
- cursor: pointer;
- }
- .operation .shoucan {
- margin-right: 46px;
- }
- .operation .jiucuo {
- color: #ff4e00;
- margin-right: 32px;
- }
- .operation .detail span {
- border-radius: 1px;
- border-bottom: 1px solid #47c6a2;
- }
- .operation .detail {
- margin-right: 32px;
- }
- .operation > div > img {
- margin-right: 10px;
- }
- .knowPoints .tags {
- margin-top: 24px;
- margin-bottom: 72px;
- }
- .knowPoints .tit {
- margin-bottom: 16px;
- overflow: hidden;
- color: #47c6a2;
- }
- .knowPoints .clear {
- float: right;
- margin-right: 40px;
- }
- .knowPoints .clear img {
- margin-right: 16px;
- }
- .que .tit {
- margin-bottom: 16px;
- overflow: hidden;
- color: #47c6a2;
- }
- .que .clear {
- float: right;
- margin-right: 40px;
- }
- .que .clear img {
- margin-right: 16px;
- }
- .el-divider.generating_divider {
- margin: 0;
- background: #47c6a2;
- }
- .computer {
- margin-top: 24px;
- display: flex;
- justify-content: flex-start;
- flex-wrap: wrap;
- }
- .computer .computer_item {
- flex: 33% 0 0;
- margin-bottom: 32px;
- }
- .computer .computer_item .tit {
- height: 20px;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #343434;
- line-height: 20px;
- }
- .computer .computer_item .select {
- width: 58px;
- height: 17px;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #969696;
- line-height: 17px;
- }
- ::-webkit-scrollbar {
- width: 4px;
- }
- ::-webkit-scrollbar-thumb {
- -webkit-box-shadow: inset 0 0 1px rgba(136, 136, 136, 0.3);
- background-color: rgb(238, 241, 245);
- }
- .queBoxer {
- display: flex;
- position: fixed;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- }
- .queBoxer .main {
- border-top: 2px solid #47c6a2;
- padding: 10px 0;
- border-bottom: 2px solid #47c6a2;
- background: #fff;
- }
- .queBoxer > div > div {
- padding: 0 10px;
- }
- .queBoxer .left {
- padding: 10px;
- background: #47c6a2;
- color: white;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- }
- .queBoxer .main .btn {
- background: #47c6a2;
- color: white;
- border-radius: 4px;
- padding: 4px;
- cursor: pointer;
- margin: 5px 10px;
- text-align: center;
- }
- .queBoxer .left .tit {
- display: flex;
- writing-mode: lr-tb;
- align-items: center;
- flex-direction: column;
- justify-content: space-between;
- }
- .generateExam {
- padding: 14px 29px;
- background: #47c6a2;
- border-radius: 4px;
- cursor: pointer;
- color: white;
- }
- .el-button--success.is-plain.is-disabled {
- background-color: #ffffff;
- border-color: #e6ebf5;
- color: #c0c4cc;
- }
- .el-tree-node__content {
- padding-top: 6px;
- padding-bottom: 6px;
- height: 32px;
- font-size: 14px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #343434;
- line-height: 20px;
- }
- & .split_page .el-pager > li {
- border-radius: 50%;
- }
- & .el-tree-node {
- padding-left: 16px;
- }
- & .el-tree-node__expand-icon.expanded {
- content: "";
- }
- & .el-tree-node__content > .el-tree-node__expand-icon {
- padding: 6px;
- /* position: absolute; */
- right: 16px;
- }
- & .radio_contianer .is-active .el-radio-button__inner {
- border-left: none;
- }
- .empty-text {
- margin-top: 150px;
- text-align: center;
- color: #ccc;
- }
- & .el-input-number.is-controls-right .el-input-number__decrease {
- width: 16px;
- }
- & .el-input-number.is-controls-right[class*="medium"] [class*="increase"],
- & .el-input-number.is-controls-right[class*="medium"] [class*="decrease"] {
- width: 16px;
- }
- & .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
- color: #47c6a2;
- background: #ffffff;
- }
- & .table-delete-icon {
- cursor: pointer;
- }
- }
- </style>
|