Commit 5c18a878 authored by dingyoujian's avatar dingyoujian

自动生成按钮

parent 451106d8
......@@ -43,6 +43,18 @@ export function doQueryZyfl(query) {
})
}
/**
* 生成危险作业
* in:id
*/
export function doAutoGen(query) {
return request({
url: '/aqgl/rcgl/wxzybz/genWxzy',
method: 'post',
data: query||{}
})
}
......@@ -23,6 +23,7 @@
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<!-- 额外按钮-->
<el-button size='mini' @click.native="autoGen()" type="primary">生成作业</el-button>
<!-- 表头设置 -->
<!-- 权限-->
......@@ -44,7 +45,8 @@
doQuery,
doAdd,
doUpdate,
doDelete
doDelete,
doAutoGen
} from '@/api/daily/maintenanceStandards';
/* edit页面*/
import Edit from './edit'
......@@ -97,6 +99,18 @@
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
autoGen() {
if (this.app.selectOne || this.app.clickOne) {
doAutoGen(this.singleItem).then(res=>{
if(res.success){
this.$success('生成作业成功!')
}
})
}else{
this.$warning('请选中标准进行操作!');
}
},
/* 初始化赋值操作*/
init() {
......
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