Merge remote-tracking branch 'origin/master'
This commit is contained in:
8
src/api/home/index.js
Normal file
8
src/api/home/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
export const getHomeInfo = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/process/task',
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
@@ -19,3 +19,50 @@ export const getInfo = (requirementId) => {
|
||||
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"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -378,7 +378,8 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
||||
.scale {
|
||||
margin-top: 10px;
|
||||
z-index: 666;
|
||||
//position: absolute;
|
||||
position: absolute;
|
||||
//top: -20px;
|
||||
}
|
||||
|
||||
.el-overlay-dialog {
|
||||
|
||||
@@ -6,24 +6,26 @@
|
||||
with-credentials
|
||||
:multiple="maxSize > 0"
|
||||
:data="uploadParams"
|
||||
:show-file-list="false"
|
||||
:auto-upload="true"
|
||||
:before-upload="beforeUpload"
|
||||
:on-success="handleUploadSuccess"
|
||||
>
|
||||
<el-button color="#DED0B2">上传文件</el-button>
|
||||
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineProps, computed, ref} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import { getToken } from '@/utils/auth'
|
||||
import {getToken} from '@/utils/auth'
|
||||
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({
|
||||
authorization: getToken()
|
||||
})
|
||||
const disabled = ref(false)
|
||||
const loading = ref(false)
|
||||
const showTable = ref(false)
|
||||
const uploadParams = ref({})
|
||||
const props = defineProps({
|
||||
value: {
|
||||
@@ -34,10 +36,11 @@ const props = defineProps({
|
||||
},
|
||||
maxSize: {
|
||||
type: Number,
|
||||
default: 5
|
||||
default: 30
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(["input","getFile"])
|
||||
|
||||
const emit = defineEmits(["input", "getFile"])
|
||||
const fileList = ref([])
|
||||
const _value = computed({
|
||||
get() {
|
||||
@@ -49,19 +52,37 @@ const _value = computed({
|
||||
})
|
||||
|
||||
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) {
|
||||
// ElMessage.warning(`每个文件最大不超过 ${props.maxSize}MB`)
|
||||
// } else {
|
||||
return true
|
||||
loading.value = true
|
||||
return true
|
||||
// }
|
||||
}
|
||||
const handleUploadSuccess = (res, file) => {
|
||||
if (res.code !== 1000) {
|
||||
loading.value = false
|
||||
ElMessage.error("上传失败")
|
||||
} else {
|
||||
loading.value = false
|
||||
ElMessage.success("上传成功")
|
||||
}
|
||||
showTable.value = true
|
||||
let data = res.data
|
||||
fileList.value.push(data)
|
||||
emit("getFile", fileList.value)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
a {
|
||||
font-size: 14px;
|
||||
color: #2a99ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,8 +29,6 @@ serveice.interceptors.response.use(response => {
|
||||
if (response.request.responseType === 'blob' || response.request.responseType === 'arraybuffer') {
|
||||
return response.data
|
||||
}
|
||||
console.log("window.location.pathname", window.location.pathname)
|
||||
console.log("windows", window.location.search)
|
||||
return response.data
|
||||
}, error => {
|
||||
let response = error.response
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<h4>待办 ({{ todoNum }})</h4>
|
||||
<fvTable ref="tableIns" class="home-table" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||
<fvTable ref="tableIns" class="home-table" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无待办"/>
|
||||
</template>
|
||||
@@ -25,11 +25,6 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6">
|
||||
<div class="right">
|
||||
<!-- <div class="right-top">-->
|
||||
<!-- <h3>欢迎回来, Sunshine</h3>-->
|
||||
<!-- <div>科技创新项目需求征集中, 要求参见OA内部信!</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="right-gap"></div>-->
|
||||
<div class="right-top ">
|
||||
<div>
|
||||
<h3>帮助文档</h3>
|
||||
@@ -46,7 +41,6 @@
|
||||
<span>常用网站</span>
|
||||
</div>
|
||||
<el-divider/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -57,6 +51,7 @@
|
||||
<script setup lang="jsx">
|
||||
import 'element-plus/theme-chalk/display.css'
|
||||
|
||||
const router = useRouter()
|
||||
const list = ref([
|
||||
{
|
||||
title: '待立项',
|
||||
@@ -105,25 +100,30 @@ const todoNum = ref(20)
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'userName',
|
||||
label: '单据编号',
|
||||
prop: 'processName',
|
||||
label: '流程名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'nickName',
|
||||
label: '消息主题',
|
||||
prop: 'initiatorName',
|
||||
label: '发起人',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
prop: 'targetState',
|
||||
label: '类型',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'todo_type'} value={row.state}/>)
|
||||
currentRender: ({row, index}) => (<Tag dictType={'todo_type'} value={row.targetState}/>)
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
prop: 'submitTime',
|
||||
label: '提交时间',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'taskName',
|
||||
label: '当前节点',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
@@ -136,24 +136,28 @@ const tableConfig = reactive({
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<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>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '',
|
||||
api: '/workflow/mosr/process/task',
|
||||
params: {},
|
||||
})
|
||||
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
const handleView = (row) => {
|
||||
console.log('row', row)
|
||||
if(row.targetState=='00'&&row.taskId){
|
||||
router.push({
|
||||
path: '/projectdemand/demanddetail',
|
||||
query: {
|
||||
id: row.taskId
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -162,29 +166,21 @@ const headBtnClick = (key) => {
|
||||
margin-top: 10px;
|
||||
}
|
||||
:deep(.el-table) {
|
||||
height: 300px!important;
|
||||
height: 300px !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1000px) {
|
||||
.right {
|
||||
margin-top: 10px;
|
||||
}
|
||||
: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 {
|
||||
height: calc(100vh - 130px);
|
||||
@@ -273,21 +269,6 @@ const headBtnClick = (key) => {
|
||||
flex-direction: column;
|
||||
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 {
|
||||
flex: 0.5;
|
||||
padding: 15px;
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="add-block">
|
||||
<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">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入子公司编码" clearable></el-input>
|
||||
<el-form-item label="名称" prop="requirementName">
|
||||
<el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属公司" prop="company">
|
||||
<el-select v-model="queryParams.company" placeholder="登录状态" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in companyOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-form-item label="所属公司" prop="companyIds">
|
||||
<el-tree-select v-model="formData.companyIds" :data="companyOption" style="width: 100%;"
|
||||
filterable clearable :check-strictly="true" multiple/>
|
||||
</el-form-item>
|
||||
<el-form-item label="征集类型" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="登录状态" clearable filterable>
|
||||
<el-form-item label="征集类型" prop="collectType">
|
||||
<el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in typeOption"
|
||||
:key="item.value"
|
||||
@@ -29,159 +23,142 @@
|
||||
<el-form-item label="截止时间" prop="time">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="dateValue"
|
||||
v-model="formData.deadline"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</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>
|
||||
</el-form>
|
||||
<!-- <fvForm :schema="schame" @getInstance="getInstance" :rules="rules"></fvForm>-->
|
||||
<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>
|
||||
<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">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer v-if="processDiagramViewer"/>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
<!-- <div class="process" id="approvalRecord">-->
|
||||
<!-- <process-tree ref="processTree" mode="view" id-name="approvalRecord"/>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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 {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 {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 router = useRouter()
|
||||
const route = useRoute()
|
||||
const demandForm = ref()
|
||||
const typeOption = ref([])
|
||||
const companyOption = ref([])
|
||||
const dateValue = ref()
|
||||
const formData = 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 fileList = ref(null)
|
||||
const menuTree = ref(null)
|
||||
const loading = ref(false)
|
||||
const localData = reactive({
|
||||
affiliatedCompany: []
|
||||
})
|
||||
|
||||
const processStore = useProcessStore()
|
||||
const processInstanceData = ref()
|
||||
const instructions = ref()
|
||||
const schame = computed(() => {
|
||||
let arr = [
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'roleName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称',
|
||||
clearable: true
|
||||
}
|
||||
},
|
||||
{
|
||||
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'
|
||||
}
|
||||
|
||||
const compositeParam=(item)=>{
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
fileName: item.fileName,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag: formData.value.collectType,
|
||||
userId: authStore.userinfo.userId
|
||||
}
|
||||
]
|
||||
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) => {
|
||||
console.log('fileList', val)
|
||||
fileList.value = val
|
||||
let fileObj = {}
|
||||
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 res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getWorkflowInfo().then(res => {
|
||||
let data = res.data
|
||||
console.log('res2', res)
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
@@ -189,69 +166,96 @@ const init = async () => {
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(()=>{
|
||||
processDiagramViewer.value=true
|
||||
nextTick(() => {
|
||||
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 loading = ElLoading.service({fullscreen: true})
|
||||
// const {isValidate} = await form.value.validate()
|
||||
// if (!isValidate) return Promise.reject()
|
||||
// const values = form.value.getValues()
|
||||
// values.menuIds = checkChange()
|
||||
// operate(values).then(res => {
|
||||
// ElNotification({
|
||||
// title: route.query.isAdd ? '新增' : '编辑',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// loading.close()
|
||||
// res.code === 1000 ? tagsViewStore.delViewAndGoView('/system/role') : null
|
||||
// }).finally(() => {
|
||||
// loading.close()
|
||||
// })
|
||||
let params = {
|
||||
...formData.value,
|
||||
requirementId: 0,
|
||||
files: fileList.value,
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
}
|
||||
let res
|
||||
if (route.query.isAdd === undefined) {
|
||||
res = await resubmit(params)
|
||||
} else {
|
||||
res = await addRequirement(params)
|
||||
}
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
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 = () => {
|
||||
history.back()
|
||||
}
|
||||
const beforeRemove = (row) => {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.filename}的表格吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
handleRemove(row)
|
||||
}).catch(() => {
|
||||
ElMessage.warning("用户取消删除! ");
|
||||
})
|
||||
}
|
||||
|
||||
watch(localData, (val) => {
|
||||
menuTree.value.filter(val.filterText)
|
||||
const handleRemove = (row) => {
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.add-block {
|
||||
//display: flex;
|
||||
//justify-content: space-between;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
a {
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #2a99ff;
|
||||
}
|
||||
|
||||
.approval-record {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,127 +1,160 @@
|
||||
<template>
|
||||
<div class="detail-block">
|
||||
<el-form :model="form" label-width="auto">
|
||||
<baseTitle title="需求征集详情"></baseTitle>
|
||||
<div class="left-info">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.collectExplain">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="申请文件"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable ref="tableIns" style="max-height: 200px;width: 100%" :tableConfig="tableConfig"
|
||||
@headBtnClick="headBtnClick"
|
||||
:pagination="false"></fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<baseTitle title="需求征集详情"></baseTitle>
|
||||
<div class="left-info">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司">
|
||||
<span>{{ formData.companyIds }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="征集类型">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.collectExplain">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="processInstanceData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</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"/>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
</el-col>
|
||||
</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>
|
||||
<div class="oper-page-btn">
|
||||
<el-button @click="handleSubmit">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleBack">同意</el-button>
|
||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||
<el-button @click="handleReject">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getInitiateInfo} from "@/api/workflow/process-definition.js";
|
||||
import ProcessTree from '@/views/workflow/process/ProcessTree.vue';
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {getInfo, agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
|
||||
const route = useRoute()
|
||||
const form = ref();
|
||||
const processStore = useProcessStore()
|
||||
const processInstanceData = ref()
|
||||
const companyOption = ref([])
|
||||
const processInstanceData = ref({})
|
||||
const processDiagramViewer = ref(false)
|
||||
|
||||
const processTree = ref()
|
||||
const companyNameArray = ref([])
|
||||
const formData = ref({})
|
||||
const auditOpinion = ref('')
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'roleName',
|
||||
label: '文件名',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'roleKey',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
width: '200px',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载
|
||||
</el-button>
|
||||
</div>
|
||||
)
|
||||
const handleSubmit = () => {
|
||||
let approve = {
|
||||
taskId: processInstanceData.value.taskId,
|
||||
auditOpinion: auditOpinion.value,
|
||||
formData: formData.value
|
||||
}
|
||||
agreeTask(approve).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
const handleReject = () => {
|
||||
let approve = {
|
||||
taskId: processInstanceData.value.taskId,
|
||||
auditOpinion: auditOpinion.value,
|
||||
}
|
||||
rejectTask(approve).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: ''
|
||||
})
|
||||
const getTree = async () => {
|
||||
getInfo(10).then(res => {
|
||||
return companyNameArray.value;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
formData.value = data.formData;
|
||||
data.formData.companyIds= getDataSourceOptionItem(data.formData.companyIds)
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
@@ -129,24 +162,26 @@ const getTree = async () => {
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(()=>{
|
||||
processDiagramViewer.value=true
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
})
|
||||
}
|
||||
getTree()
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
a {
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #2a99ff;
|
||||
}
|
||||
|
||||
.detail-block {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
overflow: hidden;
|
||||
padding-right: 10px;
|
||||
|
||||
.left-info {
|
||||
flex: 0.6;
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -166,31 +201,10 @@ getTree()
|
||||
}
|
||||
|
||||
.approval-record {
|
||||
flex: 0.4;
|
||||
padding-bottom: 30px;
|
||||
.process {
|
||||
//max-height: calc(100vh - 96px);
|
||||
//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;
|
||||
}
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,38 +4,35 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import Tag from '@/components/Tag.vue'
|
||||
import {getDemandInfo} from "@/api/project-demand";
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
clearable: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '需求名称',
|
||||
prop: 'requirementName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
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 auths = {
|
||||
edit: ['admin:role:edit'],
|
||||
add: ['admin:role:add'],
|
||||
export: ['admin:role:export'],
|
||||
}
|
||||
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -67,18 +64,41 @@ const tableConfig = reactive({
|
||||
label: '当前节点',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
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 (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDetail(row)}>详情
|
||||
</el-button>
|
||||
<el-button type="primary" link onClick={() => handleEdit(row)}>编辑</el-button>
|
||||
<el-button type="primary" link onClick={() => handleReport(row)}>上报</el-button>
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -86,8 +106,8 @@ const tableConfig = reactive({
|
||||
],
|
||||
api: '/workflow/mosr/requirement',
|
||||
btns: [
|
||||
{name: '新增', key: 'add', auth: auths.add, color: '#DED0B2'},
|
||||
{name: '导出', key: 'add', auth: auths.add, type: ''},
|
||||
{name: '新增', key: 'add', color: '#DED0B2'},
|
||||
{name: '导出', key: 'add', type: ''},
|
||||
],
|
||||
params: {}
|
||||
})
|
||||
@@ -108,7 +128,7 @@ const handleEdit = (row) => {
|
||||
router.push({
|
||||
path: '/projectdemand/demandedit',
|
||||
query: {
|
||||
id: row.roleId
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -116,7 +136,7 @@ const handleDetail = (row) => {
|
||||
router.push({
|
||||
path: '/projectdemand/demanddetail',
|
||||
query: {
|
||||
id: row.roleId
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -95,4 +95,4 @@ defineExpose({
|
||||
init
|
||||
})
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
:color="operation.color"
|
||||
size="large"
|
||||
placement="top">
|
||||
|
||||
<el-card>
|
||||
<div style="display: flex;">
|
||||
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name">
|
||||
@@ -19,34 +20,43 @@
|
||||
<component :is="user.icon"/>
|
||||
</el-icon>
|
||||
</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>
|
||||
</el-tooltip>
|
||||
|
||||
<template v-if="user.auditOpinion">
|
||||
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
|
||||
<div>
|
||||
{{ user.auditOpinion }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div style="margin-left: 10px;">
|
||||
<div style="color: #c0bebe">{{ operation.operationName }}</div>
|
||||
<div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="operation.comment">
|
||||
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
|
||||
<div>
|
||||
{{ operation.comment.context }}
|
||||
</div>
|
||||
<div style="margin-top: 10px;" v-if="operation.comment.attachments && operation.comment.attachments.length > 0">
|
||||
<template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="item.url"
|
||||
:preview-src-list="[item.url]">
|
||||
</el-image>
|
||||
</template>
|
||||
<div v-for="(file) in getAttachmentList(operation.comment.attachments,false)">
|
||||
<el-link style="color: #2a99ff" :href="file.url" icon="el-icon-document">{{ file.name }}</el-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- <template v-if="operation.comment">-->
|
||||
<!-- <div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">-->
|
||||
<!-- <div>-->
|
||||
<!-- {{ operation.comment.context }}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-top: 10px;"-->
|
||||
<!-- v-if="operation.comment.attachments && operation.comment.attachments.length > 0">-->
|
||||
<!-- <template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">-->
|
||||
<!-- <el-image-->
|
||||
<!-- style="width: 100px; height: 100px"-->
|
||||
<!-- :src="item.url"-->
|
||||
<!-- :preview-src-list="[item.url]">-->
|
||||
<!-- </el-image>-->
|
||||
<!-- </template>-->
|
||||
<!-- <div v-for="(file) in getAttachmentList(operation.comment.attachments,false)">-->
|
||||
<!-- <el-link style="color: #2a99ff" :href="file.url" icon="el-icon-document">{{ file.name }}</el-link>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item :color="timeline.color" :icon="timeline.icon" size="large">
|
||||
@@ -60,7 +70,7 @@
|
||||
|
||||
<script setup>
|
||||
import {CircleCheckFilled, Close, Loading, MoreFilled} from "@element-plus/icons-vue";
|
||||
import {ref,defineProps} from 'vue'
|
||||
import {ref, defineProps} from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
operationList: {
|
||||
@@ -113,12 +123,12 @@ const init = () => {
|
||||
break
|
||||
}
|
||||
// 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 userList = []
|
||||
if (operationNew.userInfo){
|
||||
if (operationNew.userInfo) {
|
||||
for (let user of operationNew.userInfo) {
|
||||
let userNew = initUser(user,operationNew.operation)
|
||||
let userNew = initUser(user, operationNew.operation)
|
||||
userList.push(userNew)
|
||||
}
|
||||
operationNew.userInfo = userList
|
||||
@@ -132,7 +142,7 @@ const init = () => {
|
||||
|
||||
const getAttachmentList = (attachments, image) => {
|
||||
let result = [];
|
||||
if (attachments){
|
||||
if (attachments) {
|
||||
for (let attachment of attachments) {
|
||||
if (attachment.isImage === image) {
|
||||
result.push(attachment)
|
||||
@@ -142,7 +152,7 @@ const getAttachmentList = (attachments, image) => {
|
||||
return result;
|
||||
}
|
||||
|
||||
const initUser = (user,type) => {
|
||||
const initUser = (user, type) => {
|
||||
let state = user.state
|
||||
//创建节点
|
||||
if (state === 'CREATE') {
|
||||
@@ -154,7 +164,7 @@ const initUser = (user,type) => {
|
||||
user["icon"] = 'CircleCheckFilled'
|
||||
user["color"] = "#0bbd87"
|
||||
}
|
||||
if (type === "CC"){
|
||||
if (type === "CC") {
|
||||
user["icon"] = "Promotion"
|
||||
user["color"] = "#3395f8"
|
||||
}
|
||||
@@ -169,7 +179,7 @@ const initUser = (user,type) => {
|
||||
user["icon"] = 'Close'
|
||||
user["color"] = "#f56c6c"
|
||||
}
|
||||
if (state === 'PASS'){
|
||||
if (state === 'PASS') {
|
||||
user["icon"] = 'MoreFilled'
|
||||
user["color"] = "#c0c4cc"
|
||||
}
|
||||
@@ -277,7 +287,8 @@ init()
|
||||
position: relative;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.el-timeline-item__node{
|
||||
|
||||
.el-timeline-item__node {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 1px;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div style="margin-top: 40px">
|
||||
<div :style="'transform: scale('+ scale / 100 +');'">
|
||||
<div id="previewProcess">
|
||||
<process-tree mode="preview" ref="processTreePreview" id-name="previewProcess"/>
|
||||
<process-tree :mode="mode" ref="processTreePreview" id-name="previewProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,6 +20,12 @@ import ProcessTree from '@/views/workflow/process/ProcessTree.vue'
|
||||
|
||||
const processTreePreview = ref()
|
||||
const scale = ref(100)
|
||||
const props = defineProps({
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'preview'
|
||||
}
|
||||
})
|
||||
|
||||
nextTick(()=>{
|
||||
processTreePreview.value.init()
|
||||
|
||||
@@ -5,8 +5,11 @@
|
||||
<slot name="pre"></slot>
|
||||
<div style="display: flex;flex-wrap: wrap;">
|
||||
<div v-for="(user,index) in userInfo" :key="index" class="avatar_name">
|
||||
<el-avatar size="large"
|
||||
:src="user.avatar"></el-avatar>
|
||||
<div class="circle-user">
|
||||
<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"
|
||||
class="el-timeline-item__node" :style="{
|
||||
backgroundColor: user.color
|
||||
@@ -15,17 +18,15 @@
|
||||
<component :is="user.icon"/>
|
||||
</el-icon>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<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";
|
||||
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Number,
|
||||
@@ -38,6 +39,10 @@ const props = defineProps({
|
||||
userInfo: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'design'
|
||||
}
|
||||
})
|
||||
|
||||
@@ -70,7 +75,7 @@ const initUser = (user) => {
|
||||
user["icon"] = Close
|
||||
user["color"] = "#f56c6c"
|
||||
}
|
||||
if (state === 'PASS'){
|
||||
if (state === 'PASS') {
|
||||
user["icon"] = MoreFilled
|
||||
user["color"] = "#c0c4cc"
|
||||
}
|
||||
@@ -80,7 +85,27 @@ const initUser = (user) => {
|
||||
init()
|
||||
</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 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -92,7 +117,7 @@ init()
|
||||
|
||||
.el-timeline-item__node {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
bottom: 0;
|
||||
right: 1px;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,24 +17,17 @@
|
||||
</el-icon>
|
||||
<template v-if="selectUser.show && mode === 'view'">
|
||||
<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/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="showAvatar">
|
||||
<span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span>
|
||||
<div v-else v-for="item in userInfo" class="circle-user">
|
||||
<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"/>-->
|
||||
<avatar-ellipsis :row="3" v-if="userInfo.length > 0" :user-info="userInfo"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<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>
|
||||
</div>
|
||||
<div class="node-error" v-if="showError">
|
||||
@@ -190,26 +183,6 @@ const init = () => {
|
||||
</script>
|
||||
|
||||
<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 {
|
||||
&:before {
|
||||
display: none !important;
|
||||
|
||||
@@ -18,7 +18,6 @@ export default defineConfig({
|
||||
AutoImport({
|
||||
//自动导入vue相关函数
|
||||
imports: ['vue','vue-router'],
|
||||
|
||||
resolvers: [
|
||||
ElementPlusResolver(),
|
||||
//自动导入图标组件
|
||||
@@ -70,7 +69,8 @@ export default defineConfig({
|
||||
open: true,
|
||||
proxy: {
|
||||
'/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',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
|
||||
Reference in New Issue
Block a user