Merge remote-tracking branch 'origin/master'

This commit is contained in:
clay
2024-05-13 17:41:27 +08:00
15 changed files with 569 additions and 460 deletions

8
src/api/home/index.js Normal file
View File

@@ -0,0 +1,8 @@
import request from '@/utils/request.js'
export const getHomeInfo = () => {
return request({
url: '/workflow/mosr/process/task',
method: "get"
});
};

View File

@@ -19,3 +19,50 @@ export const getInfo = (requirementId) => {
method: "get" method: "get"
}); });
}; };
export const getFormInfo = (requirementId) => {
return request({
url: `/workflow/mosr/requirement/form/${requirementId}`,
method: "get"
});
};
export const agreeTask = (data) => {
return request({
url: `/workflow/mosr/process/task/agree`,
method: "post",
data: data
});
};
export const rejectTask = (data) => {
return request({
url: `/workflow/mosr/process/task/reject`,
method: "post",
data: data
});
};
export const addRequirement = (data) => {
return request({
url: '/workflow/mosr/requirement',
method: "post",
data: data
});
};
export const resubmit = (data) => {
return request({
url: '/workflow/mosr/requirement/resubmit',
method: "post",
data: data
});
};
export const deleteFile = (fileId) => {
return request({
url: `/workflow/process/file/delete/${fileId}`,
method: "delete"
});
};
export const getCompanyOption = () => {
return request({
url: '/admin/mosr/sub/company/companyOption',
method: "get"
});
};

View File

