Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
84ba7c43
提交
84ba7c43
编写于
11月 12, 2020
作者:
tao.wu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev_sales_return_1110' into dev-check-serve-20201103
上级
0c488269
259ba0be
变更
16
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
2405 行增加
和
537 行删除
+2405
-537
package-lock.json
package-lock.json
+34
-16
ads-manage.vue
src/components/yqrange/ads-manage.vue
+772
-0
gp-ranking.vue
src/components/yqrange/gp-ranking.vue
+687
-0
env-config.js
src/utils-o/env-config.js
+6
-0
fetch.js
src/utils-o/fetch.js
+1
-1
cmeApi.js
src/utils/cme/cmeApi.js
+16
-0
yqrangeApi.js
src/utils/yqrange/yqrangeApi.js
+104
-0
create-good.vue
src/views/goods/create-good.vue
+11
-0
goods-manage.vue
src/views/goods/goods-manage.vue
+17
-6
order-manage.vue
src/views/goods/order-manage.vue
+37
-3
slidebar.vue
src/views/layout/slidebar.vue
+618
-498
create-shop.vue
src/views/shop/create-shop.vue
+1
-0
create-live.vue
src/views/yqrange/create-live.vue
+70
-5
range-manage.vue
src/views/yqrange/range-manage.vue
+14
-1
range-setting.vue
src/views/yqrange/range-setting.vue
+10
-1
yq-range.vue
src/views/yqrange/yq-range.vue
+7
-6
未找到文件。
package-lock.json
浏览文件 @
84ba7c43
...
...
@@ -2803,10 +2803,6 @@
"loader-utils"
:
"~0.2.5"
}
},
"file-saver"
:
{
"version"
:
"github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e"
,
"from"
:
"github:eligrey/FileSaver.js#1.3.8"
},
"filename-regex"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz"
,
...
...
@@ -2961,7 +2957,8 @@
"ansi-regex"
:
{
"version"
:
"2.1.1"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"aproba"
:
{
"version"
:
"1.2.0"
,
...
...
@@ -2982,12 +2979,14 @@
"balanced-match"
:
{
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"brace-expansion"
:
{
"version"
:
"1.1.11"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"balanced-match"
:
"^1.0.0"
,
"concat-map"
:
"0.0.1"
...
...
@@ -3002,17 +3001,20 @@
"code-point-at"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"concat-map"
:
{
"version"
:
"0.0.1"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"console-control-strings"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"core-util-is"
:
{
"version"
:
"1.0.2"
,
...
...
@@ -3129,7 +3131,8 @@
"inherits"
:
{
"version"
:
"2.0.3"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"ini"
:
{
"version"
:
"1.3.5"
,
...
...
@@ -3141,6 +3144,7 @@
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"number-is-nan"
:
"^1.0.0"
}
...
...
@@ -3155,6 +3159,7 @@
"version"
:
"3.0.4"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"brace-expansion"
:
"^1.1.7"
}
...
...
@@ -3162,12 +3167,14 @@
"minimist"
:
{
"version"
:
"0.0.8"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"minipass"
:
{
"version"
:
"2.2.4"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"safe-buffer"
:
"^5.1.1"
,
"yallist"
:
"^3.0.0"
...
...
@@ -3186,6 +3193,7 @@
"version"
:
"0.5.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"minimist"
:
"0.0.8"
}
...
...
@@ -3266,7 +3274,8 @@
"number-is-nan"
:
{
"version"
:
"1.0.1"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"object-assign"
:
{
"version"
:
"4.1.1"
,
...
...
@@ -3278,6 +3287,7 @@
"version"
:
"1.4.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"wrappy"
:
"1"
}
...
...
@@ -3363,7 +3373,8 @@
"safe-buffer"
:
{
"version"
:
"5.1.1"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"safer-buffer"
:
{
"version"
:
"2.1.2"
,
...
...
@@ -3399,6 +3410,7 @@
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"code-point-at"
:
"^1.0.0"
,
"is-fullwidth-code-point"
:
"^1.0.0"
,
...
...
@@ -3418,6 +3430,7 @@
"version"
:
"3.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-regex"
:
"^2.0.0"
}
...
...
@@ -3461,12 +3474,14 @@
"wrappy"
:
{
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"yallist"
:
{
"version"
:
"3.0.2"
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
}
}
},
...
...
@@ -4448,7 +4463,6 @@
"integrity"
:
"sha512-J9X76xnncMw+wIqb15HeWfPMqPwYxSpPY8yWPJ7rAZN/ZDzFkjCSZObryCyUe8zbrVRNiuCnIeQteCzMn7GnWw=="
,
"requires"
:
{
"canvg"
:
"1.5.3"
,
"file-saver"
:
"github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e"
,
"html2canvas"
:
"1.0.0-alpha.12"
,
"omggif"
:
"1.0.7"
,
"promise-polyfill"
:
"8.1.0"
,
...
...
@@ -4468,6 +4482,10 @@
"base64-arraybuffer"
:
"^0.1.5"
}
},
"file-saver"
:
{
"version"
:
"github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e"
,
"from"
:
"github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e"
},
"html2canvas"
:
{
"version"
:
"1.0.0-alpha.12"
,
"resolved"
:
"https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-alpha.12.tgz"
,
...
...
src/components/yqrange/ads-manage.vue
0 → 100644
浏览文件 @
84ba7c43
<
template
>
<el-form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-width=
"150px"
label-suffix=
":"
class=
"basic-form"
>
<el-form-item
label=
"是否显示广告位"
class=
"required-label"
>
<el-radio-group
v-model=
"formData.adShowFlag"
@
change=
"changeAdShow"
size=
"small"
class=
"required-label"
>
<el-radio
:label=
"0"
>
否
</el-radio>
<el-radio
:label=
"1"
>
是
</el-radio>
</el-radio-group>
</el-form-item>
<div
class=
"basic-item-icon"
v-if=
"formData.adShowFlag == 1"
>
<el-form-item
label=
"图片"
class=
"required-label"
>
<el-upload
v-model=
"formData.adImageUrl"
class=
"bg-uploader"
action=
"#"
:show-file-list=
"false"
:before-upload=
"beforeUploadPic1"
>
<img
v-if=
"formData.adImageUrl"
:src=
"formData.adImageUrl"
@
mouseover
.
stop=
"imgMouseOver1=true"
class=
"bg-img"
/>
<img
v-if=
"!formData.adImageUrl"
class=
"bg-img"
src=
"../../assets/image/small.png"
/>
<div
class=
"img-delete"
v-show=
"imgMouseOver1"
@
click
.
stop=
"deleteImg(1)"
@
mouseout
.
stop=
"imgMouseOver1=false"
>
<i
class=
"el-icon-delete"
></i>
</div>
<div
class=
"limit-text"
>
<p>
限制大小: 500kb
</p>
<p>
最小尺寸:690*120
</p>
<p>
支持jpeg, png格式
</p>
</div>
</el-upload>
</el-form-item>
<p
class=
"upload-message"
v-if=
"uploadImgMessage1"
>
请选择图片
</p>
</div>
<el-form-item
label=
"链接类型"
class=
"required-label"
v-if=
"formData.adShowFlag == 1"
>
<el-col
:span=
"18"
>
<el-select
v-model=
"formData.adModuleDto.linkType"
placeholder=
"请选择链接类型"
style=
"width:88%"
>
<el-option
v-for=
"item1 in linkSelect"
:key=
"item1.value"
:label=
"item1.label"
:value=
"item1.value"
>
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item
label=
"选择模块"
v-if=
"formData.adShowFlag == 1 && formData.adModuleDto.linkType == 4"
class=
"required-label"
>
<el-col
:span=
"18"
>
<el-select
filterable
v-model=
"formData.adModuleDto.name"
@
change=
"moduleChange"
placeholder=
"请选择模块"
style=
"width:88%"
>
<el-option
v-for=
"item2 in moduleArray.nameList"
:key=
"item2.id"
:label=
"item2.name"
:value=
"item2.name"
>
</el-option>
</el-select>
</el-col>
</el-form-item>
<div
v-for=
"(i,j) in formData.adModuleDto.paramList2"
:key=
"j"
class=
"required-label"
v-if=
"formData.adShowFlag == 1 && formData.adModuleDto.linkType == 4"
>
<el-form-item
label=
"选择参数"
v-if=
"formData.adModuleDto.paramFlag == 1"
>
<el-col
:span=
"18"
>
<el-select
v-model=
"formData.adModuleDto.paramList[j].value"
filterable
placeholder=
"请选择参数"
style=
"width:88%"
>
<el-option
v-for=
"(item3,index3) in i"
:key=
"index3"
:label=
"item3.name"
:value=
"item3.id + '&'+ item3.name"
>
</el-option>
</el-select>
</el-col>
</el-form-item>
</div>
<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=
"图片裁剪"
:visible
.
sync=
"showCropper"
:width=
"currentOption.cropDialogWidth"
center
>
<div
slot=
"title"
style=
"text-align: left;"
>
<span
style=
"font-weight: 700;"
>
图片裁剪
</span>
</div>
<div
v-if=
"showCropper"
style=
"margin-bottom: 20px;"
>
<Cropper
:cropOption=
"currentOption"
@
getCropImg=
"getCropImg(arguments)"
:originImg=
"slide2.oriUrl"
/>
</div>
</el-dialog>
</el-form>
</
template
>
<
script
>
let
vm
=
null
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
{
getCircleAds
,
saveCircleAds
,
getLinkType
,
getParamData
,
getModuleData
}
from
"../../utils/yqrange/yqrangeApi"
;
import
Cropper
from
'@/components/common/cropper.vue'
export
default
{
components
:
{
Cropper
},
created
()
{
vm
=
this
;
console
.
log
(
"circleId: "
+
this
.
$route
.
query
.
id
);
// const mobilePhone = localStorage.getItem("mobilePhone");
//
// if(mobilePhone == "13341740525" || mobilePhone == "18251938586"){
// this.deptFlag = true;
// }
// else {
// this.deptFlag = false;
// }
vm
.
getAds
();
vm
.
getLinkType
();
},
data
()
{
let
checkProjectStr
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
indexOf
(
"
\
\"
) != -1) {
//存在
callback(new Error("
请勿输入字符“
\\
”
"));
} else if (value.indexOf("
.
") != -1) {
callback(new Error("
请勿输入字符“
.
”
"));
} else {
callback();
}
};
return {
showCropper: false,
moduleArray: [],
formData: {
circleId: this.$route.query.id,
adShowFlag: 0,
adImageUrl: "",
adModuleDto: {
linkType: 8, // 跳转类型:1 链接,4 模块, 8 无跳转
name: "", // 模块名称
paramFlag: 0, // 是否有参数标志1为有2为没有参数
paramList: [
{
id: "",
seqNo: '', // 选择参数的索引值
value: '',
key: '', // 参数名称,默认param
type:'' // 模块参数类型:1 int类型字符串 4String类型 8时间戳类型字符串
}
],
paramList2: [],
type: 0 // 类型:1 列表页,4 详情页
}
},
linkSelect: [], // 连接类型数组
currentOption: {
offset_x: 120,
offset_y: 185,
width: 160,
height: 120,
cvWidth: 1000,
cvHeight: 800,
uploadType: 1,
cropDialogWidth: '900px',
cropBoxResizable: true,
minCropBoxWidth: 100,
minCropBoxHeight: 100,
aspectRatio: 16/9
},
slide2: {
oriUrl: '', // 原图
},
rules: {
name: [
{ required: true, message: "
请输入圈子名称
", trigger: "
blur
" },
{
min: 2,
max: 14,
message: "
输入长度为
2
-
14
的内容,可包含中英文、数字及特殊符号
",
trigger: "
blur
"
},
{ validator: checkProjectStr, trigger: "
blur
" }
],
introduce: [
{ required: true, message: "
请输入圈子介绍
", trigger: "
blur
" },
{
min: 2,
max: 40,
message: "
输入长度为
2
-
40
的内容,可包含中英文、数字及特殊符号
",
trigger: "
blur
"
},
{ validator: checkProjectStr, trigger: "
blur
" }
],
adImageUrl: [
{ required: true, message: "
请选择图片
", trigger: "
blur
" }
],
dynamicFlag: [
{ required: true, message: "
请选择内容发布权限
", trigger: "
blur
" },
],
type: [
{ required: true, message: "
请选择圈子类型
", trigger: "
blur
" },
],
deptId: [
{ required: true, message: "
请选择对接部门
", trigger: "
blur
" }
]
},
imgMouseOver1: false,
uploadImgMessage1: false,//未上传图片,校验提示语
contentList: [
{
value: 1,
label: '所有人可发布'
}, {
value: 2,
label: '管理员可发布'
},
],
deptList: [
{
value: 1,
label: '铁军部'
}, {
value: 2,
label: '医疗事业部'
},{
value: 3,
label: '商业化部'
},
],
deptFlag: false,
shareFlag: false
}
},
methods: {
getAds(){
let req = {
circleId: vm.formData.circleId
};
getCircleAds(req).then(function (res) {
if(res.code == "
000000
") {
vm.formData = res.data;
if(vm.formData.adModuleDto == null){
vm.formData.adModuleDto = {
linkType: 8, // 跳转类型:1 链接,4 模块, 8 无跳转
name: "", // 模块名称
paramFlag: 0, // 是否有参数标志1为有2为没有参数
paramList: [
{
id: "",
seqNo: '', // 选择参数的索引值
value: '',
key: '', // 参数名称,默认param
type:'' // 模块参数类型:1 int类型字符串 4String类型 8时间戳类型字符串
}
],
paramList2: [],
type: 0 // 类型:1 列表页,4 详情页
}
}
vm.getModuleData();
}
}).catch(function (error) {
vm.$message.error(error);
});
},
checkAdImagUrl(){
if(vm.formData.adShowFlag == 1 && vm.formData.adImageUrl == ""){
vm.$message.error("
请上传图片!
");
return false;
}
else {
return true;
}
},
save(){
let req = vm.formData;
if(vm.formData.adShowFlag == 0){
vm.formData.adImageUrl = "";
vm.formData.adModuleDto = null;
}
else {
if(!vm.checkAdImagUrl()){
return;
}
if(!vm.checkName()){
return;
}
if(!vm.checkParamList()){
return;
}
}
saveCircleAds(req).then(function (res) {
if(res.code == "
000000
") {
vm.$message.success("
保存成功!
");
// vm.formData = res.data;
}
}).catch(function (error) {
vm.$message.error(error);
});
},
//上传圈子头像
beforeUploadPic1(file) {
// this.currentOption.aspectRatio = 1/1;
// this.currentOption.cropBoxResizable = true;
// this.currentOption.minCropBoxWidth = 160;
// this.currentOption.minCropBoxHeight = 160;
let fileLimit = {
width: 690,
height: 120,
size: 0.5,
sizeText: "
500
K
",
key: "
adImageUrl
",
more: "
imgUrl1More
",
show: "
uploadImgMessage1
"
};
this.beforeUpload(file, fileLimit);
},
//上传图片
beforeUpload(file, fileLimit) {
let vm = this;
const isJPG = file.type === "
image
/
jpeg
";
const isPNG = file.type === "
image
/
png
";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (!isJPG && !isPNG) {
vm.$message.error("
图片必须是
jpeg
或
png
格式,同时长宽尺寸和图片大小需符合要求
");
// return;
}
// if (!isLt2M) {
// vm.$message.error("
图片大小不符合规范,请根据规范上传图片
");
// return;
// }
let _img = new FileReader();
_img.readAsDataURL(file);
_img.onload = function (theFile) {
let image = new Image()
image.src = theFile.target.result
vm.slide2.oriUrl = theFile.target.result;
image.onload = function () {
let _this = this;
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
vm.$message.error("
图片必须是
jpeg
或
png
格式,同时长宽尺寸和图片大小需符合要求
");
return;
}
// else if(_this.width > fileLimit.width || _this.height > fileLimit.height){
// vm.showCropper = true;
// vm.currentOption.cvWidth = _this.width;
// vm.currentOption.cvHeight = _this.height;
// return;
// }
else {
openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "
preview4
", "
progress1
", 1).then(function (path) {
closeLoading(vm);
console.log('上传成功后路径', path);
if (fileLimit.show == "
uploadImgMessage1
") {
vm.uploadImgMessage1 = false;
} else if (fileLimit.show == "
uploadImgMessage2
") {
vm.uploadImgMessage2 = false;
}
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.more] = {
attachmentName: path.name,
attachmentExt: path.ext,
attachmentSize: path.size
};
vm.$message.success("
上传成功
");
});
}
};
};
return isJPG && isLt2M;
},
//删除图片
deleteImg(type) {
if (type == 1) {
vm.formData.adImageUrl = "";
vm.imgMouseOver1 = false;
}
},
// 获取裁剪的图片数据
getCropImg(argument) {
this.showCropper = false;
this.cropData = argument[1]
vm.doUploadQiNiu(argument[2])
argument[3] && argument[3].destroy();
// vm.slide2.oriUrl = "";
},
// 上传七牛
doUploadQiNiu(file){
doUpload(this,file, getFilePath(file,null), 'preview4', 'uploadProgress1', '').then(function (path) {
vm.formData.adImageUrl = path.fullPath;
vm.$message.success('上传成功');
});
},
cancle(){
const _this = this;
setTimeout(function () {
_this.$router.go(-1)
}, 100);
},
changeType(){
if(vm.formData.type == 1 || vm.formData.type == 2){
vm.shareFlag = true;
}
else {
vm.shareFlag = false;
}
},
// 获取链接类型下拉数据
getLinkType() {
let req = {
code: 'C005'
};
getLinkType(req).then(function (res) {
if(res.code == "
000000
") {
let linkObject = JSON.parse(JSON.stringify(res.data)) //通过这个实现深拷贝
let keys = Object.keys(linkObject)
for(let i = 0; i < keys.length; i++) {
vm.linkSelect.push({
label: linkObject[keys[i]],
value: keys[i] - 0
})
}
}
}).catch(function (error) {
vm.$message.error(error);
});
},
// 获取模块下拉数据
getModuleData() {
getModuleData().then(function (res) {
if(res.code == "
000000
") {
vm.moduleArray = JSON.parse(JSON.stringify(res.data));
for(let j = 0;j < vm.moduleArray.nameList.length; j++) {
if(vm.formData.adModuleDto.name == vm.moduleArray.nameList[j].name){// 通过name找到对应的id
vm.getParamData(vm.moduleArray.nameList[j].id,vm.formData.adModuleDto.paramFlag,j,1)
}
}
}
}).catch(function (error) {
vm.$message.error(error);
});
},
// 获取参数下拉数据
getParamData(id,flag,index,a) {
if(flag != 1) return; // 判断是否有参数选择
let req = {
id: id
}
getParamData(req).then(function (res) {
if(res.code == "
000000
") {
vm.paramArray = res.data.paramList;
vm.paramConfig = res.data.config;
// for(let i=0;i<vm.tabContent.length;i++) {
// if(i == index) {
vm.formData.adModuleDto.paramFlag = 1
vm.formData.adModuleDto.paramList2 = vm.paramArray
if(a == 2) { // 判断是初始化还是改变module调的获取参数接口
vm.formData.adModuleDto.paramList = [];
for(let j = 0 ;j < vm.paramArray.length; j++) {
vm.formData.adModuleDto.paramList.push({
id: vm.paramConfig[j].id,
seqNo: vm.paramConfig[j].seqNo, // 选择参数的索引值
value: '',
key: vm.paramConfig[j].paramKey,
type: vm.paramConfig[j].type // 通过选择参数中获取
// status: 2
})
}
}else{
//for(let k = 0;k < vm.paramConfig.length; k++) {
// vm.formData.paramList[k].seqNo = vm.paramConfig[k].seqNo
// vm.formData.paramList[k].key = vm.paramConfig[k].paramKey
// vm.formData.paramList[k].type = vm.paramConfig[k].type
// vm.formData.paramList.push({
// seqNo: vm.paramConfig[k].seqNo,
// key: vm.paramConfig[k].paramKey,
// type: vm.paramConfig[k].type
// })
let arr = vm.formData.adModuleDto.paramList;
vm.formData.adModuleDto.paramList = [];
if(arr.length < vm.paramConfig.length) {
for(let k = 0;k < arr.length; k++) {
vm.formData.adModuleDto.paramList.push({
id: vm.paramConfig[k].id,
seqNo: vm.paramConfig[k].seqNo,
key: vm.paramConfig[k].paramKey,
type: vm.paramConfig[k].type,
value: arr[k].value
})
}
for(let j = arr.length;j < vm.paramConfig.length;j++) {
vm.formData.adModuleDto.paramList.push({
id: vm.paramConfig[j].id,
seqNo: vm.paramConfig[j].seqNo,
key: vm.paramConfig[j].paramKey,
type: vm.paramConfig[j].type,
value: ''
})
}
}else {
for(let k = 0;k < vm.paramConfig.length; k++) {
console.log("
id
:
" + vm.paramConfig[k].id);
console.log("
value
:
" + arr[k].value);
vm.formData.adModuleDto.paramList.push({
id: vm.paramConfig[k].id,
seqNo: vm.paramConfig[k].seqNo,
key: vm.paramConfig[k].paramKey,
type: vm.paramConfig[k].type,
value: arr[k].value
})
}
}
// }
}
// break
// }
// }
}
}).catch(function (error) {
vm.$message.error(error);
})
},
// change链接类型
selectLink(value) {
// if(value == 8) {
// for(let k = 0; k < vm.tabContent.length; k++) {
// if(vm.linkIndexValue == k) {
// vm.formData.adModuleDto.name = ""
// vm.formData.adModuleDto.paramFlag = 2
// }
// }
// }
},
linkIndex(index) {
vm.linkIndexValue = index
},
// change模块选择数据
moduleChange(value) {
for(let i = 0; i < vm.moduleArray.nameList.length; i++) {
if(value == vm.moduleArray.nameList[i].name) {
vm.getCodeAndType(vm.moduleArray.nameList[i].code,vm.moduleArray.nameList[i].type,vm.moduleArray.nameList[i].paramFlag)
vm.getParamData(vm.moduleArray.nameList[i].id,vm.moduleArray.nameList[i].paramFlag,vm.moduleIndexValue,2)
}
}
},
moduleIndex(index) {
vm.moduleIndexValue = index
},
getCodeAndType(code,type,paramFlag) {
// for(let i = 0; i < vm.tabContent.length; i++) {
// if(vm.moduleIndexValue == i) {
vm.formData.adModuleDto.code = code
vm.formData.adModuleDto.type = type
vm.formData.adModuleDto.paramFlag = paramFlag
// }
// }
},
checkName(){
if(vm.formData.adModuleDto.linkType == 4 && vm.formData.adModuleDto.name == ""){
vm.$message.error("
请选择模块!
");
return false;
}
else {
return true;
}
},
checkParamList(){
if(vm.formData.adModuleDto.linkType == 4
&& vm.formData.adModuleDto.name != ""
&& vm.formData.adModuleDto.paramFlag == 1){
if(vm.formData.adModuleDto.paramList.length == 0){
vm.$message.error("
请选择参数!
");
return false;
}
else {
for(let i = 0; i < vm.formData.adModuleDto.paramList.length; i++){
if(vm.formData.adModuleDto.paramList[i].value == ""){
vm.$message.error("
请选择参数!
");
return false;
}
}
}
return true;
}
else {
return true;
}
},
changeAdShow(){
if(vm.formData.adShowFlag == 1 && vm.formData.adModuleDto == null){
vm.formData.adModuleDto = {
linkType: 8, // 跳转类型:1 链接,4 模块, 8 无跳转
name: "", // 模块名称
paramFlag: 0, // 是否有参数标志1为有2为没有参数
paramList: [
{
id: "",
seqNo: '', // 选择参数的索引值
value: '',
key: '', // 参数名称,默认param
type:'' // 模块参数类型:1 int类型字符串 4String类型 8时间戳类型字符串
}
],
paramList2: [],
type: 0 // 类型:1 列表页,4 详情页
};
}
}
}
}
</
script
>
<
style
lang=
"less"
>
.p-title {
padding-left: 10px;
margin-bottom: 15px;
}
.basic-item-icon {
position: relative;
.require {
position: absolute;
left: 67px;
top: 11px;
color: #f56c6c;
}
.upload-message {
position: absolute;
left: 160px;
top: 105px;
font-size: 12px;
color: #f56c6c;
}
.img-delete {
position: absolute;
left: 0px;
top: 0px;
width: 84px;
height: 100px;
background: #000;
opacity: 0.7;
z-index: 999;
i {
color: #fff;
margin-top: 39px;
margin-left: 0px;
}
}
}
.word-num {
font-size: 12px;
color: #999;
padding-top: 5px;
}
.line {
margin-left: 10px;
width: 20px;
}
.bg-uploader {
.bg-img {
float: left;
width: 84px;
height: 100px;
}
.limit-text {
float: left;
margin-left: 10px;
margin-top: -10px;
p {
font-size: 12px;
color: #999;
text-align: left;
}
}
}
.el-upload__tip {
position: absolute;
top: -6px;
left: 130px;
}
.required-label .el-form-item__label::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
.label-type {
width: 100%;
margin-top: 10px;
}
</
style
>
src/components/yqrange/gp-ranking.vue
0 → 100644
浏览文件 @
84ba7c43
<
template
>
<el-form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-width=
"150px"
label-suffix=
":"
class=
"basic-form"
>
<el-form-item
label=
"显示排行榜"
class=
"required-label"
>
<el-radio-group
v-model=
"formData.rankShowFlag"
size=
"small"
class=
"required-label"
@
change=
"changeRankShow"
>
<el-radio
:label=
"0"
>
关闭
</el-radio>
<el-radio
:label=
"1"
>
开启
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"最多上榜人数"
class=
"required-label"
>
<el-radio-group
v-model=
"formData.maxQuantity"
size=
"small"
class=
"required-label"
>
<el-radio
:label=
"50"
:disabled=
"styleEditFlag"
></el-radio>
<el-radio
:label=
"100"
:disabled=
"styleEditFlag"
></el-radio>
<el-radio
:label=
"200"
:disabled=
"styleEditFlag"
></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"榜单类型"
class=
"required-label"
>
<el-checkbox-group
v-model=
"rankTypeList"
@
change=
"changeRankType"
>
<!--
<el-checkbox
size=
"small"
:label=
"1"
>
本院排行
</el-checkbox>
-->
<!--
<el-checkbox
size=
"small"
:label=
"3"
>
本市排行
</el-checkbox>
-->
<!--
<el-checkbox
size=
"small"
:label=
"5"
>
本圈排行
</el-checkbox>
-->
<el-checkbox
:disabled=
"styleEditFlag"
v-for=
"item in selectedRankTypeList"
:key=
"item.id"
:label=
"item.id"
>
{{
item
.
name
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
label=
"显示规则"
class=
"required-label"
>
<el-radio-group
v-model=
"formData.ruleShowFlag"
size=
"small"
class=
"required-label"
>
<el-radio
:label=
"0"
:disabled=
"styleEditFlag"
>
关闭
</el-radio>
<el-radio
:label=
"1"
:disabled=
"styleEditFlag"
>
开启
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"规则跳转模块"
v-if=
"formData.ruleShowFlag == 1"
class=
"required-label"
>
<el-col
:span=
"18"
>
<el-select
filterable
:disabled=
"styleEditFlag"
v-model=
"formData.rankModule.name"
@
change=
"moduleChange"
placeholder=
"请选择模块"
style=
"width:88%"
>
<el-option
v-for=
"item2 in moduleArray.nameList"
:key=
"item2.id"
:label=
"item2.name"
:value=
"item2.name"
>
</el-option>
</el-select>
</el-col>
</el-form-item>
<div
v-for=
"(i,j) in formData.rankModule.paramList2"
:key=
"j"
class=
"required-label"
v-if=
"formData.ruleShowFlag == 1"
>
<el-form-item
label=
"选择参数"
v-if=
"formData.rankModule.paramFlag == 1"
>
<el-col
:span=
"18"
>
<el-select
:disabled=
"styleEditFlag"
v-model=
"formData.rankModule.paramList[j].value"
filterable
placeholder=
"请选择参数"
style=
"width:88%"
>
<el-option
v-for=
"(item3,index3) in i"
:key=
"index3"
:label=
"item3.name"
:value=
"item3.id + '&'+ item3.name"
>
</el-option>
</el-select>
</el-col>
</el-form-item>
</div>
<el-form-item
label=
"不参与排行的成员"
>
<div
v-for=
"(item, index) in mobilePhonesArray"
:key=
"index"
>
<el-row>
<el-col
:span=
"10"
>
<el-input
maxlength=
"11"
size=
"small"
v-model=
"item.value"
placeholder=
"请输入手机号"
style=
"width:85%;"
type=
"text"
:disabled=
"styleEditFlag"
></el-input>
</el-col>
<el-col
:span=
"2"
style=
"margin-top: 9px;"
v-if=
"!styleEditFlag"
>
<img
@
click=
"addPhone(index)"
class=
"edit-img"
src=
"../../assets/image/plus.png"
/>
<img
@
click=
"delPhone(index)"
v-if=
"index >= 1"
class=
"edit-img"
src=
"../../assets/image/trash.png"
/>
</el-col>
</el-row>
</div>
</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-form>
</
template
>
<
script
>
let
vm
=
null
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
{
getParamData
,
getModuleData
,
getRankConfig
,
saveRankConfig
}
from
"../../utils/yqrange/yqrangeApi"
;
export
default
{
components
:
{
},
created
()
{
vm
=
this
;
// const mobilePhone = localStorage.getItem("mobilePhone");
//
// if(mobilePhone == "13341740525" || mobilePhone == "18251938586"){
// this.deptFlag = true;
// }
// else {
// this.deptFlag = false;
// }
vm
.
getRank
();
},
data
()
{
let
checkProjectStr
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
indexOf
(
"
\
\"
) != -1) {
//存在
callback(new Error("
请勿输入字符“
\\
”
"));
} else if (value.indexOf("
.
") != -1) {
callback(new Error("
请勿输入字符“
.
”
"));
} else {
callback();
}
};
return {
styleEditFlag: false,// 是否可以编辑
moduleArray: [],
rankTypeList:[],
mobilePhonesArray:[],
selectedRankTypeList:[{id: "", name: ""}],
formData: {
circleId: this.$route.query.id,
rankShowFlag: 0,
maxQuantity: 50,
orgRankFlag: 0,
cityRankFlag: 0,
groupRankFlag: 1,
ruleShowFlag: 0,
mobilePhones: [],
rankModule: {
linkType: 4, // 跳转类型:1 链接,4 模块, 8 无跳转
name: "", // 模块名称
paramFlag: 0, // 是否有参数标志1为有2为没有参数
paramList: [
{
id: "",
seqNo: '', // 选择参数的索引值
value: '',
key: '', // 参数名称,默认param
type:'' // 模块参数类型:1 int类型字符串 4String类型 8时间戳类型字符串
}
],
paramList2: [],
type: 0 // 类型:1 列表页,4 详情页
}
},
rules: {
},
imgMouseOver1: false,
uploadImgMessage1: false //未上传图片,校验提示语
}
},
methods: {
getRank(){
let req = {
circleId: vm.formData.circleId
};
getRankConfig(req).then(function (res) {
if(res.code == "
000000
") {
vm.formData = res.data;
if(vm.formData.rankShowFlag == 0){
vm.styleEditFlag = true;
}
else {
vm.styleEditFlag = false;
}
vm.selectedRankTypeList = new Array();
vm.rankTypeList = new Array();
vm.selectedRankTypeList.push({id: 1, name: "
本院排行
"});
vm.selectedRankTypeList.push({id: 3, name: "
本市排行
"});
vm.selectedRankTypeList.push({id: 5, name: "
本圈排行
"});
if(vm.formData.orgRankFlag == 1){
vm.rankTypeList.push(1);
}
// vm.rankTypeList.push(1);
if(vm.formData.cityRankFlag == 1){
vm.rankTypeList.push(3);
}
if(vm.formData.groupRankFlag == 1){
vm.rankTypeList.push(5);
}
if(vm.formData.rankModule == null){
vm.formData.rankModule = {
linkType: 4, // 跳转类型:1 链接,4 模块, 8 无跳转
name: "", // 模块名称
paramFlag: 0, // 是否有参数标志1为有2为没有参数
paramList: [
{
id: "",
seqNo: '', // 选择参数的索引值
value: '',
key: '', // 参数名称,默认param
type:'' // 模块参数类型:1 int类型字符串 4String类型 8时间戳类型字符串
}
],
paramList2: [],
type: 0 // 类型:1 列表页,4 详情页
}
}
if(vm.formData.mobilePhones == null || vm.formData.mobilePhones.length == 0){
vm.formData.mobilePhones = [{}];
vm.mobilePhonesArray = vm.formData.mobilePhones;
}
else {
vm.mobilePhonesArray = new Array();
for(let i = 0; i < vm.formData.mobilePhones.length; i++){
if(vm.formData.mobilePhones[i] == ""){
continue;
}
vm.mobilePhonesArray.push({value: vm.formData.mobilePhones[i]});
}
}
vm.getModuleData();
}
}).catch(function (error) {
vm.$message.error(error);
});
},
returnTypeData(name) {
this.$emit('returnTypeData', {
name: name,
val: this.formData[name]
})
},
//表单校验
submitForm() {
if(vm.mobilePhonesArray != null){
vm.formData.mobilePhones = new Array();
for(let i = 0; i < vm.mobilePhonesArray.length; i++){
if(vm.formData.rankShowFlag == 1
&& vm.mobilePhonesArray[i].value != ""
&& vm.mobilePhonesArray[i].value != undefined
&&!vm.checkPhone(vm.mobilePhonesArray[i].value)){
vm.$message.error("
请输入正确的手机号!
");
return;
}
else if(vm.mobilePhonesArray[i].value == "" || vm.mobilePhonesArray[i].value == undefined){
continue;
}
vm.formData.mobilePhones.push(vm.mobilePhonesArray[i].value);
}
}
if(vm.formData.rankShowFlag == 1){
if(!vm.checkRankTypeList()){
return;
}
if(!vm.checkRankName()){
return;
}
if(!vm.checkParamList()){
return;
}
}
if(vm.formData.ruleShowFlag == 0){
vm.formData.rankModule = {
linkType: 4, // 跳转类型:1 链接,4 模块, 8 无跳转
name: "", // 模块名称
paramFlag: 0, // 是否有参数标志1为有2为没有参数
paramList: [
{
id: "",
seqNo: '', // 选择参数的索引值
value: '',
key: '', // 参数名称,默认param
type:'' // 模块参数类型:1 int类型字符串 4String类型 8时间戳类型字符串
}
],
paramList2: [],
type: 0 // 类型:1 列表页,4 详情页
};
}
let req = vm.formData;
saveRankConfig(req).then(function (res) {
if(res.code == "
000000
") {
vm.$message.success("
保存成功!
");
// vm.formData = res.data;
}
}).catch(function (error) {
vm.$message.error(error);
});
},
changeRankType(value){
if(vm.rankTypeList != null){
if(vm.rankTypeList.indexOf(1) > -1){
vm.formData.orgRankFlag = 1;
}
else {
vm.formData.orgRankFlag = 0;
}
if(vm.rankTypeList.indexOf(3) > -1){
vm.formData.cityRankFlag = 1;
}
else {
vm.formData.cityRankFlag = 0;
}
if(vm.rankTypeList.indexOf(5) > -1){
vm.formData.groupRankFlag = 1;
}
else {
vm.formData.groupRankFlag = 0;
}
}
},
save(){
this.submitForm();
},
// 获取模块下拉数据
getModuleData() {
getModuleData().then(function (res) {
if(res.code == "
000000
") {
vm.moduleArray = JSON.parse(JSON.stringify(res.data));
for(let j = 0;j < vm.moduleArray.nameList.length; j++) {
if(vm.formData.rankModule.name == vm.moduleArray.nameList[j].name){// 通过name找到对应的id
vm.getParamData(vm.moduleArray.nameList[j].id,vm.formData.rankModule.paramFlag,j,1)
}
}
}
}).catch(function (error) {
vm.$message.error(error);
});
},
// 获取参数下拉数据
getParamData(id,flag,index,a) {
if(flag != 1) return; // 判断是否有参数选择
let req = {
id: id
}
getParamData(req).then(function (res) {
if(res.code == "
000000
") {
vm.paramArray = res.data.paramList;
vm.paramConfig = res.data.config;
// for(let i=0;i<vm.tabContent.length;i++) {
// if(i == index) {
vm.formData.rankModule.paramFlag = 1
vm.formData.rankModule.paramList2 = vm.paramArray;
if(a == 2) { // 判断是初始化还是改变module调的获取参数接口
vm.formData.rankModule.paramList = [];
for(let j = 0 ;j < vm.paramArray.length; j++) {
vm.formData.rankModule.paramList.push({
id: vm.paramConfig[j].id,
seqNo: vm.paramConfig[j].seqNo, // 选择参数的索引值
value: '',
key: vm.paramConfig[j].paramKey,
type: vm.paramConfig[j].type // 通过选择参数中获取
// status: 2
})
}
}else{
//for(let k = 0;k < vm.paramConfig.length; k++) {
// vm.formData.paramList[k].seqNo = vm.paramConfig[k].seqNo
// vm.formData.paramList[k].key = vm.paramConfig[k].paramKey
// vm.formData.paramList[k].type = vm.paramConfig[k].type
// vm.formData.paramList.push({
// seqNo: vm.paramConfig[k].seqNo,
// key: vm.paramConfig[k].paramKey,
// type: vm.paramConfig[k].type
// })
let arr = vm.formData.rankModule.paramList;
vm.formData.rankModule.paramList = [];
if(arr.length < vm.paramConfig.length) {
for(let k = 0;k < arr.length; k++) {
vm.formData.rankModule.paramList.push({
id: vm.paramConfig[k].id,
seqNo: vm.paramConfig[k].seqNo,
key: vm.paramConfig[k].paramKey,
type: vm.paramConfig[k].type,
value: arr[k].value
})
}
for(let j = arr.length;j < vm.paramConfig.length;j++) {
vm.formData.rankModule.paramList.push({
id: vm.paramConfig[j].id,
seqNo: vm.paramConfig[j].seqNo,
key: vm.paramConfig[j].paramKey,
type: vm.paramConfig[j].type,
value: ''
})
}
}else {
for(let k = 0;k < vm.paramConfig.length; k++) {
console.log("
id
:
" + vm.paramConfig[k].id);
console.log("
value
:
" + arr[k].value);
vm.formData.rankModule.paramList.push({
id: vm.paramConfig[k].id,
seqNo: vm.paramConfig[k].seqNo,
key: vm.paramConfig[k].paramKey,
type: vm.paramConfig[k].type,
value: arr[k].value
})
}
}
// }
}
// break
// }
// }
}
}).catch(function (error) {
vm.$message.error(error);
})
},
// change链接类型
selectLink(value) {
// if(value == 8) {
// for(let k = 0; k < vm.tabContent.length; k++) {
// if(vm.linkIndexValue == k) {
// vm.formData.rankModule.name = ""
// vm.formData.rankModule.paramFlag = 2
// }
// }
// }
},
linkIndex(index) {
vm.linkIndexValue = index
},
// change模块选择数据
moduleChange(value) {
for(let i = 0; i < vm.moduleArray.nameList.length; i++) {
if(value == vm.moduleArray.nameList[i].name) {
vm.getCodeAndType(vm.moduleArray.nameList[i].code,vm.moduleArray.nameList[i].type,vm.moduleArray.nameList[i].paramFlag)
vm.getParamData(vm.moduleArray.nameList[i].id,vm.moduleArray.nameList[i].paramFlag,vm.moduleIndexValue,2)
}
}
},
// moduleIndex(index) {
// vm.moduleIndexValue = index
// },
getCodeAndType(code,type,paramFlag) {
// for(let i = 0; i < vm.tabContent.length; i++) {
// if(vm.moduleIndexValue == i) {
vm.formData.rankModule.code = code
vm.formData.rankModule.type = type
vm.formData.rankModule.paramFlag = paramFlag
// }
// }
},
addPhone(index){
if(vm.mobilePhonesArray == null || vm.mobilePhonesArray.length == 0){
vm.$message.error("
请输入正确的手机号!
");
return;
}
else {
for(let i = 0; i < vm.mobilePhonesArray.length; i++){
if(vm.mobilePhonesArray[i] == null || vm.mobilePhonesArray[i].value == ""){
vm.$message.error("
请输入正确的手机号!
");
return;
}
else {
if(!vm.checkPhone(vm.mobilePhonesArray[i].value)){
vm.$message.error("
请输入正确的手机号!
");
return;
}
}
}
}
vm.mobilePhonesArray.push({value: ""});
},
delPhone(index){
vm.mobilePhonesArray.splice(index, 1);
},
checkPhone(val) {
if(!(/^1[3456789]
\
d{9}$/.test(val))) {
return false;
} else {
return true;
}
},
checkRankTypeList(){
if(vm.rankTypeList == null || vm.rankTypeList.length == 0){
vm.$message.error("
请选择榜单类型!
");
return false;
}
else {
return true;
}
},
checkRankName(){
if(vm.formData.ruleShowFlag == 1 && vm.formData.rankModule.name == ""){
vm.$message.error("
请选择规则跳转模块!
");
return false;
}
else {
return true;
}
},
checkParamList(){
if(vm.formData.ruleShowFlag == 1
&& vm.formData.rankModule.name != ""
&& vm.formData.rankModule.paramFlag == 1){
if(vm.formData.rankModule.paramList.length == 0){
vm.$message.error("
请选择参数!
");
return false;
}
else {
for(let i = 0; i < vm.formData.rankModule.paramList.length; i++){
if(vm.formData.rankModule.paramList[i].value == ""){
vm.$message.error("
请选择参数!
");
return false;
}
}
}
return true;
}
else {
return true;
}
},
changeRankShow(){
if(vm.formData.rankShowFlag == 1){
vm.styleEditFlag = false;
}
else {
vm.styleEditFlag = true;
}
}
}
}
</
script
>
<
style
lang=
"less"
>
.p-title {
padding-left: 10px;
margin-bottom: 15px;
}
.basic-item-icon {
position: relative;
.require {
position: absolute;
left: 67px;
top: 11px;
color: #f56c6c;
}
.upload-message {
position: absolute;
left: 160px;
top: 105px;
font-size: 12px;
color: #f56c6c;
}
.img-delete {
position: absolute;
left: 0px;
top: 0px;
width: 84px;
height: 100px;
background: #000;
opacity: 0.7;
z-index: 999;
i {
color: #fff;
margin-top: 39px;
margin-left: 0px;
}
}
}
.word-num {
font-size: 12px;
color: #999;
padding-top: 5px;
}
.line {
margin-left: 10px;
width: 20px;
}
.bg-uploader {
.bg-img {
float: left;
width: 84px;
height: 100px;
}
.limit-text {
float: left;
margin-left: 10px;
margin-top: -10px;
p {
font-size: 12px;
color: #999;
text-align: left;
}
}
}
.el-upload__tip {
position: absolute;
top: -6px;
left: 130px;
}
.required-label .el-form-item__label::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
.label-type {
width: 100%;
margin-top: 10px;
}
</
style
>
src/utils-o/env-config.js
浏览文件 @
84ba7c43
...
...
@@ -34,6 +34,7 @@ export const envConfig = {
// reportUrl: 'https://uat-sc-report.yunqueyi.com/',
excelUrl
:
'https://uat-file.yunqueyi.com/File/template/portal/'
,
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
msUrl
:
'https://dev-sc.yunqueyi.com/contents/'
,
},
dev
:
{
baseUrl
:
'https://dev-sc.yunqueyi.com/'
,
...
...
@@ -51,6 +52,7 @@ export const envConfig = {
reportUrl
:
'https://dev-sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/portal/'
,
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
msUrl
:
'https://dev-sc.yunqueyi.com/contents/'
,
},
test
:
{
baseUrl
:
'https://test1-sc.yunqueyi.com/'
,
...
...
@@ -68,6 +70,7 @@ export const envConfig = {
reportUrl
:
'https://test1-sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/portal/'
,
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
msUrl
:
'https://test1-sc.yunqueyi.com/contents/'
,
},
test2
:
{
baseUrl
:
'https://test2-work.yunqueyi.com/sc/'
,
...
...
@@ -84,6 +87,7 @@ export const envConfig = {
reportUrl
:
'https://test2-sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/portal/'
,
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
msUrl
:
'https://test2-sc.yunqueyi.com/contents/'
,
},
uat
:
{
baseUrl
:
'https://uat-sc.yunqueyi.com/'
,
...
...
@@ -101,6 +105,7 @@ export const envConfig = {
reportUrl
:
'https://uat-sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/portal/'
,
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
msUrl
:
'https://uat-sc.yunqueyi.com/contents/'
,
},
pro
:
{
baseUrl
:
'https://sc.yunqueyi.com/'
,
...
...
@@ -118,5 +123,6 @@ export const envConfig = {
reportUrl
:
'https://sc-report.yunqueyi.com/'
,
excelUrl
:
'https://file.yunqueyi.com/File/template/portal/'
,
itemFileUrl
:
'http://pica-test-huabei2.oss-cn-beijing.aliyuncs.com/File/template/portal/'
,
msUrl
:
'https://sc.yunqueyi.com/contents/'
,
}
}
src/utils-o/fetch.js
浏览文件 @
84ba7c43
...
...
@@ -56,7 +56,7 @@ service.interceptors.request.use(config => {
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
// config.headers['token'] = 'BFD804F3A3194FBBBE113962222839F6';
// config.headers['token'] = 'F8209898391C40A0B8DBC1ED9E157291';
config
.
headers
[
'token'
]
=
'
F64D5633857D4E16B3C2CCE5E48B0D1E
'
;
config
.
headers
[
'token'
]
=
'
4AA3547FCA3C49528B1429ACACA1508B
'
;
}
else
{
config
.
headers
[
'token'
]
=
localStorage
.
getItem
(
'storageToken'
)
}
...
...
src/utils/cme/cmeApi.js
浏览文件 @
84ba7c43
...
...
@@ -15,6 +15,22 @@ export const getUserTypeReq = (type) => {
})
};
// 获取动态slideBar
export
const
getSlideData
=
(
req
)
=>
{
console
.
log
(
"getSlideData() : token = "
+
localStorage
.
getItem
(
'storageToken'
)
+
", device_ip ="
+
localStorage
.
getItem
(
"ipAddress"
)
+
", browser_ver = "
+
localStorage
.
getItem
(
"browser"
));
return
fetch
({
headers
,
url
:
getBaseUrl
(
`contents/login/menu/list`
),
method
:
'post'
,
data
:
req
,
// token: localStorage.getItem('storageToken'),
// system_type: 22,
// device_ip: localStorage.getItem("ipAddress"),
// browser_ver: localStorage.getItem("browser"),
})
};
export
const
getSelectListReq
=
(
type
)
=>
{
return
fetch
({
url
:
getBaseUrl
(
`cme/constants/list?code=
${
type
}
`
),
...
...
src/utils/yqrange/yqrangeApi.js
浏览文件 @
84ba7c43
...
...
@@ -171,4 +171,108 @@ export const getCircleDept = (params) => {
})
};
export
const
getCircleAds
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/circle/ad/
${
params
.
circleId
}
`
),
method
:
'get'
,
data
:
params
,
description
:
'查询广告栏位信息'
,
})
};
export
const
saveCircleAds
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/circle/ad/save`
),
method
:
'post'
,
data
:
params
,
description
:
'B端保存广告栏位信息'
,
})
};
export
const
getLinkType
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`contents/commonComstant/selectByTypeCode?code=
${
params
.
code
}
`
),
method
:
'get'
,
data
:
params
,
description
:
'获取链接类型下拉数据'
,
})
};
export
const
getModuleData
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`contents/moduleConfig/selectName`
),
method
:
'get'
,
data
:
params
,
description
:
'获取模块下拉数据'
,
})
};
export
const
getParamData
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`contents/moduleConfig/selectParam?id=
${
params
.
id
}
`
),
method
:
'get'
,
data
:
params
,
description
:
'获取参数下拉数据'
,
})
};
export
const
getRankConfig
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/rank/config?circleId=
${
params
.
circleId
}
`
),
method
:
'get'
,
data
:
params
,
description
:
'获取排行榜配置'
,
})
};
export
const
saveRankConfig
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/rank/config/save`
),
method
:
'post'
,
data
:
params
,
description
:
'保存排行榜配置'
})
};
export
const
getGoodsExportUrl
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
'store/goods/export'
),
method
:
'post'
,
data
:
params
,
description
:
'商品导出'
,
})
};
export
const
getOrdersExportUrl
=
(
params
)
=>
{
debugger
return
fetch
({
headers
,
url
:
getBaseUrl
(
'/store/orders/admin/export'
),
method
:
'get'
,
params
:
params
,
description
:
'导出订单'
,
})
};
export
const
getExamAwardList
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`onlineexam/getExamAwardList`
),
method
:
'get'
,
data
:
params
,
description
:
'获取有奖问答关联考试'
,
})
};
src/views/goods/create-good.vue
浏览文件 @
84ba7c43
...
...
@@ -669,6 +669,17 @@
</el-col>
</el-form-item>
</div>
<div
class=
"inline"
>
<el-form-item
label=
"第三方商品编码"
prop=
"externalGoodsCode"
>
<el-col
:span=
"20"
>
<el-input
size=
"small"
v-model=
"formData.externalGoodsCode"
placeholder=
"请输入第三方商品编码"
></el-input>
</el-col>
</el-form-item>
</div>
</div>
</el-form>
...
...
src/views/goods/goods-manage.vue
浏览文件 @
84ba7c43
...
...
@@ -33,13 +33,14 @@
</el-col>
</el-row>
<el-row
:gutter=
"30"
type=
"flex"
style=
"margin-top: 10px"
>
<el-col
:span=
"1
8
"
>
<el-col
:span=
"1
2
"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"batchOpt('on')"
>
批量上架
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"batchOpt('off')"
>
批量下架
</el-button>
</el-col>
<el-col
:span=
"6"
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"batchOpt(3)"
>
批量导入
</el-button>
<el-col
:span=
"12"
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"exportOpt"
>
批量导出商品
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"batchOpt(3)"
>
批量导入商品
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"edit('add')"
>
新建单个商品
</el-button>
</el-col>
</el-row>
...
...
@@ -173,7 +174,7 @@
<
script
>
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
getRangeList
,
updateRangeStatus
}
from
"../../utils/yqrange/yqrangeApi"
;
import
{
getRangeList
,
updateRangeStatus
,
getGoodsExportUrl
,
getOrdersExportUrl
}
from
"../../utils/yqrange/yqrangeApi"
;
import
{
getGoodsList
,
batchOnOff
,
uploadExcel
}
from
'@/utils/goods'
;
import
{
getBaseUrl
}
from
'@/utils/index'
var
typeList
=
[{
...
...
@@ -409,7 +410,7 @@
setTimeout
(()
=>
{
this
.
getLists
()
},
2000
)
}
})
}
...
...
@@ -528,7 +529,6 @@
this
.
getLists
();
},
handleSizeChange
(
val
)
{
this
.
searchForm
.
pageSize
=
val
;
this
.
searchForm
.
pageNo
=
1
;
...
...
@@ -538,6 +538,17 @@
this
.
searchForm
.
pageNo
=
val
;
this
.
getLists
();
},
exportOpt
()
{
const
{
goodsIdList
,
goodsType
,
goodsName
,
storeId
}
=
this
.
searchForm
;
getGoodsExportUrl
({
goodsIdList
,
goodsType
,
goodsName
,
storeId
}).
then
(
res
=>
{
if
(
res
.
code
!=
'000000'
)
{
this
.
$message
({
message
:
res
.
message
,
type
:
'error'
});
return
;
}
window
.
open
(
res
.
data
);
});
}
},
}
</
script
>
...
...
src/views/goods/order-manage.vue
浏览文件 @
84ba7c43
...
...
@@ -29,6 +29,7 @@
<el-col
:span=
"6"
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"searchList"
>
查询
</el-button>
<el-button
type=
"default"
size=
"small"
@
click=
"resetForm"
style=
"margin-left:0;"
>
重置
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"exportOrder"
>
导出订单
</el-button>
</el-col>
</el-row>
</el-form>
...
...
@@ -85,8 +86,8 @@
<div>
<!--
<el-button
@
click=
"closeTrade(scope.row)"
type=
"text"
size=
"small"
>
关闭交易
</el-button>
-->
<!--
<el-button
@
click=
"changePrice(scope.row)"
type=
"text"
size=
"small"
>
修改价格
</el-button>
-->
<el-button
v-if=
"scope.row.storeType == 1 && scope.row.showStatus == 3"
@
click=
"sendGoods(scope.row)"
type=
"text"
size=
"small"
>
发货
</el-button>
<el-button
v-if=
"scope.row.storeType == 2 && scope.row.showStatus == 3"
@
click=
"distribute(scope.row)"
type=
"text"
size=
"small"
>
配送
</el-button>
<el-button
v-if=
"scope.row.storeType == 1 && scope.row.showStatus == 3
&& scope.row.refundStatus == 0
"
@
click=
"sendGoods(scope.row)"
type=
"text"
size=
"small"
>
发货
</el-button>
<el-button
v-if=
"scope.row.storeType == 2 && scope.row.showStatus == 3
&& scope.row.refundStatus == 0
"
@
click=
"distribute(scope.row)"
type=
"text"
size=
"small"
>
配送
</el-button>
<el-button
v-if=
"scope.row.storeType == 1 && (scope.row.showStatus == 1 || scope.row.showStatus == 2)"
@
click=
"viewLogistics(scope.row)"
type=
"text"
size=
"small"
>
查看物流
</el-button>
<el-button
v-if=
"scope.row.storeType == 2 && scope.row.showStatus == 2"
@
click=
"distributeComplete(scope.row)"
type=
"text"
size=
"small"
>
配送完成
</el-button>
<el-button
@
click=
"goDetail(scope.row)"
type=
"text"
size=
"small"
>
查看详情
</el-button>
...
...
@@ -227,6 +228,15 @@
<el-form-item
label=
"退款金额"
prop=
"name"
>
<el-input
v-model=
"tuiForm.money"
:disabled=
"true"
></el-input>
</el-form-item>
<el-form-item
label=
"退款对象"
>
<el-select
v-model=
"userType"
placeholder=
"请选择退货对象"
>
<el-option
v-for=
"item in userTypes"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"confirmTui"
>
完成
</el-button>
...
...
@@ -238,6 +248,7 @@
// import { openLoading, closeLoading } from "../../utils/utils";
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
SendSetDialog
from
"@/components/shop/send-set-dialog"
;
import
{
getOrdersExportUrl
}
from
"@/utils/yqrange/yqrangeApi"
;
import
{
queryOrderList
,
updateExpress
,
refundApply
}
from
"@/utils/shop"
;
import
{
toDecimal2
}
from
'@/utils'
;
...
...
@@ -307,10 +318,22 @@
value
:
2
,
disabled
:
true
}
],
userType
:
""
,
// 1.开单医生, 2.支付用户
userTypes
:
[
{
label
:
'开单医生'
,
value
:
1
,
},
{
label
:
'支付用户'
,
value
:
2
,
},
]
}
},
created
()
{
console
.
log
(
"order created() : enter"
);
this
.
searchForm
.
storeId
=
this
.
$route
.
query
.
storeId
||
0
,
this
.
searchList
();
},
...
...
@@ -479,7 +502,7 @@
this
.
showTuiDialog
=
true
;
},
confirmTui
()
{
refundApply
({
orderId
:
this
.
tuiForm
.
order
.
id
}).
then
(
res
=>
{
refundApply
({
orderId
:
this
.
tuiForm
.
order
.
id
,
userType
:
this
.
userType
}).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
$message
.
success
(
'操作成功'
);
this
.
showTuiDialog
=
false
;
...
...
@@ -489,6 +512,17 @@
}
});
},
exportOrder
()
{
const
{
goodsName
,
orderNo
,
receiver
,
orderDate
,
storeId
}
=
this
.
searchForm
;
getOrdersExportUrl
({
goodsName
,
orderNo
,
receiver
,
orderDate
,
storeId
}).
then
(
res
=>
{
if
(
res
.
code
!=
'000000'
)
{
this
.
$message
({
message
:
res
.
message
,
type
:
'error'
});
return
;
}
window
.
open
(
res
.
data
);
});
}
},
filters
:
{
toFixed2
:
function
(
value
)
{
...
...
src/views/layout/slidebar.vue
浏览文件 @
84ba7c43
<
template
>
<div
id=
"slidebar-container"
class=
"slidebar-container"
>
<el-menu
:default-active=
"onRoutes"
class=
"el-menu-vertical-demo"
theme=
"dark"
unique-opened
router
>
<el-menu
:default-active=
"onRoutes"
class=
"el-menu-vertical-demo"
theme=
"dark"
unique-opened
router
>
<template
v-if=
"isOutsideGetted && isOutsideUser"
>
<el-menu-item
v-for=
"(outItem, outIndex) in outsideItems"
:index=
"'/'+outItem.index"
:key=
"outIndex"
>
<el-menu-item
v-for=
"(outItem, outIndex) in outsideItems"
:index=
"'/' + outItem.index"
:key=
"outIndex"
>
<i
:class=
"outItem.icon"
></i>
{{
outItem
.
title
}}
</el-menu-item>
</
template
>
<
template
v-if=
"isOutsideGetted && !isOutsideUser"
>
<template
v-for=
"(item,_index) in items"
>
<template
v-if=
"item.subs"
>
<el-submenu
:index=
" 'index_' + _index"
:key=
"item.index"
>
<template
slot=
"title"
><i
:class=
"item.icon"
></i>
{{
item
.
title
}}
</
template
>
<el-menu-item
v-for=
"(subItem,i) in item.subs"
:key=
"i"
:index=
"'/'+subItem.index"
>
<template
v-for=
"(item, _index) in items"
>
<template
v-if=
"
item.subs &&
!(
'' == item.subs ||
null == item.subs ||
undefined == item.subs ||
null == item.subs
)
"
>
<el-submenu
:index=
"'index_' + _index"
:key=
"item.index + _index"
>
<template
slot=
"title"
><i
:class=
"item.icon"
></i>
{{
item
.
title
}}
</
template
>
<el-menu-item
v-for=
"(subItem, i) in item.subs"
:key=
"i"
:index=
"'/' + subItem.index"
>
<i
class=
"sub-icon"
:class=
"subItem.icon"
></i>
{{subItem.title}}
<p
class=
"redNum"
v-if=
"subItem.title == '资料不全居民'
&¬CompleteCount
&&$route.path!='/patients-manage/not-complete/uncompleted-list'"
{{ subItem.title }}
<p
class=
"redNum"
v-if=
"
subItem.title == '资料不全居民' &&
notCompleteCount &&
$route.path !=
'/patients-manage/not-complete/uncompleted-list'
"
>
<span
v-if=
"notCompleteCount
>
999"
>
+999
</span>
<span
v-else
>
{{
notCompleteCount
}}
</span>
<span
v-if=
"notCompleteCount
>
999"
>
+999
</span>
<span
v-else
>
{{
notCompleteCount
}}
</span>
</p>
</el-menu-item>
</el-submenu>
</template>
<
template
v-else
>
<template
v-if=
"item.isMessageSend"
>
<el-menu-item
:index=
"'/'+item.index"
:key=
"item.index"
@
click=
"goToMessageSendPage(item.checkAuth)"
class=
"set-normal-background"
>
<el-menu-item
:index=
"'/' + item.index"
:key=
"item.index"
@
click=
"goToMessageSendPage(item.checkAuth)"
class=
"set-normal-background"
>
<i
:class=
"item.icon"
></i>
{{
item
.
title
}}
</el-menu-item>
</
template
>
<
template
v-else
>
<el-menu-item
:index=
"'/'
+
item.index"
:key=
"item.index"
>
<el-menu-item
:index=
"'/'
+
item.index"
:key=
"item.index"
>
<i
:class=
"item.icon"
></i>
{{
item
.
title
}}
</el-menu-item>
</
template
>
</template>
</template>
</template>
<!--<template v-if="isOutsideGetted && isOutsideUser && isShowGoods">-->
<!--<el-menu-item v-for="(outItem, outIndex) in outsideGoodsItem" :index="'/'+outItem.index" :key="outIndex">-->
<!--<i :class="outItem.icon"></i>{{ outItem.title }}-->
<!--</el-menu-item>-->
<!--<el-menu-item v-for="(outItem, outIndex) in outsideGoodsItem" :index="'/'+outItem.index" :key="outIndex">-->
<!--<i :class="outItem.icon"></i>{{ outItem.title }}-->
<!--</el-menu-item>-->
<!--</template>-->
</el-menu>
</div>
</template>
<
script
>
import
utils
from
'@/utils/followup/followupUtils'
;
import
{
mapGetters
}
from
'vuex'
import
{
setTimeout
}
from
'timers'
import
{
isNotEmptyUtils
}
from
'../../utils/utils'
import
{
getUserTypeReq
,
circleMenu
}
from
'@/utils/cme/cmeApi'
import
{
getCircleRole
}
from
'@/utils/patients/patientsapi'
import
{
queryShopAuth
}
from
'@/utils/shop'
;
import
utils
from
"@/utils/followup/followupUtils"
;
import
{
mapGetters
}
from
"vuex"
;
import
{
setTimeout
}
from
"timers"
;
import
{
isNotEmptyUtils
}
from
"../../utils/utils"
;
import
{
getUserTypeReq
,
circleMenu
,
getSlideData
}
from
"@/utils/cme/cmeApi"
;
import
{
getCircleRole
}
from
"@/utils/patients/patientsapi"
;
import
{
queryShopAuth
}
from
"@/utils/shop"
;
let
vm
=
null
export
default
{
props
:
{
storageIdType
:
{
type
:
Number
,
default
:
0
},
tokenValue
:
{
type
:
String
},
authList
:
{
type
:
Object
,
default
:
()
=>
{}
},
notCompleteCount
:
{
type
:
Number
,
},
masterFlag
:
{
type
:
Boolean
,
default
:
false
let
vm
=
null
;
export
default
{
props
:
{
storageIdType
:
{
type
:
Number
,
default
:
0
,
},
tokenValue
:
{
type
:
String
,
},
authList
:
{
type
:
Object
,
default
:
()
=>
{},
},
notCompleteCount
:
{
type
:
Number
,
},
masterFlag
:
{
type
:
Boolean
,
default
:
false
,
},
roleObj
:
{
type
:
Object
,
default
()
{
return
{
mainManager
:
null
,
manager
:
null
,
ordinary
:
null
,
};
},
roleObj
:
{
type
:
Object
,
default
(){
return
{
mainManager
:
null
,
manager
:
null
,
ordinary
:
null
,
}
}
}
},
data
()
{
return
{
isOutsideUser
:
false
,
// 是否是外部用户;(外部用户:只展示一个页面路由; 非外部用户:正常展示之前的逻辑)
isOutsideGetted
:
false
,
isShowGoods
:
false
,
items
:
[
{
title
:
'数据总览'
,
icon
:
'el-icon-menu'
,
index
:
'home'
,
},{
title
:
'教培项目'
,
icon
:
'el-icon-message'
,
index
:
'item'
,
subs
:
[
{
title
:
'下载报告'
,
icon
:
'el-icon-document'
,
index
:
'export-download'
},
{
title
:
'项目管理'
,
icon
:
'el-icon-setting'
,
index
:
'item-manager'
},
]
},
{
title
:
'系统管理'
,
icon
:
'el-icon-menu'
,
index
:
'system'
,
subs
:
[
{
title
:
'角色管理'
,
icon
:
'el-icon-setting'
,
index
:
'role'
}
]
},
// {
// title: '云鹊店铺',
// icon: 'el-icon-first-aid-kit',
// index: 'shop'
// },
],
outsideItems
:
[
// 外部用户 路由
{
title
:
'学分发放管理'
,
icon
:
'el-icon-document'
,
index
:
'credit-send-manage'
},
],
/*outsideGoodsItem: [//只有通过店铺管理操作才可展示
},
data
()
{
return
{
isOutsideUser
:
false
,
// 是否是外部用户;(外部用户:只展示一个页面路由; 非外部用户:正常展示之前的逻辑)
isOutsideGetted
:
false
,
isShowGoods
:
false
,
items
:
[
{
title
:
"数据总览"
,
icon
:
"el-icon-menu"
,
index
:
"home"
,
},
{
title
:
"教培项目"
,
icon
:
"el-icon-message"
,
index
:
"item"
,
subs
:
[
{
title
:
"下载报告"
,
icon
:
"el-icon-document"
,
index
:
"export-download"
,
},
{
title
:
"项目管理"
,
icon
:
"el-icon-setting"
,
index
:
"item-manager"
,
},
],
},
{
title
:
"系统管理"
,
icon
:
"el-icon-menu"
,
index
:
"system"
,
subs
:
[
{
title
:
"角色管理"
,
icon
:
"el-icon-setting"
,
index
:
"role"
,
},
],
},
// {
// title: '云鹊店铺',
// icon: 'el-icon-first-aid-kit',
// index: 'shop'
// },
],
outsideItems
:
[
// 外部用户 路由
{
title
:
"学分发放管理"
,
icon
:
"el-icon-document"
,
index
:
"credit-send-manage"
,
},
],
/*outsideGoodsItem: [//只有通过店铺管理操作才可展示
{
title: '商品管理',
icon: 'el-icon-first-aid-kit',
...
...
@@ -152,433 +190,515 @@
index: 'order-manage'
},
],*/
}
};
},
computed
:
{
onRoutes
()
{
return
this
.
$route
.
path
;
},
computed
:
{
onRoutes
()
{
return
this
.
$route
.
path
;
},
created
()
{
vm
=
this
;
this
.
getUserType
();
},
mounted
()
{
console
.
log
(
"mounted() : this.storageIdType = "
+
this
.
storageIdType
);
if
(
this
.
storageIdType
==
1
)
{
vm
.
setEntrySide
();
}
else
if
(
this
.
storageIdType
==
2
)
{
vm
.
setFollowSide
();
vm
.
getRoleObj
();
}
vm
.
setShopSide
();
vm
.
setCircleSlide
();
},
watch
:
{
authList
(
newVal
,
oldVal
)
{
console
.
log
(
"watch.authList() : newVal = "
+
newVal
+
", oldVal = "
+
oldVal
);
if
(
!
newVal
.
P001
)
{
// 项目管理
vm
.
items
[
1
].
subs
[
1
].
index
=
"blank"
;
}
if
(
!
newVal
.
P002
)
{
// 组件管理
vm
.
items
[
1
].
subs
[
0
].
index
=
"blank"
;
}
if
(
!
newVal
.
P003
)
{
// 角色管理
vm
.
items
[
2
].
subs
[
0
].
index
=
"blank"
;
}
},
created
()
{
vm
=
this
;
this
.
getUserType
();
},
mounted
(){
if
(
this
.
storageIdType
==
1
){
storageIdType
(
val
)
{
console
.
log
(
"watch.storageIdType() : val = "
+
val
);
if
(
val
==
1
)
{
vm
.
setEntrySide
();
}
else
if
(
this
.
storageIdType
==
2
)
{
}
else
if
(
val
==
2
)
{
vm
.
setFollowSide
();
vm
.
getRoleObj
();
}
vm
.
setShopSide
()
vm
.
setCircleSlide
()
// vm.getGoodsAuth();
},
watch
:
{
authList
(
newVal
,
oldVal
){
if
(
!
newVal
.
P001
)
{
// 项目管理
vm
.
items
[
1
].
subs
[
1
].
index
=
'blank'
}
if
(
!
newVal
.
P002
)
{
// 组件管理
vm
.
items
[
1
].
subs
[
0
].
index
=
'blank'
}
if
(
!
newVal
.
P003
)
{
// 角色管理
vm
.
items
[
2
].
subs
[
0
].
index
=
'blank'
}
},
storageIdType
(
val
){
if
(
val
==
1
){
vm
.
setEntrySide
();
}
else
if
(
val
==
2
)
{
vm
.
setFollowSide
();
vm
.
getRoleObj
();
}
},
},
methods
:
{
getUserType
()
{
// console.log('当前路由地址:', this.$route.path, typeof this.$route.path)
let
currentPath
=
this
.
$route
.
path
||
''
;
let
req
=
{};
// console.log('isOutsideUser: ', this.$store.state.cmeStore.isOutsideUser)
getUserTypeReq
(
req
).
then
(
res
=>
{
},
methods
:
{
getUserType
()
{
// console.log('当前路由地址:', this.$route.path, typeof this.$route.path)
console
.
log
(
"getUserType() : enter"
);
let
currentPath
=
this
.
$route
.
path
||
""
;
let
req
=
{};
// console.log('isOutsideUser: ', this.$store.state.cmeStore.isOutsideUser)
getUserTypeReq
(
req
)
.
then
((
res
)
=>
{
// debugger;
this
.
isOutsideGetted
=
true
;
if
(
res
.
code
==
'000000'
)
{
if
(
res
.
data
.
code
==
"yes"
)
{
// 外部用户,siderbar只展示一个:学分发放管理页面
this
.
isOutsideUser
=
true
;
this
.
$store
.
dispatch
(
'cmeStore/updateOutUserStatus'
,
true
);
if
(
currentPath
&&
currentPath
==
'/apply-detail'
)
{
// 申请明细页面 则刷新时不重定向
// if (res.code == '000000') {
// if (res.data.code == "yes") { // 外部用户,siderbar只展示一个:学分发放管理页面
// // TODO this.isOutsideUser = true;
// this.isOutsideUser = false;
// this.$store.dispatch('cmeStore/updateOutUserStatus', true);
// if (currentPath && currentPath == '/apply-detail') { // 申请明细页面 则刷新时不重定向
// return;
// }
// //TODO this.$router.replace({
// // path: '/credit-send-manage'
// // });
// } else { // 非外部用户 正常展示多路由
if
(
res
.
code
==
"000000"
)
{
console
.
log
(
"getUserType() : res.data.code = "
+
res
.
data
.
code
);
// this.getSlideData();
if
(
res
.
data
.
code
==
"yes"
)
{
// 外部用户,siderbar只展示一个:学分发放管理页面
// this.isOutsideUser = true;
//外部用户展示之前内部用户固定展示的内容
this
.
isOutsideUser
=
false
;
this
.
$store
.
dispatch
(
"cmeStore/updateOutUserStatus"
,
true
);
if
(
currentPath
&&
currentPath
==
"/apply-detail"
)
{
// 申请明细页面 则刷新时不重定向
return
;
}
this
.
$router
.
replace
({
path
:
'/credit-send-manage'
});
}
else
{
// 非外部用户 正常展示多路由
// this.$router.replace({
// path: "/credit-send-manage",
// });
}
else
{
// 非外部用户 正常展示多路由
this
.
getSlideData
();
this
.
isOutsideUser
=
false
;
this
.
$store
.
dispatch
(
'cmeStore/updateOutUserStatus'
,
false
);
this
.
$store
.
dispatch
(
"cmeStore/updateOutUserStatus"
,
false
);
}
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'请求失败'
);
})
.
catch
((
err
)
=>
{
console
.
log
(
"getUserTypeReq() : err = "
+
err
);
this
.
$message
.
error
(
"请求失败"
);
});
},
setStoreData
(
value
)
{
if
(
value
){
return
1
;
}
else
{
return
0
;
}
},
getRoleObj
()
{
getCircleRole
({}).
then
((
res
)
=>
{
localStorage
.
removeItem
(
'highMainManager'
);
localStorage
.
removeItem
(
'mainManager'
);
localStorage
.
removeItem
(
'manager'
);
localStorage
.
removeItem
(
'ordinary'
);
localStorage
.
removeItem
(
'createCircle'
);
if
(
res
.
code
==
'000000'
)
{
//mainManager主管理员,manager管理员,ordinary普通人
const
{
highMainManager
,
mainManager
,
manager
,
ordinary
,
createCircle
}
=
res
.
data
;
localStorage
.
setItem
(
'highMainManager'
,
vm
.
setStoreData
(
highMainManager
))
localStorage
.
setItem
(
'mainManager'
,
vm
.
setStoreData
(
mainManager
))
localStorage
.
setItem
(
'manager'
,
vm
.
setStoreData
(
manager
))
localStorage
.
setItem
(
'ordinary'
,
vm
.
setStoreData
(
ordinary
))
localStorage
.
setItem
(
'createCircle'
,
vm
.
setStoreData
(
createCircle
))
if
(
highMainManager
||
mainManager
||
manager
)
{
// vm.items.push(yqRange);
vm
.
setCircleSize
();
}
}
else
{
vm
.
$message
.
info
(
res
.
message
)
}
},
getSlideData
()
{
let
self
=
this
;
//获取菜单
// let url = localStorage.getItem("msUrl") + "login/menu/list";
let
req
=
{
// token: localStorage.getItem("token"),
system_type
:
25
,
device_ip
:
localStorage
.
getItem
(
"ipAddress"
),
browser_ver
:
localStorage
.
getItem
(
"browser"
),
};
// let headers = {
// headers: {
// token: localStorage.getItem("token") || null,
// },
// };
getSlideData
(
req
)
.
then
((
res
)
=>
{
// responseCheck(res, self);
// console.log("getSlideData 获取菜单成功===========", res);
// self.items = res.data.data.picapMenuModels;
// let data = JSON.parse(JSON.stringify(res.data.data)); //通过这个实现深拷贝
// localStorage.setItem(
// "privilege_data",
// JSON.stringify(data.picapMenuModels)
// );
// localStorage.setItem("user_name", data.user_name);
// localStorage.setItem("function_role", data.function_role);
// localStorage.setItem("initFlag", "1");
vm
.
items
=
res
.
data
.
picapMenuModels
;
})
},
setCircleSize
(){
console
.
log
(
'设置云鹊小圈'
)
const
yqRange
=
{
title
:
'云鹊小圈'
,
icon
:
'el-icon-setting'
,
index
:
'yq-range'
};
vm
.
items
.
push
(
yqRange
);
},
setFollowSide
(){
const
followSider
=
{
title
:
'履约管理'
,
icon
:
'el-icon-edit-outline'
,
index
:
'followup'
,
subs
:
[
{
title
:
'计划管理'
,
icon
:
'el-icon-setting'
,
index
:
'followup/plan-manage/plan-list'
},
{
title
:
'预约管理'
,
icon
:
'el-icon-setting'
,
index
:
'followup/reservation-manage/reservation-list'
},
{
title
:
'录入管理'
,
icon
:
'el-icon-setting'
,
index
:
'followup/record-manage/record-list'
}
]
}
.
catch
(
function
(
error
)
{
console
.
log
(
"获取菜单失败!%s"
,
error
);
errorResponseCheck
(
error
,
self
);
});
},
const
patients
=
{
title
:
'居民管理'
,
icon
:
'el-icon-patients-manage'
,
index
:
'patients-manage'
,
subs
:
[
{
title
:
'我的居民'
,
icon
:
'el-icon-setting'
,
index
:
'patients-manage/mypatients-manage/patients-list'
},
{
title
:
'新增居民'
,
icon
:
'el-icon-setting'
,
index
:
'patients-manage/new-manage/new-patient'
},
{
title
:
'分组管理'
,
icon
:
'el-icon-setting'
,
index
:
'patients-manage/labels-manage/labels-list'
},
{
title
:
'资料不全居民'
,
icon
:
'el-icon-setting'
,
index
:
'patients-manage/not-complete/uncompleted-list'
}
]
setStoreData
(
value
)
{
if
(
value
)
{
return
1
;
}
else
{
return
0
;
}
},
getRoleObj
()
{
getCircleRole
({}).
then
((
res
)
=>
{
localStorage
.
removeItem
(
"highMainManager"
);
localStorage
.
removeItem
(
"mainManager"
);
localStorage
.
removeItem
(
"manager"
);
localStorage
.
removeItem
(
"ordinary"
);
localStorage
.
removeItem
(
"createCircle"
);
if
(
res
.
code
==
"000000"
)
{
//mainManager主管理员,manager管理员,ordinary普通人
const
{
highMainManager
,
mainManager
,
manager
,
ordinary
,
createCircle
,
}
=
res
.
data
;
localStorage
.
setItem
(
"highMainManager"
,
vm
.
setStoreData
(
highMainManager
)
);
localStorage
.
setItem
(
"mainManager"
,
vm
.
setStoreData
(
mainManager
));
localStorage
.
setItem
(
"manager"
,
vm
.
setStoreData
(
manager
));
localStorage
.
setItem
(
"ordinary"
,
vm
.
setStoreData
(
ordinary
));
localStorage
.
setItem
(
"createCircle"
,
vm
.
setStoreData
(
createCircle
));
if
(
highMainManager
||
mainManager
||
manager
)
{
// vm.items.push(yqRange);
vm
.
setCircleSize
();
}
}
else
{
vm
.
$message
.
info
(
res
.
message
);
}
});
},
setCircleSize
()
{
console
.
log
(
"设置云鹊小圈"
);
const
yqRange
=
{
title
:
"云鹊小圈"
,
icon
:
"el-icon-setting"
,
index
:
"yq-range"
,
};
vm
.
items
.
push
(
yqRange
);
},
setFollowSide
()
{
const
followSider
=
{
title
:
"履约管理"
,
icon
:
"el-icon-edit-outline"
,
index
:
"followup"
,
subs
:
[
{
title
:
"计划管理"
,
icon
:
"el-icon-setting"
,
index
:
"followup/plan-manage/plan-list"
,
},
{
title
:
"预约管理"
,
icon
:
"el-icon-setting"
,
index
:
"followup/reservation-manage/reservation-list"
,
},
{
title
:
"录入管理"
,
icon
:
"el-icon-setting"
,
index
:
"followup/record-manage/record-list"
,
},
],
};
const
message
=
{
title
:
'消息推送'
,
icon
:
'el-icon-message'
,
index
:
'msg-push'
,
isMessageSend
:
true
,
checkAuth
:
true
,
}
const
patients
=
{
title
:
"居民管理"
,
icon
:
"el-icon-patients-manage"
,
index
:
"patients-manage"
,
subs
:
[
{
title
:
"我的居民"
,
icon
:
"el-icon-setting"
,
index
:
"patients-manage/mypatients-manage/patients-list"
,
},
{
title
:
"新增居民"
,
icon
:
"el-icon-setting"
,
index
:
"patients-manage/new-manage/new-patient"
,
},
{
title
:
"分组管理"
,
icon
:
"el-icon-setting"
,
index
:
"patients-manage/labels-manage/labels-list"
,
},
{
title
:
"资料不全居民"
,
icon
:
"el-icon-setting"
,
index
:
"patients-manage/not-complete/uncompleted-list"
,
},
],
};
const
yqRange
=
{
title
:
'云鹊小圈'
,
icon
:
'el-icon-setting'
,
index
:
'yq-range'
};
const
message
=
{
title
:
"消息推送"
,
icon
:
"el-icon-message"
,
index
:
"msg-push"
,
isMessageSend
:
true
,
checkAuth
:
true
,
};
vm
.
items
[
1
].
title
=
'教育培训'
;
vm
.
items
.
push
(
followSider
);
vm
.
items
.
push
(
patients
);
vm
.
items
.
push
(
message
);
const
yqRange
=
{
title
:
"云鹊小圈"
,
icon
:
"el-icon-setting"
,
index
:
"yq-range"
,
};
// let mainManager = localStorage.getItem('mainManager')
// let manager = localStorage.getItem('manager')
// if (mainManager == 1 || manager == 1) {
// vm.items.push(yqRange);
// }
},
vm
.
items
[
1
].
title
=
"教育培训"
;
vm
.
items
.
push
(
followSider
);
vm
.
items
.
push
(
patients
);
vm
.
items
.
push
(
message
);
setEntrySide
()
{
const
itemComponent
=
{
title
:
'项目组件'
,
icon
:
'el-icon-setting'
,
index
:
'item-component'
};
const
followSider
=
{
title
:
'入口管理'
,
icon
:
'el-icon-setting'
,
index
:
'entry-manager'
};
const
templateManager
=
{
title
:
'模板管理'
,
icon
:
'el-icon-setting'
,
index
:
'template-manager'
};
const
advertSimpleManage
=
{
title
:
'教培项目广告位管理'
,
icon
:
'el-icon-setting'
,
index
:
'advert-simple-manage'
};
// let mainManager = localStorage.getItem('mainManager')
// let manager = localStorage.getItem('manager')
// if (mainManager == 1 || manager == 1) {
// vm.items.push(yqRange);
// }
},
const
subjectManager
=
{
title
:
'学科管理'
,
icon
:
'el-icon-setting'
,
index
:
'subject-manager'
};
setEntrySide
()
{
const
itemComponent
=
{
title
:
"项目组件"
,
icon
:
"el-icon-setting"
,
index
:
"item-component"
,
};
const
followSider
=
{
title
:
"入口管理"
,
icon
:
"el-icon-setting"
,
index
:
"entry-manager"
,
};
const
templateManager
=
{
title
:
"模板管理"
,
icon
:
"el-icon-setting"
,
index
:
"template-manager"
,
};
const
advertSimpleManage
=
{
title
:
"教培项目广告位管理"
,
icon
:
"el-icon-setting"
,
index
:
"advert-simple-manage"
,
};
const
reportDownLoad
=
{
title
:
'汇总与明细表下载'
,
icon
:
'el-icon-setting'
,
index
:
'report-download'
};
const
subjectManager
=
{
title
:
"学科管理"
,
icon
:
"el-icon-setting"
,
index
:
"subject-manager"
,
};
const
eduRole
=
{
title
:
'角色权限'
,
icon
:
'el-icon-menu'
,
index
:
'role'
,
subs
:
[
{
title
:
'发起教培项目赋权'
,
icon
:
'el-icon-setting'
,
index
:
'edu-role'
}
]
}
const
cme
=
{
title
:
'CME'
,
icon
:
'el-icon-reading'
,
index
:
'credit-manage'
,
subs
:
[
{
title
:
'学分管理列表'
,
icon
:
'el-icon-document'
,
index
:
'credit-manage'
},
{
title
:
'审核权限管理'
,
icon
:
'el-icon-document'
,
index
:
'review-access-manage'
},
{
title
:
'学分发放管理'
,
icon
:
'el-icon-document'
,
index
:
'credit-send-manage'
},
// {
// title: '外部资源管理',
// icon: 'el-icon-document',
// index: 'external-resource-manage'
// },
]
}
const
reportDownLoad
=
{
title
:
"汇总与明细表下载"
,
icon
:
"el-icon-setting"
,
index
:
"report-download"
,
};
const
yqRange
=
{
title
:
'云鹊小圈'
,
icon
:
'el-icon-setting'
,
index
:
'yq-range'
};
const
eduRole
=
{
title
:
"角色权限"
,
icon
:
"el-icon-menu"
,
index
:
"role"
,
subs
:
[
{
title
:
"发起教培项目赋权"
,
icon
:
"el-icon-setting"
,
index
:
"edu-role"
,
},
],
};
const
cme
=
{
title
:
"CME"
,
icon
:
"el-icon-reading"
,
index
:
"credit-manage"
,
subs
:
[
{
title
:
"学分管理列表"
,
icon
:
"el-icon-document"
,
index
:
"credit-manage"
,
},
{
title
:
"审核权限管理"
,
icon
:
"el-icon-document"
,
index
:
"review-access-manage"
,
},
{
title
:
"学分发放管理"
,
icon
:
"el-icon-document"
,
index
:
"credit-send-manage"
,
},
// {
// title: '外部资源管理',
// icon: 'el-icon-document',
// index: 'external-resource-manage'
// },
],
};
const
outResourceManage
=
{
title
:
'外部资源管理'
,
icon
:
'el-icon-reading'
,
index
:
'external-resource-manage'
,
subs
:
[
{
title
:
'外部资源列表'
,
icon
:
'el-icon-document'
,
index
:
'external-resource-manage'
},
]
};
const
yqRange
=
{
title
:
"云鹊小圈"
,
icon
:
"el-icon-setting"
,
index
:
"yq-range"
,
};
vm
.
items
[
1
].
subs
.
push
(
subjectManager
);
vm
.
items
[
1
].
subs
.
push
(
itemComponent
);
vm
.
items
[
1
].
subs
.
push
(
templateManager
);
vm
.
items
[
1
].
subs
.
push
(
followSider
);
vm
.
items
[
1
].
subs
.
push
(
advertSimpleManage
);
vm
.
items
[
1
].
subs
.
push
(
reportDownLoad
);
vm
.
items
.
push
(
eduRole
);
vm
.
items
.
push
(
cme
);
vm
.
items
.
push
(
yqRange
);
vm
.
items
.
push
(
outResourceManage
);
},
setShopSide
(){
queryShopAuth
().
then
(
res
=>
{
// 0 表示超级管理员,大于0 表示小店或供应商,null 表示非法用户
if
(
res
.
data
>=
0
)
{
const
shop
=
{
title
:
'云鹊店铺'
,
icon
:
'el-icon-first-aid-kit'
,
index
:
'shop-list'
};
vm
.
items
.
push
(
shop
);
}
else
{
return
;
}
})
/*const shop = {
title: '云鹊店铺',
icon: 'el-icon-first-aid-kit',
index: 'shop-list'
};
vm.items.push(shop);
const shop1 = {
title: '商品管理',
icon: 'el-icon-first-aid-kit',
index: 'goods-manage'
};
vm.items.push(shop1);
const shop2 = {
title: '订单管理',
icon: 'el-icon-first-aid-kit',
index: 'order-manage'
};
vm.items.push(shop2);*/
},
const
outResourceManage
=
{
title
:
"外部资源管理"
,
icon
:
"el-icon-reading"
,
index
:
"external-resource-manage"
,
subs
:
[
{
title
:
"外部资源列表"
,
icon
:
"el-icon-document"
,
index
:
"external-resource-manage"
,
},
],
};
goToMessageSendPage
(
checkAuth
)
{
if
(
checkAuth
){
utils
.
checkAuthFunc
().
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
==
3
){
}
else
{
return
}
let
env
=
process
.
env
.
BUILD_ENV
;
let
src
=
''
;
if
(
(
env
==
'development'
)
||
(
env
==
'dev'
)
){
// 本地开发环境 || jenkins dev
src
=
'https://dev-saas.yunqueyi.com/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message'
}
else
if
(
(
env
==
'test'
)
||
(
env
==
'test2'
)
){
// test
src
=
'https://test1.yunqueyi.com/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message'
;
}
else
if
(
env
==
'uat'
){
// uat
src
=
'https://uat.yunqueyi.com/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message'
;
}
else
if
(
env
==
'pro'
){
// 线上
src
=
'https://www.yunqueyi.com/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message'
;
}
location
.
href
=
src
;
// let newTab=window.open('about:blank'
);
// newTab.location = src;
})
vm
.
items
[
1
].
subs
.
push
(
subjectManager
);
vm
.
items
[
1
].
subs
.
push
(
itemComponent
);
vm
.
items
[
1
].
subs
.
push
(
templateManager
);
vm
.
items
[
1
].
subs
.
push
(
followSider
);
vm
.
items
[
1
].
subs
.
push
(
advertSimpleManage
);
vm
.
items
[
1
].
subs
.
push
(
reportDownLoad
);
vm
.
items
.
push
(
eduRole
);
vm
.
items
.
push
(
cme
);
vm
.
items
.
push
(
yqRange
)
;
vm
.
items
.
push
(
outResourceManage
)
;
},
setShopSide
()
{
queryShopAuth
().
then
((
res
)
=>
{
// 0 表示超级管理员,大于0 表示小店或供应商,null 表示非法用户
if
(
res
.
data
>=
0
)
{
const
shop
=
{
title
:
"云鹊店铺"
,
icon
:
"el-icon-first-aid-kit"
,
index
:
"shop-list"
,
}
;
vm
.
items
.
push
(
shop
);
}
else
{
return
;
}
},
});
},
// judge/menu
setCircleSlide
()
{
circleMenu
({}).
then
((
res
)
=>
{
if
(
res
.
data
===
true
)
{
this
.
items
[
2
].
subs
.
push
({
title
:
'新建小圈权限分配'
,
icon
:
'el-icon-setting'
,
index
:
'circle-limit'
})
}
})
// judge/menu
setCircleSlide
()
{
circleMenu
({}).
then
((
res
)
=>
{
if
(
res
.
data
===
true
)
{
this
.
items
[
2
].
subs
.
push
({
title
:
'新建小圈权限分配'
,
icon
:
'el-icon-setting'
,
index
:
'circle-limit'
})
}
})
},
goToMessageSendPage
(
checkAuth
)
{
if
(
checkAuth
)
{
utils
.
checkAuthFunc
().
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
==
3
)
{
}
else
{
return
;
}
let
env
=
process
.
env
.
BUILD_ENV
;
let
src
=
""
;
if
(
env
==
"development"
||
env
==
"dev"
)
{
// 本地开发环境 || jenkins dev
src
=
"https://dev-saas.yunqueyi.com/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message"
;
}
else
if
(
env
==
"test"
||
env
==
"test2"
)
{
// test
src
=
"https://test1.yunqueyi.com/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message"
;
}
else
if
(
env
==
"uat"
)
{
// uat
src
=
"https://uat.yunqueyi.com/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message"
;
}
else
if
(
env
==
"pro"
)
{
// 线上
src
=
"https://www.yunqueyi.com/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message"
;
}
location
.
href
=
src
;
// let newTab=window.open('about:blank');
// newTab.location = src;
});
}
}
}
},
// judge/menu
setCircleSlide
()
{
circleMenu
({}).
then
((
res
)
=>
{
if
(
res
.
data
===
true
)
{
this
.
items
[
2
].
subs
.
push
({
title
:
"新建小圈权限分配"
,
icon
:
"el-icon-setting"
,
index
:
"circle-limit"
,
});
}
});
},
},
};
</
script
>
<
style
lang=
"scss"
>
.slidebar-container
{
display
:
block
;
position
:
absolute
;
left
:
0
;
top
:
64px
;
bottom
:
0
;
width
:
255px
;
background
:
#06232C
;
overflow-y
:
scroll
;
.el-menu
{
background
:
#06232C
;
border-right
:
none
;
.sub-icon
{
font-size
:
12px
;
}
.el-menu-item
,
.el-submenu__title
{
color
:
#8FA4AC
;
}
.el-menu-item.is-active
{
color
:
#fff
;
background
:
#509284
!
important
}
.el-menu-item
:hover
,
.el-submenu__title
:hover
,
.slidebar-container
.el-menu
.el-menu-item
:hover
,
.slidebar-container
.el-menu
.el-submenu__title
:hover
{
color
:
#fff
;
background
:
#06232C
;
}
// .el-menu-item:focus, .el-menu-item:hover {
// background: #06232C !important;
// }
.el-icon-patients-manage
{
width
:
17px
;
height
:
17px
;
background
:
url('../../assets/image/patients-icon.png')
;
margin
:
0
8px
0
3px
;
background-size
:
17px
17px
;
opacity
:
0
.6
;
}
.set-normal-background
{
background
:
#06232C
;
}
.slidebar-container
{
display
:
block
;
position
:
absolute
;
left
:
0
;
top
:
64px
;
bottom
:
0
;
width
:
255px
;
background
:
#06232c
;
overflow-y
:
scroll
;
.el-menu
{
background
:
#06232c
;
border-right
:
none
;
.sub-icon
{
font-size
:
12px
;
}
.
redNum
{
display
:
inline-block
;
border-radius
:
10px
;
margin-left
:
15px
;
background
:
#EE263E
;
.
el-menu-item
,
.el-submenu__title
{
color
:
#8fa4ac
;
}
.el-menu-item.is-active
{
color
:
#fff
;
font-size
:
12px
;
line-height
:
12px
;
/*padding: 5px 10px;*/
padding
:
2px
5px
;
span
{
display
:
block
;
}
background
:
#509284
!
important
;
}
.el-menu-item
:hover
,
.el-submenu__title
:hover
,
.slidebar-container
.el-menu
.el-menu-item
:hover
,
.slidebar-container
.el-menu
.el-submenu__title
:hover
{
color
:
#fff
;
background
:
#06232c
;
}
// .el-menu-item:focus, .el-menu-item:hover {
// background: #06232C !important;
// }
.el-icon-patients-manage
{
width
:
17px
;
height
:
17px
;
background
:
url("../../assets/image/patients-icon.png")
;
margin
:
0
8px
0
3px
;
background-size
:
17px
17px
;
opacity
:
0
.6
;
}
.set-normal-background
{
background
:
#06232c
;
}
}
.redNum
{
display
:
inline-block
;
border-radius
:
10px
;
margin-left
:
15px
;
background
:
#ee263e
;
color
:
#fff
;
font-size
:
12px
;
line-height
:
12px
;
/*padding: 5px 10px;*/
padding
:
2px
5px
;
span
{
display
:
block
;
}
}
}
</
style
>
src/views/shop/create-shop.vue
浏览文件 @
84ba7c43
...
...
@@ -705,6 +705,7 @@
// adminList:this.formData.adminList,
// }
this.formData.storeType = Number(this.formData.storeType);
this.formData.storeEntry = 'PCKAIDIAN'; // 添加店铺渠道
console.log('提交的数据',this.formData)
saveStore(this.formData).then(res => {
if (res.code == '000000') {
...
...
src/views/yqrange/create-live.vue
浏览文件 @
84ba7c43
...
...
@@ -404,6 +404,26 @@
<!--<p class="upload-message" v-if="uploadImgMessage2">请选择直播封面</p>-->
</div>
<el-form-item
label=
"是否显示有奖问答tab"
v-if=
"idType == 1"
>
<el-radio-group
v-model=
"formData.qa"
size=
"small"
@
change=
"changeTab"
>
<el-radio
:label=
"0"
>
否
</el-radio>
<el-radio
:label=
"1"
>
是
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"有奖问答关联考试"
v-if=
"idType == 1 && formData.qa == 1"
class=
"required-label"
>
<el-col
:span=
"18"
>
<el-select
filterable
v-model=
"formData.qaId"
placeholder=
"请选择有奖问答关联考试"
style=
"width:88%"
>
<el-option
v-for=
"item2 in examAwardList"
:key=
"item2.id"
:label=
"item2.name"
:value=
"item2.id"
>
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item
label=
"直播角色"
v-if=
"formData.streamType == 1"
>
<div
style=
"color:#666666;font-size:10px;"
>
主播(必填)
</div>
...
...
@@ -571,7 +591,7 @@
import
{
isEmptyUtils
,
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
,
unsubscribe
}
from
"../../utils/qiniu-util"
;
import
{
checkMobile
}
from
'../../utils/patients/checkValid'
;
import
{
getRtcInfo
,
getImages
,
searchDoc
}
from
"../../utils/yqrange/yqrangeApi"
;
import
{
getRtcInfo
,
getImages
,
searchDoc
,
getExamAwardList
}
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";
...
...
@@ -670,8 +690,11 @@
}],
isSign: 0,
signMinute: "",
isAppPush: 0
isAppPush: 0,
qa:0,
qaId: ""
},
examAwardList: [],
checked: false,
signFlag: false,
tabFlag: "
0
",
...
...
@@ -679,6 +702,7 @@
backgroundImageUrlTemp: "",
backgroundImages: [],
backgroundImageUrl: "",
introTextNum: 0,
rtcIntroducesText:[],
rtcIntroducesImages: [],
...
...
@@ -716,14 +740,15 @@
oriUrl: '', // 原图
},
cropperIndex: "",
nowInput: 0,
idType: "",
pickerOptions0: {
disabledDate: time => {
// 在科学计数法中,为了使公式简便,可以用带“E”的格式表示。例如1.03乘10的8次方,可简写为“1.03e8”的形式
// 一天是24*60*60*1000 = 86400000 = 8.64e7
// console.log('this.maxDate',this.maxDate)
return time.getTime() < Date.now() - 8.64e7
},
nowInput: 0
}
},
rules: {
name: [
...
...
@@ -807,7 +832,8 @@
vm = this;
// 区分内部用户和外部用户
let idType = localStorage.getItem('storageIdType');
this.idType = localStorage.getItem('storageIdType');
// this.idType = 1; // TODO
this.circleId = this.$route.query.circleId;
this.circleName = this.$route.query.circleName;
this.curmbSecond = "
圈子管理
-
" + this.circleName;
...
...
@@ -828,6 +854,7 @@
this.curmbThird = "
编辑直播
";
this.initRtcInfo(this.rtcId);
}
this.getExamAwardList();
},
methods: {
...
...
@@ -922,6 +949,33 @@
// this.$message.warning('正在上传,请稍等')
// }
},
getExamAwardList(){
let req = null;
getExamAwardList(req).then(function (res) {
if(res.code == "
000000
") {
vm.examAwardList = res.data;
// vm.formData = res.data;
}
}).catch(function (error) {
vm.$message.error(error);
});
},
checkQaId(){
if(vm.formData.qa == 1 && (vm.formData.qaId == null || vm.formData.qaId == "")){
vm.$message.error("
请选择有奖问答关联考试!
");
return false;
}
else {
return true;
}
},
//上传直播简介
beforeUploadPic1(file) {
vm.cropperIndex = 10;
...
...
@@ -1805,6 +1859,17 @@
if(!this.checkTab()){
return;
}
// 内部运营人员
if(this.idType == 1){
// 检查有奖问答关联考试
if(!this.checkQaId()){
return;
}
if(this.formData.qa == 0){
this.formData.qaId = null;
}
}
// 校验嘉宾姓名和手机号
if(!this.checkGuests()){
...
...
src/views/yqrange/range-manage.vue
浏览文件 @
84ba7c43
...
...
@@ -21,6 +21,12 @@
<el-tab-pane
label=
"应用配置"
name=
"fourth"
>
<range-setting></range-setting>
</el-tab-pane>
<el-tab-pane
label=
"广告位管理"
name=
"five"
v-if=
"idType == 1"
>
<ads-manage></ads-manage>
</el-tab-pane>
<el-tab-pane
label=
"排行榜管理"
name=
"six"
v-if=
"idType == 1"
>
<gp-ranking></gp-ranking>
</el-tab-pane>
</el-tabs>
</div>
<div
v-if=
"active == 4"
>
...
...
@@ -39,8 +45,12 @@ import { getRangeList,updateRangeStatus, getCircleSettingList, saveCircleSetting
import
LiveManage
from
"./live-manage"
;
import
RangeSetting
from
"./range-setting"
;
import
Mebman
from
"../../components/yqrange/mebman"
;
import
AdsManage
from
"../../components/yqrange/ads-manage"
;
import
GpRanking
from
"../../components/yqrange/gp-ranking"
;
export
default
{
components
:
{
GpRanking
,
AdsManage
,
Mebman
,
RangeSetting
,
LiveManage
,
...
...
@@ -71,11 +81,14 @@ export default {
circleId
:
null
,
name
:
""
,
active
:
0
,
roleType
:
''
roleType
:
''
,
idType
:
''
}
},
created
()
{
const
{
id
,
name
,
activeName
,
roleType
}
=
this
.
$route
.
query
;
this
.
idType
=
localStorage
.
getItem
(
'storageIdType'
);
// this.idType = 1;// TODO
this
.
circleId
=
id
;
this
.
name
=
name
;
this
.
activeName
=
activeName
;
...
...
src/views/yqrange/range-setting.vue
浏览文件 @
84ba7c43
...
...
@@ -86,7 +86,9 @@ export default {
if
(
res
.
code
==
"000000"
)
{
this
.
settingForm
.
settingData
=
res
.
data
;
}
else
{
// this.$message.error(res.data.message);
this
.
settingForm
.
settingData
=
[];
}
if
(
this
.
settingForm
.
settingData
==
[]
||
this
.
settingForm
.
settingData
.
length
==
0
){
...
...
@@ -106,9 +108,14 @@ export default {
{
appTag
:
4
,
showOff
:
1
},
{
appTag
:
5
,
showOff
:
0
}];
}
for
(
let
i
=
0
;
i
<
this
.
settingForm
.
settingData
.
length
;
i
++
){
if
(
this
.
settingForm
.
settingData
[
i
].
appTag
==
1
){
this
.
settingForm
.
settingData
[
i
].
appTagName
=
"教培"
...
...
@@ -122,9 +129,11 @@ export default {
else
if
(
this
.
settingForm
.
settingData
[
i
].
appTag
==
4
){
this
.
settingForm
.
settingData
[
i
].
appTagName
=
"职称培训"
}
else
if
(
this
.
settingForm
.
settingData
[
i
].
appTag
==
5
){
this
.
settingForm
.
settingData
[
i
].
appTagName
=
"云鹊豆商城"
}
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
"请重试"
);
})
...
...
src/views/yqrange/yq-range.vue
浏览文件 @
84ba7c43
...
...
@@ -167,7 +167,8 @@ export default {
settingForm
:{
circleId
:
null
,
settingData
:
[]
}
},
idType
:
""
}
},
created
()
{
...
...
@@ -179,21 +180,21 @@ export default {
tabChangeHandler
(
tab
)
{},
initPrivilege
(){
let
idType
=
localStorage
.
getItem
(
'storageIdType'
);
this
.
idType
=
localStorage
.
getItem
(
'storageIdType'
);
// if(idType == null || idType == ""){
// idType = 2;
// localStorage.setItem('storageIdType', idType);
// }
this
.
searchForm
.
userType
=
idType
;
this
.
searchForm
.
userType
=
this
.
idType
;
// 内部用户:运营人员
if
(
idType
==
"1"
){
if
(
this
.
idType
==
"1"
){
this
.
showAllFlag
=
true
;
this
.
showNewFlag
=
true
;
this
.
showApplyFlag
=
true
;
}
// 外部用户
else
if
(
idType
==
"2"
){
else
if
(
this
.
idType
==
"2"
){
this
.
showAllFlag
=
false
;
setTimeout
(()
=>
{
this
.
getUserAuth
();
...
...
@@ -355,7 +356,7 @@ export default {
id
:
row
.
id
,
name
:
row
.
name
,
activeName
:
'first'
,
roleType
:
row
.
roleId
roleType
:
row
.
roleId
,
}
})
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录