提交 2f7eb22d 编写于 作者: bo.dang's avatar bo.dang

Merge branch 'dev-circle-seven-20200914' into 'release'

Dev circle seven 20200914,code review:bo.dang



See merge request !219
......@@ -74,8 +74,7 @@
@change="returnTypeData('dynamicFlag')"
placeholder="请选择发布权限"
size="small"
clearable
>
clearable>
<el-option
v-for="(item,index) in contentList"
:key="index"
......@@ -87,12 +86,23 @@
<!--<span class="el-icon-info"></span>-->
<i class="el-icon-info" style="color: #449284;"></i>
</el-tooltip>
<div style="margin-top: 60px;margin-left: 250px;">
<el-button type="primary" @click="save()" center>保存</el-button>
<el-button @click="cancle()">取 消</el-button>
</div>
</el-form-item>
<el-form-item label="圈子类型" prop="type">
<el-radio-group v-model="formData.type" size="small" @change="changeType">
<el-radio :label="0" class="label-type">封闭 - 只对圈子成员可见,成员只能由管理员添加、删除</el-radio>
<el-radio :label="1" class="label-type">半开放 - 对任何人可见,用户请求加入后需管理员同意,成员可自行退出</el-radio>
<el-radio :label="2" class="label-type">开放 - 对任何人可见,用户请求加入后无需管理员同意,成员可自行退出</el-radio>
</el-radio-group>
</el-form-item>
<div style="margin-top: 60px;margin-left: 250px;">
<el-button type="primary" @click="save()" center>保存</el-button>
<el-button @click="cancle()">取 消</el-button>
</div>
<el-dialog
class="dialog-title-border-old"
title="图片裁剪"
......@@ -189,6 +199,9 @@
],
dynamicFlag: [
{ required: true, message: "请选择内容发布权限", trigger: "blur" },
],
type: [
{ required: true, message: "请选择圈子类型", trigger: "blur" },
]
},
imgMouseOver1: false,
......@@ -338,6 +351,9 @@
setTimeout(function () {
_this.$router.go(-1)
}, 100);
},
changeType(){
}
}
}
......@@ -431,4 +447,8 @@
color: #f56c6c;
margin-right: 4px;
}
.label-type {
width: 100%;
margin-top: 10px;
}
</style>
......@@ -54,7 +54,7 @@
</el-table>
<div class="pagination">
<el-pagination background @size-change="handleSizeOrganization" @current-change="handleCurrentOrganization"
:current-page="formOrganization.pageNum" :page-sizes="[10, 20, 40]" :page-size="formOrganization.pageSize"
:current-page="formOrganization.pageNum" :page-sizes="[10, 30, 50, 100, 200]" :page-size="formOrganization.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="totalOrganization"></el-pagination>
</div>
</div>
......
......@@ -61,7 +61,7 @@
</el-table>
<div class="pagination">
<el-pagination background @size-change="handleSizeOrganization" @current-change="handleCurrentOrganization"
:current-page="formOrganization.pageNum" :page-sizes="[10, 20, 40]" :page-size="formOrganization.pageSize"
:current-page="formOrganization.pageNum" :page-sizes="[10, 30, 50, 100, 200]" :page-size="formOrganization.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="totalOrganization"></el-pagination>
</div>
</div>
......
......@@ -5,6 +5,16 @@
<i class="el-icon-circle-plus-outline" @click="dialogOrgFn()"></i>
<i class="text" @click="dialogOrgFn()">添加机构</i>
</el-col>
<el-col class="add-organization" v-if="showImportFlag">
<el-upload
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadOrg">
<i class="el-icon-document-add"></i>
<i class="text">批量导入</i>
</el-upload>
</el-col>
<el-col class="organization-search">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" >
<el-form-item label>
......@@ -55,7 +65,7 @@
</el-table>
<div class="pagination">
<el-pagination background @size-change="handleSizeOrganization" @current-change="handleCurrentOrganization"
:current-page="formOrganization.pageNum" :page-sizes="[10, 20, 40]" :page-size="formOrganization.pageSize"
:current-page="formOrganization.pageNum" :page-sizes="[10, 30, 50, 100, 200]" :page-size="formOrganization.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="totalOrganization"></el-pagination>
</div>
<el-dialog
......@@ -87,6 +97,21 @@
<el-button type="primary" @click="hideDeleteFrom">取 消</el-button>
</span>
</el-dialog>
<el-dialog
title="导入错误提示"
:visible.sync="dialogVisible"
width="500px"
:close-on-click-modal="false"
@close="handleErrorClose"
center
>
<el-table :data="dialogErrorData" align="center">
<el-table-column property="rowNumber" label="行数" align="center"></el-table-column>
<el-table-column property="wrongData" label="错误提示" align="center"></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
......@@ -96,6 +121,7 @@ import { doUpload, getFilePath } from "@/utils/qiniu-util";
import * as operationData from "@/utils/operation";
import { moRelSearch, morDeleteOrg } from '@/utils/yqrange/memberApi';
import { getOrgProvincesReq } from '@/utils/yqrange/rangeApi';
import { uploadOrg } from '@/utils/yqrange/yqrangeApi';
import checkOrg from './checkOrg'
let vm = null;
export default {
......@@ -162,7 +188,10 @@ export default {
dialogOrg: false,
deleteVisible: false,
detelMessage: '',
clickItem: null
clickItem: null,
dialogVisible: false,
dialogErrorData: [],
showImportFlag: false,
}
},
components: {
......@@ -173,6 +202,12 @@ export default {
this.initRange();
//Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
if(vm.idType == 1){
this.showImportFlag = true;
}
else {
this.showImportFlag = false;
}
},
mounted() {
},
......@@ -408,7 +443,67 @@ export default {
this.dialogOrg = false
this.searchOrganization()
this.$emit('refreshRenYuan')
}
},
// 批量导入
beforeUploadOrg(file) {
let name = file.name;
let type = name.substring(name.lastIndexOf('.') + 1);
if (type !== 'xls' && type !== 'xlsx') {
vm.$message({
message: '上传文件只能是 xls、xlsx格式!',
type: 'warning'
});
return;
}
openLoading(vm);
let formData = new FormData();
formData.append("circleId", vm.circleId);
formData.append("file", file);
// let files = new window.File();
uploadOrg(formData).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if(res.data.successNum == 0 && res.data.wrongDataList.length > 0){
this.dialogVisible = true;
this.dialogErrorData = res.data.wrongDataList;
}
else {
this.$message({
type: 'success',
message: '导入成功!'
});
vm.initRange();
vm.searchOrganization();
vm.$emit('refreshRenYuan');
}
}
else {
this.$message({
type: 'error',
message: res.message
});
}
// vm.setDialog(res);
});
// };
// reader.readAsDataURL(file);
},
handleErrorClose() {
this.dialogVisible = false;
},
}
}
</script>
......@@ -430,7 +525,7 @@ export default {
font-size: 18px;
margin-right: 2px;
}
}
.organization-search {
margin-right: 20px;
......
......@@ -5,6 +5,16 @@
<i class="el-icon-circle-plus-outline" @click="dialogMemberFn()"></i>
<i class="text" @click="dialogMemberFn()">添加人员</i>
</el-col>
<el-col class="add-organization" v-if="showImportFlag">
<el-upload
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeUploadDoc">
<i class="el-icon-document-add"></i>
<i class="text">批量导入</i>
</el-upload>
</el-col>
<el-col class="organization-search">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline" >
<el-form-item label="机构:">
......@@ -19,7 +29,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="serch()">搜索</el-button>
</el-form-item>
......@@ -56,7 +66,7 @@
</el-table>
<div class="pagination">
<el-pagination background @size-change="handleSizeOrganization" @current-change="handleCurrentOrganization"
:current-page="formOrganization.pageNum" :page-sizes="[10, 20, 40]" :page-size="formOrganization.pageSize"
:current-page="formOrganization.pageNum" :page-sizes="[10, 30, 50, 100, 200]" :page-size="formOrganization.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="totalPeople"></el-pagination>
</div>
<el-dialog
......@@ -88,6 +98,22 @@
<el-button type="primary" @click="hideDeleteFrom">取 消</el-button>
</span>
</el-dialog>
<el-dialog
title="导入错误提示"
:visible.sync="dialogVisible"
width="500px"
:close-on-click-modal="false"
@close="handleErrorClose"
center
>
<el-table :data="dialogErrorData" align="center">
<el-table-column property="rowNumber" label="行数" align="center"></el-table-column>
<el-table-column property="wrongData" label="错误提示" align="center"></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
......@@ -96,6 +122,7 @@ import * as operationData from "@/utils/operation";
import { openLoading, closeLoading } from "@/utils/utils";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { mpRelSearch, mprDeleteOrg } from '@/utils/yqrange/memberApi';
import { uploadDoc } from '@/utils/yqrange/yqrangeApi';
import addMember from './addMember.vue'
let vm = null;
export default {
......@@ -173,7 +200,10 @@ export default {
},
dialogOrg:false,
deleteVisible: false,
detelMessage: ''
detelMessage: '',
dialogVisible: false,
dialogErrorData: [],
showImportFlag: false
}
},
created() {
......@@ -181,10 +211,16 @@ export default {
//Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
this.initRange();
if(vm.idType == 1){
this.showImportFlag = true;
}
else {
this.showImportFlag = false;
}
},
mounted() {
},
methods: {
initRange() {
......@@ -297,7 +333,66 @@ export default {
addPeople() {
this.dialogOrg = false
this.initRange()
}
},
// 批量导入
beforeUploadDoc(file) {
let name = file.name;
let type = name.substring(name.lastIndexOf('.') + 1);
if (type !== 'xls' && type !== 'xlsx') {
vm.$message({
message: '上传文件只能是 xls、xlsx格式!',
type: 'warning'
});
return;
}
openLoading(vm);
let formData = new FormData();
formData.append("circleId", vm.circleId);
formData.append("file", file);
// let files = new window.File();
uploadDoc(formData).then(res => {
closeLoading(vm);
if (res.code == "000000") {
if(res.data.successNum == 0 && res.data.wrongDataList.length > 0){
this.dialogVisible = true;
this.dialogErrorData = res.data.wrongDataList;
}
else {
this.$message({
type: 'success',
message: '导入成功!'
});
vm.initRange();
}
}
else {
this.$message({
type: 'error',
message: res.message
});
}
// vm.setDialog(res);
});
// };
// reader.readAsDataURL(file);
},
handleErrorClose() {
this.dialogVisible = false;
},
}
}
</script>
......@@ -314,7 +409,7 @@ export default {
font-size: 18px;
margin-right: 2px;
}
}
.organization-search {
flex: 1;
......
<template>
<div class="main-content" style="position: absolute;left:80px;z-index: 1">
<!--<div class="left-box left" style="background-color: white;" v-if="searchList && searchList.length > 0">-->
<div :id="searchId" class="left-box left" style="background-color: white;" v-if="searchList && searchList.length > 0">
<!-- 搜索列表 有搜索结果时-->
<!-- v-if="searchList && searchList.length > 0" v-infinite-scroll="loadMore" :infinite-scroll-disabled="busy"-->
<div class="search-list-wrap"
infinite-scroll-distance="5"
infinite-scroll-immediate-check="false"
>
<ul class="search-list">
<li v-for="(searchLi, index) in searchList" @mousedown="handleSearchLiClick(searchLi)" :key="index">
<div class="left">
<p class="disease-name" v-html="searchLi.name"></p>
<div class="one-line">
<p class="alias" v-html="searchLi.alias"></p>
<p class="sign" v-if="searchLi.alias">|</p>
<p class="code">{{searchLi.hospitalName}}</p>
</div>
</div>
<!--<div class="right" v-if="isSearchLiSelected(searchLi)"><i class="el-icon-check"></i></div>-->
</li>
<!--<p v-if="busy" class="loading">加载中...</p>-->
<!--<p v-if="noMore" class="loading">没有更多了...</p>-->
</ul>
</div>
</div>
</div>
</template>
<script>
let vm = null;
export default {
name: "search-doctor",
components: {
},
props: {
searchList: {
type: Array,
default: []
},
searchId: {
type: Number | String,
default: 100
}
},
created() {
vm = this;
// $("#" + this.searchId).show();
},
data() {
return{}
},
mounted() {
// document.querySelector("#" + this.searchId).style.display = 'block';
},
methods: {
handleSearchLiClick(searchLi) {
console.log(this.searchId);
this.$emit('handleSearchLiClick', {
name: searchLi.name,
mobilePhone: searchLi.mobilePhone
})
},
}
}
</script>
<style lang="scss">
.main-content{
overflow: hidden;
.left{
float: left;
}
.left-box{
width: 270px;
height: 300px;
.common-diagnose{
width: 100%; height: 300px;
.title{
color: #303133;
font-size: 16px;
line-height: 40px;
margin-top: 10px;
.no-result{
font-size: 14px;
color: #e6a23c;
margin-left: 28px;
}
}
.list{
width: 100%; height: 250px;
overflow: hidden;
overflow-y: scroll;
/*.scroll-bar;*/
padding: 10px;
border: 1px solid #DCDFE6;
li{
height: 35px; line-height: 35px; padding: 0 15px;
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
cursor: pointer;
font-size: 12px;
&.active{
color: #fff;
background: #409eff;
border-color: #409eff;
}
display: inline-block;
margin: 0 10px 10px 0;
border-radius: 4px;
max-width: 350px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
}
}
.search-list-wrap{
width: 100%; height: 290px; margin-top: 10px;
border: 1px solid #DCDFE6;
overflow: hidden;
overflow-y: scroll;
/*.scroll-bar;*/
.search-list{
border-radius: 4px;
width: 100%;
padding: 10px;
li{
position: relative;
line-height: 30px;
overflow: hidden;
cursor: pointer;
font-size: 12px;
&:hover{
background: #eee;
}
.left{
width: 310px;
float: left;
span{
color: #ff8429;
}
.disease-name{
font-size: 14px;
}
.one-line{
width: 100%; overflow: hidden;
font-size: 12px; color: #aaa;
.alias{
float: left;
}
.sign{
float: left;
margin: 0 5px;
}
.code{
float: left;
}
}
}
.right{
position: absolute;
right: 0;
top: 50%;
margin-top: -13px;
// width: 0px;
// float: left;
display: inline-block;
vertical-align: middle;
i{
font-size: 24px;
color: #449284;
font-weight: 700;
}
}
.code{
line-height: 30px;
}
}
.loading{
color: #ccc;
text-align: center;
margin: 0;
font-size: 12px;
margin-top: 5px;
}
}
}
}
.choosed-list-wrap{
width: 450px;
height: 300px;
margin-left: 30px;
.title{
color: #303133;
font-size: 16px;
line-height: 40px;
margin-top: 10px;
}
.choosed-list{
overflow: hidden;
overflow-y: scroll;
width: 450px;
height: 250px;
padding: 10px;
border: 1px solid #DCDFE6;
/*.scroll-bar;*/
.el-tag {
margin: 0 10px 10px 0;;
.text{
display: inline-block;
max-width: 342px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.el-tag__close{
top: -12px;
}
}
}
}
}
</style>
......@@ -63,6 +63,7 @@ const editRange = r => require.ensure([], () => r(require('../views/yqrange/edit
const createLive = r => require.ensure([], () => r(require('../views/yqrange/create-live.vue')), 'create-live')
const blackListManage = r => require.ensure([], () => r(require('../views/yqrange/blacklist-manage.vue')), 'blacklist-manage')
const adminManage = r => require.ensure([], () => r(require('../views/yqrange/admin-manage.vue')), 'admin-manage')
const rangeApply = r => require.ensure([], () => r(require('../views/yqrange/range-apply.vue')), 'rangeApply')
const shopList = r => require.ensure([], () => r(require('../views/shop/shop-list.vue')), 'shop-list')
const createShop = r => require.ensure([], () => r(require('../views/shop/create-shop.vue')), 'create-shop')
......@@ -249,6 +250,10 @@ export default [{
path: '/range-manage',
component: rangeManage
},
{
path: '/range-apply',
component: rangeApply
},
{
path: '/create-live',
component: createLive
......
......@@ -14,9 +14,21 @@ const vueFilter = {
return '已结束(可回看)'
}
},
circleApplyStatus: (value) => {
if(value.stauts = 0){
return '拒绝'
}
else if(value.stauts = 1){
return '待审核'
}
else if(value.stauts = 2){
return '通过'
}
},
liveStatusFilter: (value) => {
if(value == 1) return "隐藏"
else return "发布"
else return "发布"
},
liveTeacherType: (value) => {
let doctorName = []
......@@ -30,7 +42,7 @@ const vueFilter = {
doctorName.push(value[i].doctorName)
}
return doctorName.join("、")
}
}
},
controlType: (value) => {
if(value == 1) {
......@@ -56,11 +68,11 @@ const vueFilter = {
},
refreshType: (value) => {
if(value == 1) return "支持"
else return "不支持"
else return "不支持"
},
moudleType: (value) => {
if(value == 1) return "未激活"
else return "激活"
else return "激活"
},
dateFilter: (value) => {
if (!value) return '';
......@@ -68,12 +80,12 @@ const vueFilter = {
},
appColumnStatusFilter: (value) => {
if(value == 1) return "未提交"
else if(value == 4) return "已提交"
else if(value == 4) return "已提交"
},
statusFilter: (value) => {
if(value == 1) return "已创建"
else if(value == 5) return "已发布"
else return "已下架"
else return "已下架"
},
linkTypeFilter: (value) => { // 跳转类型
if(value == 1) return '链接'
......@@ -82,7 +94,7 @@ const vueFilter = {
},
teacherStatusFilter: (value) => {
if(value == 1) return "已下架"
else return "已发布"
else return "已发布"
},
moduleTypeFilter: (value,data) => { // 模块类型
for(let key in data) {
......@@ -266,9 +278,9 @@ const vueFilter = {
let list = '';
for(let i=0; i<value.length ; i++) {
list += value[i]+'、';
}
}
list = list.substring(0, list.length - 1);
return list
},
}
export default vueFilter
\ No newline at end of file
export default vueFilter
......@@ -54,9 +54,9 @@ service.interceptors.request.use(config => {
}
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境qgit
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
config.headers['token'] = '9606E40DDB704396AB532B2AE771048E';
// config.headers['token'] = '9098AE0A1DCE4F7B86178A9A8A1BFFCC';
// config.headers['token'] = localStorage.getItem('storageToken')
config.headers['token'] = localStorage.getItem('storageToken')
}else{
config.headers['token'] = localStorage.getItem('storageToken')
}
......
......@@ -483,6 +483,17 @@ const vueFilter = {
return '-'
}
},
circleApplyStatus: (value) => {
if(value == 0){
return '已拒绝'
}
else if(value == 1){
return '待审核'
}
else if(value == 2){
return '已通过'
}
},
// 圈子状态 0:暂存 10:待发布(已保存) 20:已发布(已提交待审核、审核被拒绝) 30:已上架(审核通过)40:下架 50:解散
rangeStatus: (value) => {
if (value == 0) {
......
import {isEmptyUtils, isNotEmptyUtils, subString} from "./utils";
import fetchQiniu from './fetch-qiniu.js';
import { getQiniuToken1, uploadVideo, uploadImg } from './index'
import fetch from "./fetch";
let fileApiUrl = getQiniuToken1()
//该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
let subscription = null;
//上传返回结果
let result = {
key: null,//文件保存在空间中的资源名
path: null,//保存到db的路径(不带域名)
fullPath: null,//文件网络路径(文件url)
size: null,//资源尺寸,单位为字节
name: null,//原始文件名
ext: null//上传资源的后缀名,通过自动检测的mimeType 或者原文件的后缀来获取
};
//上传状态
// var status = false;
//FIXME 请注意vue里面不要使用全局变量
let domain = uploadVideo() // 视频
let domain1 = uploadImg() // 图片
let errorCode = new Map([
[298,'部分操作执行成功'],
[400,'请求报文格式错误'],
[401,'认证授权失败'],
[403,'权限不足,拒绝访问。'],
[404,'资源不存在'],
[405,'请求方式错误'],
[406,'上传的数据 CRC32 校验错误'],
[413,'请求资源大小大于指定的最大值'],
[419,'用户账号被冻结'],
[478,'镜像回源失败'],
[502,'错误网关'],
[503,'服务端不可用'],
[504,'服务端操作超时'],
[573,'单个资源访问频率过高'],
[579,'上传成功但是回调失败'],
[599,'服务端操作失败'],
[608,'资源内容被修改'],
[612,'指定资源不存在或已被删除'],
[614,'目标资源已存在'],
[630,'已创建的空间数量达到上限,无法创建新空间。'],
[631,'指定空间不存在'],
[640,'调用列举资源(list)接口时,指定非法的marker参数。'],
[701,'在断点续上传过程中,后续上传接收地址不正确或ctx信息已过期。']
]);
let qiniuErrorCheck = function (code) {
errorCode.forEach(function (value, key, map) {
if (code === key){
console.error(key+':'+value)
}
})
}
//用来限制上传文件类型,为 null 时表示不对文件类型限制;限制类型放到数组里: ["image/png", "image/jpeg", "image/gif"]
let mimeTypeArray = null;
export const createFilePath = (file, fileName) => {
if (isEmptyUtils(file)) {
return null;
}
let arr = fileName.split('_');
if(arr.length != 4){
alert('上传视频文件名格式不正确');
return null;
}
let arr4 = arr[3].split('.');
//文件全路径(文件路径 + 文件名) 扩展名​/年/月/日/
let filePath = arr[0] + "/" + arr[1] + "/" + arr[2] + "_" + arr4[0] + '.'+arr4[1];
console.log(filePath);
return filePath;
};
/**
* 获取七牛上传凭证
*
* @return {Promise} token 七牛上传凭证
* */
const doQiniuAction1 = (fileType) => {
console.log('send---'+fileApiUrl);
return new Promise(function (resolve, reject) {
// if(isEmptyUtils(localStorage.getItem('qiniuToken'))){
fetchQiniu(fileApiUrl, {"fileType": fileType}, 'GET').then(function (result) {
let token = null;
if (isNotEmptyUtils(result) && result.code == "000000") {
token = result.data.qiniuToken;
resolve(token);
console.log('七牛临时授权成功');
localStorage.setItem('qiniuToken',token);
} else {
reject(result);
console.error('七牛临时授权失败:', result);
}
}).catch(function (error) {
reject();
console.error('七牛临时授权失败:', error);
});
// }else{
// console.log('从localStorage获取token:'+localStorage.getItem('qiniuToken'))
// resolve(localStorage.getItem('qiniuToken'));
// }
});
};
/**
*
* @param self
* @param file
* @param filePath
* @param previewId
* @param progressId
* @returns {Promise}
*/
export const qiniuUpload = (self, file, filePath, previewId, progressId) => {
// var deferred = $q.defer();
return new Promise(function (resolve, reject) {
if (isEmptyUtils(file) || isEmptyUtils(filePath)) {
console.error('七牛上传失败:非法参数');
reject();
}
let key = filePath ? filePath : getFilePath(file);
//修改状态为上传
self.qiniuUploadStatus = true;
// let token = "BRVB4TpxVFA5Wo6lIpfltmWKOltzGar46tvC3BlR:UHn0LDElwjP4jEZTXdq_1qV6_hw=:eyJzY29wZSI6InBpY2EtdGVzdCIsInJldHVybkJvZHkiOiJ7XCJrZXlcIjpcIiQoa2V5KVwiLFwiaGFzaFwiOlwiJChldGFnKVwiLFwiYnVja2V0XCI6XCIkKGJ1Y2tldClcIixcImZzaXplXCI6JChmc2l6ZSksXCJmbmFtZVwiOiQoZm5hbWUpLFwiZXh0XCI6JChleHQpfSIsImRlYWRsaW5lIjoxNTI5NDk0MTc1fQ==";
doQiniuAction().then(function (token) {
let putExtra = {
fname: file.name, //原文件名
params: {}, //用来放置自定义变量
mimeType: mimeTypeArray || null //null || array,用来限制上传文件类型,为 null 时表示不对文件类型限制;限制类型放到数组里: ["image/png", "image/jpeg", "image/gif"]
};
let config = {
useCdnDomain: true, //表示是否使用 cdn 加速域名,为布尔值,true 表示使用,默认为 false。
region: null //选择上传域名区域;当为 null 或 undefined 时,自动分析上传域名区域
};
/*
* qiniu.upload 返回一个 observable 对象用来控制上传行为,observable 对像通过 subscribe 方法可以被 observer 所订阅,
* 订阅同时会开始触发上传,同时返回一个 subscription 对象,该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
* */
let observable = qiniu.upload(file, key, token, putExtra, config);
/**
* 接收上传进度信息,res 参数是一个带有 total 字段的 object,包含loaded、total、percent三个属性,提供上传进
* total.loaded: number,已上传大小,单位为字节。
* total.total: number,本次上传的总量控制信息,单位为字节,注意这里的 total 跟文件大小并不一致。
* total.percent: number,当前上传进度,范围:0~100
* */
let next = function (res) {
//res值{"total":{"loaded":18184,"size":18185,"percent":99.99450096233159}}
//获取百分比进度
let progress = res.total.percent.toFixed(2);
self.uploadProgress = Number(progress);
console.log('Progress1: ' + progress);
//如果有进度条
/*if (isNotEmptyUtils(progressId)) {
let obj = $("#" + progressId);
//开始上传时,显示进度条
if (isNotEmptyUtils(obj.parent())) {
//修改状态为上传
// status = true;
self.qiniuUploadStatus = true;
obj.parent().removeClass("hidden");
obj.fadeIn("fast");
}
obj.css("width", progress + '%');
obj.text(progress + '%');
//上传完成,2秒后淡出进度条
if (progress === "100.00") {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = true;
obj.fadeOut(2000);
}
}*/
};
/**
* 接收上传完成后的后端返回信息,res 参数为一个 object, 为上传成功后后端返回的信息
* ,具体返回结构取决于后端sdk的配置,可参考上传策略(https://developer.qiniu.com/kodo/manual/1206/put-policy)
* */
let complete = function (res) {
console.log("七牛上传完成");
setTimeout(function(){
result.key = res.key;
result.path = '/' + res.key;
result.fullPath = domain + '/' + res.key + '?v=' + new Date().getTime();
result.size = res.fsize;
result.name = res.fname ;
result.ext = res.ext;
// deferred.resolve(result);
resolve(result);
// self.model.qCloudUrl = result.fullPath;
// $("#introVideoLecture").attr("src", self.model.qCloudUrl);
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false;
if (isNotEmptyUtils(previewId)) {
let address = domain + result.path;
console.log('文件路径: ' + address);
//显示图片
let $img = $('<img>').attr("src", address);
let obj = $("#" + previewId);
obj.empty().append($img);
obj.css('max-width', '100%');
}
},2000);
};
/**
* 上传错误后触发,当不是 xhr 请求错误时,会把当前错误产生原因直接抛出,诸如 JSON 解析异常等;当产生 xhr 请求错误时,参数 err 为一个包含 code、message、isRequestError 三个属性的 object:
* err.isRequestError: 用于区分是否 xhr 请求错误;当 xhr 请求出现错误并且后端通过 HTTP 状态码返回了错误信息时,该参数为 true;否则为 undefined 。
* err.reqId: string,xhr请求错误的 X-Reqid。
* err.code: number,请求错误状态码,只有在 err.isRequestError 为 true 的时候才有效,可查阅码值对应说明。
* err.message: string,错误信息,包含错误码,当后端返回提示信息时也会有相应的错误信息。
* */
let error = function (err) {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false
localStorage.removeItem('qiniuToken');
console.log("七牛上传失败,详细信息请参考:https://developer.qiniu.com/kodo/api/3928/error-responses");
//输出简略错误信息
if (err.isRequestError){
qiniuErrorCheck(err.code)
}else {
console.error(err);
}
/*modalClick("提示", "上传失败!", "确定", function () {
$('#model-modify').modal('hide');
}, "", null);*/
// deferred.reject(new Error('七牛上传失败'));
// return deferred.promise;
return reject(new Error('七牛上传失败'));
};
// 上传开始
subscription = observable.subscribe(next, error, complete);
});
// return deferred.promise;
});
};
/**
* 获取时间戳
* @param {Date} [date]日期对象,为空时,返回当前时间戳
* @return {String} timeStamp时间戳 格式:yyyyMMddhhmmssS
*/
const timeStamp = (date) => {
if (isEmptyUtils(date)) {
return new Date().format('yyyyMMddhhmmssS');
}
return date.format('yyyyMMddhhmmssS');
}
/**
* 获取全局唯一标识符(GUID,Globally Unique Identifier)
* @return {String} guid
*/
const guid = () => {
/**
* @return {String}
*/
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
};
/**
* 文件重命名--七牛图片 2018 11
* @param {File} [file] 上传文件对象
* @param {String} [fileName] 指定文件名
* @param {String} [folder] 指定文件夹
* @return {String} fileName
*/
export const getFilePath = (file,fileName,folder) => {
if (isEmptyUtils(file)) {
return null;
}
//文件类型
var ext = file.type;
//后缀名
var suffix = file.name.substring(file.name.lastIndexOf(".") + 1);
//若为空则从name中获取---对wps格式的文件获取不到file.type
if (isEmptyUtils(ext)) {
ext = suffix;
}
//获取当前日期对象
var date = new Date();
if (isEmptyUtils(fileName)) {
//重命名后的文件名
fileName = timeStamp(date) + "-" + subString(guid(), 8) + "." + suffix;
}
//文件全路径(文件路径 + 文件名) 扩展名​/年/月/日/
// var filePath = ext + "/" + date.format('yyyy/MM/dd') + "/" + (isEmptyUtils(folder) ? "" : (folder + "/")) + fileName;
//var filePath = ext + "/" + "common/" + file.name.split('.')[0] + '-' + timeStamp(date) + "." + suffix;
var filePath = ext + "/" + "protal/project/" + timeStamp(date) + "." + suffix;
console.log('filePath==============',filePath);
return filePath;
}
/**
*七牛上传图片、视频、文件 2018 11 hws
* @param self
* @param file
* @param filePath
* @param previewId
* @param progressId
* @param fileType 1--图片和文件 空为视频
* @returns {Promise}
*/
export const doUpload = (self, file, filePath, previewId, progressId, fileType) => {
return new Promise(function (resolve, reject) {
if (isEmptyUtils(file) || isEmptyUtils(filePath)) {
console.error('七牛上传失败:非法参数');
reject();
}
let key = filePath ? filePath : getFilePath(file);
//修改状态为上传
self.qiniuUploadStatus = true;
doQiniuAction1(fileType).then(function (token) {
let putExtra = {
fname: file.name, //原文件名
params: {}, //用来放置自定义变量
mimeType: mimeTypeArray || null //null || array,用来限制上传文件类型,为 null 时表示不对文件类型限制;限制类型放到数组里: ["image/png", "image/jpeg", "image/gif"]
};
let config = {
useCdnDomain: true, //表示是否使用 cdn 加速域名,为布尔值,true 表示使用,默认为 false。
region: null, //选择上传域名区域;当为 null 或 undefined 时,自动分析上传域名区域
chunkSize: 600
};
/*
* qiniu.upload 返回一个 observable 对象用来控制上传行为,observable 对像通过 subscribe 方法可以被 observer 所订阅,
* 订阅同时会开始触发上传,同时返回一个 subscription 对象,该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
* */
let observable = qiniu.upload(file, key, token, putExtra, config);
/**
* 接收上传进度信息,res 参数是一个带有 total 字段的 object,包含loaded、total、percent三个属性,提供上传进
* total.loaded: number,已上传大小,单位为字节。
* total.total: number,本次上传的总量控制信息,单位为字节,注意这里的 total 跟文件大小并不一致。
* total.percent: number,当前上传进度,范围:0~100
* */
let next = function (res) {
//res值{"total":{"loaded":18184,"size":18185,"percent":99.99450096233159}}
//获取百分比进度
let progress = res.total.percent.toFixed(2);
self.uploadProgress = Number(progress);
if(progressId == 'uploadProgress1') {
self.uploadProgress1 = Number(progress);
}
if(progressId == 'uploadProgress2') {
self.uploadProgress2 = Number(progress);
}
console.log('Progress2: ' + progress);
};
/**
* 接收上传完成后的后端返回信息,res 参数为一个 object, 为上传成功后后端返回的信息
* ,具体返回结构取决于后端sdk的配置,可参考上传策略(https://developer.qiniu.com/kodo/manual/1206/put-policy)
* */
let complete = function (res) {
console.log("七牛上传完成");
setTimeout(function(){
result.key = res.key;
result.path = '/' + res.key;
if(!fileType) { // 图片 文件
console.log('---domain-------',domain)
result.fullPath = domain + '/' + res.key;
}else{ // 视频
console.log('----domain1------',domain1)
result.fullPath = domain1 + '/' + res.key;
}
result.size = res.fsize;
result.name = res.fname ;
result.ext = res.ext;
resolve(result);
self.qiniuUploadStatus = false;
},500);
};
/**
* 上传错误后触发,当不是 xhr 请求错误时,会把当前错误产生原因直接抛出,诸如 JSON 解析异常等;当产生 xhr 请求错误时,参数 err 为一个包含 code、message、isRequestError 三个属性的 object:
* err.isRequestError: 用于区分是否 xhr 请求错误;当 xhr 请求出现错误并且后端通过 HTTP 状态码返回了错误信息时,该参数为 true;否则为 undefined 。
* err.reqId: string,xhr请求错误的 X-Reqid。
* err.code: number,请求错误状态码,只有在 err.isRequestError 为 true 的时候才有效,可查阅码值对应说明。
* err.message: string,错误信息,包含错误码,当后端返回提示信息时也会有相应的错误信息。
* */
let error = function (err) {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false
localStorage.removeItem('qiniuToken');
console.log("七牛上传失败,详细信息请参考:https://developer.qiniu.com/kodo/api/3928/error-responses");
//输出简略错误信息
if (err.isRequestError){
qiniuErrorCheck(err.code)
}else {
console.error(err);
}
return reject(new Error('七牛上传失败'));
};
// 上传开始
subscription = observable.subscribe(next, error, complete);
});
// 保存到全局对象
window.QNSubscription = subscription;
});
};
// 取消上传
export const unsubscribe = () => {
subscription.unsubscribe();
}
......@@ -111,3 +111,54 @@ export const getImages = (params) => {
})
};
export const uploadOrg = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/import/hospitals`),
method: 'post',
data: params,
description: '批量导入机构',
})
};
export const uploadDoc = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/import/doctors`),
method: 'post',
data: params,
description: '批量导入人员',
})
};
export const searchDoc = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/circle/doctor/search?circleId=${params.id}&name=${params.name}`),
method: 'get',
description: '直播搜索主播或者嘉宾',
})
};
export const applyList = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/circle/apply/list`),
method: 'post',
data: params,
description: '圈子审核列表',
})
};
export const applyUpdate = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/circle/apply/update`),
method: 'post',
data: params,
description: '圈子审核列表更新',
})
};
......@@ -58,7 +58,7 @@
@size-change="handleSizeChange"
@current-change="handleNumChange"
:current-page="searchForm.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-sizes="[10, 30, 50, 100, 200]"
:page-size="searchForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
......
......@@ -86,7 +86,7 @@
@size-change="handleSizeOrganization"
@current-change="handleCurrentOrganization"
:current-page="formOrganization.pageNum"
:page-sizes="[10, 20, 40]"
:page-sizes="[10, 30, 50, 100, 200]"
:page-size="formOrganization.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalOrganization"
......
......@@ -408,16 +408,19 @@
<el-form-item label="直播角色" v-if="formData.streamType == 1">
<div style="color:#666666;font-size:10px;">主播(必填)</div>
<el-row>
<el-col :span="10">
<el-form-item label="姓名" prop="lecturesUserName" label-width="80px">
<el-col :span="10" style="position: relative;">
<el-form-item label="姓名" prop="lecturesUserName" label-width="80px" style="position: relative;">
<el-input
size="small"
v-model="formData.lecturesUserName"
placeholder="请输入姓名"
style="width:85%;"
:disabled="liveEditFlag"
@input="handleInputSearch(101, formData.lecturesUserName, null)"
@blur="handleSearchListBlur"
></el-input>
</el-form-item>
<search-doctor :searchList="searchList" :searchId="searchId" @handleSearchLiClick="handleSearchLiClick" v-if="nowInput == 101"></search-doctor>
</el-col>
<el-col :span="1">
<img style="vertical-align: middle" src="../../assets/image/lianjie_icon.png" />
......@@ -440,7 +443,7 @@
</el-col>
<div v-for="(item, index) in formData.guests" :key="index">
<el-row>
<el-col :span="10">
<el-col :span="10" style="position: relative;">
<el-form-item label=" 姓名" label-width="80px">
<el-input
size="small"
......@@ -448,8 +451,11 @@
placeholder="请输入姓名"
style="width:85%;"
:disabled="guestEditFlag"
@input="handleInputSearch(index, item.username, item)"
@blur="handleSearchListBlur"
></el-input>
</el-form-item>
<search-doctor :searchList="searchList" :searchId="searchId" @handleSearchLiClick="handleSearchLiClick" v-if="index==nowInput"></search-doctor>
</el-col>
<el-col :span="1">
<img style="vertical-align: middle" src="../../assets/image/lianjie_icon.png" />
......@@ -489,6 +495,7 @@
</div>
</div>
<el-dialog
class="dialog-title-border-old"
title="图片裁剪"
......@@ -564,8 +571,9 @@
import { isEmptyUtils, openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath, unsubscribe} from "../../utils/qiniu-util";
import { checkMobile } from '../../utils/patients/checkValid';
import { getRtcInfo, getImages } from "../../utils/yqrange/yqrangeApi";
import Cropper from '@/components/common/cropper.vue'
import { getRtcInfo, getImages, searchDoc} from "../../utils/yqrange/yqrangeApi";
import Cropper from '@/components/common/cropper.vue';
import SearchDoctor from "@/components/yqrange/search-doctor";
// import { ossUpload, getFilePathForOSS } from "@/utils/oss/ossUtil";
// import { checkPhone } from "../login.vue";
......@@ -573,7 +581,8 @@
export default {
components: {
BreadCrumb,
Cropper
Cropper,
SearchDoctor
},
data(){
let checkProjectStr = (rule, value, callback) => {
......@@ -605,6 +614,10 @@
pullFlag: false, // 是否显示拉流地址
dialogVisible: false,
uploadProgress1: 0,
searchList: [],
guestItem: null,
searchId: 100,
busy: false,
formData: {
circleId: "",// 圈子ID
name: '',// 直播名称
......@@ -709,7 +722,8 @@
// 一天是24*60*60*1000 = 86400000 = 8.64e7
// console.log('this.maxDate',this.maxDate)
return time.getTime() < Date.now() - 8.64e7
}
},
nowInput: 0
},
rules: {
name: [
......@@ -1914,8 +1928,76 @@
else if(this.formData.signMinute > 1000){
this.formData.signMinute = 1000;
}
}
},
// 搜索框中输入文字 时 page=1 pageSize=30
handleInputSearch(searchId, name, item) {
this.searchId = searchId;
this.guestItem = item;
this.nowInput = searchId
// debugger;
clearTimeout(this.searchFlagTimer);
let that = this;
that.page = 1;
that.isInputResponse = false;
if(name == ''){
that.searchList = [];
return;
}
that.searchList = [];
let params = {
id: this.circleId,
name: name
};
this.searchFlagTimer = setTimeout(() => {
searchDoc(params).then(res => {
// console.log('>>>>>>*********** search: ', res)
if(res.code == '000000'){
that.isInputResponse = true;
// that.totalPageNum = Math.ceil(res.data.total/that.pageSize); // 总页数
let list = res.data.chooseLiveMemberDtos || [];
if(list.length > 0){
if(that.name == ''){
that.searchList = [];
return;
}
that.searchList = list;
that.hasNoResult = false;
// document.querySelectorAll(".left-box")[0].style.display = 'none';
}else{
that.searchList = [];
that.hasNoResult = true;
}
}else{
that.isInputResponse = false;
that.searchList = [];
that.$message({
message: data.message,
type: 'warning'
});
}
})
}, 300)
},
handleSearchListBlur() {
this.searchList = [];
clearTimeout(this.searchFlagTimer);
// console.log('blur.....')
},
handleSearchLiClick(item) {
console.log(item);
if(this.guestItem == null) {
this.formData.lecturesUserName = item.name;
this.formData.lecturesPhone = item.mobilePhone;
}
else {
this.guestItem.username = item.name;
this.guestItem.phone = item.mobilePhone;
}
},
},
}
......@@ -2067,4 +2149,160 @@
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #449284;
}
.main-content{
overflow: hidden;
.left{
float: left;
}
.left-box{
width: 270px;
height: 300px;
.common-diagnose{
width: 100%; height: 300px;
.title{
color: #303133;
font-size: 16px;
line-height: 40px;
margin-top: 10px;
.no-result{
font-size: 14px;
color: #e6a23c;
margin-left: 28px;
}
}
.list{
width: 100%; height: 250px;
overflow: hidden;
overflow-y: scroll;
/*.scroll-bar;*/
padding: 10px;
border: 1px solid #DCDFE6;
li{
height: 35px; line-height: 35px; padding: 0 15px;
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
cursor: pointer;
font-size: 12px;
&.active{
color: #fff;
background: #409eff;
border-color: #409eff;
}
display: inline-block;
margin: 0 10px 10px 0;
border-radius: 4px;
max-width: 350px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
}
}
.search-list-wrap{
width: 100%; height: 290px; margin-top: 10px;
border: 1px solid #DCDFE6;
overflow: hidden;
overflow-y: scroll;
/*.scroll-bar;*/
.search-list{
border-radius: 4px;
width: 100%;
padding: 10px;
li{
position: relative;
line-height: 30px;
overflow: hidden;
cursor: pointer;
font-size: 12px;
&:hover{
background: #eee;
}
.left{
width: 310px;
float: left;
span{
color: #ff8429;
}
.disease-name{
font-size: 14px;
}
.one-line{
width: 100%; overflow: hidden;
font-size: 12px; color: #aaa;
.alias{
float: left;
}
.sign{
float: left;
margin: 0 5px;
}
.code{
float: left;
}
}
}
.right{
position: absolute;
right: 0;
top: 50%;
margin-top: -13px;
// width: 0px;
// float: left;
display: inline-block;
vertical-align: middle;
i{
font-size: 24px;
color: #449284;
font-weight: 700;
}
}
.code{
line-height: 30px;
}
}
.loading{
color: #ccc;
text-align: center;
margin: 0;
font-size: 12px;
margin-top: 5px;
}
}
}
}
.choosed-list-wrap{
width: 450px;
height: 300px;
margin-left: 30px;
.title{
color: #303133;
font-size: 16px;
line-height: 40px;
margin-top: 10px;
}
.choosed-list{
overflow: hidden;
overflow-y: scroll;
width: 450px;
height: 250px;
padding: 10px;
border: 1px solid #DCDFE6;
/*.scroll-bar;*/
.el-tag {
margin: 0 10px 10px 0;;
.text{
display: inline-block;
max-width: 342px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.el-tag__close{
top: -12px;
}
}
}
}
}
</style>
......@@ -60,7 +60,8 @@
introduce: '',
dynamicFlag: '',
idType: localStorage.getItem("storageIdType"),
roleType: null
roleType: null,
type: 0
}
}
},
......
......@@ -46,7 +46,7 @@
</el-row>
</el-form>
<el-table :data="tableData" class="item-table" style="width: 100%;margin-top: 10px;">
<el-table-column prop="liveName" label="直播名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="name" label="直播名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="liveStatus" label="直播状态" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.liveStatus | liveStatusFilter }}</span>
......@@ -57,8 +57,8 @@
<span>{{ scope.row.streamType | streamTypeFilter }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="100" align="center"></el-table-column>
<el-table-column prop="startTime" label="开始时间" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" min-width="100" align="center"></el-table-column>
<el-table-column prop="openTime" label="开始时间" min-width="100" align="center"></el-table-column>
<el-table-column prop="endTime" label="结束时间" min-width="100" align="center"></el-table-column>
<el-table-column label="操作" min-width="300" align="center">
<template slot-scope="scope">
......@@ -72,7 +72,7 @@
@click="liveLink(scope.row)"
type="text"
size="small"
v-if="!((scope.row.liveStatus==4 && scope.row.liveScope==1) || (scope.row.streamType==2 && scope.row.liveScope==1))">直播链接</el-button>
v-if="!((scope.row.liveStatus==4 && scope.row.scope==1) || (scope.row.streamType==2 && scope.row.scope==1))">直播链接</el-button>
<el-button
@click="updatelive(scope.row)"
......@@ -85,6 +85,7 @@
size="small"
v-if="scope.row.liveStatus==4">数据统计</el-button>
<el-button @click="editLive(scope.row)" type="text" size="small">编辑</el-button>
<el-button @click="delLive(scope.row)" type="text" size="small">删除</el-button>
<!--<el-button @click="setPlayback(scope.row)" type="text" size="small" v-if="scope.row.playbackSetFlag == 1">设置回放</el-button>-->
<!--<el-button @click="setPlayback(scope.row)" type="text" size="small" v-if="scope.row.playbackSetFlag == 1">关闭回放</el-button>-->
......@@ -98,7 +99,7 @@
@size-change="handleSizeChange"
@current-change="handleNumChange"
:current-page="searchForm.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-sizes="[10, 30, 50, 100, 200]"
:page-size="searchForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
......@@ -152,7 +153,7 @@
</el-col>
</div>
<div class="live_url_style" v-if="streamType == 2 || this.liveScope==2">
<div class="live_url_style" v-if="streamType == 2 || this.scope==2">
<div class="href_style">观众链接 {{audienceUrl}}</div>
<el-col class="href_outer_border">
<el-link type="primary" @click="copyTxt(3)" size="small" class="href_button_style">复制</el-link>
......@@ -336,7 +337,7 @@ export default {
tableData: [
// {
// liveName: "浙江医学大会第二场",
// liveScope: 1, //直播范围 1-非公开 2-公开
// scope: 1, //直播范围 1-非公开 2-公开
// liveStatus: 1, //直播状态 1-未开始 2-直播中 3-暂停中 4-已结束 5-回放中目前只能用到1,2,4
// createTime: "",
// startTime: "",
......@@ -351,12 +352,12 @@ export default {
signNum: 0
}
],
liveScope: 1,
scope: 1,
liveStatus: 1,
lecturerUrl: "https://dev.yunxin.163.com/",
guestUrl: "https://www.cnblogs.com/",
audienceUrl: "https://www.soho.com",
lecturerUrl: "",
guestUrl: "",
audienceUrl: "",
playbackForm: {
canPlayback: 0,
playbackUrls: {
......@@ -453,17 +454,17 @@ export default {
//弹出直播链接弹窗
liveLink(row) {
this.dialogLivelinkVisible = true;
this.liveScope = row.liveScope;
this.scope = row.scope;
this.liveStatus = row.liveStatus;
this.streamType = row.streamType;
console.log(
"liveLink() : liveScope = " +
this.liveScope +
"liveLink() : scope = " +
this.scope +
", liveStatus = " +
this.liveStatus
);
vm.GET("rtc/liveAdmin/url/" + row.rtcId, "").then(res => {
vm.GET("rtc/liveAdmin/url/" + row.id, "").then(res => {
if (res.code == "000000") {
this.lecturerUrl = res.data.lecturerUrl;
this.guestUrl = res.data.guestUrl;
......@@ -489,7 +490,7 @@ export default {
setPlayback(row) {
vm.dialogLivePlaybackVisible = true;
const rtcId = row.rtcId;
const rtcId = row.id;
vm.streamType = row.streamType;
......@@ -887,7 +888,7 @@ export default {
// vm.submitPlayback(0);
let params = {rtcId: row.rtcId, canPlayback: 0};
let params = {rtcId: row.id, canPlayback: 0};
postPlayback(params).then((res) => {
closeLoading(this);
......@@ -925,7 +926,7 @@ export default {
.then(() => {
openLoading(this);
// confirm
let params = {rtcId: row.rtcId,liveStatus: 4};
let params = {rtcId: row.id,liveStatus: 4};
updateLiveStatus(params).then((res) => {
closeLoading(this);
......@@ -947,11 +948,11 @@ export default {
//数据统计
countLive(row) {
this.rtcId = row.rtcId;
this.rtcId = row.id;
this.isSign = row.isSign;
this.dialogStatisticsVisible = true;
console.log("getStatisticsData() : this.circleId = " + this.circleId);
vm.GET("rtc/liveAdmin/data/" + row.rtcId, "").then(res => {
vm.GET("rtc/liveAdmin/data/" + row.id, "").then(res => {
if (res.code == "000000") {
let listData = [];
let obj = {
......@@ -975,15 +976,26 @@ export default {
path: "/create-live",
query: {
// rtcId: "1"
rtcId: row.rtcId,
rtcId: row.id,
circleId: this.circleId,
circleName: this.circleName
}
});
},
//删除直播
deleteLive(row) {
this.$confirm(`确定删除“${row.liveName}”吗?`, "", {
delLive(row) {
// 直播中
if(row.liveStatus == 2){
vm.$message({
type: "warning",
message: "直播中无法删除,请直播结束后重试"
});
}
// 1:直播预告;4:直播结束后,可以删除
else if(row.liveStatus == 1 || row.liveStatus == 4){
this.$confirm(`确定删除“${row.name}”吗?`, "", {
confirmButtonText: "删除",
cancelButtonText: "取消",
type: "warning"
......@@ -991,10 +1003,7 @@ export default {
})
.then(() => {
// confirm
let req = {
rtcId: row.rtcId
};
vm.DELETE("rtc/liveAdmin", req).then(res => {
vm.DELETE("rtc/liveAdmin/" + row.id, {}).then(res => {
if (res.code == "000000") {
vm.$message({
type: "success",
......@@ -1003,13 +1012,18 @@ export default {
this.getLiveList("", "");
} else {
vm.$message({
type: "success",
message: "删除失败"
type: "warning",
message: res.message
});
}
});
})
.catch(() => {});
}
},
// //编辑直播
// editLive(row) {
......@@ -1047,23 +1061,23 @@ export default {
if (res.data.pageContents == null) {
return;
}
for (let i = 0; i < res.data.pageContents.length; i++) {
let obj = {
liveName: res.data.pageContents[i].name,
liveScope: res.data.pageContents[i].scope,
liveStatus: res.data.pageContents[i].liveStatus,
streamType: res.data.pageContents[i].streamType,
playbackSetFlag: res.data.pageContents[i].playbackSetFlag,
canPlayback: res.data.pageContents[i].canPlayback,
createTime: res.data.pageContents[i].createdTime,
startTime: res.data.pageContents[i].openTime,
endTime: res.data.pageContents[i].endTime,
rtcId: res.data.pageContents[i].id,
isSign: res.data.pageContents[i].isSign
};
listData.push(obj);
}
this.tableData = listData;
// for (let i = 0; i < res.data.pageContents.length; i++) {
// let obj = {
// // liveName: res.data.pageContents[i].name,
// // liveScope: res.data.pageContents[i].scope,
// // liveStatus: res.data.pageContents[i].liveStatus,
// // streamType: res.data.pageContents[i].streamType,
// // playbackSetFlag: res.data.pageContents[i].playbackSetFlag,
// // canPlayback: res.data.pageContents[i].canPlayback,
// // createTime: res.data.pageContents[i].createdTime,
// // startTime: res.data.pageContents[i].openTime,
// // endTime: res.data.pageContents[i].endTime,
// // rtcId: res.data.pageContents[i].id,
// // isSign: res.data.pageContents[i].isSign
// };
// listData.push(obj);
// }
this.tableData = res.data.pageContents;
this.totalRows = res.data.totalRows;
} else {
......
<template>
<div class="yqrange-index-wrapper">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="yqrange-index-content">
<el-form ref="searchForm" :model="searchForm" label-width="75px" label-suffix=":" :inline="true">
<el-row :gutter="30" type="flex" style="margin-top: 10px">
<el-col :span="8">
<el-input v-model="searchForm.name" size="small" placeholder="请输入申请人姓名"></el-input>
</el-col>
<el-col :span="9">
<el-input v-model="searchForm.circleName" size="small" placeholder="请输入圈子名称"></el-input>
</el-col>
<el-col :span="9">
<el-select
v-model="searchForm.status"
placeholder="全部审核状态"
size="small"
clearable>
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-col>
<el-col :span="7" style="text-align: right">
<el-button type="primary" size="small" @click="search">搜索</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">取消搜索</el-button>
</el-col>
</el-row>
</el-form>
<el-table :data="tableData" class="item-table" style="width: 100%;margin-top: 10px;">
<el-table-column prop="name" label="申请人" min-width="100" align="center"></el-table-column>
<el-table-column prop="circleName" label="申请加入圈子" min-width="100" align="center"></el-table-column>
<el-table-column prop="department" label="所属科室" min-width="100" align="center"></el-table-column>
<el-table-column prop="hospital" label="所属医院" min-width="100" align="center"></el-table-column>
<el-table-column prop="provinceName" label="所属省份" min-width="100" align="center"></el-table-column>
<el-table-column prop="cityName" label="所属城市" min-width="100" align="center"></el-table-column>
<el-table-column prop="countyName" label="所属区县" min-width="100" align="center"></el-table-column>
<el-table-column prop="townName" label="所属街道" min-width="100" align="center"></el-table-column>
<el-table-column prop="status" label="审核状态" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.status | circleApplyStatus }}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="370" align="center">
<template slot-scope="scope">
<div v-if="scope.row.status != 50">
<el-button @click="approve(scope.row)" type="text" size="small" v-if="scope.row.status != 0 && scope.row.status != 2">通过</el-button>
<el-button @click="reject(scope.row)" type="text" size="small" v-if="scope.row.status != 0 && scope.row.status != 2">拒绝</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleNumChange"
:current-page="searchForm.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="searchForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { applyList, applyUpdate} from "../../utils/yqrange/yqrangeApi";
export default {
components: {
BreadCrumb
},
data(){
return{
curmbFirst: '审核列表',
showAllFlag: false,
showNewFlag: false,
searchForm: {
name: '',
circleName: '',
// endTime: '',
status: -1,
pageNo: 1,
pageSize: 10,
},
totalRows: 0,
tableData: [],
dialogSettingVisible: false,
settingForm:{
circleId: null,
settingData: []
},
statusList: [
{
value: -1,
label: "全部状态"
},
{
value: 0,
label: "已拒绝"
},
{
value: 1,
label: "待审核"
},
{
value: 2,
label: "已通过"
},
],
dialogVisible: false
}
},
created() {
this.initPrivilege();
this.search();
},
methods: {
initPrivilege(){
let idType = localStorage.getItem('storageIdType');
// if(idType == null || idType == ""){
// idType = 2;
// localStorage.setItem('storageIdType', idType);
// }
// this.searchForm.userType = idType;
// 内部用户:运营人员
if(idType == "1"){
this.showAllFlag = true;
this.showNewFlag = true;
}
// 外部用户
else if(idType == "2"){
this.showAllFlag = false;
setTimeout(() => {
this.getUserAuth();
},1500)
}
},
// 外部用户权限
getUserAuth(){
let highMainManager = localStorage.getItem('highMainManager');
let mainManager = localStorage.getItem('mainManager');
let manager = localStorage.getItem('manager');
if(highMainManager == "1" || mainManager == "1"){
this.showNewFlag = true;
}
else if(manager == "1"){
this.showNewFlag = false;
}
// localStorage.setItem('ordinary', vm.setStoreData(ordinary))
},
// 搜索
search(){
this.searchForm.pageNo = 1;
this.searchList();
},
searchList() {
openLoading(this);
let params = this.searchForm;
if(this.searchForm.status == ""){
this.searchForm.status = -1;
}
console.log('查询圈子')
applyList(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.tableData = res.data.list;
this.totalRows = res.data.total;
} else {
this.tableData = [];
}
}).catch((error) => {
// this.$message({
// message: error,
// type: 'error'
// });
this.$message.error("请重试");
})
},
resetForm() {
this.searchForm.name = "";
this.searchForm.circleName = "";
this.searchForm.status = -1;
console.log('重置')
this.search();
},
// 更新圈子状态(上线,下线)
updateStatus(params){
applyUpdate(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.$message.success("成功");
this.searchList();
} else {
this.$message.success("失败");
}
}).catch((error) => {
// this.$message({
// message: error,
// type: 'error'
// });
this.$message.error("请重试");
})
},
// 0:拒绝,1:待审核;2.通过
approve(row){
let params = {
applyList: [{
"circleId": row.circleId,
"doctorId": row.doctorId,
"status": 2
}]
};
this.updateStatus(params);
},
//拒绝
reject(row) {
let params = {
applyList: [{
"circleId": row.circleId,
"doctorId": row.doctorId,
"status": 0
}]
};
this.$confirm(`拒绝后"${row.name}"将无法访问"${row.circleName}"`, `确认拒绝`, {
confirmButtonText: '拒绝',
cancelButtonText: '取消',
type: 'warning',
customClass: 'range-make-box',
}).then(() => {
this.updateStatus(params);
// confirm
}).catch(() => {
// cancel
});
},
// 关闭
handleSettingClose(){
this.dialogSettingVisible = false;
},
handleSizeChange(val) {
this.searchForm.pageSize = val;
this.search();
},
handleNumChange(val) {
this.searchForm.pageNo = val;
this.searchList();
},
},
}
</script>
<style lang="scss">
.yqrange-index-wrapper{
.yqrange-index-content{
background: #fff;
padding: 10px;
.header-title{
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
}
.el-button--text{
color: #449284;
font-size: 14px;
&::after{
content: '';
position: relative;
height: 14px;
/*border-right: 1px solid #EBEEF5;*/
border-right: 1px solid #aaaaaa;
padding-right: 10px;
}
&:last-of-type{
&::after{
content: '';
position: relative;
width: 1px;
height: 14px;
border-right: none;
}
}
}
}
/*.range-make-box{*/
/*.el-message-box__btns{*/
/*margin-top: 30px;*/
/*}*/
/*}*/
</style>
<template>
<div class="yqrange-index-wrapper">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="yqrange-index-content screenSet" id="screenSet">
<div class="header-title">云鹊小圈</div>
<div class="yqrange-index-content screenSet">
<el-tabs v-model="activeName" @tab-click="tabChangeHandler">
<el-tab-pane label="云鹊小圈" name="first">
<el-form ref="searchForm" :model="searchForm" label-width="75px" label-suffix=":" :inline="true">
<el-row :gutter="30" type="flex" style="margin-top: 10px">
<el-col :span="8">
......@@ -73,7 +74,7 @@
@size-change="handleSizeChange"
@current-change="handleNumChange"
:current-page="searchForm.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-sizes="[10, 30, 50, 100, 200]"
:page-size="searchForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
......@@ -114,8 +115,17 @@
</el-dialog>
</el-tab-pane>
<el-tab-pane label="审核列表" name="second" v-if="showApplyFlag">
<range-apply></range-apply>
</el-tab-pane>
</el-tabs>
</div>
</div>
......@@ -124,15 +134,21 @@
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting} from "../../utils/yqrange/yqrangeApi";
import ElTabPane from "element-ui/packages/tabs/src/tab-pane";
import RangeApply from "./range-apply";
export default {
components: {
RangeApply,
ElTabPane,
BreadCrumb
},
data(){
return{
curmbFirst: '云鹊小圈',
activeName: 'first',
showAllFlag: false,
showNewFlag: false,
showApplyFlag: false,
searchForm: {
name: '',
createdTime: '',
......@@ -157,6 +173,8 @@ export default {
},
methods: {
tabChangeHandler(tab) {},
initPrivilege(){
let idType = localStorage.getItem('storageIdType');
// if(idType == null || idType == ""){
......@@ -169,14 +187,14 @@ export default {
if(idType == "1"){
this.showAllFlag = true;
this.showNewFlag = true;
this.showApplyFlag = true;
}
// 外部用户
else if(idType == "2"){
this.showAllFlag = false;
setTimeout(() => {
this.getUserAuth();
},1500)
},500)
}
},
......@@ -186,13 +204,20 @@ export default {
let highMainManager = localStorage.getItem('highMainManager');
let mainManager = localStorage.getItem('mainManager');
let manager = localStorage.getItem('manager');
let ordinary = localStorage.getItem('ordinary');
if(highMainManager == "1" || mainManager == "1"){
this.showNewFlag = true;
this.showApplyFlag = true;
}
else if(manager == "1"){
this.showNewFlag = false;
this.showApplyFlag = true;
}
else if(ordinary == "1"){
this.showApplyFlag = false;
}
// localStorage.setItem('ordinary', vm.setStoreData(ordinary))
},
......@@ -455,9 +480,13 @@ export default {
this.$message.error("请重试");
})
},
getRangeNotice(){
this.$router.push({
path: '/range-notice'
})
}
},
}
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册