Compare commits
11 Commits
fbdb0819a9
...
e74c822062
| Author | SHA1 | Date |
|---|---|---|
|
|
e74c822062 | |
|
|
30f0e72b0c | |
|
|
01b15a2b9f | |
|
|
3c954a4412 | |
|
|
41cc452d17 | |
|
|
fc4d5636c2 | |
|
|
1a3eb97292 | |
|
|
7db5a9d716 | |
|
|
a83e05d21c | |
|
|
738b9a2f0e | |
|
|
56785997ec |
|
|
@ -7,29 +7,27 @@
|
|||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"files.eol": "\n",
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/.DS_Store": true,
|
||||
"**/.git": true,
|
||||
"**/.gitignore": true,
|
||||
"**/.idea": true,
|
||||
"**/.svn": true,
|
||||
"**/.vscode": false,
|
||||
"**/.yarn": true,
|
||||
"**/*.log": true,
|
||||
"**/*.log*": true,
|
||||
"**/bower_components": true,
|
||||
"**/dist": true,
|
||||
"**/elehukouben": true,
|
||||
"**/.git": true,
|
||||
"**/.gitignore": true,
|
||||
"**/.svn": true,
|
||||
"**/.DS_Store": true,
|
||||
"**/.idea": true,
|
||||
"**/.vscode": false,
|
||||
"**/yarn.lock": true,
|
||||
"**/node_modules": true,
|
||||
"**/tmp": true,
|
||||
"out": true,
|
||||
"dist": true,
|
||||
"node_modules": true,
|
||||
"**/yarn.lock": true,
|
||||
"CHANGELOG.md": true,
|
||||
"dist": true,
|
||||
"examples": true,
|
||||
"out": true,
|
||||
"res": true,
|
||||
"screenshots": true,
|
||||
"yarn-error.log": true,
|
||||
"**/.yarn": true
|
||||
"yarn-error.log": true
|
||||
},
|
||||
"files.exclude": {
|
||||
"**/.cache": true,
|
||||
|
|
|
|||
|
|
@ -49,13 +49,13 @@
|
|||
</a-table>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<a-modal width="60%" v-model:open="data.postOpen" title="添加岗位" @ok="postHandleOk">
|
||||
<a-modal width="60%" v-model:open="data.postOpen" title="添加岗位" @ok="postHandleOk" :destroyOnClose="true">
|
||||
<SelectPos ref="posRef"></SelectPos>
|
||||
</a-modal>
|
||||
<a-modal width="60%" v-model:open="data.roleOpen" title="添加角色" @ok="roleHandleOk">
|
||||
<a-modal width="60%" v-model:open="data.roleOpen" title="添加角色" @ok="roleHandleOk" :destroyOnClose="true">
|
||||
<SelectRole ref="roleRef"></SelectRole>
|
||||
</a-modal>
|
||||
<a-modal width="60%" v-model:open="data.accountOpen" title="添加角色" @ok="accountHandleOk">
|
||||
<a-modal width="60%" v-model:open="data.accountOpen" title="添加角色" @ok="accountHandleOk" :destroyOnClose="true">
|
||||
<SelectAccount ref="accountRef"></SelectAccount>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@
|
|||
</template>
|
||||
</a-table>
|
||||
</a-form>
|
||||
<a-modal width="40%" v-model:open="data.formulaVisible" title="添加公式条件" @ok="handleFormulaOk">
|
||||
<a-modal width="40%" v-model:open="data.formulaVisible" title="添加公式条件" @ok="handleFormulaOk" :destroyOnClose="true">
|
||||
<conditionFormula ref="conditionFormulaRef"></conditionFormula>
|
||||
</a-modal>
|
||||
<a-modal width="40%" v-model:open="data.sqlVisible" title="添加sql条件" @ok="handleSqlOk">
|
||||
<a-modal width="40%" v-model:open="data.sqlVisible" title="添加sql条件" @ok="handleSqlOk" :destroyOnClose="true">
|
||||
<conditionSql ref="conditionSqlRef"></conditionSql>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<a-input v-model:value="formData.value" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<a-modal width="60%" wrap-class-name="full-modal" v-model:open="data.tableOpen" title="选择数据表" @ok="tableHandleOk">
|
||||
<a-modal width="60%" wrap-class-name="full-modal" v-model:open="data.tableOpen" title="选择数据表" @ok="tableHandleOk" :destroyOnClose="true">
|
||||
<SelectTable ref="tableRef" :dbCode = 'formData.dbCode'></SelectTable>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@
|
|||
</template>
|
||||
</a-table>
|
||||
</a-form>
|
||||
<a-modal width="40%" v-model:open="data.formulaVisible" title="添加公式条件" @ok="handleFormulaOk">
|
||||
<a-modal width="40%" v-model:open="data.formulaVisible" title="添加公式条件" @ok="handleFormulaOk" :destroyOnClose="true">
|
||||
<conditionFormula ref="conditionFormulaRef"></conditionFormula>
|
||||
</a-modal>
|
||||
<a-modal width="40%" v-model:open="data.sqlVisible" title="添加sql条件" @ok="handleSqlOk">
|
||||
<a-modal width="40%" v-model:open="data.sqlVisible" title="添加sql条件" @ok="handleSqlOk" :destroyOnClose="true">
|
||||
<conditionSql ref="conditionSqlRef"></conditionSql>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@
|
|||
v-model:open="data.formOpen"
|
||||
title="选择表单"
|
||||
@ok="formHandleOk"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<SelectForm ref="formRef"></SelectForm>
|
||||
</a-modal>
|
||||
|
|
|
|||
|
|
@ -128,7 +128,8 @@
|
|||
<a-input v-model:value="record[column.dataIndex]" placeholder="请输入" @change="updateWfData('btnlist')"/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="['isNextAuditor', 'isSign','hidden'].includes(column.dataIndex)">
|
||||
<!-- 删除了签章的switch -->
|
||||
<template v-else-if="['isNextAuditor', 'hidden'].includes(column.dataIndex)">
|
||||
<div>
|
||||
<a-switch v-model:checked="record[column.dataIndex]" @change="updateWfData('btnlist')"/>
|
||||
</div>
|
||||
|
|
@ -198,23 +199,23 @@
|
|||
</a-collapse>
|
||||
|
||||
</a-form>
|
||||
<a-modal width="60%" wrap-class-name="full-modal" v-model:open="data.postOpen" title="添加岗位" @ok="postHandleOk">
|
||||
<a-modal width="60%" wrap-class-name="full-modal" v-model:open="data.postOpen" title="添加岗位" @ok="postHandleOk" :destroyOnClose="true">
|
||||
<SelectPos ref="posRef"></SelectPos>
|
||||
</a-modal>
|
||||
<a-modal width="60%" wrap-class-name="full-modal" v-model:open="data.roleOpen" title="添加角色" @ok="roleHandleOk">
|
||||
<a-modal width="60%" wrap-class-name="full-modal" v-model:open="data.roleOpen" title="添加角色" @ok="roleHandleOk" :destroyOnClose="true">
|
||||
<SelectRole ref="roleRef"></SelectRole>
|
||||
</a-modal>
|
||||
<a-modal width="60%" wrap-class-name="full-modal" v-model:open="data.accountOpen" title="添加用户"
|
||||
@ok="accountHandleOk">
|
||||
@ok="accountHandleOk" :destroyOnClose="true">
|
||||
<SelectAccount ref="accountRef"></SelectAccount>
|
||||
</a-modal>
|
||||
<a-modal width="40%" v-model:open="data.levelOpen" title="添加上下级" @ok="levelHandleOk">
|
||||
<a-modal width="40%" v-model:open="data.levelOpen" title="添加上下级" @ok="levelHandleOk" :destroyOnClose="true">
|
||||
<AuditorLevel ref="levelRef"></AuditorLevel>
|
||||
</a-modal>
|
||||
<a-modal width="40%" v-model:open="data.nodeOpen" title="流程节点选择" @ok="nodeHandleOk">
|
||||
<a-modal width="40%" v-model:open="data.nodeOpen" title="流程节点选择" @ok="nodeHandleOk" :destroyOnClose="true">
|
||||
<AuditorNode ref="nodeRef" :id="nodeId"></AuditorNode>
|
||||
</a-modal>
|
||||
<a-modal width="40%" v-model:open="data.auditorSqlOpen" title="数据表字段选择" @ok="sqlHandleOk">
|
||||
<a-modal width="40%" v-model:open="data.auditorSqlOpen" title="数据表字段选择" @ok="sqlHandleOk" :destroyOnClose="true">
|
||||
<AuditorSql ref="sqlRef" ></AuditorSql>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
@ -263,10 +264,10 @@
|
|||
title: '隐藏',
|
||||
dataIndex: 'hidden',
|
||||
},
|
||||
{
|
||||
title: '签章',
|
||||
dataIndex: 'isSign',
|
||||
},
|
||||
// {
|
||||
// title: '签章',
|
||||
// dataIndex: 'isSign',
|
||||
// },
|
||||
{
|
||||
title: '下一审批人',
|
||||
dataIndex: 'isNextAuditor',
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
v-model:open="data.tableOpen"
|
||||
title="选择数据表"
|
||||
@ok="tableHandleOk"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<SelectTable ref="tableRef"></SelectTable>
|
||||
</a-modal>
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
* @author 火星渣渣灰 2022-01-01
|
||||
*/
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
// .w-full {
|
||||
// width: 100%;
|
||||
// }
|
||||
|
||||
.f-pt {
|
||||
padding-top: 10px;
|
||||
|
|
@ -198,10 +198,6 @@
|
|||
|
||||
.f-usn {
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.f-push-5-b {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div> </div>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div> </div>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div> </div>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div> </div>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div> </div>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div> </div>
|
||||
</template>
|
||||
|
|
@ -1,15 +1,11 @@
|
|||
<template>
|
||||
<div class="p-4">
|
||||
<Mars></Mars>
|
||||
<!-- <Mars></Mars> -->
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onUnmounted } from 'vue';
|
||||
import Mars from '../../../mars/views/index.vue'
|
||||
// import Mars from '../../../mars/views/index.vue'
|
||||
|
||||
|
||||
|
||||
onUnmounted(()=>{
|
||||
|
||||
})
|
||||
</script>
|
||||
onUnmounted(() => {});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
const { string } = require("vue-types")
|
||||
const { string } = require('vue-types');
|
||||
|
||||
|
||||
const handleFindObjectArrayItem = (array:Array<Object>,key:string,val:string):Object|null=>{
|
||||
let obj:Object | null = null;
|
||||
for(let i:number = 0;i<array.length;i++)
|
||||
{
|
||||
if(array[i][key] == val)
|
||||
{
|
||||
const handleFindObjectArrayItem = (
|
||||
array: Array<Object>,
|
||||
key: string,
|
||||
val: string,
|
||||
): Object | null => {
|
||||
let obj: Object | null = null;
|
||||
for (let i: number = 0; i < array.length; i++) {
|
||||
if (array[i][key] == val) {
|
||||
obj = array[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div> </div>
|
||||
</template>
|
||||
|
|
@ -129,6 +129,7 @@
|
|||
watch(
|
||||
() => handleNextStepsData, // 点击下一步按钮传递的参数
|
||||
(newVal) => {
|
||||
console.log('下一步', newVal);
|
||||
FieldTableOptions.value = [];
|
||||
if (newVal && newVal.value && newVal.value.scheme && newVal.value.scheme.scheme) {
|
||||
receivedData.value = JSON.parse(newVal.value.scheme.scheme);
|
||||
|
|
@ -139,6 +140,7 @@
|
|||
label: item.name,
|
||||
});
|
||||
});
|
||||
console.log('receivedData.value', receivedData.value);
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true },
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@
|
|||
visible: false,
|
||||
fApi: {} as IVFormMethods,
|
||||
});
|
||||
console.log('jsonModal',jsonModal)
|
||||
console.log('state',state)
|
||||
//console.log('jsonModal',jsonModal);
|
||||
//console.log('state',state);
|
||||
/**
|
||||
* 显示Json数据弹框
|
||||
* @param jsonData
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
||||
<BasicTree
|
||||
class="w-1/4 xl:w-1/5 m-4 mr-0 overflow-hidden bg-white"
|
||||
class="w-1/4 m-4 mr-0 overflow-hidden bg-white xl:w-1/5"
|
||||
v-if="treeVisible"
|
||||
ref="asyncExpandTreeRef"
|
||||
:title="treeTitle"
|
||||
|
|
@ -28,13 +28,13 @@
|
|||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, nextTick, unref } from 'vue';
|
||||
import { onMounted, ref, nextTick, unref, h } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { BasicTable, useTable, BasicColumn } from '@/components/Table';
|
||||
import { BasicTree, TreeItem, TreeActionItem, TreeActionType } from '@/components/Tree';
|
||||
import { getFormsDesignData, getFormsPageData, delFormsData } from '@/api/formrender/index';
|
||||
import { getOutKeyList } from '@/api/formdesign/index';
|
||||
import { searchFormSchema } from './index.data';
|
||||
// import { searchFormSchema } from './index.data';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { IFormConfig } from '../../form-design/typings/v-form-component';
|
||||
|
|
@ -115,8 +115,6 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
console.log('chlidKey', chlidKey);
|
||||
rel.formInfo.schemas.forEach((item) => {
|
||||
if (
|
||||
item.componentProps.dataTable == val.name &&
|
||||
|
|
@ -283,6 +281,21 @@
|
|||
});
|
||||
});
|
||||
}
|
||||
callColumns.forEach((item) => {
|
||||
formObj.formInfo.schemas.forEach((val) => {
|
||||
if (item.dataIndex == val.field && val.componentProps.options) {
|
||||
item.customRender = ({ record }) => {
|
||||
const text: any = val.componentProps.options.filter(
|
||||
(price) => price.value == record[val.field],
|
||||
);
|
||||
if (text[0]) {
|
||||
return h(() => text[0].label);
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
console.log('callColumns', callColumns);
|
||||
setColumns(callColumns);
|
||||
reload();
|
||||
if (columnObj.left.options.length > 0) {
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@
|
|||
createConfirm({
|
||||
iconType: 'info',
|
||||
title: '删除',
|
||||
content: '确定要表单当前按钮吗?',
|
||||
content: '确定要删除当前表单吗?',
|
||||
onOk: async () => {
|
||||
const data = await fun_DeleteForm(query);
|
||||
if (data) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
);
|
||||
|
||||
// 初始数据
|
||||
const pageActiveName = 'tab01';
|
||||
let pageActiveName = 'tab01';
|
||||
// 左侧树形设置tree
|
||||
const colslist = ref([]);
|
||||
// 列表设置tree
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<!-- 预览弹窗 -->
|
||||
<VFormPreview ref="eFormPreview" :formConfig="formConfig" />
|
||||
<!-- 历史记录列表弹窗 -->
|
||||
<HistoryModal @register="historyModal" />
|
||||
<HistoryModal @register="historyModal" :closeFunc="handleCloseFunc" />
|
||||
<FormModal @submitsuccess="submitsuccess" @register="registerModal" v-if="formModalVisible" />
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
// 表单列表新增和编辑弹窗
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
// 历史记录列表弹窗
|
||||
const [historyModal, { openModal: handleHistoryModal }] = useModal();
|
||||
const [historyModal, { openModal: handleHistoryModal, closeModal }] = useModal();
|
||||
|
||||
// 树ref
|
||||
const childRef = ref<any>();
|
||||
|
|
@ -251,6 +251,14 @@
|
|||
return '';
|
||||
}
|
||||
|
||||
// 历史弹窗点击关闭
|
||||
function handleCloseFunc() {
|
||||
closeModal();
|
||||
clearSelectedRowKeys();
|
||||
reload();
|
||||
return true;
|
||||
}
|
||||
|
||||
// 上级
|
||||
const treeData = ref<TreeItem[]>([]);
|
||||
async function fetch() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { BasicColumn } from '@/components/Table';
|
||||
import { h } from 'vue';
|
||||
import { Tag } from 'ant-design-vue';
|
||||
|
||||
export function getHistoryColumns(): BasicColumn[] {
|
||||
return [
|
||||
|
|
@ -41,6 +43,17 @@ export function getHistoryColumns(): BasicColumn[] {
|
|||
title: '状态',
|
||||
dataIndex: 'type',
|
||||
width: 80,
|
||||
customRender: ({ record }) => {
|
||||
if (!record.type || record.type === 2) {
|
||||
const color = 'gray';
|
||||
const text = '草稿';
|
||||
return h(Tag, { color: color }, () => text);
|
||||
} else {
|
||||
const color = 'green';
|
||||
const text = '正式';
|
||||
return h(Tag, { color: color }, () => text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '当前版本',
|
||||
|
|
|
|||
|
|
@ -222,7 +222,9 @@
|
|||
let loginUser = localStorage.getItem('fireUserLoginName');
|
||||
saveFormDatas.value.info = data.form;
|
||||
saveFormDatas.value.info.createUserName = loginUser;
|
||||
saveFormDatas.value.info.type = 1;
|
||||
saveFormDatas.value.scheme.scheme = JSON.stringify(schems);
|
||||
saveFormDatas.value.scheme.type = 1;
|
||||
} else {
|
||||
//编辑
|
||||
let schems = JSON.parse(saveFormDatas.value.scheme.scheme);
|
||||
|
|
@ -233,7 +235,10 @@
|
|||
saveFormDatas.value.info.name = data.form.name;
|
||||
saveFormDatas.value.info.DbCode = data.form.DbCode;
|
||||
saveFormDatas.value.info.formType = data.form.formType;
|
||||
saveFormDatas.value.info.createUserName = data.form.createUserName;
|
||||
saveFormDatas.value.info.createDate = data.form.createDate;
|
||||
saveFormDatas.value.scheme.scheme = JSON.stringify(schems);
|
||||
saveFormDatas.value.scheme.type = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
<template>
|
||||
<div class="design-box">
|
||||
<v-form-designer></v-form-designer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
import { onMounted, ref, nextTick, unref,reactive } from 'vue';
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.design-box{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -234,6 +234,18 @@ export const formSchema: FormSchema[] = [
|
|||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'createUserName',
|
||||
component: 'Input',
|
||||
label: '创建人',
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
field: 'createDate',
|
||||
component: 'Input',
|
||||
label: '创建时间',
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
field: 'field1',
|
||||
label: '',
|
||||
|
|
|
|||
|
|
@ -32,6 +32,20 @@
|
|||
</Row>
|
||||
</List>
|
||||
</div>
|
||||
<a-modal
|
||||
width="100%"
|
||||
wrap-class-name="full-modal"
|
||||
v-model:open="previewOpen"
|
||||
title="流程设计"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<template #footer> </template>
|
||||
<Preview
|
||||
ref="posRef"
|
||||
:code="code"
|
||||
@closeModel="closeMolder"
|
||||
></Preview>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
|
@ -41,11 +55,19 @@
|
|||
import { Card, Row, Col, List } from 'ant-design-vue';
|
||||
import { getInfoList } from '@/api/sys/WFSchemeInfo';
|
||||
import { useGo } from '@/hooks/web/usePage';
|
||||
import Preview from './preview.vue'
|
||||
const go = useGo();
|
||||
const prefixCls = 'list-card';
|
||||
let cardList = ref();
|
||||
const previewOpen = ref(false)
|
||||
const code = ref('')
|
||||
function launch(code) {
|
||||
go('/dashboard/create_preview/add?code=' + code);
|
||||
previewOpen.value = true
|
||||
code.value = code
|
||||
// go('/dashboard/create_preview/add?code=' + code);
|
||||
}
|
||||
function closeMolder(){
|
||||
previewOpen.value = false;
|
||||
}
|
||||
async function getList() {
|
||||
let data = await getInfoList();
|
||||
|
|
@ -135,3 +157,19 @@
|
|||
height: 2em;
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.full-modal {
|
||||
.ant-modal {
|
||||
max-width: 100%;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.ant-modal-content {
|
||||
height: calc(100vh);
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
height: 85%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
</a-tab-pane>
|
||||
<a-tab-pane key="flow" tab="流程信息" force-render>
|
||||
<div class="process-design" :style="'display: flex; height:' + designerData.height">
|
||||
<process-viewer :key="`designer-${code}`" :xml="flowContent" v-if="processVisble"/>
|
||||
<process-viewer :key="`designer-${code}`" :xml="flowContent" v-if="processVisble" />
|
||||
<div
|
||||
class="form-box"
|
||||
v-if="
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
import { getDetail } from '@/api/sys/WFSchemeInfo';
|
||||
import { create, saveDraft } from '@/api/sys/WFProcess';
|
||||
import { getLoadMyUserList } from '@/api/sys/WFDelegate';
|
||||
import {functionsaveForm} from '@/api/demo/formScheme'
|
||||
import { functionsaveForm } from '@/api/demo/formScheme';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useMultipleTabStore } from '@/store/modules/multipleTab';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
|
@ -104,7 +104,12 @@
|
|||
const labelCol = { span: 7 };
|
||||
const wrapperCol = { span: 13 };
|
||||
const formVisble = ref(false);
|
||||
const processVisble = ref(false)
|
||||
const processVisble = ref(false);
|
||||
const props = defineProps({
|
||||
code:String,
|
||||
})
|
||||
const emit = defineEmits(['closeModel']);
|
||||
|
||||
// 表单实例
|
||||
const eFormPreview = ref<null | IToolbarMethods>(null);
|
||||
// 表单数据
|
||||
|
|
@ -149,9 +154,9 @@
|
|||
title: [{ required: true, message: '请选择流程标题', trigger: 'blur' }],
|
||||
userId: [{ required: true, message: '请选择流程发起人', trigger: 'blur' }],
|
||||
});
|
||||
function changeActive(activeKey){
|
||||
if(activeKey == 'flow'){
|
||||
processVisble.value=true
|
||||
function changeActive(activeKey) {
|
||||
if (activeKey == 'flow') {
|
||||
processVisble.value = true;
|
||||
}
|
||||
}
|
||||
async function getForm() {
|
||||
|
|
@ -167,7 +172,7 @@
|
|||
});
|
||||
}
|
||||
async function getDetailInfo() {
|
||||
let data = await getDetail({ code: code });
|
||||
let data = await getDetail({ code: props.code });
|
||||
flowContent.value = data.scheme.flowContent;
|
||||
formData.userId = userInfo.id;
|
||||
let content = JSON.parse(data.scheme.content);
|
||||
|
|
@ -176,7 +181,7 @@
|
|||
if (currentNode.authFields.length > 0) {
|
||||
formVisble.value = true;
|
||||
} else {
|
||||
processVisble.value = true
|
||||
processVisble.value = true;
|
||||
activeName.value = 'flow';
|
||||
}
|
||||
formConfig.value = currentNode.authFields;
|
||||
|
|
@ -188,13 +193,13 @@
|
|||
}
|
||||
async function getDelegateUsers() {
|
||||
const data = await getLoadMyUserList({
|
||||
code: code,
|
||||
code: props.code,
|
||||
});
|
||||
designerData.delegateUsers = data;
|
||||
}
|
||||
async function handleSaveDraft() {
|
||||
var querys = {
|
||||
schemeCode: designerData.isDraft ? '' : code,
|
||||
schemeCode: designerData.isDraft ? '' : props.code,
|
||||
userId: formData.userId,
|
||||
title: formData.title,
|
||||
processId: buildGUID(),
|
||||
|
|
@ -216,28 +221,39 @@
|
|||
pkey: designerData.formCurrentNode.formRelationId,
|
||||
pkeyValue: processId,
|
||||
};
|
||||
formBoxRef.value
|
||||
.getForm()
|
||||
.then(async (res) => {
|
||||
res[designerData.formCurrentNode.formRelationId] = processId;
|
||||
console.log(res);
|
||||
for(var item in res){
|
||||
console.log(res[item])
|
||||
if(res[item] == undefined){
|
||||
res[item] = ''
|
||||
// 有表单内容,先存表单信息
|
||||
if (formVisble.value) {
|
||||
if (!designerData.formCurrentNode.formRelationId) {
|
||||
return createMessage.error('请设置表单和流程关联字段');
|
||||
}
|
||||
formBoxRef.value
|
||||
.getForm()
|
||||
.then(async (res) => {
|
||||
res[designerData.formCurrentNode.formRelationId] = processId;
|
||||
console.log(res);
|
||||
for (var item in res) {
|
||||
if (res[item] == undefined) {
|
||||
res[item] = '';
|
||||
if (item.search('_input_guid') != -1) {
|
||||
res[item] = buildGUID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
querys.data = JSON.stringify(res);
|
||||
console.log(querys);
|
||||
const formValue = await functionsaveForm(querys)
|
||||
if(formValue){
|
||||
handleCreateFlow(processId);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
return;
|
||||
});
|
||||
querys.data = JSON.stringify(res);
|
||||
console.log(querys);
|
||||
const formValue = await functionsaveForm(querys);
|
||||
if (formValue) {
|
||||
handleCreateFlow(processId);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
activeName.value = 'form';
|
||||
return;
|
||||
});
|
||||
} else {
|
||||
handleCreateFlow(processId);
|
||||
}
|
||||
}
|
||||
async function handleCreateFlow(processId) {
|
||||
var querys = {
|
||||
|
|
@ -262,12 +278,13 @@
|
|||
}
|
||||
|
||||
function closePreview() {
|
||||
if (!code) {
|
||||
tabStore.closeTabByKey('/dashboard/create_preview/add', router);
|
||||
} else {
|
||||
// /dashboard/create_preview/add?code=测试1
|
||||
tabStore.closeTabByKey('/dashboard/create_preview/add?code=' + code, router);
|
||||
}
|
||||
emit('closeModel')
|
||||
// if (!code) {
|
||||
// tabStore.closeTabByKey('/dashboard/create_preview/add', router);
|
||||
// } else {
|
||||
// // /dashboard/create_preview/add?code=测试1
|
||||
// tabStore.closeTabByKey('/dashboard/create_preview/add?code=' + code, router);
|
||||
// }
|
||||
}
|
||||
onBeforeMount(() => {
|
||||
getDetailInfo();
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
:pageFlow="flowContent"
|
||||
:pageView="content"
|
||||
:pageType="'detail'"
|
||||
:destroyOnClose="true"
|
||||
/>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,17 +24,28 @@
|
|||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
||||
<a-modal
|
||||
width="100%"
|
||||
wrap-class-name="full-modal"
|
||||
v-model:open="auditOpen"
|
||||
title="详情"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<template #footer>
|
||||
</template>
|
||||
<Look ref="posRef" :processId="processId"></Look>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, h } from 'vue';
|
||||
import { reactive, h ,ref} from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { getLoadMyCompletedPage } from '@/api/sys/WFTask';
|
||||
import { revokeAudit } from '@/api/sys/WFProcess';
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import Look from "./process/look.vue"
|
||||
import { useGo } from '@/hooks/web/usePage';
|
||||
const go = useGo();
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
|
|
@ -43,7 +54,8 @@
|
|||
import { flowStore } from '@/store/modules/flow';
|
||||
const flowWfDataStore = flowStore();
|
||||
const searchInfo = reactive<Recordable>({});
|
||||
|
||||
const auditOpen = ref(false)
|
||||
const processId = ref('')
|
||||
const [registerTable, { reload }] = useTable({
|
||||
api: getLoadMyCompletedPage,
|
||||
columns: [
|
||||
|
|
@ -124,7 +136,9 @@
|
|||
let scheme = JSON.parse(data.scheme.content);
|
||||
let wfData = scheme.wfData;
|
||||
flowWfDataStore.setWfDataAll(wfData);
|
||||
go('/dashboard/task_look_preview/detail?processId=' + record.processId);
|
||||
processId.value = record.processId
|
||||
auditOpen.value=true
|
||||
// go('/dashboard/task_look_preview/detail?processId=' + record.processId);
|
||||
}
|
||||
async function handleRevocation(record) {
|
||||
if(record.isFinished == 1){
|
||||
|
|
@ -142,3 +156,19 @@
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.full-modal {
|
||||
.ant-modal {
|
||||
max-width: 100%;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.ant-modal-content {
|
||||
height: calc(100vh);
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
height: 85%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -16,17 +16,31 @@
|
|||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<a-modal
|
||||
width="100%"
|
||||
wrap-class-name="full-modal"
|
||||
v-model:open="auditOpen"
|
||||
title="详情"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<template #footer>
|
||||
</template>
|
||||
<Look ref="posRef" :processId="processId"></Look>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive ,h} from 'vue'
|
||||
import { reactive ,h,ref} from 'vue'
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { getLoadMyDelegatePage } from '@/api/sys/WFTask'
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import Look from "./process/look.vue"
|
||||
import { useGo } from '@/hooks/web/usePage';
|
||||
const go = useGo();
|
||||
const auditOpen = ref(false)
|
||||
const processId = ref('')
|
||||
const searchInfo = reactive < Recordable > ({});
|
||||
const [registerTable, { reload}] = useTable({
|
||||
api: getLoadMyDelegatePage,
|
||||
|
|
@ -103,7 +117,9 @@
|
|||
},
|
||||
});
|
||||
function handleDetail(record){
|
||||
go('/dashboard/task_look_preview/detail?processId=' + record.id);
|
||||
processId.value = record.id
|
||||
auditOpen.value=true
|
||||
// go('/dashboard/task_look_preview/detail?processId=' + record.id);
|
||||
}
|
||||
function handleRevocation(record){
|
||||
console.log(record)
|
||||
|
|
@ -112,4 +128,20 @@
|
|||
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
<style lang="less">
|
||||
.full-modal {
|
||||
.ant-modal {
|
||||
max-width: 100%;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.ant-modal-content {
|
||||
height: calc(100vh);
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
height: 85%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -26,20 +26,33 @@
|
|||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<a-modal
|
||||
width="100%"
|
||||
wrap-class-name="full-modal"
|
||||
v-model:open="auditOpen"
|
||||
title="详情"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<template #footer>
|
||||
</template>
|
||||
<Look ref="posRef" :processId="processId"></Look>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive } from 'vue'
|
||||
import { reactive ,ref} from 'vue'
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { getLoadMyDraftPage, deleteDraft } from '@/api/sys/WFProcess'
|
||||
const searchInfo = reactive < Recordable > ({});
|
||||
import { useGo } from '@/hooks/web/usePage';
|
||||
import Look from "./process/look.vue"
|
||||
const go = useGo();
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
const auditOpen = ref(false)
|
||||
const processId = ref('')
|
||||
const [registerTable, { reload }] = useTable({
|
||||
api: getLoadMyDraftPage,
|
||||
columns: [
|
||||
|
|
@ -109,7 +122,25 @@
|
|||
}
|
||||
}
|
||||
function handleDetail(record) {
|
||||
go('/dashboard/task_look_preview/detail?processId=' + record.id);
|
||||
processId.value = record.id
|
||||
auditOpen.value=true
|
||||
// go('/dashboard/task_look_preview/detail?processId=' + record.id);
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
<style lang="less">
|
||||
.full-modal {
|
||||
.ant-modal {
|
||||
max-width: 100%;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.ant-modal-content {
|
||||
height: calc(100vh);
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
height: 85%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<!-- <a-button type="primary" @click="handleCreate"> 新增 </a-button> -->
|
||||
<PermissionBtn @btnEvent="onBtnClicked"></PermissionBtn>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }" >
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
|
@ -32,20 +32,34 @@
|
|||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<a-modal
|
||||
width="100%"
|
||||
wrap-class-name="full-modal"
|
||||
v-model:open="auditOpen"
|
||||
title="详情"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<template #footer>
|
||||
</template>
|
||||
<Look ref="posRef" :processId="processId"></Look>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, h } from 'vue';
|
||||
import { reactive, h ,ref} from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { getLoadMyPage, urge, revoke, revokeAudit } from '@/api/sys/WFProcess';
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import Look from "./process/look.vue"
|
||||
const { createMessage } = useMessage();
|
||||
const searchInfo = reactive<Recordable>({});
|
||||
import { useGo } from '@/hooks/web/usePage';
|
||||
const go = useGo();
|
||||
const auditOpen = ref(false)
|
||||
const processId = ref('')
|
||||
const [registerTable, { reload }] = useTable({
|
||||
api: getLoadMyPage,
|
||||
columns: [
|
||||
|
|
@ -122,13 +136,15 @@
|
|||
},
|
||||
});
|
||||
function handleDetail(record) {
|
||||
go('/dashboard/task_look_preview/detail?processId=' + record.id);
|
||||
processId.value = record.id
|
||||
auditOpen.value=true
|
||||
// go('/dashboard/task_look_preview/detail?processId=' + record.id);
|
||||
}
|
||||
async function handleUrge(record) {
|
||||
var query = {
|
||||
id: record.id,
|
||||
};
|
||||
if(record.isStart == 1 && record.isCancel == 0){
|
||||
if (record.isStart == 1 && record.isCancel == 0) {
|
||||
return createMessage.warning('重新提交和结束的流程不能催办');
|
||||
}
|
||||
const data = await urge(query);
|
||||
|
|
@ -140,14 +156,14 @@
|
|||
}
|
||||
}
|
||||
async function handleRevocation(record) {
|
||||
console.log(record)
|
||||
console.log(record);
|
||||
var query = {
|
||||
taskId: record.id,
|
||||
id: record.processId,
|
||||
};
|
||||
if (record.isStart == 0) {
|
||||
const data = await revoke({
|
||||
id:record.id
|
||||
id: record.id,
|
||||
});
|
||||
if (data) {
|
||||
reload();
|
||||
|
|
@ -163,8 +179,24 @@
|
|||
} else {
|
||||
return createMessage.error('撤销失败');
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return createMessage.warning('重新提交和结束的流程不能撤销');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.full-modal {
|
||||
.ant-modal {
|
||||
max-width: 100%;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.ant-modal-content {
|
||||
height: calc(100vh);
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
height: 85%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<PageWrapper :class="prefixCls">
|
||||
<div class="btn-box">
|
||||
<a-button type="primary" @click="confimReading" class="ml-2" v-if="isRead == 1"
|
||||
<a-button type="primary" @click="confimReading" class="ml-2" v-if="props.isRead == 1"
|
||||
>确认阅读
|
||||
</a-button>
|
||||
<a-button type="primary" @click="closePage" class="ml-2" danger>关闭 </a-button>
|
||||
|
|
@ -11,7 +11,14 @@
|
|||
<a-layout-content>
|
||||
<a-tabs v-model:activeKey="activeName" @change="changeActive">
|
||||
<a-tab-pane key="form" tab="表单信息" v-if="formVisble">
|
||||
<FormViewer ref="formBoxRef" :formConfig="formConfig" :processId="designerData.process.id" :formVerison="designerData.formCurrentNode.formVerison" :formRelationId="designerData.formCurrentNode.formRelationId" v-if="formVisble"></FormViewer>
|
||||
<FormViewer
|
||||
ref="formBoxRef"
|
||||
:formConfig="formConfig"
|
||||
:processId="designerData.process.id"
|
||||
:formVerison="designerData.formCurrentNode.formVerison"
|
||||
:formRelationId="designerData.formCurrentNode.formRelationId"
|
||||
v-if="formVisble"
|
||||
></FormViewer>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="flow" tab="流程信息(审核)" force-render>
|
||||
<div class="process-design" :style="'display: flex; height:' + designerData.height">
|
||||
|
|
@ -28,43 +35,43 @@
|
|||
</a-tabs>
|
||||
</a-layout-content>
|
||||
<!-- <a-divider type="vertical" /> -->
|
||||
<a-layout-sider v-if="isRead == 0">
|
||||
<a-tabs v-model:activeKey="auditName">
|
||||
<a-tab-pane key="audit" tab="审批栏">
|
||||
<div class="approval-column">
|
||||
<a-form
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
labelAlign="left"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-item :label="designerData.isCreateAgain ? '备注' : '审批意见'" name="des">
|
||||
</a-form-item>
|
||||
<a-form-item label="">
|
||||
<a-textarea
|
||||
v-model:value="formData.des"
|
||||
placeholder="请输入"
|
||||
:auto-size="{ minRows: 5, maxRows: 8 }"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="" class="l-task-btns">
|
||||
<a-button
|
||||
v-for="(btn, index) in designerData.taskBtns"
|
||||
:key="index"
|
||||
type="primary"
|
||||
:color="btn.type"
|
||||
@click="handleBtnClick(btn)"
|
||||
>{{ btn.name }}</a-button
|
||||
>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<auditInfo :data="designerData.userLogs"></auditInfo>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-layout-sider>
|
||||
<a-layout-sider v-if="props.isRead == 0">
|
||||
<a-tabs v-model:activeKey="auditName">
|
||||
<a-tab-pane key="audit" tab="审批栏">
|
||||
<div class="approval-column">
|
||||
<a-form
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
labelAlign="left"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-item :label="designerData.isCreateAgain ? '备注' : '审批意见'" name="des">
|
||||
</a-form-item>
|
||||
<a-form-item label="">
|
||||
<a-textarea
|
||||
v-model:value="formData.des"
|
||||
placeholder="请输入"
|
||||
:auto-size="{ minRows: 5, maxRows: 8 }"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="" class="l-task-btns">
|
||||
<a-button
|
||||
v-for="(btn, index) in designerData.taskBtns"
|
||||
:key="index"
|
||||
type="primary"
|
||||
:color="btn.type"
|
||||
@click="handleBtnClick(btn)"
|
||||
>{{ btn.name }}</a-button
|
||||
>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<auditInfo :data="designerData.userLogs"></auditInfo>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-layout-sider>
|
||||
</a-layout>
|
||||
</a-layout>
|
||||
|
||||
|
|
@ -99,7 +106,7 @@
|
|||
import { useRoute } from 'vue-router';
|
||||
import { dateFormat } from '@/utils/base';
|
||||
import { flowStore } from '@/store/modules/flow';
|
||||
import {functionsaveForm} from '@/api/demo/formScheme'
|
||||
import { functionsaveForm } from '@/api/demo/formScheme';
|
||||
import { FormViewer } from '@/components/FormViewer';
|
||||
import {
|
||||
designerDataType,
|
||||
|
|
@ -117,6 +124,7 @@
|
|||
const tabStore = useMultipleTabStore();
|
||||
const router = useRouter();
|
||||
const formBoxRef = ref<any>();
|
||||
const emit = defineEmits(['closeModel']);
|
||||
|
||||
const flowWfDataStore = flowStore();
|
||||
const prefixCls = 'preview-box';
|
||||
|
|
@ -133,13 +141,19 @@
|
|||
const infoOpen = ref(true);
|
||||
const formVisble = ref(false);
|
||||
const processVisble = ref(false);
|
||||
const props = defineProps({
|
||||
processId:String,
|
||||
taskId:String,
|
||||
type:String,
|
||||
isRead:String,
|
||||
})
|
||||
const formData = ref({
|
||||
des: '',
|
||||
});
|
||||
const rules: any = ref({
|
||||
des: [{ required: true, message: '请填写审批意见', trigger: 'blur' }],
|
||||
});
|
||||
if (type == 4) {
|
||||
if (props.type == 4) {
|
||||
rules.value = {};
|
||||
}
|
||||
// 表单数据
|
||||
|
|
@ -184,10 +198,10 @@
|
|||
isNextAuditor: false,
|
||||
},
|
||||
wfData: [],
|
||||
isCreateAgain: type == 4 ? true : false,
|
||||
isCreateAgain: props.type == 4 ? true : false,
|
||||
selectRejectNodeVisible: false,
|
||||
selectSignVisible: false,
|
||||
formCurrentNode:{}
|
||||
formCurrentNode: {},
|
||||
});
|
||||
const activeName = ref('form');
|
||||
const auditName = ref('audit');
|
||||
|
|
@ -207,7 +221,7 @@
|
|||
|
||||
async function getTaskInfo() {
|
||||
let query: any = {
|
||||
id: taskId,
|
||||
id: props.taskId,
|
||||
};
|
||||
let data = await getBPMNTask(query);
|
||||
flowContent.value = data.flowContent;
|
||||
|
|
@ -225,7 +239,7 @@
|
|||
}
|
||||
designerData.formCurrentNode = currentNode;
|
||||
formConfig.value = currentNode.authFields;
|
||||
if (isRead == 0) {
|
||||
if (props.isRead == 0) {
|
||||
setLogsAndTasks(data.logs, data.tasks);
|
||||
getBtns();
|
||||
}
|
||||
|
|
@ -425,41 +439,48 @@
|
|||
designerData.taskBtns = btns;
|
||||
}
|
||||
async function handleBtnClick(btn) {
|
||||
// 验证审批栏必填项
|
||||
const data = await validateForm();
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
if(formVisble.value){
|
||||
// 有表单先提交表单数据
|
||||
if (formVisble.value) {
|
||||
var querys = {
|
||||
schemeId: designerData.formCurrentNode.formVerison,
|
||||
isUpdate: true,
|
||||
pkey: designerData.formCurrentNode.formRelationId,
|
||||
pkeyValue: processId,
|
||||
pkeyValue: props.processId,
|
||||
};
|
||||
formBoxRef.value
|
||||
.getForm()
|
||||
.then(async (res) => {
|
||||
res[designerData.formCurrentNode.formRelationId] = processId;
|
||||
res[designerData.formCurrentNode.formRelationId] = props.processId;
|
||||
console.log(res);
|
||||
querys.data = JSON.stringify(res);
|
||||
console.log(querys);
|
||||
const formValue = await functionsaveForm(querys)
|
||||
if(!formValue){
|
||||
return false
|
||||
const formValue = await functionsaveForm(querys);
|
||||
if (formValue) {
|
||||
handleSubmit(btn);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
activeName.value = 'form';
|
||||
return;
|
||||
});
|
||||
} else {
|
||||
handleSubmit(btn);
|
||||
}
|
||||
}
|
||||
async function handleSubmit(btn) {
|
||||
const currentBtn = btn;
|
||||
designerData.currentBtn = currentBtn;
|
||||
let res: any;
|
||||
switch (btn.code) {
|
||||
case 'learun_create':
|
||||
res = await createAgain({
|
||||
processId: processId,
|
||||
processId: props.processId,
|
||||
des: `重新提交${formData.value.des ? '-' : ''}${formData.value.des}`,
|
||||
});
|
||||
break;
|
||||
|
|
@ -474,7 +495,7 @@
|
|||
default:
|
||||
if (designerData.task.type == 6) {
|
||||
// 加签审核
|
||||
res = await signAudit(taskId, {
|
||||
res = await signAudit(props.taskId, {
|
||||
code: btn.code,
|
||||
name: btn.name,
|
||||
des: formData.value.des,
|
||||
|
|
@ -510,7 +531,7 @@
|
|||
// 获取接下来节点审核人
|
||||
if (designerData.currentBtn.isNextAuditor) {
|
||||
const res = await getLoadNextAuditors({
|
||||
processId: processId,
|
||||
processId: props.processId,
|
||||
nodeId: designerData.currentNode.id,
|
||||
});
|
||||
const nodeUserMap = res.data.data;
|
||||
|
|
@ -535,7 +556,7 @@
|
|||
return;
|
||||
}
|
||||
}
|
||||
const data = await audit(taskId, {
|
||||
const data = await audit(props.taskId, {
|
||||
code: designerData.currentBtn.code,
|
||||
name: designerData.currentBtn.name,
|
||||
des: formData.value.des,
|
||||
|
|
@ -548,20 +569,21 @@
|
|||
}
|
||||
}
|
||||
function closePage() {
|
||||
tabStore.closeTabByKey(
|
||||
'/dashboard/task_audit_preview/detail?processId=' +
|
||||
processId +
|
||||
'&taskId=' +
|
||||
taskId +
|
||||
'&type=' +
|
||||
type +
|
||||
'&isRead=' +
|
||||
isRead,
|
||||
router,
|
||||
);
|
||||
emit('closeModel')
|
||||
// tabStore.closeTabByKey(
|
||||
// '/dashboard/task_audit_preview/detail?processId=' +
|
||||
// processId +
|
||||
// '&taskId=' +
|
||||
// taskId +
|
||||
// '&type=' +
|
||||
// type +
|
||||
// '&isRead=' +
|
||||
// isRead,
|
||||
// router,
|
||||
// );
|
||||
}
|
||||
async function confimReading() {
|
||||
const data = await ReadFlow(taskId);
|
||||
const data = await ReadFlow(props.taskId);
|
||||
if (data) {
|
||||
closePage();
|
||||
return createMessage.success('成功');
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
&--item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<PageWrapper :class="prefixCls">
|
||||
<div class="btn-box">
|
||||
<!-- <div class="btn-box">
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="closePage"
|
||||
|
|
@ -8,18 +8,25 @@
|
|||
danger
|
||||
>关闭
|
||||
</a-button>
|
||||
</div>
|
||||
</div> -->
|
||||
<a-layout>
|
||||
<a-layout>
|
||||
<a-layout-content>
|
||||
<a-tabs v-model:activeKey="activeName" @change="changeActive">
|
||||
<a-tabs v-model:activeKey="activeName" @change="changeActive">
|
||||
<a-tab-pane key="form" tab="表单信息" v-if="formVisble">
|
||||
<FormViewer ref="formBoxRef" :formConfig="formConfig" :processId="designerData.process.id" :formVerison="designerData.formCurrentNode.formVerison" :formRelationId="designerData.formCurrentNode.formRelationId" v-if="formVisble"></FormViewer>
|
||||
<FormViewer
|
||||
ref="formBoxRef"
|
||||
:formConfig="formConfig"
|
||||
:processId="designerData.process.id"
|
||||
:formVerison="designerData.formCurrentNode.formVerison"
|
||||
:formRelationId="designerData.formCurrentNode.formRelationId"
|
||||
v-if="formVisble"
|
||||
></FormViewer>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="flow" tab="流程信息(审核)" force-render>
|
||||
<div class="process-design" :style="'display: flex; height:' + designerData.height">
|
||||
<process-viewer
|
||||
v-if="processVisble"
|
||||
v-if="processVisble"
|
||||
:key="`designer-${id}`"
|
||||
:events="['element.click']"
|
||||
@element-click="elementClick"
|
||||
|
|
@ -30,15 +37,15 @@
|
|||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-layout-content>
|
||||
<a-layout-sider v-if="designerData.userLogs.length > 0">
|
||||
<a-tabs v-model:activeKey="auditName">
|
||||
<a-tab-pane key="audit" tab="审批信息">
|
||||
<div class="approval-info">
|
||||
<auditInfo :data="designerData.userLogs"></auditInfo>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-layout-sider>
|
||||
<a-layout-sider v-if="designerData.userLogs.length > 0">
|
||||
<a-tabs v-model:activeKey="auditName">
|
||||
<a-tab-pane key="audit" tab="审批信息">
|
||||
<div class="approval-info">
|
||||
<auditInfo :data="designerData.userLogs"></auditInfo>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-layout-sider>
|
||||
</a-layout>
|
||||
</a-layout>
|
||||
|
||||
|
|
@ -65,35 +72,36 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onBeforeMount } from 'vue';
|
||||
import { ref, reactive, onBeforeMount ,watch} from 'vue';
|
||||
import { FormViewer } from '@/components/FormViewer';
|
||||
import { ProcessViewer } from '@/components/ProcessViewer';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { getBPMN, } from '@/api/sys/WFProcess';
|
||||
import { getBPMN } from '@/api/sys/WFProcess';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { IFormConfig } from '@/views/demo/form-design/typings/v-form-component';
|
||||
import { dateFormat } from '@/utils/base';
|
||||
import {
|
||||
designerDataType,
|
||||
logsType,
|
||||
} from './processModel';
|
||||
import auditInfo from './auditInfo.vue'
|
||||
import { designerDataType, logsType } from './processModel';
|
||||
import auditInfo from './auditInfo.vue';
|
||||
import { useMultipleTabStore } from '@/store/modules/multipleTab';
|
||||
import { useRouter } from 'vue-router';
|
||||
const props = defineProps({
|
||||
processId: String,
|
||||
});
|
||||
const tabStore = useMultipleTabStore();
|
||||
const router = useRouter();
|
||||
const prefixCls = 'preview-box';
|
||||
const flowContent = ref('');
|
||||
const flowViewer = ref({});
|
||||
const route = useRoute();
|
||||
const processId = route.query.processId;
|
||||
const processId = props.processId;
|
||||
// const processId = route.query.processId;
|
||||
const id = route.query.id;
|
||||
const infoOpen = ref(true);
|
||||
const formBoxRef = ref<any>();
|
||||
const formVisble = ref(false);
|
||||
const formVisble = ref(false);
|
||||
const processVisble = ref(false);
|
||||
// 表单数据
|
||||
const formConfig = ref<IFormConfig>({
|
||||
// 表单数据
|
||||
const formConfig = ref<IFormConfig>({
|
||||
// 表单配置
|
||||
schemas: [],
|
||||
layout: 'horizontal',
|
||||
|
|
@ -136,14 +144,14 @@
|
|||
wfData: [],
|
||||
selectRejectNodeVisible: false,
|
||||
selectSignVisible: false,
|
||||
formCurrentNode:{}
|
||||
formCurrentNode: {},
|
||||
});
|
||||
const activeName = ref('form');
|
||||
const auditName = ref('audit');
|
||||
function changeActive(activeKey) {
|
||||
if (activeKey == 'flow') {
|
||||
processVisble.value = true;
|
||||
}else{
|
||||
} else {
|
||||
processVisble.value = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -157,7 +165,7 @@
|
|||
}
|
||||
async function getDetailInfo() {
|
||||
let query: any = {
|
||||
id: processId,
|
||||
id: props.processId,
|
||||
};
|
||||
let data = await getBPMN(query);
|
||||
flowContent.value = data.flowContent;
|
||||
|
|
@ -178,7 +186,7 @@
|
|||
setLogsAndTasks(data.logs, data.tasks);
|
||||
// getBtns();
|
||||
}
|
||||
|
||||
|
||||
function setLogsAndTasks(logs: any[], tasks: any[]) {
|
||||
const res: logsType[] = [];
|
||||
const taskMap = {};
|
||||
|
|
@ -272,7 +280,6 @@
|
|||
taskType: number;
|
||||
operationCode: string;
|
||||
stampImg: any;
|
||||
|
||||
}) => {
|
||||
res.push({
|
||||
unitId: log.unitId,
|
||||
|
|
@ -299,14 +306,14 @@
|
|||
// 右侧显示审核记录
|
||||
// const userLogIndex = userLogs.findIndex((t) => t.id == log.unitId);
|
||||
// if (userLogIndex == -1) {
|
||||
userLogs.push({
|
||||
id: log.unitId,
|
||||
name: log.unitName,
|
||||
user: log.userName,
|
||||
time: dateFormat(log.createDate),
|
||||
des: log.des,
|
||||
img: log.stampImg,
|
||||
});
|
||||
userLogs.push({
|
||||
id: log.unitId,
|
||||
name: log.unitName,
|
||||
user: log.userName,
|
||||
time: dateFormat(log.createDate),
|
||||
des: log.des,
|
||||
img: log.stampImg,
|
||||
});
|
||||
// }
|
||||
}
|
||||
},
|
||||
|
|
@ -318,16 +325,16 @@
|
|||
return a.time < b.time ? -1 : 1;
|
||||
});
|
||||
}
|
||||
function closePage(){
|
||||
tabStore.closeTabByKey('/dashboard/task_look_preview/detail?processId=' + processId, router);
|
||||
}
|
||||
// function closePage() {
|
||||
// tabStore.closeTabByKey('/dashboard/task_look_preview/detail?processId=' + processId, router);
|
||||
// }
|
||||
|
||||
onBeforeMount(() => {
|
||||
getDetailInfo();
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
::v-deep .ant-tabs-nav-wrap {
|
||||
::v-deep .ant-tabs-nav-wrap {
|
||||
padding-left: 10px;
|
||||
}
|
||||
::v-deep .ant-layout {
|
||||
|
|
|
|||
|
|
@ -1,117 +1,168 @@
|
|||
<template>
|
||||
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
||||
<BasicTable @register="registerTable" @fetch-success="onFetchSuccess" :searchInfo="searchInfo">
|
||||
<template #toolbar>
|
||||
<!-- <a-button type="primary" @click="handleCreate"> 新增 </a-button> -->
|
||||
<PermissionBtn @btnEvent="onBtnClicked"></PermissionBtn>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction :actions="[
|
||||
{
|
||||
label:'审核',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}
|
||||
]" />
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</PageWrapper>
|
||||
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
||||
<BasicTable @register="registerTable" @fetch-success="onFetchSuccess" :searchInfo="searchInfo">
|
||||
<template #toolbar>
|
||||
<!-- <a-button type="primary" @click="handleCreate"> 新增 </a-button> -->
|
||||
<PermissionBtn @btnEvent="onBtnClicked"></PermissionBtn>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: '审核',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<a-modal
|
||||
width="100%"
|
||||
wrap-class-name="full-modal"
|
||||
v-model:open="auditOpen"
|
||||
title="审核"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<template #footer> </template>
|
||||
<Audit
|
||||
ref="posRef"
|
||||
:processId="processId"
|
||||
:taskId="taskId"
|
||||
:isRead="isRead"
|
||||
:type="type"
|
||||
@closeModel="closeMolder"
|
||||
></Audit>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, h } from 'vue'
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { getLoadMyUncompletedPage } from '@/api/sys/WFTask'
|
||||
import { getDetail } from '@/api/sys/WFSchemeInfo'
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import { flowStore } from '@/store/modules/flow';
|
||||
const flowWfDataStore = flowStore();
|
||||
const searchInfo = reactive < Recordable > ({});
|
||||
import { useGo } from '@/hooks/web/usePage';
|
||||
const go = useGo();
|
||||
const [registerTable] = useTable({
|
||||
api: getLoadMyUncompletedPage,
|
||||
columns: [
|
||||
{
|
||||
title: '任务',
|
||||
dataIndex: 'unitName',
|
||||
},
|
||||
{
|
||||
title: '标题',
|
||||
dataIndex: 'processTitle',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'isUrge',
|
||||
width: 80,
|
||||
customRender: ({ record }) => {
|
||||
if (record.isUrge == '1') {
|
||||
const color = 'red';
|
||||
const text = '催办';
|
||||
return h(Tag, { color: color }, () => text);
|
||||
} else {
|
||||
const color = 'green';
|
||||
const text = '正常';
|
||||
return h(Tag, { color: color }, () => text);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '提交人',
|
||||
dataIndex: 'processUserName',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createDate',
|
||||
},
|
||||
|
||||
],
|
||||
rowKey: 'id',
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: [
|
||||
{
|
||||
field: '[StartDate, EndDate]',
|
||||
label: '日期范围',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
},
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
{
|
||||
field: 'keyWord',
|
||||
label: '关键字',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
],
|
||||
import { reactive, h, ref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { getLoadMyUncompletedPage } from '@/api/sys/WFTask';
|
||||
import { getDetail } from '@/api/sys/WFSchemeInfo';
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import Audit from "./process/audit.vue"
|
||||
import { flowStore } from '@/store/modules/flow';
|
||||
const flowWfDataStore = flowStore();
|
||||
const searchInfo = reactive<Recordable>({});
|
||||
import { useGo } from '@/hooks/web/usePage';
|
||||
const go = useGo();
|
||||
const processId = ref('');
|
||||
const taskId = ref('');
|
||||
const isRead = ref(0);
|
||||
const type = ref('');
|
||||
const auditOpen = ref(false);
|
||||
const [registerTable] = useTable({
|
||||
api: getLoadMyUncompletedPage,
|
||||
columns: [
|
||||
{
|
||||
title: '任务',
|
||||
dataIndex: 'unitName',
|
||||
},
|
||||
{
|
||||
title: '标题',
|
||||
dataIndex: 'processTitle',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'isUrge',
|
||||
width: 80,
|
||||
customRender: ({ record }) => {
|
||||
if (record.isUrge == '1') {
|
||||
const color = 'red';
|
||||
const text = '催办';
|
||||
return h(Tag, { color: color }, () => text);
|
||||
} else {
|
||||
const color = 'green';
|
||||
const text = '正常';
|
||||
return h(Tag, { color: color }, () => text);
|
||||
}
|
||||
},
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
bordered: true,
|
||||
handleSearchInfoFn(info) {
|
||||
return info;
|
||||
},
|
||||
{
|
||||
title: '提交人',
|
||||
dataIndex: 'processUserName',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createDate',
|
||||
},
|
||||
],
|
||||
rowKey: 'id',
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: [
|
||||
{
|
||||
field: '[StartDate, EndDate]',
|
||||
label: '日期范围',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
},
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
actionColumn: {
|
||||
width: 100,
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
// slots: { customRender: 'action' },
|
||||
{
|
||||
field: 'keyWord',
|
||||
label: '关键字',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 },
|
||||
},
|
||||
});
|
||||
async function handleDetail(record) {
|
||||
let data = await getDetail({ code: record.processCode })
|
||||
let scheme = JSON.parse(data.scheme.content);
|
||||
let wfData = scheme.wfData
|
||||
flowWfDataStore.setWfDataAll(wfData)
|
||||
go('/dashboard/task_audit_preview/detail?processId=' + record.processId + "&taskId=" + record.id+"&type="+record.type+"&isRead=0");
|
||||
],
|
||||
},
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
bordered: true,
|
||||
handleSearchInfoFn(info) {
|
||||
return info;
|
||||
},
|
||||
actionColumn: {
|
||||
width: 100,
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
// slots: { customRender: 'action' },
|
||||
},
|
||||
});
|
||||
async function handleDetail(record) {
|
||||
let data = await getDetail({ code: record.processCode });
|
||||
let scheme = JSON.parse(data.scheme.content);
|
||||
let wfData = scheme.wfData;
|
||||
flowWfDataStore.setWfDataAll(wfData);
|
||||
auditOpen.value = true;
|
||||
processId.value = record.processId;
|
||||
taskId.value = record.id;
|
||||
type.value = record.type;
|
||||
// go(
|
||||
// '/dashboard/task_audit_preview/detail?processId=' +
|
||||
// record.processId +
|
||||
// '&taskId=' +
|
||||
// record.id +
|
||||
// '&type=' +
|
||||
// record.type +
|
||||
// '&isRead=0',
|
||||
// );
|
||||
}
|
||||
function closeMolder(){
|
||||
auditOpen.value = false;
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.full-modal {
|
||||
.ant-modal {
|
||||
max-width: 100%;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.ant-modal-content {
|
||||
height: calc(100vh);
|
||||
}
|
||||
|
||||
.ant-modal-body {
|
||||
height: 85%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,28 @@
|
|||
<template>
|
||||
<LoginFormTitle v-show="getShow" class="enter-x" />
|
||||
<Form class="p-4 enter-x" :model="formData" :rules="getFormRules" ref="formRef" v-show="getShow"
|
||||
@keypress.enter="handleLogin">
|
||||
<Form
|
||||
class="p-4 enter-x"
|
||||
:model="formData"
|
||||
:rules="getFormRules"
|
||||
ref="formRef"
|
||||
v-show="getShow"
|
||||
@keypress.enter="handleLogin"
|
||||
>
|
||||
<FormItem name="account" class="enter-x">
|
||||
<Input size="large" v-model:value="formData.account" :placeholder="t('sys.login.userName')"
|
||||
class="fix-auto-fill" />
|
||||
<Input
|
||||
size="large"
|
||||
v-model:value="formData.account"
|
||||
:placeholder="t('sys.login.userName')"
|
||||
class="fix-auto-fill"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem name="password" class="enter-x">
|
||||
<InputPassword size="large" visibilityToggle v-model:value="formData.password"
|
||||
:placeholder="t('sys.login.password')" />
|
||||
<InputPassword
|
||||
size="large"
|
||||
visibilityToggle
|
||||
v-model:value="formData.password"
|
||||
:placeholder="t('sys.login.password')"
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<ARow class="enter-x">
|
||||
|
|
@ -38,7 +52,7 @@
|
|||
{{ t('sys.login.registerButton') }}
|
||||
</Button> -->
|
||||
</FormItem>
|
||||
<ARow class="enter-x" :gutter="[16, 16]">
|
||||
<!-- <ARow class="enter-x" :gutter="[16, 16]">
|
||||
<ACol :md="8" :xs="24">
|
||||
<Button block @click="setLoginState(LoginStateEnum.MOBILE)">
|
||||
{{ t('sys.login.mobileSignInFormTitle') }}
|
||||
|
|
@ -54,30 +68,30 @@
|
|||
{{ t('sys.login.registerButton') }}
|
||||
</Button>
|
||||
</ACol>
|
||||
</ARow>
|
||||
</ARow> -->
|
||||
|
||||
<Divider class="enter-x">{{ t('sys.login.otherSignIn') }}</Divider>
|
||||
<!-- <Divider class="enter-x">{{ t('sys.login.otherSignIn') }}</Divider> -->
|
||||
|
||||
<div class="flex justify-evenly enter-x" :class="`${prefixCls}-sign-in-way`">
|
||||
<!-- <div class="flex justify-evenly enter-x" :class="`${prefixCls}-sign-in-way`">
|
||||
<GithubFilled />
|
||||
<WechatFilled />
|
||||
<AlipayCircleFilled />
|
||||
<GoogleCircleFilled />
|
||||
<TwitterCircleFilled />
|
||||
</div>
|
||||
</div> -->
|
||||
</Form>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref, unref, computed } from 'vue';
|
||||
|
||||
import { Checkbox, Form, Input, Row, Col, Button, Divider } from 'ant-design-vue';
|
||||
import {
|
||||
GithubFilled,
|
||||
WechatFilled,
|
||||
AlipayCircleFilled,
|
||||
GoogleCircleFilled,
|
||||
TwitterCircleFilled,
|
||||
} from '@ant-design/icons-vue';
|
||||
// import {
|
||||
// GithubFilled,
|
||||
// WechatFilled,
|
||||
// AlipayCircleFilled,
|
||||
// GoogleCircleFilled,
|
||||
// TwitterCircleFilled,
|
||||
// } from '@ant-design/icons-vue';
|
||||
import LoginFormTitle from './LoginFormTitle.vue';
|
||||
|
||||
import { useI18n } from '@/hooks/web/useI18n';
|
||||
|
|
@ -88,10 +102,6 @@
|
|||
import { useDesign } from '@/hooks/web/useDesign';
|
||||
//import { onKeyStroke } from '@vueuse/core';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const ACol = Col;
|
||||
const ARow = Row;
|
||||
const FormItem = Form.Item;
|
||||
|
|
@ -131,8 +141,8 @@
|
|||
account: data.account,
|
||||
mode: 'none', //不要默认的错误提示
|
||||
});
|
||||
console.log(userInfo)
|
||||
localStorage.setItem('fireUserLoginName',userInfo.name)
|
||||
console.log(userInfo);
|
||||
localStorage.setItem('fireUserLoginName', userInfo.name);
|
||||
if (userInfo) {
|
||||
notification.success({
|
||||
message: t('sys.login.loginSuccessTitle'),
|
||||
|
|
@ -140,7 +150,6 @@
|
|||
duration: 3,
|
||||
});
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
createErrorModal({
|
||||
title: t('sys.api.errorTip'),
|
||||
|
|
@ -151,4 +160,4 @@
|
|||
loading.value = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
// vite.config.ts
|
||||
import { defineApplicationConfig } from "file:///F:/VbenAdmin/vue-vben-admin/internal/vite-config/dist/index.mjs";
|
||||
import { mars3dPlugin } from "file:///F:/VbenAdmin/vue-vben-admin/node_modules/.pnpm/vite-plugin-mars3d@3.1.3_rollup@3.29.4/node_modules/vite-plugin-mars3d/dist/index.js";
|
||||
import path from "path";
|
||||
var __vite_injected_original_dirname = "F:\\VbenAdmin\\vue-vben-admin";
|
||||
var vite_config_default = defineApplicationConfig({
|
||||
overrides: {
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
"echarts/core",
|
||||
"echarts/charts",
|
||||
"echarts/components",
|
||||
"echarts/renderers",
|
||||
"qrcode",
|
||||
"@iconify/iconify",
|
||||
"ant-design-vue/es/locale/zh_CN",
|
||||
"ant-design-vue/es/locale/en_US",
|
||||
"@/../lib/vform/designer.umd.js"
|
||||
]
|
||||
},
|
||||
build: {
|
||||
/* 其他build生产打包配置省略 */
|
||||
//...
|
||||
commonjsOptions: {
|
||||
include: /node_modules|lib/
|
||||
//这里记得把lib目录加进来,否则生产打包会报错!!
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
"/basic-api": {
|
||||
target: "http://localhost:3000",
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path2) => path2.replace(new RegExp(`^/basic-api`), "")
|
||||
// only https
|
||||
// secure: false
|
||||
},
|
||||
"/upload": {
|
||||
target: "http://localhost:3300/upload",
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path2) => path2.replace(new RegExp(`^/upload`), "")
|
||||
}
|
||||
},
|
||||
warmup: {
|
||||
clientFiles: ["./index.html", "./src/{views,components}/*"]
|
||||
}
|
||||
},
|
||||
define: {
|
||||
"process.env": {
|
||||
BASE_URL: "/"
|
||||
}
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
javascriptEnabled: true,
|
||||
additionalData: `
|
||||
@import "${path.resolve(__vite_injected_original_dirname, "src/mars/components/mars-ui/base.less")}";
|
||||
`
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [mars3dPlugin()]
|
||||
}
|
||||
});
|
||||
export {
|
||||
vite_config_default as default
|
||||
};
|
||||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJGOlxcXFxWYmVuQWRtaW5cXFxcdnVlLXZiZW4tYWRtaW5cIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkY6XFxcXFZiZW5BZG1pblxcXFx2dWUtdmJlbi1hZG1pblxcXFx2aXRlLmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vRjovVmJlbkFkbWluL3Z1ZS12YmVuLWFkbWluL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZGVmaW5lQXBwbGljYXRpb25Db25maWcgfSBmcm9tICdAdmJlbi92aXRlLWNvbmZpZyc7XG5pbXBvcnQgeyBtYXJzM2RQbHVnaW4gfSBmcm9tICd2aXRlLXBsdWdpbi1tYXJzM2QnO1xuaW1wb3J0IHBhdGgsIHsgcmVzb2x2ZSB9IGZyb20gJ3BhdGgnO1xuXG5leHBvcnQgZGVmYXVsdCBkZWZpbmVBcHBsaWNhdGlvbkNvbmZpZyh7XG4gIG92ZXJyaWRlczoge1xuICAgIG9wdGltaXplRGVwczoge1xuICAgICAgaW5jbHVkZTogW1xuICAgICAgICAnZWNoYXJ0cy9jb3JlJyxcbiAgICAgICAgJ2VjaGFydHMvY2hhcnRzJyxcbiAgICAgICAgJ2VjaGFydHMvY29tcG9uZW50cycsXG4gICAgICAgICdlY2hhcnRzL3JlbmRlcmVycycsXG4gICAgICAgICdxcmNvZGUnLFxuICAgICAgICAnQGljb25pZnkvaWNvbmlmeScsXG4gICAgICAgICdhbnQtZGVzaWduLXZ1ZS9lcy9sb2NhbGUvemhfQ04nLFxuICAgICAgICAnYW50LWRlc2lnbi12dWUvZXMvbG9jYWxlL2VuX1VTJyxcbiAgICAgICAgJ0AvLi4vbGliL3Zmb3JtL2Rlc2lnbmVyLnVtZC5qcydcbiAgICAgIF0sXG4gICAgfSxcbiAgICBidWlsZDoge1xuICAgICAgLyogXHU1MTc2XHU0RUQ2YnVpbGRcdTc1MUZcdTRFQTdcdTYyNTNcdTUzMDVcdTkxNERcdTdGNkVcdTc3MDFcdTc1NjUgKi9cbiAgICAgIC8vLi4uXG4gICAgICBjb21tb25qc09wdGlvbnM6IHtcbiAgICAgICAgICBpbmNsdWRlOiAvbm9kZV9tb2R1bGVzfGxpYi8gIC8vXHU4RkQ5XHU5MUNDXHU4QkIwXHU1Rjk3XHU2MjhBbGliXHU3NkVFXHU1RjU1XHU1MkEwXHU4RkRCXHU2NzY1XHVGRjBDXHU1NDI2XHU1MjE5XHU3NTFGXHU0RUE3XHU2MjUzXHU1MzA1XHU0RjFBXHU2MkE1XHU5NTE5XHVGRjAxXHVGRjAxXG4gICAgICB9XG4gICAgfSxcbiAgICBzZXJ2ZXI6IHtcbiAgICAgIHByb3h5OiB7XG4gICAgICAgICcvYmFzaWMtYXBpJzoge1xuICAgICAgICAgIHRhcmdldDogJ2h0dHA6Ly9sb2NhbGhvc3Q6MzAwMCcsXG4gICAgICAgICAgY2hhbmdlT3JpZ2luOiB0cnVlLFxuICAgICAgICAgIHdzOiB0cnVlLFxuICAgICAgICAgIHJld3JpdGU6IChwYXRoKSA9PiBwYXRoLnJlcGxhY2UobmV3IFJlZ0V4cChgXi9iYXNpYy1hcGlgKSwgJycpLFxuICAgICAgICAgIC8vIG9ubHkgaHR0cHNcbiAgICAgICAgICAvLyBzZWN1cmU6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgICcvdXBsb2FkJzoge1xuICAgICAgICAgIHRhcmdldDogJ2h0dHA6Ly9sb2NhbGhvc3Q6MzMwMC91cGxvYWQnLFxuICAgICAgICAgIGNoYW5nZU9yaWdpbjogdHJ1ZSxcbiAgICAgICAgICB3czogdHJ1ZSxcbiAgICAgICAgICByZXdyaXRlOiAocGF0aCkgPT4gcGF0aC5yZXBsYWNlKG5ldyBSZWdFeHAoYF4vdXBsb2FkYCksICcnKSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICB3YXJtdXA6IHtcbiAgICAgICAgY2xpZW50RmlsZXM6IFsnLi9pbmRleC5odG1sJywgJy4vc3JjL3t2aWV3cyxjb21wb25lbnRzfS8qJ10sXG4gICAgICB9LFxuICAgIH0sXG4gICAgZGVmaW5lOiB7XG4gICAgICAncHJvY2Vzcy5lbnYnOiB7XG4gICAgICAgIEJBU0VfVVJMOiAnLycsXG4gICAgICB9LFxuICAgIH0sXG4gICAgY3NzOiB7XG4gICAgICBwcmVwcm9jZXNzb3JPcHRpb25zOiB7XG4gICAgICAgIGxlc3M6IHtcbiAgICAgICAgICBqYXZhc2NyaXB0RW5hYmxlZDogdHJ1ZSxcbiAgICAgICAgICBhZGRpdGlvbmFsRGF0YTogYFxuICAgICAgICAgIEBpbXBvcnQgXCIke3BhdGgucmVzb2x2ZShfX2Rpcm5hbWUsICdzcmMvbWFycy9jb21wb25lbnRzL21hcnMtdWkvYmFzZS5sZXNzJyl9XCI7XG4gICAgICAgICAgYCxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfSxcbiAgICBwbHVnaW5zOiBbbWFyczNkUGx1Z2luKCldLFxuICB9LFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQXlRLFNBQVMsK0JBQStCO0FBQ2pULFNBQVMsb0JBQW9CO0FBQzdCLE9BQU8sVUFBdUI7QUFGOUIsSUFBTSxtQ0FBbUM7QUFJekMsSUFBTyxzQkFBUSx3QkFBd0I7QUFBQSxFQUNyQyxXQUFXO0FBQUEsSUFDVCxjQUFjO0FBQUEsTUFDWixTQUFTO0FBQUEsUUFDUDtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsTUFDRjtBQUFBLElBQ0Y7QUFBQSxJQUNBLE9BQU87QUFBQTtBQUFBO0FBQUEsTUFHTCxpQkFBaUI7QUFBQSxRQUNiLFNBQVM7QUFBQTtBQUFBLE1BQ2I7QUFBQSxJQUNGO0FBQUEsSUFDQSxRQUFRO0FBQUEsTUFDTixPQUFPO0FBQUEsUUFDTCxjQUFjO0FBQUEsVUFDWixRQUFRO0FBQUEsVUFDUixjQUFjO0FBQUEsVUFDZCxJQUFJO0FBQUEsVUFDSixTQUFTLENBQUNBLFVBQVNBLE1BQUssUUFBUSxJQUFJLE9BQU8sYUFBYSxHQUFHLEVBQUU7QUFBQTtBQUFBO0FBQUEsUUFHL0Q7QUFBQSxRQUNBLFdBQVc7QUFBQSxVQUNULFFBQVE7QUFBQSxVQUNSLGNBQWM7QUFBQSxVQUNkLElBQUk7QUFBQSxVQUNKLFNBQVMsQ0FBQ0EsVUFBU0EsTUFBSyxRQUFRLElBQUksT0FBTyxVQUFVLEdBQUcsRUFBRTtBQUFBLFFBQzVEO0FBQUEsTUFDRjtBQUFBLE1BQ0EsUUFBUTtBQUFBLFFBQ04sYUFBYSxDQUFDLGdCQUFnQiw0QkFBNEI7QUFBQSxNQUM1RDtBQUFBLElBQ0Y7QUFBQSxJQUNBLFFBQVE7QUFBQSxNQUNOLGVBQWU7QUFBQSxRQUNiLFVBQVU7QUFBQSxNQUNaO0FBQUEsSUFDRjtBQUFBLElBQ0EsS0FBSztBQUFBLE1BQ0gscUJBQXFCO0FBQUEsUUFDbkIsTUFBTTtBQUFBLFVBQ0osbUJBQW1CO0FBQUEsVUFDbkIsZ0JBQWdCO0FBQUEscUJBQ0wsS0FBSyxRQUFRLGtDQUFXLHVDQUF1QyxDQUFDO0FBQUE7QUFBQSxRQUU3RTtBQUFBLE1BQ0Y7QUFBQSxJQUNGO0FBQUEsSUFDQSxTQUFTLENBQUMsYUFBYSxDQUFDO0FBQUEsRUFDMUI7QUFDRixDQUFDOyIsCiAgIm5hbWVzIjogWyJwYXRoIl0KfQo=
|
||||
Loading…
Reference in New Issue