Commit 074e70a9 authored by 刘怀志's avatar 刘怀志

文章管理暂存-10

parent 3e6bd888
......@@ -76,6 +76,14 @@ export function updateStatus(data) {
data: data
})
}
export function cmspriceclickUpdate(data) {
data = Qs.stringify(data)
return request({
url: '/cmspriceclick/update',
method: 'put',
data: data
})
}
// 7. 修改新闻资讯状态
export function shareShop(data) {
data = Qs.stringify(data)
......@@ -94,3 +102,12 @@ export function getVideoUrl(params) {
headers: {}
})
}
// 课程管理-章节查询视频
export function cmspriceclickList(params) {
return request({
url: '/cmspriceclick/list',
method: 'get',
params,
headers: {}
})
}
......@@ -14,9 +14,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="标题:" prop="videoTitle">
<el-form-item label="标题:" prop="title">
<el-input
v-model.trim="queryParams.videoTitle"
v-model.trim="queryParams.title"
placeholder="请输入标题"
clearable
:maxlength="30"
......@@ -45,7 +45,6 @@
<el-form-item>
<!-- //新增按钮-->
<el-button
v-has-permi="hasAddPerm"
:class="commonField.addClass"
:type="commonField.typePrimary"
:icon="commonField.addIcon"
......@@ -65,7 +64,7 @@
</el-form>
</div>
<div style="padding:5px 10px">
<div class="tableTitle">个人开课管理</div>
<div class="tableTitle">点击量管理</div>
<el-table v-loading="fullscreenLoading" :data="tableData" border sortable="true">
<span slot="empty">{{ tableDataTips }}</span>
<el-table-column align="left" prop="id" label="序号" width="50px">
......@@ -73,116 +72,88 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="开课类型" prop="isPay" :show-overflow-tooltip="true">
<el-table-column align="left" prop="title" label="新闻标题" width="300" show-overflow-tooltip />
<el-table-column label="所属商家" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="姓名" prop="userName" :show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- {{ scope.row.isPay === 0 ? '试用' : '付费' }}-->
<span v-if="scope.row.flag === '0'">{{ scope.row.isPay === 0 ? '试用' : '付费' }}</span>
<el-select
v-if="scope.row.flag === '1'"
v-model="scope.row.isPay"
filterable
style="width: 160px"
>
<el-option
v-for="(items,index) in isPayList"
:key="index"
:label="items.label"
:value="items.value"
/>
</el-select>
{{ scope.row.userName || '-' }}
</template>
</el-table-column>
<el-table-column prop="applicantName" label="申请人" :show-overflow-tooltip="true">
<el-table-column label="用户账号" prop="loginName" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.applicantName }} ({{ scope.row.userName }}-{{ scope.row.applicantPhone }})
{{ scope.row.loginName || '-' }}
</template>
</el-table-column>
<el-table-column label="课程名称" prop="roleKey" :show-overflow-tooltip="true">
<el-table-column label="手机号" prop="phone" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.lessonName || '-' }}
{{ scope.row.phone || '-' }}
</template>
</el-table-column>
<!-- <el-table-column label="岗位分类" prop="jobClassification" :show-overflow-tooltip="true">
<el-table-column label="点击量" prop="clickThroughRate" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span> {{ getJobClassificationName(scope.row.jobClassification) || '-' }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="技术分类" prop="value" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span> {{ getCourseDirectionName(scope.row.technicalClassification) || '-' }}</span>
</template>
</el-table-column> -->
<el-table-column label="开始日期" prop="value2" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.flag === '0'">{{ scope.row.beginTrialTime |transformDateByFormat('YYYY-MM-DD') }}</span>
<el-date-picker
v-if="scope.row.flag === '1'"
v-model="scope.row.beginTrialTime"
type="date"
placeholder="-"
:editable="false"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
<span v-if="scope.row.edit === '0'"> {{ scope.row.clickThroughRate || '-' }}</span>
<el-input-number
v-if="scope.row.edit === '1'"
v-model.trim="scope.row.clickThroughRate"
controls-position="right"
:step="1"
step-strictly
placeholder="点击量"
clearable
:maxlength="30"
size="small"
/>
</template>
</el-table-column>
<el-table-column label="结束日期" prop="value3" :show-overflow-tooltip="true">
<el-table-column label="价格" prop="price" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.flag === '0'">{{ scope.row.endTrialTime |transformDateByFormat('YYYY-MM-DD') }}</span>
<el-date-picker
v-if="scope.row.flag === '1'"
v-model="scope.row.endTrialTime"
type="date"
placeholder="-"
:editable="false"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
<span v-if="scope.row.edit === '0'"> {{ scope.row.price || '-' }}</span>
<el-input-number
v-if="scope.row.edit === '1'"
v-model.trim="scope.row.price"
placeholder="价格"
controls-position="right"
:step="0.1"
step-strictly
clearable
:maxlength="30"
size="small"
/>
</template>
</el-table-column>
<!-- 备注-->
<el-table-column label="备注" prop="remarks" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.flag === '0'"> {{ scope.row.remarks || '-' }}</span>
<el-input
v-if="scope.row.flag === '1'"
v-model.trim="scope.row.remarks"
placeholder="备注"
clearable
:maxlength="30"
size="small"
/>
<span> {{ scope.row.remarks || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<!-- //编辑-->
<el-button
v-show="scope.row.flag === '0'"
v-show="scope.row.edit === '0'"
:class="commonField.updateClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleUpdate(scope.$index)"
>{{ commonField.updateName }}</el-button>
<!-- //删除-->
<el-button
v-show="scope.row.flag === '0'"
<!-- <el-button
v-show="scope.row.edit === '0'"
:class="commonField.delClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleDelete(scope.row)"
>{{ commonField.deleteName }}</el-button>
>{{ commonField.deleteName }}</el-button>-->
<el-button
v-show="scope.row.flag === '1'"
v-show="scope.row.edit === '1'"
:class="commonField.delClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleSave(scope.$index)"
>保存</el-button>
<el-button
v-show="scope.row.flag === '1'"
v-show="scope.row.edit === '1'"
:class="commonField.delClass"
:type="commonField.typeParent"
:size="commonField.size"
......@@ -766,13 +737,14 @@ import {
import { getDict } from '@/api/system/dict/data'
import { validOpenCourse } from '@/api/classManagement'
import { listByIdentity } from '@/api/system/user'
import {listAllShop, listCourseAll} from '@/api/sysUnit'
import {mapGetters} from "vuex";
import {listSysContentNewsInformation} from "@/api/contentManagement/sysContentVideoInformation";
import { listAllShop, listCourseAll } from '@/api/sysUnit'
import { mapGetters } from 'vuex'
import { cmspriceclickList, cmspriceclickUpdate } from '@/api/contentManagement/sysContentVideoInformation'
export default {
name: 'Index',
data() {
return {
queryShop: true,
deptList: [],
// 技术岗位
technicalClassification: [],
......@@ -903,13 +875,10 @@ export default {
coursename: '',
queryParams: {
userName: '',
page: 1,
rows: 10,
applicant: '',
flag: '',
remarks: '',
applicantType: 1
unitId: '',
title: ''
},
unitDisplay: false,
......@@ -977,7 +946,7 @@ export default {
this.tableData[index].isPay = this.tableDataOri[index].isPay
this.tableData[index].beginTrialTime = this.tableDataOri[index].beginTrialTime
this.tableData[index].endTrialTime = this.tableDataOri[index].endTrialTime
this.tableData[index].flag = '0'
this.tableData[index].edit = '0'
},
// 移除选中的课程
removeSeletedLesson(index) {
......@@ -1189,7 +1158,7 @@ export default {
},
/** 保存**/
handleAddFromSave(index) {
this.form.settingList[index].flag = '0'
this.form.settingList[index].edit = '0'
},
// 查询用户列表
......@@ -1206,7 +1175,7 @@ export default {
/** 2.获取全部课程 **/
getClassOptions() {
const obj = {
flag: '1'
edit: '1'
}
listCourseAll(obj).then(res => {
this.classOptions = res.data
......@@ -1354,7 +1323,7 @@ export default {
* 1.将该行状态改成可编辑
* 2.将开始时间和结束时间改成可编辑状态
* **/
this.form.settingList[index].flag = '1'
this.form.settingList[index].edit = '1'
},
/** 重置按钮操作 */
resetQuery() {
......@@ -1363,11 +1332,8 @@ export default {
this.queryParams = {
page: 1,
rows: 10,
applicant: '',
flag: '',
remarks: '',
userName: '',
applicantType: 1
unitId: '',
title: ''
}
this.loadData()
},
......@@ -1424,7 +1390,7 @@ export default {
if (!this.onlyList(this.form.settingList)) {
const obj = {
applyPost: null,
flag: '0',
edit: '0',
beginTrialTime: this.addForm.beginDate,
endTrialTime: this.addForm.endDate,
lessonName: this.addForm.lessonName,
......@@ -1500,17 +1466,11 @@ export default {
const _this = this
this.tableData = []
_this.fullscreenLoading = true
listSysContentNewsInformation(this.queryParams).then(res => {
var pages = res.rows// 查询过来的每页数据
cmspriceclickList(this.queryParams).then(res => {
_this.total = res.total// 总记录数
_this.bussid = []
res.rows.forEach(item => {
item.flag = '0'
item.srclist = []
item.srclist.push(item.path)
})
_this.tableData = res.rows
this.tableDataOri = JSON.parse(JSON.stringify(res.rows))
res.records.forEach(item => item['edit'] = '0')
_this.tableData = res.records
this.tableDataOri = JSON.parse(JSON.stringify(res.records))
_this.fullscreenLoading = false
if (res.rows.length === 0) {
_this.tableDataTips = '暂无数据'
......@@ -1538,16 +1498,12 @@ export default {
handleSave(index) {
const obj = {
businessId: this.tableData[index].businessId,
beginTrialTime: this.tableData[index].beginTrialTime,
endTrialTime: this.tableData[index].endTrialTime,
jobClassification: this.tableData[index].jobClassification,
technicalClassification: this.tableData[index].technicalClassification,
remarks: this.tableData[index].remarks,
isPay: this.tableData[index].isPay
price: this.tableData[index].price,
clickThroughRate: this.tableData[index].clickThroughRate
}
updateTeaTrialCourse(obj).then(res => {
cmspriceclickUpdate(obj).then(res => {
if (res.code === 200) {
this.tableData[index].flag = '0'
this.tableData[index].edit = '0'
this.$message.success('保存成功')
}
})
......@@ -1585,7 +1541,7 @@ export default {
item.beginTrialTime = this.form.beginDate
item.endTrialTime = this.form.endDate
item.businessId = null
item.flag = '0'
item.edit = '0'
item.jobClassification = item.jobClassify
item.technicalClassification = item.tecClassify
})
......@@ -1613,7 +1569,7 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(index) {
this.tableData[index].flag = '1'
this.tableData[index].edit = '1'
},
/** 6.重置方法**/
resetAddFrom() {
......
......@@ -61,7 +61,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://106.3.99.36:20081/`,
// target: `http://192.168.1.23:8090/`, // 飞龙后端
target: `http://192.168.10.181:8099/`, // 奕霖后端
target: `http://192.168.10.10:8099/`, // 奕霖后端
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment