Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
contractmanage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
contractmanage
Commits
f1548048
Commit
f1548048
authored
Jun 24, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目加停用
parent
5aa69a48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
1 deletion
+97
-1
api.js
src/views/projectInfo/api.js
+16
-0
index.vue
src/views/projectInfo/index.vue
+81
-1
No files found.
src/views/projectInfo/api.js
View file @
f1548048
...
...
@@ -56,6 +56,22 @@ export function projectBYID(params) {
})
}
// 获取所有数据字典类型
export
function
getDictType
(
dictType
)
{
return
request
({
url
:
'/dictmanage/getDictByType/'
+
dictType
,
method
:
'get'
})
}
/** 停用*/
export
function
proDeactivate
(
data
)
{
return
request
({
url
:
'/sysproject/blockUp'
,
method
:
'put'
,
data
})
}
/** 项目表单查询 */
export
function
projectQuery
(
params
)
{
return
request
({
...
...
src/views/projectInfo/index.vue
View file @
f1548048
...
...
@@ -82,6 +82,13 @@
style=
"margin-left: 10px"
@
click=
"delProject(scope.row)"
>
删除
</el-link>
<el-link
v-if=
"scope.row.ZPROJECT || scope.row.ZFUND"
:underline=
"false"
type=
"danger"
style=
"margin-left: 10px "
@
click=
"stopUsing(scope.row)"
>
停用
</el-link>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -104,17 +111,49 @@
</div>
</div>
</el-dialog>
<el-dialog
width=
"50%"
title=
"停用"
:visible
.
sync=
"stopUsingDialog"
>
<el-form
ref=
"stopUseForm"
:model=
"stopUseForm"
>
<el-form-item
label=
"停用说明:"
prop=
"DEACTIVATEDESC"
:rules=
"[
{ required: true, message: '请选择停用说明', trigger: 'change' }
]"
>
<el-select
v-model=
"stopUseForm.DEACTIVATEDESC"
clearable
placeholder=
"请选择停用说明"
>
<el-option
v-for=
"item in stopOtions"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"clickStopUse"
>
确定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
projectQuery
,
projectDel
,
getDictAll
,
getPush
}
from
'@/views/projectInfo/api'
import
{
projectQuery
,
projectDel
,
getDictAll
,
getPush
,
getDictType
,
proDeactivate
}
from
'@/views/projectInfo/api'
import
{
Store
}
from
'@/utils/storage'
import
{
storeKey
}
from
'@/utils/auth'
export
default
{
name
:
'ProjectInfo'
,
data
()
{
return
{
stopOtions
:
[],
stopUseForm
:
{
DEACTIVATEDESC
:
''
,
ZSTATE
:
''
// ’0‘停用状态
},
stopUseParams
:
{
},
stopUsingDialog
:
false
,
jurisdiction
:
JSON
.
parse
(
Store
.
get
(
storeKey
.
user
)).
userId
,
// 毛斌,殷绮华,许靖莉账号,有查看权限用户,可以修改,推送,删除
projectPerList
:
[
'2017009369'
,
'2017009368'
,
'2016013051'
,
'2017013969'
,
'2017017971'
,
'2017013968'
,
...
...
@@ -158,12 +197,46 @@ export default {
}
},
mounted
()
{
this
.
findMap
()
this
.
getProjectData
()
},
created
()
{
this
.
getDictData
()
},
methods
:
{
/** 停用操作*/
clickStopUse
()
{
this
.
$refs
[
'stopUseForm'
].
validate
((
valide
,
object
)
=>
{
if
(
valide
)
{
const
row
=
{
DEACTIVATEDESC
:
this
.
stopUseForm
.
DEACTIVATEDESC
,
ZSTATE
:
'0'
}
const
params
=
JSON
.
stringify
(
Object
.
assign
(
this
.
stopUseParams
,
row
))
proDeactivate
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
'200'
)
{
this
.
stopUsingDialog
=
false
this
.
$message
({
type
:
'success'
,
message
:
'停用成功!'
})
this
.
getProjectData
()
}
else
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
msg
})
}
})
}
})
},
findMap
()
{
const
dictType
=
'ZSTOPREASON'
getDictType
(
dictType
).
then
(
res
=>
{
this
.
stopOtions
=
res
.
data
})
},
getDictData
()
{
getDictAll
().
then
(
res
=>
{
this
.
COUNTRYList
=
res
.
data
.
ZCOUNTRY
...
...
@@ -208,6 +281,13 @@ export default {
}
})
},
/** 停用操作*/
stopUsing
(
row
)
{
this
.
stopUseParams
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
this
.
stopUsingDialog
=
true
this
.
$refs
.
stopUseForm
.
clearValidate
()
// 清空验证
this
.
$refs
.
stopUseForm
.
resetFields
()
// 清空表单
},
/** 删除按钮 */
delProject
(
row
)
{
this
.
$confirm
(
'此操作将永久删除该数据, 是否继续?'
,
'提示'
,
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment