Browse Source

peter

360view
newPeter7 2 years ago
parent
commit
bd4633f30c
  1. 116
      src/page-subspecialty/views/modules/scientificManagement/subjectMgt/doctor/index.vue
  2. 3
      src/page-subspecialty/views/modules/scientificManagement/subjectMgt/log/index.vue
  3. 2
      src/page-subspecialty/views/modules/scientificManagement/sys/project-add-or-update.vue
  4. 2
      src/page-subspecialty/views/modules/scientificManagement/sys/project-review.vue
  5. 13
      src/page-subspecialty/views/modules/scientificManagement/sys/project.vue

116
src/page-subspecialty/views/modules/scientificManagement/subjectMgt/doctor/index.vue

@ -16,7 +16,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="doctorList"> <el-table :data="doctorList">
<el-table-column prop="userName" label="用户名" header-align="center" align="center" />
<el-table-column prop="employeeId" label="用户名" header-align="center" align="center" />
<el-table-column prop="realName" label="真实姓名" header-align="center" align="center" /> <el-table-column prop="realName" label="真实姓名" header-align="center" align="center" />
<el-table-column prop="gender" label="性别" header-align="center" align="center"> <el-table-column prop="gender" label="性别" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -26,35 +26,40 @@
<el-table-column prop="mobile" label="手机号" header-align="center" align="center" /> <el-table-column prop="mobile" label="手机号" header-align="center" align="center" />
<el-table-column prop="roleNameList" label="角色" header-align="center" align="center"> <el-table-column prop="roleNameList" label="角色" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.roleNameList.length>0">
<p v-for="(item,index) in scope.row.roleNameList" :key="index" style="margin:0">{{ item }}
<div v-if="scope.row.roleList && scope.row.roleList.length>0">
<p v-for="(item,index) in scope.row.roleList" :key="index" style="margin:0">{{ item.name }}
</p> </p>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="status" label="状态" header-align="center" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <span-->
<!-- :class="scope.row.status=='1' ? 'state-circle state-circle-green' :'state-circle state-circle-red'"-->
<!-- />-->
<!-- <span>{{ scope.row.status == '1' ? '正常':'停用' }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="status" label="状态" header-align="center" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <span-->
<!-- :class="scope.row.status=='1' ? 'state-circle state-circle-green' :'state-circle state-circle-red'"-->
<!-- />-->
<!-- <span>{{ scope.row.status == '1' ? '正常':'停用' }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="operation" label="操作" header-align="center" align="center"> <el-table-column prop="operation" label="操作" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="opPermission(scope.row)">
<!-- <el-dropdown trigger="click" @command="handleRoleCommand(scope.row,$event)">-->
<!-- <span class="el-dropdown-link" style="padding-right:8px;cursor: pointer;">更改角色</span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item v-for="item in roleList" :key="item.roleId" :command="item.id">{{ item.name }}</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<span <span
style="color:#FF4D4F" style="color:#FF4D4F"
class="operation-delete" class="operation-delete"
@click="deleteClick(scope.row)" @click="deleteClick(scope.row)"
>移出</span> >移出</span>
</span>
<!-- <span v-if="opPermission(scope.row)">-->
<!-- <el-dropdown trigger="click" @command="handleRoleCommand(scope.row,$event)">-->
<!-- <span class="el-dropdown-link" style="padding-right:8px;cursor: pointer;">更改角色</span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item v-for="item in roleList" :key="item.roleId" :command="item.id">{{ item.name }}</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- <span-->
<!-- style="color:#FF4D4F"-->
<!-- class="operation-delete"-->
<!-- @click="deleteClick(scope.row)"-->
<!-- >移出</span>-->
<!-- </span>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -74,7 +79,7 @@
:render-content="renderFunc" :render-content="renderFunc"
:format="{noChecked: '${total}',hasChecked: '${checked}/${total}'}" :format="{noChecked: '${total}',hasChecked: '${checked}/${total}'}"
:titles="['未加入', '已加入课题']" :titles="['未加入', '已加入课题']"
:props="{key: 'doctorId', label: 'doctorName'}"
:props="{key: 'userId', label: 'realName'}"
:data="AllJoinedPeopleList" :data="AllJoinedPeopleList"
@change="handleChange" @change="handleChange"
/> />
@ -106,7 +111,7 @@ export default {
inputSearchValue: '', inputSearchValue: '',
transferData: generateData(), transferData: generateData(),
renderFunc(h, option) { renderFunc(h, option) {
return <span>{option.doctorName}</span>
return <span>{option.realName}</span>
}, },
dialogFormVisible: false, dialogFormVisible: false,
projectId: '', projectId: '',
@ -124,11 +129,10 @@ export default {
} }
}, },
created() { created() {
// this.projectId = window.SITE_CONFIG['projectId']
this.projectId = this.$route.query.projectId this.projectId = this.$route.query.projectId
this.getDoctorList() this.getDoctorList()
this.getProjectUser() this.getProjectUser()
this.getRoleList()
// this.getRoleList()
}, },
methods: { methods: {
reload() { reload() {
@ -144,39 +148,32 @@ export default {
assignPeopleClick() { assignPeopleClick() {
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
//
async getProjectUser() {
const { data: res } = await this.$http.get('/dp/getDoctorList')
if (res.code === 0) {
this.AllJoinedPeopleList = res.data
//
getProjectUser() {
this.$http.get(`/projectUser/getUserList/${this.projectId}`)
.then(({ data: res }) => {
this.JoinedPeopleList = res.data.joinedList
this.notJoinedPeopleList = res.data.notJoined
//
if (res.data.joinedList.length > 0) {
res.data.joinedList.forEach(item => {
this.rightValue.push(item.userId)
if (item.isAdmin === 1) {
item.disabled = true
}
})
}
//
if (res.data.notJoined.length > 0) {
res.data.notJoined.forEach(item => {
if (item.isAdmin === 1) {
item.disabled = true
}
})
} }
this.AllJoinedPeopleList = [...res.data.joinedList, ...res.data.notJoined]
})
}, },
//
// getProjectUser() {
// this.$http.get(`/projectUser/getUserList/${this.projectId}`)
// .then(({ data: res }) => {
// this.JoinedPeopleList = res.data.joinedList
// this.notJoinedPeopleList = res.data.notJoined
// //
// if (res.data.joinedList.length > 0) {
// res.data.joinedList.forEach(item => {
// this.rightValue.push(item.userId)
// if (item.isAdmin === 1) {
// item.disabled = true
// }
// })
// }
// //
// if (res.data.notJoined.length > 0) {
// res.data.notJoined.forEach(item => {
// if (item.isAdmin === 1) {
// item.disabled = true
// }
// })
// }
// this.AllJoinedPeopleList = [...res.data.joinedList, ...res.data.notJoined]
// })
// },
// //
handleChange(value) { handleChange(value) {
this.joinedListUserId = value this.joinedListUserId = value
@ -189,7 +186,7 @@ export default {
userIdList: this.joinedListUserId userIdList: this.joinedListUserId
}).then(({ data: res }) => { }).then(({ data: res }) => {
this.$message.success('分配成功') this.$message.success('分配成功')
this.refresh()
this.getDoctorList()
}) })
}, },
// //
@ -210,11 +207,11 @@ export default {
userId: scopeRow.userId userId: scopeRow.userId
}).then(({ data: res }) => { }).then(({ data: res }) => {
this.$message.success('更改角色成功!') this.$message.success('更改角色成功!')
this.refresh()
this.getDoctorList()
}) })
}, },
// //
getDoctorList(e) {
getDoctorList() {
this.$http.get('/projectUser/page', { this.$http.get('/projectUser/page', {
params: { params: {
limit: this.limit, limit: this.limit,
@ -223,7 +220,7 @@ export default {
realName: '' realName: ''
} }
}).then(({ data: res }) => { }).then(({ data: res }) => {
this.doctorList = res.data.list
this.doctorList = res.data.list || []
this.total = res.data.total this.total = res.data.total
}) })
}, },
@ -241,7 +238,7 @@ export default {
data: [scopeRow.id] data: [scopeRow.id]
}).then(({ data: res }) => { }).then(({ data: res }) => {
this.$message.success('删除成功!') this.$message.success('删除成功!')
this.refresh()
this.getDoctorList()
}) })
}) })
} }
@ -249,7 +246,6 @@ export default {
} }
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.state-circle { .state-circle {
display: inline-block; display: inline-block;
width: 6px; width: 6px;

3
src/page-subspecialty/views/modules/scientificManagement/subjectMgt/log/index.vue

@ -2,7 +2,6 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="filter-wrapper"> <div class="filter-wrapper">
<el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()">
<el-form-item> <el-form-item>
<el-input v-model="input" placeholder="关键词" class="input-with-select" clearable> <el-input v-model="input" placeholder="关键词" class="input-with-select" clearable>
<el-select slot="prepend" v-model="select" placeholder="请选择"> <el-select slot="prepend" v-model="select" placeholder="请选择">
@ -14,9 +13,7 @@
<el-button slot="append" icon="el-icon-search" @click="getDataList()">{{ $t('query') }}</el-button> <el-button slot="append" icon="el-icon-search" @click="getDataList()">{{ $t('query') }}</el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
:data="dataList" :data="dataList"

2
src/page-subspecialty/views/modules/scientificManagement/sys/project-add-or-update.vue

@ -125,7 +125,7 @@ export default {
dateRange1: [], dateRange1: [],
uploadUrl: window.SITE_CONFIG['apiURL'] + '/upload/uploadFiles', uploadUrl: window.SITE_CONFIG['apiURL'] + '/upload/uploadFiles',
headers: { headers: {
token: Cookies.get('token')
token: window.sessionStorage.getItem('xa-token') || ''
}, },
uploadData: { uploadData: {
path: '课题附件' path: '课题附件'

2
src/page-subspecialty/views/modules/scientificManagement/sys/project-review.vue

@ -259,7 +259,7 @@ export default {
this.approvalComment = '' this.approvalComment = ''
this.approvalId = '' this.approvalId = ''
this.$message({ type: 'success', message: '审批完成' }) this.$message({ type: 'success', message: '审批完成' })
this.query()
this.getDataList()
}) })
}) })
}, },

