Pārlūkot izejas kodu

ai助学ui完善

shilipojs 2 gadi atpakaļ
vecāks
revīzija
d09343f613

+ 22 - 0
src/components/MxCondition/condition-object/condition-v2-subject.js

@@ -0,0 +1,22 @@
+import conditionObjectBase from '../condition-object-base.js'
+import {
+  smartSubjectList,
+} from "@/api/webApi/webQue";
+
+export default {
+  ...conditionObjectBase,
+  key: 'v2Subject',
+  title: '科目',
+  getList: function(param,$ref) {
+    return new Promise((resolve, reject) => {
+      smartSubjectList().then(res => resolve(res.rows))
+        .catch(e => reject(e))
+    })
+  },
+  getCode: function(item) {
+    return item.subjectid
+  },
+  getLabel: function(item) {
+    return item.subjectname
+  }
+}

+ 25 - 0
src/components/MxCondition/condition-object/condition-video-subject-fixed.js

@@ -0,0 +1,25 @@
+import subjectBase from './condition-video-subject'
+import { videoSubjects } from '@/api/webApi/webVideo'
+
+export default {
+  ...subjectBase,
+  key: 'videoCourseFixed',
+  dependentKeys: [],
+  isDependencyReady(params) {
+    return true
+  },
+  getList: function(param,$ref) {
+    console.log($ref.model.videoTypeFixed)
+    return new Promise((resolve, reject) => {
+      videoSubjects({ subject:$ref.model.videoTypeFixed }).then(res => resolve(
+        res.rows.map(item => {
+          return {
+            code: item.code,
+            label:item.label
+          }
+        })
+      ))
+        .catch(e => reject(e))
+    })
+  },
+}

+ 83 - 3
src/views/accurateTeaching/accurateAi/microVideo/index.vue

@@ -1,9 +1,89 @@
 <template>
-  <div>
-    精准AI助学 微课视频
+  <div class="app-container">
+    <el-card class="mb20">
+      <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
+                    @invalid="handleInvalidQuery"
+      ></mx-condition>
+    </el-card>
+    <el-card class="box-card">
+      <mx-table :prop-defines="propDefines" :rows="rows">
+        <template #play="{row}">
+          <el-button type="text" icon="el-icon-video-camera" @click="handleVideoPlay(row)">
+            播放
+          </el-button>
+        </template>
+      </mx-table>
+      <pagination
+        :total="total"
+        :page.sync="pageForm.pageNum"
+        :limit.sync="pageForm.pageSize"
+        @pagination="togglePage"
+      />
+    </el-card>
+    <el-dialog :title="videoItem.resourcesName" v-if="videoDialog" :visible.sync="videoDialog" width="800px"
+               :append-to-body="true">
+      <mx-video :ali-id-type="videoItem.aliIdType" :src="videoItem.resourcesUrl||videoItem.videoId"></mx-video>
+    </el-dialog>
   </div>
 </template>
-<script></script>
+<script>
+import MxSearchGroup from '@/components/MxSearch/mx-search-group'
+import MxCondition from '@/components/MxCondition/mx-condition'
+import { videoList } from '@/api/webApi/webVideo'
+
+export default {
+  components: { MxSearchGroup, MxCondition },
+  data() {
+    return {
+      pageForm: {
+        pageNum: 1,
+        pageSize: 20
+      },
+      rows:[{
+        name:'测试名称',
+        subject:'数学',
+      }],
+      propDefines:{
+        name:{
+          label:'名称'
+        },
+        subject:{
+          label:'科目'
+        },
+        play:{
+          label:'操作',
+          slot:'play'
+        }
+      },
+      total: 0,
+      queryParams: {
+        v2Subject: '',
+      },
+      videoDialog: false,
+      videoItem: {},
+      requireFields:[]
+    }
+  },
+  methods: {
+    handleInvalidQuery() {
+
+    },
+    handleVideoPlay(row) {
+      this.videoItem = row
+      this.videoDialog = true
+    },
+    getList() {
+
+    },
+    togglePage(){
+
+    },
+    handleQuery() {
+      this.getList()
+    }
+  }
+}
+</script>
 <style scoped>
 
 </style>

+ 69 - 2
src/views/accurateTeaching/accurateAi/practise/index.vue

@@ -1,10 +1,77 @@
 <template>
-  <div>
-    精准AI助学 练习资源
+  <div class="app-container">
+    <el-card class="mb20">
+      <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
+                    @invalid="handleInvalidQuery"
+      ></mx-condition>
+    </el-card>
+    <el-card class="box-card">
+      <mx-table :prop-defines="propDefines" :rows="rows"></mx-table>
+      <pagination
+        :total="total"
+        :page.sync="pageForm.pageNum"
+        :limit.sync="pageForm.pageSize"
+        @pagination="togglePage"
+      />
+    </el-card>
   </div>
 </template>
 <script>
+import MxSearchGroup from '@/components/MxSearch/mx-search-group'
+import MxCondition from '@/components/MxCondition/mx-condition'
+import { videoList } from '@/api/webApi/webVideo'
 
+export default {
+  components: { MxSearchGroup, MxCondition },
+  data() {
+    return {
+      pageForm: {
+        pageNum: 1,
+        pageSize: 16
+      },
+      row:[],
+      propDefines:{
+        id:{
+          label:'题目编号'
+        },
+        name:{
+          label:'题目'
+        },
+        type:{
+          label:'题型'
+        },
+        date:{
+          label:'时间'
+        },
+        subject:{
+          label:'科目'
+        },
+        temp:{
+          label:'操作'
+        }
+      },
+      total: 0,
+      queryParams: {
+        v2Subject: '',
+      },
+      requireFields: []
+    }
+  },
+  methods: {
+    handleInvalidQuery() {
+
+    },
+    getList() {
+
+    },
+    togglePage(){
+
+    },
+    handleQuery() {
+      this.getList()
+    }
+  }
+}
 </script>
 <style scoped>
 

+ 120 - 2
src/views/accurateTeaching/commonAi/microVideo/index.vue

@@ -1,11 +1,129 @@
 <template>
-  <div>
-    普通AI助学 微课视频
+  <div class="app-container">
+    <el-card class="mb20">
+      <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
+                    @invalid="handleInvalidQuery"
+      ></mx-condition>
+    </el-card>
+    <el-card class="box-card">
+      <div slot="header">
+        <mx-search-group justify="end" :span="6" v-model="sectionName" placeholder="请输入搜索内容" @search="getList">
+        </mx-search-group>
+      </div>
+      <el-card class="video_content" v-if="videoList.length">
+        <el-row :span="24">
+          <el-col
+            :span="6"
+            class="video_item"
+            v-for="item in videoList"
+            :key="item.id"
+          >
+            <img
+              :src="item.img"
+              alt=""
+              @click="
+              toVideoDetail(
+                item.pack_id,
+                item.chapter_id,
+                item.id,
+                item.section_aliId,
+                item.aliIdType
+              )
+            "
+            />
+            <p class="fx-row jc-between ai-center">
+              <span> {{ item.section_name }} </span>
+              <span class="pointer iconfont icon-shoucang"></span>
+            </p>
+          </el-col>
+        </el-row>
+        <!-- 分页 -->
+        <div class="split_page">
+          <pagination
+            v-show="total > 0"
+            :total="total"
+            :page.sync="pageForm.pageNum"
+            :limit.sync="pageForm.pageSize"
+            :pageSizes="[16,32]"
+            @pagination="getVideoList"
+          />
+        </div>
+      </el-card>
+      <evaluation-empty v-else/>
+    </el-card>
   </div>
 </template>
 <script>
+import MxSearchGroup from '@/components/MxSearch/mx-search-group'
+import MxCondition from '@/components/MxCondition/mx-condition'
+import { videoList } from '@/api/webApi/webVideo'
 
+export default {
+  components: { MxSearchGroup, MxCondition },
+  data() {
+    return {
+      pageForm: {
+        pageNum: 1,
+        pageSize: 16
+      },
+      videoList:[],
+      sectionName: '',
+      queryParams: {
+        videoTypeFixed: 0,
+        videoCourseFixed: ''
+      },
+      requireFields: ['videoCourseFixed']
+    }
+  },
+  methods: {
+    toVideoDetail(id, chapter_id, childrenId, section_aliId, aliIdType) {
+      this.$router.push({
+        path: '/video_course/detail', query: {
+          packId: id,
+          chapter_id: chapter_id,
+          childrenId: childrenId,
+          section_aliId,
+          aliIdType: aliIdType
+        }
+      })
+    },
+    handleInvalidQuery() {
+
+    },
+    getList() {
+
+    },
+    handleQuery() {
+      this.getList()
+    }
+  }
+}
 </script>
 <style scoped>
+.video_content p {
+  margin: 0;
+  padding: 0;
+  text-align: left;
+  height: 27px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #343434;
+  line-height: 20px;
+  margin-top: 11px;
+}
+
+.video_item > img {
+  cursor: pointer;
+}
 
+.video_content .el-col {
+  margin-bottom: 42px;
+}
+.video_item{
+  padding-right: 22px;
+}
+.video_item > img {
+  width: 100%;
+}
 </style>

+ 45 - 2
src/views/accurateTeaching/commonAi/practise/index.vue

@@ -1,10 +1,53 @@
 <template>
-  <div>
-    普通AI助学 练习资源
+  <div class="app-container">
+    <el-card class="mb20">
+      <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
+                    @invalid="handleInvalidQuery"
+      ></mx-condition>
+    </el-card>
+    <el-card class="box-card">
+      <div slot="header">
+        <mx-search-group  justify="end" :span="6" v-model="sectionName" placeholder="请输入搜索内容" @search="getList">
+        </mx-search-group>
+      </div>
+      <div v-for="o in 4" :key="o" class="text item">
+        {{ '列表内容 ' + o }}
+      </div>
+    </el-card>
   </div>
 </template>
 <script>
+import MxSearchGroup from '@/components/MxSearch/mx-search-group'
+import MxCondition from '@/components/MxCondition/mx-condition'
+import { videoList } from '@/api/webApi/webVideo'
 
+export default {
+  components: { MxSearchGroup, MxCondition },
+  data() {
+    return {
+      pageForm: {
+        pageNum: 1,
+        pageSize: 16
+      },
+      sectionName: '',
+      queryParams: {
+        v2Subject:'',
+      },
+      requireFields: ['v2Subject']
+    }
+  },
+  methods: {
+    handleInvalidQuery() {
+
+    },
+    getList() {
+
+    },
+    handleQuery() {
+      this.getList()
+    }
+  }
+}
 </script>
 <style scoped>