Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zhongtai-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
chenweiping
zhongtai-ui
Commits
8c2283dd
提交
8c2283dd
authored
9月 04, 2021
作者:
林国禄
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
初始化
上级
a4e8226d
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
23 行增加
和
208 行删除
+23
-208
point.js
src/api/backstage/point.js
+9
-1
index.vue
src/views/backstage/point/index.vue
+14
-207
没有找到文件。
src/api/backstage/point.js
浏览文件 @
8c2283dd
import
request
from
'@/utils/request'
// 查询统计点列表(级联列表)
export
function
cascadeList
(
type
)
{
return
request
({
url
:
'/backstage/point/cascadeList?type='
+
type
,
method
:
'get'
})
}
// 查询统计点列表
export
function
listPoint
(
query
)
{
return
request
({
...
...
src/views/backstage/point/index.vue
浏览文件 @
8c2283dd
...
...
@@ -164,25 +164,17 @@
<el-form-item
label=
"密码"
prop=
"password"
>
<el-input
placeholder=
"请输入密码"
v-model=
"form.password"
show-password
></el-input>
</el-form-item>
<!-- <el-form-item v-if="this.statisticsPointsType == '2'" label="所属省级" prop="password">-->
<!-- <el-select v-model="provinceId" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in provinceList"-->
<!-- :key="item.id"-->
<!-- :label="item.name"-->
<!-- :value="item.id">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item
label=
"所属层级"
prop=
"password"
>
<el-form-item
v-if=
"this.statisticsPointsType != '1'"
label=
"所属层级"
prop=
"password"
>
<div
class=
"block"
>
<span
class=
"demonstration"
>
hover 触发子菜单
</span>
<span
class=
"demonstration"
></span>
<el-cascader
style=
"width: 100%"
v-model=
"levelValue"
:options=
"levelOptions"
:props=
"{ expandTrigger: 'hover' }"
@
change=
"handleChange"
></el-cascader>
@
change=
"handleChange"
clearable
></el-cascader>
</div>
</el-form-item>
...
...
@@ -211,116 +203,15 @@
</template>
<
script
>
import
{
listPoint
,
getPoint
,
delPoint
,
addPoint
,
updatePoint
,
exportPoint
}
from
"@/api/backstage/point"
;
import
{
cascadeList
,
listPoint
,
getPoint
,
delPoint
,
addPoint
,
updatePoint
,
exportPoint
}
from
"@/api/backstage/point"
;
export
default
{
name
:
"Point"
,
data
()
{
return
{
//级联选择器相关
levelValue
:
[],
levelOptions
:
[{
value
:
'zhinan'
,
label
:
'指南'
,
children
:
[{
value
:
'shejiyuanze'
,
label
:
'设计原则'
,
children
:
[{
value
:
'yizhi'
,
label
:
'一致'
},
{
value
:
'fankui'
,
label
:
'反馈'
},
{
value
:
'xiaolv'
,
label
:
'效率'
},
{
value
:
'kekong'
,
label
:
'可控'
}]
},
{
value
:
'daohang'
,
label
:
'导航'
,
children
:
[{
value
:
'cexiangdaohang'
,
label
:
'侧向导航'
},
{
value
:
'dingbudaohang'
,
label
:
'顶部导航'
}]
}]
},
{
value
:
'zujian'
,
label
:
'组件'
,
children
:
[{
value
:
'basic'
,
label
:
'Basic'
,
children
:
[{
value
:
'layout'
,
label
:
'Layout 布局'
},
{
value
:
'color'
,
label
:
'Color 色彩'
},
{
value
:
'typography'
,
label
:
'Typography 字体'
},
{
value
:
'icon'
,
label
:
'Icon 图标'
},
{
value
:
'button'
,
label
:
'Button 按钮'
}]
},
{
value
:
'notice'
,
label
:
'Notice'
,
children
:
[{
value
:
'alert'
,
label
:
'Alert 警告'
},
{
value
:
'loading'
,
label
:
'Loading 加载'
},
{
value
:
'message'
,
label
:
'Message 消息提示'
},
{
value
:
'message-box'
,
label
:
'MessageBox 弹框'
},
{
value
:
'notification'
,
label
:
'Notification 通知'
}]
},
{
value
:
'navigation'
,
label
:
'Navigation'
,
},
{
value
:
'others'
,
label
:
'Others'
,
}]
},
{
value
:
'ziyuan'
,
label
:
'资源'
,
children
:
[{
value
:
'axure'
,
label
:
'Axure Components'
},
{
value
:
'sketch'
,
label
:
'Sketch Templates'
},
{
value
:
'jiaohu'
,
label
:
'组件交互文档'
}]
}],
provinceList
:
[],
//省级列表
cityList
:
[],
//市级列表
countyList
:
[],
//县级列表
townshipList
:
[],
//乡级列表
villageList
:
[],
//村级列表
//所属省级id
provinceId
:
null
,
levelOptions
:
[],
//统计点类型对象
statisticsPointsTypeObj
:
[
{
label
:
1
,
name
:
"省级(省份/直辖市/自治区)"
},
...
...
@@ -429,9 +320,6 @@ export default {
handleAdd
()
{
this
.
statisticsPointsType
=
''
;
this
.
addStatisticsTypeStatus
=
true
;
// this.reset();
// this.open = true;
// this.title = "添加统计点";
},
//选择新增类型确定按钮
handleAddStatisticsPointsType
(){
...
...
@@ -446,94 +334,12 @@ export default {
this
.
open
=
true
;
this
.
title
=
"添加"
+
titleName
+
"统计点"
;
//获取所有统计点数据并处理
listPoint
().
then
(
res
=>
{
let
list
=
res
.
rows
;
let
provinceList
=
[];
//省级列表
let
cityList
=
[];
//市级列表
let
countyList
=
[];
//县级列表
let
townshipList
=
[];
//乡级列表
let
villageList
=
[];
//村级列表
// list.map(item=>{
// if(item.type == "1"){
// provinceList.push(item);
// }else if(item.type == "2"){
// cityList.push(item);
// }else if(item.type == "3"){
// countyList.push(item);
// }else if(item.type == "4"){
// townshipList.push(item);
// }else if(item.type == "5"){
// villageList.push(item);
// }
// });
//
// this.provinceList = provinceList;
// this.cityList = cityList;
// this.countyList = countyList;
// this.townshipList = townshipList;
// this.villageList = villageList;
list
.
map
(
item
=>
{
if
(
item
.
type
==
"1"
){
let
options
=
{};
//级联对象
options
.
value
=
item
.
id
;
options
.
label
=
item
.
name
;
options
.
children
=
[];
provinceList
.
push
(
options
)
}
else
if
(
item
.
type
==
"2"
){
let
options
=
{};
//级联对象
options
.
value
=
item
.
id
;
options
.
label
=
item
.
name
;
options
.
children
=
[];
cityList
.
push
(
options
)
}
else
if
(
item
.
type
==
"3"
){
let
options
=
{};
//级联对象
options
.
value
=
item
.
id
;
options
.
label
=
item
.
name
;
options
.
children
=
[];
countyList
.
push
(
options
)
}
else
if
(
item
.
type
==
"4"
){
let
options
=
{};
//级联对象
options
.
value
=
item
.
id
;
options
.
label
=
item
.
name
;
options
.
children
=
[];
townshipList
.
push
(
options
)
}
else
if
(
item
.
type
==
"5"
){
let
options
=
{};
//级联对象
options
.
value
=
item
.
id
;
options
.
label
=
item
.
name
;
options
.
children
=
[];
villageList
.
push
(
options
)
}
});
this
.
provinceList
=
provinceList
;
this
.
cityList
=
cityList
;
this
.
countyList
=
countyList
;
this
.
townshipList
=
townshipList
;
this
.
villageList
=
villageList
;
let
optionsList
=
[];
if
(
this
.
statisticsPointsType
==
"2"
){
provinceList
.
map
(
item
=>
{
item
.
children
=
cityList
;
//获取所有统计点级联数据
if
(
this
.
statisticsPointsType
!=
'1'
){
cascadeList
(
this
.
statisticsPointsType
).
then
(
res
=>
{
this
.
levelOptions
=
res
.
data
;
});
}
else
if
(
this
.
statisticsPointsType
==
"3"
){
}
else
if
(
this
.
statisticsPointsType
==
"4"
){
}
else
if
(
this
.
statisticsPointsType
==
"5"
){
}
else
if
(
this
.
statisticsPointsType
==
"6"
){
}
this
.
levelOptions
=
optionsList
;
console
.
log
(
this
.
provinceList
);
console
.
log
(
this
.
levelOptions
);
});
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
...
...
@@ -555,6 +361,7 @@ export default {
if
(
valid
)
{
this
.
form
.
type
=
this
.
statisticsPointsType
;
//统计点类型
this
.
form
.
superiorId
=
this
.
levelValue
[
this
.
levelValue
.
length
-
1
];
//上级id
if
(
this
.
form
.
id
!=
null
)
{
updatePoint
(
this
.
form
).
then
(
response
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论