functionBrtton
This commit is contained in:
parent
2fb5240c9a
commit
1c2f425e78
|
@ -39,20 +39,17 @@
|
|||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['customfield_update'])"
|
||||
@click="handleEdit(scope)"
|
||||
>编辑
|
||||
</el-link
|
||||
>
|
||||
编辑
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="checkPermission(['customfield_delete'])"
|
||||
type="danger"
|
||||
@click="handleDeleteCustomfield(scope)"
|
||||
>删除
|
||||
</el-link
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
|
||||
<div style="margin-top: 2px">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增</el-button
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleCreate"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
|
@ -13,7 +16,7 @@
|
|||
:data="wftransitionList"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column width="180" label="名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
@ -34,29 +37,24 @@
|
|||
<el-table-column width="180" label="创建时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link @click="handleEdit(scope)">
|
||||
编辑
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="checkPermission(['wftransition_update'])"
|
||||
@click="handleEdit(scope)"
|
||||
>编辑</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="checkPermission(['wftransition_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
|
@ -70,13 +68,12 @@
|
|||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="wftransition.name" placeholder="名称" />
|
||||
<el-input v-model="wftransition.name" placeholder="名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="定时器(单位秒)" prop="timer">
|
||||
<el-input v-model="wftransition.timer" type="number" placeholder="0" />
|
||||
<el-input v-model="wftransition.timer" type="number" placeholder="0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="源状态" prop="source_state">
|
||||
|
||||
<el-select v-model="wftransition.source_state" placeholder="请选择" style="width:100%">
|
||||
<el-option
|
||||
v-for="item in stateoptions"
|
||||
|
@ -116,9 +113,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="是否校验必填" prop="field_require_check">
|
||||
<el-switch v-model="wftransition.field_require_check"></el-switch>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
|
@ -128,27 +123,34 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getWfStateList, getWfTransitionList, createWfTransition,updateWfTransition,deleteWfTransition } from "@/api/workflow";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import vueJsonEditor from 'vue-json-editor'
|
||||
import { genTree } from "@/utils"
|
||||
const defaultwftransition = {
|
||||
import {
|
||||
getWfStateList,
|
||||
getWfTransitionList,
|
||||
createWfTransition,
|
||||
updateWfTransition,
|
||||
deleteWfTransition
|
||||
} from "@/api/workflow";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import vueJsonEditor from 'vue-json-editor'
|
||||
import {genTree} from "@/utils"
|
||||
|
||||
const defaultwftransition = {
|
||||
name: "",
|
||||
};
|
||||
export default {
|
||||
components: { vueJsonEditor },
|
||||
};
|
||||
export default {
|
||||
components: {vueJsonEditor},
|
||||
name: "TST",
|
||||
props: ["ID"],
|
||||
data() {
|
||||
return {
|
||||
wftransition: defaultwftransition,
|
||||
condition_expression:false,
|
||||
condition_expression: false,
|
||||
/*wftransitionList: {
|
||||
count:0
|
||||
},*/
|
||||
wftransitionList:[],
|
||||
lable:'',
|
||||
options_:[],
|
||||
wftransitionList: [],
|
||||
lable: '',
|
||||
options_: [],
|
||||
options: [{
|
||||
value: 1,
|
||||
label: '同意'
|
||||
|
@ -160,11 +162,11 @@ export default {
|
|||
label: '其他'
|
||||
}],
|
||||
|
||||
stateoptions:[],
|
||||
stateoptions: [],
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
|
||||
|
||||
},
|
||||
|
@ -233,7 +235,7 @@ export default {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
this.wftransition.workflow=this.ID;
|
||||
this.wftransition.workflow = this.ID;
|
||||
createWfTransition(this.wftransition).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
|
@ -263,5 +265,5 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue