新增权限配置

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-26 13:42:57 +08:00
parent a7c7c3dfc5
commit f9f3c55ea1
4 changed files with 112 additions and 108 deletions

View File

@ -114,7 +114,7 @@
size="mini" size="mini"
@click="getList" @click="getList"
> >
{{ $t("common:button:search") }} {{ $t('common:button:search') }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button <el-button
@ -122,7 +122,7 @@
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
@click="handleReset" @click="handleReset"
> >
{{ $t("common:button:reset") }} {{ $t('common:button:reset') }}
</el-button> </el-button>
<!-- <el-button <!-- <el-button
type="primary" type="primary"
@ -141,7 +141,7 @@
v-if="level > 7" v-if="level > 7"
:disabled="tableSelectData.length <= 0" :disabled="tableSelectData.length <= 0"
> >
{{ $t("feedBack:button:resolve") }} {{ $t('feedBack:button:resolve') }}
</el-button> </el-button>
</el-form> </el-form>
<el-table <el-table
@ -257,7 +257,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="['danger', 'success'][scope.row.State]">{{ <el-tag :type="['danger', 'success'][scope.row.State]">{{
$fd("FeedBackStatus", scope.row.State) $fd('FeedBackStatus', scope.row.State)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -278,7 +278,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="getDetail(scope.row)"> <el-button size="mini" type="text" @click="getDetail(scope.row)">
{{ $t("common:button:view") }} {{ $t('common:button:view') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -295,8 +295,8 @@
</div> </div>
</template> </template>
<script> <script>
import Pagination from "@/components/Pagination"; import Pagination from '@/components/Pagination'
import { batchUpdateFeedBackState, getUserFeedBackList } from "@/api/trials.js"; import { batchUpdateFeedBackState, getUserFeedBackList } from '@/api/trials.js'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
TrialKeyInfo: null, TrialKeyInfo: null,
@ -312,23 +312,23 @@ const searchDataDefault = () => {
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: false, Asc: false,
SortField: "CreateTime", SortField: 'CreateTime',
}; }
}; }
export default { export default {
components: { Pagination }, components: { Pagination },
props: { props: {
trialId: { trialId: {
type: String, type: String,
default: "", default: '',
}, },
}, },
dicts: [ dicts: [
"NoticeApplicableTrial", 'NoticeApplicableTrial',
"NoteLevel", 'NoteLevel',
"NoteType", 'NoteType',
"NoticeState", 'NoticeState',
"NoticeMode", 'NoticeMode',
], ],
data() { data() {
return { return {
@ -340,100 +340,100 @@ export default {
searchData: searchDataDefault(), searchData: searchDataDefault(),
tableSelectData: [], tableSelectData: [],
UserTypeOptins: [ UserTypeOptins: [
{ label: "CRC", value: 2 }, { label: 'CRC', value: 2 },
{ label: "IR", value: 13 }, { label: 'IR', value: 13 },
], ],
}; }
}, },
computed: { computed: {
level() { level() {
if (this.hasPermi(["role:dev", "role:admin"])) { if (this.hasPermi(['role:dev', 'role:admin'])) {
return 9; return 9
} }
if (this.hasPermi(["role:pm"])) { if (this.hasPermi(['role:pm', 'role:spm'])) {
return 8; return 8
} }
if (this.hasPermi(["role:ir", "role:crc"])) { if (this.hasPermi(['role:ir', 'role:crc'])) {
return 7; return 7
} }
return 0; return 0
}, },
QuestionTypeOptions() { QuestionTypeOptions() {
if (this.level > 7) { if (this.level > 7) {
return [ return [
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0), ...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
...this.$d.FeedBackTypeToIR, ...this.$d.FeedBackTypeToIR,
]; ]
} }
if (this.hasPermi(["role:ir"])) { if (this.hasPermi(['role:ir'])) {
return this.$d.FeedBackTypeToIR; return this.$d.FeedBackTypeToIR
} }
if (this.hasPermi(["role:crc"])) { if (this.hasPermi(['role:crc'])) {
return this.$d.FeedBackTypeToCRC; return this.$d.FeedBackTypeToCRC
} }
return []; return []
}, },
}, },
created() { created() {
this.getList(); this.getList()
}, },
methods: { methods: {
// CheckBox // CheckBox
handleSelectTable(row) { handleSelectTable(row) {
return row.State < 1; return row.State < 1
}, },
async getList() { async getList() {
try { try {
if (this.trialId) { if (this.trialId) {
this.searchData.TrialId = this.trialId; this.searchData.TrialId = this.trialId
} }
this.loading = true; this.loading = true
let res = await getUserFeedBackList(this.searchData); let res = await getUserFeedBackList(this.searchData)
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list = res.Result.CurrentPageData; this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount; this.total = res.Result.TotalCount
} }
} catch (err) { } catch (err) {
this.loading = false; this.loading = false
console.log(err); console.log(err)
} }
}, },
handleDatetimeChange(val) { handleDatetimeChange(val) {
if (val) { if (val) {
this.searchData.BeginCreatime = val[0]; this.searchData.BeginCreatime = val[0]
this.searchData.EndCreatime = val[1]; this.searchData.EndCreatime = val[1]
} else { } else {
this.searchData.BeginCreatime = ""; this.searchData.BeginCreatime = ''
this.searchData.EndCreatime = ""; this.searchData.EndCreatime = ''
} }
}, },
// //
handleReset() { handleReset() {
this.datetimerange = null; this.datetimerange = null
this.handleDatetimeChange(); this.handleDatetimeChange()
this.searchData = searchDataDefault(); this.searchData = searchDataDefault()
this.getList(); this.getList()
}, },
// //
async resolve() { async resolve() {
try { try {
let confirm = await this.$confirm(this.$t("feedBack:resolve:tip"), { let confirm = await this.$confirm(this.$t('feedBack:resolve:tip'), {
type: "warning", type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}); })
if (!confirm) return; if (!confirm) return
let data = { let data = {
IdList: this.tableSelectData.map((item) => item.Id), IdList: this.tableSelectData.map((item) => item.Id),
state: 1, state: 1,
}; }
let res = await batchUpdateFeedBackState(data); let res = await batchUpdateFeedBackState(data)
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success(this.$t("feedBack:resolve:success")); this.$message.success(this.$t('feedBack:resolve:success'))
this.getList(); this.getList()
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err)
} }
}, },
// //
@ -441,32 +441,32 @@ export default {
// //
handleSelectChange(selection) { handleSelectChange(selection) {
// console.log(selection, "handleSelectChange"); // console.log(selection, "handleSelectChange");
this.tableSelectData = selection; this.tableSelectData = selection
}, },
// //
handleSortByColumn(column) { handleSortByColumn(column) {
if (column.order === "ascending") { if (column.order === 'ascending') {
this.searchData.Asc = true; this.searchData.Asc = true
} else { } else {
this.searchData.Asc = false; this.searchData.Asc = false
} }
this.searchData.SortField = column.prop; this.searchData.SortField = column.prop
this.searchData.PageIndex = 1; this.searchData.PageIndex = 1
this.getList(); this.getList()
}, },
// //
getDetail(row) { getDetail(row) {
this.$FB({ this.$FB({
type: "detail", type: 'detail',
Id: row.Id, Id: row.Id,
callBack: () => { callBack: () => {
this.getList(); this.getList()
this.$emit("success"); this.$emit('success')
}, },
}); })
}, },
}, },
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
.role { .role {

View File

@ -45,7 +45,9 @@
:label="$t('trials:sitesList:dicomAEList:table:action')" :label="$t('trials:sitesList:dicomAEList:table:action')"
min-width="120" min-width="120"
v-if=" v-if="
hasPermi(['trials:trials-panel:setting:personnel-manage:edit-site']) hasPermi([
'trials:trials-panel:setting:personnel-manage:edit-dicom',
])
" "
> >
<template slot-scope="scope"> <template slot-scope="scope">

View File

@ -82,14 +82,15 @@
<el-button <el-button
type="primary" type="primary"
icon="el-icon-download" icon="el-icon-download"
v-hasPermi="[
'trials:trials-panel:setting:personnel-manage:download',
]"
@click="handleDownload" @click="handleDownload"
> >
{{ $t('common:button:downloadTpl') }} {{ $t('common:button:downloadTpl') }}
</el-button> </el-button>
<el-button <el-button
v-hasPermi="[ v-hasPermi="['trials:trials-panel:setting:personnel-manage:upload']"
'trials:trials-panel:setting:personnel-manage:add-site',
]"
type="primary" type="primary"
icon="el-icon-upload2" icon="el-icon-upload2"
@click="handleUpload" @click="handleUpload"
@ -232,6 +233,7 @@
hasPermi([ hasPermi([
'trials:trials-panel:setting:personnel-manage:edit-site', 'trials:trials-panel:setting:personnel-manage:edit-site',
'trials:trials-panel:setting:personnel-manage:remove-site', 'trials:trials-panel:setting:personnel-manage:remove-site',
'trials:trials-panel:setting:personnel-manage:edit-dicom',
]) ])
" "
:label="$t('common:action:action')" :label="$t('common:action:action')"
@ -261,7 +263,7 @@
:title="$t('common:button:config')" :title="$t('common:button:config')"
icon="el-icon-setting" icon="el-icon-setting"
v-hasPermi="[ v-hasPermi="[
'trials:trials-panel:setting:personnel-manage:edit-site', 'trials:trials-panel:setting:personnel-manage:edit-dicom',
]" ]"
@click="handleConfig(scope.row, 'add')" @click="handleConfig(scope.row, 'add')"
/> />

View File

@ -19,11 +19,11 @@
size="small" size="small"
style="margin-left: 10px" style="margin-left: 10px"
> >
( {{ $fd("TrialStatusEnum", trialInfo.TrialStatusStr) }} ) ( {{ $fd('TrialStatusEnum', trialInfo.TrialStatusStr) }} )
</el-tag> </el-tag>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:trialType')"> <el-descriptions-item :label="$t('trials:trials-list:form:trialType')">
{{ $fd("TrialType", trialInfo.TrialType) }} {{ $fd('TrialType', trialInfo.TrialType) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item <el-descriptions-item
@ -70,8 +70,8 @@
> >
<span v-if="trialInfo.DeclarationTypeEnumList">{{ <span v-if="trialInfo.DeclarationTypeEnumList">{{
trialInfo.DeclarationTypeEnumList.map((v) => trialInfo.DeclarationTypeEnumList.map((v) =>
$fd("DeclarationType", v) $fd('DeclarationType', v)
).join(", ") ).join(', ')
}}</span> }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:phase')"> <el-descriptions-item :label="$t('trials:trials-list:form:phase')">
@ -81,10 +81,10 @@
<el-descriptions-item <el-descriptions-item
:label="$t('trials:trials-list:form:indicationType')" :label="$t('trials:trials-list:form:indicationType')"
> >
{{ $fd("IndicationType", trialInfo.IndicationTypeId, "id") }} {{ $fd('IndicationType', trialInfo.IndicationTypeId, 'id') }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:indication')"> <el-descriptions-item :label="$t('trials:trials-list:form:indication')">
{{ $fd("Indication", trialInfo.IndicationEnum) {{ $fd('Indication', trialInfo.IndicationEnum)
}}{{ trialInfo.Indication }} }}{{ trialInfo.Indication }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:modality')"> <el-descriptions-item :label="$t('trials:trials-list:form:modality')">
@ -125,7 +125,7 @@
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<el-descriptions-item :label="$t('trials:trials-list:form:expedited')"> <el-descriptions-item :label="$t('trials:trials-list:form:expedited')">
{{ $fd("YesOrNoForInt", trialInfo.Expedited) }} {{ $fd('YesOrNoForInt', trialInfo.Expedited) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:projectCycle')"> <el-descriptions-item :label="$t('trials:trials-list:form:projectCycle')">
{{ trialInfo.ProjectCycle }} {{ trialInfo.ProjectCycle }}
@ -141,8 +141,8 @@
> >
<span v-if="trialInfo.AttendedReviewerTypeEnumList">{{ <span v-if="trialInfo.AttendedReviewerTypeEnumList">{{
trialInfo.AttendedReviewerTypeEnumList.map((v) => trialInfo.AttendedReviewerTypeEnumList.map((v) =>
$fd("AttendedReviewerType", v) $fd('AttendedReviewerType', v)
).join(", ") ).join(', ')
}}</span> }}</span>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -151,53 +151,53 @@
:value="trialInfo.UserFeedBackUnDealedCount || 0" :value="trialInfo.UserFeedBackUnDealedCount || 0"
:max="99" :max="99"
class="inBox" class="inBox"
v-hasPermi="['role:pm']" v-hasPermi="['role:pm', 'role:admin', 'role:spm']"
> >
<i class="el-icon-message" @click.stop="openFeedBack"></i> <i class="el-icon-message" @click.stop="openFeedBack"></i>
</el-badge> </el-badge>
</div> </div>
</template> </template>
<script> <script>
import { getTrialInfo } from "@/api/trials"; import { getTrialInfo } from '@/api/trials'
export default { export default {
data() { data() {
return { return {
trialInfo: {}, trialInfo: {},
trialId: "", trialId: '',
trialStatus: "", trialStatus: '',
formLoading: false, formLoading: false,
}; }
}, },
mounted() { mounted() {
this.trialId = this.$route.query.trialId; this.trialId = this.$route.query.trialId
this.initForm(); this.initForm()
}, },
methods: { methods: {
initForm() { initForm() {
this.formLoading = true; this.formLoading = true
getTrialInfo(this.trialId) getTrialInfo(this.trialId)
.then((res) => { .then((res) => {
this.formLoading = false; this.formLoading = false
this.trialInfo = res.Result; this.trialInfo = res.Result
this.trialInfo.ReviewTypeList = this.trialInfo.ReviewTypeList =
this.trialInfo.ReviewTypeList.length > 0 this.trialInfo.ReviewTypeList.length > 0
? this.trialInfo.ReviewTypeList.join(", ") ? this.trialInfo.ReviewTypeList.join(', ')
: ""; : ''
var modalityArr = []; var modalityArr = []
res.Result.ModalityIds.map((i) => { res.Result.ModalityIds.map((i) => {
modalityArr.push(this.$fd("Modality", i, "id")); modalityArr.push(this.$fd('Modality', i, 'id'))
}); })
this.trialInfo.ModalityList = modalityArr.join(", "); this.trialInfo.ModalityList = modalityArr.join(', ')
this.trialInfo.Criterion = this.trialInfo.Criterion =
res.Result.CriterionList && res.Result.CriterionList.length > 0 res.Result.CriterionList && res.Result.CriterionList.length > 0
? res.Result.CriterionList.join(", ") ? res.Result.CriterionList.join(', ')
: ""; : ''
// this.trialInfo.Expedited = this.$fd('Trial_BasicInfo', res.Result.Expedited) // this.trialInfo.Expedited = this.$fd('Trial_BasicInfo', res.Result.Expedited)
// this.trialInfo.AttendedReviewerType = this.$fd('Trial_BasicInfo', res.Result.AttendedReviewerType) // this.trialInfo.AttendedReviewerType = this.$fd('Trial_BasicInfo', res.Result.AttendedReviewerType)
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false
}); })
}, },
// //
openFeedBack() { openFeedBack() {
@ -208,12 +208,12 @@ export default {
trialId: this.trialId, trialId: this.trialId,
}, },
callBack: () => { callBack: () => {
this.initForm(); this.initForm()
}, },
}); })
}, },
}, },
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
.trial-information { .trial-information {