Merge pull request 'fix : 修复细节' (#142) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/142
This commit is contained in:
2024-05-12 07:35:54 +00:00
5 changed files with 30 additions and 62 deletions

View File

@@ -36,7 +36,7 @@ export const rejectTask = (data) => {
export const addRequirement = (data) => {
return request({
url: `/workflow/mosr/requirement`,
url: '/workflow/mosr/requirement',
method: "post",
data: data
});

View File

@@ -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>
@@ -56,6 +51,7 @@
<script setup lang="jsx">
import 'element-plus/theme-chalk/display.css'
const router = useRouter()
const list = ref([
{
title: '待立项',
@@ -114,7 +110,7 @@ const tableConfig = reactive({
align: 'center',
},
{
prop: 'state',
prop: 'targetState',
label: '类型',
align: 'center',
showOverflowTooltip: false,
@@ -140,7 +136,7 @@ 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>
)
@@ -150,14 +146,18 @@ const tableConfig = reactive({
api: '/workflow/mosr/process/task',
params: {},
})
const headBtnClick = (key) => {
switch (key) {
case 'add':
handleAdd()
break;
const handleView = (row) => {
console.log('row', row)
if (row.requirementId) {
router.push({
path: '/projectdemand/demanddetail',
query: {
id: row.requirementId
}
})
}
}
</script>
<style lang="scss" scoped>
@@ -166,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);
@@ -277,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;

View File

@@ -78,7 +78,7 @@ const processDiagramViewer = ref(false)
const typeOption = ref([
{
label: "需求征集",
value: '需求征集'
value: '00'
}
])
const companyOption = ref([

View File

@@ -56,17 +56,14 @@
</el-col>
</el-row>
</div>
<!-- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="10">-->
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="process">
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
:state="'4'"/>
:state="processInstanceData.state"/>
<process-diagram-viewer v-if="processDiagramViewer"/>
</div>
</div>
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
<el-button @click="handleReject">驳回</el-button>
@@ -86,7 +83,6 @@ const form = ref();
const processStore = useProcessStore()
const processInstanceData = ref({})
const processDiagramViewer = ref(false)
const processTree = ref()
const formData = ref({})
const auditOpinion = ref('')
@@ -123,7 +119,7 @@ const tableConfig = reactive({
const handleSubmit = () => {
let approve = {
taskId: processInstanceData.value.taskId,
auditOpinion : auditOpinion.value,
auditOpinion: auditOpinion.value,
formData: formData.value
}
agreeTask(approve).then(res => {
@@ -133,7 +129,7 @@ const handleSubmit = () => {
const handleReject = () => {
let approve = {
taskId: processInstanceData.value.taskId,
auditOpinion : auditOpinion.value,
auditOpinion: auditOpinion.value,
}
rejectTask(approve).then(res => {
console.log(res)

View File

@@ -5,6 +5,7 @@
<script setup lang="jsx">
import Tag from '@/components/Tag.vue'
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
const router = useRouter()
const searchConfig = reactive([
@@ -22,22 +23,16 @@ const searchConfig = reactive([
{
label: '征集类型',
prop: 'collectType',
component: 'el-input',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入名称查询',
placeholder: '请选择征集类型',
clearable: true,
filterable: true,
checkStrictly: 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: [
{
@@ -86,8 +81,8 @@ const tableConfig = reactive({
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: () => handleDel(row), type: 'danger'})
}else if (row.state === '4'){
btn.push({label: '删除', func: () => handleDelete(row), type: 'danger'})
} else if (row.state === '4') {
btn.push({label: '上报', func: () => handleReport(row), type: 'primary'})
}
return (
@@ -111,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: {}
})