Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zhongtai-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
chenweiping
zhongtai-ui
Commits
0fa53bcd
提交
0fa53bcd
authored
9月 22, 2021
作者:
林国禄
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新指标
上级
33ef0f4d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
71 行增加
和
10 行删除
+71
-10
project.js
src/api/backstage/project.js
+9
-0
index.vue
src/views/backstage/project/index.vue
+62
-10
没有找到文件。
src/api/backstage/project.js
浏览文件 @
0fa53bcd
import
request
from
'@/utils/request'
// 是否发布项目
export
function
changeReleaseStatus
(
id
)
{
return
request
({
url
:
'/backstage/project/changeReleaseStatus/'
+
id
,
method
:
'put'
,
})
}
// 获取主题列表
export
function
getThemeList
()
{
return
request
({
...
...
src/views/backstage/project/index.vue
浏览文件 @
0fa53bcd
...
...
@@ -60,16 +60,27 @@
<el-table
v-loading=
"loading"
:data=
"projectList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"自增id"
align=
"center"
prop=
"id"
/
>
<!--
<el-table-column
label=
"自增id"
align=
"center"
prop=
"id"
/>
--
>
<el-table-column
label=
"项目名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"项目标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"调查范围"
align=
"center"
prop=
"scope"
/>
<el-table-column
label=
"提取码"
align=
"center"
prop=
"extractionCode"
/>
<el-table-column
label=
"主题id合集,用逗号分隔 (已弃用)"
align=
"center"
prop=
"itemIds"
/>
<el-table-column
label=
"是否发布数据 1已发布 0未发布"
align=
"center"
prop=
"isPublish"
/>
<el-table-column
label=
"状态 1正常 0删除"
align=
"center"
prop=
"status"
/>
<el-table-column
label=
"所选主题值"
align=
"center"
prop=
"itemSelectValue"
/>
<el-table-column
label=
"所选区域值"
align=
"center"
prop=
"areaSelectValue"
/>
<el-table-column
label=
"是否发布"
align=
"center"
prop=
"isPublish"
>
<template
scope=
"scope"
>
<el-switch
v-model=
"scope.row.isPublish"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-value=
"1"
inactive-value=
"0"
@
change=
"changeReleaseStatus(scope.row)"
>
</el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"考核主题数量"
align=
"center"
prop=
"targetCount"
>
<!-- <template scope="scope">-->
<!-- <el-button @click="getTargetListDetail(scope.row.id)" round type="success">{{scope.row.targetCount}}</el-button>-->
<!-- </template>-->
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
...
...
@@ -121,16 +132,34 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- 考核主题列表 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"themeListOpen"
width=
"500px"
append-to-body
>
<el-table
v-loading=
"themeListLoading"
:data=
"themeList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"主题名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"参与村数量"
align=
"center"
prop=
""
/>
<el-table-column
label=
"考核指标数量"
align=
"center"
prop=
"targetCount"
/>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
:disabled=
"repeatSubmit"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
getThemeList
,
listProject
,
getProject
,
delProject
,
addProject
,
updateProject
,
exportProject
}
from
"@/api/backstage/project"
;
import
{
changeReleaseStatus
,
getThemeList
,
listProject
,
getProject
,
delProject
,
addProject
,
updateProject
,
exportProject
}
from
"@/api/backstage/project"
;
export
default
{
name
:
"Project"
,
data
()
{
return
{
themeListLoading
:
false
,
themeListOpen
:
false
,
themeList
:
[],
//主题列表
themeSelectValueOptions
:
[],
// 不可重复提交
repeatSubmit
:
false
,
...
...
@@ -328,7 +357,30 @@ export default {
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
})
}
},
//改变发布状态
changeReleaseStatus
(
row
){
let
title
=
''
;
if
(
row
.
isPublish
==
'0'
){
title
=
'停止发布'
;
}
else
{
title
=
'发布'
;
}
this
.
$confirm
(
'是否确认'
+
title
+
'该项目?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
changeReleaseStatus
(
row
.
id
).
then
(
response
=>
{
this
.
msgSuccess
(
title
+
"成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}).
catch
(()
=>
{
this
.
getList
();
this
.
$message
.
error
(
'取消操作'
)
})
},
}
};
</
script
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论