diff --git a/src/setting.js b/src/setting.js index de23153..c712335 100644 --- a/src/setting.js +++ b/src/setting.js @@ -12,7 +12,7 @@ if (isDev) { host = 'http://121.37.12.51/' // host = 'https://huorantech.cn/' // host = 'http://192.168.31.151:9000/'// 榕 - // host = 'http://192.168.31.117:9000/'// 赓 + host = 'http://192.168.31.116:9000/'// 赓 } else if (isPro) { jumpPath = 'https://www.huorantech.cn/judgmentPoint/' } @@ -45,7 +45,7 @@ const Setting = { isDev, isPro, // 是否使用动态路由 - dynamicRoute: true, + dynamicRoute: false, /** * @description 默认密码 */ diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index 81545da..fe8b242 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -1213,6 +1213,7 @@ export default { }, data() { return { + // authority: 权限。0数据平台,1为课程,2职站增值模块,3实训课程(非集成),4实验工具 deliverShow: ['pageTypes', 'dataPageTypes', 'modelPageTypes', 'practiceCourseTypes', 'expToolTypes'], pageTypes: false, dataPageTypes: false, diff --git a/src/views/shop/addProduct/index.vue b/src/views/shop/addProduct/index.vue index 284a420..a4a40b9 100644 --- a/src/views/shop/addProduct/index.vue +++ b/src/views/shop/addProduct/index.vue @@ -130,7 +130,7 @@ :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" - :action="this.api.fileupload" + :action="api.fileupload" :headers="headers" name="file" > @@ -156,7 +156,7 @@ :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" - :action="this.api.fileupload" + :action="api.fileupload" :headers="headers" name="file" > @@ -181,7 +181,7 @@ :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" - :action="this.api.fileupload" + :action="api.fileupload" :headers="headers" name="file" > @@ -227,7 +227,7 @@ :before-upload="fileBeforeUpload" :on-remove="handleRemove" :on-success="uploadSuccessFile" - :action="this.api.fileUploadNakadai" + :action="api.fileUploadNakadai" :file-list="form.fileList" :headers="headers" > diff --git a/src/views/shop/list/market/index.vue b/src/views/shop/list/market/index.vue index 1b6b457..dd087b7 100644 --- a/src/views/shop/list/market/index.vue +++ b/src/views/shop/list/market/index.vue @@ -1,76 +1,52 @@ @@ -80,71 +56,16 @@ import Setting from '@/setting' export default { data() { return { - timer: null, - regionName: ['本校内', '全平台可见', '指定院校区域'], - regions: [ - { - id: '', - name: '不限' - }, - { - id: 1, - name: '全平台' - }, - { - id: 2, - name: '指定院校区域' - } - ], - types: [ - { - id: '', - name: '不限' - }, - { - id: 1, - name: '付费' - }, - { - id: 0, - name: '免费' - } - ], - form: { - visibleRange: '', - categoryId: '', - courseType: '' + headers: { + token: sessionStorage.getItem("token") }, - keyword: "", - classificationId: "", - list: [], - multipleSelection: [], - classificationList: [], - page: +this.$route.query.page || 1, // 当前页码 - pageSize: 10, - total: 0 + list: [{}], }; }, - watch: { - keyword: function(val) { - clearTimeout(this.searchTimer); - this.searchTimer = setTimeout(() => { - this.initData(); - }, 500); - } - }, mounted() { - this.getClassification(); - this.getData(); - this.$once('hook:beforeDestroy', function() { - clearInterval(this.timer) - }) + }, methods: { - //原理论课程需求: - // 用户创建的理论课程,禁用时职站首页以及学生登录后的理论课程模块看不到对应的课程,创建的老师在理论课程管理还是可以看到该理论课程,可以编辑,但是无法启用。 - // 即中台禁用的理论课程,即使是该院校老师创建的,老师端也不能自己启用,需要中台启用。 - //1.判断当前院校禁启用状态为要启用时候再判断当前课程中台禁启用的状态 getList() { this.$post(this.api.listTheoreticalCourse, { pageNum: this.page, @@ -163,41 +84,24 @@ export default { }).catch(res => { }); }, - // 获取redis缓存 - getRedis() { - this.$post(this.api.getRedisCache).then(({ data }) => { - data && this.getList() - }).catch(res => {}) - }, - getData() { - this.getList() - if (!Setting.isDev) { - clearInterval(this.timer) - this.timer = setInterval(this.getRedis, 1000) - } - }, - initData() { - this.page = 1; - this.getData(); + handleExceed() { // 文件超出个数限制时的钩子 + this.$message.warning("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!"); }, - getClassification() { - this.$post(this.api.listClassification, { - pageNum: 1, - pageSize: 1000, - platformSource: Setting.platformSource - }).then(({ page }) => { - this.classificationList = page.records - }).catch(res => {}) + uploadSuccess(res, row) { // 文件上传成功时的钩子 + row.pic = res.data.filesResult.fileUrl; }, - changeType(type) { - this.classificationId = type; - this.initData(); + uploadError(err, file, fileList) { // 文件上传失败时的钩子 + this.$message({ + message: "上传出错,请重试!", + type: "error", + center: true + }); }, - preview(row) { - this.$router.push(`/previewTheoreticalCourse?id=${row.id}`); + beforeRemove(file, fileList) { // 删除文件之前的钩子 + return this.$confirm(`确定移除 ${file.name}?`); }, - config(row) { - this.$router.push(`/setTheoreticalCourse?id=${row.id}`); + handleRemove(file, fileList) { // 文件列表移除文件时的钩子 + // this.form.coverUrl = '' }, addCourse() { this.$router.push("/addTheoreticalCourse"); @@ -219,36 +123,6 @@ export default { .catch(() => { }); }, - handleSelectionChange(val) { - this.multipleSelection = val; - }, - delAllData() { - const list = this.multipleSelection - if (list.length != "") { - this.$confirm(`确定要删除吗?`, "提示", { - type: "warning" - }) - .then(() => { - const data = [] - list.map(e => { - data.push('ids=' + e.id) - }) - this.$post(`${this.api.delTheoreticalCourse}?${data.join('&')}`).then(res => { - this.$refs.table.clearSelection(); - util.successMsg("删除成功"); - this.initData(); - }).catch(res => { - }); - }).catch(() => { - }); - } else { - util.errorMsg("请先选择数据 !"); - } - }, - handleCurrentChange(val) { - this.page = val; - this.getData(); - }, switchOff(val, row) { this.$post(this.api.disabledTheoreticalCourse, { courseId: row.id, @@ -263,10 +137,66 @@ export default {