fix: 优化实例挂载表单选择页

approve-sys
tony 3 years ago
parent 20dc4a9b0c
commit 9b32e810bc

@ -194,11 +194,41 @@
</el-dialog> </el-dialog>
<!--挂载表单--> <!--挂载表单-->
<el-dialog :title="formDeployTitle" :visible.sync="formDeployOpen" width="30%" append-to-body> <el-dialog :title="formDeployTitle" :visible.sync="formDeployOpen" width="60%" append-to-body>
<el-select v-model="formDeployParam.formId" placeholder="请选择表单"> <el-row :gutter="24">
<el-option v-for="form in formList" :label="form.formName" :value="form.formId"/> <el-col :span="10" :xs="24">
</el-select> <el-table
<el-button type="primary" @click="submitFormDeploy"> </el-button> ref="singleTable"
:data="formList"
border
highlight-current-row
@current-change="handleCurrentChange"
style="width: 100%">
<el-table-column label="表单编号" align="center" prop="formId" />
<el-table-column label="表单名称" align="center" prop="formName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="submitFormDeploy(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<pagination
small
layout="prev, pager, next"
v-show="formTotal>0"
:total="formTotal"
:page.sync="formQueryParams.pageNum"
:limit.sync="formQueryParams.pageSize"
@pagination="ListFormDeploy"
/>
</el-col>
<el-col :span="14" :xs="24">
<div v-if="currentRow">
<parser :key="new Date().getTime()" :form-conf="currentRow" />
</div>
</el-col>
</el-row>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -240,7 +270,8 @@ export default {
formTitle: "", formTitle: "",
formDeployOpen: false, formDeployOpen: false,
formDeployTitle: "", formDeployTitle: "",
formList: null, formList: [],
formTotal:0,
formConf: {}, // formConf: {}, //
readImage:{ readImage:{
open: false, open: false,
@ -275,11 +306,16 @@ export default {
parentDeploymentId: null, parentDeploymentId: null,
engineVersion: null engineVersion: null
}, },
formQueryParams:{
pageNum: 1,
pageSize: 10,
},
//
formDeployParam:{ formDeployParam:{
formId: 0, formId: null,
deployId: null deployId: null
}, },
currentRow: null,
// xml // xml
xmlData:"", xmlData:"",
// //
@ -376,12 +412,13 @@ export default {
/** 挂载表单弹框 */ /** 挂载表单弹框 */
handleAddForm(row){ handleAddForm(row){
this.formDeployParam.deployId = row.deploymentId this.formDeployParam.deployId = row.deploymentId
const queryParams = { this.ListFormDeploy()
pageNum: 1, },
pageSize: 10 /** 挂载表单列表 */
} ListFormDeploy(){
listForm(queryParams).then(res =>{ listForm(this.formQueryParams).then(res =>{
this.formList = res.rows; this.formList = res.rows;
this.formTotal = res.total;
this.formDeployOpen = true; this.formDeployOpen = true;
this.formDeployTitle = "挂载表单"; this.formDeployTitle = "挂载表单";
}) })
@ -400,13 +437,19 @@ export default {
// }) // })
// }, // },
/** 挂载表单 */ /** 挂载表单 */
submitFormDeploy(){ submitFormDeploy(row){
this.formDeployParam.formId = row.formId;
addDeployForm(this.formDeployParam).then(res =>{ addDeployForm(this.formDeployParam).then(res =>{
this.msgSuccess(res.msg); this.msgSuccess(res.msg);
this.formDeployOpen = false; this.formDeployOpen = false;
this.getList(); this.getList();
}) })
}, },
handleCurrentChange(data) {
if (data) {
this.currentRow = JSON.parse(data.formContent);
}
},
/** 挂起/激活流程 */ /** 挂起/激活流程 */
handleUpdateSuspensionState(row){ handleUpdateSuspensionState(row){
let state = 1; let state = 1;

@ -228,7 +228,7 @@ export default {
this.loading = true; this.loading = true;
myProcessList(this.queryParams).then(response => { myProcessList(this.queryParams).then(response => {
this.myProcessList = response.data.records; this.myProcessList = response.data.records;
this.processTotal = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
}, },

Loading…
Cancel
Save