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
提交
547a847d
提交
547a847d
编写于
3月 30, 2021
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
KOL管理新增与逻辑处理
上级
68aff6d2
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
74 行增加
和
4 行删除
+74
-4
kol-manage.vue
src/components/yqrange/kol-manage.vue
+74
-4
未找到文件。
src/components/yqrange/kol-manage.vue
浏览文件 @
547a847d
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<p>
{{
scope
.
row
[
item
.
prop
]
}}
</p>
<p>
{{
scope
.
row
[
item
.
prop
]
}}
</p>
<div
v-if=
"item.prop === 'operate'"
>
<div
v-if=
"item.prop === 'operate'"
>
<el-button
size=
"small"
>
移除
</el-button>
<el-button
size=
"small"
@
click=
"deleteItem(scope.$index)"
>
移除
</el-button>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -48,6 +48,41 @@
...
@@ -48,6 +48,41 @@
<el-button
type=
"primary"
@
click=
"handleSave"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"handleSave"
>
保存
</el-button>
</el-row>
</el-row>
</el-row>
</el-row>
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"addFormVisible"
:close-on-press-escape=
"false"
:close-on-click-modal=
"false"
>
<el-form
ref=
"addForm"
:rules=
"rules2"
:model=
"addForm"
label-width=
"150px"
label-suffix=
":"
size=
"small"
>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-select
v-model=
"addForm.name"
filterable
remote
placeholder=
"请输入专家姓名或医院名称,多个关键字用空格隔开"
clearable
style=
"width: 100%;"
:remote-method=
"remoteMethod"
@
change=
"nameChange"
@
visible-change=
"noSelectHand"
>
<el-option
v-for=
"item in nameList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
<span>
{{item.value}}
</span>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"submitForm('addForm')"
>
确 定
</el-button>
<el-button
size=
"small"
@
click=
"addFormVisible = false"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -65,6 +100,12 @@ export default {
...
@@ -65,6 +100,12 @@ export default {
name
:
''
,
name
:
''
,
resource
:
'2'
resource
:
'2'
},
},
dialogTitle
:
'添加KOL'
,
addFormVisible
:
false
,
addForm
:
{
name
:
''
,
},
nameList
:
[],
rules
:
{
rules
:
{
resource
:
[
resource
:
[
{
required
:
true
,
message
:
'请选择是否展示入口'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请选择是否展示入口'
,
trigger
:
'blur'
}
...
@@ -74,6 +115,11 @@ export default {
...
@@ -74,6 +115,11 @@ export default {
{
max
:
6
,
message
:
'入口文案长度不能多于6个字符'
,
trigger
:
'blur'
}
{
max
:
6
,
message
:
'入口文案长度不能多于6个字符'
,
trigger
:
'blur'
}
]
]
},
},
rules2
:
{
name
:
[
{
required
:
true
,
message
:
'请输入专家姓名或医院名称,多个关键字用空格隔开'
,
trigger
:
'change'
},
],
},
col
:
kolCol
,
col
:
kolCol
,
tableData
:
[
tableData
:
[
{
{
...
@@ -99,11 +145,35 @@ export default {
...
@@ -99,11 +145,35 @@ export default {
methods
:
{
methods
:
{
rowDrop
()
{
rowDrop
()
{
const
tbody
=
document
.
querySelector
(
'#kolTable tbody'
);
const
tbody
=
document
.
querySelector
(
'#kolTable tbody'
);
Sortable
.
create
(
tbody
);
Sortable
.
create
(
tbody
);
},
},
handleAdd
()
{},
handleAdd
()
{
handleSave
()
{}
this
.
addFormVisible
=
true
;
if
(
this
.
$refs
[
'addForm'
])
{
this
.
$refs
[
'addForm'
].
resetFields
();
}
},
handleSave
()
{
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// console.log('form校验通过')
}
});
},
deleteItem
(
index
)
{
this
.
tableData
.
splice
(
index
,
1
);
},
remoteMethod
(){},
nameChange
()
{},
noSelectHand
()
{},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
// console.log('form校验通过')
this
.
addFormVisible
=
false
;
}
});
},
},
},
}
}
</
script
>
</
script
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录