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