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

Merge branch 'dev-20210330' into 'release'

Dev 20210330,code review:bo.dang



See merge request !260
......@@ -473,7 +473,7 @@ const vueFilter = {
return value
}
},
// 云鹊小圈 内容发布权限
// 云鹊专区 内容发布权限
dynamicFlagStatus: (value) => {
if (value == 1) {
return '所有人可发布'
......
......@@ -325,3 +325,25 @@ export const doctorsByIdOrMobile = (params) => {
description: '批量导入人员',
})
};
// https://dev-sc.yunqueyi.com/contents/admin/template/queryTemplate?id=&title=&publishFlag=&createdTime=&pageNo=1&pageSize=15
export const getActivityList = (params) => {
return fetch({
headers,
url: getBaseUrl(`contents/admin/template/queryTemplate?id=${params.id}&title=${params.title}&publishFlag=${params.publishFlag}&createdTime=${params.createdTime}&pageNo=${params.pageNo}&pageSize=${params.pageSize}`),
method: 'get',
data: params,
description: '活动列表',
})
};
export const delActivity = (params) => {
return fetch({
headers,
url: getBaseUrl(`circle/v1/app/delete?circleId=${params.circleId}&id=${params.id}`),
method: 'get',
data: params,
description: '活动列表',
})
};
......@@ -373,9 +373,9 @@ export default {
});
},
setCircleSize() {
console.log("设置云鹊小圈");
console.log("设置云鹊专区");
const yqRange = {
title: "云鹊小圈",
title: "云鹊专区",
icon: "el-icon-setting",
index: "yq-range",
};
......@@ -442,7 +442,7 @@ export default {
};
const yqRange = {
title: "云鹊小圈",
title: "云鹊专区",
icon: "el-icon-setting",
index: "yq-range",
};
......@@ -534,7 +534,7 @@ export default {
};
const yqRange = {
title: "云鹊小圈",
title: "云鹊专区",
icon: "el-icon-setting",
index: "yq-range",
};
......
......@@ -177,7 +177,7 @@
placeholder="请选择疾病标签"
filterable
clearable
style="margin-left:20px;height: 32px;line-height: 32px;width: 450px;"
style="margin-left:20px;width: 450px;"
>
<el-option
v-for="item in diseaseList"
......@@ -199,7 +199,7 @@
placeholder="请选择科室标签"
filterable
clearable
style="margin-left:20px;height: 32px;line-height: 32px;width: 450px;"
style="margin-left:20px;width: 450px;"
>
<el-option
v-for="item in deptList"
......@@ -220,7 +220,7 @@
placeholder="请选择学科标签"
filterable
clearable
style="margin-left:20px;height: 32px;line-height: 32px;width: 450px;"
style="margin-left:20px;width: 450px;"
>
<el-option
v-for="item in subjectList"
......@@ -939,9 +939,6 @@
height: 32px;
line-height: 32px;
}
/*.el-select__tags {*/
/*margin-top: 15px;*/
/*}*/
.required-label .el-form-item__label::before {
content: '*';
color: #F56C6C;
......
......@@ -85,7 +85,7 @@ export default {
},
data() {
return {
curmbFirst: "云鹊小圈",
curmbFirst: "云鹊专区",
curmbThird: "设置管理员",
jumPathThird: '/yq-range',
circleId: "",
......@@ -153,7 +153,7 @@ export default {
vm = this;
this.circleId = this.$route.query.circleId;
this.circleName = this.$route.query.circleName;
this.curmbSecond = "圈子管理-" + this.circleName;
this.curmbSecond = "专区管理-" + this.circleName;
this.jumPathFouth = "/range-manage?id=" + this.circleId + "&name=" + this.circleName + "&activeName=first";
vm.circleId = vm.getUrlSearch(window.location.href, "circleId");
vm.formInline.blackStatus = 0 ;
......
......@@ -93,7 +93,7 @@ export default {
return {
circleId: 0,
curmbFirst: "云鹊小圈",
curmbFirst: "云鹊专区",
curmbSecond: "",
curmbThird: "黑名单",
jumPathThird: "/yq-range",
......@@ -116,7 +116,7 @@ export default {
this.circleId = this.$route.query.circleId;
this.idType = localStorage.getItem("storageIdType");
this.circleName = this.$route.query.circleName;
this.curmbSecond = "圈子管理-" + this.circleName;
this.curmbSecond = "专区管理-" + this.circleName;
this.jumPathFouth =
"/range-manage?id=" +
this.circleId +
......
......@@ -619,7 +619,7 @@
rtcId: '',
circleId: '',
circleName: "",
curmbFirst: '云鹊小圈',
curmbFirst: '云鹊专区',
// curmbSecond: '直播管理',
curmbThird: '新建直播',// /live-manage?id=
jumPathThird: '/yq-range',
......@@ -836,7 +836,7 @@
// this.idType = 1; // TODO
this.circleId = this.$route.query.circleId;
this.circleName = this.$route.query.circleName;
this.curmbSecond = "圈子管理-" + this.circleName;
this.curmbSecond = "专区管理-" + this.circleName;
this.jumPathFouth = "/range-manage?id=" + this.circleId + "&name=" + this.circleName + "&activeName=third";
this.formData.circleId = this.circleId;
console.log("create-live: jumPathFouth: " + this.jumPathFouth);
......
......@@ -63,7 +63,7 @@
return {
id: null,
enterType: 1,//1.creat 2.edit
curmbFirst: '云鹊小圈',
curmbFirst: '云鹊专区',
curmbSecond: '新建小圈',
active: 0,
//页面展示位置
......
......@@ -300,7 +300,7 @@ export default {
data() {
return {
rtcId: null,
curmbFirst: "云鹊小圈",
curmbFirst: "云鹊专区",
curmbSecond: "直播管理",
dialogStatisticsVisible: false,
dialogLivelinkVisible: false,
......
......@@ -64,8 +64,8 @@ export default {
data(){
return{
curmbFirst: '云鹊小圈',
curmbSecond: '圈子管理',
curmbFirst: '云鹊专区',
curmbSecond: '专区管理',
curmbThird: '',
jumPathFouth: "",
jumPathThird: '/yq-range',
......@@ -99,7 +99,7 @@ export default {
this.name = name;
this.activeName = activeName;
this.roleType = roleType;
this.curmbSecond = "圈子管理-" + name;
this.curmbSecond = "专区管理-" + name;
this.curmbThird = this.curmbSecond;
this.active = 0;
this.jumPathFouth = "/range-manage?id=" + this.circleId + "&name=" + this.name;
......
......@@ -2,7 +2,7 @@
<div class="yqrange-index-wrapper">
<!--<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>-->
<div class="yqrange-index-content" id="screenSet">
<!--<div class="header-title">云鹊小圈</div>-->
<!--<div class="header-title">云鹊专区</div>-->
<!-- <el-form ref="settingForm" :model="settingForm"
label-width="150px"
......@@ -25,7 +25,7 @@
<el-table :data="settingForm.settingData" class="customer-table" style="margin-left:70px;"
:header-cell-style="{background:'#ffffff'}">
<el-table-column label="" prop="appType" width="120"></el-table-column>
<el-table-column label="" prop="appType" width="150"></el-table-column>
<el-table-column label="" width="180">
<template slot-scope="scope">
<el-radio-group size="small" v-model="scope.row.showOff">
......@@ -39,13 +39,39 @@
<el-input v-model="scope.row.appName" style="width:120px;" :maxlength="6" size="small" placeholder="重命名"/>
</template>
</el-table-column>
<el-table-column label="序号" width="200">
<el-table-column label="序号" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.seqNo" style="width:60px;" size="small" @blur="BlurText($event)" @placeholder="序号"/>
</template>
</el-table-column>
<el-table-column label="选择积木页(仅支持图片搭建的积木页和跳转)" width="320">
<template slot-scope="scope">
<el-select filterable v-if="scope.row.appTag == 10" v-model="scope.row.appUrl" placeholder="请选择积木页" style="position: relative;width:75%;">
<el-option
style="position: relative;"
v-for="item2 in settingForm.activityList"
:key="item2.id"
:label="item2.title"
:value="item2.id">
</el-option>
</el-select>
<!-- <img v-if="scope.row.appTag == 10"-->
<!-- @click="add(scope.$index)"-->
<!-- class="edit-img"-->
<!-- src="../../assets/image/plus.png"-->
<!-- />-->
<!-- <img v-if="scope.row.appTag == 10 && count > 0"-->
<!-- @click="del(scope.$index, scope.row)"-->
<!-- class="edit-img"-->
<!-- src="../../assets/image/trash.png"-->
<!-- />-->
</template>
</el-table-column>
</el-table>
<div style="margin-top: 60px;margin-left: 150px;">
<el-button type="primary" @click="checkSubmitData()" center>保存</el-button>
<!--<el-button @click="cancle()">取 消</el-button>-->
......@@ -56,9 +82,10 @@
</template>
<script>
let vm = null;
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting} from "../../utils/yqrange/yqrangeApi";
import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting, getActivityList, delActivity} from "../../utils/yqrange/yqrangeApi";
import { isEmptyUtils } from "../../utils/index";
export default {
......@@ -67,7 +94,7 @@ export default {
},
data(){
return{
curmbFirst: '云鹊小圈',
curmbFirst: '云鹊专区',
showAllFlag: false,
showNewFlag: false,
searchForm: {
......@@ -84,13 +111,18 @@ export default {
dialogSettingVisible: false,
settingForm:{
circleId: null,
settingData: []
}
settingData: [],
activityList:[]
},
tempList: [],
count: 0,
}
},
created() {
vm = this;
this.circleId = this.$route.query.id;
this.setting();
this.initActivityList();
},
methods: {
......@@ -98,13 +130,42 @@ export default {
setting(){
let params = {
circleId: this.circleId
// circleId: 22
// circleId: 194
}
getCircleSettingList(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.settingForm.settingData = res.data;
if(this.settingForm.settingData != null
&& this.settingForm.settingData.length > 0){
for (let i = 0; i<this.settingForm.settingData.length; i++){
// 自定义积木
if(this.settingForm.settingData[i].appTag == 10){
this.count ++;
if(this.settingForm.settingData[i].appUrl != ""){
this.settingForm.settingData[i].appUrl = parseInt(this.settingForm.settingData[i].appUrl);
}
}
}
this.count --;
let tempList = this.settingForm.settingData.filter(function (item) {
return item.appTag == 10;
});
if(tempList.length == 0){
let row = {
appName: "",
appTag: 10,
appType: "自定义H5积木页",
appUrl: "",
ecoAppParams: [],
id: "",
seqNo: this.settingForm.settingData.length + 1,
showOff: 0,
}
this.settingForm.settingData.push(row);
}
}
} else {
this.settingForm.settingData = [];
}
......@@ -116,7 +177,7 @@ export default {
checkSubmitData() {
for(let i=0; i<this.settingForm.settingData.length; i++) {
if (isEmptyUtils(this.settingForm.settingData[i].appName)) {
if (this.settingForm.settingData[i].showOff == 1 && isEmptyUtils(this.settingForm.settingData[i].appName)) {
this.$message.error("重命名输入框中的值不可为空,请检查");
return;
}
......@@ -124,12 +185,20 @@ export default {
this.$message.error("序号不可为空,请检查");
return;
}
if (this.settingForm.settingData[i].showOff == 1
&& this.settingForm.settingData[i].appTag == 10
&& isEmptyUtils(this.settingForm.settingData[i].appUrl)) {
this.$message.error("请选择积木页");
return;
}
const r = /^\+?[1-9][0-9]*$/; // 正整数
// 如果判断不符合正则,则不是正整数不能提交
if (!r.test(this.settingForm.settingData[i].seqNo)) {
this.$message.error("序号应为正整数,请检查");
return;
}
if (this.settingForm.settingData[i].seqNo < 1 || this.settingForm.settingData[i].seqNo > 10) {
this.$message.error('请输入 1~10 的正整数');
return;
}
if (this.settingForm.settingData[i].seqNo > this.settingForm.settingData.length) {
......@@ -182,7 +251,107 @@ export default {
this.$message.warning('请输入 1~10 的正整数')
e.target.value = ''
}
},
// 应用配置
initActivityList(){
let params = {
// circleId: this.circleId
id: "",
title: "",
publishFlag: 5,
createdTime: "",
pageNo: 1,
pageSize: 20000
}
getActivityList(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.settingForm.activityList = res.data.templateList;
} else {
this.settingForm.activityList = [];
}
}).catch((error) => {
this.$message.error("请重试");
})
},
indexMethod(index){
this.index = index;
},
add(index){
if(this.settingForm.settingData != null && this.settingForm.settingData.length > 0 ){
this.tempList = this.settingForm.settingData.filter(function (item) {
return item.appTag == 10;
});
if(this.tempList.length > 0){
this.row = {
appName: "",
appTag: 10,
appType: this.tempList[0].appType,
appUrl: "",
ecoAppParams: [],
id: "",
seqNo: index+2,
showOff: 0,
}
this.count ++;
this.settingForm.settingData.push(this.row);
}
}
},
del(index, row){
let params = {
circleId: this.circleId,
id: row.id
}
vm.$confirm(`确定删除“${row.appName}”吗?`, "", {
confirmButtonText: "删除",
cancelButtonText: "取消",
type: "warning"
// customClass: 'range-make-box',
})
.then(() => {
if (params.id == "") {
vm.$message({
type: "success",
message: "删除成功"
});
vm.count--;
vm.settingForm.settingData.splice(index, 1);
} else {
// confirm
delActivity(params).then(res => {
if (res.code == "000000") {
vm.$message({
type: "success",
message: "删除成功"
});
vm.count--;
vm.settingForm.settingData.splice(index, 1);
} else {
vm.$message({
type: "warning",
message: res.message
});
}
});
}
})
.catch(() => {});
},
activityColor({row, column, rowIndex, columnIndex}){
return "activity-color";
}
},
}
</script>
......@@ -257,4 +426,10 @@ export default {
.el-table--border th.gutter:last-of-type {
width: 0;
}
.el-select-dropdown {
width: 300px;
}
.el-table .activity-color {
color: #EC808D;
}
</style>
......@@ -120,7 +120,7 @@ export default {
vm = this;
return {
curmbFirst: "云鹊小圈",
curmbFirst: "云鹊专区",
curmbSecond: "成员管理",
searchForm: {
searchName: "",
......
......@@ -3,7 +3,7 @@
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="yqrange-index-content screenSet">
<el-tabs v-model="activeName" @tab-click="tabChangeHandler">
<el-tab-pane label="云鹊小圈" name="first">
<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">
......@@ -163,7 +163,7 @@ export default {
},
data(){
return{
curmbFirst: '云鹊小圈',
curmbFirst: '云鹊专区',
activeName: 'first',
showAllFlag: false,
showNewFlag: false,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册