Merge pull request 'master' (#151) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/151
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"
|
||||||
|
});
|
||||||
|
};
|
||||||
75
src/api/project-demand/index.js
Normal file
75
src/api/project-demand/index.js
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
import request from '@/utils/request.js'
|
||||||
|
//需求征集
|
||||||
|
export const getDemandInfo = (param) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement',
|
||||||
|
method: "get",
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getWorkflowInfo = () => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/process',
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getInfo = (requirementId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/requirement/info/${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 resubmitRequirement = (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"
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -379,6 +379,7 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
z-index: 666;
|
z-index: 666;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
//top: -20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-overlay-dialog {
|
.el-overlay-dialog {
|
||||||
|
|||||||
@@ -6,24 +6,48 @@
|
|||||||
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>
|
||||||
|
<!-- <div v-if="showTable||fileList.length!==0">-->
|
||||||
|
<!-- <el-table :data="fileList" style="width: 100%">-->
|
||||||
|
<!-- <el-table-column label="序号" type="index" align="center" width="80"/>-->
|
||||||
|
<!-- <el-table-column prop="originalFilename" label="文件名" align="center"/>-->
|
||||||
|
<!-- <el-table-column prop="size" label="文件大小" align="center">-->
|
||||||
|
<!-- <template #default="scope">-->
|
||||||
|
<!-- {{ parseInt(scope.row.size / 1024) }}KB-->
|
||||||
|
<!-- <!– {{ parseInt(scope.row.size / 1024) > 1024 ? 'MB' : 'KB' }}–>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<!-- <el-table-column align="center" label="操作">-->
|
||||||
|
<!-- <template #default="scope">-->
|
||||||
|
<!-- <el-button link type="primary" size="small" @click="beforeRemove(scope.row)">-->
|
||||||
|
<!-- 删除-->
|
||||||
|
<!-- </el-button>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<!-- </el-table>-->
|
||||||
|
<!-- </div>-->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {defineProps, computed, ref} from "vue";
|
import {defineProps, computed, ref} from "vue";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import { getToken } from '@/utils/auth'
|
import {getToken} from '@/utils/auth'
|
||||||
|
import {deleteFile} from "@/api/project-demand";
|
||||||
|
|
||||||
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 +58,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 +74,57 @@ 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)
|
||||||
}
|
}
|
||||||
|
const beforeRemove = (row) => {
|
||||||
|
ElMessageBox.confirm(`确认删除名称为${row.originalFilename}的表格吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
handleRemove(row)
|
||||||
|
}).catch(() => {
|
||||||
|
ElMessage.warning("用户取消删除! ");
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRemove = (row) => {
|
||||||
|
deleteFile(row.id).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fileList.value.splice(fileList.value.findIndex((item) => item.id === row.id), 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
a {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #2a99ff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ const props = defineProps({
|
|||||||
type: [String, Array],
|
type: [String, Array],
|
||||||
default: "微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;"
|
default: "微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;"
|
||||||
},
|
},
|
||||||
|
width:{
|
||||||
|
type: String,
|
||||||
|
default: 'auto'
|
||||||
|
},
|
||||||
height:{
|
height:{
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 450
|
default: 450
|
||||||
@@ -84,6 +88,7 @@ const init = reactive({
|
|||||||
placeholder: "在这里输入文字", //textarea中的提示信息
|
placeholder: "在这里输入文字", //textarea中的提示信息
|
||||||
min_width: 300,
|
min_width: 300,
|
||||||
min_height: 200,
|
min_height: 200,
|
||||||
|
width:props.width,
|
||||||
height: props.height, //注:引入autoresize插件时,此属性失效
|
height: props.height, //注:引入autoresize插件时,此属性失效
|
||||||
resize: "both", //编辑器宽高是否可变,false-否,true-高可变,'both'-宽高均可,注意引号
|
resize: "both", //编辑器宽高是否可变,false-否,true-高可变,'both'-宽高均可,注意引号
|
||||||
promotion: false,
|
promotion: false,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -1,166 +1,291 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading" class="add-block">
|
||||||
<baseTitle title="需求征集信息录入"></baseTitle>
|
<baseTitle title="需求征集信息录入"></baseTitle>
|
||||||
<fvForm :schema="schame" @getInstance="getInstance" :rules="rules"></fvForm>
|
<el-form :model="formData" inline class="query-form" ref="demandForm">
|
||||||
|
<div class="left-info">
|
||||||
|
<el-form-item label="名称" prop="requirementName">
|
||||||
|
<el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<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="collectType">
|
||||||
|
<el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in typeOption"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="截止时间" prop="time">
|
||||||
|
<el-config-provider>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.deadline"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="截止时间"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
/>
|
||||||
|
</el-config-provider>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
<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">
|
||||||
|
<baseTitle title="流程"></baseTitle>
|
||||||
|
<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">
|
<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 {useTagsView} from '@/stores/tagsview.js'
|
|
||||||
import {useAuthStore} from '@/stores/userstore.js'
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import {ElLoading, ElNotification} from 'element-plus';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getMenuList} from '@/api/system/menuman.js'
|
import {getWorkflowInfo, addRequirement, getFormInfo,resubmit} from "@/api/project-demand/index.js";
|
||||||
import {getRoleDetail, operate, getTemRoleOption} from "@/api/role/role";
|
import FileUpload from "@/components/FileUpload.vue";
|
||||||
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'
|
||||||
|
import {deleteFile} from "@/api/project-demand";
|
||||||
|
import {resubmitRequirement} from "../../../api/project-demand";
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
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 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({
|
const processStore = useProcessStore()
|
||||||
affiliatedCompany: []
|
const processInstanceData = ref()
|
||||||
})
|
|
||||||
const instructions = ref()
|
const getFile = (val) => {
|
||||||
const schame = computed(() => {
|
console.log('val', val, route.query.isAdd)
|
||||||
let arr = [
|
if (route.query.isAdd == undefined) {
|
||||||
{
|
// showTable.value = true
|
||||||
label: '名称',
|
let fileObj = {}
|
||||||
prop: 'roleName',
|
let newFileArray = []
|
||||||
component: 'el-input',
|
val.forEach(item => {
|
||||||
props: {
|
fileObj = {
|
||||||
placeholder: '请输入名称',
|
fileId: item.id,
|
||||||
clearable: true
|
size: item.size,
|
||||||
}
|
fileName: item.fileName,
|
||||||
},
|
fileType: item.fileType,
|
||||||
{
|
url: item.url,
|
||||||
label: '所属公司',
|
processNodeTag: null,
|
||||||
prop: 'subCompanyId',
|
tag: formData.value.collectType,
|
||||||
component: 'el-tree-select',
|
userId: authStore.userinfo.userId
|
||||||
props: {
|
}
|
||||||
placeholder: '请选择所属公司',
|
newFileArray.push(fileObj)
|
||||||
clearable: true,
|
formData.value.fileList.push(fileObj)
|
||||||
filterable: true,
|
})
|
||||||
checkStrictly: true,
|
fileList.value = formData.value.fileList
|
||||||
data: localData.affiliatedCompany,
|
} else {
|
||||||
disabled: route.query.userType == 0 ? true : false
|
let fileObj = {}
|
||||||
},
|
let newFileArray = []
|
||||||
on: {
|
val.forEach(item => {
|
||||||
change: async (val) => {
|
fileObj = {
|
||||||
const {data} = await getDeptOpt({subCompanyId: val})
|
fileId: item.id,
|
||||||
localData.departmentIdOpt = data
|
size: item.size,
|
||||||
}
|
fileName: item.fileName,
|
||||||
}
|
fileType: item.fileType,
|
||||||
},
|
url: item.url,
|
||||||
{
|
processNodeTag: null,
|
||||||
label: '征集类型',
|
tag: formData.value.collectType,
|
||||||
prop: 'subCompanyType',
|
userId: authStore.userinfo.userId
|
||||||
component: 'el-tree-select',
|
}
|
||||||
props: {
|
newFileArray.push(fileObj)
|
||||||
placeholder: '请选择征集类型',
|
})
|
||||||
clearable: true,
|
formData.value.fileList = newFileArray
|
||||||
filterable: true,
|
fileList.value = newFileArray
|
||||||
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 getInstance = (e) => {
|
|
||||||
form.value = e
|
|
||||||
}
|
|
||||||
const getFile=(val)=>{
|
|
||||||
console.log('fileList', val)
|
|
||||||
fileList.value=val
|
|
||||||
}
|
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
form.value.setValues({state: '1', template: false})
|
const res = await getSubCompOpt()
|
||||||
const res = await getTemRoleOption()
|
companyOption.value = res.data
|
||||||
localData.tempRoleOpt = res.data
|
getWorkflowInfo().then(res => {
|
||||||
const {data} = await getMenuList()
|
let data = res.data
|
||||||
localData.menuData = data
|
processInstanceData.value = data
|
||||||
}
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
const getInfo = async () => {
|
processStore.endList.value = data.endList;
|
||||||
if (!route.query.id) return
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
const {data} = await getRoleDetail(route.query.id)
|
processStore.refuseList.value = data.refuseList;
|
||||||
data.menuIds.forEach(key => {
|
processStore.passList.value = data.passList;
|
||||||
menuTree.value.setChecked(key, true, false)
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
})
|
})
|
||||||
form.value.setValues(data)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = () => {
|
||||||
// const loading = ElLoading.service({fullscreen: true})
|
if (route.query.isAdd == undefined) {
|
||||||
// const {isValidate} = await form.value.validate()
|
resubmitRequirement({
|
||||||
// if (!isValidate) return Promise.reject()
|
...formData.value,
|
||||||
// const values = form.value.getValues()
|
requirementId: 0,
|
||||||
// values.menuIds = checkChange()
|
files: fileList.value,
|
||||||
// operate(values).then(res => {
|
deploymentId: processInstanceData.value.deploymentId
|
||||||
// ElNotification({
|
}).then(res => {
|
||||||
// title: route.query.isAdd ? '新增' : '编辑',
|
if (res.code === 1000) {
|
||||||
// message: res.msg,
|
ElMessage.success(res.msg)
|
||||||
// type: res.code === 1000 ? 'success' : 'error'
|
router.push({
|
||||||
// })
|
path: '/projectdemand/demandcollection'
|
||||||
// loading.close()
|
})
|
||||||
// res.code === 1000 ? tagsViewStore.delViewAndGoView('/system/role') : null
|
} else {
|
||||||
// }).finally(() => {
|
ElMessage.error(res.msg)
|
||||||
// loading.close()
|
}
|
||||||
// })
|
})
|
||||||
|
}else {
|
||||||
|
addRequirement({
|
||||||
|
...formData.value,
|
||||||
|
requirementId: 0,
|
||||||
|
files: fileList.value,
|
||||||
|
deploymentId: processInstanceData.value.deploymentId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
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
|
||||||
|
formData.value = res.data.formData
|
||||||
|
// if (route.query.isAdd == undefined) {
|
||||||
|
// showTable.value = true
|
||||||
|
// }
|
||||||
|
} 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 () => {
|
onMounted(async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await init()
|
await init()
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
await getInfo()
|
await getDetailInfo()
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<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>
|
</style>
|
||||||
|
|||||||
@@ -1,122 +1,180 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="detail-block">
|
<div class="detail-block">
|
||||||
<el-row gutter="20">
|
<el-form :model="formData" label-width="auto">
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="14">
|
<baseTitle title="需求征集详情"></baseTitle>
|
||||||
<div class="left-info">
|
<div class="left-info">
|
||||||
<baseTitle title="需求征集详情"></baseTitle>
|
<el-row>
|
||||||
<div class="info">
|
<el-col :span="12">
|
||||||
<div v-for="item in list">
|
<el-form-item label="名称">
|
||||||
<span>{{ item.title }}:</span>
|
<span>{{ formData.requirementName }}</span>
|
||||||
<span>{{ item.text }}</span>
|
</el-form-item>
|
||||||
</div>
|
</el-col>
|
||||||
</div>
|
<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>
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
<el-card>
|
<el-col :span="24">
|
||||||
{{ instructions }}
|
<el-form-item>
|
||||||
</el-card>
|
<el-card style="width: 100%">
|
||||||
<baseTitle title="申请文件"></baseTitle>
|
<div v-html="formData.collectExplain">
|
||||||
<fvTable ref="tableIns" style="max-height: 200px" :tableConfig="tableConfig" @headBtnClick="headBtnClick" :pagination="false"></fvTable>
|
</div>
|
||||||
<baseTitle title="审核意见"></baseTitle>
|
</el-card>
|
||||||
<el-input
|
</el-form-item>
|
||||||
v-model="auditOpinion"
|
</el-col>
|
||||||
:rows="3"
|
<baseTitle title="附件列表"></baseTitle>
|
||||||
type="textarea"
|
<el-col :span="24">
|
||||||
placeholder="请输入审核意见"
|
<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-form-item>
|
||||||
|
<el-input
|
||||||
|
v-model="auditOpinion"
|
||||||
|
:rows="3"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入审核意见"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</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-col>
|
</div>
|
||||||
<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="10">
|
</el-form>
|
||||||
<div class="approval-record" >
|
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||||
<baseTitle title="审批记录"></baseTitle>
|
<el-button @click="handleReject">驳回</el-button>
|
||||||
<div class="process" id="approvalRecord">
|
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
||||||
<process-tree ref="processTree" mode="view" id-name="approvalRecord"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div class="oper-page-btn">
|
|
||||||
<el-button @click="handleSubmit">驳回</el-button>
|
|
||||||
<el-button color="#DED0B2" @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 OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
import ProcessTree from '@/views/workflow/process/ProcessTree.vue';
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.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 processStore = useProcessStore()
|
||||||
const list = ref([
|
const companyOption = ref([])
|
||||||
{
|
const processInstanceData = ref({})
|
||||||
title: '名称',
|
const processDiagramViewer = ref(false)
|
||||||
text: '名名称称名名称名称名称名称'
|
|
||||||
}, {
|
|
||||||
title: '所属公司',
|
|
||||||
text: '名称名称名称名称'
|
|
||||||
}, {
|
|
||||||
title: '征集类型',
|
|
||||||
text: '名称名称名称名称'
|
|
||||||
}, {
|
|
||||||
title: '截止时间',
|
|
||||||
text: '名称名称名称名称'
|
|
||||||
},
|
|
||||||
])
|
|
||||||
const processTree = ref()
|
const processTree = ref()
|
||||||
const instructions = ref('ds')
|
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'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
api: ''
|
|
||||||
})
|
|
||||||
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 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
|
||||||
|
console.log('companyOption.value',companyOption.value)
|
||||||
|
}
|
||||||
|
const getDataSourceOptionItem = (val) => {
|
||||||
|
console.log('val',val,companyOption.value)
|
||||||
|
if(val!==undefined){
|
||||||
|
|
||||||
|
}
|
||||||
|
// let arr=[]
|
||||||
|
// console.log('arr',arr)
|
||||||
|
// for (let item of companyOption.value) {
|
||||||
|
// if (item.value === dataSourceId) {
|
||||||
|
// return item.label;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return "";
|
||||||
|
}
|
||||||
|
const init = async () => {
|
||||||
|
await getCompanyOption()
|
||||||
|
getInfo(route.query.id).then(res => {
|
||||||
|
let data = res.data
|
||||||
|
formData.value = data.formData;
|
||||||
|
if(data.formData.companyIds.length!==0){
|
||||||
|
|
||||||
|
}
|
||||||
|
processInstanceData.value = data
|
||||||
|
processStore.setDesign(data)
|
||||||
|
processStore.runningList.value = data.runningList;
|
||||||
|
processStore.endList.value = data.endList;
|
||||||
|
processStore.noTakeList.value = data.noTakeList;
|
||||||
|
processStore.refuseList.value = data.refuseList;
|
||||||
|
processStore.passList.value = data.passList;
|
||||||
|
nextTick(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
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;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
overflow-x: hidden;
|
overflow: hidden;
|
||||||
overflow-y: auto;
|
//overflow-y: auto;
|
||||||
|
padding-right: 10px;
|
||||||
|
|
||||||
.left-info {
|
.left-info {
|
||||||
flex: 0.6;
|
flex: 0.6;
|
||||||
@@ -141,28 +199,32 @@ getTree()
|
|||||||
|
|
||||||
.approval-record {
|
.approval-record {
|
||||||
flex: 0.4;
|
flex: 0.4;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
|
||||||
|
.process {
|
||||||
.process{
|
//padding-top: 20px;
|
||||||
|
position: relative;
|
||||||
//max-height: calc(100vh - 96px);
|
//max-height: calc(100vh - 96px);
|
||||||
height: calc(100vh - 250px);
|
//height: calc(100vh - 250px);
|
||||||
overflow: auto;
|
//height: auto;
|
||||||
&::-webkit-scrollbar {
|
//overflow: auto;
|
||||||
width: 6px;
|
|
||||||
height: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 滚动条轨道
|
//&::-webkit-scrollbar {
|
||||||
&::-webkit-scrollbar-track {
|
// width: 6px;
|
||||||
background: rgb(239, 239, 239);
|
// height: 6px;
|
||||||
border-radius: 2px;
|
//}
|
||||||
}
|
//
|
||||||
|
//// 滚动条轨道
|
||||||
// 小滑块
|
//&::-webkit-scrollbar-track {
|
||||||
&::-webkit-scrollbar-thumb {
|
// background: rgb(239, 239, 239);
|
||||||
background: rgba(80, 81, 82, 0.29);
|
// border-radius: 2px;
|
||||||
border-radius: 10px;
|
//}
|
||||||
}
|
//
|
||||||
|
//// 小滑块
|
||||||
|
//&::-webkit-scrollbar-thumb {
|
||||||
|
// background: rgba(80, 81, 82, 0.29);
|
||||||
|
// border-radius: 10px;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '名称',
|
label: '需求名称',
|
||||||
prop: 'roleName',
|
prop: 'requirementName',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入名称查询',
|
placeholder: '请输入名称查询',
|
||||||
clearable: true
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '征集类型',
|
||||||
prop: 'state',
|
prop: 'collectType',
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择征集类型',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
cacheKey: 'normal_disable'
|
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: [
|
||||||
{
|
{
|
||||||
@@ -43,26 +40,37 @@ const tableConfig = reactive({
|
|||||||
prop: 'selection'
|
prop: 'selection'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'roleName',
|
prop: 'requirementName',
|
||||||
label: '名称',
|
label: '需求名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'roleKey',
|
prop: 'collectType',
|
||||||
label: '所属公司',
|
label: '征集类型',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'time',
|
prop: 'approveName',
|
||||||
label: '发布时间',
|
label: '审批人',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'deadline',
|
||||||
|
label: '截止时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'taskNode',
|
||||||
|
label: '当前节点',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'state',
|
prop: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 200,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => (<Tag dictType={'demand_collection'} value={row.state}/>)
|
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
@@ -70,21 +78,36 @@ const tableConfig = reactive({
|
|||||||
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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '/admin/role',
|
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: {}
|
||||||
})
|
})
|
||||||
@@ -105,7 +128,7 @@ const handleEdit = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demandedit',
|
path: '/projectdemand/demandedit',
|
||||||
query: {
|
query: {
|
||||||
id: row.roleId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -113,7 +136,7 @@ const handleDetail = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
path: '/projectdemand/demanddetail',
|
path: '/projectdemand/demanddetail',
|
||||||
query: {
|
query: {
|
||||||
id: row.roleId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const valid = ref(true)
|
|||||||
let vNode = {}
|
let vNode = {}
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
|
// console.log("sdsdsdsdsdsdsd",processStore.getProcess())
|
||||||
processStore.init()
|
processStore.init()
|
||||||
initMapping(processStore.getProcess())
|
initMapping(processStore.getProcess())
|
||||||
// 定义类名(可忽略)
|
// 定义类名(可忽略)
|
||||||
@@ -48,7 +49,7 @@ const init = () => {
|
|||||||
|
|
||||||
// 初始化map集合,以便数据整理
|
// 初始化map集合,以便数据整理
|
||||||
const initMapping = (node) => {
|
const initMapping = (node) => {
|
||||||
node.forEach(nodeItem => {
|
node?.forEach(nodeItem => {
|
||||||
processStore.nodeMap.set(nodeItem.id, nodeItem)
|
processStore.nodeMap.set(nodeItem.id, nodeItem)
|
||||||
processStore.parentMap.set(nodeItem.parentId, nodeItem)
|
processStore.parentMap.set(nodeItem.parentId, nodeItem)
|
||||||
})
|
})
|
||||||
@@ -57,15 +58,15 @@ const initMapping = (node) => {
|
|||||||
const initHeaderBgc = (node) => {
|
const initHeaderBgc = (node) => {
|
||||||
if (node.props && props.mode === 'preview') {
|
if (node.props && props.mode === 'preview') {
|
||||||
let headerBgc = '#ff943e'
|
let headerBgc = '#ff943e'
|
||||||
if (processStore.runningList.value.includes(node.id)) {
|
if (processStore.runningList.value?.includes(node.id)) {
|
||||||
headerBgc = '#1e90ff'
|
headerBgc = '#1e90ff'
|
||||||
} else if (processStore.endList.value.includes(node.id)) {
|
} else if (processStore.endList.value?.includes(node.id)) {
|
||||||
headerBgc = '#20b2aa'
|
headerBgc = '#20b2aa'
|
||||||
} else if (processStore.noTakeList.value.includes(node.id)) {
|
} else if (processStore.noTakeList.value?.includes(node.id)) {
|
||||||
headerBgc = '#909399'
|
headerBgc = '#909399'
|
||||||
} else if (processStore.refuseList.value.includes(node.id)) {
|
} else if (processStore.refuseList.value?.includes(node.id)) {
|
||||||
headerBgc = '#f56c6c'
|
headerBgc = '#f56c6c'
|
||||||
} else if (processStore.passList.value.includes(node.id)) {
|
} else if (processStore.passList.value?.includes(node.id)) {
|
||||||
headerBgc = '#ff943e'
|
headerBgc = '#ff943e'
|
||||||
}
|
}
|
||||||
node.props.headerBgc = headerBgc
|
node.props.headerBgc = headerBgc
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ const conditionList = computed(() => {
|
|||||||
// if (conditionItems.length === 0 || conditionItems[0].id !== 'root') {
|
// if (conditionItems.length === 0 || conditionItems[0].id !== 'root') {
|
||||||
// conditionItems.unshift({id: 'root', title: '发起人', valueType: 'User'})
|
// conditionItems.unshift({id: 'root', title: '发起人', valueType: 'User'})
|
||||||
// }
|
// }
|
||||||
conditionItems.unshift({id: 'root', title: '发起人', valueType: 'User'})
|
// conditionItems.unshift({id: 'root', title: '发起人', valueType: 'User'})
|
||||||
return conditionItems
|
return conditionItems
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
<component :is="headerIcon"/>
|
<component :is="headerIcon"/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<ellipsis class="name" hover-tip :content="title"/>
|
<ellipsis class="name" hover-tip :content="title"/>
|
||||||
<el-icon v-if="!isRoot && designState" size="20" style="float:right;cursor: pointer" @click.stop="emit('delNode')">
|
<el-icon v-if="!isRoot && designState" size="20" style="float:right;cursor: pointer"
|
||||||
|
@click.stop="emit('delNode')">
|
||||||
<Close/>
|
<Close/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
@@ -16,20 +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>
|
|
||||||
</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">
|
||||||
@@ -43,9 +41,9 @@
|
|||||||
<div class="node-footer">
|
<div class="node-footer">
|
||||||
<div v-if="merge" class="branch-merge">
|
<div v-if="merge" class="branch-merge">
|
||||||
<svg-icon name="fenzhi" :class-name="'fen-icon'"/>
|
<svg-icon name="fenzhi" :class-name="'fen-icon'"/>
|
||||||
<!-- <img data-v-1e7b1da5=""-->
|
<!-- <img data-v-1e7b1da5=""-->
|
||||||
<!-- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABXlJREFUeF7tmm2IVGUUx3/nLkQUqxmkpAVhSPUllZX8EEGhvVgZQWCU6wcpsqi2mXtnoaBwoqLCufeO9oJYUJQiFZWlZPQCfYiIXkylstTyS1oWWeYWCe6cuLsz7t3r3Ll3du6907oz35bnPM9z/r895zznmWeECf6RCa6fDoBOBExwAp0UmOAB0CmCnRTopECbCZi2nivK1CMD7FpXlH+ydqctKZBz9QyjwkqFG4HzfKK/0gpvl/ulmBWIzAHkVmlRDFY2EihwwLFkRhYQxgzAtHW2CpcBc4CpOsg26eK7yVPYVFwu/9ZzPufq2VLhQBxhAk85lvSF2Y5l/3prjQlAvqR3IjwJTKqz6DeGssQuyLfBsbyjz6PcFgeAZyOwzLFk/QnrjHH/RACYtj6ncHuUCDWYXs7Lz367XEn3inB+1NzauMLGsiW3+u1b2b9lAH22LuiCD2IJED5yTbmiZpt3dAbKT7Hmjhjtdi25oPZnK/uH7dtUCpi2vqVwQ1wRWuHhWkW3StpTEb6IO3fIThhwTemuzWll/0QA5G39FTgrtghhs2vKELA7inra6d38HXvusOEnriWXHo+iFvZvGUDfap3VdYzdzQgIHmd5W7cBc2Ovoax1C3KXZ5/E/i3VgCQciNMD+J1Ug55yXjxo7QfgOdFKCvjyeL/C9MgoEBa5przrt0ti/+C+mRVB/8amrWsU7m2Ql/c5lqwJjre9CDZ1DMFnriXzw0SatvZW4FqBW6o2vwGvCGxyLPmw3rym9g8cwy0XQV8Ix2qEgH0C1ziWNCyceVu1uvZrriVLGqVGsainHO7mRyDynlCvEWupCI7Kxcat6BFg+OwW9ohyfSMIcQF44v/sZovAlRH1I7QVTwyAt1Cjy8hfh9hYvepGQogDoI74HYbSXzHwusTYl7FEAURVcdPWN+NAiAJQTzzCda4p+6N8iDPe1CkQZ8FAtY+E0AhA2uKHszTlT1QkhAHIQnwmAKr1IjQS6gHISnxmABpBCALIUnymAMIgKHxf6wMmH6E3cNTtSLLgZXoKNOgAR6UDyqyq7esKk3znfOriM48AXzc5AmGE1EFgWvXPTMS3DcAJ6TA6XDIT31YAoRCEc5JqcuKc8Kn3AVFO+E4BryvJVHzbI8BzwAdgi2vJ4ihgSY//nyIg8jqctPi2RYBp61wV5qsyR2BFVdhBhBe0wtdisNU15VAagoNrZh4BOVsfFcVCODVUoLBn6E2hIBvShpApgLyt3nvhRXFFCWxwLOmNaz8Wu8wA5G31ntQWNOukwD2OJc80Oy+ufSYAciVdJsJLcZ0K2nV1MbuUk51jnd9oXuoACmW9eHCQj49/T+j3RtiJslPgFxXmoVxe11nhPdeUq8clANPWPoXVQef9D6e1saEHVINHUBYF7Q1lnl2QL5OGkHoE5G19GRhVyBQ+L1tyST0xoa/Iygq3IOvGI4BdwIWjHBeecE15IExM3tYfgJmBOetcU2o9Q2IcsoiAw8Gf0qhyU7kgb4QCcPRTlNGvSspmtzD81J7kJ30AJX0fYeHo2seLjiXLG0TA78CZ/nGFB8uWPJakeG+t9AE4+jjK/XGLWtgTusBix5It4w5ArqRLRTjhl14IW40KD/kre66ki0R4p57IrgozS/2yb9wByDvqhbKX07Xv/oIavMfOP6pFb0pdgcqrbkFuTlp8JingbRIaBfEUHUOYltbtMPUaUNNo2rpeYWk8zSNWqvSmeSvMDIAnybT1boWnY0I4aigL7YJ4bXRqn0wBeCqG7gYVVqFcFapKWXt0gP5nizKQmvLqwpkDqAkaanmhB4MelOkI27XCDjHY7pqyN23htfXbBiArgVH7dABEETrZxzsRcLL/h6P0/Qc1qphfvB2K3wAAAABJRU5ErkJggg=="-->
|
<!-- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABXlJREFUeF7tmm2IVGUUx3/nLkQUqxmkpAVhSPUllZX8EEGhvVgZQWCU6wcpsqi2mXtnoaBwoqLCufeO9oJYUJQiFZWlZPQCfYiIXkylstTyS1oWWeYWCe6cuLsz7t3r3Ll3du6907oz35bnPM9z/r895zznmWeECf6RCa6fDoBOBExwAp0UmOAB0CmCnRTopECbCZi2nivK1CMD7FpXlH+ydqctKZBz9QyjwkqFG4HzfKK/0gpvl/ulmBWIzAHkVmlRDFY2EihwwLFkRhYQxgzAtHW2CpcBc4CpOsg26eK7yVPYVFwu/9ZzPufq2VLhQBxhAk85lvSF2Y5l/3prjQlAvqR3IjwJTKqz6DeGssQuyLfBsbyjz6PcFgeAZyOwzLFk/QnrjHH/RACYtj6ncHuUCDWYXs7Lz367XEn3inB+1NzauMLGsiW3+u1b2b9lAH22LuiCD2IJED5yTbmiZpt3dAbKT7Hmjhjtdi25oPZnK/uH7dtUCpi2vqVwQ1wRWuHhWkW3StpTEb6IO3fIThhwTemuzWll/0QA5G39FTgrtghhs2vKELA7inra6d38HXvusOEnriWXHo+iFvZvGUDfap3VdYzdzQgIHmd5W7cBc2Ovoax1C3KXZ5/E/i3VgCQciNMD+J1Ug55yXjxo7QfgOdFKCvjyeL/C9MgoEBa5przrt0ti/+C+mRVB/8amrWsU7m2Ql/c5lqwJjre9CDZ1DMFnriXzw0SatvZW4FqBW6o2vwGvCGxyLPmw3rym9g8cwy0XQV8Ix2qEgH0C1ziWNCyceVu1uvZrriVLGqVGsainHO7mRyDynlCvEWupCI7Kxcat6BFg+OwW9ohyfSMIcQF44v/sZovAlRH1I7QVTwyAt1Cjy8hfh9hYvepGQogDoI74HYbSXzHwusTYl7FEAURVcdPWN+NAiAJQTzzCda4p+6N8iDPe1CkQZ8FAtY+E0AhA2uKHszTlT1QkhAHIQnwmAKr1IjQS6gHISnxmABpBCALIUnymAMIgKHxf6wMmH6E3cNTtSLLgZXoKNOgAR6UDyqyq7esKk3znfOriM48AXzc5AmGE1EFgWvXPTMS3DcAJ6TA6XDIT31YAoRCEc5JqcuKc8Kn3AVFO+E4BryvJVHzbI8BzwAdgi2vJ4ihgSY//nyIg8jqctPi2RYBp61wV5qsyR2BFVdhBhBe0wtdisNU15VAagoNrZh4BOVsfFcVCODVUoLBn6E2hIBvShpApgLyt3nvhRXFFCWxwLOmNaz8Wu8wA5G31ntQWNOukwD2OJc80Oy+ufSYAciVdJsJLcZ0K2nV1MbuUk51jnd9oXuoACmW9eHCQj49/T+j3RtiJslPgFxXmoVxe11nhPdeUq8clANPWPoXVQef9D6e1saEHVINHUBYF7Q1lnl2QL5OGkHoE5G19GRhVyBQ+L1tyST0xoa/Iygq3IOvGI4BdwIWjHBeecE15IExM3tYfgJmBOetcU2o9Q2IcsoiAw8Gf0qhyU7kgb4QCcPRTlNGvSspmtzD81J7kJ30AJX0fYeHo2seLjiXLG0TA78CZ/nGFB8uWPJakeG+t9AE4+jjK/XGLWtgTusBix5It4w5ArqRLRTjhl14IW40KD/kre66ki0R4p57IrgozS/2yb9wByDvqhbKX07Xv/oIavMfOP6pFb0pdgcqrbkFuTlp8JingbRIaBfEUHUOYltbtMPUaUNNo2rpeYWk8zSNWqvSmeSvMDIAnybT1boWnY0I4aigL7YJ4bXRqn0wBeCqG7gYVVqFcFapKWXt0gP5nizKQmvLqwpkDqAkaanmhB4MelOkI27XCDjHY7pqyN23htfXbBiArgVH7dABEETrZxzsRcLL/h6P0/Qc1qphfvB2K3wAAAABJRU5ErkJggg=="-->
|
||||||
<!-- alt="">-->
|
<!-- alt="">-->
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<insert-button v-if="designState" @insertNode="type => emit('insertNode', type)"/>
|
<insert-button v-if="designState" @insertNode="type => emit('insertNode', type)"/>
|
||||||
@@ -62,7 +60,7 @@ import InsertButton from '../common/InsertButton.vue'
|
|||||||
import Ellipsis from '../common/Ellipsis.vue'
|
import Ellipsis from '../common/Ellipsis.vue'
|
||||||
import AvatarEllipsis from '../common/AvatarEllipsis.vue'
|
import AvatarEllipsis from '../common/AvatarEllipsis.vue'
|
||||||
import SvgIcon from '@/components/svgIcon/index.vue'
|
import SvgIcon from '@/components/svgIcon/index.vue'
|
||||||
import {Close, Warning, Plus} from '@element-plus/icons-vue'
|
import {Close, Warning, Plus, Check, More} from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const emit = defineEmits(['insertNode'])
|
const emit = defineEmits(['insertNode'])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -154,7 +152,16 @@ const props = defineProps({
|
|||||||
const designState = computed(() => {
|
const designState = computed(() => {
|
||||||
return props.mode === 'design'
|
return props.mode === 'design'
|
||||||
})
|
})
|
||||||
|
const getState = (state) => {
|
||||||
|
switch (state) {
|
||||||
|
case 'finish':
|
||||||
|
return 'check'
|
||||||
|
case 'UNACTIVATED':
|
||||||
|
return 'more'
|
||||||
|
case 'RUNNING':
|
||||||
|
return 'loading'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
// let userInfo = this.$store.state.selectUserMap.get(this.nodeId);
|
// let userInfo = this.$store.state.selectUserMap.get(this.nodeId);
|
||||||
@@ -176,15 +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;
|
|
||||||
}
|
|
||||||
.root {
|
.root {
|
||||||
&:before {
|
&:before {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ export default defineConfig({
|
|||||||
AutoImport({
|
AutoImport({
|
||||||
//自动导入vue相关函数
|
//自动导入vue相关函数
|
||||||
imports: ['vue','vue-router'],
|
imports: ['vue','vue-router'],
|
||||||
|
|
||||||
resolvers: [
|
resolvers: [
|
||||||
ElementPlusResolver(),
|
ElementPlusResolver(),
|
||||||
//自动导入图标组件
|
//自动导入图标组件
|
||||||
@@ -69,12 +68,13 @@ export default defineConfig({
|
|||||||
strictPort: false,
|
strictPort: false,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
// '/api/admin': {
|
'/api/workflow': {
|
||||||
// target: 'http://dev-mosr.frp.feashow.cn/',
|
target: 'http://frp.feashow.cn:31800/',
|
||||||
// // target: 'http://192.168.31.175:8000',
|
// target: 'http://clay.frp.feashow.cn/',
|
||||||
// changeOrigin: true,
|
// target: 'http://192.168.31.175:8000',
|
||||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
changeOrigin: true,
|
||||||
// },
|
rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
},
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://mosr.feashow.cn',
|
target: 'http://mosr.feashow.cn',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user