更新版本-参照 jinnang-v1
This commit is contained in:
1 parent
0ace3ac506
commit
c9c16e9d26
17 files changed
+2675
-1144
No files matched your search
@@ -21,7 +21,7 @@
|
||||
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">GUID</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="GUID" v-model="line.id"></v-text-field>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line disabled label="GUID" v-model="line.id"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">源活动</span>
|
||||
@@ -47,10 +47,10 @@
|
||||
v-model="line.type"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">任务Resource</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="任务Resource" v-model="line.hook"></v-text-field>
|
||||
</v-col>
|
||||
<!-- <v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">课程Resource</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="课程Resource" v-model="line.hook"></v-text-field>
|
||||
</v-col> -->
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">备注说明</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="备注说明" v-model="line.Remark"></v-text-field>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">GUID</span>
|
||||
<v-text-field class="cus-v-input" dense filled single-line label="GUID" v-model="node.id"></v-text-field>
|
||||
<v-text-field class="cus-v-input" dense filled single-line disabled label="GUID" v-model="node.id"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">名称</span>
|
||||
@@ -32,80 +32,82 @@
|
||||
<span class="inputLabel">备注说明</span>
|
||||
<v-text-field class="cus-v-input" dense filled single-line label="备注说明" v-model="node.Remark"></v-text-field>
|
||||
</v-col>
|
||||
<template v-if="!node.id.includes('start-') && !node.id.includes('end-')">
|
||||
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">指派类型</span>
|
||||
|
||||
<v-select
|
||||
:items="assignTypeList"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
color="success"
|
||||
item-color="success"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
label="指派类型"
|
||||
v-model="node.assignType"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">指派</span>
|
||||
<v-select
|
||||
:items="optionList"
|
||||
color="success"
|
||||
item-color="success"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
:label="assignType"
|
||||
:multiple="node.assignType === 'person'"
|
||||
v-model="node.assignValue"
|
||||
:disabled="!node.assignType"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">允许的操作(英文逗号分隔)</span>
|
||||
<!-- <v-textarea
|
||||
filled single-line
|
||||
name="input-7-4"
|
||||
label="允许的操作"
|
||||
value=""
|
||||
rows="3"
|
||||
hide-details
|
||||
></v-textarea> -->
|
||||
<v-text-field class="cus-v-input" dense filled single-line label="允许的操作(英文逗号分隔)" v-model="node.lineTypeList"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">可写模板</span>
|
||||
<v-select
|
||||
:items="tpl"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
color="success"
|
||||
item-color="success"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
label="可写模板"
|
||||
multiple
|
||||
v-model="node.formId"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">隐藏模板</span>
|
||||
<v-select
|
||||
:items="tpl"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
color="success"
|
||||
item-color="success"
|
||||
class="cus-v-input"
|
||||
label="隐藏模板"
|
||||
multiple
|
||||
v-model="node.formIdHidden"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<!-- <v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">指派类型</span>
|
||||
|
||||
<v-select
|
||||
:items="assignTypeList"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
color="success"
|
||||
item-color="success"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
label="指派类型"
|
||||
v-model="node.assignType"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">指派</span>
|
||||
<v-select
|
||||
:items="optionList"
|
||||
color="success"
|
||||
item-color="success"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
:label="assignType"
|
||||
:multiple="node.assignType === 'person'"
|
||||
v-model="node.assignValue"
|
||||
:disabled="!node.assignType"
|
||||
></v-select>
|
||||
</v-col> -->
|
||||
<v-col cols="12" class=" pb-3" >
|
||||
<span class="inputLabel">允许的操作(英文逗号分隔)</span>
|
||||
<!-- <v-textarea
|
||||
filled single-line
|
||||
name="input-7-4"
|
||||
label="允许的操作"
|
||||
value=""
|
||||
rows="3"
|
||||
hide-details
|
||||
></v-textarea> -->
|
||||
<v-text-field class="cus-v-input" dense filled single-line label="允许的操作(英文逗号分隔)" v-model="node.lineTypeList"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3" >
|
||||
<span class="inputLabel">可写模板</span>
|
||||
<v-select
|
||||
:items="tpl"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
color="success"
|
||||
item-color="success"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
label="可写模板"
|
||||
multiple
|
||||
v-model="node.formId"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12" class=" pb-3" >
|
||||
<span class="inputLabel">隐藏模板</span>
|
||||
<v-select
|
||||
:items="tpl"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
color="success"
|
||||
item-color="success"
|
||||
class="cus-v-input"
|
||||
label="隐藏模板"
|
||||
multiple
|
||||
v-model="node.formIdHidden"
|
||||
></v-select>
|
||||
</v-col>
|
||||
</template>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
@@ -137,7 +139,9 @@
|
||||
data() {
|
||||
return {
|
||||
isFormValid: true,
|
||||
node: {},
|
||||
node: {
|
||||
id: ''
|
||||
},
|
||||
typeList: [
|
||||
{ Value: 'start', Text: '起点' },
|
||||
{ Value: 'end', Text: '终点' },
|
||||
@@ -175,11 +179,6 @@
|
||||
methods: {
|
||||
init(data, node) {
|
||||
this.node = node;
|
||||
// data.nodeList.filter((node) => {
|
||||
// if (node.id === id) {
|
||||
// this.node = node;
|
||||
// }
|
||||
// })
|
||||
},
|
||||
getOptionList() {
|
||||
if (!this.node.assignType) {
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
<template id="flow-node">
|
||||
<div class="node-item" ref="node" :style="flowNodeContainer" @mouseenter="showDelete" @mouseleave="hideDelete"
|
||||
@mouseup="changeNodeSite" @click.stop="editNode">
|
||||
<div class="node-item"
|
||||
:class="{'node-item-active': current === node.id}"
|
||||
ref="node"
|
||||
:style="flowNodeContainer"
|
||||
@mouseenter="showDelete"
|
||||
@mouseleave="hideDelete"
|
||||
@mouseup="changeNodeSite"
|
||||
@click.stop="editNode">
|
||||
<!-- <div class="node-titel">
|
||||
<div class="node-icon" v-show="mouseEnter">
|
||||
<i class="el-icon-delete" @@click.stop="deleteNode"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="node-con"><i :class="iconClass" class="type-icon"></i><span>{{node.label}}</span></div>
|
||||
<div class="node-del" v-show="mouseEnter" @click.stop="deleteNode">
|
||||
<div class="node-del" v-show="mouseEnter && !readonly" @click.stop="deleteNode">
|
||||
×
|
||||
</div>
|
||||
|
||||
@@ -24,6 +30,8 @@
|
||||
props: {
|
||||
node: Object,
|
||||
isconnect: Boolean,
|
||||
current: String,
|
||||
readonly: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -59,6 +67,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
// 删除节点
|
||||
deleteNode() {
|
||||
@@ -143,4 +152,8 @@
|
||||
opacity: 0;
|
||||
cursor: crosshair;
|
||||
}
|
||||
.node-item-active {
|
||||
background-color: #4caf50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template id="process-flow">
|
||||
<div class="process-flow-container">
|
||||
<v-card class="flow-menu pa-4 mr-4" width="140px">
|
||||
<v-card v-if="!readonly" class="flow-menu pa-4 mr-4" width="140px">
|
||||
<div class="menu-item mb-3" v-for="item in menuList" draggable="true" @dragstart="drag(item)">
|
||||
<i :class="item.icon"></i>
|
||||
<div>{{item.name}}</div>
|
||||
@@ -16,23 +16,42 @@
|
||||
</v-btn>
|
||||
|
||||
</v-card>
|
||||
<v-card class="flow-detail pa-4 mr-4">
|
||||
<div id="flowContent" ref="flowContent" @drop="drop($event)" @dragover="allowDrop($event)" @click="editFlow()"
|
||||
@dblclick="isConnect=false">
|
||||
<flow-node v-for="node in data.nodeList" :key="node.id" :node="node" :id="node.id" :isconnect="isConnect"
|
||||
@delete-node="deleteNode" @change-node-site="changeNodeSite" @edit-node="editNode">
|
||||
</flow-node>
|
||||
<v-card class="flow-detail pa-0">
|
||||
<div id="flowContent" ref="flowContent" @drop="drop($event)" @dragover="allowDrop($event)" @dblclick="isConnect=false">
|
||||
<div id="flow">
|
||||
<div
|
||||
v-show="auxiliaryLine.isShowXLine"
|
||||
class="auxiliary-line-x"
|
||||
:style="{
|
||||
width: auxiliaryLinePos.width,
|
||||
top: auxiliaryLinePos.y + 'px',
|
||||
left: auxiliaryLinePos.offsetX + 'px'
|
||||
}"
|
||||
></div>
|
||||
<div
|
||||
v-show="auxiliaryLine.isShowYLine"
|
||||
class="auxiliary-line-y"
|
||||
:style="{
|
||||
height: auxiliaryLinePos.height,
|
||||
left: auxiliaryLinePos.x + 'px',
|
||||
top: auxiliaryLinePos.offsetY + 'px'
|
||||
}"
|
||||
></div>
|
||||
<flow-node v-for="node in data.nodeList" :current="currentNodeId" :key="node.id" :node="node" :id="node.id" :readonly="readonly" :isconnect="isConnect"
|
||||
@delete-node="deleteNode" @change-node-site="changeNodeSite" @edit-node="editNode">
|
||||
</flow-node>
|
||||
</div>
|
||||
</div>
|
||||
</v-card>
|
||||
<v-card class="flow-edit pa-4" v-if="editType">
|
||||
<v-card v-show="!readonly" class="flow-edit pa-4 ml-4">
|
||||
<template v-if="editType == 'node' || editType == 'line'">
|
||||
<div class="mb-3">
|
||||
<v-icon>mdi-application-edit-outline</v-icon>
|
||||
<span style="transform: translateY(2px); display: inline-block; ">{{editType == 'node' ? '节点' : '连线'}}属性</span>
|
||||
</div>
|
||||
<div class="flow-edit-content">
|
||||
<edit-node ref="nodeForm" v-show="editType == 'node'" :user="user" :group="group" :tpl="tpl"></edit-node>
|
||||
<edit-line ref="lineForm" v-show="editType == 'line'" @line-save="lineLabelSave"></edit-line>
|
||||
<edit-node ref="nodeForm" v-if="editType == 'node'" :user="user" :group="group" :tpl="tpl"></edit-node>
|
||||
<edit-line ref="lineForm" v-if="editType == 'line'" @line-save="lineLabelSave"></edit-line>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -51,6 +70,7 @@
|
||||
|
||||
<link href="/<$ ctx.app.config.appId $>/public/jsplumb/jsplumbtoolkit-defaults.css" rel="stylesheet">
|
||||
<script src="/<$ ctx.app.config.appId $>/public/jsplumb/jsplumb.min.js"></script>
|
||||
<script src="/<$ ctx.app.config.appId $>/public/panzoom/panzoom.min.js"></script>
|
||||
|
||||
<script type="module">
|
||||
|
||||
@@ -86,6 +106,14 @@
|
||||
return []
|
||||
}
|
||||
},
|
||||
currentNodeId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
data: () => {
|
||||
const connectorPaintStyle = {
|
||||
@@ -124,6 +152,15 @@
|
||||
icon: 'el-icon-s-tools'
|
||||
},
|
||||
],
|
||||
auxiliaryLine: { isShowXLine: false, isShowYLine: false }, //对齐辅助线是否显示
|
||||
auxiliaryLinePos: {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
x: 20,
|
||||
y: 20
|
||||
},
|
||||
jsPlumb: null, // jsPlumb 实例
|
||||
index: 1,
|
||||
// 默认设置参数
|
||||
@@ -132,7 +169,7 @@
|
||||
Anchors: ['Top', 'TopCenter', 'TopRight', 'TopLeft', 'Right', 'RightMiddle', 'Bottom', 'BottomCenter',
|
||||
'BottomRight', 'BottomLeft', 'Left', 'LeftMiddle'
|
||||
],
|
||||
Container: 'flowContent',
|
||||
Container: 'flow',
|
||||
// 连线的样式 StateMachine、Flowchart,有四种默认类型:Bezier(贝塞尔曲线),Straight(直线),Flowchart(流程图),State machine(状态机)
|
||||
Connector: 'Straight',
|
||||
//这个是鼠标拉出来的线的属性
|
||||
@@ -203,7 +240,7 @@
|
||||
timer: null, //定时器,判断单双击,
|
||||
currentConnect: '', //当前的连接线
|
||||
currentLine: '', //当前连接线数据
|
||||
editType: '', //编辑的类型
|
||||
editType: 'flow', //编辑的类型
|
||||
connectorPaintStyle,
|
||||
// 鼠标悬浮在连接线上的样式
|
||||
connectorHoverStyle,
|
||||
@@ -242,12 +279,10 @@
|
||||
},
|
||||
created() { },
|
||||
mounted() {
|
||||
console.log('data', this.data)
|
||||
this.jsPlumb = jsPlumb.getInstance();
|
||||
this.$nextTick(() => {
|
||||
this.init();
|
||||
});
|
||||
this.editFlow()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
@@ -266,18 +301,26 @@
|
||||
|
||||
// 单点连接线(编辑label),
|
||||
_this.jsPlumb.bind('click', function (conn, originalEvent) {
|
||||
if (_this.readonly) {
|
||||
// 只读模式禁止切换
|
||||
return
|
||||
}
|
||||
//clearTimeout(this.timer);
|
||||
//this.timer = setTimeout(function () { // 这里采用执行自定义事件的方式
|
||||
// console.log("click", conn);
|
||||
// _this.editLine(conn);
|
||||
//}, 300); // 延迟300ms执行单击事件,区分双击事件
|
||||
console.log("click", conn);
|
||||
// console.log("click", conn);
|
||||
_this.editLine(conn);
|
||||
console.log(conn.getOverlay("label-1"));
|
||||
// console.log(conn.getOverlay("label-1"));
|
||||
//conn.getOverlay("label-1").setLabel('大肥肚'); //初始化label
|
||||
})
|
||||
// 双击连接线(删除),
|
||||
_this.jsPlumb.bind('dblclick', function (conn, originalEvent) {
|
||||
if (_this.readonly) {
|
||||
// 只读模式禁止删除
|
||||
return
|
||||
}
|
||||
clearTimeout(this.timer);
|
||||
console.log("dblclick", conn)
|
||||
_this.jsPlumb.deleteConnection(conn)
|
||||
@@ -356,7 +399,7 @@
|
||||
console.log('beforeDetach', evt)
|
||||
})
|
||||
})
|
||||
|
||||
this.initPanZoom();
|
||||
},
|
||||
// 加载流程图
|
||||
loadEasyFlow() {
|
||||
@@ -376,11 +419,6 @@
|
||||
this.jsPlumb.draggable(node.id, {
|
||||
containment: 'parent'
|
||||
})
|
||||
|
||||
// this.jsPlumb.addEndpoint(node.id, { anchors: "TopCenter" }, this.hollowCircle);
|
||||
// this.jsPlumb.addEndpoint(node.id, { anchors: "RightMiddle" }, this.hollowCircle);
|
||||
// this.jsPlumb.addEndpoint(node.id, { anchors: "BottomCenter" }, this.hollowCircle);
|
||||
// this.jsPlumb.addEndpoint(node.id, { anchors: "LeftMiddle" }, this.hollowCircle);
|
||||
// jsPlumb.draggable(node.id)
|
||||
}
|
||||
|
||||
@@ -392,8 +430,9 @@
|
||||
target: line.to,
|
||||
endpoint: 'Dot' // 线的类型
|
||||
}, this.jsplumbConnectOptions);
|
||||
|
||||
connection.getOverlay("label-1").setLabel(line.type + '-' +line.label); //初始化label
|
||||
if (connection && connection.getOverlay("label-1")) {
|
||||
connection.getOverlay("label-1").setLabel(line.type + '-' +line.label); //初始化label
|
||||
}
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.loadEasyFlowFinish = true
|
||||
@@ -409,12 +448,6 @@
|
||||
this.jsPlumb.draggable(temp.id, {
|
||||
containment: 'parent'
|
||||
})
|
||||
|
||||
|
||||
// this.jsPlumb.addEndpoint(node.id, { anchors: "TopCenter" }, this.hollowCircle);
|
||||
// this.jsPlumb.addEndpoint(node.id, { anchors: "RightMiddle" }, this.hollowCircle);
|
||||
// this.jsPlumb.addEndpoint(node.id, { anchors: "BottomCenter" }, this.hollowCircle);
|
||||
// this.jsPlumb.addEndpoint(node.id, { anchors: "LeftMiddle" }, this.hollowCircle);
|
||||
})
|
||||
},
|
||||
// 删除线
|
||||
@@ -459,14 +492,21 @@
|
||||
},
|
||||
//编辑节点
|
||||
editNode(node) {
|
||||
if (this.readonly) {
|
||||
// 只读模式、禁止切换节点
|
||||
return
|
||||
}
|
||||
//console.log('编辑节点', nodeId)
|
||||
this.editType = 'node';
|
||||
this.currentNodeId = node.id
|
||||
this.changeLineState("");
|
||||
this.$nextTick(function () {
|
||||
this.$refs.nodeForm.init(this.data, node)
|
||||
})
|
||||
},
|
||||
editLine(conn, add = false) {
|
||||
const _this = this;
|
||||
this.currentNodeId = ''
|
||||
_this.currentConnect = conn;
|
||||
_this.data.lineList.forEach(function (item, index) {
|
||||
if (item.from == conn.sourceId && item.to == conn.targetId) {
|
||||
@@ -478,11 +518,6 @@
|
||||
// 1 - 删除画布连线 | 2 - 清空line的操作属性
|
||||
// _this.jsPlumb.deleteConnection(conn)
|
||||
|
||||
// 从 lineList 数组移除
|
||||
// _this.data.lineList.splice(index,1);
|
||||
// 不渲染表单
|
||||
// return
|
||||
|
||||
// 默认修改类型为第一个
|
||||
if (!preNode.id.includes('start-')) {
|
||||
if (add) {
|
||||
@@ -497,6 +532,7 @@
|
||||
}
|
||||
_this.currentLine = item;
|
||||
_this.editType = 'line';
|
||||
_this.changeLineState("line", item);
|
||||
_this.$nextTick(function () {
|
||||
_this.$refs.lineForm.init(item, lineTypeList)
|
||||
})
|
||||
@@ -504,9 +540,26 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//更改连线状态
|
||||
changeLineState(nodeId, val) {
|
||||
let lines = this.jsPlumb.getAllConnections();
|
||||
if (!nodeId) {
|
||||
lines.forEach((line) => {
|
||||
line.canvas.classList.remove("active");
|
||||
});
|
||||
return;
|
||||
} else if (nodeId === "line") {
|
||||
lines.forEach((line) => {
|
||||
if (line.targetId === val.to && line.sourceId === val.from) {
|
||||
line.canvas.classList.add("active");
|
||||
} else {
|
||||
line.canvas.classList.remove("active");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//删除线
|
||||
delLine(conn) {
|
||||
|
||||
this.jsPlumb.deleteConnection(conn)
|
||||
},
|
||||
// 是否具有该线
|
||||
@@ -533,6 +586,8 @@
|
||||
top: event.offsetY + 'px',
|
||||
left: event.offsetX + 'px',
|
||||
type: this.currentItem.type,
|
||||
assignType: 'person',
|
||||
assignValue: ['<$ ctx.userInfo.userId $>'],
|
||||
lineTypeList: this.currentItem.type === 'start' ? '同意' : this.currentItem.type === 'end' ? '' : '同意,拒绝',
|
||||
}
|
||||
this.addNode(temp);
|
||||
@@ -559,11 +614,59 @@
|
||||
console.log(this.data);
|
||||
this.$emit('change-structure', this.data)
|
||||
},
|
||||
editFlow() {
|
||||
this.editType = 'flow';
|
||||
// this.$nextTick(function () {
|
||||
// this.$refs.flowEdit.init(this.data.flowInfo);
|
||||
// })
|
||||
initPanZoom() {
|
||||
const mainContainer = this.jsPlumb.getContainer();
|
||||
const mainContainerWrap = mainContainer.parentNode;
|
||||
const pan = panzoom(mainContainer, {
|
||||
smoothScroll: false,
|
||||
bounds: true,
|
||||
// autocenter: true,
|
||||
zoomDoubleClickSpeed: 1,
|
||||
minZoom: 0.5,
|
||||
maxZoom: 2,
|
||||
//设置滚动缩放的组合键,默认不需要组合键
|
||||
beforeWheel: (e) => {
|
||||
// console.log(e);
|
||||
// let shouldIgnore = !e.ctrlKey
|
||||
// return shouldIgnore
|
||||
},
|
||||
beforeMouseDown: function (e) {
|
||||
// allow mouse-down panning only if altKey is down. Otherwise - ignore
|
||||
var shouldIgnore = e.ctrlKey;
|
||||
return shouldIgnore;
|
||||
}
|
||||
});
|
||||
this.jsPlumb.mainContainerWrap = mainContainerWrap;
|
||||
this.jsPlumb.pan = pan;
|
||||
// 缩放时设置jsPlumb的缩放比率
|
||||
pan.on("zoom", (e) => {
|
||||
const { x, y, scale } = e.getTransform();
|
||||
this.jsPlumb.setZoom(scale);
|
||||
//根据缩放比例,缩放对齐辅助线长度和位置
|
||||
this.auxiliaryLinePos.width = (1 / scale) * 100 + "%";
|
||||
this.auxiliaryLinePos.height = (1 / scale) * 100 + "%";
|
||||
this.auxiliaryLinePos.offsetX = -(x / scale);
|
||||
this.auxiliaryLinePos.offsetY = -(y / scale);
|
||||
});
|
||||
pan.on("panend", (e) => {
|
||||
const { x, y, scale } = e.getTransform();
|
||||
this.auxiliaryLinePos.width = (1 / scale) * 100 + "%";
|
||||
this.auxiliaryLinePos.height = (1 / scale) * 100 + "%";
|
||||
this.auxiliaryLinePos.offsetX = -(x / scale);
|
||||
this.auxiliaryLinePos.offsetY = -(y / scale);
|
||||
});
|
||||
|
||||
// 平移时设置鼠标样式
|
||||
mainContainerWrap.style.cursor = "grab";
|
||||
mainContainerWrap.addEventListener("mousedown", function wrapMousedown() {
|
||||
this.style.cursor = "grabbing";
|
||||
mainContainerWrap.addEventListener("mouseout", function wrapMouseout() {
|
||||
this.style.cursor = "grab";
|
||||
});
|
||||
});
|
||||
mainContainerWrap.addEventListener("mouseup", function wrapMouseup() {
|
||||
this.style.cursor = "grab";
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -591,6 +694,25 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background-image: url("/<$ ctx.app.config.appId $>/public/images/point.png");
|
||||
background-repeat: repeat;
|
||||
overflow: hidden;
|
||||
cursor: grab;
|
||||
}
|
||||
#flowContent #flow {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#flowContent #flow .auxiliary-line-x {
|
||||
position: absolute;
|
||||
border: 0.5px dashed #2ab1e8;
|
||||
z-index: 9999;
|
||||
}
|
||||
#flowContent #flow .auxiliary-line-y {
|
||||
position: absolute;
|
||||
border: 0.5px dashed #2ab1e8;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.item {
|
||||
@@ -658,4 +780,18 @@
|
||||
.csslabel .label-text {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.jtk-connector.active {
|
||||
z-index: 9999;
|
||||
|
||||
}
|
||||
.jtk-connector.active path {
|
||||
stroke: #150042;
|
||||
stroke-width: 1.5;
|
||||
animation: ring;
|
||||
animation-duration: 3s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
stroke-dasharray: 5;
|
||||
}
|
||||
</style>
|
||||
@@ -3,7 +3,6 @@
|
||||
{% block vue_template %}
|
||||
|
||||
<jh-layout-v3>
|
||||
|
||||
<template slot="serverSearch">
|
||||
<v-row class="ma-0 align-center" :class="{'pa-0': isMobile, 'pa-2': !isMobile}" style="justify-content: end">
|
||||
<v-col cols="12" sm="12" xs="5" md="3" xl="2" class="pb-3" :class="{'pl-0': isMobile, 'pt-0': isMobile}">
|
||||
@@ -20,29 +19,29 @@
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-data-table :headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="success" class="mr-2" @click="doUiAction('startCreateItem', {item: item})">
|
||||
申请
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="success" class="mr-2" @click="doUiAction('startCreateItem', {item: item})">
|
||||
申请
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
|
||||
<!-- 编辑抽屉 -->
|
||||
<v-navigation-drawer v-model="isEditDrawerShow" :permanent="isEditDrawerShow" fixed temporary right width="40%"
|
||||
@@ -58,8 +57,8 @@
|
||||
<v-row :class="{'px-10': !isMobile, 'px-3': isMobile, 'pb-7': isMobile}">
|
||||
|
||||
<v-col cols="12" sm="12" md="12" :class="{'pa-0': isMobile, 'px-3': isMobile, 'pt-6': isMobile}">
|
||||
<span class="inputLabel">任务标题</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="任务标题" v-model="editItem['taskTitle']">
|
||||
<span class="inputLabel">课程标题</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="课程标题" v-model="editItem['taskTitle']">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
|
||||
@@ -95,7 +94,6 @@
|
||||
</v-row>
|
||||
</v-form>
|
||||
</v-navigation-drawer>
|
||||
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
@@ -114,10 +112,6 @@
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
constantCollection: {
|
||||
categoryList: [],
|
||||
},
|
||||
|
||||
serverSearchInput: {
|
||||
workflowName: null
|
||||
},
|
||||
@@ -126,24 +120,17 @@
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
headers: [
|
||||
{ text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed' },
|
||||
{ text: "任务ID", value: "workflowId", width: 120 },
|
||||
{ text: "任务名称", value: "workflowName", width: 120 },
|
||||
{ text: "任务分类ID", value: "workflowCategory", width: 120 },
|
||||
{ text: "任务节点", value: "workflowConfig", width: 120 },
|
||||
{ text: "ID", value: "id", width: 100, class: 'fixed', cellClass: 'fixed' },
|
||||
{ text: "课程ID", value: "workflowId", width: 120 },
|
||||
{ text: "课程名称", value: "workflowName", width: 150 },
|
||||
{ text: "课程分类ID", value: "workflowCategory", width: 120 },
|
||||
{ text: "备注", value: "workflowRemark", width: 120 },
|
||||
{ text: "操作者", value: "operationByUser", width: 120 },
|
||||
{ text: "操作时间", value: "operationAt", width: 250 },
|
||||
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed' },
|
||||
],
|
||||
|
||||
currentClickButton: { title: '新增', action: 'add' },
|
||||
editItem: {},
|
||||
tplItem: {},
|
||||
tableButtonList: [
|
||||
{ text: '修改', buttonType: 'edit', color: 'success', action: 'startUpdateItem' },
|
||||
{ text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem' },
|
||||
],
|
||||
dialogSaveInfoAction: ''
|
||||
}),
|
||||
async created() {
|
||||
@@ -157,7 +144,7 @@
|
||||
await this.refreshTableData(uiActionData);
|
||||
break;
|
||||
case 'startCreateItem':
|
||||
await this.clearItemData(uiActionData);
|
||||
await this.preprocessItemData(uiActionData);
|
||||
await this.openCreateItemDialog(uiActionData);
|
||||
break;
|
||||
case 'createItem':
|
||||
@@ -177,7 +164,7 @@
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value => !!value);
|
||||
const { rows } = (await window.jianghuAxios({
|
||||
const { data: { appData: { resultData: {rows} } } } = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskCreateManagement',
|
||||
@@ -188,19 +175,19 @@
|
||||
orderBy: [{ column: 'operationAt', order: 'desc' }]
|
||||
}
|
||||
}
|
||||
})).data.appData.resultData;
|
||||
});
|
||||
rows.forEach(row => {
|
||||
if(row.workflowConfig) {
|
||||
row.workflowConfig = JSON.parse(row.workflowConfig).nodeList.map(item => [item.label, item.lineTypeList]);
|
||||
row.workflowForm = JSON.parse(row.workflowForm || '[]');
|
||||
}
|
||||
row.operationAt = dayjs(row.operationAt).format('YYYY-MM-DD HH:mm:ss');
|
||||
})
|
||||
this.tableDataFromBackend = rows;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
|
||||
// startCreateItem
|
||||
clearItemData({item: { workflowForm, workflowConfig, workflowId }}) {
|
||||
preprocessItemData({item: { workflowForm, workflowConfig, workflowId }}) {
|
||||
const workflowFormData = {};
|
||||
workflowForm.forEach(e => {
|
||||
workflowFormData[e.id] = '';
|
||||
@@ -217,7 +204,6 @@
|
||||
this.dialogSaveInfoAction = 'createItem';
|
||||
},
|
||||
|
||||
// createItem
|
||||
async confirmCreateItemDialog() {
|
||||
if (await window.confirmDialog({title: "新增", content: "确定新增吗?"}) === false) {
|
||||
throw new Error("[confirmCreateFormDialog] 否");
|
||||
|
||||
@@ -5,110 +5,136 @@
|
||||
<jh-layout-v3>
|
||||
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-stepper v-model="step" class="mb-4 elevation-0 pa-0 ma-0 pt-4" :class="{'px-10': !isMobile, 'px-3': isMobile}">
|
||||
<v-stepper-header class="elevation-0 pa-0 ma-0">
|
||||
<template v-for="(item, index) in taskStepperList">
|
||||
<v-divider v-if="index > 0" class="mx-1"></v-divider>
|
||||
<v-stepper-step :complete="step > item.value" :step="item.value" class="pa-4" color="success">
|
||||
{{ item.text }}
|
||||
</v-stepper-step>
|
||||
</template>
|
||||
</v-stepper-header>
|
||||
</v-stepper>
|
||||
<v-row class="pa-0 ma-0" :class="{'px-10': !isMobile, 'px-3': isMobile}"><v-subheader>表单信息</v-subheader></v-row>
|
||||
<v-card :class="{'px-2': isMobile}" class="pb-10 mb-10">
|
||||
<!-- <v-row class="pa-0 ma-0 pt-8" :class="{'px-10': !isMobile, 'px-3': isMobile}">
|
||||
<v-col cols="12 d-flex align-center" style="justify-content: space-between;">
|
||||
<template v-for="(item, index) in taskStepperList">
|
||||
<div>
|
||||
<div v-for="e in item" class="d-flex align-center ">
|
||||
<v-icon v-if="e.type === 'history' && e.id !== currentNode.id" color="primary">mdi-check-circle</v-icon>
|
||||
<v-icon v-else-if="e.id === currentNode.id" color="primary">mdi-send-circle</v-icon>
|
||||
<v-icon v-else >mdi-circle</v-icon>
|
||||
{{e.text}}
|
||||
</div>
|
||||
</div>
|
||||
<v-divider class="mx-8" v-if="index < (taskStepperList.length - 1)"></v-divider>
|
||||
</template>
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
<v-row class="pa-0 ma-0" :class="{'px-10': !isMobile, 'px-3': isMobile}">
|
||||
<v-col :cols="taskTpl.prev ? 6 : 12" v-for="(key, i) in ['prev', 'input']" :key="i"
|
||||
v-if="isAccess && taskTpl[key]">
|
||||
<v-col cols="6">
|
||||
<v-subheader>流程预览</v-subheader>
|
||||
<process-flow
|
||||
v-if="taskHistoryConfigList"
|
||||
:data="taskHistoryConfigList"
|
||||
:current-node-id="currentNode.id"
|
||||
readonly
|
||||
style="height: 450px;border: 1px solid rgb(240, 240, 240); border-radius: 6px;">
|
||||
</process-flow>
|
||||
</v-col>
|
||||
<v-col cols="6" v-if="isAccess">
|
||||
<v-subheader>表单信息</v-subheader>
|
||||
<v-row>
|
||||
<v-col cols="12" class=" pb-3" v-for="(formItem, index) in taskTpl.formList" :key="index"
|
||||
v-if="taskTpl[key] && !(currentNode.formIdHidden || []).includes(formItem.id)">
|
||||
<!-- <v-subheader inset > {{ key === 'prev' ? '历史表单' : '当前' }} </v-subheader> -->
|
||||
v-if="taskTpl.input && !(currentNode.formIdHidden || []).includes(formItem.id)">
|
||||
<span class="inputLabel">{{formItem.component.outline}}</span>
|
||||
<template v-if="formItem.component.type === 'singleSelect'">
|
||||
<v-list-item-title class="formItem-title">{{ formTitlePrefix(formItem.component.outline, key) }}
|
||||
<v-list-item-title class="formItem-title">{{ formTitlePrefix(formItem.component.outline, 'input') }}
|
||||
</v-list-item-title>
|
||||
<v-radio-group v-model="taskTpl[key][formItem.id]">
|
||||
<v-radio-group v-model="taskTpl.input[formItem.id]">
|
||||
<v-radio hide-details v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
||||
:disabled="key === 'prev' || !(currentNode.formId || []).includes(formItem.id)"
|
||||
:key="optionIndex"
|
||||
:label="option.value"></v-radio>
|
||||
:disabled="!(currentNode.formId || []).includes(formItem.id)"
|
||||
:key="optionIndex"></v-radio>
|
||||
</v-radio-group>
|
||||
</template>
|
||||
|
||||
<template v-if="formItem.component.type === 'multipleSelect'">
|
||||
<v-list-item-title class="formItem-title">{{ formTitlePrefix(formItem.component.outline, key) }}
|
||||
<v-list-item-title class="formItem-title">{{ formTitlePrefix(formItem.component.outline, 'input') }}
|
||||
</v-list-item-title>
|
||||
<div v-for="(option, optionIndex) in formItem.component.property.selectOptionList" :key="optionIndex">
|
||||
<v-checkbox style="margin-top: 0px;"
|
||||
:disabled="key === 'prev' || !(currentNode.formId || []).includes(formItem.id)"
|
||||
:label="option.value" :value="option.value"
|
||||
v-model="taskTpl[key][formItem.id]" hide-details
|
||||
:disabled="!(currentNode.formId || []).includes(formItem.id)"
|
||||
:value="option.value"
|
||||
v-model="taskTpl.input[formItem.id]" hide-details
|
||||
color="red"></v-checkbox>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="formItem.component.type === 'textarea'">
|
||||
<v-textarea hide-details dense outlined placeholder="请输入"
|
||||
:label="formTitlePrefix(formItem.component.outline, key)"
|
||||
:disabled="key === 'prev' || !(currentNode.formId || []).includes(formItem.id)"
|
||||
v-model="taskTpl[key][formItem.id]" :rows="4"/>
|
||||
<v-textarea hide-details dense filled single-line placeholder="请输入"
|
||||
:disabled="!(currentNode.formId || []).includes(formItem.id)"
|
||||
v-model="taskTpl.input[formItem.id]" :rows="4"/>
|
||||
</template>
|
||||
|
||||
<template v-if="formItem.component.type === 'input'">
|
||||
<v-text-field class="cus-v-input" placeholder="请输入" dense outlined
|
||||
:label="formTitlePrefix(formItem.component.outline, key)"
|
||||
:disabled="key === 'prev' || !(currentNode.formId || []).includes(formItem.id)"
|
||||
v-model="taskTpl[key][formItem.id]"></v-text-field>
|
||||
<v-text-field class="cus-v-input" placeholder="请输入" dense filled single-line
|
||||
:disabled="!(currentNode.formId || []).includes(formItem.id)"
|
||||
v-model="taskTpl.input[formItem.id]"></v-text-field>
|
||||
</template>
|
||||
</v-col>
|
||||
<v-col cols="12" v-if="isAccess">
|
||||
<span class="inputLabel">备注信息</span>
|
||||
<v-textarea dense filled single-line placeholder="请输入备注信息" hide-details v-model="editItem.taskComment" color="success"
|
||||
:disabled="currentNode && currentNode.id && currentNode.id.includes('end-')" :rows="4"/>
|
||||
</v-col>
|
||||
<v-col v-if="isAccess" cols="12" style="text-align: center;" class="mb-3">
|
||||
<v-btn color="success" class="mx-4" v-for="item in nextLineList" @click="doUiAction('submitNode', item.type)">
|
||||
{{ item.type }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row class="pa-0 ma-0" :class="{'px-10': !isMobile, 'px-3': isMobile}" v-if="isAccess">
|
||||
<v-col cols="12">
|
||||
<v-textarea dense outlined placeholder="请输入备注信息" hide-details v-model="editItem.taskComment" color="success"
|
||||
:disabled="currentNode && currentNode.id && currentNode.id.includes('end-')" :rows="4"/>
|
||||
</v-col>
|
||||
<v-col cols="12" style="text-align: center;" class="mb-3">
|
||||
<v-btn color="success" class="mx-4" v-for="item in nextLineList" @click="doUiAction('submitNode', item.type)">
|
||||
{{ item.type }}-{{ item.label }}
|
||||
<v-row class="pa-0 ma-0" :class="{'px-10': !isMobile, 'px-3': isMobile}">
|
||||
|
||||
</v-row>
|
||||
|
||||
|
||||
<v-card-text class="pl-10">
|
||||
课程流转历史
|
||||
</v-card-text>
|
||||
<v-data-table fixed-header dense
|
||||
:headers="headers"
|
||||
:items="taskHistoryList"
|
||||
:items-per-page="-1"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
hide-default-footer
|
||||
class="elevation-0 mx-10 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.taskCostDuration="{ item }">
|
||||
{{timeFormat(item.taskCostDuration)}}
|
||||
</template>
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small class="mr-2" @click="viewInput({item})">
|
||||
查看
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-list three-line subheader class="pb-10" :class="{'px-10': !isMobile, 'px-3': isMobile, 'pb-7': isMobile}">
|
||||
<v-subheader>任务流转历史</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<div class="pa-2">
|
||||
<v-simple-table dense>
|
||||
<template v-slot:default>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">
|
||||
节点
|
||||
</th>
|
||||
<th class="text-left">
|
||||
流转
|
||||
</th>
|
||||
<th class="text-left">
|
||||
处理人
|
||||
</th>
|
||||
<th class="text-left">
|
||||
时长
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in taskHistoryList" :key="item.name">
|
||||
<td>{{ item.taskExplain }}</td>
|
||||
<td>{{ item.taskLineLabel }}</td>
|
||||
<td>{{ item.operationByUser }}</td>
|
||||
<td>{{ item.taskCostDuration }}秒</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</template>
|
||||
</v-simple-table>
|
||||
</div>
|
||||
</v-list>
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
max-width="500px"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="text-h5"></span>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col cols="12" sm="12" md="12" v-for="(item, index) in editItem.formList" >
|
||||
<span>{{item.component.outline}}:</span><span>{{editItem.input[item.id]}}</span>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card>
|
||||
</jh-layout-v3>
|
||||
|
||||
@@ -116,6 +142,11 @@
|
||||
|
||||
{% block vue_body %}
|
||||
|
||||
{% include 'component/flow/processFlow.html' %}
|
||||
{% include 'component/flow/flowNode.html' %}
|
||||
{% include 'component/flow/editFlow.html' %}
|
||||
{% include 'component/flow/editLine.html' %}
|
||||
{% include 'component/flow/editNode.html' %}
|
||||
<script type="module">
|
||||
new Vue({
|
||||
el: '#app',
|
||||
@@ -123,47 +154,18 @@ new Vue({
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
isMobile: window.innerWidth < 600,
|
||||
step: 1,
|
||||
// 表格相关数据
|
||||
isFormValid: true,
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
constantCollection: {
|
||||
categoryList: [],
|
||||
|
||||
},
|
||||
|
||||
serverSearchInput: {
|
||||
processName: null
|
||||
},
|
||||
isEditDrawerShow: false,
|
||||
searchInput: null,
|
||||
dialog: false,
|
||||
isTableLoading: true,
|
||||
headers: [
|
||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
|
||||
{text: "任务ID", value: "taskId", width: 120},
|
||||
{text: "流程节点版本ID", value: "processVersionId", width: 120},
|
||||
{text: "任务名称", value: "taskTitle", width: 120},
|
||||
{text: "任务状态:running 执行中;deny 拒绝;end 结束", value: "taskStatus", width: 120},
|
||||
{text: "当前执行中节点", value: "taskCurrentNode", width: 120},
|
||||
{text: "申请人", value: "taskApplier", width: 120},
|
||||
{text: "当前执行的处理人员,用逗号分隔", value: "taskProcessorList", width: 120},
|
||||
{text: "所有相关人员,用逗号分隔", value: "taskRelatedPersonList", width: 120},
|
||||
{text: "催单次数", value: "taskUrgeCount", width: 120},
|
||||
{text: "最后催单时间", value: "taskUrgeLastTime", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
||||
{text: "节点", value: "taskExplain", width: 120},
|
||||
{text: "流转", value: "taskHandleDesc", width: 120},
|
||||
{text: "课程名称", value: "operationByUser", width: 120},
|
||||
{text: "备注", value: "taskComment", width: 120},
|
||||
{text: "处理时长/秒", value: "taskCostDuration", width: 120},
|
||||
{text: "表单明细", value: "action", width: 120},
|
||||
],
|
||||
|
||||
currentClickButton: {title: '新增', action: 'add'},
|
||||
editItem: {},
|
||||
tableButtonList: [
|
||||
{text: '修改', buttonType: 'edit', color: 'success', action: 'startUpdateItem'},
|
||||
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
||||
],
|
||||
dialogSaveInfoAction: '',
|
||||
taskId: '',
|
||||
isAccess: [],
|
||||
@@ -171,12 +173,13 @@ new Vue({
|
||||
taskHistoryList: [],
|
||||
taskTpl: [],
|
||||
taskStepperList: [],
|
||||
currentNode: {}
|
||||
currentNode: {},
|
||||
taskHistoryConfigList: null
|
||||
}),
|
||||
watch: {},
|
||||
async created() {
|
||||
const searchParams = new URLSearchParams(location.search.substring(1));
|
||||
this.taskId = searchParams.get('taskId');
|
||||
this.taskId = searchParams.get('id');
|
||||
await this.getTaskHistoryList()
|
||||
},
|
||||
mounted() {
|
||||
@@ -186,7 +189,7 @@ new Vue({
|
||||
switch (uiActionId) {
|
||||
case 'submitNode':
|
||||
await this.submitNode(uiActionData);
|
||||
await this.getTaskHistoryList(uiActionData);
|
||||
// await this.getTaskHistoryList(uiActionData);
|
||||
break;
|
||||
default:
|
||||
console.error("[doUiAction] uiActionId not find", { uiActionId });
|
||||
@@ -198,30 +201,41 @@ new Vue({
|
||||
* 获取表格数据
|
||||
*/
|
||||
async getTaskHistoryList() {
|
||||
this.isTableLoading = true;
|
||||
const {
|
||||
taskHistoryList,
|
||||
taskStepperList,
|
||||
taskTpl,
|
||||
isAccess,
|
||||
nextLineList,
|
||||
step,
|
||||
currentNode
|
||||
} = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
resultData: {
|
||||
taskHistoryList,
|
||||
taskStepperList,
|
||||
taskTpl,
|
||||
isAccess,
|
||||
nextLineList,
|
||||
currentNode,
|
||||
taskHistoryConfigList
|
||||
}
|
||||
}
|
||||
}
|
||||
} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskHistoryManagement',
|
||||
actionId: 'getTaskHistoryInfo',
|
||||
actionData: {taskId: this.taskId},
|
||||
actionData: {id: this.taskId},
|
||||
}
|
||||
}
|
||||
})).data.appData.resultData;
|
||||
});
|
||||
taskHistoryList.forEach(e => {
|
||||
e.taskFormInput = JSON.parse(e.taskFormInput);
|
||||
})
|
||||
this.taskHistoryList = taskHistoryList;
|
||||
this.taskTpl = taskTpl;
|
||||
this.taskStepperList = taskStepperList;
|
||||
this.currentNode = currentNode;
|
||||
this.isAccess = isAccess;
|
||||
this.nextLineList = nextLineList;
|
||||
this.step = step;
|
||||
this.nextLineList = _.uniqBy(nextLineList, 'type') ;
|
||||
this.taskHistoryConfigList = taskHistoryConfigList;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -234,11 +248,18 @@ new Vue({
|
||||
appData: {
|
||||
pageId: 'taskHistoryManagement',
|
||||
actionId: 'submitNode',
|
||||
actionData: {type, taskId: this.taskId, taskComment: this.editItem.taskComment, taskTpl: this.taskTpl}
|
||||
actionData: {type, id: this.taskId, taskComment: this.editItem.taskComment, taskTpl: this.taskTpl}
|
||||
}
|
||||
}
|
||||
})
|
||||
await window.vtoast.success("提交数据成功");
|
||||
setTimeout(function() {
|
||||
if (document.referrer) {
|
||||
location.href = document.referrer;
|
||||
} else {
|
||||
history.back();
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
formTitlePrefix(title, type) {
|
||||
@@ -246,11 +267,34 @@ new Vue({
|
||||
return '历史-' + title;
|
||||
}
|
||||
return title;
|
||||
},
|
||||
viewInput({item}) {
|
||||
this.editItem = item.taskFormInput;
|
||||
this.dialog = true;
|
||||
},
|
||||
timeFormat(time) {
|
||||
if (time == 0) {
|
||||
return ''
|
||||
} else if (time < 60) {
|
||||
return time + ' 秒';
|
||||
} else if (time < 3600) {
|
||||
const s = time % 60;
|
||||
return parseInt(time / 60) + ' 分' + s + ' 秒';
|
||||
} else if (time < 86400) {
|
||||
const m = time % 3600;
|
||||
return parseInt(time / 3600) + ' 小时' + parseInt(m / 60) + ' 分';
|
||||
} else {
|
||||
const m = time % 86400;
|
||||
return parseInt(time / 86400) + ' 天' + parseInt(m / 3600) + ' 小时';
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.v-data-table--dense>.v-data-table__wrapper>table>tbody>tr>td, .v-data-table--dense>.v-data-table__wrapper>table>tbody>tr>th, .v-data-table--dense>.v-data-table__wrapper>table>tfoot>tr>td, .v-data-table--dense>.v-data-table__wrapper>table>tfoot>tr>th, .v-data-table--dense>.v-data-table__wrapper>table>thead>tr>td, .v-data-table--dense>.v-data-table__wrapper>table>thead>tr>th {
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -3,41 +3,38 @@
|
||||
{% block vue_template %}
|
||||
|
||||
<jh-layout-v3>
|
||||
|
||||
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
|
||||
</v-col>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table :headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="success" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
查看
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
|
||||
</v-col>
|
||||
<v-spacer></v-spacer>
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="success" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
查看
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
@@ -61,16 +58,14 @@ new Vue({
|
||||
tableDataFromBackend: [],
|
||||
headers: [
|
||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
|
||||
{text: "任务ID", value: "taskId", width: 120},
|
||||
{text: "任务名称", value: "taskTitle", width: 120},
|
||||
{text: "任务状态", value: "taskStatus", width: 120},
|
||||
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
||||
{text: "课程ID", value: "taskId", width: 120},
|
||||
{text: "课程名称", value: "taskTitle", width: 120},
|
||||
{text: "课程状态", value: "taskStatus", width: 120},
|
||||
{text: "当前节点ID", value: "taskConfigId", width: 200},
|
||||
{text: "申请人", value: "taskInitUser", width: 120},
|
||||
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
||||
{text: "处理人员", value: "taskEditUserList", width: 120},
|
||||
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
||||
{text: "备注", value: "taskComment", width: 120},
|
||||
{text: "任务创建人", value: "createByUser", width: 120},
|
||||
{text: "课程创建人", value: "createByUser", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
@@ -101,7 +96,7 @@ new Vue({
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const result = await window.jianghuAxios({
|
||||
const {data: {appData: {resultData: {rows}}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskICreateManagement',
|
||||
@@ -113,12 +108,15 @@ new Vue({
|
||||
}
|
||||
});
|
||||
|
||||
this.tableDataFromBackend = result.data.appData.resultData.rows;
|
||||
rows.forEach(row => {
|
||||
row.operationAt = dayjs(row.operationAt).format('YYYY-MM-DD HH:mm:ss');
|
||||
})
|
||||
this.tableDataFromBackend = rows;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
|
||||
toTaskHistory({item}) {
|
||||
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?id=${item.id}`;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
{% extends 'template/jhTemplateV3.html'%}
|
||||
|
||||
{% block vue_template %}
|
||||
|
||||
<jh-layout-v3>
|
||||
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
|
||||
</v-col>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
:headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList"
|
||||
@click="doUiAction(tableButton.action, {item})">
|
||||
{{ tableButton.text }}
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block vue_body %}
|
||||
|
||||
<script type="module">
|
||||
new Vue({
|
||||
el: '#app',
|
||||
template: '#app-template',
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
isMobile: window.innerWidth < 600,
|
||||
// 表格相关数据
|
||||
isFormValid: true,
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
constantCollection: {},
|
||||
|
||||
serverSearchInput: {
|
||||
studentId: null,
|
||||
classId: null
|
||||
},
|
||||
isEditDrawerShow: false,
|
||||
searchInput: null,
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
headers: [
|
||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
|
||||
{text: "任务ID", value: "taskId", width: 120},
|
||||
{text: "任务名称", value: "taskTitle", width: 120},
|
||||
{text: "任务状态", value: "taskStatus", width: 120},
|
||||
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
||||
{text: "申请人", value: "taskInitUser", width: 120},
|
||||
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
||||
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
||||
{text: "备注", value: "taskComment", width: 120},
|
||||
{text: "任务创建人", value: "createByUser", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
||||
],
|
||||
|
||||
editItem: {},
|
||||
tableButtonList: [
|
||||
{text: '查看', buttonType: 'view', color: 'success', action: 'toTaskHistory'},
|
||||
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
||||
],
|
||||
dialogSaveInfoAction: ''
|
||||
}),
|
||||
watch: {},
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
async doUiAction(uiActionId, uiActionData) {
|
||||
switch (uiActionId) {
|
||||
case 'refreshTableData':
|
||||
await this.refreshTableData(uiActionData);
|
||||
break;
|
||||
case 'deleteItem':
|
||||
await this.confirmDeleteItemDialog(uiActionData);
|
||||
await this.doDeleteItem(uiActionData);
|
||||
await this.refreshTableData(uiActionData);
|
||||
break;
|
||||
case 'toTaskHistory':
|
||||
await this.toTaskHistory(uiActionData);
|
||||
break;
|
||||
default:
|
||||
console.error("[doUiAction] uiActionId not find", { uiActionId });
|
||||
break;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取表格数据
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const result = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskManagement',
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
where: {},
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.tableDataFromBackend = result.data.appData.resultData.rows;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
|
||||
// updateItem
|
||||
async confirmDeleteItemDialog() {
|
||||
if (await window.confirmDialog({title: "删除", content: "确定删除吗?"}) === false) {
|
||||
throw new Error("[confirmDeleteItemDialog] 否");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
async doDeleteItem({item}) {
|
||||
const {id} = item;
|
||||
await window.vtoast.loading("删除数据");
|
||||
await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskManagement',
|
||||
actionId: 'deleteItem',
|
||||
actionData: {},
|
||||
where: {id: id}
|
||||
}
|
||||
}
|
||||
});
|
||||
await window.vtoast.success("删除数据成功");
|
||||
},
|
||||
// 跳转
|
||||
toTaskHistory({item}) {
|
||||
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -1,129 +0,0 @@
|
||||
{% extends 'template/jhTemplateV3.html'%}
|
||||
|
||||
{% block vue_template %}
|
||||
|
||||
<jh-layout-v3>
|
||||
|
||||
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
|
||||
</v-col>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
:headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="success" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
查看
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block vue_body %}
|
||||
|
||||
<script type="module">
|
||||
new Vue({
|
||||
el: '#app',
|
||||
template: '#app-template',
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
isMobile: window.innerWidth < 600,
|
||||
// 表格相关数据
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
searchInput: null,
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
headers: [
|
||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
|
||||
{text: "任务ID", value: "taskId", width: 120},
|
||||
{text: "任务名称", value: "taskTitle", width: 120},
|
||||
{text: "任务状态", value: "taskStatus", width: 120},
|
||||
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
||||
{text: "申请人", value: "taskInitUser", width: 120},
|
||||
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
||||
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
||||
{text: "备注", value: "taskComment", width: 120},
|
||||
{text: "任务创建人", value: "createByUser", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
],
|
||||
}),
|
||||
watch: {},
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
async doUiAction(uiActionId, uiActionData) {
|
||||
switch (uiActionId) {
|
||||
case 'refreshTableData':
|
||||
await this.refreshTableData(uiActionData);
|
||||
break;
|
||||
case 'toTaskHistory':
|
||||
await this.toTaskHistory(uiActionData);
|
||||
break;
|
||||
default:
|
||||
console.error("[doUiAction] uiActionId not find", { uiActionId });
|
||||
break;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取表格数据
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const result = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskICreateManagement',
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
where: {},
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.tableDataFromBackend = result.data.appData.resultData.rows;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
|
||||
toTaskHistory({item}) {
|
||||
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -1,132 +0,0 @@
|
||||
{% extends 'template/jhTemplateV3.html'%}
|
||||
|
||||
{% block vue_template %}
|
||||
|
||||
<jh-layout-v3>
|
||||
|
||||
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
|
||||
</v-col>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
:headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="success" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
查看
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block vue_body %}
|
||||
|
||||
<script type="module">
|
||||
new Vue({
|
||||
el: '#app',
|
||||
template: '#app-template',
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
isMobile: window.innerWidth < 600,
|
||||
// 表格相关数据
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
searchInput: null,
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
headers: [
|
||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
|
||||
{text: "任务ID", value: "taskId", width: 120},
|
||||
{text: "任务名称", value: "taskTitle", width: 120},
|
||||
{text: "任务状态", value: "taskStatus", width: 120},
|
||||
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
||||
{text: "申请人", value: "taskInitUser", width: 120},
|
||||
{text: "当前执行的处理人员", value: "taskEditUserList", width: 120},
|
||||
{text: "所有相关人员", value: "taskViewUserList", width: 120},
|
||||
{text: "备注", value: "taskComment", width: 120},
|
||||
{text: "任务创建人", value: "createByUser", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
],
|
||||
}),
|
||||
watch: {},
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
async doUiAction(uiActionId, uiActionData) {
|
||||
switch (uiActionId) {
|
||||
case 'refreshTableData':
|
||||
await this.refreshTableData(uiActionData);
|
||||
break;
|
||||
case 'toTaskHistory':
|
||||
await this.toTaskHistory(uiActionData);
|
||||
break;
|
||||
default:
|
||||
console.error("[doAction] uiActionId not find", { uiActionId });
|
||||
break;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取表格数据
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const result = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskUpcomingManagement',
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
where: {},
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.tableDataFromBackend = result.data.appData.resultData.rows;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
|
||||
|
||||
toTaskHistory({item}) {
|
||||
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -2,51 +2,50 @@
|
||||
|
||||
{% block vue_template %}
|
||||
<jh-layout-v3>
|
||||
<template slot="serverSearch">
|
||||
<div class="mt-4" style="text-align: right;">
|
||||
<v-btn color="success" @click="doUiAction(dialogSaveInfoAction)" style="height: 40px">
|
||||
保存
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template slot-scope="props">
|
||||
<v-card class="mt-3 mb-12" :class="{'pa-8': !props.ismobile, 'pa-4': props.ismobile}">
|
||||
<v-row>
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line color="success" prefix="流程名:" v-model="editItem['workflowName']" :rules="requireRules">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<template slot="serverSearch">
|
||||
<div class="mt-4" style="text-align: right;">
|
||||
<v-btn color="success" @click="doUiAction(dialogSaveInfoAction)" style="height: 40px">
|
||||
保存
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line color="success" prefix="分类:" v-model="editItem['workflowCategory']" :rules="requireRules">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<template slot-scope="props">
|
||||
<v-card class="mt-3 mb-12" :class="{'pa-8': !props.ismobile, 'pa-4': props.ismobile}">
|
||||
<v-row>
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line color="success" prefix="流程名:" v-model="editItem['workflowName']" :rules="requireRules">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line color="success" prefix="分类:" v-model="editItem['workflowCategory']" :rules="requireRules">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line color="success" prefix="备注:"
|
||||
v-model="editItem['workflowRemark']">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line color="success" prefix="备注:"
|
||||
v-model="editItem['workflowRemark']">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-card>
|
||||
|
||||
<div class=" pb-4" style="font-size: 18px; font-weight: bold">模板设置</div>
|
||||
<div class=" pb-4" style="font-size: 18px; font-weight: bold">模板设置</div>
|
||||
<tpl-form-design :form="editItem.workflowForm" v-if="!loading">
|
||||
</tpl-form-design>
|
||||
|
||||
<div class="pt-8 pb-4" style="font-size: 18px; font-weight: bold">流程设置</div>
|
||||
<process-flow v-if="!loading" :data="editItem.workflowConfig" :user="constantCollection.userList"
|
||||
:group="constantCollection.groupList" :tpl="constantCollection.workflowFormList">
|
||||
</process-flow>
|
||||
|
||||
<v-overlay :value="loading" absolute>
|
||||
<v-progress-circular
|
||||
indeterminate
|
||||
size="64"
|
||||
></v-progress-circular>
|
||||
</v-overlay>
|
||||
</template>
|
||||
<v-overlay :value="loading" absolute>
|
||||
<v-progress-circular
|
||||
indeterminate
|
||||
size="64"
|
||||
></v-progress-circular>
|
||||
</v-overlay>
|
||||
</template>
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
@@ -67,8 +66,6 @@ new Vue({
|
||||
template: '#app-template',
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
isMobile: window.innerWidth < 600,
|
||||
// 表格相关数据
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
@@ -77,10 +74,8 @@ new Vue({
|
||||
groupList: [],
|
||||
workflowFormList: []
|
||||
},
|
||||
|
||||
editItem: {},
|
||||
dialogSaveInfoAction: 'createItem',
|
||||
dialog: false,
|
||||
loading: false,
|
||||
}),
|
||||
watch: {
|
||||
@@ -127,17 +122,19 @@ new Vue({
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
buildEditItem() {
|
||||
const item = {
|
||||
workflowId: this.editItem.workflowId || null,
|
||||
workflowName: this.editItem.workflowName,
|
||||
workflowRemark: this.editItem.workflowRemark,
|
||||
workflowCategory: this.editItem.workflowCategory,
|
||||
workflowConfig: this.editItem.workflowConfig ? JSON.stringify(this.editItem.workflowConfig) : null,
|
||||
workflowForm: this.editItem.workflowForm ? JSON.stringify(this.editItem.workflowForm) : null,
|
||||
const { id, workflowId, workflowName, workflowRemark, workflowCategory, workflowConfig, workflowForm } = this.editItem;
|
||||
let item = {
|
||||
workflowName,
|
||||
workflowRemark,
|
||||
workflowCategory,
|
||||
workflowId: workflowId || null,
|
||||
workflowConfig: workflowConfig ? JSON.stringify(workflowConfig) : null,
|
||||
workflowForm: workflowForm ? JSON.stringify(workflowForm) : null,
|
||||
}
|
||||
if (this.editItem.id) {
|
||||
item.id = this.editItem.id;
|
||||
if (id) {
|
||||
item.id = id;
|
||||
}
|
||||
return item;
|
||||
},
|
||||
@@ -167,10 +164,10 @@ new Vue({
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取表格数据
|
||||
* 获取user数据
|
||||
*/
|
||||
async getUserList() {
|
||||
const { rows } = (await window.jianghuAxios({
|
||||
const {data: {appData: {resultData: {rows}}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -179,16 +176,16 @@ new Vue({
|
||||
where: {},
|
||||
}
|
||||
}
|
||||
})).data.appData.resultData;
|
||||
});
|
||||
this.constantCollection.userList = rows.map(e => {
|
||||
return {text: e.username, value: e.userId}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取表格数据
|
||||
* 获取group数据
|
||||
*/
|
||||
async getGroupList() {
|
||||
const { rows } = (await window.jianghuAxios({
|
||||
const {data: {appData: {resultData: {rows}}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -197,23 +194,21 @@ new Vue({
|
||||
where: {},
|
||||
}
|
||||
}
|
||||
})).data.appData.resultData;
|
||||
});
|
||||
this.constantCollection.groupList = rows.map(e => {
|
||||
return {text: e.groupName, value: e.groupId}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// startCreateItem
|
||||
async clearItemData() {
|
||||
this.dialogSaveInfoAction = 'createItem';
|
||||
this.editItem = {workflowForm: [], workflowConfig: {lineList: [], nodeList: []}};
|
||||
},
|
||||
|
||||
async syncEditItem() {
|
||||
const _this = this;
|
||||
this.loading = true;
|
||||
this.dialogSaveInfoAction = 'updateItem';
|
||||
const { rows } = (await window.jianghuAxios({
|
||||
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -221,7 +216,7 @@ new Vue({
|
||||
where: {id: this.editItem.id},
|
||||
}
|
||||
}
|
||||
})).data.appData.resultData;
|
||||
});
|
||||
if (!rows.length) {
|
||||
this.clearItemData();
|
||||
} else {
|
||||
@@ -230,12 +225,11 @@ new Vue({
|
||||
item.workflowForm = item.workflowForm ? JSON.parse(item.workflowForm) : [];
|
||||
this.editItem = item;
|
||||
}
|
||||
setTimeout(function() {
|
||||
_this.loading = false;
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
}, 500)
|
||||
},
|
||||
|
||||
// createItem
|
||||
async confirmCreateItemDialog() {
|
||||
if (await window.confirmDialog({title: "新增", content: "确定新增吗?"}) === false) {
|
||||
throw new Error("[confirmCreateFormDialog] 否");
|
||||
@@ -249,7 +243,7 @@ new Vue({
|
||||
delete this.editItem.id;
|
||||
const item = this.buildEditItem();
|
||||
await window.vtoast.loading("新增数据");
|
||||
const { rows } = (await window.jianghuAxios({
|
||||
const { data: { appData: { resultData: { rows } } } } = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
@@ -257,13 +251,12 @@ new Vue({
|
||||
actionData: item
|
||||
}
|
||||
}
|
||||
})).data.appData.resultData;
|
||||
})
|
||||
this.editItem.id = rows[0];
|
||||
history.pushState({}, '', `?id=${rows[0]}`);
|
||||
await window.vtoast.success("新增数据成功");
|
||||
},
|
||||
|
||||
// updateItem
|
||||
async confirmUpdateItemDialog() {
|
||||
if (await window.confirmDialog({title: "修改", content: "确定修改吗?"}) === false) {
|
||||
throw new Error("[confirmUpdateItemDialog] 否");
|
||||
@@ -271,7 +264,7 @@ new Vue({
|
||||
},
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* 修改数据
|
||||
*/
|
||||
async doUpdateItem() {
|
||||
const {id, ...item} = this.buildEditItem();
|
||||
@@ -293,11 +286,6 @@ new Vue({
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.v-dialog--fullscreen .v-sheet {
|
||||
height: unset;
|
||||
top: unset;
|
||||
position: unset;
|
||||
background: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -3,41 +3,41 @@
|
||||
{% block vue_template %}
|
||||
|
||||
<jh-layout-v3>
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
<!-- 页面主要内容 -->
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
<v-col cols="12" xs="12" sm="4" md="4" xl="4" class="pl-0">
|
||||
<v-btn color="success" dark class="elevation-0 mr-2" @click="doUiAction('createItem')">新增</v-btn>
|
||||
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
|
||||
</v-col>
|
||||
<v-spacer></v-spacer>
|
||||
<v-col cols="12" xs="12" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-col cols="12" xs="12" sm="4" md="4" xl="4" class="pl-0">
|
||||
<v-btn color="success" dark class="elevation-0 mr-2" @click="doUiAction('createItem')">新增</v-btn>
|
||||
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
|
||||
</v-col>
|
||||
<v-spacer></v-spacer>
|
||||
<v-col cols="12" xs="12" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
:headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList"
|
||||
@click="doUiAction(tableButton.action, {item})">
|
||||
{{ tableButton.text }}
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
<v-data-table
|
||||
fixed-header
|
||||
:headers="headers"
|
||||
:items="tableDataFromBackend"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
:items-per-page="20"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList"
|
||||
@click="doUiAction(tableButton.action, {item})">
|
||||
{{ tableButton.text }}
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
@@ -51,38 +51,23 @@ new Vue({
|
||||
vuetify: new Vuetify(),
|
||||
data: () => ({
|
||||
isMobile: window.innerWidth < 600,
|
||||
// 表格相关数据
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
serverSearchInput: {
|
||||
studentId: null,
|
||||
classId: null
|
||||
},
|
||||
isEditDrawerShow: false,
|
||||
searchInput: null,
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
headers: [
|
||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
|
||||
{text: "流程ID", value: "workflowId", width: 120},
|
||||
{text: "流程名", value: "workflowName", width: 120},
|
||||
{text: "流程名", value: "workflowName", width: 200},
|
||||
{text: "分类ID", value: "workflowCategory", width: 120},
|
||||
{text: "备注", value: "workFlowRemark", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 160, class: 'fixed', cellClass: 'fixed'},
|
||||
],
|
||||
|
||||
currentClickButton: {title: '新增', action: 'add'},
|
||||
editItem: {},
|
||||
tableButtonList: [
|
||||
{text: '编辑', buttonType: 'edit', color: 'success', action: 'updateItem'},
|
||||
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
||||
],
|
||||
dialogSaveInfoAction: '',
|
||||
dialog: false,
|
||||
]
|
||||
}),
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
@@ -118,22 +103,19 @@ new Vue({
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value => !!value);
|
||||
const { rows } = (await window.jianghuAxios({
|
||||
const {data: {appData: {resultData: {rows}}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
where: {},
|
||||
whereLike: serverSearchInput,
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
})).data.appData.resultData;
|
||||
});
|
||||
for (const item of rows) {
|
||||
item.workflowConfig = item.workflowConfig ? JSON.parse(item.workflowConfig) : null;
|
||||
item.workflowForm = item.workflowForm ? JSON.parse(item.workflowForm) : [];
|
||||
item.operationAt = dayjs(item.operationAt).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
this.tableDataFromBackend = rows;
|
||||
this.isTableLoading = false;
|
||||
@@ -186,11 +168,6 @@ new Vue({
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.v-dialog--fullscreen .v-sheet {
|
||||
height: unset;
|
||||
top: unset;
|
||||
position: unset;
|
||||
background: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user