Merge remote-tracking branch 'origin/master'
# Conflicts: # src/layout/navbar/index.vue
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
import request from "@/utils/request.js";
|
import request from "@/utils/request.js";
|
||||||
|
|
||||||
export const modifyUser=(data)=>{
|
export const initPassword=(data)=>{
|
||||||
return request({
|
return request({
|
||||||
url:'/admin/user',
|
url:'/admin/mosr/user/init/password',
|
||||||
method:'put',
|
method:'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export const editPassword=(data)=>{
|
||||||
|
return request({
|
||||||
|
url:'/admin/mosr/user/update/password',
|
||||||
|
method:'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -28,3 +28,9 @@ export const getUserInfo = () => {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export const getAuthInfo = () => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/mosr/user/detail/info',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
|
<baseTitle :title="getTagName(type)+getTitleInfo(data.taskId)" ></baseTitle>
|
||||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||||
<el-form :model="formData" label-width="auto" style="margin-top: -15px">
|
<el-form :model="formData" label-width="auto" style="margin-top: -15px">
|
||||||
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
|
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
|
||||||
@@ -266,13 +267,20 @@ const _value = computed({
|
|||||||
emit("update:value", val);
|
emit("update:value", val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const getTitleInfo=(taskId)=>{
|
||||||
|
if(taskId){
|
||||||
|
return '审批'
|
||||||
|
}else {
|
||||||
|
|
||||||
|
return '信息'
|
||||||
|
}
|
||||||
|
}
|
||||||
const getTagName = (type) => {
|
const getTagName = (type) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'approval':
|
case 'approval':
|
||||||
return '项目立项'
|
return '项目立项'
|
||||||
case 'execute':
|
case 'execute':
|
||||||
return '项目实施'
|
return '项目验收'
|
||||||
case 'archivist':
|
case 'archivist':
|
||||||
return '项目归档'
|
return '项目归档'
|
||||||
case 'phase':
|
case 'phase':
|
||||||
|
|||||||
@@ -162,3 +162,8 @@ watch(() => props.processViewer, (newVal) => {
|
|||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
:deep(.el-table--fit ) {
|
||||||
|
height: 162px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,34 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apply-block">
|
<div class="apply-block">
|
||||||
<el-form :model="localFormData" ref="formRef" label-width="auto" v-if="step!=='50'">
|
<el-row>
|
||||||
|
<el-col :span="24" v-if="title==='check'">
|
||||||
|
<baseTitle :title="'附件信息'"></baseTitle>
|
||||||
|
</el-col>
|
||||||
|
<el-form :model="attachmentParam" inline style="margin-top: 15px">
|
||||||
|
<el-form-item label="标签" prop="tag">
|
||||||
|
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in tagsOption"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||||
|
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<fvTable style="width: 100%;max-height: 162px" v-if="showAttachmentTable" height="162" :tableConfig="tableConfig"
|
||||||
|
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-row>
|
||||||
|
<baseTitle :title="getTitleName(title)+'信息'"></baseTitle>
|
||||||
|
<el-form :model="localFormData" ref="formRef" label-width="auto" v-if="step!=='50'">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" v-if="title==='apply'">
|
<el-col :span="24" v-if="title==='apply'">
|
||||||
<el-form-item label="项目负责人" :required="true" prop="projectChargePerson"
|
<el-form-item label="项目负责人" :required="true" prop="projectChargePerson"
|
||||||
@@ -30,6 +58,7 @@
|
|||||||
v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/>
|
v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
|
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
|
||||||
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
|
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
|
||||||
@@ -115,6 +144,7 @@
|
|||||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
|
import {getTags} from "@/api/project-manage";
|
||||||
import {
|
import {
|
||||||
getApplyProcess,
|
getApplyProcess,
|
||||||
getPreProcess,
|
getPreProcess,
|
||||||
@@ -132,6 +162,7 @@ import {useTagsView} from '@/stores/tagsview.js'
|
|||||||
import Paging from "@/components/pagination/index.vue";
|
import Paging from "@/components/pagination/index.vue";
|
||||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||||
|
|
||||||
|
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const changeDiagram = ref(false)
|
const changeDiagram = ref(false)
|
||||||
@@ -142,6 +173,53 @@ const projectChargePersonUserPicker = ref()
|
|||||||
const projectPersonUserList = ref([])
|
const projectPersonUserList = ref([])
|
||||||
const projectPersonUserPicker = ref()
|
const projectPersonUserPicker = ref()
|
||||||
const singleList = ref([])
|
const singleList = ref([])
|
||||||
|
const tagsOption = ref([])
|
||||||
|
const uploadState = ref(false)
|
||||||
|
const showAttachmentTable = ref(true)
|
||||||
|
const otherAttachmentList = ref([])
|
||||||
|
const attachmentParam = reactive({
|
||||||
|
tag: ''
|
||||||
|
})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
@@ -210,6 +288,64 @@ const name = ref(router.currentRoute.value.name)
|
|||||||
const deploymentId = ref()
|
const deploymentId = ref()
|
||||||
const selectRows = ref([])
|
const selectRows = ref([])
|
||||||
const projectId = ref(route.query.projectId)
|
const projectId = ref(route.query.projectId)
|
||||||
|
const getTagsOption = () => {
|
||||||
|
if (!route.query.projectId) return
|
||||||
|
getTags(route.query.projectId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsOption.value = res.data
|
||||||
|
}else{
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleSearch = () => {
|
||||||
|
let params = {
|
||||||
|
targetId: route.query.projectId,
|
||||||
|
targetState: "40"
|
||||||
|
}
|
||||||
|
if (attachmentParam.tag) {
|
||||||
|
tagsOption.value.forEach(item => {
|
||||||
|
if (item.value === attachmentParam.tag) {
|
||||||
|
attachmentParam.tag = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
params.tag = attachmentParam.tag
|
||||||
|
}
|
||||||
|
searchImplementationFileList(params).then(res => {
|
||||||
|
showAttachmentTable.value = false
|
||||||
|
if (res.code === 1000) {
|
||||||
|
otherAttachmentList.value = res.data.fileList
|
||||||
|
uploadState.value = res.data.upload
|
||||||
|
nextTick(() => {
|
||||||
|
showAttachmentTable.value = true
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSearch()
|
||||||
|
getTagsOption()
|
||||||
|
const handleUpload = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/upload',
|
||||||
|
query: {
|
||||||
|
id: route.query.requirementId,
|
||||||
|
state: route.query.state,
|
||||||
|
projectId:route.query.projectId,
|
||||||
|
step: '40'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const getProjectChargePersonUser = () => {
|
const getProjectChargePersonUser = () => {
|
||||||
console.log('list', projectChargePersonUserList.value)
|
console.log('list', projectChargePersonUserList.value)
|
||||||
if (projectChargePersonUserList.value.length !== 0) {
|
if (projectChargePersonUserList.value.length !== 0) {
|
||||||
@@ -372,109 +508,109 @@ const getFileParam = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
||||||
if (localFormData.value.preProcess === undefined) {
|
if (localFormData.value.preProcess === undefined) {
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: '请选择前置流程!',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(projectChargePersonUserList.value&&projectChargePersonUserList.value.length===0){
|
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '请选择项目负责人!',
|
message: '请选择前置流程!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(projectPersonUserList.value&&projectPersonUserList.value.length===0){
|
}
|
||||||
ElNotification({
|
if (projectChargePersonUserList.value && projectChargePersonUserList.value.length === 0) {
|
||||||
title: '提示',
|
|
||||||
message: '请选择项目成员!',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let files = []
|
|
||||||
if (props.mode === 'resubmit') {
|
|
||||||
attachment.value.allFileList.forEach(item => {
|
|
||||||
files.push(getFileParam(item))
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
otherFileList.value.forEach(item => {
|
|
||||||
files.push(getFileParam(item))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (attachment.value.singleFile == null) {
|
|
||||||
attachment.value.validate()
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: '请上传附件',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
attachment.value.clearValidate()
|
|
||||||
}
|
|
||||||
let projectPersonIds = []
|
|
||||||
for (const item of projectPersonUserList.value) {
|
|
||||||
projectPersonIds.push(parseInt(item.id))
|
|
||||||
}
|
|
||||||
let params = {
|
|
||||||
deploymentId: deploymentId.value,
|
|
||||||
requirementId: route.query.id,
|
|
||||||
fileList: files,
|
|
||||||
singleFile: attachment.value.singleFile,
|
|
||||||
projectId: projectId.value,
|
|
||||||
preProcess: JSON.stringify(localFormData.value.preProcess)
|
|
||||||
}
|
|
||||||
console.log(params)
|
|
||||||
let res
|
|
||||||
if (props.step === '20') {
|
|
||||||
params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id)
|
|
||||||
params.projectPersonIds = projectPersonIds
|
|
||||||
if (props.mode === 'resubmit') {
|
|
||||||
res = await resubmitApply(params)
|
|
||||||
} else {
|
|
||||||
res = await projectApply(params)
|
|
||||||
}
|
|
||||||
} else if (props.step === '40') {
|
|
||||||
if (props.mode === 'resubmit') {
|
|
||||||
res = await resubmitCheck(params)
|
|
||||||
} else {
|
|
||||||
res = await projectCheck(params)
|
|
||||||
}
|
|
||||||
} else if (props.step === '50') {
|
|
||||||
if (props.mode === 'resubmit') {
|
|
||||||
res = await resubmitConclusion(params)
|
|
||||||
} else {
|
|
||||||
res = await projectConclusion(params)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.msg,
|
message: '请选择项目负责人!',
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
return;
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
}
|
||||||
if (props.step === '20') {
|
if (projectPersonUserList.value && projectPersonUserList.value.length === 0) {
|
||||||
await router.push({
|
ElNotification({
|
||||||
name: 'Initiation'
|
title: '提示',
|
||||||
})
|
message: '请选择项目成员!',
|
||||||
} else if (props.step === '40') {
|
type: 'error'
|
||||||
await router.push({
|
})
|
||||||
name: 'Implementation'
|
return;
|
||||||
})
|
}
|
||||||
} else if (props.step === '50') {
|
let files = []
|
||||||
await router.push({
|
if (props.mode === 'resubmit') {
|
||||||
name: 'Filing'
|
attachment.value.allFileList.forEach(item => {
|
||||||
})
|
files.push(getFileParam(item))
|
||||||
}
|
})
|
||||||
|
} else {
|
||||||
|
otherFileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (attachment.value.singleFile == null) {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
let projectPersonIds = []
|
||||||
|
for (const item of projectPersonUserList.value) {
|
||||||
|
projectPersonIds.push(parseInt(item.id))
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: files,
|
||||||
|
singleFile: attachment.value.singleFile,
|
||||||
|
projectId: projectId.value,
|
||||||
|
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||||
|
}
|
||||||
|
console.log(params)
|
||||||
|
let res
|
||||||
|
if (props.step === '20') {
|
||||||
|
params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id)
|
||||||
|
params.projectPersonIds = projectPersonIds
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
res = await resubmitApply(params)
|
||||||
|
} else {
|
||||||
|
res = await projectApply(params)
|
||||||
}
|
}
|
||||||
|
} else if (props.step === '40') {
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
res = await resubmitCheck(params)
|
||||||
|
} else {
|
||||||
|
res = await projectCheck(params)
|
||||||
|
}
|
||||||
|
} else if (props.step === '50') {
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
res = await resubmitConclusion(params)
|
||||||
|
} else {
|
||||||
|
res = await projectConclusion(params)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
if (props.step === '20') {
|
||||||
|
await router.push({
|
||||||
|
name: 'Initiation'
|
||||||
|
})
|
||||||
|
} else if (props.step === '40') {
|
||||||
|
await router.push({
|
||||||
|
name: 'Implementation'
|
||||||
|
})
|
||||||
|
} else if (props.step === '50') {
|
||||||
|
await router.push({
|
||||||
|
name: 'Filing'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
let id = projectId.value
|
let id = projectId.value
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<baseTitle title="关联项目"></baseTitle>
|
<baseTitle title="关联项目" v-if="!data.taskId"></baseTitle>
|
||||||
<el-col :span="24">
|
<el-col :span="24" v-if="!data.taskId">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<fvTable style="width: 100%;max-height:162px" height="162" v-if="showTable" :tableConfig="projectTable"
|
<fvTable style="width: 100%;max-height:162px" height="162" v-if="showTable" :tableConfig="projectTable"
|
||||||
:data="formData.projects" :isSettingCol="false" :pagination="false">
|
:data="formData.projects" :isSettingCol="false" :pagination="false">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="detail-block" v-loading="loading">
|
<div class="detail-block" v-loading="loading">
|
||||||
|
<baseTitle title="需求上报信息"></baseTitle>
|
||||||
<el-form :model="localFormData" ref="summaryForm" :rules="rules">
|
<el-form :model="localFormData" ref="summaryForm" :rules="rules">
|
||||||
<el-row gutter="50">
|
<el-row gutter="50">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -32,11 +33,11 @@
|
|||||||
<span>{{ filterDict(cacheStore.getDict('invest_type'), localFormData.investmentType) }}</span>
|
<span>{{ filterDict(cacheStore.getDict('invest_type'), localFormData.investmentType) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<!-- <el-col :span="8">-->
|
||||||
<el-form-item label="项目影响" prop="projectImpact">
|
<!-- <el-form-item label="项目影响" prop="projectImpact">-->
|
||||||
<span>{{ filterDict(cacheStore.getDict('project_impact'), localFormData.projectImpact) }}</span>
|
<!-- <span>{{ filterDict(cacheStore.getDict('project_impact'), localFormData.projectImpact) }}</span>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="所属业务板块" prop="businessSegment">
|
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||||
<span>{{ filterDict(cacheStore.getDict('business_segment'), localFormData.businessSegment) }}</span>
|
<span>{{ filterDict(cacheStore.getDict('business_segment'), localFormData.businessSegment) }}</span>
|
||||||
@@ -61,8 +62,8 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8" v-if="localFormData.isSpecialFund">
|
||||||
<el-form-item label="专项资金名称" prop="specialFund" v-if="localFormData.isSpecialFund">
|
<el-form-item label="专项资金名称" prop="specialFund">
|
||||||
<span>{{
|
<span>{{
|
||||||
localFormData.specialFundId === 0 ? localFormData.specialFund : changeName(fundOption, localFormData.specialFundId)
|
localFormData.specialFundId === 0 ? localFormData.specialFund : changeName(fundOption, localFormData.specialFundId)
|
||||||
}}</span>
|
}}</span>
|
||||||
@@ -358,10 +359,10 @@ watchEffect(() => {
|
|||||||
getFundOptions()
|
getFundOptions()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
.detail-block {
|
.detail-block {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 0!important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<baseTitle title="公司详情"></baseTitle>
|
||||||
|
<fv-Form :schema="companySchema" @getInstance="(e)=>companyForm = e"></fv-Form>
|
||||||
<baseTitle title="部门详情"></baseTitle>
|
<baseTitle title="部门详情"></baseTitle>
|
||||||
<fv-Form :schema="schema" @getInstance="(e)=>form = e"></fv-Form>
|
<fv-Form :schema="schema" @getInstance="(e)=>form = e"></fv-Form>
|
||||||
<UserPicker ref="usrPickershipIds" @ok="editshipIds"></UserPicker>
|
<UserPicker ref="usrPickershipIds" @ok="editshipIds"></UserPicker>
|
||||||
@@ -17,6 +19,7 @@ const props=defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const form = ref()
|
const form = ref()
|
||||||
|
const companyForm = ref()
|
||||||
const usrPickershipIds = ref()
|
const usrPickershipIds = ref()
|
||||||
const usrPickerHeadIds = ref()
|
const usrPickerHeadIds = ref()
|
||||||
const usrPickerDeputyIds = ref()
|
const usrPickerDeputyIds = ref()
|
||||||
@@ -26,6 +29,20 @@ const departmentalDeputyNames = ref()
|
|||||||
const departmentChargeLeadershipIds = ref()
|
const departmentChargeLeadershipIds = ref()
|
||||||
const departmentHeadIds = ref()
|
const departmentHeadIds = ref()
|
||||||
const departmentalDeputyIds = ref()
|
const departmentalDeputyIds = ref()
|
||||||
|
const companySchema = reactive([
|
||||||
|
{
|
||||||
|
label: '公司名称:',
|
||||||
|
prop: 'companyName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '公司编码:',
|
||||||
|
prop: 'companyCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建时间:',
|
||||||
|
prop: 'createTime'
|
||||||
|
}
|
||||||
|
])
|
||||||
const schema = reactive([
|
const schema = reactive([
|
||||||
{
|
{
|
||||||
label: '部门名字:',
|
label: '部门名字:',
|
||||||
@@ -67,6 +84,7 @@ const _value = computed({
|
|||||||
|
|
||||||
const getInfo = async () => {
|
const getInfo = async () => {
|
||||||
const { data } = await getInfoById(_value.value)
|
const { data } = await getInfoById(_value.value)
|
||||||
|
companyForm.value.setValues(data.company)
|
||||||
const params = {
|
const params = {
|
||||||
createTime: data.createTime,
|
createTime: data.createTime,
|
||||||
departmentMark: data.departmentMark,
|
departmentMark: data.departmentMark,
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 步骤内容 -->
|
<!-- 步骤内容 -->
|
||||||
<div>
|
<div>
|
||||||
<baseTitle title="各流程信息"></baseTitle>
|
|
||||||
<slot name="content" :localActive="localActive"></slot>
|
<slot name="content" :localActive="localActive"></slot>
|
||||||
<!-- <template v-for="(item, index) in stepList" :key="item.key">
|
<!-- <template v-for="(item, index) in stepList" :key="item.key">
|
||||||
<component v-if="localActive == index" v-bind="item.props || {}" :is="item.component" />
|
<component v-if="localActive == index" v-bind="item.props || {}" :is="item.component" />
|
||||||
@@ -84,7 +83,7 @@ const localSteps = ref([
|
|||||||
key: 'approve',
|
key: 'approve',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '项目实施',
|
title: '项目验收',
|
||||||
key: 'execute',
|
key: 'execute',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -217,7 +217,6 @@ filterColumns()
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
const {api, params} = props.tableConfig
|
const {api, params} = props.tableConfig
|
||||||
const queryParmas = {...localData.query, ...params}
|
const queryParmas = {...localData.query, ...params}
|
||||||
console.log("🚀 ~ getList ~ queryParmas:", queryParmas)
|
|
||||||
if (api) {
|
if (api) {
|
||||||
localData.loading = true
|
localData.loading = true
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -40,12 +40,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <li v-for="item in accountList" :label="item.userName" :value="item.userId"/>-->
|
<!-- <li v-for="item in accountList" :label="item.userName" :value="item.userId"/>-->
|
||||||
</li>
|
</li>
|
||||||
<!-- <li @click="handleToAuth">-->
|
<li @click="handleToAuth">
|
||||||
<!-- <el-icon color="gray" size="20" style="margin-right: 5px">-->
|
<el-icon color="gray" size="20" style="margin-right: 5px">
|
||||||
<!-- <UserFilled/>-->
|
<UserFilled/>
|
||||||
<!-- </el-icon>-->
|
</el-icon>
|
||||||
<!-- 个人中心-->
|
个人中心
|
||||||
<!-- </li>-->
|
</li>
|
||||||
<li @click="handleLogout">
|
<li @click="handleLogout">
|
||||||
<el-icon color="gray" size="20" style="margin-right: 5px">
|
<el-icon color="gray" size="20" style="margin-right: 5px">
|
||||||
<SwitchButton/>
|
<SwitchButton/>
|
||||||
|
|||||||
@@ -10,31 +10,49 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="userDetail">
|
<div class="userDetail">
|
||||||
<!-- 头像上传 -->
|
<div class="userInfo_item">
|
||||||
<div class="userImg">
|
用户名: <span>{{ userParams.userName }}</span>
|
||||||
<el-image class="avatar" :src="userParams.avatar" fit="fill"/>
|
</div>
|
||||||
|
<div class="userInfo_item">
|
||||||
|
用户名称: <span>{{ userParams.nickName }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="userInfo_item">
|
||||||
|
工号: <span>{{ userParams.workCode }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="userInfo_item">
|
<div class="userInfo_item">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<UserFilled />
|
<Iphone/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
用户呢称: <span>{{ userParams.nickName }}</span>
|
电话号码: <span>{{ userParams.mobile }}</span></div>
|
||||||
|
<div class="userInfo_item">
|
||||||
|
<el-icon>
|
||||||
|
<HomeFilled/>
|
||||||
|
</el-icon>
|
||||||
|
所属公司: <span>{{ userParams.subCompanyName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="userInfo_item"><el-icon>
|
<div class="userInfo_item">
|
||||||
<Iphone />
|
<el-icon>
|
||||||
</el-icon>电话号码: <span>{{ userParams.phoneNumber }}</span> </div>
|
<HomeFilled/>
|
||||||
<div class="userInfo_item"><el-icon>
|
</el-icon>
|
||||||
<Message />
|
所属部门: <span>{{ userParams.departmentName }}</span>
|
||||||
</el-icon>用户邮箱:<span>{{ userParams.email }}</span> </div>
|
</div>
|
||||||
<div class="userInfo_item"><el-icon>
|
<div class="userInfo_item">
|
||||||
<HomeFilled />
|
<el-icon>
|
||||||
</el-icon>所属部门: <span>{{ userParams.city }}</span> </div>
|
<HomeFilled/>
|
||||||
<div class="userInfo_item"><el-icon>
|
</el-icon>
|
||||||
<OfficeBuilding />
|
岗位: <span>{{ userParams.jobActivityDesc }}</span>
|
||||||
</el-icon>所属角色: <span>{{ userParams.createBy }}</span> </div>
|
</div>
|
||||||
<div class="userInfo_item"><el-icon>
|
<div class="userInfo_item">
|
||||||
<Calendar />
|
<el-icon>
|
||||||
</el-icon>创建日期:<span>{{ userParams.loginDate }}</span> </div>
|
<HomeFilled/>
|
||||||
|
</el-icon>
|
||||||
|
账号类型: <span>{{ userParams.accountType === '0' ? '主账号' : '次账号' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="userInfo_item">
|
||||||
|
<el-icon>
|
||||||
|
<OfficeBuilding/>
|
||||||
|
</el-icon>
|
||||||
|
所属角色: <span>{{ belongToRole(userParams.roles) }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,143 +63,138 @@
|
|||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>基本资料</span>
|
<span>{{ isInitPassword ? '修改密码' : '初始化密码' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<el-form label-width="120px" ref="passwordRef" :model="userPassword" :rules="rules">
|
||||||
<el-tabs class="demo-tabs" v-model="activeName">
|
<el-form-item label="旧密码" prop="oldPassword" :required="true" style="text-align:left" v-if="isInitPassword">
|
||||||
<el-tab-pane label="基本资料" name="first" >
|
<el-input placeholder="请输入旧密码" v-model="userPassword.oldPassword" type="password"/>
|
||||||
<el-form
|
</el-form-item>
|
||||||
:model="userParams"
|
<el-form-item label="新密码" prop="newPassword" :required="true" style="text-align:left">
|
||||||
label-width="120px"
|
<el-input placeholder="请输入新密码" v-model="userPassword.newPassword" type="password"/>
|
||||||
class="demo-ruleForm"
|
</el-form-item>
|
||||||
>
|
<el-form-item label="确认密码" prop="confirmPassword" :required="true" style="text-align:left">
|
||||||
<el-form-item label="用户昵称" prop="userName" :required="true" style="text-align:left">
|
<el-input placeholder="请确认新密码" v-model="userPassword.confirmPassword" type="password"/>
|
||||||
<el-input v-model="userParams.nickName"/>
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item>
|
||||||
<el-form-item label="手机号码" :required="true" style="text-align:left">
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
<el-input v-model="userParams.phoneNumber"/>
|
<el-button @click="close">关闭</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮箱" prop="email" :required="true" style="text-align:left">
|
</el-form>
|
||||||
<el-input v-model="userParams.email"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="性别" prop="sex">
|
|
||||||
<el-radio-group v-model="userParams.sex">
|
|
||||||
<el-radio label="0">男</el-radio>
|
|
||||||
<el-radio label="1">女</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="submit">保存</el-button>
|
|
||||||
<el-button @click="close">关闭</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="修改密码" name="second">
|
|
||||||
<el-form label-width="120px" :model="userPassword">
|
|
||||||
<el-form-item label="旧密码" :required="true" style="text-align:left">
|
|
||||||
<el-input placeholder="请输入旧密码" v-model="userPassword.oldPassWord"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="新密码" :required="true" style="text-align:left">
|
|
||||||
<el-input placeholder="请输入新密码" v-model="userPassword.newPassWord"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="确认密码" :required="true" style="text-align:left">
|
|
||||||
<el-input placeholder="请确认新密码" v-model="userPassword.querenPassWord"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="submit2">保存</el-button>
|
|
||||||
<el-button @click="close">关闭</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getUserInfo} from '@/api/login';
|
import {ElNotification} from 'element-plus'
|
||||||
import {ref} from "vue";
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
import {modifyUser} from '@/api/auth/auth'
|
import {getAuthInfo} from "@/api/login";
|
||||||
import { ElMessage } from 'element-plus'
|
import {editPassword, initPassword} from "@/api/auth/auth";
|
||||||
import { useTagsView } from '@/stores/tagsview.js'
|
|
||||||
var userParams = ref({})
|
const isInitPassword = ref(false);
|
||||||
var userPassword=ref({
|
const userParams = ref({});
|
||||||
oldPassWord:'',
|
const passwordRef = ref();
|
||||||
newPassWord:'',
|
const router = useRouter()
|
||||||
querenPassWord:''
|
const userPassword = ref({
|
||||||
})
|
oldPassword: '',
|
||||||
const activeName = ref('first')
|
newPassword: '',
|
||||||
|
confirmPassword: ''
|
||||||
|
});
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
const getuserinfo=async ()=>{
|
const validatePasswordComplexity = (rule, value, callback) => {
|
||||||
await getUserInfo().then(res=>{
|
const reg = /^(?=.*[a-zA-Z])(?=.*\d).{1,9}$/; //密码必须是至少包含字母、数字,1-9位
|
||||||
userParams.value=res.data.user
|
if (!reg.test(value)) {
|
||||||
})
|
callback(new Error("密码必须是至少包含字母、数字,1-9位"));
|
||||||
}
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 修改资料
|
|
||||||
const submit=async ()=>{
|
const validatePasswordEquality = (rule, value, callback) => {
|
||||||
await modifyUser({
|
if (userPassword.value.newPassword != value) {
|
||||||
userName:userParams.value.userName,
|
callback(new Error("两次输入密码不一致!"));
|
||||||
nickName:userParams.value.nickName,
|
} else {
|
||||||
phoneNumber:userParams.value.phoneNumber,
|
callback();
|
||||||
email:userParams.value.email,
|
}
|
||||||
sex:userParams.value.sex,
|
|
||||||
userId:userParams.value.userId
|
|
||||||
}).then(res=>{
|
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 修改密码
|
const rules = reactive({
|
||||||
const submit2=async ()=>{
|
oldPassword: [
|
||||||
await getUserInfo().then( res=>{
|
{required: true, message: "旧密码不能为空", trigger: ["change", "blur"]},
|
||||||
if(res.data!=''){
|
],
|
||||||
console.log(res.data.user.password)
|
newPassword: [
|
||||||
if (userPassword.value.oldPassWord==res.data.user.password && userPassword.value.newPassWord==userPassword.value.querenPassWord){
|
{required: true, message: "新密码不能为空", trigger: ["change", "blur"]},
|
||||||
modifyUser({
|
{
|
||||||
userName:userParams.value.userName,
|
required: true,
|
||||||
nickName:userParams.value.nickName,
|
trigger: ["change", "blur"],
|
||||||
password:userPassword.value.newPassWord,
|
validator: validatePasswordComplexity
|
||||||
userId:userParams.value.userId
|
|
||||||
}).then(res=>{
|
|
||||||
ElMessage({
|
|
||||||
message: '修改密码成功',
|
|
||||||
type: 'success',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}else if(userPassword.value.oldPassWord!=res.data.user.password && userPassword.value.newPassWord==userPassword.value.querenPassWord){
|
|
||||||
ElMessage({
|
|
||||||
message: '旧密码错误',
|
|
||||||
type: 'error',
|
|
||||||
})
|
|
||||||
}else if(userPassword.value.oldPassWord==res.data.user.password && userPassword.value.newPassWord!=userPassword.value.querenPassWord){
|
|
||||||
ElMessage({
|
|
||||||
message: '新密码与确认密码不同',
|
|
||||||
type: 'error',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
ElMessage({
|
|
||||||
message: '请求错误',
|
|
||||||
type: 'error',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
confirmPassword: [
|
||||||
|
{required: true, message: "确认密码不能为空", trigger: ["change", "blur"]},
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: ["change", "blur"],
|
||||||
|
validator: validatePasswordEquality
|
||||||
|
}
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
const getInfo = async () => {
|
||||||
|
await getAuthInfo().then(res => {
|
||||||
|
userParams.value = res.data.user
|
||||||
|
isInitPassword.value = res.data.initPassword
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const belongToRole = (roles) => {
|
||||||
|
if (!roles) return;
|
||||||
|
return roles.map(item => item.roleName).join(',')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改密码
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
if (isInitPassword.value) {
|
||||||
|
editPassword({
|
||||||
|
...userPassword.value
|
||||||
|
}).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
passwordRef.value.resetFields()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
initPassword({
|
||||||
|
newPassword: userPassword.value.newPassword,
|
||||||
|
confirmPassword: userPassword.value.confirmPassword
|
||||||
|
}).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
passwordRef.value.resetFields()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
// 关闭
|
// 关闭
|
||||||
const close = () => {
|
const close = () => {
|
||||||
tagsViewStore.delVisitedViews({
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
path:"/auth",meta:{hidden: false, title: '个人中心', breadcrumb: true}})
|
router.push('/')
|
||||||
}
|
}
|
||||||
onMounted(()=>{
|
onMounted(() => {
|
||||||
getuserinfo()
|
getInfo()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
body,div {
|
body, div {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
@@ -189,32 +202,35 @@ body,div {
|
|||||||
.my {
|
.my {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
.userDetail {
|
|
||||||
.userImg {
|
.userDetail {
|
||||||
height: 170px;
|
.userImg {
|
||||||
text-align: center;
|
height: 170px;
|
||||||
border-bottom-style: solid;
|
text-align: center;
|
||||||
border-color: #daddd2;
|
|
||||||
border-width: 1px;
|
|
||||||
.avatar {
|
|
||||||
width: 150px;
|
|
||||||
height: 150px;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.userInfo_item {
|
|
||||||
height: 40px;
|
|
||||||
border-bottom-style: solid;
|
border-bottom-style: solid;
|
||||||
border-color: #daddd2;
|
border-color: #daddd2;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
text-align: left;
|
|
||||||
line-height: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfo_item > span {
|
.avatar {
|
||||||
float: right;
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.userInfo_item {
|
||||||
|
height: 40px;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
border-color: #daddd2;
|
||||||
|
border-width: 1px;
|
||||||
|
text-align: left;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userInfo_item > span {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -21,9 +21,20 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="query-btn">
|
<div class="query-btn">
|
||||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||||
<el-button color="#DED0B2" v-perm="['annual:plan:edit']" style="float: right;margin: 0 10px 10px 0"
|
<el-popover :visible="editVisible" placement="top" :width="160">
|
||||||
@click="editBtn">编辑
|
<p>点击编辑可以修改年度计划名称!</p>
|
||||||
</el-button>
|
<div style="text-align: right; margin: 0">
|
||||||
|
<el-button size="small" color="#DED0B2" @click="editVisible = false">
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button color="#DED0B2" v-perm="['annual:plan:edit']" style="float: right;margin: 0 10px 10px 0"
|
||||||
|
@click="editBtn">编辑
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-table ref="table" :data="formData.projectList" border :header-cell-style="{background:'#f5f7fa'}">
|
<el-table ref="table" :data="formData.projectList" border :header-cell-style="{background:'#f5f7fa'}">
|
||||||
<el-table-column label="四川省国有资产经营投资管理有限责任公司科技创新项目年度计划表" align="center">
|
<el-table-column label="四川省国有资产经营投资管理有限责任公司科技创新项目年度计划表" align="center">
|
||||||
@@ -148,6 +159,8 @@ const formData = ref({})
|
|||||||
const table = ref()
|
const table = ref()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const isEdit = ref(false)
|
const isEdit = ref(false)
|
||||||
|
const editVisible = ref(true)
|
||||||
|
|
||||||
const exportTable = () => {
|
const exportTable = () => {
|
||||||
const $e = table.value.$el
|
const $e = table.value.$el
|
||||||
let $table = $e.querySelector('.el-table__fixed')
|
let $table = $e.querySelector('.el-table__fixed')
|
||||||
@@ -202,14 +215,15 @@ const filterDict = (data, value) => {
|
|||||||
const getDetailInfo = () => {
|
const getDetailInfo = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
getPlan(route.query.annualPlanId).then(res => {
|
getPlan(route.query.annualPlanId).then(res => {
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
formData.value = res.data
|
formData.value = res.data
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
}else{
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type:'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,9 +141,9 @@ const stepChange = (data) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.detail-block {
|
//.detail-block{
|
||||||
padding-top: 15px;
|
// padding-top: 15px;
|
||||||
}
|
//}
|
||||||
|
|
||||||
:deep(.el-tabs__nav-scroll) {
|
:deep(.el-tabs__nav-scroll) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -125,9 +125,9 @@ const getAttachment = (val) => {
|
|||||||
showSingleTable.value = true
|
showSingleTable.value = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// watch(() => singleList.value, (newVal) => {
|
watch(() => singleList.value, (newVal) => {
|
||||||
// showSingleTable.value = newVal.length !== 0;
|
showSingleTable.value = newVal.length !== 0;
|
||||||
// }, {deep: true})
|
}, {deep: true})
|
||||||
const getOtherFile = (val) => {
|
const getOtherFile = (val) => {
|
||||||
// console.log('上传文件getOtherFile', val)
|
// console.log('上传文件getOtherFile', val)
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
<baseTitle title="基础信息"></baseTitle>
|
<baseTitle title="基础信息"></baseTitle>
|
||||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||||
<baseTitle title="项目实施-上传附件"></baseTitle>
|
<baseTitle title="项目实施-上传附件"></baseTitle>
|
||||||
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
|
<el-form :model="formData" ref="tagForm" label-width="auto" >
|
||||||
<el-form-item label="标签名称" prop="tagName">
|
<el-form-item label="标签名称" prop="tagName">
|
||||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput"/>
|
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput" clearable/>
|
||||||
<el-select v-model="formData.tagName" placeholder="请选择标签名称" clearable filterable style="width: 300px" v-else>
|
<el-select v-model="formData.tagName" placeholder="请选择标签名称" clearable filterable style="width: 300px" v-else>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in tagsOption"
|
v-for="item in tagsOption"
|
||||||
@@ -16,16 +16,15 @@
|
|||||||
<el-button type="primary" link @click="changeInput">{{ showInput ? '选择' : '输入' }}</el-button>
|
<el-button type="primary" link @click="changeInput">{{ showInput ? '选择' : '输入' }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<baseTitle title="其他文件"></baseTitle>
|
<div style="display: flex; align-items: center">
|
||||||
<el-card style="width: 100%;margin: 15px 0">
|
<baseTitle title="其他文件" style="margin-right: 10px"></baseTitle>
|
||||||
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/>
|
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/></div>
|
||||||
<fvTable style="width: 100%;max-height: 162px;" v-if="showTable" height="162" :tableConfig="tableConfig"
|
<fvTable style="width: 100%;max-height: 162px;" v-if="showTable" height="162" :tableConfig="tableConfig"
|
||||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||||
</template>
|
</template>
|
||||||
</fvTable>
|
</fvTable>
|
||||||
</el-card>
|
|
||||||
<div class="oper-page-btn">
|
<div class="oper-page-btn">
|
||||||
<el-button color="#DED0B2" @click="handleSubmit(tagForm)">提交</el-button>
|
<el-button color="#DED0B2" @click="handleSubmit(tagForm)">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,6 +130,15 @@ const name = ref(router.currentRoute.value.name)
|
|||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
tagName: [{required: true, message: '请输入标签名称', trigger: ['blur', 'change']}],
|
tagName: [{required: true, message: '请输入标签名称', trigger: ['blur', 'change']}],
|
||||||
})
|
})
|
||||||
|
onActivated(()=>{
|
||||||
|
console.log('onActivated')
|
||||||
|
formData.value.tagName = '';
|
||||||
|
showTable.value=false
|
||||||
|
nextTick(()=>{
|
||||||
|
showTable.value=true
|
||||||
|
})
|
||||||
|
fileList.value=[]
|
||||||
|
})
|
||||||
const handleDelete = (row) => {
|
const handleDelete = (row) => {
|
||||||
deleteFile(row.fileId).then(res => {
|
deleteFile(row.fileId).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -155,7 +163,7 @@ const handleDownload = (row) => {
|
|||||||
}
|
}
|
||||||
const getBaseInfo = async () => {
|
const getBaseInfo = async () => {
|
||||||
try {
|
try {
|
||||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||||
baseForm.value.setValues(data)
|
baseForm.value.setValues(data)
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
@@ -167,8 +175,8 @@ const changeInput = () => {
|
|||||||
formData.value.tagName = '';
|
formData.value.tagName = '';
|
||||||
}
|
}
|
||||||
const getTagsOption = () => {
|
const getTagsOption = () => {
|
||||||
if (!route.query.id) return
|
if (!route.query.projectId) return
|
||||||
getTags(route.query.id).then(res => {
|
getTags(route.query.projectId).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@@ -219,7 +227,7 @@ const handleSubmit = async (instance) => {
|
|||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
fileList: fileList.value,
|
fileList: fileList.value,
|
||||||
projectId: route.query.id,
|
projectId: route.query.projectId,
|
||||||
targetState: "40"
|
targetState: "40"
|
||||||
}
|
}
|
||||||
let res = await uploadFileList(params)
|
let res = await uploadFileList(params)
|
||||||
@@ -234,14 +242,17 @@ const handleSubmit = async (instance) => {
|
|||||||
await router.push({
|
await router.push({
|
||||||
name: 'Filing/attachment',
|
name: 'Filing/attachment',
|
||||||
query: {
|
query: {
|
||||||
id: route.query.id
|
id: route.query.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
await router.push({
|
await router.push({
|
||||||
name: 'Implementation/attachment',
|
name: 'Implementation/detail',
|
||||||
query: {
|
query: {
|
||||||
id: route.query.id
|
id: route.query.id,
|
||||||
|
state: route.query.state,
|
||||||
|
projectId: route.query.projectId,
|
||||||
|
step: '40'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user