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
提交
a0b2eb20
提交
a0b2eb20
编写于
1月 06, 2021
作者:
alex.zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
应用设置UI调整,本地数据提交前有效性校验
上级
5afe2034
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
82 行增加
和
46 行删除
+82
-46
range-setting.vue
src/views/yqrange/range-setting.vue
+82
-46
未找到文件。
src/views/yqrange/range-setting.vue
浏览文件 @
a0b2eb20
...
...
@@ -4,7 +4,7 @@
<div
class=
"yqrange-index-content"
id=
"screenSet"
>
<!--
<div
class=
"header-title"
>
云鹊小圈
</div>
-->
<el-form
ref=
"settingForm"
:model=
"settingForm"
<
!--
<
el-form
ref=
"settingForm"
:model=
"settingForm"
label-width=
"150px"
label-suffix=
":"
class=
"basic-form"
>
...
...
@@ -21,10 +21,33 @@
<el-input
v-model=
"item.seqNo"
style=
"width:60px;margin-left:40px;"
size=
"small"
placeholder=
"序号"
/>
</el-form-item>
</div>
</el-form>
</el-form>
-->
<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=
""
width=
"180"
>
<template
slot-scope=
"scope"
>
<el-radio-group
size=
"small"
v-model=
"scope.row.showOff"
>
<el-radio
:label=
"1"
>
开启
</el-radio>
<el-radio
:label=
"0"
>
关闭
</el-radio>
</el-radio-group>
</
template
>
</el-table-column>
<el-table-column
label=
"重命名"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.appName"
style=
"width:120px;"
size=
"small"
placeholder=
"重命名"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"序号"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.seqNo"
style=
"width:60px;"
size=
"small"
placeholder=
"序号"
/>
</
template
>
</el-table-column>
</el-table>
<div
style=
"margin-top: 60px;margin-left: 150px;"
>
<el-button
type=
"primary"
@
click=
"
save
()"
center
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"
checkSubmitData
()"
center
>
保存
</el-button>
<!--<el-button @click="cancle()">取 消</el-button>-->
</div>
...
...
@@ -36,6 +59,7 @@
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
getRangeList
,
updateRangeStatus
,
getCircleSettingList
,
saveCircleSetting
}
from
"../../utils/yqrange/yqrangeApi"
;
import
{
isEmptyUtils
}
from
"../../utils/index"
;
export
default
{
components
:
{
...
...
@@ -82,57 +106,37 @@ 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){
// this.settingForm.settingData = [{
// appTag: 1,
// showOff: 1
// },
// {
// appTag: 2,
// showOff: 1
// },
// {
// appTag: 3,
// showOff: 1
// },
// {
// 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 = "教培"
// }
// else if(this.settingForm.settingData[i].appTag == 2){
// this.settingForm.settingData[i].appTagName = "直播"
// }
// else if(this.settingForm.settingData[i].appTag == 3){
// this.settingForm.settingData[i].appTagName = "继教课程"
// }
// 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
(
"请重试"
);
})
},
checkSubmitData
()
{
for
(
let
i
=
0
;
i
<
this
.
settingForm
.
settingData
.
length
;
i
++
)
{
if
(
isEmptyUtils
(
this
.
settingForm
.
settingData
[
i
].
seqNo
))
{
this
.
$message
.
error
(
"序号不可为空,请检查"
);
return
;
}
if
(
this
.
settingForm
.
settingData
[
i
].
seqNo
>
this
.
settingForm
.
settingData
.
length
)
{
this
.
$message
.
error
(
"序号必须从1开始顺序排列,不能有跳序情况,请检查"
);
return
;
}
for
(
let
j
=
0
;
j
<
this
.
settingForm
.
settingData
.
length
;
j
++
)
{
if
(
i
==
j
)
{
continue
;
}
if
(
this
.
settingForm
.
settingData
[
i
].
seqNo
==
this
.
settingForm
.
settingData
[
j
].
seqNo
)
{
this
.
$message
.
error
(
"序号不可重复,请检查"
);
return
;
}
}
}
this
.
save
();
},
// 保存
save
(){
let
params
=
{
...
...
@@ -199,4 +203,36 @@ export default {
/*margin-top: 30px;*/
/*}*/
/*}*/
// 去掉表格单元格边框
.customer-table
th
{
border
:none
;
}
.customer-table
td
,
.customer-table
th
.is-leaf
{
border
:none
;
}
// 表格最外边框
.el-table--border
,
.el-table--group
{
border
:
none
;
}
// 头部边框
.customer-table
thead
tr
th
.is-leaf
{
width
:
0
;
}
.customer-table
thead
tr
th
:nth-last-of-type
(
2
)
{
width
:
0
;
}
// 表格最外层边框-底部边框
.
el-table--border
:
:
after
,
.
el-table--group
::
after
{
width
:
0
;
}
.
customer-table
:
:
before
{
width
:
0
;
}
.
customer-table
.
el-table__fixed-right
:
:
before
,.
el-table__fixed
::
before
{
width
:
0
;
}
// 表格有滚动时表格头边框
.el-table--border
th
.gutter
:last-of-type
{
width
:
0
;
}
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录