Commit 9ec8916c authored by 张伯涛's avatar 张伯涛

初步修改

parent ac37bbc9
import request from '@/utils/request'
export function listAllByUnitIdType(query) {
return request({
url: '/cmsunitnewvideo/listAllByUnitIdType',
method: 'get',
params: query
})
}
...@@ -60,6 +60,13 @@ ...@@ -60,6 +60,13 @@
@click="handleImport" @click="handleImport"
>{{ commonField.importName }} >{{ commonField.importName }}
</el-button> </el-button>
<el-button
:class="commonField.addClass"
:type="commonField.typePrimary"
:icon="commonField.addIcon"
:size="commonField.smallSize"
@click="handleAdd"
>{{ commonField.addName }}</el-button>
<!-- //新增按钮 v--> <!-- //新增按钮 v-->
<!-- <el-button--> <!-- <el-button-->
<!-- :class="commonField.addClass"--> <!-- :class="commonField.addClass"-->
...@@ -82,7 +89,7 @@ ...@@ -82,7 +89,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="left" prop="title" label="标题" show-overflow-tooltip /> <el-table-column align="left" prop="title" label="标题" show-overflow-tooltip />
<el-table-column align="left" prop="title" label="类型" show-overflow-tooltip> <el-table-column align="left" prop="type" label="类型" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type === '1' ? '视频' : '新闻' }} {{ scope.row.type === '1' ? '视频' : '新闻' }}
</template> </template>
...@@ -93,9 +100,9 @@ ...@@ -93,9 +100,9 @@
{{ scope.row.userName || '-' }} {{ scope.row.userName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用户账号" prop="loginName" :show-overflow-tooltip="true"> <el-table-column label="身份证号" prop="idCard" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.loginName || '-' }} {{ scope.row. idCard || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="手机号" prop="phone" :show-overflow-tooltip="true"> <el-table-column label="手机号" prop="phone" :show-overflow-tooltip="true">
...@@ -103,6 +110,11 @@ ...@@ -103,6 +110,11 @@
{{ scope.row.phone || '-' }} {{ scope.row.phone || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="银行卡号" prop="bankCard" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.bankCard || '-' }}
</template>
</el-table-column>
<el-table-column label="推广次数" prop="clickThroughRate" width="155px" :show-overflow-tooltip="true"> <el-table-column label="推广次数" prop="clickThroughRate" width="155px" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.edit === '0'"> {{ scope.row.clickThroughRate || '-' }}</span> <span v-if="scope.row.edit === '0'"> {{ scope.row.clickThroughRate || '-' }}</span>
...@@ -138,20 +150,20 @@ ...@@ -138,20 +150,20 @@
</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.edit === '0'"> {{ scope.row.remarks || '-' }}</span> <!-- <span v-if="scope.row.edit === '0'"> {{ scope.row.remarks || '-' }}</span>-->
<el-input <!-- <el-input-->
v-if="scope.row.edit === '1'" <!-- v-if="scope.row.edit === '1'"-->
v-model.trim="scope.row.remarks" <!-- v-model.trim="scope.row.remarks"-->
placeholder="备注" <!-- placeholder="备注"-->
controls-position="right" <!-- controls-position="right"-->
step-strictly <!-- step-strictly-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
/> <!-- />-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="操作" width="250"> <el-table-column label="操作" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- //编辑--> <!-- //编辑-->
...@@ -782,6 +794,40 @@ ...@@ -782,6 +794,40 @@
<el-button class="submitBtn" :loading="importLoading" type="primary" @click="submitFileForm">确 定</el-button> <el-button class="submitBtn" :loading="importLoading" type="primary" @click="submitFileForm">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="formTitle" :visible.sync="formOpen" width="40%" append-to-body>
<el-form ref="form" :model="formModel" :rules="formRules" label-width="auto">
<el-form-item label="所属商家:" prop="unitId">
<el-select v-model="formModel.unitId" clearable filterable placeholder="请选择所属商家" style="width: 100%">
<el-option
v-for="(item,index) in deptList"
:key="index"
:label="item.unitName"
:value="item.businessId"
/>
</el-select>
</el-form-item>
<el-form-item label="类型:" prop="type">
<el-select @change="handleChangeType" v-model="formModel.type" clearable filterable placeholder="请选择标题" style="width: 100%">
<el-option
v-for="(item,index) in typeList"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="标题:" prop="titleId">
<el-select v-model="formModel.titleId" clearable filterable placeholder="请选择标题" style="width: 100%">
<el-option
v-for="(item,index) in titleList"
:key="index"
:label="item.unitName"
:value="item.businessId"
/>
</el-select>
</el-form-item>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
...@@ -810,14 +856,27 @@ import { ...@@ -810,14 +856,27 @@ import {
cmspriceclickUpdate cmspriceclickUpdate
} from '@/api/contentManagement/sysContentVideoInformation' } from '@/api/contentManagement/sysContentVideoInformation'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { listAllByUnitIdType } from '@/api/clickManagement'
export default { export default {
name: 'Index', name: 'Index',
data() { data() {
return { return {
formTitle: '',
formModel: {
type: '',
unitId: '',
titleId: ''
},
formOpen: false,
queryShop: true, queryShop: true,
clearable: false, clearable: false,
importLoading: false, importLoading: false,
deptList: [], deptList: [],
titleList: [],
typeList: [
{ label: '文章', value: '0' },
{ label: '视频', value: '1' }
],
// 技术岗位 // 技术岗位
technicalClassification: [], technicalClassification: [],
// 岗位分类 // 岗位分类
...@@ -892,6 +951,9 @@ export default { ...@@ -892,6 +951,9 @@ export default {
dialogFormVisible: false, dialogFormVisible: false,
dialogVisible: false, dialogVisible: false,
// 表单验证 // 表单验证
formRules: {
},
rules: { rules: {
applicant: [ applicant: [
{ required: true, message: '请选择申请人' } { required: true, message: '请选择申请人' }
...@@ -1021,6 +1083,16 @@ export default { ...@@ -1021,6 +1083,16 @@ export default {
this.loadData() this.loadData()
}, 1000) }, 1000)
}, },
/** 通过所属商家和类型获取标题下拉*/
handleChangeType() {
const params = {
type: this.formModel.type,
unitId: this.formModel.unitId
}
listAllByUnitIdType(params).then(res => {
})
},
handleExport() { handleExport() {
cmspriceclickExport({ unitId: this.queryParams.unitId }).then(response => { cmspriceclickExport({ unitId: this.queryParams.unitId }).then(response => {
const blob = new Blob([response]) const blob = new Blob([response])
...@@ -1639,9 +1711,8 @@ export default { ...@@ -1639,9 +1711,8 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset()
this.open = true this.formOpen = true
this.unitDisplay = false this.formTitle = '新增'
this.title = '开课新增'
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
......
...@@ -43,16 +43,29 @@ ...@@ -43,16 +43,29 @@
<el-col :span="12"> <el-col :span="12">
<!-- 是否推荐--> <!-- 是否推荐-->
<el-form-item <el-form-item
label="是否为推荐视频:" label="未登录可看:"
prop="homeDisplay" prop="homeDisplay"
:rules="{ required: !(controls.isOperation === '3'), message: '请选择是否推荐视频', trigger: 'change' }" :rules="{ required: !(controls.isOperation === '3'), message: '请选择是否未登录可看', trigger: 'change' }"
> >
<el-select v-model="form.homeDisplay" placeholder="请选择是否推荐视频" size="small" class="normalInput" :disabled="secondFromDisabled"> <el-select v-model="form.homeDisplay" placeholder="请选择是否未登录可看" size="small" class="normalInput" :disabled="secondFromDisabled">
<el-option v-for="item in isList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in isList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<!-- 是否推荐-->
<el-form-item
label="是否推荐视频:"
prop="homeDisplay"
:rules="{ required: !(controls.isOperation === '3'), message: '请选择是否推荐视频', trigger: 'change' }"
>
<el-select v-model="form.flag" placeholder="请选择是否推荐视频" size="small" class="normalInput" :disabled="secondFromDisabled">
<el-option v-for="item in flagList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
...@@ -230,7 +243,16 @@ export default { ...@@ -230,7 +243,16 @@ export default {
value: '0' value: '0'
} }
], ],
flagList: [
{
label: '是',
value: '1'
},
{
label: '否',
value: '0'
}
],
fileUpload: '/dev-api/common/fileUpload?file=' + this.file + '&temp=' + 'videoInformation', fileUpload: '/dev-api/common/fileUpload?file=' + this.file + '&temp=' + 'videoInformation',
// 提交表单 // 提交表单
form: { form: {
...@@ -267,7 +289,7 @@ export default { ...@@ -267,7 +289,7 @@ export default {
rules: { rules: {
startDateS: [], startDateS: [],
endDateS: [], endDateS: [],
videoUrlId: [{ required: true, message: '请选择所属商家', trigger: 'change' }] videoUrlId: [{ required: true, message: '请上传视频', trigger: 'change' }]
} }
} }
}, },
...@@ -483,7 +505,6 @@ export default { ...@@ -483,7 +505,6 @@ export default {
if (valid) { if (valid) {
if (this.form.businessId !== undefined) { if (this.form.businessId !== undefined) {
// 编辑 // 编辑
form.flag = '1'
form.videoType = '1' form.videoType = '1'
form.unitId = this.$route.query.unitId form.unitId = this.$route.query.unitId
updateSysContentNewsInformation(form).then(res => { updateSysContentNewsInformation(form).then(res => {
...@@ -501,7 +522,6 @@ export default { ...@@ -501,7 +522,6 @@ export default {
this.pubLoading = false this.pubLoading = false
}) })
} else { } else {
form.flag = '1'
form.videoType = '1' form.videoType = '1'
form.tenant = this.userId form.tenant = this.userId
form.unitId = this.$route.query.unitId form.unitId = this.$route.query.unitId
......
...@@ -252,7 +252,7 @@ export default { ...@@ -252,7 +252,7 @@ export default {
this.$router.push('/dashboard') this.$router.push('/dashboard')
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
this.verify = false this.verify = true
if (this.captchaType === 'MATH' || this.captchaType === 'CHAR') { if (this.captchaType === 'MATH' || this.captchaType === 'CHAR') {
this.getCode() this.getCode()
} }
......
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