@@ -378,7 +378,8 @@ html, body, #app, .el-container, .el-aside, .el-main {
.scale { .scale {
margin-top: 10px; margin-top: 10px;
z-index: 666; z-index: 666;
//position: absolute; position: absolute;
//top: -20px;
} }
.el-overlay-dialog { .el-overlay-dialog {

View File

@@ -6,24 +6,26 @@
with-credentials with-credentials
:multiple="maxSize > 0" :multiple="maxSize > 0"
:data="uploadParams" :data="uploadParams"
:show-file-list="false"
:auto-upload="true" :auto-upload="true"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-success="handleUploadSuccess" :on-success="handleUploadSuccess"
> >
<el-button color="#DED0B2">上传文件</el-button> <el-button color="#DED0B2" :loading="loading">上传文件</el-button>
</el-upload> </el-upload>
</template> </template>
<script setup> <script setup>
import {defineProps, computed, ref} from "vue";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
import { getToken } from '@/utils/auth' import {getToken} from '@/utils/auth'
const baseURL = import.meta.env.VITE_BASE_URL const baseURL = import.meta.env.VITE_BASE_URL
const uploadFileUrl = ref(baseURL + "/workflow/process/file") const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
const headers = reactive({ const headers = reactive({
authorization: getToken() authorization: getToken()
}) })
const disabled = ref(false) const disabled = ref(false)
const loading = ref(false)
const showTable = ref(false)
const uploadParams = ref({}) const uploadParams = ref({})
const props = defineProps({ const props = defineProps({
value: { value: {
@@ -34,10 +36,11 @@ const props = defineProps({
}, },
maxSize: { maxSize: {
type: Number, type: Number,
default: 5 default: 30
} }
}) })
const emit = defineEmits(["input","getFile"])
const emit = defineEmits(["input", "getFile"])
const fileList = ref([]) const fileList = ref([])
const _value = computed({ const _value = computed({
get() { get() {
@@ -49,19 +52,37 @@ const _value = computed({
}) })
const beforeUpload = (file) => { const beforeUpload = (file) => {
// const FileExt = file.name.replace(/.+\./, "");
// if (['zip', 'rar', 'pdf', 'doc', 'docx', 'xlsx'].indexOf(FileExt.toLowerCase()) === -1) {
// ElMessage.warning('请上传后缀名为pdf、doc、docx、xlsx、zip或rar的文件');
// return false;
// } else
// if (props.maxSize > 0 && file.size / 1024 / 1024 > props.maxSize) { // if (props.maxSize > 0 && file.size / 1024 / 1024 > props.maxSize) {
// ElMessage.warning(`每个文件最大不超过 ${props.maxSize}MB`) // ElMessage.warning(`每个文件最大不超过 ${props.maxSize}MB`)
// } else { // } else {
return true loading.value = true
return true
// } // }
} }
const handleUploadSuccess = (res, file) => { const handleUploadSuccess = (res, file) => {
if (res.code !== 1000) { if (res.code !== 1000) {
loading.value = false
ElMessage.error("上传失败") ElMessage.error("上传失败")
} else {
loading.value = false
ElMessage.success("上传成功")
} }
showTable.value = true
let data = res.data let data = res.data
fileList.value.push(data) fileList.value.push(data)
emit("getFile", fileList.value) emit("getFile", fileList.value)
} }
</script> </script>
<style lang="scss" scoped>
a {
font-size: 14px;
color: #2a99ff;
}
</style>

View File

@@ -29,8 +29,6 @@ serveice.interceptors.response.use(response => {
if (response.request.responseType === 'blob' || response.request.responseType === 'arraybuffer') { if (response.request.responseType === 'blob' || response.request.responseType === 'arraybuffer') {
return response.data return response.data
} }
console.log("window.location.pathname", window.location.pathname)
console.log("windows", window.location.search)
return response.data return response.data
}, error => { }, error => {
let response = error.response let response = error.response

View File

@@ -16,7 +16,7 @@
</el-col> </el-col>
</el-row> </el-row>
<h4>待办 ({{ todoNum }})</h4> <h4>待办 ({{ todoNum }})</h4>
<fvTable ref="tableIns" class="home-table" :tableConfig="tableConfig" @headBtnClick="headBtnClick"> <fvTable ref="tableIns" class="home-table" :tableConfig="tableConfig">
<template #empty> <template #empty>
<el-empty description="暂无待办"/> <el-empty description="暂无待办"/>
</template> </template>
@@ -25,11 +25,6 @@
</el-col> </el-col>
<el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6"> <el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6">
<div class="right"> <div class="right">
<!-- <div class="right-top">-->
<!-- <h3>欢迎回来 Sunshine</h3>-->
<!-- <div>科技创新项目需求征集中 要求参见OA内部信</div>-->
<!-- </div>-->
<!-- <div class="right-gap"></div>-->
<div class="right-top "> <div class="right-top ">
<div> <div>
<h3>帮助文档</h3> <h3>帮助文档</h3>
@@ -46,7 +41,6 @@
<span>常用网站</span> <span>常用网站</span>
</div> </div>
<el-divider/> <el-divider/>
</div> </div>
</div> </div>
</el-col> </el-col>
@@ -57,6 +51,7 @@
<script setup lang="jsx"> <script setup lang="jsx">
import 'element-plus/theme-chalk/display.css' import 'element-plus/theme-chalk/display.css'
const router = useRouter()
const list = ref([ const list = ref([
{ {
title: '待立项', title: '待立项',
@@ -105,25 +100,30 @@ const todoNum = ref(20)
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{ {
prop: 'userName', prop: 'processName',
label: '单据编号', label: '流程名称',
align: 'center', align: 'center',
}, },
{ {
prop: 'nickName', prop: 'initiatorName',
label: '消息主题', label: '发起人',
align: 'center', align: 'center',
}, },
{ {
prop: 'type', prop: 'targetState',
label: '类型', label: '类型',
align: 'center', align: 'center',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => (<Tag dictType={'todo_type'} value={row.state}/>) currentRender: ({row, index}) => (<Tag dictType={'todo_type'} value={row.targetState}/>)
}, },
{ {
prop: 'createTime', prop: 'submitTime',
label: '创建时间', label: '提交时间',
align: 'center',
},
{
prop: 'taskName',
label: '当前节点',
align: 'center', align: 'center',
}, },
{ {
@@ -136,24 +136,28 @@ const tableConfig = reactive({
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
return ( return (
<div> <div>
<el-button type="primary" link onClick={() => handleEdit(row)}>查看</el-button> <el-button type="primary" link onClick={() => handleView(row)}>查看</el-button>
<el-button type="primary" link onClick={() => handleEdit(row)}>已读</el-button> <el-button type="primary" link onClick={() => handleEdit(row)}>已读</el-button>
</div> </div>
) )
} }
} }
], ],
api: '', api: '/workflow/mosr/process/task',
params: {}, params: {},
}) })
const handleView = (row) => {
const headBtnClick = (key) => { console.log('row', row)
switch (key) { if(row.targetState=='00'&&row.taskId){
case 'add': router.push({
handleAdd() path: '/projectdemand/demanddetail',
break; query: {
id: row.taskId
}
})
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -162,29 +166,21 @@ const headBtnClick = (key) => {
margin-top: 10px; margin-top: 10px;
} }
:deep(.el-table) { :deep(.el-table) {
height: 300px!important; height: 300px !important;
} }
} }
@media only screen and (max-width: 1000px) { @media only screen and (max-width: 1000px) {
.right { .right {
margin-top: 10px; margin-top: 10px;
} }
:deep(.el-table) { :deep(.el-table) {
height: 300px!important; height: 300px !important;
} }
} }
//.right-gap {
// background-color: #EFEFEF;
// width: 20px;
// //margin-right: -10px;
//}
:deep(.el-table) {
//height: 200px;
//max-height: 400px;
}
.home-bg { .home-bg {
height: calc(100vh - 130px); height: calc(100vh - 130px);
@@ -273,21 +269,6 @@ const headBtnClick = (key) => {
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
//.right-top {
// h3 {
// text-align: center;
// margin-bottom: 15px;
// }
//
// div {
// color: #909399;
// font-size: 14px;
// margin: 0 20px;
// letter-spacing: 1px;
// line-height: 25px;
// }
//}
.right-top { .right-top {
flex: 0.5; flex: 0.5;
padding: 15px; padding: 15px;

View File

@@ -1,23 +1,17 @@
<template> <template>
<div v-loading="loading" class="add-block"> <div v-loading="loading" class="add-block">
<baseTitle title="需求征集信息录入"></baseTitle> <baseTitle title="需求征集信息录入"></baseTitle>
<el-form :model="queryParams" inline class="query-form" ref="demandForm"> <el-form :model="formData" inline class="query-form" ref="demandForm">
<div class="left-info"> <div class="left-info">
<el-form-item label="名称" prop="name"> <el-form-item label="名称" prop="requirementName">
<el-input v-model="queryParams.name" placeholder="请输入子公司编码" clearable></el-input> <el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属公司" prop="company"> <el-form-item label="所属公司" prop="companyIds">
<el-select v-model="queryParams.company" placeholder="登录状态" clearable filterable> <el-tree-select v-model="formData.companyIds" :data="companyOption" style="width: 100%;"
<el-option filterable clearable :check-strictly="true" multiple/>
v-for="item in companyOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="征集类型" prop="type"> <el-form-item label="征集类型" prop="collectType">
<el-select v-model="queryParams.type" placeholder="登录状态" clearable filterable> <el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable>
<el-option <el-option
v-for="item in typeOption" v-for="item in typeOption"
:key="item.value" :key="item.value"
@@ -29,159 +23,142 @@
<el-form-item label="截止时间" prop="time"> <el-form-item label="截止时间" prop="time">
<el-config-provider> <el-config-provider>
<el-date-picker <el-date-picker
v-model="dateValue" v-model="formData.deadline"
type="datetime" type="datetime"
placeholder="截止时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
/> />
</el-config-provider> </el-config-provider>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">搜索</el-button>
<el-button type="primary" @click="handleReset">重置</el-button>
</el-form-item>
</div> </div>
</el-form> </el-form>
<!-- <fvForm :schema="schame" @getInstance="getInstance" :rules="rules"></fvForm>-->
<baseTitle title="征集说明"></baseTitle> <baseTitle title="征集说明"></baseTitle>
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="instructions" height="300"/> <Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300"/>
<baseTitle title="申请文件"></baseTitle> <baseTitle title="申请文件"></baseTitle>
<file-upload @getFile="getFile"/> <file-upload @getFile="getFile"/>
<el-table :data="formData.fileList" style="width: 100%">
<el-table-column label="序号" type="index" align="center" width="80"/>
<el-table-column prop="fileName" label="文件名" align="center"/>
<el-table-column prop="tag" label="标签" align="center"/>
<el-table-column prop="size" label="文件大小" align="center">
<template #default="scope">
{{ parseInt(scope.row.size / 1024) }}KB
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template #default="scope">
<a :href="scope.row.url">
下载
</a>
<el-button link type="primary" size="small" @click="beforeRemove(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="approval-record"> <div class="approval-record">
<baseTitle title="流程"></baseTitle> <baseTitle title="流程"></baseTitle>
<process-diagram-viewer v-if="processDiagramViewer"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
<!-- <div class="process" id="approvalRecord">--> <!-- <div class="process" id="approvalRecord">-->
<!-- <process-tree ref="processTree" mode="view" id-name="approvalRecord"/>--> <!-- <process-tree ref="processTree" mode="view" id-name="approvalRecord"/>-->
<!-- </div>--> <!-- </div>-->
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button> <el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
<el-button @click="handleBack">返回</el-button> <el-button @click="handleBack">返回</el-button>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {getInitiateInfo} from "@/api/workflow/process-definition.js";
import {useTagsView} from '@/stores/tagsview.js'
import {useAuthStore} from '@/stores/userstore.js' import {useAuthStore} from '@/stores/userstore.js'
import {ElLoading, ElMessage, ElNotification} from 'element-plus';
import {getMenuList} from '@/api/system/menuman.js'
import {getWorkflowInfo} from "@/api/project-demand/index.js";
import FileUpload from "../../../components/FileUpload.vue";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
import ProcessTree from '@/views/workflow/process/ProcessTree.vue';
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getWorkflowInfo, addRequirement, getFormInfo, resubmit, deleteFile} from "@/api/project-demand/index.js";
import FileUpload from "@/components/FileUpload.vue";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {ElMessage, ElMessageBox} from "element-plus";
import {useRoute, useRouter} from 'vue-router'
import {getSubCompOpt} from '@/api/user/user.js'
const dateValue = ref()
const queryParams = reactive({
name: '',
company: '',
type: '',
})
const processTree = ref()
const processDiagramViewer = ref(false)
const tagsViewStore = useTagsView()
const authStore = useAuthStore() const authStore = useAuthStore()
const router = useRouter()
const route = useRoute() const route = useRoute()
const demandForm = ref() const dateValue = ref()
const typeOption = ref([]) const formData = ref({
const companyOption = ref([]) requirementName: '',
companyIds: '',
collectType: '',
deadline: '',
collectExplain: ''
})
const showTable = ref(false)
const processDiagramViewer = ref(false)
const typeOption = ref([
{
label: "需求征集",
value: '需求征集'
}
])
const companyOption = ref([
{
label: "测试公司1",
value: 22
},
{
label: "测试公司2",
value: 23
},
{
label: "测试公司3",
value: 24
}
])
const form = ref(null) const form = ref(null)
const fileList = ref(null) const fileList = ref(null)
const menuTree = ref(null) const menuTree = ref(null)
const loading = ref(false) const loading = ref(false)
const localData = reactive({
affiliatedCompany: []
})
const processStore = useProcessStore() const processStore = useProcessStore()
const processInstanceData = ref() const processInstanceData = ref()
const instructions = ref()
const schame = computed(() => { const compositeParam=(item)=>{
let arr = [ return {
{ fileId: item.id,
label: '名称', size: item.size,
prop: 'roleName', fileName: item.fileName,
component: 'el-input', fileType: item.fileType,
props: { url: item.url,
placeholder: '请输入名称', processNodeTag: null,
clearable: true tag: formData.value.collectType,
} userId: authStore.userinfo.userId
},
{
label: '所属公司',
prop: 'subCompanyId',
component: 'el-tree-select',
props: {
placeholder: '请选择所属公司',
clearable: true,
filterable: true,
checkStrictly: true,
data: localData.affiliatedCompany,
disabled: route.query.userType == 0 ? true : false
},
on: {
change: async (val) => {
const {data} = await getDeptOpt({subCompanyId: val})
localData.departmentIdOpt = data
}
}
},
{
label: '征集类型',
prop: 'subCompanyType',
component: 'el-tree-select',
props: {
placeholder: '请选择征集类型',
clearable: true,
filterable: true,
checkStrictly: true,
data: localData.affiliatedCompany,
disabled: route.query.userType == 0 ? true : false
},
on: {
change: async (val) => {
const {data} = await getDeptOpt({subCompanyId: val})
localData.departmentIdOpt = data
}
}
},
{
label: '截止时间',
prop: 'dateValue',
component: 'el-date-picker',
props: {
placeholder: '请选择截止时间',
clearable: true,
type: 'datetime'
}
} }
]
return !authStore.roles.includes('superAdmin') ? arr.slice(0, arr.length - 1) : arr
})
const rules = reactive({
roleName: [{required: true, message: '请输入', trigger: 'change'}],
subCompanyId: [{required: true, message: '请输入', trigger: 'change'}]
})
//重置功能
const handleReset = () => {
demandForm.value.resetFields()
init()
}
const getInstance = (e) => {
form.value = e
} }
const getFile = (val) => { const getFile = (val) => {
console.log('fileList', val) let fileObj = {}
fileList.value = val let newFileArray = []
if (route.query.isAdd === undefined) {
val.forEach(item => {
fileObj =compositeParam(item)
newFileArray.push(fileObj)
formData.value.fileList.push(fileObj)
})
fileList.value = formData.value.fileList
} else {
val.forEach(item => {
fileObj =compositeParam(item)
newFileArray.push(fileObj)
})
formData.value.fileList = newFileArray
fileList.value = newFileArray
}
} }
const init = async () => { const init = async () => {
const res = await getSubCompOpt()
companyOption.value = res.data
getWorkflowInfo().then(res => { getWorkflowInfo().then(res => {
let data = res.data let data = res.data
console.log('res2', res)
processInstanceData.value = data processInstanceData.value = data
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;
@@ -189,69 +166,96 @@ const init = async () => {
processStore.noTakeList.value = data.noTakeList; processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList; processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList; processStore.passList.value = data.passList;
nextTick(()=>{ nextTick(() => {
processDiagramViewer.value=true processDiagramViewer.value = true
}) })
}) })
} }
// const getTree = async () => {
// getInitiateInfo('pronode_46c5e446-b4d1-495e-a97d-40667fa6aa9f').then(res => {
// console.log('res11', res)
// // processDefinition.value = res.data;
// //构建表单及校验规则
// processStore.setDesign(res.data)
// nextTick(() => {
// processTree.value.init()
// })
// }).catch(err => {
// ElMessage.error(err);
// });
// }
// getTree()
const handleSubmit = async () => { const handleSubmit = async () => {
// const loading = ElLoading.service({fullscreen: true}) let params = {
// const {isValidate} = await form.value.validate() ...formData.value,
// if (!isValidate) return Promise.reject() requirementId: 0,
// const values = form.value.getValues() files: fileList.value,
// values.menuIds = checkChange() deploymentId: processInstanceData.value.deploymentId
// operate(values).then(res => { }
// ElNotification({ let res
// title: route.query.isAdd ? '新增' : '编辑', if (route.query.isAdd === undefined) {
// message: res.msg, res = await resubmit(params)
// type: res.code === 1000 ? 'success' : 'error' } else {
// }) res = await addRequirement(params)
// loading.close() }
// res.code === 1000 ? tagsViewStore.delViewAndGoView('/system/role') : null if (res.code === 1000) {
// }).finally(() => { ElMessage.success(res.msg)
// loading.close() await router.push({
// }) path: '/projectdemand/demandcollection'
})
} else {
ElMessage.error(res.msg)
}
}
const getDetailInfo = async () => {
getFormInfo(route.query.id).then(res => {
if (res.code === 1000) {
console.log(res)
ElMessage.success(res.msg)
formData.value = res.data
} else {
ElMessage.error(res.msg)
}
})
} }
const handleBack = () => { const handleBack = () => {
history.back() history.back()
} }
const beforeRemove = (row) => {
ElMessageBox.confirm(`确认删除名称为${row.filename}的表格吗?`, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
handleRemove(row)
}).catch(() => {
ElMessage.warning("用户取消删除! ");
})
}
watch(localData, (val) => { const handleRemove = (row) => {
menuTree.value.filter(val.filterText) deleteFile(row.fileId).then(res => {
if (res.code === 1000) {
ElMessage.success("删除成功");
fileList.value.splice(fileList.value.findIndex((item) => item.id === row.id), 1);
}
});
};
onMounted(async () => {
loading.value = true
await init()
if (route.query.id) {
await getDetailInfo()
}
loading.value = false
}) })
// onMounted(async () => {
// loading.value = true
init()
// if (route.query.id) {
// await getInfo()
// }
// loading.value = false
// })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.add-block { .add-block {
//display: flex; //display: flex;
//justify-content: space-between; //justify-content: space-between;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
a {
cursor: pointer;
font-size: 14px;
color: #2a99ff;
}
.approval-record {
position: relative;
}
} }
</style> </style>

View File

@@ -1,127 +1,160 @@
<template> <template>
<div class="detail-block"> <div class="detail-block">
<el-form :model="form" label-width="auto"> <el-form :model="formData" label-width="auto">
<baseTitle title="需求征集详情"></baseTitle> <baseTitle title="需求征集详情"></baseTitle>
<div class="left-info"> <div class="left-info">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="名称"> <el-form-item label="名称">
<span>{{ formData.requirementName }}</span> <span>{{ formData.requirementName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="名称"> <el-form-item label="所属公司">
<span>{{ formData.requirementName }}</span> <span>{{ formData.companyIds }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="名称"> <el-form-item label="征集类型">
<span>{{ formData.requirementName }}</span> <span>{{ formData.collectType }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="截止时间"> <el-form-item label="截止时间">
<span>{{ formData.deadline }}</span> <span>{{ formData.deadline }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<baseTitle title="征集说明"></baseTitle> <baseTitle title="征集说明"></baseTitle>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<el-card style="width: 100%"> <el-card style="width: 100%">
<div v-html="formData.collectExplain"> <div v-html="formData.collectExplain">
</div> </div>
</el-card> </el-card>
</el-form-item> </el-form-item>
</el-col> </el-col>
<baseTitle title="申请文件"></baseTitle> <baseTitle title="附件列表"></baseTitle>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<fvTable ref="tableIns" style="max-height: 200px;width: 100%" :tableConfig="tableConfig" <el-table :data="formData.fileList" style="width: 100%">
@headBtnClick="headBtnClick" <el-table-column label="序号" type="index" align="center" width="80"/>
:pagination="false"></fvTable> <el-table-column prop="fileName" label="文件名" align="center"/>
</el-form-item> <el-table-column prop="tag" label="标签" align="center"/>
</el-col> <el-table-column prop="size" label="文件大小" align="center">
<template #default="scope">
{{ parseInt(scope.row.size / 1024) }}KB
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template #default="scope">
<a :href="scope.row.url">
下载
</a>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
<el-col :span="24">
<div v-if="processInstanceData.taskId">
<baseTitle title="审核意见"></baseTitle> <baseTitle title="审核意见"></baseTitle>
<el-col :span="24"> <el-form-item>
<el-form-item> <el-input
<el-input v-model="auditOpinion"
v-model="auditOpinion" :rows="3"
:rows="3" type="textarea"
type="textarea" placeholder="请输入审核意见"
placeholder="请输入审核意见" />
/> </el-form-item>
</el-form-item>
</el-col>
</el-row>
</div>
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="10">-->
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="process">
<process-diagram-viewer v-if="processDiagramViewer"/>
</div> </div>
</div> </el-col>
<!-- </el-col>--> </el-row>
<!-- </el-row>--> </div>
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="process">
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
:state="processInstanceData.state"/>
<process-diagram-viewer v-if="processDiagramViewer"/>
</div>
</div>
</el-form> </el-form>
<div class="oper-page-btn"> <div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
<el-button @click="handleSubmit">驳回</el-button> <el-button @click="handleReject">驳回</el-button>
<el-button color="#DED0B2" @click="handleBack">同意</el-button> <el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {getInitiateInfo} from "@/api/workflow/process-definition.js"; import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessTree from '@/views/workflow/process/ProcessTree.vue';
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue' import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getInfo} from "@/api/project-demand/index.js"; import {getInfo, agreeTask, rejectTask} from "@/api/project-demand/index.js";
import {ElMessage} from "element-plus"; import {getSubCompOpt} from '@/api/user/user.js'
const route = useRoute()
const form = ref(); const form = ref();
const processStore = useProcessStore() const processStore = useProcessStore()
const processInstanceData = ref() const companyOption = ref([])
const processInstanceData = ref({})
const processDiagramViewer = ref(false) const processDiagramViewer = ref(false)
const processTree = ref() const processTree = ref()
const companyNameArray = ref([])
const formData = ref({}) const formData = ref({})
const auditOpinion = ref('') const auditOpinion = ref('')
const tableConfig = reactive({ const handleSubmit = () => {
columns: [ let approve = {
{ taskId: processInstanceData.value.taskId,
prop: 'roleName', auditOpinion: auditOpinion.value,
label: '文件名', formData: formData.value
align: 'center' }
}, agreeTask(approve).then(res => {
{ console.log(res)
prop: 'roleKey', })
label: '标签', }
align: 'center' const handleReject = () => {
}, let approve = {
{ taskId: processInstanceData.value.taskId,
prop: 'oper', auditOpinion: auditOpinion.value,
label: '操作', }
align: 'center', rejectTask(approve).then(res => {
width: '200px', console.log(res)
showOverflowTooltip: false, })
currentRender: ({row, index}) => { }
return ( const getCompanyOption = async () => {
<div> const res = await getSubCompOpt()
<el-button type="primary" link onClick={() => handleDownload(row)}>下载 companyOption.value = res.data
</el-button> }
</div>
) const matterTree = (data, id) => {
if(id){
for (let i = 0; i < data.length; i++) {
if (data[i].value == id) {
companyNameArray.value.push(data[i].label);
}
if (data[i].children && data[i].children.length > 0) {
matterTree(data[i].children)
} }
} }
], return companyNameArray.value;
api: '' }
}) }
const getTree = async () => {
getInfo(10).then(res => { const getDataSourceOptionItem = (val) => {
if (val !== undefined) {
val.forEach(item => {
matterTree(companyOption.value,item)
})
}
return companyNameArray.value.join('');
}
const init = async () => {
await getCompanyOption()
getInfo(route.query.id).then(res => {
let data = res.data let data = res.data
formData.value = data.formData; formData.value = data.formData;
data.formData.companyIds= getDataSourceOptionItem(data.formData.companyIds)
processInstanceData.value = data processInstanceData.value = data
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;
@@ -129,24 +162,26 @@ const getTree = async () => {
processStore.noTakeList.value = data.noTakeList; processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList; processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList; processStore.passList.value = data.passList;
nextTick(()=>{ nextTick(() => {
processDiagramViewer.value=true processDiagramViewer.value = true
}) })
}) })
} }
getTree() init()
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
a {
cursor: pointer;
font-size: 14px;
color: #2a99ff;
}
.detail-block { .detail-block {
display: flex; overflow: hidden;
justify-content: space-between; padding-right: 10px;
overflow-x: hidden;
overflow-y: auto;
.left-info { .left-info {
flex: 0.6;
.info { .info {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@@ -166,31 +201,10 @@ getTree()
} }
.approval-record { .approval-record {
flex: 0.4; padding-bottom: 30px;
.process { .process {
//max-height: calc(100vh - 96px); position: relative;
//height: calc(100vh - 250px);
overflow: hidden;
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
// 滚动条轨道
&::-webkit-scrollbar-track {
background: rgb(239, 239, 239);
border-radius: 2px;
}
// 小滑块
&::-webkit-scrollbar-thumb {
background: rgba(80, 81, 82, 0.29);
border-radius: 10px;
}
} }
} }
} }

View File

@@ -4,38 +4,35 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import Tag from '@/components/Tag.vue' import Tag from '@/components/Tag.vue'
import {getDemandInfo} from "@/api/project-demand"; import fvSelect from '@/fvcomponents/fvSelect/index.vue'
const router = useRouter() const router = useRouter()
const searchConfig = reactive([ const searchConfig = reactive([
{
label: '征集类型',
prop: 'collectType',
component: 'el-input',
props: {
placeholder: '请输入名称查询',
clearable: true
}
},
{ {
label: '需求名称', label: '需求名称',
prop: 'requirementName', prop: 'requirementName',
component: 'el-input', component: 'el-input',
props: { props: {
placeholder: '请输入名称查询', placeholder: '请输入名称查询',
clearable: true clearable: true,
filterable: true,
checkStrictly: true
}
},
{
label: '征集类型',
prop: 'collectType',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择征集类型',
clearable: true,
filterable: true,
cacheKey: 'todo_type'
} }
} }
]) ])
const tableIns = ref() const tableIns = ref()
const auths = {
edit: ['admin:role:edit'],
add: ['admin:role:add'],
export: ['admin:role:export'],
}
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{ {
@@ -67,18 +64,41 @@ const tableConfig = reactive({
label: '当前节点', label: '当前节点',
align: 'center' align: 'center'
}, },
{
prop: 'state',
label: '状态',
align: 'center',
width: 200,
showOverflowTooltip: false,
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
},
{ {
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
if (row.state === '3' || row.state === '2') {
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
btn.push({label: '删除', func: () => handleDelete(row), type: 'danger'})
} else if (row.state === '4') {
btn.push({label: '上报', func: () => handleReport(row), type: 'primary'})
}
return ( return (
<div> <div style={{width: '100%'}}>
<el-button type="primary" link onClick={() => handleDetail(row)}>详情 {
</el-button> btn.map(item => (
<el-button type="primary" link onClick={() => handleEdit(row)}>编辑</el-button> <el-button
<el-button type="primary" link onClick={() => handleReport(row)}>上报</el-button> type={item.type}
// v-perm={item.auth}
onClick={() => item.func()}
link
>
{item.label}
</el-button>
))
}
</div> </div>
) )
} }
@@ -86,8 +106,8 @@ const tableConfig = reactive({
], ],
api: '/workflow/mosr/requirement', api: '/workflow/mosr/requirement',
btns: [ btns: [
{name: '新增', key: 'add', auth: auths.add, color: '#DED0B2'}, {name: '新增', key: 'add', color: '#DED0B2'},
{name: '导出', key: 'add', auth: auths.add, type: ''}, {name: '导出', key: 'add', type: ''},
], ],
params: {} params: {}
}) })
@@ -108,7 +128,7 @@ const handleEdit = (row) => {
router.push({ router.push({
path: '/projectdemand/demandedit', path: '/projectdemand/demandedit',
query: { query: {
id: row.roleId id: row.requirementId
} }
}) })
} }
@@ -116,7 +136,7 @@ const handleDetail = (row) => {
router.push({ router.push({
path: '/projectdemand/demanddetail', path: '/projectdemand/demanddetail',
query: { query: {
id: row.roleId id: row.requirementId
} }
}) })
} }

View File

@@ -95,4 +95,4 @@ defineExpose({
init init
}) })
</script> </script>

View File

@@ -7,6 +7,7 @@
:color="operation.color" :color="operation.color"
size="large" size="large"
placement="top"> placement="top">
<el-card> <el-card>
<div style="display: flex;"> <div style="display: flex;">
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name"> <div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name">
@@ -19,34 +20,43 @@
<component :is="user.icon"/> <component :is="user.icon"/>
</el-icon> </el-icon>
</div> </div>
<el-tooltip effect="dark" :content="user.name" placement="bottom-start"> <el-tooltip effect="dark" :content="user.name" placement="bottom-start">
<span class="username">{{ user.name }}</span> <span class="username">{{ user.name }}</span>
</el-tooltip> </el-tooltip>
<template v-if="user.auditOpinion">
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
<div>
{{ user.auditOpinion }}
</div>
</div>
</template>
</div> </div>
<div style="margin-left: 10px;"> <div style="margin-left: 10px;">
<div style="color: #c0bebe">{{ operation.operationName }}</div> <div style="color: #c0bebe">{{ operation.operationName }}</div>
<div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div> <div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div>
</div> </div>
</div> </div>
<template v-if="operation.comment"> <!-- <template v-if="operation.comment">-->
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;"> <!-- <div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">-->
<div> <!-- <div>-->
{{ operation.comment.context }} <!-- {{ operation.comment.context }}-->
</div> <!-- </div>-->
<div style="margin-top: 10px;" v-if="operation.comment.attachments && operation.comment.attachments.length > 0"> <!-- <div style="margin-top: 10px;"-->
<template v-for="(item) in getAttachmentList(operation.comment.attachments,true)"> <!-- v-if="operation.comment.attachments && operation.comment.attachments.length > 0">-->
<el-image <!-- <template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">-->
style="width: 100px; height: 100px" <!-- <el-image-->
:src="item.url" <!-- style="width: 100px; height: 100px"-->
:preview-src-list="[item.url]"> <!-- :src="item.url"-->
</el-image> <!-- :preview-src-list="[item.url]">-->
</template> <!-- </el-image>-->
<div v-for="(file) in getAttachmentList(operation.comment.attachments,false)"> <!-- </template>-->
<el-link style="color: #2a99ff" :href="file.url" icon="el-icon-document">{{ file.name }}</el-link> <!-- <div v-for="(file) in getAttachmentList(operation.comment.attachments,false)">-->
</div> <!-- <el-link style="color: #2a99ff" :href="file.url" icon="el-icon-document">{{ file.name }}</el-link>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</template> <!-- </div>-->
<!-- </template>-->
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item :color="timeline.color" :icon="timeline.icon" size="large"> <el-timeline-item :color="timeline.color" :icon="timeline.icon" size="large">
@@ -60,7 +70,7 @@
<script setup> <script setup>
import {CircleCheckFilled, Close, Loading, MoreFilled} from "@element-plus/icons-vue"; import {CircleCheckFilled, Close, Loading, MoreFilled} from "@element-plus/icons-vue";
import {ref,defineProps} from 'vue' import {ref, defineProps} from 'vue'
const props = defineProps({ const props = defineProps({
operationList: { operationList: {
@@ -113,12 +123,12 @@ const init = () => {
break break
} }
// let operationListNew = [] // let operationListNew = []
for (let i = 0;i<props.operationList.length;i++) { for (let i = 0; i < props.operationList.length; i++) {
let operationNew = initOperationFun(props.operationList[i]) let operationNew = initOperationFun(props.operationList[i])
let userList = [] let userList = []
if (operationNew.userInfo){ if (operationNew.userInfo) {
for (let user of operationNew.userInfo) { for (let user of operationNew.userInfo) {
let userNew = initUser(user,operationNew.operation) let userNew = initUser(user, operationNew.operation)
userList.push(userNew) userList.push(userNew)
} }
operationNew.userInfo = userList operationNew.userInfo = userList
@@ -132,7 +142,7 @@ const init = () => {
const getAttachmentList = (attachments, image) => { const getAttachmentList = (attachments, image) => {
let result = []; let result = [];
if (attachments){ if (attachments) {
for (let attachment of attachments) { for (let attachment of attachments) {
if (attachment.isImage === image) { if (attachment.isImage === image) {
result.push(attachment) result.push(attachment)
@@ -142,7 +152,7 @@ const getAttachmentList = (attachments, image) => {
return result; return result;
} }
const initUser = (user,type) => { const initUser = (user, type) => {
let state = user.state let state = user.state
//创建节点 //创建节点
if (state === 'CREATE') { if (state === 'CREATE') {
@@ -154,7 +164,7 @@ const initUser = (user,type) => {
user["icon"] = 'CircleCheckFilled' user["icon"] = 'CircleCheckFilled'
user["color"] = "#0bbd87" user["color"] = "#0bbd87"
} }
if (type === "CC"){ if (type === "CC") {
user["icon"] = "Promotion" user["icon"] = "Promotion"
user["color"] = "#3395f8" user["color"] = "#3395f8"
} }
@@ -169,7 +179,7 @@ const initUser = (user,type) => {
user["icon"] = 'Close' user["icon"] = 'Close'
user["color"] = "#f56c6c" user["color"] = "#f56c6c"
} }
if (state === 'PASS'){ if (state === 'PASS') {
user["icon"] = 'MoreFilled' user["icon"] = 'MoreFilled'
user["color"] = "#c0c4cc" user["color"] = "#c0c4cc"
} }
@@ -277,7 +287,8 @@ init()
position: relative; position: relative;
margin-right: 5px; margin-right: 5px;
} }
.el-timeline-item__node{
.el-timeline-item__node {
position: absolute; position: absolute;
bottom: 20px; bottom: 20px;
right: 1px; right: 1px;

View File

@@ -9,7 +9,7 @@
<div style="margin-top: 40px"> <div style="margin-top: 40px">
<div :style="'transform: scale('+ scale / 100 +');'"> <div :style="'transform: scale('+ scale / 100 +');'">
<div id="previewProcess"> <div id="previewProcess">
<process-tree mode="preview" ref="processTreePreview" id-name="previewProcess"/> <process-tree :mode="mode" ref="processTreePreview" id-name="previewProcess"/>
</div> </div>
</div> </div>
</div> </div>
@@ -20,6 +20,12 @@ import ProcessTree from '@/views/workflow/process/ProcessTree.vue'
const processTreePreview = ref() const processTreePreview = ref()
const scale = ref(100) const scale = ref(100)
const props = defineProps({
mode: {
type: String,
default: 'preview'
}
})
nextTick(()=>{ nextTick(()=>{
processTreePreview.value.init() processTreePreview.value.init()

View File

@@ -5,8 +5,11 @@
<slot name="pre"></slot> <slot name="pre"></slot>
<div style="display: flex;flex-wrap: wrap;"> <div style="display: flex;flex-wrap: wrap;">
<div v-for="(user,index) in userInfo" :key="index" class="avatar_name"> <div v-for="(user,index) in userInfo" :key="index" class="avatar_name">
<el-avatar size="large" <div class="circle-user">
:src="user.avatar"></el-avatar> <el-tooltip class="item" effect="dark" :content="user.name" placement="bottom-start">
<span class="item_name">{{ user.name }}</span>
</el-tooltip>
</div>
<div v-if="user.icon" <div v-if="user.icon"
class="el-timeline-item__node" :style="{ class="el-timeline-item__node" :style="{
backgroundColor: user.color backgroundColor: user.color
@@ -15,17 +18,15 @@
<component :is="user.icon"/> <component :is="user.icon"/>
</el-icon> </el-icon>
</div> </div>
<el-tooltip class="item" effect="dark" :content="user.name" placement="bottom-start">
<span class="item_name">{{ user.name }}</span>
</el-tooltip>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import {Loading,Close,CircleCheckFilled,MoreFilled} from '@element-plus/icons-vue' import {Loading, Close, CircleCheckFilled, MoreFilled} from '@element-plus/icons-vue'
import {defineProps} from "vue"; import {defineProps} from "vue";
const props = defineProps({ const props = defineProps({
row: { row: {
type: Number, type: Number,
@@ -38,6 +39,10 @@ const props = defineProps({
userInfo: { userInfo: {
type: Array, type: Array,
default: [] default: []
},
mode: {
type: String,
default: 'design'
} }
}) })
@@ -70,7 +75,7 @@ const initUser = (user) => {
user["icon"] = Close user["icon"] = Close
user["color"] = "#f56c6c" user["color"] = "#f56c6c"
} }
if (state === 'PASS'){ if (state === 'PASS') {
user["icon"] = MoreFilled user["icon"] = MoreFilled
user["color"] = "#c0c4cc" user["color"] = "#c0c4cc"
} }
@@ -80,7 +85,27 @@ const initUser = (user) => {
init() init()
</script> </script>
<style scoped> <style scoped lang="scss">
.circle-user {
width: 50px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
border: 1px solid #ACACAC;
position: relative;
.circle-icon {
width: 10px;
height: 10px;
position: absolute;
top: auto !important;
bottom: -9px;
right: 15px !important;
}
}
.avatar_name { .avatar_name {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -92,7 +117,7 @@ init()
.el-timeline-item__node { .el-timeline-item__node {
position: absolute; position: absolute;
bottom: 20px; bottom: 0;
right: 1px; right: 1px;
} }

View File

@@ -17,24 +17,17 @@
</el-icon> </el-icon>
<template v-if="selectUser.show && mode === 'view'"> <template v-if="selectUser.show && mode === 'view'">
<div class="avatar_button"> <div class="avatar_button">
<avatar-ellipsis :row="3" v-if="userInfo.length > 0" :user-info="userInfo"/> <avatar-ellipsis :row="3" v-if="userInfo.length > 0" :mode="mode" :user-info="userInfo"/>
<el-button type="primary" :icon="Plus" circle/> <el-button type="primary" :icon="Plus" circle/>
</div> </div>
</template> </template>
<template v-else-if="showAvatar"> <template v-else-if="showAvatar">
<span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span> <span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span>
<div v-else v-for="item in userInfo" class="circle-user"> <avatar-ellipsis :row="3" v-if="userInfo.length > 0" :user-info="userInfo"/>
<span>{{ item.name }}</span>
<el-button v-if="item.state==='RUNNING'" type="warning" loading circle class="circle-icon"></el-button>
<el-button v-else-if="item.state==='UNACTIVATED'" type="info" :icon="More" circle
class="circle-icon"></el-button>
<el-button v-else type="success" :icon="Check" circle class="circle-icon"></el-button>
</div>
<!-- <avatar-ellipsis :row="3" :user-info="userInfo"/>-->
</template> </template>
<template v-else> <template v-else>
<span class="placeholder" v-if="(content || '').trim() === ''">{{ placeholder }}</span> <span class="placeholder" v-if="(content || '').trim() === ''">{{ placeholder }}</span>
<ellipsis :row="3" :content="content" v-else/> <ellipsis :row="3" :content="content" :mode="mode" v-else/>
</template> </template>
</div> </div>
<div class="node-error" v-if="showError"> <div class="node-error" v-if="showError">
@@ -190,26 +183,6 @@ const init = () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.circle-user {
width: 50px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
border: 1px solid #ACACAC;
position: relative;
.circle-icon {
width: 10px;
height: 10px;
position: absolute;
top: auto !important;
bottom: -9px;
right: 15px !important;
}
}
.root { .root {
&:before { &:before {
display: none !important; display: none !important;

View File

@@ -18,7 +18,6 @@ export default defineConfig({
AutoImport({ AutoImport({
//自动导入vue相关函数 //自动导入vue相关函数
imports: ['vue','vue-router'], imports: ['vue','vue-router'],
resolvers: [ resolvers: [
ElementPlusResolver(), ElementPlusResolver(),
//自动导入图标组件 //自动导入图标组件
@@ -70,7 +69,8 @@ export default defineConfig({
open: true, open: true,
proxy: { proxy: {
'/api/workflow': { '/api/workflow': {
target: 'http://clay.frp.feashow.cn/', target: 'http://frp.feashow.cn:31800/',
// target: 'http://clay.frp.feashow.cn/',
// target: 'http://192.168.31.175:8000', // target: 'http://192.168.31.175:8000',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '') rewrite: (path) => path.replace(/^\/api/, '')