icon size 16px
This commit is contained in:
1 parent
62ceb85019
commit
14dbde48ab
5 files changed
+251
-250
No files matched your search
@@ -49,11 +49,11 @@
|
|||||||
<template v-slot:item.action="{ item }">
|
<template v-slot:item.action="{ item }">
|
||||||
<span role="button" class="success--text jh-font-size-3 pr-2"
|
<span role="button" class="success--text jh-font-size-3 pr-2"
|
||||||
@click="doUiAction('startCreateWorkflow', item)">
|
@click="doUiAction('startCreateWorkflow', item)">
|
||||||
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>申请
|
<v-icon size="16" class="success--text">mdi-note-edit-outline</v-icon>申请
|
||||||
</span>
|
</span>
|
||||||
<!-- <span role="button" class="success--text jh-font-size-3 pr-2"
|
<!-- <span role="button" class="success--text jh-font-size-3 pr-2"
|
||||||
@click="doUiAction('jumpUpdateWorkflow', item)">
|
@click="doUiAction('jumpUpdateWorkflow', item)">
|
||||||
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>编辑
|
<v-icon size="16" class="success--text">mdi-note-edit-outline</v-icon>编辑
|
||||||
</span> -->
|
</span> -->
|
||||||
</template>
|
</template>
|
||||||
<!--表格底部右侧功能按钮-->
|
<!--表格底部右侧功能按钮-->
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
<!--表格行操作按钮-->
|
<!--表格行操作按钮-->
|
||||||
<template v-slot:item.action="{ item }">
|
<template v-slot:item.action="{ item }">
|
||||||
<span role="button" class="success--text jh-font-size-3 pr-2" @click="doUiAction('startUpdateItem', item)">
|
<span role="button" class="success--text jh-font-size-3 pr-2" @click="doUiAction('startUpdateItem', item)">
|
||||||
<v-icon size="14" class="success--text">mdi-text-box-outline</v-icon>
|
<v-icon size="16" class="success--text">mdi-text-box-outline</v-icon>
|
||||||
查看
|
查看
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -76,12 +76,12 @@
|
|||||||
<template v-slot:item.action="{ item }">
|
<template v-slot:item.action="{ item }">
|
||||||
<span v-if="workflowType === 'todo'" role="button" class="success--text jh-font-size-3 pr-2"
|
<span v-if="workflowType === 'todo'" role="button" class="success--text jh-font-size-3 pr-2"
|
||||||
@click="doUiAction('startUpdateItem', item)">
|
@click="doUiAction('startUpdateItem', item)">
|
||||||
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>
|
<v-icon size="16" class="success--text">mdi-note-edit-outline</v-icon>
|
||||||
审核
|
审核
|
||||||
</span>
|
</span>
|
||||||
<span v-else role="button" class="success--text jh-font-size-3 pr-2"
|
<span v-else role="button" class="success--text jh-font-size-3 pr-2"
|
||||||
@click="doUiAction('startUpdateItem', item)">
|
@click="doUiAction('startUpdateItem', item)">
|
||||||
<v-icon size="14" class="success--text">mdi-text-box-outline</v-icon>
|
<v-icon size="16" class="success--text">mdi-text-box-outline</v-icon>
|
||||||
查看
|
查看
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
+242
-241
@@ -21,7 +21,8 @@
|
|||||||
<!--pc端的搜索条件表单 >>>>>>>> -->
|
<!--pc端的搜索条件表单 >>>>>>>> -->
|
||||||
<v-col cols="12" xs="12" sm="12" md="8" xl="9" class="d-flex align-center">
|
<v-col cols="12" xs="12" sm="12" md="8" xl="9" class="d-flex align-center">
|
||||||
<v-row class="jh-backend-form-container justify-end ma-0 py-4 pt-xs-0 ">
|
<v-row class="jh-backend-form-container justify-end ma-0 py-4 pt-xs-0 ">
|
||||||
<v-btn small @click="doUiAction(dialogSaveInfoAction)" color="success" class="">
|
<v-btn
|
||||||
|
small @click="doUiAction(dialogSaveInfoAction)" color="success" class="">
|
||||||
保存
|
保存
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -58,7 +59,7 @@
|
|||||||
v-if="!loading" ref="processFlow" :data="editItem.workflowConfig" :user="constantObj.userList"
|
v-if="!loading" ref="processFlow" :data="editItem.workflowConfig" :user="constantObj.userList"
|
||||||
:group="constantObj.groupList"
|
:group="constantObj.groupList"
|
||||||
:mode="editItem.mode">
|
:mode="editItem.mode">
|
||||||
</process-flow>`
|
</process-flow>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 页面loading 效果 -->
|
<!-- 页面loading 效果 -->
|
||||||
@@ -99,257 +100,257 @@
|
|||||||
{% include 'component/flow/editNode.html' %}
|
{% include 'component/flow/editNode.html' %}
|
||||||
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
template: '#app-template',
|
template: '#app-template',
|
||||||
vueComponent: 'page',
|
vueComponent: 'page',
|
||||||
vuetify: new Vuetify(),
|
vuetify: new Vuetify(),
|
||||||
data: () => ({
|
data: () => ({
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
{text: '首页', disabled: true,},
|
{ text: '首页', disabled: true, },
|
||||||
{text: '申请模板', disabled: true,}
|
{ text: '申请模板', disabled: true, }
|
||||||
],
|
|
||||||
validationRules: {
|
|
||||||
requireRules: [
|
|
||||||
v => !!v || '必填',
|
|
||||||
],
|
],
|
||||||
},
|
validationRules: {
|
||||||
constantObj: {
|
requireRules: [
|
||||||
userList: [],
|
v => !!v || '必填',
|
||||||
groupList: [],
|
],
|
||||||
workflowFormList: [],
|
|
||||||
modeList: [
|
|
||||||
{text: '串行', value: 'serial'},
|
|
||||||
{text: '并行', value: 'parallel'},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
editItem: {},
|
|
||||||
dialogSaveInfoAction: 'createItem',
|
|
||||||
loading: false,
|
|
||||||
isHelpPageDrawerShown: false,
|
|
||||||
}),
|
|
||||||
watch: {
|
|
||||||
'editItem.workflowForm': {
|
|
||||||
handler(val) {
|
|
||||||
if (!val) return
|
|
||||||
this.buildWorkflowFormList(val);
|
|
||||||
if (!this.editItem.workflowConfig) return;
|
|
||||||
this.buildWorkflowConfig()
|
|
||||||
},
|
},
|
||||||
deep: true,
|
constantObj: {
|
||||||
immediate: true
|
userList: [],
|
||||||
}
|
groupList: [],
|
||||||
},
|
workflowFormList: [],
|
||||||
async created() {
|
modeList: [
|
||||||
const searchParams = new URLSearchParams(location.search.substring(1));
|
{ text: '串行', value: 'serial' },
|
||||||
const id = searchParams.get('id');
|
{ text: '并行', value: 'parallel' },
|
||||||
if (id) {
|
]
|
||||||
this.editItem = {id};
|
},
|
||||||
await this.syncEditItem()
|
editItem: {},
|
||||||
} else {
|
dialogSaveInfoAction: 'createItem',
|
||||||
this.clearItemData();
|
loading: false,
|
||||||
}
|
isHelpPageDrawerShown: false,
|
||||||
this.getUserList();
|
}),
|
||||||
this.getGroupList();
|
watch: {
|
||||||
},
|
'editItem.workflowForm': {
|
||||||
mounted() {
|
handler(val) {
|
||||||
},
|
if (!val) return
|
||||||
methods: {
|
this.buildWorkflowFormList(val);
|
||||||
async doUiAction(uiActionId, uiActionData) {
|
if (!this.editItem.workflowConfig) return;
|
||||||
switch (uiActionId) {
|
this.buildWorkflowConfig()
|
||||||
case 'createItem':
|
},
|
||||||
await this.confirmCreateItemDialog(uiActionData);
|
deep: true,
|
||||||
await this.doCreateItem(uiActionData);
|
immediate: true
|
||||||
await this.syncEditItem()
|
|
||||||
break;
|
|
||||||
case 'updateItem':
|
|
||||||
await this.confirmUpdateItemDialog(uiActionData);
|
|
||||||
await this.doUpdateItem(uiActionData);
|
|
||||||
await this.syncEditItem()
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
console.error("[doUiAction] uiActionId not find", {uiActionId});
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async created() {
|
||||||
|
const searchParams = new URLSearchParams(location.search.substring(1));
|
||||||
buildWorkflowFormList(val) {
|
const id = searchParams.get('id');
|
||||||
this.constantObj.workflowFormList = [];
|
|
||||||
for (const item of val) {
|
|
||||||
this.constantObj.workflowFormList.push({
|
|
||||||
text: item.component.outline,
|
|
||||||
value: item.id
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
buildWorkflowConfig() {
|
|
||||||
for (const config of this.editItem.workflowConfig.nodeList) {
|
|
||||||
if (!config.formId) return;
|
|
||||||
const formId = []
|
|
||||||
for (const item of config.formId) {
|
|
||||||
if (!this.constantObj.workflowFormList.some(e => e.value === item)) {
|
|
||||||
formId.push(item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
config.formId = formId
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取user数据
|
|
||||||
*/
|
|
||||||
async getUserList() {
|
|
||||||
const {rows} = (await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'workflowManagement',
|
|
||||||
actionId: 'selectUserList',
|
|
||||||
actionData: {},
|
|
||||||
where: {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})).data.appData.resultData;
|
|
||||||
this.constantObj.userList = rows.map(e => {
|
|
||||||
return {text: e.username, value: e.userId, userId: e.userId}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取group数据
|
|
||||||
*/
|
|
||||||
async getGroupList() {
|
|
||||||
const {rows} = (await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'workflowManagement',
|
|
||||||
actionId: 'selectGroupList',
|
|
||||||
actionData: {},
|
|
||||||
where: {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})).data.appData.resultData;
|
|
||||||
this.constantObj.groupList = rows.map(e => {
|
|
||||||
return {text: e.groupName, value: e.groupId}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
async clearItemData() {
|
|
||||||
this.dialogSaveInfoAction = 'createItem';
|
|
||||||
this.editItem = {workflowForm: [], workflowConfig: {lineList: [], nodeList: []}, mode: 'serial'};
|
|
||||||
},
|
|
||||||
|
|
||||||
// ---------- 新建流程 createItem >>>>>>>>>> --------
|
|
||||||
async confirmCreateItemDialog() {
|
|
||||||
if (await window.confirmDialog({title: "新增", content: "确定新增吗?"}) === false) {
|
|
||||||
throw new Error("[confirmCreateFormDialog] 否");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async doCreateItem() {
|
|
||||||
delete this.editItem.id;
|
|
||||||
const item = this.buildEditItem();
|
|
||||||
await window.vtoast.loading("新增数据");
|
|
||||||
const {rows} = (await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'workflowManagement',
|
|
||||||
actionId: 'insertItem',
|
|
||||||
actionData: item
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})).data.appData.resultData;
|
|
||||||
this.editItem.id = rows[0];
|
|
||||||
history.pushState({}, '', `?id=${rows[0]}`);
|
|
||||||
await window.vtoast.success("新增数据成功");
|
|
||||||
},
|
|
||||||
async syncEditItem() {
|
|
||||||
this.loading = true;
|
|
||||||
this.dialogSaveInfoAction = 'updateItem';
|
|
||||||
const {rows} = (await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'workflowManagement',
|
|
||||||
actionId: 'selectItemList',
|
|
||||||
where: {id: this.editItem.id},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})).data.appData.resultData;
|
|
||||||
if (!rows.length) {
|
|
||||||
this.clearItemData();
|
|
||||||
} else {
|
|
||||||
const item = rows[0];
|
|
||||||
item.workflowConfig = item.workflowConfig ? JSON.parse(item.workflowConfig) : null;
|
|
||||||
item.workflowForm = item.workflowForm ? JSON.parse(item.workflowForm) : [];
|
|
||||||
item.mode = item.workflowConfig.mode || 'serial';
|
|
||||||
this.editItem = item;
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
this.loading = false;
|
|
||||||
}, 500)
|
|
||||||
},
|
|
||||||
buildEditItem() {
|
|
||||||
const {id, workflowId, workflowName, workflowRemark, workflowCategory, mode, workflowForm} = this.editItem;
|
|
||||||
const workflowConfig = this.$refs.processFlow.getData();
|
|
||||||
workflowConfig.mode = mode
|
|
||||||
// TODO: 清除不存在的用户
|
|
||||||
workflowConfig.nodeList.forEach(node => {
|
|
||||||
if (node.type === 'userTask') {
|
|
||||||
node.assignValue = node.assignValue || [];
|
|
||||||
node.assignValue = node.assignValue.filter(userId => this.constantObj.userList.findIndex(u => u.userId === userId) > -1);
|
|
||||||
node.origin.properties.assignValue = node.assignValue;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let item = {
|
|
||||||
workflowName,
|
|
||||||
workflowRemark,
|
|
||||||
workflowCategory,
|
|
||||||
workflowId: workflowId || null,
|
|
||||||
workflowConfig: workflowConfig ? JSON.stringify(workflowConfig) : null,
|
|
||||||
workflowForm: workflowForm ? JSON.stringify(workflowForm) : null,
|
|
||||||
}
|
|
||||||
if (id) {
|
if (id) {
|
||||||
item.id = id;
|
this.editItem = { id };
|
||||||
|
await this.syncEditItem()
|
||||||
|
} else {
|
||||||
|
this.clearItemData();
|
||||||
}
|
}
|
||||||
return item;
|
this.getUserList();
|
||||||
|
this.getGroupList();
|
||||||
},
|
},
|
||||||
// ---------- <<<<<<<<<< 新建流程 createItem --------
|
mounted() {
|
||||||
|
|
||||||
// ---------- 修改流程 updateItem >>>>>>>>>> --------
|
|
||||||
async confirmUpdateItemDialog() {
|
|
||||||
if (await window.confirmDialog({title: "修改", content: "确定修改吗?"}) === false) {
|
|
||||||
throw new Error("[confirmUpdateItemDialog] 否");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async doUpdateItem() {
|
methods: {
|
||||||
const {id, ...item} = this.buildEditItem();
|
async doUiAction(uiActionId, uiActionData) {
|
||||||
await window.vtoast.loading("修改数据");
|
switch (uiActionId) {
|
||||||
await window.jianghuAxios({
|
case 'createItem':
|
||||||
data: {
|
await this.confirmCreateItemDialog(uiActionData);
|
||||||
appData: {
|
await this.doCreateItem(uiActionData);
|
||||||
pageId: 'workflowManagement',
|
await this.syncEditItem()
|
||||||
actionId: 'updateItem',
|
break;
|
||||||
actionData: item,
|
case 'updateItem':
|
||||||
where: {id: id}
|
await this.confirmUpdateItemDialog(uiActionData);
|
||||||
}
|
await this.doUpdateItem(uiActionData);
|
||||||
|
await this.syncEditItem()
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.error("[doUiAction] uiActionId not find", { uiActionId });
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
await window.vtoast.success("修改数据成功");
|
|
||||||
},
|
|
||||||
// ---------- <<<<<<<<<< 修改流程 updateItem --------
|
buildWorkflowFormList(val) {
|
||||||
}
|
this.constantObj.workflowFormList = [];
|
||||||
})
|
for (const item of val) {
|
||||||
|
this.constantObj.workflowFormList.push({
|
||||||
|
text: item.component.outline,
|
||||||
|
value: item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
buildWorkflowConfig() {
|
||||||
|
for (const config of this.editItem.workflowConfig.nodeList) {
|
||||||
|
if (!config.formId) return;
|
||||||
|
const formId = []
|
||||||
|
for (const item of config.formId) {
|
||||||
|
if (!this.constantObj.workflowFormList.some(e => e.value === item)) {
|
||||||
|
formId.push(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
config.formId = formId
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取user数据
|
||||||
|
*/
|
||||||
|
async getUserList() {
|
||||||
|
const { rows } = (await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'selectUserList',
|
||||||
|
actionData: {},
|
||||||
|
where: {},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})).data.appData.resultData;
|
||||||
|
this.constantObj.userList = rows.map(e => {
|
||||||
|
return { text: e.username, value: e.userId, userId: e.userId }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取group数据
|
||||||
|
*/
|
||||||
|
async getGroupList() {
|
||||||
|
const { rows } = (await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'selectGroupList',
|
||||||
|
actionData: {},
|
||||||
|
where: {},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})).data.appData.resultData;
|
||||||
|
this.constantObj.groupList = rows.map(e => {
|
||||||
|
return { text: e.groupName, value: e.groupId }
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async clearItemData() {
|
||||||
|
this.dialogSaveInfoAction = 'createItem';
|
||||||
|
this.editItem = { workflowForm: [], workflowConfig: { lineList: [], nodeList: [] }, mode: 'serial' };
|
||||||
|
},
|
||||||
|
|
||||||
|
// ---------- 新建流程 createItem >>>>>>>>>> --------
|
||||||
|
async confirmCreateItemDialog() {
|
||||||
|
if (await window.confirmDialog({ title: "新增", content: "确定新增吗?" }) === false) {
|
||||||
|
throw new Error("[confirmCreateFormDialog] 否");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async doCreateItem() {
|
||||||
|
delete this.editItem.id;
|
||||||
|
const item = this.buildEditItem();
|
||||||
|
await window.vtoast.loading("新增数据");
|
||||||
|
const { rows } = (await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'insertItem',
|
||||||
|
actionData: item
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})).data.appData.resultData;
|
||||||
|
this.editItem.id = rows[0];
|
||||||
|
history.pushState({}, '', `?id=${rows[0]}`);
|
||||||
|
await window.vtoast.success("新增数据成功");
|
||||||
|
},
|
||||||
|
async syncEditItem() {
|
||||||
|
this.loading = true;
|
||||||
|
this.dialogSaveInfoAction = 'updateItem';
|
||||||
|
const { rows } = (await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'workflowManagement',
|
||||||
|
actionId: 'selectItemList',
|
||||||
|
where: { id: this.editItem.id },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})).data.appData.resultData;
|
||||||
|
if (!rows.length) {
|
||||||
|
this.clearItemData();
|
||||||
|
} else {
|
||||||
|
const item = rows[0];
|
||||||
|
item.workflowConfig = item.workflowConfig ? JSON.parse(item.workflowConfig) : null;
|
||||||
|
item.workflowForm = item.workflowForm ? JSON.parse(item.workflowForm) : [];
|
||||||
|
item.mode = item.workflowConfig.mode || 'serial';
|
||||||
|
this.editItem = item;
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
this.loading = false;
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
buildEditItem() {
|
||||||
|
const { id, workflowId, workflowName, workflowRemark, workflowCategory, mode, workflowForm } = this.editItem;
|
||||||
|
const workflowConfig = this.$refs.processFlow.getData();
|
||||||
|
workflowConfig.mode = mode
|
||||||
|
// TODO: 清除不存在的用户
|
||||||
|
workflowConfig.nodeList.forEach(node => {
|
||||||
|
if (node.type === 'userTask') {
|
||||||
|
node.assignValue = node.assignValue || [];
|
||||||
|
node.assignValue = node.assignValue.filter(userId => this.constantObj.userList.findIndex(u => u.userId === userId) > -1);
|
||||||
|
node.origin.properties.assignValue = node.assignValue;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let item = {
|
||||||
|
workflowName,
|
||||||
|
workflowRemark,
|
||||||
|
workflowCategory,
|
||||||
|
workflowId: workflowId || null,
|
||||||
|
workflowConfig: workflowConfig ? JSON.stringify(workflowConfig) : null,
|
||||||
|
workflowForm: workflowForm ? JSON.stringify(workflowForm) : null,
|
||||||
|
}
|
||||||
|
if (id) {
|
||||||
|
item.id = id;
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
},
|
||||||
|
// ---------- <<<<<<<<<< 新建流程 createItem --------
|
||||||
|
|
||||||
|
// ---------- 修改流程 updateItem >>>>>>>>>> --------
|
||||||
|
async confirmUpdateItemDialog() {
|
||||||
|
if (await window.confirmDialog({ title: "修改", content: "确定修改吗?" }) === false) {
|
||||||
|
throw new Error("[confirmUpdateItemDialog] 否");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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 --------
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr > td:not(.v-data-table__mobile-row) {
|
.theme--light.v-data-table>.v-data-table__wrapper>table>tbody>tr>td:not(.v-data-table__mobile-row) {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr {
|
.theme--light.v-data-table>.v-data-table__wrapper>table>tbody>tr {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -47,11 +47,11 @@
|
|||||||
<template v-slot:item.action="{ item }">
|
<template v-slot:item.action="{ item }">
|
||||||
<span role="button" class="success--text jh-font-size-3 pr-2"
|
<span role="button" class="success--text jh-font-size-3 pr-2"
|
||||||
@click="doUiAction('startCreateWorkflow', item)">
|
@click="doUiAction('startCreateWorkflow', item)">
|
||||||
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>申请
|
<v-icon size="16" class="success--text">mdi-note-edit-outline</v-icon>申请
|
||||||
</span>
|
</span>
|
||||||
<span role="button" class="success--text jh-font-size-3 pr-2"
|
<span role="button" class="success--text jh-font-size-3 pr-2"
|
||||||
@click="doUiAction('jumpUpdateWorkflow', item)">
|
@click="doUiAction('jumpUpdateWorkflow', item)">
|
||||||
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>编辑
|
<v-icon size="16" class="success--text">mdi-note-edit-outline</v-icon>编辑
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<!--表格底部右侧功能按钮-->
|
<!--表格底部右侧功能按钮-->
|
||||||
@@ -305,8 +305,8 @@ new Vue({
|
|||||||
workflowPersonItem.assignValue = workflowPersonItem.assignValue.filter(userId => {
|
workflowPersonItem.assignValue = workflowPersonItem.assignValue.filter(userId => {
|
||||||
return this.userList.some(user => user.userId === userId);
|
return this.userList.some(user => user.userId === userId);
|
||||||
});
|
});
|
||||||
if(!workflowPersonItem.origin) workflowPersonItem['origin'] = {};
|
if (!workflowPersonItem.origin) workflowPersonItem['origin'] = {};
|
||||||
if(!workflowPersonItem.origin.properties) workflowPersonItem.origin['properties'] = {};
|
if (!workflowPersonItem.origin.properties) workflowPersonItem.origin['properties'] = {};
|
||||||
workflowPersonItem.origin.properties.assignValue = workflowPersonItem.assignValue;
|
workflowPersonItem.origin.properties.assignValue = workflowPersonItem.assignValue;
|
||||||
if (workflowPersonItem.assignValue.length === 0) {
|
if (workflowPersonItem.assignValue.length === 0) {
|
||||||
window.vtoast.fail({message: `${workflowPersonItem.label}必填!`});
|
window.vtoast.fail({message: `${workflowPersonItem.label}必填!`});
|
||||||
|
|||||||
Reference in new issue
Block a user