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

文章管理暂存-10

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