Commit 8991b9e4 authored by 黄自鹏's avatar 黄自鹏

调整

parent 02cc7407
...@@ -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||{}
})
}
......
...@@ -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: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment