新版UI适配
This commit is contained in:
1 parent
55dfcee93e
commit
73d6daacc7
17 files changed
+1542
-1991
No files matched your search
@@ -11,17 +11,20 @@
|
|||||||
<el-input v-model="flowData.Remark" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
|
<el-input v-model="flowData.Remark" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
|
|
||||||
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="GUID" v-model="flowData.Id"></v-text-field>
|
<span class="inputLabel">GUID</span>
|
||||||
|
<v-text-field class="cus-v-input mr-2" dense filled single-line label="GUID" v-model="flowData.Id"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="流程名称" v-model="flowData.Name"></v-text-field>
|
<span class="inputLabel">流程名称</span>
|
||||||
|
<v-text-field class="cus-v-input mr-2" dense filled single-line label="流程名称" v-model="flowData.Name"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="flowData.Remark"></v-text-field>
|
<span class="inputLabel">备注</span>
|
||||||
|
<v-text-field class="cus-v-input mr-2" dense filled single-line label="备注" v-model="flowData.Remark"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-form>
|
</v-form>
|
||||||
@@ -38,6 +41,11 @@
|
|||||||
isFormValid: true
|
isFormValid: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isMobile() {
|
||||||
|
return window.innerWidth < 600;
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(data) {
|
init(data) {
|
||||||
this.flowData = data;
|
this.flowData = data;
|
||||||
|
|||||||
@@ -16,36 +16,44 @@
|
|||||||
<el-input v-model="line.Remark" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
|
<el-input v-model="line.Remark" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
|
|
||||||
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="GUID" v-model="line.id"></v-text-field>
|
<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-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined disabled label="源活动" v-model="line.from"></v-text-field>
|
<span class="inputLabel">源活动</span>
|
||||||
|
<v-text-field class="cus-v-input mr-2" dense filled single-line disabled label="源活动" v-model="line.from"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined disabled label="目标活动" v-model="line.to"></v-text-field>
|
<span class="inputLabel">目标活动</span>
|
||||||
|
<v-text-field class="cus-v-input mr-2" dense filled single-line disabled label="目标活动" v-model="line.to"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="名称" v-model="line.label"></v-text-field>
|
<span class="inputLabel">名称</span>
|
||||||
|
<v-text-field class="cus-v-input mr-2" dense filled single-line label="名称" v-model="line.label"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
|
<span class="inputLabel">操作类型</span>
|
||||||
<v-select
|
<v-select
|
||||||
:items="lineTypeList"
|
:items="lineTypeList"
|
||||||
dense outlined
|
dense filled single-line
|
||||||
class="cus-v-input mr-2"
|
class="cus-v-input mr-2"
|
||||||
label="操作类型"
|
label="操作类型"
|
||||||
outlined
|
color="success"
|
||||||
|
item-color="success"
|
||||||
v-model="line.type"
|
v-model="line.type"
|
||||||
></v-select>
|
></v-select>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务Resource" v-model="line.hook"></v-text-field>
|
<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>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="备注说明" v-model="line.Remark"></v-text-field>
|
<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>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-form>
|
</v-form>
|
||||||
@@ -74,6 +82,11 @@
|
|||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isMobile() {
|
||||||
|
return window.innerWidth < 600;
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(item, lineTypeList) {
|
init(item, lineTypeList) {
|
||||||
this.isUpdate = false;
|
this.isUpdate = false;
|
||||||
@@ -85,4 +98,4 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -19,34 +19,42 @@
|
|||||||
</el-form> -->
|
</el-form> -->
|
||||||
|
|
||||||
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
<v-form v-model="isFormValid" ref="dataForm" lazy-validation>
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input" dense outlined label="GUID" v-model="node.id"></v-text-field>
|
<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-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input" dense outlined label="名称" v-model="node.label"></v-text-field>
|
<span class="inputLabel">名称</span>
|
||||||
|
<v-text-field class="cus-v-input" dense filled single-line label="名称" v-model="node.label"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
<v-text-field class="cus-v-input" dense outlined label="备注说明" v-model="node.Remark"></v-text-field>
|
<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>
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12" v-if="showTask" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
|
<span class="inputLabel">名称</span>
|
||||||
|
|
||||||
<v-select
|
<v-select
|
||||||
:items="assignTypeList"
|
:items="assignTypeList"
|
||||||
dense outlined
|
dense filled single-line
|
||||||
item-text="text"
|
item-text="text"
|
||||||
|
color="success"
|
||||||
|
item-color="success"
|
||||||
item-value="value"
|
item-value="value"
|
||||||
class="cus-v-input"
|
class="cus-v-input"
|
||||||
label="指派类型"
|
label="指派类型"
|
||||||
outlined
|
|
||||||
v-model="node.assignType"
|
v-model="node.assignType"
|
||||||
></v-select>
|
></v-select>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" v-if="showTask" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
|
<span class="inputLabel">名称</span>
|
||||||
<v-select
|
<v-select
|
||||||
:items="optionList"
|
:items="optionList"
|
||||||
dense outlined
|
color="success"
|
||||||
|
item-color="success"
|
||||||
|
dense filled single-line
|
||||||
item-text="text"
|
item-text="text"
|
||||||
item-value="value"
|
item-value="value"
|
||||||
class="cus-v-input"
|
class="cus-v-input"
|
||||||
@@ -56,22 +64,26 @@
|
|||||||
:disabled="!node.assignType"
|
:disabled="!node.assignType"
|
||||||
></v-select>
|
></v-select>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" v-if="showTask" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
|
<span class="inputLabel">名称</span>
|
||||||
<!-- <v-textarea
|
<!-- <v-textarea
|
||||||
outlined
|
filled single-line
|
||||||
name="input-7-4"
|
name="input-7-4"
|
||||||
label="允许的操作"
|
label="允许的操作"
|
||||||
value=""
|
value=""
|
||||||
rows="3"
|
rows="3"
|
||||||
hide-details
|
hide-details
|
||||||
></v-textarea> -->
|
></v-textarea> -->
|
||||||
<v-text-field class="cus-v-input" dense outlined label="允许的操作(英文逗号分隔)" v-model="node.lineTypeList"></v-text-field>
|
<v-text-field class="cus-v-input" dense filled single-line label="允许的操作(英文逗号分隔)" v-model="node.lineTypeList"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" v-if="showTask" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
|
<span class="inputLabel">名称</span>
|
||||||
<v-select
|
<v-select
|
||||||
:items="tpl"
|
:items="tpl"
|
||||||
dense outlined
|
dense filled single-line
|
||||||
item-text="text"
|
item-text="text"
|
||||||
|
color="success"
|
||||||
|
item-color="success"
|
||||||
item-value="value"
|
item-value="value"
|
||||||
class="cus-v-input"
|
class="cus-v-input"
|
||||||
label="可写模板"
|
label="可写模板"
|
||||||
@@ -79,12 +91,15 @@
|
|||||||
v-model="node.formId"
|
v-model="node.formId"
|
||||||
></v-select>
|
></v-select>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" v-if="showTask" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" class=" pb-3">
|
||||||
|
<span class="inputLabel">名称</span>
|
||||||
<v-select
|
<v-select
|
||||||
:items="tpl"
|
:items="tpl"
|
||||||
dense outlined
|
dense filled single-line
|
||||||
item-text="text"
|
item-text="text"
|
||||||
item-value="value"
|
item-value="value"
|
||||||
|
color="success"
|
||||||
|
item-color="success"
|
||||||
class="cus-v-input"
|
class="cus-v-input"
|
||||||
label="隐藏模板"
|
label="隐藏模板"
|
||||||
multiple
|
multiple
|
||||||
@@ -134,8 +149,10 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
},
|
},
|
||||||
created() {},
|
|
||||||
computed: {
|
computed: {
|
||||||
|
isMobile() {
|
||||||
|
return window.innerWidth < 600;
|
||||||
|
},
|
||||||
showTask() {
|
showTask() {
|
||||||
return ['userTask', 'receiveTask'].includes(this.node.type);
|
return ['userTask', 'receiveTask'].includes(this.node.type);
|
||||||
},
|
},
|
||||||
@@ -182,4 +199,4 @@
|
|||||||
.v-textarea textarea {
|
.v-textarea textarea {
|
||||||
line-height: 1.2rem;
|
line-height: 1.2rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -31,6 +31,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
isMobile() {
|
||||||
|
return window.innerWidth < 600;
|
||||||
|
},
|
||||||
// 节点容器样式
|
// 节点容器样式
|
||||||
flowNodeContainer: {
|
flowNodeContainer: {
|
||||||
get() {
|
get() {
|
||||||
@@ -140,4 +143,4 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
cursor: crosshair;
|
cursor: crosshair;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,35 +1,52 @@
|
|||||||
<template id="process-flow">
|
<template id="process-flow">
|
||||||
<div class="process-flow-container">
|
<div class="process-flow-container">
|
||||||
<div class="flow-menu">
|
<v-card class="flow-menu pa-4 mr-4" color="#f5f8fa" width="140px">
|
||||||
<div class="menu-item" v-for="item in menuList" draggable="true" @dragstart="drag(item)">
|
<div block color="white" class="menu-item mb-3" v-for="item in menuList" draggable="true" @dragstart="drag(item)">
|
||||||
<i :class="item.icon"></i>
|
<i :class="item.icon"></i>
|
||||||
<div>{{item.name}}</div>
|
<div>{{item.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<v-divider></v-divider>
|
||||||
<div class="menu-item" @click="isConnect=true">
|
<v-btn block class="menu-item mt-3" :color="isConnect ? 'success' : 'white'" @click="isConnect=true">
|
||||||
<i class="el-icon-bottom-right"></i>
|
<i class="el-icon-bottom-right"></i>
|
||||||
<div>连线</div>
|
<div>连线</div>
|
||||||
</div>
|
</v-btn>
|
||||||
<div class="menu-item" @click="isConnect=false">
|
<v-btn block class="menu-item" :color="!isConnect ? 'success' : 'white'" @click="isConnect=false">
|
||||||
<i class="el-icon-rank"></i>
|
<i class="el-icon-rank"></i>
|
||||||
<div>选择</div>
|
<div>选择</div>
|
||||||
</div>
|
</v-btn>
|
||||||
|
|
||||||
</div>
|
</v-card>
|
||||||
<div class="flow-detail">
|
<v-card class="flow-detail pa-4 mr-4" color="#f5f8fa">
|
||||||
<div id="flowContent" ref="flowContent" @drop="drop($event)" @dragover="allowDrop($event)" @click="editFlow()"
|
<div id="flowContent" ref="flowContent" @drop="drop($event)" @dragover="allowDrop($event)" @click="editFlow()"
|
||||||
@dblclick="isConnect=false">
|
@dblclick="isConnect=false">
|
||||||
<flow-node v-for="node in data.nodeList" :key="node.id" :node="node" :id="node.id" :isconnect="isConnect"
|
<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">
|
@delete-node="deleteNode" @change-node-site="changeNodeSite" @edit-node="editNode">
|
||||||
</flow-node>
|
</flow-node>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</v-card>
|
||||||
<div class="flow-edit" v-if="editType">
|
<v-card class="flow-edit pa-4" v-if="editType" color="#f5f8fa">
|
||||||
<div class="flow-edit-content">
|
<template v-if="editType=='node' || editType=='line'">
|
||||||
<edit-node ref="nodeForm" v-show="editType=='node'" :user="user" :group="group" :tpl="tpl"></edit-node>
|
<div class="mb-3">
|
||||||
<edit-line ref="lineForm" v-show="editType=='line'" @line-save="lineLabelSave"></edit-line>
|
<v-icon>mdi-application-edit-outline</v-icon>
|
||||||
</div>
|
<span style="transform: translateY(2px); display: inline-block; ">{{editType=='node' ? '节点' : '连线'}}属性</span>
|
||||||
</div>
|
</div>
|
||||||
|
<v-card>
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="mb-3">
|
||||||
|
<v-icon>mdi-application-edit-outline</v-icon>
|
||||||
|
<span style="transform: translateY(2px); display: inline-block; ">属性面板</span>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center;line-height: 100px; color: #999999">
|
||||||
|
请选择节点或连接线
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -249,7 +266,7 @@
|
|||||||
_this.jsPlumb.importDefaults(_this.jsplumbSetting)
|
_this.jsPlumb.importDefaults(_this.jsplumbSetting)
|
||||||
// 会使整个jsPlumb立即重绘。
|
// 会使整个jsPlumb立即重绘。
|
||||||
_this.jsPlumb.setSuspendDrawing(false, true);
|
_this.jsPlumb.setSuspendDrawing(false, true);
|
||||||
|
|
||||||
// 初始化节点
|
// 初始化节点
|
||||||
_this.loadEasyFlow()
|
_this.loadEasyFlow()
|
||||||
|
|
||||||
@@ -466,12 +483,12 @@
|
|||||||
if (!lineTypeList.includes(item.type) ) {
|
if (!lineTypeList.includes(item.type) ) {
|
||||||
// 1 - 删除画布连线 | 2 - 清空line的操作属性
|
// 1 - 删除画布连线 | 2 - 清空line的操作属性
|
||||||
// _this.jsPlumb.deleteConnection(conn)
|
// _this.jsPlumb.deleteConnection(conn)
|
||||||
|
|
||||||
// 从 lineList 数组移除
|
// 从 lineList 数组移除
|
||||||
// _this.data.lineList.splice(index,1);
|
// _this.data.lineList.splice(index,1);
|
||||||
// 不渲染表单
|
// 不渲染表单
|
||||||
// return
|
// return
|
||||||
|
|
||||||
// 默认修改类型为第一个
|
// 默认修改类型为第一个
|
||||||
if (!preNode.id.includes('start-')) {
|
if (!preNode.id.includes('start-')) {
|
||||||
if (add) {
|
if (add) {
|
||||||
@@ -591,10 +608,7 @@
|
|||||||
|
|
||||||
.flow-menu {
|
.flow-menu {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
padding: 10px;
|
|
||||||
margin: 0 10px;
|
|
||||||
border: 1px solid #EBEEF5;
|
border: 1px solid #EBEEF5;
|
||||||
padding: 12px;
|
|
||||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
@@ -602,14 +616,17 @@
|
|||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-shadow: 0 0 4px #696969;
|
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
|
background: #FFFFFF;
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
.menu-item:hover {
|
||||||
|
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
.menu-item>i {
|
.menu-item>i {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
@@ -626,14 +643,11 @@
|
|||||||
|
|
||||||
.flow-edit-content {
|
.flow-edit-content {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
background: #FFF;
|
|
||||||
color: #606266;
|
color: #606266;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border: 1px solid #EBEEF5;
|
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
@@ -650,4 +664,4 @@
|
|||||||
.csslabel .label-text {
|
.csslabel .label-text {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,121 +1,134 @@
|
|||||||
<template id="form-item-list-generator">
|
<template id="form-item-list-generator">
|
||||||
<div class="d-flex form-item-list-generator-content">
|
<v-card :class="{'d-flex': !isMobile, 'form-item-list-generator-content': !isMobile}">
|
||||||
<div class="componentList">
|
<v-card color="#f5f8fa" :style="{'width': isMobile ? '100%' : '300px'}"
|
||||||
<div class="left-component-item-title">
|
:class="{'pa-4': !isMobile, 'pa-2': isMobile, 'mr-6': !isMobile}">
|
||||||
|
<div class="left-component-item-title" :style="{'white-space': 'nowrap'}">
|
||||||
<v-icon>mdi-puzzle-outline</v-icon>
|
<v-icon>mdi-puzzle-outline</v-icon>
|
||||||
组件
|
<span style="transform: translateY(2px); display: inline-block;">组件</span>
|
||||||
</div>
|
</div>
|
||||||
<draggable
|
<draggable
|
||||||
:group="{ name: 'componentGroup', pull: 'clone', put: false }"
|
:group="{ name: 'componentGroup', pull: 'clone', put: false }"
|
||||||
:list="componentList"
|
:list="componentList"
|
||||||
draggable=".left-component-item"
|
draggable=".left-component-item"
|
||||||
:clone="cloneComponent"
|
:clone="cloneComponent"
|
||||||
@end="leftComponentDraggableOnEnd">
|
@end="leftComponentDraggableOnEnd">
|
||||||
<div class="left-component-item"
|
<div class="left-component-item"
|
||||||
v-for="(component, index) in componentList" :key="index"
|
v-for="(component, index) in componentList" :key="index"
|
||||||
@click="addFormItem(component)">
|
@click="addFormItem(component)">
|
||||||
<div class="left-component-item-body">
|
<div class="left-component-item-body">
|
||||||
<v-icon small class="mr-1">{{ component.icon }}</v-icon>
|
<v-icon small class="mr-1">{{ component.icon }}</v-icon>
|
||||||
{{ component.title }}
|
{{ component.title }}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</draggable>
|
</draggable>
|
||||||
</div>
|
</v-card>
|
||||||
|
|
||||||
<v-card class="formItemList">
|
<v-card class="formItemList py-10 pl-4 pr-4" color="#f5f8fa" style="position: relative;">
|
||||||
<v-toolbar dense flat>
|
<v-btn small color="error" @click.stop="emptyCanva" class="mr-2 mt-2"
|
||||||
<v-btn icon @click.stop="emptyCanva" class="ml-2">
|
style="position: absolute; right: 8px; top: 0;">
|
||||||
<v-icon color="grey lighten-1" dark>mdi-delete-empty</v-icon>
|
<span>重置</span>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-toolbar>
|
<draggable
|
||||||
<draggable
|
|
||||||
v-if="formItemList.length > 0"
|
v-if="formItemList.length > 0"
|
||||||
:list="formItemList"
|
:list="formItemList"
|
||||||
:animation="300"
|
:animation="300"
|
||||||
group="componentGroup">
|
group="componentGroup">
|
||||||
<v-hover v-for="(formItem, index) in formItemList" :key="index" v-slot:default="{ hover }">
|
<v-hover v-for="(formItem, index) in formItemList" :key="index" v-slot:default="{ hover }">
|
||||||
<v-card
|
<v-card
|
||||||
@click.native="formItemSelect(formItem.id)"
|
@click.native="formItemSelect(formItem.id)"
|
||||||
:elevation="hover ? 12 : 2"
|
:elevation="hover ? 12 : 2"
|
||||||
:class="['ma-2', selectedFormItemId === formItem.id && !hover ? 'formItem-selected' : 'formItem-body']"
|
:class="['my-2', selectedFormItemId === formItem.id && !hover ? 'formItem-selected' : 'formItem-body']"
|
||||||
style="cursor: move"
|
style="cursor: move"
|
||||||
dense>
|
dense>
|
||||||
<v-list-item>
|
<v-list-item>
|
||||||
|
|
||||||
<v-list-item-content v-if="formItem.component.type === 'singleSelect'">
|
<v-list-item-content v-if="formItem.component.type === 'singleSelect'">
|
||||||
<v-radio-group :disabled="true" :label="(index+1) + formItem.component.outline">
|
<v-radio-group :disabled="true" :label="(index+1) + formItem.component.outline">
|
||||||
<v-radio hide-details v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
<v-radio hide-details v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
||||||
:key="optionIndex" :label="option.value" :value="option.value"></v-radio>
|
:key="optionIndex" :label="option.value" :value="option.value"></v-radio>
|
||||||
</v-radio-group>
|
</v-radio-group>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
|
|
||||||
<v-list-item-content v-if="formItem.component.type === 'multipleSelect'">
|
<v-list-item-content v-if="formItem.component.type === 'multipleSelect'">
|
||||||
<v-list-item-title class="formItem-title">{{ index+1 }}. {{ formItem.component.outline }}</v-list-item-title>
|
<v-list-item-title class="formItem-title">{{ index + 1 }}. {{
|
||||||
<div v-for="(option, optionIndex) in formItem.component.property.selectOptionList" :key="optionIndex">
|
formItem.component.outline
|
||||||
<v-checkbox hide-details style="margin-top: 0px;" :disabled="true" :label="option.value" hide-details color="red"></v-checkbox>
|
}}
|
||||||
</div>
|
</v-list-item-title>
|
||||||
</v-list-item-content>
|
<div v-for="(option, optionIndex) in formItem.component.property.selectOptionList" :key="optionIndex">
|
||||||
|
<v-checkbox hide-details style="margin-top: 0px;" :disabled="true" :label="option.value" hide-details
|
||||||
|
color="red"></v-checkbox>
|
||||||
|
</div>
|
||||||
|
</v-list-item-content>
|
||||||
|
|
||||||
<v-list-item-content v-if="formItem.component.type === 'textarea'">
|
<v-list-item-content v-if="formItem.component.type === 'textarea'">
|
||||||
<v-textarea dense outlined placeholder="请输入答案" hide-details :disabled="true" :rows="4" :label="(index+1) + '. ' + formItem.component.outline"/>
|
<v-textarea dense outlined placeholder="请输入答案" hide-details :disabled="true" :rows="4"
|
||||||
</v-list-item-content>
|
:label="(index+1) + '. ' + formItem.component.outline"/>
|
||||||
|
</v-list-item-content>
|
||||||
|
|
||||||
<v-list-item-content v-if="formItem.component.type === 'input'">
|
<v-list-item-content v-if="formItem.component.type === 'input'">
|
||||||
<v-text-field class="cus-v-input" dense outlined :label="(index+1) + '. ' + formItem.component.outline" :disabled="true">
|
<v-text-field class="cus-v-input" dense outlined :label="(index+1) + '. ' + formItem.component.outline"
|
||||||
</v-list-item-content>
|
:disabled="true"></v-text-field>
|
||||||
|
</v-list-item-content>
|
||||||
|
|
||||||
<v-list-item-action v-if="selectedFormItemId === formItem.id" class="justify-start">
|
<v-list-item-action v-if="selectedFormItemId === formItem.id" class="justify-start">
|
||||||
<v-btn x-small icon @click.stop="formItemCopy(index, formItem)">
|
<v-btn x-small icon @click.stop="formItemCopy(index, formItem)">
|
||||||
<v-icon color="primary">mdi-content-duplicate</v-icon>
|
<v-icon color="primary">mdi-content-duplicate</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn x-small icon @click.stop="formItemDelete(formItem.id)">
|
<v-btn x-small icon @click.stop="formItemDelete(formItem.id)">
|
||||||
<v-icon color="error">mdi-close-box</v-icon>
|
<v-icon color="error">mdi-close-box</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-list-item-action>
|
</v-list-item-action>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-hover>
|
</v-hover>
|
||||||
</draggable>
|
</draggable>
|
||||||
<v-row v-else align="center" justify="center" style="width: 100%;">
|
<v-row v-else align="center" justify="center" class="ma-0 pa-0" style="width: 100%;">
|
||||||
<v-card height="100" class="ma-12" width="100%">
|
<v-card height="100" class="ma-12" width="100%" color="#f5f8fa" style="border: 1px dashed #333333">
|
||||||
<draggable :list="[]" :animation="300" group="componentGroup">
|
<draggable :list="[]" :animation="300" group="componentGroup" style="position: relative; height: 100%;">
|
||||||
<v-card-text class="text-center title">
|
<v-card-text class="text-center title draggable-placeholder">
|
||||||
从左侧拖入或点选组件进行表单设计
|
从左侧拖入或点选组件进行表单设计
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</draggable>
|
</draggable>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-row>
|
</v-card>
|
||||||
</v-card>
|
|
||||||
|
|
||||||
<div class="property">
|
<v-card color="#f5f8fa" :style="{'width': isMobile ? 'auto' : '300px'}" class="pa-4" :class="{'ml-6': !isMobile}">
|
||||||
<div class="property-title">
|
<div class="property-title">
|
||||||
<v-icon>mdi-application-edit-outline</v-icon>组件属性
|
<v-icon>mdi-application-edit-outline</v-icon>
|
||||||
|
<span style="transform: translateY(2px); display: inline-block;">组件属性</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="selectCanvaIndex >= 0 && formItemList[selectCanvaIndex]">
|
<div v-if="selectCanvaIndex >= 0 && formItemList[selectCanvaIndex]">
|
||||||
<v-card flat v-if="formItemList[selectCanvaIndex].component.type === 'singleSelect' || formItemList[selectCanvaIndex].component.type === 'multipleSelect'">
|
<v-card class="pa-4 mt-4"
|
||||||
|
v-if="formItemList[selectCanvaIndex].component.type === 'singleSelect' || formItemList[selectCanvaIndex].component.type === 'multipleSelect'">
|
||||||
<v-row no-gutters>
|
<v-row no-gutters>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="标题" v-model="formItemList[selectCanvaIndex].component.outline"></v-text-field>
|
<v-text-field class="cus-v-input mr-2" dense filled single-line prefix="标题: " color="success"
|
||||||
|
v-model="formItemList[selectCanvaIndex].component.outline"></v-text-field>
|
||||||
<div style="display: flex; flex-direction: row;justify-content: space-between; align-items: center;">
|
<div style="display: flex; flex-direction: row;justify-content: space-between; align-items: center;">
|
||||||
<v-subheader>选项列表</v-subheader>
|
<v-subheader class="pa-0">选项列表</v-subheader>
|
||||||
<v-btn icon @click.stop="propertyAddOption(formItemList[selectCanvaIndex].component.property.selectOptionList.length)">
|
<v-btn icon
|
||||||
|
@click.stop="propertyAddOption(formItemList[selectCanvaIndex].component.property.selectOptionList.length)">
|
||||||
<v-icon dark color="grey lighten-1">mdi-plus-box</v-icon>
|
<v-icon dark color="grey lighten-1">mdi-plus-box</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div>
|
||||||
<v-list dense>
|
<v-list class="propertyList" dense style="max-height: 300px; overflow-y: auto;">
|
||||||
<v-list-item v-for="(option, index) in formItemList[selectCanvaIndex].component.property.selectOptionList" :key="index">
|
<v-list-item
|
||||||
|
class="pa-0"
|
||||||
|
v-for="(option, index) in formItemList[selectCanvaIndex].component.property.selectOptionList"
|
||||||
|
:key="index">
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="option.value"
|
v-model="option.value"
|
||||||
label="选项"
|
prefix="选项:"
|
||||||
outlined
|
color="success"
|
||||||
dense
|
filled single-line
|
||||||
hide-details
|
dense
|
||||||
clearable
|
hide-details
|
||||||
placeholder="请输入选项"/>
|
clearable
|
||||||
|
placeholder="请输入选项"/>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
<v-list-item-action>
|
<v-list-item-action class="ml-2">
|
||||||
<v-btn icon @click.stop="propertyDeleteOption(index)">
|
<v-btn icon @click.stop="propertyDeleteOption(index)">
|
||||||
<v-icon color="grey lighten-1" dark>mdi-delete</v-icon>
|
<v-icon color="grey lighten-1" dark>mdi-delete</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
@@ -125,17 +138,17 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card flat v-if="formItemList[selectCanvaIndex].component.type === 'textarea'">
|
<v-card class="mt-5" flat v-if="formItemList[selectCanvaIndex].component.type === 'textarea'">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="多行文本" v-model="formItemList[selectCanvaIndex].component.outline"></v-text-field>
|
<v-text-field class="cus-v-input black" dense filled single-line label="多行文本"
|
||||||
|
v-model="formItemList[selectCanvaIndex].component.outline"></v-text-field>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card flat v-if="formItemList[selectCanvaIndex].component.type === 'input'">
|
<v-card class="mt-5" flat v-if="formItemList[selectCanvaIndex].component.type === 'input'">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="单行文本" v-model="formItemList[selectCanvaIndex].component.outline"></v-text-field>
|
<v-text-field class="cus-v-input black" dense filled single-line label="单行文本"
|
||||||
|
v-model="formItemList[selectCanvaIndex].component.outline"></v-text-field>
|
||||||
</v-card>
|
</v-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</v-card>
|
||||||
|
</v-card>
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script src="//cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>
|
||||||
@@ -144,111 +157,131 @@
|
|||||||
<script>
|
<script>
|
||||||
// 1. v-main 滚动条
|
// 1. v-main 滚动条
|
||||||
// 2. v-navigation-drawer 小屏幕 不要关闭
|
// 2. v-navigation-drawer 小屏幕 不要关闭
|
||||||
Vue.component("form-item-list-generator", {
|
Vue.component("form-item-list-generator", {
|
||||||
template: '#form-item-list-generator',
|
template: '#form-item-list-generator',
|
||||||
vuetify: new Vuetify(),
|
vuetify: new Vuetify(),
|
||||||
name: 'form-item-list-generator',
|
name: 'form-item-list-generator',
|
||||||
props: {
|
props: {
|
||||||
formItemList: {
|
formItemList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: [],
|
||||||
required: true,
|
required: true,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
data: () => ({
|
},
|
||||||
componentList: [
|
data: () => ({
|
||||||
{ title: '单行文本', type: 'input', outline: '单行文本', property: {}, icon: 'mdi-form-textarea' },
|
componentList: [
|
||||||
{ title: '多行文本', type: 'textarea', outline: '多行文本', property: {}, icon: 'mdi-form-textarea' },
|
{title: '单行文本', type: 'input', outline: '单行文本', property: {}, icon: 'mdi-form-textarea'},
|
||||||
{ title: '单选', type: 'singleSelect', outline: '单选', property: { selectOptionList: [] }, icon: 'mdi-checkbox-marked-circle' },
|
{title: '多行文本', type: 'textarea', outline: '多行文本', property: {}, icon: 'mdi-form-textarea'},
|
||||||
{ title: '多选', type: 'multipleSelect', outline: '多选', property: { selectOptionList: [] }, icon: 'mdi-checkbox-marked' },
|
{
|
||||||
],
|
title: '单选',
|
||||||
tempComponent: null,
|
type: 'singleSelect',
|
||||||
|
outline: '单选',
|
||||||
|
property: {selectOptionList: []},
|
||||||
|
icon: 'mdi-checkbox-marked-circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '多选',
|
||||||
|
type: 'multipleSelect',
|
||||||
|
outline: '多选',
|
||||||
|
property: {selectOptionList: []},
|
||||||
|
icon: 'mdi-checkbox-marked'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tempComponent: null,
|
||||||
|
|
||||||
|
|
||||||
// 当 needle 是空字符串时,我们应当返回什么值呢?这是一个在面试中很好的问题。
|
// 当 needle 是空字符串时,我们应当返回什么值呢?这是一个在面试中很好的问题。
|
||||||
|
|
||||||
// 对于本题而言,当 needle 是空字符串时我们应当返回 0 。这与 C 语言的 strstr() 以及 Java 的 indexOf() 定义相符。
|
// 对于本题而言,当 needle 是空字符串时我们应当返回 0 。这与 C 语言的 strstr() 以及 Java 的 indexOf() 定义相符。
|
||||||
// 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
|
// 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
|
||||||
// `,
|
// `,
|
||||||
// property: {}, icon: 'mdi-checkbox-marked-circle'
|
// property: {}, icon: 'mdi-checkbox-marked-circle'
|
||||||
// },
|
// },
|
||||||
// formItemData: {}
|
// formItemData: {}
|
||||||
// }
|
// }
|
||||||
// ],
|
// ],
|
||||||
selectedFormItemId: null,
|
selectedFormItemId: null,
|
||||||
rightPanels: [0,1,2,3,4],
|
rightPanels: [0, 1, 2, 3, 4],
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
selectCanvaIndex () {
|
selectCanvaIndex() {
|
||||||
const index = this.formItemList.findIndex(item => item.id === this.selectedFormItemId);
|
const index = this.formItemList.findIndex(item => item.id === this.selectedFormItemId);
|
||||||
return index;
|
return index;
|
||||||
},
|
|
||||||
},
|
},
|
||||||
mounted() {
|
isMobile() {
|
||||||
|
return window.innerWidth < 600;
|
||||||
},
|
},
|
||||||
destroyed() {},
|
},
|
||||||
watch: {
|
mounted() {
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
async created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
cloneComponent(component) {
|
||||||
|
this.tempComponent = component;
|
||||||
},
|
},
|
||||||
async created() {},
|
leftComponentDraggableOnEnd(event) {
|
||||||
methods: {
|
if (event.from !== event.to) {
|
||||||
cloneComponent (component) {
|
const newIndex = event.newIndex;
|
||||||
this.tempComponent = component;
|
this.addFormItem(this.tempComponent, newIndex);
|
||||||
},
|
}
|
||||||
leftComponentDraggableOnEnd (event) {
|
this.tempComponent = null;
|
||||||
if (event.from !== event.to) {
|
|
||||||
const newIndex = event.newIndex;
|
|
||||||
this.addFormItem(this.tempComponent, newIndex);
|
|
||||||
}
|
|
||||||
this.tempComponent = null;
|
|
||||||
},
|
|
||||||
addFormItem(component, targetIndex) {
|
|
||||||
const { type } = component;
|
|
||||||
const formItem = {
|
|
||||||
id: `${type}_${this.uuid(8)}`,
|
|
||||||
component: _.cloneDeep(component)
|
|
||||||
};
|
|
||||||
if (!this.formItemList) {
|
|
||||||
this.formItemList = [];
|
|
||||||
}
|
|
||||||
if (targetIndex > -1) {
|
|
||||||
this.formItemList.splice(targetIndex, 0, formItem);
|
|
||||||
} else {
|
|
||||||
this.formItemList.push(formItem);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formItemSelect (id) {
|
|
||||||
this.selectedFormItemId = id;
|
|
||||||
},
|
|
||||||
formItemCopy (index, formItem) {
|
|
||||||
const newFormItem = _.cloneDeep(formItem);
|
|
||||||
newFormItem.id = `${newFormItem.component.type}_${this.uuid(8)}`,
|
|
||||||
this.formItemList.splice(index+1, 0, newFormItem);
|
|
||||||
},
|
|
||||||
emptyCanva () {
|
|
||||||
this.formItemList.splice(0, this.formItemList.length);
|
|
||||||
},
|
|
||||||
formItemDelete (id) {
|
|
||||||
const index = this.formItemList.findIndex((item) => item.id === id);
|
|
||||||
if (index > -1) {
|
|
||||||
this.formItemList.splice(index, 1);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
propertyAddOption (index) {
|
|
||||||
this.formItemList[this.selectCanvaIndex].component.property.selectOptionList.splice(index, 0, { value: "" });
|
|
||||||
},
|
|
||||||
propertyDeleteOption (index) {
|
|
||||||
this.formItemList[this.selectCanvaIndex].component.property.selectOptionList.splice(index, 1);
|
|
||||||
},
|
|
||||||
uuid (t=21) {
|
|
||||||
let e="",r=crypto.getRandomValues(new Uint8Array(t));
|
|
||||||
for(;t--;){let n=63&r[t];e+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"};
|
|
||||||
return e
|
|
||||||
},
|
|
||||||
getFormItemList () {
|
|
||||||
return this.formItemList;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
addFormItem(component, targetIndex) {
|
||||||
|
const {type} = component;
|
||||||
|
const formItem = {
|
||||||
|
id: `${type}_${this.uuid(8)}`,
|
||||||
|
component: _.cloneDeep(component)
|
||||||
|
};
|
||||||
|
if (!this.formItemList) {
|
||||||
|
this.formItemList = [];
|
||||||
|
}
|
||||||
|
if (targetIndex > -1) {
|
||||||
|
this.formItemList.splice(targetIndex, 0, formItem);
|
||||||
|
} else {
|
||||||
|
this.formItemList.push(formItem);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formItemSelect(id) {
|
||||||
|
this.selectedFormItemId = id;
|
||||||
|
},
|
||||||
|
formItemCopy(index, formItem) {
|
||||||
|
const newFormItem = _.cloneDeep(formItem);
|
||||||
|
newFormItem.id = `${newFormItem.component.type}_${this.uuid(8)}`,
|
||||||
|
this.formItemList.splice(index + 1, 0, newFormItem);
|
||||||
|
},
|
||||||
|
emptyCanva() {
|
||||||
|
this.formItemList.splice(0, this.formItemList.length);
|
||||||
|
},
|
||||||
|
formItemDelete(id) {
|
||||||
|
const index = this.formItemList.findIndex((item) => item.id === id);
|
||||||
|
if (index > -1) {
|
||||||
|
this.formItemList.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
propertyAddOption(index) {
|
||||||
|
this.formItemList[this.selectCanvaIndex].component.property.selectOptionList.splice(index, 0, {value: ""});
|
||||||
|
},
|
||||||
|
propertyDeleteOption(index) {
|
||||||
|
this.formItemList[this.selectCanvaIndex].component.property.selectOptionList.splice(index, 1);
|
||||||
|
},
|
||||||
|
uuid(t = 21) {
|
||||||
|
let e = "", r = crypto.getRandomValues(new Uint8Array(t));
|
||||||
|
for (; t--;) {
|
||||||
|
let n = 63 & r[t];
|
||||||
|
e += n < 36 ? n.toString(36) : n < 62 ? (n - 26).toString(36).toUpperCase() : n < 63 ? "_" : "-"
|
||||||
|
}
|
||||||
|
;
|
||||||
|
return e
|
||||||
|
},
|
||||||
|
getFormItemList() {
|
||||||
|
return this.formItemList;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@@ -265,31 +298,36 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-component-item {
|
.left-component-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 1%;
|
margin: 8px 0;
|
||||||
transition: transform 0ms !important;
|
transition: transform 0ms !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-component-item-title {
|
.left-component-item-title {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #222;
|
color: #222;
|
||||||
margin: 6px 2px;
|
margin: 6px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-component-item-body {
|
.left-component-item-body {
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
background: #e0e0e0;
|
background: #ffffff;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
border: 1px dashed #e0e0e0;
|
border: 1px dashed #ffffff;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-component-item-body:hover {
|
.left-component-item-body:hover {
|
||||||
border: 1px dashed #1565c0;
|
border: 1px dashed #4caf50;
|
||||||
background: #e3f2fd;
|
background: #e6fde3;
|
||||||
color: #1565c0;
|
color: #4caf50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-component-item-body:hover .v-icon {
|
.left-component-item-body:hover .v-icon {
|
||||||
color: #1565c0;
|
color: #4caf50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formItemList {
|
.formItemList {
|
||||||
@@ -297,14 +335,13 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
background-color: #e0e0e0 !important;
|
|
||||||
border-radius: 0 !important;
|
|
||||||
border: 1px dashed #999 !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.formItemList .formItem-selected {
|
.formItemList .formItem-selected {
|
||||||
border: 1px dashed #1565c0 !important;
|
border: 1px dashed #4caf50 !important;
|
||||||
background: #e3f2fd;
|
background: #e6fde3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formItem-title {
|
.formItem-title {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
@@ -315,6 +352,7 @@
|
|||||||
max-height: calc(100vh - 105px);
|
max-height: calc(100vh - 105px);
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.property .property-title {
|
.property .property-title {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
@@ -332,4 +370,45 @@
|
|||||||
min-width: 24px;
|
min-width: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.propertyList::-webkit-scrollbar {
|
||||||
|
width: 5px;
|
||||||
|
background: #f5f8fa;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.propertyList::-webkit-scrollbar-thumb {
|
||||||
|
width: 5px;
|
||||||
|
background: #606060;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body .theme--light.v-text-field--filled.cus-v-input.black > .v-input__control > .v-input__slot {
|
||||||
|
background: #e6ebee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-placeholder {
|
||||||
|
position: absolute;
|
||||||
|
left: 0!important;
|
||||||
|
top: 50%!important;
|
||||||
|
transform: translateY(-50%)!important;
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 500px) {
|
||||||
|
.left-component-item {
|
||||||
|
width: auto;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 8px 4px;
|
||||||
|
transition: transform 0ms !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formItemList {
|
||||||
|
border-top: 2px solid #cccccc !important;
|
||||||
|
border-bottom: 2px solid #cccccc !important;
|
||||||
|
border-radius: unset !important;
|
||||||
|
height: auto;
|
||||||
|
max-height: none;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -79,6 +79,13 @@
|
|||||||
height: 500px;
|
height: 500px;
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
border: 2px solid rgb(226, 226, 226);
|
}
|
||||||
|
@media (max-width: 500px) {
|
||||||
|
.tpl-form-design-container {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
max-height: none;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -5,34 +5,32 @@
|
|||||||
<jh-layout-v3>
|
<jh-layout-v3>
|
||||||
|
|
||||||
<template slot="serverSearch">
|
<template slot="serverSearch">
|
||||||
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
|
<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}">
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-text-field v-model="serverSearchInput.processName" color="success" prefix="流程名称:" class="cus-v-input" :class="{'mr-2': !isMobile}" dense filled single-line></v-text-field>
|
||||||
<v-text-field v-model="serverSearchInput.processName" label="流程名称" class="cus-v-input "
|
|
||||||
:class="{'mr-2': !isMobile}" dense filled single-line ></v-text-field>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
|
<v-col class="pl-0 pr-0" :class="{'pt-0': isMobile}" style="max-width: 57px">
|
||||||
<v-btn
|
<v-btn
|
||||||
class="elevation-0"
|
class="elevation-0"
|
||||||
color="success"
|
color="success"
|
||||||
dark
|
dark
|
||||||
@click="doUiAction('refreshTableData')"
|
@click="doUiAction('refreshTableData')"
|
||||||
>
|
>
|
||||||
查询
|
查询
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 页面主要内容 -->
|
<!-- 页面主要内容 -->
|
||||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
|
<v-card :class="{'px-2': isMobile}">
|
||||||
<v-card>
|
|
||||||
<v-list three-line subheader>
|
<v-list three-line subheader>
|
||||||
<v-subheader>流程列表</v-subheader>
|
<v-subheader>流程列表</v-subheader>
|
||||||
<v-list-item v-for="(item, index) in tableDataFromBackend" :key="index">
|
<v-list-item v-for="(item, index) in tableDataFromBackend" :key="index">
|
||||||
<v-subheader>{{getConstantCollectionItemText('categoryList', index)}}</v-subheader>
|
<v-subheader>{{getConstantCollectionItemText('categoryList', index)}}</v-subheader>
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
<v-row :class="{'px-10': !isMobile, 'px-3': isMobile, 'pb-7': isMobile}">
|
||||||
<v-col cols="12" sm="12" md="6" xl="6" class="pa-xs-0 pb-xs-4 pb-3" v-for="(it, index) in item">
|
<v-col cols="12" sm="12" md="6" xl="6" class=" pb-3" v-for="(it, index) in item">
|
||||||
<v-btn class="elevation-0 mr-10" color="success" dark @click="doUiAction('startCreateItem', {item: it})">
|
<v-btn class="elevation-0 mr-10" color="success" dark @click="doUiAction('startCreateItem', {item: it})">
|
||||||
{{it.workflowName}}
|
{{it.workflowName}}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
@@ -41,29 +39,28 @@
|
|||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-container>
|
|
||||||
|
|
||||||
<!-- 编辑抽屉 -->
|
<!-- 编辑抽屉 -->
|
||||||
<v-navigation-drawer v-model="isEditDrawerShow" :permanent="isEditDrawerShow" fixed temporary right width="80%"
|
<v-navigation-drawer v-model="isEditDrawerShow" fixed temporary right width="40%"
|
||||||
class="elevation-24">
|
class="elevation-24">
|
||||||
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
|
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
|
||||||
<v-row>
|
<v-row class="pt-8">
|
||||||
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
|
<span class="title pa-6" :class="{'pl-12': !isMobile, 'pl-6': isMobile}">{{ currentClickButton.title }}信息</span>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
|
<v-btn class="mt-6 elevation-0" :class="{'mr-16': !isMobile, 'mr-8': isMobile}" fab x-small @click="isEditDrawerShow = false">
|
||||||
<v-icon dark>mdi-close</v-icon>
|
<v-icon dark>mdi-close</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
<v-row :class="{'px-10': !isMobile, 'px-3': isMobile, 'pb-7': isMobile}">
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
<v-col cols="12" sm="12" md="12" :class="{'pa-0': isMobile, 'px-3': isMobile, 'pt-6': isMobile}">
|
||||||
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">任务标题</span>
|
<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 class="cus-v-input mr-2" dense filled single-line label="任务标题" v-model="editItem['taskTitle']">
|
||||||
</v-text-field>
|
</v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3" v-for="(formItem, index) in editItem.workflowForm" :key="index">
|
<v-col cols="12" class=" pb-3" v-for="(formItem, index) in editItem.workflowForm" :key="index">
|
||||||
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">{{formItem.component.outline}}</span>
|
<span class="inputLabel">{{formItem.component.outline}}</span>
|
||||||
<v-list-item-content v-if="formItem.component.type === 'singleSelect'">
|
<v-list-item-content v-if="formItem.component.type === 'singleSelect'">
|
||||||
<v-list-item-title class="formItem-title">{{ index+1 }}、 {{ formItem.component.outline }}</v-list-item-title>
|
<v-list-item-title class="formItem-title">{{ index+1 }}、 {{ formItem.component.outline }}</v-list-item-title>
|
||||||
<v-radio-group :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details>
|
<v-radio-group :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details>
|
||||||
@@ -88,12 +85,11 @@
|
|||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row class="justify-end pr-6">
|
<v-row class="justify-end mx-0 mt-8" :class="{'px-10': !isMobile, 'px-4': isMobile, 'mb-8': isMobile}">
|
||||||
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)"
|
<v-btn color="success" @click="doUiAction(dialogSaveInfoAction)"
|
||||||
:style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存
|
>保存
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn class="ml-2" small @click="isEditDrawerShow = false"
|
<v-btn class="elevation-0 ml-2" @click="isEditDrawerShow = false">取消</v-btn>
|
||||||
:style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
|
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
@@ -310,4 +306,4 @@
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -4,113 +4,111 @@
|
|||||||
|
|
||||||
<jh-layout-v3>
|
<jh-layout-v3>
|
||||||
|
|
||||||
<!-- 页面主要内容 -->
|
<!-- 页面主要内容 -->
|
||||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-4" style="background-color: rgb(236, 236, 236);">
|
<v-card :class="{'px-2': isMobile}">
|
||||||
<v-stepper v-model="step" class="mb-4">
|
<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>
|
<v-stepper-header class="elevation-0 pa-0 ma-0">
|
||||||
<template v-for="(item, index) in taskStepperList">
|
<template v-for="(item, index) in taskStepperList">
|
||||||
<v-divider v-if="index > 0"></v-divider>
|
<v-divider v-if="index > 0" class="mx-1"></v-divider>
|
||||||
<v-stepper-step :complete="step > item.value" :step="item.value">
|
<v-stepper-step :complete="step > item.value" :step="item.value" class="pa-4" color="success">
|
||||||
{{item.text}}
|
{{ item.text }}
|
||||||
</v-stepper-step>
|
</v-stepper-step>
|
||||||
</template>
|
</template>
|
||||||
</v-stepper-header>
|
</v-stepper-header>
|
||||||
</v-stepper>
|
</v-stepper>
|
||||||
<v-card class="mb-4">
|
<v-row class="pa-0 ma-0" :class="{'px-10': !isMobile, 'px-3': isMobile}"><v-subheader>表单信息</v-subheader></v-row>
|
||||||
<v-subheader>表单信息</v-subheader>
|
<v-row class="pa-0 ma-0" :class="{'px-10': !isMobile, 'px-3': isMobile}">
|
||||||
<v-divider></v-divider>
|
<v-col :cols="taskTpl.prev ? 6 : 12" v-for="(key, i) in ['prev', 'input']" :key="i"
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
v-if="isAccess && taskTpl[key]">
|
||||||
<v-col :cols="taskTpl.prev ? 6 : 12" v-for="(key, i) in ['prev', 'input']" :key="i"
|
<v-row>
|
||||||
v-if="isAccess && taskTpl[key]">
|
<v-col cols="12" class=" pb-3" v-for="(formItem, index) in taskTpl.formList" :key="index"
|
||||||
<v-row>
|
v-if="taskTpl[key] && !(currentNode.formIdHidden || []).includes(formItem.id)">
|
||||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3" v-for="(formItem, index) in taskTpl.formList" :key="index"
|
<!-- <v-subheader inset > {{ key === 'prev' ? '历史表单' : '当前' }} </v-subheader> -->
|
||||||
v-if="taskTpl[key] && !(currentNode.formIdHidden || []).includes(formItem.id)">
|
<template v-if="formItem.component.type === 'singleSelect'">
|
||||||
<!-- <v-subheader inset > {{ key === 'prev' ? '历史表单' : '当前' }} </v-subheader> -->
|
<v-list-item-title class="formItem-title">{{ formTitlePrefix(formItem.component.outline, key) }}
|
||||||
<template v-if="formItem.component.type === 'singleSelect'">
|
</v-list-item-title>
|
||||||
<v-list-item-title class="formItem-title">{{formTitlePrefix(formItem.component.outline, key)}}
|
<v-radio-group v-model="taskTpl[key][formItem.id]">
|
||||||
</v-list-item-title>
|
<v-radio hide-details v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
||||||
<v-radio-group v-model="taskTpl[key][formItem.id]">
|
:disabled="key === 'prev' || !(currentNode.formId || []).includes(formItem.id)"
|
||||||
<v-radio hide-details v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
:key="optionIndex"
|
||||||
:disabled="key === 'prev' || !(currentNode.formId || []).includes(formItem.id)" :key="optionIndex"
|
:label="option.value" v-model="taskTpl[key][formItem.id]"></v-radio>
|
||||||
:label="option.value" v-model="taskTpl[key][formItem.id]"></v-radio>
|
</v-radio-group>
|
||||||
</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>
|
|
||||||
<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" v-model="taskTpl[key][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" />
|
|
||||||
</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>
|
|
||||||
</template>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-divider></v-divider>
|
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none" v-if="isAccess">
|
|
||||||
<v-col cols="12">
|
|
||||||
<v-textarea dense outlined placeholder="请输入备注信息" hide-details v-model="editItem.taskComment" :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="primary" v-for="item in nextLineList" @click="submitNode(item.type)">
|
|
||||||
{{item.type}}-{{item.label}}</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card>
|
|
||||||
<v-card>
|
|
||||||
<v-list three-line subheader>
|
|
||||||
<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>
|
</template>
|
||||||
</v-simple-table>
|
|
||||||
</div>
|
<template v-if="formItem.component.type === 'multipleSelect'">
|
||||||
</v-list>
|
<v-list-item-title class="formItem-title">{{ formTitlePrefix(formItem.component.outline, key) }}
|
||||||
</v-card>
|
</v-list-item-title>
|
||||||
</v-container>
|
<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" v-model="taskTpl[key][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"/>
|
||||||
|
</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>
|
||||||
|
</template>
|
||||||
|
</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="submitNode(item.type)">
|
||||||
|
{{ item.type }}-{{ item.label }}
|
||||||
|
</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>
|
||||||
|
</v-card>
|
||||||
</jh-layout-v3>
|
</jh-layout-v3>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -118,244 +116,257 @@
|
|||||||
{% block vue_body %}
|
{% block vue_body %}
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
template: '#app-template',
|
template: '#app-template',
|
||||||
vuetify: new Vuetify(),
|
vuetify: new Vuetify(),
|
||||||
mixins: [window.jianghuUiActionMixins],
|
mixins: [window.jianghuUiActionMixins],
|
||||||
data: () => ({
|
data: () => ({
|
||||||
step: 1,
|
step: 1,
|
||||||
// 表格相关数据
|
// 表格相关数据
|
||||||
isFormValid: true,
|
isFormValid: true,
|
||||||
requireRules: [
|
requireRules: [
|
||||||
v => !!v || 'This is required',
|
v => !!v || 'This is required',
|
||||||
],
|
],
|
||||||
constantCollection: {
|
constantCollection: {
|
||||||
categoryList: [],
|
categoryList: [],
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
serverSearchInput: {
|
|
||||||
processName: null
|
|
||||||
},
|
|
||||||
currentTableGenderType: 'all',
|
|
||||||
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: "流程节点版本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' },
|
|
||||||
],
|
|
||||||
|
|
||||||
currentClickButton: { title: '新增', action: 'add' },
|
|
||||||
editItem: {},
|
|
||||||
tableButtonList: [
|
|
||||||
{ text: '修改', buttonType: 'edit', color: 'success', action: 'startUpdateItem' },
|
|
||||||
{ text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem' },
|
|
||||||
],
|
|
||||||
dialogSaveInfoAction: '',
|
|
||||||
taskId: '',
|
|
||||||
isAccess: [],
|
|
||||||
nextLineList: [],
|
|
||||||
taskHistoryList: [],
|
|
||||||
taskTpl: [],
|
|
||||||
taskStepperList: [],
|
|
||||||
currentNode: {}
|
|
||||||
}),
|
|
||||||
computed: {
|
|
||||||
isMobile() {
|
|
||||||
return window.innerWidth < 600;
|
|
||||||
},
|
|
||||||
tableData() {
|
|
||||||
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
|
|
||||||
return this.tableDataFromBackend;
|
|
||||||
}
|
|
||||||
return this.tableDataFromBackend.filter(({ gender }) => gender === this.currentTableGenderType);
|
|
||||||
},
|
|
||||||
computedEditItem() {
|
|
||||||
return this.editItem;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {},
|
|
||||||
async created() {
|
serverSearchInput: {
|
||||||
const searchParams = new URLSearchParams(location.search.substring(1));
|
processName: null
|
||||||
this.taskId = searchParams.get('taskId');
|
|
||||||
await this.getTaskHistoryList()
|
|
||||||
},
|
},
|
||||||
mounted() { },
|
currentTableGenderType: 'all',
|
||||||
methods: {
|
isEditDrawerShow: false,
|
||||||
/**
|
searchInput: null,
|
||||||
* 获取表格数据
|
isTableLoading: true,
|
||||||
*/
|
tableDataFromBackend: [],
|
||||||
async refreshTableData() {
|
headers: [
|
||||||
this.isTableLoading = true;
|
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value => !!value);
|
|
||||||
const { data: { appData: { rows } } } = await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskCreateManagement',
|
|
||||||
actionId: 'selectProcessList',
|
|
||||||
actionData: {},
|
|
||||||
where: {},
|
|
||||||
whereLike: serverSearchInput,
|
|
||||||
orderBy: [{ column: 'operationAt', order: 'desc' }]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.tableDataFromBackend = _.groupBy(rows, 'categoryId');
|
|
||||||
this.isTableLoading = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
{text: "任务ID", value: "taskId", width: 120},
|
||||||
* 获取表格数据
|
{text: "流程节点版本ID", value: "processVersionId", width: 120},
|
||||||
*/
|
{text: "任务名称", value: "taskTitle", width: 120},
|
||||||
async getTaskHistoryList() {
|
{text: "任务状态:running 执行中;deny 拒绝;end 结束", value: "taskStatus", width: 120},
|
||||||
const { data: { appData: { taskHistoryList, taskStepperList, taskTpl, isAccess, nextLineList, step, currentNode } } } = await window.jianghuAxios({
|
{text: "当前执行中节点", value: "taskCurrentNode", width: 120},
|
||||||
data: {
|
{text: "申请人", value: "taskApplier", width: 120},
|
||||||
appData: {
|
{text: "当前执行的处理人员,用逗号分隔", value: "taskProcessorList", width: 120},
|
||||||
pageId: 'taskHistoryManagement',
|
{text: "所有相关人员,用逗号分隔", value: "taskRelatedPersonList", width: 120},
|
||||||
actionId: 'getTaskHistoryInfo',
|
{text: "催单次数", value: "taskUrgeCount", width: 120},
|
||||||
actionData: { taskId: this.taskId },
|
{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'},
|
||||||
this.taskHistoryList = taskHistoryList;
|
],
|
||||||
this.taskTpl = taskTpl;
|
|
||||||
this.taskStepperList = taskStepperList;
|
|
||||||
this.currentNode = currentNode;
|
|
||||||
this.isAccess = isAccess;
|
|
||||||
this.nextLineList = nextLineList;
|
|
||||||
this.step = step;
|
|
||||||
},
|
|
||||||
|
|
||||||
// startCreateItem
|
currentClickButton: {title: '新增', action: 'add'},
|
||||||
async clearItemData({ processVersionId }) {
|
editItem: {},
|
||||||
this.editItem = { processVersionId };
|
tableButtonList: [
|
||||||
},
|
{text: '修改', buttonType: 'edit', color: 'success', action: 'startUpdateItem'},
|
||||||
|
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
||||||
async openCreateItemDialog() {
|
],
|
||||||
this.currentClickButton = { action: 'add', title: '新增' };
|
dialogSaveInfoAction: '',
|
||||||
this.isEditDrawerShow = true;
|
taskId: '',
|
||||||
this.dialogSaveInfoAction = 'createItem';
|
isAccess: [],
|
||||||
},
|
nextLineList: [],
|
||||||
|
taskHistoryList: [],
|
||||||
// createItem
|
taskTpl: [],
|
||||||
async confirmCreateItemDialog() {
|
taskStepperList: [],
|
||||||
return window.confirmDialog({ title: '新增', content: '确定新增吗?' })
|
currentNode: {}
|
||||||
},
|
}),
|
||||||
|
computed: {
|
||||||
/**
|
isMobile() {
|
||||||
* 新增数据
|
return window.innerWidth < 600;
|
||||||
*/
|
},
|
||||||
async submitNode(type) {
|
tableData() {
|
||||||
await window.vtoast.loading("提交数据");
|
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
|
||||||
await window.jianghuAxios({
|
return this.tableDataFromBackend;
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskHistoryManagement',
|
|
||||||
actionId: 'submitNode',
|
|
||||||
actionData: { type, taskId: this.taskId, taskComment: this.editItem.taskComment, taskTpl: this.taskTpl }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("提交数据成功");
|
|
||||||
this.getTaskHistoryList();
|
|
||||||
},
|
|
||||||
|
|
||||||
async closeDrawerShow() {
|
|
||||||
this.isEditDrawerShow = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// startUpdateItem
|
|
||||||
async prepareItemData({ item }) {
|
|
||||||
this.editItem = { ...item };
|
|
||||||
},
|
|
||||||
|
|
||||||
async openUpdateDialog() {
|
|
||||||
this.currentClickButton = { action: 'edit', title: '修改' };
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'updateItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmUpdateItemDialog() {
|
|
||||||
return window.confirmDialog({ title: '修改', content: '确定修改吗?' });
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存数据
|
|
||||||
*/
|
|
||||||
async doUpdateItem() {
|
|
||||||
const id = this.computedEditItem.id;
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("修改数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'updateItem',
|
|
||||||
actionData: this.computedEditItem,
|
|
||||||
where: { id: id }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("修改数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmDeleteItemDialog() {
|
|
||||||
return window.confirmDialog({ title: '删除', content: '确定删除吗?' });
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除数据
|
|
||||||
*/
|
|
||||||
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("删除数据成功");
|
|
||||||
},
|
|
||||||
getConstantCollectionItemText(key, _value) {
|
|
||||||
const constantCollectionItemFind = this.constantCollection[key].find(e => e.value + '' === _value + '');
|
|
||||||
if (constantCollectionItemFind) {
|
|
||||||
return constantCollectionItemFind.text;
|
|
||||||
}
|
|
||||||
return _value;
|
|
||||||
},
|
|
||||||
formTitlePrefix(title, type) {
|
|
||||||
if (type === 'prev') {
|
|
||||||
return '历史-' + title;
|
|
||||||
}
|
|
||||||
return title;
|
|
||||||
}
|
}
|
||||||
|
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||||
|
},
|
||||||
|
computedEditItem() {
|
||||||
|
return this.editItem;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
async created() {
|
||||||
|
const searchParams = new URLSearchParams(location.search.substring(1));
|
||||||
|
this.taskId = searchParams.get('taskId');
|
||||||
|
await this.getTaskHistoryList()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取表格数据
|
||||||
|
*/
|
||||||
|
async refreshTableData() {
|
||||||
|
this.isTableLoading = true;
|
||||||
|
const serverSearchInput = _.pickBy(this.serverSearchInput, value => !!value);
|
||||||
|
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'taskCreateManagement',
|
||||||
|
actionId: 'selectProcessList',
|
||||||
|
actionData: {},
|
||||||
|
where: {},
|
||||||
|
whereLike: serverSearchInput,
|
||||||
|
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.tableDataFromBackend = _.groupBy(rows, 'categoryId');
|
||||||
|
this.isTableLoading = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取表格数据
|
||||||
|
*/
|
||||||
|
async getTaskHistoryList() {
|
||||||
|
const {
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
taskHistoryList,
|
||||||
|
taskStepperList,
|
||||||
|
taskTpl,
|
||||||
|
isAccess,
|
||||||
|
nextLineList,
|
||||||
|
step,
|
||||||
|
currentNode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} = await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'taskHistoryManagement',
|
||||||
|
actionId: 'getTaskHistoryInfo',
|
||||||
|
actionData: {taskId: this.taskId},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.taskHistoryList = taskHistoryList;
|
||||||
|
this.taskTpl = taskTpl;
|
||||||
|
this.taskStepperList = taskStepperList;
|
||||||
|
this.currentNode = currentNode;
|
||||||
|
this.isAccess = isAccess;
|
||||||
|
this.nextLineList = nextLineList;
|
||||||
|
this.step = step;
|
||||||
|
},
|
||||||
|
|
||||||
|
// startCreateItem
|
||||||
|
async clearItemData({processVersionId}) {
|
||||||
|
this.editItem = {processVersionId};
|
||||||
|
},
|
||||||
|
|
||||||
|
async openCreateItemDialog() {
|
||||||
|
this.currentClickButton = {action: 'add', title: '新增'};
|
||||||
|
this.isEditDrawerShow = true;
|
||||||
|
this.dialogSaveInfoAction = 'createItem';
|
||||||
|
},
|
||||||
|
|
||||||
|
// createItem
|
||||||
|
async confirmCreateItemDialog() {
|
||||||
|
return window.confirmDialog({title: '新增', content: '确定新增吗?'})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*/
|
||||||
|
async submitNode(type) {
|
||||||
|
await window.vtoast.loading("提交数据");
|
||||||
|
await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'taskHistoryManagement',
|
||||||
|
actionId: 'submitNode',
|
||||||
|
actionData: {type, taskId: this.taskId, taskComment: this.editItem.taskComment, taskTpl: this.taskTpl}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
await window.vtoast.success("提交数据成功");
|
||||||
|
this.getTaskHistoryList();
|
||||||
|
},
|
||||||
|
|
||||||
|
async closeDrawerShow() {
|
||||||
|
this.isEditDrawerShow = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// startUpdateItem
|
||||||
|
async prepareItemData({item}) {
|
||||||
|
this.editItem = {...item};
|
||||||
|
},
|
||||||
|
|
||||||
|
async openUpdateDialog() {
|
||||||
|
this.currentClickButton = {action: 'edit', title: '修改'};
|
||||||
|
this.isEditDrawerShow = true;
|
||||||
|
this.dialogSaveInfoAction = 'updateItem';
|
||||||
|
},
|
||||||
|
|
||||||
|
// updateItem
|
||||||
|
async confirmUpdateItemDialog() {
|
||||||
|
return window.confirmDialog({title: '修改', content: '确定修改吗?'});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存数据
|
||||||
|
*/
|
||||||
|
async doUpdateItem() {
|
||||||
|
const id = this.computedEditItem.id;
|
||||||
|
delete this.computedEditItem.id;
|
||||||
|
await window.vtoast.loading("修改数据");
|
||||||
|
await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'taskManagement',
|
||||||
|
actionId: 'updateItem',
|
||||||
|
actionData: this.computedEditItem,
|
||||||
|
where: {id: id}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
await window.vtoast.success("修改数据成功");
|
||||||
|
},
|
||||||
|
|
||||||
|
// updateItem
|
||||||
|
async confirmDeleteItemDialog() {
|
||||||
|
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*/
|
||||||
|
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("删除数据成功");
|
||||||
|
},
|
||||||
|
getConstantCollectionItemText(key, _value) {
|
||||||
|
const constantCollectionItemFind = this.constantCollection[key].find(e => e.value + '' === _value + '');
|
||||||
|
if (constantCollectionItemFind) {
|
||||||
|
return constantCollectionItemFind.text;
|
||||||
|
}
|
||||||
|
return _value;
|
||||||
|
},
|
||||||
|
formTitlePrefix(title, type) {
|
||||||
|
if (type === 'prev') {
|
||||||
|
return '历史-' + title;
|
||||||
|
}
|
||||||
|
return title;
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -4,57 +4,40 @@
|
|||||||
|
|
||||||
<jh-layout-v3>
|
<jh-layout-v3>
|
||||||
|
|
||||||
<template slot="serverSearch">
|
|
||||||
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
|
|
||||||
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
|
|
||||||
<v-btn
|
|
||||||
class="elevation-0"
|
|
||||||
color="success"
|
|
||||||
dark
|
|
||||||
@click="doUiAction('refreshTableData')"
|
|
||||||
>
|
|
||||||
查询
|
|
||||||
</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 页面主要内容 -->
|
<!-- 页面主要内容 -->
|
||||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
|
<v-card :class="{'px-2': isMobile}">
|
||||||
<v-card>
|
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||||
<v-row class="ma-0 pa-xs-4 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">
|
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
|
||||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
|
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||||
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||||
</v-col>
|
single-line></v-text-field>
|
||||||
</v-row>
|
</v-col>
|
||||||
<v-data-table fixed-header
|
</v-row>
|
||||||
:headers="headers"
|
<v-data-table :headers="headers"
|
||||||
:items="tableData"
|
:items="tableData"
|
||||||
:search="searchInput"
|
:search="searchInput"
|
||||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||||
:items-per-page="20"
|
:items-per-page="20"
|
||||||
mobile-breakpoint="0"
|
mobile-breakpoint="0"
|
||||||
:loading="isTableLoading"
|
:loading="isTableLoading"
|
||||||
checkbox-color="success"
|
checkbox-color="success"
|
||||||
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
|
:class="{'mx-2': isMobile}"
|
||||||
<!-- <template v-slot:item.level="{ item }">-->
|
color="success"
|
||||||
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
|
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||||
<!-- </template>-->
|
<template v-slot:item.action="{ item }">
|
||||||
<template v-slot:item.action="{ item }">
|
<v-btn small color="success" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||||
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
查看
|
||||||
查看
|
</v-btn>
|
||||||
</v-btn>
|
</template>
|
||||||
</template>
|
</v-data-table>
|
||||||
</v-data-table>
|
</v-card>
|
||||||
</v-card>
|
|
||||||
</v-container>
|
|
||||||
</jh-layout-v3>
|
</jh-layout-v3>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -69,45 +52,29 @@ new Vue({
|
|||||||
mixins: [window.jianghuUiActionMixins],
|
mixins: [window.jianghuUiActionMixins],
|
||||||
data: () => ({
|
data: () => ({
|
||||||
// 表格相关数据
|
// 表格相关数据
|
||||||
isFormValid: true,
|
|
||||||
requireRules: [
|
requireRules: [
|
||||||
v => !!v || 'This is required',
|
v => !!v || 'This is required',
|
||||||
],
|
],
|
||||||
constantCollection: {
|
|
||||||
},
|
|
||||||
|
|
||||||
serverSearchInput: {
|
|
||||||
studentId: null,
|
|
||||||
classId: null
|
|
||||||
},
|
|
||||||
currentTableGenderType: 'all',
|
currentTableGenderType: 'all',
|
||||||
isEditDrawerShow: false,
|
|
||||||
searchInput: null,
|
searchInput: null,
|
||||||
isTableLoading: true,
|
isTableLoading: true,
|
||||||
tableDataFromBackend: [],
|
tableDataFromBackend: [],
|
||||||
headers: [
|
headers: [
|
||||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
|
|
||||||
{text: "任务ID", value: "taskId", width: 120},
|
{text: "任务ID", value: "taskId", width: 120},
|
||||||
{text: "任务名称", value: "taskTitle", width: 120},
|
{text: "任务名称", value: "taskTitle", width: 120},
|
||||||
{text: "任务状态", value: "taskStatus", width: 120},
|
{text: "任务状态", value: "taskStatus", width: 120},
|
||||||
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
||||||
{text: "申请人", value: "taskInitUser", width: 120},
|
{text: "申请人", value: "taskInitUser", width: 120},
|
||||||
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
||||||
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
||||||
{text: "备注", value: "taskComment", width: 120},
|
{text: "备注", value: "taskComment", width: 120},
|
||||||
{text: "任务创建人", value: "createByUser", width: 120},
|
{text: "任务创建人", value: "createByUser", width: 120},
|
||||||
{text: "操作者", value: "operationByUser", width: 120},
|
{text: "操作者", value: "operationByUser", width: 120},
|
||||||
{text: "操作时间", value: "operationAt", width: 250},
|
{text: "操作时间", value: "operationAt", width: 250},
|
||||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
{text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
],
|
],
|
||||||
|
|
||||||
currentClickButton: {title: '新增', action: 'add'},
|
|
||||||
editItem: {},
|
|
||||||
tableButtonList: [
|
|
||||||
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
|
||||||
],
|
|
||||||
dialogSaveInfoAction: ''
|
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
isMobile() {
|
isMobile() {
|
||||||
@@ -119,30 +86,26 @@ new Vue({
|
|||||||
}
|
}
|
||||||
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||||
},
|
},
|
||||||
computedEditItem() {
|
|
||||||
return this.editItem;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
async created() {
|
async created() {
|
||||||
await this.doUiAction('refreshTableData');
|
await this.doUiAction('refreshTableData');
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 获取表格数据
|
* 获取表格数据
|
||||||
*/
|
*/
|
||||||
async refreshTableData() {
|
async refreshTableData() {
|
||||||
this.isTableLoading = true;
|
this.isTableLoading = true;
|
||||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||||
const { data: { appData: { rows } } } = await window.jianghuAxios({
|
|
||||||
data: {
|
data: {
|
||||||
appData: {
|
appData: {
|
||||||
pageId: 'taskICreateManagement',
|
pageId: 'taskICreateManagement',
|
||||||
actionId: 'selectItemList',
|
actionId: 'selectItemList',
|
||||||
actionData: {},
|
actionData: {},
|
||||||
where: {},
|
where: {},
|
||||||
whereLike: serverSearchInput,
|
|
||||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,112 +115,8 @@ new Vue({
|
|||||||
this.isTableLoading = false;
|
this.isTableLoading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// startCreateItem
|
|
||||||
async clearItemData() {
|
|
||||||
this.editItem = {};
|
|
||||||
},
|
|
||||||
|
|
||||||
async openCreateItemDialog() {
|
|
||||||
this.currentClickButton = {action: 'add', title: '新增'};
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'createItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// createItem
|
|
||||||
async confirmCreateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '新增', content: '确定新增吗?'})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增数据
|
|
||||||
*/
|
|
||||||
async doCreateItem() {
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("新增数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'insertItem',
|
|
||||||
actionData: this.computedEditItem
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("新增数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
async closeDrawerShow() {
|
|
||||||
this.isEditDrawerShow = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// startUpdateItem
|
|
||||||
async prepareItemData({item}) {
|
|
||||||
this.editItem = {...item};
|
|
||||||
},
|
|
||||||
|
|
||||||
async openUpdateDialog() {
|
|
||||||
this.currentClickButton = {action: 'edit', title: '修改'};
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'updateItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmUpdateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '修改', content: '确定修改吗?'});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存数据
|
|
||||||
*/
|
|
||||||
async doUpdateItem() {
|
|
||||||
const id = this.computedEditItem.id;
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("修改数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'updateItem',
|
|
||||||
actionData: this.computedEditItem,
|
|
||||||
where: {id: id}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("修改数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmDeleteItemDialog() {
|
|
||||||
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除数据
|
|
||||||
*/
|
|
||||||
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("删除数据成功");
|
|
||||||
},
|
|
||||||
getConstantCollectionItemText(key, _value) {
|
|
||||||
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
|
|
||||||
if(constantCollectionItemFind) {
|
|
||||||
return constantCollectionItemFind.text;
|
|
||||||
}
|
|
||||||
return _value;
|
|
||||||
},
|
|
||||||
toTaskHistory({item}) {
|
toTaskHistory({item}) {
|
||||||
window.open(`/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`);
|
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,145 +4,41 @@
|
|||||||
|
|
||||||
<jh-layout-v3>
|
<jh-layout-v3>
|
||||||
|
|
||||||
<template slot="serverSearch">
|
<!-- 页面主要内容 -->
|
||||||
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
|
<v-card :class="{'px-2': isMobile}">
|
||||||
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
|
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||||
<v-btn
|
|
||||||
class="elevation-0"
|
|
||||||
color="success"
|
|
||||||
dark
|
|
||||||
@click="doUiAction('refreshTableData')"
|
|
||||||
>
|
|
||||||
查询
|
|
||||||
</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 页面主要内容 -->
|
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
|
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||||
<v-card>
|
</v-col>
|
||||||
<v-row class="ma-0 pa-xs-4 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">
|
<v-spacer></v-spacer>
|
||||||
<span class="body-2">共{{ tableData.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
|
||||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
|
single-line></v-text-field>
|
||||||
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
</v-col>
|
||||||
</v-col>
|
</v-row>
|
||||||
</v-row>
|
<v-data-table fixed-header
|
||||||
<v-data-table fixed-header
|
:headers="headers"
|
||||||
:headers="headers"
|
:items="tableData"
|
||||||
:items="tableData"
|
:search="searchInput"
|
||||||
:search="searchInput"
|
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
:items-per-page="20"
|
||||||
:items-per-page="20"
|
mobile-breakpoint="0"
|
||||||
mobile-breakpoint="0"
|
:loading="isTableLoading"
|
||||||
:loading="isTableLoading"
|
checkbox-color="success"
|
||||||
checkbox-color="success"
|
:class="{'mx-2': isMobile}"
|
||||||
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
|
color="success"
|
||||||
<!-- <template v-slot:item.level="{ item }">-->
|
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||||
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
|
<template v-slot:item.action="{ item }">
|
||||||
<!-- </template>-->
|
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList"
|
||||||
<template v-slot:item.action="{ item }">
|
@click="doUiAction(tableButton.action, {item})">
|
||||||
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
{{ tableButton.text }}
|
||||||
查看
|
</v-btn>
|
||||||
</v-btn>
|
</template>
|
||||||
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="doUiAction(tableButton.action, {item})">
|
</v-data-table>
|
||||||
{{ tableButton.text }}
|
</v-card>
|
||||||
</v-btn>
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-container>
|
|
||||||
|
|
||||||
<!-- 编辑抽屉 -->
|
|
||||||
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
|
|
||||||
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
|
|
||||||
<v-row>
|
|
||||||
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
|
|
||||||
<v-icon dark>mdi-close</v-icon>
|
|
||||||
</v-btn>
|
|
||||||
</v-row>
|
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务ID" v-model="editItem['taskId']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务名称" v-model="editItem['taskTitle']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务状态:running 执行中;deny 拒绝;end 结束" v-model="editItem['taskStatus']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="表单" v-model="editItem['taskFormInput']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行中节点ID" v-model="editItem['taskConfigId']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="执行线路id list: 逗号分隔" v-model="editItem['taskNextConfigList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="申请人" v-model="editItem['taskInitUser']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行的处理人员,用逗号分隔" v-model="editItem['taskEditUserList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="所有相关人员,用逗号分隔" v-model="editItem['taskViewUserList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['taskComment']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="work flow流程JSON" v-model="editItem['workflowConfig']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务创建人" v-model="editItem['createByUser']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <!– 必填字段样式 demo :rules="requireRules" –>-->
|
|
||||||
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
<!-- <!– select 字段 demo –>-->
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
<!-- <!– 日期选择 demo –>-->
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
|
|
||||||
<!-- <template v-slot:activator="{ on, attrs }">-->
|
|
||||||
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
|
|
||||||
<!-- </v-menu>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
</v-row>
|
|
||||||
<v-row class="justify-end pr-6">
|
|
||||||
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
|
|
||||||
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
|
|
||||||
</v-row>
|
|
||||||
</v-form>
|
|
||||||
</v-navigation-drawer>
|
|
||||||
|
|
||||||
</jh-layout-v3>
|
</jh-layout-v3>
|
||||||
|
|
||||||
@@ -162,8 +58,7 @@ new Vue({
|
|||||||
requireRules: [
|
requireRules: [
|
||||||
v => !!v || 'This is required',
|
v => !!v || 'This is required',
|
||||||
],
|
],
|
||||||
constantCollection: {
|
constantCollection: {},
|
||||||
},
|
|
||||||
|
|
||||||
serverSearchInput: {
|
serverSearchInput: {
|
||||||
studentId: null,
|
studentId: null,
|
||||||
@@ -176,24 +71,24 @@ new Vue({
|
|||||||
tableDataFromBackend: [],
|
tableDataFromBackend: [],
|
||||||
headers: [
|
headers: [
|
||||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
|
|
||||||
{text: "任务ID", value: "taskId", width: 120},
|
{text: "任务ID", value: "taskId", width: 120},
|
||||||
{text: "任务名称", value: "taskTitle", width: 120},
|
{text: "任务名称", value: "taskTitle", width: 120},
|
||||||
{text: "任务状态", value: "taskStatus", width: 120},
|
{text: "任务状态", value: "taskStatus", width: 120},
|
||||||
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
||||||
{text: "申请人", value: "taskInitUser", width: 120},
|
{text: "申请人", value: "taskInitUser", width: 120},
|
||||||
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
||||||
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
||||||
{text: "备注", value: "taskComment", width: 120},
|
{text: "备注", value: "taskComment", width: 120},
|
||||||
{text: "任务创建人", value: "createByUser", width: 120},
|
{text: "任务创建人", value: "createByUser", width: 120},
|
||||||
{text: "操作者", value: "operationByUser", width: 120},
|
{text: "操作者", value: "operationByUser", width: 120},
|
||||||
{text: "操作时间", value: "operationAt", width: 250},
|
{text: "操作时间", value: "operationAt", width: 250},
|
||||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
||||||
],
|
],
|
||||||
|
|
||||||
currentClickButton: {title: '新增', action: 'add'},
|
|
||||||
editItem: {},
|
editItem: {},
|
||||||
tableButtonList: [
|
tableButtonList: [
|
||||||
|
{text: '查看', buttonType: 'view', color: 'success', action: 'toTaskHistory'},
|
||||||
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
||||||
],
|
],
|
||||||
dialogSaveInfoAction: ''
|
dialogSaveInfoAction: ''
|
||||||
@@ -216,22 +111,21 @@ new Vue({
|
|||||||
async created() {
|
async created() {
|
||||||
await this.doUiAction('refreshTableData');
|
await this.doUiAction('refreshTableData');
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 获取表格数据
|
* 获取表格数据
|
||||||
*/
|
*/
|
||||||
async refreshTableData() {
|
async refreshTableData() {
|
||||||
this.isTableLoading = true;
|
this.isTableLoading = true;
|
||||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||||
const { data: { appData: { rows } } } = await window.jianghuAxios({
|
|
||||||
data: {
|
data: {
|
||||||
appData: {
|
appData: {
|
||||||
pageId: 'taskManagement',
|
pageId: 'taskManagement',
|
||||||
actionId: 'selectItemList',
|
actionId: 'selectItemList',
|
||||||
actionData: {},
|
actionData: {},
|
||||||
where: {},
|
where: {},
|
||||||
whereLike: serverSearchInput,
|
|
||||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,80 +135,6 @@ new Vue({
|
|||||||
this.isTableLoading = false;
|
this.isTableLoading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// startCreateItem
|
|
||||||
async clearItemData() {
|
|
||||||
this.editItem = {};
|
|
||||||
},
|
|
||||||
|
|
||||||
async openCreateItemDialog() {
|
|
||||||
this.currentClickButton = {action: 'add', title: '新增'};
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'createItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// createItem
|
|
||||||
async confirmCreateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '新增', content: '确定新增吗?'})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增数据
|
|
||||||
*/
|
|
||||||
async doCreateItem() {
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("新增数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'insertItem',
|
|
||||||
actionData: this.computedEditItem
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("新增数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
async closeDrawerShow() {
|
|
||||||
this.isEditDrawerShow = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// startUpdateItem
|
|
||||||
async prepareItemData({item}) {
|
|
||||||
this.editItem = {...item};
|
|
||||||
},
|
|
||||||
|
|
||||||
async openUpdateDialog() {
|
|
||||||
this.currentClickButton = {action: 'edit', title: '修改'};
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'updateItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmUpdateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '修改', content: '确定修改吗?'});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存数据
|
|
||||||
*/
|
|
||||||
async doUpdateItem() {
|
|
||||||
const id = this.computedEditItem.id;
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("修改数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'updateItem',
|
|
||||||
actionData: this.computedEditItem,
|
|
||||||
where: {id: id}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("修改数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
// updateItem
|
||||||
async confirmDeleteItemDialog() {
|
async confirmDeleteItemDialog() {
|
||||||
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
||||||
@@ -324,7 +144,7 @@ new Vue({
|
|||||||
* 删除数据
|
* 删除数据
|
||||||
*/
|
*/
|
||||||
async doDeleteItem({item}) {
|
async doDeleteItem({item}) {
|
||||||
const { id } = item;
|
const {id} = item;
|
||||||
await window.vtoast.loading("删除数据");
|
await window.vtoast.loading("删除数据");
|
||||||
await window.jianghuAxios({
|
await window.jianghuAxios({
|
||||||
data: {
|
data: {
|
||||||
@@ -332,21 +152,14 @@ new Vue({
|
|||||||
pageId: 'taskManagement',
|
pageId: 'taskManagement',
|
||||||
actionId: 'deleteItem',
|
actionId: 'deleteItem',
|
||||||
actionData: {},
|
actionData: {},
|
||||||
where: { id: id }
|
where: {id: id}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await window.vtoast.success("删除数据成功");
|
await window.vtoast.success("删除数据成功");
|
||||||
},
|
},
|
||||||
getConstantCollectionItemText(key, _value) {
|
|
||||||
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
|
|
||||||
if(constantCollectionItemFind) {
|
|
||||||
return constantCollectionItemFind.text;
|
|
||||||
}
|
|
||||||
return _value;
|
|
||||||
},
|
|
||||||
toTaskHistory({item}) {
|
toTaskHistory({item}) {
|
||||||
window.open(`/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`);
|
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,142 +4,40 @@
|
|||||||
|
|
||||||
<jh-layout-v3>
|
<jh-layout-v3>
|
||||||
|
|
||||||
<template slot="serverSearch">
|
|
||||||
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
|
|
||||||
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
|
|
||||||
<v-btn
|
|
||||||
class="elevation-0"
|
|
||||||
color="success"
|
|
||||||
dark
|
|
||||||
@click="doUiAction('refreshTableData')"
|
|
||||||
>
|
|
||||||
查询
|
|
||||||
</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 页面主要内容 -->
|
<!-- 页面主要内容 -->
|
||||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
|
<v-card :class="{'px-2': isMobile}">
|
||||||
<v-card>
|
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||||
<v-row class="ma-0 pa-xs-4 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">
|
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
|
||||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
|
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||||
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||||
</v-col>
|
single-line></v-text-field>
|
||||||
</v-row>
|
</v-col>
|
||||||
<v-data-table fixed-header
|
</v-row>
|
||||||
:headers="headers"
|
<v-data-table fixed-header
|
||||||
:items="tableData"
|
:headers="headers"
|
||||||
:search="searchInput"
|
:items="tableData"
|
||||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
:search="searchInput"
|
||||||
:items-per-page="20"
|
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||||
mobile-breakpoint="0"
|
:items-per-page="20"
|
||||||
:loading="isTableLoading"
|
mobile-breakpoint="0"
|
||||||
checkbox-color="success"
|
:loading="isTableLoading"
|
||||||
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
|
checkbox-color="success"
|
||||||
<!-- <template v-slot:item.level="{ item }">-->
|
:class="{'mx-2': isMobile}"
|
||||||
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
|
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||||
<!-- </template>-->
|
<template v-slot:item.action="{ item }">
|
||||||
<template v-slot:item.action="{ item }">
|
<v-btn small color="success" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||||
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
查看
|
||||||
查看
|
|
||||||
</v-btn>
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-container>
|
|
||||||
|
|
||||||
<!-- 编辑抽屉 -->
|
|
||||||
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
|
|
||||||
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
|
|
||||||
<v-row>
|
|
||||||
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
|
|
||||||
<v-icon dark>mdi-close</v-icon>
|
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-row>
|
</template>
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
</v-data-table>
|
||||||
|
</v-card>
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务ID" v-model="editItem['taskId']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务名称" v-model="editItem['taskTitle']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务状态:running 执行中;deny 拒绝;end 结束" v-model="editItem['taskStatus']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="表单" v-model="editItem['taskFormInput']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行中节点ID" v-model="editItem['taskConfigId']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="执行线路id list: 逗号分隔" v-model="editItem['taskNextConfigList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="申请人" v-model="editItem['taskInitUser']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行的处理人员,用逗号分隔" v-model="editItem['taskEditUserList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="所有相关人员,用逗号分隔" v-model="editItem['taskViewUserList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['taskComment']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="work flow流程JSON" v-model="editItem['workflowConfig']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务创建人" v-model="editItem['createByUser']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <!– 必填字段样式 demo :rules="requireRules" –>-->
|
|
||||||
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
<!-- <!– select 字段 demo –>-->
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
<!-- <!– 日期选择 demo –>-->
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
|
|
||||||
<!-- <template v-slot:activator="{ on, attrs }">-->
|
|
||||||
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
|
|
||||||
<!-- </v-menu>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
</v-row>
|
|
||||||
<v-row class="justify-end pr-6">
|
|
||||||
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
|
|
||||||
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
|
|
||||||
</v-row>
|
|
||||||
</v-form>
|
|
||||||
</v-navigation-drawer>
|
|
||||||
|
|
||||||
</jh-layout-v3>
|
</jh-layout-v3>
|
||||||
|
|
||||||
@@ -155,45 +53,29 @@ new Vue({
|
|||||||
mixins: [window.jianghuUiActionMixins],
|
mixins: [window.jianghuUiActionMixins],
|
||||||
data: () => ({
|
data: () => ({
|
||||||
// 表格相关数据
|
// 表格相关数据
|
||||||
isFormValid: true,
|
|
||||||
requireRules: [
|
requireRules: [
|
||||||
v => !!v || 'This is required',
|
v => !!v || 'This is required',
|
||||||
],
|
],
|
||||||
constantCollection: {
|
|
||||||
},
|
|
||||||
|
|
||||||
serverSearchInput: {
|
|
||||||
studentId: null,
|
|
||||||
classId: null
|
|
||||||
},
|
|
||||||
currentTableGenderType: 'all',
|
currentTableGenderType: 'all',
|
||||||
isEditDrawerShow: false,
|
|
||||||
searchInput: null,
|
searchInput: null,
|
||||||
isTableLoading: true,
|
isTableLoading: true,
|
||||||
tableDataFromBackend: [],
|
tableDataFromBackend: [],
|
||||||
headers: [
|
headers: [
|
||||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
|
|
||||||
{text: "任务ID", value: "taskId", width: 120},
|
{text: "任务ID", value: "taskId", width: 120},
|
||||||
{text: "任务名称", value: "taskTitle", width: 120},
|
{text: "任务名称", value: "taskTitle", width: 120},
|
||||||
{text: "任务状态", value: "taskStatus", width: 120},
|
{text: "任务状态", value: "taskStatus", width: 120},
|
||||||
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
||||||
{text: "申请人", value: "taskInitUser", width: 120},
|
{text: "申请人", value: "taskInitUser", width: 120},
|
||||||
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120},
|
||||||
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120},
|
||||||
{text: "备注", value: "taskComment", width: 120},
|
{text: "备注", value: "taskComment", width: 120},
|
||||||
{text: "任务创建人", value: "createByUser", width: 120},
|
{text: "任务创建人", value: "createByUser", width: 120},
|
||||||
{text: "操作者", value: "operationByUser", width: 120},
|
{text: "操作者", value: "operationByUser", width: 120},
|
||||||
{text: "操作时间", value: "operationAt", width: 250},
|
{text: "操作时间", value: "operationAt", width: 250},
|
||||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
{text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
],
|
],
|
||||||
|
|
||||||
currentClickButton: {title: '新增', action: 'add'},
|
|
||||||
editItem: {},
|
|
||||||
tableButtonList: [
|
|
||||||
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
|
||||||
],
|
|
||||||
dialogSaveInfoAction: ''
|
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
isMobile() {
|
isMobile() {
|
||||||
@@ -205,30 +87,26 @@ new Vue({
|
|||||||
}
|
}
|
||||||
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||||
},
|
},
|
||||||
computedEditItem() {
|
|
||||||
return this.editItem;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
async created() {
|
async created() {
|
||||||
await this.doUiAction('refreshTableData');
|
await this.doUiAction('refreshTableData');
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 获取表格数据
|
* 获取表格数据
|
||||||
*/
|
*/
|
||||||
async refreshTableData() {
|
async refreshTableData() {
|
||||||
this.isTableLoading = true;
|
this.isTableLoading = true;
|
||||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||||
const { data: { appData: { rows } } } = await window.jianghuAxios({
|
|
||||||
data: {
|
data: {
|
||||||
appData: {
|
appData: {
|
||||||
pageId: 'taskICreateManagement',
|
pageId: 'taskICreateManagement',
|
||||||
actionId: 'selectItemList',
|
actionId: 'selectItemList',
|
||||||
actionData: {},
|
actionData: {},
|
||||||
where: {},
|
where: {},
|
||||||
whereLike: serverSearchInput,
|
|
||||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,112 +116,8 @@ new Vue({
|
|||||||
this.isTableLoading = false;
|
this.isTableLoading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// startCreateItem
|
|
||||||
async clearItemData() {
|
|
||||||
this.editItem = {};
|
|
||||||
},
|
|
||||||
|
|
||||||
async openCreateItemDialog() {
|
|
||||||
this.currentClickButton = {action: 'add', title: '新增'};
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'createItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// createItem
|
|
||||||
async confirmCreateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '新增', content: '确定新增吗?'})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增数据
|
|
||||||
*/
|
|
||||||
async doCreateItem() {
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("新增数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'insertItem',
|
|
||||||
actionData: this.computedEditItem
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("新增数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
async closeDrawerShow() {
|
|
||||||
this.isEditDrawerShow = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// startUpdateItem
|
|
||||||
async prepareItemData({item}) {
|
|
||||||
this.editItem = {...item};
|
|
||||||
},
|
|
||||||
|
|
||||||
async openUpdateDialog() {
|
|
||||||
this.currentClickButton = {action: 'edit', title: '修改'};
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'updateItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmUpdateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '修改', content: '确定修改吗?'});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存数据
|
|
||||||
*/
|
|
||||||
async doUpdateItem() {
|
|
||||||
const id = this.computedEditItem.id;
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("修改数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'updateItem',
|
|
||||||
actionData: this.computedEditItem,
|
|
||||||
where: {id: id}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("修改数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmDeleteItemDialog() {
|
|
||||||
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除数据
|
|
||||||
*/
|
|
||||||
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("删除数据成功");
|
|
||||||
},
|
|
||||||
getConstantCollectionItemText(key, _value) {
|
|
||||||
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
|
|
||||||
if(constantCollectionItemFind) {
|
|
||||||
return constantCollectionItemFind.text;
|
|
||||||
}
|
|
||||||
return _value;
|
|
||||||
},
|
|
||||||
toTaskHistory({item}) {
|
toTaskHistory({item}) {
|
||||||
window.open(`/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`);
|
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,143 +4,42 @@
|
|||||||
|
|
||||||
<jh-layout-v3>
|
<jh-layout-v3>
|
||||||
|
|
||||||
<template slot="serverSearch">
|
|
||||||
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
|
|
||||||
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
|
|
||||||
<v-btn
|
|
||||||
class="elevation-0"
|
|
||||||
color="success"
|
|
||||||
dark
|
|
||||||
@click="doUiAction('refreshTableData')"
|
|
||||||
>
|
|
||||||
查询
|
|
||||||
</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 页面主要内容 -->
|
<!-- 页面主要内容 -->
|
||||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
|
<v-card :class="{'px-2': isMobile}">
|
||||||
<v-card>
|
|
||||||
|
|
||||||
<v-row class="ma-0 pa-xs-4 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">
|
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||||
|
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
|
<v-spacer></v-spacer>
|
||||||
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-data-table fixed-header
|
|
||||||
:headers="headers"
|
|
||||||
:items="tableData"
|
|
||||||
:search="searchInput"
|
|
||||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
|
||||||
:items-per-page="20"
|
|
||||||
mobile-breakpoint="0"
|
|
||||||
:loading="isTableLoading"
|
|
||||||
checkbox-color="success"
|
|
||||||
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
|
|
||||||
<!-- <template v-slot:item.level="{ item }">-->
|
|
||||||
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<template v-slot:item.action="{ item }">
|
|
||||||
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
|
||||||
查看
|
|
||||||
</v-btn>
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-container>
|
|
||||||
|
|
||||||
<!-- 编辑抽屉 -->
|
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||||
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
|
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||||
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
|
single-line></v-text-field>
|
||||||
<v-row>
|
</v-col>
|
||||||
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
|
</v-row>
|
||||||
<v-spacer></v-spacer>
|
<v-data-table fixed-header
|
||||||
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
|
:headers="headers"
|
||||||
<v-icon dark>mdi-close</v-icon>
|
:items="tableData"
|
||||||
</v-btn>
|
:search="searchInput"
|
||||||
</v-row>
|
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
:items-per-page="20"
|
||||||
|
mobile-breakpoint="0"
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
:loading="isTableLoading"
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务ID" v-model="editItem['taskId']"></v-text-field>
|
checkbox-color="success"
|
||||||
</v-col>
|
:class="{'mx-2': isMobile}"
|
||||||
|
color="success"
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务名称" v-model="editItem['taskTitle']"></v-text-field>
|
<template v-slot:item.action="{ item }">
|
||||||
</v-col>
|
<v-btn small color="success" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||||
|
查看
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
</v-btn>
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务状态:running 执行中;deny 拒绝;end 结束" v-model="editItem['taskStatus']"></v-text-field>
|
</template>
|
||||||
</v-col>
|
</v-data-table>
|
||||||
|
</v-card>
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="表单" v-model="editItem['taskFormInput']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行中节点ID" v-model="editItem['taskConfigId']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="执行线路id list: 逗号分隔" v-model="editItem['taskNextConfigList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="申请人" v-model="editItem['taskInitUser']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行的处理人员,用逗号分隔" v-model="editItem['taskEditUserList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="所有相关人员,用逗号分隔" v-model="editItem['taskViewUserList']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['taskComment']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="work flow流程JSON" v-model="editItem['workflowConfig']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务创建人" v-model="editItem['createByUser']"></v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <!– 必填字段样式 demo :rules="requireRules" –>-->
|
|
||||||
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
<!-- <!– select 字段 demo –>-->
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
<!-- <!– 日期选择 demo –>-->
|
|
||||||
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
|
|
||||||
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
|
|
||||||
<!-- <template v-slot:activator="{ on, attrs }">-->
|
|
||||||
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
|
|
||||||
<!-- </v-menu>-->
|
|
||||||
<!-- </v-col>-->
|
|
||||||
</v-row>
|
|
||||||
<v-row class="justify-end pr-6">
|
|
||||||
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
|
|
||||||
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
|
|
||||||
</v-row>
|
|
||||||
</v-form>
|
|
||||||
</v-navigation-drawer>
|
|
||||||
|
|
||||||
</jh-layout-v3>
|
</jh-layout-v3>
|
||||||
|
|
||||||
@@ -156,45 +55,29 @@ new Vue({
|
|||||||
mixins: [window.jianghuUiActionMixins],
|
mixins: [window.jianghuUiActionMixins],
|
||||||
data: () => ({
|
data: () => ({
|
||||||
// 表格相关数据
|
// 表格相关数据
|
||||||
isFormValid: true,
|
|
||||||
requireRules: [
|
requireRules: [
|
||||||
v => !!v || 'This is required',
|
v => !!v || 'This is required',
|
||||||
],
|
],
|
||||||
constantCollection: {
|
|
||||||
},
|
|
||||||
|
|
||||||
serverSearchInput: {
|
|
||||||
studentId: null,
|
|
||||||
classId: null
|
|
||||||
},
|
|
||||||
currentTableGenderType: 'all',
|
currentTableGenderType: 'all',
|
||||||
isEditDrawerShow: false,
|
|
||||||
searchInput: null,
|
searchInput: null,
|
||||||
isTableLoading: true,
|
isTableLoading: true,
|
||||||
tableDataFromBackend: [],
|
tableDataFromBackend: [],
|
||||||
headers: [
|
headers: [
|
||||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
|
|
||||||
{text: "任务ID", value: "taskId", width: 120},
|
{text: "任务ID", value: "taskId", width: 120},
|
||||||
{text: "任务名称", value: "taskTitle", width: 120},
|
{text: "任务名称", value: "taskTitle", width: 120},
|
||||||
{text: "任务状态", value: "taskStatus", width: 120},
|
{text: "任务状态", value: "taskStatus", width: 120},
|
||||||
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
{text: "当前执行中节点ID", value: "taskConfigId", width: 120},
|
||||||
{text: "申请人", value: "taskInitUser", width: 120},
|
{text: "申请人", value: "taskInitUser", width: 120},
|
||||||
{text: "当前执行的处理人员", value: "taskEditUserList", width: 120},
|
{text: "当前执行的处理人员", value: "taskEditUserList", width: 120},
|
||||||
{text: "所有相关人员", value: "taskViewUserList", width: 120},
|
{text: "所有相关人员", value: "taskViewUserList", width: 120},
|
||||||
{text: "备注", value: "taskComment", width: 120},
|
{text: "备注", value: "taskComment", width: 120},
|
||||||
{text: "任务创建人", value: "createByUser", width: 120},
|
{text: "任务创建人", value: "createByUser", width: 120},
|
||||||
{text: "操作者", value: "operationByUser", width: 120},
|
{text: "操作者", value: "operationByUser", width: 120},
|
||||||
{text: "操作时间", value: "operationAt", width: 250},
|
{text: "操作时间", value: "operationAt", width: 250},
|
||||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
{text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
],
|
],
|
||||||
|
|
||||||
currentClickButton: {title: '新增', action: 'add'},
|
|
||||||
editItem: {},
|
|
||||||
tableButtonList: [
|
|
||||||
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
|
||||||
],
|
|
||||||
dialogSaveInfoAction: ''
|
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
isMobile() {
|
isMobile() {
|
||||||
@@ -206,30 +89,26 @@ new Vue({
|
|||||||
}
|
}
|
||||||
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||||
},
|
},
|
||||||
computedEditItem() {
|
|
||||||
return this.editItem;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
async created() {
|
async created() {
|
||||||
await this.doUiAction('refreshTableData');
|
await this.doUiAction('refreshTableData');
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 获取表格数据
|
* 获取表格数据
|
||||||
*/
|
*/
|
||||||
async refreshTableData() {
|
async refreshTableData() {
|
||||||
this.isTableLoading = true;
|
this.isTableLoading = true;
|
||||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||||
const { data: { appData: { rows } } } = await window.jianghuAxios({
|
|
||||||
data: {
|
data: {
|
||||||
appData: {
|
appData: {
|
||||||
pageId: 'taskUpcomingManagement',
|
pageId: 'taskUpcomingManagement',
|
||||||
actionId: 'selectItemList',
|
actionId: 'selectItemList',
|
||||||
actionData: {},
|
actionData: {},
|
||||||
where: {},
|
where: {},
|
||||||
whereLike: serverSearchInput,
|
|
||||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -239,112 +118,9 @@ new Vue({
|
|||||||
this.isTableLoading = false;
|
this.isTableLoading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// startCreateItem
|
|
||||||
async clearItemData() {
|
|
||||||
this.editItem = {};
|
|
||||||
},
|
|
||||||
|
|
||||||
async openCreateItemDialog() {
|
|
||||||
this.currentClickButton = {action: 'add', title: '新增'};
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'createItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// createItem
|
|
||||||
async confirmCreateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '新增', content: '确定新增吗?'})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增数据
|
|
||||||
*/
|
|
||||||
async doCreateItem() {
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("新增数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'insertItem',
|
|
||||||
actionData: this.computedEditItem
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("新增数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
async closeDrawerShow() {
|
|
||||||
this.isEditDrawerShow = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
// startUpdateItem
|
|
||||||
async prepareItemData({item}) {
|
|
||||||
this.editItem = {...item};
|
|
||||||
},
|
|
||||||
|
|
||||||
async openUpdateDialog() {
|
|
||||||
this.currentClickButton = {action: 'edit', title: '修改'};
|
|
||||||
this.isEditDrawerShow = true;
|
|
||||||
this.dialogSaveInfoAction = 'updateItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmUpdateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '修改', content: '确定修改吗?'});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存数据
|
|
||||||
*/
|
|
||||||
async doUpdateItem() {
|
|
||||||
const id = this.computedEditItem.id;
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
await window.vtoast.loading("修改数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'taskManagement',
|
|
||||||
actionId: 'updateItem',
|
|
||||||
actionData: this.computedEditItem,
|
|
||||||
where: {id: id}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("修改数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmDeleteItemDialog() {
|
|
||||||
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除数据
|
|
||||||
*/
|
|
||||||
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("删除数据成功");
|
|
||||||
},
|
|
||||||
getConstantCollectionItemText(key, _value) {
|
|
||||||
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
|
|
||||||
if(constantCollectionItemFind) {
|
|
||||||
return constantCollectionItemFind.text;
|
|
||||||
}
|
|
||||||
return _value;
|
|
||||||
},
|
|
||||||
toTaskHistory({item}) {
|
toTaskHistory({item}) {
|
||||||
window.open(`/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`);
|
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,287 @@
|
|||||||
|
{% extends 'template/jhTemplateV3.html'%}
|
||||||
|
|
||||||
|
{% block vue_template %}
|
||||||
|
<jh-layout-v3>
|
||||||
|
<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-col>
|
||||||
|
<v-btn color="success" @click="doUiAction(dialogSaveInfoAction)" style="height: 40px">
|
||||||
|
保存
|
||||||
|
</v-btn>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<div class="pt-8 pb-4" style="font-size: 18px; font-weight: bold">模板设置</div>
|
||||||
|
<tpl-form-design :form="editItem.workflowForm">
|
||||||
|
</tpl-form-design>
|
||||||
|
<div class="pt-8 pb-4" style="font-size: 18px; font-weight: bold">模板设置</div>
|
||||||
|
<process-flow :data="editItem.workflowConfig" :user="constantCollection.userList"
|
||||||
|
:group="constantCollection.groupList" :tpl="constantCollection.workflowFormList">
|
||||||
|
</process-flow>
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
</jh-layout-v3>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block vue_body %}
|
||||||
|
{% include 'component/flow/processFlow.html' %}
|
||||||
|
{% include 'component/flow/editFlow.html' %}
|
||||||
|
{% include 'component/flow/editLine.html' %}
|
||||||
|
{% include 'component/flow/editNode.html' %}
|
||||||
|
{% include 'component/flow/flowNode.html' %}
|
||||||
|
{% include 'component/tpl/tplFormDesign.html' %}
|
||||||
|
{% include 'component/tpl/formItemListGenerator.html' %}
|
||||||
|
{% include 'component/tpl/formItemListRender.html' %}
|
||||||
|
|
||||||
|
<script type="module">
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
template: '#app-template',
|
||||||
|
vuetify: new Vuetify(),
|
||||||
|
mixins: [window.jianghuUiActionMixins],
|
||||||
|
data: () => ({
|
||||||
|
// 表格相关数据
|
||||||
|
isFormValid: true,
|
||||||
|
requireRules: [
|
||||||
|
v => !!v || 'This is required',
|
||||||
|
],
|
||||||
|
constantCollection: {
|
||||||
|
userList: [],
|
||||||
|
groupList: [],
|
||||||
|
workflowFormList: []
|
||||||
|
},
|
||||||
|
|
||||||
|
serverSearchInput: {
|
||||||
|
studentId: null,
|
||||||
|
classId: null
|
||||||
|
},
|
||||||
|
currentTableGenderType: 'all',
|
||||||
|
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: "分类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: {},
|
||||||
|
tableButtonList: [
|
||||||
|
{text: '修改', buttonType: 'edit', color: 'success', action: 'startUpdateItem'},
|
||||||
|
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
||||||
|
],
|
||||||
|
dialogSaveInfoAction: 'createItem',
|
||||||
|
dialog: false,
|
||||||
|
}),
|
||||||
|
computed: {
|
||||||
|
isMobile() {
|
||||||
|
return window.innerWidth < 600;
|
||||||
|
},
|
||||||
|
tableData() {
|
||||||
|
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
|
||||||
|
return this.tableDataFromBackend;
|
||||||
|
}
|
||||||
|
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||||
|
},
|
||||||
|
computedEditItem() {
|
||||||
|
return this.editItem;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'editItem.workflowForm': {
|
||||||
|
handler(val) {
|
||||||
|
if (!val) return
|
||||||
|
|
||||||
|
this.constantCollection.workflowFormList = [];
|
||||||
|
for (const item of val) {
|
||||||
|
this.constantCollection.workflowFormList.push({
|
||||||
|
text: item.component.outline,
|
||||||
|
value: item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!this.editItem.workflowConfig) return;
|
||||||
|
for (const config of this.editItem.workflowConfig.nodeList) {
|
||||||
|
if (!config.formId) return;
|
||||||
|
const formId = []
|
||||||
|
for (const item of config.formId) {
|
||||||
|
if (!this.constantCollection.workflowFormList.find(e => e.value === item)) {
|
||||||
|
formId.push(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
config.formId = formId
|
||||||
|
console.log(config.outline, config.formId)
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
const searchParams = new URLSearchParams(location.search.substring(1));
|
||||||
|
const type = searchParams.get('type');
|
||||||
|
if(type === 'edit') {
|
||||||
|
const workflowEditItem = sessionStorage.getItem('workflowEditItem');
|
||||||
|
if(workflowEditItem) {
|
||||||
|
this.dialogSaveInfoAction = 'updateItem';
|
||||||
|
this.editItem = JSON.parse(workflowEditItem);
|
||||||
|
sessionStorage.removeItem('workflowEditItem');
|
||||||
|
console.log(this.editItem);
|
||||||
|
} else {
|
||||||
|
history.back();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.clearItemData();
|
||||||
|
}
|
||||||
|
this.getUserList();
|
||||||
|
this.getGroupList();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
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,
|
||||||
|
}
|
||||||
|
if (this.editItem.id) {
|
||||||
|
item.id = this.editItem.id;
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取表格数据
|
||||||
|
*/
|
||||||
|
async getUserList() {
|
||||||
|
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'selectUserList',
|
||||||
|
actionData: {},
|
||||||
|
where: {},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.constantCollection.userList = rows.map(e => {
|
||||||
|
return {text: e.username, value: e.userId}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取表格数据
|
||||||
|
*/
|
||||||
|
async getGroupList() {
|
||||||
|
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'selectGroupList',
|
||||||
|
actionData: {},
|
||||||
|
where: {},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.constantCollection.groupList = rows.map(e => {
|
||||||
|
return {text: e.groupName, value: e.groupId}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// startCreateItem
|
||||||
|
async clearItemData() {
|
||||||
|
this.editItem = {workflowForm: [], workflowConfig: {lineList: [], nodeList: []}};
|
||||||
|
},
|
||||||
|
|
||||||
|
// createItem
|
||||||
|
async confirmCreateItemDialog() {
|
||||||
|
return window.confirmDialog({title: '新增', content: '确定新增吗?'})
|
||||||
|
},
|
||||||
|
validate() {
|
||||||
|
if (!this.editItem.workflowId || !this.editItem.workflowId) {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*/
|
||||||
|
async doCreateItem() {
|
||||||
|
delete this.computedEditItem.id;
|
||||||
|
const item = this.buildEditItem();
|
||||||
|
await window.vtoast.loading("新增数据");
|
||||||
|
await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'insertItem',
|
||||||
|
actionData: item
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
await window.vtoast.success("新增数据成功");
|
||||||
|
},
|
||||||
|
|
||||||
|
// updateItem
|
||||||
|
async confirmUpdateItemDialog() {
|
||||||
|
return window.confirmDialog({title: '修改', content: '确定修改吗?'});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存数据
|
||||||
|
*/
|
||||||
|
async doUpdateItem() {
|
||||||
|
const {id, ...item} = this.buildEditItem();
|
||||||
|
await window.vtoast.loading("修改数据");
|
||||||
|
await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'updateItem',
|
||||||
|
actionData: item,
|
||||||
|
where: {id: id}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
await window.vtoast.success("修改数据成功");
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.v-dialog--fullscreen .v-sheet {
|
||||||
|
height: unset;
|
||||||
|
top: unset;
|
||||||
|
position: unset;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
@@ -3,124 +3,46 @@
|
|||||||
{% block vue_template %}
|
{% block vue_template %}
|
||||||
|
|
||||||
<jh-layout-v3>
|
<jh-layout-v3>
|
||||||
<template slot="serverSearch">
|
<!-- 页面主要内容 -->
|
||||||
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
|
<v-card :class="{'px-2': isMobile}">
|
||||||
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
|
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||||
<v-btn
|
|
||||||
class="elevation-0"
|
|
||||||
color="success"
|
|
||||||
dark
|
|
||||||
@click="doUiAction('refreshTableData')"
|
|
||||||
>
|
|
||||||
查询
|
|
||||||
</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 页面主要内容 -->
|
<v-col cols="12" xs="12" sm="4" md="4" xl="4" class="pl-0">
|
||||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
|
<v-btn color="success" dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem')">新增</v-btn>
|
||||||
<v-card>
|
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||||
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
</v-col>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
<v-col cols="12" xs="12" sm="4" md="3" xl="3" class="px-0">
|
||||||
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem')">新增</v-btn>
|
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
single-line></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-spacer></v-spacer>
|
</v-row>
|
||||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
|
<v-data-table fixed-header
|
||||||
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
:headers="headers"
|
||||||
</v-col>
|
:items="tableData"
|
||||||
</v-row>
|
:search="searchInput"
|
||||||
<v-data-table fixed-header
|
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||||
:headers="headers"
|
:items-per-page="20"
|
||||||
:items="tableData"
|
mobile-breakpoint="0"
|
||||||
:search="searchInput"
|
:loading="isTableLoading"
|
||||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
checkbox-color="success"
|
||||||
:items-per-page="20"
|
:class="{'mx-2': isMobile}"
|
||||||
mobile-breakpoint="0"
|
color="success"
|
||||||
:loading="isTableLoading"
|
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||||
checkbox-color="success"
|
|
||||||
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
|
|
||||||
<!-- <template v-slot:item.level="{ item }">-->
|
|
||||||
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<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-container>
|
|
||||||
|
|
||||||
<v-dialog v-model="dialog" fullscreen hide-overlay persistent transition="dialog-bottom-transition">
|
|
||||||
<v-card>
|
|
||||||
<v-toolbar dark color="primary">
|
|
||||||
<v-btn icon dark @click="dialog = false" class="ml-2">
|
|
||||||
<v-icon>mdi-close</v-icon>
|
|
||||||
</v-btn>
|
|
||||||
<v-toolbar-title>流程编辑</v-toolbar-title>
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
<v-toolbar-items>
|
|
||||||
<v-btn dark text @click="doUiAction(dialogSaveInfoAction)">
|
|
||||||
保存
|
|
||||||
</v-btn>
|
|
||||||
</v-toolbar-items>
|
|
||||||
</v-toolbar>
|
|
||||||
<v-list three-line subheader>
|
|
||||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">流程名</span>
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="流程名" v-model="editItem['workflowName']" :rules="requireRules">
|
|
||||||
</v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">分类</span>
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="分类" v-model="editItem['workflowCategory']" :rules="requireRules">
|
|
||||||
</v-text-field>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
|
||||||
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">备注</span>
|
|
||||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="备注" v-model="editItem['workflowRemark']">
|
|
||||||
</v-text-field>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-list>
|
|
||||||
<v-divider></v-divider>
|
|
||||||
<v-list three-line subheader>
|
|
||||||
<v-subheader>模板设置</v-subheader>
|
|
||||||
<v-list-item>
|
|
||||||
<tpl-form-design v-if="dialog" :form="editItem.workflowForm">
|
|
||||||
</tpl-form-design>
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
<v-list three-line subheader>
|
|
||||||
<v-subheader>流程设置</v-subheader>
|
|
||||||
<v-list-item>
|
|
||||||
<process-flow v-if="dialog" :data="editItem.workflowConfig" :user="constantCollection.userList" :group="constantCollection.groupList" :tpl="constantCollection.workflowFormList">
|
|
||||||
</process-flow>
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</v-card>
|
|
||||||
</v-dialog>
|
|
||||||
|
|
||||||
|
<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>
|
</jh-layout-v3>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block vue_body %}
|
{% block vue_body %}
|
||||||
{% include 'component/flow/processFlow.html' %}
|
|
||||||
{% include 'component/flow/editFlow.html' %}
|
|
||||||
{% include 'component/flow/editLine.html' %}
|
|
||||||
{% include 'component/flow/editNode.html' %}
|
|
||||||
{% include 'component/flow/flowNode.html' %}
|
|
||||||
{% include 'component/tpl/tplFormDesign.html' %}
|
|
||||||
{% include 'component/tpl/formItemListGenerator.html' %}
|
|
||||||
{% include 'component/tpl/formItemListRender.html' %}
|
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
new Vue({
|
new Vue({
|
||||||
@@ -130,16 +52,9 @@ new Vue({
|
|||||||
mixins: [window.jianghuUiActionMixins],
|
mixins: [window.jianghuUiActionMixins],
|
||||||
data: () => ({
|
data: () => ({
|
||||||
// 表格相关数据
|
// 表格相关数据
|
||||||
isFormValid: true,
|
|
||||||
requireRules: [
|
requireRules: [
|
||||||
v => !!v || 'This is required',
|
v => !!v || 'This is required',
|
||||||
],
|
],
|
||||||
constantCollection: {
|
|
||||||
userList: [],
|
|
||||||
groupList: [],
|
|
||||||
workflowFormList: []
|
|
||||||
},
|
|
||||||
|
|
||||||
serverSearchInput: {
|
serverSearchInput: {
|
||||||
studentId: null,
|
studentId: null,
|
||||||
classId: null
|
classId: null
|
||||||
@@ -151,14 +66,14 @@ new Vue({
|
|||||||
tableDataFromBackend: [],
|
tableDataFromBackend: [],
|
||||||
headers: [
|
headers: [
|
||||||
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||||
|
|
||||||
{text: "流程ID", value: "workflowId", width: 120},
|
{text: "流程ID", value: "workflowId", width: 120},
|
||||||
{text: "流程名", value: "workflowName", width: 120},
|
{text: "流程名", value: "workflowName", width: 120},
|
||||||
{text: "分类ID", value: "workflowCategory", width: 120},
|
{text: "分类ID", value: "workflowCategory", width: 120},
|
||||||
{text: "备注", value: "workFlowRemark", width: 120},
|
{text: "备注", value: "workFlowRemark", width: 120},
|
||||||
{text: "操作者", value: "operationByUser", width: 120},
|
{text: "操作者", value: "operationByUser", width: 120},
|
||||||
{text: "操作时间", value: "operationAt", width: 250},
|
{text: "操作时间", value: "operationAt", width: 250},
|
||||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
{text: '操作', value: 'action', align: 'center', sortable: false, width: 160, class: 'fixed', cellClass: 'fixed'},
|
||||||
],
|
],
|
||||||
|
|
||||||
currentClickButton: {title: '新增', action: 'add'},
|
currentClickButton: {title: '新增', action: 'add'},
|
||||||
@@ -180,68 +95,20 @@ new Vue({
|
|||||||
}
|
}
|
||||||
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||||
},
|
},
|
||||||
computedEditItem() {
|
|
||||||
return this.editItem;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'editItem.workflowForm': {
|
|
||||||
handler(val) {
|
|
||||||
if (!val) return
|
|
||||||
|
|
||||||
this.constantCollection.workflowFormList = [];
|
|
||||||
for(const item of val) {
|
|
||||||
this.constantCollection.workflowFormList.push({
|
|
||||||
text: item.component.outline,
|
|
||||||
value: item.id
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (!this.editItem.workflowConfig) return;
|
|
||||||
for (const config of this.editItem.workflowConfig.nodeList) {
|
|
||||||
if (!config.formId) return;
|
|
||||||
const formId = []
|
|
||||||
for(const item of config.formId) {
|
|
||||||
if (!this.constantCollection.workflowFormList.find(e => e.value === item)) {
|
|
||||||
formId.push(item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
config.formId = formId
|
|
||||||
console.log(config.outline, config.formId)
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
await this.doUiAction('refreshTableData');
|
await this.doUiAction('refreshTableData');
|
||||||
this.getUserList();
|
|
||||||
this.getGroupList();
|
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
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,
|
|
||||||
}
|
|
||||||
if (this.editItem.id) {
|
|
||||||
item.id = this.editItem.id;
|
|
||||||
}
|
|
||||||
return item;
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* 获取表格数据
|
* 获取表格数据
|
||||||
*/
|
*/
|
||||||
async refreshTableData() {
|
async refreshTableData() {
|
||||||
this.isTableLoading = true;
|
this.isTableLoading = true;
|
||||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
const serverSearchInput = _.pickBy(this.serverSearchInput, value => !!value);
|
||||||
const { data: { appData: { rows } } } = await window.jianghuAxios({
|
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||||
data: {
|
data: {
|
||||||
appData: {
|
appData: {
|
||||||
pageId: 'workflowManagement',
|
pageId: 'workflowManagement',
|
||||||
@@ -253,7 +120,7 @@ new Vue({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
for(const item of rows) {
|
for (const item of rows) {
|
||||||
item.workflowConfig = item.workflowConfig ? JSON.parse(item.workflowConfig) : null;
|
item.workflowConfig = item.workflowConfig ? JSON.parse(item.workflowConfig) : null;
|
||||||
item.workflowForm = item.workflowForm ? JSON.parse(item.workflowForm) : [];
|
item.workflowForm = item.workflowForm ? JSON.parse(item.workflowForm) : [];
|
||||||
}
|
}
|
||||||
@@ -261,127 +128,17 @@ new Vue({
|
|||||||
this.isTableLoading = false;
|
this.isTableLoading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取表格数据
|
|
||||||
*/
|
|
||||||
async getUserList() {
|
|
||||||
const { data: { appData: { rows } } } = await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'workflowManagement',
|
|
||||||
actionId: 'selectUserList',
|
|
||||||
actionData: {},
|
|
||||||
where: {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.constantCollection.userList = rows.map(e => {
|
|
||||||
return {text: e.username, value: e.userId}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取表格数据
|
|
||||||
*/
|
|
||||||
async getGroupList() {
|
|
||||||
const { data: { appData: { rows } } } = await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'workflowManagement',
|
|
||||||
actionId: 'selectGroupList',
|
|
||||||
actionData: {},
|
|
||||||
where: {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.constantCollection.groupList = rows.map(e => {
|
|
||||||
return {text: e.groupName, value: e.groupId}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// startCreateItem
|
// startCreateItem
|
||||||
async clearItemData() {
|
async clearItemData() {
|
||||||
this.editItem = { workflowForm: [], workflowConfig: {lineList: [], nodeList:[]} };
|
window.location.href = `/${window.appInfo.appId}/page/workflowEditor?type=add`;
|
||||||
},
|
|
||||||
|
|
||||||
async openCreateItemDialog() {
|
|
||||||
this.currentClickButton = {action: 'add', title: '新增'};
|
|
||||||
// this.isEditDrawerShow = true;
|
|
||||||
this.dialog = true;
|
|
||||||
this.dialogSaveInfoAction = 'createItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// createItem
|
|
||||||
async confirmCreateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '新增', content: '确定新增吗?'})
|
|
||||||
},
|
|
||||||
validate() {
|
|
||||||
if (!this.editItem.workflowId || !this.editItem.workflowId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 新增数据
|
|
||||||
*/
|
|
||||||
async doCreateItem() {
|
|
||||||
delete this.computedEditItem.id;
|
|
||||||
const item = this.buildEditItem();
|
|
||||||
await window.vtoast.loading("新增数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'workflowManagement',
|
|
||||||
actionId: 'insertItem',
|
|
||||||
actionData: item
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("新增数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
async closeDrawerShow() {
|
|
||||||
// this.isEditDrawerShow = false;
|
|
||||||
this.dialog = false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// startUpdateItem
|
// startUpdateItem
|
||||||
async prepareItemData({item}) {
|
async prepareItemData({item}) {
|
||||||
this.editItem = item;
|
sessionStorage.setItem('workflowEditItem', JSON.stringify(item))
|
||||||
|
window.location.href = `/${window.appInfo.appId}/page/workflowEditor?type=edit`;
|
||||||
},
|
},
|
||||||
|
|
||||||
async openUpdateDialog() {
|
|
||||||
this.currentClickButton = {action: 'edit', title: '修改'};
|
|
||||||
// this.isEditDrawerShow = true;
|
|
||||||
this.dialog = true;
|
|
||||||
this.dialogSaveInfoAction = 'updateItem';
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmUpdateItemDialog() {
|
|
||||||
return window.confirmDialog({title: '修改', content: '确定修改吗?'});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存数据
|
|
||||||
*/
|
|
||||||
async doUpdateItem() {
|
|
||||||
const {id, ...item} = this.buildEditItem();
|
|
||||||
await window.vtoast.loading("修改数据");
|
|
||||||
await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'workflowManagement',
|
|
||||||
actionId: 'updateItem',
|
|
||||||
actionData: item,
|
|
||||||
where: {id: id}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
await window.vtoast.success("修改数据成功");
|
|
||||||
},
|
|
||||||
|
|
||||||
// updateItem
|
|
||||||
async confirmDeleteItemDialog() {
|
async confirmDeleteItemDialog() {
|
||||||
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
||||||
},
|
},
|
||||||
@@ -390,7 +147,7 @@ new Vue({
|
|||||||
* 删除数据
|
* 删除数据
|
||||||
*/
|
*/
|
||||||
async doDeleteItem({item}) {
|
async doDeleteItem({item}) {
|
||||||
const { id } = item;
|
const {id} = item;
|
||||||
await window.vtoast.loading("删除数据");
|
await window.vtoast.loading("删除数据");
|
||||||
await window.jianghuAxios({
|
await window.jianghuAxios({
|
||||||
data: {
|
data: {
|
||||||
@@ -398,29 +155,22 @@ new Vue({
|
|||||||
pageId: 'workflowManagement',
|
pageId: 'workflowManagement',
|
||||||
actionId: 'deleteItem',
|
actionId: 'deleteItem',
|
||||||
actionData: {},
|
actionData: {},
|
||||||
where: { id: id }
|
where: {id: id}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await window.vtoast.success("删除数据成功");
|
await window.vtoast.success("删除数据成功");
|
||||||
},
|
},
|
||||||
getConstantCollectionItemText(key, _value) {
|
|
||||||
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
|
|
||||||
if(constantCollectionItemFind) {
|
|
||||||
return constantCollectionItemFind.text;
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.v-dialog--fullscreen .v-sheet {
|
.v-dialog--fullscreen .v-sheet {
|
||||||
height: unset;
|
height: unset;
|
||||||
top: unset;
|
top: unset;
|
||||||
position: unset;
|
position: unset;
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Generated
+214
-71
@@ -9,7 +9,8 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jianghujs/jianghu": "3.0.7",
|
"@jianghujs/jianghu": "3.0.16",
|
||||||
|
"dayjs": "^1.11.4",
|
||||||
"egg": "^2.15.1",
|
"egg": "^2.15.1",
|
||||||
"egg-scripts": "^2.11.0"
|
"egg-scripts": "^2.11.0"
|
||||||
},
|
},
|
||||||
@@ -683,9 +684,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jianghujs/jianghu": {
|
"node_modules/@jianghujs/jianghu": {
|
||||||
"version": "3.0.7",
|
"version": "3.0.16",
|
||||||
"resolved": "https://registry.npmjs.org/@jianghujs/jianghu/-/jianghu-3.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/@jianghujs/jianghu/-/jianghu-3.0.16.tgz",
|
||||||
"integrity": "sha512-CWUMuPDCHWId7i8r0hFEHOfuRFqftvnYIEavwMpJ0IHq/HAkuKCAx+7jvzDUT0TNQIaKWp5WkdcdyJ84dVjuJw==",
|
"integrity": "sha512-dAKYQJkzUKyng3LZ32TZhX8yhBHN9PX9IVfPdrdZftCAiaorJOEbyiUBQLeEffB9d0/6qOE5IGcuPiCOAnbWtw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@socket.io/redis-adapter": "^7.1.0",
|
"@socket.io/redis-adapter": "^7.1.0",
|
||||||
"ajv": "^8.7.1",
|
"ajv": "^8.7.1",
|
||||||
@@ -695,7 +696,6 @@
|
|||||||
"dayjs": "^1.10.5",
|
"dayjs": "^1.10.5",
|
||||||
"egg": "^2.15.1",
|
"egg": "^2.15.1",
|
||||||
"egg-cors": "^2.2.3",
|
"egg-cors": "^2.2.3",
|
||||||
"egg-etag": "^1.2.0",
|
|
||||||
"egg-knex": "^3.0.1",
|
"egg-knex": "^3.0.1",
|
||||||
"egg-scripts": "^2.11.0",
|
"egg-scripts": "^2.11.0",
|
||||||
"egg-static": "^2.2.0",
|
"egg-static": "^2.2.0",
|
||||||
@@ -706,6 +706,7 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"md5-node": "^1.0.1",
|
"md5-node": "^1.0.1",
|
||||||
"mime": "3.0.0",
|
"mime": "3.0.0",
|
||||||
|
"mysql2": "^2.3.3",
|
||||||
"nanoid": "3.3.1",
|
"nanoid": "3.3.1",
|
||||||
"node-rsa": "^1.1.1",
|
"node-rsa": "^1.1.1",
|
||||||
"socket.io": "4.4.1",
|
"socket.io": "4.4.1",
|
||||||
@@ -5297,18 +5298,6 @@
|
|||||||
"node": ">=8.9.0"
|
"node": ">=8.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/egg-etag": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/egg-etag/-/egg-etag-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-c0CsMXGb9G5wl00/UsQJiduhBZ47SRifUtZNSuX+y8WZG6qqA+47rQX6hj/Z6C27AyfXTBbQuSPsa2yepet4MA==",
|
|
||||||
"dependencies": {
|
|
||||||
"koa-conditional-get": "^1.0.3",
|
|
||||||
"koa-etag": "^2.1.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/egg-i18n": {
|
"node_modules/egg-i18n": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/egg-i18n/-/egg-i18n-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/egg-i18n/-/egg-i18n-2.1.1.tgz",
|
||||||
@@ -7732,14 +7721,6 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/etag": {
|
|
||||||
"version": "1.8.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
|
||||||
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/event-emitter": {
|
"node_modules/event-emitter": {
|
||||||
"version": "0.3.5",
|
"version": "0.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
||||||
@@ -8514,6 +8495,14 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/generate-function": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"is-property": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/geoip-lite": {
|
"node_modules/geoip-lite": {
|
||||||
"version": "1.4.5",
|
"version": "1.4.5",
|
||||||
"resolved": "https://registry.npmjs.org/geoip-lite/-/geoip-lite-1.4.5.tgz",
|
"resolved": "https://registry.npmjs.org/geoip-lite/-/geoip-lite-1.4.5.tgz",
|
||||||
@@ -9747,6 +9736,11 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-property": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
|
||||||
|
},
|
||||||
"node_modules/is-regex": {
|
"node_modules/is-regex": {
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
|
||||||
@@ -10390,11 +10384,6 @@
|
|||||||
"any-promise": "^1.1.0"
|
"any-promise": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/koa-conditional-get": {
|
|
||||||
"version": "1.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/koa-conditional-get/-/koa-conditional-get-1.0.4.tgz",
|
|
||||||
"integrity": "sha512-4Z7oV/t4j7IWO4pZssi43S7qsxkjFQJQDcxGwSTXK9hx3wX/Ur+YO32L4YdeAboCnCoT0Tk3Iy3scEgLsh55Dw=="
|
|
||||||
},
|
|
||||||
"node_modules/koa-convert": {
|
"node_modules/koa-convert": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz",
|
||||||
@@ -10407,15 +10396,6 @@
|
|||||||
"node": ">= 4"
|
"node": ">= 4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/koa-etag": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/koa-etag/-/koa-etag-2.1.2.tgz",
|
|
||||||
"integrity": "sha512-OMzk5OlvqRlp9id28i6Ru5z+UWy7Tpkqg/zjHk0l+vse2c25z5lqLyzmXaaGYpKCi/5suQTqksf51oMYPPq1CA==",
|
|
||||||
"dependencies": {
|
|
||||||
"etag": "^1.3.0",
|
|
||||||
"mz": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/koa-is-json": {
|
"node_modules/koa-is-json": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz",
|
||||||
@@ -11341,6 +11321,67 @@
|
|||||||
"safe-buffer": "~5.1.0"
|
"safe-buffer": "~5.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/mysql2": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
|
||||||
|
"dependencies": {
|
||||||
|
"denque": "^2.0.1",
|
||||||
|
"generate-function": "^2.3.1",
|
||||||
|
"iconv-lite": "^0.6.3",
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"lru-cache": "^6.0.0",
|
||||||
|
"named-placeholders": "^1.1.2",
|
||||||
|
"seq-queue": "^0.0.5",
|
||||||
|
"sqlstring": "^2.3.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mysql2/node_modules/denque": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mysql2/node_modules/iconv-lite": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||||
|
"dependencies": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mysql2/node_modules/lru-cache": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||||
|
"dependencies": {
|
||||||
|
"yallist": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mysql2/node_modules/sqlstring": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mysql2/node_modules/yallist": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||||
|
},
|
||||||
"node_modules/mz": {
|
"node_modules/mz": {
|
||||||
"version": "2.7.0",
|
"version": "2.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||||
@@ -11377,6 +11418,31 @@
|
|||||||
"rimraf": "bin.js"
|
"rimraf": "bin.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/named-placeholders": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
|
||||||
|
"dependencies": {
|
||||||
|
"lru-cache": "^4.1.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/named-placeholders/node_modules/lru-cache": {
|
||||||
|
"version": "4.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
|
||||||
|
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
|
||||||
|
"dependencies": {
|
||||||
|
"pseudomap": "^1.0.2",
|
||||||
|
"yallist": "^2.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/named-placeholders/node_modules/yallist": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A=="
|
||||||
|
},
|
||||||
"node_modules/nanoid": {
|
"node_modules/nanoid": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
|
||||||
@@ -13924,6 +13990,11 @@
|
|||||||
"node": ">= 0.10"
|
"node": ">= 0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/pseudomap": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ=="
|
||||||
|
},
|
||||||
"node_modules/pump": {
|
"node_modules/pump": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||||
@@ -14696,6 +14767,11 @@
|
|||||||
"upper-case-first": "^1.1.2"
|
"upper-case-first": "^1.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/seq-queue": {
|
||||||
|
"version": "0.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
|
||||||
|
"integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
|
||||||
|
},
|
||||||
"node_modules/serialize-json": {
|
"node_modules/serialize-json": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/serialize-json/-/serialize-json-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/serialize-json/-/serialize-json-1.0.3.tgz",
|
||||||
@@ -17936,9 +18012,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jianghujs/jianghu": {
|
"@jianghujs/jianghu": {
|
||||||
"version": "3.0.7",
|
"version": "3.0.16",
|
||||||
"resolved": "https://registry.npmjs.org/@jianghujs/jianghu/-/jianghu-3.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/@jianghujs/jianghu/-/jianghu-3.0.16.tgz",
|
||||||
"integrity": "sha512-CWUMuPDCHWId7i8r0hFEHOfuRFqftvnYIEavwMpJ0IHq/HAkuKCAx+7jvzDUT0TNQIaKWp5WkdcdyJ84dVjuJw==",
|
"integrity": "sha512-dAKYQJkzUKyng3LZ32TZhX8yhBHN9PX9IVfPdrdZftCAiaorJOEbyiUBQLeEffB9d0/6qOE5IGcuPiCOAnbWtw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@socket.io/redis-adapter": "^7.1.0",
|
"@socket.io/redis-adapter": "^7.1.0",
|
||||||
"ajv": "^8.7.1",
|
"ajv": "^8.7.1",
|
||||||
@@ -17948,7 +18024,6 @@
|
|||||||
"dayjs": "^1.10.5",
|
"dayjs": "^1.10.5",
|
||||||
"egg": "^2.15.1",
|
"egg": "^2.15.1",
|
||||||
"egg-cors": "^2.2.3",
|
"egg-cors": "^2.2.3",
|
||||||
"egg-etag": "^1.2.0",
|
|
||||||
"egg-knex": "^3.0.1",
|
"egg-knex": "^3.0.1",
|
||||||
"egg-scripts": "^2.11.0",
|
"egg-scripts": "^2.11.0",
|
||||||
"egg-static": "^2.2.0",
|
"egg-static": "^2.2.0",
|
||||||
@@ -17959,6 +18034,7 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"md5-node": "^1.0.1",
|
"md5-node": "^1.0.1",
|
||||||
"mime": "3.0.0",
|
"mime": "3.0.0",
|
||||||
|
"mysql2": "^2.3.3",
|
||||||
"nanoid": "3.3.1",
|
"nanoid": "3.3.1",
|
||||||
"node-rsa": "^1.1.1",
|
"node-rsa": "^1.1.1",
|
||||||
"socket.io": "4.4.1",
|
"socket.io": "4.4.1",
|
||||||
@@ -21843,15 +21919,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/egg-errors/-/egg-errors-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/egg-errors/-/egg-errors-2.3.1.tgz",
|
||||||
"integrity": "sha512-ylDrMfqlWvncN/cDPgR9IoxZbVTrnNAQokm9e5QAglECKl2iNvQkpTItQQFAr8rhEcq2v78S41Zx0c7cyXdWvg=="
|
"integrity": "sha512-ylDrMfqlWvncN/cDPgR9IoxZbVTrnNAQokm9e5QAglECKl2iNvQkpTItQQFAr8rhEcq2v78S41Zx0c7cyXdWvg=="
|
||||||
},
|
},
|
||||||
"egg-etag": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/egg-etag/-/egg-etag-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-c0CsMXGb9G5wl00/UsQJiduhBZ47SRifUtZNSuX+y8WZG6qqA+47rQX6hj/Z6C27AyfXTBbQuSPsa2yepet4MA==",
|
|
||||||
"requires": {
|
|
||||||
"koa-conditional-get": "^1.0.3",
|
|
||||||
"koa-etag": "^2.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"egg-i18n": {
|
"egg-i18n": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/egg-i18n/-/egg-i18n-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/egg-i18n/-/egg-i18n-2.1.1.tgz",
|
||||||
@@ -23740,11 +23807,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
|
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
|
||||||
},
|
},
|
||||||
"etag": {
|
|
||||||
"version": "1.8.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
|
||||||
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
|
|
||||||
},
|
|
||||||
"event-emitter": {
|
"event-emitter": {
|
||||||
"version": "0.3.5",
|
"version": "0.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
||||||
@@ -24358,6 +24420,14 @@
|
|||||||
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
|
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"generate-function": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
|
||||||
|
"requires": {
|
||||||
|
"is-property": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"geoip-lite": {
|
"geoip-lite": {
|
||||||
"version": "1.4.5",
|
"version": "1.4.5",
|
||||||
"resolved": "https://registry.npmjs.org/geoip-lite/-/geoip-lite-1.4.5.tgz",
|
"resolved": "https://registry.npmjs.org/geoip-lite/-/geoip-lite-1.4.5.tgz",
|
||||||
@@ -25267,6 +25337,11 @@
|
|||||||
"isobject": "^3.0.1"
|
"isobject": "^3.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"is-property": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
|
||||||
|
},
|
||||||
"is-regex": {
|
"is-regex": {
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
|
||||||
@@ -25771,11 +25846,6 @@
|
|||||||
"any-promise": "^1.1.0"
|
"any-promise": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"koa-conditional-get": {
|
|
||||||
"version": "1.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/koa-conditional-get/-/koa-conditional-get-1.0.4.tgz",
|
|
||||||
"integrity": "sha512-4Z7oV/t4j7IWO4pZssi43S7qsxkjFQJQDcxGwSTXK9hx3wX/Ur+YO32L4YdeAboCnCoT0Tk3Iy3scEgLsh55Dw=="
|
|
||||||
},
|
|
||||||
"koa-convert": {
|
"koa-convert": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz",
|
||||||
@@ -25785,15 +25855,6 @@
|
|||||||
"koa-compose": "^3.0.0"
|
"koa-compose": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"koa-etag": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/koa-etag/-/koa-etag-2.1.2.tgz",
|
|
||||||
"integrity": "sha512-OMzk5OlvqRlp9id28i6Ru5z+UWy7Tpkqg/zjHk0l+vse2c25z5lqLyzmXaaGYpKCi/5suQTqksf51oMYPPq1CA==",
|
|
||||||
"requires": {
|
|
||||||
"etag": "^1.3.0",
|
|
||||||
"mz": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"koa-is-json": {
|
"koa-is-json": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz",
|
||||||
@@ -26538,6 +26599,54 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mysql2": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
|
||||||
|
"requires": {
|
||||||
|
"denque": "^2.0.1",
|
||||||
|
"generate-function": "^2.3.1",
|
||||||
|
"iconv-lite": "^0.6.3",
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"lru-cache": "^6.0.0",
|
||||||
|
"named-placeholders": "^1.1.2",
|
||||||
|
"seq-queue": "^0.0.5",
|
||||||
|
"sqlstring": "^2.3.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"denque": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="
|
||||||
|
},
|
||||||
|
"iconv-lite": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||||
|
"requires": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lru-cache": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||||
|
"requires": {
|
||||||
|
"yallist": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sqlstring": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg=="
|
||||||
|
},
|
||||||
|
"yallist": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"mz": {
|
"mz": {
|
||||||
"version": "2.7.0",
|
"version": "2.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||||
@@ -26570,6 +26679,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"named-placeholders": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
|
||||||
|
"requires": {
|
||||||
|
"lru-cache": "^4.1.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"lru-cache": {
|
||||||
|
"version": "4.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
|
||||||
|
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
|
||||||
|
"requires": {
|
||||||
|
"pseudomap": "^1.0.2",
|
||||||
|
"yallist": "^2.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"yallist": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
|
||||||
@@ -28474,6 +28607,11 @@
|
|||||||
"event-stream": "=3.3.4"
|
"event-stream": "=3.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pseudomap": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ=="
|
||||||
|
},
|
||||||
"pump": {
|
"pump": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||||
@@ -29077,6 +29215,11 @@
|
|||||||
"upper-case-first": "^1.1.2"
|
"upper-case-first": "^1.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"seq-queue": {
|
||||||
|
"version": "0.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
|
||||||
|
"integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
|
||||||
|
},
|
||||||
"serialize-json": {
|
"serialize-json": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/serialize-json/-/serialize-json-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/serialize-json/-/serialize-json-1.0.3.tgz",
|
||||||
|
|||||||
+2
-1
@@ -8,8 +8,9 @@
|
|||||||
"framework": "@jianghujs/jianghu"
|
"framework": "@jianghujs/jianghu"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@jianghujs/jianghu": "3.0.16",
|
||||||
|
"dayjs": "^1.11.4",
|
||||||
"egg": "^2.15.1",
|
"egg": "^2.15.1",
|
||||||
"@jianghujs/jianghu": "3.0.7",
|
|
||||||
"egg-scripts": "^2.11.0"
|
"egg-scripts": "^2.11.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
Reference in new issue
Block a user