新版UI适配
This commit is contained in:
1 parent
55dfcee93e
commit
73d6daacc7
17 files changed
+890
-1339
No files matched your search
@@ -13,15 +13,18 @@
|
||||
</el-form> -->
|
||||
|
||||
<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-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined label="GUID" v-model="flowData.Id"></v-text-field>
|
||||
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">GUID</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="GUID" v-model="flowData.Id"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined label="流程名称" v-model="flowData.Name"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">流程名称</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="流程名称" v-model="flowData.Name"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="flowData.Remark"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">备注</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="备注" v-model="flowData.Remark"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-form>
|
||||
@@ -38,6 +41,11 @@
|
||||
isFormValid: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 600;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.flowData = data;
|
||||
|
||||
@@ -18,34 +18,42 @@
|
||||
</el-form> -->
|
||||
|
||||
<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-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined label="GUID" v-model="line.id"></v-text-field>
|
||||
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">GUID</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="GUID" v-model="line.id"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined disabled label="源活动" v-model="line.from"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<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 cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined disabled label="目标活动" v-model="line.to"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<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 cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined label="名称" v-model="line.label"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">名称</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="名称" v-model="line.label"></v-text-field>
|
||||
</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
|
||||
:items="lineTypeList"
|
||||
dense outlined
|
||||
dense filled single-line
|
||||
class="cus-v-input mr-2"
|
||||
label="操作类型"
|
||||
outlined
|
||||
color="success"
|
||||
item-color="success"
|
||||
v-model="line.type"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined label="任务Resource" v-model="line.hook"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">任务Resource</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="任务Resource" v-model="line.hook"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input mr-2" dense outlined label="备注说明" v-model="line.Remark"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">备注说明</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="备注说明" v-model="line.Remark"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-form>
|
||||
@@ -74,6 +82,11 @@
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 600;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init(item, lineTypeList) {
|
||||
this.isUpdate = false;
|
||||
|
||||
@@ -19,34 +19,42 @@
|
||||
</el-form> -->
|
||||
|
||||
<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-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input" dense outlined label="GUID" v-model="node.id"></v-text-field>
|
||||
<v-row class="px-2" :class="{'pb-7': isMobile}">
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<span class="inputLabel">GUID</span>
|
||||
<v-text-field class="cus-v-input" dense filled single-line label="GUID" v-model="node.id"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input" dense outlined label="名称" v-model="node.label"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<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 cols="12" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field class="cus-v-input" dense outlined label="备注说明" v-model="node.Remark"></v-text-field>
|
||||
<v-col cols="12" class=" pb-3">
|
||||
<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 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
|
||||
:items="assignTypeList"
|
||||
dense outlined
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
color="success"
|
||||
item-color="success"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
label="指派类型"
|
||||
outlined
|
||||
v-model="node.assignType"
|
||||
></v-select>
|
||||
</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
|
||||
:items="optionList"
|
||||
dense outlined
|
||||
color="success"
|
||||
item-color="success"
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
@@ -56,22 +64,26 @@
|
||||
:disabled="!node.assignType"
|
||||
></v-select>
|
||||
</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
|
||||
outlined
|
||||
filled single-line
|
||||
name="input-7-4"
|
||||
label="允许的操作"
|
||||
value=""
|
||||
rows="3"
|
||||
hide-details
|
||||
></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 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
|
||||
:items="tpl"
|
||||
dense outlined
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
color="success"
|
||||
item-color="success"
|
||||
item-value="value"
|
||||
class="cus-v-input"
|
||||
label="可写模板"
|
||||
@@ -79,12 +91,15 @@
|
||||
v-model="node.formId"
|
||||
></v-select>
|
||||
</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
|
||||
:items="tpl"
|
||||
dense outlined
|
||||
dense filled single-line
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
color="success"
|
||||
item-color="success"
|
||||
class="cus-v-input"
|
||||
label="隐藏模板"
|
||||
multiple
|
||||
@@ -134,8 +149,10 @@
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
created() {},
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 600;
|
||||
},
|
||||
showTask() {
|
||||
return ['userTask', 'receiveTask'].includes(this.node.type);
|
||||
},
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 600;
|
||||
},
|
||||
// 节点容器样式
|
||||
flowNodeContainer: {
|
||||
get() {
|
||||
|
||||
@@ -1,35 +1,52 @@
|
||||
<template id="process-flow">
|
||||
<div class="process-flow-container">
|
||||
<div class="flow-menu">
|
||||
<div class="menu-item" v-for="item in menuList" draggable="true" @dragstart="drag(item)">
|
||||
<v-card class="flow-menu pa-4 mr-4" color="#f5f8fa" width="140px">
|
||||
<div block color="white" class="menu-item mb-3" v-for="item in menuList" draggable="true" @dragstart="drag(item)">
|
||||
<i :class="item.icon"></i>
|
||||
<div>{{item.name}}</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="menu-item" @click="isConnect=true">
|
||||
<v-divider></v-divider>
|
||||
<v-btn block class="menu-item mt-3" :color="isConnect ? 'success' : 'white'" @click="isConnect=true">
|
||||
<i class="el-icon-bottom-right"></i>
|
||||
<div>连线</div>
|
||||
</div>
|
||||
<div class="menu-item" @click="isConnect=false">
|
||||
</v-btn>
|
||||
<v-btn block class="menu-item" :color="!isConnect ? 'success' : 'white'" @click="isConnect=false">
|
||||
<i class="el-icon-rank"></i>
|
||||
<div>选择</div>
|
||||
</div>
|
||||
</v-btn>
|
||||
|
||||
</div>
|
||||
<div class="flow-detail">
|
||||
</v-card>
|
||||
<v-card class="flow-detail pa-4 mr-4" color="#f5f8fa">
|
||||
<div id="flowContent" ref="flowContent" @drop="drop($event)" @dragover="allowDrop($event)" @click="editFlow()"
|
||||
@dblclick="isConnect=false">
|
||||
<flow-node v-for="node in data.nodeList" :key="node.id" :node="node" :id="node.id" :isconnect="isConnect"
|
||||
@delete-node="deleteNode" @change-node-site="changeNodeSite" @edit-node="editNode">
|
||||
</flow-node>
|
||||
</div>
|
||||
</v-card>
|
||||
<v-card class="flow-edit pa-4" v-if="editType" color="#f5f8fa">
|
||||
<template v-if="editType=='node' || editType=='line'">
|
||||
<div class="mb-3">
|
||||
<v-icon>mdi-application-edit-outline</v-icon>
|
||||
<span style="transform: translateY(2px); display: inline-block; ">{{editType=='node' ? '节点' : '连线'}}属性</span>
|
||||
</div>
|
||||
<div class="flow-edit" v-if="editType">
|
||||
<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>
|
||||
</template>
|
||||
@@ -591,10 +608,7 @@
|
||||
|
||||
.flow-menu {
|
||||
width: 100px;
|
||||
padding: 10px;
|
||||
margin: 0 10px;
|
||||
border: 1px solid #EBEEF5;
|
||||
padding: 12px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
word-break: break-all;
|
||||
border-radius: 4px;
|
||||
@@ -602,14 +616,17 @@
|
||||
|
||||
.menu-item {
|
||||
text-align: center;
|
||||
box-shadow: 0 0 4px #696969;
|
||||
margin-bottom: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
background: #FFFFFF;
|
||||
padding: 5px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.menu-item:hover {
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.menu-item>i {
|
||||
font-size: 30px;
|
||||
@@ -626,14 +643,11 @@
|
||||
|
||||
.flow-edit-content {
|
||||
min-height: 100%;
|
||||
background: #FFF;
|
||||
color: #606266;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
font-size: 14px;
|
||||
border: 1px solid #EBEEF5;
|
||||
padding: 12px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
word-break: break-all;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template id="form-item-list-generator">
|
||||
<div class="d-flex form-item-list-generator-content">
|
||||
<div class="componentList">
|
||||
<div class="left-component-item-title">
|
||||
<v-card :class="{'d-flex': !isMobile, 'form-item-list-generator-content': !isMobile}">
|
||||
<v-card color="#f5f8fa" :style="{'width': isMobile ? '100%' : '300px'}"
|
||||
: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>
|
||||
组件
|
||||
<span style="transform: translateY(2px); display: inline-block;">组件</span>
|
||||
</div>
|
||||
<draggable
|
||||
:group="{ name: 'componentGroup', pull: 'clone', put: false }"
|
||||
@@ -20,14 +21,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</draggable>
|
||||
</div>
|
||||
</v-card>
|
||||
|
||||
<v-card class="formItemList">
|
||||
<v-toolbar dense flat>
|
||||
<v-btn icon @click.stop="emptyCanva" class="ml-2">
|
||||
<v-icon color="grey lighten-1" dark>mdi-delete-empty</v-icon>
|
||||
<v-card class="formItemList py-10 pl-4 pr-4" color="#f5f8fa" style="position: relative;">
|
||||
<v-btn small color="error" @click.stop="emptyCanva" class="mr-2 mt-2"
|
||||
style="position: absolute; right: 8px; top: 0;">
|
||||
<span>重置</span>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
<draggable
|
||||
v-if="formItemList.length > 0"
|
||||
:list="formItemList"
|
||||
@@ -37,7 +37,7 @@
|
||||
<v-card
|
||||
@click.native="formItemSelect(formItem.id)"
|
||||
: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"
|
||||
dense>
|
||||
<v-list-item>
|
||||
@@ -50,18 +50,24 @@
|
||||
</v-list-item-content>
|
||||
|
||||
<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 }}. {{
|
||||
formItem.component.outline
|
||||
}}
|
||||
</v-list-item-title>
|
||||
<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>
|
||||
<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-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"
|
||||
:label="(index+1) + '. ' + formItem.component.outline"/>
|
||||
</v-list-item-content>
|
||||
|
||||
<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"
|
||||
:disabled="true"></v-text-field>
|
||||
</v-list-item-content>
|
||||
|
||||
<v-list-item-action v-if="selectedFormItemId === formItem.id" class="justify-start">
|
||||
@@ -76,46 +82,53 @@
|
||||
</v-card>
|
||||
</v-hover>
|
||||
</draggable>
|
||||
<v-row v-else align="center" justify="center" style="width: 100%;">
|
||||
<v-card height="100" class="ma-12" width="100%">
|
||||
<draggable :list="[]" :animation="300" group="componentGroup">
|
||||
<v-card-text class="text-center title">
|
||||
<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%" color="#f5f8fa" style="border: 1px dashed #333333">
|
||||
<draggable :list="[]" :animation="300" group="componentGroup" style="position: relative; height: 100%;">
|
||||
<v-card-text class="text-center title draggable-placeholder">
|
||||
从左侧拖入或点选组件进行表单设计
|
||||
</v-card-text>
|
||||
</draggable>
|
||||
</v-card>
|
||||
</v-row>
|
||||
</v-row>
|
||||
</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">
|
||||
<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 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-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;">
|
||||
<v-subheader>选项列表</v-subheader>
|
||||
<v-btn icon @click.stop="propertyAddOption(formItemList[selectCanvaIndex].component.property.selectOptionList.length)">
|
||||
<v-subheader class="pa-0">选项列表</v-subheader>
|
||||
<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-btn>
|
||||
</div>
|
||||
<v-list dense>
|
||||
<v-list-item v-for="(option, index) in formItemList[selectCanvaIndex].component.property.selectOptionList" :key="index">
|
||||
<v-list class="propertyList" dense style="max-height: 300px; overflow-y: auto;">
|
||||
<v-list-item
|
||||
class="pa-0"
|
||||
v-for="(option, index) in formItemList[selectCanvaIndex].component.property.selectOptionList"
|
||||
:key="index">
|
||||
<v-list-item-content>
|
||||
<v-text-field
|
||||
v-model="option.value"
|
||||
label="选项"
|
||||
outlined
|
||||
prefix="选项:"
|
||||
color="success"
|
||||
filled single-line
|
||||
dense
|
||||
hide-details
|
||||
clearable
|
||||
placeholder="请输入选项"/>
|
||||
</v-list-item-content>
|
||||
<v-list-item-action>
|
||||
<v-list-item-action class="ml-2">
|
||||
<v-btn icon @click.stop="propertyDeleteOption(index)">
|
||||
<v-icon color="grey lighten-1" dark>mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
@@ -125,17 +138,17 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
<v-card 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-card class="mt-5" flat v-if="formItemList[selectCanvaIndex].component.type === 'textarea'">
|
||||
<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 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-card class="mt-5" flat v-if="formItemList[selectCanvaIndex].component.type === 'input'">
|
||||
<v-text-field class="cus-v-input black" dense filled single-line label="单行文本"
|
||||
v-model="formItemList[selectCanvaIndex].component.outline"></v-text-field>
|
||||
</v-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</v-card>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script src="//cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>
|
||||
@@ -159,8 +172,20 @@
|
||||
componentList: [
|
||||
{title: '单行文本', type: 'input', outline: '单行文本', property: {}, icon: 'mdi-form-textarea'},
|
||||
{title: '多行文本', type: 'textarea', outline: '多行文本', property: {}, icon: 'mdi-form-textarea'},
|
||||
{ title: '单选', type: 'singleSelect', outline: '单选', property: { selectOptionList: [] }, icon: 'mdi-checkbox-marked-circle' },
|
||||
{ title: '多选', type: 'multipleSelect', outline: '多选', property: { selectOptionList: [] }, icon: 'mdi-checkbox-marked' },
|
||||
{
|
||||
title: '单选',
|
||||
type: 'singleSelect',
|
||||
outline: '单选',
|
||||
property: {selectOptionList: []},
|
||||
icon: 'mdi-checkbox-marked-circle'
|
||||
},
|
||||
{
|
||||
title: '多选',
|
||||
type: 'multipleSelect',
|
||||
outline: '多选',
|
||||
property: {selectOptionList: []},
|
||||
icon: 'mdi-checkbox-marked'
|
||||
},
|
||||
],
|
||||
tempComponent: null,
|
||||
|
||||
@@ -183,13 +208,17 @@
|
||||
const index = this.formItemList.findIndex(item => item.id === this.selectedFormItemId);
|
||||
return index;
|
||||
},
|
||||
isMobile() {
|
||||
return window.innerWidth < 600;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
destroyed() {},
|
||||
watch: {
|
||||
destroyed() {
|
||||
},
|
||||
watch: {},
|
||||
async created() {
|
||||
},
|
||||
async created() {},
|
||||
methods: {
|
||||
cloneComponent(component) {
|
||||
this.tempComponent = component;
|
||||
@@ -241,7 +270,11 @@
|
||||
},
|
||||
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?"_":"-"};
|
||||
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() {
|
||||
@@ -265,31 +298,36 @@
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.left-component-item {
|
||||
width: 100%;
|
||||
margin: 1%;
|
||||
margin: 8px 0;
|
||||
transition: transform 0ms !important;
|
||||
}
|
||||
|
||||
.left-component-item-title {
|
||||
font-size: 14px;
|
||||
color: #222;
|
||||
margin: 6px 2px;
|
||||
}
|
||||
|
||||
.left-component-item-body {
|
||||
padding: 8px 10px;
|
||||
background: #e0e0e0;
|
||||
background: #ffffff;
|
||||
font-size: 12px;
|
||||
cursor: move;
|
||||
border: 1px dashed #e0e0e0;
|
||||
border: 1px dashed #ffffff;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.left-component-item-body:hover {
|
||||
border: 1px dashed #1565c0;
|
||||
background: #e3f2fd;
|
||||
color: #1565c0;
|
||||
border: 1px dashed #4caf50;
|
||||
background: #e6fde3;
|
||||
color: #4caf50;
|
||||
}
|
||||
|
||||
.left-component-item-body:hover .v-icon {
|
||||
color: #1565c0;
|
||||
color: #4caf50;
|
||||
}
|
||||
|
||||
.formItemList {
|
||||
@@ -297,14 +335,13 @@
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
background-color: #e0e0e0 !important;
|
||||
border-radius: 0 !important;
|
||||
border: 1px dashed #999 !important;
|
||||
}
|
||||
|
||||
.formItemList .formItem-selected {
|
||||
border: 1px dashed #1565c0 !important;
|
||||
background: #e3f2fd;
|
||||
border: 1px dashed #4caf50 !important;
|
||||
background: #e6fde3;
|
||||
}
|
||||
|
||||
.formItem-title {
|
||||
white-space: normal;
|
||||
}
|
||||
@@ -315,6 +352,7 @@
|
||||
max-height: calc(100vh - 105px);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.property .property-title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@@ -332,4 +370,45 @@
|
||||
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>
|
||||
@@ -79,6 +79,13 @@
|
||||
height: 500px;
|
||||
max-height: 500px;
|
||||
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>
|
||||
@@ -5,13 +5,11 @@
|
||||
<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 cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
|
||||
<v-text-field v-model="serverSearchInput.processName" label="流程名称" class="cus-v-input "
|
||||
:class="{'mr-2': !isMobile}" dense filled single-line ></v-text-field>
|
||||
<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-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-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
|
||||
class="elevation-0"
|
||||
color="success"
|
||||
@@ -22,17 +20,17 @@
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- 页面主要内容 -->
|
||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
|
||||
<v-card>
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-list three-line subheader>
|
||||
<v-subheader>流程列表</v-subheader>
|
||||
<v-list-item v-for="(item, index) in tableDataFromBackend" :key="index">
|
||||
<v-subheader>{{getConstantCollectionItemText('categoryList', index)}}</v-subheader>
|
||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
||||
<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-row :class="{'px-10': !isMobile, 'px-3': isMobile, 'pb-7': isMobile}">
|
||||
<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})">
|
||||
{{it.workflowName}}
|
||||
</v-btn>
|
||||
@@ -41,29 +39,28 @@
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</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">
|
||||
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
|
||||
<v-row>
|
||||
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
|
||||
<v-row class="pt-8">
|
||||
<span class="title pa-6" :class="{'pl-12': !isMobile, 'pl-6': isMobile}">{{ currentClickButton.title }}信息</span>
|
||||
<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-btn>
|
||||
</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">
|
||||
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">任务标题</span>
|
||||
<v-col cols="12" sm="12" md="12" :class="{'pa-0': isMobile, 'px-3': isMobile, 'pt-6': isMobile}">
|
||||
<span class="inputLabel">任务标题</span>
|
||||
<v-text-field class="cus-v-input mr-2" dense filled single-line label="任务标题" v-model="editItem['taskTitle']">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 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>
|
||||
<v-col cols="12" class=" pb-3" v-for="(formItem, index) in editItem.workflowForm" :key="index">
|
||||
<span class="inputLabel">{{formItem.component.outline}}</span>
|
||||
<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-radio-group :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details>
|
||||
@@ -88,12 +85,11 @@
|
||||
</v-list-item-content>
|
||||
</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-row class="justify-end mx-0 mt-8" :class="{'px-10': !isMobile, 'px-4': isMobile, 'mb-8': isMobile}">
|
||||
<v-btn color="success" @click="doUiAction(dialogSaveInfoAction)"
|
||||
>保存
|
||||
</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-btn class="elevation-0 ml-2" @click="isEditDrawerShow = false">取消</v-btn>
|
||||
</v-row>
|
||||
</v-form>
|
||||
</v-navigation-drawer>
|
||||
|
||||
@@ -5,25 +5,23 @@
|
||||
<jh-layout-v3>
|
||||
|
||||
<!-- 页面主要内容 -->
|
||||
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-4" style="background-color: rgb(236, 236, 236);">
|
||||
<v-stepper v-model="step" class="mb-4">
|
||||
<v-stepper-header>
|
||||
<v-card :class="{'px-2': isMobile}">
|
||||
<v-stepper v-model="step" class="mb-4 elevation-0 pa-0 ma-0 pt-4" :class="{'px-10': !isMobile, 'px-3': isMobile}">
|
||||
<v-stepper-header class="elevation-0 pa-0 ma-0">
|
||||
<template v-for="(item, index) in taskStepperList">
|
||||
<v-divider v-if="index > 0"></v-divider>
|
||||
<v-stepper-step :complete="step > item.value" :step="item.value">
|
||||
<v-divider v-if="index > 0" class="mx-1"></v-divider>
|
||||
<v-stepper-step :complete="step > item.value" :step="item.value" class="pa-4" color="success">
|
||||
{{ item.text }}
|
||||
</v-stepper-step>
|
||||
</template>
|
||||
</v-stepper-header>
|
||||
</v-stepper>
|
||||
<v-card class="mb-4">
|
||||
<v-subheader>表单信息</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
|
||||
<v-row class="pa-0 ma-0" :class="{'px-10': !isMobile, 'px-3': isMobile}"><v-subheader>表单信息</v-subheader></v-row>
|
||||
<v-row class="pa-0 ma-0" :class="{'px-10': !isMobile, 'px-3': isMobile}">
|
||||
<v-col :cols="taskTpl.prev ? 6 : 12" v-for="(key, i) in ['prev', 'input']" :key="i"
|
||||
v-if="isAccess && taskTpl[key]">
|
||||
<v-row>
|
||||
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3" v-for="(formItem, index) in taskTpl.formList" :key="index"
|
||||
<v-col cols="12" class=" pb-3" v-for="(formItem, index) in taskTpl.formList" :key="index"
|
||||
v-if="taskTpl[key] && !(currentNode.formIdHidden || []).includes(formItem.id)">
|
||||
<!-- <v-subheader inset > {{ key === 'prev' ? '历史表单' : '当前' }} </v-subheader> -->
|
||||
<template v-if="formItem.component.type === 'singleSelect'">
|
||||
@@ -31,7 +29,8 @@
|
||||
</v-list-item-title>
|
||||
<v-radio-group v-model="taskTpl[key][formItem.id]">
|
||||
<v-radio hide-details v-for="(option, optionIndex) in formItem.component.property.selectOptionList"
|
||||
:disabled="key === 'prev' || !(currentNode.formId || []).includes(formItem.id)" :key="optionIndex"
|
||||
:disabled="key === 'prev' || !(currentNode.formId || []).includes(formItem.id)"
|
||||
:key="optionIndex"
|
||||
:label="option.value" v-model="taskTpl[key][formItem.id]"></v-radio>
|
||||
</v-radio-group>
|
||||
</template>
|
||||
@@ -42,7 +41,8 @@
|
||||
<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>
|
||||
:label="option.value" v-model="taskTpl[key][formItem.id]" hide-details
|
||||
color="red"></v-checkbox>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -63,19 +63,18 @@
|
||||
</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-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" :disabled="currentNode && currentNode.id && currentNode.id.includes('end-')" :rows="4" />
|
||||
<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="primary" v-for="item in nextLineList" @click="submitNode(item.type)">
|
||||
{{item.type}}-{{item.label}}</v-btn>
|
||||
<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-card>
|
||||
<v-card>
|
||||
<v-list three-line subheader>
|
||||
<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">
|
||||
@@ -110,7 +109,6 @@
|
||||
</div>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
@@ -196,7 +194,8 @@
|
||||
this.taskId = searchParams.get('taskId');
|
||||
await this.getTaskHistoryList()
|
||||
},
|
||||
mounted() { },
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取表格数据
|
||||
@@ -224,7 +223,19 @@
|
||||
* 获取表格数据
|
||||
*/
|
||||
async getTaskHistoryList() {
|
||||
const { data: { appData: { taskHistoryList, taskStepperList, taskTpl, isAccess, nextLineList, step, currentNode } } } = await window.jianghuAxios({
|
||||
const {
|
||||
data: {
|
||||
appData: {
|
||||
taskHistoryList,
|
||||
taskStepperList,
|
||||
taskTpl,
|
||||
isAccess,
|
||||
nextLineList,
|
||||
step,
|
||||
currentNode
|
||||
}
|
||||
}
|
||||
} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'taskHistoryManagement',
|
||||
|
||||
@@ -4,25 +4,10 @@
|
||||
|
||||
<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>
|
||||
<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-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||
@@ -30,12 +15,12 @@
|
||||
|
||||
<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-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
:headers="headers"
|
||||
<v-data-table :headers="headers"
|
||||
:items="tableData"
|
||||
:search="searchInput"
|
||||
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
|
||||
@@ -43,18 +28,16 @@
|
||||
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>-->
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
<v-btn small color="success" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
查看
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</jh-layout-v3>
|
||||
|
||||
{% endblock %}
|
||||
@@ -69,19 +52,10 @@ new Vue({
|
||||
mixins: [window.jianghuUiActionMixins],
|
||||
data: () => ({
|
||||
// 表格相关数据
|
||||
isFormValid: true,
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
constantCollection: {
|
||||
},
|
||||
|
||||
serverSearchInput: {
|
||||
studentId: null,
|
||||
classId: null
|
||||
},
|
||||
currentTableGenderType: 'all',
|
||||
isEditDrawerShow: false,
|
||||
searchInput: null,
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
@@ -99,15 +73,8 @@ new Vue({
|
||||
{text: "任务创建人", value: "createByUser", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
||||
{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: {
|
||||
isMobile() {
|
||||
@@ -119,22 +86,19 @@ new Vue({
|
||||
}
|
||||
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||
},
|
||||
computedEditItem() {
|
||||
return this.editItem;
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取表格数据
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
||||
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
@@ -142,7 +106,6 @@ new Vue({
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
where: {},
|
||||
whereLike: serverSearchInput,
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
@@ -152,112 +115,8 @@ new Vue({
|
||||
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}) {
|
||||
window.open(`/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`);
|
||||
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,25 +4,9 @@
|
||||
|
||||
<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>
|
||||
<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-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||
@@ -30,8 +14,9 @@
|
||||
|
||||
<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-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
@@ -43,106 +28,17 @@
|
||||
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>-->
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
查看
|
||||
</v-btn>
|
||||
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="doUiAction(tableButton.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-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>
|
||||
|
||||
@@ -162,8 +58,7 @@ new Vue({
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
constantCollection: {
|
||||
},
|
||||
constantCollection: {},
|
||||
|
||||
serverSearchInput: {
|
||||
studentId: null,
|
||||
@@ -191,9 +86,9 @@ new Vue({
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
||||
],
|
||||
|
||||
currentClickButton: {title: '新增', action: 'add'},
|
||||
editItem: {},
|
||||
tableButtonList: [
|
||||
{text: '查看', buttonType: 'view', color: 'success', action: 'toTaskHistory'},
|
||||
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
|
||||
],
|
||||
dialogSaveInfoAction: ''
|
||||
@@ -216,14 +111,14 @@ new Vue({
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取表格数据
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
||||
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
@@ -231,7 +126,6 @@ new Vue({
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
where: {},
|
||||
whereLike: serverSearchInput,
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
@@ -241,80 +135,6 @@ new Vue({
|
||||
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: '确定删除吗?'});
|
||||
@@ -338,15 +158,8 @@ new Vue({
|
||||
});
|
||||
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}) {
|
||||
window.open(`/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`);
|
||||
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,25 +4,10 @@
|
||||
|
||||
<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>
|
||||
<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-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||
@@ -30,8 +15,9 @@
|
||||
|
||||
<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-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
@@ -43,103 +29,15 @@
|
||||
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>-->
|
||||
:class="{'mx-2': isMobile}"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
<v-btn small color="success" 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-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>
|
||||
|
||||
@@ -155,19 +53,10 @@ new Vue({
|
||||
mixins: [window.jianghuUiActionMixins],
|
||||
data: () => ({
|
||||
// 表格相关数据
|
||||
isFormValid: true,
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
constantCollection: {
|
||||
},
|
||||
|
||||
serverSearchInput: {
|
||||
studentId: null,
|
||||
classId: null
|
||||
},
|
||||
currentTableGenderType: 'all',
|
||||
isEditDrawerShow: false,
|
||||
searchInput: null,
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
@@ -185,15 +74,8 @@ new Vue({
|
||||
{text: "任务创建人", value: "createByUser", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
||||
{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: {
|
||||
isMobile() {
|
||||
@@ -205,22 +87,19 @@ new Vue({
|
||||
}
|
||||
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||
},
|
||||
computedEditItem() {
|
||||
return this.editItem;
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取表格数据
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
||||
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
@@ -228,7 +107,6 @@ new Vue({
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
where: {},
|
||||
whereLike: serverSearchInput,
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
@@ -238,112 +116,8 @@ new Vue({
|
||||
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}) {
|
||||
window.open(`/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`);
|
||||
location.href = `/${window.appInfo.appId}/page/taskHistoryManagement?taskId=${item.taskId}`;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,26 +4,11 @@
|
||||
|
||||
<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>
|
||||
<v-card :class="{'px-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-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<span class="body-2">共{{ tableData.length }}条记录</span>
|
||||
@@ -31,8 +16,9 @@
|
||||
|
||||
<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-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
@@ -44,103 +30,16 @@
|
||||
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>-->
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
|
||||
<v-btn small color="success" 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-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>
|
||||
|
||||
@@ -156,19 +55,10 @@ new Vue({
|
||||
mixins: [window.jianghuUiActionMixins],
|
||||
data: () => ({
|
||||
// 表格相关数据
|
||||
isFormValid: true,
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
constantCollection: {
|
||||
},
|
||||
|
||||
serverSearchInput: {
|
||||
studentId: null,
|
||||
classId: null
|
||||
},
|
||||
currentTableGenderType: 'all',
|
||||
isEditDrawerShow: false,
|
||||
searchInput: null,
|
||||
isTableLoading: true,
|
||||
tableDataFromBackend: [],
|
||||
@@ -186,15 +76,8 @@ new Vue({
|
||||
{text: "任务创建人", value: "createByUser", width: 120},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
|
||||
{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: {
|
||||
isMobile() {
|
||||
@@ -206,22 +89,19 @@ new Vue({
|
||||
}
|
||||
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
|
||||
},
|
||||
computedEditItem() {
|
||||
return this.editItem;
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
async created() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取表格数据
|
||||
*/
|
||||
async refreshTableData() {
|
||||
this.isTableLoading = true;
|
||||
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
|
||||
const {data: {appData: {rows}}} = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
@@ -229,7 +109,6 @@ new Vue({
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
where: {},
|
||||
whereLike: serverSearchInput,
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
@@ -239,112 +118,9 @@ new Vue({
|
||||
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}) {
|
||||
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,33 +3,18 @@
|
||||
{% block vue_template %}
|
||||
|
||||
<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>
|
||||
<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-card :class="{'px-2': isMobile}">
|
||||
<v-row class="ma-0 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
|
||||
|
||||
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
|
||||
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem')">新增</v-btn>
|
||||
<v-col cols="12" xs="12" sm="4" md="4" xl="4" class="pl-0">
|
||||
<v-btn color="success" dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem')">新增</v-btn>
|
||||
<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="pa-xs-0 pa-xs-2 col-sm-8-flex">
|
||||
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
|
||||
<v-col cols="12" xs="12" sm="4" md="3" xl="3" class="px-0">
|
||||
<v-text-field v-model="searchInput" prefix="表格过滤:" color="success" class="cus-v-input" dense filled
|
||||
single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table fixed-header
|
||||
@@ -41,86 +26,23 @@
|
||||
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>-->
|
||||
:class="{'mx-2': isMobile}"
|
||||
color="success"
|
||||
class="elevation-0 mt-0 flex-fill d-flex flex-column">
|
||||
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="doUiAction(tableButton.action, {item})">
|
||||
<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>
|
||||
|
||||
</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({
|
||||
@@ -130,16 +52,9 @@ new Vue({
|
||||
mixins: [window.jianghuUiActionMixins],
|
||||
data: () => ({
|
||||
// 表格相关数据
|
||||
isFormValid: true,
|
||||
requireRules: [
|
||||
v => !!v || 'This is required',
|
||||
],
|
||||
constantCollection: {
|
||||
userList: [],
|
||||
groupList: [],
|
||||
workflowFormList: []
|
||||
},
|
||||
|
||||
serverSearchInput: {
|
||||
studentId: null,
|
||||
classId: null
|
||||
@@ -158,7 +73,7 @@ new Vue({
|
||||
{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'},
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 160, class: 'fixed', cellClass: 'fixed'},
|
||||
],
|
||||
|
||||
currentClickButton: {title: '新增', action: 'add'},
|
||||
@@ -180,61 +95,13 @@ new Vue({
|
||||
}
|
||||
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() {
|
||||
await this.doUiAction('refreshTableData');
|
||||
this.getUserList();
|
||||
this.getGroupList();
|
||||
},
|
||||
mounted() {},
|
||||
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;
|
||||
},
|
||||
/**
|
||||
* 获取表格数据
|
||||
*/
|
||||
@@ -261,127 +128,17 @@ new Vue({
|
||||
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
|
||||
async clearItemData() {
|
||||
this.editItem = { workflowForm: [], workflowConfig: {lineList: [], nodeList:[]} };
|
||||
},
|
||||
|
||||
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;
|
||||
window.location.href = `/${window.appInfo.appId}/page/workflowEditor?type=add`;
|
||||
},
|
||||
|
||||
// startUpdateItem
|
||||
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() {
|
||||
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
|
||||
},
|
||||
@@ -404,13 +161,6 @@ new Vue({
|
||||
});
|
||||
await window.vtoast.success("删除数据成功");
|
||||
},
|
||||
getConstantCollectionItemText(key, _value) {
|
||||
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
|
||||
if(constantCollectionItemFind) {
|
||||
return constantCollectionItemFind.text;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Generated
+214
-71
@@ -9,7 +9,8 @@
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jianghujs/jianghu": "3.0.7",
|
||||
"@jianghujs/jianghu": "3.0.16",
|
||||
"dayjs": "^1.11.4",
|
||||
"egg": "^2.15.1",
|
||||
"egg-scripts": "^2.11.0"
|
||||
},
|
||||
@@ -683,9 +684,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@jianghujs/jianghu": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@jianghujs/jianghu/-/jianghu-3.0.7.tgz",
|
||||
"integrity": "sha512-CWUMuPDCHWId7i8r0hFEHOfuRFqftvnYIEavwMpJ0IHq/HAkuKCAx+7jvzDUT0TNQIaKWp5WkdcdyJ84dVjuJw==",
|
||||
"version": "3.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@jianghujs/jianghu/-/jianghu-3.0.16.tgz",
|
||||
"integrity": "sha512-dAKYQJkzUKyng3LZ32TZhX8yhBHN9PX9IVfPdrdZftCAiaorJOEbyiUBQLeEffB9d0/6qOE5IGcuPiCOAnbWtw==",
|
||||
"dependencies": {
|
||||
"@socket.io/redis-adapter": "^7.1.0",
|
||||
"ajv": "^8.7.1",
|
||||
@@ -695,7 +696,6 @@
|
||||
"dayjs": "^1.10.5",
|
||||
"egg": "^2.15.1",
|
||||
"egg-cors": "^2.2.3",
|
||||
"egg-etag": "^1.2.0",
|
||||
"egg-knex": "^3.0.1",
|
||||
"egg-scripts": "^2.11.0",
|
||||
"egg-static": "^2.2.0",
|
||||
@@ -706,6 +706,7 @@
|
||||
"lodash": "^4.17.21",
|
||||
"md5-node": "^1.0.1",
|
||||
"mime": "3.0.0",
|
||||
"mysql2": "^2.3.3",
|
||||
"nanoid": "3.3.1",
|
||||
"node-rsa": "^1.1.1",
|
||||
"socket.io": "4.4.1",
|
||||
@@ -5297,18 +5298,6 @@
|
||||
"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": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/egg-i18n/-/egg-i18n-2.1.1.tgz",
|
||||
@@ -7732,14 +7721,6 @@
|
||||
"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": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
||||
@@ -8514,6 +8495,14 @@
|
||||
"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": {
|
||||
"version": "1.4.5",
|
||||
"resolved": "https://registry.npmjs.org/geoip-lite/-/geoip-lite-1.4.5.tgz",
|
||||
@@ -9747,6 +9736,11 @@
|
||||
"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": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
|
||||
@@ -10390,11 +10384,6 @@
|
||||
"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": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz",
|
||||
@@ -10407,15 +10396,6 @@
|
||||
"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": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz",
|
||||
@@ -11341,6 +11321,67 @@
|
||||
"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": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||
@@ -11377,6 +11418,31 @@
|
||||
"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": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
|
||||
@@ -13924,6 +13990,11 @@
|
||||
"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": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
@@ -14696,6 +14767,11 @@
|
||||
"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": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/serialize-json/-/serialize-json-1.0.3.tgz",
|
||||
@@ -17936,9 +18012,9 @@
|
||||
}
|
||||
},
|
||||
"@jianghujs/jianghu": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@jianghujs/jianghu/-/jianghu-3.0.7.tgz",
|
||||
"integrity": "sha512-CWUMuPDCHWId7i8r0hFEHOfuRFqftvnYIEavwMpJ0IHq/HAkuKCAx+7jvzDUT0TNQIaKWp5WkdcdyJ84dVjuJw==",
|
||||
"version": "3.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@jianghujs/jianghu/-/jianghu-3.0.16.tgz",
|
||||
"integrity": "sha512-dAKYQJkzUKyng3LZ32TZhX8yhBHN9PX9IVfPdrdZftCAiaorJOEbyiUBQLeEffB9d0/6qOE5IGcuPiCOAnbWtw==",
|
||||
"requires": {
|
||||
"@socket.io/redis-adapter": "^7.1.0",
|
||||
"ajv": "^8.7.1",
|
||||
@@ -17948,7 +18024,6 @@
|
||||
"dayjs": "^1.10.5",
|
||||
"egg": "^2.15.1",
|
||||
"egg-cors": "^2.2.3",
|
||||
"egg-etag": "^1.2.0",
|
||||
"egg-knex": "^3.0.1",
|
||||
"egg-scripts": "^2.11.0",
|
||||
"egg-static": "^2.2.0",
|
||||
@@ -17959,6 +18034,7 @@
|
||||
"lodash": "^4.17.21",
|
||||
"md5-node": "^1.0.1",
|
||||
"mime": "3.0.0",
|
||||
"mysql2": "^2.3.3",
|
||||
"nanoid": "3.3.1",
|
||||
"node-rsa": "^1.1.1",
|
||||
"socket.io": "4.4.1",
|
||||
@@ -21843,15 +21919,6 @@
|
||||
"resolved": "https://registry.npmjs.org/egg-errors/-/egg-errors-2.3.1.tgz",
|
||||
"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": {
|
||||
"version": "2.1.1",
|
||||
"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",
|
||||
"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": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
|
||||
@@ -24358,6 +24420,14 @@
|
||||
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
|
||||
"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": {
|
||||
"version": "1.4.5",
|
||||
"resolved": "https://registry.npmjs.org/geoip-lite/-/geoip-lite-1.4.5.tgz",
|
||||
@@ -25267,6 +25337,11 @@
|
||||
"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": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
|
||||
@@ -25771,11 +25846,6 @@
|
||||
"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": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz",
|
||||
@@ -25785,15 +25855,6 @@
|
||||
"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": {
|
||||
"version": "1.0.0",
|
||||
"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": {
|
||||
"version": "2.7.0",
|
||||
"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": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
|
||||
@@ -28474,6 +28607,11 @@
|
||||
"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": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
@@ -29077,6 +29215,11 @@
|
||||
"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": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/serialize-json/-/serialize-json-1.0.3.tgz",
|
||||
|
||||
+2
-1
@@ -8,8 +8,9 @@
|
||||
"framework": "@jianghujs/jianghu"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jianghujs/jianghu": "3.0.16",
|
||||
"dayjs": "^1.11.4",
|
||||
"egg": "^2.15.1",
|
||||
"@jianghujs/jianghu": "3.0.7",
|
||||
"egg-scripts": "^2.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in new issue
Block a user