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