Merge pull request 'fix: 修复附件上传和展示问题' (#985) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/985
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
<el-button color="#DED0B2" style="margin-left: 10px"
|
||||
@click="handleCarbonCopy()" >立即抄送
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
@@ -36,6 +39,10 @@
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" :id-name="idName?idName:type"/>
|
||||
</div>
|
||||
</div>
|
||||
<user-picker :multiple="true" ref="carbonCopyUserRef" title="请选择抄送人员"
|
||||
v-model:value="carbonCopyUserList" @ok="carbonCopyUserPickerOk"
|
||||
@cancelOrClear="carbonCopyUserPickerOk"/>
|
||||
|
||||
<file-preview ref="filePreviewRef" :fullscreen="fullscreen" v-if="filePreviewShow"
|
||||
:fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
|
||||
:fileType="filePreviewParam.fileType"/>
|
||||
@@ -49,6 +56,8 @@ import {ElLoading, ElNotification} from 'element-plus';
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||
import {getTags} from "@/api/project-manage";
|
||||
import {applyCcSend} from "@/api/expense-manage";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
|
||||
const changeDiagram = ref(false)
|
||||
const props = defineProps({
|
||||
@@ -104,6 +113,8 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
const form = ref()
|
||||
const carbonCopyUserList = ref([])
|
||||
const carbonCopyUserRef = ref()
|
||||
|
||||
const editSingleTableConfig = reactive({
|
||||
columns: [
|
||||
@@ -390,6 +401,40 @@ const _value = computed({
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const handleCarbonCopy = () => {
|
||||
carbonCopyUserRef.value.showUserPicker()
|
||||
}
|
||||
const carbonCopyUserPickerOk = (userList) => {
|
||||
carbonCopyUserList.value = userList.map(item => item.id)
|
||||
console.log('localFormData.value', props.data)
|
||||
console.log("🚀 ~ file:'carbonCopyUserList.value ", carbonCopyUserList.value)
|
||||
|
||||
addUser()
|
||||
}
|
||||
const addUser = async () => {
|
||||
const res = await applyCcSend({
|
||||
instanceId: props.data.processInstanceId,
|
||||
// message:props.data.remark,
|
||||
projectId: route.query.projectId,
|
||||
state: props.data.state,
|
||||
userIds: carbonCopyUserList.value
|
||||
})
|
||||
console.log('res', res)
|
||||
if (res.code === 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '抄送成功',
|
||||
type: 'error'
|
||||
})
|
||||
tableIns.value.refresh()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
const clickToPreview = (row) => {
|
||||
filePreviewShow.value = false
|
||||
filePreviewParam.value = {
|
||||
|
||||
@@ -57,18 +57,18 @@
|
||||
</el-row>
|
||||
|
||||
<baseTitle title="需求上报申请书" style="margin-bottom: -3px;"></baseTitle>
|
||||
<!-- <el-row gutter="20" style="margin-bottom: -15px;">-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <single-file-component tag="需求上报" v-model:value="localFormData.singleFile" :processViewer="processViewer"/>-->
|
||||
<!-- <!– <el-form-item>–>-->
|
||||
<!-- <!– {{localFormData.singleFile}}–>-->
|
||||
<!-- <!– <el-button type="primary" link @click="handleDownload(localFormData.singleFile)" style="font-size: 16px">–>-->
|
||||
<!-- <!– {{ localFormData.singleFile?.originalFileName }}–>-->
|
||||
<!-- <!– </el-button>–>-->
|
||||
<!-- <!– </el-form-item>–>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!--/* <baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>*/-->
|
||||
<!-- <el-row gutter="20" style="margin-bottom: -15px;">-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <single-file-component tag="需求上报" v-model:value="localFormData.singleFile" :processViewer="processViewer"/>-->
|
||||
<!-- <!– <el-form-item>–>-->
|
||||
<!-- <!– {{localFormData.singleFile}}–>-->
|
||||
<!-- <!– <el-button type="primary" link @click="handleDownload(localFormData.singleFile)" style="font-size: 16px">–>-->
|
||||
<!-- <!– {{ localFormData.singleFile?.originalFileName }}–>-->
|
||||
<!-- <!– </el-button>–>-->
|
||||
<!-- <!– </el-form-item>–>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!--/* <baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>*/-->
|
||||
<el-row gutter="20" style="margin-bottom: -18px;">
|
||||
<el-col :span="24" class="file-table-style">
|
||||
<file-component tag="需求上报"
|
||||
@@ -123,6 +123,9 @@
|
||||
style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
<el-button color="#DED0B2" style="margin-left: 10px"
|
||||
@click="handleCarbonCopy()">立即抄送
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
@@ -133,6 +136,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<user-picker :multiple="true" ref="carbonCopyUserRef" title="请选择抄送人员"
|
||||
v-model:value="carbonCopyUserList" @ok="carbonCopyUserPickerOk"
|
||||
@cancelOrClear="carbonCopyUserPickerOk"/>
|
||||
|
||||
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
||||
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
|
||||
@@ -153,6 +160,8 @@ import FileComponent from "./FileComponent.vue";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {approvePlan} from "@/api/project-demand/summary";
|
||||
import SelectPreProcess from "@/components/SelectPreProcess.vue";
|
||||
import {applyCcSend} from "@/api/expense-manage";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const tagsViewStore = useTagsView()
|
||||
@@ -192,6 +201,8 @@ const router = useRouter()
|
||||
const fundOption = ref([])
|
||||
const companyOption = ref([])
|
||||
const dictName = ref({})
|
||||
const carbonCopyUserList = ref([])
|
||||
const carbonCopyUserRef = ref()
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
@@ -203,6 +214,40 @@ const _value = computed({
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const handleCarbonCopy = () => {
|
||||
carbonCopyUserRef.value.showUserPicker()
|
||||
}
|
||||
const carbonCopyUserPickerOk = (userList) => {
|
||||
carbonCopyUserList.value = userList.map(item => item.id)
|
||||
console.log('localFormData.value', props.data)
|
||||
console.log("🚀 ~ file:'carbonCopyUserList.value ", carbonCopyUserList.value)
|
||||
|
||||
addUser()
|
||||
}
|
||||
const addUser = async () => {
|
||||
const res = await applyCcSend({
|
||||
instanceId: props.data.processInstanceId,
|
||||
// message:props.data.remark,
|
||||
projectId: route.query.projectId,
|
||||
state: props.data.state,
|
||||
userIds: carbonCopyUserList.value
|
||||
})
|
||||
console.log('res', res)
|
||||
if (res.code === 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '抄送成功',
|
||||
type: 'error'
|
||||
})
|
||||
tableIns.value.refresh()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
const handleRejectPlan = async () => {
|
||||
// const values = form.value.getValues()
|
||||
// console.log('route',route.query.projectId)
|
||||
@@ -321,7 +366,8 @@ getFundOptions()
|
||||
overflow-y: auto;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
.file-table-style{
|
||||
|
||||
.file-table-style {
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
|
||||
@@ -59,9 +59,6 @@
|
||||
<el-button type="primary" size="mini"
|
||||
@click="handleEdit(scope.row.deploymentId)" link>编辑
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
@click="handleCarbonCopy(scope.row)" link>立即抄送
|
||||
</el-button>
|
||||
<!-- <el-button type="primary" size="mini"-->
|
||||
<!-- @click="viewHistoricalVersion(scope.row)" link>历史-->
|
||||
<!-- </el-button>-->
|
||||
@@ -71,9 +68,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<user-picker :multiple="true" ref="carbonCopyUserRef" title="请选择抄送人员"
|
||||
v-model:value="carbonCopyUserList" @ok="carbonCopyUserPickerOk" @cancelOrClear="carbonCopyUserPickerOk"/>
|
||||
<paging :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[10, 20, 30, 40,50]"
|
||||
<paging :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[10, 20, 30, 40,50]"
|
||||
:total="total" @changeSize="handleSizeChange" @goPage="handleCurrentChange"/>
|
||||
<el-dialog v-model="isVisited" title="历史" width="800px">
|
||||
<div class="table">
|
||||
@@ -133,8 +128,6 @@ import {applyCcSend} from "@/api/expense-manage";
|
||||
const dictStore = useCacheStore()
|
||||
dictStore.setCacheKey(['normal_disable'])
|
||||
const router = useRouter()
|
||||
const carbonCopyUserList = ref([])
|
||||
const carbonCopyUserRef = ref()
|
||||
|
||||
//查询参数
|
||||
const queryParams = reactive({
|
||||
@@ -162,40 +155,7 @@ onActivated(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
const handleCarbonCopy=(row)=>{
|
||||
carbonCopyUserRef.value.showUserPicker()
|
||||
chooseRow.value=row
|
||||
}
|
||||
const carbonCopyUserPickerOk = (userList) => {
|
||||
carbonCopyUserList.value = userList.map(item => item.id)
|
||||
console.log("🚀 ~ file:'carbonCopyUserList.value ", carbonCopyUserList.value)
|
||||
|
||||
// addUser()
|
||||
}
|
||||
const addUser=async () => {
|
||||
const res = await applyCcSend({
|
||||
instanceId: chooseRow.value.deploymentId,
|
||||
message: chooseRow.value.remark,
|
||||
projectId:0,
|
||||
state: chooseRow.value.state,
|
||||
userIds: carbonCopyUserList.value
|
||||
})
|
||||
console.log('res',res)
|
||||
if (res.code === 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '抄送成功',
|
||||
type: 'error'
|
||||
})
|
||||
tableIns.value.refresh()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
//重置搜索
|
||||
const handleReset = () => {
|
||||
queryForm.value.resetFields()
|
||||
|
||||
Reference in New Issue
Block a user