Merge pull request 'master' (#164) from master into prod

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/164
This commit is contained in:
2024-05-13 16:03:58 +00:00
4 changed files with 93 additions and 67 deletions

View File

@@ -3,7 +3,7 @@
<Hamburger></Hamburger>
<Breadcrumb></Breadcrumb>
<div class="right-bar">
<bell-socket/>
<!-- <bell-socket/>-->
<div class="user-box">
<div>
<!-- <img :src="userInfo.avatar" alt="" @click.stop="handleVisitedP">-->

View File

@@ -166,7 +166,6 @@ const init = async () => {
}
const handleSubmit = async (instance) => {
console.log('fileList.value',fileList.value)
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
@@ -179,10 +178,10 @@ const handleSubmit = async (instance) => {
let res = await addRequirement(params)
if (res.code === 1000) {
ElMessage.success(res.msg)
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
await router.push({
path: '/projectdemand/demandcollection'
})
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
} else {
ElMessage.error(res.msg)
}
@@ -196,7 +195,7 @@ const handleResubmit = () => {
}).then(res => {
if (res.code === 1000) {
ElMessage.success(res.msg)
formData.value = res.data.formData
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
path: '/projectdemand/demandcollection'
})

View File

@@ -1,6 +1,6 @@
<template>
<div class="detail-block">
<el-form :model="formData" label-width="auto">
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
<baseTitle title="需求征集详情"></baseTitle>
<div class="left-info">
<el-row>
@@ -58,9 +58,9 @@
<el-col :span="24">
<div v-if="processInstanceData.taskId">
<baseTitle title="审核意见"></baseTitle>
<el-form-item>
<el-form-item prop="auditOpinion">
<el-input
v-model="auditOpinion"
v-model="formData.auditOpinion"
:rows="3"
type="textarea"
placeholder="请输入审核意见"
@@ -80,7 +80,7 @@
</div>
</el-form>
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
<el-button @click="handleReject">驳回</el-button>
<el-button @click="handleReject(demandForm)">驳回</el-button>
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
</div>
</div>
@@ -94,9 +94,13 @@ import {getInfo, agreeTask, rejectTask} from "@/api/project-demand/index.js";
import {getSubCompOpt} from '@/api/user/user.js'
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router";
import {useTagsView} from '@/stores/tagsview.js'
const tagsViewStore = useTagsView()
const router = useRouter()
const route = useRoute()
const form = ref();
const demandForm = ref()
const processStore = useProcessStore()
const companyOption = ref([])
const processInstanceData = ref({})
@@ -104,26 +108,19 @@ const processDiagramViewer = ref(false)
const processTree = ref()
const companyNameArray = ref([])
const formData = ref({})
const auditOpinion = ref('')
const rules = reactive({
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
})
const handleSubmit = () => {
let approve = {
taskId: processInstanceData.value.taskId,
auditOpinion: auditOpinion.value,
auditOpinion: formData.value.auditOpinion,
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)
if (res.code === 1000) {
ElMessage.success(res.msg)
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
path: '/projectdemand/demandcollection'
})
@@ -132,6 +129,27 @@ const handleReject = () => {
}
})
}
const handleReject = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
let approve = {
taskId: processInstanceData.value.taskId,
auditOpinion: formData.value.auditOpinion,
}
rejectTask(approve).then(res => {
if (res.code === 1000) {
ElMessage.success(res.msg)
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
path: '/projectdemand/demandcollection'
})
}else {
ElMessage.error(res.msg)
}
})
})
}
const getCompanyOption = async () => {
const res = await getSubCompOpt()
companyOption.value = res.data
@@ -160,6 +178,7 @@ const getDataSourceOptionItem = (val) => {
return companyNameArray.value.join('');
}
const init = async () => {
if(!route.query.id)return;
await getCompanyOption()
getInfo(route.query.id).then(res => {
let data = res.data

View File

@@ -11,24 +11,24 @@
<el-card>
<div style="display: flex;">
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name">
<el-avatar size="large" :src="user.avatar"></el-avatar>
<div v-if="!$slots.dot && operation.userInfo.length > 1"
class="el-timeline-item__node" :style="{
backgroundColor: user.color
}">
<el-icon v-if="user.icon" :class="user.class">
<component :is="user.icon"/>
</el-icon>
</div>
<el-tooltip effect="dark" :content="user.name" placement="bottom-start">
<span class="username">{{ user.name }}</span>
</el-tooltip>
<!-- <el-avatar size="large" :src="user.avatar"></el-avatar>-->
<!-- <div v-if="!$slots.dot && operation.userInfo.length > 1"-->
<!-- class="el-timeline-item__node" :style="{-->
<!-- backgroundColor: user.color-->
<!-- }">-->
<!-- <el-icon v-if="user.icon" :class="user.class">-->
<!-- <component :is="user.icon"/>-->
<!-- </el-icon>-->
<!-- </div>-->
<!-- <el-tooltip effect="dark" :content="user.name" placement="bottom-start">-->
<!-- <span class="username">{{ user.name }}</span>-->
<!-- </el-tooltip>-->
<avatar-ellipsis :row="3" v-if="operation.userInfo.length > 0" :user-info="operation.userInfo"/>
<template v-if="user.auditOpinion">
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
<div>
{{ user.auditOpinion }}
</div>
<div class="username">
<el-tooltip effect="dark" :content="user.auditOpinion" placement="bottom-start">
<div>{{ user.auditOpinion }}</div>
</el-tooltip>
</div>
</template>
</div>
@@ -37,26 +37,26 @@
<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">
@@ -70,7 +70,7 @@
<script setup>
import {CircleCheckFilled, Close, Loading, MoreFilled} from "@element-plus/icons-vue";
import {ref, defineProps} from 'vue'
import AvatarEllipsis from '../process/common/AvatarEllipsis.vue'
const props = defineProps({
operationList: {
@@ -280,12 +280,28 @@ init()
}
.avatar_name {
width: 45px;
//width: 45px;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
margin-right: 5px;
.username {
width: 100px;
margin-top: 10px;
background: #f5f5f5;
padding: 10px;
.el-tooltip__trigger {
width: 90px;
//padding-top: 2px;
//text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden
}
}
}
.el-timeline-item__node {
@@ -294,12 +310,4 @@ init()
right: 1px;
}
.username {
width: 45px;
padding-top: 2px;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden
}
</style>