13
src/page-subspecialty/views/modules/scientificManagement/sys/project.vue

@ -160,34 +160,32 @@
:label="$t('handle')" :label="$t('handle')"
header-align="center" header-align="center"
align="center" align="center"
width="120"
width="180"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="opPermission(scope.row.projectAdminUserId)">
<span>
<el-button <el-button
v-if="$hasPermission('') && scope.row.approvalStatus==3 "
type="text" type="text"
size="small" size="small"
@click="assignPeopleHandle(scope.row)" @click="assignPeopleHandle(scope.row)"
>人员 >人员
</el-button> </el-button>
<el-button <el-button
v-if="$hasPermission('') && scope.row.approvalStatus==3"
style="margin-right: 12px"
type="text" type="text"
size="small" size="small"
@click="addOrUpdateHandle(scope.row.id)" @click="addOrUpdateHandle(scope.row.id)"
>{{ $t("update") }} >{{ $t("update") }}
</el-button> </el-button>
<el-button <el-button
v-if="$hasPermission('')&& scope.row.approvalStatus!=3"
type="text" type="text"
size="small" size="small"
style="color: red"
style="color: red;margin-right: 12px"
@click="deleteHandle(scope.row.id)" @click="deleteHandle(scope.row.id)"
>{{ $t("delete") }} >{{ $t("delete") }}
</el-button> </el-button>
</span> </span>
<span v-else>
<span>
<el-button <el-button
type="text" type="text"
size="small" size="small"
@ -314,6 +312,7 @@ export default {
}, },
methods: { methods: {
windowOpen_project(projectId, deptId) { windowOpen_project(projectId, deptId) {
console.log(arguments)
// window.open(`project/home?id=${projectId}`) // window.open(`project/home?id=${projectId}`)
// const { href } = this.$router.resolve({ // const { href } = this.$router.resolve({
// name: 'subject' // name: 'subject'

Loading…
Cancel
Save