Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
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
李苏
sgaqgl-vue
Commits
8991b9e4
Commit
8991b9e4
authored
Dec 24, 2022
by
黄自鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
02cc7407
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
3 deletions
+65
-3
tsubject.js
src/api/train/tsubject.js
+14
-1
index.vue
src/views/train/tsubject/index.vue
+51
-2
No files found.
src/api/train/tsubject.js
View file @
8991b9e4
...
@@ -30,7 +30,20 @@ method: 'post',
...
@@ -30,7 +30,20 @@ method: 'post',
data
:
query
||
{}
data
:
query
||
{}
})
})
}
}
export
function
publish
(
query
)
{
return
request
({
url
:
'aqgl/pxgl/pxxm/publish'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
unPublish
(
query
)
{
return
request
({
url
:
'aqgl/pxgl/pxxm/unPublish'
,
method
:
'post'
,
data
:
query
||
{}
})
}
...
...
src/views/train/tsubject/index.vue
View file @
8991b9e4
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
<FieldButton
:app=
'app'
></FieldButton>
<FieldButton
:app=
'app'
></FieldButton>
<ExcelButton
:app=
'app'
></ExcelButton>
<ExcelButton
:app=
'app'
></ExcelButton>
<!-- 额外按钮-->
<!-- 额外按钮-->
<el-button
@
click=
"fbtk"
size=
'mini'
type=
"primary"
>
发布题库
</el-button>
<el-button
@
click=
"qxfbtk"
size=
'mini'
type=
"primary"
>
取消发布
</el-button>
<!-- 表头设置 -->
<!-- 表头设置 -->
<!-- 权限-->
<!-- 权限-->
...
@@ -44,7 +46,10 @@
...
@@ -44,7 +46,10 @@
doQuery
,
doQuery
,
doAdd
,
doAdd
,
doUpdate
,
doUpdate
,
doDelete
doDelete
,
publish
,
unPublish
}
from
'@/api/train/tsubject'
;
}
from
'@/api/train/tsubject'
;
/* edit页面*/
/* edit页面*/
import
Edit
from
'./edit'
import
Edit
from
'./edit'
...
@@ -77,6 +82,7 @@
...
@@ -77,6 +82,7 @@
{
label
:
"编码"
,
prop
:
"code"
,
fieldType
:
"ftString"
,
width
:
240
},
{
label
:
"编码"
,
prop
:
"code"
,
fieldType
:
"ftString"
,
width
:
240
},
{
label
:
"公司"
,
prop
:
"gsName"
,
fieldType
:
"ftString"
,
width
:
192
},
{
label
:
"公司"
,
prop
:
"gsName"
,
fieldType
:
"ftString"
,
width
:
192
},
{
label
:
"名称"
,
prop
:
"name"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"名称"
,
prop
:
"name"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"状态"
,
prop
:
"ztName"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"备注"
,
prop
:
"bz"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"备注"
,
prop
:
"bz"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"维护人"
,
prop
:
"whr"
,
fieldType
:
"ftString"
},
{
label
:
"维护人"
,
prop
:
"whr"
,
fieldType
:
"ftString"
},
{
label
:
"维护时间"
,
prop
:
"whsj"
,
fieldType
:
"ftDateTime"
},
{
label
:
"维护时间"
,
prop
:
"whsj"
,
fieldType
:
"ftDateTime"
},
...
@@ -86,6 +92,50 @@
...
@@ -86,6 +92,50 @@
}
}
},
},
methods
:
{
methods
:
{
fbtk
(){
if
(
this
.
app
.
selectOne
||
this
.
app
.
clickOne
)
{
this
.
$confirm
(
'确定发布该题库吗, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
publish
({
id
:
this
.
singleItem
.
id
}).
then
(
res
=>
{
if
(
res
.
success
){
this
.
$success
(
'该题库发布成功!'
)
this
.
$refs
.
TablePager
.
pageQuery
()
}
})
// let id=this.singleItem.id
// this.$router.push({path: '/paper/'+id,query: { singleItem: this.singleItem}})
})
}
else
{
this
.
$warning
(
'请选中一行操作'
);
}
},
qxfbtk
(){
if
(
this
.
app
.
selectOne
||
this
.
app
.
clickOne
)
{
this
.
$confirm
(
'取消发布该题库吗, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
unPublish
({
id
:
this
.
singleItem
.
id
}).
then
(
res
=>
{
if
(
res
.
success
){
this
.
$success
(
'题库取消发布成功!'
)
this
.
$refs
.
TablePager
.
pageQuery
()
}
})
// let id=this.singleItem.id
// this.$router.push({path: '/paper/'+id,query: { singleItem: this.singleItem}})
})
}
else
{
this
.
$warning
(
'请选中一行操作'
);
}
},
/* 基础查询*/
/* 基础查询*/
query
:
doQuery
,
query
:
doQuery
,
...
@@ -97,7 +147,6 @@
...
@@ -97,7 +147,6 @@
apiDelete
:
doDelete
,
apiDelete
:
doDelete
,
/* 初始化赋值操作*/
/* 初始化赋值操作*/
init
()
{
init
()
{
}
}
},
},
components
:
{
components
:
{
...
...
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