Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zhongtai-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
chenweiping
zhongtai-ui
Commits
eee4a033
提交
eee4a033
authored
12月 31, 2021
作者:
黎业扬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
yang
上级
11025751
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
83 行增加
和
23 行删除
+83
-23
index.vue
src/views/backstage/project/index.vue
+83
-23
没有找到文件。
src/views/backstage/project/index.vue
浏览文件 @
eee4a033
...
...
@@ -182,12 +182,22 @@
<!-- 关联统计点弹出框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"statisticsPointOpen"
width=
"500px"
append-to-body
>
<div
class=
""
>
<el-tree
ref=
"tree"
:data=
"statisticsPoints"
show-checkbox
node-key=
"value"
:props=
"defaultProps"
@
check=
"handleTreeNodeClick"
></el-tree>
</div>
<div>
<el-form>
<
!-- <
el-form>
<el-form-item label="关联统计点" prop="adminVillageLevelValue">
<div class="block">
<!-- <span class="demonstration"></span>-->
<el-cascader
ref="cascader"
style="width: 100%"
key="id"
placeholder="请选择统计点"
...
...
@@ -196,10 +206,11 @@
:props="{multiple: true, expandTrigger: 'hover',checkStrictly: true}"
filterable
clearable
@change="handleChange"
></el-cascader>
</div>
</el-form-item>
</el-form>
</el-form>
-->
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -237,7 +248,7 @@
<
script
>
import
{
distributeRectificationTasks
,
getVillageList
,
getThemeListDetail
,
changeReleaseStatus
,
getThemeList
,
listProject
,
getProject
,
delProject
,
addProject
,
updateProject
,
exportProject
}
from
"@/api/backstage/project"
;
import
{
getStatisticalPointsList
}
from
"@/api/backstage/point"
;
import
{
getStatisticalPointsList
,
getAreaByParentId
}
from
"@/api/backstage/point"
;
export
default
{
name
:
"Project"
,
...
...
@@ -296,7 +307,13 @@ export default {
themeSelectValue
:
[
{
required
:
true
,
message
:
"主题不能为空,请选择主题"
,
trigger
:
"blur"
}
]
},
defaultProps
:
{
children
:
'children'
,
label
:
'label'
}
};
},
created
()
{
...
...
@@ -488,25 +505,38 @@ export default {
this
.
themeListOpen
=
true
;
});
},
//
关联统计点
//
点击关联统计点-按钮
relevantStatisticalPoints
(
row
){
// let that = this
// let key = [94, 93, 95, 96, 98, 97, 33, 9, 2, 91, 90, 89, 88, 87, 85, 84, 83, 71, 38, 41, 45, 47, 46, 44, 51, 50, 40, 43, 53, 52, 42, 56, 54, 3, 4, 68, 82, 69, 37, 62, 72, 67, 5, 73, 63, 31, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 10, 7, 6]
// that.$refs.tree.setCheckedKeys(key)
// 根据id获取当前项目关联的统计点
getProject
(
row
.
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
if
(
this
.
form
.
areaSelectValue
){
this
.
form
.
areaSelectValue
=
JSON
.
parse
(
this
.
form
.
areaSelectValue
);
this
.
form
.
areaSelectValue
=
JSON
.
parse
(
this
.
form
.
areaSelectValue
)
console
.
log
(
'获取关联统计点============'
,
this
.
form
.
areaSelectValue
)
//利用延时器,防止dom没加载完
setTimeout
(()
=>
{
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
form
.
areaSelectValue
)
console
.
log
(
'延时器'
)
},
500
)
}
})
;
})
getStatisticalPointsList
().
then
(
res
=>
{
this
.
statisticsPoints
=
res
.
data
;
this
.
title
=
'关联统计点'
;
this
.
statisticsPointOpen
=
true
;
console
.
log
(
'关联统计点============'
,
this
.
statisticsPoints
)
});
},
//关联统计点提交按钮
//关联统计点
——
提交按钮
statisticsPointSubmit
(
row
){
console
.
log
(
'关联统计点——提交按钮==='
,
row
.
areaSelectValue
)
console
.
log
(
'关联统计点——提交按钮==='
,
JSON
.
stringify
(
row
.
areaSelectValue
))
if
(
row
.
areaSelectValue
!=
null
&&
row
.
areaSelectValue
.
length
>
0
){
row
.
areaSelectValue
=
JSON
.
stringify
(
row
.
areaSelectValue
)
}
else
{
...
...
@@ -516,13 +546,39 @@ export default {
updateProject
(
row
).
then
(
response
=>
{
this
.
msgSuccess
(
"关联成功"
);
this
.
statisticsPointOpen
=
false
;
this
.
getList
();
this
.
getList
();
//刷新
}).
catch
(()
=>
{
if
(
row
.
areaSelectValue
){
row
.
areaSelectValue
=
JSON
.
parse
(
row
.
areaSelectValue
);
}
});
},
// 选择关联统计点时
handleChange
(
e
){
console
.
log
(
'选中的vlaue值=='
,
e
)
console
.
log
(
'tjd=============='
,
this
.
form
.
areaSelectValue
)
// console.log('全部的统计===',this.statisticsPoints)
// let nodesObj = this.$refs['cascader'].getCheckedNodes()
// console.log('当前选中的vlaue值==',nodesObj)
// let id = e[e.length-1]
// id = id[id.length-1]
// console.log('id==',id)
// getAreaByParentId(id).then(res => {
// if(res.code==200){
// }
// })
},
handleTreeNodeClick
(){
console
.
log
(
'选中的vlaue值=='
,
this
.
$refs
.
tree
.
getCheckedKeys
())
this
.
form
.
areaSelectValue
=
this
.
$refs
.
tree
.
getCheckedKeys
()
console
.
log
(
'关联的统计点=='
,
this
.
form
.
areaSelectValue
)
},
//派发整改任务按钮
distributeRectificationTasks
(
row
){
getVillageList
(
row
.
id
).
then
(
res
=>
{
...
...
@@ -562,3 +618,7 @@ export default {
}
};
</
script
>
<
style
scoped
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论