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