Commit b74d8ab4 authored by 杨硕's avatar 杨硕

修改首页样式

parent 5ade8973
......@@ -82,6 +82,13 @@ export function queryUnitAdmin(query) {
params: query
})
}
// 查询单一商家管理员
export function queryUnitAdminByBusinessId(businessId) {
return request({
url: '/sysuser/detail/' + businessId,
method: 'get'
})
}
// 8.查询所有单位信息
export function listUnitAll(query) {
......@@ -100,6 +107,3 @@ export function listCourseAll(query) {
})
}
......@@ -105,6 +105,7 @@
action="#"
drag
:show-file-list="true"
:file-list="fileList"
:http-request="handleUploadVideo"
:on-success="handleAvatarSuccessVideo"
:before-upload="beforeAvatarUploadVideo"
......@@ -115,7 +116,10 @@
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div slot="tip" class="el-upload__tip">只能上传 mp4 格式的视频文件!</div>
</el-upload>
<el-button :disabled="!videoUrl" @click="previewVideo">视频预览</el-button>
<div style="display: flex;flex-direction: column;">
<span v-if="secondFromDisabled" style="color: #606266;">{{ this.form.videoName }}</span>
<el-button :disabled="!videoUrl" style="width: 40%" @click="previewVideo">视频预览</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
......@@ -156,6 +160,7 @@ export default {
data() {
return {
videoShow: false,
isDelFile: false,
fileList: [],
// 视频配置
playerOptions: {
......@@ -244,7 +249,8 @@ export default {
homeDisplay: undefined,
videoType: undefined,
tenant: undefined,
isTop: undefined
isTop: undefined,
videoName: undefined
},
// 状态
statusOptions: [
......@@ -302,7 +308,6 @@ export default {
})
},
handleUploadVideo(file) {
this.fileList = []
const formData = new FormData()
formData.append('file', file.file)
formData.append('temp', 'videoInformation')
......@@ -311,7 +316,11 @@ export default {
this.$message.success('上传成功')
this.videoUrl = res.data.businessId
this.form.videoUrlId = res.data.businessId
this.fileList.push(res.data)
this.fileList = []
const file = {
name: res.data.originalName
}
this.fileList.push(file)
// this.playerOptions.sources[0].src = urlDecrypt(res.data.url)
})
},
......@@ -346,6 +355,11 @@ export default {
this.form = res.data
this.imageUrl = res.data.path
this.videoUrl = res.data.videoUrlId
this.fileList = []
const file = {
name: res.data.videoName
}
this.fileList.push(file)
}
})
}
......@@ -387,14 +401,18 @@ export default {
handleRemove(file, fileList) {
console.log('file', file)
console.log('fileList', fileList)
this.fileList = []
if (!this.isDelFile) {
this.fileList = []
}
if (fileList.length <= 0) {
this.videoUrl = ''
}
this.isDelFile = false
},
beforeAvatarUploadVideo(file) {
if (this.fileList.length > 0) {
this.$message.error('一次只能上传一个视频!')
this.isDelFile = true
return false
}
console.log('KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK')
......
......@@ -627,7 +627,7 @@ export default {
{
name: '视频',
type: 'pie',
radius: '85%',
radius: '70%',
avoidLabelOverlap: true, // 是否启用防止标签重叠策略
center: ['50%', '50%'], // 设置饼图的中心位置
// data: [
......@@ -664,7 +664,7 @@ export default {
{
name: '文章',
type: 'pie',
radius: '85%',
radius: '70%',
avoidLabelOverlap: true, // 是否启用防止标签重叠策略
center: ['50%', '50%'], // 设置饼图的中心位置
// data: [
......@@ -740,7 +740,7 @@ export default {
display: flex;
align-items: center;
justify-content: right;
margin-left: 450px;
//margin-left: 450px;
.titleBottom_companyName{
padding-right: 20px;
}
......
......@@ -54,7 +54,7 @@
<div class="tableTitle">商家管理列表</div>
<el-table v-loading="loading" class="unitTable" border :data="shopList">
<el-table-column type="index" label="序号" width="100" />
<!-- <el-table-column label="商家编号" prop="businessId" width="100" align="center" :show-overflow-tooltip="true">
<!-- <el-table-column label="商家编号" prop="businessId" width="100" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.businessId }}
</template>
......@@ -69,7 +69,7 @@
<!-- {{ scope.row.unitNumber || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="商家管理员账号" prop="unitNumber" :show-overflow-tooltip="true">
<el-table-column label="商家管理员账号" prop="unitNumber" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.unitNumber || '-' }}
</template>
......@@ -89,7 +89,7 @@
<!-- <span>{{ scope.row.createDate }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="状态" prop="flag">
<el-table-column label="状态" prop="flag">
<template slot-scope="scope">
<el-switch
v-model="scope.row.flag"
......@@ -164,13 +164,21 @@
<script>
import commonField from '@/utils/commonField'
import { sysunitList, queryUnitAdmin, updateSysUnit, addSysUnit, delSysUnit } from '@/api/merchantManagement'
import {
sysunitList,
queryUnitAdmin,
updateSysUnit,
addSysUnit,
delSysUnit,
queryUnitAdminByBusinessId
} from '@/api/merchantManagement'
export default {
name: 'SysUnit',
data() {
return {
userList: [],
userUnit: [],
/**
* @description: 用户类型
* @author: gaoyu
......@@ -249,6 +257,7 @@ export default {
getUserList() {
queryUnitAdmin().then(res => {
this.userList = res.data
this.userUnit = res.data
})
},
/** 根据value查label**/
......@@ -326,9 +335,23 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
this.form = row
this.form = JSON.parse(JSON.stringify(row))
this.open = true
this.title = '修改商家'
const that = this
const businessId = JSON.parse(JSON.stringify(row.userId))
this.getUserList()
queryUnitAdminByBusinessId(businessId).then(res => {
if (res.code === 200) {
if (res.data) {
const userUnitList = that.userUnit
console.log('userUnitList', userUnitList)
that.userList = JSON.parse(JSON.stringify(userUnitList))
that.userList.push(res.data)
console.log('item', that.userList)
}
}
})
},
// 改变状态
handleStatusChange(row) {
......
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