Commit 5c18a878 authored by dingyoujian's avatar dingyoujian

自动生成按钮

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