新增权限配置

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

View File

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

View File

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

View File

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