admin项目用户角色权限配置、部分国际化问题解决
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
cbcb84a768
commit
041266c250
|
@ -37,7 +37,7 @@
|
|||
<span> {{ $fd('IsEnable', !scope.row.IsUserRoleDisabled) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common:action:action')" width="120px">
|
||||
<el-table-column :label="$t('common:action:action')" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
|
@ -154,7 +154,8 @@
|
|||
<el-button
|
||||
v-if="
|
||||
Array.isArray(scope.row.TrialUserRoleList) &&
|
||||
scope.row.TrialUserRoleList.length > 0
|
||||
scope.row.TrialUserRoleList.length > 0 &&
|
||||
hasPermi(['trials:trials-panel:setting:personnel-manage:status'])
|
||||
"
|
||||
type="text"
|
||||
@click.stop="openRoleList(scope.row)"
|
||||
|
@ -179,6 +180,32 @@
|
|||
).join(', ')
|
||||
}}</span>
|
||||
</el-button>
|
||||
<div
|
||||
v-else-if="
|
||||
Array.isArray(scope.row.TrialUserRoleList) &&
|
||||
scope.row.TrialUserRoleList.length > 0
|
||||
"
|
||||
>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="$t('trials:staff:tip:userTypeDisabled')"
|
||||
placement="top"
|
||||
style="margin-right: 2px"
|
||||
v-if="
|
||||
scope.row.TrialUserRoleList.some(
|
||||
(item) => item.IsDeleted || item.IsUserRoleDisabled
|
||||
)
|
||||
"
|
||||
>
|
||||
<i class="el-icon-warning icon-i"></i>
|
||||
</el-tooltip>
|
||||
<span>{{
|
||||
scope.row.TrialUserRoleList.map(
|
||||
(item) => item.UserTypeShortName
|
||||
).join(', ')
|
||||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 联系电话 -->
|
||||
|
@ -479,7 +506,10 @@
|
|||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common:action:action')" min-width="120px">
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
min-width="120px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<el-form-item>
|
||||
<!-- 查询 -->
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t("common:button:search") }}
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button
|
||||
|
@ -37,7 +37,7 @@
|
|||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -101,15 +101,11 @@
|
|||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.UserCount > 0"
|
||||
type="text"
|
||||
@click="getStaffList(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="getStaffList(scope.row)">
|
||||
{{
|
||||
scope.row.UserNameList.length > 0
|
||||
? scope.row.UserNameList.join(", ")
|
||||
: ""
|
||||
? scope.row.UserNameList.join(', ')
|
||||
: ''
|
||||
}}
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -164,10 +160,10 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd("IsUserExitTrial", scope.row.IsDeleted)
|
||||
$fd('IsUserExitTrial', scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else>{{
|
||||
$fd("IsUserExitTrial", scope.row.IsDeleted)
|
||||
$fd('IsUserExitTrial', scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -193,23 +189,23 @@
|
|||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { getSiteCRCList, getTrialSiteCRCList } from "@/api/trials";
|
||||
import BaseContainer from "@/components/BaseContainer";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { getSiteCRCList, getTrialSiteCRCList } from '@/api/trials'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import Pagination from '@/components/Pagination'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
UserRealName: "",
|
||||
SiteName: "",
|
||||
SortField: "TrialSiteCode",
|
||||
UserRealName: '',
|
||||
SiteName: '',
|
||||
SortField: 'TrialSiteCode',
|
||||
Asc: true,
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
TrialSiteCode: null,
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "SiteList",
|
||||
name: 'SiteList',
|
||||
components: { BaseContainer, BaseModel, Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
@ -219,65 +215,65 @@ export default {
|
|||
loading: false,
|
||||
crc_model: {
|
||||
visible: false,
|
||||
title: this.$t("trials:site:dialogTitle:staff"),
|
||||
width: "60%",
|
||||
title: this.$t('trials:site:dialogTitle:staff'),
|
||||
width: '60%',
|
||||
},
|
||||
userListLoading: "",
|
||||
userListLoading: '',
|
||||
userList: [],
|
||||
trialId: "",
|
||||
};
|
||||
trialId: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.trialId = this.$route.query.trialId;
|
||||
this.trialId = this.$route.query.trialId
|
||||
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.searchData.TrialId = this.trialId;
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.trialId
|
||||
getSiteCRCList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
getStaffList(row) {
|
||||
this.currentRow = { ...row };
|
||||
this.crc_model.visible = true;
|
||||
this.userListLoading = true;
|
||||
this.currentRow = { ...row }
|
||||
this.crc_model.visible = true
|
||||
this.userListLoading = true
|
||||
getTrialSiteCRCList(this.trialId, this.currentRow.TrialSiteId)
|
||||
.then((res) => {
|
||||
this.userListLoading = false;
|
||||
this.userList = res.Result;
|
||||
this.userListLoading = false
|
||||
this.userList = res.Result
|
||||
})
|
||||
.catch(() => {
|
||||
this.userListLoading = false;
|
||||
});
|
||||
this.userListLoading = false
|
||||
})
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortChange(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()
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue