mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-23 13:03:07 +00:00
增加节点视图配置
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
<div class="panelBody">
|
||||
<DefaultDetail :model="model" :onChange="onChange" :readOnly="readOnly" />
|
||||
</div>
|
||||
<div class="panelRow">
|
||||
<div>视图路径(以view开头)</div>
|
||||
<el-input style="width:90%; font-size:12px"
|
||||
:disabled="readOnly"
|
||||
type="view"
|
||||
:value="model.view"
|
||||
@input="(value) => {onChange('view', value)}" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
:value="model.duration"
|
||||
@input="(value) => {onChange('duration', value)}" />
|
||||
</div>
|
||||
<div class="panelRow">
|
||||
<div>视图路径(以view开头)</div>
|
||||
<el-input style="width:90%; font-size:12px"
|
||||
:disabled="readOnly"
|
||||
type="view"
|
||||
:value="model.view"
|
||||
@input="(value) => {onChange('view', value)}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
:disabled="readOnly"
|
||||
:value="model.assignValue"
|
||||
clearable
|
||||
allow-create
|
||||
multiple
|
||||
:filterable="true"
|
||||
:filter-method="filterUsers"
|
||||
@change="(e) => onChange('assignValue', e)">
|
||||
@@ -33,11 +33,11 @@
|
||||
<el-select style="width:90%; font-size:12px"
|
||||
:placeholder="'请选择角色'"
|
||||
:disabled="readOnly"
|
||||
multiple
|
||||
:value="model.assignValue"
|
||||
allow-create
|
||||
clearable
|
||||
:filterable="true"
|
||||
:filter-method="authorities"
|
||||
:filter-method="filterAuthorities"
|
||||
@change="(e) => onChange('assignValue', e)">
|
||||
<el-option v-for="authority in authoritiesCopy" :key="authority.id" :label="authority.name" :value="authority.id" />
|
||||
</el-select>
|
||||
@@ -49,7 +49,6 @@
|
||||
:placeholder="i18n['userTask.dueDate.placeholder']"
|
||||
:disabled="readOnly"
|
||||
:value="model.dueDate"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@input="(value) => onChange('dueDate', value)" />
|
||||
</div>
|
||||
<div class="panelRow">
|
||||
@@ -57,6 +56,14 @@
|
||||
:disabled="readOnly"
|
||||
:value="!!model.isSequential">{{i18n['userTask.counterSign']}}</el-checkbox>
|
||||
</div>
|
||||
<div class="panelRow">
|
||||
<div>视图路径(以view开头)</div>
|
||||
<el-input style="width:90%; font-size:12px"
|
||||
:disabled="readOnly"
|
||||
type="view"
|
||||
:value="model.view"
|
||||
@input="(value) => {onChange('view', value)}" />
|
||||
</div>
|
||||
<div class="panelRow">
|
||||
<div>详情说明:</div>
|
||||
<el-input style="width:90%; font-size:12px"
|
||||
@@ -116,7 +123,7 @@
|
||||
filterUsers(input) {
|
||||
if (input) {
|
||||
this.usersCopy = this.users.filter((item) => {
|
||||
if (!!~item.name.indexOf(input) || !!~item.name.toLowerCase().indexOf(input.toLowerCase())) {
|
||||
if (item.name.indexOf(input) >-1 ) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
@@ -127,7 +134,8 @@
|
||||
filterAuthorities(input) {
|
||||
if (input) {
|
||||
this.authoritiesCopy = this.authorities.filter((item) => {
|
||||
if (!!~item.name.indexOf(input) || !!~item.name.toLowerCase().indexOf(input.toLowerCase())) {
|
||||
console.log(item)
|
||||
if (item.name.indexOf(input) >-1 ) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
@@ -98,7 +98,7 @@ export default {
|
||||
y: 84,
|
||||
id: "userTask1603681299962",
|
||||
style: {},
|
||||
assignValue: 1,
|
||||
assignValue: [1],
|
||||
assignType: "user"
|
||||
},
|
||||
{
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
y: 321,
|
||||
id: "userTask1603681302372",
|
||||
style: {},
|
||||
assignValue: 2,
|
||||
assignValue: [2],
|
||||
assignType: "user"
|
||||
},
|
||||
{
|
||||
@@ -268,7 +268,12 @@ export default {
|
||||
const obj = this.$refs["wfd"].graph.save()
|
||||
const processModel = this.$refs["wfd"].processModel
|
||||
processModel.edges = obj.edges
|
||||
processModel.nodes = obj.nodes
|
||||
processModel.nodes = JSON.parse(JSON.stringify(obj.nodes))
|
||||
processModel.nodes.map(item=>{
|
||||
if(item.assignValue){
|
||||
item.assignValue = String(item.assignValue)
|
||||
}
|
||||
})
|
||||
if(!processModel.id){
|
||||
this.$message({
|
||||
type:"error",
|
||||
@@ -321,6 +326,11 @@ export default {
|
||||
const res = await findWorkflowProcess({ id: this.$route.query.id });
|
||||
this.disabled = this.$route.query.type == "view"
|
||||
if(res.code == 0){
|
||||
res.data.reworkflowProcess.nodes.map(item=>{
|
||||
if(item.assignValue){
|
||||
item.assignValue = item.assignValue.split(",")
|
||||
}
|
||||
})
|
||||
this.demoData.nodes = res.data.reworkflowProcess.nodes
|
||||
delete res.data.reworkflowProcess.nodes
|
||||
this.demoData.edges = res.data.reworkflowProcess.edges
|
||||
|
||||
Reference in New Issue
Block a user